当前位置: 首页>>代码示例>>PHP>>正文


PHP vmc::service方法代码示例

本文整理汇总了PHP中vmc::service方法的典型用法代码示例。如果您正苦于以下问题:PHP vmc::service方法的具体用法?PHP vmc::service怎么用?PHP vmc::service使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vmc的用法示例。


在下文中一共展示了vmc::service方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save

 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, '品牌保存失败');
     }
 }
开发者ID:noikiy,项目名称:snk,代码行数:28,代码来源:brand.php

示例2: to_reply

 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, '内容不能为空');
     }
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:26,代码来源:msgbox.php

示例3: save

 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);
     }
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:27,代码来源:lv.php

示例4: dorecycle

 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;
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:60,代码来源:recycle.php

示例5: __construct

 function __construct()
 {
     $obj = vmc::service('base_charset');
     if ($obj instanceof base_charset_interface) {
         $this->set_instance($obj);
     }
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:7,代码来源:charset.php

示例6: setting

 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');
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:57,代码来源:pam.php

示例7: __destruct

 public function __destruct()
 {
     #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓记录管理员操作日志@lujy↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
     if ($obj_operatorlogs = vmc::service('operatorlog')) {
         if (method_exists($obj_operatorlogs, 'logSetTagInfo')) {
             $obj_operatorlogs->logSetTagInfo();
         }
     }
     #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑记录管理员操作日志@lujy↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
 }
开发者ID:noikiy,项目名称:snk,代码行数:10,代码来源:settag.php

示例8: get_encrypted_password

 /**
  * 得到自定义加密方式的密文
  * @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);
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:17,代码来源:encrypt.php

示例9: edit

 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');
 }
开发者ID:noikiy,项目名称:msk.com,代码行数:53,代码来源:member.php

示例10: save

 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;
 }
开发者ID:noikiy,项目名称:snk,代码行数:53,代码来源:goods.php

示例11: index

 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));
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:12,代码来源:recycle.php

示例12: display

 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;
     }
 }
开发者ID:noikiy,项目名称:snk.com,代码行数:52,代码来源:render.php

示例13: setDefault

 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);
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:13,代码来源:regionssetting.php

示例14: __construct

 /**
  * 实例对应的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();
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:18,代码来源:object.php

示例15: getList

 /**
  * 重写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;
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:18,代码来源:reship.php


注:本文中的vmc::service方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。