function index() { set_error_handler(array(&$this, '_pageErrorHandler')); $mdl = $this->system->loadModel('purchase/po'); $this->pagedata['suppliers'] = $mdl->getSupplierList(); parent::index(); }
function index($operate) { if ($operate == 'admin') { $this->system->set_op_conf('notifytime', time()); } parent::index(); }
function ctl_delivery_printer() { parent::objectPage(); $this->pagedata['dpi'] = intval($this->system->getConf('system.clientdpi')); if (!$this->pagedata['dpi']) { $this->pagedata['dpi'] = 96; } }
function index() { $oLev =& $this->system->loadModel("member/level"); $this->pagedata['member_lv'] = $oLev->getMLevel(); $messenger =& $this->system->loadModel('system/messenger'); $this->pagedata['messenger'] = $messenger->getList(); parent::index(); }
function index($cpnsId = null) { if ($cpnsId) { parent::index(array('params' => array('cpns_id' => $cpnsId))); } else { parent::index(); } }
function index($active_id = null) { if ($active_id) { parent::index(array('params' => array('pmta_id' => $active_id))); } else { parent::index(); } }
function index($operate) { if ($operate == 'admin') { $operate = $this->system->loadModel('admin/operator'); $operate->updateReadTime($this->op->opid, array('notifytime', time())); } parent::index(); }
function finder($type, $view, $cols, $finder_id, $limit) { $sdtime = explode("/", $_GET['sdtime']); $oAdv =& $this->system->loadModel('member/advance'); $advanceStatistics = $oAdv->getAdvanceStatistics($sdtime[0], $sdtime[1]); $statusStr = __('当前共') . $advanceStatistics['count'] . __('笔 总转入') . $advanceStatistics['import_money'] . __('元 总转出') . $advanceStatistics['explode_money'] . __('元 店内总余额') . $oAdv->getShopAdvance() . __('元 '); $_GET['_finder']['statusStr'] = $statusStr; parent::finder($type, $view, $cols, $finder_id, $limit); }
/** * recycle * 重写父类objectPage中的recycle * 增加当前管理员不能删除自身功能 * @access public * */ function recycle() { foreach ($_POST['op_id'] as $a) { if ($a == $this->op->opid) { $tmp = 'self'; break; } } if ($tmp != '') { echo '当前管理员不能删除自身!请重新选择!'; exit; } else { parent::recycle(); } }
function recycle() { $oGift =& $this->system->loadModel('trading/gift'); $varGoto = true; foreach ($_POST['giftcat_id'] as $cat_id) { $count = $oGift->count(array('giftcat_id' => array($cat_id))); if ($count) { echo __('该赠品分类下还有赠品,请先删除赠品后再删除分类!'); $varGoto = false; break; } } if ($varGoto) { parent::recycle(); } }
function recycle() { $oGift = $this->system->loadModel('trading/gift'); $varGoto = 1; foreach ($_REQUEST['giftcat_id'] as $cat_id) { $oGift->getList('', array('giftcat_id' => array($cat_id)), 0, 10, $count); if ($count) { echo __('该赠品分类下还有赠品,请先删除赠品后再删除分类!'); $varGoto = 0; break; } } if ($varGoto) { parent::recycle(); } }
function delete() { if ($_REQUEST['f_id']) { $this->begin('index.php?ctl=member/gask&act=detail&p[0]=' . $_REQUEST['f_id']); } else { $this->begin('index.php?ctl=member/gask&act=index'); } if ($_POST['_finder']) { parent::delete(); } else { $objComment = $this->system->loadModel('comment/comment'); if (is_array($_REQUEST['comment_id'])) { foreach ($_REQUEST['comment_id'] as $id) { $objComment->toRemove($id); } } } $this->end(true, __('操作成功!')); }
function export($io = 'csv') { if ($io != 'csv') { parent::export($io); exit; } include_once 'shopObject.php'; $step = 20; $offset = 0; $dataio = $this->system->loadModel('system/dataio'); $p = $this->system->loadModel('goods/products'); $gtype = $this->system->loadModel('goods/gtype'); if (!($cols = $dataio->columns($io))) { $cols = 'goods_id,type_id,cat_id,marketable,pdt_desc,name,bn,brand,brief,intro,mktprice,price,cost,weight,unit,store,params,spec,spec_desc,image_file'; //todo ...当前列 $cols_attr = 'p_1'; for ($i = 1; $i < 29; $i++) { $cols_attr .= ',p_' . $i; } } $last_type_id = -1; $list = $this->model->getList($cols . ',' . $cols_attr, $_POST, $offset, $step, $count, array('type_id', 'asc')); while ($count > $offset) { if ($offset == 0) { $dataio->export_begin($io, null, 'goods', $count); } else { $list = $this->model->getList($cols . ',' . $cols_attr, $_POST, $offset, $step, $count, array('type_id', 'asc')); } foreach ($list as $v) { if (trim($v['bn']) == '') { continue; } if ($last_type_id != $v['type_id']) { $aGtype = $gtype->instance($v['type_id']); $keys = $p->getTypeExportTitle($aGtype); $a = array($keys); $dataio->export_rows($io, $a); unset($proto); foreach ($keys as $k1 => $v1) { $proto[$k1] = ''; } } $data = $p->getGoodsExportData($v, $proto, $aGtype['name'], unserialize($aGtype['props']), $aGtype['params']); $dataio->export_rows($io, $data); $last_type_id = $v['type_id']; } $offset += $step; } $dataio->export_finish($io); }
function recycle() { $objType =& $this->system->loadModel('goods/gtype'); $varGoto = 1; foreach ($_REQUEST['type_id'] as $type_id) { if (!$objType->checkDelete($type_id, $result)) { if ($result == 1) { echo __('通用商品类型为系统默认类型,不能删除'); } if ($result == 2) { echo __('类型下存在与之关联的商品,无法删除'); } $varGoto = 0; break; } } if ($varGoto) { parent::recycle(); $objType =& $this->system->loadModel('goods/gtype'); $objType->checkDefined(); } }
/** * 清除回收站(一并删除规则) * * @access public * @return void */ function delete() { // 删除规则 $oDataSync = $this->system->loadModel('distribution/autosync'); $oDataSync->deleteRuleRelation($_POST['rule_id']); parent::delete(); }
function index($tmpid, $type = 'pic') { parent::index(array('params' => array('tmpid' => $tmpid, 'type' => $type))); }
function recycle() { parent::recycle(); $brand =& $this->system->loadModel('goods/brand'); $brand->brand2json(); }
function active() { $this->model->op_id = $this->system->op_id; $this->model->op_name = $this->system->op_name; parent::active(); $status =& $this->system->loadModel('system/status'); $status->count_order_to_pay(); $status->count_order_new(); $status->count_order_to_dly(); }
function select() { $args = func_get_args(); $v = unserialize(stripslashes($_POST['data'])); if ($v['cpns_type']) { $this->filterView = null; } parent::select(); }
function ctl_tmpimage() { parent::objectPage(); regex_file($_GET); }
function new_msg() { $result = array('no_handle' => 1); parent::index(array('params' => $result)); }
function index($node_id) { $this->pagedata['node_id'] = $node_id; $oArticle =& $this->system->loadModel('content/article'); parent::index(array('params' => array('node_id' => $node_id))); }
function save_cell_value($id, $key) { if ($key == "ordernum") { if (intval($_POST['data']) <= 0) { echo "排序必须为正整数"; exit; } } parent::save_cell_value($id, $key); }
function select() { $args = func_get_args(); $v = unserialize($_POST['data']); if ($v['cpns_type']) { $this->finder_filter_tpl = null; } parent::select(); }
function ctl_magicvars() { parent::objectPage(); $this->model->filter = 'and var_type= "custom"'; }