本文整理汇总了PHP中io::request方法的典型用法代码示例。如果您正苦于以下问题:PHP io::request方法的具体用法?PHP io::request怎么用?PHP io::request使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io
的用法示例。
在下文中一共展示了io::request方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
/**
* PHP page : change navigator
* Manage the navigator if version is not supported
*
* @package Automne
* @subpackage admin
* @author Sébastien Pauchet <sebastien.pauchet@ws-interactive.fr>
*/
require_once dirname(__FILE__) . '/../../cms_rc_frontend.php';
define("MESSAGE_PAGE_TITLE", 51);
define("MESSAGE_PAGE_NAV_OLD", 1093);
//load language object
$language = CMS_languagesCatalog::getDefaultLanguage(true);
//load interface instance
$view = CMS_view::getInstance();
//set main CSS
$view->addCSSFile('main');
$view->addCSSFile('info');
//set title
$view->settitle($language->getMessage(MESSAGE_PAGE_TITLE, array(APPLICATION_LABEL)));
if (io::request('afj') && date(base64_decode('ZC1t')) == base64_decode('MDEtMDQ=')) {
$content = base64_decode('PHByZT4KICBIVENQQ1AvMS54IEVSUk9SIENPREUgNDE4CgogICAgICAgICAgICAgICAgICAgICAgICAgICAoCiAgICAgICAgICAgICAgXyAgICAgICAgICAgKSApCiAgICAgICAgICAgXywoXykuXyAgICAgICAgKCggICAgIEknTSBBIFRFQVBPVC4KICAgICAgX19fLChfX19fX19fKS4gICAgICAgICkgICAgIEkgRE8gTk9UIE1BS0UgQ09GRkVFLgogICAgLCdfXy4gICAvICAgICAgIFwgICAgL1xfCiAgIC8sJyAvICB8IiJ8ICAgICAgIFwgIC8gIC8KICB8IHwgfCAgIHxfX3wgICAgICAgfCwnICAvCiAgIFxgLnwgICAgICAgICAgICAgICAgICAvCiAgICBgLiA6ICAgICAgICAgICA6ICAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX18KICAgICAgYC4gICAgICAgICAgICA6LiwnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC9vIFwvCiAgICAgICAgYC0uX19fX19fX18sLScgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcX18vXCA8L3ByZT4=');
} else {
$content = '
<div id="atm-center">
<div class="atm-alert">' . $language->getMessage(MESSAGE_PAGE_NAV_OLD) . '</div>
</div>
';
}
$view->setContent($content);
$view->show(CMS_view::SHOW_HTML);
示例2: define
define("MESSAGE_ERROR_REQUIRED_FIELD", 303);
define("MESSAGE_PAGE_USER_WELCOME", 314);
define("MESSAGE_PAGE_USER_NOVALIDATION", 1113);
define("MESSAGE_PAGE_USER_VALIDATIONS", 315);
define("MESSAGE_PAGE_DEBUG", 674);
define("MESSAGE_PAGE_PRESS_F2_FOR_LOG", 675);
define("MESSAGE_ERROR_SESSION_EXPIRED", 676);
define("MESSAGE_PAGE_PLEASE_WAIT", 1631);
define("MESSAGE_PAGE_PREVIOUS_LOGIN", 1740);
//load language object
$cms_language = CMS_languagesCatalog::getDefaultLanguage(true);
//load interface instance
$view = CMS_view::getInstance();
//var used to display error of login
$loginError = '';
$cms_action = io::request('cms_action');
//Action management
switch ($cms_action) {
case 'logout':
//Disconnect user
CMS_session::authenticate(array('disconnect' => true, 'type' => 'admin'));
//Reset session (start fresh)
Zend_Session::destroy();
break;
case 'reconnect':
//display error login window on top of login form
$loginError = "\n\t\tAutomne.message.popup({\n\t\t\tmsg: '{$cms_language->getJsMessage(MESSAGE_ERROR_SESSION_EXPIRED)}',\n\t\t\tbuttons: Ext.MessageBox.OK,\n\t\t\ticon: Ext.MessageBox.ERROR,\n\t\t\tfn:function() {\n\t\t\t\tloginWindow.body.mask('{$cms_language->getJsMessage(MESSAGE_PAGE_PLEASE_WAIT)}');\n\t\t\t\tloginWindow.reload();\n\t\t\t}\n\t\t});";
//Disconnect user
CMS_session::authenticate(array('disconnect' => true, 'type' => 'admin'));
break;
case '':
示例3: array
} else {
$jsfiles = array('ext', 'codemirror', 'main');
}
//set title
$view->setTitle($language->getMessage(MESSAGE_PAGE_TITLE, array(APPLICATION_LABEL)));
$content = '
<div id="atm-loading-mask"></div>
<div id="atm-center">
<div class="atm-loading-indicator">' . $language->getMessage(MESSAGE_PAGE_LOADING) . '</div>
<noscript class="atm-alert">You must have Javascript enabled to access Automne.<hr />Vous devez avoir Javascript actif pour accéder à Automne.</noscript>
</div>
<script type="text/javascript">
var CKEDITOR_BASEPATH = \'' . PATH_MAIN_WR . '/ckeditor/\';
</script>
' . CMS_view::getJavascript($jsfiles) . CMS_view::getJavascript(array('launch'));
if (io::request('cms_action') == 'logout') {
//append logout info
$content .= '<script type="text/javascript">Automne.logout = true;</script>';
}
if (APPLICATION_GCF_SUPPORT) {
//GCF prompt for IE
$content .= '
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
<style type="text/css">
.chromeFrameOverlayContent {
z-index:200001;
}
</style>
<script type="text/javascript">
CFInstall.check({mode: "overlay"});
示例4: dirname
/**
* PHP page : polymod oembed definition
*
*/
require_once dirname(__FILE__) . '/../../cms_rc_admin.php';
require_once PATH_ADMIN_SPECIAL_SESSION_CHECK_FS;
//checks rights
if (!$cms_user->hasAdminClearance(CLEARANCE_ADMINISTRATION_EDITVALIDATEALL)) {
header("Location: " . PATH_ADMIN_SPECIAL_ENTRY_WR . "?cms_message_id=" . MESSAGE_PAGE_CLEARANCE_ERROR . "&" . session_name() . "=" . session_id());
exit;
}
//load page objects and vars
$moduleCodename = io::request("moduleCodename");
$objectDefitionId = io::request("objectdefinition");
$objectDefinition = CMS_poly_object_catalog::getObjectDefinition($objectDefitionId);
$oembedDefinitionId = io::request("definition");
$oembedDefinition = CMS_polymod_oembed_definition_catalog::getById($oembedDefinitionId);
if (!$oembedDefinition) {
$oembedDefinition = new CMS_polymod_oembed_definition();
}
if ($moduleCodename) {
$polymod = CMS_modulesCatalog::getByCodename($moduleCodename);
}
$cms_message = "";
switch ($_POST["cms_action"]) {
case "validate":
$oembedDefinition->setObjectdefinition(io::post('objectdefinition'));
$oembedDefinition->setCodename(io::post('codename'));
$oembedDefinition->setHtml(io::post('html'));
$oembedDefinition->setParameter(io::post('parameter'));
$oembedDefinition->setLabel(io::post('label'));
示例5: ceil
}
if ($_GET["bookmark"]) {
CMS_session::setBookmark($_GET["bookmark"]);
}
$websites = CMS_websitesCatalog::getAll('order');
$records_per_page = CMS_session::getRecordsPerPage();
$bookmark = CMS_session::getBookmark();
$pages = ceil(sizeof($websites) / $records_per_page);
$first_record = ($bookmark - 1) * $records_per_page;
$dialog = new CMS_dialog();
$content = '';
$dialog->setTitle($cms_language->getMessage(MESSAGE_PAGE_TITLE));
if ($cms_message) {
$dialog->setActionMessage($cms_message);
} elseif (io::request('cms_message_id', 'io::isPositiveInteger')) {
$dialog->setActionMessage($cms_language->getMessage(io::request('cms_message_id')));
}
$content .= '
<script language="JavaScript" type="text/javascript" src="' . PATH_ADMIN_WR . '/v3/js/coordinates.js"></script>
<script language="JavaScript" type="text/javascript" src="' . PATH_ADMIN_WR . '/v3/js/drag.js"></script>
<script language="JavaScript" type="text/javascript" src="' . PATH_ADMIN_WR . '/v3/js/dragsort.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function sortList() {
DragSort.makeListSortable(document.getElementById("websites"));
};
function startDragging() {
if (document.getElementById("validateDrag").className=="hideit") {
document.getElementById("validateDrag").className="showit";
}
return true;
示例6: CMS_modulesCodes
//set default toolbar
toolbarSets["Default"] = [[\'Source\'],[\'ShowBlocks\'],[\'Preview\',\'Templates\'],[\'Cut\',\'Copy\',\'Paste\',\'PasteText\',\'PasteFromWord\'],[\'Print\'],[\'Undo\',\'Redo\'],[\'Find\',\'Replace\'],[\'SelectAll\',\'RemoveFormat\'],[\'Bold\',\'Italic\',\'Underline\',\'Strike\'],[\'Subscript\',\'Superscript\'],[\'NumberedList\',\'BulletedList\'],[\'Outdent\',\'Indent\'],[\'JustifyLeft\',\'JustifyCenter\',\'JustifyRight\',\'JustifyBlock\'],[\'Link\',\'Unlink\',\'Anchor\'],[\'Table\',\'SpecialChar\'],[\'Styles\', \'Format\',\'FontSize\'],[\'TextColor\',\'BGColor\'],[\'automneLinks\',\'polymod\']];
';
//get all modules toolbars
$modulesCodes = new CMS_modulesCodes();
$modulesCodeInclude = $modulesCodes->getModulesCodes(MODULE_TREATMENT_EDITOR_CODE, '', new CMS_date(), array("editor" => "ckeditor", "toolbar" => "Default|Basic|BasicLink", "user" => $cms_user));
if (isset($modulesCodeInclude["ToolbarSets"])) {
$content .= implode("\n\n", $modulesCodeInclude["ToolbarSets"]);
}
//get all defined toolbars
$toolbars = CMS_wysiwyg_toolbar::getAll($cms_user);
foreach ($toolbars as $toolbar) {
$content .= $toolbar->getDefinition();
}
if (io::request('toolbar')) {
$content .= 'config.toolbar = typeof toolbarSets[\'' . io::request('toolbar') . '\'] == \'undefined\' ? toolbarSets[\'Default\'] : toolbarSets[\'' . io::request('toolbar') . '\'];' . "\n";
} else {
$content .= 'config.toolbar = toolbarSets[\'Default\'];' . "\n";
}
//append XML styles
$filename = PATH_CSS_FS . '/editorstyles.xml';
if (file_exists($filename)) {
$source = file_get_contents($filename);
$file = new DOMDocument('1.0', APPLICATION_DEFAULT_ENCODING);
$file->loadXml($source, $options);
$stylesTags = $file->getElementsByTagName('Style');
$styles = array();
foreach ($stylesTags as $styleTag) {
$style = new stdClass();
$style->name = $styleTag->getAttribute("name");
$style->element = $styleTag->getAttribute("element");
示例7: dirname
<?php
require_once dirname(__FILE__) . '/../module.inc.php';
$campaignId = io::request('id');
$mailjetCampaign = null;
$campaign = null;
$contentErrors = array();
$errors = array();
$valid = false;
$disableActions = false;
$testMailOk = false;
$recipient = null;
$name = null;
$mailjetHtml = '';
$pageFormSubmitted = io::post('page-form');
if ($pageFormSubmitted) {
$pageId = io::post('pageId');
$mailjetCampaign = new MailjetCampaign($campaignId);
$result = $mailjetCampaign->setPage($pageId);
if ($result['error']) {
$errors[] = $result['message'];
} else {
$result = $mailjetCampaign->save();
if ($result['error']) {
$errors[] = $result['message'];
} else {
$valid = true;
}
}
} else {
$mailjetCampaign = new MailjetCampaign($campaignId);
示例8: define
define("MESSAGE_PAGE_USER_VALIDATIONS", 315);
define("MESSAGE_PAGE_DEBUG", 674);
define("MESSAGE_PAGE_PRESS_F2_FOR_LOG", 675);
define("MESSAGE_ERROR_SESSION_EXPIRED", 676);
define("MESSAGE_PAGE_PREVIOUS_LOGIN", 1740);
//load language object
$cms_language = CMS_languagesCatalog::getDefaultLanguage(true);
//load interface instance
$view = CMS_view::getInstance();
//var used to display error of login
$loginError = '';
$cms_action = io::request('cms_action');
switch ($cms_action) {
case "login":
//Auth parameters
$params = array('login' => io::request('login'), 'password' => io::request('pass'), 'remember' => io::request('permanent') ? true : false, 'tokenName' => 'login', 'token' => io::request('atm-token'), 'type' => 'admin');
CMS_session::authenticate($params);
$cms_user = CMS_session::getUser();
if ($cms_user && $cms_user->hasAdminAccess()) {
//launch the daily routine in case it's not in the cron
CMS_module_standard::processDailyRoutine();
$userSessionsInfos = CMS_session::getSessionInfos();
$cms_language = $cms_user->getLanguage();
//welcome message
$welcome = $cms_language->getJsMessage(MESSAGE_PAGE_USER_WELCOME, array($userSessionsInfos['fullname']));
$welcomeMsg = '';
//last login
$logs = CMS_log_catalog::search('', 0, $cms_user->getUserId(), array(CMS_log::LOG_ACTION_AUTO_LOGIN, CMS_log::LOG_ACTION_LOGIN), false, false, 0, 2, 'datetime', 'desc', false);
if (isset($logs[1])) {
$welcomeMsg .= '<br /><br />' . $cms_language->getJsMessage(MESSAGE_PAGE_PREVIOUS_LOGIN) . ' ' . $logs[1]->getDateTime()->getLocalizedDate($cms_language->getDateFormat() . ' H:i:s');
}
示例9: formActions
/**
* This function is called to catch and launch all FE forms actions
*
* @param array $formIDs : the forms ids to check for actions
* @param integer $pageID : the current page id
* @param boolean $public : the data status
* @param string $languageCode : the language code used
* @param reference array $polymodFormsError : the forms error status to return
* @param reference array $polymodFormsItem : reference to the forms item
* @return boolean : true on success, false on failure
* @access public
* @static
*/
static function formActions($formIDs, $pageID, $languageCode, $public, &$polymodFormsError, &$polymodFormsItems)
{
global $cms_language, $cms_user;
if (!is_array($formIDs)) {
return false;
}
foreach ($formIDs as $formID) {
if (io::request('formID') && io::request('formID') == $formID) {
if (!isset($cms_language) || $cms_language->getCode() != $languageCode) {
$cms_language = new CMS_language($languageCode);
}
//instanciate item
$item = '';
if (io::request('object', 'io::isPositiveInteger', '')) {
//check user rights on module
$module = CMS_poly_object_catalog::getModuleCodenameForObjectType(io::request('object'));
//Check user rights
//here assume than user should only need the view right on module, because admin right allow Automne administration access
if (!is_object($cms_user) || !$cms_user->hasModuleClearance($module, CLEARANCE_MODULE_VIEW)) {
CMS_grandFather::raiseError('No user found or user has no administration rights on module ' . $module);
return false;
}
//instanciate object
$object = CMS_poly_object_catalog::getObjectDefinition(io::request('object'));
if ($object && io::request('item', 'io::isPositiveInteger', '')) {
$search = new CMS_object_search($object, false);
$search->addWhereCondition('item', io::request('item'));
$items = $search->search();
if (isset($items[io::request('item')])) {
$item = $items[io::request('item')];
} else {
$item = new CMS_poly_object($object->getID());
}
} else {
$item = new CMS_poly_object($object->getID());
}
}
if (is_object($item) && !$item->hasError()) {
//get item fieldsObjects
$fieldsObjects =& $item->getFieldsObjects();
//checks and assignments
$item->setDebug(false);
//first, check mandatory values
foreach ($fieldsObjects as $fieldID => $aFieldObject) {
//if field is part of formular
if (isset($_REQUEST['polymodFields'][$fieldID])) {
if (!$item->checkMandatory($fieldID, $_REQUEST, '')) {
$polymodFormsError[$formID]['required'][$fieldID] = $fieldID;
}
}
}
//second, set values for all fields
foreach ($fieldsObjects as $fieldID => $aFieldObject) {
//if field is part of formular
if (isset($_REQUEST['polymodFields'][$fieldID])) {
//if form use a callback, call it
//do not use call_user_function here
$funcName = 'form_' . $formID . '_' . $fieldID;
if (!$item->setValues($fieldID, $_REQUEST, '')) {
$polymodFormsError[$formID]['malformed'][] = $fieldID;
} elseif (!isset($polymodFormsError[$formID]['required'][$fieldID]) && function_exists('form_' . $formID . '_' . $fieldID) && !$funcName($formID, $fieldID, $item)) {
$polymodFormsError[$formID]['malformed'][] = $fieldID;
}
}
}
//set publication dates if needed
if (isset($_REQUEST['polymodFields']) && $_REQUEST['polymodFields']) {
if ($object->isPrimaryResource()) {
// Dates management
$dt_beg = new CMS_date();
$dt_beg->setDebug(false);
$dt_beg->setFormat($cms_language->getDateFormat());
$dt_end = new CMS_date();
$dt_end->setDebug(false);
$dt_end->setFormat($cms_language->getDateFormat());
if (!($dt_set_1 = $dt_beg->setLocalizedDate(@$_REQUEST["pub_start"], true))) {
$polymodFormsError[$formID]['malformed'][] = 'pub_start';
}
if (!($dt_set_2 = $dt_end->setLocalizedDate(@$_REQUEST["pub_end"], true))) {
$polymodFormsError[$formID]['malformed'][] = 'pub_end';
}
//if $dt_beg && $dt_end, $dt_beg must be lower than $dt_end
if (!$dt_beg->isNull() && !$dt_end->isNull()) {
if (CMS_date::compare($dt_beg, $dt_end, '>')) {
$polymodFormsError[$formID]['malformed'][] = 'pub_start';
$polymodFormsError[$formID]['malformed'][] = 'pub_end';
$dt_set_1 = $dt_set_2 = false;
//.........这里部分代码省略.........
示例10: define
define('MESSAGE_PAGE_EXPORT_PHP_FORMAT', 1637);
define('MESSAGE_PAGE_EXPORT_OPTIONS', 1638);
define('MESSAGE_PAGE_EXPORT_MODULE', 1639);
define('MESSAGE_PAGE_EXPORTED_DATAS', 1640);
define('MESSAGE_PAGE_FILE_ERROR', 1641);
define('MESSAGE_PAGE_ARCHIVE_ERROR', 1642);
define('MESSAGE_PAGE_UNKNOWN_FORMAT', 1643);
//Create page object
$dialog = new CMS_dialog();
//checks rights
if (!$cms_user->hasAdminClearance(CLEARANCE_ADMINISTRATION_EDITVALIDATEALL)) {
$dialog->setContent($cms_language->getMessage(MESSAGE_PAGE_ERROR_MODULE_RIGHTS));
$dialog->show();
exit;
}
$moduleCodename = io::request('moduleCodename');
if (!$moduleCodename) {
$dialog->setContent($cms_language->getMessage(MESSAGE_PAGE_ERROR_UNKNOWN_MODULE));
$dialog->show();
exit;
}
$module = CMS_modulesCatalog::getByCodename($moduleCodename);
if (!is_object($module) || $module->hasError()) {
$dialog->setContent($cms_language->getMessage(MESSAGE_PAGE_ERROR_UNKNOWN_MODULE));
$dialog->show();
exit;
}
$dialog->setTitle($cms_language->getMessage(MESSAGE_PAGE_MODULE_EXPORT_TITLE, array($module->getLabel($cms_language))));
$dialog->setBackLink('modules_admin.php?moduleCodename=' . $moduleCodename);
$export = new CMS_module_export($moduleCodename);
if (!$export->hasExport()) {