Jump to content

button to image help


gemma134uk

Recommended Posts

hi im new here just wondering if you guys can help me out ive got 2 buttons on my site and im trying to make them images instead the code is below

 

    $pl .= "</table>\n".
        "<input type=\"hidden\" name=\"nzb\" value=\"" . $id ."\" />".
        "<input type=\"hidden\" name=\"nzb_name\" value=\"" . $nzbname ."\" />".
        "<input type=\"hidden\" name=\"nzbvernum\" value=\"" . $nzbvernum ."\" />".
        "<input type=\"button\" value=\"Check all\" onClick=\"this.value=check(partnzb)\" class=\"codebuttons\" style=\"width:90px;height:25px;\" />";
    if (getNzbPermissions("part") == 1  && $CURUSER["nzbstodaydl"] < getNzbPermissions("maxdlpday")) {
        $pl .= "<br /><div align=\"center\"><input type=\"submit\" name=\"dlzip\" value=\"Download Selected in Zip File\" class=\"codebuttons\" style=\"width:200px;height:25px;\" />".
        "   <input type=\"submit\" name=\"dlnzb\" value=\"Download Selected as NZB\" class=\"codebuttons\" style=\"width:200px;height:25px;\" /></div><br /><br />\n";
    } elseif (getNzbPermissions("part") == 1  && $CURUSER["nzbstodaydl"] >= getNzbPermissions("maxdlpday")) {
        $pl .= "<br /><div align=\"center\">".getNzbPermissions("maxmsg")."</div><br /><br />\n"; 
    } else {
        $pl .= "<br /><div align=\"center\">".getNzbPermissions("partmsg")."</div><br /><br />\n";
    }
    $pl .= "<a href=\"nzbdetails.php?id=$id\" class=\"sublink\">[Hide list]</a>".
            "</form>\n";

 

here is my whole nzbdetails.php

 

<?php
/***************************************************************************
*  NZB Details Page
*  ========================================
*  NZB Mod - Public v.TS-1.0b
*  TorrentStrike version
*  ========================================
*  created by dodgy
*  http://www.webdeviation.com
*  Special thanks to all who have had a hand in TBDev/TorrentStrike
***************************************************************************/

ob_start("ob_gzhandler");
?>
<script LANGUAGE="JavaScript">
<!-- Begin
var checkflag = "false";
function check(field) {
    if (checkflag == "false") {
        for (i = 0; i < field.length; i++) {
            field[i].checked = true;}
        checkflag = "true";
        return "Uncheck All"; }
    else {
        for (i = 0; i < field.length; i++) {
            field[i].checked = false; }
        checkflag = "false";
    return "Check All"; }
}
//  End -->
</script>
<?
require_once("include/bittorrent.php");
include_once("imdb/imdb.class.php");

// ----- For display of row with missing segments:
function missing_segments($segments, $subjseg) {
      if ($segments == $subjseg)
            $display = ">($segments/$subjseg)";
      elseif ($segments < $subjseg)
            $display = " color=\"red\">($segments/$subjseg)";
      elseif ($segments > $subseg)
            $display = " color=\"green\">($segments/$subjseg)";
      return $display;          
} 


// ----- Cleans NZB Subjects (not finished - add your own):
function clean_nzb_subj($string) {
      $string = str_replace("&#x22;", " ", $string);
      $string = str_replace("&#232;", "e", $string);
      $string = str_replace("&#34;", "\"", $string);
      $string = str_replace("_", " ", $string);
      return $string;
}

/* ---- To retrieve piece information from dB & display it on nzb page, with form
   that will record which pieces are selected by user & therefore which pieces 
   will be retrieved. ---- */
function showpieces($id, $nzbname, $nzbvernum) {
      
    $pl = "<form name=\"partnzb\" action=\"partnzbdload.php\" method=\"post\" enctype=\"multipart/form-data\">\n";
    $pl .= "<table width=\"100%\" class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\">\n";
    $pl .= "<tr><td width=\"3%\" class=\"colhead\" align=\"right\">Dl?</td>".
        "<td class=\"colhead\">Subject</td>".
        "<td width=\"8%\" class=\"colhead\" align=\"right\">Size</td>".
        "<td width=\"8%\" class=\"colhead\" align=\"right\">Date</td>".
        "<td width=\"6%\" class=\"colhead\" align=\"right\">Parts</td></tr>\n";
        
    $piecelist = @mysql_query("SELECT nzb_piece, piece_date, piece_subject, piece_size, piece_segments, piece_subjseg FROM nzbpiecelist WHERE nzb = $id ORDER BY nzb_piece");
    
    while ($plist = mysql_fetch_array($piecelist)) {
                    
        // Convert date:
        $dateunix = $plist['piece_date'];
        $dateposted = date("Y-m-d G:i:s", $dateunix);
        
        // Segment display/calculation:
        $segments = 0 + $plist['piece_segments'];
        $subjseg = 0 + $plist['piece_subjseg'];
        
        // the rows:
        $pl .= "<tr><td>".(getNzbPermissions("part")==1 && $CURUSER["nzbstodaydl"] < getNzbPermissions("maxdlpday")?"<input type=\"checkbox\" name=\"nzbpieces[]\" ".
                    "value=\"" . $plist['nzb_piece'] .
                    "\" />":"")."</td>".
              "<td><font class=\"small\">" . safe(clean_nzb_subj($plist['piece_subject'])) . "</font></td>".
              "<td align=right><font class=\"small\">" . mksize($plist['piece_size']) . "</font></td>".
              "<td align=right><font class=\"small\">" . $dateposted . "</font></td>".
              "<td align=right><font class=\"small\"" . missing_segments($segments, $subjseg) . "</font></td></tr>\n";
    }
    
    $pl .= "</table>\n".
        "<input type=\"hidden\" name=\"nzb\" value=\"" . $id ."\" />".
        "<input type=\"hidden\" name=\"nzb_name\" value=\"" . $nzbname ."\" />".
        "<input type=\"hidden\" name=\"nzbvernum\" value=\"" . $nzbvernum ."\" />".
        "<input type=\"button\" value=\"Check all\" onClick=\"this.value=check(partnzb)\" class=\"codebuttons\" style=\"width:90px;height:25px;\" />";
    if (getNzbPermissions("part") == 1  && $CURUSER["nzbstodaydl"] < getNzbPermissions("maxdlpday")) {
        $pl .= "<br /><div align=\"center\"><input type=\"submit\" name=\"dlzip\" value=\"Download Selected in Zip File\" class=\"codebuttons\" style=\"width:200px;height:25px;\" />".
        "   <input type=\"submit\" name=\"dlnzb\" value=\"Download Selected as NZB\" class=\"codebuttons\" style=\"width:200px;height:25px;\" /></div><br /><br />\n";
    } elseif (getNzbPermissions("part") == 1  && $CURUSER["nzbstodaydl"] >= getNzbPermissions("maxdlpday")) {
        $pl .= "<br /><div align=\"center\">".getNzbPermissions("maxmsg")."</div><br /><br />\n"; 
    } else {
        $pl .= "<br /><div align=\"center\">".getNzbPermissions("partmsg")."</div><br /><br />\n";
    }
    $pl .= "<a href=\"nzbdetails.php?id=$id\" class=\"sublink\">[Hide list]</a>".
            "</form>\n";
      
    return $pl;      
}

loggedinorreturn();

$id = 0 + $_GET["id"];

if (!isset($id) || !$id)
die();

$res = mysql_query("SELECT nzbs.owner, nzbs.name, nzbs.descr, nzbs.category, LENGTH(nzbs.nfo)AS nfosz, nzbs.filename, nzbs.size, nzbs.numfiles, nzbs.poster, nzbs.postdate, nzbs.groups, nzbs.id, nzbs.added, nzbs.views, nzbs.hits, nzbs.pars, nzbs.partotsize, nzbs.nzbvernum, nzbs.autoimdb, nzbs.url, nzbs.imdbrating, nzbs.genre, nzbs.addtext, nzbs.format, nzbcategories.name AS cat_name, users.username FROM nzbs LEFT JOIN nzbcategories ON nzbs.category = nzbcategories.id LEFT JOIN users ON nzbs.owner = users.id WHERE nzbs.id = $id")
    or sqlerr();
/* $res = mysql_query("SELECT nzbs.owner, nzbs.name, nzbs.descr, nzbs.category, LENGTH(nzbs.nfo)AS nfosz, nzbs.filename, nzbs.size, nzbs.numfiles, nzbs.poster, nzbs.postdate, nzbs.groups, nzbs.id, nzbs.added, nzbs.views, nzbs.hits, nzbs.pars, nzbs.partotsize, nzbs.nzbvernum, nzbs.autoimdb, nzbs.url, nzbs.imdbrating, nzbs.genre, nzbs.addtext, nzbs.format, nzbcategories.name AS cat_name, users.username, users.advertisename FROM nzbs LEFT JOIN nzbcategories ON nzbs.category = nzbcategories.id LEFT JOIN users ON nzbs.owner = users.id WHERE nzbs.id = $id")
    or sqlerr(); // USE THIS QUERY IF ANONYMOUS UPLOADER MOD PRESENT */

$row = mysql_fetch_array($res);

// -------------------------------Auto IMDB Mod--------------------------------------------//

if ($row["autoimdb"] == "yes") {              
    if (($row["url"] != "")AND(strpos($row["url"], "imdb"))AND(strpos($row["url"], "title")))
    {
        $thenumbers = ltrim(strrchr($row["url"],'tt'),'tt');
        $thenumbers = ereg_replace("[^A-Za-z0-9]", "", $thenumbers);
        $movie = new imdb ($thenumbers);
        $movieid = $thenumbers;
        $movie->setid ($movieid);
        $country = $movie->country ();
        $director = $movie->director();
        $write = $movie->writing();
        //$produce = $movie->producer();
        $cast = $movie->cast();
        $plot = $movie->plot ();
        $genres = $movie->genres ();

        $photoremurl = $movie->photo ();

        if ($photoremurl) {
            $autodata = "[img=".$photoremurl."]";
        }
        $autodata .= "[img=pic/sml_info.gif]";
        // This'll also be useful for storage further down:
        $movtitle = (string) $movie->title ();
        $movtitle = str_replace(array("&#34;", "&#38;", "[", "]"), array("\"", "&", "(", ")"), $movtitle);
        $autodata .= "[b][color=DimGray] Title: [/color][color=DarkSlateBlue]  " . "".$movtitle."[/color][/b]\n";
        $autodata .= "[b][color=DimGray] Alt Titles : [/color][color=DarkSlateBlue]  ";

        if ($movie->alsoknow() != "") {
            foreach ( $movie->alsoknow() as $ak){
                $autodata .= "".str_replace(array("&#34;", "[", "]"), array("\"", "(", ")"), $ak["title"])."" . "".$ak["year"].""  . "".$ak["country"]."" . " (" . "".$ak["comment"]."" . ")" . ", ";
            }
        }
        
        $autodata .= "[/color][/b]\n[b][color=DimGray] Year: [/color][color=DarkSlateBlue]  " . "".$movie->year ()."[/color][/b]\n";
        $autodata .= "[b][color=DimGray] Runtime: [/color][color=DarkSlateBlue]  " . "".$movie->runtime ()."" . " mins[/color][/b]\n";
        // store rating for later use
        $movrating = $movie->rating ();
        $desc_rating = ($movrating == ""?"Not Yet Rated":$movrating);
        $autodata .= "[b][color=DimGray] User Rating: [/color][color=DarkSlateBlue]  " . "".$desc_rating."[/color][/b]\n";
        
        $desc_votes = (string) $movie->votes ();
        $desc_votes = (strlen($desc_votes)>7?substr($desc_votes,0, 7):$desc_votes);
        $desc_votes = str_replace(array("&#34;", "&#38;", "[", "]"), array("\"", "&", "(", ")"), $desc_votes);
        $autodata .= "[b][color=DimGray] Votes: [/color][color=DarkSlateBlue]  " . "".$desc_votes."[/color][/b]\n";
        $autodata .= "[b][color=DimGray] Language: [/color][color=DarkSlateBlue]  " . "".$movie->language ()."[/color][/b]\n";
        $autodata .= "[b][color=DimGray] Country: [/color][color=DarkSlateBlue]  ";
                      
        for ($i = 0; $i < count ($country); $i++) {
            $autodata .= "$country[$i]";
        }

        for ($i = 0; $i < count ($genres); $i++) {
            $the_genres .= "$genres[$i]  ";
        }
        $autodata .= "[/color][/b]\n[b][color=DimGray] Genre: [/color][color=DarkSlateBlue]" . "".$the_genres."[/color][/b]\n";
        
        $tagline = $movie->tagline ();
        $tagline = str_replace(array("&#34;", "&#38;", "[", "]"), array("\"", "&", "(", ")"), $tagline);
        $autodata .= "[b][color=DimGray] Tagline: [/color][color=DarkSlateBlue] ".$tagline."[/color][/b]\n";
        $autodata .= "[b][color=DimGray] Director(s): [/color][color=DarkSlateBlue]";

        for ($i = 0; $i < count ($director); $i++) {
            $autodata .= "[url=http://us.imdb.com/Name?" . "".$director[$i]["imdb"]."" ."]" . "".$director[$i]["name"]."" . "[/url] ";
        }
        
        $autodata .= "[/color][/b]\n[b][color=DimGray] Writer(s): [/color][/b]";
        for ($i = 0; $i < count ($write); $i++) {
            $autodata .= "[url=http://us.imdb.com/Name?" . "".$write[$i]["imdb"]."" ."]" . "".$write[$i]["name"]."" . "[/url] ";
        }
        
        $autodata .= "\n[b][color=DimGray] Trailer (if any): [/color][color=DarkSlateBlue][url=http://www.imdb.com/title/tt$thenumbers/trailers]Click here[/url][/color][/b]";
        
    /*    $autodata .= "\n[b][color=DimGray] Producer(s): [/color][/b]";
        for ($i = 0; $i < count ($produce); $i++) {
            $autodata .= "[url=http://us.imdb.com/Name?" . "".$produce[$i]["imdb"]."" ."]" . "".$produce[$i]["name"]."" . "[/url] ";
        }    */

        $autodata .= "\n\n\n[img=pic/sml_desc.gif]";
       // $autodata .= "[b][color=darkred] Plot Outline: [/color][/b]";
        for ($i = 0; $i < count ($plot); $i++) {
            $the_plot .= "$plot[$i]";
        }
        if ($the_plot == "")
            $the_plot = "No plot summary available";
        // If you're wondering what this $big_letter is for, it's something I did for BB-Code on Drugs, coming soon
        $big_letter = substr($the_plot, 0, 1);
        $rest_of_plot = substr($the_plot, 1);
        $rest_of_plot = str_replace(array("[", "]"), array("(", ")"), $rest_of_plot); 
        $autodata .= str_replace("&#34;", "\"", "[color=DimGray][b]".$big_letter."".strip_tags($rest_of_plot)."[/b][/color]");      
    
        $autodata .= "\n\n\n\n[img=pic/sml_cast.gif]";

        for ($i = 0; $i < count ($cast); $i++) {
            if ($i > 9) {
                break;
            }

            $autodata .= "[color=DimGray]•[/color] " . "[url=http://us.imdb.com/Name?" . "".$cast[$i]["imdb"]."" ."]" . "".$cast[$i]["name"]."" . "[/url] " . " as [b][color=DimGray]" . "".$cast[$i]["role"]."" . " [/color][/b]\n";
        }
        $autodata .= "\n\n\n";
      
        // to update nzbs table fields on upload/edit
        $checkme = 0;
        if (($row["imdbrating"] == "" && $row["genre"] == "") || !empty($_GET["edited"])) {
            // get some variables to update database
            $movyear = (string) $movie->year ();
            $movgenre = (string) $movie->genre ();
            $movietitle = sqlesc($movtitle." ($movyear)");
            $moviegenre = sqlesc(substr($movgenre, 0, 20));
            $movrating = ($movrating == ""?"NYR":$movrating);
            $movierating = sqlesc(strval($movrating));
                     
            mysql_query("UPDATE nzbs SET name = $movietitle, imdbrating = $movierating, genre = $moviegenre WHERE id = ".$row["id"]);
            $checkme = 1;
                  
        }
            
        if ($_GET["uploaded"] && $checkme == 1)
            header("Location: $BASEURL/nzbdetails.php?id=".$row["id"]."&uploaded=1");
        if ($_GET["edited"] && $checkme == 1)
            header("Location: $BASEURL/nzbdetails.php?id=".$row["id"]."&edited=1");
    }
}

// ------------------------------------------------------------------------------------------//

$owned = $moderator = 0;
if (get_user_class() >= UC_MODERATOR)
	$owned = $moderator = 1;
elseif ($CURUSER["id"] == $row["owner"])
	$owned = 1;

if ($_GET["hit"]) {
mysql_query("UPDATE nzbs SET views = views + 1 WHERE id = $id");
if ($_GET["tocomm"])
	header("Location: $BASEURL/nzbdetails.php?id=$id&page=0#startcomments");
elseif ($_GET["filelist"])
	header("Location: $BASEURL/nzbdetails.php?id=$id&filelist=1#filelist");
else
	header("Location: $BASEURL/nzbdetails.php?id=$id");
exit();
}

if (!isset($_GET["page"])) {
stdhead("Details for nzb \"" . $row["name"] . "\"");

$spacer = "       ";

if ($_GET["uploaded"]) {
	print("<h2>Successfully uploaded!</h2>\n");
}
elseif ($_GET["edited"]) {
	print("<h2>Successfully edited!</h2>\n");
	if (isset($_GET["returnto"]))
		print("<p><b>Go back to <a href=\"" . safe($_GET["returnto"]) . "\">whence you came</a>.</b></p>\n");
}
elseif (isset($_GET["searched"])) {
	print("<h2>Your search for \"" . safe($_GET["searched"]) . "\" gave a single result:</h2>\n");
}


    $addtext = safe($row["addtext"])." ";
    $format = ($row["format"]!="na"?" <img src=\"".$pic_base_url."sml_".$row["format"].".gif\" alt=\"".$row["format"]."\" />":"");

    $s=$row["name"];
print("<h1>$s</h1>\n");
print("<h3>.: $addtext $format :.</h3><br /><br />\n");
    print("<table width=\"750\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");

$url = "nzbedit.php?id=" . $row["id"];
if (isset($_GET["returnto"])) {
	$addthis = "&returnto=" . urlencode($_GET["returnto"]);
	$url .= $addthis;
	$keepget .= $addthis;
}
$editlink = "a href=\"$url\" class=\"sublink\"";


    // Get permissions for download link display
    if ((getNzbPermissions("zip") == 1 || getNzbPermissions("nzb") == 1) && $CURUSER["nzbstodaydl"] < getNzbPermissions("maxdlpday"))
    {
        print("<form action=\"nzbdownload.php/$id/" . rawurlencode($row["name"]) . ".nzb\" method=\"post\">");
        print("<tr><td class=\"rowhead\" width=\"1%\">Download</td><td width=\"99%\" align=\"center\">");
        if (getNzbPermissions("zip") == 1)
            print("<input type=\"submit\" name=\"dlzip\" value=\"Download As Zip File\" class=\"codebuttons\" style=\"width:150px;height:25px;\" />");          
        if (getNzbPermissions("nzb") == 1)
            print("   <input type=\"submit\" name=\"dlnzb\" value=\"Download As NZB\" class=\"codebuttons\" style=\"width:150px;height:25px;\" />");
        print("                   ");
        print("</td></tr>");
        print("</form>\n");

    }
    elseif ((getNzbPermissions("zip") == 1 || getNzbPermissions("nzb") == 1) && $CURUSER["nzbstodaydl"] >= getNzbPermissions("maxdlpday")) {
        print("<tr><td class=\"rowhead\" width=\"1%\">Download</td><td width=\"99%\" align=\"center\">");
        print(getNzbPermissions("maxmsg")."</td></tr>");
    } else {
        print("<tr><td class=\"rowhead\" width=\"1%\">Download</td><td width=\"99%\" align=\"center\">");
        print(getNzbPermissions("nzbmsg")."</td></tr>");
    }

if (!empty($row["descr"]))
        $descr = $row["descr"];
else
    $descr = " ";
    $autodata = ($row["autoimdb"] == "yes"?format_comment($autodata)."":"");
    $descri = format_comment($descr);
tr("Description", $autodata."".$descri, 1);                

    if ($row["nfosz"] > 0)
        print("<tr><td class=\"rowhead\" align=\"right\">NFO</td><td align=\"left\">".(getNzbPermissions("nfo") != 0?"<a href=nzbviewnfo.php?id=$row[id]><b>View NFO</b></a> (" .
            mksize($row["nfosz"]) . ")":getNzbPermissions("nfomsg"))."</td></tr>\n");

if ($row["url"] != "")
        tr("Info URL", format_urls(safe($row["url"])), 1);
     
    if (isset($row["cat_name"]))
	tr("Type", $row["cat_name"]);
else
	tr("Type", "(none selected)");

if ($row["autoimdb"] == "no" && $row["genre"] != "")
     tr("Genre", safe($row["genre"]), 1);

tr("Size",mksize($row["size"]) . " (" . number_format($row["size"]) . " bytes)");

tr("Poster", $row["poster"]);

    $datenix = $row["postdate"];
    $agepost = show_age($datenix);
    $datepost = date("Y-m-d H:i:s", $datenix);
tr("Posted", $datepost." ($agepost days ago)");

$groups = unserialize($row['groups']);
    if (is_array($groups)) {
        $grp = "";
        foreach ($groups as $key=>$val) {
            $grp .= "$val\n";
        }
    } else { 
        $grp = $groups;
    }     
tr("Groups", safe($grp));

if ($row["pars"] > 0) {
   $percentpars = sprintf( "%.2f", (($row["partotsize"] / ($row["size"] - $row["partotsize"])) * 100));
}
    tr("par2 Files", ($row['pars'] == 0?"None":$row['pars'].", ".mksize($row["partotsize"])." in total (Can rebuild approx $percentpars% of total filesize)"));	  
tr("NZB Added", $row["added"]);
tr("Views", $row["views"]);
tr("Grabs", $row["hits"]);

$uprow = (isset($row["username"]) ? ("<a href=userdetails.php?id=" . $row["owner"] . "><b>" . safe($row["username"]) . "</b></a>") : "<i>unknown</i>"); 
/* USE ABOVE ^^^ OR BELOW vvv DEPENDING ON WHETHER YOU HAVE THE ANONYMOUS UPLOADER MOD */
/*	$addnam = $row['advertisename'];
$keepget = "";
$uprow = ("<i>Anonymous</i>");
if (get_user_class() >= UC_MODERATOR) 
	$uprow = (isset($row["username"]) ? ("<a href=userdetails.php?id=" . $row["owner"] . "><b>" . safe($row["username"]) . "</b></a>") : "<i>unknown</i>"); 
if ($addnam == "yes") 
	$uprow = (isset($row["username"]) ? ("<a href=userdetails.php?id=" . $row["owner"] . "><b>" . safe($row["username"]) . "</b></a>") : "<i>unknown</i>"); */
if ($owned) 
	$uprow .= " $spacer<$editlink><b>[Edit this NZB]</b></a>"; 
tr("Upped by", $uprow, 1);

    //tr("Report<br />NZB", "Click <a href=\"report.php?typ=nzb&id=$id\"><b><font color=\"#ff0532\">here</font></b></a> to report this NZB to staff for violation of the rules", 1);

if (!$_GET["filelist"]) {
    tr("Num files<br /><a href=\"nzbdetails.php?id=$id&filelist=1$keepget#filelist\" class=\"sublink\">[see full list]</a>", $row["numfiles"] . " files", 1);
    } else {
	tr("Num files", $row["numfiles"] . " files", 1);     
        tr("<a name=\"filelist\">File list</a><br /><a href=\"nzbdetails.php?id=$id$keepget\" class=\"sublink\">[Hide list]</a>", showpieces($id, $row["name"], $row['nzbvernum']), 1);
    }
    
    print("</table></p>\n");
    
    /* The comparison value of '0' with $datenix is so that failed uploads with no nzbs.datepost value can be deleted by the uploader */  
    if (($datenix!=0) && (get_user_class() >= UC_MODERATOR)) {	
        print("<p>\n");
        print("<form method=\"post\" action=\"nzbdelete.php\">\n");
        print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");
        print("<tr><td class=\"row2\" colspan=\"2\"><b>Delete NZB.</b> Reason:</td></tr>");
       // print("<td><input name=\"reasontype\" type=\"radio\" value=\"1\"> Expired </td><td>$SITENZBRETENTION days old</td></tr>\n");
        print("<tr><td><input name=\"reasontype\" type=\"radio\" value=\"2\"> Dupe</td><td><input type=\"text\" size=\"40\" name=\"reason[]\"></td></tr>\n");
        print("<tr><td><input name=\"reasontype\" type=\"radio\" value=\"3\"> Nuked</td><td><input type=\"text\" size=\"40\" name=\"reason[]\"></td></tr>\n");
        print("<tr><td><input name=\"reasontype\" type=\"radio\" value=\"4\"> Rules</td><td><input type=\"text\" size=\"40\" name=\"reason[]\">(req)</td></tr>");
        print("<tr><td><input name=\"reasontype\" type=\"radio\" value=\"5\" checked=\"checked\" /> Other:</td><td><input type=\"text\" size=\"40\" name=\"reason[]\">(req)</td></tr>\n");
        print("<input type=\"hidden\" name=\"id\" value=\"$id\" />\n");
        if (isset($_GET["returnto"]))
        	print("<input type=\"hidden\" name=\"returnto\" value=\"" . safe($_GET["returnto"]) . "\" />\n");
        print("<td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"Delete it!\" class=\"codebuttons\" style=\"width:120px;height:25px;\" /></td></tr>\n");
        print("</table>");
        print("</form>\n");
        print("</p>\n");
    } elseif (($datenix==0) && (getNzbPermissions("ulnzb")==1)) {
        print("<p>\n");
        print("<form method=\"post\" action=\"nzbdelete.php\">\n");
        print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");
        print("<tr><td class=\"row2\" colspan=\"2\"><b>Delete Failed NZB.</b> Reason:</td></tr>");
        print("<tr><td><input name=\"reasontype\" type=\"hidden\" value=\"5\"  /> What happened?:</td><td><input type=\"text\" size=\"40\" name=\"reason[]\">(req)</td></tr>\n");
        print("<input type=\"hidden\" name=\"id\" value=\"$id\" />\n");
        if (isset($_GET["returnto"]))
        	print("<input type=\"hidden\" name=\"returnto\" value=\"" . safe($_GET["returnto"]) . "\" />\n");
        print("<td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"Delete it!\" class=\"codebuttons\" style=\"width:120px;height:25px;\" /></td></tr>\n");
        print("</table>");
        print("</form>\n");
        print("</p>\n");
    }
} else {
stdhead("Comments for NZB \"" . $row["name"] . "\"");
print("<h1>Comments for <a href=\"nzbdetails.php?id=$id\">" . $row["name"] . "</a></h1>\n");
}

print("<p><a name=\"startcomments\"></a></p>\n");

$commentbar = "<p align=\"center\"><a class=\"index\" href=\"nzbcomment.php?action=add&tid=$id\">Add a comment</a></p>\n";

$subres = mysql_query("SELECT COUNT(*) FROM nzbcomments WHERE nzb = $id");
$subrow = mysql_fetch_array($subres);
$count = $subrow[0];

if (!$count) {
print("<h2>No comments yet</h2>\n");
} else {
list($pagertop, $pagerbottom, $limit) = pager(20, $count, "nzbdetails.php?id=$id&", array(lastpagedefault => 1));

$subres = mysql_query("SELECT nzbcomments.id, text, user, nzbcomments.added, editedby, editedat, avatar, warned, ".
        "username, title, class, donor FROM nzbcomments LEFT JOIN users ON nzbcomments.user = users.id WHERE nzb = " .
        "$id ORDER BY nzbcomments.id $limit") or sqlerr(__FILE__, __LINE__);
    /* USE ABOVE ^^^ OR BELOW vvv DEPENDING ON WHETHER YOU HAVE THE ANONYMOUS UPLOADER MOD */
/*   $subres = mysql_query("SELECT nzbcomments.id, text, user, nzbcomments.added, editedby, editedat, avatar, warned, ".
        "username, title, class, donor, advertisename FROM nzbcomments LEFT JOIN users ON nzbcomments.user = users.id WHERE nzb = " .
        "$id ORDER BY nzbcomments.id $limit") or sqlerr(__FILE__, __LINE__); */
$allrows = array();
while ($subrow = mysql_fetch_array($subres))
	$allrows[] = $subrow;

print($commentbar);
print($pagertop);

nzbcommenttable($allrows, $row["owner"]);

print($pagerbottom);
}

print($commentbar);

stdfoot();
?>

 

any help would be much appreciated

 

thank you gemma x

Link to comment
Share on other sites

i'm not sure what you're asking. do you want to replace your form submit buttons with images and have the images act like submit buttons? if so, all you need to do is use the image input instead:

 

<input type="image" src="rainbow.gif" name="image" width="60" height="60">

 

that will display the image rainbow.gif, which will be clickable to submit the form.

Link to comment
Share on other sites

hi yes that is exactly what i meen thank you but when i use code you just gave me it makes my page go blank? is there anychance you can put it in the nzbdetails.php ive posted above and paste it for me incase im doing it wrong?

 

thanks again gemma x

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.