include("core/init.php");
$key = $_GET["lnk"];
$sql = "SELECT * FROM `articles` WHERE `seo_link` = '$key'";
$result = mysqli_query($db, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($readpost = mysqli_fetch_assoc($result)) {
$aid = $readpost["id"];
$catid = $readpost["category_id"];
$name = $readpost["name"];
$description = $readpost["description"];
$imgurl = $readpost["img_url"];
$puid = $readpost["user_id"];
$views = $readpost["views"];
$mainlang = $readpost["main_lang"];
$date_added = $readpost["date_added"];
$oq = $readpost["oq"];
$seolink = $readpost["seo_link"];
$ago = _ago($date_added);
$jdt = date("l jS M Y : H:i",$date_added);
$alock = $readpost["alock"];
if (isset($myperm))
{ ////////// start 309
if($myperm>'1')
{
$editbutton = "";
}else{
$editbutton = "";
}
}else{
$editbutton = "";
} ////////// end 309
/////////////echo "$name here1";
//////echo "$aid";
if($imgurl!=='NULL')
{
$qimg = "$imgurl";
}else{
$qimg = '/user-images/logo.png';
}
if($alock=='1')
{
$lock ="
";
}else{
$lock ="
";
}
$alang = $mainlang;
$ptime = _ago($date_added);
$aid = $aid;
//////$q = mysql_fetch_assoc(mysql_query("SELECT `username`, `name` FROM `users` WHERE `user_id` = '$art[2]'"));
//////$byuser = $q['name'];
?>
echo "$sitename | $name"; ?>
include('gs.php');
?>
include('widget-topbar.php');
?>
echo $name; ?> echo "$lock"; ?>
Posted By KRUNAL
echo $name; ?> echo "$lock"; ?>
echo $editbutton; ?>
echo "

";
?>
echo "$description" ; ?>
solved
5
$sql = "SELECT * FROM `categories` WHERE `id` = '$catid'";
$result = mysqli_query($db, $sql);
if (mysqli_num_rows($result) > 0)
{
// output data of each row
while($readpost = mysqli_fetch_assoc($result))
{
$caturl = $readpost["ct_url"];
$cname = $readpost["name"];
}
}else{
$caturl = 'General-Knowledge';
$cname = 'General Knowledge';
}
?>
/"> echo "$cname"; ?>
echo $jdt; ?> ( echo "$ptime ago"; ?>)
echo "$aid";
?>
+22
//////include('widget-relatedpost.php');
//////include('widget-comment.php');
//////include('widget-lreply.php');
//////include('widget-addtags.php');
////// removed after applying 7.4 include('widget-similarq.php');
?>
include('footer.php');
}
}else{
echo "Error Here";
}
?>