Abiodun2014's Posts
Nairaland Forum › Abiodun2014's Profile › Abiodun2014's Posts
1 2 3 4 5 6 7 8 9 10 (of 12 pages)
larisoft:My nairaland look alike site loads very slow or doesn't load at all on Operamini alone. How can I solve this?! |
tefoko:Please put more lights on the use of sessions! You got any vivid explanation or example?! |
Martins301:Who talk say Nairaland beta pass Facebook! No allow dem hear dat from your mouth oooo. 1) Privacy is one of the factors Facebook doesn't disregard, they take that with big piority! Nairaland is kinda enclosing it self, it really doesn't wanna expand! It won't suprise me if someone elses forum dominates it! Facebook is opened to the world as a whole! U not just enclosed to a country like Nairaland! I get hooked up with my lost time friend via Fb I can also raise discussion via FB and gets comments/suggestion on wat to do Facebook has really made live easy and connection with friends easy! I would say Facebook is still the Best! I still don't understand why Nairaland bans by posts anytime I make mention of my Site! I really wish I cld but I can't cause this post would be removed! Smh for Nairaland |
larisoft:It didn't work oooo |
I mean my own site not nairaland!!! How do I keep my members logged in for a long time?! Who knows the code?! |
Please people, I need help with my Nairaland look alike forum, I want a situation whereby a User logs in and stay logged in 4ever, without been logged out. Even wen he closes the browser and reopens he still stays logged in! I heard I cld do this with Sessions! Anyone with the code?! |
Nah, I can't |
I run a Nairaland Look alike forum! And am tired of my members login in every hour!!! I want a situation wen they close a browser and reopen dey still get logged in! How do I come by this?! Anyone with an idea?! Just like Nairaland itself or Facebook; once am logged in, am logged in! Aint a situation am gonna log in again!!! I would be really grateful! Yea... For my do_login.php script; the code is posted below <?php session_start(); require('incfiles/init.php'); if(functions::isloggedin()) { if(empty($redirect)) { functions::go($config->url); } else { functions::go('http://'.$redirect); } die(); } if(isset($_POST["submit"])) { //STEP DOWN VALUES $username=$_POST["username"]; $password=$_POST["password"]; $redirect=$_POST["redirect"]; //CLEANUP VALUES $username=functions::cleaninput($username); $password=functions::cleaninput($password); $password=md5($password); $checkquery=mysql_query("SELECT username, password FROM users WHERE username='$username' AND password='$password'" or die(mysql_error()); $num=mysql_num_rows($checkquery); if($num>0) { $banq = mysql_num_rows(mysql_query("SELECT * FROM `bannedusers` WHERE `username`='$username' AND `boardid`=0" ); if($banq > 0) { $binfo = mysql_fetch_array(mysql_query("SELECT * FROM `bannedusers` WHERE username='$username'" ); $reason = $binfo["reason"]; $date = $binfo["date"]; $unbandate = $binfo["unbandate"]; $today = time(); if($today < $unbandate) { $pagetitle = "You Have Been Banished By one of the Administrator!."; require('incfiles/head.php'); $ud = date('l jS F Y \a\t g:I A', $unbandate); $bd = date('l jS F Y \a\t g:I A', $date); echo "<h2>You Have Been Banished By one of the Administrator!.</h2><div class='display'><p>Reason: $reason<p>Banned Date: $bd<p>Unbanned Date: $ud</ div>"; require('incfiles/end.php'); die(); } else { mysql_query("DELETE FROM bannedusers WHERE username='$username' ANd boardid=0" ; $pagetitle = "U have Just Been Unbanned"; require('incfiles/head.php'); $msg="U Hav Just Been Unbanned Pls Go Back And Login Again"; echo "<div class='display'>$msg<br/><a href='javascript:history.go(-1)'>Go back</a></div>"; } } else { $CookieExpire = 100000; $time = 60 * 60 * 24 * $CookieExpire; $time = time() + $time; $key = $username . date('mY'); $key = strtoupper(md5($key)); setcookie("sessionkey", "$key", "$time" ; setcookie("user", "$username", "$time" ; setcookie("password", "$password", "$time" ; $_SESSION["user"]=$username; $id=functions::user_info($username, userID); $date=date (); $guestip=$_SERVER["REMOTE_ADDR"]; $guestbrowser=$_SERVER["HTTP_USER_AGENT"]; mysql_query("UPDATE b_guestsonline SET time=1 WHERE browser='$guestbrowser' AND guestip='$guestip'" ; mysql_query("UPDATE users SET sessionkey='$key' WHERE username='$username'" ; if(empty($redirect)) { functions::go($config->url); } else { functions::go('http://'.$redirect); } } } else { $pagetitle = "incorrect username and/or password, make sure you type correctly your username & password !"; require('incfiles/head.php'); $msg="incorrect username and/or password, make sure you type correctly your username & password !"; echo "<div class='display'>$msg<br/><a href='javascript:history.go(-1)'>Go back</a></div>"; } } else { $pagetitle = "Error"; require('incfiles/head.php'); $msg="Error"; echo "<div class='display'>$msg<br/><a href='javascript:history.go(-1)'>Go back</a></div>"; } require('incfiles/end.php'); ?> |
Yea... For my do_login.php script; the code is posted below <?php session_start(); require('incfiles/init.php'); if(functions::isloggedin()) { if(empty($redirect)) { functions::go($config->url); } else { functions::go('http://'.$redirect); } die(); } if(isset($_POST["submit"])) { //STEP DOWN VALUES $username=$_POST["username"]; $password=$_POST["password"]; $redirect=$_POST["redirect"]; //CLEANUP VALUES $username=functions::cleaninput($username); $password=functions::cleaninput($password); $password=md5($password); $checkquery=mysql_query("SELECT username, password FROM users WHERE username='$username' AND password='$password'" or die(mysql_error());$num=mysql_num_rows($checkquery); if($num>0) { $banq = mysql_num_rows(mysql_query("SELECT * FROM `bannedusers` WHERE `username`='$username' AND `boardid`=0" );if($banq > 0) { $binfo = mysql_fetch_array(mysql_query("SELECT * FROM `bannedusers` WHERE username='$username'" );$reason = $binfo["reason"]; $date = $binfo["date"]; $unbandate = $binfo["unbandate"]; $today = time(); if($today < $unbandate) { $pagetitle = "You Have Been Banished By one of the Administrator!."; require('incfiles/head.php'); $ud = date('l jS F Y \a\t g:I A', $unbandate); $bd = date('l jS F Y \a\t g:I A', $date); echo "<h2>You Have Been Banished By one of the Administrator!.</h2><div class='display'><p>Reason: $reason<p>Banned Date: $bd<p>Unbanned Date: $ud</div>"; require('incfiles/end.php'); die(); } else { mysql_query("DELETE FROM bannedusers WHERE username='$username' ANd boardid=0" ;$pagetitle = "U have Just Been Unbanned"; require('incfiles/head.php'); $msg="U Hav Just Been Unbanned Pls Go Back And Login Again"; echo "<div class='display'>$msg<br/><a href='javascript:history.go(-1)'>Go back</a></div>"; } } else { $CookieExpire = 100000; $time = 60 * 60 * 24 * $CookieExpire; $time = time() + $time; $key = $username . date('mY'); $key = strtoupper(md5($key)); setcookie("sessionkey", "$key", "$time" ;setcookie("user", "$username", "$time" ;setcookie("password", "$password", "$time" ;$_SESSION["user"]=$username; $id=functions::user_info($username, userID); $date=date(); $guestip=$_SERVER["REMOTE_ADDR"]; $guestbrowser=$_SERVER["HTTP_USER_AGENT"]; mysql_query("UPDATE b_guestsonline SET time=1 WHERE browser='$guestbrowser' AND guestip='$guestip'" ;mysql_query("UPDATE users SET sessionkey='$key' WHERE username='$username'" ;if(empty($redirect)) { functions::go($config->url); } else { functions::go('http://'.$redirect); } } } else { $pagetitle = "incorrect username and/or password, make sure you type correctly your username & password !"; require('incfiles/head.php'); $msg="incorrect username and/or password, make sure you type correctly your username & password !"; echo "<div class='display'>$msg<br/><a href='javascript:history.go(-1)'>Go back</a></div>"; } } else { $pagetitle = "Error"; require('incfiles/head.php'); $msg="Error"; echo "<div class='display'>$msg<br/><a href='javascript:history.go(-1)'>Go back</a></div>"; } require('incfiles/end.php'); ?> |
I wanna keep my members to my forum logged in for a very long time! Like wen they go off the site, using a mobile browser and come back, dey get logged in automatically! Anyone can help with the code, I wanna use it for my Nairaland Look alike forum!!! Would really appreciate if anyone can help |
Halo, just got this Ps4 console and av played like almost everygame on it... From GTA, Thief, Asphalt and many more... I wanna sell some of the CDs, I bought dem for 12000 naira each but I would be giving it out for a whopping sum of 5000 each! Call 08134600302 If you interested, plz holla... For lagos based individuals only! I no fit because of 5k dey waka d whole Nigeria! Lol |
HELLO NAIRALANDERS, PLEASE AND PLEASE; ADERIYE ABIODUN OLANREWAJU is viaing for the post of SOCIAL DIRECTOR at YASUG 2015 and he really needs your help to win... If you are a student of the prestigous school, Yabatech, please come this monday around 10am to 4pm to vote for ADERIYE ABIODUN.. with your School Id card or School Fees Receipt!!! Your vote is really needed cos it counts... Thanks.. Mod abeg place for frontpage... Support a die hard Nairalander Fan. Thanks
|
Wetn make I kan do? ![]() |
Hello, thanks for checking out this post. I was given an assignment on Electrical Design and Drafting. The homework is for me to draw an Architectural Floor plan of an Hospital with electrical fittings, and Model the drawing! The drawing should also be done using 3D autocad!!! I don hear am ooo! And we r to submit the assignment on Monday! Abeg Nairalanders make una help ur boy!!! |
ebujany: Hi guys..pls i have a very serious problem.Dude stop beating around the bush. It is clearly written, she aint interested in U anymore... I don't knw Y una dey marry girl wey neva finish sch!? Allow the girl finish her education b4 anyfn! *smh* for u bro |

;