Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,667
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by Uridium

  1. Re: Battle ladder [Mccodes V2] 3 easy steps 1 = upload and amend files 2 = Run the installler adding your first tournament (becomes useless after 1st install cannot be used again until you have dropped the ladder_settings table via your phpmyadmin ) 3 = Goto your admin panel and create more tourneys, edit and delete. For safety reasons Tournement ID 1 Cannot be deleted but it can be edited Thats it,,,
  2. Re: Battle ladder [Mccodes V2] PART 2 call this file tourny_creator.php Thanks goes to TONKA For his help with this piece cheers pal :)   <?php include "sglobals.php"; //This contains Tournament layouts //Illusions 2009 switch($_GET['action']) { case 'createladder': create_ladder(); break; case 'createladdersub': create_ladder_sub(); break; case 'editladder': edit_ladder(); break; case 'editladderform': edit_ladder_form(); break; case 'editladdersub': edit_ladder_sub(); break; case 'deleteladder': delete_ladder(); break; default: print "Error: This script requires an action."; break; } function htmlspcl($in) { return str_replace("'", "'", htmlspecialchars($in)); } function create_ladder() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("Access Denied"); } print "Create New Tournament Ladder. <table width='75%' class='table' cellspacing='1'> <form action='tourny_creator.php?action=createladdersub' method='post'> <tr> <td align='center'>Ladder ID Number Give your Tournament ladder an ID</td> <td><input type='text' name='ladder_id' value='0' /></td> </tr> <tr> <td align='center'>Ladder Name Give your Tournament ladder a name</td> <td><input type='text' name='ladder_name' value='Basic Attack Ladder' /></td> </tr> <tr> <td align='center'>Ladder Description Brief Description about this ladder.</td> <td><textarea rows='6' cols='40' name='ladder_description'></textarea></td> </tr> <tr> <td align='center'>Minimum Ladder Entry Level Minimum Entry Level for a Player of this ladder type</td> <td><input type='text' name='minentry_level' value='1' /></td> </tr> <tr> <td align='center'>Maximum Entry Level Maximum Entry Level for a Player of this ladder type</td> <td><input type='text' name='maxentry_level' value='3' /></td> </tr> <tr> <td align='center'>Password Protect ? Use a Password for this tournament or leave blank</td> <td><input type='text' name='pass_protect' value='' /></td> </tr> <tr> <td align='center'>Donator Only Tournament Do you want this to be a Donator Only Tournament 1= YES 0= NO</td> <td><input type='text' name='don_only' value='0' /></td> </tr> <tr> <td align='center'>Cash Entry Do you want to charge users to join this tournament if its free just enter 0</td> <td><input type='text' name='ladder_charge' value='0' /></td> </tr> <tr> <td colspan='2' align='center'><input type='submit' value='Create New Tournament' /></td> </tr> </table></form></center>"; } function create_ladder_sub() { global $db,$ir,$c,$userid; if($ir['user_level'] != 2) { die("Access Denied"); } if(!isset($_POST['ladder_id']) || !isset($_POST['ladder_name'])) { print "You missed one or more of the required fields. Please go back and try again. [url='tourny_creator.php?action=createladder']> Back[/url]"; $h->endpage(); exit; } $Get = $db->query(sprintf("SELECT `ladder_id` FROM `ladder_settings` WHERE `ladder_id`='%s'", addslashes($_POST['ladder_id']))); if($db->num_rows($Get)) { print "<h1>Sorry ID {$_POST['ladder_id']} is already In Use.</h1><h1>DO YOU WANT TO</h1> [url='tourny_creator.php?action=createladder']1 Try Include another Tournament[/url] [url='tourny_creator.php?action=editladder']2 Edit An Existing Tournament[/url] [url='tourny_creator.php?action=deleteladder']3 Delete an existing Tournament[/url]"; exit; } $db->query("INSERT INTO ladder_settings VALUES('{$_POST['ladder_id']}', '{$_POST['ladder_name']}', '{$_POST['ladder_description']}', '{$_POST['minentry_level']}', '{$_POST['maxentry_level']}', '{$_POST['pass_protect']}', '{$_POST['don_only']}', '{$_POST['ladder_charge']}')"); $i=mysql_insert_id($c); print "<h1>{$_POST['ladder_name']}</h1> Was Successfully Created <h1>DO YOU WANT TO</h1> <a href='tourny_creator.php?action=createladdersub'>1 Create Another Tournament <a href='tourny_creator.php?action=editladder'>2 Edit An Exsisting Tournament [url='tourny_creator.php?action=deleteladder']3 Delete an existing Tournament[/url]"; stafflog_add("Created new Tournament {$_POST['ladder_name']} [$i]"); } function edit_ladder() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("Access Denied"); } print "<h3>Editing Tournament</h3> You can edit any aspect of this Tournament. <form action='tourny_creator.php?action=editladderform' method='post'> Tournament: ".tournament_dropdown($c,'ladder_id')." <input type='submit' value='Edit Tournament' /></form> OR enter a Tournament ID to edit: <form action='tourny_creator.php?action=editladderform' method='post'> Tournament: <input type='text' name='ladder_id' value='0' /> <input type='submit' value='Edit Tournament' /></form>"; } function edit_ladder_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("Access Denied"); } $d=$db->query("SELECT * FROM ladder_settings WHERE ladder_id={$_POST['ladder_id']}"); $itemi=$db->fetch_row($d); print "<h3>Editing Tournament</h3> <table width='75%' class='table' cellspacing='1'> <form action='tourny_creator.php?action=editladdersub' method='post'> <tr> <td align='center'>Ladder ID ID for this Ladder</td> <td><input type='text' name='ladder_id' value='{$itemi['ladder_id']}' /></td> </tr> <tr> <td align='center'>Ladder Name Give your Tournament ladder a name</td> <td><input type='text' name='ladder_name' value='{$itemi['ladder_name']}' /></td> </tr> <tr> <td align='center'>Ladder Description Description for this Event</td> <td><input type='text' name='ladder_description' value='{$itemi['ladder_description']}' /></td> </tr> <tr> <td align='center'>Minimum Ladder Entry Level Minimum Entry Level for a Player of this ladder type</td> <td><input type='text' name='minentry_level' value='{$itemi['minentry_level']}' /></td> </tr> <tr> <td align='center'>Maximum Entry Level Maximum Entry Level for a Player of this ladder type</td> <td><input type='text' name='maxentry_level' value='{$itemi['maxentry_level']}' /></td> </tr> <tr> <td align='center'>Password Protect ? Use a Password for this tournament or leave blank</td> <td><input type='text' name='pass_protect' value='{$itemi['pass_protect']}' /></td> </tr> <tr> <td align='center'>Donator Only Tournament Do you want this to be a Donator Only Tournament</td> <td><input type='text' name='don_only' value='{$itemi['don_only']}' /></td> </tr> <tr> <td align='center'>Cash Entry Do you want to charge users to join this tournament if its free just enter 0</td> <td><input type='text' name='ladder_charge' value='{$itemi['ladder_charge']}' /></td> </tr> <tr> <td colspan='2' align='center'><input type='submit' value='Edit This Tournament' /></td> </tr> </table></form></center>"; } function edit_ladder_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("Access Denied"); } $db->query("UPDATE `ladder_settings` SET `ladder_name` = '{$_POST['ladder_name']}', `ladder_description` = '{$_POST['ladder_description']}', `minentry_level` = '{$_POST['minentry_level']}', `maxentry_level` = '{$_POST['maxentry_level']}', `pass_protect` = '{$_POST['pass_protect']}', `don_only` = '{$_POST['don_only']}', `ladder_charge` = '{$_POST['ladder_charge']}' WHERE `ladder_id` = '{$_POST['ladder_id']}' "); stafflog_add("Edited Tournament {$_POST['ladder_name']} [{$_POST['ladder_id']}]"); print "<h1>Tournament {$_POST['ladder_name']} Updated</h1> <a href='tourny_creator.php?action=createladdersub'>1 Create Another Tournament <a href='tourny_creator.php?action=editladder'>2 Edit An Exsisting Tournament [url='tourny_creator.php?action=deleteladder']3 Delete an existing Tournament[/url]"; } function delete_ladder() { global $ir,$c,$h,$userid,$db; if($ir['user_level'] != 2) { die("Access Denied"); } $undeletable = array('1'); // add more IDs here, such as NPCs switch ($_GET['step']) { default: echo "<h3>Deleteing Tournament</h3> Here you can delete a tournament. <form action='tourny_creator.php?action=deleteladder&step=2' method='post'> Delete Tournament: ".tournament_dropdown($c,'ladder_id')." <input type='submit' value='Delete Tournament' /></form> OR enter a tournament ID to Delete: <form action='tourny_creator.php?action=deleteladder&step=2' method='post'> Delete Tournament: <input type='text' name='ladder_id' value='0' /> <input type='submit' value='Delete Tournament' /></form>"; break; case 2: $target = $_POST['ladder_id']; if (!is_numeric($target)) exit; if (in_array($target,$undeletable)) { die(' <h1>You cannot delete this Tournament its a Fixed Base Sorry try editing it.<h1>'); } $d=$db->query("SELECT ladder_id FROM ladder_settings WHERE ladder_id='$target'"); $itemi=$db->fetch_row($d); print "<h3>Confirm</h3> Delete Tournament ".$itemi["ladder_id"]."? <form action='tourny_creator.php?action=deleteladder&step=3' method='post'> <input type='hidden' name='ladder_id' value='$target' /> <input type='submit' name='yesorno' value='Yes' /> <input type='submit' name='yesorno' value='No' onclick=\"window.location='tourny_creator.php?action=deleteladder';\" /></form>"; break; case 3: $target = $_POST['ladder_id']; if (!is_numeric($target)) exit; if (in_array($target,$undeletable)) { die('You cannot delete this Tournament.'); } if($_POST['yesorno']=='No') { die("<h1>Tournament {$itemi['ladder_name']} has not been deleted.</h1> <a href='tourny_creator.php?action=createladdersub'>1 Create A New Tournament <a href='tourny_creator.php?action=editladder'>2 Edit An Existing Tournament [url='tourny_creator.php?action=deleteladder']3 Delete an existing Tournament[/url]"); } if ($_POST['yesorno'] != ("No" || "Yes")) die('Eh'); $d=$db->query("SELECT ladder_id FROM ladder_settings WHERE ladder_id='$target'"); $itemi=$db->fetch_row($d); $db->query("DELETE FROM ladder_settings WHERE ladder_id='$target'"); echo "<h1>Tournament {$itemi['ladder_name']} Successfully Deleted.</h1> <a href='tourny_creator.php?action=createladdersub'>1 Create A New Tournament <a href='tourny_creator.php?action=editladder'>2 Edit An Exsisting Tournament [url='tourny_creator.php?action=deleteladder']3 Delete an existing Tournament[/url]"; stafflog_add("Deleted Ladder {$itemi['ladder_name']} [{$_POST['ladder_id']}]"); break; } } $h->endpage(); ?>   and add these links to your smenu.php   print " <hr /> [b]Tournament System[/b] "; if($ir['user_level']==2) { print "> [url='tourny_creator.php?action=createladder']Create New Tournament[/url] > [url='tourny_creator.php?action=editladder']Edit A Tournament[/url] > [url='tourny_creator.php?action=delladder']Delete A Tournament[/url] "; }
  3. Re: Battle ladder [Mccodes V2] SQLS DO NOT INSERT THESE DIRECTLY INTO YOUR PHPMYADMIN Just save as ladder.sql and upload to your game site.... The reason for this is because its part of the Installation so you can create your first Tournament at setup..   CREATE TABLE `ladder_settings` ( `ladder_id` int(11) NOT NULL auto_increment, `ladder_name` varchar(255) NOT NULL, `ladder_description` varchar(255) NOT NULL, `minentry_level` int(11) NOT NULL, `maxentry_level` int(11) NOT NULL, `pass_protect` varchar(255) NOT NULL, `don_only` int(11) NOT NULL, `ladder_charge` int(11) NOT NULL, PRIMARY KEY (`ladder_id`) ) ENGINE=MyISAM ;   Open up global_func.php and add this piece near the top   function tournament_dropdown($connection,$ddname="ladder_id",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM ladder_settings ORDER BY ladder_name DESC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['ladder_id']}'"; if ($selected == $r['ladder_id'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['ladder_name']}</option>"; } $ret.="\n</select>"; return $ret; }   Now call this file tourny_installer.php   <?php session_start(); ob_start(); function valid_email($email) { // First, we check that there's one @ symbol, and that the lengths are right if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { // Email invalid because wrong number of characters in one section, or wrong number of @ symbols. return false; } // Split it into sections to make life easier $email_array = explode("@", $email); $local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) { return false; } } if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name $domain_array = explode(".", $email_array[1]); if (sizeof($domain_array) < 2) { return false; // Not enough parts to domain } for ($i = 0; $i < sizeof($domain_array); $i++) { if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) { return false; } } } return true; } ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Illusions Tournament Installer</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-color: #DEDEDE; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } .table2 { } .lgrad { background-image:url(lgrad.jpg); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:2px; } .rgrad { background-image:url(rgrad.jpg); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(dgrad.jpg); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(dgradl.jpg); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(dgradr.jpg); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-color:#FFFFFF; vertical-align:top; text-align:center; } .table { background-color:#000000; } .table3 { background-color:#000000; } .table td { background-color:#DEDEDE; height:22px; } .table3 td { background-color:#CCCCCC; } td .alt { background-color:#EEEEEE; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } --> </style></head> <body onload="getme();"> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center">[img=title.jpg] <h2>Illusions 2009 Tournament Installer</h2> <?php switch($_GET['code']) { case "install": install(); break; case "config": config(); break; default: diagnostics(); break; } function menuprint($highlight) { $items=array( 'diag' => '1. Diagnostics', 'input' => '2. Configuration', 'sql' => '3. Installation & Extras', ); $c=0; print "<hr />"; foreach($items as $k => $v) { $c++; if($c > 1) { print " >> "; } if($k==$highlight) { print "<font color='black'>{$v}</font>"; } else { print "<font color='gray'>{$v}</font>"; } } print "<hr />"; } function diagnostics() { menuprint("diag"); if (version_compare(phpversion(), '4.2.0') < 0) { $pv="<font color='red'>Failed</font>"; $pvf=0; } else { $pv="<font color='green'>OK</font>"; $pvf=1; } if(is_writable('./')) { $wv="<font color='green'>OK</font>"; $wvf=1; } else { $wv="<font color='red'>Failed</font>"; $wvf=0; } if(function_exists('mysql_connect') || function_exists('mysqli_connect')) { $dv="<font color='green'>OK</font>"; $dvf=1; } else { $dv="<font color='red'>Failed</font>"; $dvf=0; } if(str_replace('tourny_installer.php','',$_SERVER['SCRIPT_NAME']) == "/") { $av="<font color='green'>OK</font>"; $avf=1; } else { $av="<font color='red'>Failed</font>"; $avf=0; } print "<h3>Basic Diagnostic Results:</h3> <table width='80%' class='table' cellspacing='1'> <tr> <td>PHP version >= 4.2.0</td> <td>{$pv}</td> </tr> <tr> <td>Game folder writable</td> <td>{$wv}</td> </tr> <tr> <td>MySQL support in PHP present</td> <td>{$dv}</td> </tr> <tr> <td>Game installed at root level of domain or subdomain</td> <td>{$av}</td> </tr> </table>"; if($pvf+$wvf+$dvf+$avf < 4) { print "<hr /><font color='red'>One of the basic diagnostics failed, so Setup cannot continue. Please fix the ones that failed and try again.</font><hr />"; } else { print "<hr />> [url='tourny_installer.php?code=config']Next Step[/url]<hr />"; } } function config() { menuprint("input"); print "<h3>Ladder System Setup:</h3> <center> <form action='tourny_installer.php?code=install' method='post'> <table width='75%' class='table' cellspacing='1'> <tr> <th colspan='2'>Database Config</th> </tr> <tr> <td align='center'>MySQL Driver</td> <td><select name='driver' type='dropdown'>"; if(function_exists('mysql_connect')) { print "<option value='mysql'>MySQL Standard</option>"; } if(function_exists('mysqli_connect')) { print "<option value='mysql'>MySQLi Enhanced</option>"; } print "</select></td> </tr> <tr> <td align='center'>Hostname This is usually localhost</td> <td><input type='text' name='hostname' value='localhost' /></td> </tr> <tr> <td align='center'>Username The user must be able to use the database</td> <td><input type='text' name='username' value='' /></td> </tr> <tr> <td align='center'>Password</td> <td><input type='text' name='password' value='' /></td> </tr> <tr> <td align='center'>Database Name The database should not have any other software using it.</td> <td><input type='text' name='database' value='' /></td> </tr> <tr> <th colspan='2'><h2>Ladder System Setup </h2></th> </tr> <tr> <td align='center'>Ladder ID Number Give your Tournament ladder a name</td> <td><input type='hidden' name='ladder_id' value='1' /></td> </tr> <tr> <td align='center'>Ladder Name Give your Tournament ladder a name</td> <td><input type='text' name='ladder_name' value='Basic Attack Ladder' /></td> </tr> <tr> <td align='center'>Ladder Description Brief Description about this ladder.</td> <td><textarea rows='6' cols='40' name='ladder_description'></textarea></td> </tr> <tr> <td align='center'>Minimum Ladder Entry Level Minimum Entry Level for a Player of this ladder type</td> <td><input type='text' name='minentry_level' value='1' /></td> </tr> <tr> <td align='center'>Maximum Entry Level Maximum Entry Level for a Player of this ladder type</td> <td><input type='text' name='maxentry_level' value='3' /></td> </tr> <tr> <td align='center'>Password Protect ? Use a Password for this tournament or leave blank</td> <td><input type='text' name='pass_protect' value='' /></td> </tr> <tr> <td align='center'>Donator Only Tournament Do you want this to be a Donator Only Tournament</td> <td><input type='checkbox' name='don_only' value='0' />YES <input type='checkbox' name='don_only' value='1' checked='checked' />NO</td> </tr> <tr> <td align='center'>Cash Entry Do you want to charge users to join this tournament if its free just enter 0</td> <td><input type='text' name='ladder_charge' value='0' /></td> </tr> <tr> <td colspan='2' align='center'><input type='submit' value='Install' /></td> </tr> </table></form></center>"; } function install() { menuprint("sql"); { print "Config writing Bypassed. Attempting DB connection "; define('MONO_ON', 1); require "class/class_db_mysql.php"; $db=new database; $db->configure($_POST['hostname'], $_POST['username'], $_POST['password'], $_POST['database'], 0); $db->connect(); $c=$db->connection_id; print "Connection Successful. Writing Main MySQL data. "; $fo=fopen("ladder.sql","r"); $query=""; $lines=explode("\n",fread($fo,1024768)); fclose($fo); foreach($lines as $line) { if(!(strpos($line,"--") === 0) && trim($line) != "") //check for commented lines or blankies { $query.=$line; if(!(strpos($line,";") === FALSE)) { $db->query($query); $query=""; } } } print "Main MySQL data was written. Now write Extra MySQL data. "; //$username=$_POST['a_username']; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("INSERT INTO ladder_settings VALUES('{$_POST['ladder_id']}', '{$_POST['ladder_name']}', '{$_POST['ladder_description']}', '{$_POST['minentry_level']}', '{$_POST['maxentry_level']}', '{$_POST['pass_protect']}', '{$_POST['don_only']}', '{$_POST['ladder_charge']}')"); $path=$_SERVER['HTTP_HOST']; print " <h2>[b]Ladder Installation Was Successful![/b]</h2><hr /> <center><h1><font color='green'>SETUP COMPLETE</h1></font></center> Goto your Admin Panel to ADD, DELETE, EDIT your Tournaments"; } } ?> </td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> <td class="dgrad"> </td> <td class="dgradr"> </td> </tr> </table> </td> </tr> </table> </body> </html>   PART 2 to Follow
  4. Re: Battle ladder [Mccodes V2] Keeping to the same Principal as RICHARDS script Ive just slightly added to it You can add as many tournaments as you want also changing player min and max levels so the system is fair. It can be used as a donator only system with or without cash entries or a standalone for everyone to join in.... As always ive used an Installer for easy installlation just ironing out some bugs before i post the script...
  5. Re: Battle ladder [Mccodes V2] Richard would you mind if i Added to this script would like to add your sqls for joining diff ladder types and try a new approach to the admin panel.
  6. Yes i know this is in the wrong place but im hoping MDSHARE will make a forum for us to name and shame so heres my entry http://www.modern-empires.com/home.php Using my scripts in a packaged sale After repeatedly sending him emails i got a repy   Scripts taken are attackimageuploader and theme changer
  7. Re: [mccode] RSS Feed for Announcements Nice one MD :) Ive never used an rssfeed could be worth checking out :)
  8. Re: [any version] Removal of 1 minute crons I think POG1 and Haunted_Dawg have revolutionised the life of MCC by doing this to the Crons. I know from experience not many Hosts like 1 minute cron jobs so gone are the days of having to sift through thousands of hosts that will allow it. What they have achieved here is an emense step forward for any MCC gamer So dabomstew get back to the drawing board my son theirs a new clan in town. EXCELLENT work.. :)
  9. Re: [mccodes v2]New and improved inventory code sources for free! adding {$_POST['itmname']} to the event will also tell the user what the name of the item is aswell as the items ID..
  10. Re: Battle ladder [Mccodes V2] Nice script but can i make a suggestion where by the Cron would reset all players at the end of the week. So other players can have a chance at being top slot on the next available join date. The way it is now it would just keep looping Also that a player who is high enough to join any level can join a ladder where all players are way under their level which wouldnt make this such a fair ladder system. Just a thought.
  11. Re: [MCCODES V2] Search Forums by Name will add more as i go along [WORKING] Update to Haunted_Dawgs script   <?php // Haunted_Dawg 2009 include_once(DIRNAME(__FILE__).'/globals.php'); echo '<h2>Searching Forum</h2>'; $two_strings_force = 1; if( isset($_POST['search']) ) { $search = htmlentities(mysql_real_escape_string($_POST['search'])); if($two_strings_force == 0) { if(!preg_match('~(.*?)([ ])(.*?)~is',$search)) { echo 'Two words are needed for this to work. Please go back and put in two words.'; $h->endpage(); exit; } } if(strlen($_POST['search']) < 4) { die("<h1>Sorry, Your search Request is too short.</h1> >[url='whateveryoulike.php']Return to search page[/url]"); } $double = mysql_query("SELECT fp_topic_id,fp_text,fp_poster_name,fp_poster_id FROM `forum_posts` WHERE `fp_text` LIKE('%".$search."%')") or die(mysql_error().' File: '.$_SERVER['PHP_SELF'].' Line: '.__LINE__); echo mysql_num_rows($double).' rows found. The word you searched for has been put in bold. <table cellspacing="0" style="border: 1px black solid;"> <tr> <th>Post</th> <th>Poster</th> </tr>'; while($soc = mysql_fetch_assoc($double)) { $str_rep = str_replace($search,'[b]'.$search.'[/b]',$soc['fp_text']); echo ' <tr> <td>[url="forums.php?viewtopic='.$soc['fp_topic_id'].'"]'.$str_rep.'[/url]</td> <td>[url="viewuser.php?u='.$soc['fp_poster_id'].'"]'.$soc['fp_poster_name'].'[/url] ('.$soc['fp_poster_id'].')</td> </tr>'; } echo ' </table>'; } else if( !isset($_POST['search']) ) { $text = ($two_strings_force == 0) ? 'You also need to add two words for the search to run.' : ''; echo ' <span style="color: red;">*</span> Here you can search through out the forum for the words you desire. '.$text.' <form action="'.$_SERVER['PHP_SELF'].'" method="post"> Words: <input type="text" name="search" /> <input type="submit" value="Search Forum" /> </form>'; } $h->endpage(); ?>   Now allows for single word finding and also restricted to 4 letters or more...
  12. Re: [MCCODES V2] Search Forums by Name will add more as i go along [WORKING] Tried and tested and works fine search for lwords with less than 4 letters gives the error words of 4 or more letters will allow user to view found results :)
  13. Re: [MCCODES V2] Search Forums by Name will add more as i go along [WORKING] UPDATE this will stop users from entering one letter words open searchforumname.php and after the include "globals.php"; add   if(strlen($_GET['name']) < 4) { die("<h1>Sorry, Your search Request is too short.</h1> >[url='searchforums.php']Return to search page[/url]"); }   Ive set it to 4 which is about adequate but if you want to change it then go ahead :)
  14. Re: [MCCODES V2] Search Forums by Name will add more as i go along [WORKING]   yes that can be done aswell wasnt sure where people wanted to add this so it kinda made sense just to do it as a whole..
  15. This will allow USers to search the forums for particular words from posts Its basic but i'll add to it as i go along. call this file searchforums.php   <?php include "globals.php"; print "<h3>Forum Search</h3> [b]Search Forums by Word[/b]<form action='searchforumname.php' method='get'> <input type='text' name='name' /> <input type='submit' value='Search' />"; $h->endpage(); ?>   and call this one searchforumname.php   <?php include "globals.php"; //search name if(!$_GET['name']) { print "Invalid use of file"; } else { $q=$db->query("SELECT * FROM forum_posts WHERE fp_text LIKE ('%{$_GET['name']}%')"); print $db->num_rows($q)." Forum Posts Found. <table><tr style='background-color:gray;'><th>Word</th><th>Poster</th><th>Poster ID</th></tr>"; while($r=$db->fetch_row($q)) { print "<tr><td>[url='forums.php?viewtopic={$r[']{$r['fp_text']}[/url]</td><td>{$r['fp_poster_name']}</td><td>[url='viewuser.php?u={$r['][{$r['fp_poster_id']}][/url] </td></tr>"; } print "</table>"; } $h->endpage(); ?>   Add a link in your forums.php file pointing to searchforums.php and your done.......... EDIT Redid posts so you can go straight to the Forum topic from which it was posted.....
  16. Re: New explore city (HTML) Im going to give you +1 just for the sake its your first post and its a mod :) Ive never really liked tables due to the fact that if you have an odd number you either end up with blank boxes with TBA written in them to fill the gaps or if your feeling lazy a completely blank section with 1 or more boxes. However i know how hard tables can be at times and frustrating when they dont go to plan. So it's nice to have one pre-made.. Good work :) Reson for EDIT damn Typos ( Why is it when you post even after reading you always find stupid Typos after you click save )
  17. Re: New explore city (HTML) This would allow you to use it as a php   <?php include "globals.php": echo <<<EOF <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="in.css" type="text/css"> <link href="in.css" rel="stylesheet" type="text/css"> <title>explore city new page</title> </head> <body style="background-image: url(../images/bg.jpg);"> <div style="text-align: center; color: rgb(204, 204, 204); font-weight: bold;"><input name="PHPSESSID" value="4e63876525db037cce2678d502054ca2" type="hidden"></div> <div style="text-align: center;"><span style="color: rgb(204, 204, 204); font-weight: bold;">Welcome To [Youre Game Name] City.</span><br style="color: rgb(204, 204, 204); font-weight: bold;"> <span style="color: rgb(204, 204, 204); font-weight: bold;"> While Exploring You Notice Some Usefull Stores</span><br style="color: rgb(204, 204, 204); font-weight: bold;"> <table style="text-align: left; width: 1190px; height: 431px;" border="1" cellpadding="2" cellspacing="2"> <tbody> <tr> <td style="text-align: center;">Search And Kill</td> <td style="text-align: center;">Users Online</td> <td style="text-align: center;">Find Users</td> <td style="text-align: center;">Commit Crime</td> <td style="text-align: center;">Commit GTA</td> <td style="text-align: center;">Credit's</td> </tr> <tr> <td style="text-align: center;">Domination</td> <td style="text-align: center;">Bullet Factory</td> <td style="text-align: center;">Underground</td> <td style="text-align: center;">Inbox</td> <td style="text-align: center;">Send Message</td> <td style="text-align: center;">Forum</td> </tr> <tr> <td style="text-align: center;">Player Status</td> <td style="text-align: center;">Chase</td> <td style="text-align: center;">Drugs</td> <td style="text-align: center;">Crew Forum</td> <td style="text-align: center;">Crews</td> <td style="text-align: center;">Youre Crew</td> </tr> <tr> <td style="text-align: center;">Sell</td> <td style="text-align: center;">OC</td> <td style="text-align: center;">Getaway</td> <td style="text-align: center;">Extortion</td> <td style="text-align: center;">Missions</td> <td style="text-align: center;">Hospital</td> </tr> <tr> <td style="text-align: center;">Travel</td> <td style="text-align: center;">Gym</td> <td style="text-align: center;">Jail</td> <td style="text-align: center;">Bank</td> <td style="text-align: center;">News</td> <td style="text-align: center;">Newspaper</td> </tr> <tr> <td style="text-align: center;">Help Desk</td> <td style="text-align: center;">Hitlist</td> <td style="text-align: center;">Attempts</td> <td style="text-align: center;">Safehouse</td> <td style="text-align: center;">Garage</td> <td style="text-align: center;">Casino</td> </tr> </tbody> </table> . </div> </p> </body> </html> EOF; $h->endpage(); ?>
  18. Re: [MCCODES V2] User Holidays script heres a view of what to expect from the holiday script Just to note this layout is subject to change and may not be that of the final script
  19. Re: [MCCODES V2] User Holidays script Sorry this isnt ready yet its quite a complex script.. Ive done the admin section for it and the installer just a case now of going through files in order to pick the best locations for it to work
  20. Re: [MCCODES V2] User Holidays script Ive been inundated with emails for addons to this script. people feel that Holidays should be earned from the game. so my structuring would be 1 = 25 attacks would result in one holiday token 2 = 7 day successful voting would result in 2 holiday tokens 3 = Holiday Tokens cannot be baught for cash in the game 4 = 5 referrals to the game will also give you 5 holiday tokens and i'll think of more as i go along
  21. Re: [REVIEW] Deadly Ghetto. A few of the above were fixed whlst i was chatting with eternal. Regards the screen shot its the one from the login screen. ( this maybe just an IE bug ) But as a whole it ran smoothly with no dead links :)
  22. Re: [REVIEW] Deadly Ghetto. i found a few annoyances to the game.. 1 = screenshot = when clicked on kept returning even when X was clicked i had to close down screen and reload.. 2 = Center screen some parts are unreadable when trying to read emails or explore page 3 = When trying to Equip a weapon it sends me back to home page without the weapon being equipped.. 4 = whilst in hospital i was able to try rescue someone from jail and get thrown in... ????
  23. Re: [Review] - Killah-City.net - Please Review I havent even had chance to register on the game to view it :) i just keep getting this message.. Really now does it work?
  24. Re: [MCCODES V2] User Holidays script   Thats feasable but i also want the User to be able to return to the game. but i was also thinking that the user may want to continue the game maybe via a internet cafe so this script would be rather worthless...
  25. Re: [MCCODES V2] User Holidays script As with all my scripts from now on I will include an Installer if SQLS to be inserted are large if anyone has had a problem with any previous versions of the installer if you post here now i can sort out any bugs befoer i make this mod public.....
×
×
  • Create New...