Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
stcloudscoots
New Member
New Member


Joined: Jan 11, 2006
Posts: 13

PostPosted: Sat Jan 13, 2007 11:21 pm Reply with quote

When selecting the Who is coming link on the block this is what I get.

Code:
Who is coming?


Warning: Missing argument 2 for sql_query() in /home/stclouds/public_html/pnc/includes/sql_layer.php on line 176


I can click on any of the other links and they work just fine. Any help would be great. I have heard on similar error code for another block/mod that it was because the $dbi argument is missing. I have tried adding that in different places but does not seem to work.

I placed ************** around line 176*****************
Code:
/*

 * sql_query($query, $id)
 * executes an SQL statement, returns a result identifier
 */

 **************function sql_query($query, $id)*******************
{

global $dbtype, $sql_debug;
$sql_debug = 0;
if($sql_debug) echo "SQL query: ".str_replace(",",", ",$query)."<BR>";
switch ($dbtype) {

    case "MySQL":
        $res=@mysql_query($query, $id);
        if (mysql_errno()) { echo mysql_error()."<br>"; }
        return $res;
    break;;

    case "mSQL":
        $res=@msql_query($query, $id);
        return $res;
    break;;

    case "postgres":
    case "postgres_local":
   $res=pg_exec($id,$query);
   $result_set = new ResultSet;
   $result_set->set_result( $res );
   $result_set->set_total_rows( sql_num_rows( $result_set ) );
   $result_set->set_fetched_rows( 0 );
        return $result_set;
    break;;

    case "ODBC":
    case "ODBC_Adabas":
        $res=@odbc_exec($id,$query);
        return $res;
    break;;

    case "Interbase":
        $res=@ibase_query($id,$query);
        return $res;
    break;;

    case "Sybase":
        $res=@sybase_query($query, $id);
        return $res;
    break;;

    default:
    break;;

    }
}
 
View user's profile Send private message
superflash
Hangin' Around


Joined: Dec 06, 2004
Posts: 46

PostPosted: Sun Jan 14, 2007 2:56 am Reply with quote

The code for sql_layer.php you pasted looks exactly like mine, so I guess the problem might be in the block, what is its code?
 
View user's profile Send private message
stcloudscoots
PostPosted: Sun Jan 14, 2007 9:07 am Reply with quote

Code:
<?php


/************************************************************************/
/* 4nLanParty Version 0.9                                               */
/* for phpNUKE Version 5.5 & 5.6 (http://phpnuke.org)                   */
/* Also for 4nNukeWare (www.nukeware.net) all 0.9er Versions            */
/* ==================================================================== */
/* By WarpSpeed (warp_speed@gmx.net) @ 15/September/2oo2                */
/* http://www.warp-speed.de @ 4thDimension.de Networking                */
/* ==================================================================== */
/* Based on:                                                            */
/* LanMod v1.0.5b                                                       */
/* ==============                                                       */
/* Author: Mystakill                                                    */
/* Web: http://www.mystakill.com                                        */
/* ==================================================================== */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if (eregi("block-4nLan.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}

include("config.php");

global $user, $banners, $sitename, $slogan, $cookie, $currentlang, $language, $lang, $prefix, $dbi, $locale;
if (isset($currentlang)) {$xlang = $currentlang;}
elseif (isset($lang)) {$xlang = $lang;}
else {$xlang = $language;}
if (file_exists("language/4nlan/lang-$xlang.php")) {
        include("language/4nlan/lang-$xlang.php");
        }
else {
        include("language/4nlan/lang-english.php");
        }

$result = sql_query("select * from ".$prefix."_4nlan_blockinfo", $dbi);
$info = sql_fetch_row($result, $dbi);

    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }

$content .= "<font class=\"content\">
                        <font class=\"content\"><center><b>"._4nblp01."<font color=\"red\">$info[1]</font>
                        <br>"._4nblp02."<font color=\"00ff33\">$info[2]</font></b></center>
                        <br><strong><big>·</big></strong><a href=\"modules.php?name=4nLan&map=show\">"._4nblp03."</a>";

                        if($info[2] != "closed"){
                        if ($username == "Anonymous") {
                $content .= "<br><strong><big>·</big></strong> <a href=\"account.html\">"._4nblp04."</a>";
                    } else {
                $content .= "<br><strong><big>·</big></strong> <a href=\"modules.php?name=4nLan&regis=show\">"._4nblp05."</a>";
                    }
                        } else {
                        $content .= "<br><strong><big>·</big></strong>"._4nblp06."$info[2]";
                        }
$content .= "<br><strong><big>·</big></strong> <a href=\"modules.php?name=4nLan&going=show\">"._4nblp07."</a><br><strong><big>·</big></strong> <a href=\"modules.php?name=4nLan&spons=show\">"._4nblp08."</a></font>";

?>
 
stcloudscoots
PostPosted: Sun Jan 14, 2007 9:25 am Reply with quote

someone told me to do this.
modules/4nLan/index.php

Ok, open the same file again and look on row 150 for:
Code:
Code:
$checkuser = sql_query


replace with:
Code:
Code:
$checkuser = $db->sql_query


That worked but when I click on the who is coming there are no names and I am earmarked.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©