assign('captcha_login',$_SESSION['captcha_login']['image_src']);
if (isset($_SESSION['login_error_msg']) && $_SESSION['login_error_msg'] != '') {
$arr_msg[0] = $_SESSION['login_error_msg'];
$g['objTpl']->assign('login_message',["type" => 'error',"message" => $arr_msg ]);
}
unset($_SESSION['login_error_msg']);
} else if (isset($_SESSION['login']) && $_SESSION['login']) {
$g['objTpl']->assign('user_info',[$_SESSION['name'],$_SESSION['family'],$_SESSION['uname']]);
}
try {
$master_page_obj = new master_page();
switch ($g['ctrl']) {
case 'index' :
$home_obj = new home();
break;
case 'page':
$static_page = new static_page();
break;
case 'industry':
$static_page = new industry();
break;
case 'product':
$static_page = new product();
break;
case 'chart':
$static_page = new chart();
break;
case 'company':
$static_page =new company();
break;
case 'feedback':
$feedback_obj = new feedback();
break;
case 'certificate':
$certificate_obj = new certificate();
break;
case 'contact':
$contact_us_obj = new contact_us();
break;
case 'download':
$download_obj = new download();
break;
}
$g['objTpl']->display('index.tpl');
}
catch (Exception $e)
{
if ($e->getMessage() == 'redirect')
{
header("location: no_access.html");
exit();
}
echo $e->getMessage(), "\n";
}
$time_end = microtime(true);
// dividing with 60 will give the execution time in minutes other wise seconds
$execution_time = ($time_end - $time_start);
echo "";