
Eternal
Members-
Posts
305 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Eternal
-
Re: So many of one? So you post a hate thread about people posting updates of already made mods and that... This is the First time i see yours and blings name in this forum. Where is your superficial mods???? Instead of being a retard Why don't you post something of Cause? If people posted all their own mods then What is the point on learning how to code.. Just come on CE and Get what ever you need.
-
Re: sprintf() Query.. I may be wrong a little. But i think i was in another convo with some coder non mccode related. Where we was talking about how sprinf and its variables Can be insecure.
-
Re: Permenant Increase? in itemuse.php if($i['itmname'] == 'Brave Boost') { $max=amount you want here; $db->query("UPDATE users SET maxbrave=maxbrave+{$max} WHERE userid=$userid",$c); print "You Use the item and gain more max brave."; } Then create a normal item blank stats and power name it Brave Boost But this is just coding it in the page. Basicly taken from the donator pack page posted on here...
-
Re: [mccode all] sql backup I don't think this would run on wamp. lol or a similar xamp or so..
-
Re: [mccode all] sql backup well all i know is that this is working doing its job.. i know some of you proved different ways on it But this was the first way i came across and it doesn't create lag for me or any hassles.. so thank you for providing alternative ways about this as well...
-
Due to i posted this in a topic here and got some feedback in my inbox about it. I have decided to make it as a topic.... First this doesn't protect anything it just insures that a quick game backup could be restored to continue your Game for players.. Name the file to anything you like "ensure its name isn't easily guessed to prevent people clicking it. <? $datestamp = date("Y-m-d"); // Current date to append to filename of backup file in format of YYYY-MM-DD /* CONFIGURE THE FOLLOWING SEVEN VARIABLES TO MATCH YOUR SETUP */ $dbuser = ""; // Database username $dbpwd = ""; // Database password $dbname = ""; // Database name. Use --all-databases if you have more than one $filename= "backup-$datestamp.sql.gz"; // The name (and optionally path) of the dump file $to = ""; // Email address to send dump file to $from = ""; // Email address message will show as coming from. $subject = "MySQL backup file"; // Subject of email $command = "mysqldump -u $dbuser --password=$dbpwd $dbname | gzip > $filename"; $result = passthru($command); $attachmentname = array_pop(explode("/", $filename)); // If a path was included, strip it out for the attachment name $message = "Compressed database backup file $attachmentname attached."; $mime_boundary = "<<<:" . md5(time()); $data = chunk_split(base64_encode(implode("", file($filename)))); $headers = "From: $from\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: multipart/mixed;\r\n"; $headers .= " boundary=\"".$mime_boundary."\"\r\n"; $content = "This is a multi-part message in MIME format.\r\n\r\n"; $content.= "--".$mime_boundary."\r\n"; $content.= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n"; $content.= "Content-Transfer-Encoding: 7bit\r\n\r\n"; $content.= $message."\r\n"; $content.= "--".$mime_boundary."\r\n"; $content.= "Content-Disposition: attachment;\r\n"; $content.= "Content-Type: Application/Octet-Stream; name=\"$attachmentname\"\r\n"; $content.= "Content-Transfer-Encoding: base64\r\n\r\n"; $content.= $data."\r\n"; $content.= "--" . $mime_boundary . "\r\n"; mail($to, $subject, $content, $headers); unlink($filename); //delete the backup file from the server ?> also i have tried this on numerous free sites and some paid sites. You need to be able to use the command passthru() as a few sites block its usage...
-
Re: [Request] Gang Addon Shouldn't be that hard. But i don't see anyone doing it free.
-
Re: [mccode v2] Events Page Updated. have you tried finding a solution??? maybe in the link for button change button to submit
-
Need an Mccodes hall of fame of referrals
Eternal replied to (((TOLK)))'s topic in General Discussion
Re: Need an Mccodes hall of fame of referrals edit:for who ever match to your referral sql to this page. why learn when you get ..... on your case all the time??? echo '<table class="table" width="75%"> <tr style="background:brown"> <th>Name</th> <th>Referrals</th> </tr>'; $ar=$db->query("SELECT COUNT('refREFED') AS total,refREFER FROM referals GROUP BY refREFER ORDER BY COUNT('referred') DESC LIMIT 10"); while($s = $db->fetch_row($ar)) { echo '<tr style="background:brown">'; echo '<td>'.$s['refREFER'].'</td>'; echo '<td>'.$s['total'].'</td>'; echo '</tr>'; } echo '</table>'; *note i use a fotmatted name function so bringing their username here for me is useless... enjoy -
Re: [mccode v2] userADS LoL, i do guess i put that last statement wrong. I am 22 also i don't put forward i am a elite hacker or coder... I am learning and only a noob to this. I do guess posting this from a grpg engine converted was kinda foolish. also in no way do i claim to be anything GREAT... My name "Thehacker07" Doesn't mean i hack. I developed this name from a online hacking game i kinda used it everywhere. also thanx to the person who pointed out that "my coding sucks" in my forum that helped me notice a html exploit if you can call it that.. ............
-
Re: [mccode v2] userADS Yes i legally own a copy of GRPG. Which is a unsecured game engine. Yes my attack and my userads was based from the scripts from that engine. what i posted here is the basic scripts which is a tweak converted to the mccodes engine. is my attack the same code NO I have developed an authentic code structure which is my own codes. also on that note i have several paid game engines that i mix and match between engines. Is that illegal NO Do i care NO
-
Re: [mccodes V2] my verry first log in page LoL This is funny. I won't be nasty but this is a view source copy paste. screw being nice. PHP has php in it. This has html in it Either look into the real login page then make your changes or google how to use php.
-
Re: [mccode v2] Events Page Updated. using the code i put up works. I am using it on my game right now.. The one karlos done missed out on the pagination. Which is why i posted That one.
-
Re: [mccode v2] Events Page Updated. Here to stop your complaining <?php include_once (DIRNAME(__FILE__). '/globals.php'); if(isset($_POST['del_all'])) { mysql_query("DELETE FROM `events` WHERE `evUSER` = ".$ir['userid']) or die(mysql_error()); echo 'All events have been deleted.'; } if(isset($_GET['del'])) { $id = abs(@intval($_GET['del'])); mysql_query("DELETE FROM `events` WHERE `evID` = ".$id." AND `evUSER` = ".$ir['userid']); echo 'Event deleted.'; } if(isset($_POST['checkbox'])) { for($i = 0; $i < count($_POST['checkbox']); $i++) { mysql_query("DELETE FROM `events` WHERE `evID` IN(".$_POST['checkbox'][$i].") AND `evUSER` = ".$ir['userid']); $result = 1; } if($result == 1) { echo $i.' event(s) have been deleted.'; } else { echo 'Error occured while trying to delete the event(s).'; } } //Create Page Number's. $limit = 10; $page = abs(@intval($_GET['page'])); $page = isset($page) ? abs(@intval($_GET['page'])) : 0; $by = 'evTIME'; $order = 'DESC'; $rows = mysql_query("SELECT `evID` FROM `events` WHERE `evUSER` = ".$ir['userid']); $rows = mysql_num_rows($rows); $pages = abs(@intval(($rows / $limit) + 1)); if($rows % $limit == 0) { $pages++; } $pg = 'Page: '; echo '<h2>Events</h2> [b]Note:[/b] If you click on the check box and go to next page. The checkbox will be cleared. So delete the event\'s you want to delete before going to next page. <form action="'.$_SERVER['PHP_SELF'].'" method="post">'.$pg; for($i = 1; $i <= $pages; $i++) { $next = ($i * $limit); if ($i != 0) { echo '[url="'.$_SERVER['PHP_SELF'].'?page='.$next.'"]'.$i.'[/url] - '; } } echo ' <table border="1" cellspacing="0" cellpadding="0" class="table" width="80%"> <tr> <th>Time</th> <th>Event</th> <th>Links</th> </tr>'; if ($page >= 10) { $page=$page-10; } $myEvents = mysql_query("SELECT `evTIME`, `evREAD`, `evTEXT`, `evID` FROM `events` WHERE `evUSER` = ".$ir['userid']." ORDER BY ".$by." ".$order." LIMIT ".$page.",".$limit); while($soc = mysql_fetch_assoc($myEvents)) { $time = date('F j Y, g:i:s a', $soc['evTIME']); if(!$soc['evREAD']) { $new = ' [b]New![/b]'; } echo ' <tr> <td>'.$time.' '.isset($new).'</td> <td>'.$soc['evTEXT'].'</td> <td> <input type="checkbox" name="checkbox[]" value="'.$soc['evID'].'"> | '; if(isset($_GET['page']) ) { echo '[url="'.$_SERVER['PHP_SELF'].'?page='.$_GET['page'].'&del='.$soc['evID'].'"]Delete[/url]'; } else { echo '[url="'.$_SERVER['PHP_SELF'].'?del='.$soc['evID'].'"]Delete[/url]'; } echo ' </td> </tr> <tr>'; } echo ' </tr> </table> '.$pg; for($i = 1; $i <= $pages; $i++) { $next = ($i * $limit); if ($i != 0) { echo '[url="'.$_SERVER['PHP_SELF'].'?page='.$next.'"]'.$i.'[/url] - '; } } echo ' <input type="submit" value="Delete Selected Events"> | <input name="del_all" id="del_all" type="button" value="Delete All Events"> </form>'; if(isset($ir['new_events']) > 0) { mysql_query("UPDATE `events` SET `evREAD` = 1 WHERE `evUSER` = ".$ir['userid']); mysql_query("UPDATE `users` SET `new_events` = 0 WHERE `userid` = ".$ir['userid']); } $h->endpage(); ?>
-
Re: [mccode v2] Events Page Updated. Just tested Karlos's Edit and it works perfect...... I don't know What you on about ...
-
Re: [mccode v2] Events Page Updated. Why Cause someone Thought to Update it a little I don't know if the other post's work I only tested and using the first one with a minor edit. I have seen you roam around posts and put your 2 cents worth of code in there.. Is it different when it is your scripts???
-
Re: [mccode v2] Events Page Updated. ^^^^^^^^^^^^^^^^^^^^^^^^^^ Where is the copyright notice??? Also on the code you posted before this???? Only the first one is using it!!
-
Re: [mccode v2] Events Page Updated. One better <?php include_once (DIRNAME(__FILE__). '/globals.php'); //Create Page Number's. $limit = 10; $page = abs(@intval($_GET['page'])); $page = !isset($page) ? $_GET['page'] : 1; $by = 'evTIME'; $order = 'DESC'; $rows = mysql_query("SELECT `evID` FROM `events` WHERE `evUSER` = ".$ir['userid']); $rows = mysql_num_rows($rows); $pages = ceil($rows/$limit); if($rows % $limit == 0) { $pages++; } if(isset($_POST['del_all'])) { mysql_query("DELETE FROM `events` WHERE `evUSER` = ".$ir['userid']) or die(mysql_error()); echo 'All events have been deleted.'; } if(isset($_GET['del'])) { $id = abs(@intval($_GET['del'])); mysql_query("DELETE FROM `events` WHERE `evID` = ".$id." AND `evUSER` = ".$ir['userid']); echo 'Event deleted.'; } if(isset($_POST['checkbox'])) { for($i = 0; $i < count($_POST['checkbox']); $i++) { mysql_query("DELETE FROM `events` WHERE `evID` IN(".$_POST['checkbox'][$i].") AND `evUSER` = ".$ir['userid']); $result = 1; } if($result == 1) { echo $i.' event(s) have been deleted.'; } else { echo 'Error occured while trying to delete the event(s).'; } } $pg = 'Page: '; echo '<h2>Events</h2> <center><h2>Thahacker07 Say's Hello</h2></center> [b]Note:[/b] If you click on the check box and go to next page. The checkbox will be cleared. So delete the event\'s you want to delete before going to next page. <form action="'.$_SERVER['PHP_SELF'].'" method="post">'.$pg; for($i = 1; $i <= $pages; $i++) { $next = ($i * $limit); if ($i != 0) { echo '[url="'.$_SERVER['PHP_SELF'].'?page='.$next.'"]'.$i.'[/url] - '; } } echo ' <table border="1" cellspacing="0" cellpadding="0" class="table" width="80%"> <tr> <th>Time</th> <th>Event</th> <th>Links</th> </tr>'; if ($page >= 10) { $page=$page-10; } $myEvents = mysql_query("SELECT `evTIME`, `evREAD`, `evTEXT`, `evID` FROM `events` WHERE `evUSER` = ".$ir['userid']." ORDER BY ".$by." ".$order." LIMIT ".$page.",".$limit); while($soc = mysql_fetch_assoc($myEvents)) { $time = date('F j Y, g:i:s a', $soc['evTIME']); if(!$soc['evREAD']) { $new = ' [b]New![/b]'; } echo ' <tr> <td>'.$time.' '.isset($new).'</td> <td>'.$soc['evTEXT'].'</td> <td> <input type="checkbox" name="checkbox[]" value="'.$soc['evID'].'"> | '; if(isset($_GET['page']) ) { echo '[url="'.$_SERVER['PHP_SELF'].'?page='.$_GET['page'].'&del='.$soc['evID'].'"]Delete[/url]'; } else { echo '[url="'.$_SERVER['PHP_SELF'].'?del='.$soc['evID'].'"]Delete[/url]'; } echo ' </td> </tr> <tr>'; } echo ' </tr> </table> '.$pg; for($i = 1; $i <= $pages; $i++) { $next = ($i * $limit); if ($i != 0) { echo '[url="'.$_SERVER['PHP_SELF'].'?page='.$next.'"]'.$i.'[/url] - '; } } echo ' <input type="submit" value="Delete Selected Events"> | <input name="del_all" id="del_all" type="button" value="Delete All Events"> </form>'; if(isset($ir['new_events']) > 0) { mysql_query("UPDATE `events` SET `evREAD` = 1 WHERE `evUSER` = ".$ir['userid']); mysql_query("UPDATE `users` SET `new_events` = 0 WHERE `userid` = ".$ir['userid']); } $h->endpage(); ?> Added a extra bit <center><h2>Thahacker07 Say's Hello</h2></center> This is a really neat script... +1 To everyone involved
-
Re: [All Sites] No file images Basicly This creates a image out of your text eg:.. helloword on the end of screwedtext.php? Witch will present a image with helloword so you use <img src=yoursite.blah/scewedtext.php?helloword> Which will give you your image You can use any font you can find to produce these images Also changing a few settings you can manage the style the image comes out with... Good for menus and h3 headings as such...
-
Re: [mccode v2] Events Page Updated. bahaha fooled me.. I don't get any errors in the page. Just when you click events it shows blank events then you click 1 "PAGE 1" = The set of events from 10 up So first 10 are not viewable i know how to fix it. Just thought you should know... Also in your script the del all button not work...
-
Re: [mccode v2] Events Page Updated. Note on the update it showz Nothing at current event.. Also your recent 10 events are not shown.. Good work though.. Also how is your post count 99,999,99 or so?
-
Re: [All Sites] No file images That isn't needed.. I have this working on php5 with no problems.
-
Ok first i didn't make this... I found this in some forum. Basicly what this does is makes a image depenant on what you want. like edit The File can't be used outside the server, Done Via skewedtext.php?name-of-text-for-image In a image or bbcode class tags skewedtext.php <?php /***************************************************** *** skewedtext.php *** *** *** *** Author : Barand June 2007 *** ******************************************************/ $text = $_GET['text']; /** * create the src image containing the text */ $src = imagecreate(250, 40); $white = imagecolorallocate($src, 0xFF, 0xFF, 0xFF); $black = imagecolorallocate($src, 0x00, 0x00, 0x00); imagettftext($src, 24, 0, 50, 30, $black, 'arial.ttf', $text); // Note you can use any font just upload it to your server and point it here /** * Create the destination image to receive the skewed text; */ $dest = imagecreate(250, 60); $yellow = imagecolorallocate($dest, 0, 0, 0); $red = imagecolorallocate($dest, 0xFF, 0x00, 0x00); /** * scan all pixels in the src image */ for ($y = 0; $y < imagesy($src); $y++) { for ($x = 0; $x < imagesx($src); $x++) { $c = imagecolorat($src, $x, $y); // get the pixel colour if ($c == $black) // is it part of the text? { /** * skew the text horizontally * pixels pushed to the left (negative offset) * zero pixels at the bottom to a max of maxskew at the top */ $maxskew = -20; $offset = $maxskew * (imagesy($src) - $y) / imagesy($src); $xd = $x + $offset; /** * calc y pos on a sine curve * amplitude controls the amount of vertical displacement * frequency determines the number of waves */ $amp = 8; $freq = 5; $yd = $amp * sin($freq * deg2rad($x)) + $y + 10; // add 10 to push image away from top edge /** * place pixel in dest image */ imagesetpixel($dest, $xd, $yd, $red); } } } /** * output the image */ //header("content-type: image/png"); imagepng($dest); imagedestroy($src); imagedestroy($dest); ?>
-
Re: [mccode V2] Search Islands its looking good.
-
Re: [v1/v2] Auction Cron fully Fixed and tested I set this up yesterday but i got an error with event_add() All the script was good, I also cleaned out my minute cron and put it in there,, <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } 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; $db->query("UPDATE users set hospital=hospital-1 WHERE hospital>0"); $db->query("UPDATE `users` SET jail=jail-1 WHERE `jail` > 0"); $db->query("update auctions set time=time-1",$c); $qqq=$db->query("select * from auctions where time=0",$c); while($win=$db->fetch_row($qqq)) { $time=$win['time']; $item=$win['itemname']; $winner=$win['bidder']; $owner=$win['owner']; $iname=mysql_result($db->query("SELECT itmname FROM items WHERE itmid={$item}", $c), 0, 0); if($win['bids']>0) { $db->query("insert into inventory VALUES('',$item,$winner,1,0)",$c) or die($db->error()); //event_add($winner,"You won the auction of the {$iname} for \${$win['current']}",$c); //event_add($owner, "Your {$iname} sold succesfully on the auction market with {$win['bids']} bids. You have been paid \${$win['current']}", $c); $db->query("update users set money=money+{$win['current']},auctionquota=auctionquota-1 where userid=$owner", $c); } if($win['bids']==0) { event_add($win['owner'],"Your auction has ended with no bidders. Your {$iname} has been returned to your inventory.",$c); $winner=$win['owner']; $db->query("insert into inventory VALUES('',$item,$winner,1)",$c) or die($db->error()); } } $db->query("delete from auctions where time < 0", $c); ?>