This repository was archived by the owner on Dec 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclub-add.html
148 lines (138 loc) · 6.54 KB
/
club-add.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Add Post</title>
<script src="/framework/ckeditor/ckeditor.js"></script>
<link rel="stylesheet" href="/framework/googlefont/languages.css">
<link href="/framework/js/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="/framework/sam/single-club.css">
<script src="/framework/js/jq.js"></script>
<script src="/framework/js/bootstrap.min.js"></script>
</head>
<body>
<div id="SITE_HEADER">
<div id="SITE_HEADER_Background"></div>
<div id="SITE_HEADER_Content">
<img id="avatar" src="/framework/sam/SAM_logo.svg" />
<h1 class="font_0" id="club-title">DEMO CLUB</h1>
<h6 class="font_6" id="club-greeting">Welcome.</h6>
</div>
</div>
<div id="banner-coloring"></div>
<div id="new-selector">
<div class="selector-box" onclick="window.location.href='/dashboard.html';">
<div>Dashboard</div>
</div>
<div class="selector-box" onclick="window.location.href='/club.html';">
<div>Club</div>
</div>
<div class="selector-box" onclick="window.location.href='/classes.html';">
<div>Classes</div>
</div>
<div class="selector-box" onclick="window.location.href='/settings.html';">
<div>Settings</div>
</div>
<div class="selector-box" onclick="window.location.href=addPost;">
<div>Add Post</div>
</div>
</div>
<div id="SITE_BACKGROUND"></div>
<div id="SITE_CONTENT">
<div class="container">
<div class="row">
<form class="col-md-9">
<div class="form-group">
<input type="text" id="title" placeholder="Title" class="form-control" name="title" />
</div>
<textarea name="editor" id="editor1" rows="10" cols="80"></textarea>
<button type="button" class="btn btn-primary" id="submit" onclick="submit_request(class_id);">Submit</button>
</form>
<div class="col-md-3">
<div class="card">
<div class="card-block">
<h4 class="card-title">File Manager</h4>
<h6 class="card-subtitle mb-2 text-muted"></h6>
<p class="card-text">Upload and manage your image and file here.</p>
<button class="btn btn-primary" data-toggle="modal" data-target=".file-manager">Open File Manager</button>
<div class="modal fade file-manager" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">File Manager</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" id="modal-body" style="height:1000px;">
<iframe src="http://188.166.151.67/file.html" height="100%" width="100%"></iframe>
<!-- <form>
<div>Upload New File</div>
<div class="form-group">
<label for="file-description" class="form-control-label">Description</label>
<textarea class="form-control" id="file-description"></textarea>
</div>
<div class="form-group">
<label for="file" class="form-control-label">File</label>
<input class="form-control" type="file" id="file1" name="file"></input>
</div>
<input type="button" class="btn btn-primary" id="upload" value="上传" />
</form> -->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Send message</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script>
$("#modal-body").css("height",window.innerHeight-200);
CKEDITOR.replace('editor');
var files = ";";
function submit_request(cid) {
$.post("/modules/club/addPost.php", {
cid: cid,
title: $("#title").val(),
html: CKEDITOR.instances.editor1.getData(),
attachment: files
}, function() {
window.location.href = "/single-club.html?id=" + cid
})
}
function request(paras) {
var url = location.href;
var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
var paraObj = {};
for (var i = 0, j; j = paraString[i]; i++) {
paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=") + 1, j.length);
}
var returnValue = paraObj[paras.toLowerCase()];
if (typeof(returnValue) == "undefined") {
return "";
} else {
return returnValue;
}
}
var class_id = request("id");
$.ajax({
url: 'modules/club/loadClub.php?id=' + class_id,
type: 'GET',
dataType: 'json',
timeout: 1000,
cache: false,
success: function (data){
var json = eval(data);
document.title=json.name;
$("#club-title").html(json.name);
}
});
</script>
</html>