Example #1
0
 protected function DefineBlocks($tpl)
 {
     parent::DefineBlocks($tpl);
     $tpl->DefineBlock("COLUMNBLOCK");
     $tpl->DefineBlock("FIELDSLINKED");
     $tpl->DefineBlock("LINKBR");
     $tpl->DefineBlock("LINK");
     $tpl->DefineBlock("TEXT");
     $tpl->DefineBlock("PAGELINK");
     $tpl->DefineBlock("PAGELIST");
     $tpl->DefineBlock("PAGETEXT");
 }
Example #2
0
 public function render()
 {
     parent::render();
     if ($this->dataValue) {
         $x1 = $this->area->x;
         $y1 = $this->area->y;
         $x2 = $this->area->x + $this->area->w;
         $y2 = $this->area->y + $this->area->h;
         $this->setPageForRendering();
         $this->context->mpdf->Line($x1, $y1, $x2, $y2);
         $this->context->mpdf->Line($x1, $y2, $x2, $y1);
         $this->setLastPage();
     }
 }
Example #3
0
 public function render()
 {
     parent::render();
     if (!$this->dataValue) {
         return;
     }
     $this->setPageForRendering();
     if ($this->style->fontSize && $this->style->fontSize != $this->context->fontSize) {
         $this->context->fontSize = $this->style->fontSize;
         $this->context->mpdf->SetFontSize($this->context->fontSize);
     }
     $this->context->mpdf->WriteText($this->area->x, $this->area->y, $this->dataValue);
     $this->setLastPage();
 }
 public function render()
 {
     parent::render();
     array_push(self::$specItems, $this->dataValue);
 }
Example #5
0
 protected function DefineBlocks($tpl)
 {
     parent::DefineBlocks($tpl);
     $tpl->DefineBlock("VALIDATION");
     $tpl->DefineBlock("UNITBLOCK");
 }
Example #6
0
 public function savefiltersAction()
 {
     $auth = Zend_Auth::getInstance();
     $lic = $_REQUEST['lic'];
     if ($lic != $_SESSION['OPENZISKEYHOLE']) {
         $this->view->msg = 'Not Ajax Request';
         $this->_forward('error', 'error');
     } else {
         if ($auth->hasIdentity()) {
             if (!$this->getRequest()->isXmlHttpRequest()) {
                 $this->view->msg = 'Not Ajax Request';
                 $this->_forward('error', 'error');
             } else {
                 $filterChain = new Zend_Filter();
                 $filterChain->addFilter(new Zend_Filter_StripTags())->addFilter(new Zend_Filter_Digits());
                 $filterChain2 = new Zend_Filter();
                 $filterChain2->addFilter(new Zend_Filter_StripTags());
                 $agentId = $filterChain->filter($_REQUEST['agent_id']);
                 $zoneId = $filterChain->filter($_REQUEST['zone_id']);
                 $contextId = $filterChain->filter($_REQUEST['context_id']);
                 $filteredElementsString = $filterChain2->filter($_REQUEST['filtered_elements']);
                 DataElement::ClearFilters($agentId, $zoneId, $contextId);
                 $elementIdHash = explode("|", $filteredElementsString);
                 foreach ($elementIdHash as $idHash) {
                     $idArray = explode("_", $idHash);
                     $element_id = $idArray[0];
                     if (count($idArray) == 3) {
                         $object_id = $idArray[2];
                         $parentElementId = $idArray[1];
                         DataElement::saveFilteredChildElement($object_id, $parentElementId, $element_id, $agentId, $zoneId, $contextId);
                     } else {
                         $object_id = $idArray[1];
                         if ($object_id != null && $element_id != null) {
                             DataElement::saveFilteredElement($object_id, $element_id, $agentId, $zoneId, $contextId);
                         }
                     }
                 }
                 $this->render('ajaxsuccessjson');
             }
         }
     }
 }
 function formatStatic($key)
 {
     if (!is_array($this->dictionary)) {
         /**没有静态区间标注*/
         return "";
     }
     $StaticKey = $this->getStaticKey();
     if (!array_key_exists($key, $StaticKey)) {
         throw new Exception("formatStatic StaticKey no found {$key} !");
     }
     $static = $StaticKey[$key];
     $static = parent::getFileContents($static);
     $result = "";
     foreach ($this->dictionary as $value => $note) {
         $name = $value;
         if ($this->note_type == self::NOTE_TYPE_AUTO && $key != Element::TYPE_KEY_STRING && !empty($note)) {
             $az = language_new_az($note);
             if (!empty($az) && preg_match("/^[a-zA-Z\\s]+\$/", $az)) {
                 $name = $az;
             }
         }
         $name = strtoupper($this->name . "_{$name}");
         $data = str_replace(Element::FORMAT_NOTE, $note, $static);
         $data = str_replace(Element::FORMAT_CLASS, $name, $data);
         $data = str_replace(Element::FORMAT_DATA_KEY, strval($value), $data);
         $result .= $data;
     }
     return Element::FORMAT_ENTER . $result . Element::FORMAT_ENTER;
 }