Exemplo n.º 1
0
 public function work_end_time()
 {
     $order_list = db_factory::query(sprintf(" select * from %switkey_order where order_status='ok' and model_id=7 and service_end_time<%d", TABLEPRE, time()));
     if (is_array($order_list)) {
         foreach ($order_list as $k => $v) {
             $obj = new service_shop_class();
             $obj->dispose_order($v['order_id'], 'over_time_close');
         }
     }
 }
Exemplo n.º 2
0
defined('ADMIN_KEKE') or exit('Access Denied');
$ops = array('basic', 'order', 'comm', 'mark');
in_array($op, $ops) or $op = 'basic';
if ($ajax == 'delfile') {
    keke_shop_class::delServiceFiles($serviceid, $filename, $type);
    $data = array();
    $data['type'] = $type;
    $data['dataid'] = $dataid;
    kekezu::echojson('删除成功', 1, $data);
    die;
}
keke_lang_class::loadlang('public', 'shop');
keke_lang_class::loadlang('task_edit', 'task');
if ($op == 'basic') {
    $service_obj = new service_shop_class();
    $service_info = db_factory::get_one(sprintf("select * from %switkey_service where service_id='%d'", TABLEPRE, $service_id));
    if ($service_info['pic']) {
        $servicePics = explode(',', $service_info['pic']);
    }
    if ($service_info['file_path']) {
        $serviceFiles = explode(',', $service_info['file_path']);
    }
    $ac_url = "index.php?do=model&model_id=7&view=edit&service_id=" . $service_id;
    $status_arr = $service_obj->get_service_status();
    unset($status_arr[1]);
    $service_info['ext_fields'] = CustomClass::getExtDataList($service_info['service_id'], $service_info['model_id']);
    if ($sbt_edit) {
        if ($ext_fds) {
            CustomClass::editExtData($service_id, $model_id, $ext_fds);
        }
 public function notify_user($service_id, $service_status = '2')
 {
     global $_K;
     global $_lang;
     $service_obj = $this->_service_obj;
     $model_code = $this->_model_info['model_code'];
     switch ($model_code) {
         case "goods":
             $status_arr = goods_shop_class::get_goods_status();
             break;
         case "service":
             $status_arr = service_shop_class::get_service_status();
             break;
     }
     $message_obj = new keke_msg_class();
     $url = "<a href=\"" . $_K['siteurl'] . "/index.php?do=goods&id=" . $service_id . "\">" . $service_obj->getTitle() . "</a>";
     $v = array($_lang['service_type'] => $this->_model_info['model_name'], $_lang['goods_link'] => $url, $_lang['goods_status'] => $status_arr[$service_status], $_lang['pub_time'] => date('Y-m-d H:i:s', $service_obj->getOn_time()));
     $message_obj->send_message($this->_uid, $this->_username, "service_pub", $this->_model_info['model_name'] . $_lang['release_tips'], $v, $this->_user_info['email'], $this->_user_info['mobile']);
 }
Exemplo n.º 4
0
                 $objShop = new service_shop_class();
                 $resText = $objShop->dispose_order($orderId, 'working');
                 unset($objShop);
                 kekezu::show_msg('订单处理完成,工作进行中', $strUrl . "&step=step5&orderId=" . $orderId, 3, null, 'ok');
                 break;
             default:
                 kekezu::show_msg('访问页面不存在', 'index.php', 3, null, 'warning');
                 break;
         }
     }
     break;
 case 'step5':
     if (isset($action)) {
         switch ($action) {
             case 'complete':
                 $objShop = new service_shop_class();
                 $resText = $objShop->dispose_order($orderId, 'confirm_complete');
                 unset($objShop);
                 if (true === $resText) {
                     $objSerOrderM = new Keke_witkey_service_order_class();
                     $objSerOrderM->setWhere('order_id =' . $orderId);
                     $objSerOrderM->setWorkfile(strval(trim(kekezu::escape($workfile))));
                     $objSerOrderM->edit_keke_witkey_service_order();
                     kekezu::show_msg('订单处理完成,已确认完工', $strUrl . "&step=step5&orderId=" . $orderId, 3, null, 'ok');
                 } else {
                     kekezu::show_msg($resText, $strUrl, 3, null, 'fail');
                 }
                 break;
             default:
                 kekezu::show_msg('访问页面不存在', 'index.php', 3, null, 'warning');
                 break;
Exemplo n.º 5
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$page = max($page, 1);
$limit = max($limit, 5);
$url = 'index.php?do=' . $do . '&model_id=' . $model_id . '&view=edit&service_id=' . $service_id . '&op=' . $op;
switch ($op) {
    case 'order':
        $order_obj = keke_table_class::get_instance('witkey_order');
        $goods_obj = keke_table_class::get_instance('witkey_service');
        $order_status_arr = service_shop_class::get_order_status();
        $order_id_arr = db_factory::query(sprintf('select `order_id` from %switkey_order_detail where `obj_id`=%d and `obj_type`="service"', TABLEPRE, $service_id));
        $order_alls = array();
        foreach ($order_id_arr as $v) {
            $order_alls[] = $v['order_id'];
        }
        $order_str = implode(',', $order_alls);
        if ($order_str) {
            $wh = "model_id = 7 and `order_id` in ({$order_str})";
            $w['order_id'] and $wh .= " and order_id like '%{$w['order_id']}%' ";
            $w['order_username'] and $wh .= " and order_username like '%{$w['order_username']}%' ";
            $w['order_status'] and $wh .= " and order_status = '{$w['order_status']}' ";
            $ord['0'] && $ord['1'] and $wh .= ' order by ' . $ord['0'] . ' ' . $ord['1'] or $wh .= " order by order_time desc";
            intval($page) or $page = 1;
            intval($w['page_size']) and $page_size = intval($w['page_size']) or $page_size = '10';
            $url_str = "index.php?do=model&model_id=6&view=order&order_id={$w['order_id']}&order_name={$w['order_name']}&page={$page}&w[page_size]={$page_size}&ord[0]={$ord['0']}&ord[1]={$ord['1']}";
            $table_arr = $order_obj->get_grid($wh, $url_str, $page, $page_size, null, 1, 'ajax_dom');
            $order_arr = $table_arr['data'];
            $pages = $table_arr['pages'];
        }
        switch ($ac) {
Exemplo n.º 6
0
<?php

$strUrl = "index.php?do=user&view=wk&op=gy";
$intPage and $strUrl .= "&intPage=" . intval($intPage);
$o and $strUrl .= "&o=" . intval($o);
$id and $strUrl .= "&id=" . intval($id);
$s and $strUrl .= "&s=" . strval($s);
$gzname and $strUrl .= "&gzname=" . strval($gzname);
$arrStatus = service_shop_class::get_order_status();
unset($arrStatus['close']);
$arrListOrder = array('1' => '编号降序', '2' => '编号升序', '3' => '金额降序', '4' => '金额升序');
$page and $intPage = intval($page);
$intPage = intval($intPage) ? $intPage : 1;
$intPagesize = 10;
$strWhere = " and  b.obj_type ='gy' and c.seller_uid= " . $gUid;
$strWhere .= " and c.order_status!= 'close'";
if ($id) {
    $strWhere .= " and a.id=" . intval($id);
}
if ($gzname) {
    $strWhere .= " and c.order_username like '%" . kekezu::escape($gzname) . "%'";
}
if (isset($s) && $s != '' && $s > -1 && in_array($s, array_keys($arrStatus))) {
    $strWhere .= " and c.order_status ='" . strval($s) . "'";
} else {
    $s = -1;
}
switch ($o) {
    case '1':
        $strWhere .= " order by c.order_id desc";
        break;
Exemplo n.º 7
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$table_obj = keke_table_class::get_instance('witkey_service');
kekezu::admin_check_role('m714');
$service_obj = new service_shop_class();
$status_arr = array("1" => "待审核", "2" => "出售中", "3" => "已下架", "4" => "审核失败");
$wh = "1=1";
$w[service_id] and $wh .= " and service_id= " . $w[service_id];
$w[title] and $wh .= " and title like '%{$w['title']}%'";
$w[username] and $wh .= " and username like '%{$w['username']}%' ";
if ($w['service_status'] == 'a1') {
    $wh .= " and edit_status= 1 ";
} else {
    $w['service_status'] and $wh .= " and service_status={$w['service_status']}";
}
$wh .= " and model_id = 7";
intval($page) or $page = 1;
intval($page_size) and $page_size = intval($page_size) or $page_size = '10';
$w[order_status] and $wh .= " and order_status like '%{$w['order_status']}%' ";
switch ($ord) {
    case 'id-desc':
        $wh .= " order by service_id desc";
        break;
    case 'id-asc':
        $wh .= " order by service_id asc";
        break;
    case 'default':
    default:
        $wh .= " ORDER BY ( CASE service_status WHEN 1 THEN 0 ELSE 1 END ), ( CASE edit_status WHEN 1 THEN 0 ELSE 1 END ), on_time DESC ";
        break;
Exemplo n.º 8
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role('m713');
$table_obj = keke_table_class::get_instance('witkey_order');
$service_obj = new service_shop_class();
$arrStatus = $service_obj->get_order_status();
$wh = "1=1";
$w[order_id] and $wh .= " and order_id like '%{$w['order_id']}%' ";
$w[order_username] and $wh .= " and order_username like '%{$w['order_username']}%' ";
$wh .= " and model_id = 7 and seller_uid > 0";
intval($page) or $page = 1;
intval($w[page_size]) and $page_size = intval($w[page_size]) or $page_size = '10';
$w[order_status] and $wh .= " and order_status like '%{$w['order_status']}%' ";
$ord[0] && $ord[1] and $wh .= ' order by ' . $ord[0] . ' ' . $ord[1] or $wh .= " order by order_time desc";
$url_str = "index.php?do=model&model_id=7&view=order&w[order_id]={$w['order_id']}&w[order_username]={$w['order_username']}&w[order_status]={$w['order_status']}&page={$page}&page_size={$page_size}";
$table_arr = $table_obj->get_grid($wh, $url_str, $page, $page_size, null, 1, 'ajax_dom');
$order_arr = $table_arr['data'];
$pages = $table_arr['pages'];
if ($ac == "del") {
    $order_obj = new Keke_witkey_order_class();
    $order_obj->setWhere("order_id = {$order_id}");
    $order_obj->del_keke_witkey_order();
    kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['delete_success'], 'success');
}
if (isset($sbt_action)) {
    $order_obj = new Keke_witkey_order_class();
    sizeof($ckb) or kekezu::admin_show_msg($_lang['choose_operate_item'], $url, 3, '', 'warning');
    is_array($ckb) and $ids = implode(',', array_filter($ckb));
    $order_obj->setWhere("order_id in ({$ids})");
    if ($sbt_action) {