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


PHP DevblocksPlatform::importGPC方法代码示例

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


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

示例1: showTabAction

 function showTabAction()
 {
     @($ext_id = DevblocksPlatform::importGPC($_REQUEST['ext_id'], 'string', ''));
     if (null != ($tab_mft = DevblocksPlatform::getExtension($ext_id)) && null != ($inst = $tab_mft->createInstance()) && $inst instanceof Extension_ResearchTab) {
         $inst->showTab();
     }
 }
开发者ID:jsjohnst,项目名称:cerb4,代码行数:7,代码来源:research.php

示例2: saveConfiguration

 function saveConfiguration()
 {
     // KB
     @($aFnrTopics = DevblocksPlatform::importGPC($_POST['topic_ids'], 'array', array()));
     $aFnrTopics = array_flip($aFnrTopics);
     DAO_CommunityToolProperty::set(UmPortalHelper::getCode(), self::PARAM_FNR_TOPICS, serialize($aFnrTopics));
 }
开发者ID:rmiddle,项目名称:cerb4,代码行数:7,代码来源:resources.php

示例3: showTab

 function showTab()
 {
     @($ticket_id = DevblocksPlatform::importGPC($_REQUEST['ticket_id'], 'integer', 0));
     $visit = CerberusApplication::getVisit();
     /* @var $visit CerberusVisit */
     $translate = DevblocksPlatform::getTranslationService();
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl->assign('path', $this->tpl_path);
     $tpl->cache_lifetime = "0";
     $view = C4_AbstractViewLoader::getView('', 'audit_log');
     if (null == $view) {
         $view = new C4_TicketAuditLogView();
         $view->id = 'audit_log';
         $view->name = $translate->_('auditlog.audit_log');
         $view->view_columns = array(SearchFields_TicketAuditLog::CHANGE_DATE, SearchFields_TicketAuditLog::WORKER_ID, SearchFields_TicketAuditLog::CHANGE_FIELD, SearchFields_TicketAuditLog::CHANGE_VALUE);
         $view->params = array();
         $view->renderLimit = 15;
         $view->renderPage = 0;
         $view->renderSortBy = SearchFields_TicketAuditLog::CHANGE_DATE;
         $view->renderSortAsc = false;
     }
     $view->params = array(SearchFields_TicketAuditLog::TICKET_ID => new DevblocksSearchCriteria(SearchFields_TicketAuditLog::TICKET_ID, DevblocksSearchCriteria::OPER_EQ, $ticket_id));
     $view->renderPage = 0;
     C4_AbstractViewLoader::setView($view->id, $view);
     $tpl->assign('view', $view);
     $tpl->display('file:' . $this->tpl_path . '/display/log/index.tpl');
 }
开发者ID:jsjohnst,项目名称:cerb4,代码行数:27,代码来源:App.php

示例4: saveConfiguration

 function saveConfiguration(Model_CommunityTool $instance)
 {
     // KB
     @($aFnrTopics = DevblocksPlatform::importGPC($_POST['topic_ids'], 'array', array()));
     $aFnrTopics = array_flip($aFnrTopics);
     DAO_CommunityToolProperty::set($instance->code, self::PARAM_FNR_TOPICS, serialize($aFnrTopics));
 }
开发者ID:Hildy,项目名称:cerb5,代码行数:7,代码来源:resources.php

示例5: generateTicketsAction

 function generateTicketsAction()
 {
     require_once dirname(__FILE__) . '/api/API.class.php';
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl_path = dirname(__FILE__) . '/templates/';
     $tpl->assign('path', $tpl_path);
     $tpl->cache_lifetime = "0";
     @($address = DevblocksPlatform::importGPC($_POST['address'], 'string'));
     @($dataset = DevblocksPlatform::importGPC($_POST['dataset'], 'string'));
     @($how_many = DevblocksPlatform::importGPC($_POST['how_many'], 'integer', 0));
     if (empty($address)) {
         $tpl->assign('error', sprintf("Oops! '%s' is not a valid e-mail address.", htmlspecialchars($address)));
         $tpl->display('file:' . $tpl_path . 'config_tab/output.tpl');
         return;
     }
     // [JAS]: [TODO] This should probably move to an extension point later
     switch ($dataset) {
         default:
         case "retail":
             $dataset = new RetailDataset();
             break;
         case "hosting":
             $dataset = new HostingDataset();
             break;
         case "edu":
             $dataset = new EduDataset();
             break;
         case "gov":
             $dataset = new GovDataset();
             break;
         case "npo":
             $dataset = new NPODataset();
             break;
         case "spam":
             $dataset = new SpamDataset();
             break;
     }
     $simulator = CerberusSimulator::getInstance();
     $emails = $simulator->generateEmails($dataset, $how_many);
     foreach ($emails as $template) {
         if (preg_match("/\"(.*?)\" \\<(.*?)\\>/", $template['sender'], $matches)) {
             $personal = $matches[1];
             $from = $matches[1];
         }
         // [TODO] error checking
         $message = new CerberusParserMessage();
         $message->headers['from'] = $template['sender'];
         $message->headers['to'] = $address;
         $message->headers['subject'] = $template['subject'];
         $message->headers['message-id'] = CerberusApplication::generateMessageId();
         $message->body = sprintf("%s\r\n" . "\r\n" . "--\r\n%s\r\n", $template['body'], $personal);
         CerberusParser::parseMessage($message, array('no_autoreply' => true));
     }
     $tpl->assign('output', sprintf("Success!  %d simulated tickets were generated for %s", $how_many, htmlspecialchars($address)));
     $tpl->display('file:' . $tpl_path . 'config_tab/output.tpl');
 }
开发者ID:joegeck,项目名称:cerb4,代码行数:56,代码来源:classes.php

示例6: saveConfiguration

 function saveConfiguration()
 {
     // RSS Feeds
     @($aNewsRssTitles = DevblocksPlatform::importGPC($_POST['news_rss_title'], 'array', array()));
     @($aNewsRssUrls = DevblocksPlatform::importGPC($_POST['news_rss_url'], 'array', array()));
     $aNewsRss = array();
     foreach ($aNewsRssUrls as $idx => $rss) {
         if (empty($rss)) {
             unset($aNewsRss[$idx]);
             continue;
         }
         $aNewsRss[$aNewsRssTitles[$idx]] = $rss;
     }
     DAO_CommunityToolProperty::set(UmPortalHelper::getCode(), self::PARAM_NEWS_RSS, serialize($aNewsRss));
 }
开发者ID:jsjohnst,项目名称:cerb4,代码行数:15,代码来源:announcements.php

示例7: actionAction

 /**
  * Proxy page actions from an extension's render() to the extension's scope.
  *
  */
 function actionAction()
 {
     @($extid = DevblocksPlatform::importGPC($_REQUEST['extid']));
     @($extid_a = DevblocksPlatform::strAlphaNumDash($_REQUEST['extid_a']));
     $action = $extid_a . 'Action';
     $reportMft = DevblocksPlatform::getExtension($extid);
     // If it's a value report extension, proxy the action
     if (null != ($reportInst = DevblocksPlatform::getExtension($extid, true)) && $reportInst instanceof Extension_Report) {
         // If we asked for a value method on the extension, call it
         if (method_exists($reportInst, $action)) {
             call_user_func(array(&$reportInst, $action));
         }
     }
     return;
 }
开发者ID:rmiddle,项目名称:feg,代码行数:19,代码来源:App.php

示例8: saveAnswernetAction

 function saveAnswernetAction()
 {
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl_path = dirname(dirname(__FILE__)) . '/templates/';
     $tpl->cache_lifetime = "0";
     @($al_comment_enabled = DevblocksPlatform::importGPC($_REQUEST['al_comment_enabled'], 'integer', 0));
     @($uf_comment_enabled = DevblocksPlatform::importGPC($_POST['uf_comment_enabled'], 'integer', 0));
     @($al_merge_enabled = DevblocksPlatform::importGPC($_REQUEST['al_merge_enabled'], 'integer', 0));
     @($uf_merge_enabled = DevblocksPlatform::importGPC($_POST['uf_merge_enabled'], 'integer', 0));
     $this->setParam('al_comment_enabled', $al_comment_enabled);
     $this->setParam('uf_comment_enabled', $uf_comment_enabled);
     $this->setParam('al_merge_enabled', $al_merge_enabled);
     $this->setParam('uf_merge_enabled', $uf_merge_enabled);
     $tpl->display('file:' . $tpl_path . 'config_success.tpl');
 }
开发者ID:rmiddle,项目名称:cerb4_plugins,代码行数:15,代码来源:App.php

示例9: saveCerb5BlogAuditLogAction

 function saveCerb5BlogAuditLogAction()
 {
     $settings = DevblocksPlatform::getPluginSettingsService();
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl_path = dirname(dirname(__FILE__)) . '/templates/';
     $tpl->cache_lifetime = "0";
     @($al_comment_enabled = DevblocksPlatform::importGPC($_REQUEST['al_comment_enabled'], 'integer', 0));
     @($uf_comment_enabled = DevblocksPlatform::importGPC($_POST['uf_comment_enabled'], 'integer', 0));
     @($al_merge_enabled = DevblocksPlatform::importGPC($_REQUEST['al_merge_enabled'], 'integer', 0));
     @($uf_merge_enabled = DevblocksPlatform::importGPC($_POST['uf_merge_enabled'], 'integer', 0));
     $settings->set('cerb5blog.last_action_and_audit_log', 'al_comment_enabled', $al_comment_enabled);
     $settings->set('cerb5blog.last_action_and_audit_log', 'uf_comment_enabled', $uf_comment_enabled);
     $settings->set('cerb5blog.last_action_and_audit_log', 'al_merge_enabled', $al_merge_enabled);
     $settings->set('cerb5blog.last_action_and_audit_log', 'uf_merge_enabled', $uf_merge_enabled);
     $tpl->display('file:' . $tpl_path . 'config_success.tpl');
 }
开发者ID:rmiddle,项目名称:cerb5_plugins,代码行数:16,代码来源:App.php

示例10: authenticate

 function authenticate()
 {
     // Pull from $_POST
     @($email = DevblocksPlatform::importGPC($_POST['email']));
     @($password = DevblocksPlatform::importGPC($_POST['password']));
     $worker = DAO_Worker::login($email, $password);
     if (!is_null($worker)) {
         $session = DevblocksPlatform::getSessionService();
         $visit = new CerberusVisit();
         $visit->setWorker($worker);
         $session->setVisit($visit);
         // [TODO] Only direct to /welcome when tour is enabled
         return true;
     } else {
         return false;
     }
 }
开发者ID:rmiddle,项目名称:cerb4,代码行数:17,代码来源:login.classes.php

示例11: showTab

 function showTab()
 {
     @($ticket_id = DevblocksPlatform::importGPC($_REQUEST['ticket_id'], 'integer', 0));
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl->cache_lifetime = "0";
     $tpl_path = dirname(dirname(__FILE__)) . '/templates/';
     //		$tpl->assign('response_uri', 'config/attachments');
     $defaults = new C4_AbstractViewModel();
     $defaults->class_name = 'C4_AttachmentView';
     $defaults->name = 'Attachements View';
     $defaults->id = 'ticket_view_attachements';
     $defaults->renderLimit = 15;
     $view_attachements = C4_AbstractViewLoader::getView('ticket_view_attachements', $defaults);
     $view_attachements->params = array(SearchFields_Attachment::TICKET_ID => new DevblocksSearchCriteria(SearchFields_Attachment::TICKET_ID, DevblocksSearchCriteria::OPER_EQ, $ticket_id));
     $view_attachements->renderPage = 0;
     C4_AbstractViewLoader::setView($view_attachements->id, $view_attachements);
     $tpl->assign('view_attachements', $view_attachements);
     $tpl->display('file:' . $tpl_path . 'attachments/index.tpl');
 }
开发者ID:rmiddle,项目名称:cerb4_plugins,代码行数:19,代码来源:App.php

示例12: showTab

 function showTab()
 {
     @($org = DevblocksPlatform::importGPC($_REQUEST['org_id']));
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl_path = dirname(dirname(__FILE__)) . '/templates/';
     $tpl->assign('path', $tpl_path);
     $contact = DAO_ContactOrg::get($org);
     $tpl->assign('contact', $contact);
     $defaults = new C4_AbstractViewModel();
     $defaults->class_name = 'View_ContactOrg';
     $defaults->id = View_ContactOrg::DEFAULT_ID;
     $view = C4_AbstractViewLoader::getView(View_ContactOrg::DEFAULT_ID, $defaults);
     $view->params = array(new DevblocksSearchCriteria(SearchFields_ContactOrg::PARENT_ORG_ID, '=', $contact->id));
     $tpl->assign('view', $view);
     $tpl->assign('contacts_page', 'orgs');
     $tpl->assign('response_uri', 'contacts/orgs');
     $tpl->assign('view_fields', View_ContactOrg::getFields());
     $tpl->assign('view_searchable_fields', View_ContactOrg::getSearchFields());
     $tpl->display('file:' . $tpl_path . 'childorgs.tpl');
     exit;
 }
开发者ID:sluther,项目名称:cerb5-childorgs,代码行数:21,代码来源:App.php

示例13: showTab

 function showTab()
 {
     @($ticket_id = DevblocksPlatform::importGPC($_REQUEST['ticket_id'], 'integer', 0));
     $tpl_path = dirname(dirname(__FILE__)) . '/templates/';
     $tpl = DevblocksPlatform::getTemplateService();
     //$visit = CerberusApplication::getVisit();
     //$visit->set(Extension_ConfigTab::POINT, 'attachments');
     $message_ids = array_keys(DAO_Message::getMessagesByTicket($ticket_id));
     $comment_ids = array_keys(DAO_Comment::getByContext(CerberusContexts::CONTEXT_TICKET, $ticket_id));
     $attachment_links = array_merge(DAO_AttachmentLink::getByContextIds(CerberusContexts::CONTEXT_MESSAGE, $message_ids), DAO_AttachmentLink::getByContextIds(CerberusContexts::CONTEXT_COMMENT, $comment_ids));
     $defaults = new C4_AbstractViewModel();
     $defaults->class_name = 'View_AttachmentLink';
     $defaults->name = 'Attachements';
     $defaults->id = '_ticket_view_attachements';
     $defaults->renderLimit = 15;
     $view = C4_AbstractViewLoader::getView($defaults->id, $defaults);
     $view->renderPage = 0;
     $view->addParams(array(SearchFields_AttachmentLink::GUID => new DevblocksSearchCriteria(SearchFields_AttachmentLink::GUID, 'in', array_keys($attachment_links))), true);
     C4_AbstractViewLoader::setView($view->id, $view);
     $tpl->assign('view', $view);
     $tpl->display('file:' . $tpl_path . 'attachments/index.tpl');
 }
开发者ID:rmiddle,项目名称:cerb5_plugins,代码行数:22,代码来源:App.php

示例14: showTab

 function showTab()
 {
     @($ticket_id = DevblocksPlatform::importGPC($_REQUEST['ticket_id'], 'integer', 0));
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl_path = dirname(dirname(__FILE__)) . '/templates/';
     $tpl->assign('path', $tpl_path);
     $ticket = DAO_Ticket::getTicket($ticket_id);
     $tpl->assign('ticket_id', $ticket_id);
     $tpl->assign('ticket', $ticket);
     // Receate the original spam decision
     $words = DevblocksPlatform::parseCsvString($ticket->interesting_words);
     $words = DAO_Bayes::lookupWordIds($words);
     // Calculate word probabilities
     foreach ($words as $idx => $word) {
         /* @var $word CerberusBayesWord */
         $word->probability = CerberusBayes::calculateWordProbability($word);
     }
     $tpl->assign('words', $words);
     // Determine what the spam probability would be if the decision was made right now
     $analysis = CerberusBayes::calculateTicketSpamProbability($ticket_id, true);
     $tpl->assign('analysis', $analysis);
     $tpl->display('file:' . $tpl_path . 'ticket_tab/index.tpl');
 }
开发者ID:Hildy,项目名称:cerb5,代码行数:23,代码来源:App.php

示例15: saveAccountAction

 function saveAccountAction()
 {
     @($first_name = DevblocksPlatform::importGPC($_REQUEST['first_name'], 'string', ''));
     @($last_name = DevblocksPlatform::importGPC($_REQUEST['last_name'], 'string', ''));
     @($change_password = DevblocksPlatform::importGPC($_REQUEST['change_password'], 'string', ''));
     @($change_password2 = DevblocksPlatform::importGPC($_REQUEST['change_password2'], 'string', ''));
     $tpl = DevblocksPlatform::getTemplateService();
     $umsession = UmPortalHelper::getSession();
     $active_user = $umsession->getProperty('sc_login', null);
     if (!empty($active_user)) {
         $fields = array(DAO_Address::FIRST_NAME => $first_name, DAO_Address::LAST_NAME => $last_name);
         DAO_Address::update($active_user->id, $fields);
         $tpl->assign('account_success', true);
         if (!empty($change_password)) {
             if (0 == strcmp($change_password, $change_password2)) {
                 DAO_AddressAuth::update($active_user->id, array(DAO_AddressAuth::PASS => md5($change_password)));
             } else {
                 $tpl->assign('account_error', "The passwords you entered did not match.");
             }
         }
     }
     DevblocksPlatform::setHttpResponse(new DevblocksHttpResponse(array('portal', UmPortalHelper::getCode(), 'account')));
 }
开发者ID:jsjohnst,项目名称:cerb4,代码行数:23,代码来源:account.php


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