Пример #1
0
 public function index()
 {
     $goods_id = intval($_REQUEST['id']);
     $is_buy = intval($_REQUEST['is_buy']);
     $GLOBALS['tmpl']->assign("goods_id", $goods_id);
     $GLOBALS['tmpl']->assign("is_buy", $is_buy);
     //分页
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
     $result = get_message_list_shop($limit, " rel_table='deal' and rel_id = " . $goods_id . " and is_buy = " . $is_buy);
     $GLOBALS['tmpl']->assign("message_list", $result['list']);
     $page = new Page($result['count'], app_conf("PAGE_SIZE"));
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     if (!$GLOBALS['user_info']) {
         $GLOBALS['tmpl']->assign("message_login_tip", sprintf($GLOBALS['lang']['MESSAGE_LOGIN_TIP'], url("shop", "user#login"), url("shop", "user#register")));
     }
     $GLOBALS['tmpl']->display("inc/inc_goods_comment_list.html");
 }
 public function index()
 {
     $GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['UC_MESSAGE']);
     $GLOBALS['tmpl']->assign("post_title", $GLOBALS['lang']['UC_MESSAGE']);
     //以下关于订单留言的输出
     $condition = " user_id = " . intval($GLOBALS['user_info']['id']);
     //message_form 变量输出
     $GLOBALS['tmpl']->assign('rel_table', 'feedback');
     //分页
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
     $message = get_message_list_shop($limit, $condition);
     $page = new Page($message['count'], app_conf("PAGE_SIZE"));
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     $GLOBALS['tmpl']->assign("message_list", $message['list']);
     //end订单留言
     $GLOBALS['tmpl']->assign("inc_file", "inc/message_form.html");
     $GLOBALS['tmpl']->display("uc.html");
 }
Пример #3
0
function insert_load_comment($param)
{
    require_once APP_ROOT_PATH . "app/Lib/message.php";
    require_once APP_ROOT_PATH . 'app/Lib/page.php';
    $rel_id = intval($_REQUEST['id']);
    //关联数据的ID
    $rel_table = $param['rel_table'];
    $is_effect = $param['is_effect'];
    $is_image = $param['is_image'];
    $width = $param['width'];
    $height = $param['height'];
    $GLOBALS['tmpl']->assign("height", $height);
    $GLOBALS['tmpl']->assign("width", $width);
    $GLOBALS['tmpl']->assign("rel_id", $rel_id);
    $GLOBALS['tmpl']->assign("rel_table", $rel_table);
    $GLOBALS['tmpl']->assign("is_effect", $is_effect);
    $GLOBALS['tmpl']->assign("is_image", $is_image);
    //分页
    $page = intval($_REQUEST['p']);
    if ($page == 0) {
        $page = 1;
    }
    $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
    $result = get_message_list_shop($limit, " rel_table='" . $rel_table . "' and rel_id = " . $rel_id . " and is_effect = 1");
    $GLOBALS['tmpl']->assign("message_list", $result['list']);
    $page = new Page($result['count'], app_conf("PAGE_SIZE"));
    //初始化分页对象
    $p = $page->show();
    $GLOBALS['tmpl']->assign('pages', $p);
    $GLOBALS['tmpl']->assign("user_auth", get_user_auth());
    if (!$GLOBALS['user_info']) {
        $GLOBALS['tmpl']->assign("message_login_tip", sprintf($GLOBALS['lang']['MESSAGE_LOGIN_TIP'], url("shop", "user#login"), url("shop", "user#register")));
    }
    return $GLOBALS['tmpl']->fetch("inc/inc_comment_list.html");
}
Пример #4
0
 public function view()
 {
     $id = intval($_REQUEST['id']);
     $order_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal_order where id = " . $id . " and is_delete = 0 and user_id = " . intval($GLOBALS['user_info']['id']));
     if (!$order_info) {
         showErr($GLOBALS['lang']['INVALID_ORDER_DATA']);
     } else {
         $order_info['region_lv1'] = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "delivery_region where id = " . $order_info['region_lv1']);
         $order_info['region_lv2'] = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "delivery_region where id = " . $order_info['region_lv2']);
         $order_info['region_lv3'] = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "delivery_region where id = " . $order_info['region_lv3']);
         $order_info['region_lv4'] = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "delivery_region where id = " . $order_info['region_lv4']);
         $order_info['deal_list'] = $GLOBALS['db']->getAll("select doi.*,d.is_shop from " . DB_PREFIX . "deal_order_item as doi left join " . DB_PREFIX . "deal as d on doi.deal_id = d.id where doi.order_id = " . $order_info['id']);
         $order_info['payment'] = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment where id = " . $order_info['payment_id']);
     }
     $GLOBALS['tmpl']->assign("order_info", $order_info);
     $GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['UC_ORDER_VIEW']);
     //以下关于订单留言的输出
     $rel_table = 'deal_order';
     $message_type = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "message_type where type_name='" . $rel_table . "'");
     $condition = "rel_table = '" . $rel_table . "' and rel_id = " . $id;
     if (app_conf("USER_MESSAGE_AUTO_EFFECT") == 0) {
         $condition .= " and user_id = " . intval($GLOBALS['user_info']['id']);
     } else {
         if ($message_type['is_effect'] == 0) {
             $condition .= " and user_id = " . intval($GLOBALS['user_info']['id']);
         }
     }
     //message_form 变量输出
     $GLOBALS['tmpl']->assign("post_title", $message_type['show_name']);
     $GLOBALS['tmpl']->assign('rel_id', $id);
     $GLOBALS['tmpl']->assign('rel_table', $rel_table);
     //分页
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
     $message = get_message_list_shop($limit, $condition);
     $page = new Page($message['count'], app_conf("PAGE_SIZE"));
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     $GLOBALS['tmpl']->assign("message_list", $message['list']);
     $message_group = array($GLOBALS['lang']['ORDER_TYPE_1'], $GLOBALS['lang']['ORDER_TYPE_2'], $GLOBALS['lang']['ORDER_TYPE_3']);
     $GLOBALS['tmpl']->assign("message_group", $message_group);
     //end订单留言
     //输出订单日志
     $log_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_order_log where order_id = " . $order_info['id'] . " order by log_time desc");
     $GLOBALS['tmpl']->assign("log_list", $log_list);
     $GLOBALS['tmpl']->assign("inc_file", "inc/uc/uc_order_view.html");
     $GLOBALS['tmpl']->display("page/uc.html");
 }
 public function carry()
 {
     app_redirect(url("index"));
     exit;
     require_once APP_ROOT_PATH . 'app/Lib/message.php';
     //以下关于提现留言的输出
     $rel_table = 'tx';
     $id = 0;
     $message_type = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "message_type where type_name='" . $rel_table . "'");
     $condition = "rel_table = '" . $rel_table . "' and rel_id = " . $id;
     if (app_conf("USER_MESSAGE_AUTO_EFFECT") == 0) {
         $condition .= " and user_id = " . intval($GLOBALS['user_info']['id']);
     } else {
         if ($message_type['is_effect'] == 0) {
             $condition .= " and user_id = " . intval($GLOBALS['user_info']['id']);
         }
     }
     //message_form 变量输出
     $GLOBALS['tmpl']->assign("post_title", $message_type['show_name']);
     $GLOBALS['tmpl']->assign('rel_id', $id);
     $GLOBALS['tmpl']->assign('rel_table', $rel_table);
     //分页
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
     $message = get_message_list_shop($limit, $condition);
     $page = new Page($message['count'], app_conf("PAGE_SIZE"));
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     $GLOBALS['tmpl']->assign("message_list", $message['list']);
     //end订单留言
     $GLOBALS['tmpl']->assign("page_title", $message_type['show_name']);
     $GLOBALS['tmpl']->assign("inc_file", "inc/uc/uc_money_carry.html");
     $GLOBALS['tmpl']->display("uc.html");
 }
Пример #6
0
function m_get_event_reply($event_id, $page)
{
    if ($page == 0) {
        $page = 1;
    }
    $limit = ($page - 1) * PAGE_SIZE . "," . PAGE_SIZE;
    require_once APP_ROOT_PATH . "app/Lib/message.php";
    $res = get_message_list_shop($limit, " rel_table='event' and rel_id = " . $event_id . " and is_effect = 1");
    $list = $res['list'];
    $count = $res['count'];
    $reply_list = array();
    foreach ($list as $k => $v) {
        $reply_list[$k]['content'] = $v['content'];
        $reply_list[$k]['create_time'] = $v['create_time'];
        $reply_list[$k]['user_name'] = $GLOBALS['db']->getOne("select user_name from " . DB_PREFIX . "user where id = " . $v['user_id']);
        $reply_list[$k]['user_avatar'] = get_abs_img_root(get_muser_avatar($v['user_id'], "big"));
        $reply_list[$k]['time'] = pass_date($v['create_time']);
        $reply_list[$k]['parse_expres'] = get_parse_expres($v['content']);
        $reply_list[$k]['parse_user'] = get_parse_user($v['content']);
        $reply_list[$k]['user_id'] = $v['user_id'];
    }
    $page_info = array("page" => $page, "page_total" => ceil($count / PAGE_SIZE));
    return array("list" => $reply_list, "page" => $page_info);
}