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


PHP SugarApplication::redirect方法代码示例

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


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

示例1: action_archived

 function action_archived()
 {
     $this->bean->archived = 'true';
     $this->bean->won = '';
     $this->bean->save();
     SugarApplication::redirect('index.php?module=TILKEE_TILKS&action=DetailView&record=' . $this->bean->id);
 }
开发者ID:NeoArno,项目名称:tilkee-sugarcrm,代码行数:7,代码来源:controller.php

示例2: action_optimise

 function action_optimise()
 {
     set_time_limit(6000);
     $index = BeanFactory::getBean("AOD_Index")->getIndex();
     $index->optimise();
     SugarApplication::redirect('index.php?module=AOD_Index');
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:7,代码来源:controller.php

示例3: oauthLogin

 /**
  * OAuth Login
  *
  * @return bool Success or failure
  */
 public function oauthLogin()
 {
     global $sugar_config;
     $apiKey = $this->getConnector()->getProperty('oauth_consumer_key');
     if (!isset($_REQUEST['code'])) {
         $callback = $sugar_config['site_url'] . '/index.php?module=EAPM&action=oauth&record=' . $this->eapmBean->id;
         $callback = $this->formatCallbackURL($callback);
         $queryData = array('client_id' => $apiKey, 'redirect_uri' => $callback);
         SugarApplication::redirect($this->getOauthAuthURL() . '?' . http_build_query($queryData));
     } else {
         $code = $_REQUEST['code'];
         $queryData = array('grant_type' => 'authorization_code', 'code' => $code, 'client_id' => $apiKey);
         $accReq = $this->getOauthAccessURL() . '?' . http_build_query($queryData);
         $rawResponse = $this->makeRequest($accReq);
         if ($rawResponse && $rawResponse->isSuccessful()) {
             $response = json_decode($rawResponse->getBody(), true);
             if (!empty($response['access_token'])) {
                 $this->eapmBean->oauth_token = $response['access_token'];
                 $this->eapmBean->validated = 1;
                 $this->eapmBean->save();
                 return true;
             }
         }
         return false;
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:ExtAPIGoToMeeting.php

示例4: process

 /**
  * @see SugarView::process()
  */
 public function process()
 {
     global $current_user;
     if (!is_admin($current_user)) {
         sugar_die("Unauthorized access to administration.");
     }
     // Check if the theme is valid
     if (!isset($_REQUEST['theme']) || !in_array($_REQUEST['theme'], array_keys(SugarThemeRegistry::allThemes()))) {
         sugar_die("theme is invalid.");
     }
     if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'save') {
         $theme_config = SugarThemeRegistry::getThemeConfig($_REQUEST['theme']);
         $configurator = new Configurator();
         foreach ($theme_config as $name => $def) {
             if (isset($_REQUEST[$name])) {
                 if ($_REQUEST[$name] == 'true') {
                     $_REQUEST[$name] = true;
                 } else {
                     if ($_REQUEST[$name] == 'false') {
                         $_REQUEST[$name] = false;
                     }
                 }
                 $configurator->config['theme_settings'][$_REQUEST['theme']][$name] = $_REQUEST[$name];
             }
         }
         $configurator->handleOverride();
         SugarApplication::redirect('index.php?module=Administration&action=ThemeSettings');
         exit;
     }
     parent::process();
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:34,代码来源:view.themeconfigsettings.php

示例5: pre_login

 /**
  * pre_login
  * 
  * Override the pre_login function from SugarAuthenticate so that user is
  * redirected to SAML entry point if other is not specified
  */
 function pre_login()
 {
     parent::pre_login();
     if (empty($_REQUEST['no_saml'])) {
         SugarApplication::redirect('?entryPoint=SAML');
     }
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:13,代码来源:SAMLAuthenticate.php

示例6: logout

 public function logout()
 {
     session_destroy();
     ob_clean();
     $this->box->deleteSession();
     SugarApplication::redirect($this->box->loginUrl());
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:7,代码来源:SummerAuthenticate.php

示例7: action_desarchived

 function action_desarchived()
 {
     //$this->bean->status = 'activated';
     //$this->bean->won    = '';
     //$this->bean->save();
     $this->bean->update_from_API('', 'false');
     SugarApplication::redirect('index.php?module=TILKEE_PROJECTS&action=DetailView&record=' . $this->bean->id);
 }
开发者ID:NeoArno,项目名称:tilkee-sugarcrm,代码行数:8,代码来源:controller.php

示例8: preDisplay

 public function preDisplay()
 {
     if (!$GLOBALS['current_user']->isAdminForModule('Users')) {
         //instead of just dying here with unauthorized access will send the user back to his/her settings
         SugarApplication::redirect('index.php?module=Users&action=DetailView&record=' . $GLOBALS['current_user']->id);
     }
     $this->lv = new ListViewSmarty();
     $this->lv->delete = false;
     $this->lv->email = false;
 }
开发者ID:razorinc,项目名称:sugarcrm-example,代码行数:10,代码来源:view.list.php

示例9: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     if (isset($_FILES['vcard']['tmp_name']) && isset($_FILES['vcard']['size']) > 0) {
         $vcard = new vCard();
         $record = $vcard->importVCard($_FILES['vcard']['tmp_name'], $_REQUEST['module']);
         SugarApplication::redirect("index.php?action=DetailView&module={$_REQUEST['module']}&record={$record}");
     } else {
         SugarApplication::redirect("index.php?action=Importvcard&module={$_REQUEST['module']}");
     }
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:13,代码来源:view.importvcardsave.php

示例10: get_token_access

 function get_token_access($code = "SUGARCRM", $redirect_uri = "")
 {
     global $sugar_config, $current_user;
     $this->init_curl_session("/oauth/authorize", false);
     if (isset($sugar_config['tilkee']['client_id']) && !empty($sugar_config['tilkee']['client_id'])) {
         $get_parameters = array("response_type" => "token", "client_id" => $sugar_config['tilkee']['client_id'], "redirect_uri" => $sugar_config['site_url'] . '/retourToken.php');
         $url = $this->app_base_url . "/oauth/authorize?" . http_build_query($get_parameters);
         SugarApplication::redirect($url);
     }
 }
开发者ID:NeoArno,项目名称:tilkee-sugarcrm,代码行数:10,代码来源:ExtAPITilkee.php

示例11: action_generatePdfJava

 function action_generatePdfJava()
 {
     global $mod_string;
     $id = $_REQUEST['uid'];
     $templateID = $_REQUEST['templateID'];
     $path = "/var/www/vhosts/portadainmobiliaria.iatech.com.co/httpdocs/crm/custom/modules/AOS_Contracts/ReportGenerator.jar";
     $command = "/usr/bin/java -Djava.awt.headless=true -jar  {$path} {$id} {$templateID}";
     exec($command, $output);
     $this->printRequest($_REQUEST, $path, $id, $templateID, $output, $command);
     //SugarApplication::redirect('index.php?entryPoint=download&id='.$id.'&type=Notes');
     SugarApplication::redirect('index.php?module=AOS_Contracts&action=DetailView&record=' . $id . '#history');
 }
开发者ID:ekutor,项目名称:temis,代码行数:12,代码来源:controller.php

示例12: display

 public function display()
 {
     if (!SugarOAuthServer::enabled()) {
         sugar_die($GLOBALS['mod_strings']['LBL_OAUTH_DISABLED']);
     }
     global $current_user;
     if (!isset($_REQUEST['token']) && isset($_REQUEST['oauth_token'])) {
         $_REQUEST['token'] = $_REQUEST['oauth_token'];
     }
     $sugar_smarty = new Sugar_Smarty();
     $sugar_smarty->assign('APP', $GLOBALS['app_strings']);
     $sugar_smarty->assign('MOD', $GLOBALS['mod_strings']);
     $sugar_smarty->assign('token', $_REQUEST['token']);
     $sugar_smarty->assign('sid', session_id());
     $token = OAuthToken::load($_REQUEST['token']);
     if (empty($token) || empty($token->consumer) || $token->tstate != OAuthToken::REQUEST || empty($token->consumer_obj)) {
         sugar_die('Invalid token');
     }
     if (empty($_REQUEST['confirm'])) {
         $sugar_smarty->assign('consumer', sprintf($GLOBALS['mod_strings']['LBL_OAUTH_CONSUMERREQ'], $token->consumer_obj->name));
         // SM: roles disabled for now
         //            $roles = array('' => '');
         //            $allroles = ACLRole::getAllRoles();
         //            foreach($allroles as $role) {
         //                $roles[$role->id] = $role->name;
         //            }
         //            $sugar_smarty->assign('roles', $roles);
         $hash = md5(rand());
         $_SESSION['oauth_hash'] = $hash;
         $sugar_smarty->assign('hash', $hash);
         echo $sugar_smarty->fetch('modules/OAuthTokens/tpl/authorize.tpl');
     } else {
         if ($_REQUEST['sid'] != session_id() || $_SESSION['oauth_hash'] != $_REQUEST['hash']) {
             sugar_die('Invalid request');
         }
         $verify = $token->authorize(array("user" => $current_user->id));
         if (!empty($token->callback_url)) {
             $redirect_url = $token->callback_url;
             if (strchr($redirect_url, "?") !== false) {
                 $redirect_url .= '&';
             } else {
                 $redirect_url .= '?';
             }
             $redirect_url .= "oauth_verifier=" . $verify . '&oauth_token=' . $_REQUEST['token'];
             SugarApplication::redirect($redirect_url);
         }
         $sugar_smarty->assign('VERIFY', $verify);
         $sugar_smarty->assign('token', '');
         echo $sugar_smarty->fetch('modules/OAuthTokens/tpl/authorized.tpl');
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:51,代码来源:view.authorize.php

示例13: action_delete

 protected function action_delete()
 {
     if ($_REQUEST['record'] != $GLOBALS['current_user']->id && $GLOBALS['current_user']->isAdminForModule('Users')) {
         $u = new User();
         $u->retrieve($_REQUEST['record']);
         $u->deleted = 1;
         $u->status = 'Inactive';
         $u->employee_status = 'Terminated';
         $u->save();
         $GLOBALS['log']->info("User id: {$GLOBALS['current_user']->id} deleted user record: {$_REQUEST['record']}");
         SugarApplication::redirect("index.php?module=Employees&action=index");
     } else {
         sugar_die("Unauthorized access to administration.");
     }
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:15,代码来源:controller.php

示例14: action_log_autonote

 public function action_log_autonote()
 {
     //Load a notes bean
     $notes_bean = BeanFactory::getBean("Notes");
     //Create a new note and save it
     $notes_bean->name = "Leads autonote";
     $notes_bean->description = "This note is autologged for a lead.";
     $note_id = $notes_bean->save();
     //Load leads-notes relationship
     $lead_bean = BeanFactory::getBean("Leads", $_REQUEST["record"]);
     $lead_bean->load_relationship("notes");
     //Save relationship record
     $lead_bean->notes->add($note_id);
     $lead_bean->save();
     SugarApplication::redirect('index.php?module=Leads&action=DetailView&record=' . $_REQUEST["record"]);
 }
开发者ID:mihir-parikh,项目名称:sugarcrm_playground,代码行数:16,代码来源:controller.php

示例15: action_schedule_followup

 public function action_schedule_followup()
 {
     //Create a new Calls bean
     $calls_bean = BeanFactory::getBean("Calls");
     $calls_bean->name = "A followup call";
     $calls_bean->direction = "Outbound";
     $calls_bean->status = "Planned";
     $unix_timestamp = strtotime("+7 day");
     $datetime = date("Y-m-d H:i:s", $unix_timestamp);
     $calls_bean->date_start = $datetime;
     $calls_bean->duration_hours = 0;
     $calls_bean->duration_minutes = 30;
     $calls_bean->save();
     //Create a relationship
     $this->bean->load_relationship("calls");
     $this->bean->calls->add($calls_bean->id);
     SugarApplication::redirect("index.php?module=Contacts&action=DetailView&record=" . $this->bean->id);
 }
开发者ID:mihir-parikh,项目名称:sugarcrm_playground,代码行数:18,代码来源:controller.php


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