Ejemplo n.º 1
0
	function AddPage(&$params)
	{
		parent::RunnerPage($params);
		
		$this->formBricks["header"] = "addheader";
		$this->formBricks["footer"] = "addbuttons";		
	}
Ejemplo n.º 2
0
 /**
  * @constructor
  */
 function PrintPage(&$params = "")
 {
     parent::RunnerPage($params);
     if ($this->selectedRecords) {
         $this->allPagesMode = true;
     }
     //	save selected records in session in normal mode
     //	read them in PDF mode
     if (!$this->pdfMode) {
         $_SESSION[$this->sessionPrefix . "_selection"] = $this->selectedRecords;
     } else {
         $this->selectedRecords = $_SESSION[$this->sessionPrefix . "_selection"];
         unset($_SESSION[$this->sessionPrefix . "_selection"]);
         //	ensure selectedRecords records is array
         if (!$this->selectedRecords) {
             $this->selectedRecords = array();
         }
     }
     $this->printGridLayout = $this->pSet->getPrintGridLayout();
     for ($i = 0; $i < count($this->detailKeysByM); $i++) {
         $this->masterKeys[] = $_SESSION[$this->sessionPrefix . "_masterkey" . ($i + 1)];
     }
     $this->masterTable = $_SESSION[$this->sessionPrefix . "_mastertable"];
     $this->totalsFields = $this->pSet->getTotalsFields();
     $this->splitByRecords = $this->pSet->getPrinterSplitRecords();
     if ($this->pdfMode) {
         $this->splitByRecords = $this->pSet->getPrinterPDFSplitRecords();
     }
 }
Ejemplo n.º 3
0
 /**
  * @constructor
  */
 function ViewPage(&$params)
 {
     parent::RunnerPage($params);
     $this->setKeysForJs();
     $this->formBricks["header"] = "viewheader";
     $this->formBricks["footer"] = "viewbuttons";
     $this->assignFormFooterAndHeaderBricks(true);
 }
Ejemplo n.º 4
0
 function RemindPasswordPage(&$params)
 {
     parent::RunnerPage($params);
     $this->pSet = new ProjectSettings("DashboardUsers", $this->pageType);
     $this->pSetEdit = $this->pSet;
     $this->formBricks["header"] = "remindheader";
     $this->formBricks["footer"] = "remindbuttons";
     $this->assignFormFooterAndHeaderBricks(true);
 }
Ejemplo n.º 5
0
	function ViewPage(&$params)
	{
		parent::RunnerPage($params);
		
		$this->setKeysForJs();
		
		$this->formBricks["header"] = "viewheader";
		$this->formBricks["footer"] = "viewbuttons";		
	}
Ejemplo n.º 6
0
	function EditPage(&$params)
	{
		parent::RunnerPage($params);
		
		$this->editFields = $this->getFieldsByPageType();
		$this->setKeys( $this->keys );
		
		$this->formBricks["header"] = "editheader";
		$this->formBricks["footer"] = "editbuttons";	
	}
Ejemplo n.º 7
0
	function LoginPage(&$params) 
	{
		// call parent constructor
		parent::RunnerPage($params);
		
		$this->auditObj = GetAuditObject();
		
		$this->formBricks["header"] = "loginheader";
		$this->formBricks["footer"] = "loginbuttons";
	}
Ejemplo n.º 8
0
 /**
  * @constructor
  */
 function EditPage(&$params)
 {
     parent::RunnerPage($params);
     $this->setKeysForJs();
     $this->auditObj = GetAuditObject($this->tName);
     $this->editFields = $this->getPageFields();
     $this->formBricks["header"] = "editheader";
     $this->formBricks["footer"] = "editbuttons";
     $this->assignFormFooterAndHeaderBricks(true);
 }
Ejemplo n.º 9
0
 function ReportPage(&$params)
 {
     parent::RunnerPage($params);
     $this->crossTable = $this->pSet->isCrossTabReport();
     $this->jsSettings['tableSettings'][$this->tName]['crossTable'] = $this->crossTable;
     $this->jsSettings['tableSettings'][$this->tName]['simpleSearchActive'] = $this->searchClauseObj->simpleSearchActive;
     if ($this->mode == REPORT_DASHBOARD) {
         $this->formBricks["footer"] = array("pagination_block");
     }
 }
Ejemplo n.º 10
0
 /**
  * @constructor
  */
 function LoginPage(&$params)
 {
     // call parent constructor
     parent::RunnerPage($params);
     $this->pSet = new ProjectSettings("ConsolidatedStockEnquiry_users", $this->pageType);
     $this->pSetEdit = $this->pSet;
     $this->pSetSearch = new ProjectSettings($this->tName, PAGE_SEARCH);
     $this->auditObj = GetAuditObject();
     $this->formBricks["header"] = "loginheader";
     $this->formBricks["footer"] = "loginbuttons";
     $this->assignFormFooterAndHeaderBricks(true);
 }
Ejemplo n.º 11
0
 /**
  * @constructor
  * @param &Array params
  */
 function DashboardPage(&$params)
 {
     parent::RunnerPage($params);
     // Set language params, if have more than one language
     $this->setLangParams();
     $this->jsSettings['tableSettings'][$this->tName]['dashElements'] = array();
     //	calculate additional element settings
     foreach ($this->pSet->getDashboardElements() as $key => $elem) {
         $permissions = false;
         $newElem = $elem;
         if ($elem['type'] == DASHBOARD_RECORD) {
             // check tables (add, view, edit) permissinons befor add to js
             $newElem['tabsPageTypes'] = array();
             foreach ($elem['tabsPageTypes'] as $idx => $pageType) {
                 if ($this->CheckPermissions($elem['table'], $pageType)) {
                     $permissions = true;
                     $newElem['tabsPageTypes'][] = $pageType;
                 }
             }
         } elseif ($elem['type'] == DASHBOARD_DETAILS) {
             $eset = new ProjectSettings($elem['table']);
             $details = $eset->getDetailTablesArr();
             // add details shortTableNames
             $newElem['details'] = array();
             foreach ($details as $idx => $d) {
                 if (in_array($d['dDataSourceTable'], $elem['notUsedDetailTables'])) {
                     continue;
                 }
                 if ($this->CheckPermissions($d['dDataSourceTable'], $d['dType'])) {
                     $permissions = true;
                     $newElem['details'][$idx] = $d;
                     $this->jsSettings['tableSettings'][$d['dDataSourceTable']]['shortTName'] = $d['dShortTable'];
                 }
             }
         } elseif ($elem['type'] == DASHBOARD_CHART || $elem['type'] == DASHBOARD_REPORT || $elem['type'] == DASHBOARD_SEARCH) {
             $permissions = $this->CheckPermissions($elem['table'], "Search");
         } elseif ($elem['type'] == DASHBOARD_LIST) {
             $permissions = $this->CheckPermissions($elem['table'], "list");
         }
         $this->elementsPermissions[$key] = $permissions;
         if (!$permissions) {
             continue;
         }
         // add shortTableNames and element
         $this->jsSettings['tableSettings'][$elem['table']]['shortTName'] = GetTableURL($elem['table']);
         $this->jsSettings['tableSettings'][$this->tName]['dashElements'][$key] = $newElem;
     }
 }
Ejemplo n.º 12
0
 function RegisterPage(&$params = "")
 {
     parent::RunnerPage($params);
     // fill global password settings
     $this->pwdStrong = GetGlobalData("pwdStrong", false);
     if ($this->pwdStrong) {
         $this->settingsMap["globalSettings"]["pwdLen"] = GetGlobalData("pwdLen", 0);
         $this->settingsMap["globalSettings"]["pwdUnique"] = GetGlobalData("pwdUnique", 0);
         $this->settingsMap["globalSettings"]["pwdDigits"] = GetGlobalData("pwdDigits", 0);
         $this->settingsMap["globalSettings"]["pwdStrong"] = true;
         $this->settingsMap["globalSettings"]["pwdUpperLower"] = GetGlobalData("pwdUpperLower", false);
     }
     $this->formBricks["header"] = "regheader";
     $this->formBricks["footer"] = "regbuttons";
     $this->assignFormFooterAndHeaderBricks(true);
 }
Ejemplo n.º 13
0
 /**
  * @constructor
  */
 function PrintPage(&$params = "")
 {
     parent::RunnerPage($params);
     if ($this->selectedRecords) {
         $this->allPagesMode = true;
     }
     $this->printGridLayout = $this->pSet->getPrintGridLayout();
     for ($i = 0; $i < count($this->detailKeysByM); $i++) {
         $this->masterKeys[] = $_SESSION[$this->sessionPrefix . "_masterkey" . ($i + 1)];
     }
     $this->masterTable = $_SESSION[$this->sessionPrefix . "_mastertable"];
     $this->totalsFields = $this->pSet->getTotalsFields();
     $this->splitByRecords = $this->pSet->getPrinterSplitRecords();
     if ($this->pdfMode) {
         $this->splitByRecords = $this->pSet->getPrinterPDFSplitRecords();
     }
 }
Ejemplo n.º 14
0
 function ChangePasswordPage(&$params = "")
 {
     parent::RunnerPage($params);
     $this->pSet = new ProjectSettings("DashboardUsers", $this->pageType);
     $this->pSetEdit = $this->pSet;
     // fill global password settings
     $this->pwdStrong = GetGlobalData("pwdStrong", false);
     if ($this->pwdStrong) {
         $this->settingsMap["globalSettings"]["pwdLen"] = GetGlobalData("pwdLen", 0);
         $this->settingsMap["globalSettings"]["pwdUnique"] = GetGlobalData("pwdUnique", 0);
         $this->settingsMap["globalSettings"]["pwdDigits"] = GetGlobalData("pwdDigits", 0);
         $this->settingsMap["globalSettings"]["pwdStrong"] = true;
         $this->settingsMap["globalSettings"]["pwdUpperLower"] = GetGlobalData("pwdUpperLower", false);
     }
     $this->formBricks["header"] = "changeheader";
     $this->formBricks["footer"] = "changebuttons";
     $this->assignFormFooterAndHeaderBricks(true);
 }
Ejemplo n.º 15
0
 function ImportPage(&$params)
 {
     parent::RunnerPage($params);
     $this->audit = GetAuditObject($this->tName);
     $this->jsSettings['tableSettings'][$this->tName]["importFieldsLables"] = $this->getImportfieldsLabels();
 }
Ejemplo n.º 16
0
	function WebreportPage(&$params)
	{
		parent::RunnerPage($params);
	}
Ejemplo n.º 17
0
 /**
  * Constructor, set initial params
  * @param array $params
  */
 function ListPage(&$params)
 {
     // call parent constructor
     parent::RunnerPage($params);
     $this->showAddInPopup = $this->pSet->isShowAddInPopup();
     $this->showEditInPopup = $this->pSet->isShowEditInPopup();
     $this->showViewInPopup = $this->pSet->isShowViewInPopup();
     $this->pSet->setPage(PAGE_SEARCH);
     //	Before Process event
     $this->beforeProcessEvent();
     // Set language params, if have more than one language
     $this->setLangParams();
     $this->jsSettings['tableSettings'][$this->tName]['simpleSearchActive'] = $this->searchClauseObj->simpleSearchActive;
     for ($i = 0; $i < count($this->allDetailsTablesArr); $i++) {
         // get perm for det tables
         $this->permis[$this->allDetailsTablesArr[$i]['dDataSourceTable']] = $this->getPermissions($this->allDetailsTablesArr[$i]['dDataSourceTable']);
         // field names of detail keys of passed detail table, when current is master
         $this->detailKeysByD[$i] = $this->pSet->getDetailKeysByDetailTable($this->allDetailsTablesArr[$i]['dDataSourceTable']);
     }
     $this->genId();
     // fill span val indicator for totals
     $this->jsSettings['tableSettings'][$this->tName]['totalFields'] = array();
     foreach ($this->totalsFields as $tField) {
         $this->jsSettings['tableSettings'][$this->tName]['totalFields'][] = array('type' => $tField['totalsType'], 'fName' => $tField['fName'], 'format' => $tField['viewFormat']);
         if ($tField['totalsType'] == 'COUNT') {
             $this->outputFieldValue($tField['fName'], 1);
         } else {
             $this->outputFieldValue($tField['fName'], 2);
         }
     }
     //if scroll body of grid
     $this->jsSettings['tableSettings'][$this->tName]['scrollGridBody'] = $this->listGridLayout == gltHORIZONTAL && $this->isScrollGridBody;
     $this->jsSettings['tableSettings'][$this->tName]['permissions'] = $this->permis[$this->tName];
     if ($this->pSet->getAdvancedSecurityType() == ADVSECURITY_EDIT_OWN) {
         $this->jsSettings['tableSettings'][$this->tName]['isEditOwn'] = $this->permis[$this->tName];
     }
     $this->settingsMap["tableSettings"]['inlineEdit'] = array("default" => false, "jsName" => "isInlineEdit");
     $this->settingsMap["tableSettings"]['inlineAdd'] = array("default" => false, "jsName" => "isInlineAdd");
     $this->settingsMap["tableSettings"]['copy'] = array("default" => false, "jsName" => "copy");
     $this->settingsMap["tableSettings"]['view'] = array("default" => false, "jsName" => "view");
     $this->jsSettings['tableSettings'][$this->tName]['listFields'] = array();
     for ($i = 0; $i < count($this->listFields); $i++) {
         $this->jsSettings['tableSettings'][$this->tName]['listFields'][] = $this->listFields[$i]['fName'];
         // call addGoogleMapData before call proccessRecordValue!!!
         if ($this->listFields[$i]['viewFormat'] == FORMAT_MAP) {
             $this->gMapFields[] = $i;
         }
     }
     $this->addPopupLayoutNamesToSettings();
     $this->orderClause = new OrderClause($this);
     $this->orderClause->moveNext = $this->pSet->useMoveNext();
 }
Ejemplo n.º 18
0
 /**
  * Constructor, set initial params
  *
  * @param array $params
  */
 function ListPage(&$params)
 {
     // call parent constructor
     parent::RunnerPage($params);
     //	Before Process event
     $this->beforeProcessEvent();
     // process master key value
     $this->processMasterKeyValue();
     // Set language params, if have more than one language
     $this->setLangParams();
     //get array of all details tables
     //$this->allDetailsTablesArr = GetDetailTablesArr($this->tName);
     for ($i = 0; $i < count($this->allDetailsTablesArr); $i++) {
         global $tables_data;
         include_once getabspath('include/' . $this->allDetailsTablesArr[$i]['dShortTable'] . '_settings.php');
         // get perm for det tables
         $this->permis[$this->allDetailsTablesArr[$i]['dDataSourceTable']] = $this->getPermissions($this->allDetailsTablesArr[$i]['dDataSourceTable']);
         // field names of detail keys of passed detail table, when current is master
         $this->detailKeysByD[$i] = GetDetailKeysByDetailTable($this->allDetailsTablesArr[$i]['dDataSourceTable'], $this->tName);
     }
     $this->theSameFieldsType = $this->checkDetailAndMasterFieldTypes();
     $this->genId();
     // template file name
     $this->templatefile = $this->shortTableName . "_list.htm";
     // fill span val indicator for totals
     foreach ($this->totalsFields as $tField) {
         $this->jsSettings['tableSettings'][$this->tName]['totalFields'][] = array('type' => $tField['totalsType'], 'fName' => $tField['fName'], 'format' => $tField['viewFormat']);
         if ($tField['totalsType'] == 'COUNT') {
             $this->outputFieldValue($tField['fName'], 1);
         } else {
             $this->outputFieldValue($tField['fName'], 2);
         }
     }
     $this->jsSettings['tableSettings'][$this->tName]['permissions'] = $this->permis[$this->tName];
     if (GetTableData($this->tName, '.nSecOptions', '') == ADVSECURITY_EDIT_OWN) {
         $this->jsSettings['tableSettings'][$this->tName]['isEditOwn'] = $this->permis[$this->tName];
     }
     $this->settingsMap["tableSettings"]['isUseInlineEdit'] = array("default" => false, "jsName" => "isInlineEdit");
     $this->settingsMap["tableSettings"]['isUseInlineAdd'] = array("default" => false, "jsName" => "isInlineAdd");
     $this->settingsMap["tableSettings"]['copy'] = array("default" => false, "jsName" => "copy");
     $this->settingsMap["tableSettings"]['view'] = array("default" => false, "jsName" => "view");
     for ($i = 0; $i < count($this->listFields); $i++) {
         $this->jsSettings['tableSettings'][$this->tName]['listFields'][] = $this->listFields[$i]['fName'];
         // call addGoogleMapData before call  proccessRecordValue!!!
         if ($this->listFields[$i]['viewFormat'] == FORMAT_MAP) {
             $this->gMapFields[] = $i;
         }
     }
 }
Ejemplo n.º 19
0
 /**
  * Constructor, set initial params
  *
  * @param array $params
  */
 function ListPage(&$params)
 {
     // call parent constructor
     parent::RunnerPage($params);
     $this->pSet->setPage(PAGE_SEARCH);
     //	Before Process event
     $this->beforeProcessEvent();
     // process master key value
     $this->processMasterKeyValue();
     // Set language params, if have more than one language
     $this->setLangParams();
     //get array of all details tables
     //$this->allDetailsTablesArr = GetDetailTablesArr($this->tName);
     $this->jsSettings['tableSettings'][$this->tName]['isUsedSearchFor'] = $this->searchClauseObj->isUsedSearchFor;
     for ($i = 0; $i < count($this->allDetailsTablesArr); $i++) {
         global $tables_data, $field_labels, $fieldToolTips, $detailsTablesData, $masterTablesData, $tableEvents, $cipherer;
         include_once getabspath('include/' . $this->allDetailsTablesArr[$i]['dShortTable'] . '_settings.php');
         // get perm for det tables
         $this->permis[$this->allDetailsTablesArr[$i]['dDataSourceTable']] = $this->getPermissions($this->allDetailsTablesArr[$i]['dDataSourceTable']);
         // field names of detail keys of passed detail table, when current is master
         $this->detailKeysByD[$i] = $this->pSet->getDetailKeysByDetailTable($this->allDetailsTablesArr[$i]['dDataSourceTable']);
     }
     $this->theSameFieldsType = $this->checkDetailAndMasterFieldTypes();
     $this->genId();
     // fill span val indicator for totals
     foreach ($this->totalsFields as $tField) {
         $this->jsSettings['tableSettings'][$this->tName]['totalFields'][] = array('type' => $tField['totalsType'], 'fName' => $tField['fName'], 'format' => $tField['viewFormat']);
         if ($tField['totalsType'] == 'COUNT') {
             $this->outputFieldValue($tField['fName'], 1);
         } else {
             $this->outputFieldValue($tField['fName'], 2);
         }
     }
     //if scroll body of grid
     $this->jsSettings['tableSettings'][$this->tName]['scrollGridBody'] = !$this->isVerLayout && $this->isScrollGridBody;
     $this->jsSettings['tableSettings'][$this->tName]['permissions'] = $this->permis[$this->tName];
     if ($this->pSet->getAdvancedSecurityType() == ADVSECURITY_EDIT_OWN) {
         $this->jsSettings['tableSettings'][$this->tName]['isEditOwn'] = $this->permis[$this->tName];
     }
     $this->settingsMap["tableSettings"]['inlineEdit'] = array("default" => false, "jsName" => "isInlineEdit");
     $this->settingsMap["tableSettings"]['inlineAdd'] = array("default" => false, "jsName" => "isInlineAdd");
     $this->settingsMap["tableSettings"]['copy'] = array("default" => false, "jsName" => "copy");
     $this->settingsMap["tableSettings"]['view'] = array("default" => false, "jsName" => "view");
     for ($i = 0; $i < count($this->listFields); $i++) {
         $this->jsSettings['tableSettings'][$this->tName]['listFields'][] = $this->listFields[$i]['fName'];
         // call addGoogleMapData before call  proccessRecordValue!!!
         if ($this->listFields[$i]['viewFormat'] == FORMAT_MAP) {
             $this->gMapFields[] = $i;
         }
     }
     $this->orderClause = new OrderClause($this);
     $this->orderClause->moveNext = $this->moveNext;
 }
Ejemplo n.º 20
0
 /**
  * @constructor
  */
 function SearchPage(&$params)
 {
     parent::RunnerPage($params);
     $this->formBricks["header"] = "searchheader";
     $this->formBricks["footer"] = "searchbuttons";
 }
Ejemplo n.º 21
0
 function EditPage(&$params)
 {
     parent::RunnerPage($params);
     $this->editFields = $this->getFieldsByPageType();
 }
Ejemplo n.º 22
0
 /**
  * @constructor
  */
 function AddPage(&$params)
 {
     parent::RunnerPage($params);
     $this->addFields = $this->getPageFields();
     $this->auditObj = GetAuditObject($this->tName);
     $this->formBricks["header"] = "addheader";
     $this->formBricks["footer"] = "addbuttons";
     $this->assignFormFooterAndHeaderBricks(true);
 }
Ejemplo n.º 23
0
 function AddPage(&$params)
 {
     parent::RunnerPage($params);
 }
Ejemplo n.º 24
0
 /**
  * @constructor
  */
 function ChartPage(&$params = "")
 {
     parent::RunnerPage($params);
     $this->jsSettings['tableSettings'][$this->tName]['simpleSearchActive'] = $this->searchClauseObj->simpleSearchActive;
 }
Ejemplo n.º 25
0
 function EditPage(&$params)
 {
     parent::RunnerPage($params);
 }
Ejemplo n.º 26
0
 function ViewPage(&$params)
 {
     parent::RunnerPage($params);
 }
Ejemplo n.º 27
0
 function LoginPage(&$params)
 {
     // call parent constructor
     parent::RunnerPage($params);
     $this->auditObj = GetAuditObject();
 }