/
functions.php
58 lines (41 loc) · 1.1 KB
/
functions.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
<?php
function userban($user)
{
include("banuser.php");
if(!empty($userbanned))
{
for($i=0; $i<=(count($userbanned)-1); $i++)
{
if($user==$userbanned[$i])
return 1;
}
return 0;
}
}
function postban($user, $post)
{
include("banpost.php");
if(!empty($userban) && (!empty($postban)))
{
for($i=0; $i<=(count($userban)-1); $i++)
{
if($user==$userban[$i] && $post==$postban[$i])
return 1;
}
return 0;
}
}
function showpost($discussion)
{
include("config.php");
echo ' <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><a href="core.php?type=post&author='.$discussion['author'].'&permlink='.$discussion['permlink'].'">'.$discussion['author'].'</a></h3>
</div>
<div class="panel-body">
<div class="center-block">';
echo str_replace($hidden, "", strip_tags(nl2br($discussion['body']), '<br>'));
echo '<center><hr>'.str_replace("SBD", "USD", $discussion['pending_payout_value']).'<br><script type="text/javascript">document.write(votebutton("'.$discussion["author"].'","'.$discussion["permlink"].'","2000"));</script></center>';
echo '</div></div></div>';
}
?>