Are you sure to delete '.blogtitle(bloglink(($_GET['blog']))).'? Cancel | Yes
';
}
}
elseif(isset($_GET['blog']) && isset($_GET['edit']))
{
if(!isset($_SESSION['user']))
{
$_SESSION['errorlogin']='You must be logged in to access this page.';
header('location:'.$ur['blog_dir'].'?login&forward='.urlencode($_SERVER['REQUEST_URI']));
die();
}
$_GET['blog']=trim($_GET['blog']);
form_edit($_GET['blog'], $ur);
}
elseif(isset($_GET['blog']) && isset($_GET['comment']))
{
if(!isset($_SESSION['user']))
{
$_SESSION['errorlogin']='You must be logged in to access this page.';
header('location:'.$ur['blog_dir'].'?login&forward='.urlencode($_SERVER['REQUEST_URI']));
die();
}
$_GET['blog']=trim($_GET['blog']);
$_GET['comment']=trim($_GET['comment']);
if($_GET['comment']=='enable')
{
mysql_query("update blog set blogcmtonoff='1' where id='{$_GET['blog']}'") or die(mysql_error());
$_SESSION['statusmsg']='Post comment was successfully enabled.';
header('Location:'.$ur['blog_dir'].blogpermalink($_GET['blog']));
die();
}
if($_GET['comment']=='disable')
{
mysql_query("update blog set blogcmtonoff='0' where id='{$_GET['blog']}'") or die(mysql_error());
$_SESSION['statusmsg']='Post comment was successfully disabled.';
header('Location:'.$ur['blog_dir'].blogpermalink($_GET['blog']));
die();
}
}
elseif(isset($_GET['login']))
{
if(isset($_POST['username']) && isset($_POST['password']))
{
$_POST['username']=trim(addslashes($_POST['username']));
$_POST['password']=trim(addslashes($_POST['password']));
setcookie("login", stripslashes($_POST['username']), time()+604800);
$g=mysql_query("select password from user where name='{$_POST['username']}' and password='{$_POST['password']}' and id='1'") or die("!".mysql_error());
if(mysql_num_rows($g)!=0)
{
$_SESSION['user']=$_POST['username'];
if(empty($_POST['forward'])) $_POST['forward']=$ur['blog_dir'];
header('Location:'.$_POST['forward']);
die();
}
else
{
$_SESSION['loginerror']='Username and password do not match.';
if(!empty($_POST['forward'])) $_POST['forward']='&forward='.$_POST['forward'];
header('Location:?login'.$_POST['forward']);
die();
}
}
else
{
echo '
';
$huteri=mysql_query("select * from kategori order by catlink") or die(mysql_error());
$huterim=mysql_query("select count(id) from blog") or die(mysql_error());
$c=mysql_fetch_row($huterim);
while($manza=mysql_fetch_row($huteri))
{
echo ''.$manza[1].' Category ['.jmlpercat($manza[0]).' Posts]
';
$cid=catlinkid($manza[2]);
$a=mysql_query("select id, title, bloglink, text, cat_id, date_format(time, '%d %b %y') as 'time', date_format(uptime, '%d %b %Y') as 'uptime', uptime as 'timeorder', hit, hittoday, user_id from blog where cat_id='$cid' order by timeorder desc") or die(mysql_error());
while($b=mysql_fetch_array($a))
{
echo '
';
$arr=mysql_query("select * from user_online order by user_ip") or die(mysql_error());
while($ero=mysql_fetch_array($arr))
{
$location=$ero['user_location'];
$ero['user_browser']=strip_tags($ero['user_browser']);
if($ero['user_location']=="/") $ero['user_location']="Home";
echo '