[Release] GM External Mailer menu

Shout-Out

User Tag List

Results 1 to 14 of 14
  1. #1
    EmiloZ's Avatar Flying Piggy Back
    CoreCoins Purchaser
    Reputation
    538
    Join Date
    Jun 2007
    Posts
    1,393
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release] GM External Mailer

    Hello. This site was maked by Dragonsys from Ascentemu.com

    Tread : Board Message



    1/16/08 - 1.0 Inital Release
    1/17/08 - 1.1 Added From Field, so you can specifiy which Character to send the mail from
    1/18/08 - 1.2 Cleaned up the code some & made the page display a little nicer
    1/20/08 - 2.0 Combined into one file & added option for GM Permissions type selection
    1/21/08 - 2.1 Added flexable filename. You can name this script to whatever filename you want, as long as it ends in .php

    This requires Ascent rev 3068 or higher, as this uses the mail_insert_queue for External Mail.
    This mail queue is parsed by the core, every time a character enters the world.

    Save the below file to your website
    This script will check for a valid account, and it will make sure that account has GM Rights (unless the GM permissions check is disabled).


    Download : Here


    When got 2 mails :

    Normal Mail :


    GM External Mail :

    View :


    Source :
    Code:
    <?php
    
    /*********************************************************************/
    /* */
    /* Database Config. Please check all of these settings */
    /* */
    /*********************************************************************/
    
    $username="CHANGEME"; //Username to connect to MYSQL
    $pass="CHANGEME"; //Password for MYSQL
    $chardb="CHANGEME"; //Database that contains character info
    $accountdb="CHANGEME"; //Database that contains account info
    $Host="localhost"; //Where the databases are located
    $Port="3306"; //Port used to connect to the databases
    
    $gmaz="false"; //Set this to "true", if you require A or AZ
    //permissions to use this script, else any
    //GM permission will work
    //Set this to "all" to disable GM Permissions check
    
    /*********************************************************************/
    /* */
    /* You should not need to edit anything below this line */
    /* */
    /*********************************************************************/
    
    if($_GET['post'] == 'true') {
    if(isset($_POST['submit']))
    {
    $account = $_POST['account'];
    $password = $_POST['password'];
    
    $con = mysql_connect($Host.":".$Port, $username, $pass) or die(mysql_error());
    mysql_select_db($accountdb) or die(mysql_error());
    
    $account = mysql_real_escape_string(html_entity_decode(htmlentities($account)));
    $password = mysql_real_escape_string(html_entity_decode(htmlentities($password)));
    
    $query = "SELECT acct,gm FROM accounts WHERE login = '".$account."' AND password = '".$password."'";
    
    $result = mysql_query($query) or die(mysql_error());
    $numrows = mysql_num_rows($result);
    
    if($numrows == 0) { die("Account name or password is incorrect!"); }
    
    $row = mysql_fetch_array($result);
    $acct = $row[acct];
    $gm = $row[gm];
    
    if($gmaz == 'false') { if(empty($row[gm])) { die("You are not a GM!"); }
    } elseif ($gmaz == 'true') {
    if($row[gm] == 'A' || $row[gm] == 'AZ' || $row[gm] == 'a' || $row[gm] == 'az') { } else { die("You are not a GM!"); }
    } elseif ($gmaz == 'all') { }
    
    mysql_close();
    
    } else { die("Nothing has been submited, please try again"); }
    
    $sender = $_POST['sender'];
    $mail = $_POST['mail'];
    $player = $_POST['player'];
    $subject = $_POST['subject'];
    $money = $_POST['money'];
    $item = $_POST['item'];
    $stack = $_POST['stack'];
    $message = $_POST['message'];
    
    $con = mysql_connect($Host.":".$Port, $username, $pass) or die(mysql_error());
    mysql_select_db($chardb) or die(mysql_error());
    
    $sender = mysql_real_escape_string(html_entity_decode(htmlentities($sender)));
    
    $query = "SELECT guid FROM characters WHERE name = '".$sender."'";
    $result = mysql_query($query) or die(mysql_error());
    $row = mysql_fetch_array($result);
    $sguid = $row[guid];
    if(empty($row[guid])) { die("No such Character!"); }
    mysql_close();
    
    $con = mysql_connect($Host.":".$Port, $username, $pass) or die(mysql_error());
    mysql_select_db($chardb) or die(mysql_error());
    
    $subject = mysql_real_escape_string(html_entity_decode(htmlentities($subject)));
    $money = mysql_real_escape_string(html_entity_decode(htmlentities($money)));
    $item = mysql_real_escape_string(html_entity_decode(htmlentities($item)));
    $stack = mysql_real_escape_string(html_entity_decode(htmlentities($stack)));
    $message = mysql_real_escape_string(html_entity_decode(htmlentities($message)));
    
    $query=("INSERT INTO mailbox_insert_queue (sender_guid, receiver_guid, subject, body, stationary, money, item_id, item_stack)
    VALUES
    ('$sguid', '$player', '$subject', '$message', '$mail', '$money', '$item', '$stack')");
    $result=mysql_query($query);
    mysql_close();
    
    $con = mysql_connect($Host.":".$Port, $username, $pass) or die(mysql_error());
    mysql_select_db($chardb) or die(mysql_error());
    $query = "SELECT name FROM characters WHERE guid = '".$player."'";
    $result = mysql_query($query) or die(mysql_error());
    $row = mysql_fetch_array($result);
    $pname = $row[name];
    mysql_close();
    
    if ($mail == '61') {$sname = "Customer Support";} else {$sname = $sender;}
    echo "<b>You sent the following mail:</b><br><br>";
    echo "Sender - ".$sname."<br>Receiver - ".$pname."<br>Subject - ".$subject."<br>Body - ".$message."<br>Money - ".$money."<br>Item ID - ".$item."<br>Item Stack - ".$stack."";
    
    } else {
    
    $path = $_SERVER['SCRIPT_NAME'];
    $filename = basename($path);
    echo "<title>GameMaster Mail System</title>\n";
    echo "<h1>GameMaster Mail System</h1>\n";
    echo "<form name='mail' method='post' action='".$filename."?post=true'>\n";
    echo "<table>\n";
    echo "<tr><td>GM Account<sup><font size='1'>*</font></sup>: </td><td><input type='text' name='account' value=''></td></tr>\n";
    echo "<tr><td>GM Password<sup><font size='1'>*</font></sup>: </td><td><input type='password' name='password' value=''></td></tr>\n";
    echo "<tr><td>Sender<sup><font size='1'>1*</font></sup>: </td><td><input type='text' name='sender' value=''></td></tr>\n";
    echo "<tr><td>Mail Type<sup><font size='1'>*</font></sup>: </td><td><select name='mail'><option value='41'>Regular Mail - 41</option><option value='61'>Customer Support Mail - 61</option></select></td></tr>\n";
    echo "<tr><td>&nbsp;</td></tr>\n";
    echo "<tr><td>Send To<sup><font size='1'>*</font></sup>: </td><td><select name='player'><option selected value-''>- Please select a player -</option>";
    
    $con = mysql_connect($Host.":".$Port, $username, $pass) or die(mysql_error());
    mysql_select_db($chardb) or die(mysql_error());
    
    $query="SELECT guid,name FROM characters WHERE name != 'AHbot' ORDER BY name";
    $result=mysql_query($query);
    $num=mysql_numrows($result);
    
    mysql_close();
    
    $i=0;
    while ($i < $num) {
    
    $guid=mysql_result($result,$i,"guid");
    $name=mysql_result($result,$i,"name");
    
    echo "<option value='".$guid."'>".$name."</option>";
    
    $i++;
    }
    
    echo "</td></tr>\n";
    echo "<tr><td>Subject: </td><td><input type='text' name='subject' value=''></td></tr>\n";
    echo "<tr><td>Money<sup><font size='1'>2</font></sup>: </td><td><input type='text' name='money' value=''></td></tr>\n";
    echo "<tr><td>Item Number<sup><font size='1'>3</font></sup>: </td><td><input type='text' name='item' value=''></td></tr>\n";
    echo "<tr><td>Item Count: </td><td><input type='text' name='stack' value=''></td></tr>\n";
    echo "<tr><td>Message: </td><td><textarea name='message' cols='45' rows='5'></textarea></td></tr>\n";
    echo "<tr><td colspan='2' align='center'><br><input type='submit' name='submit' value='Send Mail'></td></tr>\n";
    echo "</table>\n";
    echo "</form>\n";
    echo "<br>\n";
    echo "<br>\n";
    echo "<font size='1'>NOTE: <sup>*</sup> Required Field</font><br>";
    echo "<font size='1'>NOTE: <sup>1</sup> If Mail Type is Customer Support Mail (61), this will display as Customer Service</font><br>";
    echo "<font size='1'>NOTE: <sup>2</sup> Format: ggsscc (100c = 1s, 100s = 1g) ie: 50000 would be 5 gold</font><br>\n";
    echo "<font size='1'>NOTE: <sup>3</sup> Must be a valid Item ID</font><br>\n";
    echo "<font size='1'>Created by Dragonsys - Released as GNU/GPL.</font>\n";
    }
    
    ?>
    ToDo:
    Add better functions
    Clean the code up more
    Add Sender Drop Down Selector - not sure if I can, without a prior login
    Make the Money format easier to use
    Better form Validation - Maybe using AJAX Realtime Validation


    Enjoy it !
    Why fill up a signature?

    [Release] GM External Mailer
  2. #2
    Lich King's Avatar Contributor
    Reputation
    100
    Join Date
    May 2007
    Posts
    911
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice good job, i'll try it out. +Rep

  3. #3
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice share +Rep x3

  4. #4
    Festigio's Avatar Contributor
    Reputation
    155
    Join Date
    Dec 2006
    Posts
    391
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is nice! Thanks.
    +3reps


  5. #5
    Viter's Avatar Elite User
    Reputation
    410
    Join Date
    Aug 2007
    Posts
    2,153
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is a repost from ascentemu? XD



  6. #6
    EmiloZ's Avatar Flying Piggy Back
    CoreCoins Purchaser
    Reputation
    538
    Join Date
    Jun 2007
    Posts
    1,393
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Viter Er Svedig View Post
    this is a repost from ascentemu? XD

    Hello. This site was maked by Dragonsys from Ascentemu.com

    Tread : Board Message
    [space filler]
    Why fill up a signature?

  7. #7
    King Shaun's Avatar Member
    Reputation
    419
    Join Date
    Dec 2007
    Posts
    1,305
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh my god, this is really nice mate, thanks for the great share!

    Rep cookehs for you..

    (x


    Threads of the Week: [Errage] [Blizzard] [Rapidshare]

  8. #8
    Coty's Avatar Member
    Reputation
    1
    Join Date
    Feb 2008
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice share, thanks for the release.

    +Rep

  9. #9
    Cursed's Avatar Contributor
    Reputation
    270
    Join Date
    Jun 2007
    Posts
    1,380
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Already saw that but anyway +rep 3x

  10. #10
    EmiloZ's Avatar Flying Piggy Back
    CoreCoins Purchaser
    Reputation
    538
    Join Date
    Jun 2007
    Posts
    1,393
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuumppppppppyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy yy
    Why fill up a signature?

  11. #11
    Da Tank's Avatar Active Member
    Reputation
    44
    Join Date
    Jul 2007
    Posts
    251
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Damm Emiloz i was about to share this lol

  12. #12
    EmiloZ's Avatar Flying Piggy Back
    CoreCoins Purchaser
    Reputation
    538
    Join Date
    Jun 2007
    Posts
    1,393
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bummmmmmmmmmmmmmmmmmmmmmmmmmmpy
    Why fill up a signature?

  13. #13
    Illidan1's Avatar Banned
    Reputation
    244
    Join Date
    Jul 2007
    Posts
    2,251
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OR you just ad the item into your bag " Blizzard Stationery - Items - World of Warcraft " and then jsut send mail normal

    It does the same as the system lol

  14. #14
    Anarchy [RD]'s Avatar Contributor
    Reputation
    132
    Join Date
    Jan 2008
    Posts
    547
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    good job EmiloZ <3
    +Rep

Similar Threads

  1. [Release] Herbs to flag
    By Dave-evad in forum World of Warcraft Model Editing
    Replies: 9
    Last Post: 11-26-2006, 03:31 PM
  2. anti-warden Release #1
    By zhPaul in forum World of Warcraft Bots and Programs
    Replies: 40
    Last Post: 10-21-2006, 01:40 AM
  3. Burning Crusade Release
    By KOLOSSAL in forum World of Warcraft General
    Replies: 3
    Last Post: 10-10-2006, 12:33 AM
All times are GMT -5. The time now is 10:39 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search