Example #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);
 }
 function buildSearchPanel()
 {
     parent::buildSearchPanel();
     if ($this->isDisplaySearchPanel) {
         // create search panel
         $searchPanel = array();
         AssignMethod($searchPanel, "DisplaySearchPanel", $this);
         $this->srchPanelAttrs = $this->searchClauseObj->getSrchPanelAttrs();
         $this->searchOptions = $this->pSet->getSearchPanelOptions();
         $this->DisplaySearchPanel();
     }
 }
//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);
	$xt->assign("header",false);
	$xt->assign("flybody",$pageObject->body);
	$xt->assign("body",true);
	$xt->assign("pdflink_block",false);
	
	$pageObject->fillSetCntrlMaps();
}
Example #4
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);
 }
//$conn=db_connect();

include("classes/webreportpage.php");
include('include/xtempl.php');
$xt = new Xtempl();

$params = array("pageType" => "", "id" => 0);
$params['xt'] = &$xt;
$params['tName'] = "";

$pageObject = new WebreportPage($params);
$pageObject->init();
$pageObject->addCommonJs();

$bparams = array();
AssignMethod($bparams, "assignBodyEnd", $pageObject);
$xt->assign("bodyend", $bparams);

// Settings for style editor
$editmode = (@$_REQUEST["edit"] == "style");


if (!$editmode) {
// Load xml report data into array
    $rpt_array = getReportArray(postvalue("rname"));
} else
    $rpt_array = $_SESSION["webreports"];


$_SESSION["webobject"]["table_type"] = $rpt_array["table_type"];
Example #6
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);
 }
Example #7
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);
 }
Example #8
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);
     }
 }
Example #9
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);
 }
Example #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);
 }