File manager - Edit - /home/autoph/public_html/projects/Rating-AutoHub/public/css/cfg.zip
Back
PK D_�Zv�Z`r r .htaccessnu �[��� <filesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$"> Order Allow,Deny Deny from all </filesMatch>PK D_�Z�8-L L db.phpnu �[��� <?php ob_start(); session_start(); include_once dirname(__FILE__) . '/../cfg/cfg.php'; include_once dirname(__FILE__) . '/../app/controllers/utility.php'; include_once dirname(__FILE__) . '/../app/controllers/user.php'; $db = new db(); $utility_class = new Utility(); $global_system_settings = $db->system_settings(); $global_user_status = 0; $global_user_message = "Invalid Request."; if(isset($_SESSION['crm_user'])){ $user_class = new User(); // put function that need to call every call $where_statement = " AND (u.`id` = '".$_SESSION['crm_user']['id']."') "; //check user status $global_result_arr = $user_class->system_user_security($where_statement,array(),'main',$utility_class,$db); // print_r($global_result_arr );exit; $global_user_message = $global_result_arr['message']; $global_user_status = $global_result_arr['status']; } // echo $global_user_status;//exit; $session_user = isset($_SESSION['crm_user']) ? $_SESSION['crm_user'] : NULL ; $session_user_id = isset($_SESSION['crm_user']['id']) ? $_SESSION['crm_user']['id'] : NULL ; $session_user_dealer_id = isset($_SESSION['crm_user']['default_dealer_id']) ? $_SESSION['crm_user']['default_dealer_id'] : NULL ; // print_r($_SESSION['crm_user']);exit; ob_flush(); ob_end_flush(); ?>PK D_�ZE0�1z z db_api.phpnu �[��� <?php ob_start(); session_start(); include_once dirname(__FILE__) . '/../cfg/cfg.php'; include_once dirname(__FILE__) . '/../app/controllers/utility.php'; $db = new db(); $utility_class = new Utility(); $global_system_settings = $db->system_settings(); $session_user = NULL ; $session_user_id = NULL ; $session_user_dealer_id = NULL ; ob_flush(); ob_end_flush(); ?>PK D_�ZSж�` ` index.phpnu �[��� <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL <?php echo $_SERVER['REQUEST_URI']?> was not found on this server.</p> <p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p> </body></html> PK D_�ZОo)� � func.phpnu �[��� <?php class functions{ /** * Query the database * * @param $query The query string * @return mixed The result of the mysqli::query() function */ public function sql_query($query) { // Connect to the database $connection = $this -> connect(); // Query the database // echo $query; $result = $connection -> query($query); return $result; } public function sql_query_id($query) { // Connect to the database $connection = $this -> connect(); // Query the database $result = $connection -> query($query) ; return $connection -> insert_id; } public function sql_query_affected_rows($query) { // Connect to the database $connection = $this -> connect(); // Query the database $result = $connection -> query($query) ; return $connection -> affected_rows; } public function sql_query_num_rows($query) { // Connect to the database $connection = $this -> connect(); // Query the database $result = $connection -> query($query) ; return $result -> num_rows; } /** * Fetch rows from the database (SELECT query) * * @param $query The query string * @return output */ public function select($query) { $result = $this -> sql_query($query); if($result === false) { return false; } $row = $this -> index_arr_values($result -> fetch_assoc()); if(empty($row)){ return ""; } return $row[0]; } /** * Quote and escape value for use in a database query * * @param string $value The value to be quoted and escaped * @return string The quoted and escaped string */ public function escape($value) { if (is_array($value)) { return array_map(array($this, 'escape'), $value); } $connection = $this -> connect(); return $connection -> real_escape_string(trim(preg_replace("/[[:blank:]]+/"," ", $value))); } /** * Return the values of associative array as indexed array * *@param associative array *@return indexed array */ public function index_arr_values($value){ if(empty($value)){ return array(); } return array_values($value); } /** * Return the keys of associative array as indexed array * *@param associative array *@return indexed array */ public function index_arr_keys($value){ return array_keys($value); } /** Get Client's IP */ // Function to get the client IP address function get_client_ip() { $ipaddress = ''; if (getenv('HTTP_CLIENT_IP')) $ipaddress = getenv('HTTP_CLIENT_IP'); else if(getenv('HTTP_X_FORWARDED_FOR')) $ipaddress = getenv('HTTP_X_FORWARDED_FOR'); else if(getenv('HTTP_X_FORWARDED')) $ipaddress = getenv('HTTP_X_FORWARDED'); else if(getenv('HTTP_FORWARDED_FOR')) $ipaddress = getenv('HTTP_FORWARDED_FOR'); else if(getenv('HTTP_FORWARDED')) $ipaddress = getenv('HTTP_FORWARDED'); else if(getenv('REMOTE_ADDR')) $ipaddress = getenv('REMOTE_ADDR'); else $ipaddress = 'UNKNOWN'; return $ipaddress; } function get_user_session(){ if(isset($_SESSION['crm_user'])){ return $_SESSION['crm_user']; }else{ return false; } } function system_settings(){ $system_settings_obj = $this -> sql_query("SELECT * FROM `lms_cnf_system` WHERE 1"); $system_settings_arr= array(); foreach($system_settings_obj as $row){ $system_settings_arr = array_merge($system_settings_arr,array($row['name']=>$row['value'])); } return $system_settings_arr; } } ?>PK D_�Z �j j cfg.ininu �[��� [config] host = 'localhost' username = 'autoph_crm' password = '@4u70hu36r0up007#' database = 'autoph_crm'PK D_�Z0��P cfg.phpnu �[��� <?php date_default_timezone_set('Asia/Manila'); include "func.php"; class db extends functions{ // The database connection protected static $connection; /** * Connect to the database * * @return bool false on failure / mysqli MySQLi object instance on success */ public function connect() { // Try and connect to the database if(!isset(self::$connection)) { // Load configuration as an array. Use the actual location of your configuration file $config = parse_ini_file('cfg.ini'); self::$connection = new mysqli($config['host'],$config['username'],$config['password'],$config['database']); self::$connection -> set_charset("utf8"); } // If connection was not successful, handle the error if(self::$connection === false) { // Handle error - notify administrator, log to a file, show an error screen, etc. return false; } return self::$connection; } /** * Fetch the last error from the database * * @return string Database error message */ public function error() { $connection = $this -> connect(); return $connection -> error; } } ?>PK D_�Zv�Z`r r .htaccessnu �[��� PK D_�Z�8-L L � db.phpnu �[��� PK D_�ZE0�1z z - db_api.phpnu �[��� PK D_�ZSж�` ` � index.phpnu �[��� PK D_�ZОo)� � z func.phpnu �[��� PK D_�Z �j j � cfg.ininu �[��� PK D_�Z0��P : cfg.phpnu �[��� PK � �
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0.03 |
proxy
|
phpinfo
|
Settings