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 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
| <?
/*
(C) AEwebworks Software Development Ltd., 2002-2003
IMPORTANT: This is a commercial software product and any kind of using it must agree
to the AEwebworks Software Development Ltd. license agreement. It can be found at
http://www.aewebworks.com/license.htm
This notice may not be removed from the source code.
*/
require_once( "../inc/header.inc.php" );
require_once( "{$dir['inc']}db.inc.php" );
require_once( "{$dir['inc']}admin.inc.php" );
require_once( "{$dir['inc']}profiles.inc.php" );
require_once( "{$dir['inc']}design.inc.php" );
require_once( "{$dir['inc']}admin_design.inc.php" );
require_once( "{$dir['inc']}utils.inc.php" );
if ( $_POST['ID'] )
{
$admin_id = process_db_input( $_POST['ID'] );
$admin_pass = process_db_input( $_POST['Password'] );
$result = db_res( "SELECT * FROM `Admins` WHERE `Name` = '$admin_id' AND `Password` = '$admin_pass'" );
if ( mysql_num_rows( $result ) != 1 )
login_form( '<center><b><font color="#ff0000">Login Failed! Try again</font></b></center>', 1 );
} else {
setcookie ("adminID", $_POST[ID], 0, "/");setcookie ("adminPassword", crypt( $_POST[Password], 'secret_string' ), 0, "/");
?>
Welcome back, <b><? echo $admin_id; ?></b>. Logging you in...
<script language="Javascript">location.href='<? echo $_SERVER[PHP_SELF]; ?>';</script>
<?
exit;
}
}
if ( !$_COOKIE['adminID'] || !$_COOKIE['adminPassword'] )
{
// this is dynamic page - send headers to do not cache this page
send_headers_page_changed();
login_form( "", 1 );
}
$logged['admin'] = member_auth( 1 );
$free_mode = getParam("free_mode") == "on" ? 1 : 0;
// Finance
if ( !$free_mode )
{
$tr_array = array();
$fin = sales_finance( $tr_array );
$full_amount = $fin['total'];
}
// total registered members
$n_arr = db_arr( 'SELECT COUNT(*) FROM `Profiles`' );
// totel registered affiliates
if ( $en_aff ) $aff_arr = db_arr( 'SELECT COUNT(*) FROM `aff`' );
// number of links
$l_arr = db_arr( 'SELECT COUNT(*) FROM `Links`' );
// number of banners
$b_arr = db_arr( 'SELECT COUNT(*) FROM `Banners` WHERE `Active` <> 0' );
// number of articles
$a_arr = db_arr( 'SELECT COUNT(*) FROM Articles' );
// number of stories
$s_arr = db_arr( 'SELECT COUNT(*) FROM `Stories`' );
// number of news
$news_arr = db_arr( 'SELECT COUNT(*) FROM `News`' );
// number of mass letters
$f_arr = db_arr( 'SELECT COUNT(*) FROM `NotifyMsgs`' );
// number od polls
$polls_arr = db_arr( 'SELECT COUNT(*) FROM `polls_q`' );
// number od modules
$mods_arr = db_arr( 'SELECT COUNT(*) FROM `Modules`' );
$status_arr[0] = "Unconfirmed";
$status_arr[1] = "Approval";
$status_arr[2] = "Active";
$status_arr[3] = "Rejected";
$status_arr[4] = "Suspended";
$_page['header'] = "Administrator Panel";
$_page['header_text'] = "Control Panel</b> (Server time: " . date( "H:i, d-M-Y" ) . ")";
// this is dynamic page - send headers to do not cache this page
send_headers_page_changed();
TopCodeAdmin();
?>
<table width=100% border=0 cellpadding=0 class=text>
<tr>
<td width="100%" valign=top>
<!-- Total registered members: Section Begin -->
<table width=100% class=text cellpadding=0 cellspacing=0 border=0>
<tr>
<td width=10>
<td width="610">
<div style="text-align: left; padding: 6px 6px 0 8px; background: url(images/head_block_green.gif) no-repeat 0px 6px; font: bold 10px Verdana; color:#FFFFFF; height:21px; line-height:16px">Total registered members:</div>
<div style="text-align: left; border-left: 2px solid #2AA181; border-right: 2px solid #2AA181; width:598px; height:auto">
<div style="padding: 10px 10px 10px 10px">
<center>
<table cellspacing=1 cellpadding=3 border=0 width="70%" align="center" bgcolor="#cccccc" >
<tr>
<td bgcolor=E5E5E5 class="text"><a href="<?php echo $site['url_admin']; ?>profiles.php">Total registered members:</a></td>
<td bgcolor=E5E5E5 width=50 class="text" align="right"><b><?php echo $n_arr[0]; ?></b></td>
</tr>
<?php
$i = 0;
while( list( $key, $val ) = each( $status_arr ) )
{
$n_arr = db_arr( "SELECT COUNT(*) FROM `Profiles` WHERE Status = '$val'" );
if ( $n_arr[0] )
{
?>
<tr class="text">
<td class="text" bgcolor="#ffffff" align="left" valign="middle"> <img src=images/arrow.gif>
<a href="profiles.php?profiles=<? echo $val; ?>"><? echo $val; ?></a>
</td>
<td class="prof_stat_<? echo $val; ?>" width="50" align="right"><? echo $n_arr[0]; ?></td>
</tr>
<?
}
}
?>
</table>
</center>
</div>
</div>
<div><img src="images/foot_block_green.gif" height="6" width="602"></div>
</td>
</tr>
</table>
<!-- Total registered members: Section End -->
<br>
<!-- Site statistics Begin-->
<div style="text-align: left; padding: 6px 6px 0 8px; background: url(images/head_block_green.gif) no-repeat 0px 6px; font: bold 10px Verdana; color:#FFFFFF; height:21px; line-height:16px">Site statistics</div>
<div style="text-align: left; border-left: 2px solid #2AA181; border-right: 2px solid #2AA181; width:598px; height:auto">
<div style="padding: 10px 10px 10px 10px">
<center> <table bgcolor=CCCCCC width=70% cellspacing=0 cellpadding=1 align="center" border="0">
<tr>
<td>
<table width=100% class=text cellpadding=3 cellspacing=1>
<tr>
<td bgcolor=FFFFFF align="left"> <img src=images/arrow.gif>
<a href="<?php echo $site['url_admin']; ?>links.php"><font color=0000FF>Links</font></a>
</td>
<td bgcolor=FFFFFF width=50 align="right"><?php echo $l_arr[0]; ?></td>
</tr>
<tr>
<td bgcolor=FFFFFF align="left"> <img src=images/arrow.gif><a href="<?php echo $site['url_admin']; ?>banners.php"><font color=0000FF>Banners</font></a></td>
<td bgcolor=FFFFFF width=50 align="right"><?php echo $b_arr[0]; ?></td>
</tr>
<tr>
<td bgcolor=FFFFFF align="left"> <img src=images/arrow.gif><a href="<?php echo $site['url_admin']; ?>news.php"><font color=0000FF>News</font></a></td>
<td bgcolor=FFFFFF align="right"><?php echo $news_arr[0]; ?></td>
</tr>
<tr>
<td bgcolor=FFFFFF align="left"> <img src=images/arrow.gif><a href="<?php echo $site['url_admin']; ?>articles.php"><font color=0000FF>Articles</font></a></td>
<td bgcolor=FFFFFF align="right"><?php echo $a_arr[0]; ?></td>
</tr>
<tr>
<td bgcolor=FFFFFF align="left"> <img src=images/arrow.gif><a href="<?php echo $site['url']; ?>story.php"><font color=0000FF>Feedback</font></a></td>
<td bgcolor=FFFFFF align="right"><?php echo $s_arr[0]; ?></td>
</tr>
<tr>
<td bgcolor=FFFFFF align="left"> <img src=images/arrow.gif><a href="<?php echo $site['url_admin']; ?>polls.php"><font color=0000FF>Polls</font></a></td>
<td bgcolor=FFFFFF align="right"><?php echo $polls_arr[0]; ?></td>
</tr>
<tr>
<td bgcolor=FFFFFF align="left"> <img src=images/arrow.gif><a href="<?php echo $site['url_admin']; ?>notifies.php"><font color=0000FF>Mass letters</font></a></td>
<td bgcolor=FFFFFF align="right"><?php echo $f_arr[0]; ?></td>
</tr>
<tr>
<td bgcolor=FFFFFF align="left"> <img src=images/arrow.gif><a href="<?php echo $site['url_admin']; ?>modules.php"><font color=0000FF>Modules</font></a></td>
<td bgcolor=FFFFFF align="right"><?php echo $mods_arr[0]; ?></td>
</tr>
</table>
</td></tr></table> </center>
</div>
</div>
<div><img src="images/foot_block_green.gif" height="6" width="602"></div>
<!-- Site statistics End-->
<br>
<div style="text-align: left; padding: 6px 6px 0 8px; background: url(images/head_block_green.gif) no-repeat 0px 6px; font: bold 10px Verdana; color:#FFFFFF; height:21px; line-height:16px">Site network</div>
<div style="text-align: left; border-left: 2px solid #2AA181; border-right: 2px solid #2AA181; width:598px; height:auto">
<div style="padding: 10px 10px 10px 10px">
<center><table bgcolor=CCCCCC width=70% cellspacing=0 cellpadding=1 align="center" width="100%"><tr><td>
<table width=100% class=text cellpadding=3 cellspacing=1>
<tr>
<td bgcolor=FFFFFF align="left"> <img src=images/arrow.gif><a href="<?php echo $site['url_aff']; ?>partners.php"><font color=0000FF>Affiliates</font></a></td>
<td bgcolor=FFFFFF width="50" align="right"><?php echo $aff_arr[0]; ?></td>
</tr>
</table>
</td></tr></table></center>
</div>
</div>
<div><img src="images/foot_block_green.gif" height="6" width="602"></div>
<br>
<div style="text-align: left; padding: 6px 6px 0 8px; background: url(images/head_block_green.gif) no-repeat 0px 6px; font: bold 10px Verdana; color:#FFFFFF; height:21px; line-height:16px">Admin quick links:</div>
<div style="text-align: left; border-left: 2px solid #2AA181; border-right: 2px solid #2AA181; width:598px; height:auto">
<div style="padding: 10px 10px 10px 10px">
<table class=text cellpadding=3 cellspacing=1 width="100%" border="0"><tr>
<td width=50% valign=top align="left">
<br>
- <a href="<?php echo $site['url_admin']; ?>contact_discounts.php">Make all services free for all members</a><br>
- <a href="<?php echo $site['url_admin']; ?>global_settings.php?cat=ap">Change administrator's login and password</a><br>
- <a href="<?php echo $site['url_aff']; ?>partners.php">Manage affiliates</a><br>
- <a href="<?php echo $site['url_admin']; ?>links.php">Add new link to links page</a><br>
- <a href="<?php echo $site['url']; ?>story.php">Review and activate feedback submission</a><br>
- <a href="<?php echo $site['url_admin']; ?>finance.php">Calculate my earnings for this month</a><br>
<br><br>
</td>
<tr>
<td colspan="2" align="center" height="1">
<hr size="1" width="90%" style="color:silver">
</td>
</tr>
<tr>
<td colspan="2" align="center" >
Your current version is <?php echo $site['ver']. " patch " .$site['build']; ?>
<br><br><b><u>Updates:</u></b>
<br>
<?php echo stripslashes($_COOKIE['new_version']); ?>
<br><br>
</td>
</tr></table>
</div>
</div>
<div><img src="images/foot_block_green.gif" height="6" width="602"></div>
</td>
</tr>
</table>
<?
BottomCodeAdmin();
?> |
Partager