Page 1 of 1

The following displays some wierd output

Posted: Mon Nov 11, 2002 4:56 pm
by Little Spy
I started on a new script today and wrote the following. What I got was far from expected....

Code: Select all

<?php
// #######################################
// Ice Box - Site Manager
// #######################################

require_once("global.php");

if (!isset($action)) &#123; $action = ""; &#125;

if ($action == "") &#123;
   echo "<html>\n";
   echo "<head>\n";
   echo "<title>".$sitename." - Control Panel</title>\n";
   echo "</head>\n";
   echo "<frameset rows="22,*" framespacing="0" border="0" frameborder="0">\n";
   echo "  <frame name="top" scrolling="no" noresize target="contents" src="index.php?action=top" marginwidth="0" marginheight="0">\n";
   echo "  <frameset cols="160,*">\n";
   echo "    <frame name="nav" src="index.php?action=nav">\n";
   echo "    <frame name="main" src="index.php?action=main" marginwidth="0" marginheight="0" scrolling="auto">\n";
   echo "  </frameset>\n";
   echo "</frameset>\n";
   echo "</html>";
&#125;
if ($action == "top") &#123;
   echo "<html>\n";
   echo "<head>\n";
   echo "</head>\n";
   echo "  <body bgcolor="#202931" topmargin="0" leftmargin="0">\n";
   echo " <table border="0" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1005">\n";
   echo "  <tr>\n";
   echo "    <td width="647" height="1">\n";
   echo "<b><font face="Verdana" size="1" color="#BDDCB4">".$sitename."</font></b><font face="Verdana" size=1 color="#BDDCB4"><b>\n";
   echo "- Site Control Panel</b></font></td>\n";
   echo "    <td width="342" height="1" align="right">\n";
   echo " <font face="Verdana" size=1 color=#BDDCB4>\n";
   echo "<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n";
   echo "<a style="text-decoration: none" target="_blank" href="".$siteurl.""> <font color="#BDDCB4">Go To Site Now</font></a></b></font></td>\n";
   echo "  </tr>\n";
   echo "</table>\n";
   echo "</body>\n";
   echo "</html>";
&#125;
if ($action == "nav") &#123;
   echo "<html>\n";
   echo "<head>\n";
   echo "<style>\n";
   echo "a:link		&#123;COLOR: #BDDCB4; TEXT-DECORATION: none&#125;\n";
   echo "a:visited	&#123;COLOR: #BDDCB4; TEXT-DECORATION: none&#125;\n";
   echo "a:hover		&#123;COLOR: #F7CB19; BACKGROUND-COLOR: #202931&#125;\n";
   echo "a:active	&#123;COLOR: #F7CB19; BACKGROUND-COLOR: #202931&#125;\n";
   echo "</style>\n";
   echo "</head>\n";
   echo "<body bgcolor="#425766">\n";
   echo "<BASE TARGET="main">\n";
   echo "  <p>\n";
   echo "  <font size="2" color="#869C80" face="Verdana"><b>Manage Users</b></font><font size="1" color="#869C80" face="Verdana"><br>\n";
   echo "  &nbsp;</font><font face="Verdana" color="#BDDCB4" size="1"><a href="user.php?action=add_user">Add</a><br>\n";
   echo "  &nbsp;<a href="user.php?action=modify_user">Modify</a><br>\n";
   echo "  &nbsp;<a href="user.php?action=delete_user">Delete</a></font><p>\n";
   echo "  <b><font face="Verdana" size="2" color="#869C80">Menu</font></b><font size="1" color="#869C80" face="Verdana"><br>\n";
   echo "  &nbsp;</font><font face="Verdana" color="#BDDCB4" size="1">Item<br>\n";
   echo "&nbsp;Item<br>\n";
   echo "&nbsp;Item<br>\n";
   echo "&nbsp;Item</font><p>\n";
   echo "  <b><font face="Verdana" size="2" color="#869C80">Menu</font></b><font size="1" color="#869C80" face="Verdana"><br>\n";
   echo "  &nbsp;</font><font face="Verdana" color="#BDDCB4" size="1">Item<br>\n";
   echo "&nbsp;Item<br>\n";
   echo "&nbsp;Item<br>\n";
   echo "&nbsp;Item</font><font size="2" color="#869C80" face="Verdana"><br>\n";
   echo "  <font size="2">\n";
   echo "  <br></font></font>\n";
   echo "  <font size="2">\n";
   echo "  <font size="2" face="Verdana" color="#BDDCB4">\n";
   echo "  <a href="index.php?action=logout">Logout</a>\n";
   echo "</body>\n";
   echo "</html>";
&#125;
if ($action = "main") &#123;
   echo "<html>\n";
   echo "<head>\n";
   echo "<title>Control Panel</title>\n";
   echo "<base target="_self">\n";
   echo "<style>\n";
   echo "	td &#123; font-family: Verdana; font-size: 12px; text-align: left color: #202931; &#125;\n";
   echo "	p &#123; font-family: Verdana; font-size: 12px; &#125;\n";
   echo "	a:link		&#123;COLOR: #374A57; TEXT-DECORATION: none; font-family: "Verdana"; &#125;\n";
   echo "	a:visited	&#123;COLOR: #374A57; TEXT-DECORATION: none; &#125;\n";
   echo "	a:hover		&#123;COLOR: #F7CB19; BACKGROUND-COLOR: #202931; &#125;\n";
   echo "	a:active	&#123;COLOR: #F7CB19; BACKGROUND-COLOR: #202931; &#125;\n";
   echo "	FORM		&#123;FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif; FONT-SIZE: 10px; &#125;\n";
   echo "	SELECT		&#123;FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif; COLOR: #51485F; FONT-SIZE: 10px; &#125;\n";
   echo "	INPUT		&#123;FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif; COLOR: #51485F; FONT-SIZE: 10px; &#125;\n";
   echo "	TEXTAREA	&#123;FONT-FAMILY: Verdana,Arial,Helvetica,sans-serif; COLOR: #51485F; FONT-SIZE: 10px; &#125;\n";
   echo "	.tbl_caption &#123; background-color: #425766; color: #F7CB19; font-size: 9px; font-weight : bold; &#125;\n";
   echo "	.tbl_border &#123; background-color: #425766; &#125;\n";
   echo "	.tbl_light &#123; background-color: #CACFC8; &#125;\n";
   echo "	.tbl_dark &#123; background-color: #C0C7BD; &#125;\n";
   echo "	.button &#123; background-color: #425766; color: #F7CB19; font-size: 9px; font-weight : bold; &#125;\n\n";
   echo "</style>\n";
   echo "</head>\n";
   echo "<body bgcolor="#C1C7BF" topmargin="10" leftmargin="10">\n";
   echo "Nothing";
&#125;
?>

Posted: Mon Nov 11, 2002 5:07 pm
by volka
started on a new script today and wrote the following. What I got was far from expected....
what did you expect and what did you get?

Posted: Mon Nov 11, 2002 7:17 pm
by Little Spy
run the code yourself or go here http://www.saiyanextreme.com/icebox to see

Posted: Mon Nov 11, 2002 7:28 pm
by volka
maybe all you have to do is changing this

Code: Select all

if ($action = "main") {
to

Code: Select all

if ($action == "main") {