示例#1
0
<?php

$message = '';
$id = intval($_GET['id']);
$name = trim($_GET['name']);
//we use $_GET because data input came from the URL
if (isset($_GET['id'])) {
    $id = trim($id);
    $deleteWorking = find_working($id);
    if ($deleteWorking) {
        delete_working(0, $id);
        delete_photo(0, $id);
        $message = "<div class = 'alert alert-success' style = 'width: 350px;'>{$name} has been successfully deleted.</div>";
        echo "<script>";
        //go back to viewMed page after 3 seconds.
        echo "setTimeout(function(){ document.location = '?p=viewWorking'; }, 2000);";
        echo "</script>";
    } else {
        $message = "<div class = 'alert alert-warning' style = 'width: 350px;'>Specified working scholar cannot be found</div>";
    }
}
?>
<html>
	<body>
		<div class="container">
			<div class="row">
				<div class="col-lg-4">
					<?php 
echo $message;
?>
				</div>
示例#2
0
<?php

$get_working = find_working($_SESSION['id']);
?>
<html>
<body>
	<div class="container">
		<div class="row">
			<div class="col-md-4"></div>
			<div class="col-md-4">
				<img src="photo.php?id=<?php 
echo htmlentities($_SESSION['id']);
?>
" height="250" width="250" style="border-radius:10em;border:2px solid blue;margin:15px 55px 15px;">
			</div>
			<div class="col-md-4"></div>
		</div><!-- end row of profile picture-->
		
		<div class="row">
			<div class="col-md-4"></div>
			<div class="col-md-4">
					<?php 
if ($get_working['WORKINGSTAT'] == 1) {
    ?>
						<div class="alert alert-success text-center" >ACTIVE</div>
					<?php 
} else {
    ?>
						<div class="alert alert-warning text-center" >INACTIVE</div>
					<?php 
}
示例#3
0
            $user = $_SESSION['user'];
            update_photo($name, $type, $bytes, $user, $id);
            update_working($fName, $mName, $lName, $course, $yr, $lab, $time, $days, $id);
            update_account($pass, $id);
            $message = "<div class = 'alert alert-success' style = 'width: 350px;'>{$fName} {$mName} {$lName} record has been successfully updated.</div>";
            echo "<script>";
            //go back to viewMed page after 3 seconds.
            echo "setTimeout(function(){ document.location = '?p=viewWorking'; }, 2000);";
            echo "</script>";
        } else {
            $message = "<div class = 'alert alert-warning' style = 'width: 350px;'>Invalid File.</div>";
        }
    }
} else {
    //if not submitted we retrieve the data from the database
    $workingFind = find_working($id);
    if ($workingFind) {
        $fName = $workingFind['WORKINGFNAME'];
        $mName = $workingFind['WORKINGMNAME'];
        $lName = $workingFind['WORKINGLNAME'];
        $course = $workingFind['WORKINGCOURSE'];
        $yr = $workingFind['WORKINGYR'];
        $lab = $workingFind['ASSIGNEDLAB'];
        $time = $workingFind['TIME'];
        $days = $workingFind['DAYS'];
        $get_pass = get_pass($id);
        $pass = $get_pass['PASSWORD'];
    } else {
        $message = '<div class="alert alert-warning">The specified working student record cannot be found.</div>';
    }
}
<?php

$id = intval($_GET['id']);
$get_info = get_photo($id);
$admin = find_admin($id);
$working = find_working($id);
$student = find_student($id);
?>
<html>
	<style>
		.box{max-width:330px;}
	</style>
	<body>
		<div class="container">
			<div class="row">
					 <div class="col-md-6">
						 <h3>Profile</h3>
						 <h4>
							<?php 
echo htmlentities($working['WORKINGLNAME']) . ' , ' . htmlentities($working['WORKINGFNAME']) . ' ' . htmlentities($working['WORKINGMNAME']);
?>
						 </h4>
							<img src="photo.php?id=<?php 
echo htmlentities($id);
?>
" height="300" width="300" style="border:2px black solid;padding:10px 10px;" />
					 </div>
					 <div class="col-md-6"></div>
			</div>
			<div class="row">
					 <div class="box col-md-12 text-center">