本文整理汇总了PHP中rcms_redirect函数的典型用法代码示例。如果您正苦于以下问题:PHP rcms_redirect函数的具体用法?PHP rcms_redirect怎么用?PHP rcms_redirect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rcms_redirect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: zb_PermissionsCopyAdminRights
/**
* Performs replication of administrators rights to existing user
*
* @global object $system
* @param string $sourceUser
* @param string $targetUser
*/
function zb_PermissionsCopyAdminRights($sourceUser, $targetUser)
{
global $system;
$targetRights = array();
$rootUser = '';
$rights = array();
$system->getRightsForUser($sourceUser, $rights, $root, $level);
if ($root) {
$rootUser = 1;
} else {
if (!empty($rights)) {
foreach ($rights as $eachright => $desc) {
$targetRights[$eachright] = 'on';
}
}
}
//writing changes
if ($system->setRightsForUser($targetUser, $targetRights, $rootUser, '1')) {
show_window('', __('Rights cloned'));
log_register("CLONE AdminPermissions FROM {" . $sourceUser . "} TO {" . $targetUser . "}");
rcms_redirect("?module=permissions&edit=" . $targetUser);
} else {
show_error(__('Error occurred'));
}
}
示例2: mrst_MassReset
function mrst_MassReset()
{
global $altcfg, $billing;
$query = "SELECT `login` from `users`";
$allusers = zb_UserGetAllStargazerData();
if (!empty($allusers)) {
foreach ($allusers as $io => $eachuser) {
//very shitty hack
sleep(2);
$billing->resetuser($eachuser['login']);
if (!isset($altcfg['MASSRESET_NOLOG'])) {
log_register("MASSRESET User (" . $eachuser['login'] . ")");
}
}
//preventing F5
rcms_redirect("?module=massreset");
} else {
show_error(__('Any users found'));
}
}
示例3: zbs_UserGetLoginByIp
/**
* Returns user login by its IP address
*
* @param string $ip
* @return string
*/
function zbs_UserGetLoginByIp($ip)
{
$glob_conf = zbs_LoadConfig();
$query = "SELECT `login` from `users` where `IP`='" . $ip . "'";
$result = simple_query($query);
if (!empty($result)) {
return $result['login'];
} else {
if ($glob_conf['auth'] == 'ip') {
if (isset($glob_conf['authfailredir'])) {
if (!empty($glob_conf['authfailredir'])) {
rcms_redirect($glob_conf['authfailredir']);
die('Unknown user');
} else {
die('Unknown user EX_EMPTY_AUTHFAILREDIR');
}
} else {
die('Unknown user EX_NO_AUTHFAILREDIR_DEFINED');
}
}
}
}
示例4: zb_plfixer
function zb_plfixer($login, $field)
{
if ($field == 'emails') {
zb_UserCreateEmail($login, '');
}
if ($field == 'contracts') {
zb_UserCreateContract($login, '');
}
if ($field == 'phones') {
zb_UserCreatePhone($login, '', '');
}
if ($field == 'realname') {
zb_UserCreateRealName($login, '');
}
if ($field == 'userspeeds') {
zb_UserCreateSpeedOverride($login, '0');
}
if ($field == 'nethosts') {
rcms_redirect("?module=pl_ipchange&username=" . $login);
}
rcms_redirect("?module=pl_checker&username=" . $login);
}
示例5: ts_TaskProblemsEditForm
/**
* Returns task typical problems editing form
*
* @return string
*/
function ts_TaskProblemsEditForm()
{
$rawNotes = zb_StorageGet('PROBLEMS');
//extract old or create new typical problems array
if (!empty($rawNotes)) {
$rawNotes = base64_decode($rawNotes);
$rawNotes = unserialize($rawNotes);
} else {
$emptyArray = array();
$newNotes = serialize($emptyArray);
$newNotes = base64_encode($newNotes);
zb_StorageSet('PROBLEMS', $newNotes);
$rawNotes = $emptyArray;
}
//adding and deletion subroutines
if (wf_CheckPost(array('createtypicalnote'))) {
$toPush = strip_tags($_POST['createtypicalnote']);
array_push($rawNotes, $toPush);
$newNotes = serialize($rawNotes);
$newNotes = base64_encode($newNotes);
zb_StorageSet('PROBLEMS', $newNotes);
log_register('TASKMAN ADD TYPICALPROBLEM');
rcms_redirect("?module=taskman&probsettings=true");
}
if (wf_CheckPost(array('deletetypicalnote', 'typicalnote'))) {
$toUnset = $_POST['typicalnote'];
if (($delkey = array_search($toUnset, $rawNotes)) !== false) {
unset($rawNotes[$delkey]);
}
$newNotes = serialize($rawNotes);
$newNotes = base64_encode($newNotes);
zb_StorageSet('PROBLEMS', $newNotes);
log_register('TASKMAN DELETE TYPICALPROBLEM');
rcms_redirect("?module=taskman&probsettings=true");
}
$rows = '';
$result = wf_Link("?module=taskman", __('Back'), true, 'ubButton');
if (!empty($rawNotes)) {
foreach ($rawNotes as $eachNote) {
$cells = wf_TableCell($eachNote);
$rows .= wf_TableRow($cells, 'row3');
}
}
$result .= wf_TableBody($rows, '100%', '0', '');
$result .= wf_delimiter();
$addinputs = wf_TextInput('createtypicalnote', __('Create'), '', true, '20');
$addinputs .= wf_Submit(__('Save'));
$addform = wf_Form("", "POST", $addinputs, 'glamour');
$result .= $addform;
$delinputs = ts_TaskTypicalNotesSelector(false);
$delinputs .= wf_HiddenInput('deletetypicalnote', 'true');
$delinputs .= wf_Submit(__('Delete'));
$delform = wf_Form("", "POST", $delinputs, 'glamour');
$result .= $delform;
return $result;
}
示例6: zb_SpeedControlGetOverrideUsers
function zb_SpeedControlGetOverrideUsers()
{
$query = "SELECT `login` from `userspeeds` WHERE `speed` NOT LIKE '0'";
$alloverrides = simple_queryall($query);
$result = array();
if (!empty($alloverrides)) {
foreach ($alloverrides as $io => $eachoverride) {
$result[] = $eachoverride;
}
}
return $result;
}
function zb_SpeedControlFix($login)
{
}
//fixing speed override
if (isset($_GET['fix'])) {
$login = vf($_GET['fix']);
$speed = 0;
zb_UserDeleteSpeedOverride($login);
zb_UserCreateSpeedOverride($login, $speed);
log_register("SPEEDFIX (" . $login . ")");
$billing->resetuser($login);
log_register("RESET User (" . $login . ")");
rcms_redirect("?module=speedcontrol");
}
$alloverrides = zb_SpeedControlGetOverrideUsers();
show_window(__('Users with speed overrides'), web_UsersLister($alloverrides));
} else {
show_error(__('You cant control this module'));
}
示例7: vf
//if someone editing nas
if (wf_CheckPost(array('editnastype'))) {
$targetnas = "WHERE `id` = '" . $nasid . "'";
$nastype = vf($_POST['editnastype']);
$nasip = mysql_real_escape_string($_POST['editnasip']);
$nasname = mysql_real_escape_string($_POST['editnasname']);
$nasbwdurl = mysql_real_escape_string($_POST['editnasbwdurl']);
$netid = vf($_POST['networkselect']);
simple_update_field('nas', 'nastype', $nastype, $targetnas);
simple_update_field('nas', 'nasip', $nasip, $targetnas);
simple_update_field('nas', 'nasname', $nasname, $targetnas);
simple_update_field('nas', 'bandw', $nasbwdurl, $targetnas);
simple_update_field('nas', 'netid', $netid, $targetnas);
zb_NasConfigSave();
log_register("NAS EDIT " . $nasip);
rcms_redirect("?module=nas&edit=" . $nasid);
}
$nasdata = zb_NasGetData($nasid);
$currentnetid = $nasdata['netid'];
$currentnasip = $nasdata['nasip'];
$currentnasname = $nasdata['nasname'];
$currentnastype = $nasdata['nastype'];
$currentbwdurl = $nasdata['bandw'];
$nastypes = array('local' => 'Local NAS', 'rscriptd' => 'rscriptd', 'mikrotik' => 'MikroTik', 'radius' => 'Radius');
$editinputs = multinet_network_selector($currentnetid) . "<br>";
$editinputs .= wf_Selector('editnastype', $nastypes, 'NAS type', $currentnastype, true);
$editinputs .= wf_TextInput('editnasip', 'IP', $currentnasip, true, '15');
$editinputs .= wf_TextInput('editnasname', 'NAS name', $currentnasname, true, '15');
$editinputs .= wf_TextInput('editnasbwdurl', 'Bandwidthd URL', $currentbwdurl, true, '25');
$editinputs .= wf_Submit('Save');
$editform = wf_Form('', 'POST', $editinputs, 'glamour');
示例8: zb_AddressDeleteCity
$cityid = $_GET['cityid'];
if ($_GET['action'] == 'delete') {
if (!zb_AddressCityProtected($cityid)) {
zb_AddressDeleteCity($cityid);
rcms_redirect('?module=city');
} else {
show_window(__('Error'), __('You can not just remove a city where there are streets and possibly survivors'));
show_window('', wf_Link('?module=city', __('Back'), true, 'ubButton'));
}
}
if ($_GET['action'] == 'edit') {
if (isset($_POST['editcityname'])) {
if (!empty($_POST['editcityname'])) {
zb_AddressChangeCityName($cityid, $_POST['editcityname']);
}
zb_AddressChangeCityAlias($cityid, $_POST['editcityalias']);
rcms_redirect('?module=city');
}
show_window(__('Edit City'), web_CityEditForm($cityid));
}
}
}
// create form
if (!wf_CheckGet(array('action'))) {
show_window(__('Create new city'), web_CityCreateForm());
}
//list
show_window(__('Available cities'), web_CityLister());
} else {
show_error(__('You cant control this module'));
}
示例9: define
define('RCMS_ROOT_PATH', './');
include RCMS_ROOT_PATH . 'common.php';
//load files
if (get('download') && $system->checkForRight('GENERAL')) {
$file = base64_decode(get('download'));
download_file($file);
}
function rcms_loadAdminLib($lib)
{
require_once ADMIN_PATH . 'libs/' . $lib . '.php';
}
//------------------------------------------------------------------------------------------------------//
// preparations...
if (post('admin_selected_skin')) {
setcookie('admin_skin', $_POST['admin_selected_skin'], FOREVER_COOKIE);
rcms_redirect('');
}
$admin_skin = cookie('admin_skin', 'default');
$admin_skin = cut_text(preg_replace("/[^a-zA-Z]+/", '', $admin_skin));
//only letters
define('ADMIN_SKIN', ADMIN_PATH . 'skins/' . $admin_skin . '/');
$rights =& $system->rights;
$root =& $system->root;
if (!LOGGED_IN) {
$message = __('Access denied');
$message .= '<br />
<form method="post" action="">
<input type="hidden" name="login_form" value="1" />
<table cellpadding="2" cellspacing="1" style="width: 100%;">
<tr>
<td class="row1">' . __('Username') . ':</td>
示例10: show_window
if (method_exists($corps, $beggar['BU']['F'])) {
$corpAttachControls = $corps->{$beggar}['BU']['F']($login);
show_window(__('Private user'), $corpAttachControls);
}
if (method_exists($corps, $beggar['BU']['AB'])) {
$corpAddAttachControls = $corps->{$beggar}['BU']['AB']($login);
show_window(__('Create') . ' ' . __('Corporate user'), $corpAddAttachControls);
}
}
}
}
if ($route == Corps::URL_SEARCH) {
$searchResults = $corps->searchUsersByCorpName($_POST['searchcorpname']);
if (!empty($searchResults)) {
show_window(__('Search results'), $searchResults);
}
show_window('', wf_Link('?module=usersearch', __('Back'), false, 'ubButton'));
}
} else {
//default list route
rcms_redirect(Corps::URL_CORPS_LIST);
}
} else {
show_error(__('No license key available'));
}
} else {
show_error(__('This module is disabled'));
}
} else {
show_error(__('Access denied'));
}
示例11: ProfileDocuments
<?php
if (cfr('PLDOCS')) {
$altcfg = $ubillingConfig->getAlter();
if ($altcfg['DOCX_SUPPORT']) {
$documents = new ProfileDocuments();
$date = wf_CheckPost(array('showdate')) ? $_POST['showdate'] : '';
$documents->loadAllUsersDocuments($date);
//existing document downloading
if (wf_CheckGet(array('documentdownload'))) {
zb_DownloadFile($documents::DOCUMENTS_PATH . $_GET['documentdownload'], 'docx');
}
//document deletion from database
if (wf_CheckGet(array('deletedocument'))) {
$documents->unregisterDocument($_GET['deletedocument']);
rcms_redirect('?module=report_documents');
}
//controls
$actionLinks = wf_Link('?module=report_documents', __('Grid view') . ' ' . wf_img('skins/icon_table.png'), false, 'ubButton');
$actionLinks .= wf_Link('?module=report_documents&calendarview=true', __('As calendar') . ' ' . wf_img('skins/icon_calendar.gif'), false, 'ubButton');
show_window('', $actionLinks);
if (!wf_CheckGet(array('calendarview'))) {
//show calendar control
show_window(__('By date'), $documents->dateControl());
//list available documents
show_window(__('Previously generated documents'), $documents->renderAllUserDocuments());
} else {
//or calendar view
show_window(__('Previously generated documents'), $documents->renderAllUserDocumentsCalendar());
}
} else {
示例12: commentSaver
/**
* Controls post environment and do something object actions when its required
*
* @return void
*/
protected function commentSaver()
{
//detecting return URL
if (isset($_SERVER['QUERY_STRING'])) {
$returnUrl = '?' . $_SERVER['QUERY_STRING'];
} else {
$returnUrl = '';
show_error(__('Strange exeption') . ': ' . self::EX_EMPTY_QUERY_STRING);
}
///new comment creation
if (wf_CheckPost(array('newadcommentstext'))) {
$this->createComment($_POST['newadcommentstext']);
if ($returnUrl) {
rcms_redirect($returnUrl);
}
}
//comment deletion
if (wf_CheckPost(array('adcommentsdeleteid'))) {
$this->deleteComment($_POST['adcommentsdeleteid']);
if ($returnUrl) {
rcms_redirect($returnUrl);
}
}
//comment editing
if (wf_CheckPost(array('adcommentsmodifyid', 'adcommentsmodifytext'))) {
$this->modifyComment($_POST['adcommentsmodifyid'], $_POST['adcommentsmodifytext']);
if ($returnUrl) {
rcms_redirect($returnUrl);
}
}
}
示例13: wf_Link
$back = wf_Link(SwitchLogin::MODULE_URL, __('Back'), false, 'ubButton');
show_window('', $back);
}
if (isset($_POST['add'])) {
$params = array('swmodel', 'SwMethod');
if (wf_CheckPost($params)) {
$model = $_POST['swmodel'];
$snmpTemplate = $_POST['snmptemplate'];
$login = $_POST['SwLogin'];
$pass = $_POST['SwPass'];
$method = $_POST['SwMethod'];
$community = $_POST['RwCommunity'];
$enable = $_POST['Enable'];
$swLogin->SwLoginAdd($model, $login, $pass, $method, $community, $enable, $snmpTemplate);
rcms_redirect(SwitchLogin::MODULE_URL);
}
}
if (isset($_GET['delete'])) {
$swLogin->SwLoginDelete($_GET['delete']);
rcms_redirect(SwitchLogin::MODULE_URL);
}
if (isset($_POST['edit'])) {
$swLogin->SwLoginEditQuery($_POST['swmodel'], $_POST['EditSwLogin'], $_POST['EditSwPass'], $_POST['EditConn'], $_POST['EditRwCommunity'], $_POST['EditEnable'], $_POST['snmptemplate'], $_GET['edit']);
rcms_redirect(SwitchLogin::MODULE_URL);
}
} else {
show_error('You cant control this module');
}
} else {
show_error("SWITCH_AUTOCONFIG is disabled");
}
示例14: vf
$switchid = vf($_GET['edit'], 3);
$switchdata = zb_SwitchGetData($switchid);
//if someone edit switch
if (wf_CheckPost(array('editmodel'))) {
if (cfr('SWITCHESEDIT')) {
simple_update_field('switches', 'modelid', $_POST['editmodel'], "WHERE `id`='" . $switchid . "'");
simple_update_field('switches', 'ip', $_POST['editip'], "WHERE `id`='" . $switchid . "'");
simple_update_field('switches', 'location', $_POST['editlocation'], "WHERE `id`='" . $switchid . "'");
simple_update_field('switches', 'desc', $_POST['editdesc'], "WHERE `id`='" . $switchid . "'");
simple_update_field('switches', 'snmp', $_POST['editsnmp'], "WHERE `id`='" . $switchid . "'");
simple_update_field('switches', 'geo', $_POST['editgeo'], "WHERE `id`='" . $switchid . "'");
if ($_POST['editparentid'] != $switchid) {
simple_update_field('switches', 'parentid', $_POST['editparentid'], "WHERE `id`='" . $switchid . "'");
}
log_register('SWITCH CHANGE [' . $switchid . ']' . ' IP ' . $_POST['editip'] . " LOC `" . $_POST['editlocation'] . "`");
rcms_redirect("?module=switches&edit=" . $switchid);
} else {
show_error(__('Access denied'));
}
}
//render switch edit form
show_window(__('Edit switch'), web_SwitchEditForm($switchid));
//minimap container
if ($altCfg['SWYMAP_ENABLED']) {
if (!empty($switchdata['geo'])) {
show_window(__('Mini-map'), wf_delimiter() . web_SwitchMiniMap($switchdata));
}
}
//downlinks list
web_SwitchDownlinksList($switchid);
//additional comments engine
示例15: base64_encode
$newStoreAliases = base64_encode($newStoreAliases);
zb_StorageSet('ASKOZIAPBX_NUMALIAS', $newStoreAliases);
log_register("ASKOZIAPBX ALIAS ADD `" . $newAliasNum . "` NAME `" . $newAliasName . "`");
rcms_redirect("?module=askozia&config=true");
}
//alias deletion
if (wf_CheckPost(array('deletealias'))) {
$newStoreAliases = $numAliases;
$deleteAliasNum = mysql_real_escape_string($_POST['deletealias']);
if (isset($newStoreAliases[$deleteAliasNum])) {
unset($newStoreAliases[$deleteAliasNum]);
$newStoreAliases = serialize($newStoreAliases);
$newStoreAliases = base64_encode($newStoreAliases);
zb_StorageSet('ASKOZIAPBX_NUMALIAS', $newStoreAliases);
log_register("ASKOZIAPBX ALIAS DELETE `" . $deleteAliasNum . "`");
rcms_redirect("?module=askozia&config=true");
}
}
show_window(__('Settings'), web_AskoziaConfigForm());
show_window(__('Phone book'), web_AskoziaAliasesForm());
} else {
//showing call history form
show_window(__('Calls history'), web_AskoziaDateForm());
}
} else {
show_error(__('Permission denied'));
}
if (wf_CheckPost(array('datefrom', 'dateto'))) {
zb_AskoziaGetCallHistory($_POST['datefrom'], $_POST['dateto']);
} else {
if (!wf_CheckGet(array('config'))) {