| Server IP : 213.186.33.2 / Your IP : 216.73.216.39 Web Server : Apache System : Linux webm005.cluster102.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : symetry ( 21728) PHP Version : 8.2.31 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/symetry/www/ARCHIVES/application/models/ |
Upload File : |
<?php
class FormProjects extends Zend_Form
{
public function __construct($options = null)
{
parent::__construct($options);
$this->setName('project');
$pro_id = new Zend_Form_Element_Hidden('pro_id');
$pro_name = new Zend_Form_Element_Text('pro_name');
$pro_name->setLabel(Zend_registry::get('translate')->_('Folder'))
->setRequired(true)
->addValidator('NotEmpty');
$pro_date = new Zend_Form_Element_Text('pro_date');
$pro_date->setLabel(Zend_registry::get('translate')->_('ProjectDate'))
->setRequired(true)
->addValidator('NotEmpty')
->addValidator('regex', true, array('/^\d{4}\D\d{2}\D\d{2}$/'))
->setValue(date('Y/m/d'));
$pro_cat_id = new Zend_Form_Element_Select('pro_cat_id');
$pro_cat_id->setLabel(Zend_registry::get('translate')->_('Category'))
->setRequired(true);
$table = new Categories();
foreach ($table->fetchAll() as $c) {
$pro_cat_id->addMultiOption($c->cat_id, $c->cat_name);
}
$pro_long_description = new Zend_Form_Element_Textarea('pro_long_description',array('rows'=>'20', 'cols'=>'75'));
$pro_long_description->setLabel(Zend_registry::get('translate')->_('LongDescription'))
->addValidator('NotEmpty', array('message' => Zend_registry::get('translate')->_('FormNotEmpty')));
$submit = new Zend_Form_Element_Submit('submit');
$submit->setAttrib('id', 'submitbutton');
$this->addElements(array($pro_id, $pro_name, $pro_date, $pro_cat_id, $pro_long_description, $submit));
}
}