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


PHP delObjectVars函数代码示例

本文整理汇总了PHP中delObjectVars函数的典型用法代码示例。如果您正苦于以下问题:PHP delObjectVars函数的具体用法?PHP delObjectVars怎么用?PHP delObjectVars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: procMemberAdminInsert

 /**
  * @brief 사용자 추가 (관리자용)
  **/
 function procMemberAdminInsert()
 {
     // 필수 정보들을 미리 추출
     $args = Context::gets('member_srl', 'user_id', 'user_name', 'nick_name', 'homepage', 'blog', 'birthday', 'email_address', 'password', 'allow_mailing', 'allow_message', 'denied', 'is_admin', 'description', 'group_srl_list', 'limit_date');
     // 넘어온 모든 변수중에서 몇가지 불필요한 것들 삭제
     $all_args = Context::getRequestVars();
     unset($all_args->module);
     unset($all_args->act);
     // 모든 request argument에서 필수 정보만 제외 한 후 추가 데이터로 입력
     $extra_vars = delObjectVars($all_args, $args);
     $args->extra_vars = serialize($extra_vars);
     // member_srl이 넘어오면 원 회원이 있는지 확인
     if ($args->member_srl) {
         // 멤버 모델 객체 생성
         $oMemberModel =& getModel('member');
         // 회원 정보 구하기
         $member_info = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
         // 만약 원래 회원이 없으면 새로 입력하기 위한 처리
         if ($member_info->member_srl != $args->member_srl) {
             unset($args->member_srl);
         }
     }
     $oMemberController =& getController('member');
     // member_srl의 값에 따라 insert/update
     if (!$args->member_srl) {
         $output = $oMemberController->insertMember($args);
         $msg_code = 'success_registed';
     } else {
         $output = $oMemberController->updateMember($args);
         $msg_code = 'success_updated';
     }
     if (!$output->toBool()) {
         return $output;
     }
     // 서명 저장
     $signature = Context::get('signature');
     $oMemberController->putSignature($args->member_srl, $signature);
     // 결과 리턴
     $this->add('member_srl', $args->member_srl);
     $this->setMessage($msg_code);
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:44,代码来源:member.admin.controller.php

示例2: procNproductAdminUpdateItem

 /**
  * @brief update item
  **/
 function procNproductAdminUpdateItem()
 {
     $oMemberModel =& getModel('member');
     $oDocumentModel =& getModel('document');
     $oNproductModel =& getModel('nproduct');
     $oDocumentController =& getController('document');
     $item_srl = Context::get('item_srl');
     $module_srl = Context::get('disp_module_srl');
     $item_name = Context::get('item_name');
     $item_code = Context::get('item_code');
     $category_id = Context::get('category_id');
     $document_srl = Context::get('document_srl');
     $description = Context::get('description');
     $price = Context::get('price');
     $discount_amount = Context::get('discount_amount');
     $discount_info = Context::get('discount_info');
     $taxfree = Context::get('taxfree');
     $display = Context::get('display');
     $delivery_info = Context::get('delivery_info');
     $group_srl_list = Context::get('group_srl_list');
     // update document
     $doc_args->document_srl = $document_srl;
     //$doc_args->category_srl = $category_id;
     $doc_args->module_srl = $module_srl;
     $doc_args->content = $description;
     $doc_args->title = $item_name;
     $doc_args->list_order = $doc_args->document_srl * -1;
     $doc_args->tags = Context::get('tag');
     $doc_args->allow_comment = 'Y';
     $output = $oDocumentController->updateDocument($oDocumentModel->getDocument($document_srl), $doc_args);
     if (!$output->toBool()) {
         return $output;
     }
     if (Context::get('delete_file')) {
         $delete_file_srl = Context::get('delete_file');
         $this->deleteNproductFile($delete_file_srl, $item_srl);
     }
     // update item
     $args->item_srl = $item_srl;
     $args->item_name = $item_name;
     $args->item_code = $item_code;
     $args->module_srl = $module_srl;
     $args->node_route = 'f.';
     if ($category_id) {
         $args->category_id = $category_id;
         $category_info = $oNproductModel->getCategoryInfo($category_id);
         $args->node_route = 'f.';
         if ($category_info) {
             $args->node_route = $category_info->node_route . $category_info->node_id . '.';
         }
     }
     $args->proc_module = Context::get('proc_module');
     $args->document_srl = $document_srl;
     $args->price = $price;
     $args->discount_amount = $discount_amount;
     $args->discount_info = $discount_info;
     $args->taxfree = $taxfree;
     $args->display = $display;
     $args->delivery_info = $delivery_info;
     $args->group_srl_list = serialize($group_srl_list);
     $args->related_items = Context::get('related_items');
     $args->minimum_order_quantity = Context::get('minimum_order_quantity');
     $args->item_stock = Context::get('item_stock');
     if ($args->item_stock < 0) {
         $args->item_stock = -1;
     }
     // extras
     $extra_vars = $oNproductModel->getExtraVars($module_srl);
     $extra_vars = delObjectVars($extra_vars, $args);
     $args->extra_vars = serialize($extra_vars);
     // before
     $output = ModuleHandler::triggerCall('nproduct.updateItem', 'before', $args);
     if (!$output->toBool()) {
         return $output;
     }
     /*
      *  extra_vars update
      */
     foreach ($extra_vars as $key => $val) {
         $ex_args->item_srl = $item_srl;
         $ex_args->name = $key;
         $ex_args->value = $val->getValuePlain();
         $output = executeQuery('nproduct.deleteNproductExtraVars', $ex_args);
         if (!$output->toBool()) {
             return $output;
         }
         $output = executeQuery('nproduct.insertNproductExtraVars', $ex_args);
         if (!$output->toBool()) {
             return $output;
         }
     }
     /* 
      * end
      */
     $output = executeQuery('nproduct.updateItemAdmin', $args);
     if (!$output->toBool()) {
         return $output;
//.........这里部分代码省略.........
开发者ID:seoeun,项目名称:xe-module-nproduct,代码行数:101,代码来源:nproduct.admin.controller.php

示例3: procMemberModifyInfo

 /**
  * Edit member profile
  *
  * @return void|Object (void : success, Object : fail)
  */
 function procMemberModifyInfo()
 {
     if (!Context::get('is_logged')) {
         return $this->stop('msg_not_logged');
     }
     if ($_SESSION['rechecked_password_step'] != 'INPUT_DATA') {
         return $this->stop('msg_invalid_request');
     }
     unset($_SESSION['rechecked_password_step']);
     // Extract the necessary information in advance
     $oMemberModel =& getModel('member');
     $config = $oMemberModel->getMemberConfig();
     $getVars = array('find_account_answer', 'allow_mailing', 'allow_message');
     if ($config->signupForm) {
         foreach ($config->signupForm as $formInfo) {
             if ($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired)) {
                 $getVars[] = $formInfo->name;
             }
         }
     }
     $args = new stdClass();
     foreach ($getVars as $val) {
         $args->{$val} = Context::get($val);
         if ($val == 'birthday') {
             $args->birthday_ui = Context::get('birthday_ui');
         }
     }
     // Login Information
     $logged_info = Context::get('logged_info');
     $args->member_srl = $logged_info->member_srl;
     // mobile input date format can be different
     if ($args->birthday !== intval($args->birthday)) {
         $args->birthday = date('Ymd', strtotime($args->birthday));
     } else {
         $args->birthday = intval($args->birthday);
     }
     if (!$args->birthday && $args->birthday_ui) {
         $args->birthday = intval(strtr($args->birthday_ui, array('-' => '', '/' => '', '.' => '', ' ' => '')));
     }
     // Remove some unnecessary variables from all the vars
     $all_args = Context::getRequestVars();
     unset($all_args->module);
     unset($all_args->act);
     unset($all_args->member_srl);
     unset($all_args->is_admin);
     unset($all_args->description);
     unset($all_args->group_srl_list);
     unset($all_args->body);
     unset($all_args->accept_agreement);
     unset($all_args->signature);
     unset($all_args->_filter);
     unset($all_args->mid);
     unset($all_args->error_return_url);
     unset($all_args->ruleset);
     unset($all_args->password);
     // Add extra vars after excluding necessary information from all the requested arguments
     $extra_vars = delObjectVars($all_args, $args);
     $args->extra_vars = serialize($extra_vars);
     // remove whitespace
     $checkInfos = array('user_id', 'user_name', 'nick_name', 'email_address');
     foreach ($checkInfos as $val) {
         if (isset($args->{$val})) {
             $args->{$val} = preg_replace('/[\\pZ\\pC]+/u', '', $args->{$val});
         }
     }
     // Execute insert or update depending on the value of member_srl
     $output = $this->updateMember($args);
     if (!$output->toBool()) {
         return $output;
     }
     $profile_image = $_FILES['profile_image'];
     if (is_uploaded_file($profile_image['tmp_name'])) {
         $this->insertProfileImage($args->member_srl, $profile_image['tmp_name']);
     }
     $image_mark = $_FILES['image_mark'];
     if (is_uploaded_file($image_mark['tmp_name'])) {
         $this->insertImageMark($args->member_srl, $image_mark['tmp_name']);
     }
     $image_name = $_FILES['image_name'];
     if (is_uploaded_file($image_name['tmp_name'])) {
         $this->insertImageName($args->member_srl, $image_name['tmp_name']);
     }
     // Save Signature
     $signature = Context::get('signature');
     $this->putSignature($args->member_srl, $signature);
     // Get user_id information
     $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
     // Call a trigger after successfully modified (after)
     ModuleHandler::triggerCall('member.procMemberModifyInfo', 'after', $this->memberInfo);
     $this->setSessionInfo();
     // Return result
     $this->add('member_srl', $args->member_srl);
     $this->setMessage('success_updated');
     $site_module_info = Context::get('site_module_info');
     $this->_clearMemberCache($args->member_srl, $site_module_info->site_srl);
//.........这里部分代码省略.........
开发者ID:rhymix,项目名称:rhymix,代码行数:101,代码来源:member.controller.php

示例4: arrangeModuleInfo

 /**
  * @brief Arrange module information
  **/
 function arrangeModuleInfo(&$args, &$extra_vars)
 {
     // Remove unnecessary information
     unset($args->body);
     unset($args->act);
     unset($args->page);
     // Test mid value
     if (!preg_match("/^[a-z][a-z0-9_]+\$/i", $args->mid)) {
         return new Object(-1, 'msg_limit_mid');
     }
     // Test variables (separate basic vars and other vars in modules)
     $extra_vars = clone $args;
     unset($extra_vars->module_srl);
     unset($extra_vars->module);
     unset($extra_vars->module_category_srl);
     unset($extra_vars->layout_srl);
     unset($extra_vars->mlayout_srl);
     unset($extra_vars->use_mobile);
     unset($extra_vars->menu_srl);
     unset($extra_vars->site_srl);
     unset($extra_vars->mid);
     unset($extra_vars->is_skin_fix);
     unset($extra_vars->skin);
     unset($extra_vars->mskin);
     unset($extra_vars->browser_title);
     unset($extra_vars->description);
     unset($extra_vars->is_default);
     unset($extra_vars->content);
     unset($extra_vars->mcontent);
     unset($extra_vars->open_rss);
     unset($extra_vars->header_text);
     unset($extra_vars->footer_text);
     $args = delObjectVars($args, $extra_vars);
     return new Object();
 }
开发者ID:relip,项目名称:xe-core,代码行数:38,代码来源:module.controller.php

示例5: procMemberAdminInsert

 /**
  * Add a user (Administrator)
  * @return void|Object (void : success, Object : fail)
  */
 function procMemberAdminInsert()
 {
     // if(Context::getRequestMethod() == "GET") return new Object(-1, "msg_invalid_request");
     // Extract the necessary information in advance
     $logged_info = Context::get('logged_info');
     if ($logged_info->is_admin != 'Y' || !checkCSRF()) {
         return new Object(-1, 'msg_invalid_request');
     }
     $args = Context::gets('member_srl', 'email_address', 'find_account_answer', 'allow_mailing', 'allow_message', 'denied', 'is_admin', 'description', 'group_srl_list', 'limit_date');
     $oMemberModel =& getModel('member');
     $config = $oMemberModel->getMemberConfig();
     $getVars = array();
     if ($config->signupForm) {
         foreach ($config->signupForm as $formInfo) {
             if ($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired)) {
                 $getVars[] = $formInfo->name;
             }
         }
     }
     foreach ($getVars as $val) {
         $args->{$val} = Context::get($val);
     }
     $args->member_srl = Context::get('member_srl');
     if (Context::get('reset_password')) {
         $args->password = Context::get('reset_password');
     } else {
         unset($args->password);
     }
     // Remove some unnecessary variables from all the vars
     $all_args = Context::getRequestVars();
     unset($all_args->module);
     unset($all_args->act);
     unset($all_args->mid);
     unset($all_args->error_return_url);
     unset($all_args->success_return_url);
     unset($all_args->ruleset);
     if (!isset($args->limit_date)) {
         $args->limit_date = "";
     }
     unset($all_args->password);
     unset($all_args->password2);
     unset($all_args->reset_password);
     // Add extra vars after excluding necessary information from all the requested arguments
     $extra_vars = delObjectVars($all_args, $args);
     $args->extra_vars = serialize($extra_vars);
     // Check if an original member exists having the member_srl
     if ($args->member_srl) {
         // Create a member model object
         $oMemberModel = getModel('member');
         // Get memebr profile
         $columnList = array('member_srl');
         $member_info = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl, 0, $columnList);
         // If no original member exists, make a new one
         if ($member_info->member_srl != $args->member_srl) {
             unset($args->member_srl);
         }
     }
     // remove whitespace
     $checkInfos = array('user_id', 'nick_name', 'email_address');
     $replaceStr = array("\r\n", "\r", "\n", " ", "\t", "­");
     foreach ($checkInfos as $val) {
         if (isset($args->{$val})) {
             $args->{$val} = str_replace($replaceStr, '', $args->{$val});
         }
     }
     $oMemberController = getController('member');
     // Execute insert or update depending on the value of member_srl
     if (!$args->member_srl) {
         $args->password = Context::get('password');
         $output = $oMemberController->insertMember($args);
         $msg_code = 'success_registed';
     } else {
         $output = $oMemberController->updateMember($args);
         $msg_code = 'success_updated';
     }
     if (!$output->toBool()) {
         return $output;
     }
     // Save Signature
     $signature = Context::get('signature');
     $oMemberController->putSignature($args->member_srl, $signature);
     // Return result
     $this->add('member_srl', $args->member_srl);
     $this->setMessage($msg_code);
     $profile_image = $_FILES['profile_image'];
     if (is_uploaded_file($profile_image['tmp_name'])) {
         $oMemberController->insertProfileImage($args->member_srl, $profile_image['tmp_name']);
     }
     $image_mark = $_FILES['image_mark'];
     if (is_uploaded_file($image_mark['tmp_name'])) {
         $oMemberController->insertImageMark($args->member_srl, $image_mark['tmp_name']);
     }
     $image_name = $_FILES['image_name'];
     if (is_uploaded_file($image_name['tmp_name'])) {
         $oMemberController->insertImageName($args->member_srl, $image_name['tmp_name']);
     }
//.........这里部分代码省略.........
开发者ID:umjinsun12,项目名称:dngshin,代码行数:101,代码来源:member.admin.controller.php

示例6: insertItem

 function insertItem($in_args)
 {
     $oDocumentController =& getController('document');
     $oNproductModel =& getModel('nproduct');
     $oModuleModel =& getModel('module');
     $logged_info = Context::get('logged_info');
     if (!$logged_info) {
         return new Object(-1, 'msg_login_required');
     }
     $module_srl = $in_args->module_srl;
     $item_code = $in_args->item_code;
     $item_name = $in_args->item_name;
     $category_id = $in_args->category_id;
     $document_srl = $in_args->document_srl;
     $description = $in_args->description;
     //$delivery_info = Context::get('delivery_info');
     $price = $in_args->price;
     $taxfree = $in_args->taxfree;
     $display = $in_args->display;
     if (!$module_srl || !$item_name || !$display) {
         return new Object(-1, 'msg_invalid_request');
     }
     $category_info = $oNproductModel->getCategoryInfo($category_id);
     if ($category_info) {
         $node_route = $category_info->node_route . $category_info->node_id . '.';
     } else {
         $node_route = 'f.';
     }
     $item_srl = getNextSequence();
     if (!$item_code) {
         $item_code = $item_srl;
     }
     // insert document
     if (!$document_srl) {
         $document_srl = getNextSequence();
     }
     $doc_args->document_srl = $document_srl;
     //$doc_args->category_srl = $category_id;
     $doc_args->module_srl = $module_srl;
     $doc_args->content = $description;
     $doc_args->title = $item_name;
     $doc_args->list_order = $doc_args->document_srl * -1;
     $doc_args->tags = Context::get('tag');
     $doc_args->allow_comment = 'Y';
     $output = $oDocumentController->insertDocument($doc_args);
     if (!$output->toBool()) {
         return $output;
     }
     unset($doc_args);
     // default delivery_info
     $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
     $delivery_info = $module_info->delivery_info;
     // insert item
     $extra_vars = $oNproductModel->getExtraVars($module_srl);
     $args->item_srl = $item_srl;
     $args->item_code = $item_code;
     $args->item_name = $item_name;
     $args->module_srl = $module_srl;
     $args->category_id = $category_id;
     $args->proc_module = $in_args->proc_module;
     $args->node_route = $node_route;
     $args->document_srl = $document_srl;
     $args->price = $price;
     $args->taxfree = $taxfree;
     $args->display = $display;
     $args->delivery_info = $delivery_info;
     $args->list_order = $item_srl * -1;
     $extra_vars = delObjectVars($extra_vars, $args);
     $args->extra_vars = serialize($extra_vars);
     $output = executeQuery('nproduct.insertItem', $args);
     if (!$output->toBool()) {
         return $output;
     }
     $output = new Object();
     $output->add('item_srl', $item_srl);
     return $output;
 }
开发者ID:umjinsun12,项目名称:dngshin,代码行数:77,代码来源:nproduct.controller.php

示例7: procMemberModifyInfo

 /**
  * @brief 회원 정보 수정
  **/
 function procMemberModifyInfo()
 {
     if (!Context::get('is_logged')) {
         return $this->stop('msg_not_logged');
     }
     // 필수 정보들을 미리 추출
     $args = Context::gets('user_name', 'nick_name', 'homepage', 'blog', 'birthday', 'email_address', 'allow_mailing');
     // 로그인 정보
     $logged_info = Context::get('logged_info');
     $args->member_srl = $logged_info->member_srl;
     // 넘어온 모든 변수중에서 몇가지 불필요한 것들 삭제
     $all_args = Context::getRequestVars();
     unset($all_args->module);
     unset($all_args->act);
     unset($all_args->is_admin);
     unset($all_args->description);
     unset($all_args->group_srl_list);
     unset($all_args->body);
     unset($all_args->accept_agreement);
     unset($all_args->signature);
     // 모든 request argument에서 필수 정보만 제외 한 후 추가 데이터로 입력
     $extra_vars = delObjectVars($all_args, $args);
     $args->extra_vars = serialize($extra_vars);
     // 멤버 모델 객체 생성
     $oMemberModel =& getModel('member');
     // member_srl의 값에 따라 insert/update
     $output = $this->updateMember($args);
     if (!$output->toBool()) {
         return $output;
     }
     // 서명 저장
     $signature = Context::get('signature');
     $this->putSignature($args->member_srl, $signature);
     // user_id 에 따른 정보 가져옴
     $member_info = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
     // 로그인 성공후 trigger 호출 (after)
     $trigger_output = ModuleHandler::triggerCall('member.doLogin', 'after', $member_info);
     if (!$trigger_output->toBool()) {
         return $trigger_output;
     }
     $this->setSessionInfo($member_info);
     // 결과 리턴
     $this->add('member_srl', $args->member_srl);
     $this->setMessage('success_updated');
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:48,代码来源:member.controller.php

示例8: arrangeModuleInfo

 /**
  * @brief 모듈 정보 정리
  **/
 function arrangeModuleInfo(&$args, &$extra_vars)
 {
     // 불필요한 내용 제거
     unset($args->body);
     unset($args->act);
     unset($args->page);
     // mid값 검사
     if (!ereg("^[a-zA-Z][a-zA-Z0-9_]+", $args->mid)) {
         return new Object(-1, 'msg_limit_mid');
     }
     // 변수를 검사 (modules의 기본 변수와 그렇지 않은 변수로 분리)
     $extra_vars = clone $args;
     unset($extra_vars->module_srl);
     unset($extra_vars->module);
     unset($extra_vars->module_category_srl);
     unset($extra_vars->layout_srl);
     unset($extra_vars->menu_srl);
     unset($extra_vars->site_srl);
     unset($extra_vars->mid);
     unset($extra_vars->skin);
     unset($extra_vars->browser_title);
     unset($extra_vars->description);
     unset($extra_vars->is_default);
     unset($extra_vars->content);
     unset($extra_vars->open_rss);
     unset($extra_vars->header_text);
     unset($extra_vars->footer_text);
     $args = delObjectVars($args, $extra_vars);
     return new Object();
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:33,代码来源:module.controller.php


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