setTable("cms_admin_data"); $a_variable = "*"; $query->addColumn($a_variable); //$query->setWhere("companion_id"); $query->setWhere("admin_id"); /* setOrderBy(), setGroupBy(), setHaving() */ $query->setOrderBy("admin_id DESC LIMIT 1"); $sql_query = $query->buildQuery(); $result = $dbconnect->fetch($sql_query); if(!get_magic_quotes_gpc()){ $result2 = stripslashes_deep($result); }else{ $result2 = $result; } $smarty->assign("shop", $result2 ); //******************************************************************* $cookie_val = explode("\t", $_COOKIE['c_cms_db_login']); //print_r($cookie_val); $smarty->assign("ck_id", $cookie_val[0]); $smarty->assign("ck_passwd", $cookie_val[1]); $smarty->assign("today_lag_date", lag_date(LAG_HOUR) ); $smarty->assign("url_back", $_SERVER[HTTP_REFERER]); $smarty->display(basename($_SERVER['SCRIPT_NAME'],".html").".tpl"); ?>