コード例 #1
0
ファイル: guestbook.inc.php プロジェクト: hcd2008/destoon
    case 'edit':
        $itemid or msg();
        $do->itemid = $itemid;
        if ($submit) {
            if ($do->pass($post)) {
                $do->edit($post);
                dmsg('修改成功', $forward);
            } else {
                msg($do->errmsg);
            }
        } else {
            extract($do->get_one());
            $addtime = timetodate($addtime);
            include tpl('guestbook_edit', $module);
        }
        break;
    case 'check':
        $itemid or msg('请选择留言');
        $do->check($itemid, $status);
        dmsg('设置成功', $forward);
        break;
    case 'delete':
        $itemid or msg('请选择留言');
        $do->delete($itemid);
        dmsg('删除成功', $forward);
        break;
    default:
        $lists = $do->get_list($condition, $dorder[$order]);
        include tpl('guestbook', $module);
        break;
}
コード例 #2
0
ファイル: guestbook.inc.php プロジェクト: hiproz/zhaotaoci.cc
        $post['areaid'] = $cityid;
        $do->add($post);
        message($L['gbook_success'], $EXT['guestbook_url']);
    } else {
        message($do->errmsg);
    }
} else {
    $type = '';
    $condition = "status=3 AND reply<>''";
    if ($keyword) {
        $condition .= " AND content LIKE '%{$keyword}%'";
    }
    if ($cityid) {
        $condition .= $AREA[$cityid]['child'] ? " AND areaid IN (" . $AREA[$cityid]['arrchildid'] . ")" : " AND areaid={$cityid}";
    }
    $lists = $do->get_list($condition);
    $head_title = $L['gbook_title'];
    $content = isset($content) ? dhtmlspecialchars(stripslashes($content)) : '';
    $truename = $telephone = $email = $qq = $msn = $ali = $skype = '';
    if ($_userid) {
        $user = userinfo($_username);
        $truename = $user['truename'];
        $telephone = $user['telephone'] ? $user['telephone'] : $user['mobile'];
        $email = $user['mail'] ? $user['mail'] : $user['email'];
        $qq = $user['qq'];
        $msn = $user['msn'];
        $ali = $user['ali'];
        $skype = $user['skype'];
    }
    include template('guestbook', $module);
}