Example #1
0
         echo "<log_user>{$log_user}</log_user>\n";
         echo "<log_msg>{$log_msg}</log_msg>\n";
         echo "<showlog>{$showlog}</showlog>\n";
         echo "<newstatus>{$retstatus}</newstatus>\n";
         echo "<order_id>{$order_id}</order_id>\n";
         echo "</info>\n";
         break;
     }
     break;
 case 'toggle':
     switch ($_GET['component']) {
         case 'product':
             USES_paypal_class_product();
             switch ($_GET['type']) {
                 case 'enabled':
                     $newval = Product::toggleEnabled($_REQUEST['oldval'], $_REQUEST['id']);
                     break;
                 case 'featured':
                     $newval = Product::toggleFeatured($_REQUEST['oldval'], $_REQUEST['id']);
                     break;
                 default:
                     exit;
             }
             $img_url = PAYPAL_URL . '/images/';
             $img_url .= $newval == 1 ? 'on.png' : 'off.png';
             header('Content-Type: text/xml');
             header("Cache-Control: no-cache, must-revalidate");
             //A date in the past
             header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
             echo '<?xml version="1.0" encoding="ISO-8859-1"?>
     <info>' . "\n";