Jump to content

gldss_games

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by gldss_games

  1. Hello, I will continue to give support to MangosWebCataSkyFire please wait hum little, since I'm finishing my university. Note: Soon new link for discussions. Moderator, thanks for not lock this post.
  2. The Project not is dead!  New Repository: https://github.com/gldss/MangosWeb-Cata-SkyFire  Coming soon Support forum  Any error or bug please notify. I without a pc today, but got this fast, to be able updats faster! Peopl patience to everyone.  That's it! Â
  3. If any expert can help me Skyfire Soap?An sending system of "gold" "txt" "item" In order to deploy a CMS helped everyone.Thank you! I found these functions phpNot know to use soap<?phpfunction sendmail($playername,$playerguid, $subject, $text, $item, $shopid=0, $money=0, $realmid='1') //returns, IMPORTANT: do not remove <!-- success --> if success{ global $server,$ra_user,$ra_pass,$db,$a_user,$se_c,$realm; $playername = clean_string($playername); $subject = preg_replace( "/[^A-Za-z0-9]/", "", clean_string($subject)); //no whitespaces $item = preg_replace( "/[^0-9]/", "", $item); //item id $realmid = preg_replace( "/[^0-9]/", "", $realmid); //item id if ($item<>'') $item = " ".$item; $text = clean_string($text); $money= preg_replace( "/[^0-9]/", "", $money); $telnet = fsockopen($server, $realm[$realmid]['port_ra'], $error, $error_str, 3); if($telnet) { fgets($telnet,1024); // Motd fputs($telnet, $ra_user."n"); sleep(3); //fgets($telnet,1024); // PASS fputs($telnet, $ra_pass."n"); sleep(3); $remote_login = fgets($telnet,1024); if(strstr($remote_login, "Logged in.")) { if ($item<>'' && $item<>'0')//send item { //sendmail to RA console fputs($telnet, ".send items ".$playername." "".$subject."" "".$text.""".$item."n"); $easf=time(); $mailtext="Mail with item sent! No money was sent."; } elseif ($money>'0' && $money<>'')//send money { fputs($telnet, ".send money ".$playername." "".$subject."" "".$text."" ".$money."n"); $moneytext="Mail with money sent! No item was sent."; } else //send letter { fputs($telnet, ".send mail ".$playername." "".$subject."" "".$text.""n"); $moneytext="Normal Mail sent!"; } //check database if actuall item is there //WebsiteVoteShopREFXXXXXXX ->this is unique $check=$db->query("SELECT * FROM mail WHERE receiver = '".$playerguid."' AND subject ='".$subject."' LIMIT 1")or die(mysql_error()); if(mysql_num_rows($check)=='0') $status="Recheck script (just to make sure mail is actually sent):<br><br><center><iframe style='width:96%; height:100px' src='./include/core/mangos_iframe_mailcheck.php?shopid=".$shopid."&reciver=".$playerguid."&subject=".$subject."&realmid=".$realmid."&shash=".sha1($a_user['id'].$playerguid.$subject.$se_c.$shopid)."'><a href='./include/core/mangos_iframe_mailcheck.php?shopid=".$shopid."&reciver=".$playerguid."&subject=".$subject."&realmid=".$realmid."&shash=".sha1($a_user['id'].$playerguid.$subject.$se_c.$shopid)."'>Check here if your mail is here.</a></iframe></center>"; return "<!-- success --><span class="colorgood">".$mailtext.$moneytext."<br></span><br>".$status; } else return "<span class="colorbad">Remote Login Problem: ".$remote_login."</span><br>Used login: ".$ra_user; fclose($telnet); } else return "<span class="colorbad">MaNGOS server is offline, you must do this when server is online.</span>";}function sendmail($playername,$playerguid, $subject, $text, $item, $shopid=0, $money=0, $realmid='1') //returns, IMPORTANT: do not remove <!-- success --> if success{ global $server,$ra_user,$ra_pass,$db,$a_user,$se_c,$realm; $playername = clean_string($playername); $subject = preg_replace( "/[^A-Za-z0-9]/", "", clean_string($subject)); //no whitespaces $item = preg_replace( "/[^0-9]/", "", $item); //item id $realmid = preg_replace( "/[^0-9]/", "", $realmid); //item id if ($item<>'') $item = " ".$item; $text = clean_string($text); $money = preg_replace( "/[^0-9]/", "", $money); $username = 'GMNAME'; $password = 'GMPASS'; $host = "localhost"; $soapport = 7878;if ($item<>'' && $item<>'0') //send item { $command = 'send items '.$playername.' "'.$subject.'" "'.$text.'" '.$item.''; $moneytext = "<strong>Your reward has been sent.</strong> Please check your mailbox in game!"; $client = new SoapClient(NULL, array( "location" => "http://$host:$soapport/", "uri" => "urn:MaNGOS", "style" => SOAP_RPC, 'login' => $username, 'password' => $password )); try { $result = $client->executeCommand(new SoapParam($command, "command")); return "<!-- success --><span class="colorgood">".$mailtext.$moneytext."<br /></span><br />".$status; } catch (Exception $e) { echo "Command failed! Reason:<br />n"; echo $e->getMessage(); }} elseif ($money>'0' && $money<>'')//send money { $command = 'send money '.$playername.' "'.$subject.'" "'.$text.'" '.$money.''; $client = new SoapClient(NULL, array( "location" => "http://$host:$soapport/", "uri" => "urn:MaNGOS", "style" => SOAP_RPC, 'login' => $username, 'password' => $password )); try { $result = $client->executeCommand(new SoapParam($command, "command")); $moneytext = "<strong>Your money has been sent.</strong> Please check your mailbox in game!"; } catch (Exception $e) { $moneytext = "Failed to send any money. <br />Please contact support!"; }}else //send mail { $command = 'send mail '.$playername.' "'.$subject.'" "'.$text.'"'; $client = new SoapClient(NULL, array( "location" => "http://$host:$soapport/", "uri" => "urn:MaNGOS", "style" => SOAP_RPC, 'login' => $username, 'password' => $password )); try { $result = $client->executeCommand(new SoapParam($command, "command")); $moneytext = "<strong>Your mail was sent.</strong> Please check your mailbox in game!"; } catch (Exception $e) { $moneytext = "Failed to send your mail. <br />Please contact support!"; }} $check=$db->query("SELECT * FROM mail WHERE receiver = '".$playerguid."' AND subject ='".$subject."' LIMIT 1")or die(mysql_error()); if(mysql_num_rows($check)=='0') { $status="Rechecking, just to make sure mail is actually sent:<br><br><center><iframe style='width:96%; height:100px' src='./include/core/mangos_iframe_mailcheck.php?shopid=".$shopid."&reciver=".$playerguid."&subject=".$subject."&realmid=".$realmid."&shash=".sha1($a_user['id'].$playerguid.$subject.$se_c.$shopid)."'><a href='./include/core/mangos_iframe_mailcheck.php?shopid=".$shopid."&reciver=".$playerguid."&subject=".$subject."&realmid=".$realmid."&shash=".sha1($a_user['id'].$playerguid.$subject.$se_c.$shopid)."'>Check here if your mail is here.</a></iframe></center>"; return "<!-- success --><span class="colorgood">".$mailtext.$moneytext."<br></span><br>".$status; } else return "<span class="colorbad">Mail Problem: ".$remote_login."</span><br>Used login: ".$ra_user;}$username = 'GMNAME'; $password = 'GMPASS'; $host = "localhost"; $soapport = 7878; Â
  4. Thanks I will think of using githubbut sourceforge.net git supports perfectly.I use git.
  5. I will continue to update and maintain MangosWeb which was originally created by "SUPERGADGET" and continued until the mid 2010 by "Wilson212" and fixed in 2011 by "Diabolical"  Assistance grants are welcome.  Repository: MangosWeb Cata SkyFireEMU Support forum: mangosweb-cata-skyfire.tk   Â
  6. I'm going the help Diabolical and others who need it. Layout and improve performance. Add more Templates. Assistance grants are welcome. Repo in SourceForge.Net with Mangos Web Fixed by Diabolical
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.