• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[GESIOR] Confirmation of donation via email

Maserots

Developers Gesior
Joined
Mar 18, 2010
Messages
28
Reaction score
0
Location
Brasil
Hello Dears
Well, after a long time I was looking for my Gesior systems and not found ..

I decided to learn php + mysql and create a basic but effective and functioning 100%.

System Information:
WebSite tested: Gesior [100% success]
Content completely in php
Easy to install.


Installation:
Well, you know what you have in your PHPMailer Gesior and you do not know what it does? Well, you will need it in order to send information to your email confirmation ...

Well, put the file gravar.php confirmation and the site, apply in index.php
PHP:
		case "confirmacao":
                $topic = "Confirmar Compra";
                $subtopic = "shopsystem";
                include("confirmacao.php");
        break;

After you have placed it in the index applies layout.php
HTML:
<a href='index.php?subtopic=confirmacao'>
  <div id='submenu_shopsystem' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>

    <div id='ActiveSubmenuItemIcon_shopsystem' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Confirmacao</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>

After applying the data on your site create a file confirmacao.PHP and put
PHP:
<?php header("Content-Type: text/html; charset=ISO-8859-1",true);
/*/by Victor Fasano Raful /*/
#Credits may cause the deleted file not working
if(isset($_POST["acao"]) && $_POST["acao"] == "enviar")
		{require ("gravar.php");}

        if(isset($msg))
         echo "<div id=\"msg\">$msg</div>";
if(!$logged)
        if($action == "logout")
                $main_content .= '<div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" >        <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>        <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>        <div class="Text" >Logout Successful</div>        <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>        <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>        <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td>        <div class="InnerTableContainer" >          <table style="width:100%;" ><tr><td><h3><font color="green"><center>Sua conta foi deslogada com sucesso!</center></font></h3><br>Voce podera logar novamente clicando <a href="?subtopic=accountmanagement">aqui</a>.</td></tr>          </table>        </div>  </table></div></td></tr>';
        else
                $main_content .= 'Please enter your account name and your password.<br/><a href="?subtopic=createaccount" >Create an account</a> if you do not have one yet.<br/><br/><form action="?subtopic=accountmanagement" method="post" ><div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" >        <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>        <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>        <div class="Text" >Account Login</div>        <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>        <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>        <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td>        <div class="InnerTableContainer" >          <table style="width:100%;" ><tr><td class="LabelV" ><span >Account Name:</span></td><td style="width:100%;" ><input type="password" name="account_login" SIZE="10" maxlength="10" ></td></tr><tr><td class="LabelV" ><span >Password:</span></td><td><input type="password" name="password_login" size="30" maxlength="29" ></td></tr>          </table>        </div>  </table></div></td></tr><br/><table width="100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=lostaccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Account lost?" alt="Account lost?" src="'.$layout_name.'/images/buttons/_sbutton_accountlost.gif" ></div></div></td></tr></form></table></td></tr></table>';
else


$main_content .= ' 
Nossa ferramenta de confirmação de pagamento somente é válida para quem efetuou o pagamento verdadeiro, caso <b>não</b> tenha efetuado nenhum tipo de transação
e esta usando nossas ferramentas para uso indevido como mandar <b>"recadinhos"</b> o jogador poderá ser <b>punido</b> em 5 dias corridos.<br /><br />
	<div class="TableContainer"> 
 <div class="CaptionContainer">    
 <div class="CaptionInnerContainer">    
 <span class="CaptionEdgeLeftTop" style="background-image: url(layouts/tibiacom/images/content/box-frame-edge.gif);">
 </span>   
 <span class="CaptionEdgeRightTop" style="background-image: url(layouts/tibiacom/images/content/box-frame-edge.gif);">
 </span>      
 <span class="CaptionBorderTop" style="background-image: url(layouts/tibiacom/images/content/table-headline-border.gif);">
 </span>   
 <span class="CaptionVerticalLeft" style="background-image: url(layouts/tibiacom/images/content/box-frame-vertical.gif);">
 </span>     
 <div class="Text">Confirmação de Pagamento</div>    
 <span class="CaptionVerticalRight" style="background-image: url(layouts/tibiacom/images/content/box-frame-vertical.gif);">
 </span>     
 <span class="CaptionBorderBottom" style="background-image: url(layouts/tibiacom/images/content/table-headline-border.gif);">
 </span>       
 <span class="CaptionEdgeLeftBottom" style="background-image: url(layouts/tibiacom/images/content/box-frame-edge.gif);">
 </span>     
 <span class="CaptionEdgeRightBottom" style="background-image: url(layouts/tibiacom/images/content/box-frame-edge.gif);"></span>  
 </div>   
 </div>   
 <table class="Table1" cellpadding="0" cellspacing="0"> 
 <tbody>
 <tr>   
 <td>       
 <div class="InnerTableContainer">  
 <table style="width: 100%;">
 <tbody>
 <td valign="middle" width="25px;"> 
	<form action="" method="post" enctype="multipart/form-data">
      <select name="nome">';
		$players_from_logged_acc = $account_logged->getPlayersList();
						if(count($players_from_logged_acc) > 0) {
							$players_from_logged_acc->orderBy('name');
							foreach($players_from_logged_acc as $player) {
								$main_content .= '<option>'.$player->getName().'</option>';
							}
						} else {
							$main_content .= 'You don\'t have any character on your account.';
						}
				   
				   $main_content .='
				   </select><small> (Selecione um personagem) </small>
                    <br /><br />
                   
                         <span><b>E-mail</b></span><br />
						 '.$account_logged->getCustomField("email").'
                       <input type="hidden" value="'.$account_logged->getCustomField("email").'" name="email" readonly />
                  
                    <br /><br />
                   
                         <span><b>Account</b></span><br />
						 '.$account_logged->getCustomField("name").'
                         <input value="'.$account_logged->getCustomField("name").'" name="titulo" readonly />
                   
                      <br /><br />
                      
                         <span><b>Mensagem</b></span>  <br />
                         <textarea name="mensagem" cols="30" rows="5"></textarea>
           
           
             
                    <br /><br />
            <input type="hidden" name="acao" value="enviar" />          
           <input type="submit" value=" Enviar Confirmação " class="btn"/>
        
    </form>
	
	</tbody>

</table>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<small>Script by Odyn</small>';
?>

Now the part that all ask for me;)
The file that sends the data.

Create a file called gravar.php and paste
PHP:
<?php header("Content-Type: text/html; charset=ISO-8859-1",true);

		$nome     = strip_tags(trim($_POST[nome]));
		$email    = strip_tags(trim($_POST[email]));
		$titulo   = strip_tags(trim($_POST[titulo]));
		$mensagem = strip_tags(trim($_POST[mensagem]));
    
	  {
       require('phpmailer/class.phpmailer.php');
       
       $mail = new PHPMailer();
       $mail->IsSMTP();
       $mail->SMTPAuth = true;
       $mail->Port = '587'; /*/ Do not change without knowing what it is /*/
       $mail->Host = 'smtp.gmail.com';
       $mail->Username = '[email protected]';
       $mail->Password = 'SENHA';   
       $mail->SetFrom('EMAIL QUE RECEBERA', 'Conta '.$account_logged->getCustomField("name").' fez pagamento');
       $mail->AddAddress('EMAIL QUE RECEBERA', 'Confirmação NOME DO OT');
       $mail->Subject = 'Confirmação - '.$account_logged->getCustomField("name").'';
       
       $body = "
	   <font face='verdana, arial'>
			<strong>Character : </strong>{$nome} <br />
            <strong>E-mail : </strong>{$email} <br />
            <strong>Account : </strong>{$titulo} <br />	
            <strong>Mensagem : </strong>{$mensagem} <br />
			</font>
            ";
       
       $mail->MsgHTML($body);
              
       if($mail->Send())
           $msg = '
		   <SCRIPT LANGUAGE="JavaScript">
<!--
window.alert("Confirmation sent successfully !\n\n Wait 24 hours for them to drop their points in your account"); location.href=\'index.php?subtopic=latestnews\';
// -->
</SCRIPT>
';
        else
           $msg = '		   <SCRIPT LANGUAGE="JavaScript">
<!--
window.alert("Your message was not sent, try again")
// -->
</SCRIPT>';
       
      };
?>


Is there guys, first hand!


PS: Never remove the credits, it can not cause the operation of the file

Questions will be clarifying the topic or e-mail [email protected] victor


Thanks!
 
You english is very bad =\

If you don't have anything nice to say, don't say anything at all. I was actually able to understand what he was saying. Maybe you should get your brain checked out so that it can comprehend and be able to decipher what someone might be saying.

Anyway, Great Job Maserots! I will try this when I get home. Can't wait!
 
Thank you, please you who are adding the systems on their servers. Send me your email so I suggest improvements to websites.
 
I am ajustin one error

again new error

SMTP Error: Could not connect to SMTP host.
 
SMTP Error: Could not authenticate.
<div id="msg"> <SCRIPT LANGUAGE="JavaScript">
<!--
window.alert("Your message was not sent, try again")
// -->
</SCRIPT>
 
i have my own server but ppl can enter my server,,,but i cant enter into game with my ip or 127.0.0.1 what i do?!
 
i have my own server but ppl can enter my server,,,but i cant enter into game with my ip or 127.0.0.1 what i do?!
If you have smtp server you can change the SMTP for your server. Was inactive in otland but now back. I doubt exclarecer.

- - - Updated - - -

SMTP Error: Could not authenticate.
<div id="msg"> <SCRIPT LANGUAGE="JavaScript">
<!--
window.alert("Your message was not sent, try again")
// -->
</SCRIPT>

Change to the SMTP server of your choice

- - - Updated - - -

I am ajustin one error

again new error

SMTP Error: Could not connect to SMTP host.
Make sure that you correctly configured the smtp server in the archives.
 
If you have smtp server you can change the SMTP for your server. Was inactive in otland but now back. I doubt exclarecer.

- - - Updated - - -



Change to the SMTP server of your choice

- - - Updated - - -


Make sure that you correctly configured the smtp server in the archives.
how to configure for gmail?
my gravar.php
PHP:
<?php header("Content-Type: text/html; charset=ISO-8859-1",true); 

        $nome     = strip_tags(trim($_POST[nome])); 
        $email    = strip_tags(trim($_POST[email])); 
        $titulo   = strip_tags(trim($_POST[titulo])); 
        $mensagem = strip_tags(trim($_POST[mensagem])); 
     
      { 
       require('phpmailer/class.phpmailer.php'); 

        $mail = new PHPMailer(); 
        $mail->IsSMTP(); 
        $mail->SMTPAuth = ($config['site']['smtp_auth'] ? true : false); 
        $mail->Port = (int)$config['site']['smtp_port']; 
        $mail->Host = $config['site']['smtp_host']; 
        $mail->Username = $config['site']['smtp_user'];
	$mail->Password = $config['site']['smtp_pass'];    
        $mail->SetFrom('******@gmail.com', 'Conta '.$account_logged->getCustomField("name").' fez pagamento'); 
        $mail->AddAddress('******@gmail.com', 'Confirmação Ot-Name'); 
        $mail->Subject = 'Confirmação - '.$account_logged->getCustomField("name").''; 
        
       $body = " 
       <font face='verdana, arial'> 
            <strong>Character : </strong>{$nome} <br /> 
            <strong>E-mail : </strong>{$email} <br /> 
            <strong>Account : </strong>{$titulo} <br />     
            <strong>Mensagem : </strong>{$mensagem} <br /> 
            </font> 
            "; 
        
       $mail->MsgHTML($body); 
               
       if($mail->Send()) 
           $msg = ' 
           <SCRIPT LANGUAGE="JavaScript"> 
<!-- 
window.alert("Confirmation sent successfully !\n\n Wait 24 hours for them to drop their points in your account"); location.href=\'?subtopic=latestnews\'; 
// --> 
</SCRIPT> 
'; 
        else 
           $msg = '           <SCRIPT LANGUAGE="JavaScript"> 
<!-- 
window.alert("Your message was not sent, try again") 
// --> 
</SCRIPT>'; 
        
      }; 
?>
 
I used the google translator to make this explanation, I'm sorry if I can not write English properly ...
There goes the tutorial below gravar.php for sending via SMTP for gmail.

PHP:
<?php header("Content-Type: text/html; charset=ISO-8859-1",true);

        $nome     = strip_tags(trim($_POST[nome]));
        $email    = strip_tags(trim($_POST[email]));
        $titulo   = strip_tags(trim($_POST[titulo]));
        $mensagem = strip_tags(trim($_POST[mensagem]));
    
      {
       require('phpmailer/class.phpmailer.php');
       
       $mail = new PHPMailer();
       $mail->IsSMTP();
       $mail->SMTPAuth = true;
       $mail->Port = '587'; /*/ Do not change without knowing what it is /*/
       $mail->Host = 'smtp.gmail.com'; /* Do not change because it is the smtp server. */
       $mail->Username = 'email (gmail)';
       $mail->Password = 'SMTP password (usually the same as email)';
       $mail->SetFrom('CHANGE HERE', 'account name made '.$account_logged->getCustomField("name").' payments');
       $mail->AddAddress('CHANGE HERE', 'Confirmation Payment - OTserv');
       $mail->Subject = 'Confirmation Payment - '.$account_logged->getCustomField("name").'';
       
       $body = "
       <font face='verdana, arial'>
            <strong>Character : </strong>{$nome} <br />
            <strong>E-mail : </strong>{$email} <br />
            <strong>Account : </strong>{$titulo} <br />    
            <strong>Message : </strong>{$mensagem} <br />
            </font>
            ";
       
       $mail->MsgHTML($body);
              
       if($mail->Send())
           $msg = '
           <SCRIPT LANGUAGE="JavaScript">
<!--
window.alert("Confirmation sent successfully !\n\n Wait 24 hours for them to drop their points in your account"); location.href=\'index.php?subtopic=latestnews\';
// -->
</SCRIPT>
';
        else
           $msg = '<SCRIPT LANGUAGE="JavaScript">
<!--
window.alert("Your message was not sent, try again")
// -->
</SCRIPT>';
       
      };
?>

Edit the fields that are marked for editing. "EDIT HERE". Paste this in gravar.php and see if it works, I am without the config Gesior here on my computer in case of error will post a new version with better installation script. The config file config.php works separately from the confirmation in the next update I'll give the script to put the files work together. Sorry for the delay, I'm walking through the otland inactive. add more doubt in the email (hotmail) [email protected] .. Thank you good night.
 
PHP:
<?php header("Content-Type: text/html; charset=ISO-8859-1",true); 

        $nome	= strip_tags(trim($_POST[nome])); 
        $email	= strip_tags(trim($_POST[email])); 
        $titulo	= strip_tags(trim($_POST[titulo])); 
        $mensagem	= strip_tags(trim($_POST[mensagem])); 
     
      { 
       require('phpmailer/class.phpmailer.php'); 
        
       $mail = new PHPMailer(); 
       $mail->IsSMTP(); 
       $mail->SMTPAuth = true; 
       $mail->Port = $config['site']['smtp_port']; /*/ Do not change without knowing what it is /*/ 
       $mail->Host = $config['site']['smtp_host']; 
       $mail->Username = $config['site']['mail_address']; 
       $mail->Password = $config['site']['smtp_pass'];    
       $mail->SetFrom(''.$config['site']['smtp_pass'].'', 'Confirmation OTserv'); 
       $mail->AddAddress(''.$config['site']['smtp_pass'].'', 'Confirmation OTserv'); 
       $mail->Subject = 'Confirmation'; 
        
       $body = " 
       <font face='verdana, arial'> 
            <strong>Character : </strong>{$nome} <br /> 
            <strong>E-mail : </strong>{$email} <br /> 
            <strong>Account : </strong>{$titulo} <br />     
            <strong>Message : </strong>{$mensagem} <br /> 
            </font> 
            "; 
        
       $mail->MsgHTML($body); 
               
       if($mail->Send()) 
           $msg = ' 
           <SCRIPT LANGUAGE="JavaScript"> 
<!-- 
window.alert("Confirmation sent successfully !\n\n Wait 24 hours for them to drop their points in your account"); location.href=\'index.php?subtopic=latestnews\'; 
// --> 
</SCRIPT> 
'; 
        else 
           $msg = '           <SCRIPT LANGUAGE="JavaScript"> 
<!-- 
window.alert("Your message was not sent, try again") 
// --> 
</SCRIPT>'; 
        
      }; 
?>

For the player can access the page, it must be logged into your account, otherwise some errors appeared. Before that happens make sure he's logged.
The following new version, do not change anything, just configure your SMTP config/config.php. See if I helped in something, is correct and functioning normally.
 
Back
Top