File manager - Edit - /home/kubansmu/public_html/kuban.php
Back
<?php date_default_timezone_set("Asia/Calcutta"); include("class.phpmailer.php"); include("class.smtp.php"); include("config.php"); $name =$_POST['name']; $email = $_POST["email"]; $phone =$_POST['phone']; $city =$_POST['city']; $state =$_POST['state']; $pcode = "+91"; $country = "99"; $phone_number = $pcode." ".$phone; $code = substr($phone_number, 0, 1); if($code!='+') { echo '<script type="text/javascript"> window.location = "https://www.kubansmu.org/" </script>'; exit; } if(trim($name)=='' || trim($email)=='' || trim($pcode)=='' || trim($phone)=='' || trim($state)=='' || trim($city)=='') { echo '<script type="text/javascript"> window.location = "https://www.kubansmu.org/" </script>'; exit; }else { $cuurent_data = date('Y-m-d H:i:s'); $sql4 = mysqli_query($conn1,"INSERT INTO `master_leads_tb_all_data`( `name`, `email`, `phone`, `country`, `state`, `city`, `source_id`, `sub_source_id`, `entrydate`, `ipaddress`) VALUES ('$name', '$email', '$phone2', '$country', '$state', '$city', '1', '6','$cuurent_data', '$_SERVER[REMOTE_ADDR]' )"); $select_query = mysqli_query($conn, "SELECT * from register where phone='$phone_number'"); $row = mysqli_fetch_assoc($select_query); $row_count = count($row); $select_query1 = mysqli_query($conn1, "SELECT * from master_leads_data where phone='$phone_number'"); $row1 = mysqli_fetch_assoc($select_query1); $row_count1 = count($row1); if($row_count1 > 0) { $cuurent_data = date('Y-m-d H:i:s'); /*=========================================================== update phone number in both tables ===========================================================*/ $exist_source_id =$row454['source_id'] ; $exist_sub_source_id = $row454['sub_source_id']; $repeat_source_id = $row454['repeat_source_id']; $repeat_sub_source_id = $row454['repeat_sub_source_id']; $real_source_id =2; $real_sub_souce_id= 33; if($repeat_sub_source_id=='' and $repeat_sub_source_id=='') { if($exist_source_id == $real_source_id and $exist_sub_source_id == $real_sub_souce_id){ $register_query1 = mysqli_query($conn1, "update master_leads_data set updated_date='$cuurent_data' where phone='$phone_number' limit 1"); }else{ $register_query1 = mysqli_query($conn1, "update master_leads_data set updated_date='$cuurent_data',repeat_source_id='$real_source_id',repeat_sub_source_id='$real_sub_souce_id' where phone='$phone_number' limit 1"); } }else{ $repeat_source_id = $repeat_source_id.','.$real_source_id; $repeat_sub_source_id = $repeat_sub_source_id.','.$real_sub_souce_id; $register_query1 = mysqli_query($conn1, "update master_leads_data set updated_date='$cuurent_data',repeat_source_id='$repeat_source_id',repeat_sub_source_id='$repeat_sub_source_id' where phone='$phone_number' limit 1"); } $register_query = mysqli_query($conn, "update register set updated_date='$cuurent_data' where phone='$phone_number' limit 1"); echo '<script type="text/javascript"> window.location = "https://www.kubansmu.org/thanks.php" </script>'; exit; } else{ /*=========================================================== insert data in both tables ===========================================================*/ $source_id = 2; $sub_source_id = 33; $cuurent_data = date('Y-m-d H:i:s'); $register_query = mysqli_query($conn, "INSERT INTO register (name,email,phone,city,state,country,entryby, updated_date)VALUES('$name','$email','$phone_number','$city','$state','$country','kuban-landing', '$cuurent_data')"); $register_query1 = mysqli_query($conn1, "INSERT INTO master_leads_data (name, email, phone, city, state, country, entrydate,source_id,sub_source_id,ipaddress) VALUES ('$name', '$email', '$phone_number', '$city', '$state', '$country', '$cuurent_data','$source_id', '$sub_source_id','".$_SERVER['REMOTE_ADDR']."')"); mysqli_close(); unset($_POST); echo '<script type="text/javascript"> window.location = "https://www.kubansmu.org/thanks.php" </script>'; exit; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Generation time: 0 |
proxy
|
phpinfo
|
Settings