Jump to content
MakeWebGames

Samurai Legend

Members
  • Posts

    483
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Samurai Legend

  1. Hello guys! It's been long since I have been here. (I've been to Bangladesh for a month.) I need your help guys! I got a problem which I do not know why it is not working?   [ATTACH=CONFIG]1674[/ATTACH]   As you can see here. When ever I put a enter gap it does not work? So the in the BBCode Engine it's not doing the <br/> My BBCodes Engine -   <?php class bbcode { function bbcode_parse($text) { global $ir, $db, $userid, $set; $text = htmlspecialchars($text); // Following removed due to security issues regarding session hijacking // $text = preg_replace("/\[img=(.+?)\]/", "<img src='$1' alt='Broken or invalid image' />", $text); // $text = preg_replace("/\[img\](.+?)\[\/img\]/", "<img src='$1' alt='Broken or invalid image' />", $text); // $text = preg_replace("/\[email=(.+?)\](.+?)\[\/email\]/", "<a href='mailto:$1'>$2</a>", $text); // $text = preg_replace("/\[email\](.+?)\[\/email\]/", "<a href='mailto:$1'>$1</a>", $text); // $text = preg_replace("/\[url=(.+?)\](.+?)\[\/url\]/", "<a href='$1'>$2</a>", $text); // End $text = preg_replace("/\[b\]/", "<strong>", $text); $text = preg_replace("/\[\/b\]/", "</strong>", $text); $text = preg_replace("/\[i\]/", "<em>", $text); $text = preg_replace("/\[\/i\]/", "</em>", $text); $text = preg_replace("/\[u\]/", "<span style='text-decoration:underline;'>", $text); $text = preg_replace("/\[\/u\]/", "</span>", $text); $text = preg_replace("/\[s\]/", "<s>", $text); $text = preg_replace("/\[\/s\]/", "</s>", $text); $text = preg_replace("/\[sub\](.+?)\[\/sub\]/", "<sub>$1</sub>", $text); $text = preg_replace("/\[sup\](.+?)\[\/sup\]/", "<sup>$1</sup>", $text); $text = preg_replace("/\[big\](.+?)\[\/big\]/", "<big>$1</big>", $text); $text = preg_replace("/\[small\](.+?)\[\/small\]/", "<small>$1</small>", $text); $text = preg_replace("/\[list\](.+?)\[\/list\]/", "<ul>$1</ul>", $text); $text = preg_replace("/\[olist\](.+?)\[\/olist\]/", "<ol>$1</ol>", $text); $text = preg_replace("/\[li\](.+?)\[\/li\]/", "<li>$1</li>", $text); $text = preg_replace("/\[font=(.+?)\](.+?)\[\/font\]/", "<span style='font-family:$1'>$2</span>", $text); $text = preg_replace("/\[size=(.+?)\](.+?)\[\/size\]/", "<font size='$1'>$2</font>", $text); $text = preg_replace("/\[img[=]?(left|right)?\](([^<> \n]+?)\.(gif|jpg|jpeg|png|bmp))\[\/img\]/i", '<img class="mainimage" src="\\2" border="0" align="\\1" max-width: 5px alt="">', $text); $text = preg_replace("/\n/", "&nbrlb;", $text); $text = preg_replace("/\[left\](.+?)\[\/left\]/", "<div style='text-align: left;'>$1</div>", $text); $text = preg_replace("/\[center\](.+?)\[\/center\]/", "<div style='text-align: center;'>$1</div>", $text); $text = preg_replace("/\[right\](.+?)\[\/right\]/", "<div style='text-align: right;'>$1</div>", $text); $text = preg_replace("/\[quote name='(.+?)\'](.+?)\[\/quote\]/", "<div class='quotetop'>Quote($1)</div><div class='quotemain'>$2</div>", $text); $text = preg_replace("/\[quote\](.+?)\[\/quote\]/", "<div class='quotetop'>Quote</div><div class='quotemain'>$1</div>", $text); $text = preg_replace("/\[style=(.+?)\](.+?)\[\/style\]/", "<div style='$1'>$2</div>", $text); $text = preg_replace("/\[quote\](.+?)\[\/quote\]/", "<div class='quotetop'>Quote</div><div class='quotemain'>$1</div>", $text); $text = preg_replace("/\[code\](.+?)\[\/code\]/", "<div class='codetop'>Code</div><div class='codemain'><code>$1</code></div>", $text); $text = preg_replace("/\[codebox\](.+?)\[\/codebox\]/", "<div class='codetop'>Code</div><div class='codemain'><code>$1</code></div>", $text); $text = preg_replace("/&nbrlb;/", "\n", $text); $text = preg_replace("/\[colour=(.+?)\]/", "<span style='color:$1;'>", $text); $text = preg_replace("/\[\/colour\]/", "</span>", $text); $text = preg_replace("/\[color=(.+?)\]/", "<span style='color:$1;'>", $text); $text = preg_replace("/\[\/color\]/", "</span>", $text); $text = preg_replace("/\[br \/]/", "", $text); $text = preg_replace("/\[br]/", "", $text); $text = preg_replace("/\[hr \/]/", "<hr />", $text); $text = preg_replace("/\[hr]/", "<hr />", $text); $text = preg_replace("/\[list\]/", "<ul>", $text); $text = preg_replace("/\[\/list\]/", "</ul>", $text); $text = preg_replace("/\[olist\]/", "<ol>", $text); $text = preg_replace("/\[\/olist\]/", "</ol>", $text); $text = preg_replace("/\[li\]/", "<li>", $text); $text = preg_replace("/\[\/li\]/", "</li>", $text); return $text; } } $bbc = new BBCode; ?>   Staff posting an announcement file -   function announcements() { global $db, $ir, $c, $h, $userid, $set; if ($ir['user_level'] != 2) { echo 'You cannot access this area.<br /> > <a href="staff.php">Go Back</a>'; die($h->endpage()); } $_POST['TITLE'] = (isset($_POST['TITLE'])) ? $db->escape( strip_tags( stripslashes($_POST['TITLE']))) : ''; if($_POST['TITLE']) { if(strlen($_POST['TITLE']) < 5) { error('Sorry, the annoucement title is too short.'); die($h->endpage()); } $text = $_POST['TEXT']; $db->query("INSERT INTO announcements (`announce_NAME`, `announce_TEXT`, `announce_TIME`, `announce_URGENCY`, `announce_TOPIC`, `announce_POSTED`) VALUES ('{$_POST['TITLE']}', '{$text}', unix_timestamp(), '{$_POST['URGENCY']}', '{$_POST['TOPIC']}', '{$_POST['POSTED']}')"); $db->query("UPDATE users SET `new_announcements` = `new_announcements` + 1"); confirmation('Announcement added!'); stafflog_add('Posted A New Annoucement'); $h->endpage(); exit; } else { echo 'Adding an announcement - <br /> 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 Title:<input type="text" name="TITLE"> <br /><br /> Announcement Text:<br /> <textarea name="TEXT" rows="10" cols="60">[font=Impact][color=orange][size=3][u]TITLE[/u][/size][/font][/color]</textarea> <br /><br /> Announcement Urgency: <select name="URGENCY" type="dropdown"> <option value="No Urgency">No Urgency</option> <option value="Low">Low</option> <option value="Medium">Medium</option> <option value="High">High</option> <option value="Urgent">Urgent</option> </select> <br /><br /> Announcement Topic: <select name="TOPIC" type="dropdown"> <option value="Updates">Updates</option> <option value="General News">General News</option> <option value="Fun">Fun</option> <option value="Warnings!">Warnings!</option> <option value="Design Info">Design Info</option> <option value="Edits">Edits</option> </select> <br /><br /> <input type="hidden" name="POSTED" value="'.$ir['username'].'"> <input type="submit" value="Add Announcement!" /> </form>'; } }
  2. I believe your not also using an updated McCodes. If you have a license you should update your codes and be able to get some errors fixed. I also had the problem with the session_start. I realised I was using an outdated mccodes.
  3. <?php require('globals.php'); $e = $db->query("SELECT `etime`,`text` FROM `ingame_events` ORDER BY `etime` DESC LIMIT 50"); ?> <h3><u>Last 50 In-Game Events</u></h3><hr/> <table width='100%' class='table' border='0' cellspacing='1'> <tr> <th width='30%'>Time</th> <th>Event</th> </tr> <?php if ($db->num_rows($e) == 0) { ?> <td colspan='2'>There are no in-game events to view at this moment in time!</td> <?php } while ($r = $db->fetch_row($e)) { ?> <tr><td align='center'> <?php echo date('F j Y, g:i:s a', $r['etime']); ?> </td><td align='center'> <?php echo format($r['text']); ?> </td></tr> <?php } ?> </table><hr/><a href='index.php'>>Go Home</a><hr/> <?php $h->endpage(); ?>
  4. I don't know if your sheeping along ^
  5. [MENTION=65518]Kyle[/MENTION] - Oh sorry, there some of my own functions that I have created. I updated the post. And thanks bro :)
  6. So far I have this -   Add this to the global_func.php -   function redirect($url, $permanent = false) { header('Location: ' . $url, true, $permanent ? 301 : 302); exit(); }   Add this to the header -   if($ir['fedjail']) { if($_SERVER['PHP_SELF'] != '/fedsupport.php') { redirect('fedsupport.php', false); } }   Create a new file called fedsupport.php -   <?php require('globals.php'); echo '<h3><u>Federal Jail</u></h3>'; if ($ir['fedjail'] == 0) { echo'Your not in federal jail.'; exit($h->endpage()); } if (!isset($_GET['action'])) { $_GET['action'] = ''; } switch ($_GET['action']) { case 'reply': reply(); break; default: index(); break; } function index() { global $db, $ir, $h, $userid, $set; $q = $db->query("SELECT * FROM `fedjail` WHERE `fed_userid` = $userid"); $r = $db->fetch_row($q); if ($ir['fed_lock'] != 0) { echo "<hr width='100%'><span style='font-weight: bold; color:red;'> You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s).<br /> Reason: {$r['fed_reason']} </span><hr width='100%'>"; } else { echo "<hr width='100%'><span style='font-weight: bold; color:red;'> You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s).<br /> Reason: {$r['fed_reason']} </span><hr width='100%'>"; echo "<table width='100%' cellspacing='1' class='table'><tr> <th>User</th><th>Comment</th></tr><tr>"; $q = $db->query("SELECT `userid`,`username`,`frTEXT`,`frTIME`,`frUSER`,`frUSERTO`, `u1`.`username` AS `frUSER` FROM `fedjail_reports` AS `a` INNER JOIN `users` AS `u1` ON `a`.`frUSER` = `u1`.`userid`"); while ($p = $db->fetch_row($q)) { echo "<td width='40%'>{$p['frUSER']} - " . date('j F, Y, g:i a', $p['frTIME']) . "</td> <td>" . strip_tags($p['frTEXT']) . "</td></tr><tr>"; } echo "</tr></table><hr width='100%'>"; echo ' <form action="fedsupport.php?action=reply" method="post"> Reply (You can only send a message every 20 minutes.):<br /> <textarea name="comment" rows="10" cols="60" placeholder="Enter text here"></textarea> <br /><br /> <input type="submit" value="Add Comment!" /> </form>'; echo " <hr width='100%'><a href='logout.php'>>Logout</a><hr width='100%'>"; } } function reply() { global $db, $ir, $h, $userid, $set; if ($ir['fedjail'] == 0) { echo'Your not in federal jail.'; exit($h->endpage()); } if ($ir['fed_lock'] != 0) { echo'Your locked out from here.'; exit($h->endpage()); } $q = $db->query("SELECT `frUSERTO`, `frTIME` FROM `fedjail_reports` WHERE `frUSERTO` = $userid AND `frTIME` > unix_timestamp()-1200"); if ($db->num_rows($q) >= 1) { echo'You can only send one message every 20 minutes.'; exit($h->endpage()); } $_POST['comment'] = (isset($_POST['comment']) && is_string($_POST['comment'])) ? $db->escape(strip_tags(stripslashes($_POST['comment']))) : ''; if ($_POST['comment']) { if (strlen($_POST['comment']) < 10) { echo'Sorry, the comment is too short. Minimum of 10 words.'; exit($h->endpage()); } $db->query("INSERT INTO fedjail_reports (`frID`, `frUSER`, `frTIME`, `frTEXT`, `frUSERTO`) VALUES ('', '{$userid}', unix_timestamp(), '{$_POST['comment']}', '{$userid}')"); echo'Comment added!'; exit($h->endpage()); } else { echo'You have not entered any text at all.'; exit($h->endpage()); } } $h->endpage(); ?>   SQL -   CREATE TABLE IF NOT EXISTS `fedjail_reports` ( `frID` int(11) NOT NULL AUTO_INCREMENT, `frUSER` int(11) NOT NULL, `frTIME` int(11) NOT NULL, `frTEXT` text NOT NULL, `frUSERTO` int(11) NOT NULL, PRIMARY KEY (`frID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; ALTER TABLE users ADD fed_lock INT(11) DEFAULT 0 ;   Can someone make the staff file...? It will be a big help? Users, can reply to appeal to their suspension. Staff can lock them out of the area. I just need help with the staff area. How should I make it?
  7. I have created a system, just got to finish of the staff file. I will then release this.
  8. http://makewebgames.io/showthread.php/44788-Raffle-Modification?highlight=Raffle I finished it :)
  9. Omg thanks Dave! Much appreciated!
  10. I get this error - A non-critical error has occurred. Page execution will continue. Below are the details:<br /><strong>PHP Notice</strong>: Undefined index: user_for (8)<br /><br /><strong>Line executed</strong>: /home/samurai/public_html/donate.php:371<br /><br />1   Line 360 - 380 -   } $(document).ready(function() { $('#confirm_popup').center(); $('#confirm_popup_back,#popup_close').click(function() { $(this).fadeOut(500); $('#confirm_popup').fadeOut(500); }); }); $(document).ready(function() { $('#userTo').click(function() { if($(this).children('[name=userTo]').length == 0) { $(this).html('<input type="text" name="userTo" size="3" value="<?php echo (abs((int) $_COOKIE['user_for']) ? abs((int) $_COOKIE['user_for']) : $ir['userid']); ?>" style="font-size: 12px;font-family: Tahoma;padding:0;margin:0;text-align: center;" />'); $('[name=userTo]').focus(); } }); $('#userTo').keypress(function(e){ if(e.which == 13){ var username = $('[name=userTo]').val(); $.ajax({ type: "GET", url: "donate.php",   Line 371 - $(this).html('<input type="text" name="userTo" size="3" value="<?php echo (abs((int) $_COOKIE['user_for']) ? abs((int) $_COOKIE['user_for']) : $ir['userid']); ?>" style="font-size: 12px;font-family: Tahoma;padding:0;margin:0;text-align: center;" />');   I don't know how to fix it :/
  11. But then you never credited MTG when you posted up the link.
  12. He didn't re-write it. I believe Magictallguy did.
  13. Thanks bro! Script47 has exceeded their stored private messages quota and cannot accept further messages until they clear some space.   I can't message you...And I need help :( You have Skype?
  14.   Hey Script47! Thanks for the help man! I really appreciate the help! You made me understand more and its getting more clear! However I did something complete different but I still a bit same to what you have. However I don't like it when you have to manually claim the reward I believe? Unless I am not understanding well.   This is what I did so far - [ATTACH=CONFIG]1582[/ATTACH] Everything is done apart from the incentives. I'll try figure that part soon. As for the staff file everything is so easy to do! And add the votes in easily.
  15. Leaving too :( Omg man. Well good luck bro and hope everything goes well!
  16. Nope, however I need help. I need to understand how to build in the incentive script...? Well I know that MPOGR allows you to do certain things. So I was thinking if I make the vote on my game and make the outcome link come out like this for an example - http://www.mpogr.com/vote.php?id=1225&userid=1 Once they submit it the userid in the link will get sent to my voting script and then it will allow the crediting. However I don't know how to do this or if its a good idea.
  17. Hello all. I have bought Pauls voting script two days ago. But I have realized you can bypass votes without voting on the website. I need help for this not to happen. If anyone can help me out, please do!
  18. I actually like this, I will probably get someone to make me something like this and implant it to my attack system. But of course more advanced. However great job i love it!
  19.   Nope. I am looking for something which is better with a lot of traffic...
  20. If I had the skills. I would have taken then task.
  21. Hello all, I need to know where is a good place to advertise my website. (Samurai Assault) I am willing too pay for the advertisement. However I need places to know where to advertise my game. If anyone can help me out please comment below!
  22. Wow....It looks cool
  23. So sad to here this. However good luck buddy!
  24. Hmm I like it. But I don't like the style...
×
×
  • Create New...