NukeXchange Network

          

Nuke Sites Link Directory
Nuke Fixes · NukeForums · NukeZone Hosting · NukeUnited · Nuke Sites · Nuke Skins · NukeLance
Nuke Resources
 :: Home  :: Downloads  :: Your Account  :: Forums  :: Advertise :: 
Login or Register
Main Menu
General
 Main
 AvantGo
 Banner_Clients
 cfaq
 Donations
 Downloads
 Forums
 Members_List
 Private_Messages
 Search
 Stories_Archive
 Submit_News
 Surveys
 Topics
 Web_Links
 Your_Account

Your Account
 Login
 Register
 Lost Pass

Modules
Quick Links
· CMS Focus
· Domain Names
. Game Quest
· Learning Linux
. MateMaker
· NukeFixes
· NukeForums
· NukeLance
· Nuke Sites
· Nuke Skins
· NukeZone Hosting
. SearchDevil
Other Options

Download Resources
· Nuke Downloads
· Add a Link
· New Files
· Top Rated
· Most Popular

Web Site Resources
· Nuke Sites
· Add A Site
· New Sites
· Top Rated
· Most Popular

Support
· NukeZone Hosting
· NukeSkins.com
· NukeForums.com
· phpnuke.org
· NukeFixes.com
Information
NukeForums
·decompressing EN-Book-Nuke.tar.tar
·How to allow spaces/gaps/"-" in allowed usernames
·How to Setup PHPNUKE on win2k
·cannot save changes
·voting?
·Nuke forum picture problem
·How to change smtp port on wampserver and windows
·yet another 301 redirect problem
·Image display? - newbie
·php nuke help

read more...
Top10 Links
· 1: Nuke Forums
· 2: PHPNukeFiles
· 3: NukeSkins
· 4: Nuke Templates
· 5: EcomJunk
· 6: MDesign
· 7: Windows Installation: PHP
· 8: FLASH-FOR-NUKE
· 9: Dezina
· 10: Global Dream News Sharing Portal!
Site Visitors
User Login:

Nickname:
Password:
Security Code: Security Code
Type Security Code Here:

Members List Membership:
Latest: qwertz
Today: 0
Yesterday: 1
Overall: 15102

Visitation:
Guests: 560
Members: 0
Total: 560


You are Anonymous user. You can register for free by clicking here
Sponsor Links
Need to find your IP fast?
Need to find your IP fast?

NukeResources :: View topic - Module Query Results Formatting
NukeResources Forum Index

NukeResources Forum Index -> Random Thoughts -> Module Query Results Formatting
Post new topic  Reply to topic    View previous topic :: View next topic 
Module Query Results Formatting
PostPosted: Mon Apr 10, 2006 9:45 pm Reply with quote
LupinOne
Resource Newbie
Resource Newbie
 
Joined: Apr 11, 2005
Posts: 29




Hi all.

Background: I have a module that when called grabs several other modules and returns each modules query into iframe.

The output from the various queries is not picking up the formatting of the particular theme.

I've tried several different code snippets and am presently here:

Code:
<?php

if ( !defined('MODULE_FILE') )
{
   die("You can't access this file directly...");
}

require_once("mainfile.php");
$instory = '';
$module_name = basename(dirname(__FILE__));
get_lang($module_name);

    global $admin, $prefix, $db, $module_name, $articlecomm, $multilingual;
if ($multilingual == 1) {
    $queryalang = "AND (s.alanguage='$currentlang' OR s.alanguage='')"; /* stories */
    $queryrlang = "AND rlanguage='$currentlang' "; /* reviews */
} else {
    $queryalang = "";
    $queryrlang = "";
    $queryslang = "";
}

switch($op) {

        case "comments":
                break;

        default:
      $ThemeSel = get_theme();
                $offset=10;
                if (!isset($min)) $min=0;
                if (!isset($max)) $max=$min+$offset;
      $min = intval($min);
      $max = intval($max);
                $query = stripslashes(htmlentities($query, ENT_QUOTES));
      $pagetitle = "- "._SEARCH."";
//                include("header.php");
                $topic = intval($topic);
      if ($topic>0) {
          $row = $db->sql_fetchrow($db->sql_query("SELECT topicimage, topictext from ".$prefix."_topics where topicid='$topic'"));
          $topicimage = stripslashes($row['topicimage']);
          $topictext = stripslashes(check_html($row['topictext'], "nohtml"));
          if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
         $topicimage = "themes/$ThemeSel/images/topics/$topicimage";
          } else {
         $topicimage = $tipath . $topicimage;
          }
      } else {
          $topictext = ""._ALLTOPICS."";
          if (file_exists("themes/$ThemeSel/images/topics/AllTopics.gif")) {
         $topicimage = "themes/$ThemeSel/images/topics/AllTopics.gif";
          } else {
         $topicimage = $tipath . "AllTopics.gif";
          }
      }
      if (file_exists("themes/$ThemeSel/images/topics/AllTopics.gif")) {
          $alltop = "themes/$ThemeSel/images/topics/AllTopics.gif";
      } else {
          $alltop = $tipath . "AllTopics.gif";
      }
      OpenTable();
      if ($type == "users") {
          echo "<center><font class=\"title\"><b>"._SEARCHUSERS."</b></font></center><br>";
      } elseif ($type == "reviews") {
          echo "<center><font class=\"title\"><b>"._SEARCHREVIEWS."</b></font></center><br>";
      } elseif ($type == "comments" AND isset($sid)) {
          $res = $db->sql_query("select title from ".$prefix."_stories where sid='$sid'");
          list($st_title) = $db->sql_fetchrow($res);
          $st_title = stripslashes(check_html($st_title, "nohtml"));
          $instory = "AND sid='$sid'";
          echo "<center><font class=\"title\"><b>"._SEARCHINSTORY." $st_title</b></font></center><br>";
      } else {
          echo "<center><font class=\"title\"><b>"._SEARCHIN." $topictext</b></font></center><br>";
      }

//Begin Game tool

include("dbaccess.php");
$FORM2 = "
<table width=500 cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=500 height=34 colspan=8 align=center font color=\"#C2C4C3\">
L2 Dementia Top Player Killers - (Top 75)</font>
</td>
</tr>
<tr>
<td style=width:300 height=34 align=center>
<span class=post>Name<hr></span>
</td>
<td style=width:200 align=center>
<span class=post>Player Kills<hr></span>
</td>
</td>
</tr>";

$query = "SELECT characters.char_name,characters.accesslevel,characters.pkkills,accounts.access_level,accounts.login
FROM characters,accounts
WHERE (characters.accesslevel = 0)
AND (characters.account_name = accounts.login)
AND (accounts.access_level <> -100)
ORDER BY pkkills DESC limit 75";

$result = mysql_query($query);
$i = 1;
while($row = mysql_fetch_array($result))
{
$FORM2 .='<tr>
<td style="border-right:1px solid gray" align=left><b>'.$i.'.</b> '.$row['char_name'].'</td>
<td style="border-right:1px solid gray"  align=center>'.$row['pkkills'].'</td>
</tr></font>';
$i++;

}
echo $FORM2;
    CloseTable2();
//    include("footer.php");
    //break;
mysql_close();
}
?>


I had to comment out the header.php include because the whole site would be reloaded within the iframe (however the query output gets formatted right).

It picks up the background and the left and top rows, but not the text formatting. I am tired enough that I know I am missing something simple, basic, and most likely stupid.

Little help for the caffine challenged?

Thanks,

Lupin
View user's profile Send private message
Module Query Results Formatting
 NukeResources Forum Index -> Random Thoughts
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
All times are GMT - 4 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic     



Powered by phpBB © 2001-2005 phpBB Group.     Theme created by Vjacheslav Trushkin.
There have been 139 unique hit(s) in the past 24 hours.
Forums ©
Nuke Sites Link Directory


Best viewed with a Browser
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2001 - 2007 by NukeResources.com
You can syndicate our news using the file .backend.php or ultramode.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.34 Seconds

:: Eos phpbb2 style by Cyberalien :: PHP-Nuke theme by www.nukemods.com ::