require 'libs/Smarty.class.php'; include "base_config.php"; $msql = new phpMysql_h(); $tool = new tools_h(); //--- 所屬功能 if ($id) { $sqlWhere = " WHERE id=" . $id; $row = loaddata_row("article", $sqlWhere); if ($row) { $sql = "UPDATE `article` SET views=views+1 WHERE id=" . $row['id']; $msql->init(); $msql->query($sql); } else { // echo "<script>alert('請指定菜單');</script>"; $tool->showmessage('無此文章!'); $tool->goBack(); exit; } } else { // echo "<script>alert('請指定菜單');</script>"; $tool->showmessage('無此文章!'); $tool->goBack(); exit; } if (isset($row)) { $data = $row; $data['type_name'] = $article_categ_disc[$data['typeid']]; if ($data['photo'] != "") { $data['photo_src'] = "upload/article/" . $data['photo']; } if ($data['date'] != "") {