2,19c2,3
< // getmelist.php - RJM Programming - September, 2014
<
< function breadcrumbed($inp) {
< if (strpos($_SERVER['HTTP_HOST'], "rjmprogramming.com.au") !== false) {
< $stuff = explode("/", $inp);
< $outp = "/";
< for ($k=0; $k", "tag=" . $stuff[$k] . "'>" . $stuff[$k] . "", $outp);
< $outp = $inp;
< }
< }
< return str_replace("", "", $outp);
< }
<
< if (!isset($_GET['look'])) {
< header("Location: " . $_SERVER['REQUEST_URI'] . "?look=POST&tableid=[id]&tableth=[label]&tdbasis=[v]");
< }
< if (isset($_GET['look']) || 1 == 1) { // analyze posted data
---
> // json_array_post.php - RJM Programming - August, 2014
> if (isset($_GET['look'])) { // analyze posted data
22c6
< $htmlis = "RJM Programming Blog GETME Summary - September, 2014
---
> $htmlis = "
79c63
< if ($_GET['look'] == "POST" || 1 == 1) {
---
> if ($_GET['look'] == "POST") {
92,105c76,83
<
<
< // Create table of downloadable code at RJM Programming Wordpress blog ... http://www.rjmprogramming.com.au/wordpress
< // RJM Programming - September, 2014
< // Date FileLink Path Extension DiffLinkAsApplicable WordpressSearchLink
< exec("find " . dirname(__FILE__) . "/ -name '*GETME' | sort > /tmp/basegetmelist.is 2> /dev/null");
< $overall = file_get_contents("/tmp/basegetmelist.is");
< $arroverall = explode("\n", $overall);
<
< $htmlis = str_replace("", "", $htmlis);
< $rowdattemplate = "
";
<
< $qarr = array("Date (GMT)", "File", "Path off " . str_replace($_SERVER['DOCUMENT_ROOT'], "http://" . $_SERVER['HTTP_HOST'], dirname(__FILE__)) . "/", "Extension", "Blog Search Link", "Code Difference Link");
< foreach ($qarr as &$qvalue) {
---
> foreach($_POST as $key=>$value) {
> //echo str_replace("-", "[", str_replace("_", "]", $key)).'='.$value."\n";
> //if (str_replace("-", "[", str_replace("_", "]", $key)) == "table[cols][0][id]") {
> if ($done == "" && strpos(str_replace("-", "[", str_replace("_", "]", $key)), $idbasis) !== false) {
> $done = "y";
> $htmlis = str_replace("", "", $htmlis);
> }
> if ($done == "y" && strpos(str_replace("-", "[", str_replace("_", "]", $key)), $thbasis) !== false) {
107c85
< $htmlis = str_replace("", "" . $qvalue . " | ", $htmlis);
---
> $htmlis = str_replace("", "" . $value . " | ", $htmlis);
109,122c87,97
< $rowdattemplate = str_replace("", "" . $numcols . " | ", $rowdattemplate);
< }
<
< date_default_timezone_set('England/London');
< $dsuff = "?datetime=" . date("Ymd.His");
< $t = 1;
< for ($i=0; $i } else if ($done == "y" && strpos(str_replace("-", "[", str_replace("_", "]", $key)), $tdbasis) !== false) {
> if ($thiscols == 0) $rowdat = "";
> $rowdat .= "| " . $value . " | ";
> $thiscols++;
> if ($thiscols == $numcols) {
> $htmlis = str_replace("", $rowdat . "", $htmlis);
> $thiscols = 0;
> $rowdat = "";
> } else if (strpos(str_replace("-", "[", str_replace("_", "]", $key)), $idbasis) !== false) {
> $done = "Yes";
> }
124,149c99,104
< //echo "$filename was last modified: " . date ("F d Y H:i:s.", filemtime($arroverall[$i]));
<
< $myfile = str_replace("/", "", str_replace(dirname($arroverall[$i]) . "/", "", $arroverall[$i]));
< $mypath = str_replace("./", "", str_replace("#!", "", str_replace("#!/", "", str_replace("//", "", str_replace(dirname(__FILE__), "#!", dirname($arroverall[$i]) . "/")))));
<
< $rowdat = $rowdattemplate;
<
< $rowdat = str_replace(">1", ">" . date ("Ymd.His", filemtime($arroverall[$i])) . "", $rowdat);
< $rowdat = str_replace(">2", ">" . "" . $myfile . "", $rowdat);
< $rowdat = str_replace(">3", ">" . breadcrumbed($mypath) . "", $rowdat);
< $rowdat = str_replace(">4", ">" . $myext . "", $rowdat);
<
< if (strpos($_SERVER['HTTP_HOST'], "rjmprogramming.com.au") !== false) {
< $rowdat = str_replace(">5", ">" . "" . $fil[sizeof($fil) - 1] . "", $rowdat);
< if (strpos($arroverall[$i], "--GETME") !== false || strpos($arroverall[$i], "__GETME") !== false || strpos($arroverall[$i], "-GETME") !== false || strpos($arroverall[$i], "_GETME") === false) {
< if (!file_exists(str_replace("-" , "_", str_replace("__" , "_", $arroverall[$i]))) && str_replace("-" , "_", str_replace("__" , "_", $arroverall[$i])) != $arroverall[$i]) {
< $rowdat = str_replace(">6", ">", $rowdat);
< } else {
< $rowdat = str_replace(">6", ">" . "" . $fil[sizeof($fil) - 1] . "", $rowdat);
< }
< } else {
< $rowdat = str_replace(">6", ">", $rowdat);
< }
< } else {
< $rowdat = str_replace(">5", ">", $rowdat);
< $rowdat = str_replace(">6", ">", $rowdat);
---
> }
> if ($done == "") {
> $done = "n";
> $htmlis = "";
> foreach($_POST as $key=>$value) {
> if ($key != "look") $htmlis = str_replace("