| Current Path : /var/www/html/mmishra/iws8/html/gian/ |
| Current File : /var/www/html/mmishra/iws8/html/gian/approvedCourses.inc |
<div id="main">
<div class="content-main" style="width: 72%;margin: auto;margin-top: 30px;margin-bottom: 50px;">
<div class="cm-wrapper" style="width:100%;padding-top: 10px;padding-bottom: 20px;">
<h3>Approved Courses</h3>
<?php
$myGIAN = new iGIAN();
$myGIAN->rowID = $_REQUEST['rowID'];
$submit = $_POST['submit'];
$mm = 'readonly';
$del = '';
$edit = 0;
$delete = 0;
if (!$myGIAN->rowID) $mm = '';
if ($submit == 'ADD') {
$myGIAN->rowID = 0;
$mm = '';
} else if ($submit == 'EDIT') {
$mm = '';
$edit = 1;
} else if ($submit == 'SAVE') {
$myGIAN->courseID = $_POST['courseID'];
$myGIAN->courseTitle = $_POST['courseTitle'];
$myGIAN->guestFaculty = $_POST['guestFaculty'];
$myGIAN->guestProfile = $_POST['guestProfile'];
$myGIAN->guestPhoto = $_POST['guestPhoto'];
$myGIAN->hostFaculty = $_POST['hostFaculty'];
$myGIAN->hostEmail = $_POST['hostEmail'];
$myGIAN->hostPhone = $_POST['hostPhone'];
$myGIAN->hostProfile = $_POST['hostProfile'];
$myGIAN->hostPhoto = $_POST['hostPhoto'];
$myGIAN->loginID = $user;
//save ward record
$myGIAN->saveCourse($myGIAN->rowID);
} else if ($submit == 'DELETE') {
$del = "Are you sure?
[ <a href='?pg=$pg&delete=1&rowID=$myGIAN->rowID'>Yes</a> | <a href='?pg=$pg&rowID=$myGIAN->rowID'>No</a> ]";
$mm = '';
$edit = 1;
}
if ($_GET['delete'] == 1) {
//delete timing record
$myGIAN->deleteCourse($myGIAN->rowID);
}
//get timing record
if ($myGIAN->rowID) $myGIAN->getCourse($myGIAN->rowID);
echo "<table width='100%' border='1'><tr valign='top'><td width='70%'>
<table width='90%' border='1' style='border-collapse: collapse; background: url(uploads/$myGIAN->photograph; background-size: 40% 100%; background-repeat: no-repeat; background-position: right bottom, left top;'>
<tr><td width='15%'>Course ID</td><td width='85%'><input type='text' name='courseID' size='50' value='$myGIAN->courseID' $mm></td></tr>
<tr><td>Course Title</td><td><input type='text' name='courseTitle' size='50' value='$myGIAN->courseTitle' $mm></td></tr>
<tr><td>Guest Faculty</td><td><input type='text' name='guestFaculty' size='50' value='$myGIAN->guestFaculty' $mm></td></tr>
<tr><td>Guest Profile</td><td><textarea name='guestProfile' rows='5' cols='50'>$myGIAN->guestProfile</textarea></td></tr>
<tr><td>Guest Photo</td><td><input type='file' name='userfile1' size='50' value='$myGIAN->guestPhoto' $mm></td></tr>
<tr><td>Host Faculty</td><td><input type='text' name='hostFaculty' size='50' value='$myGIAN->hostFaculty' $mm></td></tr>
<tr><td>Host Email</td><td><input type='text' name='hostEmail' size='250' value='$myGIAN->hostEmail' $mm></td></tr>
<tr><td>Host Phone</td><td><input type='text' name='hostPhone' size='50' value='$myGIAN->hostPhone' $mm></td></tr>
<tr><td>Host Profile</td><td><textarea name='hostProfile' rows='5' cols='50'>$myGIAN->hostProfile</textarea></td></tr>
<tr><td>Host Photo</td><td><input type='file' name='userfile2' size='50' value='$myGIAN->hostPhoto' $mm></td></tr>
<tr><th>";
if ($myGIAN->rowID) {
echo "<input type='submit' name='submit' value='ADD'>";
} else {
echo "<input type='reset' name='reset' value='CLEAR'>";
}
echo "</th><th>";
if ($myGIAN->rowID) {
echo "Dated: $myGIAN->dateCreation ";
if ($edit) {
echo "<input type='submit' name='submit' value='SAVE'> <input type='submit' name='submit' value='DELETE'>";
echo $del;
} else {
echo "<input type='submit' name='submit' value='EDIT'>";
}
echo " Updated: $myGIAN->dateUpdation";
} else {
echo "<input type='submit' name='submit' value='SAVE'>";
}
echo "<input type='hidden' name='rowID' value='$myGIAN->rowID'></th></tr>";
?>
</table></td><td>
<?php
echo $myGIAN->listCourses($pg);
//link to various activities related to ward
//echo $myGIAN->relatedLinks();
//other related documents
//echo $myGIAN->docsWard();
?>
</td></tr></table>
</div>
</div>
</div>