Wrong Parameter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Wrong Parameter

    I'm getting the following error, in scotspaul coding can anyone help please



    Warning: Wrong parameter count for mysql_result() in /home/*****/public_html/galleryreal/cat.php on line 36

    the cat.php is

    header("Cache-Control: no-cache, must-revalidate");
    include("../config.inc.php");
    header("Pragma: no-cache");
    header("Content-type: text/vnd.wap.wml");
    echo "<?xml version=\"1.0\"?>";
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    echo "<wml><card title=\"$cat\">

    ";

    $Connect = mysql_connect("$server","$user","$pass");
    mysql_select_db("$dbname");
    $result=mysql_query("select * from members where username=&#39;$username&#39; and password=&#39;$password&#39;");
    $number_of_rows = mysql_num_rows($result);
    if ($number_of_rows>0)
    {
    include("../check.inc.php");
    }
    if ($ok>0)
    {

    $leigh2 = mysql_query("SELECT * FROM members WHERE username=&#39;$username&#39;");
    $owner=(mysql_result($leigh2,0,"owner"));



    if(!isset($_GET[&#39;page&#39;])){
    $page = 1;
    } else {
    $page = $_GET[&#39;page&#39;];
    }

    $max_results = 1000;
    $from = (($page * $max_results) - $max_results);

    $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM gallery"));
    $total_pages = ceil($total_results / $max_results);

    $sql = mysql_query("SELECT * FROM gallery WHERE cat=&#39;$cat&#39; ORDER BY id desc LIMIT $from, $max_results");
    while($row = mysql_fetch_array($sql)){
    $whoname = $row[&#39;username&#39;];
    $link = $row[&#39;link&#39;];
    $id = $row[&#39;id&#39;];
    include &#39;smilies.inc.php&#39;;
    echo "<a href=\"$link\">$whoname</a>
    " ;
    if($owner=="1")
    {
    echo ",<a href=\"delpic.php?username=$username&amp;password= $password&amp;id=$id\">[x]</a>
    ";
    }
    }

    if($page < $total_pages){
    $next = ($page + 1);
    echo "<a href=\"".$_SERVER[&#39;PHP_SELF&#39;]."?page=$next&amp;name=$name&amp;username=$usernam e&amp;password=$password\">(Next)</a>
    ";
    }
    if($page > 1){
    $prev = ($page - 1);
    echo "<a href=\"".$_SERVER[&#39;PHP_SELF&#39;]."?page=$prev&amp;name=$name&amp;username=$usernam e&amp;password=$password\">(Prev)</a>
    ";
    }
    $i = 1; $i <= $total_pages; $i++ ;



    echo "

    <a title=\"Enter\" href=\"up.php?action=upload&amp;cat=$cat&amp;usern ame=$username&amp;password=$password\">(Upload)</a>";
    echo "
    ";
    echo "<a title=\"Enter\" href=\"index.php?username=$username&amp;password=$ password\">(Back)</a>";
    echo "
    ";

    }
    echo "</p>";
    echo "</card>";
    echo "</wml>";
    ?>

    and table for gallery is

    CREATE TABLE IF NOT EXISTS `galleryl` (
    `id` mediumint(50) NOT NULL auto_increment,
    `username` varchar(20) NOT NULL default &#39;&#39;,
    `cat` varchar(50) NOT NULL default &#39;&#39;,
    `link` varchar(250) NOT NULL default &#39;&#39;,
    PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

    #2
    $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM gallery"));
    $total_pages = ceil($total_results / $max_results);[/b]
    try replacing that with this from the original

    Code:
    $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM bkmsgs WHERE username=&#39;$name&#39;"),0); 
    $total_pages = ceil($total_results / $max_results);
    if it wasnt and ur table was called gallery like in original coding you posted itl be

    Code:
    $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM gallery WHERE username=&#39;$name&#39;"),0); 
    $total_pages = ceil($total_results / $max_results);
    be carefull as this gallery is hackable
    Want something coded email me at sales@webnwaphost.com for a prices.




    Comment


      #3
      its not the gallery that is hackable adminx is hackable because my site where hacked with adminx if u have adminx on your site delete it

      Comment


        #4
        mate all i have to say is shell script upload. and iv never her of an adminx file
        Want something coded email me at sales@webnwaphost.com for a prices.




        Comment


          #5
          I got rid of the error thanks, there doesnt seem to be any code to put it on pages at the moment all pic&#39;s are on one page ? . but hopefully i&#39;ll sort that

          Comment


            #6
            the shell script wont work if it cant be uploaded with .php ext at the end I hate that shell script grrrr

            Comment


              #7
              oh boy it can and also, that script does allow .php in without a fuss lol
              Want something coded email me at sales@webnwaphost.com for a prices.




              Comment


                #8
                u can get hacked through the gallery as mine was by darkdesire .. some ppl still use it but they might of fixed the problem

                Comment


                  #9
                  yeh that was a shell script, but yu can stil get into that gallery
                  Want something coded email me at sales@webnwaphost.com for a prices.




                  Comment


                    #10
                    with your upload edit it

                    You really wont to f**k fake hackers grrr tossers they are lol


                    Code:
                    $file_name = str_replace("php","%%@(!)",$file_name);
                    $file_name = str_replace(".php","%%@(!)",$file_name);
                    $file_name = str_replace("rem","%%@(!)",$file_name);
                    and also place in headers of downloads

                    Code:
                    $allowed_ext = array (
                    
                      // archives
                      &#39;zip&#39; => &#39;application/zip&#39;,
                      &#39;rar&#39; => &#39;application/rar&#39;,
                    
                      // documents
                      &#39;pdf&#39; => &#39;application/pdf&#39;,
                      &#39;doc&#39; => &#39;application/msword&#39;,
                      &#39;xls&#39; => &#39;application/vnd.ms-excel&#39;,
                      &#39;ppt&#39; => &#39;application/vnd.ms-powerpoint&#39;,
                      &#39;txt&#39; => &#39;application/txt&#39;,
                      &#39;php&#39; => &#39;application/txt&#39;,
                    
                      // executables
                      &#39;exe&#39; => &#39;application/octet-stream&#39;,
                      &#39;jad&#39; => &#39;application/jad&#39;,
                      &#39;jar&#39; => &#39;application/jar&#39;,
                    
                      // images
                      &#39;gif&#39; => &#39;image/gif&#39;,
                      &#39;png&#39; => &#39;image/png&#39;,
                      &#39;jpg&#39; => &#39;image/jpeg&#39;,
                      &#39;jpeg&#39; => &#39;image/jpeg&#39;,
                      &#39;bmp&#39; => &#39;image/bmp&#39;,
                    
                      // audio
                      &#39;mp3&#39; => &#39;audio/mpeg&#39;,
                      &#39;wav&#39; => &#39;audio/x-wav&#39;,
                      &#39;mid&#39; => &#39;audio/x-mid&#39;,
                      &#39;midi&#39; => &#39;audio/x-mid&#39;,
                    
                      // video
                      &#39;mpeg&#39; => &#39;video/mpeg&#39;,
                      &#39;3gp&#39; => &#39;video/3gp&#39;,
                      &#39;mpg&#39; => &#39;video/mpeg&#39;,
                      &#39;mpe&#39; => &#39;video/mpeg&#39;,
                      &#39;mov&#39; => &#39;video/quicktime&#39;,
                      &#39;avi&#39; => &#39;video/x-msvideo&#39;
                    );
                    
                    header("Content-Type: $allowed_ext");
                    Now let them suckers try it lol all files what go in php are uploaded are now a text file only can see whats in rem.php.sis blah blah

                    all my sites are locked from noobs but my coding always slap them back in there bum lol i can see who uploads stuff lol
                    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                    Visit: WapMasterz Coming Back Soon!
                    _______
                    SCRIPTS FOR SALE BY SUBZERO
                    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                    _______
                    Info & Tips
                    php.net
                    w3schools.com

                    Comment

                    Working...
                    X