ZeroLeon Posted May 2, 2007 Share Posted May 2, 2007 Hello There! I'm have little problem with php scripting on my site's layout. I have php scripts on my site's layout, and they work great, however, each time i try adding a loginscript on my layout, i notice the fact that when i test the page out, that it almost completely removes all the tables and object on the page. I did check out the code of my layout, and fixed errors, but still .. How do i fix this problem? (sorry for my grammar) ThankZ! Link to comment https://forums.phpfreaks.com/topic/49700-php-script-layout-problem/ Share on other sites More sharing options...
mpharo Posted May 2, 2007 Share Posted May 2, 2007 You will need to post your code to get any help, also with what you want the layout to look like and how it currently looks... Link to comment https://forums.phpfreaks.com/topic/49700-php-script-layout-problem/#findComment-243720 Share on other sites More sharing options...
ZeroLeon Posted May 2, 2007 Author Share Posted May 2, 2007 This is the Login Form. <? /** * Main.php * * This is an example of the main page of a website. Here * users will be able to login. However, like on most sites * the login form doesn't just have to be on the main page, * but re-appear on subsequent pages, depending on whether * the user has logged in or not. * * Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC) * Last Updated: August 26, 2004 */ include("include/session.php"); ?> <html> <title>Jpmaster77's Login Script</title> <body> <table bordercolor="#000000" bgcolor="#3399FF"> <tr><td> <? /** * User has already logged in, so display relavent links, including * a link to the admin center if the user is an administrator. */ if($session->logged_in){ echo "<h1>Logged In</h1>"; echo "Welcome <b>$session->username</b>, you are logged in. <br><br>" ."[<a href=\"userinfo.php?user=$session->username\">My Account</a>] " ."[<a href=\"useredit.php\">Edit Account</a>] "; if($session->isAdmin()){ echo "[<a href=\"admin/admin.php\">Admin Center</a>] "; } echo "[<a href=\"process.php\">Logout</a>]"; } else{ ?> <h3>Login</h3> <? /** * User not logged in, display the login form. * If user has already tried to login, but errors were * found, display the total number of errors. * If errors occurred, they will be displayed. */ if($form->num_errors > 0){ echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>"; } ?> <form action="process.php" method="POST"> <table align="left" border="0" cellspacing="0" cellpadding="3"> <tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr> <tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr> <tr><td colspan="2" align="left"><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>> <font size="2">Remember me next time <input type="hidden" name="sublogin" value="1"> <input type="submit" value="Login"></td></tr> <tr><td colspan="2" align="left"><br><font size="2">[<a href="forgotpass.php">Forgot Password?</a>]</font></td><td align="right"></td></tr> <tr><td colspan="2" align="left"><br>Not registered? <a href="register.php">Sign-Up!</a></td></tr> </table> </form> <? } /** * Just a little page footer, tells how many registered members * there are, how many users currently logged in and viewing site, * and how many guests viewing site. Active users are displayed, * with link to their user information. */ echo "</td></tr><tr><td align=\"center\"><br><br>"; echo "<b>Member Total:</b> ".$database->getNumMembers()."<br>"; echo "There are $database->num_active_users registered members and "; echo "$database->num_active_guests guests viewing the site.<br><br>"; include("include/view_active.php"); ?> </td></tr> </table> </body> </html> The code of my site's layout (current) (without the login form inserted) Link: http://douglas-elemex.net/index_Test.php I want to add the login form on the right, beneath the "Whats New" image. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <SCRIPT LANGUAGE="Javascript"><!-- var url="http://www.douglas-elemex.net"; var title="Douglas Elemex®"; function favorites(){ if(document.all) window.external.AddFavorite(url,title) } //--></SCRIPT> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Douglas Elemex® Dream Your Reality</title> <style type="text/css"> <!-- body { background-image: url(images/DE_back.jpg); } body,td,th { font-size: 11px; color: #333333; font-family: Arial, Helvetica, sans-serif; } a:link { color: #000000; text-decoration: none; } a:visited { color: #000000; text-decoration: none; } a:hover { color: #4684C1; text-decoration: none; } a:active { text-decoration: none; } a { font-weight: bold; } #Layer1 { position:absolute; width:68px; height:115px; z-index:1; left: 851px; top: 365px; } #Layer2 { position:absolute; width:142px; height:115px; z-index:1; left: 543px; top: 110px; } .style1 { color: #FFFFFF; font-weight: bold; } .style2 {color: #FFFFFF} --> </style> </head> <body> <table width="877" border="0" align="center" bgcolor="#000000"> <tr> <td width="652" height="324" bgcolor="#000000"><p> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="652" height="322"> <param name="movie" value="Flash/Headline/Site-Slide_Menu_Headlines.swf" /> <param name="quality" value="high" /> <embed src="Flash/Headline/Site-Slide_Menu_Headlines.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="652" height="322"></embed> </object> </p> </td> <td width="215" background="images/tittleNavback3.png"><a href="index.php"><img src="images/QB_main.png" alt="Home" width="138" height="64" border="0" /></a><a href="http://douglas-elemex.net/forum"><img src="images/QB_forum.png" alt="Elemex Forum" width="138" height="64" border="0" /></a><a href="http://douglas-elemex.net/elemex_gallery/main.php" target="_blank"><img src="images/QB_gall.png" alt="Gallery" width="138" height="64" border="0" /></a><a href="http://douglas-elemex.net/Flashport/index.php" target="_blank"></a><a href="http://douglas-elemex.net/gcards/index.php"><img src="images/QB_xpress.png" alt="ElemeXpress" width="138" height="64" border="0" /></a><a href="http://deplay.douglas-elemex.net" target="_blank"><img src="images/QB_dePlay.png" alt="d.e.PLAY!" width="138" height="64" border="0" /></a></td> </tr> </table> <table width="877" border="0" align="center" bordercolor="#000000" bgcolor="#000000"> <tr> <td width="867" height="32" nowrap="nowrap" bgcolor="#0066CA"><table width="640" border="0" cellspacing="0"> <tr> <td width="513" height="26"><script language="JavaScript" type="text/javascript"> <!-- Begin //Script by Trånn: http://come.to/tronds //Submitted to JavaScript Kit (http://javascriptkit.com) //Visit http://javascriptkit.com for this script var initialsubj="Hay buddy, take a look at this" var initialmsg="Hi:\n You may want to check out this site: "+window.location var good; function checkEmailAddress(field) { var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi); if (goodEmail) { good = true; } else { alert('Please enter a valid address.'); field.focus(); field.select(); good = false; } } u = window.location; function mailThisUrl() { good = false checkEmailAddress(document.eMailer.email); if (good) { //window.location = "mailto:"+document.eMailer.email.value+"?subject="+initialsubj+"&body="+document.title+" "+u; window.location = "mailto:"+document.eMailer.email.value+"?subject="+initialsubj+"&body="+initialmsg } } // End --> </script> <form name="eMailer" id="eMailer"> <div align="left"><span class="style1">Tell a friend: </span> <input type="text" name="email" size="26" value=" Enter Email Address Here" onfocus="this.value=''" onmouseover="window.status='Enter email address here and tell a friend about this site...'; return true" onmouseout="window.status='';return true" /> <input name="button" type="button" onclick="mailThisUrl();" onmouseover="window.status='Click to send an email (with this page address) to a friend! Enter email address above...'; return true" onmouseout="window.status='';return true" value="Send this page" /> </div> </form></td> <td width="123"><div align="center"><a href="javascript:favorites()" style="cursor:hand" onclick="window.external.addfavorite('http://douglas-elemex.net/index.php', 'Douglas Elemex');"><img src="images/bookmarkUs.png" alt="Bookmark Us!" width="123" height="18" border="0" /></a></div> </tr> </table></td> </tr> </table> <table width="877" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#BBDDFF" class="body"> <tr> <td width="159" height="865" valign="top" bgcolor="#84C1FF" style="padding-left:2px;padding-top:3px;"><!--TABLE 1--> <table width="150" align="center" cellspacing="0" bgcolor="#84C1FF" class="head" style="border-bottom:0;"> <tr> <td colspan="2" align="center" bgcolor="#84C1FF"><div align="left"><img src="images/NB_elemex.png" width="129" height="72" /></div></td> </tr> <tr> <td width="124" height="16" align="center" bgcolor="#0099FF"><div align="left" class="style2"><a href="index.php" class="style2">Home</a></div></td> <td width="14" align="center" bgcolor="#84C1FF"><div align="center"><img src="images/menupic2.png" width="14" height="14" /></div></td> </tr> <tr> <td height="16" align="center" bgcolor="#0099FF"><div align="left" class="style2"><a href="http://douglas-elemex.net/forum">Forum</a></div></td> <td height="16" align="center" bgcolor="#84C1FF"><div align="center"><img src="images/menupic2.png" width="14" height="14" /></div></td> </tr> <tr> <td height="16" align="center" bgcolor="#0099FF"><div align="left" class="style2"><a href="http://douglas-elemex.net/elemex_gallery/main.php">Elemex Gallery </a></div></td> <td height="16" align="center" bgcolor="#84C1FF"><div align="center"><img src="images/menupic2.png" width="14" height="14" /></div></td> </tr> <tr> <td height="16" align="center" bgcolor="#0099FF"><div align="left" class="style2"><a href="elemex.net/gcards/index.php">ElemeXpress</a></div></td> <td height="16" align="center" bgcolor="#84C1FF"><div align="center"><img src="images/menupic2.png" width="14" height="14" /></div></td> </tr> <tr> <td height="16" align="center" bgcolor="#0099FF"><div align="left" class="style2"><a href="http://douglas-elemex.net/de-PLAY!/">D.E. Play! </a></div></td> <td height="16" align="center" bgcolor="#84C1FF"><div align="center"><img src="images/menupic2.png" width="14" height="14" /></div></td> </tr> <tr> <td colspan="2" align="center" bgcolor="#BBDDFF"><div align="left"><a href="areaneogenesis.php">AREA: Neo Genesis</a></div></td> </tr> <tr> <td colspan="2" align="center" bgcolor="#BBDDFF"><div align="left"><a href="dairyofwander.php">Dairy of Wander</a></div></td> </tr> <tr> <td colspan="2" align="center" bgcolor="#BBDDFF"><div align="left"><a href="goodheavens.php">Good Heavens! L.A.</a></div></td> </tr> <tr> <td colspan="2" align="center" bgcolor="#BBDDFF"><div align="left"><a href="allstories.php">All Stories </a></div></td> </tr> <tr> <td colspan="2" align="center" bgcolor="#BBDDFF"><div align="left"><a href="gameprojects.php">Game Projects</a></div></td> </tr> <tr> <td height="16" colspan="2" align="center" bgcolor="#BBDDFF"><div align="left"><a href="characterprofiles.php">Character Profiles</a></div></td> </tr> </table> <p align="left"> </p> <table width="150" align="center" cellspacing="0" bgcolor="#84C1FF" class="head" style="border-bottom:0;"> <tr> <td align="center" bgcolor="#84C1FF"><div align="left"><strong><img src="images/NB_multimedia.png" width="129" height="72" /></strong></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="designing.php">Designing</a></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="comics.php">Comics</a></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="flashmovies.php">Flash Animations</a></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="wallpapers.php">Wallpapers</a></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="avatars.php">Avatars</a></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="music.php">Music</a></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="downloads.php">Downloads</a></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="tutorials.php">Tutorials</a></div></td> </tr> </table> <p align="left"> </p> <table width="150" align="center" cellspacing="0" bgcolor="#84C1FF" class="head" style="border-bottom:0;"> <tr> <td align="center" bgcolor="#84C1FF"><div align="left"><img src="images/NB_extras.png" width="129" height="72" /></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="PersonalityQuizzes.php">Personality Quizzes </a></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="Webposters.php">Webposters<strong> & Some</strong></a><strong> </strong></div></td> </tr> </table> <p align="left"> </p> <table width="150" align="center" cellspacing="0" bgcolor="#84C1FF" class="head" style="border-bottom:0;"> <tr> <td align="center" bgcolor="#84C1FF"><div align="left"><img src="images/NB_information.png" width="129" height="72" /></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="douglaselemex.php">Douglas Elemex</a></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="crew.php">The Crew </a></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="interaction.php">Site Interaction </a></div></td> </tr> <tr> <td align="center" bgcolor="#BBDDFF"><div align="left"><a href="mailto:[email protected]">Contact</a></div></td> </tr> </table> <br /> <!--END TABLE 3--> <!--TABLE 4--> <br /> <!--END TABLE 4--> </td> <!--END OF LEFT COLUMN NAVIGATION--> <!--START OF CONTENT--> <td width="554" valign="top" bgcolor="#E6EFFF" style="padding-left:3px;padding-top:3px;"><!--BEGIN "ABOUT THIS LAYOUT"--> <br /> <!--END "ABOUT THIS LAYOUT"--> <!--BEGIN "USE AND REQUIREMENTS"--> <table width="97%" border="1" align="center" cellspacing="0" bordercolor="#4FA7FF" bgcolor="#64B1FF" class="head" style="border-bottom:0;"> <tr> <td align="center"><div align="left"><b>Douglas Elemex </b><strong>on the GO! </strong></div></td> </tr> </table> <table width="97%" border="1" align="center" cellspacing="0" bordercolor="#4FA7FF"> <tr> <td width="20%" bgcolor="#91C8FF"><div align="center"><img src="images/DE_site_ava.png" alt="Douglas Elemex on the GO!" width="100" height="100" /></div></td> <td width="80%" bgcolor="#91C8FF"><p align="justify">The time has finally arrived: Douglas Elemex® is finaly officially open and completed! With new crew members and a bunch of new features, its more than clear that we are on our way to some fun and succes! We will all do our best to keep you satisfied and up-to-date with the latest news on: Dojinshi, Manga Art, Art & Design, Game Development and more! So enjoy, and welcome to Douglas Elemex! </p> <p><strong><em>God Bless, The Elemex Team. </em></strong></p></td> </tr> </table> <p> </p> <table width="97%" align="center" bgcolor="#64B1FF" class="head" style="border-bottom:0;"> <tr> <td align="center"><div align="left"><b>News</b></div></td> </tr> </table> <table align="center" class="outline" width="97%"> <tr> <td><div align="center"> <?PHP $number=7; include("/home/vhosts/douglas-elemex.net/httpdocs/cutenews/show_news.php"); ?> </div></td> </tr> </table> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p align="right"> </p> <p align="right"> </p> <p align="right"> </p> <p align="right"> </p> <p align="right"> </p> <p align="right"> </p> <p align="right">©2007, Douglas Elemex. All Rights Reserved. <a href="<a href="javascript:window.scrollTo(0,0);">Back to top of page</a>"><img src="images/wander_under-image.png" alt="Wander: Back To Top?" width="135" height="176" border="0" align="absbottom" /></a></p></td> <td width="159" valign="top" bgcolor="#84C1FF" style="padding-right:1px;padding-top:3px;"><!--START OF RIGHT COLUMN NAVIGATION--> <table align="center" class="outline" width="158"> <tr> <td width="150" bgcolor="#84C1FF"><div align="center"> <p><img src="images/Whatsnew.png" width="96" height="117" /></p> <table width="137" border="0" cellspacing="1"> <tr> <td width="133"><div align="center"></div></td> </tr> <tr> <td><div align="center"></div></td> </tr> <tr> <td><div align="center"></div></td> </tr> <tr> <td><div align="center"></div></td> </tr> </table> <table width="138" border="1" cellpadding="1" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#64A7F9"> <tr> <td width="128" height="49"><div align="left"> <?php /////////////////////////////////////////////////////////////////////////////// // ACTIVE_TOPICS.PHP /////////////////////////////////////////////////////////////////////////////// // Copyright: (C) 2002 Matthijs van de Water <[email protected]> // Version: 1.1 // Date: 03/02/2002 /////////////////////////////////////////////////////////////////////////////// // Show phpBB 2.0 Active Topics List // Output format can be any HTML or XML // This script must be able to access vital phpBB 2.0 configuration scripts /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // CUSTOM SETTINGS /////////////////////////////////////////////////////////////////////////////// // Amount of active topics to show define("TOPIC_COUNT", 10); // Path to the phpBB 2.0 root directory define("PHPBB_PATH", "./forum/"); // URL to the phpBB 2.0 installation define("PHPBB_LOCATION", "http://www.douglas-elemex.net/forum/"); // Time format to output the date/time (for format see PHP manual) define("TIME_FORMAT", "H:i"); /////////////////////////////////////////////////////////////////////////////// // Includes of phpBB scripts $phpbb_root_path = PHPBB_PATH; if ( !defined('IN_PHPBB') ) { define('IN_PHPBB', true); include(PHPBB_PATH . 'extension.inc'); include(PHPBB_PATH . 'config.'.$phpEx); include(PHPBB_PATH . 'includes/constants.'.$phpEx); include(PHPBB_PATH . 'includes/db.'.$phpEx); } /////////////////////////////////////////////////////////////////////////////// // HTML header start /////////////////////////////////////////////////////////////////////////////// ?> <table border="0" cellpadding="3" cellspacing="1"> <tr> <th height="34"> </th> <td align="center" colspan="2"><p>Currently Active Topics on <a href="http://douglas-elemex.net/forum">Elemex Forum</a> </p></td> <td></th></td> <?php /////////////////////////////////////////////////////////////////////////////// // HTML header end /////////////////////////////////////////////////////////////////////////////// // sql statement to fetch active topics of public forums $sql = "SELECT DISTINCT t.topic_title, t.topic_last_post_id, p.post_time, f.forum_name FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . FORUMS_TABLE . " AS f WHERE t.forum_id = f.forum_id AND f.auth_view = " . AUTH_ALL . " AND p.topic_id = t.topic_id AND p.post_id = t.topic_last_post_id ORDER BY p.post_time DESC LIMIT " . TOPIC_COUNT; $nt_result = $db->sql_query($sql); if(!$nt_result) { die("Failed obtaining list of active topics".mysql_error()); } else { $nt_data = $db->sql_fetchrowset($af_result); } if ( count($nt_data) == 0 ) { die("No topics found"); } else { // $nt_data contains all interesting data for ($i = 0; $i < count($nt_data); $i++) { $title = $nt_data[$i]['topic_title']; $url = PHPBB_LOCATION . 'viewtopic.' . $phpEx . "?" . POST_POST_URL . "=" . $nt_data[$i]['topic_last_post_id'] . "#" . $nt_data[$i]['topic_last_post_id']; $on_forum = 'On the ' . $nt_data[$i]['forum_name'] . ' forum'; $post_time = date(TIME_FORMAT, $nt_data[$i]['post_time']); // As of now you can actually do anything with the data // I chose to output in XML /////////////////////////////////////////////////////////////////////////////// // Item HTML start /////////////////////////////////////////////////////////////////////////////// ?> </tr> <tr> <td><?php echo $post_time; ?></td> <td><a href="<?php echo $url; ?>" title="<?php echo $on_forum; ?>"><?php echo $title; ?></a></td> </tr> <?php /////////////////////////////////////////////////////////////////////////////// // Item HTML end /////////////////////////////////////////////////////////////////////////////// } } /////////////////////////////////////////////////////////////////////////////// // Footer HTML start /////////////////////////////////////////////////////////////////////////////// ?> </table> <?php /////////////////////////////////////////////////////////////////////////////// // Footer HTML end /////////////////////////////////////////////////////////////////////////////// // EOF ?> </div></td> </tr> <tr> <td height="26"><table width="137" border="0" cellspacing="1"> <tr> <td width="133"> <div align="left"> <?php include_once "/home/vhosts/douglas-elemex.net/httpdocs/AdvancedPoll/booth.php"; echo $php_poll->poll_process(4); ?></div></td> </tr> </table></td> </tr> </table> <p align="center"> </p> <p align="center"><strong>::Links::</strong></p> <table align="center" class="outline" width="134"> <tr> <td width="126"><div align="center"><a href="http://www.rabid-monkeys.com/" target="_blank"><img src="images/sitelinks/rm-bbutton.gif" alt="Rabid-Monkeys" width="88" height="31" border="0" /></a></div></td> </tr> <tr> <td><div align="center"><a href="http://www.newgrounds.com" target="_blank"><img src="images/sitelinks/ngbanner1.gif" alt="Newgrounds" width="88" height="31" border="0" /></a></div></td> </tr> <tr> <td><div align="center"><a href="http://www.deadpanda.com/" target="_blank"><img src="images/sitelinks/dp_button.gif" alt="DeadPanda" width="88" height="31" border="0" /></a></div></td> </tr> <tr> <td><div align="center"><a href="http://www.delarge.co.uk" target="_blank"><img src="images/sitelinks/dlrg_yellow_button.gif" alt="Delarge" width="80" height="15" border="0" /></a></div></td> </tr> <tr> <td><div align="center">|| <a href="http://vipersart.blogspot.com/" target="_blank">VipersArt</a> ||</div></td> </tr> <tr> <td><div align="center">|| <a href="http://www.sinworks.nl/" target="_blank">Sinworks</a> || </div></td> </tr> <tr> <td><div align="center"><a href="http://www.christiananime.net/index.php" target="_blank"><img src="images/Site Banners/caa.gif" alt="Christian Anime Alliance" width="88" height="24" border="0" /></a></div></td> </tr> <tr> <td><div align="center"><a href="http://www.christianmanga.com/?action=home" target="_blank"><img src="images/Site Banners/linkban88x31.gif" alt="Christian Manga" width="88" height="31" border="0" /></a></div></td> </tr> <tr> <td><div align="center"><a href="http://www.animeangels.net/index.php" target="_blank"><img src="images/Site Banners/angelbutton1.gif" alt="Anime Angels" width="92" height="35" border="0" /></a></div></td> </tr> <tr> <td><div align="center"><a href="http://www.spriteart.com/" target="_blank"><img src="images/sitelinks/spriteart_banner88x31.gif" alt="SpriteArt" width="81" height="33" border="0" /></a></div></td> </tr> <tr> <td><div align="center"></div></td> </tr> <tr> <td><div align="center"></div></td> </tr> </table> <p align="center"> </p> <p align="center"><strong>Link To Us!</strong></p> <p align="center"><img src="images/DElink.gif" alt="Link To Us! http://www.douglas-elemex.net" width="88" height="31" /></p> <table width="150" align="center" bordercolor="#84C1FF" bgcolor="#84C1FF" class="head" style="border-bottom:0;"> <tr> <td align="center" bgcolor="#84C1FF"><table width="117" border="1" align="center" cellspacing="0" bordercolor="#FFFFFF"> <tr> <td width="111" height="40"><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <div align="center"> <input type="hidden" name="cmd" value="_s-xclick" /> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" /> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" /> <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----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-----END PKCS7----- " /> </div> </form> </td> </tr> </table></td> </tr> </table> <table align="center" class="outline" width="149"> <tr> <td width="141" height="96"><p align="center"><strong>::Credits::</strong></p> <p align="center">¤ Layout by: <a href="mailto:[email protected]">Whizgirl</a><br /> ¤ Edited & Maintained by: </p> <p align="center"><a href="mailto:[email protected]">Douglas Elemex </a><br /> </p></td> </tr> </table> </div></td> </tr> </table> <!--END TABLE 8--> <!--END OF RIGHT COLUMN NAVIGATION--></td> </tr> </table> <div align="center"><a href="http://douglas-elemex.net/gcards/index.php"><img src="images/bottom.png" width="877" height="40" border="0" align="middle" /></a></div> </body> </html> Link to comment https://forums.phpfreaks.com/topic/49700-php-script-layout-problem/#findComment-243801 Share on other sites More sharing options...
ZeroLeon Posted May 2, 2007 Author Share Posted May 2, 2007 A little change of thought (and i really wished that i could edit my last post, so i'm sorry about this new one). I'dd like to add this type of login, a login which is actually an external one from my phpbb forum. I tried placing it on my site aswell, but with the same problem: It removed the rest of the page's content when i tested it. this is the code of the Phpbb External Login (and i'd like to place it on teh left, beneath the "Whats New" image. <?php /* External Login - by Kambodianboi Useage: You must create an PHP document to use this script. Linking it by using include("phpbb.php"); . Usable Varibles: $online_userlist - Displays logged in users $l_online_users - Display online stats */ define('IN_PHPBB', true); $phpbb_root_path = './forum/'; // Must be defined to your board location include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); $userdata = session_pagestart($user_ip, PAGE_LOGIN); init_userprefs($userdata); if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) ) { $gen_simple_header = true; if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && !$userdata['session_logged_in'] ) { $username = isset($HTTP_POST_VARS['username']) ? trim(htmlspecialchars($HTTP_POST_VARS['username'])) : ''; $username = substr(str_replace("\\'", "'", $username), 0, 25); $username = str_replace("'", "\\'", $username); $password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : ''; $sql = "SELECT user_id, username, user_password, user_active, user_level FROM " . USERS_TABLE . " WHERE username = '" . str_replace("\\'", "''", $username) . "'"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql); } if( $row = $db->sql_fetchrow($result) ) { if( $row['user_level'] != ADMIN && $board_config['board_disable'] ) { redirect(append_sid("index.$phpEx", true)); } else { if( md5($password) == $row['user_password'] && $row['user_active'] ) { $autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0; $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin); if( $session_id ) { Header("Location: ".$HTTP_SERVER_VARS['HTTP_REFERER']); } else { message_die(CRITICAL_ERROR, "Couldn't start session : login", __LINE__, __FILE__); } } else { $template->assign_vars(array( 'META' => "<meta http-equiv=\"refresh\" content=\"3;url=javascript:history.back(1)\">") ); $message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login'], "<a href=\"javascript:history.back(1)\">", '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="javascript:history.back(1)">', '</a>'); message_die(GENERAL_MESSAGE, $message); } } } else { $template->assign_vars(array( 'META' => "<meta http-equiv=\"refresh\" content=\"3;url=javascript:history.back(1)\">") ); $message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login'], "<a href=\"javascript:history.back(1)\">", '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="javascript:history.back(1)">', '</a>'); message_die(GENERAL_MESSAGE, $message); } } else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] ) { if( $userdata['session_logged_in'] ) { session_end($userdata['session_id'], $userdata['user_id']); } Header("Location: ".$HTTP_SERVER_VARS['HTTP_REFERER']); } else { Header("Location: ".$HTTP_SERVER_VARS['HTTP_REFERER']); } } /* Well lets start the Statistic Part */ $logged_visible_online = 0; $logged_hidden_online = 0; $guests_online = 0; $online_userlist = ''; $l_online_users = ''; if(is_file($phpbb_root_path.'includes/functions_color_groups.'.$phpEx)) { $colorized = true; include_once($phpbb_root_path.'includes/functions_color_groups.'.$phpEx); } // Start replacement - Topic in Who is online MOD $user_forum_sql = ( !empty($topic_id) ) ? "AND s.session_topic = " . intval($topic_id) ( !empty($forum_id) ) ? "AND s.session_page = ".intval($forum_id) : ''); // End replacement - Topic in Who is online MOD $sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s WHERE u.user_id = s.session_user_id AND s.session_time >= ".( time() - 300 ) . " $user_forum_sql ORDER BY u.username ASC, s.session_ip ASC"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql); } $userlist_ary = array(); $userlist_visible = array(); $prev_user_id = 0; $prev_user_ip = $prev_session_ip = ''; while( $row = $db->sql_fetchrow($result) ) { if ( $row['session_logged_in'] ) { if ( $row['user_id'] != $prev_user_id ) { $user_online_link = ($colorized ? color_group_colorize_name($row['user_id']) : '<a href="'.$phpbb_root_path . 'profile.php?mode=viewprofile&u='.$row['user_id'].'">'.$row['username'].'</a>'); if ( $row['user_allow_viewonline'] ) { $logged_visible_online++; } else { $logged_hidden_online++; } $online_userlist .= ( $online_userlist != '' ) ? ', ' . $user_online_link : $user_online_link; } $prev_user_id = $row['user_id']; } else { if ( $row['session_ip'] != $prev_session_ip ) { $guests_online++; } } $prev_session_ip = $row['session_ip']; } $db->sql_freeresult($result); if ( empty($online_userlist) ) { $online_userlist = $lang['None']; } $online_userlist = $lang['Registered_users'].' ' . $online_userlist; $total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online; if ( $logged_visible_online == 0 ) { $l_r_user_s = $lang['Reg_users_zero_total']; } else if ( $logged_visible_online == 1 ) { $l_r_user_s = $lang['Reg_user_total']; } else { $l_r_user_s = $lang['Reg_users_total']; } if ( $logged_hidden_online == 0 ) { $l_h_user_s = $lang['Hidden_users_zero_total']; } else if ( $logged_hidden_online == 1 ) { $l_h_user_s = $lang['Hidden_user_total']; } else { $l_h_user_s = $lang['Hidden_users_total']; } if ( $guests_online == 0 ) { $l_g_user_s = $lang['Guest_users_zero_total']; } else if ( $guests_online == 1 ) { $l_g_user_s = $lang['Guest_user_total']; } else { $l_g_user_s = $lang['Guest_users_total']; } $l_online_users = sprintf($l_t_user_s, $total_online_users); $l_online_users .= sprintf($l_r_user_s, $logged_visible_online); $l_online_users .= sprintf($l_h_user_s, $logged_hidden_online); again: my apologies, I hope this didnt made things worse or something. I come to the fact that a login like this would be much better (and cooler) .. Thankz. Link to comment https://forums.phpfreaks.com/topic/49700-php-script-layout-problem/#findComment-243871 Share on other sites More sharing options...
trq Posted May 3, 2007 Share Posted May 3, 2007 Do you know how any of this code actually works? You can't really expect to go around cutting and pasting code from all over the place into your site without things getting changed / moved. If you want to integrate the code I suggest you either learn php, or find someone who does. Sorry if this sounds harsh, but this is a help forum, not a can you fix this forum. Link to comment https://forums.phpfreaks.com/topic/49700-php-script-layout-problem/#findComment-243875 Share on other sites More sharing options...
ZeroLeon Posted May 3, 2007 Author Share Posted May 3, 2007 I dont want anyone to fix it at all :-\, what i really need to know is how i can prevent a php code from messing up the layout. I placed all these codes so someone could mayhaps tell if i did anything wrong. But its OK already.. thanks.. Link to comment https://forums.phpfreaks.com/topic/49700-php-script-layout-problem/#findComment-244193 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.