Jump to content
MakeWebGames

Zero-Affect

Members
  • Posts

    3,713
  • Joined

  • Last visited

    Never

Everything posted by Zero-Affect

  1. Re: Staff Applications [FREE] i did say there maybe some bugs since i just opened the old file and added all the extra sprintf etc... and changed all the queries naw he said something similar earlier i think he's trying to offend me in some way   thank you ColdK   free mod? well the clue is in the subject you know the part that says [free]
  2. Re: Staff Applications [FREE] actually no its fixed lol i was going to sprintf but i realized that the 1 and 0 are not inputted so really no need for sprintf   i have no idea what on earth your talking about... what im at? are you insinuating i don't know what im doing?
  3. I got bored lately and edited a old modification i made for Killah-City.net. There maybe a few bugs but i assume you guys will point them out. Since i have not released anything new for awhile i thought i would post this. It is pretty big but works great. StaffApps.php - <?php /* -- Staff Applications V2 -- Coded By Zero-Affect */ require "globals.php"; if($set['stafflock'] == 'Locked') { echo "Staff Applications are locked at the moment, please try again later. >[url='index.php']Go Home[/url]"; $h->endpage(); exit; } echo "<h3>Staff Applications</h3>"; $_POST['ID'] = abs((int) $_POST['ID']); if($_POST['ID']) { $sql = sprintf('SELECT COUNT(ID) AS `count` FROM `staffaps` WHERE ID = %u', $userid); $sql = $db->query($sql); $gaps = $db->fetch_row($sql); if($gaps['count']) { echo "Invalid Command. You already have submitted a application. >[url='index.php']Go Home[/url]"; $h->endpage(); exit; } else if(!$gaps['count']) { $_POST['staff'] = abs((int) $_POST['staff']); $_POST['about'] = mysql_real_escape_string(htmlentities($_POST['about'])); $_POST['exp'] = mysql_real_escape_string(htmlentities($_POST['exp'])); if(strlen($_POST['about']) > 75 OR strlen($_POST['exp']) > 75) { echo 'Invalid Command. You cannot input more than 75 characters. >[url="StaffApps.php"]Go Back[/url]'; $h->endpage(); exit; } $_POST['about'] = strip_tags($_POST['about'], '[b][i]<u><s>'); $_POST['exp'] = strip_tags($_POST['exp'], '[b][i]<u><s>'); $query = sprintf("INSERT INTO `staffaps` VALUES ('%u', '%s', '%s', '%u')", $userid, $_POST['about'], $_POST['exp'], $_POST['staff']); $db->query($query); echo "Application sent please wait atleast 5 days for reply from staff. >[url='index.php']Go Home[/url]"; } } else { echo " <form action='StaffApps.php' method='post'> <input type=hidden value='$userid' name='ID'> <table width=80% border=1 class=h> <tr><th colspan=2>Application Form.</th></tr> <tr> <td>Position: </td> <td> <select name='staff' type='dropdown'> <option value='2'>Admin <option value='3'>Secretary <option value='5'>Assistant </select> </td> </tr> <tr> <td>Why: </td> <SCRIPT LANGUAGE='JavaScript'> function textCounter(field, countfield, maxlimit) { if (field.value.length > maxlimit) field.value = field.value.substring(0, maxlimit); else countfield.value = maxlimit - field.value.length; } </script> <td> <textarea name=about maxlength=75 wrap=physical cols=75 rows=5 onKeyDown='textCounter(this.form.about,this.form.remLen,75);' onKeyUp='textCounter(this.form.about,this.form.remLen,75);'></textarea> <input readonly type=text name=remLen size=3 maxlength=2 value='75'> characters left</font> </td> </tr> <tr> <td>Experience [i](Sites worked on)[/i]: </td> <SCRIPT LANGUAGE='JavaScript'> function textCounter1(field, countfield, maxlimit) { if (field.value.length > maxlimit) field.value = field.value.substring(0, maxlimit); else countfield.value = maxlimit - field.value.length; } </script> <td> <textarea name=exp maxlength=75 wrap=physical cols=75 rows=5 onKeyDown='textCounter1(this.form.exp,this.form.remLen1,75);' onKeyUp='textCounter1(this.form.exp,this.form.remLen1,75);'></textarea> <input readonly type=text name=remLen1 size=3 maxlength=2 value='75'> characters left</font> </td> </tr> <tr> <td colspan=2><input type='submit' value='Submit'></form></td> </tr> </table> "; } $h->endpage(); ?>   SQl: CREATE TABLE IF NOT EXISTS `staffaps` ( `ID` int(11) NOT NULL default '0', `about` text NOT NULL, `exp` text NOT NULL, `position` int(11) NOT NULL default '0' ); SQL 2: INSERT INTO `settings` ( `conf_id` , `conf_name` , `conf_value` ) VALUES ( '17', 'stafflock', 'Locked' );   staff.php - Find: case 'announce': announcements(); break; Add Below: case 'staffaps': staffaps(); break; case 'lstaffaps': lstaffaps(); break;   Also Find: function announcements() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { die("403"); } if($_POST['text']) { $db->query("INSERT INTO announcements VALUES('{$_POST['text']}', unix_timestamp())"); $db->query("UPDATE users SET new_announcements=new_announcements+1"); print "Announcement added! > [url='staff.php']Back[/url]"; stafflog_add("Added a new announcement"); } else { print "Adding an announcement... Please try to make sure the announcement is concise and covers everything you want it to.<form action='staff.php?action=announce' method='post'> Announcement text: <textarea name='text' rows='10' cols='60'></textarea> <input type='submit' value='Add Announcement' /></form>"; } } Add Below: function lstaffaps() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { die("403"); } $_GET['lock'] = abs((int) $_GET['lock']); if($_GET['lock'] == '1') { $db->query("UPDATE `settings` SET conf_value='Locked' WHERE conf_name='stafflock'"); stafflog_add("Locked Staff Applications."); echo "Staff applications are now locked. >[url='staff.php']Go Back[/url]"; $h->endpage(); exit; } else if($_GET['lock'] == '2') { $db->query("UPDATE `settings` SET conf_value='Unlocked' WHERE conf_name='stafflock'"); stafflog_add("Unlocked Staff Applications."); echo "Staff applications are now unlocked. >[url='staff.php']Go Back[/url]"; $h->endpage(); exit; } } function staffaps() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { die("403"); } $_POST['accept'] = abs((int) $_POST['accept']); $_POST['pos'] = abs((int) $_POST['pos']); $_POST['ID'] = abs((int) $_POST['ID']); if($_POST['accept'] == '1') { $sql = sprintf('SELECT `username` FROM `users` WHERE userid = %u', $_POST['ID']); $sql = $db->query($sql); $usr1 = $db->fetch_row($sql); if($_POST['pos'] == '2') { $pos="Admin"; } if($_POST['pos'] == '3') { $pos="Secretary"; } if($_POST['pos'] == '5') { $pos="Assistant"; } echo "{$usr1['username']} Applied for {$pos} You Accepted. >[url='staff.php']Go Back[/url]"; event_add($_POST['ID'],'Your staff application was accepted, Welcome to staff!', $c); stafflog_add("Accepted Staff Application from {$usr1['username']} for {$pos}"); $query = sprintf('UPDATE `users` SET user_level = %u WHERE userid = %u', $_POST['pos'], $_POST['ID']); $db->query($query); $query = sprintf('DELETE FROM `staffaps` WHERE ID = %u', $_POST['ID']); $db->query($query); $h->endpage(); exit; } if($_POST['accept'] == '2') { $sql = sprintf('SELECT `username` FROM `users` WHERE userid = %u', $_POST['ID']); $sql = $db->query($sql); $usr1 = $db->fetch_row($sql); if($_POST['pos'] == '2') { $pos="Admin"; } if($_POST['pos'] == '3') { $pos="Secretary"; } if($_POST['pos'] == '5') { $pos="Assistant"; } echo "{$usr1['username']} Applied for {$pos} You declined. >[url='staff.php']Go Back[/url]"; event_add($_POST['ID'],'Your staff application was declined.', $c); stafflog_add("Declined Staff Application from {$usr1['username']} for {$pos}"); $query = sprintf('DELETE FROM `staffaps` WHERE ID = %u', $_POST['ID']); $db->query($query); $h->endpage(); exit; } else { echo " <table width=100% border=1 class=h><tr><th>Position</th><th>Why</th><th>Experience</th><th>Applicant</th><th>Action</th></tr> "; $gasp = $db->query('SELECT `position`, `ID`, `about`, `exp` FROM `staffaps` WHERE ID > 0 ORDER BY ID DESC'); while($r = $db->fetch_row($gasp)) { if($r['position'] == '2') { $pos="Admin"; } if($r['position'] == '3') { $pos="Secretary"; } if($r['position'] == '5') { $pos="Assistant"; } $ql = sprintf('SELECT `username` FROM `users` WHERE userid = %u', $r['ID']); $ql = $db->query($ql); $usr=$db->fetch_row($ql); echo "<td align='center'><form action='?action=staffaps' method='post'><input type='hidden' name='pos' value='{$r['position']}'><input type='hidden' name='ID' value='{$r['ID']}'>{$pos}</td><td>{$r['about']}</td><td>{$r['exp']}</td><td>[url='viewuser.php?u={$r[']{$usr['username']}[/url]</td><td>Accept: <input type='radio' name='accept' value='1'> Decline: <input type='radio' name='accept' value='2'> <input type='submit' value='submit'></form></td></tr>"; } echo "</table>"; } }   smenu.php - Find: > [url='staff.php?action=announce']Add Announcement[/url]   Add Below: > [url='staff.php?action=lstaffaps&lock=1']Lock Staff Apps[/url] > [url='staff.php?action=lstaffaps&lock=2']Unlock Staff Apps[/url] > [url='staff.php?action=staffaps']Staff Applications[/url]   mainmenu.php - Find: [url='newspaper.php']Newspaper[/url]   Replace with: [url='newspaper.php']Newspaper[/url] "; if($set['stafflock'] == 'Locked') { echo "$T[url='']<s>Staff Applications</s>[/url] "; } else if($set['stafflock'] == 'Unlocked') { echo "$T[url='StaffApps.php']Staff Applications[/url] "; } echo "   ALL STAFF BUGS FIXED
  4. Re: Battletent Fix that's probably why i find it weird i prefer not to look at tutorials or have someone sitting next to me saying do this do that lol i just jump straight in and have a go i got most of what i know about php from php files i've just opened and looked through the coding :-D
  5. Name: HitManList OR Av Bounty Availability: 8 Copies Price: $20.00 USD Includes: 1 php file(hitmanlist.php) 1 txt file(Instructions.txt) Description: This is simply a bounty modification with a bit more of a twist, you can add bounties on other members with (Money, Crystals and/or Items). When a bounty is taken you have until the next hour to complete it. The modification will specify how long exactly you have to complete the contract. More info: Killah-City.net (under explore (Bounty)). Screen Shots: Screen Shot 1 Screen Shot 2 Screen Shot 3 Screen Shot 4 Screen Shot 5 Screen Shot 6 Screen Shot 7 Screen Shot 8 Contact Me: [email protected] [MSN] or mail me on here. This mod is only for v2 you can convert it yourself if you wish.
  6. Re: Updated Explore V.2   you don't post mods because you have no idea what your at.   The explore page with the database is a cool idea, the way i would so it is have 2 fields; url and name. then in the table have it loop through each cell. cool idea, may have to give it a go   Excuse me?
  7. Re: [FREE] Mail All Other Gang Leaders [V2] Very simple but i bet it would come in handy
  8. Re: [V2] Pollution Your welcome :-o
  9. Re: NEW V2 LOGIN PAGE   true
  10. Re: Sexual Appearance Very true it's annoying when someone does a free version of your paid modifications
  11. Re: [V2] Pollution Another nice modification Sniko :-D
  12. Re: Updated Explore V.2 lol MTG me and Ellis have had many disputes also i hate giving him things also (hence not posting many free modifications)
  13. Re: Battletent Fix how would you know, you don't play anymore lol
  14. Re: code line help   Interesting Method Kyle...
  15. Re: Tables     echo <<<EOF <table class="table" border="1"> <tr> <td>stat 1</td> <td>stat 2</td> </tr> <tr> <td>stat 3</td> <td>stat 4</td> </tr> </table> EOF;
  16. Re: Battletent Fix join my website and the npc's will kick your ass lol
  17. Re: 8 Lines to secure your site from known sql injections. i was on about something else but yeah i've gone through globals and global func and cleaned most of the stuff
  18. Re: Login [Free]   and i sit at home with afew bottles of brown ale and watch it on sky lol if i see you at a match ill get u a brown ale with 6 vodkas in and see how long you last lol 90 mins is a long time... lol
  19. Re: 8 Lines to secure your site from known sql injections. That's probably why Floydian and Nyna do not reply with the answer to what is more secure lol cause it contains editing all the files and adding afew codes to global func etc
  20. Re: Login [Free]   mackem lover... zOMG, cant beleive you said that.... im far from it. I HAS SEASON TICKETS to newcastle =D, do you???? uhu.. whos more of a fan :P. im allowed to drink alcohol, are you? lol
  21. Re: Login [Free]   mackem lover...
  22. Re: [MOD] Flash Clock suitable for all MCC versions [RE-UPLOADED]   I agree by i hate flash, but i would not even call it nice, tbh, the colors are all wrong, and i did not hear music, but why would you want music o n a clock ? :s now maybe input a alarm system into it and it could be alot better but i agree with hating flash it takes 2 long to load and is just boring after awhile
  23. Re: Battletent Fix i remove battle tent immediately i hate it
  24. Re: Login [Free]   Mine: Live it, Learn it, Code it.   anyone see something similar about them lmao tbh, does it matter? lmao leave me alone Terry when im bored i post unusual bs don't make me paint you red and white and send you to st. james
  25. Re: 8 Lines to secure your site from known sql injections.   I agree with Nyna now that i did some research and had a short conversation about it with Nyna & Floydian :-P
×
×
  • Create New...