Current location: Hot Scripts Forums » Programming Languages » PHP » header.php doesnt work


header.php doesnt work

Reply
  #1 (permalink)  
Old 12-19-04, 03:31 PM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
header.php doesnt work

hi,

im just having problems all day with my new project

today im testing my project and header.php, which has my varibles for:

the title
the template
basically the settings, and few other tihngs

problem is its not showing them.

like $title - hi will out put

- hi

any ideas?

much thx.
Reply With Quote
  #2 (permalink)  
Old 12-19-04, 03:36 PM
Vulture Vulture is offline
Newbie Coder
 
Join Date: Dec 2004
Location: Scotland, UK
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Got an example/code?
Reply With Quote
  #3 (permalink)  
Old 12-19-04, 03:41 PM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
well here is what in header.php

<?
if (!defined('IN_XDB') ) {
die("<B>!!ACCESS DENIED HACKER!!</B>");
}
$default_template = mysql_query("SELECT * FROM xdb_settings");

if (($default_template) && ($row=mysql_fetch_array($default_template)))
{
$gzip = $row["GZIP"];
}
if ($gzip == "On"){
ob_start('ob_gzhandler');
}
else{
}
if (isset($_COOKIE['xdbuser']) && ($_COOKIE['xdbpass']))
{
include "config.php";

$user_query = mysql_query("SELECT * FROM xdb_users WHERE Username='$xdbuser'");

if (($user_query) && ($row=mysql_fetch_array($user_query)))
{
$stat = $row["Status"];
$template = $row["Template"];
$time_format = $row["Time_format"];
$gmt = $row["Time_Zone"];
}
$template_query = mysql_query("SELECT * FROM xdb_style where Name='$template'");

if (($template_query) && ($row=mysql_fetch_array($template_query)))
{
$logo = $row["Site_Logo"];
$bg_color = $row["Background"];
$text_color = $row["Text"];
$link = $row["Link"];
$vlink = $row["VLink"];
$table1 = $row["Table1"];
$table2 = $row["Table2"];
$font = $row["Font"];
$size = $row["Size"];
$border = $row["Border"];
$menu_img = $row["Menu_IMG"];
$image_path = $row["Images_Path"];
$smile_path = $row["Smile_path"];
}
}
else{
$stat = "guest";

$default_template = mysql_query("SELECT * FROM xdb_settings");

if (($default_template) && ($row=mysql_fetch_array($default_template)))
{
$default = $row["Default_Style"];
$time_format = $row["Default_Time"];
$gmt = $row["Default_Zone"];
}

$template_query = mysql_query("SELECT * FROM xdb_style where Name='$default'");

if (($template_query) && ($row=mysql_fetch_array($template_query)))
{
$logo = $row["Site_Logo"];
$bg_color = $row["Background"];
$text_color = $row["Text"];
$link = $row["Link"];
$vlink = $row["VLink"];
$table1 = $row["Table1"];
$table2 = $row["Table2"];
$font = $row["Font"];
$size = $row["Size"];
$border = $row["Border"];
$menu_img = $row["Menu_IMG"];
$image_path = $row["Images_Path"];
$smile_path = $row["Smile_path"];
}
}

$setting_query = mysql_query("SELECT * FROM xdb_settings");

if (($setting_query) && ($row=mysql_fetch_array($setting_query)))
{
$title = $row["Site_Title"];
$address = $row["Site_Address"];
$board_address = $row["Board_Address"];
$board_status = $row["Board_Status"];
$board_email = $row["Board_Email"];
$off_msg = $row["Off_Message"];
$announcements_stat = $row["Announcement_Status"];
$announcements = $row["Announcements"];
$tos = $row["TOS_Status"];
$board_rules = $row["TOS_Rules"];
$attach_stat = $row["Attachment_Status"];
$max = $row["Max_Size"];
$types = $row["Allowed_Types"];
$attach_folder = $row["Attachment_Folder"];
$avatar_folder = $row["Avatar_Folder"];
$cookie_path = $row["cookie_path"];
$cookie_domain = $row["cookie_domain"];
$cookie_secure = $row["cookie_secure"];
}

$banip_query = mysql_query("SELECT * FROM xdb_resriction");

if (($banip_query) && ($row=mysql_fetch_array($banip_query)))
{
$banip = $row["invalid_name"];
}
?>
Reply With Quote
  #4 (permalink)  
Old 12-19-04, 03:58 PM
Vulture Vulture is offline
Newbie Coder
 
Join Date: Dec 2004
Location: Scotland, UK
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Can't see anything wrong in that code, just make sure that if gzip is on, you flush the output buffer at the end of the script.
Reply With Quote
  #5 (permalink)  
Old 12-19-04, 04:06 PM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
well the issue is that its not showing up on index.php cant see why either
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Art Nexus seeking PHP programmers TheArtNexus Job Offers & Assistance 5 02-26-08 03:08 AM
Seeking Work Wraith Job Offers & Assistance 4 11-01-04 08:28 AM
Programer needed to work on PHP-nuke+wap NewTonez Job Offers & Assistance 4 08-12-04 07:21 AM
Grafix Work Submitting in PHP ports1980 PHP 1 08-09-04 11:31 AM
Programer available for work eTech James Job Offers & Assistance 0 08-02-04 01:47 PM


All times are GMT -5. The time now is 05:19 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.