Example #1
0
			Instructor: <?php 
    echo $retrievedCourse['instructor'];
    ?>
			</p>
			</header>
			<main>
				<div class='leftDiv'>
				<div class='divHead'>Uploaders</div>
			<?php 
    //show a list of accounts that can upload
    //form to add an account to the list
    //x button to remove an account from the list
    $uploaders = Database::getUploadersForCourse($course);
    foreach ($uploaders as $user) {
        $id = $user['id'];
        $data = Database::getUserData($id);
        if (!isset($data['username'])) {
            continue;
        }
        echo "<div>{$data['username']} - <a title='Remove uploader' onclick='return removeNote( {$id} );' href='#'>X</a></div>";
    }
    ?>
				</div>
				<div class='rightDiv'>
					<div class='divHead'>Add Uploader</div>
					<form method='POST' action='form.php?uploader=yes'>
						NetID: <br><input type='text' name='user' /><br>
						<input type='hidden' name='course' value='<?php 
    echo "{$course}";
    ?>
'/>