?
Path : /home/admin/public_html/old/promice/ |
Current File : /home/admin/public_html/old/promice/food_detail.php |
<?php session_start(); header('Expires: Thu, 01 Jan 1970 00:00:00 GMT, -1'); header('Cache-Control: no-cache, no-store, must-revalidate'); header('Pragma: no-cache'); $root_path="./"; include($root_path."header.php"); $db_tm = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false); $template = new Template($tpl_path); $update=$db_tm->sql_query("UPDATE `food` SET `count`=`count`+1 WHERE (`id`='".$id."') "); $result=$db_tm->sql_query("SET NAMES utf8"); $result=$db_tm->sql_query("SELECT * FROM food where id='".$id."' "); $rows=$db_tm->sql_fetchrow($result); $template->set_filenames(array('body'=>"food_detail.html")); $template->assign_vars(array( "CUR_HOST"=>$cur_host, "TITLE"=>$title, "STYLE"=>STYLE, "id"=>$rows["id"], "subject"=>$rows["subject"], "images"=>'<img src="images/images_food/'.$rows["images"].'">', "date"=>$rows["date"], "detail"=>$rows["detail"], "count"=>number_format($rows["count"]), )); $template->pparse('body'); ?>