• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP sugar_cleanup函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: logout

 /**
  * Called when a user requests to logout
  *
  * Override default behavior. Redirect user to special "Logged Out" page in
  * order to prevent automatic logging in.
  */
 public function logout()
 {
     session_destroy();
     ob_clean();
     header('Location: index.php?module=Users&action=LoggedOut');
     sugar_cleanup(true);
 }
开发者ID:switcode,项目名称:SuiteCRM,代码行数:13,代码来源:SAMLAuthenticate.php


示例2: pre_save

 public function pre_save()
 {
     require_once 'include/upload_file.php';
     $upload_file = new UploadFile('filename_file');
     if (isset($_FILES['filename_file']) && $upload_file->confirm_upload()) {
         $filename = $upload_file->get_stored_file_name();
         $file_ext = $upload_file->file_ext;
         if (empty($this->bean->id)) {
             $this->bean->id = create_guid();
             $this->bean->new_with_id = true;
         }
         $account = null;
         if (isset($_POST['xphotobucketaccount_id'])) {
             $account = BeanFactory::getBean('xPhotobucketAccounts', $_POST['xphotobucketaccount_id']);
         }
         // $resp = $account->upload_media('image', $upload_file->temp_file_location, "{$this->bean->id}.{$file_ext}", $_POST['name']);
         $resp = $account->upload_media('base64', base64_encode(file_get_contents($upload_file->temp_file_location)), "{$this->bean->id}.{$file_ext}", $_POST['name']);
         $this->bean->browse_url = $resp['browseurl'];
         $this->bean->image_url = $resp['url'];
         $this->bean->thumb_url = $resp['thumb'];
     } else {
         echo "Upload file error";
         sugar_cleanup(true);
     }
     parent::pre_save();
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:26,代码来源:controller.php


示例3: preDisplay

 public function preDisplay()
 {
     if (!$this->bean->ACLAccess('edit')) {
         ACLController::displayNoAccess();
         sugar_cleanup(true);
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:7,代码来源:view.convertlead.php


示例4: listViewProcess

 function listViewProcess()
 {
     $GLOBALS['log'] = LoggerManager::getLogger('SugarCRM');
     global $sugar_config;
     global $current_user;
     global $app_strings;
     global $timedate;
     $type = clean_string($_REQUEST['module']);
     $db = DBManagerFactory::getInstance();
     /* $query = $_REQUEST['query'];
        if($query){
            $ret_array = generateSearchWhere($type, $_REQUEST['current_post']);
            $w = $ret_array['where'];
            $where = "IN ( SELECT id from grouplists WHERE ".$w .")";  
        }
        else{
            $where = '';
        } */
     /*$ids = $_REQUEST['uid']; 
                 if($ids) {
                     $ids = explode(',', $ids);
                     $ids = "'" . implode("','", $ids) . "'";
                     $where = "in ($ids)";
                 } 
                 else if (isset($_REQUEST['all']) ){
                         $where = '';//get all
     
                     } else {
                         if(!empty($_REQUEST['current_post'])) {
                             $ret_array = generateSearchWhere($type, $_REQUEST['current_post']);
     
                             $w = $ret_array['where'];
                             $where = "IN ( SELECT id from grouplists WHERE ".$w .")";
     
                         } else {
                             $where = '';
                         }
                 }*/
     $focus = new GroupLists();
     // $query = $focus->create_new_list_query($order_by, $where,$filter=array(),$params=array(), $show_deleted = 0,$join_type='', $return_array = false, $parentbean=null, $singleSelect = false);
     $query = $focus->{$start_date} = $_REQUEST['start_date'];
     $end_date = $_REQUEST['end_date'];
     $template = file_get_contents('modules/GroupLists/tpls/report.tpl');
     $template = str_replace('{START}', $start_date, $template);
     $template = str_replace('{END}', $end_date, $template);
     $template = str_replace('{LIST_GIT}', $focus->get_GIT_to_report($where), $template);
     $template = str_replace('{LIST_FIT}', $focus->get_FIT_to_report($where), $template);
     $size = strlen($template);
     $filename = "DS KHACH DI TOUR TU " . $start_date . " DEN " . $end_date . ".doc";
     ob_end_clean();
     header("Cache-Control: private");
     header("Content-Type: application/force-download;");
     header("Content-Disposition:attachment; filename=\"{$filename}\"");
     header("Content-length:{$size}");
     echo $template;
     ob_flush();
     //    header("Location: index.php?module=GroupLists&action=index");
     sugar_cleanup(true);
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:59,代码来源:view.reportcustomer.php


示例5: sugarDie

 /**
  * Die with status code 403 Forbidden as the request was understood but is refusing to fulfill it.
  * @param $message
  */
 private function sugarDie($message)
 {
     @header("HTTP/1.0 403 Forbidden");
     @header("Status: 403 Forbidden");
     sugar_cleanup();
     echo $message;
     die;
 }
开发者ID:svnvcristea,项目名称:pslib,代码行数:12,代码来源:Entry.php


示例6: back

 function back()
 {
     ob_clean();
     if (!empty($_SESSION['studio']['module'])) {
         header('Location: index.php?action=wizard&module=Studio&wizard=SelectModuleAction');
         sugar_cleanup(true);
     }
     header('Location: index.php?action=wizard&module=Studio&wizard=StudioWizard');
     sugar_cleanup(true);
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:10,代码来源:EditDropDownWizard.php


示例7: display

 public function display()
 {
     if (!isset($this->view_object_map['jsonData']) || !is_array($this->view_object_map['jsonData'])) {
         $GLOBALS['log']->fatal("JSON data has not been passed from Calendar controller");
         sugar_cleanup(true);
     }
     $jsonData = $this->view_object_map['jsonData'];
     ob_clean();
     echo json_encode($jsonData);
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:10,代码来源:view.json.php


示例8: action_editview

 function action_editview()
 {
     $this->view = 'edit';
     $GLOBALS['view'] = $this->view;
     if (!empty($_REQUEST['deleteAttachment'])) {
         ob_clean();
         echo $this->bean->deleteAttachment($_REQUEST['isDuplicate']) ? 'true' : 'false';
         sugar_cleanup(true);
     }
 }
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:10,代码来源:controller.php


示例9: preDisplay

 function preDisplay()
 {
     $this->sugarpdfBean = SugarpdfFactory::loadSugarpdf($this->sugarpdf, $this->module, $this->bean, $this->view_object_map);
     // ACL control
     if (!empty($this->bean) && !$this->bean->ACLAccess($this->sugarpdfBean->aclAction)) {
         ACLController::displayNoAccess(true);
         sugar_cleanup(true);
     }
     if (isset($this->errors)) {
         $this->sugarpdfBean->errors = $this->errors;
     }
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:12,代码来源:view.sugarpdf.php


示例10: notify

 /**
  * notify
  * Soap implementation to notify the soap clients of a resource management error
  * @param msg String message to possibly display
  */
 public function notify($msg = '')
 {
     header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error');
     header('Content-Type: text/xml; charset="ISO-8859-1"');
     $error = new SoapError();
     $error->set_error('resource_management_error');
     //Override the description
     $error->description = $msg;
     $this->soapServer->methodreturn = array('result' => $msg, 'error' => $error->get_soap_array());
     $this->soapServer->serialize_return();
     $this->soapServer->send_response();
     sugar_cleanup(true);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:18,代码来源:SoapResourceObserver.php


示例11: display

 function display()
 {
     $focus = BeanFactory::getBean('Notifications', empty($_REQUEST['record']) ? "" : $_REQUEST['record']);
     if (!empty($focus->id)) {
         //Mark as read.
         $focus->is_read = true;
         $focus->save(FALSE);
     }
     $results = array('contents' => $this->_formatNotificationForDisplay($focus));
     $json = getJSONobj();
     $out = $json->encode($results);
     ob_clean();
     print $out;
     sugar_cleanup(true);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:15,代码来源:view.quickview.php


示例12: action_delete

 protected function action_delete()
 {
     global $current_user;
     //do any pre delete processing
     //if there is some custom logic for deletion.
     if (!empty($_REQUEST['record'])) {
         if (!is_admin($current_user) && $this->bean->assigned_user_id != $current_user->id) {
             ACLController::displayNoAccess(true);
             sugar_cleanup(true);
         }
         $this->bean->mark_deleted($_REQUEST['record']);
     } else {
         sugar_die("A record number must be specified to delete");
     }
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:15,代码来源:controller.php


示例13: action_import

 function action_import()
 {
     if (!empty($_REQUEST['ebay_account_name'])) {
         $name = $_REQUEST['ebay_account_name'];
         $bean = BeanFactory::getBean('xeBayAccounts');
         $accounts = $bean->get_accounts($name);
     }
     $categories = new GetCategories();
     foreach ($accounts as $id => $authToken) {
         $count = $categories->retrieveCategories(array('AccountID' => $id, 'AuthToken' => $authToken));
     }
     if (isset($_REQUEST['return_module']) && isset($_REQUEST['return_action']) && isset($_REQUEST['return_id'])) {
         $this->redirect_url = "index.php?module={$_REQUEST['return_module']}&action={$_REQUEST['return_action']}&record={$_REQUEST['return_id']}";
     } else {
         sugar_cleanup(true);
     }
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:17,代码来源:controller.php


示例14: action_removeAllRecurrences

 protected function action_removeAllRecurrences()
 {
     if (!empty($this->bean->repeat_parent_id)) {
         $id = $this->bean->repeat_parent_id;
         $this->bean->retrieve($id);
     } else {
         $id = $this->bean->id;
     }
     if (!$this->bean->ACLAccess('Delete')) {
         ACLController::displayNoAccess(true);
         sugar_cleanup(true);
     }
     require_once "modules/Calendar/CalendarUtils.php";
     CalendarUtils::markRepeatDeleted($this->bean);
     $this->bean->mark_deleted($id);
     header("Location: index.php?module=Meetings");
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:17,代码来源:controller.php


示例15: action_photobucketlogin

 function action_photobucketlogin()
 {
     $module = !empty($this->return_module) ? $this->return_module : $this->module;
     $action = !empty($this->return_action) ? $this->return_action : 'DetailView';
     $url = "index.php?module=" . $module . "&action=" . $action;
     if (!empty($_REQUEST['record'])) {
         $url .= "&record=" . $_REQUEST['record'];
     }
     $request_token = $this->bean->get_request_token();
     if ($request_token === false) {
         sugar_cleanup(true);
     }
     if (!empty($_REQUEST['name'])) {
         $url .= "&name=" . $_REQUEST['name'];
     }
     $url .= "&{$request_token}";
     $this->set_redirect($url);
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:18,代码来源:controller.php


示例16: process

 function process($option)
 {
     switch ($option) {
         case 'SelectModuleWizard':
             require_once 'modules/Studio/wizards/' . $option . '.php';
             $newWiz = new $option();
             $newWiz->display();
             break;
         case 'EditDropDownWizard':
             require_once 'modules/Studio/wizards/' . $option . '.php';
             $newWiz = new $option();
             $newWiz->display();
             break;
         case 'ConfigureTabs':
             header('Location: index.php?module=Administration&action=ConfigureTabs');
             sugar_cleanup(true);
         case 'RenameTabs':
             $_REQUEST['dropdown_name'] = 'moduleList';
             require_once 'modules/Studio/wizards/EditDropDownWizard.php';
             $newWiz = new EditDropDownWizard();
             $newWiz->process('EditDropdown');
             break;
         case 'ConfigureGroupTabs':
             require_once 'modules/Studio/TabGroups.php';
             break;
         case 'Workflow':
             header('Location: index.php?module=WorkFlow&action=ListView');
             sugar_cleanup(true);
         case 'Portal':
             header('Location: index.php?module=iFrames&action=index');
             sugar_cleanup(true);
         case 'RepairCustomFields':
             header('Location: index.php?module=Administration&action=UpgradeFields');
             sugar_cleanup(true);
         case 'MigrateCustomFields':
             header('LOCATION: index.php?module=Administration&action=Development');
             sugar_cleanup(true);
         case 'Classic':
             header('Location: index.php?module=DynamicLayout&action=index');
             sugar_cleanup(true);
         default:
             $this->display();
     }
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:44,代码来源:StudioWizard.php


示例17: display

 function display()
 {
     global $popupMeta, $mod_strings;
     if ($this->bean instanceof SugarBean && !$this->bean->ACLAccess('list')) {
         ACLController::displayNoAccess();
         sugar_cleanup(true);
     }
     if (isset($_REQUEST['metadata']) && strpos($_REQUEST['metadata'], "..") !== false) {
         ACLController::displayNoAccess();
         sugar_cleanup(true);
     }
     $popupMeta = SugarAutoLoader::loadPopupMeta($this->module, isset($_REQUEST['metadata']) ? $_REQUEST['metadata'] : null);
     $defs = $this->loadWithPopup('listviewdefs');
     if (is_array($defs)) {
         $listViewDefs[$this->module] = $defs;
     } elseif (!empty($defs)) {
         require $defs;
     }
     $defs = $this->loadWithPopup('searchdefs');
     if (is_array($defs)) {
         $searchdefs[$this->module]['layout']['advanced_search'] = $defs;
     } elseif (!empty($defs)) {
         require $defs;
     }
     if (!empty($this->bean) && isset($_REQUEST[$this->module . '2_' . strtoupper($this->bean->object_name) . '_offset'])) {
         //if you click the pagination button, it will populate the search criteria here
         if (!empty($_REQUEST['current_query_by_page'])) {
             $blockVariables = array('mass', 'uid', 'massupdate', 'delete', 'merge', 'selectCount', 'lvso', 'sortOrder', 'orderBy', 'request_data', 'current_query_by_page');
             $current_query_by_page = unserialize(base64_decode($_REQUEST['current_query_by_page']));
             foreach ($current_query_by_page as $search_key => $search_value) {
                 if ($search_key != $this->module . '2_' . strtoupper($this->bean->object_name) . '_offset' && !in_array($search_key, $blockVariables)) {
                     $_REQUEST[$search_key] = $GLOBALS['db']->quote($search_value);
                 }
             }
         }
     }
     foreach (SugarAutoLoader::existing('modules/' . $this->module . '/Popup_picker.php', 'include/Popups/Popup_picker.php') as $file) {
         require_once $file;
         break;
     }
     $popup = new Popup_Picker();
     $popup->_hide_clear_button = true;
     echo $popup->process_page();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:44,代码来源:view.popup.php


示例18: Popup_Picker

 /**
  * Creates a new Popup_Picker object. Controls displaying of single select and multi select popups
  *
  */
 function Popup_Picker()
 {
     global $currentModule, $popupMeta;
     // cn: bug 12269 - directory navigation attack - detect and stop.
     if (isset($_REQUEST['metadata']) && strpos($_REQUEST['metadata'], "..") !== false) {
         ACLController::displayNoAccess();
         sugar_cleanup(true);
     }
     if (empty($popupMeta)) {
         $popupMeta = SugarAutoLoader::loadPopupMeta($currentModule, isset($_REQUEST['metadata']) ? $_REQUEST['metadata'] : null);
     }
     $this->_popupMeta = $popupMeta;
     require_once 'modules/' . $currentModule . '/' . $this->_popupMeta['moduleMain'] . '.php';
     if (isset($this->_popupMeta['create']['formBase']) && isset($_REQUEST['create']) && $_REQUEST['create'] == 'true') {
         // include create form
         require_once 'modules/' . $currentModule . '/' . $this->_popupMeta['create']['formBase'];
         $this->_create = true;
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:23,代码来源:Popup_picker.php


示例19: action_connectnow

 function action_connectnow()
 {
     $module = !empty($this->return_module) ? $this->return_module : $this->module;
     $action = !empty($this->return_action) ? $this->return_action : 'DetailView';
     $url = "index.php?module=" . $module . "&action=" . $action;
     if (!empty($_REQUEST['record'])) {
         $url .= "&record=" . $_REQUEST['record'];
     }
     $x = new GetSessionID();
     $session_id = $x->dispatchCall(array());
     if ($session_id === false) {
         sugar_cleanup(true);
     }
     if (!empty($_REQUEST['name'])) {
         $url .= "&name=" . $_REQUEST['name'];
     }
     $url .= "&session_id=" . $session_id;
     $this->set_redirect($url);
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:19,代码来源:controller.php


示例20: action_saveactivity

 /**
  * Action SaveActivity
  */
 protected function action_saveactivity()
 {
     $this->view = 'json';
     if (!$this->retrieveCurrentBean('Save')) {
         return;
     }
     $module = $this->currentBean->module_dir;
     $bean = $this->currentBean;
     $path = "modules/{$bean->module_dir}/{$bean->object_name}FormBase.php";
     if (!SugarAutoLoader::fileExists($path)) {
         $GLOBALS['log']->fatal("File {$bean->object_name}FormBase.php doesn't exist");
         sugar_cleanup(true);
     }
     require_once $path;
     $FBObjectName = "{$bean->object_name}FormBase";
     if (!class_exists($FBObjectName)) {
         $GLOBALS['log']->fatal("Class {$bean->object_name}FormBase doesn't exist");
         sugar_cleanup(true);
     }
     $formBase = new $FBObjectName();
     $isRecurring = false;
     if ($formBase->prepareRecurring()) {
         if ($limit = $formBase->checkRecurringLimitExceeded()) {
             $this->view_object_map['jsonData'] = $jsonData = array('access' => 'yes', 'limit_error' => 'true', 'limit' => $limit);
             return;
         }
         $isRecurring = true;
     }
     $bean = $formBase->handleSave('', false, false);
     if ($record = $bean->id) {
         $bean->retrieve($record);
         $jsonData = CalendarUtils::getBeanDataArray($bean);
         if ($isRecurring) {
             $jsonData = array_merge($jsonData, array('repeat' => $formBase->getRecurringCreated()));
         }
         if (!empty($_REQUEST['edit_all_recurrences'])) {
             $jsonData['edit_all_recurrences'] = 'true';
         }
     } else {
         $jsonData = array('access' => 'no');
     }
     $this->view_object_map['jsonData'] = $jsonData;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:46,代码来源:controller.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP sugar_die函数代码示例发布时间:2022-05-23
下一篇:
PHP sugar_chmod函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap