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


PHP Request::getString方法代码示例

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


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

示例1: search

    public function search($queries, $andor, $limit, $start, $userid)
    {
        $xoops = Xoops::getInstance();
        $alumni = Alumni::getInstance();
        $myts = MyTextSanitizer::getInstance();
        $by_cat = Request::getInt('by_cat', '');
        $andor = Request::getWord('andor', 'AND');
        $queries = array();
        $query = Request::getString('query', '');
        $start = Request::getInt('start', '0');
        $helper = $xoops->getModuleHelper('alumni');
        $module_id = $helper->getModule()->getVar('mid');
        $listingHandler = $helper->getHandler('listing');
        $groups = $xoops->getUserGroups();
        $alumni_ids = $xoops->getHandlerGroupperm()->getItemIds('alumni_view', $groups, $module_id);
        $all_ids = implode(', ', $alumni_ids);
        $criteria = new CriteriaCompo();
        $criteria->add(new Criteria('valid', 1, '='));
        //  $criteria->add(new Criteria('date', time(), '<='));
        $criteria->add(new Criteria('cid', '(' . $all_ids . ')', 'IN'));
        if ($userid != 0) {
            $criteria->add(new Criteria('usid', $userid, '='));
        }
        if ($by_cat) {
            $criteria->add(new Criteria('cid', $by_cat, '='));
        }
        $queries = array($query);
        $queries = implode('+', $queries);
        $count = 0;
        $i = 0;
        $criteria->add(new Criteria('name', '%' . $queries . '%', 'LIKE'), 'AND');
        $criteria->add(new Criteria('mname', '%' . $queries . '%', 'LIKE'), 'OR');
        $criteria->add(new Criteria('lname', '%' . $queries . '%', 'LIKE'), 'OR');
        $criteria->add(new Criteria('school', '%' . $queries . '%', 'LIKE'), 'OR');
        $criteria->add(new Criteria('year', '%' . $queries . '%', 'LIKE'), 'OR');
        $criteria->setLimit($limit);
        $criteria->setSort('date');
        $criteria->setOrder('DESC');
        $criteria->setStart($start);
        $numrows = $listingHandler->getCount();
        $this_search = $listingHandler->getall($criteria);
        $ret = array();
        $k = 0;
        foreach ($this_search as $obj) {
            $ret[$k]['image'] = 'images/cat/default.gif';
            $ret[$k]['link'] = 'listing.php?lid=' . $obj->getVar('lid') . '';
            $ret[$k]['title'] = $obj->getVar('name') . ' ' . $obj->getVar('mname') . ' ' . $obj->getVar('lname') . '   ---   ' . $obj->getVar('school') . '
		---   ' . $obj->getVar('year');
            $ret[$k]['time'] = $obj->getVar('date');
            $ret[$k]['uid'] = $obj->getVar('usid');
            $k++;
        }
        return $ret;
    }
开发者ID:jlm69,项目名称:alumni-26x,代码行数:54,代码来源:good_search.php

示例2: htmlentities

                     if (in_array($extension_verif, $extensions)) {
                         echo "<li class=\"file ext_{$ext}\"><a href=\"#\" onclick=\"tpls_edit_file('" . htmlentities($_REQUEST['dir'] . $file) . "', '" . htmlentities($_REQUEST['dir']) . "', '" . htmlentities($file) . "', '" . $ext . "');\" rel=\"tpls_edit_file('" . htmlentities($_REQUEST['dir'] . $file) . "', '" . htmlentities($_REQUEST['dir']) . "', '" . htmlentities($file) . "', '" . $ext . "');\">" . htmlentities($file) . "</a></li>";
                     } else {
                         //echo "<li class=\"file ext_$ext\">" . htmlentities($file) . "</li>";
                     }
                 }
             }
             echo "</ul>";
         }
     }
     break;
     // Edit File
 // Edit File
 case 'tpls_edit_file':
     $clean_file = Request::getString('file', '');
     $clean_path_file = Request::getString('path_file', '');
     $path_file = realpath(XOOPS_ROOT_PATH . '/themes' . trim($clean_path_file));
     $path_file = str_replace('\\', '/', $path_file);
     //Button restore
     if (XoopsLoad::fileExists($path_file . '.back')) {
         $restore = '<button class="ui-corner-all tooltip" type="button" onclick="tpls_restore(\'' . $path_file . '\')" value="' . XoopsLocale::A_RESTORE . '" title="' . XoopsLocale::A_RESTORE . '">
                         <img src="' . system_AdminIcons('revert.png') . '" alt="' . XoopsLocale::A_RESTORE . '" />
                     </button>';
     } else {
         $restore = '';
     }
     $file = XoopsFile::getHandler('file', $path_file);
     $content = $file->read();
     if (empty($content)) {
         echo SystemLocale::EMPTY_FILE;
     }
开发者ID:dazzlesoftware,项目名称:XoopsCore,代码行数:31,代码来源:jquery.php

示例3: dirname

 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         core
 * @since           2.0.0
 * @author          Kazumi Ono (AKA onokazu)
 * @author          Taiwen Jiang <phppp@users.sourceforge.net>
 * @version         $Id$
 */
include dirname(dirname(__DIR__)) . '/mainfile.php';
$search = Search::getInstance();
if (!$search->getConfig('enable_search')) {
    header('Location: ' . XOOPS_URL . '/index.php');
    exit;
}
$xoops = Xoops::getInstance();
$action = Request::getCmd('action', 'search');
$query = Request::getString('query', '');
$andor = Request::getWord('andor', 'AND');
$mid = Request::getInt('mid', 0);
$uid = Request::getInt('uid', 0);
$start = Request::getInt('start', 0);
$mids = Request::getArray('mids', array());
$queries = array();
if ($action === "results") {
    if ($query == "") {
        $xoops->redirect("index.php", 1, _MD_SEARCH_PLZENTER);
    }
} else {
    if ($action === "showall") {
        if ($query == "" || empty($mid)) {
            $xoops->redirect("index.php", 1, _MD_SEARCH_PLZENTER);
        }
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:index.php

示例4: sprintf

    if (!is_writable($compile_path)) {
        $error_msg[] = sprintf(XoopsLocale::EF_FOLDER_NOT_WRITABLE, $compile_path);
    }
    //www fits inside www_private, lets add a trailing slash to make sure it doesn't
    $xoops_path = $xbc->get('lib-path');
    $xoops_root_path = $xbc->get('root-path');
    if (strpos($xoops_path, $xoops_root_path) !== false || strpos($xoops_path, $_SERVER['DOCUMENT_ROOT']) !== false) {
        $error_msg[] = sprintf(XoopsLocale::EF_FOLDER_IS_INSIDE_DOCUMENT_ROOT, $xoops_path);
    }
    $var_path = $xoops->path('var');
    if (strpos($var_path, $xoops_root_path) !== false || strpos($var_path, $_SERVER['DOCUMENT_ROOT']) !== false) {
        $error_msg[] = sprintf(XoopsLocale::EF_FOLDER_IS_INSIDE_DOCUMENT_ROOT, $var_path);
    }
    $xoops->tpl()->assign('error_msg', $error_msg);
}
$xoopsorgnews = Request::getString('xoopsorgnews', null, 'GET');
if (!empty($xoopsorgnews)) {
    // Multiple feeds
    $myts = MyTextSanitizer::getInstance();
    $rssurl = array();
    $rssurl[] = 'http://sourceforge.net/export/rss2_projnews.php?group_id=41586&rss_fulltext=1';
    $rssurl[] = 'http://www.xoops.org/backend.php';
    $rssurl = array_unique(array_merge($rssurl, XoopsLocale::getAdminRssUrls()));
    $rssfile = 'admin/rss/adminnews-' . $xoops->getConfig('locale');
    $items = $xoops->cache()->cacheRead($rssfile, 'buildRssFeedCache', 24 * 60 * 60, $rssurl);
    if ($items != '') {
        $ret = '<table class="outer width100">';
        foreach (array_keys($items) as $i) {
            $ret .= '<tr class="head"><td><a href="' . htmlspecialchars($items[$i]['link']) . '" rel="external">';
            $ret .= htmlspecialchars($items[$i]['title']) . '</a> (' . htmlspecialchars($items[$i]['pubdate']) . ')</td></tr>';
            if ($items[$i]['description'] != "") {
开发者ID:redmexico,项目名称:XoopsCore,代码行数:31,代码来源:admin.php

示例5: implode

     $obj = $related_Handler->get($related_id);
     $form = $helper->getForm($obj, 'page_related');
     $xoops->tpl()->assign('form', $form->render());
     break;
 case 'save':
     if (!$xoops->security()->check()) {
         $xoops->redirect('related.php', 3, implode(',', $xoops->security()->getErrors()));
     }
     $related_id = Request::getInt('related_id', 0);
     if ($related_id > 0) {
         $obj = $related_Handler->get($related_id);
     } else {
         $obj = $related_Handler->create();
     }
     //main
     $obj->setVar('related_name', Request::getString('related_name', ''));
     $obj->setVar('related_domenu', Request::getInt('related_domenu', 1));
     $obj->setVar('related_navigation', Request::getInt('related_navigation', 1));
     if ($related_newid = $related_Handler->insert($obj)) {
         $related_id = $related_id != 0 ? $related_id : $related_newid;
         $datas = Request::getArray('datas');
         $datas_exists = $link_Handler->getContentByRelated($related_newid);
         $datas_delete = array_diff(array_values($datas_exists), $datas);
         $datas_add = array_diff($datas, array_values($datas_exists));
         // delete
         if (count($datas_delete) != 0) {
             $criteria = $criteria = new CriteriaCompo();
             $criteria->add(new Criteria('link_related_id', $related_id));
             $criteria->add(new Criteria('link_content_id', '(' . implode(', ', $datas_delete) . ')', 'IN'));
             $links_ids = $link_Handler->getIds($criteria);
             if (!$link_Handler->DeleteByIds($links_ids)) {
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:related.php

示例6: isset

     $xoops->header();
     // FILES UPLOAD FORM
     $files_form = $publisher->getForm($fileObj, 'file');
     $files_form->display();
     break;
 case "modify":
     $fileid = isset($_POST['fileid']) ? (int) $_POST['fileid'] : 0;
     // Creating the file object
     if ($fileid != 0) {
         $fileObj = $publisher->getFileHandler()->get($fileid);
     } else {
         $xoops->redirect("index.php", 1, XoopsLocale::E_NO_ACCESS_PERMISSION);
     }
     // Putting the values in the file object
     $fileObj->setVar('name', Request::getString('name'));
     $fileObj->setVar('description', Request::getString('description'));
     $fileObj->setVar('status', Request::getInt('file_status'));
     // attach file if any
     if (isset($_FILES['item_upload_file']) && $_FILES['item_upload_file']['name'] != "") {
         $oldfile = $fileObj->getFilePath();
         // Get available mimetypes for file uploading
         $allowed_mimetypes = $publisher->getMimetypeHandler()->getArrayByType();
         // TODO : display the available mimetypes to the user
         $errors = array();
         if ($publisher->getConfig('perm_upload') && is_uploaded_file($_FILES['item_upload_file']['tmp_name'])) {
             if ($fileObj->checkUpload('item_upload_file', $allowed_mimetypes, $errors)) {
                 if ($fileObj->storeUpload('item_upload_file', $allowed_mimetypes, $errors)) {
                     unlink($oldfile);
                 }
             }
         }
开发者ID:mambax7,项目名称:publisher-26,代码行数:31,代码来源:file.php

示例7: dirname

 * @version         $Id$
 */
include dirname(dirname(__DIR__)) . '/mainfile.php';
$xoops = Xoops::getInstance();
// Warning: code depending on Xoops\Core\HttpRequest may need to change
$request = \Xoops\Core\HttpRequest::getInstance();
$xoops->header();
\Xoops\Utils::dumpVar(Request::get());
$result['id'] = Request::getInt('id', 13);
$result['string'] = Request::getString('string', 'defaultValueHere');
$result['bool'] = Request::getBool('bool', false);
$result['order'] = Request::getString('order', 'ASC');
$result['url'] = $request->getUrl();
$result['uri'] = $request->getUri();
$result['referer'] = $request->getReferer();
$result['phpsessid_cookie'] = Request::getString('PHPSESSID', '', 'cookie');
$result['ip'] = $request->getClientIp();
$result['isget'] = 'GET' === Request::getMethod();
$result['ispost'] = 'POST' === Request::getMethod();
$result['ismobile'] = $request->is('mobile');
$result['isrobot'] = $request->is('robot');
$result['files'] = Request::getArray('file_identifier', array(), 'files');
\Xoops\Utils::dumpVar($result);
echo '<a href="?id=12&string=I love you&bool=everythingsistrue&order=DESC">Good uri</a>';
echo ' - <a href="?id=test&order=DESCENDING">Bad uri</a>';
// Form
$form = new Xoops\Form\SimpleForm('', 'form_id', 'request.php?id=666', true);
$form->setExtra('enctype="multipart/form-data"');
$code = new Xoops\Form\Text('String', 'string', 2, 25, '', 'string...');
$code->setDescription('Description text');
$code->setPattern('^.{3,}$', 'You need at least 3 characters');
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:request.php

示例8: dirname

 of supporting developers from this source code or any supporting source code
 which is considered copyrighted (c) material of the original comment or credit authors.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
use Xoops\Core\Request;
use Xoops\Core\XoopsTpl;
/**
 * smilies module
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         smilies
 * @since           2.6.0
 * @author          Mage Grégory (AKA Mage)
 */
include dirname(dirname(__DIR__)) . '/mainfile.php';
$xoops = Xoops::getInstance();
$xoops->logger()->quiet();
$target = Request::getString('target', '');
$xoops->simpleHeader(false);
if ($target && preg_match('/^[0-9a-z_]*$/i', $target)) {
    $tpl = new XoopsTpl();
    $tpl->assign('target', $target);
    $tpl->assign('smileys', $xoops->getModuleHandler('smiley', 'smilies')->getActiveSmilies(false));
    $tpl->assign('closebutton', 1);
    $tpl->display('module:smilies/smilies_smiley.tpl');
}
$xoops->simpleFooter();
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:popup.php

示例9: readUserCookie

 /**
  * Read the user cookie
  *
  * @return array|false the cookie data as array(userid, series, token), or
  *                     false if cookie does not exist (or not configured)
  */
 protected function readUserCookie()
 {
     $usercookie = $this->xoops->getConfig('usercookie');
     if (empty($usercookie)) {
         return false;
         // remember me is not configured
     }
     $usercookie = $this->xoops->getConfig('usercookie');
     $notFound = 'Nosuchcookie';
     $cookieData = Request::getString($usercookie, $notFound, 'COOKIE');
     if ($cookieData !== $notFound) {
         $temp = explode('-', $cookieData);
         if (count($temp) == 3) {
             $temp[0] = (int) $temp[0];
             return $temp;
         }
         $this->clearUserCookie();
         // clean up garbage cookie
     }
     return false;
 }
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:27,代码来源:RememberMe.php

示例10: CriteriaCompo

 }
 $imgcat_id = Request::getInt('imgcat_id', 0);
 if (isset($imgcat_id) && $imgcat_id != 0) {
     $obj = $helper->getHandlerCategories()->get($imgcat_id);
     $isnew = false;
 } else {
     $obj = $helper->getHandlerCategories()->create();
     $isnew = true;
 }
 $obj->setVar('imgcat_name', Request::getString('imgcat_name', ''));
 $obj->setVar('imgcat_maxsize', Request::getInt('imgcat_maxsize', 100000));
 $obj->setVar('imgcat_maxwidth', Request::getInt('imgcat_maxwidth', 128));
 $obj->setVar('imgcat_maxheight', Request::getInt('imgcat_maxheight', 128));
 $obj->setVar('imgcat_display', Request::getBool('imgcat_display', 1));
 $obj->setVar('imgcat_weight', Request::getInt('imgcat_weight', 0));
 $obj->setVar('imgcat_storetype', Request::getString('imgcat_storetype', 'file'));
 $obj->setVar('imgcat_type', 'C');
 if ($imgcat_id = $helper->getHandlerCategories()->insert($obj)) {
     // delete permissions
     if (!$isnew) {
         $criteria = new CriteriaCompo(new Criteria('gperm_itemid', $imgcat_id));
         $criteria->add(new Criteria('gperm_modid', $xoops->module->getVar('mid')));
         $criteria2 = new CriteriaCompo(new Criteria('gperm_name', 'imgcat_write'));
         $criteria2->add(new Criteria('gperm_name', 'imgcat_read'), 'OR');
         $criteria->add($criteria2);
         $xoops->getHandlerGroupPermission()->deleteAll($criteria);
     }
     // Save permissions
     $permissions = array('readgroup' => 'imgcat_read', 'writegroup' => 'imgcat_write');
     foreach ($permissions as $k => $permission) {
         $groups = Request::getArray($k, array(FixedGroups::ADMIN));
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:categories.php

示例11: setVarsFromRequest

 /**
  * The name says it all
  */
 public function setVarsFromRequest()
 {
     $xoops = Xoops::getInstance();
     //Required fields
     if (isset($_REQUEST['categoryid'])) {
         $this->setVar('categoryid', Request::getInt('categoryid'));
     }
     if (isset($_REQUEST['title'])) {
         $this->setVar('title', Request::getString('title'));
     }
     if (isset($_REQUEST['body'])) {
         $this->setVar('body', Request::getText('body'));
     }
     //Not required fields
     if (isset($_REQUEST['summary'])) {
         $this->setVar('summary', Request::getText('summary'));
     }
     if (isset($_REQUEST['subtitle'])) {
         $this->setVar('subtitle', Request::getString('subtitle'));
     }
     if (isset($_REQUEST['item_tag'])) {
         $this->setVar('item_tag', Request::getString('item_tag'));
     }
     if (isset($_REQUEST['image_featured'])) {
         $image_item = Request::getArray('image_item');
         $image_featured = Request::getString('image_featured');
         //Todo: get a better image class for xoops!
         //Image hack
         $image_item_ids = array();
         $qb = \Xoops::getInstance()->db()->createXoopsQueryBuilder();
         $qb->select('i.image_id', 'i.image_name')->fromPrefix('image', 'i')->orderBy('i.image_id');
         $result = $qb->execute();
         while ($myrow = $result->fetch(\PDO::FETCH_ASSOC)) {
             $image_name = $myrow['image_name'];
             $id = $myrow['image_id'];
             if ($image_name == $image_featured) {
                 $this->setVar('image', $id);
             }
             if (in_array($image_name, $image_item)) {
                 $image_item_ids[] = $id;
             }
         }
         $this->setVar('images', implode('|', $image_item_ids));
     }
     if (isset($_REQUEST['uid'])) {
         $this->setVar('uid', Request::getInt('uid'));
     } elseif ($this->isNew()) {
         $this->setVar('uid', $xoops->isUser() ? $xoops->user->getVar('uid') : 0);
     }
     if (isset($_REQUEST['author_alias'])) {
         $this->setVar('author_alias', Request::getString('author_alias'));
         if ($this->getVar('author_alias') != '') {
             $this->setVar('uid', 0);
         }
     }
     if (isset($_REQUEST['datesub'])) {
         $this->setVar('datesub', strtotime($_REQUEST['datesub']['date']) + $_REQUEST['datesub']['time']);
     } elseif ($this->isNew()) {
         $this->setVar('datesub', time());
     }
     if (isset($_REQUEST['item_short_url'])) {
         $this->setVar('short_url', Request::getString('item_short_url'));
     }
     if (isset($_REQUEST['item_meta_keywords'])) {
         $this->setVar('meta_keywords', Request::getString('item_meta_keywords'));
     }
     if (isset($_REQUEST['item_meta_description'])) {
         $this->setVar('meta_description', Request::getString('item_meta_description'));
     }
     if (isset($_REQUEST['weight'])) {
         $this->setVar('weight', Request::getInt('weight'));
     }
     if (isset($_REQUEST['allowcomments'])) {
         $this->setVar('cancomment', Request::getInt('allowcomments'));
     } elseif ($this->isNew()) {
         $this->setVar('cancoment', $this->publisher->getConfig('submit_allowcomments'));
     }
     if (isset($_REQUEST['status'])) {
         $this->setVar('status', Request::getInt('status'));
     } elseif ($this->isNew()) {
         $this->setVar('status', $this->publisher->getConfig('submit_status'));
     }
     if (isset($_REQUEST['dohtml'])) {
         $this->setVar('dohtml', Request::getInt('dohtml'));
     } elseif ($this->isNew()) {
         $this->setVar('dohtml', $this->publisher->getConfig('submit_dohtml'));
     }
     if (isset($_REQUEST['dosmiley'])) {
         $this->setVar('dosmiley', Request::getInt('dosmiley'));
     } elseif ($this->isNew()) {
         $this->setVar('dosmiley', $this->publisher->getConfig('submit_dosmiley'));
     }
     if (isset($_REQUEST['doxcode'])) {
         $this->setVar('doxcode', Request::getInt('doxcode'));
     } elseif ($this->isNew()) {
         $this->setVar('doxcode', $this->publisher->getConfig('submit_doxcode'));
     }
//.........这里部分代码省略.........
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:101,代码来源:item.php

示例12:

        $edituser->setVar('user_icq', Request::getString('user_icq', ''));
        $edituser->setVar('user_from', Request::getString('user_from', ''));
        $edituser->setVar('user_sig', XoopsLocale::substr(Request::getString('user_sig', ''), 0, 255));
        $edituser->setVar('user_viewemail', Request::getBool('user_viewemail', 0));
        $edituser->setVar('user_aim', Request::getString('user_aim', ''));
        $edituser->setVar('user_yim', Request::getString('user_yim', ''));
        $edituser->setVar('user_msnm', Request::getString('user_msnm', ''));
        $edituser->setVar('attachsig', Request::getBool('attachsig', 0));
        $edituser->setVar('timezone', Request::getString('timezone', 'UTC'));
        $edituser->setVar('uorder', Request::getInt('uorder', 0));
        $edituser->setVar('umode', Request::getString('umode', 'flat'));
        $edituser->setVar('notify_method', Request::getInt('notify_method', 1));
        $edituser->setVar('notify_mode', Request::getInt('notify_mode', 1));
        $edituser->setVar('bio', XoopsLocale::substr(Request::getString('bio', ''), 0, 255));
        $edituser->setVar('user_occ', Request::getString('user_occ', ''));
        $edituser->setVar('user_intrest', Request::getString('user_intrest', ''));
        $edituser->setVar('user_mailok', Request::getBool('user_mailok', 0));
        if (!$member_handler->insertUser($edituser)) {
            $xoops->header();
            echo $edituser->getHtmlErrors();
            $xoops->footer();
        } else {
            $xoops->redirect('userinfo.php?uid=' . $uid, 1, XoopsLocale::S_YOUR_PROFILE_UPDATED);
        }
        exit;
    }
}
if ($op === 'editprofile') {
    $xoops->header('module:system/system_edituser.tpl');
    $xoops->tpl()->assign('uid', $xoops->user->getVar("uid"));
    $xoops->tpl()->assign('editprofile', true);
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:edituser.php

示例13: dirname

 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         include
 * @since           2.3.0
 * @author          Vinod <smartvinu@gmail.com>
 * @author          Taiwen Jiang <phppp@users.sourceforge.net>
 * @version         $Id$
 */
use Xoops\Core\Request;
include_once dirname(__DIR__) . '/mainfile.php';
$xoops = Xoops::getInstance();
$xoops->logger()->quiet();
$myts = \Xoops\Core\Text\Sanitizer::getInstance();
$content = Request::getString('text', '');
if (!$xoops->security()->validateToken(@$_POST['token'], false)) {
    $content = 'Direct access is not allowed!!!';
}
$html = empty($_POST['html']) ? 0 : 1;
$content = $myts->displayTarea($content, $html, 1, 1, 1, 1);
//if (preg_match_all('/%u([[:alnum:]]{4})/', $content, $matches)) {
//    foreach ($matches[1] as $uniord) {
//        $utf = '&#x' . $uniord . ';';
//        $content = str_replace('%u' . $uniord, $utf, $content);
//    }
//    $content = urldecode($content);
//}
if (!headers_sent()) {
    header('Content-Type:text/html; charset=UTF-8');
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:formdhtmltextarea_preview.php

示例14: publisher_editFile

but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
use Xoops\Core\Request;
/**
 * @copyright       The XUUPS Project http://sourceforge.net/projects/xuups/
 * @license         GNU GPL V2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         Publisher
 * @since           1.0
 * @author          trabis <lusopoemas@gmail.com>
 * @author          The SmartFactory <www.smartfactory.ca>
 * @version         $Id$
 */
include_once __DIR__ . '/admin_header.php';
$xoops = Xoops::getInstance();
$op = Request::getString('op');
function publisher_editFile($showmenu = false, $fileid = 0, $itemid = 0)
{
    $publisher = Publisher::getInstance();
    $xoops = Xoops::getInstance();
    // if there is a parameter, and the id exists, retrieve data: we're editing a file
    if ($fileid != 0) {
        // Creating the File object
        /* @var $fileObj PublisherFile */
        $fileObj = $publisher->getFileHandler()->get($fileid);
        if ($fileObj->notLoaded()) {
            $xoops->redirect("javascript:history.go(-1)", 1, _AM_PUBLISHER_NOFILESELECTED);
        }
        if ($showmenu) {
            //publisher_adminMenu(2, _AM_PUBLISHER_FILE . " > " . _AM_PUBLISHER_EDITING);
        }
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:file.php

示例15: array

$xoops->disableModuleCache();
$xoops->header('module:publisher/publisher_search.tpl');
$xoopsTpl = $xoops->tpl();
$module_info_search = $publisher->getModule()->getInfo("search");
XoopsLoad::loadFile($publisher->path($module_info_search["file"]));
$limit = 10;
//$publisher->getConfig('idxcat_perpage');
$uid = 0;
$queries = array();
$andor = Request::getString('andor');
$start = Request::getInt('start');
$category = Request::getArray('category');
$username = Request::getString('uname');
$searchin = Request::getArray('searchin');
$sortby = Request::getString('sortby');
$term = Request::getString('term');
if (empty($category) || is_array($category) && in_array("all", $category)) {
    $category = array();
} else {
    $category = !is_array($category) ? explode(",", $category) : $category;
    $category = array_map("intval", $category);
}
$andor = in_array(strtoupper($andor), array("OR", "AND", "EXACT")) ? strtoupper($andor) : "OR";
$sortby = in_array(strtolower($sortby), array("itemid", "datesub", "title", "categoryid")) ? strtolower($sortby) : "itemid";
if (!(empty($_POST["submit"]) && empty($term))) {
    $next_search["category"] = implode(",", $category);
    $next_search["andor"] = $andor;
    $next_search["term"] = $term;
    $query = trim($term);
    if ($andor !== "EXACT") {
        $ignored_queries = array();
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:31,代码来源:search.php


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