Ejemplo n.º 1
0
 public function setCategorySelectData($language_id = 1)
 {
     $table_category = new Model_DbTable_Category();
     $category_data = $table_category->getAllParentIdNameForSelectByLangId($language_id);
     $this->mainCategory = $this->createElement('select', 'mainCategory', $category_data);
     $this->mainCategory->removeDecorator('HtmlTag');
     $this->mainCategory->removeDecorator('DtDdWrapper');
     $this->mainCategory->removeDecorator('Label');
 }
Ejemplo n.º 2
0
 public function setCategoryParent($language_id)
 {
     $tableCategory = new Model_DbTable_Category();
     $category = $tableCategory->getAllParentIdNameForSelectByLangId($language_id, TRUE, '-');
     $this->categoryParent = $this->createElement('select', 'categoryParent', $category);
     $this->categoryParent->removeDecorator('HtmlTag');
     $this->categoryParent->removeDecorator('DtDdWrapper');
     $this->categoryParent->removeDecorator('Label');
     $this->categoryParent->setAttrib('onchange', 'recommendSize();');
 }
Ejemplo n.º 3
0
 public function getrelatedpoiAction()
 {
     $this->getResponse()->setHeader('Content-Type', 'text/xml');
     $poi_id = $this->_getparam('poiid');
     $language_id = $this->_getParam('languageId');
     if (!isset($language_id)) {
         $language_id = 1;
     }
     $table_relatedpoi = new Model_DbTable_RelatedPoi();
     $poi_list = $table_relatedpoi->getAllRelatedByPoiIdLangId($poi_id, $language_id);
     if (sizeof($poi_list) > 0) {
         $this->view->data = $poi_list;
     }
 }
 public function getRelatedArticlesAction()
 {
 }
 /**
  * IS:
  * FS:
  * Desc:
  */
 public function parentcategoryselectAction()
 {
     $language_id = 1;
 public function init()
 {
     $tableArea = new Model_DbTable_Area();
     $tableCategory = new Model_DbTable_Category();
     $this->Poi_Name = $this->createElement('text', 'PoiName');
     $this->Poi_Name->removeDecorator('HtmlTag');
     $this->Poi_Name->removeDecorator('DtDdWrapper');
     $this->Poi_Name->removeDecorator('Label');
     $this->Poi_Name->setRequired(TRUE);
     $this->Poi_Name->setAttrib('class', 'mediumele');
     $popular = array("multiOptions" => array(0 => "No", 1 => "Yes"));
     $this->Popular_Select = $this->createElement('select', 'PopularSelect', $popular);
     $this->Popular_Select->removeDecorator('HtmlTag');
     $this->Popular_Select->removeDecorator('DtDdWrapper');
     $this->Popular_Select->removeDecorator('Label');
     $this->Poi_TagLine = $this->createElement('text', 'PoiTagline');
     $this->Poi_TagLine->removeDecorator('HtmlTag');
     $this->Poi_TagLine->removeDecorator('DtDdWrapper');
     $this->Poi_TagLine->removeDecorator('Label');
     $this->Poi_TagLine->setAttrib('class', 'mediumele');
     $this->Poi_Address = $this->createElement('text', 'PoiAddress');
     $this->Poi_Address->setAttrib('class', 'tableFormInputLong');
     $this->Poi_Address->removeDecorator('HtmlTag');
     $this->Poi_Address->removeDecorator('DtDdWrapper');
     $this->Poi_Address->removeDecorator('Label');
     $this->Poi_Address->setAttrib('class', 'mediumele');
     $this->Poi_Phone = $this->createElement('text', 'PoiPhone');
     $this->Poi_Phone->removeDecorator('HtmlTag');
     $this->Poi_Phone->removeDecorator('DtDdWrapper');
     $this->Poi_Phone->removeDecorator('Label');
     $this->Poi_Phone->setAttrib('class', 'mediumele');
     $this->Poi_Website = $this->createElement('text', 'PoiWebsite');
     $this->Poi_Website->removeDecorator('HtmlTag');
     $this->Poi_Website->removeDecorator('DtDdWrapper');
     $this->Poi_Website->removeDecorator('Label');
     $this->Poi_Website->setAttrib('class', 'mediumele');
     $this->SpecialDestination = $this->createElement('checkbox', 'SpecialDestination');
     $this->SpecialDestination->removeDecorator('HtmlTag');
     $this->SpecialDestination->removeDecorator('DtDdWrapper');
     $this->SpecialDestination->removeDecorator('Label');
     $this->SpecialDestination->setCheckedValue(1);
     $this->SpecialDestination->setUncheckedValue(0);
     $this->SpecialDestination->setAttrib('onclick', 'showHeaderImage($(this));');
     $this->HeaderImage = $this->createElement('text', 'HeaderImage');
     $this->HeaderImage->removeDecorator('HtmlTag');
     $this->HeaderImage->removeDecorator('DtDdWrapper');
     $this->HeaderImage->removeDecorator('Label');
     $this->HeaderImage->setAttrib('class', 'disabled');
     $category = $tableCategory->getAllParentIdNameForSelectByLangId(2);
     $this->Category_Select = $this->createElement('select', 'CategorySelect', $category);
     $this->Category_Select->removeDecorator('HtmlTag');
     $this->Category_Select->removeDecorator('DtDdWrapper');
     $this->Category_Select->removeDecorator('Label');
     $this->Category_Select->setAttrib('onchange', 'getChildCategoryIndo(this.value);');
     $category_child = $tableCategory->getAllChildIdNameByParentIdLangId(null, 2);
     $this->Category_Child = $this->createElement('select', 'CategoryChild', $category_child);
     $this->Category_Child->removeDecorator('HtmlTag');
     $this->Category_Child->removeDecorator('DtDdWrapper');
     $this->Category_Child->removeDecorator('Label');
     $data = $tableArea->setAreaForSelectElement(1);
     $temp = array(0 => 'select Island');
     $area_data = $temp + $data;
     $data = array("multiOptions" => $area_data);
     $this->Island_Select = $this->createElement('select', 'IslandListOptions', $data);
     $this->Island_Select->removeDecorator('HtmlTag');
     $this->Island_Select->removeDecorator('DtDdWrapper');
     $this->Island_Select->removeDecorator('Label');
     $this->Island_Select->setAttrib('onchange', 'getAreaList(this.value,0);');
     $this->Poi_x = $this->createElement('text', 'pointx');
     $this->Poi_x->removeDecorator('HtmlTag');
     $this->Poi_x->setAttrib('class', 'required');
     $this->Poi_x->removeDecorator('DtDdWrapper');
     $this->Poi_x->removeDecorator('Label');
     $this->Poi_x->setAttrib('onkeyup', 'UpdatePosition();');
     $this->Poi_x->setAttrib('class', 'smallele');
     $this->Poi_x->setRequired(TRUE);
     $this->Poi_y = $this->createElement('text', 'pointy');
     $this->Poi_y->removeDecorator('HtmlTag');
     $this->Poi_y->setAttrib('class', 'required');
     $this->Poi_y->removeDecorator('DtDdWrapper');
     $this->Poi_y->removeDecorator('Label');
     $this->Poi_y->setAttrib('onkeyup', 'UpdatePosition();');
     $this->Poi_y->setAttrib('class', 'smallele');
     $this->Poi_y->setRequired(TRUE);
     $this->Poi_Information = $this->createElement('textarea', 'PoiInformation');
     $this->Poi_Information->removeDecorator('HtmlTag');
     $this->Poi_Information->removeDecorator('DtDdWrapper');
     $this->Poi_Information->removeDecorator('Label');
     $this->Poi_Information->setAttribs(array('cols' => 5, 'rows' => 5));
     $this->Poi_HowToGetThere = $this->createElement('textarea', 'PoiHowToGetThere');
     $this->Poi_HowToGetThere->removeDecorator('HtmlTag');
     $this->Poi_HowToGetThere->removeDecorator('DtDdWrapper');
     $this->Poi_HowToGetThere->removeDecorator('Label');
     $this->Poi_HowToGetAround = $this->createElement('textarea', 'PoiHowToGetAround');
     $this->Poi_HowToGetAround->removeDecorator('HtmlTag');
     $this->Poi_HowToGetAround->removeDecorator('DtDdWrapper');
     $this->Poi_HowToGetAround->removeDecorator('Label');
     $this->Poi_WhatToDo = $this->createElement('textarea', 'PoiWhatToDo');
     $this->Poi_WhatToDo->removeDecorator('HtmlTag');
     $this->Poi_WhatToDo->removeDecorator('DtDdWrapper');
     $this->Poi_WhatToDo->removeDecorator('Label');
     $this->Poi_WhereToEat = $this->createElement('textarea', 'PoiWhereToEat');
     $this->Poi_WhereToEat->removeDecorator('HtmlTag');
     $this->Poi_WhereToEat->removeDecorator('DtDdWrapper');
     $this->Poi_WhereToEat->removeDecorator('Label');
     $this->Poi_WhereToStay = $this->createElement('textarea', 'PoiWhereToStay');
     $this->Poi_WhereToStay->removeDecorator('HtmlTag');
     $this->Poi_WhereToStay->removeDecorator('DtDdWrapper');
     $this->Poi_WhereToStay->removeDecorator('Label');
     $this->Poi_WhatToBuy = $this->createElement('textarea', 'PoiWhatToBuy');
     $this->Poi_WhatToBuy->removeDecorator('HtmlTag');
     $this->Poi_WhatToBuy->removeDecorator('DtDdWrapper');
     $this->Poi_WhatToBuy->removeDecorator('Label');
     $this->Poi_Tips = $this->createElement('textarea', 'PoiTips');
     $this->Poi_Tips->removeDecorator('HtmlTag');
     $this->Poi_Tips->removeDecorator('DtDdWrapper');
     $this->Poi_Tips->removeDecorator('Label');
     /*hidden element*/
     $this->relPoi_counter = $this->createElement('hidden', 'relPoi_counter');
     $this->relPoi_counter->removeDecorator('HtmlTag');
     $this->relPoi_counter->removeDecorator('DtDdWrapper');
     $this->relPoi_counter->removeDecorator('Label');
     $this->relPoi_counter->setValue(0);
     $this->SaveStatus = $this->createElement('hidden', 'SaveStatus');
     $this->SaveStatus->removeDecorator('HtmlTag');
     $this->SaveStatus->removeDecorator('DtDdWrapper');
     $this->SaveStatus->removeDecorator('Label');
     $this->SaveStatus->setValue(1);
     /**
      * This element will be used for maximum area counter storage, 
      * when you remove an area this counter number wont be decreased
      */
     $this->Count_area = $this->createElement('hidden', 'MaxArea');
     $this->Count_area->removeDecorator('HtmlTag');
     $this->Count_area->removeDecorator('DtDdWrapper');
     $this->Count_area->removeDecorator('Label');
     $this->Count_area->setValue(0);
     /**
      * This element will be used for maximum category counter storage, 
      * when you remove a category this counter number wont be decreased
      */
     $this->Count_category = $this->createElement('hidden', 'MaxCategory');
     $this->Count_category->removeDecorator('HtmlTag');
     $this->Count_category->removeDecorator('DtDdWrapper');
     $this->Count_category->removeDecorator('Label');
     $this->Count_category->setValue(0);
     $this->Area_counter = $this->createElement('hidden', 'AreaCounter');
     $this->Area_counter->removeDecorator('HtmlTag');
     $this->Area_counter->removeDecorator('DtDdWrapper');
     $this->Area_counter->removeDecorator('Label');
     $this->Area_counter->setValue(0);
     $this->Category_counter = $this->createElement('hidden', 'CategoryCounter');
     $this->Category_counter->removeDecorator('HtmlTag');
     $this->Category_counter->removeDecorator('DtDdWrapper');
     $this->Category_counter->removeDecorator('Label');
     $this->Category_counter->setValue(0);
     $this->Main_category = $this->createElement('hidden', 'MainCategory');
     $this->Main_category->removeDecorator('HtmlTag');
     $this->Main_category->removeDecorator('DtDdWrapper');
     $this->Main_category->removeDecorator('Label');
     $this->Main_category->setValue(0);
 }
Ejemplo n.º 5
0
 public function init()
 {
     $tableArea = new Model_DbTable_Area();
     $tableCategory = new Model_DbTable_Category();
     $dateValidator = new Zend_Validate_Date();
     $this->name = new Zend_Form_Element_Text('Name');
     $this->name->setRequired(true)->setAttrib('class', 'span7')->setAttrib('placeholder', 'Masukan Nama Kebudayaan Disini...')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->removeDecorator('Label');
     $this->featured = new Zend_Form_Element_Checkbox('Featured');
     $this->featured->setAttrib('class', 'checkbox')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->removeDecorator('Label');
     $this->description = new Zend_Form_Element_Textarea('Description');
     $this->description->setAttrib('style', 'width:100%')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->removeDecorator('Label');
     $this->header_image = new Zend_Form_Element_File('Header_image');
     $this->header_image->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->removeDecorator('Label');
     $this->submit = new Zend_Form_Element_Submit('Submit');
     $this->submit->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->removeDecorator('Label')->setAttribs(array('class' => 'btn btn-success', 'id' => 'submit-btn'));
     $this->draft = new Zend_Form_Element_Submit('Draft');
     $this->draft->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->removeDecorator('Label')->setAttribs(array('class' => 'btn', 'id' => 'draft-btn'));
     $this->videos = new Zend_Form_SubForm();
     $category = $tableCategory->getAllParentIdNameForSelectByLangId(1);
     $this->Category_Select = $this->createElement('select', 'CategorySelect', $category);
     $this->Category_Select->removeDecorator('HtmlTag');
     $this->Category_Select->removeDecorator('DtDdWrapper');
     $this->Category_Select->removeDecorator('Label');
     $this->Category_Select->setAttrib('onchange', 'getChildCategory(this.value);');
     $category_child = $tableCategory->getAllChildIdNameByParentIdLangId();
     $this->Category_Child = $this->createElement('select', 'CategoryChild', $category_child);
     $this->Category_Child->removeDecorator('HtmlTag');
     $this->Category_Child->removeDecorator('DtDdWrapper');
     $this->Category_Child->removeDecorator('Label');
     $data = $tableArea->setAreaForSelectElement(1);
     $temp = array(0 => 'Pilih Area');
     $area_data = $temp + $data;
     $data = array("multiOptions" => $area_data);
     $this->Island_Select = $this->createElement('select', 'IslandListOptions', $data);
     $this->Island_Select->removeDecorator('HtmlTag');
     $this->Island_Select->removeDecorator('DtDdWrapper');
     $this->Island_Select->removeDecorator('Label');
     $this->Island_Select->setAttrib('onchange', 'getAreaList(this.value,0);');
     $this->Poi_x = $this->createElement('hidden', 'pointx');
     $this->Poi_x->removeDecorator('HtmlTag');
     $this->Poi_x->setAttrib('class', 'required');
     $this->Poi_x->removeDecorator('DtDdWrapper');
     $this->Poi_x->removeDecorator('Label');
     $this->Poi_x->setAttrib('onkeyup', 'updatePosition();');
     $this->Poi_x->setAttrib('class', 'smallele');
     $this->Poi_x->setRequired(TRUE);
     $this->Poi_y = $this->createElement('hidden', 'pointy');
     $this->Poi_y->removeDecorator('HtmlTag');
     $this->Poi_y->setAttrib('class', 'required');
     $this->Poi_y->removeDecorator('DtDdWrapper');
     $this->Poi_y->removeDecorator('Label');
     $this->Poi_y->setAttrib('onkeyup', 'updatePosition();');
     $this->Poi_y->setAttrib('class', 'smallele');
     $this->Poi_y->setRequired(TRUE);
     /* hidden element */
     $this->relPoi_counter = $this->createElement('hidden', 'relPoi_counter');
     $this->relPoi_counter->removeDecorator('HtmlTag');
     $this->relPoi_counter->removeDecorator('DtDdWrapper');
     $this->relPoi_counter->removeDecorator('Label');
     $this->relPoi_counter->setValue(0);
     $this->SaveStatus = $this->createElement('hidden', 'SaveStatus');
     $this->SaveStatus->removeDecorator('HtmlTag');
     $this->SaveStatus->removeDecorator('DtDdWrapper');
     $this->SaveStatus->removeDecorator('Label');
     $this->SaveStatus->setValue(1);
     /**
      * This element will be used for maximum area counter storage, 
      * when you remove an area this counter number wont be decreased
      */
     $this->Count_area = $this->createElement('hidden', 'MaxArea');
     $this->Count_area->removeDecorator('HtmlTag');
     $this->Count_area->removeDecorator('DtDdWrapper');
     $this->Count_area->removeDecorator('Label');
     $this->Count_area->setValue(0);
     /**
      * This element will be used for maximum category counter storage, 
      * when you remove a category this counter number wont be decreased
      */
     $this->Count_category = $this->createElement('hidden', 'MaxCategory');
     $this->Count_category->removeDecorator('HtmlTag');
     $this->Count_category->removeDecorator('DtDdWrapper');
     $this->Count_category->removeDecorator('Label');
     $this->Count_category->setValue(0);
     $this->Area_counter = $this->createElement('hidden', 'AreaCounter');
     $this->Area_counter->removeDecorator('HtmlTag');
     $this->Area_counter->removeDecorator('DtDdWrapper');
     $this->Area_counter->removeDecorator('Label');
     $this->Area_counter->setValue(0);
     $this->Category_counter = $this->createElement('hidden', 'CategoryCounter');
     $this->Category_counter->removeDecorator('HtmlTag');
     $this->Category_counter->removeDecorator('DtDdWrapper');
     $this->Category_counter->removeDecorator('Label');
     $this->Category_counter->setValue(0);
     $this->Main_category = $this->createElement('hidden', 'MainCategory');
     $this->Main_category->removeDecorator('HtmlTag');
     $this->Main_category->removeDecorator('DtDdWrapper');
     $this->Main_category->removeDecorator('Label');
     $this->Main_category->setValue(0);
 }