6 |
kaklik |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/************************************************************************/
|
|
|
4 |
/* G-Shout : Gravitasi Shoutbox */
|
|
|
5 |
/* ============================================ */
|
|
|
6 |
/* */
|
|
|
7 |
/* Copyright (c) 2005 by Yohanes Pradono */
|
|
|
8 |
/* http://gravitasi.com */
|
|
|
9 |
/* */
|
|
|
10 |
/* This program is free software. You can redistribute it and/or modify */
|
|
|
11 |
/* it under the terms of the GNU General Public License as published by */
|
|
|
12 |
/* the Free Software Foundation; either version 2 of the License. */
|
|
|
13 |
/* */
|
|
|
14 |
/************************************************************************/
|
|
|
15 |
|
|
|
16 |
// to prevent direct access
|
|
|
17 |
if (eregi("header.inc.php",$_SERVER['PHP_SELF'])) {
|
|
|
18 |
die("<b>Access Denied!</b><br /><i>You can't access this file directly...</i><br /><br />- G-Shout -");
|
|
|
19 |
}
|
|
|
20 |
|
|
|
21 |
header("Expires: Sun, 10 Jan 1982 05:00:00 GMT"); // donie's birthday
|
|
|
22 |
header("Last-Modified: ".gmdate("D, d M Y H:i:s"). " GMT"); // always modified
|
|
|
23 |
if($SERVER_PROTOCOL == "HTTP/1.0"){
|
|
|
24 |
header("Pragma: no-cache"); // HTTP/1.0
|
|
|
25 |
}else{
|
|
|
26 |
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
|
|
27 |
}
|
|
|
28 |
|
|
|
29 |
if(is_file("install.php")){
|
|
|
30 |
echo("There is install.php. If you have installed g-shout, you MUST delete install.php (or rename it to anything) and then you can go to Admin Control Panel directly.<br />But if you have not installed g-shout yet, read the README.txt file inside \"docs\" directory and then run install.php to check the required files. <br /><br />");
|
|
|
31 |
echo ("<a href='admin.php'>click here to Login to Admin Control Panel</a> (you MUST delete install.php first)<br />");
|
|
|
32 |
echo ("<a href='install.php'>click here to run install.php</a><br />");
|
|
|
33 |
echo ("<br />");
|
|
|
34 |
die("WARNING!!! You must delete install.php before using G-Shout");
|
|
|
35 |
}
|
|
|
36 |
|
|
|
37 |
// just checking if there is a datafile or not
|
|
|
38 |
if (is_writable($datafile) AND filesize($datafile) <= 35) {
|
|
|
39 |
if($file = fopen($datafile, "w+")) {
|
|
|
40 |
fwrite($file, "1#%Hi :D. You can delete this shout from Control Panel. Check G-Shout Website for update. Thanx for using G-Shout.#%");
|
|
|
41 |
fwrite($file, "donie#%m#%http://gravitasi.com#%".time()."#%#%#%#%\n");
|
|
|
42 |
fclose($file);
|
|
|
43 |
}
|
|
|
44 |
} else if (!is_writable($datafile)) {
|
|
|
45 |
$error = _DATA_UNWRITABLE;
|
|
|
46 |
} else {}
|
|
|
47 |
|
|
|
48 |
if (validCookie($_COOKIE['gshout_auth']) && $_GET['action'] != "logout"){
|
|
|
49 |
makeCookie($admin_password);
|
|
|
50 |
}
|
|
|
51 |
|
|
|
52 |
?>
|
|
|
53 |
|
|
|
54 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
55 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
|
|
56 |
<head>
|
|
|
57 |
<title>G-Shout <?=_CONTROL_PANEL?> ›
|
|
|
58 |
<?
|
|
|
59 |
if(!validCookie($_COOKIE['gshout_auth']) && eregi("admin.php",$_SERVER['PHP_SELF']) && empty($forget)){
|
|
|
60 |
$pagetitle = _LOGIN;
|
|
|
61 |
} else if (validCookie($_COOKIE['gshout_auth']) && eregi("admin.php",$_SERVER['PHP_SELF'])) {
|
|
|
62 |
$pagetitle = _EDIT_SHOUTS;
|
|
|
63 |
} else if (validCookie($_COOKIE['gshout_auth']) && eregi("editshout.php",$_SERVER['PHP_SELF'])) {
|
|
|
64 |
$pagetitle = _EDIT_SHOUT;
|
|
|
65 |
} else if (eregi("editconf.php",$_SERVER['PHP_SELF'])) {
|
|
|
66 |
$pagetitle = _CONFIGURATION;
|
|
|
67 |
} else if (eregi("logs.php",$_SERVER['PHP_SELF'])) {
|
|
|
68 |
$pagetitle = _VIEW_LOGS;
|
|
|
69 |
} else {
|
|
|
70 |
$pagetitle = _FORGOT_PASSWORD;
|
|
|
71 |
}
|
|
|
72 |
echo $pagetitle;
|
|
|
73 |
?>
|
|
|
74 |
</title>
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
<meta http-equiv="content-type" content="text/html; charset=<?=_CHARSET?>" />
|
|
|
78 |
<meta name="MSSmartTagsPreventParsing" content="TRUE" />
|
|
|
79 |
<meta http-equiv="expires" content="-1" />
|
|
|
80 |
<?
|
|
|
81 |
if($SERVER_PROTOCOL == "HTTP/1.0"){
|
|
|
82 |
echo("<meta http-equiv=\"pragma\" content=\"no-cache\" />\n");
|
|
|
83 |
}else{
|
|
|
84 |
echo("<meta http-equiv=\"Cache-Control\" content=\"no-cache, must-revalidate\" />\n");
|
|
|
85 |
}
|
|
|
86 |
?>
|
|
|
87 |
<meta name="Generator" content="G-Shout <?=$version?>" />
|
|
|
88 |
|
|
|
89 |
<link rel="stylesheet" type="text/css" href="<?echo "skins/".$skin.".css";?>" />
|
|
|
90 |
|
|
|
91 |
<style type="text/css">
|
|
|
92 |
acronym {
|
|
|
93 |
cursor: help;
|
|
|
94 |
}
|
|
|
95 |
label.hand {
|
|
|
96 |
cursor: pointer;
|
|
|
97 |
}
|
|
|
98 |
</style>
|
|
|
99 |
|
|
|
100 |
<script type="text/javascript">
|
|
|
101 |
<!--
|
|
|
102 |
function add_smiley_cp(smiley)
|
|
|
103 |
{
|
|
|
104 |
opener.document.editshout.reply.value += " " + smiley + " ";
|
|
|
105 |
opener.window.document.editshout.reply.focus();
|
|
|
106 |
window.close();
|
|
|
107 |
}
|
|
|
108 |
function about(){
|
|
|
109 |
window.open('./about.php', 'About', 'width=325,height=342,location=0,menubar=0,toolbar=0,scrollbars=yes,resizable=1,status=0,screenx=245,screeny=102');
|
|
|
110 |
}
|
|
|
111 |
//-->
|
|
|
112 |
</script>
|
|
|
113 |
|
|
|
114 |
</head>
|
|
|
115 |
|
|
|
116 |
<body>
|
|
|
117 |
|
|
|
118 |
<div id="topBar">
|
|
|
119 |
|
|
|
120 |
<table style="width: 100%;" border="0" cellpadding="0" cellspacing="0">
|
|
|
121 |
<tbody>
|
|
|
122 |
|
|
|
123 |
<tr>
|
|
|
124 |
|
|
|
125 |
<td class="helpLinks">
|
|
|
126 |
<div class="helpLinksLeft">
|
|
|
127 |
<a href="javascript:void(0)" onclick="javascript:about()">G-Shout <?=$version?></a>
|
|
|
128 |
</div>
|
|
|
129 |
</td>
|
|
|
130 |
|
|
|
131 |
<? if($emoticons != true){ ?>
|
|
|
132 |
|
|
|
133 |
<td class="helpLinks">
|
|
|
134 |
<a href="<?=$adminweb?>" target="_blank"><?=_MY_WEBSITE?></a> |
|
|
|
135 |
<?=_CURRENT_TIME?>: <?=formattanggal(time())?>
|
|
|
136 |
<?
|
|
|
137 |
if(validCookie($_COOKIE['gshout_auth'])){
|
|
|
138 |
echo "| <a href=\"admin.php?action=logout\">"._LOGOUT."</a>";
|
|
|
139 |
}
|
|
|
140 |
?>
|
|
|
141 |
|
|
|
142 |
<? } ?>
|
|
|
143 |
|
|
|
144 |
</td>
|
|
|
145 |
|
|
|
146 |
</tr>
|
|
|
147 |
|
|
|
148 |
</tbody></table>
|
|
|
149 |
|
|
|
150 |
|
|
|
151 |
</div>
|
|
|
152 |
<div id="header"> </div>
|