Newbie Why wont they display

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Deus
Forum Newbie
Posts: 5
Joined: Mon Dec 08, 2003 8:43 pm

Newbie Why wont they display

Post by Deus »

Can anyone tell me what is wrong with this... For some reason the Frameset with the two pages will not display
here is the direct link to the page

http://www.purepockets.com/info.php?req ... gnedin=yes

here is the code : the section is bolded

<HTML>


<head>
<TITLE>PURE POCKETS~~ We Sleep,...Live,.....BREATHE.........................PocketpCs</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="KEYWORDS" content="PocketPC, Pocket PC, news, pocketpc, pocket pc, POCKETPC, POCKET PC, PDA, pda, windows ce, compaq, ipaq, hp, casio,cassiopeia, MOBILE, mobile, handheld, Handheld, Smartphone, TabletPC, Tablet PC, WiFi, Wi Fi, Wi-Fi, community" />
<meta name="DESCRIPTION" content="PurePockets - Live, ..sleep,...breathe....PocketPCs" />
<meta name="ROBOTS" content="INDEX,FOLLOW" />
<meta name="resource-type" content="document" />
<meta http-equiv="expires" content="0" />
<meta name="author" content="Wayne Mahon @ PurePockets.com" />
<meta name="revisit-after" content="1 days" />
<meta name="distribution" content="Global" />
<meta name="rating" content="General" />


<SCRIPT LANGUAGE="JavaScript">
<!--
var browser = '';
var version = '';
var entrance = '';
var cond = '';
// BROWSER?
if (browser == ''){
if (navigator.appName.indexOf('Microsoft') != -1)
browser = 'IE'
else if (navigator.appName.indexOf('Netscape') != -1)
browser = 'Netscape'
else browser = 'IE';
}
if (version == ''){
version= navigator.appVersion;
paren = version.indexOf('(');
whole_version = navigator.appVersion.substring(0,paren-1);
version = parseInt(whole_version);
}


if (browser == 'IE'){

if (screen.width == 800) {
document.write('<link rel="stylesheet" type="text/css" href="css/800.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/alt/direct.css">');
}
if (screen.width == 1024) {
document.write('<link rel="stylesheet" type="text/css" href="css/1024.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/ppcommon.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/direct.css">');
}
if (screen.width == 1152) {
document.write('<link rel="stylesheet" type="text/css" href="css/1152.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/ppcommon.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/direct.css">');
}
}

if (browser == 'Netscape'){

if (screen.width == 800) {
document.write('<link rel="stylesheet" type="text/css" href="css/ns/800.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/alt/direct.css">');
}
if (screen.width == 1024) {
document.write('<link rel="stylesheet" type="text/css" href="css/ns/1024.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/direct.css">');
}
if (screen.width == 1152) {
document.write('<link rel="stylesheet" type="text/css" href="css/ns/1152.css">');
document.write('<link rel="stylesheet" type="text/css" href="css/direct.css">');
}
}

-->
</script>




<link rel="stylesheet" href="css/roundedcorners.css" type="text/css">

<script language="JavaScript" type="text/javascript">



if (document.images) {
forumbuttonup = new Image();
forumbuttonup.src = "images/menu-forum.jpg" ;
forumbuttondown = new Image() ;
forumbuttondown.src = "images/menu-forum-glow.jpg" ;

chatbuttonup = new Image();
chatbuttonup.src = "images/menu-chat.jpg" ;
chatbuttondown = new Image() ;
chatbuttondown.src = "images/menu-chat-glow.jpg" ;

reviewsbuttonup = new Image();
reviewsbuttonup.src = "images/menu-reviews.jpg" ;
reviewsbuttondown = new Image() ;
reviewsbuttondown.src = "images/menu-reviews-glow.jpg" ;

archivesbuttonup = new Image();
archivesbuttonup.src = "images/menu-archives.jpg" ;
archivesbuttondown = new Image() ;
archivesbuttondown.src = "images/menu-archives-glow.jpg" ;

reviewbuttonup = new Image();
reviewbuttonup.src = "images/menu-review-request.jpg" ;
reviewbuttondown = new Image() ;
reviewbuttondown.src = "images/menu-review-request-glow.jpg" ;




homebuttonup = new Image();
homebuttonup.src = "images/topmenu-home.jpg" ;
homebuttondown = new Image() ;
homebuttondown.src = "images/topmenu-home2.jpg" ;

submitnewsbuttonup = new Image();
submitnewsbuttonup.src = "images/topmenu-submitnews.jpg" ;
submitnewsbuttondown = new Image() ;
submitnewsbuttondown.src = "images/topmenu-submitnews2.jpg" ;

contactusbuttonup = new Image();
contactusbuttonup.src = "images/topmenu-contactus.jpg" ;
contactusbuttondown = new Image() ;
contactusbuttondown.src = "images/topmenu-contactus2.jpg" ;

aboutusbuttonup = new Image();
aboutusbuttonup.src = "images/topmenu-aboutus.jpg" ;
aboutusbuttondown = new Image() ;
aboutusbuttondown.src = "images/topmenu-aboutus2.jpg" ;
}
function buttondown( buttonname )
{
if (document.images) {
document[ buttonname ].src = eval( buttonname + "down.src" );
}
}
function buttonup ( buttonname )
{
if (document.images) {
document[ buttonname ].src = eval( buttonname + "up.src" );
}
}

</script>

</head>


<BODY vlink=#195F89>


<DIV id="navigation">

<DIV id="page-links">

<TABLE border=0 cellpadding=o cellspacing=0><TD width=33px>
<a target='_blank' href="http://www.purepockets.com/forums" onmouseover="buttondown('forumbutton')" onmouseout="buttonup('forumbutton')">
<img src="images/menu-forum.jpg" name="forumbutton" border="0" /></a>

<a target='_blank' href="http://www.purepockets.com/chat" onmouseover="buttondown('chatbutton')" onmouseout="buttonup('chatbutton')">
<img src="images/menu-chat.jpg" name="chatbutton" border="0" /></a>

<a href="info.php?req=reviews" onmouseover="buttondown('reviewsbutton')" onmouseout="buttonup('reviewsbutton')">
<img border=0 src="images/menu-reviews.jpg" name="reviewsbutton"></a>

<a href="mailto:waynem@purepockets.com?subject=Review Request :" onmouseover="buttondown('reviewbutton')" onmouseout="buttonup('reviewbutton')"><img border=0 src="images/menu-review-request.jpg" name="reviewbutton"></a>

<a href="info.php?req=archives" onmouseover="buttondown('archivesbutton')" onmouseout="buttonup('archivesbutton')">
<img border=0 src="images/menu-archives.jpg" name="archivesbutton"></a>
</TD></TABLE>

</DIV>
<DIV id="left-container">
<DIV id="anywhere-title">


</DIV>
<DIV id="topics-anywhere">
<TABLE bgcolor=#FBF9A5 width=100% height=100% border=4><TR><TD>
<h5>
<script language="JavaScript" type="text/javascript" src="http://www.purepockets.com/forums/topic ... "></script>
</h5>
</TD></TR></TABLE>
</DIV>

<DIV id="links-title">

</DIV>
<DIV id="site-links">
<TABLE bgcolor=#FBF9A5 width=100% height=100% border=4><TR><TD align=center>
<a target='_blank' href="http://www.bostonpocketpc.com"><img border=0 src="images/advertisment/bppc_logo.gif"></a>
<a target='_blank' href="http://www.pocketpcthoughts.com"><img border=0 src="images/advertisment/ppcthoughts.gif"></a>
<a target='_blank' href="http://www.pocketpcpassion.com"><img border=0 src="images/advertisment/ppcpassion_logo.gif"></a>
<a target='_blank' href="http://www.mypdacafe.com"><img border=0 src="images/advertisment/mypdacafe.gif"></a>

<BR>
<a href="http://www.purepockets.com"><img border=0 src="images/advertisment/purepockets_logo.gif"></a>
<BR>

</TD></TR></TABLE>
</DIV>
</DIV>

</DIV>

<DIV id="search">
<form method="POST" action="info.php">
<input type=hidden value="search" name="posttype">
<input type=text name="searchtext">
<BR>
<input type=submit value="Article Search" name="submit">
</form>
</DIV>



<DIV id="main">
<a href="http://www.purepockets.com">
<DIV id="logo">
<SCRIPT LANGUAGE="JavaScript">
<!--
if (screen.width == 800) {
document.write('<embed src="images/advertisment/logo.swf" align=left pluginspage="http://www.macromedia.com/shockwave/download/" width="500" height="93" type="application/x-shockwave-flash" quality="high"></embed>');
}
if (screen.width == 1024) {
document.write('<embed src="images/advertisment/logo.swf" align=left pluginspage="http://www.macromedia.com/shockwave/download/" width="660" height="104" type="application/x-shockwave-flash" quality="high"></embed>');
}
if (screen.width == 1152) {
document.write('<embed src="images/advertisment/logo.swf" align=left pluginspage="http://www.macromedia.com/shockwave/download/" width="660" height="104" type="application/x-shockwave-flash" quality="high"></embed>');
}
-->
</script>
</DIV>
</a>
<DIV id="menu">
<a href="index.php" onmouseover="buttondown('homebutton')" onmouseout="buttonup('homebutton')"><img name="homebutton" border=0 src="images/topmenu-home.jpg"></a>

<a href="mailto:waynem@purepockets.com?subject=News Submittal (Please include source of information and non-HTML format please) :" onmouseover="buttondown('submitnewsbutton')" onmouseout="buttonup('submitnewsbutton')"><img name="submitnewsbutton" border=0 src="images/topmenu-submitnews.jpg"></a>

<a href="mailto:waynem@purepockets.com?subject=Hey PurePockets!!" onmouseover="buttondown('contactusbutton')" onmouseout="buttonup('contactusbutton')"><img name="contactusbutton" border=0 src="images/topmenu-contactus.jpg"></a>

<a href="about_us.php" onmouseover="buttondown('aboutusbutton')" onmouseout="buttonup('aboutusbutton')"><img name="aboutusbutton" border=0 src="images/topmenu-aboutus.jpg"></a>

</DIV>



<DIV id="main-page">
<DIV id="article-title">
<?php

if($_POST["posttype"]=="search"){
printf("Search results for '%s'", $_POST["searchtext"]);
}elseif($_GET['req']=="reviews"){
printf("%s", "Reviews");
}elseif($_GET['req']=="catagory"){
printf("%s Articles", $_GET['title']);
}elseif($_GET['req']=="full_article"){
printf("%s",str_replace("chr(38)","&",$_GET['title']));
}elseif($_GET['req']=="search"){
printf("%s Articles",ucfirst(strtolower($_GET["searchtext"])));
}elseif($_GET['req']=="archives"){
printf("%s", "Archived Articles : ");
echo $_GET["month"] . ' ' . $_GET["year"];
}elseif($_GET['req']=="chat"){
printf("%s", "Chat");
}
?>

</DIV>
<DIV id="infodata">
<BR><BR>
<?php


include ("supportfunctions.php");
$db=mysql_connect ("localhost", "username", "password") or die ('I cannot connect to the database because: ' . mysql_error());


// ********** THIS IS TO HANDLE CHAT****************
// **** IF STATEMENT A ******
if($_GET['req']=="chat"){
?>
<frameset cols="350,*" frameborder="2" framespacing="0">
<frame src=chat_window.php name="menu" scrolling="no" noresize>
<frame src=junk.html name="main" id="main">
</frameset>



<?php
}else{
// ****** PERFORM REGULAR FUNCTIONS ******

mysql_select_db ("purepoc_news");


if($_POST["posttype"]=="search"){
$searchtext = $_POST["searchtext"];
$result = mysql_query("SELECT * FROM articles WHERE title LIKE '%$searchtext%' ORDER BY timestamp DESC");
}elseif($_GET['req']=="search"){
$searchtext = $_GET["searchtext"];
$result = mysql_query("SELECT * FROM articles WHERE title LIKE '%$searchtext%' ORDER BY timestamp DESC");
}elseif($_GET['req']=="reviews"){
$result = mysql_query("SELECT * FROM articles WHERE type='review' ORDER BY timestamp DESC",$db);
}elseif($_GET['req']=="full_article"){
$id = $_GET["id"];
$result = mysql_query("SELECT * FROM articles WHERE id = $id",$db);

$title = strtoupper(mysql_result($result,0,"title"));
$author = mysql_result($result,0,"author");

$timestamp = timestamp2itdate(mysql_result($result,0,"timestamp"));

$summary = mysql_result($result,0,"summary");
$article = mysql_result($result,0,"article");

printf("<BR><BR><font size=2>submitted by %s ", $author);

printf("%s</font><br><br>\n",$timestamp);

printf("<p><TAB indent=5><H5>%s</H5><br>\n", $summary);
printf("<br><H5>%s</H5>",$article);

}elseif($_GET['req']=="catagory"){
$catagory = ($_GET['cat']);
$result = mysql_query("SELECT * FROM articles WHERE type='$catagory' ORDER BY timestamp DESC",$db);
}elseif($_GET['req']=="archives"){
?>
<FORM action="info.php?req=archives" method="get">
<input type=hidden name="req" value="archives">
Year
<select name="year">
<?php
$yy = $_GET["year"];
printf("<option value='$yy'>$yy</option>");
$year = 2003;
$lastyear = date("Y");
while ($year <= $lastyear){
printf("<option value='$year'>$year</option>");
$year++;
}
?></select>
Month
<select name="month">
<?php
$mm = $_GET["month"];
if ($mm == ""){
printf("<option value=''></option>");
$month = array(January,February,March,April,May,June,July,August,September,October,November,December);
}else{
$month = array($mm,January,February,March,April,May,June,July,August,September,October,November,December);
}
$current = 0;
while ($month[$current]){
printf("<option value='$month[$current]'>$month[$current]</option>");
$current++;
}
?>
<input type=submit value="Submit">
</select>
<FONT COLOR=#2966F1>Queries May be for Year, Month or Both</FONT>
</FORM>
<?php
$sqlstmt = "SELECT * FROM articles";
if ($yy == '' & $mm == ''){
$sqlstmt = $sqlstmt . " WHERE YEAR(timestamp) LIKE '0000' ORDER BY timestamp DESC";
}elseif($yy == ''){
$sqlstmt = $sqlstmt . " WHERE MONTHNAME(timestamp) LIKE '$mm' ORDER BY timestamp DESC";
}elseif($mm == ''){
$sqlstmt = $sqlstmt . " WHERE YEAR(timestamp) LIKE '$yy' ORDER BY timestamp DESC";
}else{
$sqlstmt = $sqlstmt . " WHERE YEAR(timestamp) LIKE '$yy' AND MONTHNAME(timestamp) LIKE '$mm' ORDER BY timestamp DESC";
}
$result = mysql_query($sqlstmt,$db);
}



$x = 0;
$sa = 0;

while ($myrow = mysql_fetch_row($result)) {

$ucase_title = strtoupper (mysql_result($result,$x,"title"));

$url_title = str_replace(" ","+",$ucase_title);
$url_title = str_replace("&","chr(38)",$url_title);

$newdate = timestamp2itdate(mysql_result($result,$x,"timestamp"));
$id = mysql_result($result,$x,"id");
$hypedstory = hyperlink("read the full story...","info.php?req=full_article&id=$id&title=$url_title");
$article = mysql_result($result,$x,"article");
$discussion = mysql_result($result,$x,"discussion");
?>
<BR><BR>
<?php
$hypedstory = hyperlink($ucase_title,"info.php?req=full_article&id=$id&title=$url_title");
printf("%s", $hypedstory);
?><BR><?php
printf(" %s", $newdate);
?><BR><?php
$x++;

}
?>
<BR><BR><BR>
<?php } ?>
<!--**** END IF STATEMENT A ****** -->
</DIV>
</DIV>


</DIV>



</BODY>
</HTML>
Deus
Forum Newbie
Posts: 5
Joined: Mon Dec 08, 2003 8:43 pm

Post by Deus »

Anyone?? Desperate here...

Thanks
Post Reply