/**
  * Add common assign for simple mode on list page
  */
 function commonAssign()
 {
     parent::commonAssign();
     if ($this->isDispGrid()) {
         $this->xt->assign_section("grid_block", '', '');
     }
 }
Example #2
0
 /**
  * Add common assign for simple mode on list page
  */
 function commonAssign()
 {
     parent::commonAssign();
     //search permissions
     $searchPermis = $this->permis[$this->tName]['search'];
     //export permissions
     $exportPermis = $this->permis[$this->tName]['export'];
     //add edit delete print export links
     $this->xt->assign("record_controls_block", $this->permis[$this->tName]['export'] || $this->permis[$this->tName]['add'] || $this->permis[$this->tName]['delete'] || $this->permis[$this->tName]['edit']);
     // adds style displat none to hiderecord controls, edit selected, delete selected, export selected and print selected if found 0 recs
     $this->xt->assign("details_block", $searchPermis && $this->rowsFound);
     if ($searchPermis && count($this->arrRecsPerPage) && ($this->rowsFound || $this->listAjax == LIST_AJAX)) {
         $this->xt->assign("recordspp_block", true);
         $this->createPerPage();
     }
     $this->xt->assign("pages_block", $searchPermis && $this->rowsFound);
     $this->xt->assign("pages_attrs", "id=\"pageOf" . $this->id . "\" name=\"pageOf" . $this->id . "\"");
     $this->xt->assign("shiftstyle_block", true);
     $this->xt->assign("left_block", true);
     //$this->xt->assign("toplinks_block", true);
     //export selected link and attr
     $this->xt->assign("exportselected_link", $exportPermis);
     $this->xt->assign("exportselectedlink_span", $this->buttonShowHideStyle());
     $this->xt->assign("exportselectedlink_attrs", $this->getPrintExportLinkAttrs('export'));
     // print links and attrs
     $this->xt->assign("prints_block", $exportPermis);
     $this->xt->assign("print_link", $exportPermis);
     $this->xt->assign("printlink_attrs", "id='print_" . $this->id . "' name='print_" . $this->id . "'");
     //print selected link and attr
     $this->xt->assign("printselected_link", $exportPermis);
     $this->xt->assign("printselectedlink_attrs", $this->getPrintExportLinkAttrs('print'));
     $this->xt->assign("printselectedlink_span", $this->buttonShowHideStyle());
     //print all link and attr
     $this->xt->assign("printall_link", $exportPermis);
     $this->xt->assign("printalllink_attrs", "id='printAll_" . $this->id . "' name='printAll_" . $this->id . "'");
     //export link and attr
     $this->xt->assign("export_link", $exportPermis);
     $this->xt->assign("exportlink_attrs", "id = 'export_" . $this->id . "'\r\n\t\t\t\t\t\t   name = 'export_" . $this->id . "'\r\n\t\t\t\t\t\t   onclick=\"window.open(this.href,'wExport');return false;\"");
     //add link and attr
     $this->xt->assign("add_link", $this->permis[$this->tName]['add']);
     $this->xt->assign("addlink_attrs", "href='" . $this->shortTableName . "_add.php' id=\"addButton" . $this->id . "\"");
     //advanced search and attr
     $this->xt->assign("advsearchlink_attrs", "id=\"advButton" . $this->id . "\"");
     //select all link and attr
     $this->selectAllLinkAttrs();
     //edit selected link and attr
     $this->editSelectedLinkAttrs();
     //save all link, attr, span
     $this->saveAllLinkAttrs();
     //cansel all link, attr, span
     $this->cancelAllLinkAttrs();
     $this->xt->assign("grid_block", true);
     $this->xt->assign('menu_block', $this->isShowMenu() || $this->isAdminTable());
     $this->xt->assign("languages_block", true);
     if (isMobile()) {
         $this->xt->assign('morelinkmobile_block', true);
         $this->xt->assign('tableinfomobile_block', true);
         $this->xt->displayBrickHidden("vmsearch2");
     }
 }
 /**
  * Add common assign for simple mode on list page
  */
 function commonAssign()
 {
     parent::commonAssign();
     if ($this->isDispGrid()) {
         $this->xt->assign_section("grid_block", '', '');
         if (!$this->rowsFound) {
             $this->xt->displayBrickHidden("grid");
         }
     }
 }
Example #4
0
 function commonAssign()
 {
     $this->xt->assign_loopsection("groups", $this->smartyGroups);
     parent::commonAssign();
     // assign headcheckboxes
     $this->xt->assign("add_headcheckbox", "id=\"cbadd\"");
     $this->xt->assign("edt_headcheckbox", "id=\"cbedt\"");
     $this->xt->assign("del_headcheckbox", "id=\"cbdel\"");
     $this->xt->assign("lst_headcheckbox", "id=\"cblst\"");
     $this->xt->assign("exp_headcheckbox", "id=\"cbexp\"");
     $this->xt->assign("imp_headcheckbox", "id=\"cbimp\"");
     $this->xt->assign("adm_headcheckbox", "id=\"cbadm\"");
     // assign attrs
     $this->xt->assign("addgroup_attrs", "id=\"addGroupBtn\"");
     $this->xt->assign("delgroup_attrs", "id=\"delGroupBtn\"");
     $this->xt->assign("rengroup_attrs", "id=\"renGroupBtn\"");
     $this->xt->assign("savegroup_attrs", "id=\"saveGroupBtn\"");
     $this->xt->assign("savebutton_attrs", "id=\"saveBtn\"");
     $this->xt->assign("resetbutton_attrs", "id=\"resetBtn\"");
     $this->xt->assign("cancelgroup_attrs", "id=\"cancelBtn\"");
     // assign blocks
     $this->xt->assign("grid_block", true);
     $this->xt->assign("menu_block", true);
     $this->xt->assign("left_block", true);
     $this->xt->assign("rights_block", true);
     $this->xt->assign("message_block", true);
     $this->xt->assign("security_block", true);
     $this->xt->assign("logoutbutton", isSingleSign());
     $this->xt->assign("shiftstyle_block", true);
     $this->xt->assign("savebuttons_block", true);
     $this->xt->assign("search_records_block", true);
     $this->xt->assign("recordcontrols_block", true);
     // assign user settings
     $this->xt->assign("username", htmlspecialchars($_SESSION["UserName"]));
     if ($this->createLoginPage) {
         $this->xt->assign("userid", htmlspecialchars($_SESSION["UserID"]));
     }
     $this->xt->displayBrickHidden("message");
 }
Example #5
0
 /**
  * Add common assign for simple mode on list page
  */
 function commonAssign()
 {
     parent::commonAssign();
     //search permissions
     $searchPermis = $this->permis[$this->tName]['search'];
     //export permissions
     $exportPermis = $this->permis[$this->tName]['export'];
     $allowRecordControls = false;
     if ($this->permis[$this->tName]['export'] && ($this->pSet->hasExportPage() || $this->pSet->hasPrintPage()) || $this->permis[$this->tName]['delete'] && $this->pSet->hasDelete() || $this->permis[$this->tName]['edit'] && ($this->pSet->hasInlineEdit() || $this->pSet->hasEditPage()) || $this->permis[$this->tName]['add'] && $this->pSet->hasInlineAdd()) {
         $allowRecordControls = true;
     }
     //add edit delete print export links
     $this->xt->assign("record_controls_block", $allowRecordControls);
     // adds style displat none to hiderecord controls, edit selected, delete selected, export selected and print selected if found 0 recs
     $this->xt->assign("details_block", $searchPermis);
     if (!$this->rowsFound) {
         $this->xt->displayBrickHidden("details_found");
         $this->xt->displayBrickHidden("vdetails_found");
     }
     if ($searchPermis && count($this->arrRecsPerPage)) {
         $this->xt->assign("recordspp_block", true);
         $this->createPerPage();
         if (!$this->rowsFound) {
             $this->xt->displayBrickHidden("recsperpage");
             $this->xt->displayBrickHidden("vrecsperpage");
         }
     }
     $this->xt->assign("pages_block", $searchPermis);
     if (!$this->rowsFound) {
         $this->xt->displayBrickHidden("page_of");
         $this->xt->displayBrickHidden("vpage_of");
     }
     $this->xt->assign("pages_attrs", "id=\"pageOf" . $this->id . "\" name=\"pageOf" . $this->id . "\"");
     $this->xt->assign("left_block", true);
     //$this->xt->assign("toplinks_block", true);
     $advSearchPargeFields = $this->pSetEdit->getAdvSearchFields();
     $this->xt->assign("moreButtons", $exportPermis && ($this->pSet->hasExportPage() || $this->pSet->hasPrintPage()) || $this->permis[$this->tName]['import'] && $this->pSet->hasImportPage() || $searchPermis && count($advSearchPargeFields) > 0);
     $this->xt->assign("widhtSelected", $exportPermis || $this->permis[$this->tName]['edit'] || $this->permis[$this->tName]['delete']);
     //export selected link and attr
     $this->xt->assign("exportselected_link", $exportPermis);
     $this->xt->assign("exportselectedlink_span", $this->buttonShowHideStyle());
     $this->xt->assign("exportselectedlink_attrs", $this->getPrintExportLinkAttrs('export'));
     // print links and attrs
     $this->xt->assign("prints_block", $exportPermis && $this->rowsFound);
     $this->xt->assign("print_link", $exportPermis && $this->rowsFound);
     $this->xt->assign("printlink_attrs", "id='print_" . $this->id . "' name='print_" . $this->id . "'");
     //print selected link and attr
     $this->xt->assign("printselected_link", $exportPermis && $this->rowsFound);
     $this->xt->assign("printselectedlink_attrs", $this->getPrintExportLinkAttrs('print'));
     $this->xt->assign("printselectedlink_span", $this->buttonShowHideStyle());
     //print all link and attr
     $this->xt->assign("printall_link", $exportPermis && $this->numRowsFromSQL > $this->pageSize && $this->pageSize > 0);
     $this->xt->assign("printalllink_attrs", "id='printAll_" . $this->id . "' name='printAll_" . $this->id . "'");
     //export link and attr
     $this->xt->assign("export_link", $exportPermis);
     $this->xt->assign("exportlink_attrs", "id = 'export_" . $this->id . "'\n\t\t\t\t\t\t   name = 'export_" . $this->id . "'\n\t\t\t\t\t\t   onclick=\"window.open(this.href,'wExport');return false;\"");
     //add link and attr
     $this->xt->assign("add_link", $this->permis[$this->tName]['add']);
     $this->xt->assign("addlink_attrs", "href='" . GetTableLink($this->shortTableName, "add") . "' id=\"addButton" . $this->id . "\"");
     //advanced search and attr
     $this->xt->assign("advsearchlink_attrs", "id=\"advButton" . $this->id . "\"");
     //select all link and attr
     $this->selectAllLinkAttrs();
     //edit selected link and attr
     $this->editSelectedLinkAttrs();
     //save all link, attr, span
     $this->saveAllLinkAttrs();
     //cansel all link, attr, span
     $this->cancelAllLinkAttrs();
     if ($this->numRowsFromSQL == 0) {
         $this->xt->displayBrickHidden("recordcontrol");
     }
     $this->xt->assign("grid_block", true);
     $this->xt->assign('menu_block', $this->isShowMenu() || $this->isAdminTable());
     $this->xt->assign("languages_block", true);
     if (isMobile()) {
         $this->xt->assign('morelinkmobile_block', true);
         $this->xt->assign('tableinfomobile_block', true);
         $this->xt->displayBrickHidden("vmsearch2");
     }
 }
Example #6
0
 function commonAssign()
 {
     $this->xt->assign_loopsection("groups", $this->smartyGroups);
     parent::commonAssign();
     // assign headcheckboxes
     foreach ($this->permissionNames as $perm => $t) {
         $this->xt->assign($perm . "_headcheckbox", " id=\"colbox" . $perm . "\" data-perm=\"" . $perm . "\"");
     }
     // assign attrs
     $this->xt->assign("addgroup_attrs", "id=\"addGroupBtn\"");
     $this->xt->assign("delgroup_attrs", "id=\"delGroupBtn\"");
     $this->xt->assign("rengroup_attrs", "id=\"renGroupBtn\"");
     $this->xt->assign("savegroup_attrs", "id=\"saveGroupBtn\"");
     $this->xt->assign("savebutton_attrs", "id=\"saveBtn\"");
     $this->xt->assign("resetbutton_attrs", "id=\"resetBtn\"");
     $this->xt->assign("cancelgroup_attrs", "id=\"cancelBtn\"");
     // assign blocks
     $this->xt->assign("grid_block", true);
     $this->xt->assign("menu_block", true);
     $this->xt->assign("left_block", true);
     $this->xt->assign("rights_block", true);
     $this->xt->assign("message_block", true);
     $this->xt->assign("security_block", true);
     $this->xt->assign("logoutbutton", isSingleSign());
     $this->xt->assign("savebuttons_block", true);
     $this->xt->assign("search_records_block", true);
     $this->xt->assign("recordcontrols_block", true);
     // assign user settings
     // The user might rewrite $_SESSION["UserName"] value with HTML code in an event, so no encoding will be performed while printing this value.
     $this->xt->assign("username", $_SESSION["UserName"]);
     if ($this->createLoginPage) {
         $this->xt->assign("userid", runner_htmlspecialchars($_SESSION["UserID"]));
     }
     $this->xt->displayBrickHidden("message");
 }