") !== false) { $xpcont=explode("[/caption]

", $pcont)[1]; } else if (strpos($xpcont, "[/caption]") !== false) { $xpcont=explode("[/caption]", $pcont)[1]; } $paras = explode(" 2) { $oth = explode("<", $paras[1]); $retval = " ... "; for ($i=0; $i", $oth[$i]); $retval .= str_replace("'", "`", str_replace("}", " ", str_replace("{", " ", $huh[-1 + sizeof($huh)]))); } return substr($retval,0,200); } return ""; } function permalinkit($ins) { global $pdate; $outs=strtolower($ins); $outs=str_replace("+","",$outs); $outs=str_replace(".","",$outs); $outs=str_replace("#","",$outs); $outs=str_replace("/","",$outs); $outs=str_replace(" ","-",$outs); $outs=str_replace(" ","-",$outs); $outs=str_replace("\\", "",$outs); $outs=str_replace("!", "",$outs); $outs=str_replace(",", "",$outs); $outs=str_replace("---","-",$outs); $outs=str_replace("--","-",$outs); if (str_replace('code-download-table','',$outs) != $outs) { $xp=explode("GETME", $pdate); $prexp=explode("/", $xp[0]); $postprexp=explode(".", $prexp[-1 + sizeof($prexp)]); $extis = str_replace("GETME","",str_replace("-","",str_replace("_","",$postprexp[-1 + sizeof($postprexp)]))); $outs="../getmelist.htm?topoff=150&tsp=" . rand(100, 2000000) . "#" . $postprexp[0] . "." . str_replace($extis,"",$postprexp[-1 + sizeof($postprexp)]) . "GETME" . $extis; } return $outs; } $delim = "Is Mentioned By - RJM Programming - August, 2016"; $retval = ""; $ourtitle = ""; $criteria = ""; if (isset($_GET['title'])) { $ourtitle = urldecode($_GET['title']); } else if (isset($_POST['title'])) { $ourtitle = urldecode($_POST['title']); } $ourother = $ourtitle; if ($ourtitle != "") { $words = explode(" ", str_replace(" Tutorial", "", $ourtitle)); if (sizeof($words) > 5) { $criteria = $words[0] . " " . $words[1] . " " . $words[2] . " " . $words[3]; $ourother = $criteria; } else if (sizeof($words) > 4) { $criteria = $words[0] . " " . $words[1] . " " . $words[2]; $ourother = $criteria; } else if (sizeof($words) > 3) { $criteria = $words[0] . " " . $words[1]; $ourother = $criteria; } } if ($ourtitle != "") { $hostname = 'localhost'; /*** mysql username ***/ $username = 'username'; /*** mysql ***/ $password = 'password'; $dbname = 'database_name'; if (isset($_GET['dbname'])) $dbname = $_GET['dbname']; $tname = 'wp_posts'; $link = mysql_connect($hostname, $username, $password); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname); $res = mysql_query("SELECT " . $tname . ".post_title, " . $tname . ".guid, " . $tname . ".post_content, LOCATE('" . $ourtitle . "'," . $tname . ".post_content) as tfind, LOCATE('" . $ourother . "'," . $tname . ".post_title) as tother, " . $tname . ".post_date as post_date FROM " . $tname . " WHERE " . $tname . ".post_status = 'publish' " . " AND (1 = 1 OR LOWER(" . $tname . ".post_title) != LOWER('" . $ourtitle . "')) " . " AND (" . $tname . ".post_content like CONCAT(CONCAT('%?p='," . $tname . ".guid), '%') " . " OR " . $tname . ".post_content like '%" . str_replace('youllneverfindthis','%',permalinkit($ourtitle)) . "%' " . " OR " . $tname . ".post_content like '%" . str_replace('youllneverfindthis','%',$ourother) . "%' " . " OR " . $tname . ".post_content like '%" . str_replace('youllneverfindthis','%',$ourtitle) . "%') UNION SELECT 'Code Download Table' as post_title, " . $tname . ".post_content as guid, '' as post_content, 1 as tfind, 0 as tother, CURTIME() as post_date FROM " . $tname . " WHERE " . $tname . ".post_status = 'publish' " . " AND LOWER(" . $tname . ".post_title) = LOWER('" . $ourtitle . "') " . " AND " . $tname . ".post_content like '%GETME%' ORDER BY post_date "); if ($res == 0) { if (1 == 2) echo("Error " . mysql_errno() . ": " . mysql_error() . ""); } else if (mysql_num_rows($res) == 0) { if (1 == 2) echo("Query executed successfully"); $retval=$delim; $retval = str_replace(" }", " parent.document.getElementById('d" . permalinkit($ourtitle) . "').innerHTML=''; }", $retval); } else { while (($r_array = mysql_fetch_row($res))) { if (strtolower($r_array[0]) == strtolower($ourtitle)) { $isize++; $retval = str_replace(" }", " isize++; theseopts=theseopts.replace(' size=' + eval(-1 + isize) + ' ', ' size=' + isize + ' ').replace('>','>'); }", $retval); } else { $pdate = $r_array[1]; if ($retval == "") { $retval=$delim; $retval = str_replace(" }", " var theseoptions=''; }", $retval); $retval = str_replace(" }", " var theseopts=''; }", $retval); //$retval = str_replace(" }", " var theseopts=''; }", $retval); } if ($r_array[3] != "0") $retval = str_replace(" }", " theseoptions=theseoptions.replace('',''); }", $retval); if ($criteria != "") { if (str_replace($criteria, "", $r_array[0]) != $r_array[0] && $r_array[4] != "0") { $found = true; $isize++; $retval = str_replace(" }", " isize++; theseopts=theseopts.replace(' size=' + eval(-1 + isize) + ' ', ' size=' + isize + ' ').replace('>','>'); }", $retval); } } } } if ($retval != "") { if (!$found) { $retval = str_replace(" }", " theseopts=''; }", $retval); } else { $retval = str_replace(" }", " theseoptions+=(' ' + theseopts); }", $retval); } $retval = str_replace(" }", " parent.document.getElementById('d" . permalinkit($ourtitle) . "').innerHTML=theseoptions; parent.checkclass(\"\"); }", $retval); //$retval = str_replace(" }", " parent.document.getElementById('d" . permalinkit($ourtitle) . "').innerHTML=theseoptions; }", $retval); } } mysql_close($link); if ($retval != "") { echo $retval; } } ?>