本文整理汇总了PHP中rex_request函数的典型用法代码示例。如果您正苦于以下问题:PHP rex_request函数的具体用法?PHP rex_request怎么用?PHP rex_request使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rex_request函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: matchLinkButton
/**
* Button für die Eingabe
*/
function matchLinkButton(&$sql, $content)
{
global $REX;
$def_category = '';
$article_id = rex_request('article_id', 'int');
if ($article_id != 0) {
$art = OOArticle::getArticleById($article_id);
$def_category = $art->getCategoryId();
}
$var = 'REX_LINK_BUTTON';
$matches = $this->getVarParams($content, $var);
foreach ($matches as $match) {
list($param_str, $args) = $match;
list($id, $args) = $this->extractArg('id', $args, 0);
if ($id < 11 && $id > 0) {
// Wenn vom Programmierer keine Kategorie vorgegeben wurde,
// die Linkmap mit der aktuellen Kategorie öffnen
list($category, $args) = $this->extractArg('category', $args, $def_category);
$replace = $this->getLinkButton($id, $this->getValue($sql, 'link' . $id), $category, $args);
$replace = $this->handleGlobalWidgetParams($var, $args, $replace);
$content = str_replace($var . '[' . $param_str . ']', $replace, $content);
}
}
return $content;
}
示例2: rex_a256_search_mpool_query
function rex_a256_search_mpool_query($params)
{
global $REX;
if (!$REX['USER']->hasPerm('be_search[mediapool]')) {
return $params['subject'];
}
$media_name = rex_request('a256_media_name', 'string');
if ($media_name == '') {
return $params['subject'];
}
$qry = $params['subject'];
$category_id = $params['category_id'];
$qry = str_replace('f.category_id=' . $category_id, '1=1', $qry);
$where = " (f.filename LIKE '%" . $media_name . "%' OR f.title LIKE '%" . $media_name . "%')";
$searchmode = OOAddon::getProperty('be_search', 'searchmode', 'local');
// global search - all
if ($searchmode == 'global') {
$qry = str_replace('WHERE ', 'WHERE ' . $where . ' AND ', $qry);
return $qry;
// local search - all categories and with no category
} elseif ($category_id == 0) {
$qry = str_replace('WHERE ', 'WHERE ' . $where . ' AND ', $qry);
// local search - categorie and subcategories
} else {
$where .= ' AND f.category_id = c.id ';
$where .= " AND (c.path LIKE '%|" . $params['category_id'] . "|%' OR c.id=" . $params['category_id'] . ') ';
$qry = str_replace('FROM ', 'FROM ' . $REX['TABLE_PREFIX'] . 'file_category c,', $qry);
$qry = str_replace('WHERE ', 'WHERE ' . $where . ' AND ', $qry);
}
return $qry;
}
示例3: enterObject
function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
{
global $REX;
if ($REX['ADDON']['community']['plugin_auth']['stay_active'] != 1) {
return;
}
$l_label = 'eingeloggt bleiben';
if (isset($this->elements[2])) {
$l_label = $this->elements[2];
}
$checked = '';
if (isset($this->elements[3]) && $this->elements[3] == 1) {
$checked = ' checked="checked"';
}
$sa = rex_request('rex_com_auth_stay_active', "int");
if ($sa == 1) {
$checked = ' checked="checked"';
}
$form_output[] .= '
<p class="formcheckbox form-com-auth-stayactive formlabel-' . $this->getName() . '" id="' . $this->getHTMLId() . '">
<input type="checkbox" class="checkbox " name="rex_com_auth_stay_active" id="el_' . $this->getId() . '" value="1" ' . $checked . ' />
<label class="checkbox " for="el_' . $this->getId() . '" >' . $l_label . '</label>
</p>
';
}
示例4: enterObject
function enterObject()
{
global $REX;
require_once realpath(dirname(__FILE__) . '/../../ext/captcha/class.captcha_x.php');
$captcha = new captcha_x();
$captchaRequest = rex_request('captcha', 'string');
if ($captchaRequest == 'show') {
while (@ob_end_clean()) {
}
$captcha->handle_request();
exit;
}
if ($this->params['send'] == 1 & $captcha->validate($this->getValue())) {
if (isset($_SESSION['captcha'])) {
unset($_SESSION['captcha']);
}
} elseif ($this->params['send'] == 1) {
// Error. Fehlermeldung ausgeben
$this->params['warning'][$this->getId()] = $this->params['error_class'];
$this->params['warning_messages'][$this->getId()] = $this->getElement(2);
}
if ($this->getElement(3) != '') {
$link = $this->getElement(3) . '?captcha=show&' . time() . microtime();
} else {
$link = rex_getUrl($this->params['article_id'], $this->params['clang'], array('captcha' => 'show'), '&') . '&' . time() . microtime();
}
$this->params['form_output'][$this->getId()] = $this->parse('value.captcha.tpl.php', array('link' => $link));
}
示例5: execute
public function execute()
{
global $I18N;
$addonkey = rex_request('addonkey', 'string');
$upload = rex_request('upload', array(array('upload_file', 'bool'), array('oldversion', 'string'), array('redaxo', 'array[string]'), array('description', 'string'), array('status', 'int'), array('replace_assets', 'bool'), array('ignore_tests', 'bool')));
$file = array();
$archive = null;
$file['version'] = $upload['upload_file'] ? OOAddon::getVersion($addonkey) : $upload['oldversion'];
$file['redaxo_versions'] = $upload['redaxo'];
$file['description'] = stripslashes($upload['description']);
$file['status'] = $upload['status'];
if ($upload['upload_file']) {
$archive = rex_path::addonCache('install', md5($addonkey . time()) . '.zip');
$exclude = array();
if ($upload['replace_assets']) {
$exclude[] = 'files';
}
if ($upload['ignore_tests']) {
$exclude[] = 'tests';
}
rex_install_archive::copyDirToArchive(rex_path::addon($addonkey), $archive, null, $exclude);
if ($upload['replace_assets']) {
rex_install_archive::copyDirToArchive(rex_path::addonAssets($addonkey), $archive, $addonkey . '/files');
}
$file['checksum'] = md5_file($archive);
}
rex_install_webservice::post(rex_install_packages::getPath('?package=' . $addonkey . '&file_id=' . rex_request('file', 'int', 0)), array('file' => $file), $archive);
if ($archive) {
rex_file::delete($archive);
}
unset($_REQUEST['addonkey']);
unset($_REQUEST['file']);
rex_install_packages::deleteCache();
return $I18N->msg('install_info_addon_uploaded', $addonkey);
}
示例6: rex_a256_search_mpool_query
function rex_a256_search_mpool_query($params)
{
global $REX;
if (!$REX['USER']->hasPerm('be_search[mediapool]')) {
return $params['subject'];
}
$media_name = rex_request('a256_media_name', 'string');
if ($media_name == '') {
return $params['subject'];
}
$qry = $params['subject'];
$category_id = $params['category_id'];
$where = " f.category_id = c.id AND (f.filename LIKE '%" . $media_name . "%' OR f.title LIKE '%" . $media_name . "%')";
switch (OOAddon::getProperty('be_search', 'searchmode', 'local')) {
case 'local':
// Suche auf aktuellen Kontext eingrenzen
if ($category_id != 0) {
$where .= " AND (c.path LIKE '%|" . $params['category_id'] . "|%' OR c.id=" . $params['category_id'] . ") ";
} else {
$qry = str_replace('f.category_id=0', '1=1', $qry);
}
}
$qry = str_replace('FROM ', 'FROM ' . $REX['TABLE_PREFIX'] . 'file_category c,', $qry);
$qry = str_replace('WHERE ', 'WHERE ' . $where . ' AND ', $qry);
return $qry;
}
示例7: enterObject
function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
{
global $REX;
$this->label = $this->elements[1];
$this->request_field = $this->elements[3];
$field = rex_request($this->request_field, "int", "0");
$this->user_name = "ddd";
if ($field != "0" && rex_com_user::createObject($field)) {
$this->value = $REX["COM_CACHE"]["USER"][$field]->getValue("email");
$this->user_name = rex_com_showUser(&$REX["COM_CACHE"]["USER"][$field], "name", "", FALSE);
} else {
$warning = $this->elements[5];
return;
}
$form_output[] = '
<p class="formtext">
<input type="hidden" name="' . $this->request_field . '" value="' . htmlspecialchars($field) . '" />
<label class="text" for="el_' . $this->id . '" >' . $this->elements[2] . '</label>
<input type="text" class="text inp_disabled" disabled="disabled" id="el_' . $this->id . '" value="' . htmlspecialchars($this->user_name) . '" />
</p>';
$email_elements[$this->elements[1]] = stripslashes($this->value);
if (!isset($this->elements[4]) || $this->elements[4] != "no_db") {
$sql_elements[$this->elements[1]] = $this->value;
}
return;
}
示例8: prepareQuery
function prepareQuery($query)
{
global $_orderby;
$rowsPerPage = $this->getRowsPerPage();
$startRow = $this->getStartRow();
if (rex_request('sort') && $_orderby != "") {
$sortColumn = $_orderby;
} else {
$sortColumn = $this->getSortColumn();
}
if ($sortColumn != '') {
$sortType = $this->getSortType();
if (strpos(strtoupper($query), 'ORDER BY') === false) {
$query .= ' ORDER BY ' . $sortColumn . ' ' . $sortType;
} else {
if (rex_request('sorttype') == 'desc') {
$query = $query . $sortType;
} else {
$query = preg_replace('/ORDER BY [^ ]*(asc|desc)?/i', 'ORDER BY ' . $sortColumn . ' ' . $sortType, $query);
}
}
}
$query .= ' LIMIT ' . $startRow . ',' . $rowsPerPage;
return $query;
}
示例9: printLangSelect
public static function printLangSelect($params)
{
global $REX, $I18N;
$out = '';
$clang = rex_request('clang', 'int');
$out .= '
<div id="rex-clang" class="rex-toolbar">
<div class="rex-toolbar-content">
<ul>
<li>' . $I18N->msg("languages") . ' : </li>';
$i = 0;
$stop = false;
foreach ($REX['CLANG'] as $key => $val) {
$i++;
if ($i == 1) {
$out .= '<li class="rex-navi-first rex-navi-clang-' . $key . '">';
} else {
$out .= '<li class="rex-navi-clang-' . $key . '">';
}
$val = rex_translate($val);
$class = '';
if ($key == $clang) {
$class = ' class="rex-active"';
}
$curQuery = rex_post('current_query', 'string', '');
if ($curQuery != '') {
$urlQuery = $curQuery;
parse_str($curQuery, $vals);
$vals['clang'] = $key;
$urlQuery = http_build_query($vals);
} else {
$urlQuery = self::getURLQuery($key);
}
if (!$REX['USER']->isAdmin() && !$REX['USER']->hasPerm('clang[all]') && !$REX['USER']->hasPerm('clang[' . $key . ']')) {
$out .= '<span class="rex-strike">' . $val . '</span>';
if ($clang == $key) {
$stop = true;
}
} else {
$out .= '<a' . $class . ' href="index.php?' . $urlQuery . '">' . $val . '</a>';
$out .= '</li>';
}
}
$out .= '
</ul>
</div>
</div>
';
echo $out;
if ($stop) {
echo '
<!-- *** OUTPUT OF CLANG-VALIDATE - START *** -->
' . rex_warning($I18N->msg('string_table_no_lang_perm')) . '
<!-- *** OUTPUT OF CLANG-VALIDATE - END *** -->
';
require $REX['INCLUDE_PATH'] . "/layout/bottom.php";
exit;
}
}
示例10: setValue
public function setValue($value)
{
if ($this->getElement(3) == 'REQUEST' && isset($_REQUEST[$this->getName()])) {
$this->value = stripslashes(rex_request($this->getName()));
} else {
$this->value = $this->getElement(2);
}
}
示例11: asd_filterPosts
function asd_filterPosts(array $names)
{
$return = array();
foreach ($names as $key => $cast) {
$return[$key] = rex_request($key, $cast);
}
return $return;
}
示例12: rex_a128_historyHandler
function rex_a128_historyHandler($params)
{
global $page, $subpage, $REX_USER, $REX;
$mypage = $params['mypage'];
require $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/classes/class.rex_historyManager.inc.php';
require $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/classes/class.rex_history.inc.php';
require $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/classes/class.rex_historyItem.inc.php';
$function = rex_request('function', 'string');
$mode = rex_request('mode', 'string');
// Alle Histories registrierens
$articleHistory =& rexHistoryManager::getHistory('articles');
$templateHistory =& rexHistoryManager::getHistory('templates');
$moduleHistory =& rexHistoryManager::getHistory('modules');
$actionHistory =& rexHistoryManager::getHistory('actions');
$sql = new rex_sql();
$sql->debugsql = true;
if ($page == 'module' && $function == 'edit' && ($module_id = rex_get('modul_id', 'int')) != 0) {
$result = $sql->getArray('SELECT name FROM ' . $REX['TABLE_PREFIX'] . 'modultyp WHERE id=' . $module_id);
if (isset($result[0])) {
$link = 'index.php?page=' . $page . '&function=' . $function . '&modul_id=' . $module_id;
$title = $result[0]['name'];
if ($REX_USER->hasPerm('advancedMode[]')) {
$title .= ' [' . $module_id . ']';
}
$moduleHistory->addItem(new rexHistoryItem($title, $link));
}
} elseif ($page == 'module' && $subpage == 'actions' && $function == 'edit' && ($action_id = rex_get('action_id', 'int')) != 0) {
$result = $sql->getArray('SELECT name FROM ' . $REX['TABLE_PREFIX'] . 'action WHERE id=' . $action_id);
if (isset($result[0])) {
$link = 'index.php?page=' . $page . '&subpage=' . $subpage . '&function=' . $function . '&modul_id=' . $action_id;
$title = $result[0]['name'];
if ($REX_USER->hasPerm('advancedMode[]')) {
$title .= ' [' . $action_id . ']';
}
$actionHistory->addItem(new rexHistoryItem($title, $link));
}
} elseif ($page == 'template' && $function == 'edit' && ($template_id = rex_get('template_id', 'int')) != 0) {
$result = $sql->getArray('SELECT name FROM ' . $REX['TABLE_PREFIX'] . 'template WHERE id=' . $template_id);
if (isset($result[0])) {
$link = 'index.php?page=' . $page . '&function=' . $function . '&template_id=' . $template_id;
$title = $result[0]['name'];
if ($REX_USER->hasPerm('advancedMode[]')) {
$title .= ' [' . $template_id . ']';
}
$templateHistory->addItem(new rexHistoryItem($title, $link));
}
} elseif ($page == 'content' && $mode == 'edit' && ($article_id = rex_get('article_id', 'int')) != 0) {
$art = OOArticle::getArticleById($article_id);
if (OOArticle::isValid($art)) {
$link = 'index.php?page=' . $page . '&mode=' . $mode . '&article_id=' . $article_id;
$title = $art->getName();
if ($REX_USER->hasPerm('advancedMode[]')) {
$title .= ' [' . $article_id . ']';
}
$articleHistory->addItem(new rexHistoryItem($title, $link));
}
}
}
示例13: execute
function execute()
{
$rex_com_auth_jump = rex_request('rex_com_auth_jump', 'string');
if ($rex_com_auth_jump != "") {
ob_end_clean();
header('Location: http://' . $REX["SERVER"] . '/' . rex_com_auth_urldecode($rex_com_auth_jump));
exit;
}
}
示例14: execute
public function execute()
{
global $I18N;
$addonkey = rex_request('addonkey', 'string');
rex_install_webservice::delete(rex_install_packages::getPath('?package=' . $addonkey . '&file_id=' . rex_request('file', 'int', 0)));
unset($_REQUEST['addonkey']);
unset($_REQUEST['file']);
rex_install_packages::deleteCache();
return $I18N->msg('install_info_addon_deleted', $addonkey);
}
示例15: getACRequestValues
function getACRequestValues($REX_ACTION)
{
$values = rex_request('VALUE', 'array');
for ($i = 1; $i < 21; $i++) {
$value = isset($values[$i]) ? stripslashes($values[$i]) : '';
$REX_ACTION['VALUE'][$i] = $value;
}
$REX_ACTION['PHP'] = stripslashes(rex_request('INPUT_PHP', 'string'));
$REX_ACTION['HTML'] = $this->stripPHP(stripslashes(rex_request('INPUT_HTML', 'string')));
return $REX_ACTION;
}