Ejemplo n.º 1
0
     if (!$task) {
         $task = "show";
     }
     // make sure we have a task value here
     $c = new $action();
     $c->{$task}();
     // execute the task
     $c->redirect();
     // redirect if set in the class
     break;
 case "shipping":
     switch ($task) {
         case 'save':
             JRequest::setvar('task', "shipping");
             //shipping::doViewShippingZones();
             $msg = shipping::saveShipping();
             $mainframe->redirect("index.php?option=com_caddy&action=shipping&task=show", $msg);
             break;
         case 'add':
         case 'edit':
             $row = shipping::prepareEditShipping($cid);
             shipping_HTML::editShipping($row);
             break;
         case 'remove':
             JRequest::setvar('task', "shipping");
             shipping::doViewShippingZones(shipping::deleteZone($cid));
             break;
         case 'show':
         default:
             JRequest::setvar('task', "shipping");
             shipping::doViewShippingZones();