CODE STYLE Formating

Change format files
This commit is contained in:
norahmollo
2012-10-18 17:00:03 +00:00
parent 2d90e0653d
commit 2a6fe7db20
11 changed files with 851 additions and 879 deletions

View File

@@ -1,41 +1,43 @@
<?php <?php
require_once 'classes/model/Application.php'; require_once 'classes/model/Application.php';
G::LoadClass('case'); G::LoadClass( 'case' );
class adhocUserProxy extends HttpProxyController class adhocUserProxy extends HttpProxyController
{ {
//list of users into adhoc option //list of users into adhoc option
function adhocAssignUsersk($params){ function adhocAssignUsersk ($params)
{
G::LoadClass('groups'); G::LoadClass( 'groups' );
G::LoadClass('tasks'); G::LoadClass( 'tasks' );
$oTasks = new Tasks(); $oTasks = new Tasks();
$aAux = $oTasks->getGroupsOfTask($_SESSION['TASK'], 2); $aAux = $oTasks->getGroupsOfTask( $_SESSION['TASK'], 2 );
$aAdhocUsers = array(); $aAdhocUsers = array ();
$oGroups = new Groups(); $oGroups = new Groups();
foreach($aAux as $aGroup) { foreach ($aAux as $aGroup) {
$aUsers = $oGroups->getUsersOfGroup($aGroup['GRP_UID']); $aUsers = $oGroups->getUsersOfGroup( $aGroup['GRP_UID'] );
foreach($aUsers as $aUser) { foreach ($aUsers as $aUser) {
if($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) { if ($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
$aAdhocUsers[] = $aUser['USR_UID']; $aAdhocUsers[] = $aUser['USR_UID'];
} }
} }
} }
$aAux = $oTasks->getUsersOfTask($_SESSION['TASK'], 2); $aAux = $oTasks->getUsersOfTask( $_SESSION['TASK'], 2 );
foreach($aAux as $aUser) { foreach ($aAux as $aUser) {
if($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) { if ($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
$aAdhocUsers[] = $aUser['USR_UID']; $aAdhocUsers[] = $aUser['USR_UID'];
} }
} }
require_once 'classes/model/Users.php'; require_once 'classes/model/Users.php';
$oCriteria = new Criteria('workflow'); $oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn(UsersPeer::USR_UID); $oCriteria->addSelectColumn( UsersPeer::USR_UID );
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME); $oCriteria->addSelectColumn( UsersPeer::USR_FIRSTNAME );
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME); $oCriteria->addSelectColumn( UsersPeer::USR_LASTNAME );
$oCriteria->add(UsersPeer::USR_UID, $aAdhocUsers, Criteria::IN); $oCriteria->add( UsersPeer::USR_UID, $aAdhocUsers, Criteria::IN );
$oDataset = UsersPeer::doSelectRS($oCriteria); $oDataset = UsersPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC); $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$aData=array(); $aData = array ();
while ($oDataset->next()){ while ($oDataset->next()) {
$aData[] = $oDataset->getRow(); $aData[] = $oDataset->getRow();
} }
@@ -43,31 +45,33 @@ class adhocUserProxy extends HttpProxyController
} }
//assign user adhoc //assign user adhoc
function reassignCase($params){ function reassignCase ($params)
{
$cases = new Cases(); $cases = new Cases();
$cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $_POST['USR_UID'], $_POST['THETYPE']); $cases->reassignCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $_POST['USR_UID'], $_POST['THETYPE'] );
$this->success = true; $this->success = true;
} }
//delete case adhoc //delete case adhoc
function deleteCase($params){ function deleteCase ($params)
$ainfoCase = array(); {
try{ $ainfoCase = array ();
$applicationUID = (isset($_POST['APP_UID'])) ? $_POST['APP_UID'] : $_SESSION['APPLICATION']; try {
$applicationUID = (isset( $_POST['APP_UID'] )) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
$app = new Application(); $app = new Application();
$caseData = $app->load($applicationUID); $caseData = $app->load( $applicationUID );
$data['APP_NUMBER'] = $caseData['APP_NUMBER']; $data['APP_NUMBER'] = $caseData['APP_NUMBER'];
$oCase = new Cases(); $oCase = new Cases();
$oCase->removeCase($applicationUID); $oCase->removeCase( $applicationUID );
$this->success = true; $this->success = true;
$this->msg = G::LoadTranslation('ID_CASE_DELETED_SUCCESSFULLY', SYS_LANG, $data); $this->msg = G::LoadTranslation( 'ID_CASE_DELETED_SUCCESSFULLY', SYS_LANG, $data );
} catch(Exception $e) { } catch (Exception $e) {
$this->success = false; $this->success = false;
$this->msg = $e->getMessage(); $this->msg = $e->getMessage();
} }
} }
} //End adhocUserProxy }
//End adhocUserProxy

View File

@@ -1,6 +1,8 @@
<?php <?php
/** /**
* Admin controller * Admin controller
*
* @access public * @access public
*/ */
class Admin extends Controller class Admin extends Controller
@@ -11,174 +13,173 @@ class Admin extends Controller
public $debug = true; public $debug = true;
public function system() public function system ()
{ {
require_once PATH_CONTROLLERS . 'main.php'; require_once PATH_CONTROLLERS . 'main.php';
G::loadClass('system'); G::loadClass( 'system' );
$skinsList = System::getSkingList(); $skinsList = System::getSkingList();
$skins = array(); $skins = array ();
$timeZonesList = System::getAllTimeZones(); $timeZonesList = System::getAllTimeZones();
$timeZonesList = array_keys($timeZonesList); $timeZonesList = array_keys( $timeZonesList );
$mainController = new Main(); $mainController = new Main();
$languagesList = $mainController->getLanguagesList(); $languagesList = $mainController->getLanguagesList();
$sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini'); $sysConf = System::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
foreach ($skinsList['skins'] as $skin) { foreach ($skinsList['skins'] as $skin) {
$skins[] = array($skin['SKIN_FOLDER_ID'], $skin['SKIN_NAME']); $skins[] = array ($skin['SKIN_FOLDER_ID'],$skin['SKIN_NAME']);
} }
foreach ($timeZonesList as $tz) { foreach ($timeZonesList as $tz) {
$timeZones[] = array($tz, $tz); $timeZones[] = array ($tz,$tz);
} }
$this->includeExtJS( 'admin/system' );
$this->includeExtJS('admin/system');
//G::LoadClass('configuration'); //G::LoadClass('configuration');
// $c = new Configurations(); // $c = new Configurations();
// $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']); // $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
// $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20; // $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$this->setJSVar('skinsList', $skins); $this->setJSVar( 'skinsList', $skins );
$this->setJSVar('languagesList', $languagesList); $this->setJSVar( 'languagesList', $languagesList );
$this->setJSVar('timeZonesList', $timeZones); $this->setJSVar( 'timeZonesList', $timeZones );
$this->setJSVar('sysConf', $sysConf); $this->setJSVar( 'sysConf', $sysConf );
G::RenderPage('publish', 'extJs'); G::RenderPage( 'publish', 'extJs' );
} }
public function uxList() public function uxList ()
{ {
require_once PATH_CONTROLLERS . 'adminProxy.php'; require_once PATH_CONTROLLERS . 'adminProxy.php';
$this->includeExtJS('admin/uxUsersList'); $this->includeExtJS( 'admin/uxUsersList' );
G::LoadClass('configuration'); G::LoadClass( 'configuration' );
$c = new Configurations(); $c = new Configurations();
$configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']); $configPage = $c->getConfiguration( 'usersList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20; $Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$this->setJSVar('CONFIG', $Config); $this->setJSVar( 'CONFIG', $Config );
$this->setJSVar('FORMATS', $c->getFormats()); $this->setJSVar( 'FORMATS', $c->getFormats() );
$this->setJSVar('uxTypes', AdminProxy::getUxTypesList('list')); $this->setJSVar( 'uxTypes', AdminProxy::getUxTypesList( 'list' ) );
G::RenderPage('publish', 'extJs'); G::RenderPage( 'publish', 'extJs' );
} }
/** /**
* CALENDAR * CALENDAR
* getting default list * getting default list
*
* @param string $httpData->PRO_UID (opional) * @param string $httpData->PRO_UID (opional)
*/ */
public function calendarEdit($httpData) public function calendarEdit ($httpData)
{ {
global $RBAC; global $RBAC;
//$RBAC->requirePermissions('PM_SETUP_ADVANCE'); //$RBAC->requirePermissions('PM_SETUP_ADVANCE');
G::LoadClass('configuration'); G::LoadClass( 'configuration' );
G::LoadClass('calendar'); G::LoadClass( 'calendar' );
$CalendarUid = str_replace ( '"', '', isset ( $_GET ['id'] ) ? $_GET ['id'] : G::GenerateUniqueID () ); $CalendarUid = str_replace( '"', '', isset( $_GET['id'] ) ? $_GET['id'] : G::GenerateUniqueID() );
$calendarObj = new calendar ( ); $calendarObj = new calendar();
if ((isset ( $_GET ['id'] )) && ($_GET ['id'] != "")) { if ((isset( $_GET['id'] )) && ($_GET['id'] != "")) {
$fields = $calendarObj->getCalendarInfoE ( $CalendarUid ); $fields = $calendarObj->getCalendarInfoE( $CalendarUid );
$fields ['OLD_NAME'] = $fields['CALENDAR_NAME']; $fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
} }
if (!isset($fields['CALENDAR_UID'])) { //For a new Calendar if (! isset( $fields['CALENDAR_UID'] )) { //For a new Calendar
$fields ['CALENDAR_UID'] = $CalendarUid; $fields['CALENDAR_UID'] = $CalendarUid;
$fields ['OLD_NAME'] = ''; $fields['OLD_NAME'] = '';
//Default Business Hour //Default Business Hour
$fields ['BUSINESS_DAY'] [1] ['CALENDAR_BUSINESS_DAY'] = 7; $fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_DAY'] = 7;
$fields ['BUSINESS_DAY'] [1] ['CALENDAR_BUSINESS_START'] = "09:00"; $fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_START'] = "09:00";
$fields ['BUSINESS_DAY'] [1] ['CALENDAR_BUSINESS_END'] = "17:00"; $fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_END'] = "17:00";
} }
if ((isset ( $_GET ['cp'] )) && ($_GET ['cp'] == 1)) { // Copy Calendar if ((isset( $_GET['cp'] )) && ($_GET['cp'] == 1)) { // Copy Calendar
$fields ['CALENDAR_UID'] = G::GenerateUniqueID (); $fields['CALENDAR_UID'] = G::GenerateUniqueID();
$fields ['CALENDAR_NAME'] = G::LoadTranslation ( "ID_COPY_OF" ) . " " . $fields ['CALENDAR_NAME']; $fields['CALENDAR_NAME'] = G::LoadTranslation( "ID_COPY_OF" ) . " " . $fields['CALENDAR_NAME'];
$fields ['OLD_NAME'] = $fields['CALENDAR_NAME'];; $fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
} }
$c = new Configurations(); $c = new Configurations();
$configPage = $c->getConfiguration('additionalTablesList', 'pageSize','',$_SESSION['USER_LOGGED']); $configPage = $c->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20; $Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$this->includeExtJS('admin/calendarEdit'); $this->includeExtJS( 'admin/calendarEdit' );
$this->setView('admin/calendarEdit'); $this->setView( 'admin/calendarEdit' );
$businessDayArray = array(); $businessDayArray = array ();
for($i=0;$i<sizeof($fields['BUSINESS_DAY']);$i++) { for ($i = 0; $i < sizeof( $fields['BUSINESS_DAY'] ); $i ++) {
$businessDayArray[$i] = $fields['BUSINESS_DAY'][$i+1]; $businessDayArray[$i] = $fields['BUSINESS_DAY'][$i + 1];
} }
$fields['BUSINESS_DAY'] = $businessDayArray; $fields['BUSINESS_DAY'] = $businessDayArray;
//validating if the calendar is new, it means that we don't have the $_GET array //validating if the calendar is new, it means that we don't have the $_GET array
$fields['HOLIDAY']=(isset ( $_GET['id'] )&&$_GET['id']!='')?$fields['HOLIDAY']:array(); $fields['HOLIDAY'] = (isset( $_GET['id'] ) && $_GET['id'] != '') ? $fields['HOLIDAY'] : array ();
$holidayArray = array(); $holidayArray = array ();
for($i=0;$i<sizeof($fields['HOLIDAY']);$i++) { for ($i = 0; $i < sizeof( $fields['HOLIDAY'] ); $i ++) {
$holidayArray[$i] = $fields['HOLIDAY'][$i+1]; $holidayArray[$i] = $fields['HOLIDAY'][$i + 1];
} }
$_GET ['id']= (isset ( $_GET['id'] )&&$_GET['id']!='')?$_GET['id']:''; $_GET['id'] = (isset( $_GET['id'] ) && $_GET['id'] != '') ? $_GET['id'] : '';
$fields['HOLIDAY'] = $holidayArray; $fields['HOLIDAY'] = $holidayArray;
$fields['NEWCALENDAR'] = 'NO'; $fields['NEWCALENDAR'] = 'NO';
if(isset ( $_GET['id'] )&&$_GET['id']=='') { if (isset( $_GET['id'] ) && $_GET['id'] == '') {
$fields['CALENDAR_UID'] = G::GenerateUniqueID(); $fields['CALENDAR_UID'] = G::GenerateUniqueID();
$fields['NEWCALENDAR'] = 'YES'; $fields['NEWCALENDAR'] = 'YES';
} }
$this->setJSVar('CALENDAR_UID',$fields['CALENDAR_UID']); $this->setJSVar( 'CALENDAR_UID', $fields['CALENDAR_UID'] );
$this->setJSVar('fields',$fields); $this->setJSVar( 'fields', $fields );
G::RenderPage('publish', 'extJs'); G::RenderPage( 'publish', 'extJs' );
} }
/** /**
* getting email configuration * getting email configuration
* @autor Alvaro <alvaro@colosa.com> * @autor Alvaro <alvaro@colosa.com>
*/ */
public function emails() public function emails ()
{ {
global $RBAC; global $RBAC;
$RBAC->requirePermissions('PM_SETUP_ADVANCE'); $RBAC->requirePermissions( 'PM_SETUP_ADVANCE' );
$this->includeExtJS('admin/emails'); $this->includeExtJS( 'admin/emails' );
//render content //render content
G::RenderPage('publish', 'extJs'); G::RenderPage( 'publish', 'extJs' );
} }
/** /**
* getting default list * getting default list
*
* @param string $httpData->PRO_UID (opional) * @param string $httpData->PRO_UID (opional)
*/ */
public function pmLogo($httpData) public function pmLogo ($httpData)
{ {
global $RBAC; global $RBAC;
$RBAC->requirePermissions('PM_SETUP_ADVANCE'); $RBAC->requirePermissions( 'PM_SETUP_ADVANCE' );
G::LoadClass('configuration'); G::LoadClass( 'configuration' );
$c = new Configurations(); $c = new Configurations();
$configPage = $c->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']); $configPage = $c->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20; $Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$this->includeExtJS('admin/pmLogo'); $this->includeExtJS( 'admin/pmLogo' );
$this->setView('admin/pmLogo'); $this->setView( 'admin/pmLogo' );
//assigning js variables //assigning js variables
$this->setJSVar('FORMATS', $c->getFormats()); $this->setJSVar( 'FORMATS', $c->getFormats() );
$this->setJSVar('CONFIG', $Config); $this->setJSVar( 'CONFIG', $Config );
$this->setJSVar('PRO_UID', isset($_GET['PRO_UID'])? $_GET['PRO_UID'] : false); $this->setJSVar( 'PRO_UID', isset( $_GET['PRO_UID'] ) ? $_GET['PRO_UID'] : false );
if (isset($_SESSION['_cache_pmtables'])) { if (isset( $_SESSION['_cache_pmtables'] )) {
unset($_SESSION['_cache_pmtables']); unset( $_SESSION['_cache_pmtables'] );
} }
if (isset($_SESSION['ADD_TAB_UID'])) { if (isset( $_SESSION['ADD_TAB_UID'] )) {
unset($_SESSION['ADD_TAB_UID']); unset( $_SESSION['ADD_TAB_UID'] );
} }
//render content //render content
G::RenderPage('publish', 'extJs'); G::RenderPage( 'publish', 'extJs' );
} }
} }

View File

@@ -1,6 +1,8 @@
<?php <?php
/** /**
* App controller * App controller
*
* @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gmail.com> * @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
* @herits Controller * @herits Controller
* @access public * @access public
@@ -8,145 +10,148 @@
class AppProxy extends HttpProxyController class AppProxy extends HttpProxyController
{ {
/** /**
* Get Notes List * Get Notes List
*
* @param int $httpData->start * @param int $httpData->start
* @param int $httpData->limit * @param int $httpData->limit
* @param string $httpData->appUid (optionalif it is not passed try use $_SESSION['APPLICATION']) * @param string $httpData->appUid (optionalif it is not passed try use $_SESSION['APPLICATION'])
* @return array containg the case notes * @return array containg the case notes
*/ */
function getNotesList($httpData) function getNotesList ($httpData)
{ {
$appUid = null; $appUid = null;
if (isset($httpData->appUid) && trim($httpData->appUid) != "") { if (isset( $httpData->appUid ) && trim( $httpData->appUid ) != "") {
$appUid = $httpData->appUid; $appUid = $httpData->appUid;
} } else {
else { if (isset( $_SESSION['APPLICATION'] )) {
if (isset($_SESSION['APPLICATION'])) {
$appUid = $_SESSION['APPLICATION']; $appUid = $_SESSION['APPLICATION'];
} }
} }
G::LoadClass('case'); G::LoadClass( 'case' );
$case = new Cases(); $case = new Cases();
$proUid = ($httpData->pro == '') ? $_SESSION['PROCESS'] : $httpData->pro; $proUid = ($httpData->pro == '') ? $_SESSION['PROCESS'] : $httpData->pro;
$tasUid = ($httpData->tas == '') ? $_SESSION['TASK'] : $httpData->tas; $tasUid = ($httpData->tas == '') ? $_SESSION['TASK'] : $httpData->tas;
$usrUid = $_SESSION['USER_LOGGED']; $usrUid = $_SESSION['USER_LOGGED'];
$respView = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, 'VIEW'); $respView = $case->getAllObjectsFrom( $proUid, $appUid, $tasUid, $usrUid, 'VIEW' );
$respBlock = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, 'BLOCK'); $respBlock = $case->getAllObjectsFrom( $proUid, $appUid, $tasUid, $usrUid, 'BLOCK' );
if ($respView['CASES_NOTES'] == 0 && $respBlock['CASES_NOTES'] == 0) { if ($respView['CASES_NOTES'] == 0 && $respBlock['CASES_NOTES'] == 0) {
return array('totalCount' => 0, 'notes' => array(), 'noPerms' => 1); return array ('totalCount' => 0,'notes' => array (),'noPerms' => 1
);
} }
require_once ( "classes/model/AppNotes.php" ); require_once ("classes/model/AppNotes.php");
if (!isset($appUid)) { if (! isset( $appUid )) {
throw new Exception('Can\'t resolve the Apllication ID for this request.'); throw new Exception( 'Can\'t resolve the Apllication ID for this request.' );
} }
$usrUid = isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : ""; $usrUid = isset( $_SESSION['USER_LOGGED'] ) ? $_SESSION['USER_LOGGED'] : "";
$appNotes = new AppNotes(); $appNotes = new AppNotes();
$response = $appNotes->getNotesList($appUid, '', $httpData->start, $httpData->limit); $response = $appNotes->getNotesList( $appUid, '', $httpData->start, $httpData->limit );
return $response['array']; return $response['array'];
} }
/** /**
* post Note Action * post Note Action
*
* @param string $httpData->appUid (optional, if it is not passed try use $_SESSION['APPLICATION']) * @param string $httpData->appUid (optional, if it is not passed try use $_SESSION['APPLICATION'])
* @return array containg the case notes * @return array containg the case notes
*/ */
function postNote($httpData) function postNote ($httpData)
{ {
//extract(getExtJSParams()); //extract(getExtJSParams());
if (isset($httpData->appUid) && trim($httpData->appUid) != "") { if (isset( $httpData->appUid ) && trim( $httpData->appUid ) != "") {
$appUid = $httpData->appUid; $appUid = $httpData->appUid;
} } else {
else {
$appUid = $_SESSION['APPLICATION']; $appUid = $_SESSION['APPLICATION'];
} }
if (!isset($appUid)) { if (! isset( $appUid )) {
throw new Exception('Can\'t resolve the Apllication ID for this request.'); throw new Exception( 'Can\'t resolve the Apllication ID for this request.' );
} }
$usrUid = (isset($_SESSION['USER_LOGGED'])) ? $_SESSION['USER_LOGGED'] : ""; $usrUid = (isset( $_SESSION['USER_LOGGED'] )) ? $_SESSION['USER_LOGGED'] : "";
require_once ( "classes/model/AppNotes.php" ); require_once ("classes/model/AppNotes.php");
$appNotes = new AppNotes(); $appNotes = new AppNotes();
$noteContent = addslashes($httpData->noteText); $noteContent = addslashes( $httpData->noteText );
$result = $appNotes->postNewNote($appUid, $usrUid, $noteContent, false); $result = $appNotes->postNewNote( $appUid, $usrUid, $noteContent, false );
//Disabling the controller response because we handle a special behavior //Disabling the controller response because we handle a special behavior
$this->setSendResponse(false); $this->setSendResponse( false );
//Send the response to client //Send the response to client
@ini_set('implicit_flush', 1); @ini_set( 'implicit_flush', 1 );
ob_start(); ob_start();
echo G::json_encode($result); echo G::json_encode( $result );
@ob_flush(); @ob_flush();
@flush(); @flush();
@ob_end_flush(); @ob_end_flush();
ob_implicit_flush(1); ob_implicit_flush( 1 );
//Send notification in background //Send notification in background
if (intval($httpData->swSendMail) == 1) { if (intval( $httpData->swSendMail ) == 1) {
G::LoadClass("case"); G::LoadClass( "case" );
$oCase = new Cases(); $oCase = new Cases();
$p = $oCase->getUsersParticipatedInCase($appUid); $p = $oCase->getUsersParticipatedInCase( $appUid );
$noteRecipientsList = array(); $noteRecipientsList = array ();
foreach ($p["array"] as $key => $userParticipated) { foreach ($p["array"] as $key => $userParticipated) {
$noteRecipientsList[] = $key; $noteRecipientsList[] = $key;
} }
$noteRecipients = implode(",", $noteRecipientsList); $noteRecipients = implode( ",", $noteRecipientsList );
$noteContent = stripslashes($noteContent); $noteContent = stripslashes( $noteContent );
$appNotes->sendNoteNotification($appUid, $usrUid, $noteContent, $noteRecipients); $appNotes->sendNoteNotification( $appUid, $usrUid, $noteContent, $noteRecipients );
} }
} }
/** /**
* request to open the case summary * request to open the case summary
*
* @param string $httpData->appUid * @param string $httpData->appUid
* @param string $httpData->delIndex * @param string $httpData->delIndex
* @return object bool $result->succes, string $result->message(is an exception was thrown), string $result->dynUid * @return object bool $result->succes, string $result->message(is an exception was thrown), string $result->dynUid
*/ */
function requestOpenSummary($httpData) function requestOpenSummary ($httpData)
{ {
global $RBAC; global $RBAC;
$this->success = true; $this->success = true;
$this->dynUid = ''; $this->dynUid = '';
switch ($RBAC->userCanAccess('PM_CASES')) { switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case -2: case - 2:
throw new Exception(G::LoadTranslation('ID_USER_HAVENT_RIGHTS_SYSTEM')); throw new Exception( G::LoadTranslation( 'ID_USER_HAVENT_RIGHTS_SYSTEM' ) );
break; break;
case -1: case - 1:
throw new Exception(G::LoadTranslation('ID_USER_HAVENT_RIGHTS_PAGE')); throw new Exception( G::LoadTranslation( 'ID_USER_HAVENT_RIGHTS_PAGE' ) );
break; break;
} }
G::LoadClass('case'); G::LoadClass( 'case' );
$case = new Cases(); $case = new Cases();
if ($RBAC->userCanAccess('PM_ALLCASES') < 0 && $case->userParticipatedInCase($httpData->appUid, $_SESSION['USER_LOGGED']) == 0) { if ($RBAC->userCanAccess( 'PM_ALLCASES' ) < 0 && $case->userParticipatedInCase( $httpData->appUid, $_SESSION['USER_LOGGED'] ) == 0) {
throw new Exception(G::LoadTranslation('ID_NO_PERMISSION_NO_PARTICIPATED')); throw new Exception( G::LoadTranslation( 'ID_NO_PERMISSION_NO_PARTICIPATED' ) );
} }
$applicationFields = $case->loadCase($httpData->appUid, $httpData->delIndex); $applicationFields = $case->loadCase( $httpData->appUid, $httpData->delIndex );
$process = new Process(); $process = new Process();
$processData = $process->load($applicationFields['PRO_UID']); $processData = $process->load( $applicationFields['PRO_UID'] );
if (isset($processData['PRO_DYNAFORMS']['PROCESS'])) { if (isset( $processData['PRO_DYNAFORMS']['PROCESS'] )) {
$this->dynUid = $processData['PRO_DYNAFORMS']['PROCESS']; $this->dynUid = $processData['PRO_DYNAFORMS']['PROCESS'];
} }
@@ -161,62 +166,75 @@ class AppProxy extends HttpProxyController
/** /**
* get the case summary data * get the case summary data
*
* @param string $httpData->appUid * @param string $httpData->appUid
* @param string $httpData->delIndex * @param string $httpData->delIndex
* @return array containg the case summary data * @return array containg the case summary data
*/ */
function getSummary($httpData) function getSummary ($httpData)
{ {
$labels = array(); $labels = array ();
$form = new Form('cases/cases_Resume', PATH_XMLFORM, SYS_LANG); $form = new Form( 'cases/cases_Resume', PATH_XMLFORM, SYS_LANG );
G::LoadClass('case'); G::LoadClass( 'case' );
$case = new Cases(); $case = new Cases();
foreach($form->fields as $fieldName => $field) { foreach ($form->fields as $fieldName => $field) {
$labels[$fieldName] = $field->label; $labels[$fieldName] = $field->label;
} }
if (isset($_SESSION['_applicationFields']) && $_SESSION['_processData']) { if (isset( $_SESSION['_applicationFields'] ) && $_SESSION['_processData']) {
$applicationFields = $_SESSION['_applicationFields']; $applicationFields = $_SESSION['_applicationFields'];
unset($_SESSION['_applicationFields']); unset( $_SESSION['_applicationFields'] );
$processData = $_SESSION['_processData']; $processData = $_SESSION['_processData'];
unset($_SESSION['_processData']); unset( $_SESSION['_processData'] );
} } else {
else { $applicationFields = $case->loadCase( $httpData->appUid, $httpData->delIndex );
$applicationFields = $case->loadCase($httpData->appUid, $httpData->delIndex);
$process = new Process(); $process = new Process();
$processData = $process->load($applicationFields['PRO_UID']); $processData = $process->load( $applicationFields['PRO_UID'] );
} }
$data = array(); $data = array ();
$task = new Task(); $task = new Task();
$taskData = $task->load($applicationFields['TAS_UID']); $taskData = $task->load( $applicationFields['TAS_UID'] );
$currentUser = $applicationFields['CURRENT_USER'] != '' ? $applicationFields['CURRENT_USER'] : '[' . G::LoadTranslation('ID_UNASSIGNED') . ']'; $currentUser = $applicationFields['CURRENT_USER'] != '' ? $applicationFields['CURRENT_USER'] : '[' . G::LoadTranslation( 'ID_UNASSIGNED' ) . ']';
$data[] = array('label'=>$labels['PRO_TITLE'] , 'value' => $processData['PRO_TITLE'], 'section'=>$labels['TITLE1']); $data[] = array ('label' => $labels['PRO_TITLE'],'value' => $processData['PRO_TITLE'],'section' => $labels['TITLE1']
$data[] = array('label'=>$labels['TITLE'] , 'value' => $applicationFields['TITLE'], 'section'=>$labels['TITLE1']); );
$data[] = array('label'=>$labels['APP_NUMBER'] , 'value' => $applicationFields['APP_NUMBER'], 'section'=>$labels['TITLE1']); $data[] = array ('label' => $labels['TITLE'],'value' => $applicationFields['TITLE'],'section' => $labels['TITLE1']
$data[] = array('label'=>$labels['STATUS'] , 'value' => $applicationFields['STATUS'], 'section'=>$labels['TITLE1']); );
$data[] = array('label'=>$labels['APP_UID'] , 'value' => $applicationFields['APP_UID'], 'section'=>$labels['TITLE1']); $data[] = array ('label' => $labels['APP_NUMBER'],'value' => $applicationFields['APP_NUMBER'],'section' => $labels['TITLE1']
$data[] = array('label'=>$labels['CREATOR'] , 'value' => $applicationFields['CREATOR'], 'section'=>$labels['TITLE1']); );
$data[] = array('label'=>$labels['CREATE_DATE'] , 'value' => $applicationFields['CREATE_DATE'],'section'=>$labels['TITLE1']); $data[] = array ('label' => $labels['STATUS'],'value' => $applicationFields['STATUS'],'section' => $labels['TITLE1']
$data[] = array('label'=>$labels['UPDATE_DATE'] , 'value' => $applicationFields['UPDATE_DATE'],'section'=>$labels['TITLE1']); );
$data[] = array('label'=>$labels['DESCRIPTION'] , 'value' => $applicationFields['DESCRIPTION'],'section'=>$labels['TITLE1']); $data[] = array ('label' => $labels['APP_UID'],'value' => $applicationFields['APP_UID'],'section' => $labels['TITLE1']
);
$data[] = array ('label' => $labels['CREATOR'],'value' => $applicationFields['CREATOR'],'section' => $labels['TITLE1']
);
$data[] = array ('label' => $labels['CREATE_DATE'],'value' => $applicationFields['CREATE_DATE'],'section' => $labels['TITLE1']
);
$data[] = array ('label' => $labels['UPDATE_DATE'],'value' => $applicationFields['UPDATE_DATE'],'section' => $labels['TITLE1']
);
$data[] = array ('label' => $labels['DESCRIPTION'],'value' => $applicationFields['DESCRIPTION'],'section' => $labels['TITLE1']
);
// note added by krlos pacha carlos[at]colosa[dot]com // note added by krlos pacha carlos[at]colosa[dot]com
//getting this field if it doesn't exist. Related 7994 bug //getting this field if it doesn't exist. Related 7994 bug
$taskData['TAS_TITLE'] = (array_key_exists('TAS_TITLE', $taskData))?$taskData['TAS_TITLE']:Content::Load("TAS_TITLE", "", $applicationFields['TAS_UID'], SYS_LANG); $taskData['TAS_TITLE'] = (array_key_exists( 'TAS_TITLE', $taskData )) ? $taskData['TAS_TITLE'] : Content::Load( "TAS_TITLE", "", $applicationFields['TAS_UID'], SYS_LANG );
$data[] = array('label'=>$labels['TAS_TITLE'] , 'value' => $taskData['TAS_TITLE'], 'section'=>$labels['TITLE2']); $data[] = array ('label' => $labels['TAS_TITLE'],'value' => $taskData['TAS_TITLE'],'section' => $labels['TITLE2']
$data[] = array('label'=>$labels['CURRENT_USER'] , 'value' => $currentUser, 'section'=>$labels['TITLE2']); );
$data[] = array('label'=>$labels['DEL_DELEGATE_DATE'] , 'value' => $applicationFields['DEL_DELEGATE_DATE'],'section'=>$labels['TITLE2']); $data[] = array ('label' => $labels['CURRENT_USER'],'value' => $currentUser,'section' => $labels['TITLE2']
$data[] = array('label'=>$labels['DEL_INIT_DATE'] , 'value' => $applicationFields['DEL_INIT_DATE'], 'section'=>$labels['TITLE2']); );
$data[] = array('label'=>$labels['DEL_TASK_DUE_DATE'] , 'value' => $applicationFields['DEL_TASK_DUE_DATE'],'section'=>$labels['TITLE2']); $data[] = array ('label' => $labels['DEL_DELEGATE_DATE'],'value' => $applicationFields['DEL_DELEGATE_DATE'],'section' => $labels['TITLE2']
$data[] = array('label'=>$labels['DEL_FINISH_DATE'] , 'value' => $applicationFields['DEL_FINISH_DATE'], 'section'=>$labels['TITLE2']); );
$data[] = array ('label' => $labels['DEL_INIT_DATE'],'value' => $applicationFields['DEL_INIT_DATE'],'section' => $labels['TITLE2']
);
$data[] = array ('label' => $labels['DEL_TASK_DUE_DATE'],'value' => $applicationFields['DEL_TASK_DUE_DATE'],'section' => $labels['TITLE2']
);
$data[] = array ('label' => $labels['DEL_FINISH_DATE'],'value' => $applicationFields['DEL_FINISH_DATE'],'section' => $labels['TITLE2']
);
//$data[] = array('label'=>$labels['DYN_UID'] , 'value' => $processData['PRO_DYNAFORMS']['PROCESS'];, 'section'=>$labels['DYN_UID']); //$data[] = array('label'=>$labels['DYN_UID'] , 'value' => $processData['PRO_DYNAFORMS']['PROCESS'];, 'section'=>$labels['DYN_UID']);
return $data; return $data;
} }
} }

View File

@@ -1,19 +1,14 @@
<?php <?php
class authSourceProxy extends HttpProxyController
{
function testingOption ($params)
{
class authSourceProxy extends HttpProxyController {
function testingOption($params){
/*global $RBAC; /*global $RBAC;
$fields = array('AUTH_SOURCE_PROVIDER' => $params->optionAuthS); $fields = array('AUTH_SOURCE_PROVIDER' => $params->optionAuthS);
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$data=array(); $data=array();
$aCommonFields = array('AUTH_SOURCE_UID', $aCommonFields = array('AUTH_SOURCE_UID',
'AUTH_SOURCE_NAME', 'AUTH_SOURCE_NAME',
'AUTH_SOURCE_PROVIDER', 'AUTH_SOURCE_PROVIDER',
@@ -27,7 +22,6 @@ class authSourceProxy extends HttpProxyController {
'AUTH_SOURCE_BASE_DN', 'AUTH_SOURCE_BASE_DN',
'AUTH_SOURCE_OBJECT_CLASSES', 'AUTH_SOURCE_OBJECT_CLASSES',
'AUTH_SOURCE_ATTRIBUTES'); 'AUTH_SOURCE_ATTRIBUTES');
$aFields = $aData = array(); $aFields = $aData = array();
unset($params->PHPSESSID); unset($params->PHPSESSID);
@@ -53,50 +47,35 @@ class authSourceProxy extends HttpProxyController {
return $data; return $data;
} }
function saveAuthSources($params){ function saveAuthSources ($params)
{
global $RBAC; global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) { if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels'); G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header('location: ../login/login'); G::header( 'location: ../login/login' );
die; die();
} }
$aCommonFields = array('AUTH_SOURCE_UID', $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');
'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(); $aFields = $aData = array ();
unset($params->PHPSESSID); unset( $params->PHPSESSID );
foreach ($params as $sField => $sValue) { foreach ($params as $sField => $sValue) {
if (in_array($sField, $aCommonFields)) { if (in_array( $sField, $aCommonFields )) {
$aFields[$sField] = (($sField=='AUTH_SOURCE_ENABLED_TLS' || $sField=='AUTH_ANONYMOUS'))? ($sValue=='yes')?1:0 :$sValue; $aFields[$sField] = (($sField == 'AUTH_SOURCE_ENABLED_TLS' || $sField == 'AUTH_ANONYMOUS')) ? ($sValue == 'yes') ? 1 : 0 : $sValue;
} } else {
else {
$aData[$sField] = $sValue; $aData[$sField] = $sValue;
} }
} }
$aFields['AUTH_SOURCE_DATA'] = $aData; $aFields['AUTH_SOURCE_DATA'] = $aData;
if ($aFields['AUTH_SOURCE_UID'] == '') { if ($aFields['AUTH_SOURCE_UID'] == '') {
$RBAC->createAuthSource($aFields); $RBAC->createAuthSource( $aFields );
} else {
$RBAC->updateAuthSource( $aFields );
} }
else { $data = array ();
$RBAC->updateAuthSource($aFields);
}
$data=array();
$data['success'] = true; $data['success'] = true;
return $data; return $data;
}//end saveAuthSoruces function } //end saveAuthSoruces function
} //end authSourceProxy class } //end authSourceProxy class

View File

@@ -24,15 +24,12 @@ function getLoadTreeMenuData ()
$oMenu->load( 'cases' ); $oMenu->load( 'cases' );
$oCases = new Cases(); $oCases = new Cases();
$aTypes = Array ('to_do','draft','cancelled','sent','paused','completed','selfservice' $aTypes = Array ('to_do','draft','cancelled','sent','paused','completed','selfservice');
//'to_revise', //'to_revise',
//'to_reassign' //'to_reassign'
; $aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice');
$aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice'
//'CASES_TO_REVISE'=>'to_revise', //'CASES_TO_REVISE'=>'to_revise',
//'CASES_TO_REASSIGN'=>'to_reassign' //'CASES_TO_REASSIGN'=>'to_reassign'
;
$list = array (); $list = array ();
$list['count'] = ' '; $list['count'] = ' ';
@@ -64,8 +61,7 @@ function getLoadTreeMenuData ()
$menuCases[$CurrentBlockID]['blockType'] = $oMenu->Types[$i]; $menuCases[$CurrentBlockID]['blockType'] = $oMenu->Types[$i];
$menuCases[$CurrentBlockID]['link'] = $oMenu->Options[$i]; $menuCases[$CurrentBlockID]['link'] = $oMenu->Options[$i];
} else { } else {
$menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]] = Array ('label' => $oMenu->Labels[$i],'link' => $oMenu->Options[$i],'icon' => (isset( $oMenu->Icons[$i] ) && $oMenu->Icons[$i] != '') ? $oMenu->Icons[$i] : 'kcmdf.png' $menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]] = Array ('label' => $oMenu->Labels[$i],'link' => $oMenu->Options[$i],'icon' => (isset( $oMenu->Icons[$i] ) && $oMenu->Icons[$i] != '') ? $oMenu->Icons[$i] : 'kcmdf.png');
);
if (isset( $aTypesID[$oMenu->Id[$i]] )) { if (isset( $aTypesID[$oMenu->Id[$i]] )) {
$menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]]['cases_count'] = $aCount[$aTypesID[$oMenu->Id[$i]]]['count']; $menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]]['cases_count'] = $aCount[$aTypesID[$oMenu->Id[$i]]]['count'];
@@ -131,8 +127,7 @@ function getProcess ()
$aTypesID['CASES_SELFSERVICE'] = 'selfservice'; $aTypesID['CASES_SELFSERVICE'] = 'selfservice';
//$aTypesID['CASES_TO_REVISE'] = 'to_revise'; //$aTypesID['CASES_TO_REVISE'] = 'to_revise';
//$aTypesID['CASES_TO_REASSIGN'] = 'to_reassign'; //$aTypesID['CASES_TO_REASSIGN'] = 'to_reassign';
$aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice','CASES_TO_REVISE' => 'to_revise','CASES_TO_REASSIGN' => 'to_reassign' $aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice','CASES_TO_REVISE' => 'to_revise','CASES_TO_REASSIGN' => 'to_reassign');
);
$aCount = $oCases->getAllCounters( Array ($aTypesID[$type] $aCount = $oCases->getAllCounters( Array ($aTypesID[$type]
), $userId, true ); ), $userId, true );
@@ -188,8 +183,7 @@ function getAllCounters ()
$aCount = $ApplicationSolrIndex->getCasesCount( $userUid ); $aCount = $ApplicationSolrIndex->getCasesCount( $userUid );
//get paused count //get paused count
$aCountMissing = $oAppCache->getAllCounters( array ('paused','completed','cancelled' $aCountMissing = $oAppCache->getAllCounters( array ('paused','completed','cancelled'), $userUid );
), $userUid );
$aCount = array_merge( $aCount, $aCountMissing ); $aCount = array_merge( $aCount, $aCountMissing );
} else { } else {

View File

@@ -20,30 +20,32 @@
* *
* For more information, contact Colosa Inc, 2566 Le Jeune Rd., * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/ */
$frm = $HTTP_GET_VARS; $frm = $HTTP_GET_VARS;
?> ?>
<h1>demo de buscador</h1> <h1>demo de buscador</h1>
<form method=post action="buscador2.php"> <form method=post action="buscador2.php">
<input type=hidden name=ticket value="<?php echo $frm['ticket'] ?>" > <input type=hidden name=ticket value="<?php echo $frm['ticket'] ?>"> <input
<input type=hidden name=tipo value="<?php echo $frm['tipo'] ?>" > type=hidden name=tipo value="<?php echo $frm['tipo'] ?>">
Buscador tipo : <?php echo $frm['tipo'] ?><br> Buscador tipo : <?php echo $frm['tipo'] ?><br>
<table><tr><td> <table>
curso</td><td> <tr>
<select name=curso> <td>curso</td>
<td><select name=curso>
<option value="curso1">Curso 1</option> <option value="curso1">Curso 1</option>
<option value="curso2">Curso 2</option> <option value="curso2">Curso 2</option>
<option value="curso3">Curso 3</option> <option value="curso3">Curso 3</option>
<option value="curso4">Curso 4</4option> <option value="curso4">Curso 4</4option>
<option value="curso5">Curso 5</option>
</td></tr> <option value="curso5">Curso 5</option></td>
<tr><td colspan=2> </tr>
<input type=submit ></td></tr> <tr>
</table> <td colspan=2><input type=submit></td>
</tr>
</table>
</form> </form>
</body> </body>
</html> </html>

View File

@@ -1,38 +1,32 @@
demo de buscador<br> demo de buscador
/** <br>
* buscador2.php /** * buscador2.php * * ProcessMaker Open Source Edition * Copyright (C)
* 2004 - 2008 Colosa Inc.23 * * This program is free software: you can
* ProcessMaker Open Source Edition redistribute it and/or modify * it under the terms of the GNU Affero
* Copyright (C) 2004 - 2008 Colosa Inc.23 General Public License as * published by the Free Software Foundation,
* either version 3 of the * License, or (at your option) any later
* This program is free software: you can redistribute it and/or modify version. * * This program is distributed in the hope that it will be
* it under the terms of the GNU Affero General Public License as useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
* published by the Free Software Foundation, either version 3 of the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU
* License, or (at your option) any later version. Affero General Public License for more details. * * You should have
* received a copy of the GNU Affero General Public License * along with
* This program is distributed in the hope that it will be useful, this program. If not, see
* but WITHOUT ANY WARRANTY; without even the implied warranty of <http: //www.gnu.org/licenses />
* 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., * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * Coral Gables, FL, 33134, USA, or email info@colosa.com.
* *
*/ */
<?php <?php
$frm = $HTTP_POST_VARS; $frm = $HTTP_POST_VARS;
$dbc = new dbconnection(); $dbc = new dbconnection();
$ses = new DBSession($dbc); $ses = new DBSession( $dbc );
$sql = "update tickets set tipo = ' " . $frm['tipo'] ."', resultado = ' " . $frm['curso'] . "' where ticket = '" . $frm['ticket'] ."' "; $sql = "update tickets set tipo = ' " . $frm['tipo'] . "', resultado = ' " . $frm['curso'] . "' where ticket = '" . $frm['ticket'] . "' ";
$ses->Execute ( $sql ); $ses->Execute( $sql );
?> ?>
<script language = "JavaScript"> <script language="JavaScript">
window.close(); window.close();
</script> </script>

View File

@@ -57,9 +57,6 @@ function cal_popup1 (str_datetime) {
); );
obj_calwindow.opener = window; obj_calwindow.opener = window;
obj_calwindow.focus(); obj_calwindow.focus();
} }
// timestamp generating function // timestamp generating function
@@ -160,3 +157,4 @@ function cal_error (str_message) {
alert (str_message); alert (str_message);
return null; return null;
} }

View File

@@ -22,7 +22,10 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * Coral Gables, FL, 33134, USA, or email info@colosa.com.
* *
*/ */
td {font-family: Tahoma, Verdana, sans-serif; font-size: 12px;} td {
font-family: Tahoma, Verdana, sans-serif;
font-size: 12px;
}
</style> </style>
<script language="JavaScript"> <script language="JavaScript">
@@ -101,44 +104,55 @@ function set_datetime(n_datetime, b_close) {
</script> </script>
<php <php $ARR_MONTHS=array
$ARR_MONTHS = array ( "January", "February", "March", "April", "May", "June", ( "January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"); "July", "August", "September", "October", "November", "December");
$ARR_WEEKDAYS = array ( "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ); $ARR_WEEKDAYS=array
$NUM_WEEKSTART = 1; //day week starts from (normally 0-Su or 1-Mo) ( "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" );
$NUM_WEEKSTART=1; //day
week starts from (normally 0-Suor 1-Mo)
?> ?>
<table class="clsOTable" cellspacing="0" border="0" width="100%"> <table class="clsOTable" cellspacing="0" border="0" width="100%">
<tr><td bgcolor="#4682B4"> <tr>
<table cellspacing="1" cellpadding="3" border="0" width="100%"> <td bgcolor="#4682B4">
<tr><td colspan="7"><table cellspacing="0" cellpadding="0" border="0" width="100%"> <table cellspacing="1" cellpadding="3" border="0" width="100%">
<tr> <tr>
<td> +(obj_caller&&obj_caller.year_scroll?'<a href="javascript:set_datetime('+dt_prev_year.valueOf()+')"> <td colspan="7"><table cellspacing="0" cellpadding="0" border="0"
<img src="'+STR_ICONPATH+'prev_year.gif" width="16" height="16" border="0" alt="previous year"></a>&nbsp;':'')+' width="100%">
<a href="javascript:set_datetime('+dt_prev_month.valueOf()+')"> <tr>
<img src="'+STR_ICONPATH+'prev.gif" width="16" height="16" border="0" alt="previous month"></a> <td>+(obj_caller&&obj_caller.year_scroll?'<a
href="javascript:set_datetime('+dt_prev_year.valueOf()+')"> <img
src="'+STR_ICONPATH+'prev_year.gif" width="16" height="16"
border="0" alt="previous year"></a>&nbsp;':'')+' <a
href="javascript:set_datetime('+dt_prev_month.valueOf()+')"> <img
src="'+STR_ICONPATH+'prev.gif" width="16" height="16"
border="0" alt="previous month"></a>
</td> </td>
<td align="center" width="100%"> <td align="center" width="100%"><font color="#ffffff">
<font color="#ffffff"> +ARR_MONTHS[dt_current.getMonth()]+' '+dt_current.getFullYear() </font></td> +ARR_MONTHS[dt_current.getMonth()]+'
<td><a href="javascript:set_datetime('+dt_next_month.valueOf()+')"> '+dt_current.getFullYear() </font></td>
<img src="'+STR_ICONPATH+'next.gif" width="16" height="16" border="0" alt="next month"></a> <td><a
'+(obj_caller && obj_caller.year_scroll?'&nbsp; href="javascript:set_datetime('+dt_next_month.valueOf()+')"> <img
<a href="javascript:set_datetime('+dt_next_year.valueOf()+')"> src="'+STR_ICONPATH+'next.gif" width="16" height="16"
<img src="'+STR_ICONPATH+'next_year.gif" width="16" height="16" border="0" alt="next year"> border="0" alt="next month"></a> '+(obj_caller &&
</a>':'')+' obj_caller.year_scroll?'&nbsp; <a
</td>' href="javascript:set_datetime('+dt_next_year.valueOf()+')"> <img
); src="'+STR_ICONPATH+'next_year.gif" width="16" height="16"
border="0" alt="next year">
</a>':'')+'</td>' );
</tr> </tr>
</table></td></tr> </table></td>
<tr> </tr>
<script language="JavaScript"> <tr>
<script language="JavaScript">
<?php <?php
// print weekdays titles // print weekdays titles
for ($n=0; $n<7; $n++) for ($n = 0; $n < 7; $n ++)
print "<td bgcolor='#87cefa' align='center'><font color='#ffffff'>" . $ARR_WEEKDAYS[ (NUM_WEEKSTART+n)%7] . "</font></td>"; print "<td bgcolor='#87cefa' align='center'><font color='#ffffff'>" . $ARR_WEEKDAYS[(NUM_WEEKSTART + n) % 7] . "</font></td>";
print "</tr>"; print "</tr>";
?> ?>
// print calendar table // print calendar table
@@ -175,11 +189,15 @@ while (dt_current_day.getMonth() == dt_current.getMonth() ||
// print row footer // print row footer
document.write('</tr>'); document.write('</tr>');
} }
if (obj_caller && obj_caller.time_comp) if (obj_caller && obj_caller.time_comp) {
document.write('<form onsubmit="javascript:set_datetime('+dt_current.valueOf()+', true)" name="cal"><tr><td colspan="7" bgcolor="#87CEFA"><font color="White" face="tahoma, verdana" size="2">Time: <input type="text" name="time" value="'+obj_caller.gen_time(this.dt_current)+'" size="8" maxlength="8"></font></td></tr></form>'); document.write('<form onsubmit="javascript:set_datetime('+dt_current.valueOf()+', true)" name="cal"><tr><td colspan="7" bgcolor="#87CEFA"><font color="White" face="tahoma, verdana" size="2">Time: <input type="text" name="time" value="'+obj_caller.gen_time(this.dt_current)+'" size="8" maxlength="8"></font></td></tr></form>');
}
</script> </script>
</table></tr></td>
</table>
</tr>
</td>
</table> </table>
</body> </body>
</html> </html>

View File

@@ -20,53 +20,43 @@
* *
* For more information, contact Colosa Inc, 2566 Le Jeune Rd., * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/ */
G::LoadClass('xmlfield_InputPM'); G::LoadClass( 'xmlfield_InputPM' );
$aFields = getDynaformsVars($_POST['sProcess'], true, isset($_POST['bIncMulSelFields']) ? $_POST['bIncMulSelFields'] : 0); $aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
$sHTML = '<select name="_Var_Form_" id="_Var_Form_" size="' . count($aFields) . '" style="width:100%;' . (! isset($_POST['sNoShowLeyend']) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">'; $sHTML = '<select name="_Var_Form_" id="_Var_Form_" size="' . count( $aFields ) . '" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">';
foreach ( $aFields as $aField ) { foreach ($aFields as $aField) {
$sHTML .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>'; $sHTML .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';
} }
$aRows[0] = Array ( $aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
'fieldname' => 'char',
'variable' => 'char',
'type' => 'type',
'label' => 'char'
); );
foreach ( $aFields as $aField ) { foreach ($aFields as $aField) {
$aRows[] = Array ( $aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
'fieldname' => $_POST['sFieldName'],
'variable' => $_POST['sSymbol'] . $aField['sName'],
'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\''.$_POST['sFieldName'].'\',\''.$_POST['sSymbol'] . $aField['sName'].'\');">'.$_POST['sSymbol'] . $aField['sName'].'</a></div>',
'type' => $aField['sType'],
'label' => $aField['sLabel']
); );
} }
$sHTML .= '</select>'; $sHTML .= '</select>';
$sHTML = ''; $sHTML = '';
if (! isset($_POST['sNoShowLeyend'])) { if (! isset( $_POST['sNoShowLeyend'] )) {
$sHTML = '<table width="100%">'; $sHTML = '<table width="100%">';
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"><b>Variables cast prefix</b></td></tr>'; $sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"><b>Variables cast prefix</b></td></tr>';
if (isset($_POST['sType'])) { if (isset( $_POST['sType'] )) {
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESC') . '</td></tr>'; $sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_ESC' ) . '</td></tr>';
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_NONEC') . '</td></tr>'; $sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_NONEC' ) . '</td></tr>';
/*$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EURL') . '</td></tr>'; /*$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EURL') . '</td></tr>';
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EVAL') . '</td></tr>'; $sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EVAL') . '</td></tr>';
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCJS') . '</td></tr>'; $sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCJS') . '</td></tr>';
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCSJS') . '</td></tr>'; $sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCSJS') . '</td></tr>';
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_FUNCTION') . '</td></tr>';*/ $sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_FUNCTION') . '</td></tr>';*/
} else { } else {
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@@</td><td class="module_app_input___gray">' . G::LoadTranslation('ID_TO_STRING') . '</td></tr>'; $sHTML .= '<tr><td class="module_app_input___gray" width="5%">@@</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_STRING' ) . '</td></tr>';
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@#</td><td class="module_app_input___gray">' . G::LoadTranslation('ID_TO_FLOAT') . '</td></tr>'; $sHTML .= '<tr><td class="module_app_input___gray" width="5%">@#</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_FLOAT' ) . '</td></tr>';
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@%</td><td class="module_app_input___gray">' . G::LoadTranslation('ID_TO_INTEGER') . '</td></tr>'; $sHTML .= '<tr><td class="module_app_input___gray" width="5%">@%</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_INTEGER' ) . '</td></tr>';
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@?</td><td class="module_app_input___gray">' . G::LoadTranslation('ID_TO_URL') . '</td></tr>'; $sHTML .= '<tr><td class="module_app_input___gray" width="5%">@?</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_URL' ) . '</td></tr>';
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@$</td><td class="module_app_input___gray">' . G::LoadTranslation('ID_SQL_ESCAPE') . '</td></tr>'; $sHTML .= '<tr><td class="module_app_input___gray" width="5%">@$</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_SQL_ESCAPE' ) . '</td></tr>';
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@=</td><td class="module_app_input___gray">' . G::LoadTranslation('ID_REPLACE_WITHOUT_CHANGES') . '</td></tr>'; $sHTML .= '<tr><td class="module_app_input___gray" width="5%">@=</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_REPLACE_WITHOUT_CHANGES' ) . '</td></tr>';
} }
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">&nbsp;</td></tr>'; $sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">&nbsp;</td></tr>';
//$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">' . G::LoadTranslation('ID_DOCLICK') . '</td></tr>'; //$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">' . G::LoadTranslation('ID_DOCLICK') . '</td></tr>';
@@ -126,37 +116,37 @@ background: #fff; /* set desired hover color */
</style>"; </style>";
$cssTabs = "<div id=\"all\"> $cssTabs = "<div id=\"all\">
<ul id=\"tabnav\"> <ul id=\"tabnav\">
<li class=\"all\"><a href=\"#\" onclick=\"changeVariables('all','".$_POST['sProcess']."','".$_POST['sFieldName']."','".$_POST['sSymbol']."','processVariablesContent');\">All variables</a></li> <li class=\"all\"><a href=\"#\" onclick=\"changeVariables('all','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">All variables</a></li>
<li class=\"system\"><a href=\"#\" onclick=\"changeVariables('system','".$_POST['sProcess']."','".$_POST['sFieldName']."','".$_POST['sSymbol']."','processVariablesContent');\">System</a></li> <li class=\"system\"><a href=\"#\" onclick=\"changeVariables('system','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">System</a></li>
<li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','".$_POST['sProcess']."','".$_POST['sFieldName']."','".$_POST['sSymbol']."','processVariablesContent');\">Process</a></li> <li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
</ul> </ul>
</div> </div>
"; ";
echo $sHTML; echo $sHTML;
echo $sStyle; echo $sStyle;
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
echo "<div id=\"processVariablesContent\">"; echo "<div id=\"processVariablesContent\">";
echo $cssTabs; echo $cssTabs;
G::LoadClass('ArrayPeer'); G::LoadClass( 'ArrayPeer' );
global $_DBArray; global $_DBArray;
$_DBArray['dynavars'] = $aRows; $_DBArray['dynavars'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray; $_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer'); G::LoadClass( 'ArrayPeer' );
$oCriteria = new Criteria('dbarray'); $oCriteria = new Criteria( 'dbarray' );
$oCriteria->setDBArrayTable('dynavars'); $oCriteria->setDBArrayTable( 'dynavars' );
$aFields = array (); $aFields = array ();
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$oHeadPublisher =& headPublisher::getSingleton(); $oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( "/jscore/controls/varsAjax.js" ); $oHeadPublisher->addScriptFile( "/jscore/controls/varsAjax.js" );
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'triggers/dynavars', $oCriteria); $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
G::RenderPage('publish', 'raw'); G::RenderPage( 'publish', 'raw' );
echo "</div>"; echo "</div>";
?>

View File

@@ -20,96 +20,70 @@
* *
* For more information, contact Colosa Inc, 2566 Le Jeune Rd., * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/ */
/** /**
* @author Gustavo Cruz gustavo-at-colosa.com * the varAjaxByType file as the varAjax.php handle the render of the diferent
* @param $_POST variables
* @desc the varAjaxByType file as the varAjax.php handle the render of the diferent
* types of dynaform variables there are 3 of them system, process, and the default * types of dynaform variables there are 3 of them system, process, and the default
* that show both system and process variables. * that show both system and process variables.
* uses almost the same variables passed to varsAjax, plus $_POST['type'] that is the * uses almost the same variables passed to varsAjax, plus $_POST['type'] that is the
* type of the variables. Then it render a propel table with all the variables * type of the variables. Then it render a propel table with all the variables
* loaded for that type. * loaded for that type.
*
* @author Gustavo Cruz gustavo-at-colosa.com
* @param $_POST variables
*/ */
G::LoadClass('xmlfield_InputPM'); G::LoadClass( 'xmlfield_InputPM' );
$aFields = getDynaformsVars($_POST['sProcess'], true, isset($_POST['bIncMulSelFields']) ? $_POST['bIncMulSelFields'] : 0); $aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
$aType = $_POST['type']; $aType = $_POST['type'];
$aRows[0] = Array ( $aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
'fieldname' => 'char',
'variable' => 'char',
'type' => 'type',
'label' => 'char'
); );
foreach ( $aFields as $aField ) { foreach ($aFields as $aField) {
switch ($aType){ switch ($aType) {
case "system": case "system":
if($aField['sType']=="system"){ if ($aField['sType'] == "system") {
$aRows[] = Array ( $aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
'fieldname' => $_POST['sFieldName'],
'variable' => $_POST['sSymbol'] . $aField['sName'],
'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\''.
$_POST['sFieldName'].'\',\''.$_POST['sSymbol'] . $aField['sName'].'\');">'.$_POST['sSymbol'] . $aField['sName'].'</a></div>',
'type' => $aField['sType'],
'label' => $aField['sLabel']
); );
} }
break; break;
case "process": case "process":
if($aField['sType']!="system"){ if ($aField['sType'] != "system") {
$aRows[] = Array ( $aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
'fieldname' => $_POST['sFieldName'],
'variable' => $_POST['sSymbol'] . $aField['sName'],
'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\''.
$_POST['sFieldName'].'\',\''.$_POST['sSymbol'] . $aField['sName'].'\');">'.$_POST['sSymbol'] . $aField['sName'].'</a></div>',
'type' => $aField['sType'],
'label' => $aField['sLabel']
); );
} }
break; break;
default: default:
$aRows[] = Array ( $aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
'fieldname' => $_POST['sFieldName'],
'variable' => $_POST['sSymbol'] . $aField['sName'],
'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\''.$_POST['sFieldName'].'\',\''
.$_POST['sSymbol'] . $aField['sName'].'\');">'.$_POST['sSymbol'] . $aField['sName'].'</a></div>',
'type' => $aField['sType'],
'label' => $aField['sLabel']
); );
break; break;
} }
} }
// Use and make a load translation variable call to the titles of the tabs // Use and make a load translation variable call to the titles of the tabs
$cssTabs = "<div id=\"".strtolower($_POST['type'])."\"> $cssTabs = "<div id=\"" . strtolower( $_POST['type'] ) . "\">
<ul id=\"tabnav\"> <ul id=\"tabnav\">
<li class=\"all\"><a href=\"#\" onclick=\"changeVariables('all','".$_POST['sProcess']."','" <li class=\"all\"><a href=\"#\" onclick=\"changeVariables('all','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">All variables</a></li>
.$_POST['sFieldName']."','".$_POST['sSymbol']."','processVariablesContent');\">All variables</a></li> <li class=\"system\"><a href=\"#\" onclick=\"changeVariables('system','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">System</a></li>
<li class=\"system\"><a href=\"#\" onclick=\"changeVariables('system','".$_POST['sProcess']."','" <li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
.$_POST['sFieldName']."','".$_POST['sSymbol']."','processVariablesContent');\">System</a></li>
<li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','".$_POST['sProcess']."','"
.$_POST['sFieldName']."','".$_POST['sSymbol']."','processVariablesContent');\">Process</a></li>
</ul> </ul>
</div> </div>
"; ";
echo $cssTabs; echo $cssTabs;
G::LoadClass('ArrayPeer'); G::LoadClass( 'ArrayPeer' );
global $_DBArray; global $_DBArray;
$_DBArray['dynavars'] = $aRows; $_DBArray['dynavars'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray; $_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer'); G::LoadClass( 'ArrayPeer' );
$oCriteria = new Criteria('dbarray'); $oCriteria = new Criteria( 'dbarray' );
$oCriteria->setDBArrayTable('dynavars'); $oCriteria->setDBArrayTable( 'dynavars' );
$aFields = array (); $aFields = array ();
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'triggers/dynavars', $oCriteria); $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
G::RenderPage('publish', 'raw'); G::RenderPage( 'publish', 'raw' );
?>