Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
ynormeco
/
.trash
/
ynormedemos
/
smadmin
/
pages
/
Or
Select Your Path :
Upload File :
New :
File
Dir
//home/ynormeco/.trash/ynormedemos/smadmin/pages/update_reg.php
<?php ob_start(); include("../inc/config.php"); $conn = connect_database(); date_default_timezone_get('Asia/Calcutta'); $date = date("Y-m-d"); $day = '365 day'; $renew = date('Y-m-d' , strtotime($date.'+'.$day)); // automatic enters preasent date in db $id = $_POST['id']; $uid = $_POST['uid']; // $name = $_POST['username']; // $mob = $_POST['mobile']; // $gender = $_POST['gender']; // $email = $_POST['email']; // $password = $_POST['psw']; $act = $_POST['submit']; if($act == 'Active') { $que = mysqli_query($conn, "UPDATE `register` SET `status`= 'Active', `activation_date`= '$date' , `renew_date` = '$renew' WHERE `id` = '$id' "); echo mysqli_error($conn); if(!$que) { echo mysqli_error($conn); } else { $qque = mysqli_num_rows(mysqli_query($conn, "SELECT * FROM `usertype` where `username` = '$uid' ")); if($qque == 0) { mysqli_query($conn, "INSERT INTO `usertype` (`utype`, `username`, `type`) VALUES (NULL, '$uid', 'guess')"); } else { mysqli_query($conn, "UPDATE `usertype` SET `type` = 'guess' WHERE `username` = '$uid' "); } header('location: ../guessing.php?insert=success'); } } if($act == 'Inactive') { $que = mysqli_query($conn, "UPDATE `register` SET `status`= 'Inactive', `activation_date`= '$date' , `renew_date` = '$renew' WHERE `id` = '$id' "); echo mysqli_error($conn); if(!$que) { echo mysqli_error($conn); } else { header('location: ../guessing.php?insert=success'); } } ob_end_flush(); ?>