<?php
require_once("lib/inc.php");
require_once("lib/security.php");
$smarty = new Smarty;
$smarty->compile_check = true;
$smarty->debugging = false;
// Date & Time to be dispalyed on the header
$date_time = date("h:i:s A")." ".date("d-m-Y");
$smarty->assign('date_time',$date_time);
// Done
$mes = "";
$num = "";
$status = $_SESSION['status'];
//echo $status;
$user_id = $_SESSION['user_id'];
$smarty->assign('user_id',$user_id);
$row = $database->get_from_database("select * from asset_users where user_id='$user_id'");
$name = $row['full_name'];
$rw = $database->get_from_database("select * from asset_users where user_id='$_SESSION[user_id]'");
$last_login = $rw['last_login'];
$last_logout = $rw['last_logout'];
$smarty->assign('last_login',$last_login);
$smarty->assign('last_logout',$last_logout);
$title ="::: Theme :::";
$smarty->assign('title',$title);
if($status==1)
{
if(isset($_GET['act']))
{
if($_GET['act']=="suc")
{
//$mes = "Theme is Successfully Changed !";
echo "<meta http-equiv='refresh' content='0;URL=ch_theme.php'>";
}
}
$num="valid";
}
else
{
$num = "invalid";
$mes = "Sorry ! You have no such Privillage ...";
$smarty->assign('mes',$mes);
}
//echo $num;
$smarty->assign('num',$num);
$col_array = $color_array->get_color_value();
//echo sizeof($col_array);
$smarty->assign('col_array',$col_array);
$smarty->assign('name',$name);
$smarty->assign('status',$status);
$smarty->display('ch_theme.tpl');
?>