-
Notifications
You must be signed in to change notification settings - Fork 3
/
frmUploadPhoto.php
executable file
·82 lines (77 loc) · 2.7 KB
/
frmUploadPhoto.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/* The file of upload pic form
*
* @version:@(#)navUploadPic.php
* @author: Runwei Qiang 2011/6/12
*/
/*require_once 'output_fns.php'; # This will be removed in the future and beautify the html page
require_once 'LocalSettings.php';
*/
$type = $_REQUEST['type'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/fancyboxStyle.css" rel="stylesheet" type="text/css"/>
<link href="css/frmUploadPhoto.css" rel="stylesheet" type="text/css"/>
<script src="lib/jquery.js" type="text/javascript"></script>
<!--<link type="text/css" href="frmCourseUploadAssignment.css">-->
<title>上传头像</title>
<script type="text/javascript">
$().ready(function () {
$('input[name=submitCancel]').bind('click',function(){
parent.$.fancybox.close(); //关闭FancyBox
});
}
);
</script>
</head>
<body>
<?php
if($type == 'user'){ # upload user photo
/*do_html_header('上传用户头像');
display_upload_pic_form($interface_path."upload_pic.php?act=upload");
do_html_footer();*/
?>
<body class="fancyboxWrapper">
<form name="photo" enctype="multipart/form-data"
method="post" action="includes/interface/upload_pic.php?act=upload">
<table class="designedTable">
<tr>
<td><label for="file">File:</label></td>
<td><input type="file" name="file" id="file" /></td>
</tr>
</table>
<div class="buttonWrapper">
<input id='userUploadPhoto' type='submit' name="submit" value='' class="acceptBtn"/>
<input id="cancel" type="button" name="submitCancel" value='' class="cancelBtn"/>
</div>
</form>
</body>
<?php
} else { # upload course photo
$course_id = $_REQUEST['course_id'];
/*do_html_header('上传课程头像');
display_upload_pic_form($interface_path."upload_course_pic.php?act=upload&course_id=$course_id");
do_html_footer();*/
?>
<body class="fancyboxWrapper">
<form name="photo" enctype="multipart/form-data"
method="post" action="includes/interface/upload_course_pic.php?act=upload&course_id=<?php echo $course_id;?>">
<table class="designedTable">
<tr>
<td><label for="file">File:</label></td>
<td><input type="file" name="file" id="file" /></td>
</tr>
</table>
<div class="buttonWrapper">
<input id='courseUploadPhoto' type='submit' name="submit" value='' class="acceptBtn"/>
<input id="cancel" type="button" name="submitCancel" value='' class="cancelBtn"/>
</div>
</form>
</body>
<?php
}
?>
</body></html>