Example #1
0
/*
	[Destoon B2B System] Copyright (c) 2008-2013 Destoon.COM
	This is NOT a freeware, use is subject to license.txt
*/
defined('IN_DESTOON') or exit('Access Denied');
$menus = array(array('问题验证', '?file=' . $file));
$do = new question();
if ($submit) {
    $do->update($post);
    dmsg('更新成功', '?file=' . $file);
} else {
    $condition = "1";
    if ($kw) {
        $condition .= " AND (question LIKE '%{$keyword}%' OR answer LIKE '%{$keyword}%')";
    }
    $lists = $do->get_list($condition);
    include tpl('question');
}
class question
{
    var $db;
    var $table;
    function question()
    {
        global $db, $DT_PRE;
        $this->table = $DT_PRE . 'question';
        $this->db =& $db;
    }
    function get_list($condition)
    {
        global $pages, $page, $pagesize, $offset, $pagesize;