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


PHP SugarView::process方法代码示例

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


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

示例1: process

 /**
  * @see SugarView::process()
  */
 public function process()
 {
     global $current_user;
     if (!is_admin($current_user)) {
         sugar_die("Unauthorized access to administration.");
     }
     // Check if default_theme is valid
     if (isset($_REQUEST['default_theme']) && !in_array($_REQUEST['default_theme'], array_keys(SugarThemeRegistry::allThemes()))) {
         sugar_die("Default theme is invalid.");
     }
     if (isset($_REQUEST['disabled_themes'])) {
         $toDecode = html_entity_decode($_REQUEST['disabled_themes'], ENT_QUOTES);
         $disabledThemes = json_decode($toDecode, true);
         if (($key = array_search(SugarThemeRegistry::current()->__toString(), $disabledThemes)) !== FALSE) {
             unset($disabledThemes[$key]);
         }
         $_REQUEST['disabled_themes'] = implode(',', $disabledThemes);
         $configurator = new Configurator();
         $configurator->config['disabled_themes'] = $_REQUEST['disabled_themes'];
         $configurator->config['default_theme'] = $_REQUEST['default_theme'];
         $configurator->handleOverride();
         echo "true";
     } else {
         parent::process();
     }
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:29,代码来源:view.themesettings.php

示例2: process

 /**
  * @see SugarView::process()
  */
 public function process()
 {
     global $current_user;
     if (is_admin($current_user) && isset($_REQUEST['disabled_themes'])) {
         $_REQUEST['disabled_themes'] = explode(',', $_REQUEST['disabled_themes']);
         if (($key = array_search(SugarThemeRegistry::current()->__toString(), $_REQUEST['disabled_themes'])) !== FALSE) {
             unset($_REQUEST['disabled_themes'][$key]);
         }
         $_REQUEST['disabled_themes'] = implode(',', $_REQUEST['disabled_themes']);
         $configurator = new Configurator();
         $configurator->config['disabled_themes'] = $_REQUEST['disabled_themes'];
         $configurator->handleOverride();
     }
     parent::process();
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:18,代码来源:view.themesettings.php

示例3: process

 function process()
 {
     $account = BeanFactory::getBean('xeBayAccounts', $this->bean->xebayaccount_id);
     $subject = $_REQUEST['subject'];
     $message = $_REQUEST['message'];
     $questionType = $_REQUEST['question_type'];
     $itemID = $_REQUEST['item_id'];
     if (empty($message) || empty($subject) || empty($itemID)) {
         header("Location: index.php?module=xeBayOrders&action=DetailView&record={$this->bean->id}");
     }
     $x = new AddMemberMessageAAQToPartner();
     $res = $x->addMemberMessage(array('AccountID' => $account->id, 'AuthToken' => $account->ebay_auth_token, 'ItemID' => $itemID, 'Body' => $message, 'QuestionType' => $questionType, 'RecipientID' => $this->bean->buyer_user_id, 'Subject' => $subject));
     if ($res == true) {
         header("Location: index.php?module=xeBayOrders&action=DetailView&record={$this->bean->id}");
     }
     parent::process();
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:17,代码来源:view.send.php

示例4: testprocess

 public function testprocess()
 {
     $SugarView = new SugarView();
     $SugarView->module = 'Users';
     $GLOBALS['app'] = new SugarApplication();
     //execute the method and check if it works and doesn't throws an exception
     //secondly check if it outputs any content to browser
     try {
         ob_start();
         $SugarView->process();
         $renderedContent = ob_get_contents();
         ob_end_clean();
         $this->assertGreaterThan(0, strlen($renderedContent));
     } catch (Exception $e) {
         $this->fail();
     }
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:17,代码来源:SugarViewTest.php

示例5: process

 function process()
 {
     $account = BeanFactory::getBean('xeBayAccounts', $this->bean->xebayaccount_id);
     $subject = $_REQUEST['subject'];
     $response = $_REQUEST['response'];
     if (empty($response)) {
         header("Location: index.php?module=xeBayMessages&action=index");
     }
     $x = new AddMemberMessageRTQ();
     $res = $x->addMemberMessage(array('AccountID' => $account->id, 'AuthToken' => $account->ebay_auth_token, 'ItemID' => $this->bean->item_id, 'Body' => $response, 'ParentMessageID' => $this->bean->message_id, 'RecipientID' => $this->bean->sender_id));
     if ($res == true) {
         $this->bean->insert_response($response);
         $this->message_status = 'Answered';
         $this->bean->save();
         header("Location: index.php?module=xeBayMessages&action=index");
     }
     parent::process();
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:18,代码来源:view.reply.php

示例6: process

 function process()
 {
     $numberOfDays = isset($_REQUEST['number_of_days']) ? $_REQUEST['number_of_days'] : 1;
     $orders = new GetOrders();
     $accounts = array();
     if (!empty($_REQUEST['ebay_account_name'])) {
         $name = $_REQUEST['ebay_account_name'];
         $bean = BeanFactory::getBean('xeBayAccounts');
         $accounts = $bean->get_accounts($name);
     }
     date_default_timezone_set("America/Los_Angeles");
     set_time_limit(60 * 30);
     foreach ($accounts as $id => $authToken) {
         $result = $orders->retrieveOrders(array('NumberOfDays' => $numberOfDays, 'OrderStatus' => 'Completed', 'AccountID' => $id, 'AuthToken' => $authToken));
     }
     parent::process();
     // $this->display();
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:18,代码来源:view.importorder.php

示例7: process

 /**
  * @see SugarView::process()
  */
 public function process()
 {
     global $current_user;
     if (!is_admin($current_user)) {
         sugar_die("Unauthorized access to administration.");
     }
     // Check if default_theme is valid
     if (isset($_REQUEST['default_theme']) && !in_array($_REQUEST['default_theme'], array_keys(SugarThemeRegistry::allThemes()))) {
         sugar_die("Default theme is invalid.");
     }
     if (isset($_REQUEST['disabled_themes'])) {
         $configurator = new Configurator();
         $configurator->config['disabled_themes'] = implode(',', $_REQUEST['disabled_themes']);
         $configurator->config['default_theme'] = $_REQUEST['default_theme'];
         $configurator->handleOverride();
     }
     parent::process();
 }
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:21,代码来源:view.themesettings.php

示例8: 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

示例9: process

 function process()
 {
     $api = new GetFeedback();
     foreach ($this->accounts as $id => $authToken) {
         $result = $api->retrieveFeedback(array('AuthToken' => $authToken));
     }
     $bean = BeanFactory::getBean('xeBayOrders');
     $shippedTime30Days = date('Y-m-d H:i:s', strtotime($GLOBALS['timedate']->nowDb() . ' -30 days'));
     $where = "handled_status='handled' AND shipped_time>'{$shippedTime30Days}' AND feedback_received='0'";
     $beans = $bean->get_full_list("", $where);
     if ($beans !== null) {
         foreach ($beans as &$bean) {
             $shipped_time = strtotime($bean->shipped_time);
             $current_time = strtotime($GLOBALS['timedate']->nowDb());
             $diff_time = intval(($current_time - $shipped_time) / 3600 / 24);
             if ($diff_time > 22) {
                 if ($bean->buyer_comfort_status != '25th Day') {
                     $this->send_comfort_message($bean, '25th Day', $diff_time);
                     $this->lessThan30Days[] = $bean->sales_record_number;
                 }
             } else {
                 if ($diff_time > 15) {
                     if ($bean->buyer_comfort_status != '15th Day') {
                         $this->send_comfort_message($bean, '15th Day', $diff_time);
                         $this->lessThan25Days[] = $bean->sales_record_number;
                     }
                 } else {
                     if ($diff_time > 7) {
                         if ($bean->buyer_comfort_status != '7th Day') {
                             $this->send_comfort_message($bean, '7th Day', $diff_time);
                             $this->lessThan15Days[] = $bean->sales_record_number;
                         }
                     } else {
                         $this->lessThan7Days[] = $bean->sales_record_number;
                     }
                 }
             }
         }
     }
     parent::process();
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:41,代码来源:view.automessage.php


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