File manager - Edit - /home/autoph/public_html/pms_v1/config/import.php
Back
<?php include_once("../../../cfg/conn.php"); include_once("../../../cfg/connasa.php"); //error_reporting(0); if(isset($_POST['imp'])){ $addCount = 0 ; $activeUserID = $_POST['activeUserID']; echo "<table class='col-lg-12 col-md-12' style='width:150%'>"; echo "<thead>"; echo "<th>ID</th>"; echo "<th>EMP NO</th>"; echo "<th>EMPLOYEE NAME</th>"; echo "<th>COMPANY</th>"; echo "<th>DEALER</th>"; echo "<th>TITLE</th>"; echo "</thead>"; echo "</table>"; $asa = "SELECT * FROM vts_users WHERE deleted=0"; $qASA = mysqli_query($connasa,$asa); $Res = mysqli_num_rows($qASA); if($Res > 0){ while($dd = mysqli_fetch_array($qASA)){ $asaID = $dd['u_id']; $u_name = $dd['u_name']; $employee_id =$dd['employee_id']; $company =$dd['company']; $dealer =$dd['dealer']; $dept_id =$dd['dept_id']; $u_fname =$dd['u_fname']; $u_lname =$dd['u_lname']; $u_password =md5($dd['u_password']); $u_password2 =md5($dd['u_password2']); $usr_mobile =$dd['usr_mobile']; $email =$dd['email']; $ckID = "SELECT * FROM `pms_employee_data` WHERE `asa_id`='$asaID'"; $qID = mysqli_query($conn,$ckID); $qRow = mysqli_num_rows($qID); if($qRow > 0){ }else{ $sql = "INSERT INTO pms_employee_data( `id`, `asa_id`, `emp_id`, `employee_id`, `comp_id`, `branch_id`, `sub_group_id`, `division_id`, `department_id`, `unit_id`, `position`, `first_name`, `last_name`, `pass_word_a`, `pass_word_b`, `mobile_no`, `e-mail`) VALUES( '', '$asaID', '$u_name', '$employee_id', '$company', '$dealer', '0', '0', '$dept_id', '0', '0', '$u_fname', '$u_lname', '$u_password', '$u_password2', '$usr_mobile', '$email' )"; if ($conn->query($sql) === TRUE) { $addCount = $addCount + 1; } else { //echo "Error: " . $sql . "<br>" . $conn->error; } } } echo "<h5 class='text-center text-danger align-middle pt-5'>Imported Account: $addCount</h5>"; }else{ echo "<br><br><h4 class='text-center text-danger align-middle pt-5'> No data to import </h4>"; echo "<p class='display-5 text-center text-dark'> There is no data detected in ASA table. <br>If you think this is an error, please contact developer.<br><br> Thank you!s <br><br> </p>"; exit(); } } $conn->close(); ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings