if (checkBoxArr.length == 0) { alert("No Users Selected"); return false; } var arv = checkBoxArr.toString(); document.getElementById('selectcheck').value=arv; return confirm("Are You Sure ?"); } </script> <?php $jobtype = new jobtype(); if ($_GET['wtdo'] == 'add_jobtype' && $_POST['jobtype'] != "") { $add = $jobtype->add_jobtype($_POST['jobtype']); } if ($_GET['wtdo'] == 'edit_jobtype' && $_POST['jobtype'] != "") { $add = $jobtype->edit_jobtype($_POST['jobtype'], $_GET['id']); } ?> <table align="left" width="100%" style="font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#FFFFFF; font-size:16px;"> <tr><td colspan="6" align="center" valign="middle"> <table align="center" > <tr> <td><img src="images/listmain.png" /></td> <td style="color:#003399; font-family:Arial, Helvetica, sans-serif; font-weight:bold; font-size:18px;" align="center" valign="middle"> List of Job Types</td> </tr>
<?php include "header.php"; require_once "../common/class/jobtype.class.php"; $jobtype = new jobtype($_GET['type']); $name = $jobtype->getbyid($_GET['id']); ?> <table align="center" width="100%"> <tr align="center"> <td align="center" bgcolor="#66CCFF">Edit Job Type</td> </tr> </table> <form name="frmaddjobtype" action="jobtype_management.php?wtdo=edit_jobtype&id=<?php echo $_GET['id']; ?> &type=<?php echo $_GET['type']; ?> " method="post" onSubmit="if(validateForm(this)) return true; else return false;"> <div class="formRow" align="center"> <span class="fieldName"><label for="tags"><strong>Name</strong></label></span> <span class="fieldVal"><input type="text" id="jobtype" name="jobtype" value="<?php echo $name; ?> " class="vldnoblank textWidth" /> <span class="checkStatus"></span> </span> </div>
<?php include "header.php"; require_once "../common/class/jobtype.class.php"; $delete_jobtype = new jobtype(); if ($_GET['action'] == "delete" && $_GET['id'] == "") { $midarray = explode(",", $_POST['selectcheck']); foreach ($midarray as $w) { $delete_jobtype->deletejobtype($w, $table); } echo "<script>alert('Job Type Deleted ...'); window.location='jobtype_management.php?type=" . $_GET['type'] . "';</script>"; } else { $delete_jobtype->deletejobtype($_GET['id'], $table); echo "<script>alert('Job Type Deleted ...'); window.location='jobtype_management.php?type=" . $_GET['type'] . "';</script>"; } ?>