Repository navigation
Expand file tree
/
Copy pathcms.php
More file actions
156 lines (121 loc) · 3.86 KB
/
Copy pathcms.php
File metadata and controls
156 lines (121 loc) · 3.86 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
<!-- To ensure jquery API loads beforehand -->
<?php
require_once ("../classes/init.php");
$db = new Database();
$res = $db->fetchAllContent(1,"navbar_links","glyphs", "link_glyph_id", "glyph_id");
?>
<!DOCTYPE html>
<html>
<head>
<title>Admin - Content Management</title>
<!-- META VIEWPORT TAG -->
<meta name="viewport" content="width=device-width" , initital-scale="1">
</head>
<body>
<?php require_once ("lib/header.php"); ?>
<!-- ==== TOP NOTIFIER ==== -->
<section id="topnotifier" style="margin-top: 50px">
<div class="container-fluid">
<div class="row">
<div class="col-sm-12 text-center white-fg" id="ajaxstatus" style="background-color: green">
</div><!-- col-sm-12 -->
</div><!-- row -->
</div><!-- container-fluid -->
</section><!-- topnotifier -->
<!-- QUICK LINKS ======= -->
<section id="quick-links" style="width: 100%;">
<?php require_once "lib/cms-quicklinks.php"; ?>
</section><!-- quick-links -->
<!-- ======================================== -->
<!-- ===== LOGO ===== -->
<section id="logo">
<?php require_once "lib/logo.php"; ?>
</section><!-- logo -->
<!-- ===== LINKS ======= -->
<section id="manage">
<div class="container">
<div class="row">
<div class="col-sm-12">
<h2>Links</h2><hr>
</div><!-- col-sm-12 -->
</div><!-- row -->
</div><!-- container -->
<div class="container" id="manage_links">
<!-- Contains table for displaying links -->
<?php require_once("lib/links.php"); ?>
</div><!-- container -->
</section><!-- manage -->
<!-- ==== GLOBALS ====-->
<section id="globals">
<!-- A section for changing the website globals (logo, links, site name, etc) -->
<?php require_once("lib/globals.php"); ?>
</section><!-- globals -->
<!-- ==== MANAGE CONTENT ====-->
<section id="manage-content">
<?php require_once "lib/cms-manage-content.php"; ?>
</section>
<section id="img-modal">
<?php
require_once "lib/cms-img-modal.php";
require_once "lib/cms-modal.php";
?>
</section>
<!-- ==== IMAGES ==== -->
<section id="images">
<?php require_once "lib/cms-manage-image.php"; ?>
</section>
<!-- To ensure that initialization works everytime the div refreshes -->
<script type="text/javascript" src="js/events.js"></script>
<style type="text/css">
input::-webkit-input-placeholder {
color: #999 !important;
}
input:-moz-placeholder { /* Firefox 18- */
color: #999 !important;
}
input::-moz-placeholder { /* Firefox 19+ */
color: #999 !important;
}
input:-ms-input-placeholder {
color: #999 !important;
}
</style>
<script type="text/javascript">
$('.logo-submit').attr('disabled', true);
// Image preview before upload
$('#img-selector').change(function(){
var reader = new FileReader();
reader.onload = function (e) {
// get loaded data and render thumbnail.
document.getElementById("img-preview").src = e.target.result;
$('.logo-submit').attr('disabled', false);
};
// read the image file as a data URL.
reader.readAsDataURL(this.files[0]);
});
$('#modal-imgfile').change(function(){
var reader = new FileReader();
reader.onload = function (e) {
// get loaded data and render thumbnail.
document.getElementById("modal-img-preview").src = e.target.result;
};
// read the image file as a data URL.
reader.readAsDataURL(this.files[0]);
});
$(function() {
$('a[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html, body').animate({
scrollTop: target.offset().top-80
}, 1000);
return false;
}
}
});
});
</script>
<?php
require_once ("lib/footer.php");