本文整理汇总了PHP中IPSLib::fetchInputAsArray方法的典型用法代码示例。如果您正苦于以下问题:PHP IPSLib::fetchInputAsArray方法的具体用法?PHP IPSLib::fetchInputAsArray怎么用?PHP IPSLib::fetchInputAsArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPSLib
的用法示例。
在下文中一共展示了IPSLib::fetchInputAsArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _unlock
/**
* Unlock selected accounts
*
* @return @e void [Outputs to screen]
*/
protected function _unlock()
{
//-----------------------------------------
// Check
//-----------------------------------------
$ids = IPSLib::fetchInputAsArray('mid_');
if (count($ids) < 1) {
$this->registry->output->showError($this->lang->words['t_nolockloc'], 11251);
}
//-----------------------------------------
// Unlock
//-----------------------------------------
if ($this->request['type'] == 'unlock') {
try {
$message = $this->_getManagementClass()->unlockMembers($ids);
} catch (Exception $error) {
$this->registry->output->showError($error->getMessage(), 11247);
}
$this->registry->output->global_message = $message;
$this->registry->output->silentRedirectWithMessage($this->settings['base_url'] . 'app=members');
} else {
if ($this->request['type'] == 'ban') {
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg('member_ban', 'members', 'members');
try {
$message = $this->_getManagementClass()->banMembers($ids);
} catch (Exception $error) {
$this->registry->output->showError($error->getMessage(), 11247);
}
$this->registry->output->global_message = $message;
$this->registry->output->silentRedirectWithMessage($this->settings['base_url'] . 'app=members');
} else {
if ($this->request['type'] == 'delete') {
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg('member_delete', 'members', 'members');
$this->registry->output->global_message = $this->_getManagementClass()->deleteMembers($ids);
$this->registry->output->silentRedirectWithMessage($this->settings['base_url'] . 'app=members');
}
}
}
}
示例2: _unlock
/**
* Unlock selected accounts
*
* @return @e void [Outputs to screen]
*/
protected function _unlock()
{
//-----------------------------------------
// Check
//-----------------------------------------
$ids = IPSLib::fetchInputAsArray('mid_');
if (count($ids) < 1) {
$this->returnJsonError($this->lang->words['t_nolockloc'], 11251);
}
//-----------------------------------------
// Unlock
//-----------------------------------------
if ($this->request['type'] == 'unlock') {
try {
$message = $this->_getManagementClass()->unlockMembers($ids);
} catch (Exception $error) {
$this->returnJsonError($error->getMessage());
}
$this->returnJsonArray(array('ok' => 1, 'msg' => $message));
} else {
if ($this->request['type'] == 'ban') {
$this->registry->getClass('class_permissions')->return = true;
if (!$this->registry->getClass('class_permissions')->checkPermission('member_ban', 'members', 'members')) {
$this->returnJsonError($this->lang->words['no_permission']);
}
try {
$message = $this->_getManagementClass()->banMembers($ids);
} catch (Exception $error) {
$this->returnJsonError($error->getMessage());
}
$this->returnJsonArray(array('ok' => 1, 'msg' => $message));
} else {
if ($this->request['type'] == 'delete') {
$this->registry->getClass('class_permissions')->return = true;
if (!$this->registry->getClass('class_permissions')->checkPermission('member_delete', 'members', 'members')) {
$this->returnJsonError($this->lang->words['no_permission']);
}
$message = $this->_getManagementClass()->deleteMembers($ids);
$this->returnJsonArray(array('ok' => 1, 'msg' => $message));
}
}
}
}