Example #1
0
if ($par_request != null) {
    trigger_error("par_request:[{$par_request}]", E_USER_NOTICE);
    $db = new Database();
    if (strcmp($par_request, 'GetSongsList') == 0) {
        $par_count = isset($_GET['count']) ? $_GET['count'] : "10";
        $par_product = isset($_GET['product']) ? $_GET['product'] : "2";
        $par_category = isset($_GET['category']) ? $_GET['category'] : "-1";
        $categoryName = null;
        $products = null;
        if ($par_category == -1) {
            $categoryName = "Nowości";
        } else {
            $categoryName = utf8ToEntities($db->getCategoryName($par_category));
        }
        $products = $db->getProducts($par_product, $par_category, $par_count);
        $service = $db->getService($par_css);
        $css = isset($service['css']) ? $service['css'] : "http://partner.mobikar.net/mobikar.css";
        if (strcmp($par_format, 'xhtml') == 0) {
            print "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n";
            print "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
            print "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
            print "<script type='text/javascript'>\n";
            print "//<![CDATA[\n";
            print "function getOrder(pid){\n";
            print "     window.open(\"?request=GetOrder&partner={$par_partner}&format=xhtml&css={$par_css}&lang={$par_lang}&product=\" + pid,'','width=550, height=350,scrollbars=yes');\n";
            print "}\n";
            print "//]]>\n";
            print "</script>\n";
            print "<head>\n";
            print "<title>mobile KARAOKE - mobiKAR</title>\n";
            print "<link rel=\"stylesheet\" type=\"text/css\" title=\"CSS\" href=\"" . $css . "\"/>\n";