Example #1
0
$whichdb = array('nfo' => 'nfo', 'sfv' => 'sfv', 'm3u' => 'm3u', 'jpg' => 'jpg', 'diz' => 'diz', 'msg' => 'ftp_message');
$t = $whichdb[$type];
$tt = 'rel_' . $t;
/*
$req = mysql_query("SELECT UNCOMPRESS(`" .$tt. "`) AS " .$tt. ", rel_filename, rel_name FROM " .$t. " WHERE id = '" . $id . "'") or die( mysql_error("err2"));  
$res = mysql_fetch_assoc($req);
*/
//print("test");
//define("ID",tty($res[$tt]));
//define("rlz",($res["rel_name"]));
//require_once('./getImdb.php');
if (isset($_GET['type']) && $_GET['type'] != "jpg") {
    require_once "./nfo2html.php";
    $req = mysql_query("SELECT UNCOMPRESS(`" . $tt . "`) AS " . $tt . ", rel_filename, rel_name FROM " . $t . " WHERE id = '" . $id . "'") or die(mysql_error("err2"));
    $res = mysql_fetch_assoc($req);
    $nfodata = nfo2html($res[$tt]);
    if (isset($_GET["api"]) && $_GET["api"] == "1") {
        echo "<pre>" . $nfodata . "</pre>";
    } else {
        echo stdhead();
        //$nfo_in_txt = $res[$tt];
        //$reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/";
        //if(preg_match($reg_exUrl, $nfo_in_txt, $url)) {
        //echo $url[0];
        //   }
        echo '<div class="alert alert-success"><b>' . $res["rel_name"] . '</b> - ' . $res["rel_filename"] . '</div>';
        //echo "<pre>".($nfodata)."</pre>";
        echo '<pre><img src="y.php?type=' . $_GET['type'] . '&id=' . $_GET['id'] . '"/></pre>';
        echo stdfoot();
    }
    die;
Example #2
0
<pre>
<?php 
require_once "./nfo2html.php";
mysql_connect("localhost", "root", "root") or die(mysql_error());
mysql_select_db("scenedb_old") or die(mysql_error());
$id = $_GET['release'];
$req = mysql_query("SELECT UNCOMPRESS(`rel_nfo`) AS rel_nfo, rel_filename, rel_name FROM nfo WHERE rel_name = '" . $id . "'") or die(mysql_error());
$res = mysql_fetch_assoc($req);
//print_r($res);
if ($res['rel_nfo'] != "") {
    $finaldata = $res['rel_nfo'];
    echo nfo2html($res['rel_name']) . "\n\n";
    echo nfo2html($res['rel_filename']) . "\n\t\n";
    echo nfo2html($finaldata);
} else {
    die;
}