Commit 7a6ea0cd by Ajil

initial push 12/03/2019 12:58

parents
.DS_Store
application/cache/*
!application/cache/index.html
!application/cache/.htaccess
application/logs/*
!application/logs/index.html
!application/logs/.htaccess
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
.htaccess
application/config/database.php
application/assets/uploads
\ No newline at end of file
<?php
// Name of the file
$filename = 'lataxi.sql';
// MySQL host
$mysql_host = "localhost";
// MySQL username
$mysql_username = "techlabz_lataxi";
// MySQL password
$mysql_password = "DUBU(EpTwGTH";
// Database name
$mysql_database = "techlabz_lataxi";
// Connect to MySQL server
mysql_connect($mysql_host, $mysql_username, $mysql_password) or die('Error connecting to MySQL server: ' . mysql_error());
// Select database
mysql_select_db($mysql_database) or die('Error selecting MySQL database: ' . mysql_error());
// Temporary variable, used to store current query
$templine = '';
// Read in entire file
$lines = file($filename);
// Loop through each line
foreach ($lines as $line)
{
// Skip it if it's a comment
if (substr($line, 0, 2) == '--' || $line == '')
continue;
// Add this line to the current segment
$templine .= $line;
// If it has a semicolon at the end, it's the end of the query
$status=false;
if (substr(trim($line), -1, 1) == ';')
{
// Perform the query
if(mysql_query($templine))
{
$status=true;
} else{
print('Error performing query \'<strong>' . $templine . '\': ' . mysql_error() . '<br /><br />');
}
// Reset temp variable to empty
$templine = '';
}
}
date_default_timezone_set("Asia/Kolkata");
$date = date('Y-m-d H:i:s');
if($status=false)
{
mysql_query("INSERT INTO cronjob (status,date_time)VALUES ('Error','$date')");
}
else
{
mysql_query("INSERT INTO cronjob (status,date_time)VALUES ('Success','$date')");
}
?>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
<!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','upload');
/*
| -------------------------------------------------------------------
| 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');
*/
$autoload['drivers'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Helper Files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['helper'] = array('url', 'file');
*/
$autoload['helper'] = array('url','form','general');
/*
| -------------------------------------------------------------------
| 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");
$config["base_url"] = "http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["SCRIPT_NAME"]);
$config["index_page"] = "index.php";
$config["uri_protocol"] = "REQUEST_URI";
$config["url_suffix"] = " ";
$config["language"] = "english";
$config["charset"] = "UTF-8";
$config["enable_hooks"] = FALSE;
$config["subclass_prefix"] = "MY_";
$config["composer_autoload"] = FALSE;
$config["permitted_uri_chars"] = "a-z 0-9~%.:_\-";
$config["allow_get_array"] = TRUE;
$config["enable_query_strings"] = FALSE;
$config["controller_trigger"] = "c";
$config["function_trigger"] = "m";
$config["directory_trigger"] = "d";
$config["log_threshold"] = 0;
$config["log_path"] = "";
$config["log_file_extension"] = "";
$config["log_file_permissions"] = 0644;
$config["log_date_format"] = "Y-m-d H:i:s";
$config["error_views_path"] = "";
$config["cache_path"] = "";
$config["cache_query_string"] = FALSE;
$config["encryption_key"] = "";
$config["sess_driver"] = "files";
$config["sess_cookie_name"] = "ci_session";
$config["sess_expiration"] = 7200;
$config["sess_save_path"] = NULL;
$config["sess_match_ip"] = FALSE;
$config["sess_time_to_update"] = 300;
$config["sess_regenerate_destroy"] = FALSE;
$config["cookie_prefix"] = "";
$config["cookie_domain"] = "";
$config["cookie_path"] = "/";
$config["cookie_secure"] = FALSE;
$config["cookie_httponly"] = FALSE;
$config["standardize_newlines"] = FALSE;
$config["global_xss_filtering"] = FALSE;
$config["csrf_protection"] = FALSE;
$config["csrf_token_name"] = "csrf_test_name";
$config["csrf_cookie_name"] = "csrf_cookie_name";
$config["csrf_expire"] = 7200;
$config["csrf_regenerate"] = TRUE;
$config["csrf_exclude_uris"] = array();
$config["compress_output"] = FALSE;
$config["time_reference"] = "local";
$config["rewrite_short_tags"] = FALSE;
$config["proxy_ips"] = "";
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
define("APP_SECRET_KEY", "app_secret_key");
/*
|--------------------------------------------------------------------------
| 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_DESCTRUCTIVE') 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
<?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',
'/Ķ|Κ|К/' => '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',
'/Ź|Ż|Ž|Ζ|З/' => 'Z',
'/ź|ż|ž|ζ|з/' => 'z',
'/Æ|Ǽ/' => 'AE',
'/ß/' => 'ss',
'/IJ/' => 'IJ',
'/ij/' => 'ij',
'/Œ/' => 'OE',
'/ƒ/' => 'f',
'/ξ/' => 'ks',
'/π/' => 'p',
'/β/' => 'v',
'/μ/' => 'm',
'/ψ/' => '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');
$config = array(
'test_get' =>array(
array('field'=>'id', 'label'=>'required', 'rules'=>'trim | required ')
),
'signUp' =>array(
array('field'=>'username', 'label'=>'User name', 'rules'=>'trim|required|min_length[6]|max_length[16]'),
array('field'=>'email_id', 'label'=>'Email', 'rules'=>'trim|required|valid_email'),
array('field'=>'password', 'label'=>'Password', 'rules'=>'trim|required'),
array('field'=>'phone_no', 'label'=>'Phone number', 'rules'=>'trim|numeric|required'),
),
'signIn' =>array(
array('field'=>'username', 'label'=>'Username/Email/mobile', 'rules'=>'trim|required'),
array('field'=>'password', 'label'=>'Password', 'rules'=>'trim|required'),
),
'joinSalons' =>array(
array('field'=>'email_id', 'label'=>'Email', 'rules'=>'trim|required|valid_email'),
array('field'=>'phone_no', 'label'=>'Phone number', 'rules'=>'trim|numeric|required'),
)
);
<?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:
|
| http://codeigniter.com/user_guide/general/hooks.html
|
*/
<!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: http://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');
/*
| -------------------------------------------------------------------
| MIME TYPES
| -------------------------------------------------------------------
| This file contains an array of mime types. It is used by the
| Upload class to help identify allowed file types.
|
*/
return array(
'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
'cpt' => 'application/mac-compactpro',
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => array('application/octet-stream', 'application/x-msdownload'),
'class' => 'application/octet-stream',
'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
'ai' => array('application/pdf', 'application/postscript'),
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'),
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar',
'gz' => 'application/x-gzip',
'gzip' => 'application/x-gzip',
'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source',
'js' => array('application/x-javascript', 'text/plain'),
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
'z' => 'application/x-compress',
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
'aif' => array('audio/x-aiff', 'audio/aiff'),
'aiff' => array('audio/x-aiff', 'audio/aiff'),
'aifc' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
'gif' => 'image/gif',
'jpeg' => array('image/jpeg', 'image/pjpeg'),
'jpg' => array('image/jpeg', 'image/pjpeg'),
'jpe' => array('image/jpeg', 'image/pjpeg'),
'png' => array('image/png', 'image/x-png'),
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'css' => array('text/css', 'text/plain'),
'html' => array('text/html', 'text/plain'),
'htm' => array('text/html', 'text/plain'),
'shtml' => array('text/html', 'text/plain'),
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => array('text/plain', 'text/x-log'),
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => array('application/xml', 'text/xml', 'text/plain'),
'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
'movie' => 'video/x-sgi-movie',
'doc' => array('application/msword', 'application/vnd.ms-office'),
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
'dot' => array('application/msword', 'application/vnd.ms-office'),
'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => array('application/json', 'text/json'),
'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
'p10' => array('application/x-pkcs10', 'application/pkcs10'),
'p12' => 'application/x-pkcs12',
'p7a' => 'application/x-pkcs7-signature',
'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7r' => 'application/x-pkcs7-certreqresp',
'p7s' => 'application/pkcs7-signature',
'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
'der' => 'application/x-x509-ca-cert',
'kdb' => 'application/octet-stream',
'pgp' => 'application/pgp',
'gpg' => 'application/gpg-keys',
'sst' => 'application/octet-stream',
'csr' => 'application/octet-stream',
'rsa' => 'application/x-pkcs7',
'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
'3g2' => 'video/3gpp2',
'3gp' => array('video/3gp', 'video/3gpp'),
'mp4' => 'video/mp4',
'm4a' => 'audio/x-m4a',
'f4v' => 'video/mp4',
'webm' => 'video/webm',
'aac' => 'audio/x-acc',
'm4u' => 'application/vnd.mpegurl',
'm3u' => 'text/plain',
'xspf' => 'application/xspf+xml',
'vlc' => 'application/videolan',
'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
'au' => 'audio/x-au',
'ac3' => 'audio/ac3',
'flac' => 'audio/x-flac',
'ogg' => 'audio/ogg',
'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
'ics' => 'text/calendar',
'ical' => 'text/calendar',
'zsh' => 'text/x-scriptzsh',
'7zip' => array('application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
'vcf' => 'text/x-vcard',
'srt' => array('text/srt', 'text/plain'),
'vtt' => array('text/vtt', 'text/plain'),
'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon')
);
<?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:
|
| http://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:
|
| http://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'] = 'login';
$route['404_override'] = 'my404';
$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:
| http://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' => 'Spartan',
'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',
'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',
// 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'
);
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Checker extends CI_Controller {
public function __construct() {
parent::__construct();
date_default_timezone_set("Asia/Kolkata");
$this->load->model('Checker_model');
if(!$this->session->userdata('logged_in')) {
redirect(base_url());
}
else {
$profile = $this->router->fetch_method();
if($profile != 'profile') {
$menu = $this->session->userdata('admin');
if( $menu!=1 ) {
$this->session->set_flashdata('message', array('message' => "You don't have permission to access user page.",'class' => 'danger'));
redirect(base_url().'dashboard');
}
}
}
}
public function view_checker() {
$template['nav'] = '<li>All Checker</li>';
$template['page'] = 'Checker/view-checker';
$template['page_title'] = "View Checker";
$template['data'] = $this->Checker_model->get_checker();
$this->load->view('template',$template);
}
public function view_single_checker() {
$id = $_POST['id'];
$template['data'] = $this->Checker_model->get_single_checker($id);
$this->load->view('Checker/view-checker-popup',$template);
}
public function add_checker() {
$message = '';
$template['page'] = 'Checker/add-checker-details';
$template['nav'] = '<li><a href="'.base_url('checker').'">checker</a></li><li>Create</li>';
$template['page_title'] = "Create Checker";
$this->load->helper('string');
if($_POST) {
$data = $_POST;
$data['password']=random_string('alnum', 6);
$result = $this->Checker_model->save_checker($data);
if($result == "Exist") {
$this->session->set_flashdata('message', array('message' => 'Email already exist','class' => 'danger'));
} else {
$to =$data['email'];
$sender_email = "[email protected]";
$mail_head = "Checker Login";
$mail_status = send_custom_email($sender_email,$mail_head,$to,'Checker Login', $this->load->view('Templates/checker_login', $data,TRUE),'');
if ($mail_status) {
$this->session->set_flashdata('message', array('message' => 'Checker Saved successfully','class' => 'success'));
}else {
$this->session->set_flashdata('message', array('message' => 'Some Error code for Developer to identify the issue','class' => 'danger'));
}
}
redirect(base_url().'Checker/view_checker');
} else {
$this->load->view('template', $template);
}
}
// public function add_checker() {
// $message = '';
// $template['page'] = 'Checker/add-checker-details';
// $template['nav'] = '<li><a href="'.base_url('checker').'">checker</a></li><li>Create</li>';
// $template['page_title'] = "Create Checker";
// if($_POST) {
// $data = $_POST;
// // $name = preg_replace('/\s+/', ' ',$data['name']);
// // $data['name'] = preg_replace('/[^a-zA-Z0-9\s]/', '', $name);
// // unset($data['submit']);
// $config = $this->set_upload_options();
// $this->load->library('upload');
// $this->upload->initialize($config);
// if ( ! $this->upload->do_upload('image')) {
// $message = $this->upload->display_errors().'Error Occured While Uploading Files. ';
// }
// else {
// $upload_data = $this->upload->data();
// $data['image'] = $config['upload_path']."/".$upload_data['file_name'];
// $result = $this->Checker_model->save_checker($data);
// if($result == "Exist") {
// $message .= 'Checker already exist';
// } else {
// $this->session->set_flashdata('message', array('message' => 'Checker Saved successfully','class' => 'success'));
// }
// }
// if($message!=''){
// $this->session->set_flashdata('message', array('message' => $message,'class' => 'danger'));
// }
// redirect(base_url().'Checker/view_checker');
// } else {
// $this->load->view('template', $template);
// }
// }
private function set_upload_options() {
//upload an image options
$config = array();
$config['upload_path'] = 'assets/uploads/checker';
$config['allowed_types'] = 'gif|jpg|png|jpeg';
$config['max_size'] = '5000';
$config['overwrite'] = FALSE;
return $config;
}
}
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Dashboard extends CI_Controller {
public function __construct() {
parent::__construct();
date_default_timezone_set("Asia/Kolkata");
$this->load->model('dashboard_model');
if(!$this->session->userdata('logged_in')) {
redirect(base_url());
}
}
public function index() {
$template['page_title'] = "Dashboard";
$template['page'] = 'Dashboard/dashboard';
$template['cheker'] = $this->dashboard_model->get_cheker_count();
$template['waiting'] = $this->dashboard_model->get_waiting_count();
$template['total'] = $this->dashboard_model->get_total_count();
$template['check_in'] = $this->dashboard_model->get_check_in_count();
$template['appointment'] = $this->dashboard_model->get_new_user_registration();
$this->load->view('template',$template);
}
}
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Help extends CI_Controller {
public function __construct() {
parent::__construct();
date_default_timezone_set("Asia/Kolkata");
$this->load->model('help_model');
if(!$this->session->userdata('logged_in')) {
redirect(base_url());
}
else {
$menu = $this->session->userdata('admin');
if( $menu!=1 ) {
$this->session->set_flashdata('message', array('message' => "You don't have permission to access testimonials page.",'class' => 'danger'));
redirect(base_url().'dashboard');
}
}
}
public function create() {
$message = '';
$template['page'] = 'Help/add-help';
$template['nav'] = '<li><a href="'.base_url('help').'">Help</a></li><li>Create</li>';
$template['page_title'] = "Create Help";
$template['car_type'] = $this->db->where('status','1')->get('car_type')->result();
if($_POST) {
$data = $_POST;
$name = preg_replace('/\s+/', ' ',$data['head']);
$data['head'] = preg_replace('/[^a-zA-Z0-9\s]/', '', $name);
unset($data['submit']);
$config = $this->set_upload_options();
$this->load->library('upload');
$this->upload->initialize($config);
if ( ! $this->upload->do_upload('image')) {
$message = $this->upload->display_errors().'Error Occured While Uploading Files. ';
}
else {
$upload_data = $this->upload->data();
$data['image'] = $config['upload_path']."/".$upload_data['file_name'];
$result = $this->help_model->save_help($data);
if($result == "Exist") {
$message .= 'Help already exist';
} else {
$this->session->set_flashdata('message', array('message' => 'Help Saved successfully','class' => 'success'));
}
}
if($message!=''){
$this->session->set_flashdata('message', array('message' => $message,'class' => 'danger'));
}
redirect(base_url().'help');
} else {
$this->load->view('template', $template);
}
}
public function index() {
$template['page'] = 'Help/view-help';
$template['nav'] = '<li><a href="'.base_url('help').'">Help</a></li><li>View</li>';
$template['page_title'] = "View Help";
$template['data'] = $this->help_model->get_help();
$this->load->view('template',$template);
}
public function edit($id=null) {
if($id==null){
$this->session->set_flashdata('message', array('message' => 'Invalid information','class' => 'error'));
redirect(base_url('driver'));
}
$template['page'] = 'Help/edit-help';
$template['page_title'] = "Edit Help";
$id = $this->uri->segment(3);
$template['data'] = $this->help_model->get_single_help($id);
if($_POST) {
$data = $_POST;
unset($data['submit']);
$notify = '';
if(isset($data['nofity'])) {
$notify = $data['nofity'];
unset($data['notify']);
}
if(isset($_FILES['image'])) {
$config = $this->set_upload_options();
$this->load->library('upload');
$this->upload->initialize($config);
if ( ! $this->upload->do_upload('image')) {
$message = $this->upload->display_errors().'Error Occured While Uploading Files. ';
}
else {
$upload_data = $this->upload->data();
$data['image'] = $config['upload_path']."/".$upload_data['file_name'];
}
}
$result = $this->help_model->update_help($data, $id);
if($result == "Exist") {
$this->session->set_flashdata('message', array('message' => 'Help already exist','class' => 'danger'));
}
else {
$this->session->set_flashdata('message', array('message' => 'Help Details Updated Successfully','class' => 'success'));
}
redirect(base_url().'help');
}
else {
$this->load->view('template', $template);
}
}
public function view_single_help() {
$id = $_POST['id'];
$template['data'] = $this->help_model->get_single_help($id);
$this->load->view('Help/view-help-popup',$template);
}
public function delete_help() {
$id = $this->uri->segment(3);
$result = $this->help_model->delete_help($id);
$this->session->set_flashdata('message', array('message' => 'Help Deleted Successfully','class' => 'success'));
redirect(base_url().'help');
}
private function set_upload_options() {
$config = array();
$config['upload_path'] = 'assets/uploads/help';
$config['allowed_types'] = 'gif|jpg|png|jpeg';
$config['max_size'] = '5000';
$config['overwrite'] = FALSE;
return $config;
}
}
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Login extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->model('login_model');
if($this->session->userdata('logged_in')) {
redirect(base_url().'dashboard');
}
}
public function index(){
$template['page_title'] = "Login";
if(isset($_POST)) {
$this->load->library('form_validation');
$this->form_validation->set_rules('username', 'Username', 'trim|required');
$this->form_validation->set_rules('password', 'Password', 'trim|required|callback_check_database');
if($this->form_validation->run() == TRUE) {
redirect(base_url().'dashboard');
}
}
$this->load->view('Templates/header', $template);
$this->load->view('Login/login_form');
$this->load->view('Templates/footer');
}
function check_database($password) {
$username = $this->input->post('username');
$result = $this->login_model->login($username, $password);
if($result) {
$sess_array = array(
'id' => $result->id,
'username' => $result->username,
'user_type'=> $result->role_type
);
$this->session->set_userdata('logged_in',$sess_array);
$this->session->set_userdata('admin',$result->role_type);
$this->session->set_userdata('id',$result->id);
return true;
} else {
$this->form_validation->set_message('check_database', 'Invalid username or password');
return false;
}
}
}
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Logout extends CI_Controller {
public function __construct() {
parent::__construct();
date_default_timezone_set("Asia/Kolkata");
if(!$this->session->userdata('logged_in')) {
redirect(base_url());
}
}
function index() {
$this->session->unset_userdata('logged_in');
session_destroy();
redirect(base_url());
}
}
<?php
error_reporting(0);
defined('BASEPATH') OR exit('No direct script access allowed');
class Profile extends CI_Controller {
public function __construct() {
parent::__construct();
date_default_timezone_set("Asia/Kolkata");
$this->load->model('settings_model');
if(!$this->session->userdata('logged_in')) {
redirect(base_url());
}
else {
$profile = $this->router->fetch_method();
if($profile != 'profile') {
$menu = $this->session->userdata('admin');
if( $menu!=1 ) {
$this->session->set_flashdata('message', array('message' => "You don't have permission to access user page.",'class' => 'danger'));
redirect(base_url().'dashboard');
}
}
}
}
public function index() {
$template['page'] = 'Profile/profile';
$template['nav'] = '<li><a href="'.base_url('profile').'">Profile</a></li><li>View</li>';
$template['page_title'] = "Profile Info";
if($_POST){
$data=$this->input->post();
$user = $this->session->userdata('logged_in');
$rs = $this->db->where('id',$user['id'])->where('password',md5($data['curr_password']))->get('admin_users')->row();
if(count($rs)>0){
if($data['new_password']==$data['confirm_password']){
$this->db->where('id',$user['id'])->update('admin_users',array('password'=>md5($data['confirm_password'])));
$this->session->set_flashdata('message',array('message' => 'Password Updated Successfully','class' => 'success'));
} else {
$this->session->set_flashdata('message', array('message' => 'Password mismatch','class' => 'error'));
}
} else {
$this->session->set_flashdata('message', array('message' => 'Current Password Wrong','class' => 'error'));
}
}
$this->load->view('template',$template);
}
//upload an image options
}
<?php
error_reporting(0);
defined('BASEPATH') OR exit('No direct script access allowed');
class Settings extends CI_Controller {
public function __construct() {
parent::__construct();
date_default_timezone_set("Asia/Kolkata");
$this->load->model('settings_model');
if(!$this->session->userdata('logged_in')) {
redirect(base_url());
}
else {
$profile = $this->router->fetch_method();
if($profile != 'profile') {
$menu = $this->session->userdata('admin');
if( $menu!=1 ) {
$this->session->set_flashdata('message', array('message' => "You don't have permission to access user page.",'class' => 'danger'));
redirect(base_url().'dashboard');
}
}
}
}
public function index() {
$template['page'] = 'Settings/settings_info';
$template['nav'] = '<li><a href="'.base_url('settings').'">Settings</a></li><li>View</li>';
$template['page_title'] = "Settings Info";
if($_POST){
$data=$this->input->post();
if(isset($_FILES['logo'])) {
$config = $this->set_upload_options();
$path = $_FILES['logo']['name'];
$ext = pathinfo($path, PATHINFO_EXTENSION);
$new_name = time().".".$ext;
$config['file_name'] = $new_name;
$this->upload->initialize($config);
if(!$this->upload->do_upload('logo')) {
unset($data['logo']);
}else {
$upload_data = $this->upload->data();
$data['logo'] = $config['upload_path']."/".$upload_data['file_name'];
}
}
if(isset($_FILES['favicon'])) {
$config = $this->set_upload_faviconoptions();
$path = $_FILES['favicon']['name'];
$ext = pathinfo($path, PATHINFO_EXTENSION);
$new_name = time().".".$ext;
$config['file_name'] = $new_name;
$this->upload->initialize($config);
if(!$this->upload->do_upload('favicon')) {
unset($data['favicon']);
}else{
$upload_data = $this->upload->data();
$data['favicon'] = $config['upload_path']."/".$upload_data['file_name'];
}
}
$result =$this->settings_model->settings_info($data);
if($result) {
array_walk($data, "remove_html");
$this->session->set_flashdata('message',array('message' => 'Data Updated Successfully','class' => 'success'));
}else {
$this->session->set_flashdata('message', array('message' => 'Error Occured','class' => 'error'));
}
}
$template['result'] = $this->settings_model->get_info();
$this->load->view('template',$template);
}
//upload an image options
private function set_upload_options() {
$config = array();
$config['upload_path'] = 'assets/uploads/settings/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '5000';
$config['overwrite'] = FALSE;
return $config;
}
private function set_upload_faviconoptions() {
//upload an image options
$config = array();
$config['upload_path'] ='assets/uploads/settings/';
$config['allowed_types'] = 'ico';
$config['max_size'] = '0';
$config['overwrite'] = FALSE;
return $config;
}
}
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Users extends CI_Controller {
public function __construct() {
parent::__construct();
date_default_timezone_set("Asia/Kolkata");
$this->load->model('user_model');
if(!$this->session->userdata('logged_in')) {
redirect(base_url());
}
else {
$menu = $this->session->userdata('admin');
if( $menu!=1 ) {
$this->session->set_flashdata('message', array('message' => "You don't have permission to access testimonials page.",'class' => 'danger'));
redirect(base_url().'dashboard');
}
}
}
public function view_all_inviting_user() {
$template['nav'] = '<li>Inviting Users</li>';
$template['page'] = 'Users/view_all_inviting_user';
$template['page_title'] = "View Waiting Users";
$template['data'] = $this->user_model->get_all_inviting_user();
$this->load->view('template',$template);
}
public function view_waiting() {
$template['nav'] = '<li>Sign Up Users</li>';
$template['page'] = 'Users/view_waiting';
$template['page_title'] = "View Sign Up Users";
$template['data'] = $this->user_model->get_waiting();
$this->load->view('template',$template);
}
public function view_check_in() {
$template['nav'] = '<li>Check-In</li>';
$template['page'] = 'Users/view_check_in';
$template['page_title'] = "View Check-In";
$template['data'] = $this->user_model->get_check_in();
$this->load->view('template',$template);
}
public function view_allusers() {
$template['nav'] = '<li>All Users</li>';
$template['page'] = 'Users/view_all_Users';
$template['page_title'] = "View All Users";
$template['data'] = $this->user_model->get_all_Users();
$this->load->view('template',$template);
}
public function inviting_users() {
$template['nav'] = '<li>Inviting Users</li>';
$template['page'] = 'Users/inviting_users';
$template['page_title'] = "Inviting Users";
$this->load->helper('string');
if($_POST) {
$datas = $_POST;
print_r($email);
$expiration_date = $datas['expiration_date'];
$no_persons = $datas['no_persons'];
$email = $datas['email'];
$phone = $datas['phone'];
$len = count($email);
$detailsArray = array();
for($i=0; $i< $len; $i++) {
$random=random_string('alnum', 5);
$details = array(
'check_id' => $random,
'email' => $email[$i],
'phone' => $phone[$i],
'no_allowed_persons' => $no_persons,
'expiration_date' => $expiration_date
);
array_push($detailsArray, $details);
}
$add_random_string = $this->user_model->add_random_string($detailsArray);
if($detailsArray!=''){
foreach ($detailsArray as $k => $detail) {
$qrcode= $this->generating_code($detail['check_id']);
$data['pin']=$detail['check_id'];
$to =$detail['email'];
$sender_email = "[email protected]";
$mail_head = "Appointment Form";
$mail_status = send_custom_email($sender_email,$mail_head,$to,'Appointment Form', $this->load->view('Templates/appointment_form', $data,TRUE),'');
}
}
if ($mail_status) {
$this->session->set_flashdata('message', array('message' => 'Inviting Send successfully','class' => 'success'));
} else {
$this->session->set_flashdata('message', array('message' => 'Some Error code for Developer to identify the issue'));
}
redirect(base_url().'Users/view_all_inviting_user');
}
$this->load->view('template',$template);
}
public function view_single_all() {
$id = $_POST['id'];
$template['data'] = $this->user_model->get_single_all($id);
$this->load->view('Users/view-all-popup',$template);
}
public function check_email_availability() {
$email=$this->input->post('email');
$result = $this->user_model->email_availability_check($email);
echo json_encode($result);
}
public function check_phone_availability() {
$phone=$this->input->post('phone');
$result = $this->user_model->phone_availability_check($phone);
echo json_encode($result);
}
public function send_invitation_reguser() {
$user_id=$this->input->post('id');
$person=$this->input->post('noperson');
$expdate=$this->input->post('expdate');
$this->load->helper('string');
$usrdata['check_id']=random_string('alnum', 6);
$qrcode= $this->generating_code($usrdata['check_id']);
$usrdata['user_id']=$user_id;
$usrdata['persons']=$person;
$usrdata['expiration_date']=$expdate;
$usrdata['qr_code']=$qrcode;
$data = $this->user_model->update_user_invitation($usrdata);
if($data) {
$to =$data['user_email'];
$sender_email = "[email protected]";
$mail_head = "Registered User Invitation Letter";
$mail_status = send_custom_email($sender_email,$mail_head,$to,'Registered User Invitation Letter', $this->load->view('Templates/reg_user_invitation',$data,TRUE),'');
if ($mail_status==true) {
exit(json_encode(array("data"=>$data)));
$this->session->set_flashdata('message', array('message' => 'Invitation Send successfully','class' => 'success'));
}else{
$this->session->set_flashdata('message', array('message' => 'Some Error code for Developer to identify the issue','class' => 'danger'));
}
} else {
$this->session->set_flashdata('message', array('message' => 'Some Error code for Developer to identify the issue','class' => 'danger'));
}
}
function generating_code($check_id){
$this->load->helper('url');
$this->load->library('ciqrcode');
$params['data'] = $check_id;
$params['level'] = 'H';
$params['size'] = 10;
$params['savename'] = FCPATH.'assets/images/qrcode/'.$check_id.'.png';
$this->ciqrcode->generate($params);
$path = 'assets/images/qrcode/'.$check_id.'.png';
$this->db->where('check_id',$check_id)->update('users',array('qr_code'=>$path));
return $path;
}
}
<?php
defined('BASEPATH')OR exit('No direct script access allowed');
header('Content-Type: text/html; charset=utf-8');
// Allow from any origin
if (isset($_SERVER['HTTP_ORIGIN'])) {
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Max-Age: 86400'); // cache for 1 day
}
// Access-Control headers are received during OPTIONS requests
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))
header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']))
header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}");
exit(0);
}
class Webservices extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->model('Webservice_model');
$class = $this->router->fetch_class();
$method = $this->router->fetch_method();
if ($this->input->server('REQUEST_METHOD') == 'GET')
$postdata = json_encode($_GET);
else if ($this->input->server('REQUEST_METHOD') == 'POST')
$postdata = file_get_contents("php://input");
$auth = '';
if (isset(apache_request_headers()['Auth'])) {
$auth = apache_request_headers()['Auth'];
}
$this->last_id = set_log($class, $method, $postdata, $auth);
}
function appointment_form()
{
header('Content-type: application/json');
$postdata = file_get_contents("php://input");
$request = json_decode($postdata, true);
$this->load->helper('string');
$email = $request['email'];
$name = $request['name'];
//$validate_user = $this->mdl_login->validate_user($username,$type);
//if ($validate_user) {
$random = random_string('alnum', 16);
$userna = $email;
$add_random_string = $this->Webservice_model->add_random_string($random, $userna);
$data['key'] = "Al@ihSaNs@AdMinS";
$data['userna'] = $userna;
$data['random'] = $random;
$encemail = encrypt_forgot($userna);
$encrandom = encrypt_forgot($random);
$base_url=base_url();
$link="$base_url/admin/Login/appointment_form/$encemail/$encrandom";
echo json_encode($link);exit();
$sender_email = $userna;
$mail_head = "Appointment Form";
$mail_status = send_custom_email($sender_email,$mail_head,$userna,'Appointment Form');
if ($mail_status) {
print json_encode(array('status' => 'success'));
} else {
print json_encode(array('status' => 'false'));
}
// } else {
// print json_encode(array('status' => 'error', 'message' => 'Your email address is not registered', 'error' => '505'));
// }
}
function encrypt_forgot($data)
{
if (!$data) {
return false;
}
$key = "Al@ihSaNs@AdMinS";
$text = $data;
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);
return trim(safe_b64encode($crypttext));
}
}
?>
\ No newline at end of file
<?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 http://codeigniter.com/user_guide/general/urls.html
*/
public function index()
{
$this->load->view('welcome_message');
}
public function test()
{
echo "HII DON";
}
}
<!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
function get_status($status){
$array = array('0'=>'Inviting',
//'1'=>'Signup',
'1'=>'Check-in',
'2'=>'Expired');
return $array[$status];
}
function get_ckrstatus($status){
$array = array('1'=>'on duty',
'0'=>'off duty',
);
return $array[$status];
}
function get_color($status){
$array = array('1'=>'info',
'0'=>'warning',
'3'=>'success',
'2'=>'danger');
return $array[$status];
}
function get_reqstatus($status){
$array = array('1'=>'Assigned',
'2'=>'Failed',
'3'=>'Cancelled',
'0'=>'Pending');
return $array[$status];
}
function get_reqcolor($status){
$array = array('1'=>'success',
'2'=>'danger',
'3'=>'warning',
'0'=>'info');
return $array[$status];
}
function get_documentstatus($status){
$array = array('1'=>'Pending ',
'2'=>'Approved',
'3'=>'Rejected'
);
return $array[$status];
}
function get_doccolor($status){
$array = array('1'=>'info',
'2'=>'success',
'3'=>'danger'
);
return $array[$status];
}
function send_custom_email($from, $mail_head, $to, $subject, $email_message)
{
$ci =& get_instance();
$ci->load->database();
$ci->load->library('email');
$config['protocol'] = "smtp";
$config['smtp_host'] = "smtp.sendgrid.net";
$config['smtp_port'] = "587";
$config['smtp_user'] = '[email protected]';
$config['smtp_pass'] = 'Golden_123';
$config['charset'] = "utf-8";
$config['mailtype'] = "html";
$config['newline'] = "\r\n";
$ci->email->initialize($config);
$ci->email->from($from, $mail_head);
$ci->email->to($to);
$ci->email->reply_to('[email protected]');
$ci->email->subject($subject);
$ci->email->message($email_message);
$send = $ci->email->send();
if($send == TRUE)
{
return TRUE;
} else{
return FALSE;
}
}
function encrypt_forgot($data)
{
if (!$data) {
return false;
}
$key = "Al@ihSaNs@AdMinS";
$text = $data;
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);
return trim(safe_b64encode($crypttext));
}
function safe_b64encode($string)
{
$data = base64_encode($string);
$data = str_replace(array('+', '/', '='), array('-', '_', ''), $data);
return $data;
}
function safe_b64decode($string)
{
$data = str_replace(array('-', '_'), array('+', '/'), $string);
$mod4 = strlen($data) % 4;
if ($mod4) {
$data .= substr('====', $mod4);
}
return base64_decode($data);
}
function decrypt_forgot($data)
{
$key = "Al@ihSaNs@AdMinS";
if (!$data) {
return false;
}
$crypttext = safe_b64decode($data);
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $crypttext, MCRYPT_MODE_ECB, $iv);
return trim($decrypttext);
}
function get_profile_image(){
$CI = & get_instance();
$rs = $CI->db->select('logo')->get('settings')->row();
if(count($rs)>0){
return $rs->logo;
} else {
return base_url('assets/images/image.png');
}
}
function set_log($class,$method,$postdata,$auth){
$CI = & get_instance();
$url = $class.'/'.$method;
$data = array('url'=>$url,
'parameter'=>$postdata,
'auth'=>$auth,
'time'=>date('Y-m-d h:i:s'));
$CI->db->insert('service_log',$data);
return $CI->db->insert_id();
}
function get_app_name(){
$CI = & get_instance();
$rs = $CI->db->select('title')->where('id',1)->get('settings')->row();
return $rs->title;
}
function get_app_pic(){
$CI = & get_instance();
$rs = $CI->db->select('logo')->where('id',1)->get('settings')->row();
return $rs->logo;
}
function convertToHoursMins($time, $format = '%02d:%02d') {
if ($time < 1) {
return;
}
$hours = floor($time / 60);
$minutes = ($time % 60);
return sprintf($format, $hours, $minutes);
}
?>
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<?php
/**
* JSON Web Token implementation, based on this spec:
* http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06
*
* PHP version 5
*
* @category Authentication
* @package Authentication_JWT
* @author Neuman Vong <[email protected]>
* @author Anant Narayanan <[email protected]>
* @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD
* @link https://github.com/firebase/php-jwt
*/
class JWT
{
/**
* Decodes a JWT string into a PHP object.
*
* @param string $jwt The JWT
* @param string|null $key The secret key
* @param bool $verify Don't skip verification process
*
* @return object The JWT's payload as a PHP object
* @throws UnexpectedValueException Provided JWT was invalid
* @throws DomainException Algorithm was not provided
*
* @uses jsonDecode
* @uses urlsafeB64Decode
*/
public static function decode($jwt, $key = null, $verify = true)
{
$tks = explode('.', $jwt);
if (count($tks) != 3) {
throw new UnexpectedValueException('Wrong number of segments');
}
list($headb64, $bodyb64, $cryptob64) = $tks;
if (null === ($header = JWT::jsonDecode(JWT::urlsafeB64Decode($headb64)))) {
throw new UnexpectedValueException('Invalid segment encoding');
}
if (null === $payload = JWT::jsonDecode(JWT::urlsafeB64Decode($bodyb64))) {
throw new UnexpectedValueException('Invalid segment encoding');
}
$sig = JWT::urlsafeB64Decode($cryptob64);
if ($verify) {
if (empty($header->alg)) {
throw new DomainException('Empty algorithm');
}
if ($sig != JWT::sign("$headb64.$bodyb64", $key, $header->alg)) {
throw new UnexpectedValueException('Signature verification failed');
}
}
return $payload;
}
/**
* Converts and signs a PHP object or array into a JWT string.
*
* @param object|array $payload PHP object or array
* @param string $key The secret key
* @param string $algo The signing algorithm. Supported
* algorithms are 'HS256', 'HS384' and 'HS512'
*
* @return string A signed JWT
* @uses jsonEncode
* @uses urlsafeB64Encode
*/
public static function encode($payload, $key, $algo = 'HS256')
{
$header = array('typ' => 'JWT', 'alg' => $algo);
$segments = array();
$segments[] = JWT::urlsafeB64Encode(JWT::jsonEncode($header));
$segments[] = JWT::urlsafeB64Encode(JWT::jsonEncode($payload));
$signing_input = implode('.', $segments);
$signature = JWT::sign($signing_input, $key, $algo);
$segments[] = JWT::urlsafeB64Encode($signature);
return implode('.', $segments);
}
/**
* Sign a string with a given key and algorithm.
*
* @param string $msg The message to sign
* @param string $key The secret key
* @param string $method The signing algorithm. Supported
* algorithms are 'HS256', 'HS384' and 'HS512'
*
* @return string An encrypted message
* @throws DomainException Unsupported algorithm was specified
*/
public static function sign($msg, $key, $method = 'HS256')
{
$methods = array(
'HS256' => 'sha256',
'HS384' => 'sha384',
'HS512' => 'sha512',
);
if (empty($methods[$method])) {
throw new DomainException('Algorithm not supported');
}
return hash_hmac($methods[$method], $msg, $key, true);
}
/**
* Decode a JSON string into a PHP object.
*
* @param string $input JSON string
*
* @return object Object representation of JSON string
* @throws DomainException Provided string was invalid JSON
*/
public static function jsonDecode($input)
{
$obj = json_decode($input);
if (function_exists('json_last_error') && $errno = json_last_error()) {
JWT::_handleJsonError($errno);
} else if ($obj === null && $input !== 'null') {
throw new DomainException('Null result with non-null input');
}
return $obj;
}
/**
* Encode a PHP object into a JSON string.
*
* @param object|array $input A PHP object or array
*
* @return string JSON representation of the PHP object or array
* @throws DomainException Provided object could not be encoded to valid JSON
*/
public static function jsonEncode($input)
{
$json = json_encode($input);
if (function_exists('json_last_error') && $errno = json_last_error()) {
JWT::_handleJsonError($errno);
} else if ($json === 'null' && $input !== null) {
throw new DomainException('Null result with non-null input');
}
return $json;
}
/**
* Decode a string with URL-safe Base64.
*
* @param string $input A Base64 encoded string
*
* @return string A decoded string
*/
public static function urlsafeB64Decode($input)
{
$remainder = strlen($input) % 4;
if ($remainder) {
$padlen = 4 - $remainder;
$input .= str_repeat('=', $padlen);
}
return base64_decode(strtr($input, '-_', '+/'));
}
/**
* Encode a string with URL-safe Base64.
*
* @param string $input The string you want encoded
*
* @return string The base64 encode of what you passed in
*/
public static function urlsafeB64Encode($input)
{
return str_replace('=', '', strtr(base64_encode($input), '+/', '-_'));
}
/**
* Helper method to create a JSON error.
*
* @param int $errno An error number from json_last_error()
*
* @return void
*/
private static function _handleJsonError($errno)
{
$messages = array(
JSON_ERROR_DEPTH => 'Maximum stack depth exceeded',
JSON_ERROR_CTRL_CHAR => 'Unexpected control character found',
JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON'
);
throw new DomainException(
isset($messages[$errno])
? $messages[$errno]
: 'Unknown JSON error: ' . $errno
);
}
}
\ 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>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<?php
/*
* Bulgarian language
*/
$lang['text_rest_invalid_api_key'] = 'Невалиден API ключ %s';
$lang['text_rest_invalid_credentials'] = 'Невалидни данни за достъп';
$lang['text_rest_ip_denied'] = 'Отказан IP адрес';
$lang['text_rest_ip_unauthorized'] = 'Неоторизиран IP адрес';
$lang['text_rest_unauthorized'] = 'Неоторизиран достъп';
$lang['text_rest_ajax_only'] = 'Само AJAX заявки са разрешени';
$lang['text_rest_api_key_unauthorized'] = 'API ключът не е оторизиран зо достъп до заявения контролер';
$lang['text_rest_api_key_permissions'] = 'API ключът няма достатъчно права';
$lang['text_rest_api_key_time_limit'] = 'API ключът е изполван с превишаване на времевия лимит за този метод';
$lang['text_rest_unknown_method'] = 'Неизвестен метод';
$lang['text_rest_unsupported'] = 'Неподдържан протокол';
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
<?php
/*
* English language
*/
$lang['text_rest_invalid_api_key'] = 'Invalid API key %s'; // %s is the REST API key
$lang['text_rest_invalid_credentials'] = 'Invalid credentials';
$lang['text_rest_ip_denied'] = 'IP denied';
$lang['text_rest_ip_unauthorized'] = 'IP unauthorized';
$lang['text_rest_unauthorized'] = 'Unauthorized';
$lang['text_rest_ajax_only'] = 'Only AJAX requests are allowed';
$lang['text_rest_api_key_unauthorized'] = 'This API key does not have access to the requested controller';
$lang['text_rest_api_key_permissions'] = 'This API key does not have enough permissions';
$lang['text_rest_api_key_time_limit'] = 'This API key has reached the time limit for this method';
$lang['text_rest_unknown_method'] = 'Unknown method';
$lang['text_rest_unsupported'] = 'Unsupported protocol';
<!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
/*
* Brazilian portuguese language
*/
$lang['text_rest_invalid_api_key'] = 'Chave da API %s inválida'; // %s is the REST API key
$lang['text_rest_invalid_credentials'] = 'Credenciais inválidas';
$lang['text_rest_ip_denied'] = 'IP proibido';
$lang['text_rest_ip_unauthorized'] = 'IP não autorizado';
$lang['text_rest_unauthorized'] = 'Não autorizado';
$lang['text_rest_ajax_only'] = 'Apenas chamadas AJAX são permitidas';
$lang['text_rest_api_key_unauthorized'] = 'Esta chave da API não tem acesso ao controller solicitado';
$lang['text_rest_api_key_permissions'] = 'Esta chave da API não tem permissões suficientes';
$lang['text_rest_api_key_time_limit'] = 'Esta chave da API já atingiu o tempo limite para este método';
$lang['text_rest_unknown_method'] = 'Método desconhecido';
$lang['text_rest_unsupported'] = 'Sem suporte para este protocolo';
<?php
/**
* PHP QR Code porting for Codeigniter
*
* @package CodeIgniter
* @subpackage Libraries
* @category Libraries
* @porting author [email protected]
* @original author http://phpqrcode.sourceforge.net/
*
* @version 1.0
*/
class Ciqrcode
{
var $cacheable = true;
var $cachedir = 'application/cache/';
var $errorlog = 'application/logs/';
var $quality = true;
var $size = 1024;
function __construct($config = array()) {
// call original library
include "qrcode/qrconst.php";
include "qrcode/qrtools.php";
include "qrcode/qrspec.php";
include "qrcode/qrimage.php";
include "qrcode/qrinput.php";
include "qrcode/qrbitstream.php";
include "qrcode/qrsplit.php";
include "qrcode/qrrscode.php";
include "qrcode/qrmask.php";
include "qrcode/qrencode.php";
$this->initialize($config);
}
public function initialize($config = array()) {
$this->cacheable = (isset($config['cacheable'])) ? $config['cacheable'] : $this->cacheable;
$this->cachedir = (isset($config['cachedir'])) ? $config['cachedir'] : FCPATH.$this->cachedir;
$this->errorlog = (isset($config['errorlog'])) ? $config['errorlog'] : FCPATH.$this->errorlog;
$this->quality = (isset($config['quality'])) ? $config['quality'] : $this->quality;
$this->size = (isset($config['size'])) ? $config['size'] : $this->size;
// use cache - more disk reads but less CPU power, masks and format templates are stored there
if (!defined('QR_CACHEABLE')) define('QR_CACHEABLE', $this->cacheable);
// used when QR_CACHEABLE === true
if (!defined('QR_CACHE_DIR')) define('QR_CACHE_DIR', $this->cachedir);
// default error logs dir
if (!defined('QR_LOG_DIR')) define('QR_LOG_DIR', $this->errorlog);
// if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code
if ($this->quality) {
if (!defined('QR_FIND_BEST_MASK')) define('QR_FIND_BEST_MASK', true);
} else {
if (!defined('QR_FIND_BEST_MASK')) define('QR_FIND_BEST_MASK', false);
if (!defined('QR_DEFAULT_MASK')) define('QR_DEFAULT_MASK', $this->quality);
}
// if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly
if (!defined('QR_FIND_FROM_RANDOM')) define('QR_FIND_FROM_RANDOM', false);
// maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images
if (!defined('QR_PNG_MAXIMUM_SIZE')) define('QR_PNG_MAXIMUM_SIZE', $this->size);
}
public function generate($params = array()) {
if (isset($params['black'])
&& is_array($params['black'])
&& count($params['black']) == 3
&& array_filter($params['black'], 'is_int') === $params['black']) {
QRimage::$black = $params['black'];
}
if (isset($params['white'])
&& is_array($params['white'])
&& count($params['white']) == 3
&& array_filter($params['white'], 'is_int') === $params['white']) {
QRimage::$white = $params['white'];
}
$params['data'] = (isset($params['data'])) ? $params['data'] : 'QR Code Library';
if (isset($params['savename'])) {
$level = 'L';
if (isset($params['level']) && in_array($params['level'], array('L','M','Q','H'))) $level = $params['level'];
$size = 4;
if (isset($params['size'])) $size = min(max((int)$params['size'], 1), 10);
QRcode::png($params['data'], $params['savename'], $level, $size, 2);
return $params['savename'];
} else {
$level = 'L';
if (isset($params['level']) && in_array($params['level'], array('L','M','Q','H'))) $level = $params['level'];
$size = 4;
if (isset($params['size'])) $size = min(max((int)$params['size'], 1), 10);
QRcode::png($params['data'], NULL, $level, $size, 2);
}
}
}
/* end of file */
<?php
/**
* PHP QR Code porting for Codeigniter
*
* @package CodeIgniter
* @subpackage Libraries
* @category Libraries
* @porting author [email protected]
* @original author http://phpqrcode.sourceforge.net/
*
* @version 1.0
*/
class Ciqrcode
{
var $cacheable = true;
var $cachedir = 'application/cache/';
var $errorlog = 'application/logs/';
var $quality = true;
var $size = 1024;
function __construct($config = array()) {
// call original library
include "qrcode/qrconst.php";
include "qrcode/qrtools.php";
include "qrcode/qrspec.php";
include "qrcode/qrimage.php";
include "qrcode/qrinput.php";
include "qrcode/qrbitstream.php";
include "qrcode/qrsplit.php";
include "qrcode/qrrscode.php";
include "qrcode/qrmask.php";
include "qrcode/qrencode.php";
$this->initialize($config);
}
public function initialize($config = array()) {
$this->cacheable = (isset($config['cacheable'])) ? $config['cacheable'] : $this->cacheable;
$this->cachedir = (isset($config['cachedir'])) ? $config['cachedir'] : FCPATH.$this->cachedir;
$this->errorlog = (isset($config['errorlog'])) ? $config['errorlog'] : FCPATH.$this->errorlog;
$this->quality = (isset($config['quality'])) ? $config['quality'] : $this->quality;
$this->size = (isset($config['size'])) ? $config['size'] : $this->size;
// use cache - more disk reads but less CPU power, masks and format templates are stored there
if (!defined('QR_CACHEABLE')) define('QR_CACHEABLE', $this->cacheable);
// used when QR_CACHEABLE === true
if (!defined('QR_CACHE_DIR')) define('QR_CACHE_DIR', $this->cachedir);
// default error logs dir
if (!defined('QR_LOG_DIR')) define('QR_LOG_DIR', $this->errorlog);
// if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code
if ($this->quality) {
if (!defined('QR_FIND_BEST_MASK')) define('QR_FIND_BEST_MASK', true);
} else {
if (!defined('QR_FIND_BEST_MASK')) define('QR_FIND_BEST_MASK', false);
if (!defined('QR_DEFAULT_MASK')) define('QR_DEFAULT_MASK', $this->quality);
}
// if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly
if (!defined('QR_FIND_FROM_RANDOM')) define('QR_FIND_FROM_RANDOM', false);
// maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images
if (!defined('QR_PNG_MAXIMUM_SIZE')) define('QR_PNG_MAXIMUM_SIZE', $this->size);
}
public function generate($params = array()) {
if (isset($params['black'])
&& is_array($params['black'])
&& count($params['black']) == 3
&& array_filter($params['black'], 'is_int') === $params['black']) {
QRimage::$black = $params['black'];
}
if (isset($params['white'])
&& is_array($params['white'])
&& count($params['white']) == 3
&& array_filter($params['white'], 'is_int') === $params['white']) {
QRimage::$white = $params['white'];
}
$params['data'] = (isset($params['data'])) ? $params['data'] : 'QR Code Library';
if (isset($params['savename'])) {
$level = 'L';
if (isset($params['level']) && in_array($params['level'], array('L','M','Q','H'))) $level = $params['level'];
$size = 4;
if (isset($params['size'])) $size = min(max((int)$params['size'], 1), 10);
QRcode::png($params['data'], $params['savename'], $level, $size, 2);
return $params['savename'];
} else {
$level = 'L';
if (isset($params['level']) && in_array($params['level'], array('L','M','Q','H'))) $level = $params['level'];
$size = 4;
if (isset($params['size'])) $size = min(max((int)$params['size'], 1), 10);
QRcode::png($params['data'], NULL, $level, $size, 2);
}
}
}
/* end of file */
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Form_validation extends CI_Form_validation
{
function __construct( $rules = array() ){
parent::__construct($rules);
$this->ci =& get_instance();
}
public function get_errors_as_array(){
return $this->_error_array;
}
public function get_config_rules(){
return $this->_config_rules;
}
public function get_field_names( $form ){
$field_names = array();
$rules = $this->get_config_rules();
$rules = $rules[$form];
foreach ($rules as $index=> $info){
$field_names[] = $info['field'];
}
return $field_names;
}
}
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php
/*
* PHP QR Code encoder
*
* Bitstream class
*
* Based on libqrencode C library distributed under LGPL 2.1
* Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <[email protected]>
*
* PHP QR Code is distributed under LGPL 3
* Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class QRbitstream {
public $data = array();
//----------------------------------------------------------------------
public function size()
{
return count($this->data);
}
//----------------------------------------------------------------------
public function allocate($setLength)
{
$this->data = array_fill(0, $setLength, 0);
return 0;
}
//----------------------------------------------------------------------
public static function newFromNum($bits, $num)
{
$bstream = new QRbitstream();
$bstream->allocate($bits);
$mask = 1 << ($bits - 1);
for($i=0; $i<$bits; $i++) {
if($num & $mask) {
$bstream->data[$i] = 1;
} else {
$bstream->data[$i] = 0;
}
$mask = $mask >> 1;
}
return $bstream;
}
//----------------------------------------------------------------------
public static function newFromBytes($size, $data)
{
$bstream = new QRbitstream();
$bstream->allocate($size * 8);
$p=0;
for($i=0; $i<$size; $i++) {
$mask = 0x80;
for($j=0; $j<8; $j++) {
if($data[$i] & $mask) {
$bstream->data[$p] = 1;
} else {
$bstream->data[$p] = 0;
}
$p++;
$mask = $mask >> 1;
}
}
return $bstream;
}
//----------------------------------------------------------------------
public function append(QRbitstream $arg)
{
if (is_null($arg)) {
return -1;
}
if($arg->size() == 0) {
return 0;
}
if($this->size() == 0) {
$this->data = $arg->data;
return 0;
}
$this->data = array_values(array_merge($this->data, $arg->data));
return 0;
}
//----------------------------------------------------------------------
public function appendNum($bits, $num)
{
if ($bits == 0)
return 0;
$b = QRbitstream::newFromNum($bits, $num);
if(is_null($b))
return -1;
$ret = $this->append($b);
unset($b);
return $ret;
}
//----------------------------------------------------------------------
public function appendBytes($size, $data)
{
if ($size == 0)
return 0;
$b = QRbitstream::newFromBytes($size, $data);
if(is_null($b))
return -1;
$ret = $this->append($b);
unset($b);
return $ret;
}
//----------------------------------------------------------------------
public function toByte()
{
$size = $this->size();
if($size == 0) {
return array();
}
$data = array_fill(0, (int)(($size + 7) / 8), 0);
$bytes = (int)($size / 8);
$p = 0;
for($i=0; $i<$bytes; $i++) {
$v = 0;
for($j=0; $j<8; $j++) {
$v = $v << 1;
$v |= $this->data[$p];
$p++;
}
$data[$i] = $v;
}
if($size & 7) {
$v = 0;
for($j=0; $j<($size & 7); $j++) {
$v = $v << 1;
$v |= $this->data[$p];
$p++;
}
$data[$bytes] = $v;
}
return $data;
}
}
<?php
/*
* PHP QR Code encoder
*
* Config file, feel free to modify
*/
define('QR_CACHEABLE', true); // use cache - more disk reads but less CPU power, masks and format templates are stored there
define('QR_CACHE_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR); // used when QR_CACHEABLE === true
define('QR_LOG_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR); // default error logs dir
define('QR_FIND_BEST_MASK', true); // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code
define('QR_FIND_FROM_RANDOM', false); // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly
define('QR_DEFAULT_MASK', 2); // when QR_FIND_BEST_MASK === false
define('QR_PNG_MAXIMUM_SIZE', 1024); // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images
\ No newline at end of file
<?php
/*
* PHP QR Code encoder
*
* Common constants
*
* Based on libqrencode C library distributed under LGPL 2.1
* Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <[email protected]>
*
* PHP QR Code is distributed under LGPL 3
* Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// Encoding modes
define('QR_MODE_NUL', -1);
define('QR_MODE_NUM', 0);
define('QR_MODE_AN', 1);
define('QR_MODE_8', 2);
define('QR_MODE_KANJI', 3);
define('QR_MODE_STRUCTURE', 4);
// Levels of error correction.
define('QR_ECLEVEL_L', 0);
define('QR_ECLEVEL_M', 1);
define('QR_ECLEVEL_Q', 2);
define('QR_ECLEVEL_H', 3);
// Supported output formats
define('QR_FORMAT_TEXT', 0);
define('QR_FORMAT_PNG', 1);
class qrstr {
public static function set(&$srctab, $x, $y, $repl, $replLen = false) {
$srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl));
}
}
\ No newline at end of file
<?php
/*
* PHP QR Code encoder
*
* Image output of code using GD2
*
* PHP QR Code is distributed under LGPL 3
* Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
define('QR_IMAGE', true);
class QRimage {
public static $black = array(255,255,255);
public static $white = array(0,0,0);
//----------------------------------------------------------------------
public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE)
{
$image = self::image($frame, $pixelPerPoint, $outerFrame);
if ($filename === false) {
Header("Content-type: image/png");
ImagePng($image);
} else {
if($saveandprint===TRUE){
ImagePng($image, $filename);
header("Content-type: image/png");
ImagePng($image);
}else{
ImagePng($image, $filename);
}
}
ImageDestroy($image);
}
//----------------------------------------------------------------------
public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85)
{
$image = self::image($frame, $pixelPerPoint, $outerFrame);
if ($filename === false) {
Header("Content-type: image/jpeg");
ImageJpeg($image, null, $q);
} else {
ImageJpeg($image, $filename, $q);
}
ImageDestroy($image);
}
//----------------------------------------------------------------------
private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4)
{
$h = count($frame);
$w = strlen($frame[0]);
$imgW = $w + 2*$outerFrame;
$imgH = $h + 2*$outerFrame;
$base_image =ImageCreate($imgW, $imgH);
$col[0] = ImageColorAllocate($base_image,QRImage::$black[0],QRImage::$black[1],QRImage::$black[2]);
$col[1] = ImageColorAllocate($base_image,QRImage::$white[0],QRImage::$white[1],QRImage::$white[2]);
imagefill($base_image, 0, 0, $col[0]);
for($y=0; $y<$h; $y++) {
for($x=0; $x<$w; $x++) {
if ($frame[$y][$x] == '1') {
ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]);
}
}
}
$target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint);
ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH);
ImageDestroy($base_image);
return $target_image;
}
}
\ No newline at end of file
<?php
/*
* PHP QR Code encoder
*
* Root library file, prepares environment and includes dependencies
*
* Based on libqrencode C library distributed under LGPL 2.1
* Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <[email protected]>
*
* PHP QR Code is distributed under LGPL 3
* Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
$QR_BASEDIR = dirname(__FILE__).DIRECTORY_SEPARATOR;
// Required libs
include $QR_BASEDIR."qrconst.php";
include $QR_BASEDIR."qrconfig.php";
include $QR_BASEDIR."qrtools.php";
include $QR_BASEDIR."qrspec.php";
include $QR_BASEDIR."qrimage.php";
include $QR_BASEDIR."qrinput.php";
include $QR_BASEDIR."qrbitstream.php";
include $QR_BASEDIR."qrsplit.php";
include $QR_BASEDIR."qrrscode.php";
include $QR_BASEDIR."qrmask.php";
include $QR_BASEDIR."qrencode.php";
<?php
/*
* PHP QR Code encoder
*
* Reed-Solomon error correction support
*
* Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q
* (libfec is released under the GNU Lesser General Public License.)
*
* Based on libqrencode C library distributed under LGPL 2.1
* Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <[email protected]>
*
* PHP QR Code is distributed under LGPL 3
* Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class QRrsItem {
public $mm; // Bits per symbol
public $nn; // Symbols per block (= (1<<mm)-1)
public $alpha_to = array(); // log lookup table
public $index_of = array(); // Antilog lookup table
public $genpoly = array(); // Generator polynomial
public $nroots; // Number of generator roots = number of parity symbols
public $fcr; // First consecutive root, index form
public $prim; // Primitive element, index form
public $iprim; // prim-th root of 1, index form
public $pad; // Padding bytes in shortened block
public $gfpoly;
//----------------------------------------------------------------------
public function modnn($x)
{
while ($x >= $this->nn) {
$x -= $this->nn;
$x = ($x >> $this->mm) + ($x & $this->nn);
}
return $x;
}
//----------------------------------------------------------------------
public static function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad)
{
// Common code for intializing a Reed-Solomon control block (char or int symbols)
// Copyright 2004 Phil Karn, KA9Q
// May be used under the terms of the GNU Lesser General Public License (LGPL)
$rs = null;
// Check parameter ranges
if($symsize < 0 || $symsize > 8) return $rs;
if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs;
if($prim <= 0 || $prim >= (1<<$symsize)) return $rs;
if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values!
if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding
$rs = new QRrsItem();
$rs->mm = $symsize;
$rs->nn = (1<<$symsize)-1;
$rs->pad = $pad;
$rs->alpha_to = array_fill(0, $rs->nn+1, 0);
$rs->index_of = array_fill(0, $rs->nn+1, 0);
// PHP style macro replacement ;)
$NN =& $rs->nn;
$A0 =& $NN;
// Generate Galois field lookup tables
$rs->index_of[0] = $A0; // log(zero) = -inf
$rs->alpha_to[$A0] = 0; // alpha**-inf = 0
$sr = 1;
for($i=0; $i<$rs->nn; $i++) {
$rs->index_of[$sr] = $i;
$rs->alpha_to[$i] = $sr;
$sr <<= 1;
if($sr & (1<<$symsize)) {
$sr ^= $gfpoly;
}
$sr &= $rs->nn;
}
if($sr != 1){
// field generator polynomial is not primitive!
$rs = NULL;
return $rs;
}
/* Form RS code generator polynomial from its roots */
$rs->genpoly = array_fill(0, $nroots+1, 0);
$rs->fcr = $fcr;
$rs->prim = $prim;
$rs->nroots = $nroots;
$rs->gfpoly = $gfpoly;
/* Find prim-th root of 1, used in decoding */
for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn)
; // intentional empty-body loop!
$rs->iprim = (int)($iprim / $prim);
$rs->genpoly[0] = 1;
for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) {
$rs->genpoly[$i+1] = 1;
// Multiply rs->genpoly[] by @**(root + x)
for ($j = $i; $j > 0; $j--) {
if ($rs->genpoly[$j] != 0) {
$rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)];
} else {
$rs->genpoly[$j] = $rs->genpoly[$j-1];
}
}
// rs->genpoly[0] can never be zero
$rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)];
}
// convert rs->genpoly[] to index form for quicker encoding
for ($i = 0; $i <= $nroots; $i++)
$rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]];
return $rs;
}
//----------------------------------------------------------------------
public function encode_rs_char($data, &$parity)
{
$MM =& $this->mm;
$NN =& $this->nn;
$ALPHA_TO =& $this->alpha_to;
$INDEX_OF =& $this->index_of;
$GENPOLY =& $this->genpoly;
$NROOTS =& $this->nroots;
$FCR =& $this->fcr;
$PRIM =& $this->prim;
$IPRIM =& $this->iprim;
$PAD =& $this->pad;
$A0 =& $NN;
$parity = array_fill(0, $NROOTS, 0);
for($i=0; $i< ($NN-$NROOTS-$PAD); $i++) {
$feedback = $INDEX_OF[$data[$i] ^ $parity[0]];
if($feedback != $A0) {
// feedback term is non-zero
// This line is unnecessary when GENPOLY[NROOTS] is unity, as it must
// always be for the polynomials constructed by init_rs()
$feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback);
for($j=1;$j<$NROOTS;$j++) {
$parity[$j] ^= $ALPHA_TO[$this->modnn($feedback + $GENPOLY[$NROOTS-$j])];
}
}
// Shift
array_shift($parity);
if($feedback != $A0) {
array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]);
} else {
array_push($parity, 0);
}
}
}
}
//##########################################################################
class QRrs {
public static $items = array();
//----------------------------------------------------------------------
public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad)
{
foreach(self::$items as $rs) {
if($rs->pad != $pad) continue;
if($rs->nroots != $nroots) continue;
if($rs->mm != $symsize) continue;
if($rs->gfpoly != $gfpoly) continue;
if($rs->fcr != $fcr) continue;
if($rs->prim != $prim) continue;
return $rs;
}
$rs = QRrsItem::init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad);
array_unshift(self::$items, $rs);
return $rs;
}
}
\ No newline at end of file
<?php
/*
* PHP QR Code encoder
*
* Toolset, handy and debug utilites.
*
* PHP QR Code is distributed under LGPL 3
* Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class QRtools {
//----------------------------------------------------------------------
public static function binarize($frame)
{
$len = count($frame);
foreach ($frame as &$frameLine) {
for($i=0; $i<$len; $i++) {
$frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0';
}
}
return $frame;
}
//----------------------------------------------------------------------
public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037')
{
$barcode_array = array();
if (!is_array($mode))
$mode = explode(',', $mode);
$eccLevel = 'L';
if (count($mode) > 1) {
$eccLevel = $mode[1];
}
$qrTab = QRcode::text($code, false, $eccLevel);
$size = count($qrTab);
$barcode_array['num_rows'] = $size;
$barcode_array['num_cols'] = $size;
$barcode_array['bcode'] = array();
foreach ($qrTab as $line) {
$arrAdd = array();
foreach(str_split($line) as $char)
$arrAdd[] = ($char=='1')?1:0;
$barcode_array['bcode'][] = $arrAdd;
}
return $barcode_array;
}
//----------------------------------------------------------------------
public static function clearCache()
{
self::$frames = array();
}
//----------------------------------------------------------------------
public static function buildCache()
{
QRtools::markTime('before_build_cache');
$mask = new QRmask();
for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) {
$frame = QRspec::newFrame($a);
if (QR_IMAGE) {
$fileName = QR_CACHE_DIR.'frame_'.$a.'.png';
QRimage::png(self::binarize($frame), $fileName, 1, 0);
}
$width = count($frame);
$bitMask = array_fill(0, $width, array_fill(0, $width, 0));
for ($maskNo=0; $maskNo<8; $maskNo++)
$mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true);
}
QRtools::markTime('after_build_cache');
}
//----------------------------------------------------------------------
public static function log($outfile, $err)
{
if (QR_LOG_DIR !== false) {
if ($err != '') {
if ($outfile !== false) {
file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND);
} else {
file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND);
}
}
}
}
//----------------------------------------------------------------------
public static function dumpMask($frame)
{
$width = count($frame);
for($y=0;$y<$width;$y++) {
for($x=0;$x<$width;$x++) {
echo ord($frame[$y][$x]).',';
}
}
}
//----------------------------------------------------------------------
public static function markTime($markerId)
{
list($usec, $sec) = explode(" ", microtime());
$time = ((float)$usec + (float)$sec);
if (!isset($GLOBALS['qr_time_bench']))
$GLOBALS['qr_time_bench'] = array();
$GLOBALS['qr_time_bench'][$markerId] = $time;
}
//----------------------------------------------------------------------
public static function timeBenchmark()
{
self::markTime('finish');
$lastTime = 0;
$startTime = 0;
$p = 0;
echo '<table cellpadding="3" cellspacing="1">
<thead><tr style="border-bottom:1px solid silver"><td colspan="2" style="text-align:center">BENCHMARK</td></tr></thead>
<tbody>';
foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) {
if ($p > 0) {
echo '<tr><th style="text-align:right">till '.$markerId.': </th><td>'.number_format($thisTime-$lastTime, 6).'s</td></tr>';
} else {
$startTime = $thisTime;
}
$p++;
$lastTime = $thisTime;
}
echo '</tbody><tfoot>
<tr style="border-top:2px solid black"><th style="text-align:right">TOTAL: </th><td>'.number_format($lastTime-$startTime, 6).'s</td></tr>
</tfoot>
</table>';
}
}
//##########################################################################
QRtools::markTime('start');
\ 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
class Checker_model extends CI_Model {
public function _consruct(){
parent::_construct();
}
function get_checker() {
$query = $this->db->order_by("id","desc")->get('checker');
//echo $this->db->last_query();
$result = $query->result();
return $result;
}
function get_single_checker($id) {
$query = $this->db->where('id', $id);
$query = $this->db->get('checker');
$result = $query->row();
return $result;
}
function save_checker($data) {
$phone = $data['phone'];
$email = $data['email'];
$count =$this->db->query("SELECT * FROM `checker` WHERE `email` = '$email'")->num_rows();
if($count > 0) {
return "Exist";
}
else {
$result = $this->db->insert('checker', $data);
if($result) {
return "Success";
}
else {
return "Error";
}
}
}
}
<?php
class Dashboard_model extends CI_Model {
public function _consruct(){
parent::_construct();
}
function get_waiting_count() {
$menu = $this->session->userdata('admin');
if($menu!='1'){
$user = $this->session->userdata('id');
}
$this->db->where('active',0);
$this->db->where('status',0);
$this->db->from("users");
$result = $this->db->count_all_results();
return $result;
}
function get_check_in_count() {
$this->db->where('active',1);
$this->db->where('status',1);
$this->db->from("users");
$result = $this->db->count_all_results();
return $result;
}
function get_total_count() {
$this->db->where('active',1);
$this->db->from("users");
$result = $this->db->count_all_results();
return $result;
}
function get_cheker_count() {
$menu = $this->session->userdata('admin');
if($menu!='1'){
$user = $this->session->userdata('id');
}
$result = $this->db->count_all_results('checker');
return $result;
}
function get_new_user_registration() {
$this->db->select('u.id as user_id,u.name as user_name,u.phone as user_phone,u.email as user_email,u.address as user_address,u.note as user_note,c.checker_name,u.created_on,u.status,u.check_id')->order_by('u.created_on','desc');
$this->db->where('active',1);
$this->db->from('users as u');
$this->db->limit('10');
$this->db->join('checker as c', 'u.cheker_id = c.id','left');
$menu = $this->session->userdata('admin');
if($menu!='1'){
$user = $this->session->userdata('id');
}
$query = $this->db->get();
$result = $query->result();
return $result;
}
}
\ No newline at end of file
<?php
class Help_model extends CI_Model {
public function _consruct(){
parent::_construct();
}
function save_help($data) {
$name = $data['head'];
$this->db->where('head', $name);
$this->db->from('help_table');
$count = $this->db->count_all_results();
if($count > 0) {
return "Exist";
}
else {
$result = $this->db->insert('help_table', $data);
if($result) {
return "Success";
}
else {
return "Error";
}
}
}
function get_help() {
$query = $this->db->where('status', '1');
$query = $this->db->order_by("id","desc")->get('help_table');
$result = $query->result();
return $result;
}
function get_single_help($id) {
$query = $this->db->where('id', $id);
$query = $this->db->get('help_table');
$result = $query->row();
return $result;
}
function update_help($data, $id) {
$head = $data['head'];
$this->db->where("id !=",$id);
$this->db->where("(head = '$head')");
$query= $this->db->get('help_table');
if($query -> num_rows() >0 ) {
return "Exist";
}
else {
$this->db->where('id', $id);
$result = $this->db->update('help_table', $data);
return "Success";
}
}
function delete_help($id) {
$data = array(
'status' => '0'
);
$this->db->where('id', $id);
$result = $this->db->update('help_table',$data);
if($result) {
return "Success";
}
else {
return "Error";
}
}
}
<?php
class Login_model extends CI_Model {
public function _consruct(){
parent::_construct();
}
function login($username, $password) {
$this->db->where('username', $username);
$this->db->where('password', md5($password));
$query = $this->db->get('admin_users');
if ($query->num_rows()>0) {
return $query->row();
} else {
return false;
}
}
}
\ No newline at end of file
<?php
class Settings_model extends CI_Model {
public function _consruct(){
parent::_construct();
}
function settings_info($data){
$this->db->where('id',1);
$query = $this->db->update('settings',$data);
return $query;
}
function get_info(){
$this->db->select('settings.*');
$this->db->from('settings');
$query = $this->db->get();
$result = $query->row();
return $result;
}
}
<?php
class User_model extends CI_Model {
public function _consruct(){
parent::_construct();
}
function get_waiting() {
$this->db->select('u.id as user_id,u.name as user_name,u.phone as user_phone,u.email as user_email,u.address as user_address,u.note as user_note,c.checker_name,u.created_on,u.status')->where('u.status','1')->order_by('u.id','desc');
$this->db->from('users as u');
$this->db->limit('10');
$this->db->join('checker as c', 'u.cheker_id = c.id','left');
$this->db->group_by("u.id");
$menu = $this->session->userdata('admin');
if($menu!='1'){
$user = $this->session->userdata('id');
// $this->db->where('sd.created_user', $user);
}
$query = $this->db->get();
//echo $this->db->last_query();
$result = $query->result();
//echo json_encode($result);exit();
return $result;
}
function get_all_inviting_user() {
$this->db->select('u.id as user_id,u.name as user_name,u.phone as user_phone,u.email as user_email,u.address as user_address,u.note as user_note,c.checker_name,u.created_on,u.status,u.expiration_date')->where('u.status','0')->where('u.active','0')->order_by('u.id','desc');
$this->db->from('users as u');
$this->db->limit('10');
$this->db->join('checker as c', 'u.cheker_id = c.id','left');
$this->db->group_by("u.id");
$menu = $this->session->userdata('admin');
if($menu!='1'){
$user = $this->session->userdata('id');
// $this->db->where('sd.created_user', $user);
}
$query = $this->db->get();
//echo $this->db->last_query();
$result = $query->result();
//echo json_encode($result);exit();
return $result;
}
function get_check_in() {
$this->db->select('u.id as user_id,u.name as user_name,u.phone as user_phone,u.email as user_email,u.address as user_address,u.note as user_note,c.checker_name,u.created_on,u.status')->where('u.status','1')->where('u.active','1')->order_by('u.id','desc');
$this->db->from('users as u');
$this->db->limit('10');
$this->db->join('checker as c', 'u.cheker_id = c.id','left');
$this->db->group_by("u.id");
$menu = $this->session->userdata('admin');
if($menu!='1'){
$user = $this->session->userdata('id');
// $this->db->where('sd.created_user', $user);
}
$query = $this->db->get();
//echo $this->db->last_query();
$result = $query->result();
//print_r($result);
return $result;
}
function get_all_Users() {
$this->db->select('u.id as user_id,u.name as user_name,u.phone as user_phone,u.email as user_email,u.address as user_address,u.note as user_note,c.checker_name,u.created_on,u.status,u.expiration_date')->where('u.active!=','0')->order_by('u.id','desc');
$this->db->from('users as u');
$this->db->limit('10');
$this->db->join('checker as c', 'u.cheker_id = c.id','left');
$this->db->group_by("u.id");
$menu = $this->session->userdata('admin');
if($menu!='1'){
$user = $this->session->userdata('id');
}
$query = $this->db->get();
$result = $query->result();
return $result;
}
function get_single_all($id) {
$query = $this->db->where('id', $id);
$query = $this->db->get('users');
$result = $query->row();
return $result;
}
function add_random_string($data)
{
$qry =$this->db->insert_batch('users',$data);
return $qry;
}
function validate_user_email($email)
{
$query = "select * from users u where u.email = ? ";
$query=$this->db->query($query,array($email));
if($query->num_rows()>0)
{
return $query->row_array();
} else
{
return false;
}
}
function validate_user_phone($phone)
{
$query = "select * from users u where u.phone = ? ";
$query=$this->db->query($query,array($phone));
if($query->num_rows()>0)
{
return $query->row_array();
} else
{
return false;
}
}
function email_availability_check($email)
{
$query = "select * from users u where u.email = ? ";
$query=$this->db->query($query,array($email));
if($query->num_rows()>0)
{
return $query->row_array();
} else
{
return false;
}
}
function phone_availability_check($phone)
{
$query = "select * from users u where u.phone = ? ";
$query=$this->db->query($query,array($phone));
if($query->num_rows()>0)
{
return $query->row_array();
} else
{
return false;
}
}
function update_user_invitation($usrdata) {
$id=$usrdata['user_id'];
$udata['check_id']=$usrdata['check_id'];
$udata['qr_code']=$usrdata['qr_code'];
$udata['no_allowed_persons']=$usrdata['persons'];
$udata['expiration_date']=$usrdata['expiration_date'];
$this->db->where('id', $id);
$qry = $this->db->update('users', $udata);
if ($this->db->trans_status() === TRUE)
{
$this->db->select('u.id as user_id,u.name as user_name,u.phone as user_phone,u.email as user_email,u.address as user_address,u.note as user_note,c.checker_name,u.created_on,u.status,u.qr_code')->where('u.id',$id);
$this->db->from('users as u');
$this->db->join('checker as c', 'u.cheker_id = c.id','left');
$query = $this->db->get();
$result = $query->row_array();
return $result;
}else
{
$this->db->trans_rollback();
return false;
}
}
}
\ No newline at end of file
<?php
class Webservice_model extends CI_Model {
function __construct() {
parent::__construct();
}
function add_random_string($random, $uname)
{
$data = array('check_id' => $random,'email' => $uname);
$qry =$this->db->insert('users', $data);
return $qry;
}
// function validate_user($username,$type)
// {
// $query = "select * from users u where u.email = ? and u.user_type = ?";
// $query=$this->db->query($query,array($username,$type));
// if($query->num_rows()>0)
// {
// return $query->row_array();
// } else
// {
// return false;
// }
// }
}
?>
\ 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>
<style type="text/css">
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
/* display: none; <- Crashes Chrome on hover */
-webkit-appearance: none;
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}
</style>
<div class="row">
<div class="box col-md-12">
<div class="box-inner">
<div class="box-header well" data-original-title="">
<h2><i class="glyphicon glyphicon-plus"></i> <?php echo $page_title; ?></h2>
</div>
<div class="box-content">
<form role="form" method="post" class="validate" enctype="multipart/form-data">
<div class="form-group" style="width:820px;">
<label class="control-label" for="name">Name</label>
<input type="text" title="Only enter letters" id="name" name="checker_name" class="form-control required" placeholder=" Please Enter Person Name">
<div id="driver_name_req" style="color: red"></div>
</div>
<div class="form-group" style="width:820px;">
<label class="control-label" for="name">Phone</label>
<input type="number" id="phone" name="phone" pattern="[0-9]{5}[-][0-9]{7}[-][0-9]{1}[+]{1}" class="form-control required" placeholder=" Please Enter Phone Number">
<div id="phone_req" style="color: red"></div>
</div>
<div class="form-group" style="width:820px;">
<label class="control-label" for="email_id">Email</label>
<input type="email" id="email" name="email" class="form-control required" placeholder="Please Enter Email">
<div id="email_req" style="color: red"></div>
</div>
<!-- <div class="form-group" style="width:820px;">
<label class="control-label" for="name">Password</label>
<input type="password" id="password" name="password" class="form-control required" value="" placeholder="Enter Password">
<div id="password_req" style="color: red"></div>
</div> -->
<!-- <div class="form-group" style="width:820px;">
<label class="control-label" for="name">City</label>
<input type="text" id="city" name="city" class="form-control required" placeholder=" Please Enter City">
<div id="city_req" style="color: red"></div>
</div>
-->
<!-- <div class="form-group" style="width:820px;">
<label class="control-label" for="name">State</label>
<input type="text" id="state" name="state" class="form-control required" placeholder=" Please Enter State">
<div id="state_req" style="color: red"></div>
</div> -->
<!-- <div class="form-group" style="width:820px;">
<label class="control-label" for="description">Address</label>
<textarea name="address" id="address" placeholder="Please Enter Address" rows="3" class="form-control required"></textarea>
<div id="address_req" style="color: red"></div>
</div>
-->
<!-- <div class="form-group" style="width:820px;">
<label class="control-label" for="name">Post Code</label>
<input type="number" id="post_code" name="post_code" maxlength="10" class="form-control required" placeholder=" Please Enter Post Code">
<div id="post_code_req" style="color: red"></div>
</div> -->
<div class="form-group" style="width:820px;">
<label class="control-label" for="name">Appointed Location</label>
<input type="text" id="post_code" name="appointed_location" maxlength="10" class="form-control required" placeholder=" Please Enter Appointed Location">
<div id="post_code_req" style="color: red"></div>
</div>
<!-- <div class="form-group">
<label class="control-label" for="image">Image</label>
<input type="file" multiple name="image" id="image" class="required" class size="20" />
<div id="image_req" style="color: red"></div> </div> -->
<button type="submit" class="btn btn-custom new_driver_dtl"><i class="glyphicon glyphicon-plus"></i> Add Checker</button>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="box col-md-12">
<div class="box-inner">
<div class="box-header well" data-original-title="">
<h2>
<i class="glyphicon glyphicon-th">
</i> Checker Details
</h2>
</div>
<div class="box-content">
<dl>
<dt>
Checker:
<span style="font-weight: normal !important">
<?php echo $data->checker_name; ?>
</span>
</dt>
<br/>
<dt>
Phone Number:
<span style="font-weight: normal !important">
<?php echo $data->phone; ?>
</span>
</dt>
<br/>
<dt>
Email address:
<span style="font-weight: normal !important">
<?php echo $data->email; ?>
</span>
</dt>
<br/>
<!-- <dt>
Image
</dt>
<dd>
<ul class="thumbnails gallery">
<li class="thumbnail" data-id="<?php echo $data->image; ?>">
<a style="background:url(<?php echo $data->image; ?>) no-repeat; background-size:200px; width:190px; height:190px;"
href="<?php echo $data->image; ?>">
</a>
</li>
</ul>
</dd> -->
</dl>
</div>
</div>
</div>
</div>
<?php
if($this->session->flashdata('message')) {
$message = $this->session->flashdata('message');
?>
<div class="alert alert-<?php echo $message['class']; ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?php echo $message['message']; ?>
</div>
<?php
}
?>
<div class="row">
<div class="box col-md-12">
<div class="box-inner">
<div class="box-header well" data-original-title="">
<h2><i class="glyphicon glyphicon-eye-open"></i> <?php echo $page_title; ?></h2>
</div>
<div class="box-content">
<table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
<thead>
<tr>
<th >Id</th>
<th>Name</th>
<th>Email</th>
<th>Phone Number</th>
<th>Appointed Location</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
foreach($data as $key => $customer) {
$on_duty = get_color($customer->on_duty);
?>
<tr>
<td class="center"><?php echo $key+1 ?></td>
<td class="center"><?php echo $customer->checker_name; ?></td>
<td class="center"><?php echo $customer->email; ?></td>
<td class="center"><?php echo $customer->phone; ?></td>
<td class="center"><?php echo $customer->appointed_location; ?></td>
<td class="center"><span class="label label-<?php echo $on_duty; ?>"><?php echo get_ckrstatus($customer->on_duty); ?></span></td>
<td class="center">
<a class="btn btn-success btn-sm view-checker" href="javascript:void(0);" id="view-<?php echo $customer->id; ?>" data-status="<?php echo $customer->status; ?>" data-id="<?php echo $customer->id; ?>">
<i class="glyphicon glyphicon-zoom-in icon-white"></i>
View Details
</a>
</td>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<!--/span-->
</div>
<div class="modal modal-wide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3><center>View Checker</center></h3>
</div>
<div class="modal-body">
<p class="text-center"><img src="<?php echo base_url(); ?>assets/images/ajax-loader-4.gif" /></p>
</div>
<div class="modal-footer">
<a href="#" class="btn btn-default" data-dismiss="modal">Close</a>
</div>
</div>
</div>
</div>
\ No newline at end of file
<?php
if($this->session->flashdata('message')) {
$message = $this->session->flashdata('message');
?>
<div class="alert alert-<?php echo $message['class']; ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?php echo $message['message']; ?>
</div>
<?php
}
$menu = $this->session->userdata('admin');
?>
<div class=" row">
<div class="col-md-3 col-sm-3 col-xs-6">
<a data-toggle="tooltip" title="" class="well top-block" href="<?php base_url(); ?>Checker/view_checker">
<i class="glyphicon glyphicon-briefcase blue"></i>
<div>NO Checkers</div>
<div><?php echo $cheker; ?></div>
</a>
</div>
<?php
if($menu=='1'){
?>
<div class="col-md-3 col-sm-3 col-xs-6">
<a data-toggle="tooltip" title="" class="well top-block" href="<?php base_url(); ?>Users/view_allusers">
<i class="glyphicon glyphicon-user green"></i>
<div>Registered Users</div>
<div><?php echo $total; ?></div>
</a>
</div>
<div class="col-md-3 col-sm-3 col-xs-6">
<a data-toggle="tooltip" title="" class="well top-block" href="<?php base_url(); ?>Users/view_all_inviting_user">
<i class="glyphicon glyphicon-user yellow"></i>
<div>Waiting New Users</div>
<div><?php echo $waiting; ?></div>
</a>
</div>
<?php
}
?>
<div class="col-md-3 col-sm-3 col-xs-6">
<a data-toggle="tooltip" title="" class="well top-block" href="<?php base_url(); ?>Users/view_check_in">
<i class="glyphicon glyphicon-book red"></i>
<div>Check-In Users</div>
<div><?php echo $check_in; ?></div>
</a>
</div>
</div>
<div class="row">
<div class="box col-md-12">
<div class="box-inner">
<div class="box-header well" data-original-title="">
<h2>New User Registrations</h2>
<div class="box-icon">
<a href="#" class="btn btn-setting btn-round btn-default"><i
class="glyphicon glyphicon-cog"></i></a>
<a href="#" class="btn btn-minimize btn-round btn-default"><i
class="glyphicon glyphicon-chevron-up"></i></a>
<a href="#" class="btn btn-close btn-round btn-default"><i
class="glyphicon glyphicon-remove"></i></a>
</div>
</div>
<div class="box-content">
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>No</th>
<th>User Name</th>
<th>Email</th>
<th>Phone</th>
<th>Date</th>
<!-- <th>Status</th> -->
</tr>
</thead>
<tbody>
<?php foreach($appointment as $key => $ride) {?>
<tr>
<td><?php echo $key+1 ?></td>
<td><?php echo $ride->user_name?></td>
<td class="center"><?php echo $ride->user_email?></td>
<td class="center"><?php echo $ride->user_phone?></td>
<td class="center"><?php echo $ride->created_on?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
\ No newline at end of file
<?php
if($this->session->flashdata('message')) {
$message = $this->session->flashdata('message');
?>
<div class="alert alert-<?php echo $message['class']; ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?php echo $message['message']; ?>
</div>
<?php
}
?>
<div class="row">
<div class="box col-md-12">
<div class="box-inner">
<div class="box-header well" data-original-title="">
<h2><i class="glyphicon glyphicon-eye-open"></i> <?php echo $page_title; ?></h2>
</div>
<div class="box-content">
<table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
<thead>
<tr>
<th>Customer Name</th>
<th>Booking ID</th>
<th>Driver Name</th>
<th>Source</th>
<th>Destination</th>
<th>Car Type</th>
<th>Booking Date</th>
</tr>
</thead>
<tbody>
<?php
foreach($data as $running) {
?>
<tr>
<td class="center"><?php echo $running->name; ?></td>
<td class="center"><?php echo $running->booking_id; ?></td>
<td class="center"><?php echo $running->driver_name; ?></td>
<td class="center"><?php echo $running->source; ?></td>
<td class="center"><?php echo $running->destination; ?></td>
<td class="center"><?php echo get_carname($running->car_type); ?></td>
<!-- <td class="center"><?php echo date("d-M-Y", strtotime($running->book_date)).", ".$running->time; ?></td> -->
<td class="center"><?php if($running->book_date!='') echo date("d-M-Y",$running->book_date); ?></td>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
<!--/span-->
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3><center>View Running Rides</center></h3>
</div>
<div class="modal-body">
<p class="text-center"><img src="<?php echo base_url(); ?>assets/images/ajax-loader-4.gif" /></p>
</div>
<div class="modal-footer">
<a href="#" class="btn btn-default" data-dismiss="modal">Close</a>
</div>
</div>
</div>
</div>
\ No newline at end of file
<script src="//tinymce.cachefly.net/4.2/tinymce.min.js"></script>
<script>tinymce.init({selector:'textarea'});</script>
<div class="row">
<div class="box col-md-12">
<div class="box-inner">
<div class="box-header well" data-original-title="">
<h2><i class="glyphicon glyphicon-plus"></i> <?php echo $page_title; ?></h2>
</div>
<div class="box-content">
<form role="form" method="post" class="validate" enctype="multipart/form-data">
<div class="form-group">
<label class="control-label" for="name">Heading</label>
<input type="text" name="head" class="form-control required" placeholder="Please Enter The Heading">
</div>
<div class="form-group">
<label class="control-label" for="description">Content</label>
<textarea name="content" placeholder="Description" rows="3" class="form-control required"></textarea>
</div>
<!--
<div class="form-group">
<label class="control-label" for="image">Icon</label>
<input type="file" multiple name="image" class="required" size="20" />
</div> -->
<div class="form-group">
<label class="control-label" for="image">Image</label>
<input type="file" multiple name="image" id="image" class="required" class size="20" />
<div id="image_req" style="color: red"></div>
</div>
<!-- <div class="form-group">
<label class="control-label" for="image">Icon</label>
<input type="file" multiple name="image" id="image" class="required"class size="20" />
<div id="image_req" style="color: red"></div>
</div>
-->
<button type="submit" class="btn btn-custom new_driver"><i class="glyphicon glyphicon-plus"></i> Add Help</button>
</form>
</div>
</div>
</div>
<!--/span-->
</div><!--/row-->
<script src="//tinymce.cachefly.net/4.2/tinymce.min.js"></script>
<script>tinymce.init({selector:'textarea'});</script>
<div class="row">
<div class="box col-md-12">
<div class="box-inner">
<div class="box-header well" data-original-title="">
<h2><i class="glyphicon glyphicon-edit"></i> <?php echo $page_title; ?></h2>
</div>
<div class="box-content">
<form role="form" method="post" class="validate" enctype="multipart/form-data">
<div class="form-group">
<label class="control-label" for="name">Heading</label>
<input type="text" name="head" value="<?php echo $data->head; ?>" class="form-control required" placeholder="Please Enter The Heading">
</div>
<div class="form-group">
<label class="control-label" for="description">Content</label>
<textarea name="content" placeholder="Description" rows="3" class="form-control required"><?php echo $data->content; ?></textarea>
</div>
<div class="form-group">
<label class="control-label" for="profile_pic">Icon</label>
<div class="form-control ">
<input type="file" name="image" class="" size="20" />
</div>
<div>
<!-- <img src="<?php echo $data->image; ?>" width="100px;" height="100px" /> -->
<img src="<?php echo base_url($data->image); ?>" width="100px;" height="100px" style="border:1px solid #000" />
</div>
</div>
<button type="submit" class="btn btn-custom"><i class="glyphicon glyphicon-plus"></i> Update Help</button>
</form>
</div>
</div>
</div>
<!--/span-->
</div><!--/row-->
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
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 to comment