}
	</style>

</head>
<body>
	<div class="container">
		<div class="row">

			<div class="col-lg-12"><h2 id="pageheader">Course Update</h2></div>
		</div>
		<ul class="nav nav-pills">
		  <li role="presentation" class="active" onclick="back()"><a href="#">Back</a></li>
		</ul>
		<?php 
include "phpController/courseOutlineControl.php";
$obj = new courseOutlineControl();
if (isset($_REQUEST['upid'])) {
    $scip = $_REQUEST['upid'];
    $detail = $obj->getCourseById($scip);
    $sched = $obj->showTable($scip);
    echo "<center>";
    echo "<br>";
    echo "<div><div class='headers'>COURSE ID</div><input type='text' length='30' name='cid' id='cid' value='{$detail['courseId']}'></div>";
    echo "<div><div class='headers'>COURSE NAME</div><input type='text' id='cna' name='cna' value='{$detail['courseTitle']}'></div>";
    echo "<div><div class='headers'>COURSE DEPARTMENT</div><input type='text' id='cdep' name='cdep' value={$detail['courseDepartment']}></div>";
    echo "<div><div class='headers'>COURSE OBJECTIVE</div><textarea class='ckeditor' col='10' row='25' id='cobj' name='cobj'>{$detail['courseObjectives']}</textarea></div>";
    echo "<div><div class='headers'>COURSE DESCRIPTION</div><textarea class='ckeditor' col='10' row='25' id='cdes' name='cdes'>{$detail['courseDescription']}</textarea></div>";
    echo "<div><div class='headers'>LEARNING GOALS</div><textarea class='ckeditor' col='10' row='25' id='goals' name='goals'>{$detail['learninggoals']}</textarea></div>";
    echo "<div class='headers' id='scheduler' name='scheduler'> COURSE SCHEDULER\n\t\t\t<table id='schedule' name='schedule' border='1' width='50%' align='center'>";
    echo "<div id='schedule_header' name='schedule_header'> <thead id='table_headers' name='table_headers' width='50%'>";
    echo "<th><b>Weeks</b></th>";
            if (!$result) {
                echo '{"result":0,"message":"Failed to update Course Outline"}';
                return;
            } else {
                echo '{"result":1,"message":"Updated Course Outline Successfully"}';
                return;
            }
        }
        echo '{"result":0,"message":"No CourseID captured"}';
    }
}
/**
 * Creates an object of courseOutlineControl class
 * Object will be used to call its functions
 */
$outlineController = new courseOutlineControl();
/**
 * Checks whether a command was set
 * It will run the specific methods if there was a command sent to it
 *
 */
if (isset($_REQUEST['cmd'])) {
    $cmd = $_REQUEST['cmd'];
    switch ($cmd) {
        case 1:
            $outlineController->showCourseToUpdate();
            break;
        case 2:
            $outlineController->doUpdateCourse();
            break;
        case 3: