-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheditnote.php
More file actions
182 lines (164 loc) · 5.79 KB
/
Copy patheditnote.php
File metadata and controls
182 lines (164 loc) · 5.79 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>编辑笔记</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/nav.css" />
<link rel="stylesheet" type="text/css" href="css/simditor.css" />
<link rel="stylesheet" type="text/css" href="css/editnote.css" />
<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/module.js" type="text/javascript" charset="utf-8"></script>
<script src="js/hotkeys.js" type="text/javascript" charset="utf-8"></script>
<script src="js/uploader.js" type="text/javascript" charset="utf-8"></script>
<script src="js/simditor.js" type="text/javascript" charset="utf-8"></script>
<!--<script src="js/simditor-autosave.js" type="text/javascript" charset="utf-8"></script>-->
<script src="js/simditor-mark.js" type="text/javascript" charset="utf-8"></script>
<script src="js/simditor-fullscreen.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="css/simditor-fullscreen.css"/>
<link href="img/logo.ico" rel="shortcut icon" />
</head>
<body>
<?php require 'common.php';?>
<!--导航条-->
<?php require 'nav.php'; ?>
<!--头像和介绍-->
<!--非导航部分-->
<div id="container">
<div id="intro">
<div id="touxiang">
</div>
<?php
connect_mydb();
select_mydb();
$username=$_COOKIE['username'];
$sql="select userimg from userinformation where username = '$username'";
$result=fetch_array($sql);
$result=$result['userimg'];
echo '<script>document.getElementById("touxiang").style.backgroundImage="'.$result.'";
</script>';
mysqli_close($mydb);
?>
<div id="name">
<p class="name">
<?php echo $_COOKIE['username']; ?>
</p>
</div>
<div id="motto">
<p class="motto">
<?php
connect_mydb();
select_mydb();
global $username;
$username=$_COOKIE['username'];
$row=mysqli_query($mydb,"select motto from userinformation where username ='$username'");
$row=mysqli_fetch_array($row,MYSQLI_ASSOC);
$motto=$row['motto'];
echo $motto;
mysqli_close($mydb);
?>
</p>
</div>
</div>
<!--非标头部分-->
<div id="non-intro">
<!--工具栏部分-->
<div id="toolbox">
<div id="toolbar">
<ul>
<a href="userHomepage.php">
<li><span class="glyphicon glyphicon-user"></span> 我的主页  <span class="glyphicon glyphicon-chevron-right"></span></li>
</a>
<a href="updatedata.php">
<li><span class="glyphicon glyphicon-align-left"></span> 我的资料  <span class="glyphicon glyphicon-chevron-right"></span></li>
</a>
<a href="schedule.php">
<li><span class="glyphicon glyphicon-calendar"></span> 我的日程  <span class="glyphicon glyphicon-chevron-right"></span></li>
</a>
<a href="memorandum.php">
<li><span class="glyphicon glyphicon-list-alt"></span> 我的备忘  <span class="glyphicon glyphicon-chevron-right"></span></li>
</a>
<a href="shownote.php">
<li><span class="glyphicon glyphicon glyphicon-book"></span> 我的笔记  <span class="glyphicon glyphicon-chevron-right"></span></li>
</a>
</ul>
</div>
</div>
<!--非工具栏-->
<div id="content">
<div id="back">
<a href="shownote.php"><button class="btn btn-info"><span class="glyphicon glyphicon-chevron-left"></span> 返回</button></a>
</div>
<form action="actionnote.php?action=insert" method="post" id="form">
<div id="edittitle">
<input type="text" class="form-control" id="inputtitle" name="title" placeholder="输入笔记标题" style="border-radius: 0px;"/>
</div>
<div id="edit">
<textarea id="editor" name="content" placeholder="输入你的笔记" ></textarea>
</div>
<input type="hidden" id="content" />
<div id="save">
<button class="btn btn-info" type="button" onclick="check()"><span class="glyphicon glyphicon-floppy-disk"></span> 保存笔记</button>
</div>
</form>
</div>
<script type="text/javascript">
function check(){
if(document.getElementById("inputtitle").value==''){
alert("标题不能为空哦!");
return false;
}
else if(document.getElementById("editor").value==""){
alert("内容不能为空哦!");
return false;
}
else{
form.submit();
}
}
</script>
</div>
</div>
<script type="text/javascript">
var editer = new Simditor({
textarea: $('#editor'),
toolbar: [
'title',
'bold',
'italic',
'mark',
'underline',
'strikethrough',
'fontScale',
'color',
'ol',
'ul',
'blockquote',
'code',
'table',
'link',
'image',
'hr',
'indent',
'outdent',
'alignment',
'fullscreen',
],
/*autosavePath: 'autosave/',*/
/*upload : {
url : 'uploadimg.php', //文件上传的接口地址
params: null, //键值对,指定文件上传接口的额外参数,上传的时候随文件一起提交
fileKey: 'file', //服务器端获取文件数据的参数名
connectionCount: 3,
leaveConfirm: '正在上传文件'
} ,*/
pasteImage:true,
upload:true
});
</script>
<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>