
Kasabian
Members-
Posts
152 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Kasabian
-
Re: Simple Template V2 First Post has been updated
-
Re: Simple Template V2 Its embedded css its already in. sorry that tags left in from my old site
-
I created this layout for my old game but never used it, so it can go on here for free. As i havent got the time at the minute only the login will be posted at this time. I will post the rest of the layout tomorrow. Screen Shot: Login: <?php session_start(); include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } print <<<EOF <!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> <title>{$set['game_name']}</title> <script language="JavaScript"> <!-- function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name,value,expires,path,domain,secure) { document.cookie = name + "=" + escape (value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function DeleteCookie (name,path,domain) { if (GetCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } // --> </script> <script language="JavaScript"> var usr; var pw; var sv; function getme() { usr = document.login.username; pw = document.login.password; sv = document.login.save; if (GetCookie('player') != null) { usr.value = GetCookie('username') pw.value = GetCookie('password') if (GetCookie('save') == 'true') { sv[0].checked = true; } } } function saveme() { if (usr.value.length != 0 && pw.value.length != 0) { if (sv[0].checked) { expdate = new Date(); expdate.setTime(expdate.getTime()+(365 * 24 * 60 * 60 * 1000)); SetCookie('username', usr.value, expdate); SetCookie('password', pw.value, expdate); SetCookie('save', 'true', expdate); } if (sv[1].checked) { DeleteCookie('username'); DeleteCookie('password'); DeleteCookie('save'); } } else { alert('You must enter a username/password.'); return false; } } </script> <style type="text/css"> body { background:url(bg.jpg) repeat-x; background-color: #000000; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif; font-size:12px; color: #FFFFFF; } input{ margin: 2px; } a:visited,a:active,a:hover,a:link { color: #FFFFFF; text-decoration: none; } img { border:none; } .stats1 { color: #000000; } .header{ margin: 0px auto 120px auto; } .main{ margin: 0px auto 0px; auto; } </style> </head> <body onload="getme();"> <table width="800" border="0" cellpadding="0" cellspacing="0" class="header"> <tr align="center" class="stats1"> <td></td> </tr> <tr> <td colspan="1" align="center">[img=title.png]</td> </tr> </table> <table width="900" border="0" cellpadding="0" cellspacing="0" class="main"> <tr><td align="center"> EOF; $IP = mysql_real_escape_string($_SERVER['REMOTE_ADDR']); if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this.</font>[/b]</td></tr></table></body></html>"); } $year=date('Y'); echo " <table width='80%'><tr><td width='50%'><fieldset> <legend>About {$set['game_name']}</legend>{$set['game_description']}</fieldset></td> <td> <fieldset> <legend>Login</legend>"; print "<form action='authenticate.php' method='post' name='login' onsubmit='return saveme();'> Username: <input type='text' name='username'> Password: <input type='password' name='password'> Remember me? <input type='radio' value='ON' name='save'>Yes <input type='radio' name='save' value='OFF' checked>No <input type='submit' value='Submit'></form></fieldset></td></tr></table> [url='register.php'][img=reg.jpg][/url] [i]Powered by codes made by Dabomstew © {$year}. Game Copyright ©{$year} {$set['game_owner']}.[/i] [i]Design by Unmanned Studios.[/i] </td> </table>"; print <<<OUT </td></tr> </table> </body> </html> OUT; ?> I will post the header tomorrow. Have fun!
-
Re: 5 min cron alternative ye that worked perfect thanks Lithium, im still having problems with the brave but i will try and work it out.
-
hey, i haven't posted in a while but I've started playing around with pog1 5 min cron alternative: $result = mysql_query("SELECT * FROM `cron` WHERE `name` = '5min'"); $result = mysql_fetch_array($result,MYSQL_ASSOC); $howLongAgo = time() - $result['last']; if($howLongAgo > (300)) { $n = floor($howLongAgo / 300); // 300 = 5 mins $user = mysql_fetch_array($db->query(sprintf("SELECT * FROM users WHERE userid = '%u'",abs(@intval($_SESSION['userid'])) )),MYSQL_ASSOC); $v = ($set['validate_on']) ? "verified = '0', " : FALSE; $e = ($user['donatordays'] > 0) ? 10 : 5; $energy = ($user['energy']) + ($e * $n); $energy = (int) ($energy > $user['maxenergy']) ? $user['maxenergy'] : $energy; $brave = ($user['brave']) + (2 * $n); $brave = (int) ($brave > $user['brave']) ? $user['maxbrave'] : $brave; $hp = $user['hp'] + (($user['maxhp'] * .25) * $n); $hp = (int) ($hp > $user['maxhp']) ? $user['maxhp'] : $newhp; $will = ($user['will']) + (5 * $n); $will = (int) ($will > $user['will']) ? $user['maxwill'] : $will; $string = sprintf("UPDATE `users` SET %s `energy` = '%u', `brave` = '%u', `hp` = '%u', `will` = '%u'", $v,$energy,$brave,$hp,$will); mysql_query($string) or die('CRON ERROR'); $t = time(); $result = $db->query("UPDATE `cron` SET `last` = '%u' WHERE `name` = '5min'",$t); $l = $t - (floor($t / 300) * 300); if ($l > 0) { $newUpdate = time() - $l; $result = $db->query(sprintf("UPDATE `cron` SET `last` = '%u' WHERE `name` = '5min'",$newUpdate)); } } but I'm having problems its refilling the energy, its refilling at about 41.5% without donator packs. this is a big problem for me as i would like it to be the normal 8% and 17% on donator. can anyone help sort it out. The will and brave are also running super fast as well, I have checked the times and its running at the correct speed. i just wanna put a key point right out there about me: Yes i am retarded at maths... thank you for point that out any help will be much appreciated. Thanks
-
Re: Bandwidth Issues make sure the images you use on your site have a low image size, as if there is a high res or number of high res images loading everytime.. it adds up. if you only just got MC on your system, I'm guessing you don't have alot of users running up your bandwidth so it could be a problem with your hosting package.. again i would suggest switching. If its gone out the window in about 5 days. try switching hosting, as its only about 2GB's look for something more 20
-
Re: Guess the next poster nope, chuck norris next and for world domination
-
Re: [REVIEW] World Of Deception- Please review!! The layouts ok, i havent looked inside the game im guessing its the same... you just need to work on the graphics side of it. make it look more appealing
-
Re: Adobe CS3 read up on it, yes its not legal in a sence. but you cant be arrested for it or be put in that big bad jail for it. you could be sent a nasty letter if your using virgin broadband, but thay cant follow throught with it unless your burning the software or downloads to disk and distributing them. yes hosting a file on your webserver is illegal and getting people to download from a link is legal, then thay will target you. with p2p there is no way of targeting you the only people who have a log is your isp.... they will only high light the problem if your uploading alot of files and downloading alot 24/7. as you will be taking up the use of the broadband line. read up on: p2p, torrents and file sharing laws.
-
Re: [Review] Rebel-Rpg yep looks good, just a little tip.. you should take the background of the car use a .gif format or .png
-
Re: Adobe CS3 You could just use torrents, like poldar i got the CS3 Master Collection by using torrents its free, and its legal under file-sharing laws. it becomes illegal when you distribute for 5 pound on the local market. read up on the laws in your country if your really on the edge.
-
Re: Guess the next poster nope, armageddon next?
-
Re: Sent Messages, and all ye, your **** right... you do need to grow up mate
-
Re: MCCODES Error. i think he will read the instructions next time
-
Re: MCCODES Error. so you named your database "fuckyou"... are you sure its called that? are you sure its on localhost are you sure password is correct? some times when making a new database the company will add somemore stuff to the database name or the username.. e.g. you named it "fuckyou" they could of added "s34-fuckyou" check your database info
-
Re: Counting (nr game) 2099
-
Re: Guess the lyrics has no one heard of the stone roses? :-o
-
Re: Counting (nr game) 2094 were suppose to be up to 2098 :-P
-
Re: Guess the lyrics i really do hope you haven't :-)
-
Re: Guess the lyrics :lol: soo close
-
Re: Guess the lyrics i will start it off again see if you get this one, with out google :-P As the mile they disappear See land begin to clear Free from the filth and the scum This american satelites won Shell carry on through it all Shes a waterfall
-
Re: Counting (nr game) isent that cheating, suppose theres no rules :-D 2086
-
Re: How did your RPG gaming start? i started on old rpg games like fallout and boulders gate, but used to play torncity and urban riot was high level on that shame it got out of control
-
Re: COD5 Beta testing its pretty crap, it just seems to be a MOD of COD4. i don't see the point of them making an extremely successful game (COD4) because of its quite unique in a way, and then go back to the WW2 theme? WW2 theme games: All of the COD series appart from 4 All medal of honor games and many more... ye i know they started on the 5 before 4 and stopped the project till it was finished. "i personally I'm just lacking the enthusiasm to play WW2 games anymore." but i suppose its what ever floats your boat
-
Re: History Question For Homework http://wiki.answers.com/Q/How_did_the_N ... in_Germany read thought it and understand it don't just change the words because they can easily put a sentence in google and it will pop up, teachers arnt as dumb as they seem sometimes EDIT: if you say thats "university words" then you shouldent be doing GCSE, just expand on the idea. i dident take history its not that hard.