-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrevblog.php
152 lines (136 loc) · 6.11 KB
/
revblog.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
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
<?php
if(!isset($page)) die('unauthorized access');
//
// Here, $test is the identifier for blogs in general: 9
// $book holds the blogid
// I SHOULD have made the blogs another testament, like appx's, info's, and ws's
// ..but I didn't
//
$stitle = 'REV Blog';
$msg = '';
?>
<span class="pageheader"><?=$stitle?></span>
<table>
<tr>
<td>
<p>Welcome to the “REV Blog” section of the REV website.
<a onclick="toggleinfo('info');">More info <span id="moreless">»</span></a></p>
<div id="info" style="height:0;overflow:hidden;transition:height .4s ease-in;">
<p style="margin-top:0">The REV Bible has been an ongoing and developing project since work on it began in 2000.
There is a lot of work done on the REV that is not indicated under the "What's New" section.
But many meaningful changes are being made which readers and supporters might appreciate knowing
about. Furthermore, this blog will provide updates on areas where current work is being done.
It is a proper venue to describe the various translation decisions, perspectives on particular
passages, and even struggles between multiple translation options. In addition, it will often
include insights concerning why certain translation decisions have been made.</p>
</div>
</td></tr>
<tr><td>
<?
// this is the whatsnew code...
$wncnt = ((isset($_REQUEST['temp']))?$_REQUEST['temp']:10);
$wncnt = (($wncnt=='')?10:$wncnt);
print('Select number of blog entries to view: ');
?>
<select name="wncntx" id="wncntx" onchange="document.frmnav.temp.value=this[this.selectedIndex].value;document.frmnav.submit();">
<!--<option value="5"<?=fixsel(5,$wncnt);?>>5</option>-->
<option value="10"<?=fixsel(10,$wncnt);?>>10</option>
<option value="25"<?=fixsel(25,$wncnt);?>>25</option>
<option value="50"<?=fixsel(50,$wncnt);?>>50</option>
<option value="75"<?=fixsel(75,$wncnt);?>>75</option>
<!--<option value="999"<?=fixsel(999,$wncnt);?>>all</option>-->
</select><br />
<?
if($userid>0) print('<a onclick="return navigate(\'9\',\'27\', 9, -1, 0, 0);" title="New blog entry">New blog entry <img src="/i/edit.gif" alt="" /></a>');
?>
<br />
<?
$sql = 'select blogid, blogdate, blogtitle, blogtext, active
from revblog
where '.(($userid>0)?'1=1 ':'active = 1 and blogtext != \'No blog text\' ').'
order by blogdate desc ';
$logs = dbquery($sql);
print('<table>');
if(!mysqli_num_rows($logs)) print('<tr><td colspan="4"> <br/>Sorry, no blogs have been entered yet.</td></tr>');
$ni=0;
$charcut = (($ismobile || $inapp)?500:1250);
while(($row = mysqli_fetch_array($logs)) && ($ni < $wncnt)){
print('<tr><td style="border-top:1px solid '.$colors[1].';"><small>Date added: '.converttouserdate($row['blogdate'], $timezone).' '.gettimezoneabbr($timezone).'</small><br /><b><span class="findvers_ignore">'.$row['blogtitle'].'</span></b>');
if($userid>0) print(editlink('elnk'.$ni,$showedit,$mitm,27,9,$row['blogid'],0,0).(($row['active'])?'':notifynotpublished));
print('</td></tr>');
$commentary = $row['blogtext'];
if($commentary==null || $commentary=='') $commentary = 'No Blog text. ';
$commentary = left(trim($commentary), 2000);
if(left($commentary, 3)==='<p>')
$commentary = '<p style="margin-top:0;padding-top:0;">'.substr($commentary, 3);
if (strlen($commentary) >= $charcut) {
$commentary = truncateHtml($commentary, $charcut,'...', false, true,'<a href="/blog/'.$row['blogid'].'/'.str_replace(' ', '-', $row['blogtitle']).'" title="click to read more" target="'.(($inapp)?'_self':'_blank').'">Read More</a>');
}
print('<tr><td>'.$commentary.((right($commentary, 4)=='</p>')?'':'<br /> ').'</td></tr>'.crlf);
$ni++;
}
print('</table>');
logview(25,0,0,0,0);
$arwnblog = explode(';', (isset($_COOKIE['rev_wnblog']))?$_COOKIE['rev_wnblog']:((time()-(3*86400)).';'.(time()-(3*86400)).';'.(time()-(3*86400))));
if(sizeof($arwnblog)==2) array_push($arwnblog, (time()-(3*86400)));
$arwnblog[1] = time();
$arwnblog = join(';', $arwnblog);
?>
</td></tr>
<tr><td>
<input type="hidden" name="mitm" value="<?=$mitm?>" />
<input type="hidden" name="page" value="<?=$page?>" />
<input type="hidden" name="test" value="<?=$test?>" />
<input type="hidden" name="book" value="<?=$book?>" />
<input type="hidden" name="chap" value="<?=$chap?>" />
<input type="hidden" name="vers" value="<?=$vers?>" />
<input type="hidden" name="oper" value="" /></td></tr></table>
<table style="font-size:90%">
<tr><td colspan="2"> </td></tr>
</table>
<div style="margin:0 auto; text-align:center;"><small>(<a onclick="return scrolltotop()">top</a>)</small></div>
<script src="/includes/bbooks.min.js?v=<?=$fileversion?>"></script>
<script src="/includes/findcomm.min.js?v=<?=$fileversion?>"></script>
<script>
findcomm.enablePopups = true;
findcomm.remoteURL = '<?=$jsonurl?>';
findcomm.startNodeId = 'view';
</script>
<script src="/includes/findapx.min.js?v=<?=$fileversion?>"></script>
<script>
findappx.startNodeId = 'view';
findappx.apxidx = [<?=loadapxids()?>];
</script>
<script src="/includes/findvers.min.js?v=<?=$fileversion?>"></script>
<script>
findvers.startNodeId = 'view';
findvers.remoteURL = '<?=$jsonurl?>';
findvers.navigat = false;
</script>
<script src="/includes/findstrongs.min.js?v=<?=$fileversion?>"></script>
<script>
findstrongs.startNodeId = 'commtext';
findstrongs.ignoreTags.push('noparse');
findstrongs.lexicon = prflexicon;
</script>
<script src="/includes/findwordstudy.min.js?v=<?=$fileversion?>"></script>
<script>
findwordstudy.startNodeId = 'view';
</script>
<script>
addLoadEvent(findcomm.scan);
addLoadEvent(findappx.scan);
addLoadEvent(findvers.scan);
addLoadEvent(findstrongs.scan);
addLoadEvent(findwordstudy.scan);
function toggleinfo(id){
excoldiv(id);
var div = $(id);
if(div.style.height=='0px'){
$('moreless').innerHTML='»';
}else{
$('moreless').innerHTML='«';
}
}
setCookie('rev_wnblog', '<?=$arwnblog?>', cookieexpiredays);
</script>