Jump to content

TheCatapult

Members
  • Posts

    111
  • Joined

  • Last visited

TheCatapult's Achievements

Member

Member (2/7)

2

Reputation

  1. Sorry for the topic title I used. I searched the Google but I just can't figure why it doesn't become horizontal. The problem is that the links gets separated in a way that the next link would be in another line, like the function of </br>. My goal would be that the next link would just be horizontally next by the previous link. Illustration Wrong: PartnersTerms and ConditionHelpdesk Right: Partners Terms and Condition Helpdesk Here's my code. mystle.css #bodycss {background-image:url('Components/Images/div-backgrounds/back-web.png');background-repeat:no-repeat;background-attachment:fixed;background-position:center; }#wrapper{margin: 0 auto;width:768px;}.right{float:right}.left{float:left}.logo-banner{width768px;height:192px;background-image:url('Components/Images/header/banner.jpg');}.upper-navigation{width:768px;height:57px;}ul.uppernav{list-style-type:none;margin:0;padding:0;overflow:hidden;}ul.uppernav li{float:left;} ul.navvv{list-style-type:none;margin:0;padding:0;overflow:hidden;text-indent:0;}ul.navvv li{margin-bottom:-5px; padding: -10px -10px -10px -10px;text-color:ffffff;text-indent:0;} a.navvv{display:block;font-family:Arial;text-decoration:none;text-indent:0;} a.footer{display:block;font-family:Arial;;}.articles-left-nav{width:768px;height:554px;} .articles {width:480px; height:554px; float:left;}a:link {text-decoration:none;font-family:"Arial";font-size:11pt;color:#000000;} /* unvisited link */ a:visited {text-decoration:none;font-family:"Arial";font-size:11pt;color:#000000;} /* visited link */ a:hover {text-decoration:none;font-family:"Arial";font-size:11pt;color:#555555;} /* mouse over link */a:active {text-decoration:none;font-family:"Arial";font-size:11pt;color:#000000;} /* selected link */ .articles-news-header {width:480px; height:37px; background-image:url('Components/Images/header/header-news.jpg');} .articles-news-content {width:480px; height:240px; background-image:url('Components/Images/div-backgrounds/articles-back.png');padding-left:20px;} .articles-updates-header {width:480px; height:37px; background-image:url('Components/Images/header/header-updates.jpg');} .articles-updates-content {width:480px; height:240px; font-family: "Arial";font-size:11pt; background-image:url('Components/Images/div-backgrounds/articles-back.png');padding-left:20px;} .articles-about-header {width:480px; height:37px; background-image:url('Components/Images/header/header-about.jpg');} .articles-about-content {width:480px; height:517px; font-family: "Arial";font-size:11pt; background-image:url('Components/Images/div-backgrounds/articles-back.png');padding-left:20px;}.articles-download-header {width:480px; height:37px; background-image:url('Components/Images/header/header-download.jpg');} .articles-download-content {width:480px; height:517px; font-family: "Arial";font-size:11pt; background-image:url('Components/Images/div-backgrounds/articles-back.png');padding-left:20px;}.articles-guides-header {width:480px; height:37px; background-image:url('Components/Images/header/header-guides.jpg');} .articles-guides-content {width:480px; height:517px; font-family: "Arial";font-size:11pt; background-image:url('Components/Images/div-backgrounds/articles-back.png');padding-left:20px;}.articles-register-header {width:480px; height:37px; background-image:url('Components/Images/header/header-register.jpg');} .articles-register-content {width:480px; height:517px; font-family: "Arial";font-size:11pt; background-image:url('Components/Images/div-backgrounds/articles-back.png');padding-left:20px;}.articles-admin-header {width:480px; height:37px; background-image:url('Components/Images/header/header-admin.jpg');} .articles-admin-content {width:480px; height:240px; font-family: "Arial";font-size:11pt; background-image:url('Components/Images/div-backgrounds/articles-back.png');padding-left:20px;}.articles-gm-header {width:480px; height:37px; background-image:url('Components/Images/header/header-gm.jpg');} .articles-gm-content {width:480px; height:240px; font-family: "Arial";font-size:11pt; background-image:url('Components/Images/div-backgrounds/articles-back.png');padding-left:20px;}.articles-shop-header {width:480px; height:37px; background-image:url('Components/Images/header/header-shop.jpg');} .articles-shop-content {width:480px; height:517px; font-family: "Arial";font-size:11pt; background-image:url('Components/Images/div-backgrounds/articles-back.png');padding-left:20px;}.articles-vote-header {width:480px; height:37px; background-image:url('Components/Images/header/header-vote.jpg');} .articles-vote-content {width:480px; height:517px; font-family: "Arial";font-size:11pt; background-image:url('Components/Images/div-backgrounds/articles-back.png');padding-left:20px;}.gm-profile-content {float:right;width:500px; height:180px; font-family: "Arial";font-size:11pt; background-image:url('Components/Images/div-backgrounds/back-gmeach.png');} .leftnav { float:right; width:288px; height:414px;background-color:#ff00ff;padding:0;margin:0;text-indent:0;} .subdiv-time {width:288px; height:130px; background-image:url('Components/Images/div-backgrounds/back-time.jpg'); float:right; font-family:Arial; font-size:20pt; font-color:gray;}.footer{float:left;width:768px;}ul.footer{list-style-type:none;margin:0;padding:0;overflow:hidden;background-color:#00ff00;}ul.footer li{float:left;text-color:ffffff;} index <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>GamingWeb</title><link rel="stylesheet" type="text/css" href="mystyle.css"></head><body id="bodycss"><div id="wrapper"><div class="logo-banner"></div><div class="upper-navigation"><ul class="uppernav"><li><a href="index.html"><img border="0" src="Components/Images/upper-navigation/nav-home.jpg" alt="Home" width="153" height="57"></a></li><li><a href="about.html"><img border="0" src="Components/Images/upper-navigation/nav-about.jpg" alt="About" width="153" height="57"></a></li><li><a href="download.html"><img border="0" src="Components/Images/upper-navigation/nav-download.jpg" alt="Download" width="153" height="57"></a></li><li><a href="forum"><img border="0" src="Components/Images/upper-navigation/nav-forum.jpg" alt="Home" width="153" height="57"></a></li><li><a href="guides.html"><img border="0" src="Components/Images/upper-navigation/nav-guides.jpg" alt="Home" width="153" height="57"></a></li></ul></div><div class="articles-left-nav"> <div class="articles"> <div class="articles-news-header"></div> <div class="articles-news-content"><!-- PHP CODE --><?$username="";$password="";$database="";mysql_connect("",$username,$password);@mysql_select_db($database) or die( "Unable to select database");$query="SELECT * FROM phpbb_topics WHERE forum_id='4' ORDER BY topic_id DESC LIMIT 10 ";$result=mysql_query($query);$num=mysql_numrows($result);mysql_close();?><?$i=0;while ($i < $num) {$id=mysql_result($result,$i,"topic_id");$forumid=mysql_result($result,$i,"forum_id");$title=mysql_result($result,$i,"topic_title");$content=mysql_result($result,$i,"post_text");$time=mysql_result($result,$i,"post_time");?><? echo '<a class="newscont" href="forum/viewtopic.php?f=4&t=' . $id . '">' . $title . '</a> <br/>'; ?> <?$i++;} ?> </div> <div class="articles-updates-header"></div> <div class="articles-updates-content">There is no developments yet to be released.</div> </div> <div class="leftnav"><ul class="navvv"><li><a href="register.html"><img border="0" src="Components/Images/left-navigation/nav-register.jpg" alt="Register" width="288" height="71"></a></li><li><a href="gmprofile.html"><img border="0" src="Components/Images/left-navigation/nav-gmprofile.jpg" alt="GM's Profiles" width="288" height="71"></a></li><li><a href="shop.html"><img border="0" src="Components/Images/left-navigation/nav-shop.jpg" alt="Cash Shop" width="288" height="71"></a></li><li><a href="vote.html"><img border="0" src="Components/Images/left-navigation/nav-vote.jpg" alt="Vote for us!" width="288" height="71"></a></li></ul><div class="subdiv-time"><script type="text/javascript">document.write ('Current time is: <span id="date-time">', new Date().toLocaleString(), '<\/span>.<\/p>')if (document.getElementById) onload = function () {setInterval ("document.getElementById ('date-time').firstChild.data = new Date().toLocaleString()", 50)}</script> </div></div><div class="footer"><ul class="footer"><li class="footer"><a class="footer" href="partners.html">Partners</a></li><li class="footer"><a class="footer" href="partners.html">Terms and Condition</a></li><li class="footer"><a class="footer" href="partners.html">Helpdesk</a></li></ul></div></div> </div></body> Thank you very much.
  2. Hello everybody, I would just like to ask why my links are not in Arial font even though I have set them to be that. Instead, they are in Times New Roman (the default font, I think). Here's the code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>School Web</title><style type="text/css">#bodycss {background-image:url('Components/Images/div-backgrounds/back-web.png')}#wrapper{margin: 0 auto;width:768px;}.right{float:right}.left{float:left}.logo-banner{width768px;height:192px;background-color:#959595}.upper-navigation{width:768px;height:57px;}ul.navvv{list-style-type:none;margin:0;padding:0;overflow:hidden;text-indent:0;}ul.navvv li{margin-bottom:-5px; padding: -10px -10px -10px -10px;text-color:ffffff;text-indent:0;} a.navvv{display:block;font-family:Arial;text-decoration:none;text-indent:0;}.articles-left-nav{width:768px;height:554px;} .articles {width:480px; height:554px; float:left;}<!-- A LINK -->a:link {text-decoration:none;font-family:"Arial";font-size:11pt;color:#FF0000;} /* unvisited link */ a:visited {text-decoration:none;font-family:"Arial";font-size:11pt;color:#00FF00;} /* visited link */ a:hover {text-decoration:none;font-family:"Arial";font-size:11pt;color:#FF00FF;} /* mouse over link */a:active {text-decoration:none;font-family:"Arial";font-size:11pt;color:#0000FF;} /* selected link */ <!-- END OF A LINK --> .articles-news-header {width:480px; height:37px; background-image:url('Components/Images/header/header-news.jpg');} .articles-news-content {width:480px; height:240px; background-image:url('Components/Images/div-backgrounds/articles-back.png');padding-left:20px;} .articles-updates-header {width:480px; height:37px; background-image:url('Components/Images/header/header-updates.jpg');} .articles-updates-content {width:480px; height:240px; font-family: "Arial";font-size:11pt; background-image:url('Components/Images/div-backgrounds/articles-back.png');padding-left:20px;} .leftnav { float:right; width:288px; height:414px;background-color:#ff00ff;padding:0;margin:0;text-indent:0;} .subdiv-time {width:288px; height:130px; background-image:url('Components/Images/div-backgrounds/back-time.jpg');}</style></head><body id="bodycss"><div id="wrapper"><div class="logo-banner"></div><div class="upper-navigation"><img src="Components/Images/upper-navigation/nav-home.jpg" alt="Home" width="153" height="57"><img src="Components/Images/upper-navigation/nav-about.jpg" alt="About" width="153" height="57"><img src="Components/Images/upper-navigation/nav-download.jpg" alt="Download" width="153" height="57"><img src="Components/Images/upper-navigation/nav-forum.jpg" alt="Forum" width="153" height="57"><img src="Components/Images/upper-navigation/nav-guides.jpg" alt="Guides" width="153" height="57"></div><div class="articles-left-nav"> <div class="articles"> <div class="articles-news-header"></div> <div class="articles-news-content"><!-- PHP CODE --><?$username="741839_test";$password="building10";$database="741839_test";mysql_connect("fdb3.eu.pn",$username,$password);@mysql_select_db($database) or die( "Unable to select database");$query="SELECT * FROM phpbb_topics WHERE forum_id='4' ORDER BY topic_id DESC LIMIT 5 ";$result=mysql_query($query);$num=mysql_numrows($result);mysql_close();?><?$i=0;while ($i < $num) {$id=mysql_result($result,$i,"topic_id");$forumid=mysql_result($result,$i,"forum_id");$title=mysql_result($result,$i,"topic_title");$content=mysql_result($result,$i,"post_text");$time=mysql_result($result,$i,"post_time");?><? echo '<a class="newscont" href="/WAOLSir/news.php?id=' . $id . '">' . $title . '</a> <br/>'; ?> <?$i++;} ?> </div> <div class="articles-updates-header"></div> <div class="articles-updates-content">There is no developments yet to be released.</div> </div> <div class="leftnav"><ul class="navvv"><li><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-register.jpg" alt="Register" width="288" height="71"></a></li><li><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-gmprofile.jpg" alt="GM's Profiles" width="288" height="71"></a></li><li><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-shop.jpg" alt="Cash Shop" width="288" height="71"></a></li><li><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-vote.jpg" alt="Vote for us!" width="288" height="71"></a></li></ul><div class="subdiv-time"></div></div> </div> Thank you very much for your help and sorry for much inquiries. P.S.: I am also very sorry for the way my code are written. Is there a specific place in my HTML/CSS piece where should I put the a:link, a:visited, etc.?
  3. Thanks dsonseuk, but it still does not work. ------------------------ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>School Web</title> <style type="text/css">#bodycss {background-color:#7a0026;} #wrapper{margin: 0 auto;width:768px;} .right{float:right} .left{float:left} .logo-banner{width768px;height:576px;background-color:#959595} .upper-navigation{width:768px;height:57px;} ul.navvv{list-style-type:none;margin:0;padding:0;overflow:hidden;text-indent:0;}li.zerotext{text-color:ffffff;text-indent:0;} a.navvv{display:block;font-family:Arial;text-decoration:none;text-indent:0;} .articles-left-nav{width:768px;height:1000px;} .articles {width:480px; height:1000px; float:left;} .articles-news-header {width:480px; height:37px;} .articles-news-content {width:480px; height:463px; .articles-updates-header {width:480px; height:37px;} .articles-updates-content {width:480px; height:463px; .leftnav { float:right; width:288px; height:1000px;}background-color:#ff00ff;padding:0;margin:0;text-indent:0;} .subdiv-time {width:288px; height:130px;}</style> </head> <body id="bodycss"><div id="wrapper"> <div class="logo-banner"></div><div class="upper-navigation"><img src="Components/Images/upper-navigation/nav-home.jpg" alt="Home" width="153" height="57"><img src="Components/Images/upper-navigation/nav-about.jpg" alt="About" width="153" height="57"><img src="Components/Images/upper-navigation/nav-download.jpg" alt="Download" width="153" height="57"><img src="Components/Images/upper-navigation/nav-forum.jpg" alt="Forum" width="153" height="57"><img src="Components/Images/upper-navigation/nav-guides.jpg" alt="Guides" width="153" height="57"></div><div class="articles-left-nav"> <div class="articles">Hello</div> <div class="leftnav"><ul class="navvv"> <li class="zerotext"><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-register.jpg" alt="Register" width="288" height="71"></a></li> <li class="zerotext"><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-gmprofile.jpg" alt="GM's Profiles" width="288" height="71"></a></li> <li class="zerotext"><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-shop.jpg" alt="Cash Shop" width="288" height="71"></a></li> <li class="zerotext"><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-vote.jpg" alt="Vote for us!" width="288" height="71"></a></li></ul></div></div> -------------------------------------------- I have noticed also one thing: When I move the highlighted word let's say to this ------------------------ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>School Web</title> <style type="text/css">#bodycss {background-color:#7a0026;} #wrapper{margin: 0 auto;width:768px;} .right{float:right} .left{float:left} .logo-banner{width768px;height:576px;background-color:#959595} .upper-navigation{width:768px;height:57px;} .articles-left-nav{width:768px;height:1000px;} .articles {width:480px; height:1000px; float:left;} .articles-news-header {width:480px; height:37px;} .articles-news-content {width:480px; height:463px; .articles-updates-header {width:480px; height:37px;} .articles-updates-content {width:480px; height:463px; .leftnav { float:right; width:288px; height:1000px;}background-color:#ff00ff;padding:0;margin:0;text-indent:0;}ul.navvv{list-style-type:none;margin:0;padding:0;overflow:hidden;text-indent:0;}li.zerotext{text-color:ffffff;text-indent:0;} a.navvv{display:block;font-family:Arial;text-decoration:none;text-indent:0;} .subdiv-time {width:288px; height:130px;}</style> </head> <body id="bodycss"><div id="wrapper"> <div class="logo-banner"></div><div class="upper-navigation"><img src="Components/Images/upper-navigation/nav-home.jpg" alt="Home" width="153" height="57"><img src="Components/Images/upper-navigation/nav-about.jpg" alt="About" width="153" height="57"><img src="Components/Images/upper-navigation/nav-download.jpg" alt="Download" width="153" height="57"><img src="Components/Images/upper-navigation/nav-forum.jpg" alt="Forum" width="153" height="57"><img src="Components/Images/upper-navigation/nav-guides.jpg" alt="Guides" width="153" height="57"></div><div class="articles-left-nav"> <div class="articles">Hello</div> <div class="leftnav"><ul class="navvv"> <li class="zerotext"><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-register.jpg" alt="Register" width="288" height="71"></a></li> <li class="zerotext"><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-gmprofile.jpg" alt="GM's Profiles" width="288" height="71"></a></li> <li class="zerotext"><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-shop.jpg" alt="Cash Shop" width="288" height="71"></a></li> <li class="zerotext"><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-vote.jpg" alt="Vote for us!" width="288" height="71"></a></li></ul></div></div> -------------------------------------------- the menu gets bullets buttons. Why? Thanks!
  4. Hello w3Schoolers, I just want to remove the indent between my <li> but I can't figure it out. Here is my code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>School Web</title><style type="text/css">#bodycss {background-color:#7a0026;}#wrapper{margin: 0 auto;width:768px;}.right{float:right}.left{float:left}.logo-banner{width768px;height:576px;background-color:#959595}.upper-navigation{width:768px;height:57px;}ul.navvv{list-style-type:none;margin:0;padding:0;overflow:hidden;}li{text-color:ffffff;} a.navvv{display:block;font-family:Arial;text-decoration:none;}.articles-left-nav{width:768px;height:1000px;} .articles {width:480px; height:1000px; float:left;} .articles-news-header {width:480px; height:37px;} .articles-news-content {width:480px; height:463px; .articles-updates-header {width:480px; height:37px;} .articles-updates-content {width:480px; height:463px; .left-nav { float:right; width:288px; height:1000px;}background-color:#ff00ff;} .subdiv-time {width:288px; height:130px;}</style></head><body id="bodycss"><div id="wrapper"><div class="logo-banner"></div><div class="upper-navigation"><img src="Components/Images/upper-navigation/nav-home.jpg" alt="Home" width="153" height="57"><imgsrc="Components/Images/upper-navigation/nav-about.jpg" alt="About" width="153" height="57"><imgsrc="Components/Images/upper-navigation/nav-download.jpg" alt="Download" width="153" height="57"><imgsrc="Components/Images/upper-navigation/nav-forum.jpg" alt="Forum" width="153" height="57"><imgsrc="Components/Images/upper-navigation/nav-guides.jpg" alt="Guides" width="153" height="57"></div><div class="articles-left-nav"> <div class="articles">Hello</div> <div class="leftnav"><ul class="navvv"><li><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-register.jpg" alt="Register" width="288"height="71"></a></li><li><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-gmprofile.jpg" alt="GM's Profiles" width="288"height="71"></a></li><li><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-shop.jpg" alt="Cash Shop" width="288"height="71"></a></li><li><a href="default.asp"><img border="0" src="Components/Images/left-navigation/nav-vote.jpg" alt="Vote for us!" width="288"height="71"></a></li></ul></div></div> I also have attached the snip shot of the said problem. Thank you very much!
  5. TheCatapult

    Sessions?

    My problem is even though I logged in successfully, myaccount.php always redirects it to login.php .
  6. TheCatapult

    Sessions?

    Thank you for the answers. Sorry for too much question. I have three problems now: 1. Even though the user is not logged, the myaccount.php redirects the user to the variable written in Location: .i.e. login.php [which I have changed.] 2. Since the Location is login.php, what it does is just redirect the user to login form. 3. I have changed the location to myaccount1.php, the problem is just like in number 1. Help please. I'm completely noob at this. What I want is just to have a page where only logged users can view it [since this page will be the one where I will put my form.] Thanks for understanding!
  7. TheCatapult

    Sessions?

    Thanks dsonseuk! I followed your advise. <?phpsession_start();?><html><head> <title>hello my world!!!</title></head><body>To protect any pages, place this code on top most of the page:<?phpinclude('config.php');if($_SESSION['isLoged'] != 'yes' || $_SESSION['userName'] == NULL){ header("Location: login.php");exit();}else{ echo $_SESSION['isLoged']."<br />"; echo $_SESSION['userName'];}?>Hello world!!</body></html> Still, it does not work. It shows only the To protect any pages, place this code on top of the page: Here is the source code (I am using Google Chrome and yes I logged in.). <html><head> <title>hello my world!!!</title></head><body>To protect any pages, place this code on top most of the page: Thanks everybody!
  8. TheCatapult

    Sessions?

    It shows no error. But it shows only "To protect any pages, place this code on top most of the page:"Pardon me, but I can no longer follow. I used the code you have given earlier above.
  9. TheCatapult

    Sessions?

    Thank you. But it still does not work, it only shows the "To protect any pages, place this code on top most of the page:". As I view the source code in my browser, it shows <html> <head> <title>hello my world!!!</title> </head> <body> To protect any pages, place this code on top most of the page: Notice the </body> and </html> is not found. I am using Google Chrome.
  10. TheCatapult

    Sessions?

    The problem is the word Hello world!! does not display even though I am logged.Sorry and thanks!
  11. dsonsek, I'm very sorry if I don't follow most of your guides. pardon me pls do not ignore me//

  12. TheCatapult

    Sessions?

    Hello, I am completely beginner in this field and I am just a hobbyist so pardon me if I ask very elementary questions in an advanced forum. I'll first post my codes. 1. config.php <?php/*This script was downloaded at:LightPHPScripts.comPlease support us by visitingout website and letting peopleknow of it.Produced under: LGPL*//* Main Options *///----------------/* Which page user goes to after logoss */$logoutPage = 'login.php';/* Secure page to redirect to after login */$loginPage = 'myaccount.php';/* Start session? Set this to false, ifyou are already starting the session elsewhere*/$startSession = TRUE;/* Use Cookies with sessions*/$useCookies = TRUE;/* Stay loged in for? -> cookies *//* in seconds:3600 -> 1 hr, 86400 -> 1 day604800 -> 1 week, 2419200 -> 1 month29030400 -> 1 year*/$logedInFor = 2419200;/* Domain name -> cookies */$domainName = 'example.com';/*Notes: Please note that using sessions,will store a cookie with the ID on userside.To make this work for users without cookies,propagate the ID through the URLSin this manner:nextpage.php?<?php echo htmlspecialchars(SID); ?>*//* Connect to database? Set to false, if youare already conneted */$connectDatabase = TRUE;/* Database Info */$databaseUserName = '';$databaseUserPassword = '';$databaseHostName = '';$databaseName = '';/* Table Info */$tableName = 'userlist';$userNameField = 'userName';$userPasswordField = 'UserPassword';/** SEC 334 **/?> login.php <?php/*This script was downloaded at:LightPHPScripts.comPlease support us by visitingout website and letting peopleknow of it.Produced under: LGPL*//* Start session */if($startSession == TRUE){ session_start();}/* Config file */include('config.php');/* Check for submition */if($_POST['submitID'] == 1){/* Connect to database */if($connectDatabase == TRUE){$action=TRUE;include('connect.php');} /* sanitize and check info */$userName = mysql_real_escape_string($_POST['userName'],$dbc);$password = mysql_real_escape_string($_POST['password'],$dbc);if($userName == NULL) { $message = 'Please enter username.';}if($message == NULL && $password == NULL){ $message = 'Please enter password.';}if($message == NULL){ $userQuery = mysql_fetch_row(mysql_query("SELECT COUNT(*) FROM " . $tableName . " WHERE `" . $userNameField . "`='$userName' AND `" . $userPasswordField . "`='$password'")); /* If usercount is more than 0 -> ok */ if($userQuery[0] > 0){ /* Disconnect from database */ if($connectDatabase == TRUE){$action=FALSE;include('connect.php');} $_SESSION['isLoged'] = 'yes'; $_SESSION['userName'] = $userName; /* add cookies ?*/ /* expire in 1 hour */ if($useCookies == TRUE) { setcookie("isLoged", 'yes', time()+logedInFor, "/", ".$domainName", 1); setcookie("userName", $userName, time()+logedInFor, "/", ".$domainName", 1); } /* Redirect to login page */ header("Location: $loginPage"); exit(); } else { $message = 'Invalid username and/or password!'; }}/* Disconnect from database */if($connectDatabase == TRUE){$action=FALSE;include('connect.php');}}?><!--/*This script was downloaded at:LightPHPScripts.comPlease support us by visitingout website and letting peopleknow of it.Produced under: LGPL*/--><?php/* Display error messages */if($message != NULL){?><table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#FFCCCC"> <tr> <td><div align="center"><strong><font color="#FF0000"><?=$message;?></font></strong></div></td> </tr></table><?php } ?><form action="<? echo $_SERVER['PHP_SELF'];?>" method="post" name="login" id="login" style="display:inline;"> <table width="100%" border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#99CC33"> <tr bgcolor="#99CC99"> <td colspan="2"><div align="center"><strong>Please log in:</strong></div></td> </tr> <tr> <td width="47%"><strong>Username:</strong></td> <td width="53%"><input name="userName" type="text" id="userName"></td> </tr> <tr> <td><strong>Password:</strong></td> <td><input name="password" type="password" id="password"></td> </tr> <tr> <td colspan="2"><div align="center"><font face="Georgia, Times New Roman, Times, serif"><strong> <input name="Submit" type="submit" id="Submit" value="Sign-In"> <input name="submitID" type="hidden" id="submitID" value="1"></strong></font> </div></td> </tr> <tr> <td colspan="2"><div align="right"><a href="http://lightphpscripts.com" target="_blank"><font size="1">Powered by LPS</font></a></div></td> </tr> </table></form> myaccount.php <html><header><title>hello my world!!!!</title><body>To protect any pages, place this code on top most of the page:<?phpsession_start();if($_SESSION['isLoged'] != 'yes' || $_SESSION['userName'] == NULL){ header("Location: login.php");exit();}?>Hello world!!</body></html> readme.txt This script was downloaded at:LightPHPScripts.comPlease support us by visitingout website and letting peopleknow of it.Produced under: LGPLNOTE: Script assumes you have an existing userbase database. If not, please use the tablescheme provided in database.sql.Step 1------Open config.php, fill it with the correct informationStep 2------Place the registration file where you want it to appear as:<?php include('register.php'); ?>Step 3------Place login.php in the page where you want the login box to appear as:<?php include('login.php'); ?>Step 4------To log out a user, redirect them to logoff.php as:http://example.com/logoff.phpStep 5------To protect any pages, place this code on top most of the page:<?phpsession_start();if($_SESSION['isLoged'] != 'yes' || $_SESSION['userName'] == NULL){ header("Location: login.php");exit();}?>Step 6------To protect any directory, place the above code in a file called index.php andplace that file in the directory. The readme.txt said (in Step 5) that I always put <?php session_start(); if($_SESSION['isLoged'] != 'yes' || $_SESSION['userName'] == NULL){ header("Location: login.php");exit();}?> so only logged in users can view the content. But it just don't work with my code in myaccount.php. Did i make any mistake and what is it? Thank you very much for your time and sorry for this kind of question.
  13. Hello, I would just like to ask why the class .Nav is not showing in my Web site. (Please refer to the highlighted code) It is supposed to be after the class .Banner. As you may notice, it has background-img property so I must see it. Here's the link: http://catapultphpmysql.eu.pn/WAOLSir/ <!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><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Hobby IR</title><script type="text/javascript">/*<![CDATA[*//*---->*//*--*//*]]>*/</script> <style type="text/css"> #wrapper {margin: 0 auto; width: 768px;} .left { float: left;} .right {float:right;margin-right:-20px; }.right122 {float:right;} .right1 {float:left;max-width:768px;} .stream {float:right; width: 340px; height: 290px; background-image:url('Images/back.jpg');background-repeat:no-repeat;padding: 10px;margin 0 auto;} .right1 {float:left;max-width:768px;} .right2 {float:right;} .Banner {width: 768px; height: 244px;background-color:#CCff00} <!-- tHIS IS THE START OF THE NAVIGATION -->.Nav { width: 768px; height: 80px; background-image:url('Images/nav-back.jpg');background-repeat:no-repeat;} <!--end--> <!--start of the subNAB -->.subNAV{ float:right; margin-right:8px;margin-top:45px;} .ifreame {margin:10px;}.slideshow{margin:4px;height: 352px; width: 419px;background-color:#ff00ff;}a:link {color:#ff7e00;text-decoration:none;} /* unvisited link */a:visited {color:#00FF00;text-decoration:none;} /* visited link */a:hover {color:#FF00FF;text-decoration:none;} /* mouse over link */a:active {color:#0000FF;text-decoration:none;} /* selected link */}a:link {} /* unvisited link */a:visited {} /* visited link */a:hover {} /* mouse over link */a:active {} /* selected link */ .news{margin:4px;height:419px; width:419px;background-color:#ff00ff;} .div{background-image:url('Images/text-back.png');width:419px;float:right; font-family:"Arial"; }.miniinfo{float:right;margin-top:-20px;} .miniinfocon{float:right;width: 336px; height: 188px;background-image:url('Images/backminiifno.jpg');background-repeat:no-repeat;} <!--sTART of the mini info of temp -->#miniinfocondiv{float:left;margin-right:5px;width:84px; height: 84px;background-image:url('Images/miniinfodiv.jpg');background-repeat:no-repeat;padding: 10px;margin 0 auto;}#miniinfocondiv2{float:left;margin-right:5px;width:84px; height: 84px;background-image:url('Images/miniinfodiv.jpg');background-repeat:no-repeat;padding: 10px;margin 0 auto;}#miniinfocondiv3{float:left;margin-right:5px;width:84px; height: 84px;background-image:url('Images/miniinfodiv.jpg');background-repeat:no-repeat;padding: 10px;margin 0 auto;} </style></head><body><div id="wrapper"><div class="Banner"><img border="0" src="Images/banner.png" alt="Programs" width="768" height="244"/></div> <!-- Navigation --> <div class="Nav"> <div class="subNAV"> Please help me o God</div> </div> <!-- End of Navigation --> <div class="test"><div class="left"><div class="slideshow"></div><div class="news"> <div> <?$username="741839_test";$password="building10";$database="741839_test"; mysql_connect("fdb3.eu.pn",$username,$password);@mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM news ORDER BY id DESC LIMIT 20";$result=mysql_query($query); $num=mysql_numrows($result);mysql_close(); ?> <?$i=0;while ($i < $num) { $id=mysql_result($result,$i,"id");$title=mysql_result($result,$i,"title");$content=mysql_result($result,$i,"content");$poster=mysql_result($result,$i,"poster");?> <div class="div"> <? echo '<a href="http://catapultphpmysql.eu.pn/testwebsite/news.php?id=' . $id . '">' . $title . '</a> <br/>'; ?> </div><br/><?$i++;} ?></div> </div></div><div class="right"><div><img border="0" src="Images/watch-sign.jpg" alt="Watch" width="338" height="75"/></div><div class="stream"><iframe src="http://www.ustream.tv/embed/10214266" width="320" height="270" scrolling="no" frameborder="0" style="border: 0px none transparent; margin:0 auto;"></iframe></div></div> <div class="miniinfo"><img border="0" src="Images/miniinfo.jpg" alt="Programs" width="338" height="75"/></div> <div class="miniinfocon"> <div><center><img border="0" src="Images/fb.jpg" alt="Facebook" /><img border="0" src="Images/tweet.gif" alt="Twitter" /></center></div> <br/> <div> <!-- This is the PHP code --> <?$username="741839_test";$password="building10";$database="741839_test"; mysql_connect("fdb3.eu.pn",$username,$password);@mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM weather";$result=mysql_query($query); $num=mysql_numrows($result);mysql_close(); ?> <?$i=0;while ($i < $num) { $id=mysql_result($result,$i,"id");$weather1=mysql_result($result,$i,"weather1");$weather2=mysql_result($result,$i,"weather2");$weather3=mysql_result($result,$i,"weather3");?> <!-- End of PHP code --> <div id="miniinfocondiv"><center><? echo $weather1; ?>Metro Manila</center></div><div id="miniinfocondiv2"><center><? echo $weather2; ?>Metro Cebu</center></div><div id="miniinfocondiv3"><center><? echo $weather3; ?>Metro Davao</center></div><?$i++;} ?></div> </div> </div></div> </body></html> Thank you very much and sorry for my bad English.
  14. TheCatapult

    padding

    If I would increase the <div> container, the background would repeat; the original size of the background is 340 x 284 px. CodeName, so I should rename </img> to <img/>? dsonseuk, please help me! Thanks a lot!
  15. TheCatapult

    padding

    Hello What's the problem with my code and the <iframe> can't be centered. <!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><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><script type="text/javascript">/*<![CDATA[*//*---->*//*--*//*]]>*/</script> <style type="text/css">#wrapper {margin: 0 auto; width: 768px;}.left { float: left;}.right {float:right;}.right1 {float:left;max-width:768px;}.stream {float:right;width: 320px; height: 265px;background-image:url('Images/stream-back.gif');padding: 9.5px 10px;margin:0 auto;}.ifreame {margin:10px;}.slide {float:left;width: 380px; height: 400px;background-image:url('Images/stream-back.gif');overflow:hidden;padding:10px;;}.right1 {float:left;max-width:768px;}.right2 {float:right;} .Banner {width: 768px; height: 244px;background-color:#CCff00}.cat1 {width: 768px; height: 40px;} /* close the curly bracket */.test {width: 768px; height: 37px;color: #FFFF00;}.ifreame {margin:10px;} </style></head><body><div id="wrapper"><div class="Banner"><img border="0" src="Images/banner.png" alt="Programs" width="768" height="244"></img></div><div class="cat1"><img border="0" src="Images/home.gif" alt="Programs" width="153" height="40"></img><img border="0" src="Images/sched.gif" alt="Programs" width="153" height="40"></img><img border="0"src="Images/about.gif" alt="Programs"width="153" height="40"></img><img border="0"src="Images/contact.gif"alt="Programs" width="153" height="40"></img><img border="0" src="Images/mission.gif" alt="Programs" width="153" height="40"></img></div> <div class="test"><div class="left"><div class="slide"></div></div><div class="right"><div><img border="0" src="Images/watch-sign.jpg" alt="Programs" width="338" height="75"></img></div><div class="stream"><iframe src="http://www.ustream.tv/embed/10214266" width="320" height="270" scrolling="no" frameborder="0" style="border: 0px none transparent; margin:0 auto;"></iframe></div></div></div></div> </body></html>
×
×
  • Create New...