Şuanki Dizin: /home/wwwdreamtechnolo/public_html/bprisk.online/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/bprisk.online/functions.php |
<?php class class_function{ private $con; function __construct(){ // $this->con = new mysqli("localhost","bprisk_admin_user","52nu115pqal9","bprisk_bprisk_app"); $this->con = new mysqli("localhost","wwwdreamtechnolo_bprisk_admin","k5l08qdwpa91","wwwdreamtechnolo_bprisk"); } function create_user_account($name,$mobile_no,$email,$message){ $date = date("y-m-d"); $time = date("H:i:s:a"); if($stmt = $this->con->prepare("INSERT INTO `delete-account`(`name`, `mobile_no`, `email`, `msesage`, `date`,`time`) VALUES(?,?,?,?,?,?) ")){ $stmt->bind_param("ssssss", $name,$mobile_no,$email,$message, $date, $time); if($stmt->execute()){ return true; } else{ return false; } } } function get_user_data(){ if($stmt = $this->con->prepare("SELECT `id`, `name`, `mobile_no`, `email`, `msesage`, `date`, `time` FROM `delete-account` ")){ $stmt->bind_result($res_id,$name,$mobile_no,$email,$message, $date, $time); if($stmt->execute()){ $data = array(); $counter =0; while($stmt->fetch()){ $data[$counter]['id'] = $res_id; $data[$counter]['name']=$name ; $data[$counter]['mobile_no']=$mobile_no ; $data[$counter]['email']=$email ; $data[$counter]['message']=$message ; $data[$counter]['date'] = $date; $data[$counter]['time'] = $time; $counter++; } if(!empty($data)){ return $data; } else{ return false; } } } } function delete_user_record($del_id){ if($stmt = $this->con->prepare("DELETE from `delete-account` where `id`=?")){ $stmt->bind_param("i",$del_id); if($stmt->execute()){ return true; } else{ return false; } } } function update_user_account($name,$mobile_no,$email,$message,$res_edit_id){ $date = date("y-m-d"); $time = date("H:i:s:a"); if($stmt = $this->con->prepare("UPDATE `delete-account` SET `id`=?,`name`=?,`mobile_no`=?,`email`=?,`msesage`=?,`date`=?,`time`=? WHERE `id` = ?")){ $stmt->bind_param("ssssssi",$name,$mobile_no,$email,$message,$res_edit_id,$date,$time,$res_edit_id); if($stmt->execute()){ return true; } else{ return false; } } } function get_user_data_from_id($res_edit_id){ if($stmt = $this->con->prepare("SELECT `id`, `name`, `mobile_no`, `email`, `msesage`, `date`, `time` FROM `delete-account` WHERE `id`=?")){ $stmt->bind_param("i",$res_edit_id); $stmt->bind_result($res_id,$name,$mobile_no,$email,$message,$res_edit_id,$res_date,$res_time); if($stmt->execute()){ $data = array(); // $counter =0; if($stmt->fetch()){ $data['id'] = $res_id; $data['fname']=$res_fname ; $data['lname']=$res_lname ; $data['phone']=$res_phone ; $data['email']=$res_email ; $data['address']=$res_address ; $data['gender']=$res_gender ; $data['date'] = $res_date; $data['time'] = $res_time; } if(!empty($data)){ return $data; } else{ return false; } } } } }
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4