You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
2.6 KiB

<?php
header('Content-Type: text/html; charset=utf-8');
?>
<?php
session_start();
?>
<html>
<head>
<title>学生管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
body {
background-image: url(images/%E8%83%8C%E6%99%AF.gif);
background-size: cover;
background-repeat: no-repeat;
font-family: "Adobe 楷体 Std R";
color: #FFF;
font-size: 40px;
}
</style>
</head>
<body >
<?php
@$XM = $_SESSION['XM'];
@$XB = $_SESSION['XB'];
@$CSSJ = $_SESSION['CSSJ'];
@$KCS = $_SESSION['KCS'];
@$StuName = $_SESSION['StuName'];
?>
<form method="post" action="studentAction.php" enctype="multipart/form-data">
<table>
<tr>
<td><table>
<tr>
<td>姓名:</td>
<td><input type="text" name="xm" value="<?php echo @$XM;?>"/></td>
</tr>
<tr>
<td>性别:</td>
<?php
if(@$XB == 1) {
?>
<td>
<input type="radio" name="xb" value="1" checked="checked">男
<input type="radio" name="xb" value="0">女
</td>
<?php
}else {
?>
<td>
<input type="radio" name="xb" value="1">男
<input type="radio" name="xb" value="0" checked="checked">女
</td>
<?php
}
?>
</tr>
<tr>
<td>出生年月:</td>
<td><input type="text" name="cssj" value="<?php echo @$CSSJ;?>"/></td>
</tr>
<tr>
<td>照片:</td><td><input name="photo" type="file"></td>
</tr>
<tr>
<td></td>
<td>
<?php
echo "<img src='showpicture.php?studentname=$StuName&time=".time()."' width=200 height=300 />";
?>
</td>
</tr>
<tr>
<td></td>
<td>
<input name="btn" type="submit" value="录入">
<input name="btn" type="submit" value="删除">
<input name="btn" type="submit" value="更新">
<input name="btn" type="submit" value="查询">
</td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td>已修课程<input type="text" name="kcs" size="6" value="
<?php echo @$KCS;?>" disabled/></td>
</tr>
<tr>
<td align="left">
<?php
include "fun.php";
$cj_sql = "call CJ_PROC('$StuName')";
$result = $db->query(iconv('UTF-8', 'UTF-8', $cj_sql));
$xmcj_sql = "select * from XMCJ_VIEW";
$cj_rs = $db->query($xmcj_sql);
echo "<table border=1>";
echo "<tr bgcolor=#CC0066>";
echo "<td>课程名</td><td align=center>成绩</td></tr>";
while(list($KCM, $CJ) = $cj_rs->fetch(PDO::FETCH_NUM)) {
$KC = iconv('UTF-8', 'UTF-8', $KCM);
echo "<tr><td>$KC&nbsp;</td><td align=center>$CJ</td></tr>";
}
echo "</table>";
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>