Commit 0da2acb9 by tetiana yaremko

Commit message

parent 03ec0bdc
Showing with 4861 additions and 0 deletions
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# Matches multiple files with brace expansion notation
# Set default charset
[*]
charset = utf-8
# Tab indentation (no size specified)
indent_style = tab
.DS_Store
application/cache/*
!application/cache/index.html
application/logs/*
!application/logs/index.html
!application/*/.htaccess
composer.lock
user_guide_src/build/*
user_guide_src/cilexer/build/*
user_guide_src/cilexer/dist/*
user_guide_src/cilexer/pycilexer.egg-info/*
/vendor/
# IDE Files
#-------------------------
/nbproject/
.idea/*
## Sublime Text cache files
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project
/tests/tests/
/tests/results/
runtime: php55
api_version: 1
handlers:
- url: /(.+\.(gif|png|jpg|css|js))$
static_files: \1
upload: .+\.(gif|png|jpg|css|js)$
application_readable: true
- url: /.*
script: index.php
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the framework as light-weight as possible only the
| absolute minimal resources are loaded by default. For example,
| the database is not connected to automatically since no assumption
| is made regarding whether you intend to use it. This file lets
| you globally define which systems you would like loaded with every
| request.
|
| -------------------------------------------------------------------
| Instructions
| -------------------------------------------------------------------
|
| These are the things you can load automatically:
|
| 1. Packages
| 2. Libraries
| 3. Drivers
| 4. Helper files
| 5. Custom config files
| 6. Language files
| 7. Models
|
*/
/*
| -------------------------------------------------------------------
| Auto-load Packages
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
*/
$autoload['packages'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in system/libraries/ or your
| application/libraries/ directory, with the addition of the
| 'database' library, which is somewhat of a special case.
|
| Prototype:
|
| $autoload['libraries'] = array('database', 'email', 'session');
|
| You can also supply an alternative library name to be assigned
| in the controller:
|
| $autoload['libraries'] = array('user_agent' => 'ua');
*/
$autoload['libraries'] = array('database', 'session', 'form_validation', 'upload', 'cart');
/*
| -------------------------------------------------------------------
| Auto-load Drivers
| -------------------------------------------------------------------
| These classes are located in system/libraries/ or in your
| application/libraries/ directory, but are also placed inside their
| own subdirectory and they extend the CI_Driver_Library class. They
| offer multiple interchangeable driver options.
|
| Prototype:
|
| $autoload['drivers'] = array('cache');
|
| You can also supply an alternative property name to be assigned in
| the controller:
|
| $autoload['drivers'] = array('cache' => 'cch');
|
*/
$autoload['drivers'] = array('session');
/*
| -------------------------------------------------------------------
| Auto-load Helper Files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['helper'] = array('url', 'file');
*/
$autoload['helper'] = array('url', 'asset', 'form');
/*
| -------------------------------------------------------------------
| Auto-load Config files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['config'] = array('config1', 'config2');
|
| NOTE: This item is intended for use ONLY if you have created custom
| config files. Otherwise, leave it blank.
|
*/
$autoload['config'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Language files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['language'] = array('lang1', 'lang2');
|
| NOTE: Do not include the "_lang" part of your file. For example
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
*/
$autoload['language'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Models
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['model'] = array('first_model', 'second_model');
|
| You can also supply an alternative model name to be assigned
| in the controller:
|
| $autoload['model'] = array('first_model' => 'first');
*/
$autoload['model'] = array();
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Display Debug backtrace
|--------------------------------------------------------------------------
|
| If set to TRUE, a backtrace will be displayed along with php errors. If
| error_reporting is disabled, the backtrace will not display, regardless
| of this setting
|
*/
defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE);
/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system. The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
| always be used to set the mode correctly.
|
*/
defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644);
defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666);
defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755);
defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755);
/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/
defined('FOPEN_READ') OR define('FOPEN_READ', 'rb');
defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b');
defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
defined('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab');
defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
/*
|--------------------------------------------------------------------------
| Exit Status Codes
|--------------------------------------------------------------------------
|
| Used to indicate the conditions under which the script is exit()ing.
| While there is no universal standard for error codes, there are some
| broad conventions. Three such conventions are mentioned below, for
| those who wish to make use of them. The CodeIgniter defaults were
| chosen for the least overlap with these conventions, while still
| leaving room for others to be defined in future versions and user
| applications.
|
| The three main conventions used for determining exit status codes
| are as follows:
|
| Standard C/C++ Library (stdlibc):
| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
| (This link also contains other GNU-specific conventions)
| BSD sysexits.h:
| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
| Bash scripting:
| http://tldp.org/LDP/abs/html/exitcodes.html
|
*/
defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors
defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error
defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error
defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found
defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input
defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error
defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
define('ERR_NONE', 0);
define('ERR_INVALID_EMAIL', 1);
define('ERR_INVALID_PASSWORD', 2);
define ('ERR_EMAIL_NOT_ACTIVE', 3);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
| For complete instructions please consult the 'Database Connection'
| page of the User Guide.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
| ['dsn'] The full DSN string describe a connection to the database.
| ['hostname'] The hostname of your database server.
| ['username'] The username used to connect to the database
| ['password'] The password used to connect to the database
| ['database'] The name of the database you want to connect to
| ['dbdriver'] The database driver. e.g.: mysqli.
| Currently supported:
| cubrid, ibase, mssql, mysql, mysqli, oci8,
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
| ['dbprefix'] You can add an optional prefix, which will be added
| to the table name when using the Query Builder class
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
| ['cachedir'] The path to the folder where cache files should be stored
| ['char_set'] The character set used in communicating with the database
| ['dbcollat'] The character collation used in communicating with the database
| NOTE: For MySQL and MySQLi databases, this setting is only used
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
| (and in table creation queries made with DB Forge).
| There is an incompatibility in PHP with mysql_real_escape_string() which
| can make your site vulnerable to SQL injection if you are using a
| multi-byte character set and are running versions lower than these.
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
| ['encrypt'] Whether or not to use an encrypted connection.
|
| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
| 'ssl_key' - Path to the private key file
| 'ssl_cert' - Path to the public key certificate file
| 'ssl_ca' - Path to the certificate authority file
| 'ssl_capath' - Path to a directory containing trusted CA certificates in PEM format
| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not
|
| ['compress'] Whether or not to use client compression (MySQL only)
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
| - good for ensuring strict SQL while developing
| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
| NOTE: Disabling this will also effectively disable both
| $this->db->last_query() and profiling of DB queries.
| When you run a query, with this setting set to TRUE (default),
| CodeIgniter will store the SQL statement for debugging purposes.
| However, this may cause high memory usage, especially if you run
| a lot of SQL queries ... disable this to avoid that problem.
|
| The $active_group variable lets you choose which connection group to
| make active. By default there is only one group (the 'default' group).
|
| The $query_builder variables lets you determine whether or not to load
| the query builder class.
*/
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => '104.199.82.156',
'username' => 'tetiana',
'password' => 'yaremko_tetiana',
'database' => 'mydb',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$_doctypes = array(
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'xhtml-basic11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
'html5' => '<!DOCTYPE html>',
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
'svg11' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
'svg11-basic' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
'svg11-tiny' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
'xhtml-math-svg-xh' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-math-svg-sh' => '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">'
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| Foreign Characters
| -------------------------------------------------------------------
| This file contains an array of foreign characters for transliteration
| conversion used by the Text helper
|
*/
$foreign_characters = array(
'/ä|æ|ǽ/' => 'ae',
'/ö|œ/' => 'oe',
'/ü/' => 'ue',
'/Ä/' => 'Ae',
'/Ü/' => 'Ue',
'/Ö/' => 'Oe',
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ|А/' => 'A',
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ|а/' => 'a',
'/Б/' => 'B',
'/б/' => 'b',
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
'/ç|ć|ĉ|ċ|č/' => 'c',
'/Д|Δ/' => 'D',
'/д|δ/' => 'd',
'/Ð|Ď|Đ/' => 'Dj',
'/ð|ď|đ/' => 'dj',
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ|Е|Э/' => 'E',
'/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ|е|э/' => 'e',
'/Ф/' => 'F',
'/ф/' => 'f',
'/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G',
'/ĝ|ğ|ġ|ģ|γ|г|ґ/' => 'g',
'/Ĥ|Ħ/' => 'H',
'/ĥ|ħ/' => 'h',
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị|И|Ы/' => 'I',
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị|и|ы|ї/' => 'i',
'/Ĵ/' => 'J',
'/ĵ/' => 'j',
'/Θ/' => 'TH',
'/θ/' => 'th',
'/Ķ|Κ|К/' => 'K',
'/ķ|κ|к/' => 'k',
'/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L',
'/ĺ|ļ|ľ|ŀ|ł|λ|л/' => 'l',
'/М/' => 'M',
'/м/' => 'm',
'/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N',
'/ñ|ń|ņ|ň|ʼn|ν|н/' => 'n',
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ|О/' => 'O',
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ|о/' => 'o',
'/П/' => 'P',
'/п/' => 'p',
'/Ŕ|Ŗ|Ř|Ρ|Р/' => 'R',
'/ŕ|ŗ|ř|ρ|р/' => 'r',
'/Ś|Ŝ|Ş|Ș|Š|Σ|С/' => 'S',
'/ś|ŝ|ş|ș|š|ſ|σ|ς|с/' => 's',
'/Ț|Ţ|Ť|Ŧ|Τ|Т/' => 'T',
'/ț|ţ|ť|ŧ|τ|т/' => 't',
'/Þ|þ/' => 'th',
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U',
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u',
'/Ƴ|Ɏ|Ỵ|Ẏ|Ӳ|Ӯ|Ў|Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y',
'/ẙ|ʏ|ƴ|ɏ|ỵ|ẏ|ӳ|ӯ|ў|ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ|й/' => 'y',
'/В/' => 'V',
'/в/' => 'v',
'/Ŵ/' => 'W',
'/ŵ/' => 'w',
'/Φ/' => 'F',
'/φ/' => 'f',
'/Χ/' => 'CH',
'/χ/' => 'ch',
'/Ź|Ż|Ž|Ζ|З/' => 'Z',
'/ź|ż|ž|ζ|з/' => 'z',
'/Æ|Ǽ/' => 'AE',
'/ß/' => 'ss',
'/IJ/' => 'IJ',
'/ij/' => 'ij',
'/Œ/' => 'OE',
'/ƒ/' => 'f',
'/Ξ/' => 'KS',
'/ξ/' => 'ks',
'/Π/' => 'P',
'/π/' => 'p',
'/Β/' => 'V',
'/β/' => 'v',
'/Μ/' => 'M',
'/μ/' => 'm',
'/Ψ/' => 'PS',
'/ψ/' => 'ps',
'/Ё/' => 'Yo',
'/ё/' => 'yo',
'/Є/' => 'Ye',
'/є/' => 'ye',
'/Ї/' => 'Yi',
'/Ж/' => 'Zh',
'/ж/' => 'zh',
'/Х/' => 'Kh',
'/х/' => 'kh',
'/Ц/' => 'Ts',
'/ц/' => 'ts',
'/Ч/' => 'Ch',
'/ч/' => 'ch',
'/Ш/' => 'Sh',
'/ш/' => 'sh',
'/Щ/' => 'Shch',
'/щ/' => 'shch',
'/Ъ|ъ|Ь|ь/' => '',
'/Ю/' => 'Yu',
'/ю/' => 'yu',
'/Я/' => 'Ya',
'/я/' => 'ya'
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Hooks
| -------------------------------------------------------------------------
| This file lets you define "hooks" to extend CI without hacking the core
| files. Please see the user guide for info:
|
| https://codeigniter.com/user_guide/general/hooks.html
|
*/
$hook['post_controller_constructor'][] = array(
'class'=>'Authorization',
'function'=>'check',
'filename'=>'Authorization.php',
'filepath'=>'hooks'
);
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Memcached settings
| -------------------------------------------------------------------------
| Your Memcached servers can be specified below.
|
| See: https://codeigniter.com/user_guide/libraries/caching.html#memcached
|
*/
$config = array(
'default' => array(
'hostname' => '127.0.0.1',
'port' => '11211',
'weight' => '1',
),
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Enable/Disable Migrations
|--------------------------------------------------------------------------
|
| Migrations are disabled by default for security reasons.
| You should enable migrations whenever you intend to do a schema migration
| and disable it back when you're done.
|
*/
$config['migration_enabled'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migration Type
|--------------------------------------------------------------------------
|
| Migration file names may be based on a sequential identifier or on
| a timestamp. Options are:
|
| 'sequential' = Sequential migration naming (001_add_blog.php)
| 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php)
| Use timestamp format YYYYMMDDHHIISS.
|
| Note: If this configuration value is missing the Migration library
| defaults to 'sequential' for backward compatibility with CI2.
|
*/
$config['migration_type'] = 'timestamp';
/*
|--------------------------------------------------------------------------
| Migrations table
|--------------------------------------------------------------------------
|
| This is the name of the table that will store the current migrations state.
| When migrations runs it will store in a database table which migration
| level the system is at. It then compares the migration level in this
| table to the $config['migration_version'] if they are not the same it
| will migrate up. This must be set.
|
*/
$config['migration_table'] = 'migrations';
/*
|--------------------------------------------------------------------------
| Auto Migrate To Latest
|--------------------------------------------------------------------------
|
| If this is set to TRUE when you load the migrations class and have
| $config['migration_enabled'] set to TRUE the system will auto migrate
| to your latest migration (whatever $config['migration_version'] is
| set to). This way you do not have to call migrations anywhere else
| in your code to have the latest migration.
|
*/
$config['migration_auto_latest'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migrations version
|--------------------------------------------------------------------------
|
| This is used to set migration version that the file system should be on.
| If you run $this->migration->current() this is the version that schema will
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 0;
/*
|--------------------------------------------------------------------------
| Migrations Path
|--------------------------------------------------------------------------
|
| Path to your migrations folder.
| Typically, it will be within your application path.
| Also, writing permission is required within the migrations path.
|
*/
$config['migration_path'] = APPPATH.'migrations/';
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Profiler Sections
| -------------------------------------------------------------------------
| This file lets you determine whether or not various sections of Profiler
| data are displayed when the Profiler is enabled.
| Please see the user guide for info:
|
| https://codeigniter.com/user_guide/general/profiling.html
|
*/
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
| example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
| https://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There are three reserved routes:
|
| $route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
| $route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router which controller/method to use if those
| provided in the URL cannot be matched to a valid route.
|
| $route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes in the
| controller and method URI segments.
|
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
$route['default_controller'] = 'welcome';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| SMILEYS
| -------------------------------------------------------------------
| This file contains an array of smileys for use with the emoticon helper.
| Individual images can be used to replace multiple smileys. For example:
| :-) and :) use the same image replacement.
|
| Please see user guide for more info:
| https://codeigniter.com/user_guide/helpers/smiley_helper.html
|
*/
$smileys = array(
// smiley image name width height alt
':-)' => array('grin.gif', '19', '19', 'grin'),
':lol:' => array('lol.gif', '19', '19', 'LOL'),
':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
':)' => array('smile.gif', '19', '19', 'smile'),
';-)' => array('wink.gif', '19', '19', 'wink'),
';)' => array('wink.gif', '19', '19', 'wink'),
':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
':-S' => array('confused.gif', '19', '19', 'confused'),
':wow:' => array('surprise.gif', '19', '19', 'surprised'),
':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
'%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
':P' => array('raspberry.gif', '19', '19', 'raspberry'),
':blank:' => array('blank.gif', '19', '19', 'blank stare'),
':long:' => array('longface.gif', '19', '19', 'long face'),
':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
'8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
':down:' => array('downer.gif', '19', '19', 'downer'),
':red:' => array('embarrassed.gif', '19', '19', 'red face'),
':sick:' => array('sick.gif', '19', '19', 'sick'),
':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
':-/' => array('hmm.gif', '19', '19', 'hmmm'),
'>:(' => array('mad.gif', '19', '19', 'mad'),
':mad:' => array('mad.gif', '19', '19', 'mad'),
'>:-(' => array('angry.gif', '19', '19', 'angry'),
':angry:' => array('angry.gif', '19', '19', 'angry'),
':zip:' => array('zip.gif', '19', '19', 'zipper'),
':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
':ahhh:' => array('shock.gif', '19', '19', 'shock'),
':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
':snake:' => array('snake.gif', '19', '19', 'snake'),
':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'),
':question:' => array('question.gif', '19', '19', 'question')
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| USER AGENT TYPES
| -------------------------------------------------------------------
| This file contains four arrays of user agent data. It is used by the
| User Agent Class to help identify browser, platform, robot, and
| mobile device data. The array keys are used to identify the device
| and the array values are used to set the actual name of the item.
*/
$platforms = array(
'windows nt 10.0' => 'Windows 10',
'windows nt 6.3' => 'Windows 8.1',
'windows nt 6.2' => 'Windows 8',
'windows nt 6.1' => 'Windows 7',
'windows nt 6.0' => 'Windows Vista',
'windows nt 5.2' => 'Windows 2003',
'windows nt 5.1' => 'Windows XP',
'windows nt 5.0' => 'Windows 2000',
'windows nt 4.0' => 'Windows NT 4.0',
'winnt4.0' => 'Windows NT 4.0',
'winnt 4.0' => 'Windows NT',
'winnt' => 'Windows NT',
'windows 98' => 'Windows 98',
'win98' => 'Windows 98',
'windows 95' => 'Windows 95',
'win95' => 'Windows 95',
'windows phone' => 'Windows Phone',
'windows' => 'Unknown Windows OS',
'android' => 'Android',
'blackberry' => 'BlackBerry',
'iphone' => 'iOS',
'ipad' => 'iOS',
'ipod' => 'iOS',
'os x' => 'Mac OS X',
'ppc mac' => 'Power PC Mac',
'freebsd' => 'FreeBSD',
'ppc' => 'Macintosh',
'linux' => 'Linux',
'debian' => 'Debian',
'sunos' => 'Sun Solaris',
'beos' => 'BeOS',
'apachebench' => 'ApacheBench',
'aix' => 'AIX',
'irix' => 'Irix',
'osf' => 'DEC OSF',
'hp-ux' => 'HP-UX',
'netbsd' => 'NetBSD',
'bsdi' => 'BSDi',
'openbsd' => 'OpenBSD',
'gnu' => 'GNU/Linux',
'unix' => 'Unknown Unix OS',
'symbian' => 'Symbian OS'
);
// The order of this array should NOT be changed. Many browsers return
// multiple browser types so we want to identify the sub-type first.
$browsers = array(
'OPR' => 'Opera',
'Flock' => 'Flock',
'Edge' => 'Edge',
'Chrome' => 'Chrome',
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
'Opera.*?Version' => 'Opera',
'Opera' => 'Opera',
'MSIE' => 'Internet Explorer',
'Internet Explorer' => 'Internet Explorer',
'Trident.* rv' => 'Internet Explorer',
'Shiira' => 'Shiira',
'Firefox' => 'Firefox',
'Chimera' => 'Chimera',
'Phoenix' => 'Phoenix',
'Firebird' => 'Firebird',
'Camino' => 'Camino',
'Netscape' => 'Netscape',
'OmniWeb' => 'OmniWeb',
'Safari' => 'Safari',
'Mozilla' => 'Mozilla',
'Konqueror' => 'Konqueror',
'icab' => 'iCab',
'Lynx' => 'Lynx',
'Links' => 'Links',
'hotjava' => 'HotJava',
'amaya' => 'Amaya',
'IBrowse' => 'IBrowse',
'Maxthon' => 'Maxthon',
'Ubuntu' => 'Ubuntu Web Browser'
);
$mobiles = array(
// legacy array, old values commented out
'mobileexplorer' => 'Mobile Explorer',
// 'openwave' => 'Open Wave',
// 'opera mini' => 'Opera Mini',
// 'operamini' => 'Opera Mini',
// 'elaine' => 'Palm',
'palmsource' => 'Palm',
// 'digital paths' => 'Palm',
// 'avantgo' => 'Avantgo',
// 'xiino' => 'Xiino',
'palmscape' => 'Palmscape',
// 'nokia' => 'Nokia',
// 'ericsson' => 'Ericsson',
// 'blackberry' => 'BlackBerry',
// 'motorola' => 'Motorola'
// Phones and Manufacturers
'motorola' => 'Motorola',
'nokia' => 'Nokia',
'nexus' => 'Nexus',
'palm' => 'Palm',
'iphone' => 'Apple iPhone',
'ipad' => 'iPad',
'ipod' => 'Apple iPod Touch',
'sony' => 'Sony Ericsson',
'ericsson' => 'Sony Ericsson',
'blackberry' => 'BlackBerry',
'cocoon' => 'O2 Cocoon',
'blazer' => 'Treo',
'lg' => 'LG',
'amoi' => 'Amoi',
'xda' => 'XDA',
'mda' => 'MDA',
'vario' => 'Vario',
'htc' => 'HTC',
'samsung' => 'Samsung',
'sharp' => 'Sharp',
'sie-' => 'Siemens',
'alcatel' => 'Alcatel',
'benq' => 'BenQ',
'ipaq' => 'HP iPaq',
'mot-' => 'Motorola',
'playstation portable' => 'PlayStation Portable',
'playstation 3' => 'PlayStation 3',
'playstation vita' => 'PlayStation Vita',
'hiptop' => 'Danger Hiptop',
'nec-' => 'NEC',
'panasonic' => 'Panasonic',
'philips' => 'Philips',
'sagem' => 'Sagem',
'sanyo' => 'Sanyo',
'spv' => 'SPV',
'zte' => 'ZTE',
'sendo' => 'Sendo',
'nintendo dsi' => 'Nintendo DSi',
'nintendo ds' => 'Nintendo DS',
'nintendo 3ds' => 'Nintendo 3DS',
'wii' => 'Nintendo Wii',
'open web' => 'Open Web',
'openweb' => 'OpenWeb',
'meizu' => 'Meizu',
// Operating Systems
'android' => 'Android',
'symbian' => 'Symbian',
'SymbianOS' => 'SymbianOS',
'elaine' => 'Palm',
'series60' => 'Symbian S60',
'windows ce' => 'Windows CE',
// Browsers
'obigo' => 'Obigo',
'netfront' => 'Netfront Browser',
'openwave' => 'Openwave Browser',
'mobilexplorer' => 'Mobile Explorer',
'operamini' => 'Opera Mini',
'opera mini' => 'Opera Mini',
'opera mobi' => 'Opera Mobile',
'fennec' => 'Firefox Mobile',
// Other
'digital paths' => 'Digital Paths',
'avantgo' => 'AvantGo',
'xiino' => 'Xiino',
'novarra' => 'Novarra Transcoder',
'vodafone' => 'Vodafone',
'docomo' => 'NTT DoCoMo',
'o2' => 'O2',
// Fallback
'mobile' => 'Generic Mobile',
'wireless' => 'Generic Mobile',
'j2me' => 'Generic Mobile',
'midp' => 'Generic Mobile',
'cldc' => 'Generic Mobile',
'up.link' => 'Generic Mobile',
'up.browser' => 'Generic Mobile',
'smartphone' => 'Generic Mobile',
'cellphone' => 'Generic Mobile'
);
// There are hundreds of bots but these are the most common.
$robots = array(
'googlebot' => 'Googlebot',
'msnbot' => 'MSNBot',
'baiduspider' => 'Baiduspider',
'bingbot' => 'Bing',
'slurp' => 'Inktomi Slurp',
'yahoo' => 'Yahoo',
'ask jeeves' => 'Ask Jeeves',
'fastcrawler' => 'FastCrawler',
'infoseek' => 'InfoSeek Robot 1.0',
'lycos' => 'Lycos',
'yandex' => 'YandexBot',
'mediapartners-google' => 'MediaPartners Google',
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
'adsbot-google' => 'AdsBot Google',
'feedfetcher-google' => 'Feedfetcher Google',
'curious george' => 'Curious George',
'ia_archiver' => 'Alexa Crawler',
'MJ12bot' => 'Majestic-12',
'Uptimebot' => 'Uptimebot'
);
<?php
class Admin extends CI_Controller {
public function __construct()
{
parent::__construct();
}
public function index () {
$name = $this->session->userdata('name');
$this->load->view('admin/aside');
$this->load->view('admin/admin_home');
}
public function add_product() {
$this->form_validation->set_rules("artist", "Atist", "required");
$this->form_validation->set_rules("title", "Title", "required");
$this->form_validation->set_rules("genre", "Genre", "required");
$this->form_validation->set_rules("quantity", "Quantity", "required");
$this->form_validation->set_rules("price", "Price", "required");
$this->form_validation->set_rules("description", "Description", "required");
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png|jpeg';
$config['max_size'] = 2048;
$file_name="image".time();
$config['file_name']=$file_name;
$this->upload->initialize($config);
$field_name = "image";
if ($this->form_validation->run() == TRUE) {
if(!$this->upload->do_upload($field_name)) {
$file_error = $this->upload->display_errors();
$this->session->set_flashdata("file_error", "<div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\">
'$file_error' <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">
<span aria-hidden=\"true\">&times;</span></button></div>");
} else {
$this->load->model('Admin_model', 'admin');
$this->admin->add_product();
$this->session->set_flashdata("message", "<div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">
Product has been added to the database<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">
<span aria-hidden=\"true\">&times;</span></button></div>");
redirect('admin/product_inventory');
}
}
$this->load->view('admin/aside');
$this->load->view('admin/add_product');
}
public function product_inventory() {
$this->load->model('Admin_model', 'admin');
$data=$this->admin->get_data();
$this->load->view('admin/aside');
$this->load->view('admin/product_inventory', array('data'=>$data));
}
public function update_item($item_id) {
$this->load->model('Admin_model', 'admin');
$data=$this->admin->get_product($item_id);
$this->form_validation->set_rules("artist", "Atist", "required");
$this->form_validation->set_rules("title", "Title", "required");
$this->form_validation->set_rules("genre", "Genre", "required");
$this->form_validation->set_rules("quantity", "Quantity", "required");
$this->form_validation->set_rules("price", "Price", "required");
$this->form_validation->set_rules("description", "Description", "required");
$this->form_validation->set_rules("status", "Status", "required");
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png|jpeg';
$config['max_size'] = 2048;
$file_name="image".time();
$config['file_name']=$file_name;
$this->upload->initialize($config);
$field_name = "image";
if ($this->form_validation->run() == TRUE) {
if(!$this->upload->do_upload($field_name)) {
$file_error = $this->upload->display_errors();
$this->session->set_flashdata("file_error", "<div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\">
'$file_error' <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">
<span aria-hidden=\"true\">&times;</span></button></div>");
} else {
$this->load->model('Admin_model', 'admin');
$this->admin->update_product($item_id);
redirect('admin/product_inventory');
}
}
$this->load->view('admin/aside');
$this->load->view('admin/update_item', array('data'=>$data));
}
public function delete_item($item_id) {
$this->load->model('Admin_model', 'admin');
$this->admin->delete_product($item_id);
redirect('admin/product_inventory');
}
}
<?php
class Auth extends CI_Controller
{
function __construct()
{
parent::__construct();
}
public function logged_in_check()
{
if ($this->session->userdata("logged_in")) {
redirect("user/user_profile");
}
}
public function logout()
{
$this->session->unset_userdata("logged_in");
$this->session->sess_destroy();
redirect("auth/login");
}
public function login()
{
$this->logged_in_check();
$this->form_validation->set_rules("email", "Email", "trim|required");
$this->form_validation->set_rules("password", "Password", "trim|required");
if ($this->form_validation->run() == true) {
$this->load->model('auth_model', 'auth');
$this->load->model('Cart_model', 'cmodel');
$status = $this->auth->validate();
if ($status == ERR_INVALID_EMAIL) {
$this->session->set_flashdata("error", "Email is not valid");
} elseif ($status == ERR_INVALID_PASSWORD) {
$this->session->set_flashdata("error", "Password is not valid");
} elseif ($status == ERR_EMAIL_NOT_ACTIVE) {
$this->session->set_flashdata("error", "Email is not active");
} else {
$user_role = $this->auth->user_role();
$this->session->set_userdata("role_id", $user_role);
$this->session->set_userdata($this->auth->get_data());
$this->session->set_userdata("logged_in", true);
$data=$this->cmodel->getAllFromCart();
$this->cmodel->set_user_cart($this->session->userdata('email'), $data);
if($user_role==1) {
redirect("admin/index");
}
redirect("home/products");
}
}
$this->load->view('login1');
}
public function register()
{
$this->logged_in_check();
$this->form_validation->set_rules('email', 'Email', 'required|valid_email|is_unique[users.email]',
array('is_unique' => 'This email has already registered'));
$this->form_validation->set_rules('password', 'Password', 'required|min_length[8]');
$this->form_validation->set_rules('password2', 'Confirm password', 'required|matches[password]|min_length[8]');
$this->form_validation->set_rules('name', 'Name', 'required');
$this->form_validation->set_rules('surname', 'Surname', 'required');
$this->form_validation->set_rules('country', 'Country field', 'required');
$this->form_validation->set_rules('city', 'City field', 'required');
$this->form_validation->set_rules('street', 'Street field', 'required');
$this->form_validation->set_rules('zip', 'ZIP field', 'required');
$this->form_validation->set_rules('building', 'Building field', 'required');
$this->form_validation->set_rules('phone', 'Phone field', 'required');
if ($this->form_validation->run() == TRUE) {
$this->load->model('Register_model', 'reg');
$this->reg->register_user();
redirect("register_successful/registration_complete", "refresh");
}
$this->load->view('register');
}
public function verify () {
$email=$this->input->get('email');
$token= $this->input->get('token');
$user = $this->db-> get_where('users', array('email'=>$email))->row_array();
if($user) {
$user_token=$this->db->get_where('user_token', array('token'=>$token))->row_array();
if($user_token) {
$this->db->set('is_active', 1);
$this->db->where('email', $email);
$this->db->update('users');
$this->db->delete('user_token', array('email'=>$email));
$this->session->set_flashdata("error", "Your account has been activated");
redirect("auth/login");
}else {
$this->session->set_flashdata("error", "Token doesn't exist");
redirect("auth/login");
}
}else {
$this->session->set_flashdata("error", "Email does not exist");
redirect("auth/login");
}
}
public function forgotPassword () {
$this->form_validation->set_rules("email", "Email", "trim|required");
if($this->form_validation->run() == false) {
$this->load->view('forgotPassword');
}else {
$email = $this->input->post('email');
$user=$this->db->get_where('users', array('email'=>$email, 'is_active'=>1))->row_array();
if($user) {
$token = base64_encode(random_bytes(32));
$user_token=array(
'email'=>$email,
'token'=>$token,
'date_created'=>time()
);
$this->db->insert('user_token', $user_token);
$this->load->model('Register_model', 'reg');
$this->reg->sendEmail($token, 'forgot');
$this->session->set_flashdata("message", "Check your email to reset your password");
redirect("auth/forgotPassword");
}else{
$this->session->set_flashdata("message", "Email doesn't exist or is not activated");
redirect("auth/forgotPassword");
}
}
}
public function resetPassword() {
$email =$this->input->get('email');
$token =$this->input->get('token');
$user = $this->db->get_where('users', array('email'=>$email))->row_array();
if($user) {
$user_token=$this->db->get_where('user_token', array('token'=>$token))->row_array();
if($user_token) {
$this->session->set_userdata('reset_email', $email);
$this->changePassword();
}else {
$this->session->set_flashdata("error", "Token problem");
redirect("auth/login");
}
} else{
$this->session->set_flashdata("error", "Reset password failed!");
redirect("auth/login");
}
}
public function changePassword() {
if(!$this->session->userdata('reset_email')) {
redirect('auth/login');
}
$this->form_validation->set_rules('new_password', 'Password', 'trim|required|min_length[8]');
$this->form_validation->set_rules('new_password2', 'Confirm password', 'trim|required|matches[new_password]|min_length[8]');
if($this->form_validation->run() == false) {
$this->load->view('passReset');
} else {
$password= md5($this->input->post('new_password'));
$email=$this->session->userdata('reset_email');
$this->db->query("UPDATE users set password='$password' where email='$email'");
$this->session->unset_userdata('reset_email');
$this->session->set_flashdata("error", "Your password has been reset");
redirect("auth/login");
}
}
}
<?php
class Cart extends CI_Controller
{
public function __construct()
{
parent::__construct();
}
public function add_to_cart() {
$prod_id=$this->input->post('product_id');
$this->load->model('Cart_model', 'cmodel');
if ($this->session->userdata("logged_in")) {
$this->cmodel->add_to_user_cart($this->session->userdata('email'), $prod_id);
//echo '<pre>'; echo $this->session->userdata('email'); echo $prod_id; echo '</pre>';
} else {
$this->cmodel->add_to_cart($prod_id);
}
echo $this->show_cart();
}
public function updated_db_cart(){
$this->cart->destroy();
$this->load->model('Cart_model', 'cmodel');
$data=$this->cmodel->getAllFromCart();
if ($this->session->userdata("logged_in")) {
//$this->cmodel->set_user_cart($this->session->userdata('email'), $data);
$data=$this->cmodel->getAllFromUserCart($this->session->userdata('email'));
}
$new_cart = array();
foreach ($data as $item) {
$prod_id = $item->prod_id;
$data_db = $this->cmodel->get_prod_data($prod_id);
$cart = array(
'id' => $data_db->id,
'name' => $data_db->artist,
'price' => $data_db->price,
'qty' => $item->qty,
'title' => $data_db->title,
'image' => $data_db->image,
);
array_push($new_cart, $cart);
}
$this->cart->insert($new_cart);
}
// show mini-cart
public function show_cart(){
$this->updated_db_cart();
$output = '';
$no = 0;
foreach ($this->cart->contents() as $items) {
$no++;
$output .='
<div class="single-item-in-cart" data-cartitemid="'.$items['id'].'">
<a><img class="mini-image" src="'.base_url('uploads/'.$items['image']).'" style="height: 90px;"/></a>
</div>
<div style="" class="description">
<a style="text-transform:capitalize; margin:auto;" class="artist" href="">'.$items['name'].'</a>
<p style="font-size: 0.9rem; padding: 5px 0; line-height: 1; " class="mini-title">'.$items['title'].'</p>
<p style="font-weight:bold; padding: 5px 0;"class="mini-total"<span>€'.number_format($items['price'], 2)*number_format($items['qty']).'</span></p>
<button id="'.$items['rowid'].'" class="romove_cart btn btn-danger btn-sm" style="background-color: white; color: #888888; text-align: left; margin: 0 -5px; border:none" type="button">Remove </button></td>
</div>
<div class="quantity" style="text-align: center;">
<button type="button" plus-id="'.$items['rowid'].'" class="plus-item" style="background-color: white; border:none;"><i class="fa fa-chevron-up"></i></button>
<span>'.number_format($items['qty']).'</span>
<button type="button" minus-id="'.$items['rowid'].'" class="minus-item btn-sm" style="background-color: white; border-width: 0;"><i class="fa fa-chevron-down"></i></button>
</div>
';
}
$output .= '
<span class="sub-total" style="font-weight: bold; font-size: 0.9rem; margin-top: 20px; padding-right: 10px;">Total <span>€'.number_format($this->cart->total(), 2).'</span></span>
';
return $output;
}
//load mini-cart
public function load_cart(){
echo $this->show_cart();
}
public function delete_product_from_cart(){
$prod_id=0;
$data = array(
'rowid' => $this->input->post('row_id'),
'qty' => 0,
);
foreach ($this->cart->contents() as $content) {
if($content['rowid']==$data['rowid']) {
$prod_id=$content['id'];
}
}
$this->load->model('Cart_model', 'cmodel');
if ($this->session->userdata("logged_in")) {
$this->cmodel->remove_from_user_cart($this->session->userdata('email'), $prod_id);
} else {
$this->cmodel->remove_from_cart($prod_id);
}
$this->cart->update($data);
echo $this->show_cart();
}
public function increase_qty() {
$row_id=$this->input->post('row_id');
$qty=0;
$prod_id=0;
foreach ($this->cart->contents() as $content) {
if($content['rowid']==$row_id) {
$qty=$content['qty'] +1;
$prod_id=$content['id'];
}
}
$data = array(
'rowid' => $this->input->post('row_id'),
'qty' => $qty,
);
$this->cart->update($data);
echo $this->show_cart();
$this->load->model('Cart_model', 'cmodel');
if ($this->session->userdata("logged_in")) {
$this->cmodel->add_to_user_cart($this->session->userdata('email'), $prod_id);
} else {
$this->cmodel->add_to_cart($prod_id);
}
}
public function decrease_qty() {
$row_id=$this->input->post('row_id');
$qty=0;
$prod_id=0;
foreach ($this->cart->contents() as $content) {
if($content['rowid']==$row_id) {
$qty=$content['qty'] -1;
$prod_id=$content['id'];
}
}
$data = array(
'rowid' => $this->input->post('row_id'),
'qty' => $qty,
);
$this->load->model('Cart_model', 'cmodel');
if ($this->session->userdata("logged_in")) {
$this->cmodel->minus_qty_user_cart($this->session->userdata('email'), $prod_id, $qty);
} else {
$this->cmodel->minus_qty($prod_id, $qty);
}
$this->cart->update($data);
echo $this->show_cart();
}
public function user_cart() {
$this->load->model('Cart_model', 'cmodel');
if(!$this->session->userdata('logged_in')) {
redirect('auth/login');
}
$new_cart =array();
$data=$this->cmodel->getAllFromUserCart($this->session->userdata('email'));
foreach ($data as $item) {
$prod_id = $item->prod_id;
$data_db = $this->cmodel->get_prod_data($prod_id);
$cart =(object) array(
'id' => $data_db->id,
'name' => $data_db->artist,
'price' => $data_db->price,
'qty' => $item->qty,
'title' => $data_db->title,
'image' => $data_db->image,
);
array_push($new_cart, $cart);
}
$total=$this->cart->total();
$this->load->view('templates/header');
$this->load->view('user_cart', array('new_cart'=>$new_cart));
}
}
<?php
class Common extends CI_Controller
{
public function __construct()
{
parent::__construct();
}
public function unauthorized() {
$this->load->view('unauthorized_view');
}
}
<?php
class User extends CI_Controller
{
function __construct()
{
parent::__construct();
}
public function user_profile() {
if($this->session->userdata("role_id")=='1') {
redirect('admin/index');
};
if(isset($_POST['update'])) {
$this->form_validation->set_rules('new_email', 'Email', 'required|valid_email',
array('required' => 'Please, enter new email in order to update', 'valid_email' => 'Email not valid'));
$this->form_validation->set_rules('new_name', 'Name', 'required',
array('required' => 'Please, enter new name in order to update', 'valid_email' => 'Email not valid'));
$this->form_validation->set_rules('new_surname', 'Surname', 'required',
array('required' => 'Please, enter new surname in order to update', 'valid_email' => 'Email not valid'));
if ($this->form_validation->run() == true) {
$this->load->model('auth_model', 'auth');
$this->auth->updateEmail();
$this->session->set_userdata($this->auth->get_data());
$this->session->set_flashdata("message", "<div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">
Your data has been updated!<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">
<span aria-hidden=\"true\">&times;</span></button></div>");
redirect('user/user_profile');
}
}
elseif (isset($_POST['update-password'])) {
$this->form_validation->set_rules('update_password', 'Password', 'trim|required|min_length[8]');
$this->form_validation->set_rules('update_password2', 'Confirm password', 'trim|required|matches[update_password]|min_length[8]');
if ($this->form_validation->run() == true) {
$this->load->model('auth_model', 'auth');
$this->auth->updatePassword();
$this->session->set_userdata($this->auth->get_data());
$this->session->set_flashdata("pass_message", "<div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">
Your password has been updated!<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">
<span aria-hidden=\"true\">&times;</span></button></div>");
redirect("user/user_profile");
}
}
$this->load->view('userProfile');
}
}
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see https://codeigniter.com/user_guide/general/urls.html
*/
public function index()
{
$this->load->view('welcome_message');
}
}
<?php
class Home extends CI_Controller {
public function __construct()
{
parent::__construct();
}
public function products()
{
$this->load->model('Admin_model', 'admin');
$data=$this->admin->get_data();
$this->load->view('templates/header');
$this->load->view('templates/home_t', array('data'=>$data));
}
}
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<?php
class Items extends CI_Controller {
public function __construct()
{
parent::__construct();
}
public function item1()
{
/*if($_SESSION['user_logged']==False) {
redirect("home/products");
}*/
$this->load->view('templates/header');
$this->load->view('templates/product1_item');
}
}
<?php
class Register_successful extends CI_Controller {
public function __construct()
{
parent::__construct();
}
public function registration_complete()
{
//if(isset($_SESSION['registered']) && $_SESSION['registered'] == 1) {
// redirect("home/products", "refresh");
//}
$this->load->view('templates/header');
$this->load->view('succes_reg');
}
}
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<?php
function asset_url($resource)
{
return base_url() . "asset/" . $resource;
}
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<?php
class Authorization
{
public function check($params)
{
//lpad access control list
require_once('acl.php');
//get controller and action
$ci =& get_instance();
$controller = $ci->router->fetch_class();
$action = $ci->router->fetch_method();
//validate if that action is public(no session needed)
if (!empty($allowAll[$controller][$action])) {
return TRUE;
}
//get session information
if (isset($_COOKIE) && ($_COOKIE['ci_session'])) {
$ci_session = $ci->session->userdata;
if (!empty($ci_session['logged_in'])) {
$session = $ci_session['logged_in'];
$session_role = $ci_session['role_id'];
}
}
if (!isset($session) || !isset($session_role)) {
redirect(base_url('index.php/auth/login'));
//redirect(base_url('index.php/common/unauthorized'));
return;
} else {
//check that user is able to access action
if (empty($allowOnly[$session_role][$controller][$action])
|| $allowOnly[$session_role][$controller][$action] != TRUE) {
redirect(base_url('index.php/common/unauthorized'));
}
}
return true;
}
}
?>
<?php
//Access control list for the application
$allowAll=array();
$allowOnly=array();
$allowAll['auth']['login']=true;
$allowAll['auth']['register']=true;
$allowAll['auth']['forgotPassword']=true;
$allowAll['auth']['logout']=true;
$allowAll['auth']['resetPassword']=true;
$allowAll['auth']['changePassword']=true;
$allowAll['auth']['verify'] =true;
$allowAll['home']['products']=true;
$allowAll['cart']['add_to_cart']=true;
$allowAll['cart']['show_cart']=true;
$allowAll['cart']['load_cart']=true;
$allowAll['cart']['delete_product_from_cart']=true;
$allowAll['cart']['increase_qty']=true;
$allowAll['cart']['decrease_qty']=true;
$allowAll['common']['unauthorized']=true;
$allowOnly['1']['admin']['index']=true;
$allowOnly['1']['admin']['add_product']=true;
$allowOnly['1']['admin']['update_item']=true;
$allowOnly['1']['admin']['product_inventory']=true;
$allowOnly['1']['admin']['delete_item']=true;
$allowOnly['2']['user']['user_profile']=true;
$allowOnly['2']['cart']['user_cart']=true;
//$allowOnly['2']['home']['products']=true;
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<?php
class Admin_model extends CI_Model
{
//gets all data from the product table
public function get_data() {
$this->db->select('product.id, product.artist, product.title, product.genre, product.description, product.price, product.q_ty, product.image, status.status');
$this->db->from('product');
$this->db->join('status', 'product.status_id = status.id_status');
$query = $this->db->get();
return $query->result();
}
//insert input product data into array
public function product_item_array() {
$status=$this->input->post('status');
$this->db->select('id_status');
$this->db->from('status');
$this->db->where('status', $status);
$query = $this->db->get();
$status_id=$query->row();
$image =$this->upload->data();
//insert data from add_product input
$data = array(
'artist' => $this->input->post('artist'),
'title' => $this->input->post('title'),
'genre' => $this->input->post('genre'),
'q_ty' => $this->input->post('quantity'),
'price' => $this->input->post('price'),
'description' => $this->input->post('description'),
'image' =>$image['file_name'],
'status_id'=>(int)$status_id->id_status
);
return $data;
}
//add new product to product table
public function add_product()
{
$data=$this->product_item_array();
$this->db->insert('product', $data);
}
//get product item data in order to update
public function get_product($item_id) {
$this->db->select('product.id, product.artist, product.title, product.genre, product.description, product.price, product.q_ty, product.image, status.status');
$this->db->from('product');
$this->db->join('status', 'product.status_id = status.id_status');
$this->db->where('id', $item_id);
$query = $this->db->get();
if($query->num_rows()>0) {
return $query->row();
}
}
//update product in database
public function update_product($item_id) {
$data=$this->product_item_array();
$this->db->where('id', $item_id);
$this->db->update('product', $data);
}
public function delete_product($item_id) {
$this->db->delete('product', array('id' => $item_id));
}
}
<?php
class Auth_model extends CI_Model {
private $_data=array();
public function validate() {
$email =$this->input->post('email');
$password =md5($this->input->post('password'));
$this->db->select('*');
$this->db->from('users');
$this->db->where('email', $email);
$query = $this->db->get();
if($query->num_rows()==1) {
$row=$query->result();
if ($row[0]->is_active=='1') {
if ($row[0]->password == $password) {
unset($row['password']);
$this->_data = array(
'email' => $row[0]->email,
'name'=> $row[0]->name,
'surname'=> $row[0]->surname,
'country'=> $row[0]->name,
'street'=> $row[0]->name,
'is_active' =>$row[0]->is_active,
'role_id'=> $row[0]->role_id
);
return ERR_NONE;
}
return ERR_INVALID_PASSWORD;
}
return ERR_EMAIL_NOT_ACTIVE;
} else {
return ERR_INVALID_EMAIL;
}
}
public function get_data()
{
return $this->_data;
}
public function user_role() {
if($this->_data['role_id']=='1') {
return 1;
}
return 2;
}
public function updateEmail()
{
$new_email = $this->input->post('new_email');
$new_name = $this->input->post('new_name');
$new_surname = $this->input->post('new_surname');
$session_email = $this->session->userdata('email');
$user = $this->db->get_where('users', array('email' => $session_email));
if ($user) {
$this->db->query("UPDATE users set email='$new_email' where email='$session_email'");
$this->db->query("UPDATE users set name='$new_name' where email='$session_email'");
$this->db->query("UPDATE users set surname='$new_surname' where email='$session_email'");
$this->db->select('*');
$this->db->from('users');
$this->db->where('email', $new_email);
$query = $this->db->get();
if ($query->num_rows() == 1) {
$row = $query->result();
$this->_data = array(
'email' => $row[0]->email,
'password' =>md5($row[0]->password),
'name' => $row[0]->name,
'surname' => $row[0]->surname,
'country' => $row[0]->name,
'street' => $row[0]->name,
'is_active' => $row[0]->is_active,
'role_id' => $row[0]->role_id
);
}
}
}
public function updatePassword() {
$password = md5($this->input->post('update_password'));
$session_email = $this->session->userdata('email');
$user = $this->db->get_where('users', array('email' => $session_email));
if ($user) {
$this->db->query("UPDATE users set password='$password' where email='$session_email'");
$this->db->select('*');
$this->db->from('users');
$this->db->where('email', $session_email);
$query = $this->db->get();
if ($query->num_rows() == 1) {
$row = $query->result();
$this->_data = array(
'email' => $row[0]->email,
'password' =>md5($row[0]->password),
'name' => $row[0]->name,
'surname' => $row[0]->surname,
'country' => $row[0]->name,
'street' => $row[0]->name,
'is_active' => $row[0]->is_active,
'role_id' => $row[0]->role_id
);
}
}
}
}
<?php
class Cart_model extends CI_Model
{
public function get_prod_data ($prod_id) {
$this->db->select('id, artist, title, price, q_ty, image');
$this->db->from('product');
$this->db->where('id', $prod_id);
$query = $this->db->get();
return $query->row();
}
public function getAllFromCart() {
$this->db->select('prod_id, qty');
$this->db->from('prod_cart');
$query = $this->db->get();
return $query->result();
}
public function getAllFromUserCart($email) {
$this->db->select('prod_id, qty');
$this->db->from('user_cart');
$this->db->where('user_email', $email);
$query = $this->db->get();
return $query->result();
}
public function add_to_cart($prod_id) {
$this->db->select('*');
$this->db->from('prod_cart');
$this->db->where('prod_id', $prod_id);
$this->db->where('sess_id', session_id());
$query = $this->db->get();
$row=$query->result();
if($query->num_rows()>0) {
$session_id=session_id();
$qty= $row[0]->qty+1;
$this->db->query("UPDATE prod_cart set qty='$qty' where prod_id='$prod_id' and sess_id='$session_id'");
} else {
$data = array(
'prod_id' => $prod_id,
'sess_id'=>session_id(),
'qty'=>1
);
$this->db->insert('prod_cart', $data);
}
}
public function add_to_user_cart($email, $prod_id) {
$this->db->select('*');
$this->db->from('user_cart');
$this->db->where('prod_id', $prod_id);
$this->db->where('user_email', $email);
$query = $this->db->get();
$row=$query->result();
if($query->num_rows()>0) {
$qty= $row[0]->qty+1;
$this->db->query("UPDATE user_cart set qty='$qty' where prod_id='$prod_id'");
}
else {
$data = array(
'prod_id' => $prod_id,
'user_email'=>$email,
'qty'=>1
);
$this->db->insert('user_cart', $data);
}
}
public function remove_from_cart($prod_id) {
$this->db->select('*');
$this->db->from('prod_cart');
$this->db->where('prod_id', $prod_id);
$this->db->where('sess_id', session_id());
$query = $this->db->get();
$row=$query->result();
if($query->num_rows()>0) {
$session_id=session_id();
$this->db->delete('prod_cart', array('prod_id' => $prod_id, 'sess_id'=>$session_id));
}
}
public function remove_from_user_cart($email, $prod_id) {
$this->db->select('*');
$this->db->from('user_cart');
$this->db->where('prod_id', $prod_id);
$this->db->where('user_email', $email);
$query = $this->db->get();
$row=$query->result();
if($query->num_rows()>0) {
$this->db->delete('user_cart', array('prod_id' => $prod_id, 'user_email'=>$email));
}
}
public function minus_qty($prod_id, $qty) {
$this->db->select('*');
$this->db->from('prod_cart');
$this->db->where('prod_id', $prod_id);
$this->db->where('sess_id', session_id());
$query = $this->db->get();
$row=$query->result();
if($query->num_rows()>0) {
$session_id = session_id();
$this->db->query("UPDATE prod_cart set qty='$qty' where prod_id='$prod_id' and sess_id='$session_id'");
}
}
public function minus_qty_user_cart($email, $prod_id, $qty) {
$this->db->select('*');
$this->db->from('user_cart');
$this->db->where('prod_id', $prod_id);
$this->db->where('user_email', $email);
$query = $this->db->get();
$row=$query->result();
if($query->num_rows()>0) {
$this->db->query("UPDATE user_cart set qty='$qty' where prod_id='$prod_id' and user_email='$email'");
}
}
public function set_user_cart($email, $data) {
foreach ($data as $item) {
if($this->exists_in_user_cart($item->prod_id, $email)) {
$this->db->query("UPDATE user_cart set qty='$item->qty' where prod_id='$item->prod_id'");
} else {
$user_cart= array(
'user_email'=>$email,
'prod_id'=>$item->prod_id,
'qty'=>$item->qty
);
$this->db->insert('user_cart', $user_cart);
}
}
}
public function exists_in_user_cart($prod_id, $email) {
$this->db->select('*');
$this->db->from('user_cart');
$this->db->where('prod_id', $prod_id);
$this->db->where('user_email', $email);
$query = $this->db->get();
if($query->num_rows()>0) {
return true;
} else{
return false;
}
}
}
<?php
class Register_model extends CI_Model {
public function register_user () {
$data = array (
'email' => $this->input->post('email'),
'password' =>md5($this->input->post('password')),
'name' =>$this->input->post('name'),
'surname' =>$this->input->post('surname'),
'country' =>$this->input->post('country'),
'city' =>$this->input->post('city'),
'street' =>$this->input->post('street'),
'building' =>$this->input->post('building'),
'zip' =>$this->input->post('zip'),
'phone' =>$this->input->post('phone'),
'is_active' => 0,
'role_id'=>2
);
$this->db->insert('users', $data);
$token =base64_encode(random_bytes(32));
$user_token =array(
'email' => $this->input->post('email'),
'token'=>$token,
'date_created' =>time()
);
$this->db->insert('user_token', $user_token);
$this->sendEmail($token, 'verify');
}
public function sendEmail($token, $type) {
$config = array(
'protocol'=>'smtp',
'smtp_host'=>'ssl://smtp.googlemail.com',
'smtp_user'=>'tetiankayaremko@gmail.com',
'smtp_pass'=>'tetiana_yaremko1995',
'smtp_port'=> '465',
'mailtype'=> 'html',
'charset'=> 'iso-8859-1',
'newline' =>"\r\n",
'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->from('tetianayaremko@gmail.com', 'Web app');
$this->email->to($this->input->post('email'));
if($type == 'verify') {
$this->email->subject('Account verification');
$this->email->message('Click here to verify account: <a href="' .
base_url() . 'index.php/auth/verify?email=' . $this->input->post('email') .
'&token=' . urlencode($token) . '">Activate</a>');
}
elseif ($type == 'forgot') {
$this->email->subject('Reset password');
$this->email->message('Click here to reset your password: <a href="' .
base_url() . 'index.php/auth/resetpassword?email=' . $this->input->post('email') .
'&token=' . urlencode($token) . '">Reset</a>');
}
//$this->email->send();
if($this->email->send()) {
return true;
}else {
echo $this->email->print_debugger();
die;
}
}
}
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<title>Registration Page</title>
</head>
<style>
.table{
width: 50%;
}
textarea, input, select{
width: 100%;
}
.add-product-table tr, td {
padding: 0;
margin: 0;
}
.add-product-table input, select, textarea {
margin-bottom: 10px ;
margin-top: -10px;
}
.add-product-table select {
height: 30px;
}
</style>
<body>
<div class="container">
<div class="back-to-shop">
<a href="<?php echo base_url(); ?>index.php/home/products"><< Back to shop</a>
<a href="<?php echo base_url(); ?>index.php/auth/logout">Log out</a>
</div>
<div class="add-product-section">
<h2>Add new item</h2>
<?php $message = $this->session->flashdata("file_error")?>
<?php echo $message; ?>
<div class="form-section">
<?php echo form_open_multipart(); ?>
<table class="table table-striped table-hover "">
<tbody>
<tr>
<?php $error =form_error("artist", "<small class='text-danger'>", '</small>');?>
<td> <label> Artist<em>*</em></label> </td>
<td>
<input name="artist" id="artist" type="text" value="<?php echo set_value('artist') ?>">
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("title", "<small class='text-danger'>", '</small>');?>
<label>Title<em>*</em></label></label>
</td>
<td>
<input name="title" id="title" type="text" value="<?php echo set_value('title') ?>" >
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("genre", "<small class='text-danger'>", '</small>');?>
<label>Genre<em>*</em></label></label>
</td>
<td>
<input name="genre" id="genre" type="text" value="<?php echo set_value('genre') ?>">
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("quantity", "<small class='text-danger'>", '</small>');?>
<label>Quantity<em>*</em></label></label>
</td>
<td>
<input name="quantity" id="quantity" type="text" value="<?php echo set_value('quantity') ?>" >
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("price", "<small class='text-danger'>", '</small>');?>
<label>Price<em>*</em></label></label>
</td>
<td>
<input name="price" id="price" type="text" value="<?php echo set_value('price') ?>" >
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("description", "<small class='text-danger'>", '</small>');?>
<label>Product description<em>*</em></label></label>
<div> <?php echo $error; ?></div>
</td>
<td>
<textarea class="product-description" id="description" name="description" ></textarea>
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("image", "<small class='text-danger'>", '</small>');?>
<label for="image">Image</label>
</td>
<td>
<input name="image" type="file" class="form-control-file" id="image" aria-describedby="fileHelp">
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("status", "<small class='text-danger'>", '</small>');?>
<label for="status">Status</label>
</td>
<td>
<select name="status" id="status">
<option>in stock</option>
<option>sold</option>
<option>on hold</option>
</select>
<small> <?php echo $error; ?></small>
</td>
</tr>
</tbody>
</table>
<div ></div>
<div class="register-button">
<button class="btn btn-success " name="add-product">Add Product</button>
</div>
</form>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<title>Registration Page</title>
</head>
<style>
.table{
width: 50%;
}
textarea, input, select{
width: 100%;
}
.add-product-table tr, td {
padding: 0;
margin: 0;
}
.add-product-table input, select, textarea {
margin-bottom: 10px ;
margin-top: -10px;
}
.add-product-table select {
height: 30px;
}
</style>
<body>
<div class="container">
<div class="back-to-shop">
<a href="<?php echo base_url(); ?>index.php/home/products"><< Back to shop</a>
<a href="<?php echo base_url(); ?>index.php/auth/logout">Log out</a>
</div>
</div>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/admin_style.css" type="text/css">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<title>Registration Page</title>
</head>
<style>
.main-sidebar {
background-color: #17241d;
}
p{
color: #CCCCCC;
}
</style>
<body>
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<div class="brand-link">
<img src="<?php echo base_url(); ?>asset/img/AdminLTELogo.png" alt="AdminLTE Logo" class="admin-image" style="opacity: .8">
<span class="brand-text">Admin Retro Record</span>
</div>
<!-- Sidebar -->
<div class="sidebar">
<!-- Sidebar user (optional) -->
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
<div class="info">
<h4 class="d-block"><?php echo $this->session->userdata('name'); echo ' '; echo $this->session->userdata('surname'); ?></h4>
<p><?php echo $this->session->userdata('email') ?></p>
</div>
</div>
<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
<!-- Add icons to the links using the .nav-icon class
with font-awesome or any other icon font library -->
<li class="nav-item has-treeview">
<a href="#" class="nav-link">
<p>
Users
<i class=" fa fa-angle-left" style="font-size:24px"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="../layout/top-nav.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>User details</p>
</a>
</li>
<li class="nav-item">
<a href="../layout/top-nav-sidebar.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Update database</p>
</a>
</li>
<li class="nav-item">
<a href="../layout/boxed.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Add/Delete users</p>
</a>
</li>
</ul>
</li>
<li class="nav-item has-treeview">
<a href="<?php echo base_url(); ?>index.php/admin/product_inventory" class="nav-link">
<p>
Products
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="<?php echo base_url(); ?>index.php/admin/add_product" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Add product</p>
</a>
</li>
<li class="nav-item">
<a href="../charts/flot.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>Update describtion</p>
</a>
</li>
<li class="nav-item">
<a href="../charts/inline.html" class="nav-link">
<i class="far fa-circle nav-icon"></i>
<p>update price</p>
</a>
</li>
</ul>
</li>
</ul>
</nav>
<!-- /.sidebar-menu -->
</div>
<!-- /.sidebar -->
</aside>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>asset/css/bootstrap.min.css" rel="stylesheet">
<title>Registration Page</title>
</head>
<style>
.container {
margin-top: 50px;
}
.col-lg-12 {
padding: 0 10px;
padding-bottom: 10px;
}
th, td{
font-size: 0.8rem;
text-align: center;
}
.btn-danger{
background-color: #610000;
}
.btn-primary{
background-color: #5d606c;
}
.btn-success{
background-color: #41544a;
}
.btn{
border-width: 0;
}
img{
height: 50px;
}
</style>
<body>
<div class="container">
<div class="back-to-shop">
<a href="<?php echo base_url(); ?>index.php/home/products"><< Back to shop</a>
<a href="<?php echo base_url(); ?>index.php/auth/logout">Log out</a>
</div>
<div class="row">
<div class="col-lg-12">
<td><?php echo anchor('admin/add_product', 'Add new product', array('class'=>'btn btn-primary')); ?></td>
</div>
</div>
<table class="table table-striped table-hover ">
<thead>
<tr>
<th>ID</th>
<th>Artist</th>
<th>Title</th>
<th>Genre</th>
<th>Description</th>
<th>Price</th>
<th>Quantity</th>
<th>Image</th>
<th>Status</th>
<th>Update</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
<tr>
<?php if(count($data)): ?>
<?php foreach ($data as $item) { ?>
<td><?php echo $item->id; ?></td>
<td><?php echo $item->artist; ?></td>
<td><?php echo $item->title; ?></td>
<td><?php echo $item->genre; ?></td>
<td><?php echo $item->description; ?></td>
<td><?php echo $item->price; ?></td>
<td><?php echo $item->q_ty; ?></td>
<td><img src="<?php echo base_url("uploads/".$item->image) ?>"></td>
<td><?php echo $item->status; ?></td>
<td><?php echo anchor('admin/update_item/'.$item->id, 'Update', array('class'=>'btn btn-success')); ?></td>
<td><?php echo anchor('admin/delete_item/'.$item->id, 'Delete', array('class'=>'btn btn-danger')); ?></td>
</tr>
<?php } ?>
<?php else: ?>
<tr>No records found</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<script src="<?php echo base_url();?>asset/js/bootstrap.min.js"></script>
<script src="<?php echo base_url();?>asset/js/jquery-3.3.1.min.js"></script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<title>Registration Page</title>
</head>
<style>
.table{
width: 50%;
}
textarea, input, select{
width: 100%;
}
.add-product-table tr, td {
padding: 0;
margin: 0;
}
.add-product-table input, select, textarea {
margin-bottom: 10px ;
margin-top: -10px;
}
.add-product-table select {
height: 30px;
}
</style>
<body>
<div class="container">
<div class="back-to-shop">
<a href="<?php echo base_url(); ?>index.php/home/products"><< Back to shop</a>
<a href="<?php echo base_url(); ?>index.php/auth/logout">Log out</a>
</div>
<div class="add-product-section">
<h2>Update product</h2>
<?php $message = $this->session->flashdata("file_error")?>
<?php echo $message; ?>
<div class="form-section">
<?php echo form_open_multipart(); ?>
<table class="table table-striped table-hover "">
<tbody>
<tr>
<?php $error =form_error("artist", "<small class='text-danger'>", '</small>');?>
<td> <label> Artist<em>*</em></label> </td>
<td>
<input name="artist" id="artist" type="text" value="<?php echo set_value('artist', $data->artist) ?>">
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("title", "<small class='text-danger'>", '</small>');?>
<label>Title<em>*</em></label></label>
</td>
<td>
<input name="title" id="title" type="text" value="<?php echo set_value('title', $data->title) ?>" >
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("genre", "<small class='text-danger'>", '</small>');?>
<label>Genre<em>*</em></label></label>
</td>
<td>
<input name="genre" id="genre" type="text" value="<?php echo set_value('genre', $data->genre) ?>">
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("quantity", "<small class='text-danger'>", '</small>');?>
<label>Quantity<em>*</em></label></label>
</td>
<td>
<input name="quantity" id="quantity" type="text" value="<?php echo set_value('quantity', $data->q_ty) ?>" >
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("price", "<small class='text-danger'>", '</small>');?>
<label>Price<em>*</em></label></label>
</td>
<td>
<input name="price" id="price" type="text" value="<?php echo set_value('price', $data->price) ?>" >
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("description", "<small class='text-danger'>", '</small>');?>
<label>Product description<em>*</em></label></label>
</td>
<td>
<textarea class="product-description" id="description" name="description" ><?php echo htmlspecialchars($data->description); ?></textarea>
<div> <?php echo $error; ?></div>
</td>
</tr>
<tr>
<td>
<label for="image">Image</label>
</td>
<td>
<input name="image" type="file" class="form-control-file" id="image" aria-describedby="fileHelp" value="<?php set_value(base_url("uploads/".$data->image) )?>">
</td>
</tr>
<tr>
<td>
<?php $error =form_error("status", "<small class='text-danger'>", '</small>');?>
<label for="status">Status</label>
</td>
<td>
<select name="status" id="status" value="<?php echo set_value('price', $data->status) ?>">
<option value="in stock" <?php if ($data->status == 'in stock') echo 'selected="selected"'; ?>>in stock</option>
<option value="sold" <?php if ($data->status == 'sold') echo ' selected="selected"'; ?>>sold</option>
<option value="on hold" <?php if ($data->status == 'on hold') echo ' selected="selected"'; ?>>on hold</option>
</select>
<small> <?php echo $error; ?></small>
</td>
</tr>
</tbody>
</table>
<div ></div>
<div class="register-button">
<button class="btn btn-success " name="add-product">Update</button>
</div>
</form>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
</body>
</html>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
echo "\nERROR: ",
$heading,
"\n\n",
$message,
"\n\n";
\ No newline at end of file
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
echo "\nDatabase error: ",
$heading,
"\n\n",
$message,
"\n\n";
\ No newline at end of file
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
An uncaught Exception was encountered
Type: <?php echo get_class($exception), "\n"; ?>
Message: <?php echo $message, "\n"; ?>
Filename: <?php echo $exception->getFile(), "\n"; ?>
Line Number: <?php echo $exception->getLine(); ?>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
Backtrace:
<?php foreach ($exception->getTrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
File: <?php echo $error['file'], "\n"; ?>
Line: <?php echo $error['line'], "\n"; ?>
Function: <?php echo $error['function'], "\n\n"; ?>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
echo "\nERROR: ",
$heading,
"\n\n",
$message,
"\n\n";
\ No newline at end of file
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
A PHP Error was encountered
Severity: <?php echo $severity, "\n"; ?>
Message: <?php echo $message, "\n"; ?>
Filename: <?php echo $filepath, "\n"; ?>
Line Number: <?php echo $line; ?>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
Backtrace:
<?php foreach (debug_backtrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
File: <?php echo $error['file'], "\n"; ?>
Line: <?php echo $error['line'], "\n"; ?>
Function: <?php echo $error['function'], "\n\n"; ?>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>404 Page Not Found</title>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html>
\ No newline at end of file
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Database Error</title>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html>
\ No newline at end of file
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>An uncaught Exception was encountered</h4>
<p>Type: <?php echo get_class($exception); ?></p>
<p>Message: <?php echo $message; ?></p>
<p>Filename: <?php echo $exception->getFile(); ?></p>
<p>Line Number: <?php echo $exception->getLine(); ?></p>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
<p>Backtrace:</p>
<?php foreach ($exception->getTrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
<p style="margin-left:10px">
File: <?php echo $error['file']; ?><br />
Line: <?php echo $error['line']; ?><br />
Function: <?php echo $error['function']; ?>
</p>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
</div>
\ No newline at end of file
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html>
\ No newline at end of file
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: <?php echo $severity; ?></p>
<p>Message: <?php echo $message; ?></p>
<p>Filename: <?php echo $filepath; ?></p>
<p>Line Number: <?php echo $line; ?></p>
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
<p>Backtrace:</p>
<?php foreach (debug_backtrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
<p style="margin-left:10px">
File: <?php echo $error['file'] ?><br />
Line: <?php echo $error['line'] ?><br />
Function: <?php echo $error['function'] ?>
</p>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
</div>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/user_style.css" type="text/css">
<title>Login Page</title>
</head>
<style>
.email-section {
width: 40%;
}
</style>
<body>
<div class="container">
<header>
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
</header>
<nav class="nav-bar">
<ul class="header-nav">
<li class=""><a href="<?php echo base_url(); ?>index.php/auth/login">Login</a> <a href="#">/Register</a></li>
<li><a href="#">Delivery address</a></li>
<li><a href="#">Order history</a></li>
</ul>
</nav>
<div class="email-section">
<h3>Forgot your password?</h3>
<?php $message = $this->session->flashdata("message")?>
<div class="alert alert-<?php echo $message ? 'warning' : 'info' ?> alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<?php echo $message ? $message : 'Enter your email' ?>
</div>
<?php echo form_open(); ?>
<?php $error =form_error("email", "<p class='text-danger'>", '</p>');?>
<div class="form-group <?php echo $error ? 'has-error' : '' ?>">
<label for="email">Please, enter your email </label>
<input class="email-control" type="email" value="<?php echo set_value("email") ?>" name="email"/>
<?php echo $error?>
</div>
<input class="btn" type="submit" value="Send" name="submit"/>
<?php form_close()?>
</div>
</div>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
</body>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<title>Login Page</title>
</head>
<body>
<div class="row justify-content-center">
<div class ="col-lg-4 col-lg-offset-8">
<h1>Login Page</h1>
<p>Fill in the details:</p>
<?php if(isset($_SESSION['success'])) {?>
<div class="alert alert-success"> <?php echo $_SESSION['success'];?></div>
<?php
} ?>
<?php echo validation_errors('<div class="alert alert-danger">','</div>'); ?>
<form action="" method="post">
<div class="form-group">
<label> Email:</label>
<input class="form-control" name="email" id="email" type="text" >
</div>
<div class="form-group">
<label> Password:</label>
<input class="form-control" name="password" id="password" type="password">
</div>
<div class="text-center">
<button class="btn btn-primary" name="login">Login</button>
</div>
</form>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/user_style.css" type="text/css">
<title>Login Page</title>
</head>
<body>
<div class="container">
<header>
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
</header>
<nav class="nav-bar">
<ul class="header-nav">
<li class="active"><a href="#">Login/Register</a></li>
<li><a href="#">Delivery address</a></li>
<li><a href="#">Order history</a></li>
</ul>
</nav>
<div class="auth-section">
<div class="signup">
<h3>Existing customer</h3>
<?php $error = $this->session->flashdata("error")?>
<div class="alert alert-<?php echo $error ? 'warning' : 'info' ?> alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<?php echo $error ? $error : 'Enter your username and password' ?>
</div>
<?php echo form_open(); ?>
<?php $error =form_error("email", "<p class='text-danger'>", '</p>');?>
<div class="form-group <?php echo $error ? 'has-error' : '' ?>">
<label for="email">Email</label>
<input type="email" value="<?php echo set_value("email") ?>" name="email"/>
<div class="input-error"> <?php echo $error; ?> </div>
</div>
<?php $error =form_error("password", "<p class='text-danger'>", '</p>');?>
<div class="form-group">
<label for="password">Password</label>
<input type="password" name="password"/>
<div class="input-error"> <?php echo $error; ?> </div>
</div>
<input class="btn" type="submit" value="Login" name="submit"/>
<a href="<?php echo base_url(); ?>index.php/auth/forgotPassword" class="forgot">Forgot your password?</a>
</form>
</div>
<div class="reg">
<h3>New Customer</h3>
<p>Click Next to provide us with your details</p>
<a href="<?php echo base_url(); ?>index.php/auth/register"><button class="btn">Next</button></a>
</div>
</div>
</body>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
</body>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/user_style.css" type="text/css">
<title>Login Page</title>
</head>
<body>
<div class="container">
<header>
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
</header>
<nav class="nav-bar">
<ul class="header-nav">
<li class=""><a href="<?php echo base_url(); ?>index.php/auth/login">Login</a> <a href="#">/Register</a></li>
<li><a href="#">Delivery address</a></li>
<li><a href="#">Order history</a></li>
</ul>
</nav>
<div class="password-section">
<h3>Change your password?</h3>
<h5><?php echo $this->session->userdata('reset_email') ?></h5>
<?php $message = $this->session->flashdata("reset_message")?>
<div class="alert alert-<?php echo $message ? 'warning' : 'info' ?> alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<?php echo $message ? $message : 'Please, enter and confirm new password' ?>
</div>
<form method="post" action="<?php base_url('index.php/auth/changePassword'); ?>">
<?php $error =form_error("new_password", "<p class='text-danger'>", '</p>');?>
<div class="form-group <?php echo $error ? 'has-error' : '' ?>">
<label for="new_password">New password</label>
<input class="password-control" type="password" name="new_password"/>
<?php echo $error?>
</div>
<?php $error =form_error("new_password2", "<p class='text-danger'>", '</p>');?>
<div class="form-group <?php echo $error ? 'has-error' : '' ?>">
<label for="new_password2">Confirm password</label>
<input class="password-control" type="password" name="new_password2"/>
<?php echo $error?>
</div>
<input class="btn" type="submit" value="Reset" name="submit"/>
</form>
</div>
</div>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
</body>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<title>Ptoduct Page</title>
</head>
<body>
<div class="row justify-content-center">
<div class ="col-lg-4 col-lg-offset-8">
<?php if(isset($_SESSION['success'])) {?>
<div class="alert alert-success"> <?php echo $_SESSION['success'];?></div>
<?php
} ?>
Products list page
<br><br>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<link href=" <?php echo base_url();?>asset/css/register_style.css" rel="stylesheet">
<title>Registration Page</title>
</head>
<body>
<div class="container">
<header>
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
</header>
<nav class="nav-bar">
<ul class="header-nav">
<li class="active"><a href="<?php echo base_url(); ?>index.php/auth/login">Login</a> <a href="#">/Register</a></li>
<li><a href="#">Delivery address</a></li>
<li><a href="#">Order history</a></li>
</ul>
</nav>
<div class="back-to-shop">
<a href="<?php echo base_url(); ?>index.php/home/products"><< Back to shop</a>
<a href="<?php echo base_url(); ?>index.php/auth/login">Log in</a>
</div>
<div class="register-section">
<h2>New Customer</h2>
<div class="form-section">
<?php echo form_open(); ?>
<table class="register-table">
<tbody>
<tr>
<?php $error =form_error("email", "<small class='text-danger'>", '</small>');?>
<td> <label> Email<em>*</em></label> </td>
<td>
<input name="email" id="email" type="text" value="<?php echo set_value("email") ?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("password", "<small class='text-danger'>", '</small>');?>
<label> Password<em>*</em></label></label>
</td>
<td>
<input name="password" id="password" type="password">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("password2", "<small class='text-danger'>", '</small>');?>
<label> Confirm password<em>*</em></label></label>
</td>
<td>
<input name="password2" id="password" type="password" >
<?php echo $error; ?>
</td>
</tr>
</tbody>
</table>
<div class="message-box">
<h4>Why are your details necessary?</h4>
<p>We need your email address to send confirmation of orders placed, orders shipped and updates on the status of orders.</p>
<p>We respect yout privacy</p>
</div>
<table class="delivery-details" >
<tbody>
<tr>
<td>
<label>Title</label>
</td>
<td>
<select>
<option>Mr</option>
<option>Mrs</option>
<option>Mr</option>
<option>Ms</option>
<option>Dr</option>
</select>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("name", "<small class='text-danger'>", '</small>');?>
<label> Name<em>*</em></label></label>
</td>
<td>
<input name="name" id="name" type="text" value="<?php echo set_value('name')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("surname", "<small class='text-danger'>", '</small>');?>
<label> Surname<em>*</em></label></label>
</td>
<td>
<input name="surname" id="surname" type="text" value="<?php echo set_value('surname')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("street", "<small class='text-danger'>", '</small>');?>
<label> Street<em>*</em></label></label>
</td>
<td>
<input name="street" id="street" type="text" value="<?php echo set_value('street')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("building", "<small class='text-danger'>", '</small>');?>
<label> Building<em>*</em></label></label>
</td>
<td>
<input name="building" id="building" type="text" value="<?php echo set_value('building')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("city", "<small class='text-danger'>", '</small>');?>
<label> City<em>*</em></label></label>
</td>
<td>
<input name="city" id="city" type="text" value="<?php echo set_value('city')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("country", "<small class='text-danger'>", '</small>');?>
<label> Country<em>*</em></label></label>
</td>
<td>
<input name="country" id="country" type="text" value="<?php echo set_value('surname')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("zip", "<small class='text-danger'>", '</small>');?>
<label> ZIP<em>*</em></label></label>
</td>
<td>
<input name="zip" id="zip" type="text" value="<?php echo set_value('zip')?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<?php $error =form_error("phone", "<small class='text-danger'>", '</small>');?>
<label> Phone<em>*</em></label></label>
</td>
<td>
<input name="phone" id="phone" type="text" value="<?php echo set_value('phone')?>">
<?php echo $error; ?>
</td>
</tr>
</tbody>
</table>
<div class="emaile-pref">
<h2>Email Preferences</h2>
<div class="rb-table">
<table>
<tbody>
<tr>
<td>
<label>
<input type="radio" checked="checked">Email you about the latest news
</label>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" >Email you about discounts and promotions
</label>
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" >Only Email you regarding your orders
</label>
</td>
</tr>
<tr>
<td>
By clicking I agree to the following
<a href="#">Privacy policy</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="register-button">
<button class="button " name="register">Register</button>
</div>
</form>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<title></title>
</head>
<style>
h2 {
margin-top: 200px;
}
</style>
<body>
<div class="row justify-content-center">
<div class ="col-lg-4 col-lg-offset-8">
<h2> Your registration is successful. Please, <a href="<?php echo base_url(); ?>index.php/auth/login"> log in.</a></h2>
<br><br>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
</body>
</html>
<html>
<head>
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/stylee.css" type="text/css">
</head>
<body>
<div class="footer-section">
<div class="container">
<div class="newslatter-form">
<div class="row">
<div class="col-lg-12">
<form action="#">
<input type="text" placeholder="Your email address">
<button type="submit">Subscribe to our newsletter</button>
</form>
</div>
</div>
</div>
<div class="footer-widget">
<div class="row">
<div class="col-lg-3 col-sm-6">
<div class="single-footer-widget">
<h4>About us</h4>
<ul>
<li>About Us</li>
<li>Community</li>
<li>Jobs</li>
<li>Shipping</li>
<li>Contact Us</li>
</ul>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="single-footer-widget">
<h4>Customer Care</h4>
<ul>
<li>Search</li>
<li>Privacy Policy</li>
<li>2019 Lookbook</li>
<li>Shipping & Delivery</li>
<li>Gallery</li>
</ul>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="single-footer-widget">
<h4>Our Services</h4>
<ul>
<li>Free Shipping</li>
<li>Free Returnes</li>
<li>Our Franchising</li>
<li>Terms and conditions</li>
<li>Privacy Policy</li>
</ul>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="single-footer-widget">
<h4>Information</h4>
<ul>
<li>Payment methods</li>
<li>Times and shipping costs</li>
<li>Product Returns</li>
<li>Shipping methods</li>
<li>Conformity of the products</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="social-links-warp">
<div class="container">
<div class="social-links">
<a href="" class="instagram"><i class="fa fa-instagram"></i><span>instagram</span></a>
<a href="" class="pinterest"><i class="fa fa-pinterest"></i><span>pinterest</span></a>
<a href="" class="facebook"><i class="fa fa-facebook"></i><span>facebook</span></a>
<a href="" class="twitter"><i class="fa fa-twitter"></i><span>twitter</span></a>
<a href="" class="youtube"><i class="fa fa-youtube"></i><span>youtube</span></a>
<a href="" class="tumblr"><i class="fa fa-tumblr-square"></i><span>tumblr</span></a>
</div>
</div>
<div class="container text-center pt-5">
<p><!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
Copyright &copy;<script>document.write(new Date().getFullYear());</script> All rights reserved | This template is made with <i class="icon-heart color-danger" aria-hidden="true"></i> by <a href="https://colorlib.com" target="_blank">Colorlib</a>
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. --></p>
</div>
</div>
</div>
<!-- Footer Section End -->
<!-- Js Plugins -->
<script src="<?php echo base_url(); ?>asset/js/jquery-3.3.1.min.js"></script>
<script src="<?php echo base_url(); ?>asset/js/bootstrap.min.js"></script>
<script src="<?php echo base_url(); ?>asset/js/hceader-top.js"></script>
</body>
</html>
<html>
<head>
<title>retro record</title>
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/home.css" type="text/css">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="container">
<div class="header-wrapper">
<header class="header-section" >
<div class="header-top">
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
<div class="menu-right">
<div class="cart-profile">
<div class="toggle-account active-btn">
<a href="<?php echo base_url(); ?>index.php/user/user_profile" >
<i class="fa fa-user-circle-o"></i>
</a>
<!--
<ul class="active-nav" style="display: block;">
<li class="profile">
<a href="/profile.html" title="Profile">
Profile
</a>
</li>
<li class="orders">
<a href="/orders.html" title="Order History">
Order History
</a>
</li>
<li class="logout">
<form method="post" action="/">
<button type="submit" title="Log Out" name="logout">
Log Out
</button>
</form>
</li>
</ul> -->
</div>
<div class="cart-box" style="margin-left: 10px;">
<a class="cart-link" href="#" >
<i class="fa fa-shopping-cart" ></i>
<span class="badge"></span>
</a>
</div>
<div id="mini-cart" class="cart-overlay" >
<div id="cart" class="cart">
<button type="button" class="close position-absolute top-0 right-0" aria-label="Close" style="float: left;">
<span aria-hidden="true">&times;</span>
</button>
<div style="display: flex; justify-content: space-between"> <span></span><a href="<?php echo base_url(); ?>index.php/cart/user_cart">View Basket &raquo;</a></div>
<div class="products-center" style="width: 100%">
<div id="detail-cart" class="mini-cart-item">
</div>
</div>
</div>
</div>
</div>
<div class="user-access">
<a href="<?php echo base_url(); ?>index.php/auth/register">Register</a>
<a href="<?php echo base_url(); ?>index.php/auth/login" class="in">Log in</a>
<a href="<?php echo base_url(); ?>index.php/auth/logout" class="out">Log Out</a>
</div>
<div class="about-menu">
<a href="">About</a>
</div>
<div class="contact-menu">
<a href="">Contact</a>
</div>
</div>
</div>
<nav>
<ul id="navigation" class="navigation">
<li >
<a href="">Metal</a>
</li>
<li >
<a href="">Pop</a>
</li>
<li>
<a href="">Soundtracks</a>
</li>
<li>
<a href="/">Jazz & Classical</a>
</li>
<li>
<a href="/">Soul & RNB</a>
</li>
<li>
<a href="">Hip Hop & Rap</a>
</li>
<li >
<a href="">Compilations</a>
</li>
<li id="cat_genres" class="cat_level_0">
<a class="parent-cat parent-cat-0" href="/">Dance & Electronica</a>
</li>
<li id="cat_sale" class="cat_level_0">
<a class="parent-cat parent-cat-0" href="">Ska + Reggae</a>
</ul>
</nav>
</header>
</div>
</div>
<script type="text/javascript">
baseUrl = '<?php echo base_url(); ?>';
</script>
<!-- <script src="--><?php //echo base_url(); ?><!--asset/js/scrypt.js"></script>-->
<!-- Header Info Begin -->
<script src="<?php echo base_url(); ?>asset/js/jquery-3.3.1.min.js"></script>
<script src="<?php echo base_url(); ?>asset/js/bootstrap.min.js"></script>
<script src="<?php echo base_url(); ?>asset/js/jquery.js"></script>
<script src="<?php echo base_url(); ?>asset/js/jquery-ui.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="zxx">
<head>
<meta charset="UTF-8">
<title>Retro Record Home</title>
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/home.css" type="text/css">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="head-offer">
<div class="offer-list">
<ul class="navigation offer">
<li id="offer"><a href="" class="">
<h4>Enjoy 10% off first order</h4>
<p>Join our Mailing List</p>
</a>
</li>
<li id="offer">
<a href="" class="">
<h4>We offer FREE UK RETURNS</h4>
<p>Click here for more info</p>
</a>
</li>
<li>
<a href="" class="">
<h4>EXCLUSIVES</h4>
<p>SHOP NOW</p>
</a>
</li>
</ul>
</div>
</div>
<!-- Header Info End -->
<!-- Header End -->
<div class="new-function">
</div>
<div class="carousel-section">
<div id="carousel" class="carousel slide" data-ride="carousel" data-interval="2000">
<ol class="carousel-indicators">
<li data-target="#carousel" data-slide-to="0" class="active"></li>
<li data-target="#carousel" data-slide-to="1"></li>
<li data-target="#carousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class=" item carousel-item active">
<a href="<?php echo base_url(); ?>index.php/items/item1" >
<img class="d-block w-100" src="<?= asset_url('img/sl-1.jpg')?>" alt="First slide">
</a>
</div>
<div class="item carousel-item">
<img class="d-block w-100" src="<?= asset_url('img/sl-2.jpg')?>" alt="Second slide">
</div>
<div class="item carousel-item">
<img class="d-block w-100" src="<?= asset_url('img/sl-3.jpg')?>" alt="Third slide">
</div>
</div>
<a class="carousel-control-prev" href="#carousel" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carousel" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="h_sec">
<h3 class="section-header"><span> RECOMMENDED PRE-ORDERS</span></h3>
</div>
<div class="shop-items">
<?php if(count($data)): ?>
<?php foreach ($data as $item) { ?>
<div class="shop-item">
<div class="image">
<a href="<?php echo base_url(); ?>index.php/items/item1">
<img class="shop-item-image" src="<?php echo base_url("uploads/".$item->image) ?>" alt="Ariana Grande: thank u, next exclusive clear/pink lp"/>
</a>
<?php if($item->status=='sold'): ?>
<p class="sold-btn">Sold out</p>
<?php else: ?>
<button class="cart-btn" id="<?php echo $item->id;?>" data-butnid="<?php echo $item->id;?>" data-productid="<?php echo $item->id;?>" data-productartist="<?php echo $item->artist;?>"
data-producttitle="<?php echo $item->title;?>" data-productprice="<?php echo $item->price;?>" data-productimage="<?php echo $item->image;?>">
<i class="fa fa-shopping-cart"></i>
Add to cart
</button>
<?php endif; ?>
</div>
<a class="artist" href="#">
<div class="shop-item-details">
<span class="brand"><?php echo $item->artist; ?></span>
</div>
</a>
<div class="title">
<span class="format double-vinyl-lp"><?php echo $item->title; ?></span>
</div>
<div>
<span class="price"><?php echo $item->price; ?></span>
</div>
</div>
<?php } ?>
<?php endif; ?>
</div>
<div id="detail-cart" class="mini-cart-item">
</div>
<div class="h_sec">
<h3 class="section-header"><span>RECOMMENDED PRE-ORDERS</span></h3>
</div>
</div>
<script type="text/javascript">
baseUrl = '<?php echo base_url(); ?>';
</script>
<script src="<?php echo base_url(); ?>asset/js/scrypt.js"></script>
<script src="<?php echo base_url(); ?>asset/js/jquery-3.3.1.min.js"></script>
<script src="<?php echo base_url(); ?>asset/js/bootstrap.min.js"></script>
<script src="<?php echo base_url(); ?>asset/js/hceader-top.js"></script>
</body>
</html>
<html>
<head>
</head>
<body>
<h1>this is product page</h1>
</body>
</html>
<
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link href=" <?php echo base_url();?>assets/css/bootstrap.min.css" rel="stylesheet">
<link href=" <?php echo base_url();?>asset/css/register_style.css" rel="stylesheet">
<title>Registration Page</title>
</head>
<style>
.update-form {
width: 43%;
}
.alert-m {
width: 43%;
}
.update-form h3 {
font-weight: bold;
}
.password-update h3 {
font-weight: bold;
}
.password-update {
border-top: 1px solid #ccc;
}
.password-update h3 {
padding-top: 30px;
}
.password-update .button{
float: right;
}
.update-form .form-group input {
width: 70%;
font-size: 1.1em;
line-height: 1.6;
padding: .1em .2em;
border: 1px solid #ccc;
background: #fdfcfc;
}
</style>
<body>
<div class="container">
<header>
<div class="logo">
<a href="<?php echo base_url(); ?>index.php/home/products"><img src="<?= asset_url('img/logo.png')?>" alt=""></a>
</div>
</header>
<nav class="nav-bar">
<ul class="header-nav">
<li class="active"><a href="<?php echo base_url(); ?>index.php/user/user_profile">Your details</a></li>
<li><a href="#">Delivery address</a></li>
<li><a href="#">Order history</a></li>
</ul>
</nav>
<div class="back-to-shop">
<a href="<?php echo base_url(); ?>index.php/home/products"><< Back to shop</a>
<a href="<?php echo base_url(); ?>index.php/auth/logout">Log out</a>
</div>
<div class="update-form">
<h3>Personal details</h3>
<?php $message = $this->session->flashdata("message")?>
<?php echo $message; ?>
<?php echo form_open(); ?>
<?php $error =form_error("new_email", "<small class='text-danger'>", '</small>');?>
<table>
<tbody>
<tr>
<td>
<label for="email">Email address</label>
</td>
<?php $error =form_error("new_mail", "<small class='text-danger'>", '</small>');?>
<td> <input name="new_email" id="email" type="text" value="<?php echo $this->session->userdata('email'); ?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<label for="name">Name</label>
</td>
<?php $error =form_error("new_name", "<small class='text-danger'>", '</small>');?>
<td> <input name="new_name" id="surname" type="text" value="<?php echo $this->session->userdata('name'); ?>">
<?php echo $error; ?>
</td>
</tr>
<tr>
<td>
<label for="name">Surname</label>
</td>
<?php $error =form_error("new_surname", "<small class='text-danger'>", '</small>');?>
<td> <input name="new_surname" id="name" type="text" value="<?php echo $this->session->userdata('surname'); ?>">
<?php echo $error; ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="update-button">
<button class="button " type="submit" name="update">Update</button>
</div>
</form>
<div class="password-update">
<h3>Update password</h3>
<?php $pass_message = $this->session->flashdata("pass_message")?>
<div class="alert-m"> <?php echo $pass_message; ?> </div>
<?php echo form_open(); ?>
<?php $error =form_error("update_password", "<p class='text-danger'>", '</p>');?>
<table>
<tbody>
<tr>
<td>
<label for="update_password">New Password</label>
</td>
<td><input class="password-control" type="password" name="update_password"/>
<?php echo $error?>
</td>
</tr>
<?php $error =form_error("update_password2", "<p class='text-danger'>", '</p>');?>
<tr>
<td><label for="new_password2">Confirm password</label> </td>
<td> <input class="password-control" type="password" name="update_password2"/>
<?php echo $error?>
</td>
</tr>
</tbody>
</table>
<input class="button" type="submit" value="update" name="update-password"/>
</form>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="<?php echo base_url();?>assets/js/bootstrap.min.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="zxx">
<head>
<meta charset="UTF-8">
<title>Retro Record Home</title>
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/home.css" type="text/css">
<link rel="stylesheet" href="<?php echo base_url(); ?>asset/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="head-offer">
<div class="offer-list">
<ul class="navigation offer">
<li id="offer"><a href="" class="">
<h4>Enjoy 10% off first order</h4>
<p>Join our Mailing List</p>
</a>
</li>
<li id="offer">
<a href="" class="">
<h4>We offer FREE UK RETURNS</h4>
<p>Click here for more info</p>
</a>
</li>
<li>
<a href="" class="">
<h4>EXCLUSIVES</h4>
<p>SHOP NOW</p>
</a>
</li>
</ul>
</div>
</div>
<div class="h_sec">
<h3 class="section-header"><span>Cart</span></h3>
</div>
<div class="cart_table table-responsive text-nowrap">
<div class="table">
<table class="table table-striped">
<thead>
<tr>
<th align="center" scope="col">Product</th>
<th align="center" scope="col"></th>
<th align="center" scope="col">Price</th>
<th scope="col">Quantity</th>
</tr>
</thead>
<tbody>
<?php if(count($new_cart)): ?>
<?php foreach ($new_cart as $row=>$item) { ?>
<tr>
<td class="user-cart-item-details " width="10%" >
<div class="user-cart-imag"><img style="height: 80px;" class="" src="<?php echo base_url("uploads/".$item->image) ?>" /></div>
</td>
<td valign="middle" align="left" width="70%" >
<p class="name"><?php echo $item->name;?> </p>
<p class="t-title"><?php echo $item->title;?></p>
<p>ID (<?php echo $item->id;?>)</p>
</td>
<td valign="middle" width="10%"><span></span><?php echo $item->price;?></td>
<td valign="middle" width="10%"><?php echo $item->qty;?></td>
</tr>
<?php } ?>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</body>
</html>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Welcome to CodeIgniter</title>
<style type="text/css">
::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}
a {
color: #003399;
background-color: transparent;
font-weight: normal;
}
h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}
code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}
#body {
margin: 0 15px 0 15px;
}
p.footer {
text-align: right;
font-size: 11px;
border-top: 1px solid #D0D0D0;
line-height: 32px;
padding: 0 10px 0 10px;
margin: 20px 0 0 0;
}
#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}
</style>
</head>
<body>
<div id="container">
<h1>Welcome to CodeIgniter!</h1>
<div id="body">
<p>The page you are looking at is being generated dynamically by CodeIgniter.</p>
<p>If you would like to edit this page you'll find it located at:</p>
<code>application/views/welcome_message.php</code>
<p>The corresponding controller for this page is found at:</p>
<code>application/controllers/Welcome.php</code>
<p>If you are exploring CodeIgniter for the very first time, you should start by reading the <a href="user_guide/">User Guide</a>.</p>
</div>
<p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds. <?php echo (ENVIRONMENT === 'development') ? 'CodeIgniter Version <strong>' . CI_VERSION . '</strong>' : '' ?></p>
</div>
</body>
</html>
\ No newline at end of file
body {
margin: 0;
font-family: "Source Sans Pro",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
display: block;
}
a{
color: #CCCCCC;
}
.main-sidebar {
bottom: 0;
float: none;
height: 100vh;
left: 0;
position: fixed;
top: 0;
width: 250px;
color: rgba(255,255,255,.8);
background-color: #17241d;
}
.elevation-4 {
box-shadow: 0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)!important;
}
[class*=sidebar-dark-] {
background-color:#17241d ;
}
.brand-link {
font-size: 1.25rem;
line-height: 1.5;
white-space: nowrap;
display: flex;
align-items: center;
padding: 10px 5px;
border-bottom: 1px solid #4f5962;
}
.brand-text {
margin-left: 5px;
}
.admin-image {
float: left;
line-height: .8;
border-radius: 50%;
box-shadow: 0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)!important;
max-height: 40px;
width: auto;
}
.user-panel {
margin: 0 1rem;
border-bottom: 1px solid #4f5962;
}
.user-panel p, h4 {
padding:0;
margin: 0;
}
.nav {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
padding-left: 0;
margin-bottom: 0;
list-style: none;
}
ul {
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
padding-inline-start: 40px;
}
.nav-item .nav-link.active {
background-color: #007bff;
color: #fff;
}
.nav-item .nav-link {
margin-bottom: .2rem;
}
.nav-pills .nav-link {
border-radius: .25rem;
}
.nav-link {
display: block;
padding: .5rem 1rem;
}
.nav-sidebar .nav-link p {
display: inline-block;
margin: 0;
transition: margin-left .3s linear,opacity .3s ease,visibility .3s ease;
}
.nav-sidebar .nav-link p .right {
position: absolute;
right: 1rem;
top: .7rem;
}
.card {
margin-left: 400px;
width: 60%;
}
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
This diff could not be displayed because it is too large.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment