Example #1
0
 public function indexAction()
 {
     $currency = new Application_Model_DbTable_Currency();
     $information = $currency->fetchIdCurrency();
     foreach ($information as $value) {
         $id_of_currency[$value['id']] = $value['id'];
     }
     $this->view->id_of_currency = $id_of_currency;
     var_dump($id_of_currency);
     die;
     //$rate= new Application_Model_DbTable_Rate()
     //$rate->currencyInfoRate($date,$sell,$buy,$currency_id);
     //var_dump($rates);
 }
Example #2
0
 public function init()
 {
     $this->setName('curencyInfo')->setMethod('post')->setAction('currencyinfo/getcontent');
     // $id = new Zend_Form_Element_Hidden('currency_id');
     //$id->addFilter('Int');
     $currencyModel = new Application_Model_DbTable_Currency();
     $currencies = $currencyModel->fetchCurrency();
     $select = new Zend_Form_Element_Select('currency_id');
     $select->setLabel('Currency');
     foreach ($currencies as $currecy) {
         $select->addMultiOption($currecy['id'], $currecy['name']);
     }
     $fromDate = new Zend_Form_Element_Text('fromDate');
     $fromDate->setLabel('From:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
     $fromDate->setAttrib('id', 'fromDate');
     $toDate = new Zend_Form_Element_Text('toDate');
     $toDate->setLabel('To:')->addValidator('NotEmpty')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim');
     $toDate->setAttrib('id', 'toDate');
     //$date= new Zend_Form_Element_Date('date of transaction');
     // $date->setLabel('Choose date:');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel('GO')->setRequired(true);
     $this->addElements(array($select, $fromDate, $toDate, $submit));
 }