| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/ptcfinance/application/modules/admin/forms/ |
Upload File : |
<?php
class Admin_Form_Editpage extends Zend_Form
{
public function __construct($params = null)
{
$cms = new Admin_Model_Cms();
//echo "<pre>";print_r($cms);die;
$content_menu_list_arr = $cms->getHierarchyMenuTypeList($type='content_menu');
$content_menu_list = $cms->getTiledMenuAndSubMenu($content_menu_list_arr);
// echo "<pre>";print_r($content_menu_list);die;
/************ Page Id *****************/
$id = $this->createElement('hidden','id',
array(
'value' => '',
'class' => 'input-xlarge',
'id' => 'id',
'required'=>false,
'filters' => array('StringTrim'),
//'validators' => array(array('StringLength', false, array(3, 100))),
))
->setErrorMessages(array('Please enter level name'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Page Name *****************/
$pageName = $this->createElement('text','pageName',
array(
'value' => trim($params['pageName']),
'class' => 'input-xlarge',
'id' => 'pageName',
'required'=>true,
'filters' => array('StringTrim'),
'validators' => array(array("Alpha", true, array("allowWhiteSpace" => true))),
))
->setErrorMessages(array('Please enter page name'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Static Title *****************/
$staticTitle = $this->createElement('text','staticTitle',
array(
'value' => trim($params['staticTitle']),
'class' => 'input-xlarge',
'id' => 'staticTitle',
'required'=>true,
'filters' => array('StringTrim'),
//'validators' => array(array("Alpha", true, array("allowWhiteSpace" => true))),
))
->setErrorMessages(array('Please enter page title'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Meta Title *****************/
$metaTitle = $this->createElement('text','metaTitle',
array(
'required' => true,
'autocomplete' => 'off',
'class' => 'input-xlarge',
'id' => 'metaTitle',
'filters' => array('StringTrim'),
))
->setErrorMessages(array('Please enter meta title'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Meta Keywords *****************/
$metaKeywords = $this->createElement('text','metaKeywords',
array(
'required' => true,
'autocomplete' => 'off',
'class' => 'input-xlarge',
'id' => 'metaKeywords',
'filters' => array('StringTrim'),
))
->setErrorMessages(array('Please enter meta keywords'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Meta Description *****************/
$metaDescription = $this->createElement('textarea','metaDescription',
array(
'required' => true,
'autocomplete' => 'off',
'class' => 'input-xlarge',
'id' => 'metaDescription',
'rows' => '5',
'filters' => array('StringTrim'),
))
->setErrorMessages(array('Please enter meta description'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Background Image *****************/
$background_image = $this->createElement('file','background_image',
array(
'required' => false,
'MaxFileSize' => 2097152,
'autocomplete' => 'off',
'class' => 'input-xlarge',
'id' => 'background_image',
'validators' => array(
array('Count', true, 1),
array('Size', true, 2097152),
array('Extension', true, 'gif,jpg,png'),
array('ImageSize', true,
array('minwidth' => 1600,
'minheight' => 248,
'maxwidth' => 1600,
'maxheight' => 248)),
)
))
->setErrorMessages(array('Please upload (gif, jpg and png) file'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Page Short description *****************/
$short_description = $this->createElement('textarea','short_description',
array(
'required' => false,
'autocomplete' => 'off',
'class' => 'fckeditor',
'id' => 'short_description',
'filters' => array('StringTrim'),
))
->setErrorMessages(array('Please enter short description'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Static Description *****************/
$staticDescription = $this->createElement('textarea','staticDescription',
array(
'required' => false,
'autocomplete' => 'off',
'class' => 'textarea-xlarge',
'id' => 'staticDescription',
'readonly' => 'readonly',
'rows' => '10',
'filters' => array('StringTrim'),
))
->setErrorMessages(array('Please enter static description'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Page description temporary *****************/
$page_description_temporary = $this->createElement('textarea','page_description_temporary',
array(
'required' => false,
'autocomplete' => 'off',
'class' => 'fckeditor',
'id' => 'page_description_temporary',
'filters' => array('StringTrim'),
))
->setErrorMessages(array('Please enter static description'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Content Template Type *****************/
$dataContentMenu = array();
$dataContentMenu[""]="--Select Status--";
$dataContentMenuArr = array('left_side_menu_and_content'=>'Layout1:Left Side Menu And Content',
'board_of_directors'=>'Layout2:Board Of Directors',
'our_team'=>'Layout3: Our Team',
'full_text_layout'=>'Layout4:Full Text Layout',
'investor_three_parts_layout'=>'Layout5: Investor Three Parts Layout',
'media_three_parts_layout'=>'Layout6: Media Three Parts Layout',
'contact_us_layout'=>'Layout7: Contact Us Layout',
'career_layout'=>'Layout8: Career Layout',
'investor_three_parts_layout2'=>'Layout9: Investor Three Parts Layout 2',
'agm_three_parts_layout'=>'Layout10: AGM Three Parts Layout'
);
$content_template_type = $this->createElement('select', 'content_template_type');
foreach ($dataContentMenuArr as $key=>$val) {
$dataContentMenu[$key] = $val;
}
$content_template_type->setRequired(true);
$content_template_type->setMultiOptions($dataContentMenu);
$content_template_type->setErrorMessages(array('Please select content menu type'));
$content_template_type->removeDecorator('label');
$content_template_type->removeDecorator('HtmlTag');
$content_template_type->class = "input-xlarge";
/************ Status *****************/
$dataStatus = array();
$dataStatus[""]="--Select Status--";
$dataMenuarr = array('Activate'=>'Activate','Deactivate'=>'Deactivate');
$status = $this->createElement('select', 'status');
foreach ($dataMenuarr as $key=>$val) {
$dataStatus[$key] = $val;
}
$status->setRequired(true);
$status->setMultiOptions($dataStatus);
$status->setErrorMessages(array('Please select status'));
$status->removeDecorator('label');
$status->removeDecorator('HtmlTag');
$status->class = "input-xlarge";
$this->addElements(array(
$id,
$pageName,
$staticTitle,
$metaTitle,
$metaKeywords,
$metaDescription,
$background_image,
$short_description,
$staticDescription,
$page_description_temporary,
$content_template_type,
$status
));
}
}