Mini Shell

Direktori : /proc/self/root/proc/self/root/home/rizant5/public_html_old/
Upload File :
Current File : //proc/self/root/proc/self/root/home/rizant5/public_html_old/forgot-email.php

<?php
$verify_url="http://" . $_SERVER['SERVER_NAME'] ."/verify-student.php";
require_once("config.php");
require_once('phpmailer/class.phpmailer.php');
require_once('phpmailer/class.smtp.php');
$stu_email=$_POST['stu_email'];
$data=$conn->prepare("select * from student_reg where stu_email='$stu_email'");
$data->execute();$num=$data->rowcount();
if($num>0){
$length = 10;
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
     $randomString .= $characters[rand(0, $charactersLength - 1)];
}

$conn->exec("update student_reg SET stu_password='".md5($randomString)."' where stu_email='$stu_email'");
$stu_id=$conn->lastInsertId();
//Send Mail
$message ="<table cellpadding='0' cellspacing='0' align='center' width='600' bgcolor='#f5f5f5'>
    <style>
    @import url(http://weloveiconfonts.com/api/?family=entypo);
    [class*='entypo-']:before {
       font-family: 'entypo', sans-serif;
    }
    #sticky-social a {
      background: #333;
      color: #fff;
      display: block;
      height: 35px;
      font: 16px 'Open Sans', sans-serif;
      line-height: 35px;
      position: relative;
      text-align: center;
      width: 35px;
      text-decoration: none;
    }
    #sticky-social a[class*='facebook'],
    #sticky-social a[class*='facebook']:hover,
    #sticky-social a[class*='facebook'] span { background: #3b5998; }
    #sticky-social a[class*='twitter'],
    #sticky-social a[class*='twitter']:hover,
    #sticky-social a[class*='twitter'] span { background: #00aced; }
    #sticky-social a[class*='gplus'],
    #sticky-social a[class*='gplus']:hover,
    #sticky-social a[class*='gplus'] span { background: #dd4b39; }
    #sticky-social a[class*='linkedin'],
    #sticky-social a[class*='linkedin']:hover,
    #sticky-social a[class*='linkedin'] span { background: #007bb6; }
    #sticky-social a[class*='instagrem'],
    #sticky-social a[class*='instagrem']:hover,
    #sticky-social a[class*='instagrem'] span { background: #517fa4; }
    #sticky-social a[class*='stumbleupon'],
    #sticky-social a[class*='stumbleupon']:hover,
    #sticky-social a[class*='stumbleupon'] span { background: #eb4924; }
    #sticky-social a[class*='pinterest'],
    #sticky-social a[class*='pinterest']:hover,
    #sticky-social a[class*='pinterest'] span { background: #cc2127; }
    #sticky-social a[class*='flickr'],
    #sticky-social a[class*='flickr']:hover,
    #sticky-social a[class*='flickr'] span { background: #ff0084; }
    #sticky-social a[class*='tumblr'],
    #sticky-social a[class*='tumblr']:hover,
    #sticky-social a[class*='tumblr'] span { background: #32506d; }
    #sticky-social > td{ padding: 0; }
    </style>
            <tr>
                <td style='background-color: #e4e4e4;'><img src='http://development.lankavirtualacademy.com/images/mail/mail_logo_v2.png' style='display:block;margin: auto;padding:20px 0;' border='0'></td>
            </tr>
            <tr>
                <td style='font-family: Helvetica, Arial, Sans Serif; font-size:12px;'>
                    <table cellspacing='20'>
                        <tr>
                            <td>
                                <br />
                                <p style='font-family: Helvetica, Arial, Sans Serif; line-height: 22px; font-size: 16px;'>
                                Dear Valued Subscriber,<br/><br/>

								We have received your request to assist you with your forgotten password. Accordingly, the system generated temporary password to login to our account is: <b>$randomString</b> <br/><br/>

								You may kindly login to your account using this password, and change password to your choice from your account upon login.<br/><br/>

								To keep your account secure, please don't forward this email to anyone.<br/><br/>

								Please click here to login:$verify_url <br/><br/>

								We really appreciate your association with Lanka Virtual Academy and assure you of our best service and attention at all times.<br/><br/>

								<b>The Administrator</b><br/>
								Lanka Virtual Academy
                                </p>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align='center' style='background-color: #e4e4e4;color: #3b5999;'><br />
                    <span style='font-family: Helvetica, Arial, Sans Serif; font-size:14px;'>Lanka Virtual Academy</span><br/><span style='font-family: Helvetica, Arial, Sans Serif; font-size:14px;'>49, W 27th Street, Waterfield Drive, Colombo 10, Sri Lanka</span><br /><br/><span style='font-family: Helvetica, Arial, Sans Serif; font-size:14px;'>WE ARE SOCIAL</span><br /><br/>
                    <table align='center' cellspacing='0'>
                        <tr id='sticky-social'>                            
                            <td align='center' style='padding: 0;'><a href='https://web.facebook.com/Lanka-Virtual-Academy-715033055300562/' class='entypo-facebook' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/1.jpg'></a></td>
                            <td align='center' style='padding: 0;'><a href='https://twitter.com/lvaacademy' class='entypo-twitter' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/2.jpg'></a></td>
                            <td align='center' style='padding: 0;'><a href='#' class='entypo-gplus' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/3.jpg'></a></td>
                            <td align='center' style='padding: 0;'><a href='https://www.linkedin.com/company/lanka-virtual-academy' class='entypo-linkedin' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/4.jpg'></a></td>
                            <td align='center' style='padding: 0;'><a href='https://web.facebook.com/Lanka-Virtual-Academy-715033055300562/' class='entypo-instagrem' taget='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/5.jpg'></a></td>
                            <td align='center' style='padding: 0;'><a href='http://www.stumbleupon.com/stumbler/LVAcademy' class='entypo-stumbleupon' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/6.jpg'></a></td>
                            <td align='center' style='padding: 0;'><a href='https://www.pinterest.com/lankavirtualaca/' class='entypo-pinterest' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/7.jpg'></a></td>
                            <td align='center' style='padding: 0;'><a href='https://www.flickr.com/people/147006820@N02/' class='entypo-flickr' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/8.jpg'></a></td>
                            <td align='center' style='padding: 0;'><a href='//www.lankavirtualacademy.tumblr.com' class='entypo-tumblr' target='_blank'><img src='http://development.lankavirtualacademy.com/images/mail/9.jpg'></a></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align='center' style='background-color: #e4e4e4;color: #3b5999;font-size:12px;padding: 15px 20px;'><hr color=#cdcdcd>The information in this email is intended only for the addressee and may contain confidential, privileged, or otherwise private information. If you have received this email in error, please contact Lanka Virtual Academy immediately and delete the material from any receiving computer. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is strictly prohibited.</td>
            </tr>
        </table>";
		$mail	= new PHPMailer; // call the class 
		//$mail->IsSMTP();
		$mail->SMTPDebug  = 0; 
		$mail->SMTPSecure = "tls";	 
		$mail->Host = "smtp.gmail.com"; //Hostname of the mail server
		$mail->Port = 587; //Port of the SMTP like to be 25, 80, 465 or 587
		$mail->SMTPAuth = true; //Whether to use SMTP authentication
		$mail->Username = "praveen.patel.9595"; //Username for SMTP authentication any valid email created in your domain
		$mail->Password = "bgxbpqumcefjrbqi"; //Password for SMTP authentication
		$mail->AddReplyTo("support@lankavirtualacademy.com", "Lanka Virtual Academy"); //reply-to address
		$mail->SetFrom("support@lankavirtualacademy.com","Lanka Virtual Academy"); //From address of the mail
		// put your while loop here like below,
		$mail->Subject = "Forgot Password"; //Subject od your mail
		$mail->AddAddress($stu_email,"$stu_name"); //To address who will receive this email
		$mail->MsgHTML($message);
		$send = $mail->Send(); //Send the mails
		
ob_start();
		header("location:verify-student.php?msg=checkmail");
}
else{
header("location:forgot-password.php?msg=error");
}

?>

Zerion Mini Shell 1.0