Exemplo n.º 1
0
 /**
  * Assign 'body' element
  */
 public function addCommonHtml()
 {
     // assign body begin
     $this->body["begin"] = GetBaseScriptsForPage(false);
     // assign body end
     $this->body["end"] = array();
     AssignMethod($this->body['end'], "assignBodyEnd", $this);
     $this->xt->assignbyref("body", $this->body);
 }
if ($pageObject->googleMapCfg['isUseGoogleMap'])
{
	$pageObject->initGmaps();
}

$pageObject->addCommonJs();

//fill tab groups name and sections name to controls
$pageObject->fillCntrlTabGroups();

$pageObject->jsSettings['tableSettings'][$strTableName]["prevKeys"] = $prev;
$pageObject->jsSettings['tableSettings'][$strTableName]["nextKeys"] = $next; 

if(!$inlineview)
{
	$pageObject->body["begin"].= GetBaseScriptsForPage(false);
		
	$pageObject->jsSettings['tableSettings'][$strTableName]["keys"] = $pageObject->jsKeys;
	$pageObject->jsSettings['tableSettings'][$strTableName]['keyFields'] = $pageObject->keyFields;
	
	// assign body end
	$pageObject->body['end'] = array();
	AssignMethod($pageObject->body['end'], "assignBodyEnd", $pageObject);
	
	$xt->assign("flybody", true);
	$xt->assign("body", $pageObject->body);
	$pageObject->assignFormFooterAndHeaderBricks( true );
}
else
{
	$xt->assign("footer",false);
Exemplo n.º 3
0
 /**
  *
  */
 public function doCommonAssignments()
 {
     $this->xt->assign("id", $this->id);
     //set the Search panel
     $this->xt->assign("searchPanel", true);
     if ($this->isShowMenu()) {
         $this->xt->assign("menu_block", true);
     }
     $this->xt->assign("chart_block", true);
     $this->xt->assign("asearch_link", true);
     $this->xt->assign("exportpdflink_attrs", "onclick='chart.saveAsPDF();'");
     $this->xt->assign("advsearchlink_attrs", "id=\"advButton" . $this->id . "\"");
     if (!GetChartXML($this->shortTableName)) {
         $this->xt->assign("chart_block", false);
     }
     if (($this->mode == CHART_SIMPLE || $this->mode == CHART_DASHBOARD) && $this->pSet->noRecordsOnFirstPage() && !$this->searchClauseObj->isSearchFunctionalityActivated()) {
         $this->show_message_block = true;
         $this->xt->displayBrickHidden("chart");
         $this->xt->assign("chart_block", false);
         $this->xt->assign("message_block", true);
         $this->xt->assign("message", "No se hallaron registros");
     }
     $this->assignChartElement();
     $this->body['begin'] .= GetBaseScriptsForPage($this->isDisplayLoading);
     if (!isMobile()) {
         $this->body['begin'] .= "<div id=\"search_suggest\" class=\"search_suggest\"></div>";
     }
     // assign body end
     $this->body['end'] = array();
     AssignMethod($this->body['end'], "assignBodyEnd", $this);
     $this->xt->assignbyref('body', $this->body);
 }
Exemplo n.º 4
0
$params['xt'] =& $xt;
$params['tName'] = $strTableName;
$params["pageType"] = PAGE_REGISTER;
$params["templatefile"] = "register.htm";
$params["needSearchClauseObj"] = false;
$xt->assign("closewindow_attrs", 'style="display:none" id="closeWindowRegister"');
$xt->eventsObject =& $globalEvents;
$pageObject = new RegisterPage($params);
$pageObject->init();
$isUseCaptcha = $globalEvents->existsCAPTCHA(PAGE_REGISTER);
//	Before Process event
if ($globalEvents->exists("BeforeProcessRegister")) {
    $globalEvents->BeforeProcessRegister($pageObject);
}
//Send activation link to user's email
$includes = GetBaseScriptsForPage(false);
if (@$_GET["a"] == "activate") {
    $username = base64_decode(@$_GET["u"]);
    $code = @$_GET["code"];
    if ($regCipherer->isFieldEncrypted("username")) {
        $strUsername = $regCipherer->MakeDBValue("username", $username, "", true);
    } else {
        $strUsername = make_db_value("username", $username);
    }
    $sql = "select " . $pageObject->getFieldSQLDecrypt("password") . " from " . $pageObject->connection->addTableWrappers("ConsolidatedStockEnquiry_users") . " where " . $pageObject->getFieldSQLDecrypt("username") . "=" . $strUsername;
    $qResult = $pageObject->connection->query($sql);
    $verified = false;
    if (!$qResult) {
        echo "Invalid validation code.";
        return;
    }
Exemplo n.º 5
0
 /**
  *
  */
 public function doCommonAssignments()
 {
     $this->xt->assign("id", $this->id);
     $this->xt->assign("left_block", true);
     if ($this->crossTable) {
         $this->xt->assign("cross_controls", true);
         $this->body["begin"] .= '<script type="text/javascript" src="' . GetRootPathForResources("include/crosstable.js") . '"></script>';
     }
     $this->body["begin"] .= GetBaseScriptsForPage($this->isDisplayLoading);
     if (!isMobile()) {
         $this->body["begin"] .= "<div id=\"search_suggest\" class=\"search_suggest\"></div>";
     }
     // assign body end in such way, to prevent collisions with flyId increment
     $this->body['end'] = array();
     AssignMethod($this->body['end'], "assignBodyEnd", $this);
     $this->xt->assignbyref('body', $this->body);
     if ($this->isDynamicPerm && IsAdmin()) {
         $this->xt->assign("adminarea_link", true);
         $this->xt->assign("adminarealink_attrs", "id=\"adminArea" . $this->id . "\"");
     }
     $this->xt->assign("changepwd_link", $_SESSION["AccessLevel"] != ACCESS_LEVEL_GUEST && $_SESSION["fromFacebook"] == false);
     $this->xt->assign("changepwdlink_attrs", "onclick=\"window.location.href='" . GetTableLink("changepwd") . "';return false;\"");
     //set the Search panel
     $this->xt->assign("searchPanel", true);
     if ($this->isShowMenu()) {
         $this->xt->assign("menu_block", true);
     }
     if (isMobile()) {
         $this->xt->assign('tableinfomobile_block', true);
     }
     $allow_search = true;
     $allow_export = true;
     $this->xt->assign("toplinks_block", $allow_search);
     $this->xt->assign("asearch_link", $allow_search);
     $this->xt->assign("print_link", $allow_export);
     if (!$this->crossTable) {
         $this->xt->assign("printall_link", $allow_export && $this->arrReport['countRows'] > $this->pageSize && $this->pageSize > 0);
     }
     $this->xt->assign("export_link", $allow_export);
     $this->xt->assign("printlink_attrs", "id=print_" . $this->id . " href='#'");
     $this->xt->assign("printalllink_attrs", "id=printAll_" . $this->id . " href='#'");
     $this->xt->assign("excellink_attrs", "id=export_to_excel" . $this->id . " href='#'");
     $this->xt->assign("wordlink_attrs", "id=export_to_word" . $this->id . " href='#'");
     $this->xt->assign("pdflink_attrs", "id=export_to_pdf" . $this->id . " href='#'");
     $this->xt->assign("prints_block", $allow_export && ($this->crossTable || $this->arrReport['countRows'] > 0));
     $this->xt->assign("advsearchlink_attrs", "id=\"advButton" . $this->id . "\"");
     if (!$this->crossTable && $allow_search && count($this->arrGroupsPerPage)) {
         $this->xt->assign("recordspp_block", true);
         $this->createPerPage();
     }
     $this->xt->assign("grid_block", $allow_search);
 }
Exemplo n.º 6
0
 /**
  * Add common html code for simple mode on list page
  */
 function addCommonHtml()
 {
     $this->body["begin"] .= GetBaseScriptsForPage($this->isDisplayLoading);
     //add parent common html code
     parent::addCommonHtml();
     // assign body end
     $this->body['end'] = array();
     AssignMethod($this->body['end'], "assignBodyEnd", $this);
 }
Exemplo n.º 7
0
 /**
  *
  */
 public function doCommonAssignments()
 {
     $this->body['begin'] .= GetBaseScriptsForPage(false);
     // assign body end
     $this->body['end'] = array();
     AssignMethod($this->body['end'], "assignBodyEnd", $this);
     $this->xt->assignbyref('body', $this->body);
     $this->xt->assign("grid_block", true);
     $this->xt->assign("page_number", true);
     if (!$this->splitByRecords) {
         $this->xt->assign("divideintopages_block", true);
     }
     //	display Prepare for printing or PDF buttons
     if (!$this->pdfMode && (!$this->splitByRecords || $this->pSet->isPrinterPagePDF())) {
         $this->xt->assign("printbuttons", true);
     }
 }
Exemplo n.º 8
0
 protected function assignBody()
 {
     $this->body["begin"] .= GetBaseScriptsForPage(false);
     if (!isMobile()) {
         $this->body["begin"] .= "<div id=\"search_suggest" . $this->id . "\"></div>\r\n";
     }
     $this->body['end'] = array();
     AssignMethod($this->body['end'], "assignBodyEnd", $this);
     $this->xt->assign("body", $this->body);
 }
	}
	else
	{
		$error_message .= "Number of records: ". $total_records ."<br>";
		$error_message .= "Imported: ".$goodlines."<br>";
		$error_message .= "Not imported: ";
		$error_message .= $total_records-$goodlines ."<br>";
	}	
}

// add button events if exist
$pageObject->addButtonHandlers();


$pageBegin = $pageObject->body["begin"];
$pageBegin .= GetBaseScriptsForPage(false, $additionalScripts);

$pageObject->fillSetCntrlMaps();
$pageEnd = $pageObject->body['end'];
$pageEnd .= '<script>';
$pageEnd .= "window.controlsMap = ".my_json_encode($pageObject->controlsHTMLMap).";";
$pageEnd .= "window.viewControlsMap = ".my_json_encode($pageObject->viewControlsHTMLMap).";";
$pageEnd .= "window.settings = ".my_json_encode($pageObject->jsSettings).";";
$pageEnd .= '</script>';
$pageEnd .= "<script language=\"JavaScript\" src=\"".GetRootPathForResources("include/runnerJS/RunnerAll.js")."\"></script>\r\n";

$pageObject->addCommonJs();

$pageEnd .= "<script>".$pageObject->PrepareJS()."</script>";

$pageObject->body["begin"] = $pageBegin;
Exemplo n.º 10
0
 /**
  *
  */
 public function doCommonAssignments()
 {
     $this->xt->assign("id", $this->id);
     //set the Search panel
     $this->xt->assign("searchPanel", true);
     if ($this->isShowMenu()) {
         $this->xt->assign("menu_block", true);
     }
     $this->xt->assign("chart_block", true);
     $this->xt->assign("asearch_link", true);
     $this->xt->assign("exportpdflink_attrs", "onclick='chart.saveAsPDF();'");
     $this->xt->assign("advsearchlink_attrs", "id=\"advButton" . $this->id . "\"");
     if (!GetChartXML($this->shortTableName)) {
         $this->xt->assign("chart_block", false);
     }
     if (($this->mode == CHART_SIMPLE || $this->mode == CHART_DASHBOARD) && $this->pSet->noRecordsOnFirstPage() && !$this->searchClauseObj->isSearchFunctionalityActivated()) {
         $this->show_message_block = true;
         $this->xt->displayBrickHidden("chart");
         $this->xt->assign("chart_block", false);
         $this->xt->assign("message_block", true);
         $this->xt->assign("message", "No records found");
     }
     $this->assignChartElement();
     if ($this->isDynamicPerm && IsAdmin()) {
         $this->xt->assign("adminarea_link", true);
         $this->xt->assign("adminarealink_attrs", "id=\"adminArea" . $id . "\"");
     }
     $this->xt->assign("changepwd_link", $_SESSION["AccessLevel"] != ACCESS_LEVEL_GUEST && $_SESSION["fromFacebook"] == false);
     $this->xt->assign("changepwdlink_attrs", "onclick=\"window.location.href='" . GetTableLink("changepwd") . "';return false;\"");
     $this->body['begin'] .= GetBaseScriptsForPage($this->isDisplayLoading);
     if (!isMobile()) {
         $this->body['begin'] .= "<div id=\"search_suggest\" class=\"search_suggest\"></div>";
     }
     // assign body end
     $this->body['end'] = array();
     AssignMethod($this->body['end'], "assignBodyEnd", $this);
     $this->xt->assignbyref('body', $this->body);
 }