Beispiel #1
0
 public static function eventCoreImagemanager($args)
 {
     $uri = '';
     foreach (Request::get() as $k => $v) {
         $uri .= urlencode($k) . '=' . urlencode($v) . '&';
     }
     Xoops::getInstance()->redirect("modules/images/imagemanager.php?{$uri}", 0);
 }
Beispiel #2
0
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
use Xoops\Core\Request;
/**
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @author          trabis <*****@*****.**>
 * @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);
Beispiel #3
0
 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;
/**
 * XOOPS global search
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         http://www.fsf.org/copyleft/gpl.html GNU General Public License (GPL)
 * @package         core
 * @since           2.6.0
 * @author          Kazumi Ono (AKA onokazu)
 * @author          Taiwen Jiang <*****@*****.**>
 * @version         $Id$
 * @todo            Modularize; Both search algorithms and interface will be redesigned
 */
include __DIR__ . '/mainfile.php';
$xoops = Xoops::getInstance();
$uri = '';
if ($xoops->isActiveModule('search')) {
    foreach (Request::get() as $k => $v) {
        $uri .= urlencode($k) . '=' . urlencode($v) . '&';
    }
    $xoops->redirect("modules/search/index.php?{$uri}", 0);
} else {
    $xoops->redirect("index.php", 10, 'Oops, Please install search module!!!!');
}
Beispiel #4
0
 /**
  * @covers Xoops\Core\Request::get
  */
 public function testGet()
 {
     $varname = 'RequestTest';
     $_REQUEST[$varname] = 'Lorem';
     $get = Request::get('request');
     $this->assertTrue(is_array($get));
     $this->assertEquals('Lorem', $get[$varname]);
     unset($get);
     $_REQUEST[$varname] = '<i>Lorem ipsum </i><script>alert();</script>';
     $get = Request::get('request');
     $this->assertEquals('Lorem ipsum alert();', $get[$varname]);
 }