Example #1
0
**/
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
if (empty($_G['uid'])) {
    showmessage($_lang['login'], '', array(), array('login' => true));
}
$goods_id = intval($_GET['goods_id']);
$op = !empty($_GET['op']) ? addslashes($_GET['op']) : 'post';
$uid = $_G['uid'];
$goods = fetch_all('gongqiu_goods', " WHERE goods_id='{$goods_id}'");
$goods = $goods[0];
$goods['goods_text'] = stripslashes($goods['goods_text']);
$cat = fetch_all("gongqiu_cat", " WHERE cat_status='1' ORDER BY cat_sort DESC ");
if ($op == 'edit') {
    if ($goods['member_uid'] != $_G['uid'] && !is_gongqiu_admin()) {
        showmessage($_lang['no_quanxian']);
    } else {
        $uid = $goods['member_uid'];
    }
}
$member = fetch_all('gongqiu_member', " WHERE member_uid='{$uid}'");
$member = $member[0];
$my_credit = fetch_all("common_member_count", " WHERE uid='{$uid}'", " extcredits{$gongqiu_config['extcredits']} ", "0");
$my_credit = $my_credit["extcredits{$gongqiu_config['extcredits']}"];
if (submitcheck('post_submit') || submitcheck('edit_submit')) {
    if (empty($_GET['province']) && $op == 'post') {
        showmessage($_lang['must_province']);
    }
    if (empty($_GET['goods_text'])) {
        showmessage($_lang['must_goods_text']);
Example #2
0
<?php

/**
 *      版权声明: 该程序为 [DiscuzCMS!] 独立自主开发, 依法拥有该产品知识产权,所有代码版权归[DiscuzCMS!]所有, 程序内均为商业代码, 仅为购买者提供使用授权.
 *		法律声明: 未经官方授权使用修改或者传播都是属于侵权和违法行为, 依法将追究一切相关法律责任.
 *		官方网站: http://www.DiscuzCMS.com 
**/
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
$is_gongqiu_admin = is_gongqiu_admin();
$goods_id = daddslashes($_GET['goods_id']);
$goods = fetch_all('gongqiu_goods', " WHERE goods_id='{$goods_id}'");
$goods = $goods[0];
$goods['goods_text'] = stripslashes($goods['goods_text']);
if (empty($goods['goods_status'])) {
    if ($goods['member_uid'] != $_G['uid'] && $is_gongqiu_admin) {
        showmessage($_lang['no_quanxian']);
    }
}
$op = getgpc('op');
if ($op == 'del') {
    if ($goods['member_uid'] == $_G['uid'] || $is_gongqiu_admin) {
        DB::delete('gongqiu_goods', " goods_id='{$goods_id}'  ");
        showmessage($_lang['delete_ok'], $gongqiu_config['root']);
    } else {
        showmessage($_lang['no_quanxian']);
    }
}
$member = fetch_all('gongqiu_member', " WHERE member_uid='{$goods['member_uid']}'");
$member = $member[0];