Example #1
0
    $req = "select repertoire_path from upload_repertoire where repertoire_id ='" . $pmb_notice_img_folder_id . "'";
    $res = mysql_query($req, $dbh);
    if (mysql_num_rows($res)) {
        $rep = mysql_fetch_object($res);
        $img = $rep->repertoire_path . "img_" . $notice_id;
        header('Content-Type: image/png');
        $fp = @fopen($img, "rb");
        fpassthru($fp);
        fclose($fp);
        exit;
    }
}
if ($noticecode) {
    if (isEAN($noticecode)) {
        if (isISBN($noticecode)) {
            if (isISBN10($noticecode)) {
                $url_image10 = str_replace("!!isbn!!", str_replace("-", "", $noticecode), $_GET['url_image']);
                $url_image13 = str_replace("!!isbn!!", str_replace("-", "", formatISBN($noticecode, "13")), $_GET['url_image']);
            } else {
                $url_image10 = str_replace("!!isbn!!", str_replace("-", "", EANtoISBN10($noticecode)), $_GET['url_image']);
                $url_image13 = str_replace("!!isbn!!", str_replace("-", "", $noticecode), $_GET['url_image']);
            }
        } else {
            $url_imageEAN = str_replace("!!isbn!!", str_replace("-", "", $noticecode), $_GET['url_image']);
        }
    }
    $url_image = str_replace("!!isbn!!", $noticecode, $_GET['url_image']);
} else {
    $url_image = rawurldecode(stripslashes($_GET['url_image']));
}
if ($opac_curl_available) {
Example #2
0
 static function get_notice_id_from_cb($code)
 {
     if (!$code) {
         return 0;
     }
     $isbn = traite_code_isbn($code);
     if (isISBN10($isbn)) {
         $isbn13 = formatISBN($isbn, 13);
         $isbn10 = $isbn;
     } elseif (isISBN13($isbn)) {
         $isbn10 = formatISBN($isbn, 10);
         $isbn13 = $isbn;
     } else {
         // ce n'est pas un code au format isbn
         $isbn10 = $code;
     }
     $requete = "SELECT notice_id FROM notices WHERE ( code='{$isbn10}' or code='{$isbn13}') and code !='' LIMIT 1 ";
     if ($result = pmb_mysql_query($requete)) {
         if (pmb_mysql_num_rows($result)) {
             $notice = pmb_mysql_fetch_object($result);
             return $notice->notice_id;
         }
     }
     return 0;
 }