-
Posts
43 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by rjddev
-
http://jsfiddle.net/SsNTd/ Images included here as attachment, couldn't find the font on google web fonts, so i've used Oswald as font for the menu head. [ATTACH=CONFIG]1169[/ATTACH][ATTACH=CONFIG]1170[/ATTACH][ATTACH=CONFIG]1171[/ATTACH]
-
Lol @ the fail.
-
MC CODE v3 NEWS RELEASE EVIDENCE !!!!!!!! GET INVOLVED
rjddev replied to jedigunz's topic in MCCode v3 Discussion
Looking forward to see the end result ;) -
Thank you for the help, I have now removed the (int) from $amount and done it like this. if(isset($_POST['deposit']) != "") { $amount = mysql_real_escape_string($_POST['damount']); $notallowed = array('$', '-', '_', '+', '=', '<', '>', ','); $amount = str_replace($notallowed, "", $amount); if(!preg_match('#^[0-9]+$#', $amount)) { $message = "Please enter a valid amount."; } else if($amount < 1) { $message = "Please enter a valid amount."; } else if($amount <= $player->money) { $message = "You have deposited " . prettynum($amount); $newbank = $amount + $player->bank; $newmoney = $player->money - $amount; $result = mysql_query("UPDATE `grpgusers` SET `bank` = '$newbank', `money` = '$newmoney' WHERE `id` = '".$player->id."'"); } } if(isset($_POST['withdraw']) != "") { $amount = mysql_real_escape_string($_POST['wamount']); $notallowed = array('$', '-', '_', '+', '=', '<', '>', ','); $amount = str_replace($notallowed, "", $amount); if(!preg_match('#^[0-9]+$#', $amount)) { $message = "Please enter a valid amount."; } else if($amount > $player->bank) { $message = "You do not have that much money in your bank"; } else if($amount < 1) { $message = "Please enter a valid amount."; } else if($amount <= $player->bank && $amount > 0) { $newbank = $player->bank - $amount; $newmoney = $player->money + $amount; $result = mysql_query("UPDATE `grpgusers` SET `bank` = '$newbank', `money` = '$newmoney' WHERE `id` = '".$player->id."'"); $message = "You have withdrawn " . prettynum($amount); } } if(isset($message)) { echo Message($message); } This seems to be secure and working correct. Thank you :)
-
I'm facing a small problem when I withdraw/deposit money. For example, I have $98,007,285,155 money in my bank or on hand, I want to deposit/withdraw it in one time, but it deposits/withdraws only $2,147,483,647 max. I have both columns on bigint(250). Is there another type I should use in the database for this so players are able to deposit/withdraw their cash in one click?
-
Starting over with a script from the bottom - what do I need to learn?
rjddev replied to dnenb's topic in Web Developement
I'm currently giving Panther Skeleton engine a try, (That Sniko made) but then in PDO instead of mysqli. It is very easy to make own modules/templates, and the code is understandable. Panther Skeleton engine can be found here. -
Just a small heads up, The layout looks nice on 100% zoom, but when you zoom out using ctrl - the right content goes to the left.
-
Decided to check it out for a bit, here are 2 screenies. [ATTACH=CONFIG]1114[/ATTACH][ATTACH=CONFIG]1115[/ATTACH]
-
Game URL: http://dev.mafiaxtreme.com Game Owner RJD Development Game is still undergoing development, but more shall be available soon.
-
And for those working withouth htaccess <?php // Example 'dirty' url: http://www.site.com/index.php?page=page&subpage=subpage&id=id // Example 'clean' url: http://www.site.com/index.php/page/subpage/id/ $page = "index.php"; if ( $url = stristr($_SERVER['REQUEST_URI'], 'index.php') ) { // $url == 'index.php/page/subpageid if( $url[strlen($url)-1] == '/') { // Check if the URL ends with a '/' $url[strlen($url)-1] = ''; } $url_segments = explode('/', $url); // $url_segments[0] == 'index.php'; if( isset($url_segments[1]) && $url_segments[1] != '' ) { // If the page in the url is entered, gets $_GET['page'] the value $_GET['page'] = $url_segments[1]; if( isset($url_segments[2]) && $url_segments[2] != ''){ //If the subpage in the url is entered, gets $_GET['subpage'] the value $_GET['subpage'] = $url_segments[2]; if( isset($url_segments[3]) && $url_segments[3] != '') { //if the subpage in the url is entered gets $_GET['subpage'] the value $_GET['subpage'] = $url_segments[3]; } } } } else { $_GET['page'] = $page; } ?>
-
[ATTACH=CONFIG]1064[/ATTACH] Select server section almost looks the same, only a few colours changed. I remember Mafia-Warfare had it like that as well, Sorry fella, everyone can change a few colours and claim it was made by them.
-
I do have Email Verification, but then a lil bit different. When a user signs up, They will be sent an email with a link to verify their email, however they could still login if the email hasn't been verified yet, they will just have limited acces, and once they verify their email they will have full acces to the game.
-
You say your team build engines/mods/websites, but didn't even bother to make your own website? Get a free website at Webs.com Doubt this guy is real.
-
And heres a code with pagination function in it. ;) <?php include 'spheader.php'; if ($user_class->admin != 1) { echo Message("You are not authorized to be here."); include 'footer.php'; die(); } // Pagination // Find out how many rows are in the table $pagination_query = mysql_query("SELECT COUNT(*) FROM `events` WHERE `to` = '" . $user_class->id . "'"); $pagination_fetch = mysql_fetch_row($pagination_query); $pagination_rows = $pagination_fetch[0]; // How many rows to show per page $rows_per_page = 15; // Find out how many total pages $total_pages = ceil($pagination_rows / $rows_per_page); if ($total_pages <= 0) { $total_pages = 1; } else { $total_pages = ceil($pagination_rows / $rows_per_page); } // Get the current page, or set a default if (isset($_GET['page']) && is_numeric($_GET['page'])) { $current_page = (int) $_GET['page']; } else { $current_page = 1; } // If current page is greater then total pages if ($current_page > $total_pages) { // Set current page to last page $current_page = $total_pages; } // If current page is less then total pages if ($current_page < 1) { $current_page = 1; } // Offset off the list, based on current page $offset = ($current_page - 1) * $rows_per_page; ?> <tr><td class="contenthead">Staff Logs</td></tr> <tr><td class="contentcontent"> <?php $result = mysql_query("SELECT * FROM `events` ORDER BY id DESC LIMIT $offset, $rows_per_page"); echo "<table width=100%> <tr align='center'> <td class='contenthead'> <b>ID</b> </td> <td class='contenthead'> <b>Time</b> </td> <td class='contenthead'> <b>To</b> </td> <td class='contenthead'> <b>Text</b> </td> </tr>"; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $to = Get_Username($line['to']); echo "<tr align=center><td class=contentcontent>" . $line['id'] . "</td><td class=contentcontent>" . date(F . " " . d . ", " . Y . " " . g . ":" . i . ":" . sa, $line['timesent']) . "</td><td class=contentcontent><a href=profiles.php?id=" . $line['to'] . ">" . $to . "</a></td><td class=contentcontent>" . $line['text'] . "</td></tr>"; } echo "</table>"; // Lets build the pagination links // Range of num links to show $range = 2; if ($current_page > 1) { // Show << link to go back to page 1 echo " <a href='{$_SERVER['PHP_SELF']}?id={$_GET['id']}&page=1'><<</a> "; } // Loop to show links to range of pages around current page for ($x = ($current_page - $range); $x < (($current_page + $range) + 1); $x++) { // if it's a valid page number... if (($x > 0) && ($x <= $total_pages)) { // if we're on current page... if ($x == $current_page) { // 'highlight' it but don't make a link echo " [<b>$x</b>] "; } else { // make it a link echo " <a href='{$_SERVER['PHP_SELF']}?id={$_GET['id']}&page=$x'>$x</a> "; } } } // if not on last page, show forward and last page links if ($current_page < $total_pages) { // echo forward link for lastpage echo " <a href='{$_SERVER['PHP_SELF']}?id={$_GET['id']}&page=$total_pages'>>></a> "; } // end if echo "</td></tr>"; include 'footer.php'; ?>
-
But when the user deletes their events log, Staff won't see the old logs. I have 2 tables that hold events data, one for the user, and one for the staff logs, so if a user deletes their events, it'll be still showed on the staff log.
-
One small suggestion, on the Advantages setup is missing a p :P We can setu and host forum for free.
-
Not really, I have done nothing on the layout (BlueTrendz Desings made it for me), I've only done the codings.
-
Hey All, I've been creating a game myself, named Mafia Xtreme, and currently in need of testers. So far I have a secure register/login system ready, and will be pushing stuff live more in the next few weeks. I will be updating this thread of what has been added/changed. Screenshots [ATTACH=CONFIG]1008[/ATTACH] You can create an account here: http://dev.mafiaxtreme.com Or use this account to test: Username: Demo Password: Demo I would like to hear your thoughts about the game & design, what can be done more to make it more user friendly. Regards, RJD Development
-
I'll come up with a solution later tonight. Have had the same problems. Also, the give_item could be done easier Give_Item($itemid, $user_class->id, $quantity);
-
On the notify_url, can you try this? <input type='hidden' name='notify_url' value='http://www.yourgamename.com/ipnfilename.php'
-
Looking really great. :cool:
-
Post2Host.co.uk - Free Hosting for online MMORPG's
rjddev replied to junixdev's topic in Web hosting
I have as well the "Users Online" bar on the package section, using Google Chrome. [ATTACH=CONFIG]964[/ATTACH] -
I usually turn on the radio, and tune in on a good radio station. Having music on the background while coding really helps me lol.