
BludClart
Members-
Posts
76 -
Joined
-
Last visited
Never
BludClart's Achievements
Newbie (1/14)
0
Reputation
-
I guess i could just put the ajax straight into the file that they are on when playing the game, This is the html buttons :) $options = "<td align = 'center' width = '25%'><form method = 'post' name = 'check_btn'> <input type = 'button' name = 'check_btn' value = 'Check' onClick=\"postFormAjax('ptable.php?XID=".$_GET['XID']."', 'check_btn');\"></form></td> <td align = 'center' width = '25%'><form method = 'post' name = 'fold_btn'> <input type = 'button' name = 'fold_btn' value = 'Fold' onClick=\"postFormAjax('ptable.php?XID=".$_GET['XID']."', 'fold_btn');\"></form></td> <td align = 'center' width = '50%'><form method = 'post' name = 'bet_btn'><input type = 'text' name = 'bet_amt' value = '' onkeypress=\"typingOn();\"> <input type = 'button' name = 'bet_btn' value = 'Bet' onClick=\"postFormAjax('ptable.php?XID=".$_GET['XID']."', 'Bet_btn');\"></form></td>";
-
<?php echo "<meta http-equiv = \"Pragma\" content = \"no-cache\"> <meta http-equiv = \"Cache-Control\" content = \"must-revalidate\"> <center> <script type=\"text/javascript\"> var f = false; var waittime = 5000; var pauserefresh = false; function typingOn() { pauserefresh=true; } if(pauserefresh != true) { function autoRefresh() { clearTimeout(); if(pauserefresh != true) { setTimeout('refreshPoker(\"#\")',5000); } } function postFormAjax(url, formname) { var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\"); } if (!f && xmlhttp) { var fields = new Array(); if(formname) { var ajax = formname; } //loop through form elements and retrieve field NAMEs and Values for (var x = 0; x < eval(\"document.\"+ajax+\".elements.length\"); x++) { // join them into a string. eval(\"fields.push(document.\"+ajax+ \".elements[x].name+'='+document.\" +ajax+\".elements[x].value)\"); } elem = 'errors'; var sendf = fields.join('&'); xmlhttp.open(\"POST\", url, true); xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4) { if(xmlhttp.status == 200) { results = xmlhttp.responseText; var para = document.getElementById('errors'); para.innerHTML = results; f = false; // re activate the AJAX function } } } xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlhttp.send(sendf); f = true; if(pauserefresh != true) { refreshPoker(\"#\"); } } } function refreshPoker(url) { var xmlhttp; if(window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\"); } xmlhttp.onreadystatechange=function() { if(xmlhttp.readyState==4) { document.getElementById(\"pokermain\").innerHTML = ''; document.getElementById(\"pokermain\").innerHTML = xmlhttp.responseText; } } xmlhttp.open(\"GET\", url, true); xmlhttp.send(null); if(pauserefresh != true) { autoRefresh(); } } } </script>"; ?> This is what im including as the ajax, Whats wrong is i have to refresh the page everytime i want to be able to push a button =\
-
Haha i think i did :S Must of been cuz my internet was all messed up :P
-
You cany just secure everything through includes, Go round your whole site and just secure EVERY little thing, There is always ways of getting round these includes! Better still just dont use mccodes lol, Rebuild your own engine, I have and believe me i feel like i cant of done anything better, I secured it as i weant along and now i know that its pretty much fully secure to my ability!
-
Well its the same way for everyone pretty much, But i think it might be my revalidate control =\ I mean it must be able to be done because when i refresh the page the buttons work again but then of course that makes the ajax pointless ROFL XD
-
I have no idea how my post ended up here :S haha
-
Hey guys, Been a while since i logged on lol, I am having some problems with my buttons, I have made the body start a refresh function every 5 seconds using my ajax script, Also made it so they can post forms using the ajax script, It kind of loops through as the game goes, Problem i have is this: When a user clicks the button in the main div(The game platform) it will work no problem...BUT if they click any other buttons after that they dont react in any way...When they refresh the page they can click another button and so on, I dont know what i am doing wrong but any help would be appreciated!! Thanks :)
-
No offence but i wouldnt use die(''); it is better to use echo "Page closed blah blah"; $h->endpage(); exit(); just means that if they have a custom header half the images after where you add die(''); wouldnt show =\ so i would use exit();
-
Lol sorry family problem atm guys,sister been rushed into hospital,best thing to say is it will be up as soon as i can get it up....sorry about the wait guys :|
-
I have it progressive like TC if that helps? =\ and they lose exp for failing wich can help ;) half what the gain would have been gets taken away :) and it goes by crimexp
-
Just a quick update,You will have to download the main file from my ftp,i will give a link to a text file.it is over 700 maybe 800 lines long,and i aint sitting here adding it like that :P 85% done,aim to get the last part done within the hour ;) And if anyone is good at securing scripts,it wouldnt go a miss for someone to secure it :P
-
Hey users of MWG! Just popped on to tell you all that i am currently making a dog mod,This is basically a dog racing mod,where you can own the dogs,race head to head,or race them in an arena,train your pet,feed it,walk it,treat it,name it,give it a personal picture,gain rewards,show it off on your profile to other users,buy it items such as toys and leads,hrnesses ect.take it to the vets if it gets ill,dog can be punded due to neglect,you can only own one dog at one time,you can rehome it,or it might run away due to neglect(its a random for running away or pounded) I hope this mod will appear to you guys! Will be adding this tonight latest!
-
would any1 like this in there game?
BludClart replied to corruptcity || skalman's topic in General Discussion
tbh mate,You could make this,but it has already been made by immortal.And was very popular,So i dont know how that will work out :S -
I could only get it to work like this mate,Any reason why? :) <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['action'] = isset($_GET['action']) && ctype_alpha($_GET['action']) ? trim($_GET['action']) : 'index'; switch($_GET['action']) { case 'banned': fedded(); break; case 'forum': forum_banned(); break; case 'mails': mail_banned(); break; default: index(); break; } if (!in_array($_GET['action'], array('banned','forum','mails','index'))) { echo "[b]Invalid Action.[/b]"; $h->endpage(); exit; } if(!function_exists('format')) { function format($str) { return is_numeric($str) ? number_format($str) : nl2br(stripslashes($str)); } } function index() { print "<h3>Jail Management</h3> "; global $db; $feddedusers = $db->fetch_single($db->query("SELECT COUNT(`userid`) FROM users WHERE (fedjail = 1)")); $mailbanned = $db->fetch_single($db->query("SELECT COUNT(`userid`) FROM users WHERE (mailban > 0)")); $forumbanned = $db->fetch_single($db->query("SELECT COUNT(`userid`) FROM users WHERE (forumban > 0)")); echo "<table class='table' width='50%'>"; echo "<tr>"; echo "<th>[url='?action=banned']Federal Jail[/url]</th>"; echo "<td style='text-align:center;'>".$feddedusers."</a></td>"; echo "</tr>"; echo "<tr>"; echo "<th>[url='?action=mails']Mail Banned[/url]</th>"; echo "<td style='text-align:center;'>".$mailbanned."</td>"; echo "</tr>"; echo "<tr>"; echo "<th>[url='?action=forum']Forum Banned[/url]</th>"; echo "<td style='text-align:center;'>".$forumbanned."</td>"; echo "</tr>"; echo "</table>"; } function fedded() { global $db,$r,$h; echo ' <h3 style="text-align: left; text-decoration: underline;">Ferderal Jail</h3> <table border="1" width="80%" class="table" cellspacing="0" cellpadding="2"> <tr style="text-align:center;"> <th>Who</th> <th>Time Left</th> <th>Reason</th> <th>Jailer</th> </tr> '; $Find = $db->query("SELECT f.*, u.* FROM fedjail f LEFT JOIN users u ON f.fed_userid=u.userid ORDER BY f.fed_days ASC"); while($r = $db->fetch_row($Find)) { $jailed=$db->query("SELECT * FROM users WHERE userid={$r['fed_jailedby']}"); $j=$db->fetch_row($jailed); echo ' <tr style="text-align:center;"> <td>[url="viewuser.php?u='.$r['fed_userid'].'"]'.$r['username'].'[/url]</td> <td>'.$r['fed_days'].' Days</td> <td>'.$r['fed_reason'].'</td> <td>[url="viewuser.php?u='.$r['fed_jailer_id'].'"][b]'.$r['fed_jailer'].'[/b][/url] ['.$j['username'].']</td> </tr> '; } echo '</table>'; } function mail_banned() { global $db,$r,$h; print '<h3 style="text-align: left; text-decoration: underline;">MailBanned Users</h3> <table border="1" width="80%" class="table" cellspacing="0" cellpadding="2"> <tr style="text-align:center;"> <th>Who</th> <th>Time Left</th> <th>Reason</th> </tr> '; $q=$db->query("SELECT `userid`,`username`,`mailban`,`mb_reason` FROM `users` WHERE `mailban` > 0 ORDER BY `mailban` DESC"); while($r=$db->fetch_row($q)) { print " <tr> <td>[url='viewuser.php?u=".$r[']".$r['username']."[/url]</td> <td>".$r['mailban']."</td> <td>".$r['mb_reason']."</td> </tr>"; } echo "</table>"; } function forum_banned() { global $db,$r,$h; print '<h3 style="text-align: left; text-decoration: underline;">Forumbanned Users</h3> <table border="1" width="80%" class="table" cellspacing="0" cellpadding="2"> <tr style="text-align:center;"> <th>Who</th> <th>Time Left</th> <th>Reason</th> </tr> '; $q=$db->query("SELECT `userid`,`username`,`forumban`,`fb_reason` FROM users WHERE `forumban` > 0 ORDER BY `forumban` DESC"); while($r=$db->fetch_row($q)) { print "<tr> <td>[url='viewuser.php?u=".$r[']".$r['username']."[/url]</td> <td>".$r['forumban']."</td> <td>".$r['fb_reason']."</td></tr>"; } echo "</table>"; } $h->endpage(); ?>
-
Check your junbk mail ;) a little tip,if you keep getting it appear in junk,try using your domain as who its from ;)