error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING); //error_reporting(E_ALL ^ E_DEPRECATED ^ E_STRICT ^ E_NOTICE); //error_reporting (E_ALL ^ E_NOTICE); // variables to connect database // CC-Connection $hostname = "localhost"; //"64.150.176.191"; $username = "userlawattguide"; $password = "W9VefiWq4V8QhMng!"; $database = "lawattguide"; /* // HN-Connection $hostname = "lawyersattguide.db.5809414.e95.hostedresource.net"; //"64.150.176.191"; $username = "lawyersattguide"; $password = "W9VefiWq4V8QhMng!"; $database = "lawyersattguide"; */ date_default_timezone_set('America/New_York'); $today = date("m/d/Y",time()); $company_name = "Lawyers Attorneys Guide"; $domain = "https://www.lawyersattorneysguide.com/"; //"https://www.tblmedia.com/"; // $admin_email = "info@lawyersattorneysguide.com"; $WEBNAME = "www.lawyersattorneysguide.com"; $bad_words = array('a','and','the','an','it','is','with','can','of','why','not'); $input = array("Lawyer","Attorney","Legal Services","Law Firm","Legal Counsel","Legal Representation","Personal Injury Attorney","Criminal Defense Lawyer","Family Law Attorney","Divorce Lawyer","Civil Litigation Attorney","Employment Lawyer","Estate Planning Attorney","Immigration Attorney","Corporate Lawyer","Real Estate Attorney","Trial Attorney","Bankruptcy Lawyer","Criminal Law Attorney","Medical Malpractice Lawyer","Tax Attorney","Workers' Compensation Attorney","Environmental Lawyer","Immigration Lawyer","Intellectual Property Attorney","Employment Law Attorney","Business Litigation Lawyer","Patent Attorney","Business Attorney","Social Security Disability Attorney","Child Custody Lawyer","Criminal Defense Attorney","Personal Injury Lawyer","Family Law Lawyer","Estate Planning Lawyer","DUI Attorney (Driving Under the Influence)","Probate Attorney","Real Estate Lawyer","Bankruptcy Attorney","Workers' Compensation Lawyer","Medical Malpractice Attorney","Tax Lawyer","Intellectual Property Lawyer","Immigration Law Firm","Adoption Attorney","Securities Lawyer","Divorce Attorney","Insurance Lawyer","Trusts and Estates Attorney","Employment Discrimination Lawyer"); $rand_keys = array_rand($input, 11); $inputSID = array("8111", "811104", "811105", "811107", "811120", "811145", "811149", "811153", "811154", "811155", "811156", "811157", "811158", "811159", "811160", "811161", "811162", "811163", "811164", "811165", "811166", "811167", "811168", "811169", "811170", "811171", "811172", "811173"); shuffle($inputSID); $maintopic = "Lawyers and Attorneys"; $secretKey = '6LfWYxApAAAAAGqBnCXe4xfh-rkjFRHeDBJAHvT8';//v2 //google captcha key ?> $conn = NULL; function dbOpen() { global $conn; if ($conn!=NULL) // already opened return; global $hostname, $username, $password, $database; $conn = mysqli_connect($hostname, $username, $password, $database); if ($conn) { mysqli_select_db($conn, $database); } return ($conn!=NULL); } function dbClose() { global $conn; if ($conn) { mysqli_close($conn); $conn = NULL; } } function dbRun($sql) { global $conn; dbOpen(); if (!$conn) return false; return mysqli_query( $conn, $sql); } function db_effected_rows() { global $conn; return mysqli_affected_rows($conn); } function dbNewID() { global $conn; return mysqli_insert_id($conn); } function validate_text_output(&$in, $bReplaceDoubleQuote=TRUE, $newDoubleQuote="``") { if (!get_magic_quotes_gpc()) return; if (!is_array($in)) { $in = stripslashes($in); if ($bReplaceDoubleQuote) $in = str_replace('"', $newDoubleQuote, $in); return; } else { foreach ($in as $key => $val) { $val = stripslashes($val); if ($bReplaceDoubleQuote) $val = str_replace('"', $newDoubleQuote, $val); $in[$key] = $val; } } } function validate_text_input(&$in) { if (get_magic_quotes_gpc()) return; if (!is_array($in)) { $in = addslashes($in); return; } else { foreach ($in as $key => $val) { $val = addslashes($val); $in[$key] = $val; } } } function paging($start_page, $page_size, $total, $url_template) { $num = (int)($total/$page_size); if ($num*$page_size<$total) $num++; if ($num<=1) return ""; $ret = ""; for ($i=1; $i<=$num; ++$i) { $strPage = ""; if ($i>1) { $strPage = $i; } $url = str_replace("[PG]", $strPage, $url_template); if ($i==$start_page) { $text = "$i"; } else { $text = "$i"; } if ($ret!="") $ret .= " "; $ret .= $text; } return $ret; } function pagingmoreAPT($page, $numpage, $specialtyDir, $option) { global $domain, $keyword; if ($option == 1) $tail = ".html"; else $tail = ""; $iFPage = $page - 5; if($iFPage<1){$iFPage=1;} if($numpage<10) { $iLPage = $iFPage + $numpage - 1; } else { if(($numpage-$page)>4){$iLPage = $iFPage + 9;}else{$iLPage=$numpage;} } if($numpage>1) { echo "