Ejemplo n.º 1
0
 /**
  * change the langs from change lang form
  * full post request
  *
  */
 function changeLangs()
 {
     if ($this->request('lang_id')) {
         $langs = model_core_table::getInstance('langvalues')->getItem($this->request('lang_id'));
         $langs->lnv_lang = $this->request('nl');
         $rows = model_core_table::getInstance('langvalues')->updateItem($langs);
         if ($rows) {
             echo 'RADLangList.message("' . $this->lang('-saved') . '");';
             echo 'RADLangList.refresh()';
         } else {
             echo 'RADLangList.message("' . $this->lang('-notsaved') . '");';
         }
     } else {
         $this->securityHoleAlert(__FILE__, __LINE__, $this->getClassName());
     }
 }
Ejemplo n.º 2
0
 function newOrdering()
 {
     if ($this->request('hash') == $this->hash()) {
         $new_ordering = (int) $this->request('no');
         $cat_id = (int) $this->request('c');
         if ($cat_id) {
             $product = model_core_table::getInstance('catalog', 'corecatalog')->getItem($cat_id);
             $product->cat_position = $new_ordering;
             $rows = model_core_table::getInstance('catalog', 'corecatalog')->updateItem($product);
             echo 'RADCatalogList.message("' . $this->lang('-saved') . '");';
             echo 'RADCatalogList.refresh();';
         } else {
             $this->securityHoleAlert(__FILE__, __LINE__, $this->getClassName());
         }
     } else {
         $this->securityHoleAlert(__FILE__, __LINE__, $this->getClassName());
     }
 }
Ejemplo n.º 3
0
 function getProductsWithCurrency()
 {
     $cur_id = (int) $this->request('cur_id');
     if ($cur_id) {
         $model = model_core_table::getInstance('catalog', 'corecatalog');
         $model->setState('select', 'count(*)');
         $model->setState('where', 'cat_currency_id=' . $cur_id);
         $cnt = (int) $model->getItem();
         echo $cnt;
     } else {
         $this->securityHoleAlert(__FILE__, __LINE__, $this->getClassName());
         echo 'RADCurrency.message("' . $this->lang('-error') . '");';
     }
 }