本文整理汇总了PHP中G::header方法的典型用法代码示例。如果您正苦于以下问题:PHP G::header方法的具体用法?PHP G::header怎么用?PHP G::header使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类G
的用法示例。
在下文中一共展示了G::header方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveAuthSources
function saveAuthSources($params)
{
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
}
$aCommonFields = array('AUTH_SOURCE_UID', 'AUTH_SOURCE_NAME', 'AUTH_SOURCE_PROVIDER', 'AUTH_SOURCE_SERVER_NAME', 'AUTH_SOURCE_PORT', 'AUTH_SOURCE_ENABLED_TLS', 'AUTH_ANONYMOUS', 'AUTH_SOURCE_SEARCH_USER', 'AUTH_SOURCE_PASSWORD', 'AUTH_SOURCE_VERSION', 'AUTH_SOURCE_BASE_DN', 'AUTH_SOURCE_OBJECT_CLASSES', 'AUTH_SOURCE_ATTRIBUTES');
$aFields = $aData = array();
unset($params->PHPSESSID);
foreach ($params as $sField => $sValue) {
if (in_array($sField, $aCommonFields)) {
$aFields[$sField] = $sField == 'AUTH_SOURCE_ENABLED_TLS' || $sField == 'AUTH_ANONYMOUS' ? $sValue == 'yes' ? 1 : 0 : $sValue;
} else {
$aData[$sField] = $sValue;
}
}
$aFields['AUTH_SOURCE_DATA'] = $aData;
if ($aFields['AUTH_SOURCE_UID'] == '') {
$RBAC->createAuthSource($aFields);
} else {
$RBAC->updateAuthSource($aFields);
}
$data = array();
$data['success'] = true;
return $data;
}
示例2: __construct
public function __construct()
{
$licensedFeatures =& PMLicensedFeatures::getSingleton();
if (!$licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
}
$this->loadSettings();
}
示例3: unset
if (isset($_SESSION['PROCESS'])) {
unset($_SESSION['PROCESS']);
}
if (isset($_SESSION['TASK'])) {
unset($_SESSION['TASK']);
}
if (isset($_SESSION['INDEX'])) {
unset($_SESSION['INDEX']);
}
if (isset($_SESSION['STEP_POSITION'])) {
unset($_SESSION['STEP_POSITION']);
}
/* Process */
try {
$oCase = new Cases();
$aData = $oCase->startCase($_POST['form']['TAS_UID'], $_SESSION['USER_LOGGED']);
$_SESSION['APPLICATION'] = $aData['APPLICATION'];
$_SESSION['INDEX'] = $aData['INDEX'];
$_SESSION['PROCESS'] = $aData['PROCESS'];
$_SESSION['TASK'] = $_POST['form']['TAS_UID'];
$_SESSION['STEP_POSITION'] = 0;
$_SESSION['CASES_REFRESH'] = true;
$oCase = new Cases();
$aNextStep = $oCase->getNextStep($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION']);
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
G::header('location: ' . $aNextStep['PAGE']);
} catch (Exception $e) {
$_SESSION['G_MESSAGE'] = $e->getMessage();
$_SESSION['G_MESSAGE_TYPE'] = 'error';
G::header('location: cases_New');
}
示例4:
/**
* sysLoginVerify.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* 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. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (!isset($_POST)) {
G::header('location: /sys/' . $lang . '/' . SYS_SKIN . '/' . 'login/login');
}
if (isset($_SESSION['sysLogin'])) {
$_POST['form'] = $_SESSION['sysLogin'];
}
require_once 'authentication.php';
示例5:
<?php
G::header('Location: ../cases/main');
die;
示例6: elseif
}
$realPath = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/' . $sAppDocUid . '_' . $iDocVersion . '.' . $ext;
$realPath1 = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/' . $sAppDocUid . '.' . $ext;
$sw_file_exists = false;
if (file_exists($realPath)) {
$sw_file_exists = true;
} elseif (file_exists($realPath1)) {
$sw_file_exists = true;
$realPath = $realPath1;
}
if (!$sw_file_exists) {
$error_message = "'" . $oAppDocument->Fields['APP_DOC_FILENAME'] . "' " . G::LoadTranslation('ID_ERROR_STREAMING_FILE');
if (isset($_POST['request']) && $_POST['request'] == true) {
$res['success'] = 'failure';
$res['message'] = $error_message;
print G::json_encode($res);
} else {
G::SendMessageText($error_message, "ERROR");
$backUrlObj = explode("sys" . SYS_SYS, $_SERVER['HTTP_REFERER']);
G::header("location: " . "/sys" . SYS_SYS . $backUrlObj[1]);
die;
}
} else {
if (isset($_POST['request']) && $_POST['request'] == true) {
$res['success'] = 'success';
$res['message'] = $oAppDocument->Fields['APP_DOC_FILENAME'];
print G::json_encode($res);
} else {
G::streamFile($realPath, $bDownload, $oAppDocument->Fields['APP_DOC_FILENAME']);
}
}
示例7: session_start
/*----------------------------------********---------------------------------*/
if (isset ($_POST['form']['USER_ENV'])) {
@session_destroy();
session_start();
$_SESSION['sysLogin'] = $_POST['form'];
$data = base64_encode(serialize($_POST));
$url = sprintf('/sys%s/%s/%s/login/sysLoginVerify?d=%s', $_POST['form']['USER_ENV'], SYS_LANG, SYS_SKIN, $data);
G::header("location: $url");
die();
}
//Save session variables
$arraySession = array();
if (isset($_SESSION["G_MESSAGE"])) {
示例8: define
die;
}
// database and workspace definition
// if SYS_TEMP exists, the URL has a workspace, now we need to verify if exists their db.php file
if (defined('SYS_TEMP') && SYS_TEMP != '') {
//this is the default, the workspace db.php file is in /shared/workflow/sites/SYS_SYS
if (file_exists(PATH_DB . SYS_TEMP . '/db.php')) {
require_once PATH_DB . SYS_TEMP . '/db.php';
define('SYS_SYS', SYS_TEMP);
// defining constant for workspace shared directory
define('PATH_WORKSPACE', PATH_DB . SYS_SYS . PATH_SEP);
// including workspace shared classes -> particularlly for pmTables
set_include_path(get_include_path() . PATH_SEPARATOR . PATH_WORKSPACE);
} else {
G::SendTemporalMessage('ID_NOT_WORKSPACE', "error");
G::header('location: /sys/' . SYS_LANG . '/' . SYS_SKIN . '/main/sysLogin?errno=2');
die;
}
} else {
//when we are in global pages, outside any valid workspace
if (SYS_TARGET === 'newSite') {
$phpFile = G::ExpandPath('methods') . SYS_COLLECTION . "/" . SYS_TARGET . '.php';
require_once $phpFile;
die;
} else {
if (SYS_TARGET == "dbInfo") {
//Show dbInfo when no SYS_SYS
require_once PATH_METHODS . "login/dbInfo.php";
} else {
if (substr(SYS_SKIN, 0, 2) === 'ux' && SYS_TARGET != 'sysLoginVerify') {
// new ux sysLogin - extjs based form
示例9: catch
$aNextStep = $case->getNextStep($_SESSION["PROCESS"], $_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["STEP_POSITION"] - 1);
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
G::header('location: ' . $aNextStep['PAGE'] . '&breakpoint=triggerdebug');
die;
}
G::header('location: ' . $aNextStep['PAGE']);
die;
}
} else {
$aNextStep = $case->getNextStep($_SESSION["PROCESS"], $_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["STEP_POSITION"] - 1);
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
G::header('location: ' . $aNextStep['PAGE'] . '&breakpoint=triggerdebug');
die;
}
G::header('location: ' . $aNextStep['PAGE']);
die;
}
}
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
/*
} catch ( Exception $e ) {
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publish' );
}*/
示例10: jumpToCase
/**
* Jump to the determinated case by its Application number
*
* @param interger $APP_NUMBER
*/
public function jumpToCase($APP_NUMBER)
{
$_GET['APP_UID'] = $oCase->getApplicationUIDByNumber($_GET['APP_NUMBER']);
$_GET['DEL_INDEX'] = $oCase->getCurrentDelegation($_GET['APP_UID'], $_SESSION['USER_LOGGED']);
if (is_null($_GET['DEL_INDEX'])) {
$participated = $oCase->userParticipatedInCase($_GET['APP_UID'], $_SESSION['USER_LOGGED']);
if ($participated == 0) {
if (is_null($_GET['APP_UID'])) {
G::SendMessageText(G::LoadTranslation('ID_CASE_DOES_NOT_EXISTS'), 'info');
} else {
G::SendMessageText(G::LoadTranslation('ID_CASE_IS_CURRENTLY_WITH_ANOTHER_USER'), 'info');
}
G::header('location: cases_List');
}
}
}
示例11: explode
if (!empty($_POST['form']['SCH_REPEAT_TASK_CHK'])) {
$nOptEvery = $_POST['form']['SCH_REPEAT_EVERY_OPT'];
if ($nOptEvery == 2) {
$aData['SCH_REPEAT_EVERY'] = $_POST['form']['SCH_REPEAT_EVERY'] * 60;
} else {
$aData['SCH_REPEAT_EVERY'] = $_POST['form']['SCH_REPEAT_EVERY'];
}
}
// var_dump ($aData['SCH_TIME_NEXT_RUN']);
// die;
$oCaseScheduler->Update($aData);
if (isset($_POST['form']['CASE_SH_PLUGIN_UID']) && $_POST['form']['CASE_SH_PLUGIN_UID'] != "") {
$params = explode("--", $_REQUEST['form']['CASE_SH_PLUGIN_UID']);
$oPluginRegistry =& PMPluginRegistry::getSingleton();
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
foreach ($activePluginsForCaseScheduler as $key => $caseSchedulerPluginDetail) {
if ($caseSchedulerPluginDetail->sNamespace == $params[0] && $caseSchedulerPluginDetail->sActionId == $params[1]) {
$caseSchedulerSelected = $caseSchedulerPluginDetail;
}
}
if (isset($caseSchedulerSelected) && is_object($caseSchedulerSelected)) {
//Save the form
$oData = $_POST['pluginFields'];
$oData['SCH_UID'] = $aData['SCH_UID'];
$oPluginRegistry->executeMethod($caseSchedulerPluginDetail->sNamespace, $caseSchedulerPluginDetail->sActionSave, $oData);
}
}
G::header('location: cases_Scheduler_List?PRO_UID=' . $_POST['form']['PRO_UID']);
} catch (Exception $oException) {
die($oException->getMessage());
}
示例12: unset
<?php
unset($_SESSION['WS_SESSION_ID']);
if ($_POST['form']['WS_PROTOCOL'] != '' && $_POST['form']['WS_WORKSPACE'] != '') {
if ($_POST['form']['WS_PORT'] != '') {
$_SESSION['END_POINT'] = $_POST['form']['WS_PROTOCOL'] . '://' . $_POST['form']['WS_HOST'] . ':' . $_POST['form']['WS_PORT'] . '/sys' . $_POST['form']['WS_WORKSPACE'] . '/en/classic/services/wsdl2';
G::header('location: webServices?x=1');
} else {
$_SESSION['END_POINT'] = $_POST['form']['WS_PROTOCOL'] . '://' . $_POST['form']['WS_HOST'] . '/sys' . $_POST['form']['WS_WORKSPACE'] . '/en/classic/services/wsdl2';
G::header('location: webServices?x=1');
}
$_SESSION['WS_WORKSPACE'] = $_POST['form']['WS_WORKSPACE'];
} else {
G::header('location: webServices?x=0');
}
示例13: ProcessMap
G::LoadClass('processMap');
$oProcessMap = new ProcessMap();
if (!isset($_POST['form']['PRO_UID'])) {
$_POST['form']['USR_UID'] = $_SESSION['USER_LOGGED'];
$oJSON = new Services_JSON();
require_once 'classes/model/Task.php';
$sProUid = $oProcessMap->createProcess($_POST['form']);
//call plugins
$oData['PRO_UID'] = $sProUid;
$oData['PRO_TEMPLATE'] = isset($_POST['form']['PRO_TEMPLATE']) && $_POST['form']['PRO_TEMPLATE'] != '' ? $_POST['form']['PRO_TEMPLATE'] : '';
$oData['PROCESSMAP'] = $oProcessMap;
$oPluginRegistry =& PMPluginRegistry::getSingleton();
$oPluginRegistry->executeTriggers(PM_NEW_PROCESS_SAVE, $oData);
G::header('location: processes_Map?PRO_UID=' . $sProUid);
die;
} else {
$_POST['form']['PRO_DYNAFORMS'] = array();
$_POST['form']['PRO_DYNAFORMS']['PROCESS'] = isset($_POST['form']['PRO_SUMMARY_DYNAFORM']) ? $_POST['form']['PRO_SUMMARY_DYNAFORM'] : '';
unset($_POST['form']['PRO_SUMMARY_DYNAFORM']);
$oProcessMap->updateProcess($_POST['form']);
$sProUid = $_POST['form']['PRO_UID'];
}
//Save Calendar ID for this process
G::LoadClass("calendar");
$calendarObj = new Calendar();
$calendarObj->assignCalendarTo($sProUid, $_POST['form']['PRO_CALENDAR'], 'PROCESS');
if ($_POST['form']['THETYPE'] == '') {
G::header('location: main');
}
break;
}
示例14: explode
$passwd = $oSpool->config['MESS_PASSWORD'];
$passwdDec = G::decrypt($passwd, 'EMAILENCRYPT');
$auxPass = explode('hash:', $passwdDec);
if (count($auxPass) > 1) {
if (count($auxPass) == 2) {
$passwd = $auxPass[1];
} else {
array_shift($auxPass);
$passwd = implode('', $auxPass);
}
}
$oSpool->config['MESS_PASSWORD'] = $passwd;
$oSpool->create(array('msg_uid' => '', 'app_uid' => '', 'del_index' => 0, 'app_msg_type' => 'TEST', 'app_msg_subject' => $sSubject, 'app_msg_from' => $sFrom, 'app_msg_to' => $data['USR_EMAIL'], 'app_msg_body' => $sBody, 'app_msg_cc' => '', 'app_msg_bcc' => '', 'app_msg_attach' => '', 'app_msg_template' => '', 'app_msg_status' => 'pending', 'app_msg_attach' => ''));
try {
$oSpool->sendMail();
$rbacUser->update($aData);
$user->update($aData);
G::header("location: login.html");
G::SendTemporalMessage('ID_NEW_PASSWORD_SENT', "info");
} catch (phpmailerException $e) {
G::header("location: login.html");
G::SendTemporalMessage(G::LoadTranslation('MISSING_OR_NOT_CONFIGURED_SMTP'), "warning", 'string');
} catch (Exception $e) {
G::header("location: login.html");
G::SendTemporalMessage($e->getMessage(), "warning", 'string');
}
} else {
$msg = G::LoadTranslation('ID_USER') . ' ' . htmlentities($data['USR_USERNAME'], ENT_QUOTES, 'UTF-8') . ' ' . G::LoadTranslation('ID_IS_NOT_REGISTERED');
G::SendTemporalMessage($msg, "warning", 'string');
G::header('location: forgotPassword');
}
示例15: date
}
$oDirectory->close();
}
$sNewProUid = $sProUid;
}
//Disable current Process and create a new version of the Process
if ($option == 2) {
$oProcess->disablePreviousProcesses($sProUid);
$sNewProUid = $oProcess->getUnusedProcessGUID();
$oProcess->setProcessGuid($oData, $sNewProUid);
$oProcess->setProcessParent($oData, $sProUid);
$oData->process['PRO_TITLE'] = "New - " . $oData->process['PRO_TITLE'] . ' - ' . date('M d, H:i');
$oProcess->renewAll($oData);
$oProcess->createProcessFromDataXpdl($oData, $tasks);
}
//Create a completely new Process without change the current Process
if ($option == 3) {
//krumo ($oData); die;
$sNewProUid = $oProcess->getUnusedProcessGUID();
$oProcess->setProcessGuid($oData, $sNewProUid);
$oData->process['PRO_TITLE'] = "Copy of - " . $oData->process['PRO_TITLE'] . ' - ' . date('M d, H:i');
$oProcess->renewAll($oData);
$oProcess->createProcessFromDataXpdl($oData, $tasks);
}
G::header('Location: processes_Map?PRO_UID=' . $sNewProUid);
} catch (Exception $e) {
$G_PUBLISH = new Publisher();
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage);
G::RenderPage('publish', "blank");
}