query($getBareActCategorySQL);
$bareActSQL = "SELECT b.*, bc.title as bareactCategory from bareact as b LEFT JOIN bareact_categories as bc ON bc.id=b.category_id where b.status='1' and b.url='".addslashes($bareactURL)."'";
$bareActInfo = $DB_site->query($bareActSQL);
if($bareActInfo->num_rows<1)
{
$bareActSQL = "SELECT b.*, bc.title as bareactCategory from bareact as b LEFT JOIN bareact_categories as bc ON bc.id=b.category_id where b.status='1' and REPLACE(REPLACE(REPLACE(REPLACE(LOWER(b.title), ' ', '-'), '(', ''), ')', ''), ',', '')='".addslashes($bareactURL)."'";
$bareActInfo = $DB_site->query($bareActSQL);
}
$bareActDetails = $DB_site->fetch_array($bareActInfo);
$excludeBareactID = @$bareActDetails["id"];
$bareActArticleCategoryID = (isset($bareActDetails["article_category_id"]) && $bareActDetails["article_category_id"]>0) ? $bareActDetails["article_category_id"] : '0';
$reqCategory = $bareActDetails["category_id"];
$curPageURL = SITE_URL."docs/".$bareactURL;
$loginPageURL = SITE_URL.'member/mlogin.php3?redirect_url='.$curPageURL;
$definedMetaTitle = str_replace(',', '', $bareActDetails["title"]). " Indian Bare Acts - India Bare Act - Law Firm Lawyers India";
$definedMetaDescription = str_replace(',', '', $bareActDetails["title"])." in India Bare Acts, Banking and Insurance, Business and Corporate, Constitutional, Consumer Laws, Criminal Law, Energy, Environmental, Family and Inheritance, Heritage and National Importance, Immigration Law, Labor Law, ".str_replace(',' ,'', $bareActDetails["title"])." National Security, Others, Procedural and Administration, Property Related, Public Utilities, Shipping Laws, Tax Laws";
$definedMetaKeywords = "law firm, lawyer, Criminal, Civil lawyer, family, Business, law firms, solicitor, income tax law, sales tax lawyer, matrimonial, marriage, court, advocate, advocates, company, solicitors, Patents attorney, trademarks attorneys, Immigration Lawyers, law firms, commercial disputes, tribunal, MRTP, SAT";
$meta_title = (isset($bareActDetails["meta_title"]) && $bareActDetails["meta_title"]!='') ? stripslashes(trim($bareActDetails["meta_title"])) : $definedMetaTitle;
$meta_description = (isset($bareActDetails["meta_description"]) && $bareActDetails["meta_description"]!='') ? stripslashes(trim($bareActDetails["meta_description"])) : $definedMetaDescription;
$meta_keywords = (isset($bareActDetails["meta_keywords"]) && $bareActDetails["meta_keywords"]!='') ? stripslashes(trim($bareActDetails["meta_keywords"])) : $definedMetaKeywords;
$bareactCommentsSQL = "SELECT * FROM comment_on_articles WHERE `status`='Approved' AND `type`='".$commentType."' AND `type_id`='".$bareActDetails["id"]."' AND (parent_comment_id='0' or parent_comment_id IS NULL)";
$bareactCommentsInfo = $DB_site->query($bareactCommentsSQL);
$totalBareactComments = $bareactCommentsInfo->num_rows;
$otherBareActSQL = "SELECT DISTINCT(title), url from bareact where status='1' AND id!='".$bareActDetails["id"]."' order by id DESC";
$pageOtherBareActSQL = $otherBareActSQL." limit 16";
$otherBareActInfo = $DB_site->query($pageOtherBareActSQL);
$totalOtherBareActInfo = $DB_site->query($otherBareActSQL);
$totalPage = ceil($totalOtherBareActInfo->num_rows/16);
$relatedArticleSQL = "SELECT il.*, ilc.`category`, ilc.`url` as 'category_url', ilcd.`code`
FROM india_law il
INNER JOIN india_law_code ilcd ON ilcd.`id`=il.`code_id`
INNER JOIN india_law_category ilc ON ilc.`id`=il.`category_id`
where il.`status`='1' AND ilc.`id`='".addslashes($bareActArticleCategoryID)."' ORDER BY il.id DESC LIMIT 3";
$relatedArticleInfo = $DB_site->query($relatedArticleSQL);
$newTheme = true;
$pageCSS = '';
include_once($_SERVER['DOCUMENT_ROOT']."/includes_responsive/header.php");
function displayAllComments($articleID, $commentID='0', $reqSort='asc', $doFindChild=false)
{
global $DB_site, $loginPageURL, $commentType;
$comentsHTML = '';
$isLoggedin = ((isset($_SESSION['loginname']) && $_SESSION['loginname']!='') ? $_SESSION['loginname']: false);
if($articleID>0)
{
$articleCommentsSQL = "SELECT coa.*, (CASE WHEN admin_id='0' THEN concat(hu.`first_name`, ' ', hu.`last_name`) ELSE 'Admin' END) as 'display_name' FROM comment_on_articles coa LEFT JOIN `member_login` hu ON hu.`id`=coa.`user_id` LEFT JOIN admin ad ON ad.`id`=coa.`admin_id` WHERE coa.`status`='Approved' AND coa.`type`='".$commentType."' AND coa.`type_id`='".$articleID."'";
if($doFindChild && $commentID>0)
{
$articleCommentsSQL .= " AND parent_comment_id='".$commentID."'";
} else
{
$articleCommentsSQL .= " AND (parent_comment_id='0' or parent_comment_id IS NULL)";
}
$articleCommentsSQL .= " order by id $reqSort";
//echo '
'.$articleCommentsSQL.'
';
$articleCommentsInfo = $DB_site->query($articleCommentsSQL);
if($articleCommentsInfo->num_rows>0)
{
if($doFindChild && $commentID>0)
{
while($articleCommentsData = $DB_site->fetch_array($articleCommentsInfo))
{
$postedTime = (date("F n, Y", strtotime($articleCommentsData["doc"])));
$postedTime .= ' at ';
$postedTime .= (date("H:i a", strtotime($articleCommentsData["doc"])));
$comentsHTML .= '
'.stripslashes($articleCommentsData["comments"]).'
'; if($isLoggedin) { $comentsHTML .= ' '; } else { $comentsHTML .= ' '; } $comentsHTML .= displayAllComments($articleID, $articleCommentsData["id"], $reqSort, true); $comentsHTML .= ''; $comentsHTML .= '
'.stripslashes($articleCommentsData["comments"]).'
'; if($isLoggedin) { $comentsHTML .= ' '; } else { $comentsHTML .= ' '; } // Cal Recursive $comentsHTML .= displayAllComments($articleID, $articleCommentsData["id"], $reqSort, true); $comentsHTML .= '").addClass("text-success submissionError").text( d.message ) ); } else if(typeof(d.status)!='undefined') { $("#postEnquiryFRM").prepend( $("
").addClass("text-danger submissionError").text( d.message ) ); } }, "json"); } }); $(".reply-button .replyOnArticle").on("click", function() { let comentsHTML = '
'; if($(".replyCommentFRMWrapper").length>0) { $(".replyCommentFRMWrapper").remove(); } $(comentsHTML).insertAfter($(this).parent()); $(".replyCommentFRMWrapper input[name=main]").val( $(this).data("identifier") ); replyOnQuery(); }); }); function replyOnQuery() { $(".replyOnQueryBtn").on("click", function() { let postname = $.trim($("#postEnquiryFRM input[name=post_name]").val()); let replyname = $.trim($(".replyCommentFRMWrapper input[name=main]").val()); let comments = $.trim($(".replyCommentFRMWrapper input[name=comments]").val()); if(comments!='') { $.post('$postUserEnquiry', {"enquiry_type": "$commentType", "article": postname, "comments": comments, "main": replyname}, function(d) { $(".replyCommentFRMWrapper .submissionError").remove(); if(d.status=='true') { $(".replyCommentFRMWrapper").prepend( $("").addClass("text-success submissionError").text( d.message ) ); setTimeout(function(){ $(".replyCommentFRMWrapper").remove(); }, 5000); } else if(typeof(d.status)!='undefined') { $(".replyCommentFRMWrapper").prepend( $("
").addClass("text-danger submissionError").text( d.message ) ); } }, "json"); } }); } function renderPageData(elem) { $(".renderNextPage img").show(); let nextPage = parseInt('1'); let curPage = parseInt( $(".renderNextPage").data("cur") ); if($(elem).hasClass("renderNextPage")) { nextPage = curPage+1; } if(nextPage<='0') nextPage = parseInt('1'); $.post("$loadNewDataURL", {page: nextPage, limit: 16, excludeArticle: "$excludeBareactID"}, function(data) { if(data!='') { $(".other-latest-article .u-repeater-1").append(data); $(".renderNextPage").data("cur", nextPage); } $(".renderNextPage img").hide(); }); } EOF; $pageJS .= ''; include($_SERVER['DOCUMENT_ROOT']."/includes_responsive/footer.php"); ?>
'.$postedTime.'