array( "title"=>"Failed Connection", "message"=>"There was an error on connecting to account's database. If the problem continues please contact the system administrator", "code"=>"A001:DBFAIL", "icon"=>"database", "hidden"=>print_r(sqlsrv_errors(),true) ), "acc_notfou"=>array( "title"=>"Not Existing Account", "message"=>"No account were found. Check if you misspelled the URL and try again.", "code"=>"A003:NOTFOUND", "icon"=>"unlink", "hidden"=>"" ), "acc_deact"=>array( "title"=>"Account under maintenance", "message"=>"This account has been deactivated by the system administrator. This could be due to system maintenance. Please try again later or contact the system administrator.", "code"=>"A004:DEACT", "icon"=>"cogs", "hidden"=>"" ), "acc_expir"=>array( "title"=>"Account Expired", "message"=>"This account has been expired. Please contact the system administrator in order to activate the subscription.", "code"=>"A005:EXP", "icon"=>"calendar", "hidden"=>"" ), "acc_nread"=>array( "title"=>"Account under maintenance", "message"=>"This account has been deactivated by the system administrator. This could be due to system maintenance. Please try again later or contact the system administrator.", "code"=>"A006:BUILD", "icon"=>"cogs", "hidden"=>"" ), "acc_offline"=>array( "title"=>"Account under maintenance", "message"=>"This account has been deactivated by the system administrator. This could be due to system maintenance. Please try again later or contact the system administrator.", "code"=>"A007:SYSOFF", "icon"=>"cogs", "hidden"=>"" ), ); $template = "softloop/templates/offline.html"; if(!file_exists($template)) { echo "

{$errors[$error_alias]["title"]}

{$errors[$error_alias]["message"]}

ERRORCODE: {$errors[$error_alias]["code"]}
"; return false; } $html = file_get_contents($template); foreach ($errors[$error_alias] as $key => $value) { $html = str_replace("{{".$key."}}", $value, $html); } echo $html; die(); } function _init_database_settings($customer_alias){ include( APPPATH . "config/database.php"); $db_config = $db[$active_group]; // print_r($db_config); // die(); $connection = array( 'UID' => $db_config["username"], 'PWD' => $db_config["password"], 'Database' => str_replace("CUST_DATABASE", "", $db_config["database"]) ); if(!$conn_id = sqlsrv_connect($db_config["hostname"], $connection)) { _lowlvl_error("db_conn"); } $sql = " select Customers.* from Customers where Customers.customer_alias = '{$customer_alias}' "; $rid = sqlsrv_query($conn_id, $sql); if(!sqlsrv_has_rows($rid)) { _lowlvl_error("acc_notfou"); } $customer = sqlsrv_fetch_object($rid); if($customer->is_deleted){ _lowlvl_error("acc_notfou"); } if(!$customer->is_installed || !$customer->is_binded){ _lowlvl_error("acc_nread"); } if(!$customer->is_active){ _lowlvl_error("acc_deact"); } if($customer->subscription_end->format("Y-m-d")subscription_start->format("Y-m-d")>date("Y-m-d")){ _lowlvl_error("acc_nread"); } define("CUST_ALIAS",$customer_alias); define("CUST_DATABASE","_{$customer_alias}"); } function _init_admin($customer_alias=FALSE){ define("ROUTE", "admin"); //_init_database_settings($customer_alias); } function _init_landing($customer_alias=FALSE){ define("ROUTE", "landing"); //_init_database_settings($customer_alias); } $domain = explode(".",$_SERVER['HTTP_HOST']); $domainprefix = @array_shift($domain); switch ($domainprefix) { case 'admin': _init_admin(); break; default: _init_landing(); break; } Server Error
500

Oops! Something went wrong.

We are fixing it!
Please come back in a while.

Unable to determine what should be displayed. A default route has not been specified in the routing file.