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']); }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role('m611'); $table_obj = keke_table_class::get_instance('witkey_service'); $indus_p_arr = $kekezu->_indus_p_arr; $goods_status_arr = goods_shop_class::get_goods_status(); $status_arr = array("1" => "待审核", "2" => "出售中", "3" => "已下架", "4" => "审核失败"); $wh = "model_id = 6"; $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']}"; } 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; } intval($page) or $page = 1; intval($size) or $size = 10;