jamesxg1 Posted March 5, 2009 Share Posted March 5, 2009 <?php session_start(); error_reporting (E_ALL | E_NOTICE); error_reporting(E_ALL | E_STRICT); require("db/db.php"); require("smiley.php"); $sql = "SELECT * FROM `settings`"; $query = mysql_query($sql); while ($settings = mysql_fetch_assoc($query)) { $sitetitle = $settings['sitetitle']; $companyname = $settings['companyname']; $welcomename = $settings['welcomename']; $vone = smiley($settings['vone']); $vtwo = smiley($settings['vtwo']); $vthree = smiley($settings['vthree']); $sitefooter = smiley($settings['sitefooter']); $newsletterdet = smiley($settings['newsletterdet']); $newsletterunset = $settings['newsletterunset']; $newsletterset = $settings['newsletterset']; $sitebanner = smiley($settings['sitebanner']); $siteurl = $settings['siteurl']; } ?> <html> <head> <title><?php print $sitetitle ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="template/css/styles.css" type="text/css"> <script src="jquery.js" type="text/javascript"></script> <link href="template/facebox/facebox.css" media="screen" rel="stylesheet" type="text/css"/> <script src="template/facebox/facebox.js" type="text/javascript"></script> <script type="text/javascript" charset="utf-8"> jQuery(document).ready(function($) { $('a[rel*=facebox]').facebox() }) </script> </head> <body bgcolor="#EEEEEE" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0")"> <table width="770" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td style="padding-left:25px" bgcolor="#FF9900" height="100" class="logo"><?php print $companyname ?></td> </tr> <tr> <td background="template/images/top01.gif" height="23" align="center" class="menu"> <?php $count = 0; $query = mysql_query("SELECT * FROM menu ORDER BY position ASC") or die(mysql_error()); while ($row = mysql_fetch_object($query)) { if ($count!=0){echo " || ";} echo "<a href=\"$row->link\" alt=\"$row->name\" class=\"menu\">".$row->name."</a>"; $count++; } ?> <?php if($_SESSION['logged'] == '1') { print(" || <a href='$siteurl/admin/addmenuitem.php' class='menu' rel='facebox'>Add Link</a>"); print(" || <a href='$siteurl/admin/menuaccs.php' class='menu' rel='facebox'>Delete Link</a>"); print(" || <a href='$siteurl/admin/logout.php' class='menu'>Logout</a>"); } ?> </td> </tr> </table> <table width="770" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="15"> <tr> <td class="title" height="60" background="template/images/title_bg.gif" align="right"><?php print $welcomename ?></td> </tr> <tr> <td valign="top" class="text"> <p><font color="#333333"><img src="template/images/bullet.gif" width="10" height="8"></font><?php print $vone ?> <?php if($_SESSION['logged'] == '1') { print("<a href='admin/vone.php' rel='facebox'>Edit Paragraph</a>"); } ?> </p> <p><font color="#333333"><img src="template/images/bullet.gif" width="10" height="8"></font><?php print $vtwo ?> <?php if($_SESSION['logged'] == '1') { print("<a href='admin/vtwo.php' rel='facebox'>Edit Paragraph</a>"); } ?> </p> <p><font color="#333333"><img src="template/images/bullet.gif" width="10" height="8"></font><?php print $vthree ?> <?php if($_SESSION['logged'] == '1') { print("<a href='admin/vthree.php' rel='facebox'>Edit Paragraph</a>"); } ?> </p> <p><?php print $sitebanner ?></p> </td> </tr> </table> </td> <td width="191" bgcolor="#E5E5E5" valign="top"><img src="template/images/top02.gif" width="191" height="87"><br> <table width="150" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top" height="50" class="text"><b><?php print $newsletterdet ?></b></td></tr> <tr><td valign="top" height="50" class="text"><?php if($_SESSION['logged'] == '1') { print("<a href='admin/newsletterdet.php' rel='facebox'>Edit Area</a>"); } ?></tr></td> <?php if($newsletterset == 'Y') { print("<tr><td valign='bottom' height='40'><font size='1' color='#666666' face='Verdana, Arial, Helvetica, sans-serif'><img src='template/images/newsletter.gif' width='122' height='21'></font></td></tr><tr><td valign='top' height='50'><table width='100%' border='0' cellspacing='0' cellpadding='0'><form action='newsletter.php' method='post'><tr><td class='text'><font size='1'>Your E-mail Address</font><br><input type='text' name='email' id='email' size='18'></td></tr><tr><td height='38'><input type='image' border='0' name='imageField' src='template/images/btn_submit.gif' width='58' height='19'>"); } if($newsletterset == 'N') { print("<tr><td class='text'>Admin Has Disabled The Newletter Function!."); } if($_SESSION['logged'] == '1') { print("<br><a href='admin/newsletter.php' rel='facebox'>Show The Newsletter ?</a>"); } ?></td></tr> </form> </table> </td> </tr> </table> </td> </tr> </table> <table width="770" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td><img src="template/images/bottom_01.gif" width="770" height="6"></td> </tr> <tr> <td bgcolor="#E5E5E5" height="40" align="center"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#999999"><?php print $sitefooter ?> <br> <?php if($_SESSION['logged'] == '1') { print("<a href='admin/welcomename.php' rel='facebox'>Edit Welcome Text</a> || "); print("<a href='admin/sitetitle.php' rel='facebox'>Edit Site Title</a> || "); print("<a href='admin/companyname.php' rel='facebox'>Edit Company Name</a> || "); } ?> </font></td> </tr> </table> </body> </html> Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 79 Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 84 Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 89 Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 121 Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 103 Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 59 Can anyone help with this ? Quote Link to comment Share on other sites More sharing options...
phpretard Posted March 5, 2009 Share Posted March 5, 2009 take away error_reporting (E_ALL | E_NOTICE); error_reporting(E_ALL | E_STRICT); Quote Link to comment Share on other sites More sharing options...
rs_nayr Posted March 5, 2009 Share Posted March 5, 2009 i encounter that before,, just put this code on the top of your page error_reporting(E_ALL ^ E_NOTICE); Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted March 5, 2009 Author Share Posted March 5, 2009 take away error_reporting (E_ALL | E_NOTICE); error_reporting(E_ALL | E_STRICT); i would but i need that there as i would like to sort out any errors i have so the page is 100% clean :S, any ideas on how to fix this ? Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted March 5, 2009 Author Share Posted March 5, 2009 <?php session_start(); error_reporting (E_ALL | E_NOTICE); error_reporting(E_ALL | E_STRICT); error_reporting(E_ALL ^ E_NOTICE); require("db/db.php"); require("smiley.php"); $sql = "SELECT * FROM `settings`"; $query = mysql_query($sql); while ($settings = mysql_fetch_assoc($query)) { $sitetitle = $settings['sitetitle']; $companyname = $settings['companyname']; $welcomename = $settings['welcomename']; $vone = smiley($settings['vone']); $vtwo = smiley($settings['vtwo']); $vthree = smiley($settings['vthree']); $sitefooter = smiley($settings['sitefooter']); $newsletterdet = smiley($settings['newsletterdet']); $newsletterunset = $settings['newsletterunset']; $newsletterset = $settings['newsletterset']; $sitebanner = smiley($settings['sitebanner']); $siteurl = $settings['siteurl']; } ?> <html> <head> <title><?php print $sitetitle ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="template/css/styles.css" type="text/css"> <script src="jquery.js" type="text/javascript"></script> <link href="template/facebox/facebox.css" media="screen" rel="stylesheet" type="text/css"/> <script src="template/facebox/facebox.js" type="text/javascript"></script> <script type="text/javascript" charset="utf-8"> jQuery(document).ready(function($) { $('a[rel*=facebox]').facebox() }) </script> </head> <body bgcolor="#EEEEEE" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0")"> <table width="770" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td style="padding-left:25px" bgcolor="#FF9900" height="100" class="logo"><?php print $companyname ?></td> </tr> <tr> <td background="template/images/top01.gif" height="23" align="center" class="menu"> <?php $count = 0; $query = mysql_query("SELECT * FROM menu ORDER BY position ASC") or die(mysql_error()); while ($row = mysql_fetch_object($query)) { if ($count!=0){echo " || ";} echo "<a href=\"$row->link\" alt=\"$row->name\" class=\"menu\">".$row->name."</a>"; $count++; } ?> <?php if($_SESSION['logged'] == '1') { print(" || <a href='$siteurl/admin/addmenuitem.php' class='menu' rel='facebox'>Add Link</a>"); print(" || <a href='$siteurl/admin/menuaccs.php' class='menu' rel='facebox'>Delete Link</a>"); print(" || <a href='$siteurl/admin/logout.php' class='menu'>Logout</a>"); } ?> </td> </tr> </table> <table width="770" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="15"> <tr> <td class="title" height="60" background="template/images/title_bg.gif" align="right"><?php print $welcomename ?></td> </tr> <tr> <td valign="top" class="text"> <p><font color="#333333"><img src="template/images/bullet.gif" width="10" height="8"></font><?php print $vone ?> <?php if($_SESSION['logged'] == '1') { print("<a href='admin/vone.php' rel='facebox'>Edit Paragraph</a>"); } ?> </p> <p><font color="#333333"><img src="template/images/bullet.gif" width="10" height="8"></font><?php print $vtwo ?> <?php if($_SESSION['logged'] == '1') { print("<a href='admin/vtwo.php' rel='facebox'>Edit Paragraph</a>"); } ?> </p> <p><font color="#333333"><img src="template/images/bullet.gif" width="10" height="8"></font><?php print $vthree ?> <?php if($_SESSION['logged'] == '1') { print("<a href='admin/vthree.php' rel='facebox'>Edit Paragraph</a>"); } ?> </p> <p><?php print $sitebanner ?></p> </td> </tr> </table> </td> <td width="191" bgcolor="#E5E5E5" valign="top"><img src="template/images/top02.gif" width="191" height="87"><br> <table width="150" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top" height="50" class="text"><b><?php print $newsletterdet ?></b></td></tr> <tr><td valign="top" height="50" class="text"><?php if($_SESSION['logged'] == '1') { print("<a href='admin/newsletterdet.php' rel='facebox'>Edit Area</a>"); } ?></tr></td> <?php if($newsletterset == 'Y') { print("<tr><td valign='bottom' height='40'><font size='1' color='#666666' face='Verdana, Arial, Helvetica, sans-serif'><img src='template/images/newsletter.gif' width='122' height='21'></font></td></tr><tr><td valign='top' height='50'><table width='100%' border='0' cellspacing='0' cellpadding='0'><form action='newsletter.php' method='post'><tr><td class='text'><font size='1'>Your E-mail Address</font><br><input type='text' name='email' id='email' size='18'></td></tr><tr><td height='38'><input type='image' border='0' name='imageField' src='template/images/btn_submit.gif' width='58' height='19'>"); } if($newsletterset == 'N') { print("<tr><td class='text'>Admin Has Disabled The Newletter Function!."); } if($_SESSION['logged'] == '1') { print("<br><a href='admin/newsletter.php' rel='facebox'>Show The Newsletter ?</a>"); } ?></td></tr> </form> </table> </td> </tr> </table> </td> </tr> </table> <table width="770" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td><img src="template/images/bottom_01.gif" width="770" height="6"></td> </tr> <tr> <td bgcolor="#E5E5E5" height="40" align="center"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#999999"><?php print $sitefooter ?> <br> <?php if($_SESSION['logged'] == '1') { print("<a href='admin/welcomename.php' rel='facebox'>Edit Welcome Text</a> || "); print("<a href='admin/sitetitle.php' rel='facebox'>Edit Site Title</a> || "); print("<a href='admin/companyname.php' rel='facebox'>Edit Company Name</a> || "); } ?> </font></td> </tr> </table> </body> </html> Done i now get Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 79 Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 84 Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 89 Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 121 Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 103 Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 59 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 31 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 32 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 31 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 32 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 31 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 32 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 31 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 32 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 31 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 32 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 31 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 32 Quote Link to comment Share on other sites More sharing options...
kickstart Posted March 5, 2009 Share Posted March 5, 2009 Hi I would check the $_SESSION['logged'] exists first. Possible solution would be to replace the checks of it with something like:- if(((array_key_exists($_SESSION['logged'])) ? (($_SESSION['logged'] == 1) ? true : false ) : false) ) or you could use similar code once at the top and set a variable which you can check instead. All the best Keith Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted March 5, 2009 Author Share Posted March 5, 2009 Hi I would check the $_SESSION['logged'] exists first. Possible solution would be to replace the checks of it with something like:- if(((array_key_exists($_SESSION['logged'])) ? (($_SESSION['logged'] == 1) ? true : false ) : false) ) or you could use similar code once at the top and set a variable which you can check instead. All the best Keith ok so how do i put this on the page im not very good with arrays ? Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted March 5, 2009 Author Share Posted March 5, 2009 someone please help its urgent Quote Link to comment Share on other sites More sharing options...
kickstart Posted March 5, 2009 Share Posted March 5, 2009 Hi $_SESSION is an array, containing all the session variables. Thus if you are checking for a session variable that does not exist you trigger an array error. Think this should do it and get rid of the array index errors <?php session_start(); error_reporting (E_ALL | E_NOTICE); error_reporting(E_ALL | E_STRICT); error_reporting(E_ALL ^ E_NOTICE); require("db/db.php"); require("smiley.php"); $Session_Logged = ((array_key_exists($_SESSION['logged'])) ? (($_SESSION['logged'] == 1) ? true : false ) : false); $sql = "SELECT * FROM `settings`"; $query = mysql_query($sql); while ($settings = mysql_fetch_assoc($query)) { $sitetitle = $settings['sitetitle']; $companyname = $settings['companyname']; $welcomename = $settings['welcomename']; $vone = smiley($settings['vone']); $vtwo = smiley($settings['vtwo']); $vthree = smiley($settings['vthree']); $sitefooter = smiley($settings['sitefooter']); $newsletterdet = smiley($settings['newsletterdet']); $newsletterunset = $settings['newsletterunset']; $newsletterset = $settings['newsletterset']; $sitebanner = smiley($settings['sitebanner']); $siteurl = $settings['siteurl']; } ?> <html> <head> <title><?php print $sitetitle ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="template/css/styles.css" type="text/css"> <script src="jquery.js" type="text/javascript"></script> <link href="template/facebox/facebox.css" media="screen" rel="stylesheet" type="text/css"/> <script src="template/facebox/facebox.js" type="text/javascript"></script> <script type="text/javascript" charset="utf-8"> jQuery(document).ready(function($) { $('a[rel*=facebox]').facebox() }) </script> </head> <body bgcolor="#EEEEEE" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0")"> <table width="770" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td style="padding-left:25px" bgcolor="#FF9900" height="100" class="logo"><?php print $companyname ?></td> </tr> <tr> <td background="template/images/top01.gif" height="23" align="center" class="menu"> <?php $count = 0; $query = mysql_query("SELECT * FROM menu ORDER BY position ASC") or die(mysql_error()); while ($row = mysql_fetch_object($query)) { if ($count!=0){echo " || ";} echo "<a href=\"$row->link\" alt=\"$row->name\" class=\"menu\">".$row->name."</a>"; $count++; } ?> <?php if($Session_Logged) { print(" || <a href='$siteurl/admin/addmenuitem.php' class='menu' rel='facebox'>Add Link</a>"); print(" || <a href='$siteurl/admin/menuaccs.php' class='menu' rel='facebox'>Delete Link</a>"); print(" || <a href='$siteurl/admin/logout.php' class='menu'>Logout</a>"); } ?> </td> </tr> </table> <table width="770" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="15"> <tr> <td class="title" height="60" background="template/images/title_bg.gif" align="right"><?php print $welcomename ?></td> </tr> <tr> <td valign="top" class="text"> <p><font color="#333333"><img src="template/images/bullet.gif" width="10" height="8"></font><?php print $vone ?> <?php if($Session_Logged) { print("<a href='admin/vone.php' rel='facebox'>Edit Paragraph</a>"); } ?> </p> <p><font color="#333333"><img src="template/images/bullet.gif" width="10" height="8"></font><?php print $vtwo ?> <?php if($Session_Logged) { print("<a href='admin/vtwo.php' rel='facebox'>Edit Paragraph</a>"); } ?> </p> <p><font color="#333333"><img src="template/images/bullet.gif" width="10" height="8"></font><?php print $vthree ?> <?php if($Session_Logged) { print("<a href='admin/vthree.php' rel='facebox'>Edit Paragraph</a>"); } ?> </p> <p><?php print $sitebanner ?></p> </td> </tr> </table> </td> <td width="191" bgcolor="#E5E5E5" valign="top"><img src="template/images/top02.gif" width="191" height="87"><br> <table width="150" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top" height="50" class="text"><b><?php print $newsletterdet ?></b></td></tr> <tr><td valign="top" height="50" class="text"><?php if($Session_Logged) { print("<a href='admin/newsletterdet.php' rel='facebox'>Edit Area</a>"); } ?></tr></td> <?php if($newsletterset == 'Y') { print("<tr><td valign='bottom' height='40'><font size='1' color='#666666' face='Verdana, Arial, Helvetica, sans-serif'><img src='template/images/newsletter.gif' width='122' height='21'></font></td></tr><tr><td valign='top' height='50'><table width='100%' border='0' cellspacing='0' cellpadding='0'><form action='newsletter.php' method='post'><tr><td class='text'><font size='1'>Your E-mail Address</font><br><input type='text' name='email' id='email' size='18'></td></tr><tr><td height='38'><input type='image' border='0' name='imageField' src='template/images/btn_submit.gif' width='58' height='19'>"); } if($newsletterset == 'N') { print("<tr><td class='text'>Admin Has Disabled The Newletter Function!."); } if($Session_Logged) { print("<br><a href='admin/newsletter.php' rel='facebox'>Show The Newsletter ?</a>"); } ?></td></tr> </form> </table> </td> </tr> </table> </td> </tr> </table> <table width="770" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td><img src="template/images/bottom_01.gif" width="770" height="6"></td> </tr> <tr> <td bgcolor="#E5E5E5" height="40" align="center"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#999999"><?php print $sitefooter ?> <br> <?php if($Session_Logged) { print("<a href='admin/welcomename.php' rel='facebox'>Edit Welcome Text</a> || "); print("<a href='admin/sitetitle.php' rel='facebox'>Edit Site Title</a> || "); print("<a href='admin/companyname.php' rel='facebox'>Edit Company Name</a> || "); } ?> </font></td> </tr> </table> </body> </html> All the best Keith Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted March 5, 2009 Author Share Posted March 5, 2009 Hi $_SESSION is an array, containing all the session variables. Thus if you are checking for a session variable that does not exist you trigger an array error. Think this should do it and get rid of the array index errors <?php session_start(); error_reporting (E_ALL | E_NOTICE); error_reporting(E_ALL | E_STRICT); error_reporting(E_ALL ^ E_NOTICE); require("db/db.php"); require("smiley.php"); $Session_Logged = ((array_key_exists($_SESSION['logged'])) ? (($_SESSION['logged'] == 1) ? true : false ) : false); $sql = "SELECT * FROM `settings`"; $query = mysql_query($sql); while ($settings = mysql_fetch_assoc($query)) { $sitetitle = $settings['sitetitle']; $companyname = $settings['companyname']; $welcomename = $settings['welcomename']; $vone = smiley($settings['vone']); $vtwo = smiley($settings['vtwo']); $vthree = smiley($settings['vthree']); $sitefooter = smiley($settings['sitefooter']); $newsletterdet = smiley($settings['newsletterdet']); $newsletterunset = $settings['newsletterunset']; $newsletterset = $settings['newsletterset']; $sitebanner = smiley($settings['sitebanner']); $siteurl = $settings['siteurl']; } ?> <html> <head> <title><?php print $sitetitle ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="template/css/styles.css" type="text/css"> <script src="jquery.js" type="text/javascript"></script> <link href="template/facebox/facebox.css" media="screen" rel="stylesheet" type="text/css"/> <script src="template/facebox/facebox.js" type="text/javascript"></script> <script type="text/javascript" charset="utf-8"> jQuery(document).ready(function($) { $('a[rel*=facebox]').facebox() }) </script> </head> <body bgcolor="#EEEEEE" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0")"> <table width="770" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td style="padding-left:25px" bgcolor="#FF9900" height="100" class="logo"><?php print $companyname ?></td> </tr> <tr> <td background="template/images/top01.gif" height="23" align="center" class="menu"> <?php $count = 0; $query = mysql_query("SELECT * FROM menu ORDER BY position ASC") or die(mysql_error()); while ($row = mysql_fetch_object($query)) { if ($count!=0){echo " || ";} echo "<a href=\"$row->link\" alt=\"$row->name\" class=\"menu\">".$row->name."</a>"; $count++; } ?> <?php if($Session_Logged) { print(" || <a href='$siteurl/admin/addmenuitem.php' class='menu' rel='facebox'>Add Link</a>"); print(" || <a href='$siteurl/admin/menuaccs.php' class='menu' rel='facebox'>Delete Link</a>"); print(" || <a href='$siteurl/admin/logout.php' class='menu'>Logout</a>"); } ?> </td> </tr> </table> <table width="770" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="15"> <tr> <td class="title" height="60" background="template/images/title_bg.gif" align="right"><?php print $welcomename ?></td> </tr> <tr> <td valign="top" class="text"> <p><font color="#333333"><img src="template/images/bullet.gif" width="10" height="8"></font><?php print $vone ?> <?php if($Session_Logged) { print("<a href='admin/vone.php' rel='facebox'>Edit Paragraph</a>"); } ?> </p> <p><font color="#333333"><img src="template/images/bullet.gif" width="10" height="8"></font><?php print $vtwo ?> <?php if($Session_Logged) { print("<a href='admin/vtwo.php' rel='facebox'>Edit Paragraph</a>"); } ?> </p> <p><font color="#333333"><img src="template/images/bullet.gif" width="10" height="8"></font><?php print $vthree ?> <?php if($Session_Logged) { print("<a href='admin/vthree.php' rel='facebox'>Edit Paragraph</a>"); } ?> </p> <p><?php print $sitebanner ?></p> </td> </tr> </table> </td> <td width="191" bgcolor="#E5E5E5" valign="top"><img src="template/images/top02.gif" width="191" height="87"><br> <table width="150" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top" height="50" class="text"><b><?php print $newsletterdet ?></b></td></tr> <tr><td valign="top" height="50" class="text"><?php if($Session_Logged) { print("<a href='admin/newsletterdet.php' rel='facebox'>Edit Area</a>"); } ?></tr></td> <?php if($newsletterset == 'Y') { print("<tr><td valign='bottom' height='40'><font size='1' color='#666666' face='Verdana, Arial, Helvetica, sans-serif'><img src='template/images/newsletter.gif' width='122' height='21'></font></td></tr><tr><td valign='top' height='50'><table width='100%' border='0' cellspacing='0' cellpadding='0'><form action='newsletter.php' method='post'><tr><td class='text'><font size='1'>Your E-mail Address</font><br><input type='text' name='email' id='email' size='18'></td></tr><tr><td height='38'><input type='image' border='0' name='imageField' src='template/images/btn_submit.gif' width='58' height='19'>"); } if($newsletterset == 'N') { print("<tr><td class='text'>Admin Has Disabled The Newletter Function!."); } if($Session_Logged) { print("<br><a href='admin/newsletter.php' rel='facebox'>Show The Newsletter ?</a>"); } ?></td></tr> </form> </table> </td> </tr> </table> </td> </tr> </table> <table width="770" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td><img src="template/images/bottom_01.gif" width="770" height="6"></td> </tr> <tr> <td bgcolor="#E5E5E5" height="40" align="center"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#999999"><?php print $sitefooter ?> <br> <?php if($Session_Logged) { print("<a href='admin/welcomename.php' rel='facebox'>Edit Welcome Text</a> || "); print("<a href='admin/sitetitle.php' rel='facebox'>Edit Site Title</a> || "); print("<a href='admin/companyname.php' rel='facebox'>Edit Company Name</a> || "); } ?> </font></td> </tr> </table> </body> </html> All the best Keith Thankyou very much mate, But unfortunetly it doesnt work , if i was to include() my login script will this solve the problem ? Quote Link to comment Share on other sites More sharing options...
kickstart Posted March 5, 2009 Share Posted March 5, 2009 Hi What are the errors you are getting now? All the best Keith Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted March 5, 2009 Author Share Posted March 5, 2009 Hi What are the errors you are getting now? All the best Keith Notice: Undefined index: logged in C:\xampp\htdocs\simple\index.php on line 12 Warning: Wrong parameter count for array_key_exists() in C:\xampp\htdocs\simple\index.php on line 12 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 31 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 32 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 31 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 32 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 31 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 32 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 31 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 32 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 31 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 32 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 31 Warning: ereg_replace() [function.ereg-replace]: REG_EPAREN in C:\xampp\htdocs\simple\smiley.php on line 32 Quote Link to comment Share on other sites More sharing options...
kickstart Posted March 5, 2009 Share Posted March 5, 2009 Hi First pair of errors are my fault. Change the line to:- $Session_Logged = ((array_key_exists('logged',$_SESSION)) ? (($_SESSION['logged'] == 1) ? true : false ) : false); The other errors are in the included smiley.php. Would need to see that (although I am useless with regular expressions so not certain I can help). All the best Keith Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted March 5, 2009 Author Share Posted March 5, 2009 Hi First pair of errors are my fault. Change the line to:- $Session_Logged = ((array_key_exists('logged',$_SESSION)) ? (($_SESSION['logged'] == 1) ? true : false ) : false); The other errors are in the included smiley.php. Would need to see that (although I am useless with regular expressions so not certain I can help). All the best Keith Worked!!, thanks mate perfect your a (*) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.