File manager - Edit - /home/autoph/public_html/portal/includes/exam/pod_add_participants.php
Back
<html> <head> <title>THE AUTOHUB GROUP</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/screen_white.css"> <link rel="stylesheet" href="ajs/vendors/jQueryUI/jquery-ui.css"> <script src="ajs/vendors/jQueryUI/jquery-1.12.4.js"></script> <script src="ajs/vendors/jQueryUI/jquery-ui.js"></script> </head> <?php if (isset($_POST['delEmpRec'])){ $recID = $_POST['recID']; $addEmpID = $_POST['addEmpID']; echo "ID TO BE DELETED ".$addEmpID. "---".$recID; mysql_query("DELETE FROM `pod_training_invites` WHERE `id`='$recID' AND `employee_id`='$addEmpID'"); } if(isset($_POST['SaveRecord'])){ $dealName =$_POST['deptName']; $deptCode =$_POST['deptCode']; $dLine =$_POST['dLine']; $dNumber=$_POST['dNumber']; $dEmail=$_POST['dEmail']; $today = date("m/d/Y"); $diff = date_diff(date_create($dateOfBirth), date_create($today)); $newAge = $diff->format('%y'); $sql="INSERT INTO `departments` (`id`,`code`,`name`,`trunk_line`,`fax_number`,`email`,`date_created`) VALUES('','$deptCode','$dealName','$dLine','$dNumber', '$dEmail','$toDate')"; if(!mysql_query($sql)){ die('Error: ' . mysql_error()); }else{ echo "<div class='ContinueMSG'>"; echo " <h3 class='lightGradient' style='width:99%;font-family:Calibri Light;font-size:18px;font-weight:bold;padding-left:5px;padding-top:2px;'>NEW RECORD SAVED...</h3>"; echo "<div style='top:3px;left:95.5%;position:absolute;z-index:3;background:transparent'> <a href='main_new.php?view=102&sid=P1&sview=100&tab=0#id-0' > <center>X</center> </a> </div>"; echo " <br><br><h2 style='margin-top:2px;text-align:center;width:100%;font-family:Calibri Light;font-size:16px;font-weight:normal'>NEW DEPARTMENT CREATED...</h2> <p style='font-family:Calibri Light;font-size:14px;color:#0B610B;font-weight:bold;padding-top:0px'> <br><br> <center><a href='main_new.php?view=102&sid=P1&sview=100&tab=0#id-0' ><input type='button' class='button' value='CLOSE' style='width:80px;'></a></center> </a> </p>"; echo "</div>"; } } ?> <body> <center> <div style='width:98.5%;border:1px solid white;height:25px;text-align:left;padding-left:10px;padding-top:5px;font-family:Calibri;font-size:14px;color:#000;text-shadow:1px 1px 5px #fff' class='lightGradient'> SELECT EMPLOYEES </div> <div style='width:99.5%;border:1px solid #E6E6E6;height:88%;padding:0px;background:lightgray'> <table style='width:100%;border:1px solid white'> <tr style='background:white;border:1px solid white'> <th valign='top' style='border:1px solid white;border-right:1px solid gray;width:30%'> FILTER EMPLOYEES </th> <th valign='top' style='border:1px solid white;border-right:1px solid gray;width:45%'> LIST OF EMPLOYEES </td> <th valign='top' style='border:1px solid white;border-right:1px solid gray;width:25%'> INVITED EMPLOYEES </th> </tr> <tr style='background:white;border:1px solid white'> <td valign='top' style='border:1px solid white;border-right:1px solid gray;width:30%'> <div STYLE='height: 410px; width: 99.9%; font-size: 12px; overflow: auto;'> <form action='' method='GET'> <input type='hidden' name='type' value='<?php echo $_GET['type'];?>'> <input type='hidden' name='view' value='<?php echo $_GET['view'];?>'> <input type='hidden' name='action' value='<?php echo $_GET['action'];?>'> <input type='hidden' name='sid' value='<?php echo $_GET['sid'];?>'> <input type='hidden' name='sview' value='<?php echo $_GET['sview'];?>'> <input type='hidden' name='tab' value='<?php echo $_GET['tab'];?>'> <input type='hidden' name='xid' value='<?php echo $_GET['xid'];?>'> <input type='hidden' name='trnID' value='<?php echo $_GET['trnID'];?>'> <input type='hidden' name='id' value='<?php echo $_GET['id'];?>'> <h4 style='font-size:14px;color:blue;font-weight:normal;margin-bottom:10px'>SELECT COMPANY: </h4> <select name='c' class='textbox' style='width:80%'> <option><?php echo $_GET['c'];?></option> <?php $qCom=mysql_query("SELECT * FROM `company` WHERE `status`='1' ORDER BY `name` ASC"); while($row=mysql_fetch_array($qCom)){ echo "<option>".$row['name']."---".$row['code']."</option>"; } ?> </select> <input type='submit' name='FilterCom' value='Filter' style='height:25px;width:50px;border:1px solid lightgray;' class='lightGradient'> <h4 style='font-size:14px;color:blue;font-weight:normal;margin-bottom:10px;margin-top:10px;'>SELECT DEALERSHIP: </h4> <select name='d' class='textbox' style='width:80%'> <option><?php echo $_GET['d'];?></option> <?php $qCom=mysql_query("SELECT * FROM `dealers` WHERE `status`='1' ORDER BY `name` ASC"); while($row=mysql_fetch_array($qCom)){ echo "<option>".$row['name']."---".$row['dcode']."</option>"; } ?> </select> <input type='submit' name='FilterCom' value='Filter' style='height:25px;width:50px;border:1px solid lightgray;' class='lightGradient'> <h4 style='font-size:14px;color:blue;font-weight:normal;margin-bottom:10px;margin-top:10px;'>SELECT DEALERSHIP: </h4> <select name='u' class='textbox' style='width:80%'> <option><?php echo $_GET['u'];?></option> <?php $qCom=mysql_query("SELECT * FROM `departments` WHERE `status`='1' ORDER BY `name` ASC"); while($row=mysql_fetch_array($qCom)){ echo "<option>".$row['name']."---".$row['code']."</option>"; } ?> </select> <input type='submit' name='FilterCom' value='Filter' style='height:25px;width:50px;border:1px solid lightgray;' class='lightGradient'> </form> </div> </td> <td valign='top' style='border:1px solid white;border-right:1px solid gray;width:40%'> <div STYLE='height: 405px; width: 99.9%; font-size: 12px; overflow: auto;border:0px solid red;'> <?php $xID = $_GET['xid']; $getComp = $_GET['c']; $exComp =explode('---',$getComp); $getCompID = $exComp[1]; $getCompName = $exComp[0]; $getDeal = $_GET['d']; $exDeal =explode('---',$getDeal); $getDealID = $exDeal[1]; $getDealName = $exDeal[0]; $getDept = $_GET['u']; $exDept =explode('---',$getDept); $getDeptID = $exDept[1]; $getDeptName = $exDept[0]; if(!empty($getDeptID)){ $qEmp = mysql_query("SELECT * FROM `employee_list` WHERE `dept_code`='$getDeptID' AND `deal_code`='$getDealID' AND `ccom_code`='$getCompID' ORDER BY `last_name` ASC"); }else if(!empty($getDealID)){ $qEmp = mysql_query("SELECT * FROM `employee_list` WHERE `deal_code`='$getDealID' AND `ccom_code`='$getCompID' ORDER BY `last_name` ASC"); }else{ $qEmp = mysql_query("SELECT * FROM `employee_list` WHERE `ccom_code`='$getCompID' ORDER BY `last_name` ASC"); } echo "<table style='width:100%;height:100% border:1px solid gray; border-collapse:collapse;'>"; echo "<tr> <th class='Gradient' align='left' style='width:30%;background:#f5f5f5;border:1px solid lightgray;font-size:12px'>LAST NAME</th> <th class='Gradient' align='left' style='width:30%;background:#f5f5f5;border:1px solid lightgray;font-size:12px'>FIRST NAME</th> <th class='Gradient' align='left' style='width:25%;background:#f5f5f5;border:1px solid lightgray;font-size:12px'>POSITION</th> <th class='Gradient' align='left' style='width:5%;background:#f5f5f5;border:1px solid lightgray;font-size:12px'></th>"; echo "</tr>"; while($row = mysql_fetch_array($qEmp)){ $count = $count + 1; $empID = $row['employee_id']; $checkIfExist = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `pod_training_invites` WHERE `employee_id`='$empID' AND `schedule_id`='$xID'"),0); if($checkIfExist > 0){ }else{ echo "<tr>"; echo "<td class='tableList'>" . $row['last_name'] . "</td>"; echo "<td class='tableList'>" . $row['first_name'] . "</td>"; echo "<td class='tableList'>" . $row['position'] . "</td>"; echo "<td class='tableList'>"; echo "<form action='' method='POST'>"; echo "<input type='hidden' name='recID' value='".$row['id']."'>"; echo "<input type='hidden' name='addEmpID' value='".$row['employee_id']."'>"; echo "<input type='hidden' name='comCode' value='".$row['ccom_code']."'>"; echo "<input type='hidden' name='dealCode' value='".$row['deal_code']."'>"; echo "<input type='hidden' name='deptCode' value='".$row['dept_code']."'>"; echo "<input type='hidden' name='schedID' value='".$_GET['id']."'>"; echo "<input type='submit' name='addEmpRec' value='>>' style='width:20px;height:20px;border:0px solid lightblue;font-size:10px;font-color:blue;padding-top:1px;border-radius:0px 20px 20px 0px'>"; echo "</form>"; echo "</td>"; echo "</tr>"; } } echo "</table>"; ?> </div> </td> <td valign='top' style='border:1px solid white;border-right:1px solid gray;width:25%'> <?php if(isset($_POST['addEmpRec'])){ $recID = $_POST['recID']; $addEmpID = $_POST['addEmpID']; $comCode = $_POST['comCode']; $dealCode = $_POST['dealCode']; $deptCode = $_POST['deptCode']; $schedID = $_POST['schedID']; $trainingID = $_GET['trnID']; // echo "Data: ".$schedID; $sql="INSERT INTO `pod_training_invites` (`id`,`comp_code`,`deal_code`,`dept_code`,`schedule_id`,`training_id`,`employee_id`,`date_invite`,`date`,`time`,`created_by`) VALUES('','$comCode','$dealCode','$deptCode','$schedID','$trainingID','$addEmpID','$toDate','$toDate','$currentTime','$user')"; if(!mysql_query($sql)){ die('Error: ' . mysql_error()); } } ?> <div STYLE='height: 405px; width: 99.9%; font-size: 12px; overflow: auto;border:0px solid red;'> <?php $getComp = $_GET['c']; $exComp =explode('---',$getComp); $getCompID = $exComp[1]; $getCompName = $exComp[0]; $getDeal = $_GET['d']; $exDeal =explode('---',$getDeal); $getDealID = $exDeal[1]; $getDealName = $exDeal[0]; $getDept = $_GET['u']; $exDept =explode('---',$getDept); $getDeptID = $exDept[1]; $getDeptName = $exDept[0]; $xid = $_GET['xid']; $qEmp = mysql_query("SELECT * FROM `pod_training_invites` WHERE `schedule_id`='$xid' ORDER BY `id` ASC"); echo "<table style='width:100%;height:100% border:1px solid gray; border-collapse:collapse;'>"; echo "<tr> <th class='Gradient' align='left' style='width:30%;background:#f5f5f5;border:1px solid lightgray;font-size:12px'>LAST NAME</th> <th class='Gradient' align='left' style='width:30%;background:#f5f5f5;border:1px solid lightgray;font-size:12px'>FIRST NAME</th> <th class='Gradient' align='left' style='width:5%;background:#f5f5f5;border:1px solid lightgray;font-size:12px'></th>"; echo "</tr>"; while($iRow = mysql_fetch_array($qEmp)){ $count = $count + 1; $empID = $iRow['employee_id']; $fname = mysql_result(mysql_query("SELECT `first_name` FROM `employee_list` WHERE `employee_id`='$empID'"),0); $lname = mysql_result(mysql_query("SELECT `last_name` FROM `employee_list` WHERE `employee_id`='$empID'"),0); $position = mysql_result(mysql_query("SELECT `position` FROM `employee_list` WHERE `employee_id`='$empID'"),0); echo "<tr>"; echo "<td class='tableList' style='font-size:11px;'>"; echo strtoupper($lname); echo "</td>"; echo "<td class='tableList' style='font-size:11px;'>"; echo strtoupper($fname); echo"</td>"; echo "<td class='tableList' style='font-size:11px;'>"; echo "<form action='' method='POST'>"; echo "<input type='hidden' name='recID' value='".$iRow['id']."'>"; echo "<input type='hidden' name='addEmpID' value='".$iRow['employee_id']."'>"; echo "<input type='hidden' name='comCode' value='".$iRow['ccom_code']."'>"; echo "<input type='hidden' name='dealCode' value='".$iRow['deal_code']."'>"; echo "<input type='hidden' name='deptCode' value='".$iRow['dept_code']."'>"; echo "<input type='hidden' name='schedID' value='".$_GET['id']."'>"; echo "<input type='submit' name='delEmpRec' value='<<' style='width:20px;height:20px;border:0px solid red;font-size:10px;font-color:blue;padding-top:1px;border-radius:20px 0px 0px 20px'>"; echo "</form>"; echo "</td>"; echo "</tr>"; } echo "</table>"; ?> </div> </td> </tr> </table> <!--<div align='right' class="form-group" style='padding:10px'> <input type='submit' class='submit' name='SaveRecord' value='Save Record'> <input type='reset' class='submit' name='Clear' value='Clear'> <a href='main_new.php?view=104&sid=SCH&sview=101&tab=3&#id-0'><input type='button' class='submit' name='Exit' value='Exit'></a> </div> --> </div> </center> </body> </html>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings