$sort=$listsort[0][0];
	$listcontent=$data->select($sqlcontent);
    $content=$listcontent[0][0];
    $remark_no=$sort.$content;
	$sql="insert into takeorder_tmp_menu_remark(order_id,action,remark,remark_no,seq_id) values ('$k_id','$sort','$content','$remark_no',1)";
	$data->insert($sql);
}

}






$sql="select * from takeorder_tmp_menu_remark where order_id=$k_id";
$list=$data->select($sql);
$p->setvar(array('k_id'=>$k_id));
$num=count($list);
$p->set(4,$num,"",'remark_list_div','');
$sql.=" limit ".$p->limit();
$list=$data->select($sql);
//print_rr($list);


$smarty->assign("list",$list);

$smarty->assign('prew',$p->prew);
$smarty->assign('next',$p->next);
$smarty->display("remark_list.htm");
?>
<?php

include_once './inc/init.php';
include_once './inc/db.inc.php';
require './inc/ajax_page.inc.php';
$data = new DBSQL();
$arr = array();
//分页数组构造初始化
$arr['search'] = '1';
//搜索的必要条件
$showsql = "select * from coment where 1=1 ";
if ($_GET['id']) {
    $showsql .= "and id='{$_GET['id']}' ";
    //搜索类别
    $arr['id'] = urlencode($_GET['id']);
}
$list = $data->select($showsql);
$num = count($list);
$p = new show_page();
$p->pvar = "p";
$p->file = "list.php";
$p->setvar($arr);
$p->set(5, $num, "", 'main_div', '');
$showsql .= " ORDER BY id desc ";
$showsql .= " limit " . $p->limit();
$list = $data->select($showsql);
$smarty->assign("list", $list);
$pages = $p->output(1);
$smarty->assign('pages', $pages);
$smarty->display("sublist.htm");
if ($_GET['endtime']) {
    $newtime = strtotime($_GET['endtime']);
    $w .= " and question_time <='{$newtime}' ";
    $arr['endtime'] = $_GET[endtime];
    $smarty->assign("endtime", $_GET['endtime']);
}
if ($_GET['keyword']) {
    $w .= " and (question like '%{$_GET['keyword']}%' or  question_no like '%{$_GET['keyword']}%') ";
    $arr['keyword'] = $_GET[keyword];
    $smarty->assign("keyword", $_GET['keyword']);
}
$num = $question->getListCount($w, null);
$p = new show_page();
$p->setvar($arr);
$p->pvar = "p";
$p->set(12, $num);
$limit = " limit " . $p->limit();
$pages = $p->output(1);
$list = $question->getListInfo($w, $limit);
for ($i = 0; $i < count($list); $i++) {
    switch ($list[$i]['status']) {
        case 1:
            $list[$i]['newstatus'] = "<font color='red'>未解決</font>";
            break;
        case 2:
            $list[$i]['newstatus'] = "<font color='green'>已解決</font>";
            break;
        case 3:
            $list[$i]['newstatus'] = "<font color='blue'>已鎖定</font>";
            break;
        default:
include_once dirname(__FILE__) . '/inc/db.inc.php';
include_once dirname(__FILE__) . '/inc/class_question.php';
include_once dirname(__FILE__) . '/inc/page.inc.php';
$question = new question();
$w = "";
$arr = array();
if ($_GET['status']) {
    $w = empty($w) ? "" : $w . " and ";
    $w = " status='{$_GET['status']}' ";
    $arr['status'] = $_GET[status];
}
$num = $question->getListCount($w, null);
$p = new show_page();
$p->setvar($arr);
$p->pvar = "p";
$p->set(10, $num);
$limit = " limit " . $p->limit();
$pages = $p->output(1);
$list = $question->getListInfo($w, $limit);
for ($i = 0; $i < count($list); $i++) {
    switch ($list[$i]['status']) {
        case 1:
            $list[$i]['newstatus'] = "<font color='red'>未解决</font>";
            break;
        case 2:
            $list[$i]['newstatus'] = "<font color='green'>已解决</font>";
            break;
        case 3:
            $list[$i]['newstatus'] = "<font color='blue'>已锁定</font>";
            break;
        default:
<?php

$id = $_GET['k_id'];
include_once './inc/init.php';
include_once './inc/db.inc.php';
require './inc/ajax_order_page.inc.php';
$p = new show_page();
$p->pvar = "p";
$p->file = 'zlsky_caidan_lv2.php';
$data = new DBSQL();
$sql = "select * from takeorder_menu_list where class_id='{$id}'";
$list = $data->select($sql);
$p->setvar(array('k_id' => $id));
$num = count($list);
$p->set(6, $num, "", "caidan_lv2", '');
$sql .= " limit " . $p->limit();
$list = $data->select($sql);
//$pages=$p->output(1);
$smarty->assign("list", $list);
$smarty->assign('prew', $p->prew);
$smarty->assign('next', $p->next);
//$smarty->assign('pages',$pages);
$smarty->display("zlsky_caidan_lv2.htm");
<?php

session_start();
include_once './inc/init.php';
$sql = "select * from item where takeorder_itemname='' order by id desc";
$res = m_query($sql);
$num = mysql_num_rows($res);
$p = new show_page();
$p->pvar = "p";
//$p->setvar(array("id" => $_GET['id']));
$p->set(4, $num);
$sql .= " limit " . $p->limit();
$itemsort_result = m_query($sql);
$sortlist = array();
$i = 0;
while ($row = m_fetch($itemsort_result)) {
    $sortlist[] = $row;
}
$pages = $p->output(1);
$smarty->assign('sortlist', $sortlist);
$smarty->assign('itemselflist', $itemselflist);
$smarty->assign('pages', $pages);
$smarty->display("item.htm");
Exemple #7
0
/**
 * 订单列表
 * @param $input
 * @return array
 */
function yue_admin_task_get_order_list($input)
{
    global $task_order_obj;
    global $org_obj;
    global $order_status_config;
    global $login_user_id;
    $format_ret = yue_admin_task_format_order($input);
    $where = $format_ret['where'];
    $filter = $format_ret['filter'];
    if ($filter['sign_time_begin']) {
        $filter['sign_time_begin'] = date("Y-m-d", $filter['sign_time_begin']);
    }
    if ($filter['sign_time_end']) {
        $filter['sign_time_end'] = date('Y-m-d', $filter['sign_time_end']);
    }
    if ($filter['add_time_begin']) {
        $filter['add_time_begin'] = date("Y-m-d", $filter['add_time_begin']);
    }
    if ($filter['add_time_end']) {
        $filter['add_time_end'] = date("Y-m-d", $filter['add_time_end']);
    }
    if ($filter['pay_time_begin']) {
        $filter['pay_time_begin'] = date('Y-m-d', $filter['pay_time_begin']);
    }
    if ($filter['pay_time_end']) {
        $filter['pay_time_end'] = date('Y-m-d', $filter['pay_time_end']);
    }
    $filter['is_close'] = 0;
    /* 分页数据 */
    $page_arr['page'] = empty($input['page']) || intval($input['page']) <= 0 ? 1 : intval($input['page']);
    if (isset($_REQUEST['page_size']) && intval($_REQUEST['page_size']) > 0) {
        $page_arr['page_size'] = intval($input['page_size']);
    } else {
        $page_arr['page_size'] = 20;
    }
    if ($filter['goods_id'] > 0) {
        $goods_rst = $task_order_obj->get_order_list_by_goods_ids($filter['type_id'], $filter['status'], array($filter['goods_id']), true, $where);
        $page_arr['page_count'] = $goods_rst['total'];
    } else {
        $page_arr['page_count'] = $task_order_obj->get_order_list($filter['type_id'], $filter['status'], true, $where);
    }
    // 分页对象
    $page_obj = new show_page();
    // 设置分页参数
    $page_obj->setvar($filter);
    $page_obj->set($page_arr['page_size'], $page_arr['page_count']);
    $limit = $page_obj->limit();
    $page = $page_obj->output(1);
    /* 获取订单列表 */
    if ($filter['goods_id'] > 0) {
        $list = $task_order_obj->get_order_list_by_goods_ids($filter['type_id'], $filter['status'], array($filter['goods_id']), false, $where, 'order_id', $limit);
    } elseif ($filter['type_id'] == 42) {
        $list = $task_order_obj->get_order_full_list_for_activity($filter['type_id'], $filter['status'], false, $where, 'order_id desc', $limit);
    } else {
        $list = $task_order_obj->get_order_full_list($filter['type_id'], $filter['status'], false, $where, 'order_id desc', $limit);
    }
    /* 格式化数据 */
    foreach ($list as $key => &$val) {
        $val['add_time'] = date("Y-m-d H:i:s", $val['add_time']);
        $val['type_id_str'] = $val['type_name'];
        $val['seller_user_name'] = get_seller_nickname_by_user_id($val['seller_user_id']) . "</br>[{$val['seller_user_id']}]";
        $val['buyer_user_name'] = get_user_nickname_by_user_id($val['buyer_user_id']) . "</br>[{$val['buyer_user_id']}]";
        $val['org_user_name'] = $org_obj->get_org_name_by_user_id($val['org_user_id']);
        $val['is_pay'] = $val['is_pay'] == 0 ? '否' : '是';
        $val['is_use_coupon'] = $val['is_use_coupon'] == 0 ? '否' : '是';
        $list[$key]['service_time_str'] = $val['detail_list'][0]['service_time_str'];
        $list[$key]['goods_id'] = $val['detail_list'][0]['goods_id'];
        // 活动处理 商品ID 与 面值处理 商品ID
        if (is_null($list[$key]['goods_id'])) {
            if (isset($val['activity_list'][0]['activity_id'])) {
                $list[$key]['goods_id'] = $val['activity_list'][0]['activity_id'];
            }
            if (isset($val['payment_list'][0]['order_payment_id'])) {
                $list[$key]['goods_id'] = '--';
            }
        }
        $time_left = $val['detail_list'][0]['service_time'] - time();
        if ($val['status'] == 2 && $time_left < 12 * 3600) {
            $val['is_close'] = 1;
        }
    }
    $filter['output'] = 1;
    /* 将filter数组转换为url为模板方便使用 */
    $filter['url'] = http_build_query($filter);
    return array('list' => $list, 'filter' => $filter, 'page' => $page);
}
<?php

session_start();
include_once './inc/init.php';
require 'inc/order_page.inc.php';
$sql = "select * from takeorder_item where itemname='' order by id desc";
$res = m_query($sql);
$num = mysql_num_rows($res);
$p = new show_page();
$p->pvar = "p";
//$p->setvar(array("id" => $_GET['id']));
$p->set(3, $num);
$sql .= " limit " . $p->limit();
$itemsort_result = m_query($sql);
$sortlist = array();
$i = 0;
while ($row = m_fetch($itemsort_result)) {
    $sortlist[] = $row;
}
$pages = $p->output(1);
$smarty->assign('sortlist', $sortlist);
$smarty->assign('itemselflist', $itemselflist);
$smarty->assign('pages', $pages);
$smarty->display("customize.htm");
<?php

include_once './inc/init.php';
include_once './inc/db.inc.php';
require './inc/ajax_order_page.inc.php';
$p = new show_page();
$p->pvar = "p";
$data = new DBSQL();
$sql = "select * from takeorder_kind";
$list = $data->select($sql);
$num = count($list);
$p->set(4, $num, "", "newpalce", '');
$sql .= " limit " . $p->limit();
$list = $data->select($sql);
for ($i = 0; $i < count($list); $i++) {
    $id = $list[$i][id];
    $subsql = "select * from  takeorder_kind_sub where id='{$id}'";
    $sublist = $data->select($subsql);
    $list[$i][sub] = $sublist;
}
$pages = $p->output(1);
$smarty->assign("list", $list);
$smarty->assign('pages', $pages);
$smarty->display("getchoseitem.htm");
<?php

include_once './inc/init.php';
include_once './inc/db.inc.php';
require './inc/ajax_page.inc.php';
$table = $_GET['table'];
$sql = "select * from takeorder_order_main where table_id='{$table}' and status='1' and pay_status='0'";
$data = new DBSQL();
$arr = array();
$arr['search'] = '1';
$arr['table'] = urlencode($_GET['table']);
$list = $data->select($sql);
$num = count($list);
$p = new show_page();
$p->file = "lcrehold_list.php";
$p->pvar = "p";
$p->setvar($arr);
$p->set(5, $num, "", 'showinfo', '');
$sql .= " limit " . $p->limit();
$list = $data->select($sql);
$pages = $p->output(1);
$admin = $_SESSION['name'];
$smarty->assign('admin', $admin);
$smarty->assign("list", $list);
$smarty->assign('pages', $pages);
$smarty->display("rehold_list.htm");
<?php

include_once './inc/init.php';
include_once './inc/db.inc.php';
require './inc/ajax_order_page.inc.php';
$p = new show_page();
$p->pvar = "p";
$p->file = 'remark_sort.php';
$p->prew_img = TRUE;
$p->next_img = TRUE;
$data = new DBSQL();
$sql = "select * from takeorder_remark_sort where status=1 order by k_id asc";
$list = $data->select($sql);
$num = count($list);
$p->set(4, $num, "", 'remark_sort', '');
$sql .= " limit " . $p->limit();
$list = $data->select($sql);
$smarty->assign("list", $list);
$smarty->assign('prew', $p->prew);
$smarty->assign('next', $p->next);
//print_rr($list);
$smarty->display("remark_sort.htm");
session_start();
include_once './inc/init.php';
require 'inc/ajax_order_page.inc.php';
$id = $_GET['id'];
$no = $_GET['no'];
$customize = $_GET['customize'];
$sql = "select sortname from takeorder_item where id='{$id}'";
$res = s_fetch($sql);
$sortname = $res[0]['sortname'];
$sql_itemself = "select * from takeorder_item where sortname='{$sortname}' and itemname!=''";
$query_itemself = m_query($sql_itemself);
$num = mysql_num_rows($query_itemself);
$p = new show_page();
$p->pvar = "p";
$p->setvar(array("id" => $_GET['id'], "no" => $no, "customize" => $customize));
$p->set(3, $num, "", "itemself");
$sql_itemself .= " limit " . $p->limit();
$itemsort_result = m_query($sql_itemself);
while ($row_itemself = m_fetch($itemsort_result)) {
    $itemselflist[] = $row_itemself;
}
//print_rr($itemselflist);
/*
$i =0;
while($row=m_fetch($itemsort_result)){
	$sortlist[]=$row;
	if($i==0){
        $sql_itemself = "select sortname from item where id='$id'";
        $query_itemself = m_query($sql_itemself);
		while($row_itemself=m_fetch($query_itemself)){
			$itemselflist[]=$row_itemself;
<?php

include_once './inc/init.php';
include_once './inc/order_page.inc.php';
//分页程序
$w = " where 1=1";
if ($level1 != "") {
    $w = empty($w) ? "" : $w . " and ";
    $w .= " class1='{$level1}'";
}
$sql = "select * from takeorder_customer order by id desc";
$res = m_query($sql);
$num = mysql_num_rows($res);
$p = new show_page();
$p->pvar = "p";
$p->set(2, $num, false);
$sql .= " limit " . $p->limit();
$customer_result = mysql_query($sql);
$list = array();
while ($row = @mysql_fetch_assoc($customer_result)) {
    $list[] = $row;
}
$pages = $p->output(1);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link type="text/css" rel="stylesheet" rev="stylesheet" href="./css/smain.css" />
<?php

include_once './inc/init.php';
include_once './inc/db.inc.php';
require './inc/ajax_order_page.inc.php';
$p = new show_page();
$p->pvar = "p";
$p->file = 'remark_content.php';
$p->prew_img = TRUE;
$p->next_img = TRUE;
$data = new DBSQL();
$sql = "select * from takeorder_remark_content where status=1 order by k_id asc";
$list = $data->select($sql);
$num = count($list);
$p->set(4, $num, "", 'remark_content', '');
$sql .= " limit " . $p->limit();
$list = $data->select($sql);
$smarty->assign("list", $list);
$smarty->assign('prew', $p->prew);
$smarty->assign('next', $p->next);
//print_rr($list);
$smarty->display("remark_content.htm");
if ($_GET['k_id']) {
    $showsql .= "and order_id='{$_GET['k_id']}' ";
    //搜索类别
    $arr['k_id'] = urlencode($_GET['k_id']);
}
if ($_GET['id']) {
    $showsql .= "and client_id='{$_GET['id']}' ";
    //搜索类别
    $arr['id'] = urlencode($_GET['id']);
}
$list = $data->select($showsql);
$num = count($list);
$p = new show_page();
$p->pvar = "p";
$p->setvar($arr);
$p->set(5, $num, "", 'show', '');
$list2 = array();
$showsql .= " limit " . $p->limit();
$list = $data->select($showsql);
if (count($list) < 5) {
    $num = 5 - count($list);
    for ($k = 0; $k < $num; $k++) {
        $list2[] = $k;
        $smarty->assign("list2", $list2);
    }
}
for ($i = 0; $i < count($list); $i++) {
    $m_id = $list[$i][0];
    $remarksql = "select count(*) from takeorder_tmp_menu_remark where order_id='{$m_id}'";
    $remarklist = $data->select($remarksql);
    if ($remarklist[0][0] > 0) {