Example #1
0
 function ajax_callbacks($action)
 {
     global $FANNIE_OP_DB;
     switch ($action) {
         case 'getCategoryBrands':
             $this->getCategoryBrands(FormLib::get_form_Value('vid'), FormLib::get_form_value('deptID'));
             break;
         case 'showCategoryItems':
             $ret = array();
             $ret['tags'] = $this->guessSuper(FormLib::get('vid'), FormLib::get('deptID'), FormLib::get('brand'));
             $ret['items'] = $this->showCategoryItems(FormLib::get_form_value('vid'), FormLib::get_form_value('deptID'), FormLib::get_form_value('brand'), $ret['tags']);
             echo json_encode($ret);
             break;
         case 'addPosItem':
             $this->addToPos(FormLib::get_form_value('upc'), FormLib::get_form_value('vid'), FormLib::get_form_value('price'), FormLib::get_form_value('dept'), FormLib::get('tags', -1));
             break;
         default:
             echo 'bad request';
             break;
     }
 }