Пример #1
0
function show_log()
{
    global $logger;
    xp($logger);
}
Пример #2
0
 public static function callapi($post_data, $call_name)
 {
     global $COMPATIBILITYLEVEL, $DEVNAME, $APPNAME, $CERTNAME, $SiteId, $eBayAPIURL;
     $ebayapiheader = array("X-EBAY-API-COMPATIBILITY-LEVEL: {$COMPATIBILITYLEVEL}", "X-EBAY-API-DEV-NAME: {$DEVNAME}", "X-EBAY-API-APP-NAME: {$APPNAME}", "X-EBAY-API-CERT-NAME: {$CERTNAME}", "X-EBAY-API-SITEID: {$SiteId}", "X-EBAY-API-CALL-NAME: " . $call_name);
     $ch = curl_init();
     $res = curl_setopt($ch, CURLOPT_URL, $eBayAPIURL);
     curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
     curl_setopt($ch, CURLOPT_HEADER, 0);
     // 0 = Don't give me the return header
     curl_setopt($ch, CURLOPT_HTTPHEADER, $ebayapiheader);
     // Set this for eBayAPI
     curl_setopt($ch, CURLOPT_POST, 1);
     // POST Method
     curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
     //My XML Request
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     if (($body = curl_exec($ch)) === false) {
         die("Api request error: " . curl_error($ch));
     }
     curl_close($ch);
     // Close the connection
     $xml = simplexml_load_string($body);
     if ($xml->Ack == 'Failure') {
         xp($xml);
     }
     return $body;
 }
Пример #3
0
        $r .= '-o-' . $i . ':\\1;';
    }
    if (strpos($t, 's')) {
        $r .= '-ms-' . $i . ':\\1;';
    }
    return $r;
}
// When the MAD begins..
if (!file_exists($files)) {
    echo '404';
} elseif (in_array($_csc->format, array('png', 'jpg', 'jpeg', 'gif'))) {
    header('Content-type: image/' . $_csc->format);
    readfile($files);
} elseif (in_array($_csc->format, array('css', 'js'))) {
    $bc = file_get_contents($files);
    $xp = xp('/**', '**/');
    if ($_csc->format == 'css') {
        header('Content-type: text/css');
        $list = array('border-radius' => 'wm', 'box-sizing' => 'wm', 'column-count' => 'wm', 'transform' => 'woms', 'transition' => 'woms');
        foreach ($list as $x => $v) {
            $preg[] = '/' . $x . ':(.*?);/is';
            $replace[] = pfx($v, $x);
        }
        $bc = preg_replace($preg, $replace, $bc);
    } else {
        header('Content-type: text/javascript');
    }
    // Remove comments
    $r = preg_replace('#/\\*.*?\\*/#s', '', $bc);
    // Remove whitespace
    $r = preg_replace('/\\s*([{}|:;,])\\s+/', '$1', $r);