You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 63 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Another php code question. [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
ravernews
Premium
Premium


Joined: Jan 26, 2003
Posts: 230

Location: USA

PostPosted: Mon Mar 03, 2003 1:08 am Reply with quoteBack to top

Code:
<?php

/************************************************************************/
/* PHP-NUKE: Advanced Content Management System                         */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* 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("footer.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}

$footer = 1;

function footmsg() {
    global $foot1, $foot2, $foot3, $copyright, $totaltime, $starttime;
    $mtime = microtime();
    $mtime = explode(" ",$mtime);
    $mtime = $mtime[1] + $mtime[0];
    $endtime = $mtime;
    $totaltime = ($endtime - $starttime);
    $totaltime = ""._PAGEGENERATION." ".substr($totaltime,0,5)." "._SECONDS."";
    echo "<font class=\"footmsg\">\n";
    if ($foot1 != "") {
   echo "$foot1<br>\n";
    }
    if ($foot2 != "") {
   echo "$foot2<br>\n";
    }
    if ($foot3 != "") {
   echo "$foot3<br>\n";
    }
    // DO NOT REMOVE THE FOLLOWING COPYRIGHT LINE. YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS.
    echo "$copyright<br>$totaltime<br>\n</font>\n";
}

function foot() {
    global $prefix, $user_prefix, $dbi, $index, $user, $cookie, $storynum, $user, $cookie, $Default_Theme, $foot1, $foot2, $foot3, $foot4, $home, $module, $name;
    if ($home == 1) {
   blocks(Down);
    }
    if ($module == 1 AND file_exists("modules/$name/copyright.php")) {
   $cpname = ereg_replace("_", " ", $name);
   echo "<div align=\"right\"><a href=\"javascript:openwindow()\">$cpname &</a></div>";
    }
    themefooter();
    if (is_user($user) AND !ereg("Private_Messages", $_SERVER[REQUEST_URI])) {
   $uname = $cookie[1];
   $popres = sql_query("SELECT uid, popmeson FROM ".$user_prefix."_users where uname='$uname'", $dbi);
   list($uid, $popmeson) = sql_fetch_row($popres, $dbi);
   if ($popmeson == 1) {
       $messres = sql_query("SELECT * FROM ".$prefix."_priv_msgs where to_userid='$uid' and read_msg='0'", $dbi);
           $messnum = sql_num_rows($messres, $dbi);
           if ($messnum == 1) {
          echo "<script language=\"javascript\">{ alert('"._YOUHAVEONEMSG."'); }</script>";
           }
           if ($messnum > 1) {
          echo "<script language=\"javascript\">{ alert('"._YOUHAVE." $messnum "._NEWPMSG."'); }</script>";
           }
   }
   }
   
   WysiwygJscriptFooter();
   echo "</body>\n";
   echo "</html>";
   die();
}

foot();

?>


What is wrong with this code. I am thinking uhhh the sql table pointing stuff, am I right?

_________________
I am new at this, give me time.


PHPNUKE = Less Code
NukeCops = More power
PhpNuke + NukeCops = "less code more power"
Find all posts by ravernewsView user's profileSend private messageVisit poster's websiteAIM AddressYahoo Messenger
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Mon Mar 03, 2003 1:29 am Reply with quoteBack to top

on the $user_prefix."_users line, change uid= to user_id= and uname= to username=

Artificialintel
Find all posts by ArtificialIntelView user's profileSend private message
ravernews
Premium
Premium


Joined: Jan 26, 2003
Posts: 230

Location: USA

PostPosted: Mon Mar 03, 2003 4:16 pm Reply with quoteBack to top

Code:
$popres = sql_query("SELECT uid, popmeson FROM ".$user_prefix."_users where username='$uname'", $dbi);
   list($user_id, $popmeson) = sql_fetch_row($popres, $dbi);


like that

_________________
I am new at this, give me time.


PHPNUKE = Less Code
NukeCops = More power
PhpNuke + NukeCops = "less code more power"
Find all posts by ravernewsView user's profileSend private messageVisit poster's websiteAIM AddressYahoo Messenger
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Mon Mar 03, 2003 4:42 pm Reply with quoteBack to top

no, like this:

Code:
$popres = sql_query("SELECT user_id, popmeson FROM ".$user_prefix."_users where username='$uname'", $dbi);
   list($uid, $popmeson) = sql_fetch_row($popres, $dbi);


Artificialintel
Find all posts by ArtificialIntelView user's profileSend private message
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Mon Mar 03, 2003 4:43 pm Reply with quoteBack to top

no, like this:

Code:
$popres = sql_query("SELECT user_id, popmeson FROM ".$user_prefix."_users where username='$uname'", $dbi);
   list($uid, $popmeson) = sql_fetch_row($popres, $dbi);


Artificialintel
Find all posts by ArtificialIntelView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.217 Seconds - 176 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::