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


PHP sugar_cleanup函数代码示例

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


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


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