public function createCourseOptionsSelected($selected = null) { //if(self::$instResultSet==null){ $getAllCoursesSql = "select * from iseries_courses"; $resultSet = mysql_query($getAllCoursesSql) or die('Unable to retrieve instructor list'); self::$courseResultSet = $resultSet; //} $resultSet = self::$courseResultSet; $courseOptions .= "<option></option>"; while ($row = mysql_fetch_array($resultSet, MYSQL_NUM)) { $courseOptions .= "<option "; $courseOptions .= "name="; $courseOptions .= $row[1] . $row[2] . $row[3]; $courseOptions .= " value=" . $row[0]; if ($selected == $row[0]) { $courseOptions .= " selected=selected"; } $courseOptions .= ">"; $name = $row[1] . $row[2] . $row[3] . "-" . $row[4]; $courseOptions .= $name; $courseOptions .= "</option>"; } return $courseOptions; }
?> /><br /> <label><input type="checkbox" name="data[course][is_core]" <?php echo $courseIsCore; ?> /> Is Core Course</label><br /> Instructors who teach/taught this course<br /> <div> <?php include_once 'functions.php'; $iseries = new ISeries(); $iseries->createInstOptions(); $options = $iseries->getInstOptions(); ?> <script type="text/javascript"> function addInstructor(tableID) { var table = document.getElementById(tableID); var rowCount = table.rows.length; var row = table.insertRow(rowCount); rowNum = rowCount; var cell1 = row.insertCell(0); var element1 = document.createElement("input"); element1.type = "checkbox"; cell1.appendChild(element1);
?> </textarea><br /> Instructor Image Link<br /><input type="text" name="data[inst][image_link]" <?php echo $instImageLink; ?> /><br /> The instructor teaches/taught the following courses: <br /> <div> <?php include_once 'functions.php'; $iseries = new ISeries(); $iseries->createCourseOptions(); $options = $iseries->getCourseOptions(); ?> <script type="text/javascript"> function addCourse(tableID) { var table = document.getElementById(tableID); var rowCount = table.rows.length; var row = table.insertRow(rowCount); rowNum = rowCount; var cell1 = row.insertCell(0); var element1 = document.createElement("input"); element1.type = "checkbox"; cell1.appendChild(element1);