GIF89a;
Direktori : /home/serb/public_html/ |
Current File : /home/serb/public_html/bannerregistration.php |
<? session_start(); include("lib/globals.php"); include("lib/common.php"); include("lib/functions.php"); ?> <? if($_POST) { $date=date('Y-m-d'); $ctname=$_SESSION['countryname']; $mont=explode('/',$_POST['datepicker']); $incidentdt=$mont[2].'-'.$mont[0].'-'.$mont[1]; //echo $mont[0]; if($mont[0]==01) { $mn= "January"; } if($mont[0]==02) { $mn= "February"; } if($mont[0]==03) { $mn= "March"; } if($mont[0]==04) { $mn= "April"; } if($mont[0]==05) { $mn= "May"; } if($mont[0]==06) { $mn= "June"; } if($mont[0]==07) { $mn= "July"; } if($mont[0]=='08') { $mn= "August"; } if($mont[0]=='09') { $mn= "September"; } if($mont[0]==10) { $mn= "October"; } if($mont[0]==11) { $mn= "November"; } if($mont[0]==12) { $mn= "December"; } if($_POST['visitor_country']=='US') { $sql_state="SELECT * FROM states Where id='".$_POST['prlState']."'"; $res_state=execute_query($sql_state); $row_state=mysql_fetch_array($res_state); $statename=$row_state['name']; $cityname=$_POST['prlCities']; } else { $statename=$_POST['visitor_state']; $cityname=$_POST['visitor_city']; } $sql="SELECT * FROM user_info WHERE username='".$_POST['userName']."' OR email='".$_POST['emailAddrs']."'"; $res=execute_query($sql); $num=mysql_num_rows($res); if($num<=0) { /*$dob=$_POST['year'].'-'.$_POST['month'].'-'.$_POST['day'];*/ $ins="INSERT INTO user_info(userid,username,password,email,user_type,user_country,status,dob,dob_month) VALUES('','".$_POST['userName']."','".$_POST['passWord']."','".$_POST['emailAddrs']."','".$_POST['acctype']."','$ctname','a','$incidentdt','$mn')"; execute_query($ins); $id=mysql_insert_id(); if(($_POST['acctype']=='independent') || ($_POST['acctype']=='tstv')) { $sql_ind_escort="insert into escort_details (id,user_id,escort_type,nickname, email,escort_state, escort_city,country_name, creation_date,status,dob,dob_month) VALUES ('','$id','".$_POST['acctype']."', '".$_POST['userName']."', '".$_POST['emailAddrs']."', '$statename', '$cityname', '".$_POST['visitor_country']."', '$date', 'u','$incidentdt','$mn')"; $ind_res=execute_query($sql_ind_escort); $pid=mysql_insert_id(); $to = "subhrajyoti.mca11@gmail.com"; $subject="New Account Approval"; $message = "there is a new post In escortservice.org, awaiting approval.\r\n Account details:\r\n\r\nUsername:".$_POST['nickname']."\r\nUserId:".$id."\r\n\r\n".$desp."\r\n\r\n"; $from="escortservice.org";; // Temporary paths of selected files // include the from email in the headers $headers = "From: $from"; // boundary $time = md5(time()); $boundary = "==Multipart_Boundary_x{$time}x"; // headers used for send attachment with email $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$boundary}\""; // multipart boundary $message = "--{$boundary}\n" . "Content-Type: text/plain; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n"; $message .= "Click the link to approve this post :"." "."http://testsitez.info/abhi-dv/escortservice/approve-post.php?id=$pid"."\n\n"; $message .= "Click the link to Reject this post :"." "."http://testsitez.info/abhi-dv/escortservice/reject-post.php?id=$pid"."\n\n"; $message .= "--{$boundary}\n"; $sendmail = sendEmail($to, $subject, $message); // $sendmail = mail($to, $subject, $message, $headers); } $qur="SELECT * FROM user_info WHERE userid='$id'" ; $res=execute_query($qur); $row=mysql_fetch_array($res); $_SESSION['userlogin']="true"; $_SESSION['userid']=$row['userid']; $_SESSION['user']=$row['username']; $_SESSION['acctype']=$row['user_type']; $loc="advertise-banner.php"; ?> <script language="javascript"> location.href="<?=$loc?>"; </script> <? } else { $loc="bannerlogin.php?msg=2"; ?> <script language="javascript"> location.href="<?=$loc?>"; </script> <? } } ?>