help ^_^

Started by cm27, October 15, 2011, 03:31:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cm27

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/public_html/indexmovies.php on line 30

Line of code

<?php
/**
 *   https://09source.kicks-ass.net:8443/svn/installer09/
 *   Licence Info: GPL
 *   Copyright (C) 2010 Installer09 v.2
 *   A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
 *   Project Leaders: Mindless,putyn,kidvision.
 **/
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'bittorrent.php');
require_once 
INCL_DIR.'pager_functions.php';
dbconn(false);
loggedinorreturn();

$lang array_mergeload_language('global') );

$HTMLOUT="";

$res sql_query("SELECT count(indexrelases.id) FROM indexrelases") ;
$arr mysql_fetch_row($res);
$count $arr[0];
$perpage 5;
$pager pager($perpage$count"indexmovies.php?&amp;");

$res sql_query("SELECT i.id, category, cover, i.name, year, description, category, c.image AS category_image, c.name AS category_name FROM indexrelases i LEFT JOIN categories c ON i.category = c.id ORDER BY added DESC {$pager['limit']}");
$HTMLOUT .="<h2>{$INSTALLER09['site_name']} Movies</h2>
<table align='center' width='100%' border='1' cellspacing='0' cellpadding='10'><tr><td>"
;

$HTMLOUT .= $pager['pagertop'];

if (
mysql_num_rows($res) > 0)
{
        while (
$arr mysql_fetch_assoc($res))
        {
                foreach(array(
'imdb','link','forum_link') as $key)
                
$arr[$key] = str_replace('&','&amp;',$arr[$key]);
                
$HTMLOUT .="<table width='100%' cellspacing='3' cellpadding='5'>
                <tr><td><div align='left'>&nbsp;&nbsp;<b><font size='1'> " 
$arr["name"] ."</font></b></div>";
                if (
$CURUSER['class'] >= UC_ADMINISTRATOR)
                {
                
$HTMLOUT .="&nbsp;&nbsp;<font size=\"-2\">[<a class=\"altlink\" href=\"indexdelete.php?action=edit&amp;id=" $arr['id'] . "&amp;returnto=".urlencode($_SERVER['PHP_SELF'])."\"><b>Edit</b></a>]";
                
$HTMLOUT .="[<a class=\"altlink\" href=\"indexdelete.php?action=delete&amp;id=" $arr['id'] . "&amp;returnto=".urlencode($_SERVER['PHP_SELF'])."\"><b>Delete</b></a>]</font>";
                }
                
$HTMLOUT .="</td><td>
                <img src=\"" 
htmlspecialchars($arr["cover"]) . "\" alt=\"Cover\" width=\"250\" border=\"0\" /></td>
                <td valign=\"top\"><div align=\"right\"><img src=\"pic/" 
htmlspecialchars($arr["category_image"]) . "\" align=\"right\" border=\"0\" alt=\"" $arr["category_name"] . "\" /></div>\n";
                
$HTMLOUT .="
                <b>Year: </b>" 
htmlspecialchars$arr['year'] )."<br />
                <hr />
                <b>Plot: </b>" 
htmlspecialchars$arr['description'] )."<br />
                <hr />
                  <br /><br />
                <div align=\"center\">"
;
                
$HTMLOUT .="</tr>";
                
$HTMLOUT .="</table><br />\n";

        }
}
else
$HTMLOUT .="-- Nothing in '{$INSTALLER09['site_name']} Movies'! --\n";
$HTMLOUT .= $pager['pagerbottom'];
$HTMLOUT .="</td></tr></table>";

echo 
stdhead("Index movies") . $HTMLOUT stdfoot();
?>


I just want a few lines of this mod because I want to make it bit odd ;) hint hint:P

Can u please help bro if you got time
Never fall to those that just sit there.. Always look for the way to the top even if you have to code it your self and mistakes and all... quote from BonZO...