-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentry.php
More file actions
179 lines (158 loc) · 5.73 KB
/
Copy pathentry.php
File metadata and controls
179 lines (158 loc) · 5.73 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
<?php
//entry.php
$page_name="entry.php";
include 'core.php';
$ids=@$_GET['ref'];
$ids=htmlentities($ids);
include 'dbms/dbms_imp.php';
$ids=netutralize($ids,$connection);
mysqli_close($connection);
$notice = new notice($ids);
$current_user = new user ;
$current_user->get_user($userid);
$title=$notice->title;
$keywords=$notice->tags;
$description=$notice->bref;
?>
<!doctype html>
<html lang="en">
<?php
//includind the head tag
require 'head.php';
?>
<body>
<?php
// including the header of the document
require 'header.php';
// including the blog layout
?>
<div>
<div class="demo-blog demo-blog--blogpost mdl-layout mdl-js-layout has-drawer is-upgraded">
<main class="mdl-layout__content">
<!--<div class="demo-back">
<a class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon" href="index.html" title="go back" role="button">
<i class="material-icons" role="presentation">arrow_back</i>
</a>
</div>-->
<div class="demo-blog__posts mdl-grid">
<div class="mdl-card mdl-shadow--4dp mdl-cell mdl-cell--12-col">
<style>
.demo-blog--blogpost .demo-blog__posts > .mdl-card .mdl-card__media
{
background-image: url('images/road_big.jpg');
height: 300px;
}
</style>
<div class="mdl-card__media mdl-color-text--grey-50">
<h3><?php echo $notice->title; ?></h3>
</div>
<div class="mdl-color-text--grey-700 mdl-card__supporting-text meta">
<div class="minilogo"></div>
<div>
<strong><?php echo "By- $notice->fname"; ?></strong>
<span>
<?php
if (isset($notice->pos) && !empty($notice->pos))
{
echo "$notice->pos";
}
?>
</span>
</div>
<div class="section-spacer"></div>
<div class="meta__favorites">
<i class="material-icons" role="presentation">favorite</i>
<span class="visuallyhidden">favorites</span>
</div>
<div>
<i class="material-icons" role="presentation">bookmark</i>
<span class="visuallyhidden">bookmark</span>
</div>
<div>
<i class="material-icons" role="presentation">share</i>
<span class="visuallyhidden">share</span>
</div>
</div>
<div class="mdl-color-text--grey-700 mdl-card__supporting-text">
<p>
<pre><?php echo $notice->description;?></pre>
</p>
</div>
<div class="mdl-color-text--grey-700 mdl-card__supporting-text meta">
<div>
<?php
if (function_exists('get_date'))
{
$dated=get_date($notice->dated);
echo "Posted on - $dated";
}
?>
</div>
<div class="section-spacer"></div>
<div>
<strong>
<?php
if (isset($notice->exlink) && !empty($notice->exlink))
{
echo "For More information Vist <a href=\"$notice->exlink\"> here </a><br/> $notice->exlink";
}
?>
</strong>
</div>
</div>
<div class="mdl-color-text--primary-contrast mdl-card__supporting-text comments">
<?php
// including the comment forum
if (islogin()) //this will work only if user is logged in
{
$comment=$_POST['comment'];
//var_dump($comment);
if (isset($comment) && !empty($comment))
{
echo "comment is set and not empty";
$comobj = new comment;
$comobj->get_comment($ids,$comment);
$comobj->check_exist();
$comobj->add_comment();
//var_dump($comobj);
//die();
}
}
// including the comment forum
include 'display/forms/comment.form.php';
if (islogin())
{
// including the comments
include 'display/functions/comment.func.php';
include 'dbms/dbms_imp.php';
$resultc=$connection->query("SELECT `cid` FROM `comments` WHERE `nid`='$ids' ORDER BY `cid` DESC");
mysqli_close($connection);
while ($rows=$resultc->fetch_array())
{
$comm = new comment($rows[0]);
comment($comm);
}
}
?>
</div>
</div>
<!--navigation panel for large database-->
</div>
<?php
require 'footer.php';
?>
</main>
<!--<div class="mdl-layout__obfuscator"></div>-->
</div>
<?php
if (($userid==$notice->uploader) || ($current_user->level=='admin') || ($current_user->level=='dev'))
{
?>
<a href="edit_notice?ref=<?php echo $ids; ?>" target="_blank" id="view-source" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-color--accent mdl-color-text--accent-contrast"><?php echo "Edit This Notice";?></a>
<?php
}
?>
<script src="material.min.js"></script>
</div>
</body>
</html>