-
pageNav(); ?>
getPrefix() . 'postrating'; $options = Typecho_Widget::widget('Widget_Options'); $contents = Typecho_Widget::widget('Widget_Abstract_Contents'); $hash = substr(md5(Typecho_Widget::widget('Widget_User')->authCode), -10); // 安全密鑰, 別人無法得知此數值 // 勾選式刪除 if (isset($_POST['hash']) && $_POST['hash'] == $hash) { // 單篇選擇 if (isset($_POST['created'])) { $created = $_POST['created']; $select = $db->delete('table.postrating'); foreach($created as $row) { $select->orWhere('created = ?', $row); } $db->query($select); // 總覽選擇 } elseif (isset($_POST['cid'])) { $cid = $_POST['cid']; $select = $db->delete('table.postrating'); foreach($cid as $row) { $select->orWhere('cid = ?', $row); } $db->query($select); } } if (isset($_GET['cid'])) { // 取得單篇文章 $result = $contents->push($db->fetchRow($contents->select()->where('table.contents.cid = ?', $_GET['cid']))); // 取得單篇文章的評分 $query = $db->fetchAll($db->select()->from('table.postrating')->where('cid = ?', $_GET['cid'])->order('created', Typecho_Db::SORT_DESC)); } ?>