function save() { $this->begin('index.php?app=b2c&ctl=admin_brand&act=index'); $objBrand = $this->app->model('brand'); $brandname = $objBrand->dump(array('brand_name' => $_POST['brand_name'], 'brand_id')); if (empty($_POST['brand_id']) && is_array($brandname)) { $this->end(false, '品牌名重复'); } $_POST['ordernum'] = intval($_POST['ordernum']); $data = $this->_preparegtype($_POST); #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.goods')) { $olddata = app::get('b2c')->model('brand')->dump($_POST['brand_id']); } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ if ($objBrand->save($data)) { #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.goods')) { if (method_exists($obj_operatorlogs, 'brand_log')) { $obj_operatorlogs->brand_log($_POST, $olddata); } } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ $this->end(true, '品牌保存成功'); } else { $this->end(false, '品牌保存失败'); } }
function to_reply() { $this->begin("javascript:finderGroup[" . "'" . $_GET["finder_id"] . "'" . "].refresh()"); $comment_id = $_POST['comment_id']; $comment = $_POST['reply_content']; if ($comment_id && $comment) { $member_comments = vmc::singleton('b2c_message_msg'); if ($member_comments->to_reply($_POST)) { #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.members')) { if (method_exists($obj_operatorlogs, 'reply_comment')) { $sdf['comment'] = $comment_id; $sdf['title'] = $comment; $sdf['object_type'] = 'msg'; $obj_operatorlogs->reply_comment($sdf); } } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ $this->end(true, '回复成功'); } else { $this->end(false, '回复失败'); } } else { $this->end(false, '内容不能为空'); } }
function save() { $end_go = vmc::router()->gen_url(array('app' => 'b2c', 'ctl' => 'admin_member_lv', 'act' => 'index')); $this->begin($end_go); $objMemLv = $this->app->model('member_lv'); if ($objMemLv->validate($_POST, $msg)) { if ($_POST['member_lv_id']) { $olddata = app::get('b2c')->model('member_lv')->dump($_POST['member_lv_id']); } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ if ($objMemLv->save($_POST)) { #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.members')) { if (method_exists($obj_operatorlogs, 'member_lv_log')) { $newdata = app::get('b2c')->model('member_lv')->dump($_POST['member_lv_id']); $obj_operatorlogs->member_lv_log($newdata, $olddata); } } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ $this->end(true, '保存成功'); } else { $this->end(false, '保存失败'); } } else { $this->end(false, $msg); } }
function dorecycle($mdl_name, $filter = null) { $oRecycle = app::get('desktop')->model('recycle'); list($app_id, $table) = explode('_mdl_', $mdl_name); $o = app::get($app_id)->model($table); $recycle_item = array(); $recycle_item['drop_time'] = time(); $recycle_item['item_type'] = $o->table_name(); $dbschema = $o->get_schema(); $textColumn = $dbschema['textColumn']; $pkey = $dbschema['idColumn']; foreach ($dbschema['columns'] as $k => $col) { if ($col['is_title'] && $col['sdfpath']) { $textColumn = $col['sdfpath']; break; } } $rows = $o->getList('*', $filter, 0, -1); if (method_exists($o, 'pre_recycle')) { if (!$o->pre_recycle($rows)) { return false; } } $menus = app::get('desktop')->model('menus'); $permission_id = $menus->permissionId($_GET); foreach ($rows as $k => $v) { $pkey_value = $v[$pkey]; $v = $o->dump($v[$pkey], '*', 'delete'); $recycle_item['item_sdf'] = $v; $recycle_item['app_key'] = $app_id; $recycle_item['item_title'] = $v[$textColumn]; if (method_exists($o, 'title_recycle')) { $recycle_item['item_title'] = $o->title_recycle($v); } $tmp = $recycle_item; $tmp['permission'] = $permission_id; $return = $oRecycle->save($tmp); unset($tmp[$pkey]); $o->delete(array($pkey => $pkey_value)); #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.system')) { if (method_exists($obj_operatorlogs, 'dorecycle')) { $obj_operatorlogs->dorecycle($v); } } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ } if (method_exists($o, 'suf_recycle')) { if (!$o->suf_recycle($_POST)) { return false; } } $services = vmc::serviceList('desktop_finder_callback.' . get_class($o)); foreach ($services as $service) { if (method_exists($service, 'recycle')) { $service->recycle($_POST); } } return true; }
function __construct() { $obj = vmc::service('base_charset'); if ($obj instanceof base_charset_interface) { $this->set_instance($obj); } }
function setting($passport) { $passport_model = new $passport(); if ($_POST) { $this->begin('index.php?app=desktop&ctl=pam&act=index'); if ($_POST['site_passport_status'] === 'false') { if (!$this->checkpassport($passport_model)) { $this->end(false, '配置失败,前台必须开启一种认证方式'); } } #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.goods')) { $_predate = $passport_model->get_config(); } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ if (!$passport_model->set_config($_POST)) { if (!$_POST['error']) { $this->end(false, '配置失败'); } else { $this->end(false, $_POST['error']); } } else { #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.system')) { if (method_exists($obj_operatorlogs, 'pamsetting')) { $obj_operatorlogs->pamsetting($_predate, $passport_model->get_config()); } } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ $this->end(true, '配置成功'); } } $len = strlen($html); foreach ($passport_model->get_config() as $name => $config) { if ($config['editable'] == 'false' || isset($config['editable']) && !$config['editable']) { continue; } $input['name'] = $name; $input['title'] = $config['label']; $input['type'] = $config['type']; $input['required'] = $config['required']; if ($config['options']) { $input['options'] = $config['options']; } if ($config['value']) { $input['value'] = $config['value']; } $input[] = $input; } if ($len == strlen($html)) { $this->pagedata['basic'] = "true"; } $this->pagedata['html'] = $html; $this->pagedata['passport'] = $passport; echo 'TODO'; $this->page('pam.html'); }
public function __destruct() { #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog')) { if (method_exists($obj_operatorlogs, 'logSetTagInfo')) { $obj_operatorlogs->logSetTagInfo(); } } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ }
/** * 得到自定义加密方式的密文 * @param string $password 密码明文 * @param string $account_type 加密类型,对应的类文件 * @return string 返回加密后的密文 */ public static function get_encrypted_password($password, $account_type, $userdata = null) { $encrypt = vmc::service('encrypt_' . $account_type); if (is_object($encrypt) && $userdata) { if (method_exists($encrypt, 'get_encrypted')) { } } else { $encrypt = vmc::singleton('pam_encrypt_default'); } return $encrypt->get_encrypted($password, $account_type, $userdata); }
public function edit($member_id) { $app = app::get('b2c'); $member_model = $app->model('members'); $userPassport = vmc::singleton('b2c_user_passport'); $userObject = vmc::singleton('b2c_user_object'); if ($_POST) { $this->begin('index.php?app=b2c&ctl=admin_member&act=detail&p[0]=' . $_POST['member_id']); $saveData['b2c_members'] = $_POST; $member_id = $_POST['member_id']; unset($saveData['b2c_members']['pam_members']); //密码修改 if (($newpassword = $_POST['pam_account_repassword']) && trim($newpassword) != '') { $userPassport = vmc::singleton('b2c_user_passport'); if (!$userPassport->reset_passport($member_id, $newpassword)) { $this->end(false, '密码修改失败!'); } } //操作日志 if ($obj_operatorlogs = vmc::service('operatorlog.members')) { $olddata = app::get('b2c')->model('members')->dump($member_id); } if ($member_model->save($saveData['b2c_members'])) { //操作日志 if ($obj_operatorlogs = vmc::service('operatorlog.members')) { if (method_exists($obj_operatorlogs, 'detail_edit_log')) { $newdata = app::get('b2c')->model('members')->dump($member_id); $obj_operatorlogs->detail_edit_log($newdata['contact'], $olddata['contact']); } } //会员编辑成功后执行 foreach (vmc::servicelist('b2c.member.edit') as $object) { if (method_exists($object, 'exec')) { $object->exec($member_id); } } $this->end(true, '编辑成功'); } else { $this->end(false, '编辑失败'); } } $membersData = $userObject->get_members_data(array('account' => '*', 'members' => '*'), $member_id, false); $member_lv = $app->model('member_lv'); foreach ($member_lv->getMLevel() as $row) { $options[$row['member_lv_id']] = $row['name']; } $membersData['lv']['options'] = is_array($options) ? $options : array('请添加会员等级'); $membersData['lv']['value'] = $membersData['members']['member_lv_id']; $this->pagedata['mem'] = $membersData; $this->pagedata['attr'] = $userPassport->get_signup_attr($member_id); $this->pagedata['member_id'] = $member_id; $this->display('admin/member/edit.html'); }
public function save(&$goods, $mustUpdate = null, $mustInsert = false) { //随机商品管理ID $rand_gid = 'v' . str_pad(substr(preg_replace('/[a-z]|4/', '', uniqid()), -6), 8, rand(10, 99), STR_PAD_BOTH); if (!$goods['gid']) { $goods['gid'] = $rand_gid; } is_array($goods['product']) or $goods['product'] = array(); foreach ($goods['product'] as $pk => $pv) { if ($goods['goods_type']) { //product add goods_type default normal $goods['product'][$pk]['goods_type'] = $goods['goods_type']; } //随机货号 if (!$pv['bn']) { $goods['product'][$pk]['bn'] = 'bn' . str_pad(preg_replace('/[a-z]/', '', substr(uniqid(), -5)), 7, time(), STR_PAD_BOTH); } $goods['product'][$pk]['name'] = $goods['name']; } #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录编辑商品日志-start@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.goods')) { $addorrestore_goods_flag = false; if (empty($goods['goods_id'])) { //添加商品则为空 $addorrestore_goods_flag = true; if (method_exists($obj_operatorlogs, 'new_goods')) { $obj_operatorlogs->new_goods($goods['name']); } } else { //回收站恢复商品时判断 $isindb = $this->getList('goods_id', array('goods_id' => $goods['goods_id'])); if (!$isindb['0']['goods_id']) { $addorrestore_goods_flag = true; } } if (isset($addorrestore_goods_flag) && !$addorrestore_goods_flag) { $olddata = app::get('b2c')->model('goods')->dump($goods['goods_id'], '*', 'default'); } } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录编辑商品日志-end@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ $rs = parent::save($goods, $mustUpdate); #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录编辑商品日志-start@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.goods')) { if (method_exists($obj_operatorlogs, 'goods_log')) { if (isset($addorrestore_goods_flag) && !$addorrestore_goods_flag) { $newdata = app::get('b2c')->model('goods')->dump($goods['goods_id'], '*', 'default'); $obj_operatorlogs->goods_log($newdata, $olddata); } } } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录编辑商品日志-end@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ return $rs; }
function index() { return; $filter = array(); $filter_object = vmc::service('recycle_get_filter'); if ($filter_object && method_exists($filter_object, 'get_filter')) { $filter = $filter_object->get_filter(); } $per = $this->user->group(); $filter['recycle_permission'] = $per; $this->finder('desktop_mdl_recycle', array('title' => '回收站', 'use_buildin_recycle' => false, 'use_buildin_filter' => true, 'base_filter' => $filter)); }
public function display($tmpl_file, $app_id = null, $fetch = false, $is_theme = false) { array_unshift($this->_files, $tmpl_file); $this->_vars = $this->pagedata; if ($p = strpos($tmpl_file, ':')) { $object = vmc::service('tpl_source.' . substr($tmpl_file, 0, $p)); if ($object) { $tmpl_file_path = substr($tmpl_file, $p + 1); $last_modified = $object->last_modified($tmpl_file_path); } } else { if (defined('EXTENDS_DIR') && file_exists(EXTENDS_DIR . '/' . ($app_id ? $app_id : $this->app->app_id) . '/view/' . $tmpl_file)) { $tmpl_file = EXTENDS_DIR . '/' . ($app_id ? $app_id : $this->app->app_id) . '/view/' . $tmpl_file; } else { if (!$is_theme) { $tmpl_file = realpath(APP_DIR . '/' . ($app_id ? $app_id : $this->app->app_id) . '/view/' . $tmpl_file); } else { $tmpl_file = realpath(THEME_DIR . '/' . $tmpl_file); } } $last_modified = filemtime($tmpl_file); } if (!$last_modified) { trigger_error('未知VIEW', E_USER_ERROR); } $this->tmpl_cachekey('__temp_lang', vmc::get_lang()); //设置模版所属语言包 $this->tmpl_cachekey('__temp_app_id', $app_id ? $app_id : $this->app->app_id); $compile_id = $this->compile_id($tmpl_file); if ($this->force_compile || !cachemgr::get($compile_id . $last_modified, $compile_code)) { if ($object) { $compile_code = $this->_compiler()->compile($object->get_file_contents($tmpl_file_path)); } else { $compile_code = $this->_compiler()->compile_file($tmpl_file); } if ($compile_code !== false) { cachemgr::co_start(); cachemgr::set($compile_id . $last_modified, $compile_code, cachemgr::co_end()); } } ob_start(); eval('?>' . $compile_code); $content = ob_get_contents(); ob_end_clean(); array_shift($this->_files); $this->pre_display($content); if ($fetch === true) { return $content; } else { echo $content; } }
function setDefault() { set_time_limit(0); $this->begin('index.php?app=ectools&ctl=regionssetting&act=index'); $model = $this->app->model('regions'); $model->clearOldData(); $package = vmc::service('ectools_regions.ectools_mdl_regions'); $rs = $package->install(); if ($rs) { $this->end(vmc::singleton('ectools_regions_operation')->updateRegionData()); } $this->end($rs); }
/** * 实例对应的model. * * @params string $class_model 例如:b2c_mdl_members */ public function __construct($class_model) { //实例化要导出或导入的model $model = substr(stristr($class_model, 'mdl_'), 4); $app_id = substr($class_model, 0, strpos($class_model, '_mdl')); $this->model = app::get($app_id)->model($model); //导出导入数据组织扩展 $object = vmc::service('importexport.' . $class_model); if (is_object($object)) { $this->extends = $object; } $this->set_group(); }
/** * 重写getlist方法 */ public function getList($cols = '*', $filter = array(), $start = 0, $limit = -1, $orderType = null) { $arr_reship = parent::getList($cols, $filter, $start, $limit, $orderType); $obj_extends_service = vmc::servicelist('b2c.api_reship_extends_actions'); if ($obj_extends_service) { foreach ($obj_extends_service as $obj) { $obj->extend_list($arr_reship); } } $info_object = vmc::service('sensitive_information'); if (is_object($info_object)) { $info_object->opinfo($arr_reship, 'b2c_mdl_reship', __FUNCTION__); } return $arr_reship; }
public function filter($aConditions) { $oCond = vmc::singleton('b2c_sales_goods_aggregator_combine'); $sWhere = $oCond->filter($aConditions); $default_where = ' goods_type="normal" AND '; $end_where = $default_where . (empty($sWhere) ? ' 1 = 1' : $sWhere); #echo $end_where;exit; $sale_apply_service = vmc::service('sale_apply_service'); if (is_object($sale_apply_service) && method_exists($sale_apply_service, 'filter')) { $extends_where = $sale_apply_service->filter($aConditions, $end_where); return $extends_where; } else { return $end_where; } }
public function input_region($params) { $package = vmc::service('ectools_regions.ectools_mdl_regions'); $params['package'] = $package->key; if (!$params['callback']) { unset($params['callback']); } $render = app::get('ectools')->render(); $render->pagedata['params'] = $params; $area_depth = app::get('ectools')->getConf('system_area_depth'); $aDepth = array(); for ($i = 0; $i < $area_depth; $i++) { $aDepth[] = $i; } $render->pagedata['area_depth'] = $aDepth; $views = 'common/region.html'; return $render->fetch($views); }
public function _file($name) { if ($p = strpos($name, ':')) { $type = substr($name, 0, $p); $name = substr($name, $p + 1); if ($type == 'messenger') { $aTmp = explode('/', $name); $tmpl = explode('_', $aTmp[0]); $app_id = $tmpl[0]; $tmpl[0] = 'view/admin'; $html_dir = implode('/', $tmpl) . '/' . $aTmp[1]; $obj_app_id = vmc::service('seller_messenger_tpl_appid'); if ($obj_app_id && method_exists($obj_app_id, 'get_app_id')) { $obj_app_id->get_app_id($aTmp[1], $app_id); } $path = APP_DIR . '/' . $app_id . '/' . $html_dir . '.html'; return $path; } } else { return APP_DIR . '/seller/view/' . $name . '.html'; } }
public function save() { if ($_POST['no_redirect']) { //为了临时添加分类特殊处理 $this->begin(); } else { $redirect = 'index.php?app=b2c&ctl=admin_goods_cat&act=index'; if ($_POST['cat']['parent_id']) { $redirect = 'index.php?app=b2c&ctl=admin_goods_cat&act=index&p[0]=' . $_POST['cat']['parent_id']; } $this->begin($redirect); } if ($_POST['p_order'] === '') { $_POST['p_order'] = 0; } $cat_data = $_POST['cat']; $objCat = $this->app->model('goods_cat'); #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.goods')) { $olddata = $objCat->dump($_POST['cat']['cat_id']); } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ if ($objCat->save($cat_data)) { #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.goods')) { if (method_exists($obj_operatorlogs, 'goodscat_log')) { $obj_operatorlogs->goodscat_log($cat_data, $olddata); } } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ $the_cat = $objCat->dump($cat_data['cat_id']); $this->end(true, '保存成功', null, array('the_cat' => $the_cat)); } else { $this->end(false, '保存失败'); } }
/** * 删除指定id的地区信息. * * @params int region id * * @return bool 删除成功与否 */ public function toRemoveArea($regionId) { //$tmpRow = $this->model->db->selectrow("select region_path from ".$this->table_name(1)." where region_id=".intval($regionId)); $tmpRow = $this->model->dump(intval($regionId), 'region_path,local_name'); //$this->db->exec("DELETE FROM ".$this->table_name(1)." where region_id=".intval($regionId)); $this->model->delete(array('region_id' => intval($regionId))); #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.system')) { if (method_exists($obj_operatorlogs, 'removeArea')) { $obj_operatorlogs->removeArea($tmpRow['local_name']); } } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ // 删除相应的所有的下级地区 if ($this->toRemoveSubArea($tmpRow['region_path'])) { return $this->updateRegionData(); } return false; }
function _filter($filter, $tableAlias = null, $baseWhere = null) { if (isset($filter) && $filter && is_array($filter) && array_key_exists('member_login_name', $filter)) { $obj_pam_account = app::get('pam')->model('members'); $pam_filter = array('login_account|has' => $filter['member_login_name']); $row_pam = $obj_pam_account->getList('*', $pam_filter); $arr_member_id = array(); if ($row_pam) { foreach ($row_pam as $str_pam) { $arr_member_id[] = $str_pam['member_id']; } $filter['member_id|in'] = $arr_member_id; } else { if ($filter['member_login_name'] == '非会员顾客') { $filter['member_id'] = 0; } } unset($filter['member_login_name']); } foreach (vmc::servicelist('b2c_mdl_orders.filter') as $k => $obj_filter) { if (method_exists($obj_filter, 'extend_filter')) { $obj_filter->extend_filter($filter); } } $info_object = vmc::service('sensitive_information'); if (is_object($info_object)) { $info_object->opinfo($filter, 'b2c_mdl_orders', __FUNCTION__); } $filter = parent::_filter($filter); return $filter; }
public function page($view = '', $app_id = '') { $_SESSION['message'] = ''; $service = vmc::service(sprintf('desktop_controller_display.%s.%s.%s', $_GET['app'], $_GET['ctl'], $_GET['act'])); if ($service) { if (method_exists($service, 'get_file')) { $view = $service->get_file(); } if (method_exists($service, 'get_app_id')) { $app_id = $service->get_app_id(); } } if (!$view) { $view = 'common/default.html'; $app_id = 'desktop'; } ob_start(); parent::display($view, $app_id); $output = ob_get_contents(); ob_end_clean(); $output = $this->sidebar_active() . $output; $this->output($output); }
public function __destruct() { #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ if ($obj_operatorlogs = vmc::service('operatorlog.system')) { if (method_exists($obj_operatorlogs, 'logAdminLoginInfo')) { $obj_operatorlogs->logAdminLoginInfo($this); } } #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ }
public function init_query_info($query) { $query_info = $this->parse_query($query); $app_name = $this->_sitemap[$query_info['module']]['app']; $service = vmc::service('site_router.' . $app_name); if (is_object($service) && $service->enable()) { $this->_request->clear_params(); $service->modify_query($query_info); } $this->_query_info = $query_info; return $this; }
public function function_WIDGET_B2C_FAVORITE($params, &$smarty) { $render = new base_render(app::get('b2c')); $render->pagedata['advertising'] = vmc::service('b2c_source_member')->favorite_read($params); return $render->fetch('widget/advertising/login.left.html'); }
public function _filter($filter, $tableAlias = null, $baseWhere = null) { foreach (vmc::servicelist('b2c_mdl_members.filter') as $k => $obj_filter) { if (method_exists($obj_filter, 'extend_filter')) { $obj_filter->extend_filter($filter); } } if ($filter['login_account']) { $aData = app::get('pam')->model('members')->getList('member_id', array('login_account|head' => $filter['login_account'])); unset($filter['login_account']); if ($aData) { foreach ($aData as $key => $val) { $member[$key] = $val['member_id']; } $filter['member_id'] = $member; } else { return 0; } } $info_object = vmc::service('sensitive_information'); if (is_object($info_object)) { $info_object->opinfo($filter, 'b2c_mdl_members', __FUNCTION__); } $filter = parent::_filter($filter); return $filter; }
/** * 删除对应regions id 的地区. * * @params string region id */ public function toRemoveArea($regionId) { $this->begin(); $obj_regions_op = vmc::service('ectools_regions_apps', array('content_path' => 'ectools_regions_operation')); if ($obj_regions_op->toRemoveArea($regionId)) { $this->end(true, '删除地区成功!'); } else { $this->end(false, '删除地区失败!'); } }
/** * 获取当前会员用户名/或指定用户的用户名 */ public function get_seller_name($login_name = null, $seller_id = null) { if (!$login_name) { $seller_id = $seller_id ? $seller_id : $this->get_seller_id(); $pam_sellers_model = app::get('pam')->model('sellers'); $data = $pam_sellers_model->getList('*', array('seller_id' => $seller_id)); foreach ((array) $data as $row) { $arr_name[$row['login_type']] = $row['login_account']; } if (isset($arr_name['local'])) { $login_name = $arr_name['local']; } elseif (isset($arr_name['email'])) { $login_name = $arr_name['email']; } elseif (isset($arr_name['mobile'])) { $login_name = $arr_name['mobile']; } else { $login_name = current($arr_name); } } //信任登录用户名显示 $service = vmc::service('pam_account_login_name'); if (is_object($service)) { if (method_exists($service, 'get_login_name')) { $login_name = $service->get_login_name($login_name); } } return $login_name; }
public function page($detail) { header('Content-type: text/html; charset=utf-8'); $object = vmc::service('theme'); if ($object) { $object->display($detail); } else { $this->display($detail); } }
/** * 得到默认包的信息. * * @params null * * @return object servicename */ public function get_package_info() { return vmc::service('ectools_regions.ectools_mdl_regions'); }