
Karlos
Members-
Posts
951 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Karlos
-
Re: Help with auto ipn Maybe the AJAX taken from TC :lol:
-
Re: Help with auto ipn Or... Don't buy off Cronus.. I brought this exact mod, while someone else got a support ticket link.. I didn't.. Personally I wouldn't buy off him, unless you are guaranteed a support ticket and that he actually gives help out and says "Ohh the mod works fine".. I say bull<censored> support. :-)
-
Re: [mccodes v2] Poll Modificaton Well so far I understand that Public - Works Private - Undefined Error Protected - Fatal Error But now, may I ask why would there need to be Private & Protected? Surely functions would actually benefit from being public?
-
Re: [MC Code v2] Saved Events I'm guessing that's OOP? If I am correct I would use it more, but it confuses me at times.. I like to increase my skills but just using online resources can be quite hard.
-
Re: [mccodes v2] Poll Modificaton I'm gonna sound a bit n00by here.. But public function means? :-P
-
Re: [MC Codes V2] Captcha ($1) Bump :wink:
-
Re: Magazine Cover What iPods? O.o
-
Re: [MC Code v2] Saved Events Bump :wink:
-
Re: [MC Codes V2] Captcha ($1) I legally cannot send it out in that package... But here it is for everyone.. Copies Left: 16
-
Re: [MC Codes V2] Captcha ($1) Thanks :-P Copies Left: 20
-
Re: [Mccodes V2] Player Mood I am guessing you have not seen my prefs.php... I use in_array() for other purposes... and yet I also use a switch() :wink: Check them out and work out what it does.
-
Re: [MC Codes V2] Captcha ($1) How do you know? The original captcha had 3 files :wink: Update! Copies Left: 23
-
Well I personally get fed up of most games having the same captcha which is default with MC Codes V2. So I decided to create and sell a new one for a very small amount. I plan to add more to this for future updates (e.g. AJAX and adding CSS). I will also create you 9 images for your numbers (1-9) which you will need to tell me which font you would like to be used for the images though, when buying the modification. I will also need to know which site you will put it on due to people re-using paid mods over and over again and sometimes illegally redistribute them. Copies Avalible: 25 This Mod Includes: 1 PHP File Paypal/MSN: [email protected] Screenshots :wink: Validation Screen Validation Refresh Validation Wrong Sorry for not much writing... I am not a content writer :lol:
-
Re: [Mccodes V2] Shop Reduction Prices Tryed $db->fetch_row(); ;)
-
Re: [Mccodes V2] Player Mood function MoodChange() { global $ir, $db; if (isset($_POST['PlayerMood'])) { $db->query(sprintf("UPDATE `users` SET `mood`='%s' WHERE `userid`='%d'", addslashes(htmlentities($_POST['PlayerMood'])), abs($ir['userid']))); echo sprintf("You're Mood Is Now %s", stripslashes(htmlentities($_POST['PlayerMood']))); exit($h->endpage()); } else { echo '<h3 style="text-decoration: underline;">Mood Change</h3> <form action="prefs.php?act=MoodChange" method="post">'; echo sprintf("<input type='text' name='PlayerMood' value='%s' />", $PlayerMood); echo sprintf("You're Mood Is Currently: %s ", stripslashes($ir['PlayerMood'])); echo '<input type="submit" value="Mood Change!" /> </form>'; } } // Also Make the in_array(); if (!in_array($_GET['act'], array('Index', 'SexChange', 'PassChange', 'NameChange', 'DPChange', 'ForumSig', 'MoodChange'))) { Error('Invalid Command!'); }
-
Re: [MC Code v2] Saved Events Add ob_start(); just under session_start(); in globals.php :wink:
-
Re: How to secure a few things! $_GET //Yours (Numeric): $_GET['faz'] = abs(@intval($_GET['faz'])); //Mine (Numeric): $_GET['faz'] = isset($_GET['faz']) && !empty($_GET['faz']) && ctype_digit($_GET['faz']) ? $_GET['faz'] : FALSE; //Yours (String): $_GET['faz'] = stripslashes(htmlspecialchars($_GET['faz'])); //Mine (String): $_GET['faz'] = isset($_GET['faz']) && !empty($_GET['faz']) && ctype_alnum($_GET['faz']) ? $_GET['faz'] : FALSE; $_POST //Yours (String): $_POST['faz'] = mysql_real_escape_string(htmlentities($_POST['faz'])); // Not that bad.. (May want to stripslashes if Magic Quotes are on..) //Yours (Numeric): $_POST['faz'] = abs(@intval($_POST['faz'])); // Not that bad... Others //Yours (Select + Secure): $query = sprintf("SELECT * FROM users WHERE (userid = %u)", $_GET['faz']); $db->query($query); //Mine (Select + Secure): $db->query(sprintf("SELECT * FROM `users` WHERE `userid`='%d'", abs($_GET['faz']))); //Yours (Update): $sprintf = sprintf("UPDATE `users` SET `money` = `money` - %d WHERE (`userid` = $userid)", abs(@intval($loss))); $db->query($sprintf); //Assuming $loss is a $_POST //Mine (Update): if (!ctype_digit($_POST['loss'])) { echo 'Epic Fail!'; exit(); } else { $db->query(sprintf("UPDATE `users` SET `money`=`money`-'%d' WHERE `userid`='%d'", $_POST['loss'], abs($ir['userid']))); } Hope that helps abit.. Just remember... sprintf(); does not and I repeat secure queries... sprintf(); formats... Just remember that
-
Re: [MC Code v2] Saved Events Well I got the idea off Anthony... But I never saw his function.. So I made my own.. It saves me alot of typing aswell
-
This is based off BlackVengeance's saved events mods for V1. I have converted it to V2 and enhanced the features. Add/Edit 3 PHP Files Add 1 Functions Add 1 SQL Table <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['delete'] = isset($_GET['delete']) && !empty($_GET['delete']) && ctype_digit($_GET['delete']) ? abs($_GET['delete']) : FALSE; if ($_GET['delete']) { $db->query(sprintf("DELETE FROM `events` WHERE `evID`='%u' AND `evUSER`='%u'", abs(@intval($_GET['delete'])), abs($userid))); echo '[b]Event Deleted[/b] '; } else if (isset($_GET['delall'])) { echo 'This Will Delete All Your Events. There Is [b]No[/b] Undo, So Be Sure. > [url="events.php?delall2"]Yes, Delete All My Events[/url] > [url="events.php"]No, Go Back[/url]'; exit($h->endpage()); } else if (isset($_GET['delall2'])) { $Amount = $db->num_rows($db->query(sprintf("SELECT `evID` FROM `events` WHERE `evUSER`='%d'", abs($userid)))); $db->query(sprintf("DELETE FROM `events` WHERE `evUSER`='%d'", abs($userid))); echo sprintf("All [b]%s[/b] events you had were deleted. ", number_format($Amount)); echo '> [url="events.php"]Back[/url] '; exit($h->endpage()); } else if (isset($_GET['save'])) { $_GET['save'] = isset($_GET['save']) && !empty($_GET['save']) && ctype_digit($_GET['save']) ? abs($_GET['save']) : FALSE; $Select = $db->query(sprintf("SELECT `evID`, `evUSER`, `evTIME`, `evTEXT` FROM `events` WHERE `evID`='%d'", $_GET['save'], $userid)); while($x = $db->fetch_row($Select)) { $db->query(sprintf("INSERT INTO `savedevents` (`evUSER`, `evTIME`, `evTEXT`) VALUES ('%d', '%d', '%s')", $userid, $x['evTIME'], mysql_real_escape_string($x['evTEXT']))); $db->query(sprintf("DELETE FROM `events` WHERE `evID`='%u' AND `evUSER`='%u'", abs($x['evID']), abs($x['evUSER']))); } echo '[b]Event Moved To Saved Events.[/b] '; } echo '<h3 style="text-decoration: underline;">Your Last 15 Events</h3> [i]These Are Your Last 15 Unsaved Events.[/i] > [url="sevents.php"]View Your Saved Events[/url] > [url="events.php?delall"]Delete All Your Events[/url] > [url="oevents.php"]Search For A User\'s Saved Events[/url] <table border="1" width="85%" class="table" cellspacing="0" cellpadding="4"> <tr style="text-align:center;"> <th width="25%">Time</th> <th width="60%">Event</th> <th width="15%">Links</th> </tr>'; $GetInfo = $db->query(sprintf("SELECT `evID`, `evUSER`, `evTIME`, `evREAD`, `evTEXT` FROM `events` WHERE `evUSER`='%u' ORDER BY `evTIME` DESC LIMIT 15", abs($userid))); if (!$db->num_rows($GetInfo)) { echo '<td colspan="3" style="text-align: center;">You Currently Have No Events.</td>'; } else { while($r = $db->fetch_row($GetInfo)) { echo ' <tr> <td>'; echo sprintf("%s %s", date('F j Y, g:i:s a', $r['evTIME']), (!$r['evREAD']) ? ' [b]New![/b]' : FALSE); echo ' </td> <td>'; echo sprintf("%s", stripslashes($r['evTEXT'])); echo ' </td> <td style="text-align:center;">'; echo sprintf("[url='events.php?delete=%d']Delete[/url] ", abs($r['evID'])); echo sprintf("[url='events.php?save=%d']Save[/url]", abs($r['evID'])); echo ' </td> </tr>'; } } echo '</table>'; if ($ir['new_events'] >= 1) { $db->query(sprintf("UPDATE `events` SET `evREAD`='1' WHERE `evUSER`='%d'", abs($userid))); $db->query(sprintf("UPDATE `users` SET `new_events`='0' WHERE `userid`='%d'", abs($userid))); } $h->endpage(); ?> <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['act'] = isset($_GET['act']) && !empty($_GET['act']) && ctype_alpha($_GET['act']) ? ucWords($_GET['act']) : FALSE; switch($_GET['act']) { default: Index(); break; case 'Events': Events(); break; } if (!in_array($_GET['act'], array('', 'Index', 'Events'))) { Error('Invalid Command.'); } function Index() { global $db, $h; if (isset($_POST['ID'])) { exit(header(sprintf("Location: oevents.php?act=Events&ID=%d", $_POST['ID']))); } else if (isset($_POST['Username'])) { $_POST['Username'] = trim($_POST['Username']); $Select = $db->query(sprintf("SELECT `userid`, `username`, `donatordays` FROM `users` WHERE `username` LIKE('%%%s%%')", mysql_real_escape_string($_POST['Username']))); echo sprintf("User's found: %s ", $db->num_rows($Select)); echo ' <table border="1" class="table" cellspacing="0" cellpadding="0" width="50%"> <tr> <th width="40%">Username</th> <th width="60%">View Events</th> </tr>'; if (!$db->num_rows($Select)) { echo ' <tr style="text-align:center;"> <td colspan="2">No User\'s Found With That Term.</td> </tr>'; } else { while($r = $db->fetch_row($Select)) { echo '<tr style="text-align:center;">'; echo sprintf("<td>[url='viewuser.php?ID=%d']%s[/url] [%s] %s ", abs($r['userid']), ($r['donatordays']) ? '<span style="color: #0D961F;">'.stripslashes($r['username']).'</span>' : stripslashes($r['username']), number_format($r['userid']), ($r['donatordays']) ? '[img=Images/Donator.gif]' : FALSE); echo sprintf("<td>[url='oevents.php?act=Events&ID=%u']View %s's Saved Events[/url]</td>", abs($r['userid']), stripslashes($r['username'])); echo '</tr>'; } } echo ' </tr> </table>'; exit($h->endpage()); } else { echo ' <h3 style="text-decoration: underline;">Search For Players Saved Events</h3> <form action="oevents.php?act=Index" method="post"> Search by name: <input type="text" name="Username"> <input type="submit" value="Search By Name"> </form> <form action="oevents.php?act=Index" method="post"> Search by ID: <input type="text" name="ID"> <input type="submit" value="Search By ID"> </form>'; } } function Events() { global $db; $_GET['ID'] = isset($_GET['ID']) && !empty($_GET['ID']) && ctype_digit($_GET['ID']) ? abs($_GET['ID']) : FALSE; $r = $db->fetch_row($db->query(sprintf("SELECT `userid`, `username`, `donatordays` FROM `users` WHERE `userid`='%d'", $_GET['ID']))); if (!$_GET['ID']) { Error('No ID Specified.'); } else if ($_GET['ID'] <= 0) { Error('Invalid ID.'); } else { $Select = $db->query(sprintf("SELECT `evID`, `evUSER`, `evTIME`, `evTEXT`, `evDIS` FROM `savedevents` WHERE `evUSER`='%d' AND `evDIS`='1' ORDER BY `evTIME`", $_GET['ID'])); echo sprintf("<h3>Displayed Events For [url='viewuser.php?ID=%d']%s[/url] %s</h3> ", abs($r['userid']), ($r['donatordays']) ? '<span style="color: #0D961F;">'.stripslashes($r['username']).'</span>' : stripslashes($r['username']), ($r['donatordays']) ? '[img=Images/Donator.gif]' : FALSE); echo ' <table border="1" width="85%" class="table" cellspacing="0" cellpadding="4"> <tr> <th width="30%">Time</th> <th width="70%">Event</th> </td> </tr>'; if (!$db->num_rows($Select)) { echo ' <tr style="text-align: center;"> <td colspan="2">This User Has No Saved Events.</td> </tr>'; } else { while($r = $db->fetch_row($Select)) { echo '<tr>'; echo sprintf("<td>%s</td>", date('F j Y, g:i:s a', $r['evTIME'])); echo sprintf("<td>%s</td>", stripslashes($r['evTEXT'])); echo '</tr>'; } } echo '</table>'; } } $h->endpage(); ?> <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['delete'] = isset($_GET['delete']) && !empty($_GET['delete']) && ctype_digit($_GET['delete']) ? abs($_GET['delete']) : FALSE; if (isset($_GET['delall'])) { echo 'This Will Delete All Your Saved Events. There Is [b]No[/b] Undo, So Be Sure. > [url="sevents.php?delall2"]Yes, Delete All My Saved Events[/url] > [url="sevents.php"]No, Go Back[/url]'; exit($h->endpage()); } else if (isset($_GET['delall2'])) { $Amount = $db->num_rows($db->query(sprintf("SELECT `evID` FROM `savedevents` WHERE `evUSER`='%d'", abs($userid)))); $db->query(sprintf("DELETE FROM `savedevents` WHERE `evUSER`='%d'", abs($userid))); echo sprintf("All [b]%s[/b] events you had were deleted. ", number_format($Amount)); echo '> [url="events.php"]Back[/url] '; exit($h->endpage()); } else if ($_GET['delete']) { $db->query(sprintf("DELETE FROM `savedevents` WHERE `evID`='%d' AND `evUSER`='%d'", $_GET['delete'], $userid)); echo '[b]Event Deleted...[/b] '; } else if (isset($_GET['display'])) { $db->query(sprintf("UPDATE `savedevents` SET `evDIS`='1' WHERE `evID`='%d' AND `evUSER`='%d'", $_GET['display'], abs($userid))); echo '[b]Event Displayed...[/b] '; } else if (isset($_GET['undisplay'])) { $db->query(sprintf("UPDATE `savedevents` SET `evDIS`='0' WHERE `evID`='%d' AND `evUSER`='%d'", $_GET['undisplay'], abs($userid))); echo '[b]Event Removed from Display...[/b] '; } echo '<h3 style="text-decoration: underline;">Latest 25 Saved Events</h3> > [url="sevents.php?delall"]Delete All My Saved Events[/url] <table border="1" width="85%" class="table" cellspacing="0" cellpadding="4"> <tr> <th width="25%">Time</th> <th width="50%">Event</th> <th width="12%">Delete</th> <th width="13%">Display</th> </tr>'; $Select = $db->query(sprintf("SELECT `evID`, `evUSER`, `evTIME`, `evTEXT`, `evDIS` FROM `savedevents` WHERE `evUSER`='%d' ORDER BY `evTIME`", abs($userid))); if (!$db->num_rows($Select)) { echo '<td colspan="4" style="text-align: center;">You Currently Have No Saved Events.</td>'; } else { while($r = $db->fetch_row($Select)) { echo '<tr>'; echo sprintf("<td>%s</td>", date('F j Y, g:i:s a', $r['evTIME'])); echo sprintf("<td>%s</td>", stripslashes($r['evTEXT'])); echo sprintf("<td>[url='sevents.php?delete=%d']Delete[/url]</td>", $r['evID']); echo sprintf(($r['evDIS'] == '1') ? "<td>[url='sevents.php?undisplay=%d'][i]Undisplay[/i][/url]</td>" : "<td>[url='sevents.php?display=%d']Display[/url]</td>", $r['evID'], $r['evID']); echo '</tr>'; } } echo '</table>'; $h->endpage(); ?> Add to global_func.php: // Error/Exit Function (Don't Take Credit For This Function (You Can Post Anywhere If Mentioned I Made It)) if (!function_exists('Error')) { function Error($Message) { global $h; echo sprintf("<span style='color: #FF0000;'>Error! %s</span>", stripslashes($Message)); exit($h->endpage()); } } Add this to phpMyAdmin: CREATE TABLE IF NOT EXISTS `savedevents` ( `evID` INT(11) NOT NULL AUTO_INCREMENT, `evUSER` INT(11) NOT NULL DEFAULT 0, `evTIME` INT(10) NOT NULL DEFAULT 0, `evTEXT` VARCHAR(255) NOT NULL, `evDIS` TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`evID`), KEY `evUSER` (`evUSER`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Screenshots! Test Site Thanks To Kyle Have fun! ;)
-
Re: TwIsTeD WiShEs ! Granted....BUT! MTG shot you in the head :-P I wish I wasn't bored :|
-
Re: Storing And Reading OS/Browser Information Well due to the edit of php.ini, ect. I found a function to do the Job how I need it. :-P
-
Re: Storing And Reading OS/Browser Information I use this file: http://browsers.garykeith.com/stream.as ... rowsCapINI Secondly.. Can anyone tell me if this is correct for them, 3 functions to get the info :lol: http://cursed-islands.com/Bah.php
-
[mccode2] 3 in one bank for people with multiple currencys
Karlos replied to MDK666's topic in Free Modifications
Re: [mccode2] 3 in one bank for people with multiple currencys I've been coding PHP for over 9 months... Just recently started looking into the MySQL side in more depth recently... -
[mccode2] 3 in one bank for people with multiple currencys
Karlos replied to MDK666's topic in Free Modifications
Re: [mccode2] 3 in one bank for people with multiple currencys Umm.... I'm not advanced.. I wish I was though :-P -
Re: Storing And Reading OS/Browser Information I've replaced the link and tryed the file again again.. With no success. I now currently get no error.. But no information comes up.. :|