Location: PHPKode > projects > RadhikaGB > radhikagb_f2505100832/admin/index.php
<?php
//||_____________________RadhikaGB_____________________||//
//||---------------------------------------------------||//
//||Page ID  :  index.php(ADMIN)                       ||//
//||Build ID :  2505100832                             ||//
//||Support  :  http://softacme.com/radhikagb          ||//
//||          Jai Shri RADHA RANI...                   ||//
//||---------------------------------------------------||//
?>
<?php
session_start();
if ((!(session_is_registered("username") ) ) || (($_SESSION["username"]=="ok"))){
header("Location: login.php");
exit();
}
		if(file_exists("../connect.php")){
						require_once("../connect.php");
						}else{
						header("location: ../self-help.php?error=1");
						}
		if($RadhikaGB_install != okay){ 
						header('Location: ../self-help.php?error=3');
						}
		if(file_exists("data.php")){
						require_once("data.php");
						}else{
						header("location: ../self-help.php?error=4");
						}
?>
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<title>Administrator Panel - RadhikaGB</title>
				<link rel="shortcut icon" href="data/favicon.ico" type="image/x-icon" />
<link type='text/css' href='style/stylesheet.css' rel='stylesheet' media='screen' />
				<script type="text/javascript" src="data/jquery.js"></script>

<script type="text/javascript" src="data/edit.js"></script>
<script type="text/javascript" src="data/demo.js"></script>
<script type="text/javascript" src="data/jquery.form.js"></script>
<link href="../data/facebox.css" media="screen" rel="stylesheet" type="text/css"/>
<script src="data/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$(".ddx").click(function() {
var id = $(this).attr("id");
var dataString = 'id='+ id ;
var parent = $(this).parent();
$.ajax({
   type: "POST",
url: "warning.php",
   data: dataString,
   cache: false,

   success: function()
   {
 }
 });
return false;
	});
});
$(function() {
$(".ddxx").click(function() {
var id = $(this).attr("id");
var dataString = 'id='+ id ;
var parent = $(this).parent();
$.ajax({
   type: "POST",
url: "ok.php",
   data: dataString,
   cache: false,

   success: function()
   {    
  }   
 });
return false;
	});
});
$(function() {
$(".ddb").click(function() {
var id = $(this).attr("id");
var dataString = 'id='+ id ;
var parent = $(this).parent();
$.ajax({
   type: "POST",
url: "delete.php",
   data: dataString,
   cache: false,
   success: function()
   {
    if(id % 2)
	{
    parent.fadeOut('slow', function() {$(this).remove();});
	}
	else
	{
	parent.slideUp('slow', function() {$(this).remove();});
	}
  }
  });
return false;
	});
});
$(function() {
$(".ddadmin").click(function() {
var id = $(this).attr("id");
var dataString = 'id='+ id ;
var parent = $(this).parent();
$.ajax({
   type: "POST",
url: "admindel.php",
   data: dataString,
   cache: false,
   success: function()
   {
    if(id % 2)
	{
    parent.fadeOut('slow', function() {$(this).remove();});
	}
	else
	{
	parent.slideUp('slow', function() {$(this).remove();});
	}
  }
 });
return false;
	});
});
$(document).ready(function(){
	 $(".contimage").hover(function() {
			$(this).animate({
				opacity:1
			},200);
		}, function() {
			$(this).animate({
				opacity:0.8
			},200);
		});
		$('#submitform').ajaxForm({
			target: '#oops',
			success: function() {
			$('#oops').fadeIn('slow');
			}
	});
$('a[rel*=facebox]').facebox()
	 });
</script>
<script type="text/javascript">
$(function()
{
$("#boxs_top").click(function(event) {
event.preventDefault();
$("#boxs_top_top").slideToggle();
});
$("#boxs_top_top a").click(function(event) {
event.preventDefault();
$("#boxs_top_top").slide();
});
});
$(function()
{
$("#boxs_down").click(function(event) {
event.preventDefault();
$("#boxs_under_down").slideToggle();
 speed: 1000;
});
$("#boxs_under_down a").click(function(event) {
event.preventDefault();
$("#boxs_under_down").slide();
});
});
$(function()
{
$("#view_all").click(function(event) {
event.preventDefault();
$("#view_all_all").slideToggle();
 speed: 1000;
});
$("#view_all_all a").click(function(event) {
event.preventDefault();
$("#view_all_all").slide();
});
});
$(function()
{
$("#boxs_under_sett").click(function(event) {
event.preventDefault();
$("#boxs_under_xsett").slideToggle();
 speed: 1000;
});
$("#boxs_under_xsett a").click(function(event) {
event.preventDefault();
$("#boxs_under_xsett").slide();
});
});
</script>
</head>
<body text="black" topmargin="0" rightmargin="0" leftmargin="0"> 
<table style="font-family: Arial; width: 100%;"  border="0" cellpadding="0" cellspacing="0">
<tr><td bgcolor="#39599C"><font size="6" color="#FFFFFF">&nbsp;RadhikaGB</font></td></tr>
</table><center><div id="head_main">
<div id="adminright"><div class="topbgbar"><div class="leftside">LastLogin-IP : <b>
<?php
	$counts = mysql_result(mysql_query("SELECT COUNT(id) AS tot FROM logins"),0);
	$last_login_time="$counts" - "1";
	$sqli="SELECT date, ip FROM logins WHERE id='$last_login_time'";
	$results=mysql_query($sqli);
	$rows=mysql_fetch_array($results);
echo"$rows[1]";
echo"&nbsp;&nbsp;&nbsp;&nbsp;</b>on&nbsp;&nbsp;<b>";
echo date('dS-My', $rows[0]);
?>
</b> <a href="logs.php?logs=logs" class="login_more" title="more" rel="facebox">&raquo;&raquo;</a> </div>
<div class="rightside"><font color="#"><b>
<?php
echo $data[adminame];
?></font></b>		
|
<a href="account.php" class="login_more" title="Account Settings" rel="facebox">Accounts</a>
|
<a href="logout.php" class="login_more" title="logout">Logout</a>
</div></div></div>
</div>
<div id="search"><center>
<table border="0" cellpadding="0" cellspacing="0"><tr>
<td bgcolor="#6B86B5">
<form action="search.php" method="get">
<input type="text" name="searchField" size="15"></td>
<td bgcolor="#6B86B5"><input type="image" value="submit" src="data/search1.gif">
</form></td></tr></table>
<?php
if($_GET[done] == account){
echo"<div id=\"box_account\">";
echo"<font size=\"2\" face=\"arial\">&nbsp;&bull;&nbsp;<b>Account settings</b> has been successfully changed</font></div>";
}
?>
</center></div><br /><div id="head_main_body">
<table border="0" cellpadding="0" cellspacing="4" width="100%">
<tr><td width="100%"><div href="#" id="boxs_top"><font face="arial" size="2">&nbsp;<b>Guestbook Statistics</b></font></div>
<div id="boxs_top_top"><table border="0" cellpadding="0" cellspacing="0" width="80%">
<tr><td width="55%"><font face="arial" size="2">
RadhikaGB version : </font></td><td bgcolor="#EFEFEF" ><font face="arial" size="2"><b>1.0<b></font></td>
<td width=""><font face="arial" size="2">Server name : </font></td><td bgcolor="#EFEFEF" width="30%"><b><font face="arial" size="2"><?php echo $_SERVER['SERVER_NAME']; ?></font></b></td>
</tr><tr><td><font face="arial" size="2">Php version : </font></td><td bgcolor="#EFEFEF"><font face="arial" size="2"><b><?php $phpver=phpversion(); echo"$phpver";?></b></font></td>
<td><font face="arial" size="2">Mysql&nbsp;version&nbsp;: </font></td><td bgcolor="#EFEFEF"><font face="arial" size="2"><b>
<?php 
$t=mysql_query("select version() as ve");
$r=mysql_fetch_object($t);
echo $r->ve; 
?></b></font></td></tr><tr><td><font face="arial" size="2">
Todays entrys : </font></td><td bgcolor="#EFEFEF"><font face="arial" size="2"><b>
<?php	
$xss=date(Ymd);
$timex=strtotime($xss);
$query = mysql_query("SELECT * FROM guestbook where date>'$timex'");
$number=mysql_num_rows($query);
echo "$number";
?></b></font></td><td><font face="arial" size="2">
Total entrys : </font></td><td bgcolor="#EFEFEF"><font face="arial" size="2"><b><?
		$totalres = mysql_result(mysql_query("SELECT COUNT(id) AS tot FROM guestbook"),0);
		echo"$totalres";
		?></b></font></td></tr><tr><td><font face="arial" size="2">
Total visits : </font></td><td bgcolor="#EFEFEF"><font face="arial" size="2"><b>
<?php echo $data[visits];
?>
</b></font></td><td><font face="arial" size="2">
Users online : </font></td><td bgcolor="#EFEFEF"><font face="arial" size="2"><b><?php include("online.php"); ?></b></font></td>
</tr></table></div></td></tr></table>
<table border="0" cellpadding="0" cellspacing="4" width="100%">
<tr><td width="100%" valign="top">
<div id="boxs"><font face="arial" size="2">&nbsp;<b>New  messages</b></font></div>
<div id="boxs_under">
<?php
$sql = mysql_query("SELECT * FROM guestbook  where date>'$rows[0]'" );
while($res = mysql_fetch_array($sql))
{
$id			=	$res['id'];
$ip			=	$res['ip'];
$name		=	ucfirst($res['name']);
$email		=	$res['email'];
$time		=	$res['date'];
$website	=	$res['website'];
$comment	=	$res['comment'];
$comment	=   nl2br($comment);
$allow		= 	$res['allow'];
echo"<div><a href=\"mailto:$email\">$name</a>";
echo"<font size=\"1\">on $time</font>";
echo"<a href=\"#\" class=\"ddb\" id=\"$id\"><img src=\"data/del.png\" border=\"0\"></a>";
if($allow !== "0"){
echo"<a href=\"#\" class=\"ddx\" id=\"$id\"><img src=\"data/warning.gif\" border=\"0\"></a>";
}else{
echo"<a href=\"#\" class=\"ddxx\" id=\"$id\"><img src=\"data/ok.gif\" border=\"0\"></a></a>";
}
echo"<a href=\"http://www.geobytes.com/IpLocator.htm?GetLocation&IpAddress=$ip\" target=\"_blank\">";
echo"<img src=\"data/ip20.png\" border=\"0\" alt=\"$ip\" title=\"$ip\"><a href=\"http://$website\" target=\"_blank\"><img src=\"data/link.gif\" border=\"0\"></a>";
echo"<br />";
echo"<p class=\"editme1\" id=\"$id\">$comment</p></font>";
echo"<hr noshade size=\"1\"></div>";
}
if($id==""){
echo"<font size=\"2\" face=\"arial\">There are no new <b>messages</b> since your last visit.<br /> ";
echo"To view older messages, please check <b>Moderate messages</b> section";
}
?></div></td></tr><tr><td>
<div id="boxs_admin"><font face="arial" size="2" valign="top">&nbsp;<b>Admin Feedbacks</b></font></div>
<div id="boxs_under_admin"><?php
$sql = mysql_query("SELECT * FROM admin_messages " );
while($res = mysql_fetch_array($sql))
{
$ida			=	$res['id'];
$ip			=	$res['ip'];
$name		=	ucfirst($res['name']);
$email		=	$res['email'];
$time		=	$res['date'];
$website	=	$res['website'];
$comment	=	$res['comment'];
$comment	=   nl2br($comment);
$allow		= 	$res['allow'];
echo"<div><a href=\"mailto:$email\">$name</a>";
echo"<font size=\"1\">on $time</font>";
echo"<a href=\"#\" class=\"ddadmin\" id=\"$ida\"><img src=\"data/del.png\" border=\"0\"></a>";
if($website !==""){
echo"<a href=\"http://www.geobytes.com/IpLocator.htm?GetLocation&IpAddress=$ip\" target=\"_blank\">";
echo"<img src=\"data/ip20.png\" border=\"0\" alt=\"$ip\" title=\"$ip\"><a href=\"http://$website\" target=\"_blank\"><img src=\"data/link.gif\" border=\"0\"></a>";
}
echo"<br />";
echo"<font size=\"2\">$comment</font>";
echo"<hr noshade size=\"1\"></div>";
}if($ida==""){
echo"There are no new messages since your last visit.<br /> ";
}
?>
</div></td></tr><tr><td><br /><br /><br /><br />
</td></tr><tr><td><div id="boxs_under_sett" href="#"><font size="2" face="arial"><b>&nbsp;Settings</b></div>
<div id="boxs_under_xsett"><div id="oops"></div><form id="submitform" action="form.php" method="post">
<table border="0" cellspacing="0" cellpadding="0" width="80%" >
<tr><td>Email</td><td><input type="text" size="25" name="email_add" value="<?php echo $data[email]; ?>"></td></tr>
<tr><td>Post&nbsp;per&nbsp;page</td><td><input type="text" name="post_page" size="15" value="<?php echo $data['post_page']; ?>"></td></tr>
<tr><td>Page title</td><td><input type="text" size="15" name="title" value="<?php echo $data['title']; ?>"></td></tr>
<tr><td>Description</td><td><input type="text" size="15" name="descriptio" value="<?php echo $data['descriptio']; ?>"></td></tr>
<tr><td>Keywords</td><td><input type="text" size="15" name="keyword" value="<?php echo $data['keyword']; ?>"></td></tr>
<tr><td>Language</td><td>
<select name="lang" >
			<?php 
			$dh = opendir( "../lang" );
			while( $file = @readdir( $dh ) ){
			if( preg_match( "/[.]php$/", $file ) ){
			$file = preg_replace( "/[.]php$/", "", $file );
			$files []= $file;
			}}$l1=$data[language];
			$l1=str_replace(".php","",$l1);

			?>
			<?php foreach( $files as $file ) { ?>
			&nbsp;<option value="<?php echo($file); ?>"
			<?php echo ( $file == $l1 ? "selected" : "" ); ?>
			><?php echo ucfirst($file); ?></option>
			<?php } ?>
</select></td></tr><tr><td></td><td><br /></td></tr>
<tr><td>Counter Value</td><td><input type="text" size="15" name="counter_value" value="<?php echo $data['visits']; ?>"></td></tr>
<tr><td>Ban words</td><td><input type="text" size="15" name="ban_words" value="<?php echo $data['ban_words']; ?>"></td></tr>
<tr><td>Ban IP</td><td><input type="text" size="15" name="ban_ip" value="<?php echo $data['ban_ip']; ?>"></td></tr>
<tr><td>Display IP</td><td><input type="checkbox" name="display_ip" value="1" <?php if ($data['display_ip']=="1") echo ' checked="checked"'; ?>  /></td></tr>
<tr><td>Display Counter</td><td><input type="checkbox" name="display_co" value="1" <?php if ($data['display_co']=="1") echo ' checked="checked"'; ?>  /></td></tr>
<tr><td>Display Email</td><td><input type="checkbox" name="display_em" value="1" <?php if ($data['display_em']=="1") echo ' checked="checked"'; ?>  /></td></tr>
<tr><td>Display Website</td><td><input type="checkbox" name="display_we" value="1" <?php if ($data['display_we']=="1") echo ' checked="checked"'; ?>  /></td></tr>
<tr><td>Display Online</td><td><input type="checkbox" name="display_on" value="1" <?php if ($data['user_onlin']=="1") echo ' checked="checked"'; ?>  /></td></tr>

<tr><td>Allow Autopost</td><td><input type="checkbox" name="auto_post" value="1" <?php if ($data['auto_post']=="1") echo ' checked="checked"'; ?>  /></td></tr>
<tr><td>Emotion</td><td><input type="checkbox" name="emotion" value="1" <?php if ($data['emotion']=="1") echo ' checked="checked"'; ?>  /></td></tr>
<tr><td>Required Email</td><td><input type="checkbox" name="req_email" value="1" <?php if ($data['req_email']=="1") echo ' checked="checked"'; ?>  /></td></tr>
<tr><td>Required Name</td><td><input type="checkbox" name="req_name" value="1" <?php if ($data['req_name']=="1") echo ' checked="checked"'; ?>  /></td></tr>
<tr><td></td><td><input type="hidden" name="submitted" value="true" /><input type="submit" class="button"  value=" SAVE " /></td></tr>
</table></div></td></tr><tr><td><div id="view_all"><font face="arial" size="2">&nbsp;<b>Moderate messages</b></font></div>
<div id="boxs_under_x"><div id="view_all_all">
<?php
$sql = mysql_query("SELECT * FROM guestbook order by ID DESC" );
while($res = mysql_fetch_array($sql))
{
$id			=	$res['id'];
$ip			=	$res['ip'];
$name		=	ucfirst($res['name']);
$email		=	$res['email'];
//$time		=	$res['date'];
$time		=	date('dS-My', $res['date']);
$website	=	$res['website'];
$comment	=	$res['comment'];
$comment	=   nl2br($comment);
$allow		= 	$res['allow'];
echo"<div><a href=\"mailto:$email\">$name</a>";
echo"<font size=\"1\">on $time</font>";
echo"<a href=\"#\" class=\"ddb\" id=\"$id\"><img src=\"data/del.png\" border=\"0\"></a>";
if($allow !== "0"){
echo"<a href=\"#\" class=\"ddx\" id=\"$id\"><img src=\"data/warning.gif\" border=\"0\"></a>";
}else{
echo"<a href=\"#\" class=\"ddxx\" id=\"$id\"><img src=\"data/ok.gif\" border=\"0\"></a></a>";
}
echo"<a href=\"http://www.geobytes.com/IpLocator.htm?GetLocation&IpAddress=$ip\" target=\"_blank\">";
echo"<img src=\"data/ip20.png\" border=\"0\" alt=\"$ip\" title=\"$ip\"><a href=\"http://$website\" target=\"_blank\"><img src=\"data/link.gif\" border=\"0\"></a>";
echo"<br />";
echo"<p class=\"editme1\" id=\"$id\">$comment</p></font>";
echo"<hr noshade size=\"1\"></div>";
}
?>
</div></div></td></tr>
<tr><td><div href="#" id="boxs_down"><font face="arial" size="2">&nbsp;<b>Database Backup</a></b></font><img src="data/arrow.png" border="0"></div>
<div id="boxs_under_down"><table border="0"><tr><td>
<?php
					require_once("sql.php");
					$dumper = new dumper($dbname);
					$str = $dumper->newdump();
					$ll=$str;
					echo'<br /><textarea name="sqldump" cols="70" rows="20" id="SQLDUMP" wrap="OFF">';
					echo"$ll";
					echo'</textarea>';
					?>
</td></tr></table>
</div></td></tr>
<tr><td><div id="boxs_down_update"><font face="arial" size="2">&nbsp;<b>Updates</b></font></div>
<div id="boxs_under_down_update"><a href="http://softacme.com/radhikagb/updates/radhikagb_final1/" target="_blank"> <img src="http://softacme.com/radhikagb/updates/radhikagb_final1/update_radhikagb_final1.png" border="0" alt="check for update"></a><br />
<a href="http://softacme.com/radhikagb/ads/ads" target="_blank">
<img src="http://softacme.com/radhikagb/ads/ads.png" border="0" alt=""></a><br />

</div></td></tr></table>
<center>
<font face="arial" size="2">&copy;2010 <a href="http://softacme.com/radhikagb/" title="RadhikaGB" target="_blank">
RadhikaGB</a> - 
<a href="http://softacme.com/radhikagb/support/" target="_blank" title="help center">Help Center</a>
</div></center></center></body></html>
Return current item: RadhikaGB