本文整理汇总了PHP中io::get方法的典型用法代码示例。如果您正苦于以下问题:PHP io::get方法的具体用法?PHP io::get怎么用?PHP io::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io
的用法示例。
在下文中一共展示了io::get方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
<?php
require_once dirname(__FILE__) . '/../module.inc.php';
$contactFilterId = io::get('id');
$mapping = array();
$contactFilter = $api->contactfilter(array("method" => "VIEW", "ID" => $contactFilterId));
if ($contactFilter) {
$contactFilter = $contactFilter->Data[0];
}
$allContactMetadata = $api->contactmetadata(array('Limit' => '-1'));
if (isset($api->_response_code) && $api->_response_code === MailjetAPI::MAILJET_STATUS_CODE_OK_GET) {
$properties = array();
foreach ($allContactMetadata->Data as $key => $oProperty) {
$properties[$oProperty->Name] = $oProperty->Name;
$mapping[$oProperty->Name] = $oProperty->Datatype;
}
}
$submitted = io::post('submit');
$name = io::post('name');
$description = io::post('description');
$property = io::post('property');
$expression = io::post('expression');
$errors = array();
$updated = false;
if ($submitted) {
if (empty($name) || empty($expression)) {
$errors[] = 'Veuillez remplir tous les champs obligatoires';
}
$typeProperty = $mapping[$property];
switch ($typeProperty) {
case 'str':
示例2: define
// *******************************************************************************
//disactive HTML compression
define("ENABLE_HTML_COMPRESSION", false);
//only cms_rc needed in this case : no extra loading
define('APPLICATION_USER_TYPE', 'file');
require_once dirname(__FILE__) . '/cms_rc.php';
$replace = array('..' => '', '\\' => '', '/' => '');
//Get image vars
$image = io::get('image');
$location = io::get('location') && isset($_SERVER["HTTP_REFERER"]) && strpos($_SERVER["HTTP_REFERER"], "automne/admin") !== false ? io::get('location') : RESOURCE_DATA_LOCATION_PUBLIC;
$location = in_array($location, array(RESOURCE_DATA_LOCATION_EDITED, RESOURCE_DATA_LOCATION_EDITION, RESOURCE_DATA_LOCATION_PUBLIC)) ? $location : '';
$module = io::get('module') ? io::get('module') : 'standard';
$module = in_array($module, CMS_modulesCatalog::getAllCodenames()) ? $module : '';
$x = io::get('x', 'io::isPositiveInteger');
$y = io::get('y', 'io::isPositiveInteger');
$crop = io::get('crop') && $x && $y ? true : false;
if ($image != io::htmlspecialchars(str_replace(array_keys($replace), $replace, $image))) {
$image = '';
}
//missing datas : send 404
if (!$image || !$module || !$location) {
//send 404 headers
header('HTTP/1.x 404 Not Found', true, 404);
//send image 404
if (file_exists(PATH_REALROOT_FS . '/img/404.png')) {
CMS_file::downloadFile(PATH_REALROOT_FS . '/img/404.png');
exit;
}
}
//resized image
$pathInfo = pathinfo($image);
示例3: dirname
<?php
require_once dirname(__FILE__) . '/../module.inc.php';
$campaignId = io::get('id');
$newsletter = null;
$response = $api->newsletter(array('method' => 'VIEW', 'ID' => $campaignId));
if (isset($api->_response_code) && $api->_response_code === MailjetAPI::MAILJET_STATUS_CODE_OK_VIEW) {
$newsletter = $response->Data[0];
}
$date = '';
$time = '';
$programmedErrors = array();
$immediateErrors = array();
$archived = false;
$programmedSuccess = false;
$sent = false;
// get the html as known by Mailjet
$params = array('method' => 'VIEW', 'ID' => $campaignId);
$response = $api->newsletterDetailContent($params);
if (isset($api->_response_code) && $api->_response_code === MailjetAPI::MAILJET_STATUS_CODE_OK_VIEW) {
$attribut = 'Html-part';
$mailjetHtml = $response->Data[0]->{$attribut};
}
$params = array('method' => 'POST', 'ID' => $campaignId);
$immediateSending = io::post('immediateSending');
if ($immediateSending) {
$response = $api->newsletterSend($params);
if (isset($api->_response_code) && $api->_response_code === MailjetAPI::MAILJET_STATUS_CODE_OK_POST) {
$sent = true;
} elseif (isset($api->_response_code) && $api->_response_code === MailjetAPI::MAILJET_STATUS_CODE_OK_ERROR) {
$msg = 'Erreur pendant la programmation de l\'envoi.';
示例4: CMS_polymod_definition_parsing
$parameters['public'] = true;
$parameters['cache'] = false;
$parameters['pageID'] = CURRENT_PAGE;
$definitionParsing = new CMS_polymod_definition_parsing($transformedDefinition, true, CMS_polymod_definition_parsing::BLOCK_PARAM_MODE, $parameters['module']);
$compiledDefinition = $definitionParsing->getContent(CMS_polymod_definition_parsing::OUTPUT_PHP, $parameters);
$urlParts = parse_url($url);
if (!isset($urlParts['query'])) {
die("Incorrect parameters");
}
parse_str($urlParts['query']);
$parameterName = $oembedDefinition->getParameter();
$embededObject = CMS_poly_object_catalog::getObjectByID(${$parameterName}, false, true);
if (!$embededObject) {
die("Incorrect parameters");
}
// get label
ob_start();
eval(sensitiveIO::stripPHPTags($compiledDefinition));
$data = ob_get_contents();
ob_end_clean();
$html = array('html' => $data, 'title' => $embededObject->getLabel(), 'height' => io::get('height'), 'width' => io::get('width'));
$oembed = CMS_polymod_oembed_definition::getResults($html);
if ($format === 'json') {
print json_encode($oembed, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT);
} elseif ($format === 'xml') {
$output = "<?xml version=\"1.0\" encoding=\"utf-8\">\n";
$output .= "<oembed>\n";
$output .= CMS_polymod_oembed_definition::format_xml_elements($oembed);
$output .= "</oembed>";
print $output;
}
示例5: define
// +----------------------------------------------------------------------+
/**
* File used to frame oembed HTML objects
* Ideally this frame should use another domain from website to avoid XSS
*
* @package Automne
* @subpackage oembed
* @author Sébastien Pauchet <sebastien.pauchet@ws-interactive.fr>
*/
define('APPLICATION_EXEC_TYPE', 'frame');
require_once dirname(__FILE__) . '/../../cms_rc_frontend.php';
//Check parameter
if (!io::get('params')) {
die('Missing parameter.');
}
$params = io::get('params');
$params = @base64_decode($params);
if (!$params) {
die('Incorrect parameter.');
}
$params = @unserialize($params);
if (!is_array($params) || !isset($params['url']) || !isset($params['maxwidth']) || !isset($params['maxheight'])) {
die('Incorrect parameter.');
}
//load oembed object
$oembed = new CMS_oembed($params['url'], $params['maxwidth'], $params['maxheight']);
$title = $html = '';
if (!$oembed->hasProvider()) {
$title = $html = 'Media not handled ...';
} else {
$title = $oembed->getTitle();
示例6: getObjectName
public static function getObjectName()
{
$page = CMS_tree::getPageByID(CURRENT_PAGE);
$oembedDefinition = CMS_polymod_oembed_definition_catalog::getByCodename($page->getCodename());
$parameterName = $oembedDefinition->getParameter();
if (io::get($parameterName) && ($embededObject = CMS_poly_object_catalog::getObjectByID(io::get($parameterName), false, true))) {
return $embededObject->getLabel();
}
return '';
}
示例7:
body div {
text-align: center;
}
p {
margin: 0px;
padding: 0px;
}
img {
border: 0;
cursor: pointer;
}
</style>
</head>
<body>
<?php
if (io::get('popup') === "true" && $dimensions[0] > 20) {
echo '
<!-- resize popup to image size -->
<script language="Javascript">
var sizeX = (screen.availWidth >' . ($dimensions[0] + POPUP_ADD_X_SIZE) . ') ? ' . ($dimensions[0] + POPUP_ADD_X_SIZE) . ':screen.availWidth;
var sizeY = (screen.availHeight>' . ($dimensions[1] + POPUP_ADD_Y_SIZE) . ') ? ' . ($dimensions[1] + POPUP_ADD_Y_SIZE) . ':screen.availHeight;
window.resizeTo(sizeX,sizeY);
</script>
';
}
?>
<div>
<?php
echo $html;
?>
<p><?php
示例8: define
<?php
define("ENABLE_HTTP_COMPRESSION", false);
require_once dirname(__FILE__) . '/../cms_rc_frontend.php';
$url = urldecode(io::get('url'));
$format = io::get('format');
$page = CMS_tree::analyseURL($url);
if (!$page) {
header('HTTP/1.x 404 Not Found', true, 404);
exit;
}
$oembedDefinition = CMS_polymod_oembed_definition_catalog::getByCodename($page->getCodename());
if (!$oembedDefinition) {
header('HTTP/1.x 404 Not Found', true, 404);
exit;
}
$pageLang = $page->getLanguage(true);
$cms_language = new CMS_language($pageLang);
define('CURRENT_PAGE', $page->getID());
$website = $page->getWebsite();
$htmlDefinition = $oembedDefinition->getHtml();
$module = CMS_poly_object_catalog::getModuleCodenameForObjectType($oembedDefinition->getObjectdefinition());
$polymodModule = CMS_modulesCatalog::getByCodename($module);
$transformedDefinition = $polymodModule->convertDefinitionString($htmlDefinition, false);
$parameters = array();
$parameters['module'] = CMS_poly_object_catalog::getModuleCodenameForObjectType($oembedDefinition->getObjectdefinition());
$parameters['objectID'] = $oembedDefinition->getObjectdefinition();
$parameters['public'] = true;
$parameters['cache'] = false;
$parameters['pageID'] = CURRENT_PAGE;
$definitionParsing = new CMS_polymod_definition_parsing($transformedDefinition, true, CMS_polymod_definition_parsing::BLOCK_PARAM_MODE, $parameters['module']);