示例#1
0
         default:
             JRequest::setvar('task', "products");
             $a = new products();
             $alist = $a->getAllProducts($search, $field, $order);
             display::ShowProducts($alist, $field, $order);
             break;
     }
     break;
 case "fields":
     $search = JRequest::getVar("search");
     $field = JRequest::getVar("field");
     $order = JRequest::getVar("order");
     switch ($task) {
         case "apply":
             $fields = new fields();
             $fields->savefield();
             $cid[0] = $fields->id;
         case "add":
         case "edit":
             $fields = new fields();
             $fields->getfield($cid[0]);
             display::editField($fields);
             break;
         case "save":
             $fields = new fields();
             $fields->saveField();
             $mainframe->redirect("index.php?option=com_caddy&action=fields&task=show&field={$field}&order={$order}&search={$search}", JText::_('SC_FIELDSAVED'));
             break;
         case "remove":
             $fields = new fields();
             $fields->removeFields($cid);