本文整理汇总了PHP中xoops_getrequest函数的典型用法代码示例。如果您正苦于以下问题:PHP xoops_getrequest函数的具体用法?PHP xoops_getrequest怎么用?PHP xoops_getrequest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xoops_getrequest函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: execute
function execute(&$controller, &$xoopsUser)
{
if (xoops_getrequest('_form_control_cancel') != null) {
return USER_FRAME_VIEW_CANCEL;
}
$isNew = $this->mObject->isNew();
$ret = parent::execute($controller, $xoopsUser);
if ($ret == USER_FRAME_VIEW_SUCCESS && $isNew) {
$handler =& xoops_getmodulehandler('users_search');
$uidArr = $handler->getUids($this->mFilter->getCriteria(0, 0));
$handler =& xoops_getmodulehandler('mailjob_link');
foreach ($uidArr as $uid) {
$obj =& $handler->create();
$obj->set('mailjob_id', $this->mObject->get('mailjob_id'));
$obj->set('uid', $uid);
$handler->insert($obj);
}
}
return $ret;
}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:25,代码来源:MailjobEditAction.class.php
示例2: executeViewInput
function executeViewInput(&$controller, &$xoopsUser, &$render)
{
$render->setTemplateName("tplfile_clone.html");
$render->setAttribute('actionForm', $this->mActionForm);
$render->setAttribute('object', $this->mObject);
$render->setAttribute('tpl_id', xoops_getrequest('tpl_id'));
}
开发者ID:hiro1173,项目名称:legacy,代码行数:7,代码来源:TplfileCloneAction.class.php
示例3: _getId
function _getId()
{
$root =& XCube_Root::getSingleton();
$uid = is_object($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0;
return isset($_REQUEST['uid']) ? intval(xoops_getrequest('uid')) : $uid;
}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:7,代码来源:EditUserAction.class.php
示例4: _setupObject
function _setupObject()
{
parent::_setupObject();
if (is_object($this->mObject) && $this->mObject->isNew()) {
$this->mObject->set('cid', xoops_getrequest('cid'));
}
}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:7,代码来源:BannerEditAction.class.php
示例5: fetch
function fetch()
{
parent::fetch();
$root =& XCube_Root::getSingleton();
$rank_special = $root->mContext->mRequest->getRequest('rank_special');
$option_field = $root->mContext->mRequest->getRequest('option_field');
$search = $root->mContext->mRequest->getRequest('search');
if (isset($_REQUEST['rank_special'])) {
$this->mNavi->addExtra('rank_special', xoops_getrequest('rank_special'));
$this->_mCriteria->add(new Criteria('rank_special', xoops_getrequest('rank_special')));
}
if (isset($_REQUEST['option_field'])) {
$this->mNavi->addExtra('option_field', xoops_getrequest('option_field'));
$this->mOptionField = $option_field;
if ($this->mOptionField == "special") {
//only system avatar
$this->_mCriteria->add(new Criteria('rank_special', '1'));
} elseif ($this->mOptionField == "normal") {
//only custom avatar
$this->_mCriteria->add(new Criteria('rank_special', '0'));
} else {
//all
}
}
//
if (!empty($search)) {
$this->mKeyword = $search;
$this->mNavi->addExtra('search', $this->mKeyword);
$this->_mCriteria->add(new Criteria('rank_title', '%' . $this->mKeyword . '%', 'LIKE'));
}
$this->_mCriteria->addSort($this->getSort(), $this->getOrder());
}
开发者ID:hiro1173,项目名称:legacy,代码行数:32,代码来源:RanksFilterForm.class.php
示例6: checkLogin
function checkLogin(&$xoopsUser)
{
$root =& XCube_Root::getSingleton();
if ($root->mContext->mUser->isInRole('Site.RegisteredUser')) {
return;
}
$root->mLanguageManager->loadModuleMessageCatalog('user');
$userHandler =& xoops_getmodulehandler('users', 'user');
$criteria = new CriteriaCompo();
if (xoops_getrequest('uname') != "" && strpos(xoops_getrequest('uname'), '@') !== false) {
$criteria->add(new Criteria('email', xoops_getrequest('uname')));
} else {
$criteria->add(new Criteria('uname', xoops_getrequest('uname')));
// use for both e-mail or uname logiin
// $criteria->add(new Criteria('uname','')); // use for only e-mail logiin
}
$criteria->add(new Criteria('pass', md5(xoops_getrequest('pass'))));
$userArr =& $userHandler->getObjects($criteria);
if (count($userArr) != 1) {
return;
}
if ($userArr[0]->get('level') == 0) {
return;
}
$handler =& xoops_gethandler('user');
$user =& $handler->get($userArr[0]->get('uid'));
$xoopsUser = $user;
require_once XOOPS_ROOT_PATH . '/include/session.php';
xoops_session_regenerate();
$_SESSION = array();
$_SESSION['xoopsUserId'] = $xoopsUser->get('uid');
$_SESSION['xoopsUserGroups'] = $xoopsUser->getGroups();
}
开发者ID:nouphet,项目名称:rata,代码行数:33,代码来源:Emaillogin.class.php
示例7: execute
function execute(&$controller, &$xoopsUser)
{
//in case of result of user-search
if (!isset($_REQUEST['batchjob'])) {
return $this->getDefaultView($controller, $xoopsUser);
}
//To return user to proper-url with search condition
$this->mFilter =& $this->_getFilterForm();
$this->mFilter->fetch();
//
if (xoops_getrequest('_form_control_cancel') != null) {
return USER_FRAME_VIEW_CANCEL;
}
$this->mActionForm->fetch();
$this->mActionForm->validate();
if ($this->mActionForm->hasError()) {
return $this->_processConfirm($controller, $xoopsUser);
}
else {
return $this->_processSave($controller, $xoopsUser);
}
}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:26,代码来源:UserSearchListAction.class.php
示例8: getDefaultView
function getDefaultView(&$controller, &$xoopsUser)
{
$dirname = xoops_getrequest('dirname');
if (!preg_match("/^[a-zA-Z_][a-zA-Z0-9_]*\$/", $dirname)) {
return LEGACY_FRAME_VIEW_ERROR;
}
if (!is_dir(XOOPS_MODULE_PATH . "/" . $dirname)) {
return LEGACY_FRAME_VIEW_ERROR;
}
$moduleHandler =& xoops_gethandler('module');
$this->mModuleObject =& $moduleHandler->getByDirname($dirname);
//
// If a module is installed, load modinfo and go to special displaying.
//
if (is_object($this->mModuleObject)) {
$this->mModuleObject->loadAdminMenu();
$this->mModuleObject->loadInfo($dirname);
$this->mInstalledFlag = true;
} else {
$this->mModuleObject =& $moduleHandler->create();
$this->mModuleObject->loadInfoAsVar($dirname);
$this->mInstalledFlag = false;
}
return LEGACY_FRAME_VIEW_SUCCESS;
}
开发者ID:nbuy,项目名称:legacy,代码行数:25,代码来源:ModuleInfoAction.class.php
示例9: getDefaultView
function getDefaultView(&$controller, &$xoopsUser)
{
$id = xoops_getrequest('tpl_id');
$handler =& xoops_getmodulehandler('tplfile');
$this->mObject =& $handler->get($id);
return $this->mObject != null ? LEGACYRENDER_FRAME_VIEW_SUCCESS : LEGACYRENDER_FRAME_VIEW_ERROR;
}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:7,代码来源:TplfileDownloadAction.class.php
示例10: executeViewIndex
function executeViewIndex(&$controller, &$xoopsUser, &$render)
{
$render->setTemplateName("legacy_image_list.html");
foreach (array_keys($this->mObjects) as $key) {
$this->mObjects[$key]->loadImagecategory();
}
$render->setAttribute("objects", $this->mObjects);
$render->setAttribute("pageNavi", $this->mFilter->mNavi);
$render->setAttribute('imgcatId', $this->mImgcatId);
$handler =& xoops_getmodulehandler('imagecategory', 'legacy');
if (is_object($xoopsUser)) {
$groups = $xoopsUser->getGroups();
} else {
$groups = array(XOOPS_GROUP_ANONYMOUS);
}
$categoryArr =& $handler->getObjectsWithReadPerm($groups, 1);
$render->setAttribute('categoryArr', $categoryArr);
//
// If current category object exists, check the permission of uploading.
//
$hasUploadPerm = null;
if ($this->mCategory != null) {
$hasUploadPerm = $this->mCategory->hasUploadPerm($groups);
}
$render->setAttribute('hasUploadPerm', $hasUploadPerm);
$render->setAttribute("category", $this->mCategory);
//echo xoops_getrequest('target');die();
$render->setAttribute('target', htmlspecialchars(xoops_getrequest('target'), ENT_QUOTES));
}
开发者ID:hiro1173,项目名称:legacy,代码行数:29,代码来源:ImageListAction.class.php
示例11: execute
function execute(&$controller, &$xoopsUser)
{
if (!is_object($this->mMailjob)) {
return USER_FRAME_VIEW_ERROR;
}
if (xoops_getrequest('_form_control_cancel') != null) {
return USER_FRAME_VIEW_CANCEL;
}
$this->mActionForm->fetch();
$this->mActionForm->validate();
if ($this->mActionForm->hasError()) {
return USER_FRAME_VIEW_INPUT;
}
$root =& XCube_Root::getSingleton();
if ($this->mMailjob->get('is_pm')) {
$this->mMailjob->mSend->add(array(&$this, "sendPM"));
}
if ($this->mMailjob->get('is_mail')) {
$this->mMailjob->mSend->add(array(&$this, "sendMail"));
}
$this->mMailjob->send($xoopsUser);
$this->mMailjob->loadUserCount();
return ($this->mMailjob->mUserCount > 0) ? USER_FRAME_VIEW_INPUT : USER_FRAME_VIEW_SUCCESS;
}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:32,代码来源:MailjobSendAction.class.php
示例12: execute
function execute(&$controller, &$xoopsUser)
{
if (xoops_getrequest('_form_control_cancel') != null) {
return LEGACYRENDER_FRAME_VIEW_CANCEL;
}
$this->mActionForm->fetch();
$this->mActionForm->validate();
if ($this->mActionForm->hasError()) {
return $this->getDefaultView($controller, $xoopsUser);
}
require_once XOOPS_ROOT_PATH . "/class/class.tar.php";
$tar = new tar();
$formFile = $this->mActionForm->get('upload');
//
// [Warn] access private member directly
// TODO We should define the access method because we oftern
// access private member of XCube_FormFile.
//
$tar->openTar($formFile->_mTmpFileName);
if (!is_array($tar->files)) {
return LEGACYRENDER_FRAME_VIEW_ERROR;
}
$tplsetName = null;
foreach ($tar->files as $id => $info) {
$infoArr = explode('/', str_replace("\\", '/', $info['name']));
$tplsetName = $this->mActionForm->get('tplset_name');
if ($tplsetName == null) {
$tplsetName = trim($infoArr[0]);
}
if ($tplsetName != null) {
break;
}
}
//
// Check tplset name.
//
if ($tplsetName == null || preg_match('/[' . preg_quote('\\/:*?"<>|', '/') . ']/', $tplsetName)) {
$this->_addErrorMessage(_AD_LEGACYRENDER_ERROR_TPLSET_NAME_WRONG);
return LEGACYRENDER_FRAME_VIEW_ERROR;
}
$handler =& xoops_getmodulehandler('tplset');
if ($handler->getCount(new Criteria('tplset_name', $tplsetName)) != 0) {
$this->_addErrorMessage(XCube_Utils::formatMessage(_AD_LEGACYRENDER_ERROR_TPLSET_ALREADY_EXISTS, $tplsetName));
return LEGACYRENDER_FRAME_VIEW_ERROR;
}
$tplset =& $handler->create();
$tplset->set('tplset_name', $tplsetName);
if (!$handler->insert($tplset)) {
$this->_addErrorMessage(_AD_LEGACYRENDER_ERROR_COULD_NOT_SAVE_TPLSET);
return LEGACYRENDER_FRAME_VIEW_ERROR;
}
$themeimages = array();
if (!$this->_fetchTemplateFiles($tar, $tplset, $themeimages)) {
return LEGACYRENDER_FRAME_VIEW_ERROR;
}
if (!$this->_fetchImageset($tar, $tplset, $themeimages)) {
return LEGACYRENDER_FRAME_VIEW_ERROR;
}
return LEGACYRENDER_FRAME_VIEW_SUCCESS;
}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:60,代码来源:TplsetUploadAction.class.php
示例13: getDefaultView
function getDefaultView(&$controller, &$xoopsUser)
{
if ((!isset($_REQUEST['actkey'])) || (!$this->mObject)) {
$controller->executeForward(XOOPS_URL . '/');
}
if ($this->mObject->get('actkey') != xoops_getrequest('actkey')) {
$controller->executeRedirect(XOOPS_URL . '/', 3, _MD_USER_MESSAGE_ACTKEYNOT);
}
if ($this->mObject->get('level') > 0) {
$controller->executeRedirect(XOOPS_URL . '/user.php', 3, _MD_USER_MESSAGE_ACONTACT);
}
$this->mObject->set('level', '1');
//
// Force update with GET request
//
$this->mObjectHandler->insert($this->mObject, true);
if ($this->mConfig['activation_type'] == 2) {
$builder =new User_RegistAdminCommitMailBuilder();
$director =new User_UserRegistMailDirector($builder, $this->mObject, $controller->mRoot->mContext->getXoopsConfig(), $this->mConfig);
$director->contruct();
$mailer=&$builder->getResult();
if ($mailer->send()) {
$controller->executeRedirect(XOOPS_URL . '/', 5, sprintf(_MD_USER_MESSAGE_ACTVMAILOK, $this->mObject->get('uname')));
} else {
$controller->executeRedirect(XOOPS_URL . '/', 5, sprintf(_MD_USER_MESSAGE_ACTVMAILNG, $this->mObject->get('uname')));
}
} else {
$controller->executeRedirect(XOOPS_URL . '/user.php', 5, _MD_USER_MESSAGE_ACTLOGIN);
}
}
开发者ID:nunoluciano,项目名称:uxcl,代码行数:35,代码来源:UserActivateAction.class.php
示例14: getDefaultView
function getDefaultView(&$controller, &$xoopsUser)
{
$flag = parent::getDefaultView($controller, $xoopsUser);
if ($flag == LEGACY_FRAME_VIEW_INPUT && $this->_enableCatchImgcat()) {
$this->mActionForm->set('imgcat_id', xoops_getrequest('imgcat_id'));
}
return $flag;
}
开发者ID:nouphet,项目名称:rata,代码行数:8,代码来源:ImageCreateAction.class.php
示例15: fetch
function fetch()
{
parent::fetch();
if (isset($_REQUEST['target'])) {
$this->mNavi->addExtra('target', xoops_getrequest('target'));
}
$this->_mCriteria->addSort($this->getSort(), $this->getOrder());
}
开发者ID:nouphet,项目名称:rata,代码行数:8,代码来源:SmilesFilterForm.class.php
示例16: getDefaultView
function getDefaultView(&$controller, &$xoopsUser)
{
$this->mTargetName = trim(xoops_getrequest('target'));
if ($this->mTargetName == '' || !preg_match('/^[a-zA-Z]\\w*$/', $this->mTargetName)) {
return LEGACY_FRAME_VIEW_ERROR;
}
return parent::getDefaultView($controller, $xoopsUser);
}
开发者ID:nouphet,项目名称:rata,代码行数:8,代码来源:MiscSmiliesAction.class.php
示例17: execute
function execute()
{
$root =& XCube_Root::getSingleton();
// load message catalog of legacy for _AD_LEGACY_LANG_NO_SETTING, even if the current module is not Legacy.
$root->mLanguageManager->loadModuleAdminMessageCatalog('legacy');
//
$root->mLanguageManager->loadModinfoMessageCatalog('legacy');
$controller =& $root->mController;
$user =& $root->mController->mRoot->mContext->mXoopsUser;
$render =& $this->getRenderTarget();
$render->setAttribute('legacy_module', 'legacy');
$this->mCurrentModule =& $controller->mRoot->mContext->mXoopsModule;
if ($this->mCurrentModule->get('dirname') == 'legacy') {
if (xoops_getrequest('action') == "help") {
$moduleHandler =& xoops_gethandler('module');
$t_module =& $moduleHandler->getByDirname(xoops_gethandler('dirname'));
if (is_object($t_module)) {
$this->mCurrentModule =& $t_module;
}
}
}
$db =& $controller->getDB();
$mod = $db->prefix("modules");
$perm = $db->prefix("group_permission");
$groups = implode(",", $user->getGroups());
//
// Users who are belong to ADMIN GROUP have every permissions, so we have to prepare two kinds of SQL.
//
if ($root->mContext->mUser->isInRole('Site.Owner')) {
$sql = "SELECT DISTINCT mid FROM {$mod} WHERE isactive=1 AND hasadmin=1 ORDER BY weight, mid";
} else {
$sql = "SELECT DISTINCT {$mod}.mid FROM {$mod},{$perm} " . "WHERE {$mod}.isactive=1 AND {$mod}.mid={$perm}.gperm_itemid AND {$perm}.gperm_name='module_admin' AND {$perm}.gperm_groupid IN ({$groups}) " . "AND {$mod}.hasadmin=1 " . "ORDER BY {$mod}.weight, {$mod}.mid";
}
$result = $db->query($sql);
$handler =& xoops_gethandler('module');
while ($row = $db->fetchArray($result)) {
$xoopsModule =& $handler->get($row['mid']);
$module =& Legacy_Utils::createModule($xoopsModule);
$this->mModules[] =& $module;
unset($module);
}
//
$tpl = $db->prefix("tplfile");
$tpl_modules = array();
$sql = "SELECT DISTINCT tpl_module FROM {$tpl}";
$result = $db->query($sql);
while ($row = $db->fetchArray($result)) {
$tpl_modules[] = $row['tpl_module'];
}
$render->setAttribute('tplmodules', $tpl_modules);
//
$render->setTemplateName('legacy_admin_block_sidemenu.html');
$render->setAttribute('modules', $this->mModules);
$render->setAttribute('currentModule', $this->mCurrentModule);
$renderSystem =& $root->getRenderSystem($this->getRenderSystemName());
$renderSystem->renderBlock($render);
}
开发者ID:nouphet,项目名称:rata,代码行数:57,代码来源:AdminSideMenu.class.php
示例18: fetch
function fetch()
{
parent::fetch();
if (isset($_REQUEST['mailjob_id'])) {
$this->mNavi->addExtra('mailjob_id', xoops_getrequest('mailjob_id'));
$this->_mCriteria->add(new Criteria('mailjob_id', xoops_getrequest('mailjob_id')));
}
$this->_mCriteria->addSort($this->getSort(), $this->getOrder());
}
开发者ID:hiro1173,项目名称:legacy,代码行数:9,代码来源:Mailjob_linkFilterForm.class.php
示例19: fetch
function fetch()
{
parent::fetch();
$root =& XCube_Root::getSingleton();
$image_display = $root->mContext->mRequest->getRequest('image_display');
$imgcat_id = $root->mContext->mRequest->getRequest('imgcat_id');
$option_field = $root->mContext->mRequest->getRequest('option_field');
$option_field2 = $root->mContext->mRequest->getRequest('option_field2');
$search = $root->mContext->mRequest->getRequest('search');
if (isset($_REQUEST['image_display'])) {
$this->mNavi->addExtra('image_display', xoops_getrequest('image_display'));
$this->_mCriteria->add(new Criteria('image_display', xoops_getrequest('image_display')));
}
if (isset($_REQUEST['imgcat_id'])) {
$this->mNavi->addExtra('imgcat_id', xoops_getrequest('imgcat_id'));
$this->_mCriteria->add(new Criteria('imgcat_id', xoops_getrequest('imgcat_id')));
}
if (isset($_REQUEST['option_field'])) {
$this->mNavi->addExtra('option_field', $option_field);
$this->mOptionField = $option_field;
if ($this->mOptionField == "visible") {
$this->_mCriteria->add(new Criteria('image_display', '1'));
} elseif ($this->mOptionField == "invisible") {
$this->_mCriteria->add(new Criteria('image_display', '0'));
} else {
//all
}
}
if (isset($_REQUEST['option_field2'])) {
$this->mNavi->addExtra('option_field2', $option_field2);
$this->mOptionField2 = $option_field2;
if ($this->mOptionField2 == "gif") {
$this->_mCriteria->add(new Criteria('image_mimetype', 'image/gif'));
} elseif ($this->mOptionField2 == "png") {
$this->_mCriteria->add(new Criteria('image_mimetype', 'image/png'));
} elseif ($this->mOptionField2 == "jpeg") {
$cri = new CriteriaCompo();
$cri->add(new Criteria('image_mimetype', 'image/jpeg'));
$cri->add(new Criteria('image_mimetype', 'image/pjpeg'), 'OR');
$this->_mCriteria->add($cri);
} else {
//all
}
}
//
if (!empty($search)) {
$this->mKeyword = $search;
$this->mNavi->addExtra('search', $this->mKeyword);
$this->_mCriteria->add(new Criteria('image_nicename', '%' . $this->mKeyword . '%', 'LIKE'));
}
$this->_mCriteria->addSort($this->getSort(), $this->getOrder());
/*
if (abs($this->mSort) != IMAGE_SORT_KEY_IMAGE_WEIGHT) {
$this->_mCriteria->addSort($this->mSortKeys[IMAGE_SORT_KEY_IMAGE_WEIGHT], $this->getOrder());
}
*/
}
开发者ID:nobunobuta,项目名称:legacy,代码行数:57,代码来源:ImageFilterForm.class.php
示例20: getDefaultView
function getDefaultView(&$controller, &$xoopsUser)
{
$handler =& xoops_getmodulehandler('comment');
$this->mObject =& $handler->get(xoops_getrequest('com_id'));
if ($this->mObject == null) {
return LEGACY_FRAME_VIEW_ERROR;
}
return LEGACY_FRAME_VIEW_SUCCESS;
}
开发者ID:hiro1173,项目名称:legacy,代码行数:9,代码来源:CommentViewAction.class.php
注:本文中的xoops_getrequest函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论