Please delete setup directory, to safeguard your site from anyone else trying to run setup on your site'); /********************* Default initialization starts *********************/ define('VIS_START_TIME', microtime(true)); define('_VIS_', 'Vision Helpdesk'); if(isset($request_data['vis_action']))define('VIS_ACTIONS', $request_data['vis_action']); if(!isset($_GET['vis_module'])){$_GET['vis_module']='';} $_GET['vis_module'] = str_replace('.','',$_GET['vis_module']); $_GET['vis_module'] = str_replace('%2F','',$_GET['vis_module']); $_GET['vis_module'] = str_replace('/','',$_GET['vis_module']); $_GET['vis_module'] = str_replace('%2E','',$_GET['vis_module']); $_GET['vis_module'] = str_replace('%00','',$_GET['vis_module']); if(!include_once('environment.php')) throw new Exception('Error: File environment.php not found'); if(!include_once('global.php')) throw new Exception('Error: File global.php not found'); if(!include_once(VIS_PATH_INCLUDE.'database.php')) throw new Exception('Error: File database.php not found in '.VIS_PATH_INCLUDE); if(!include_once(VIS_PATH_INCLUDE.'operation.php')) throw new Exception('Error: File operation.php not found in '.VIS_PATH_INCLUDE); $operation_hnd=new operation(); if(!include_once(VIS_PATH_INCLUDE.'constants.php')) throw new Exception('Error: File constants.php not found in '.VIS_PATH_INCLUDE); if(VIS_LOCATION_AREA==1){ //if(strpos($_SERVER['REQUEST_URI'],'language')==true){header('Location: https://'.$_SERVER['HTTP_HOST'].'/index.php?/home/login/'); exit;} $url_script_check = "https://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; $val_script = htmlspecialchars( $url_script_check, ENT_QUOTES, 'UTF-8' ); //if(strpos(trim($val_script), 'script') !== false){ // include(VIS_PATH_TEMPLATE.'access_denied.php'); // echo "NO DATA FOUND"; // exit; //} } if(defined('IS_WHMCS')) $request_data['vis_action'] = VIS_ACTIONS; /********************* Default initialization ends *********************/ if(file_exists(VIS_PATH_INCLUDE.'datavalidation.php')){if(!include_once(VIS_PATH_INCLUDE.'datavalidation.php')) throw new Exception('Error: File datavalidation.php not found in '.VIS_PATH_INCLUDE);} $actionArr = explode('/',VIS_OPERATION_NAME); if(in_array($urlAction, $operationArray))$request_data[VIS_OPERATION_NAME]=''; //$operation=$operation_hnd->check_operation(); //// mobileapp otp if(isset($request_data['mobileapp']) && $request_data['mobileapp']==1){ if(isset($request_data['clientapp'])){ if($request_data['vis_operation'] && ($request_data['vis_operation']=='check_login' && $request_data['clientapp']=='1')){ $request_data['vis_password'] =$operation['vis_password']= password_decrypt($request_data['vis_password'],VIS_PASSWORD_KEY); } } } $request_datavis_action=str_replace("/?attachment/",'#attachment/',trim($_SERVER['REQUEST_URI'])); $request_datavis_action=str_replace("/index.php?attachment/",'#attachment/',$request_datavis_action); if(isset($request_datavis_action) && (strpos($request_datavis_action,'#attachment/')!==false)){ $operation['vis_module']='export'; $operation['vis_operation']='attachment_export'; $operation['vis_action']=$request_datavis_action; $vis_manual_set=false; }else if(isset($_GET['vis_email']) && $_GET['vis_email']!='' && isset($_GET['vis_salt']) && $_GET['vis_salt']!=''){ if((!isset($request_data['vis_operation']) || $request_data['vis_operation']!='check_mail_auth') && (!isset($_GET['vis_chksq']) || $_GET['vis_chksq']=='')){ $request_data['vis_module']='client'; $request_data['vis_operation']='auto_login_validation'; $request_data['vis_action']=$_GET; unset($request_data['vis_email']); unset($request_data['vis_salt']); $operation=$operation_hnd->check_operation(); } else{ $extract=base64_decode(trim($_GET['vis_chksq'])); $exract1=explode('v&v',$extract); if($_GET['vis_email']!=$exract1[0]){ return false; } $operation=$operation_hnd->check_operation(); } }else{ $operation=$operation_hnd->check_operation(); } //print_r($request_data); if(isset($operation['vis_static_area']) && $operation['vis_static_area']=='editor_file_upload'){ return false;} if(!$operation) throw new Exception('Error: Invalid operation on index file'); $operation=(isset($operation) && $operation!=-1)?$operation:''; $operation_str = is_array($operation)?implode('--', $operation):$operation; if(!$operation_hnd->execute_operation($operation)) throw new Exception('Error: Opertion aborted ('.$operation_hnd->error.'): '. $operation_str); } /********************* Exception handling starts *********************/ catch(Exception $exception) { } /********************* Exception handling ends *********************/ ?>