After Execute if($a) condition then view alert before 9 am "activate within 2 hr " and between 9am-6pm alert "wait 20min" and after 6pm alert is "activate tommorow"
note: i was does not add any timestamp code i don't no knowledge of timestamps please provide EST timestamp code please fallow of above alerts sir
<?php
session_start();
include_once("db.php");
$simname = $_REQUEST["id"];
$sim_num = $_REQUEST["num"];
$name = $_SESSION['sasi_ad_name'];
$id = $_SESSION['sasi_ad_id'];
$query5=mysql_query("SELECT id, sim_number, phone_num, status, plan, add_on, features, Delear, Sub_Delear, T_C, sim_type FROM sims where sim_number='$sim_num' and sim_type='$simname'");
$query6=mysql_fetch_array($query5);
$delarname = $query6['Delear'];
$query7=mysql_query("SELECT id, name, Email, Phone, password, status, address, own, Identity_proof FROM adminusers WHERE name='$delarname'");
$query8=mysql_fetch_array($query7);
$demail = $query8['Email'];
$phone = $query8['Phone'];
$query2=mysql_query("SELECT id, name, Email, Phone, password, status, address, own, Identity_proof FROM adminusers WHERE status='0'");
$query3=mysql_fetch_array($query2);
$email = $query3['Email'];
if($_POST['submit'])
{
$subject="Activation Conformation SIM'";
$ip=$_SERVER['REMOTE_ADDR'];
$to = $demail . ', '; // note the comma
$to .= $email;
// message
$message = "<table align='left'>
<tr height=20>
<td> </td>
</tr>
<tr>
<td><b>Delear Name : </b> $delarname</td>
</tr>
<tr>
<td><b>SIM Number : </b> $sim_num</td>
</tr>
<tr>
<td><b>SIM Type : </b> $simname </td>
</tr>
<tr>
<td><b>Phone No : </b> $phone</td>
</tr>
<tr height=10>
<td> </td>
</tr>
<tr height=10>
<td> </td>
</tr>
<tr>
<td><b>Customer IP Address : </b> $ip</td>
</tr>
<tr height=20>
<td> </td>
</tr>
</table> " ;
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "rn";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "rn";
// Additional headers
$headers .= 'To: Olpur <support@olpur.com>, Vegaitindia pvt ltd <contact@olpur.com>' . "rn";
$headers .= 'From: Support Query <support@olpur.com>' . "rn";
$headers .= 'Cc: andesasi1222@gmail' . "rn";
$headers .= 'Bcc: andesasi1222@gmail' . "rn";
// Mail it
$a = mail($to, $subject, $message, $headers);
if($a)
{
echo "<script> alert('THANK YOU…!! OUR TEAM WOULD SHORTLY CONTACT YOU'); window.location='../';</script>";
}else{
echo "<script> alert('Fail to save your information. Please re-enter your information'); window.location='index.php';</script>";
}
}
?>
Aucun commentaire:
Enregistrer un commentaire