コード例 #1
0
?>

<?php 
// added by robert erickson
include 'bin/functions.php';
include 'bin/qwery.php';
//set values (either default or from database
$DomainsChecked = array();
$MethodsChecked = array();
//UVMNetID is set in functions
if (getOurID($UVMNetID) > 0) {
    // we have them so it is an update
    //create and run query to pull out their record
    $sql = "SELECT pkMemberId, fldFname, fldMname, fldLname, fldEmail, fldUVMId, fldhomepage, fldFaculty, fldStaff, fldAdjunct, fldDepartment1, fldPostion1, fldOverview, fldOtherMethod, fldOtherApplication, fldConfirmed, fldApproved, fldActive, fldDateEntered ";
    $sql .= "FROM tblCXSMember ";
    $sql .= "WHERE pkMemberId=" . getOurID($UVMNetID);
    $rst = mysql_query($sql, $srvDB_Connection) or die("<p>Update, selecting member Query failed with error message: \"" . mysql_error() . '"');
    list($pkMemberId, $fldFname, $fldMname, $fldLname, $fldEmail, $fldUVMId, $fldhomepage, $fldFaculty, $fldStaff, $fldAdjunct, $fldDepartment1, $fldPostion1, $fldOverview, $fldOtherMethod, $fldOtherApplication, $fldConfirmed, $fldApproved, $fldActive, $fldDateEntered) = mysql_fetch_row($rst);
    if ($fldActive == "Y") {
        $message1 = "Update";
    } else {
        $message1 = "Add";
        //they are in our system from a project or course
    }
    $sql = "select fldPhoto from tblMemberPhoto where fkMemberId={$pkMemberId}";
    $rst = mysql_query($sql, $srvDB_Connection);
    list($fldPhoto) = mysql_fetch_row($rst);
    for ($i = 1; $i <= 11; $i++) {
        $MethodsChecked[$i] = checkForRecord(0, $pkMemberId, $i);
    }
    for ($i = 1; $i <= 8; $i++) {
コード例 #2
0
$sql .= " ORDER BY fldTitle";

INCLUDE("bin/qwery.php");

$rst = mysql_query($sql,$srvDB_Connection) or die ("<p>Course Select Query: <p>$sql<p> failed with error message: \"" . mysql_error () . '"');

//keri's addition - give's message that user has no courses
if ( mysql_num_rows($rst)<1 ) {
   echo "<p>You do not have any courses to edit. Please <a href='https://www.uvm.edu/~cmplxsys/forms/addcourse.php'>add a course</a>.</p>";
}
else {
  While(list($pkCourseID,$fldTitle)=mysql_fetch_row($rst)){
		$a++; 
		if ($a % 2 != 0){
			$style=" style='background-color: #ffffcc; width: 100%'";
		} else {
			$style="";
		}
	 	print "<p$style>| <a href='https://www.uvm.edu/~cmplxsys/forms/addcourse.php?id=$pkCourseID'>Edit</a> |";
		print "<span style='color: red'> | <a href='https://www.uvm.edu/~cmplxsys/?Page=forms/dbDeleteCourse.php&id=$pkCourseID&SM=members/_membersmenu.html&mid=" . getOurID($UVMNetID) . "' style='color: red'>Delete</a> | </span>";
		print "<a href='http://www.uvm.edu/~cmplxsys/?Page=courses/coursedescrip.php&SM=courses/_coursesmenu.html&courseId=$pkCourseID'>" . stripslashes($fldTitle) . "</a></p>";
  }
   //Close the connection
  mysql_close($srvDB_Connection);
}

?>


<?php 
include 'fakepageCSC_bottom.php';