5d4 < // Amended on 14/6/2016 to populate http://www.rjmprogramming.com.au/slideshow.html 17,18d15 < < $ulist = ";"; 20,41c17 < $and = ""; < $ptg = "post_title, guid,"; < $changethis = "youwillnevsfindthis"; < $changeto = "youwillnevsfindthis"; < $index = "index"; < if (isset($_GET['index'])) { < $index = $_GET['index']; < } else if (isset($_POST['index'])) { < $index = $_POST['index']; < } < if ($index != "index") { < if ($index == "slideshow") { < //$and = " and post_content like '%/" . '"' . "> $ulist = ";"; 76c52 < global $prevdod, $prevint, $prevret, $retvalp, $prevxid, $and, $ptg, $index; --- > global $prevdod, $prevint, $prevret, $retvalp, $prevxid; 86d61 < if ($index == "slideshow") return $ing; 98d72 < if ($index == "slideshow") return $ing; 117d90 < if ($index == "slideshow") return $ing; 142,146c115 < if ($index == "slideshow") { < $res = mysql_query("SELECT ID, post_date, " . $ptg . " DATE_FORMAT(post_date,'%Y%m%d') As pdate, IfNull(post_excerpt, '') As post_excerpt, 'zzz' as bpost_title FROM " . $tname . " WHERE post_status='publish' " . $and . " and post_title not like '%Show Tags of this Webpage%' and post_title not like '%Show Most Popular Words%' and (substr(IfNull(post_excerpt, ''),1,1) < '0' or substr(IfNull(post_excerpt, ''),1,1) > '9') ORDER BY bpost_title, post_date DESC"); < } else { < $res = mysql_query("SELECT ID, post_date, " . $ptg . " DATE_FORMAT(post_date,'%Y%m%d') As pdate, IfNull(post_excerpt, '') As post_excerpt, replace(post_title, ' ', LPAD(post_excerpt,13,'*')) as bpost_title FROM " . $tname . " WHERE post_status='publish' " . $and . " and post_title not like '%Show Tags of this Webpage%' and post_title not like '%Show Most Popular Words%' and substr(IfNull(post_excerpt, ''),1,1) >= '0' and substr(IfNull(post_excerpt, ''),1,1) <= '9' UNION SELECT ID, post_date, " . $ptg . " DATE_FORMAT(post_date,'%Y%m%d') As pdate, IfNull(post_excerpt, '') As post_excerpt, 'zzz' as bpost_title FROM " . $tname . " WHERE post_status='publish' " . $and . " and post_title not like '%Show Tags of this Webpage%' and post_title not like '%Show Most Popular Words%' and (substr(IfNull(post_excerpt, ''),1,1) < '0' or substr(IfNull(post_excerpt, ''),1,1) > '9') ORDER BY bpost_title, post_date DESC"); < } --- > $res = mysql_query("SELECT ID, post_date, post_title, guid, DATE_FORMAT(post_date,'%Y%m%d') As pdate, IfNull(post_excerpt, '') As post_excerpt, replace(post_title, ' ', LPAD(post_excerpt,13,'*')) as bpost_title FROM " . $tname . " WHERE post_status='publish' and post_title not like '%Show Tags of this Webpage%' and post_title not like '%Show Most Popular Words%' and substr(IfNull(post_excerpt, ''),1,1) >= '0' and substr(IfNull(post_excerpt, ''),1,1) <= '9' UNION SELECT ID, post_date, post_title, guid, DATE_FORMAT(post_date,'%Y%m%d') As pdate, IfNull(post_excerpt, '') As post_excerpt, 'zzz' as bpost_title FROM " . $tname . " WHERE post_status='publish' and post_title not like '%Show Tags of this Webpage%' and post_title not like '%Show Most Popular Words%' and (substr(IfNull(post_excerpt, ''),1,1) < '0' or substr(IfNull(post_excerpt, ''),1,1) > '9') ORDER BY bpost_title, post_date DESC"); 187c156 < $res = mysql_query("SELECT ID, post_date, " . $ptg . " DATE_FORMAT(post_date,'%Y%m%d') As pdate, IfNull(post_excerpt, '') As post_excerpt FROM " . $tname . " WHERE post_status='publish' " . $and . " and post_title not like '%Show Tags of this Webpage%' and post_title not like '%Show Most Popular Words%' ORDER BY post_title"); --- > $res = mysql_query("SELECT ID, post_date, post_title, guid, DATE_FORMAT(post_date,'%Y%m%d') As pdate, IfNull(post_excerpt, '') As post_excerpt FROM " . $tname . " WHERE post_status='publish' and post_title not like '%Show Tags of this Webpage%' and post_title not like '%Show Most Popular Words%' ORDER BY post_title"); 216,218c185,187 < if (file_exists(str_replace("/PHP", "/", dirname(__FILE__)) . "/" . "Welcome" . str_replace("index","",$index) . ".html")) { < if (!file_exists(str_replace("/PHP", "/", dirname(__FILE__)) . "/" . "Welcome" . str_replace("index","",$index) . ".html_original")) { < copy(str_replace("/PHP", "/", dirname(__FILE__)) . "/" . "Welcome" . str_replace("index","",$index) . ".html",str_replace("/PHP", "/", dirname(__FILE__)) . "/" . "Welcome" . str_replace("index","",$index) . ".html_original"); --- > if (file_exists(str_replace("/PHP", "/", dirname(__FILE__)) . "/Welcome.html")) { > if (!file_exists(str_replace("/PHP", "/", dirname(__FILE__)) . "/Welcome.html_original")) { > copy(str_replace("/PHP", "/", dirname(__FILE__)) . "/Welcome.html",str_replace("/PHP", "/", dirname(__FILE__)) . "/Welcome.html_original"); 220c189 < $whtml = str_replace(" $whtml = str_replace("", "'", str_replace($changethis,$changeto,$newhtml))); < file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/" . "Welcome" . str_replace("index","",$index) . ".html", str_replace("<92>", "'", str_replace($changethis,$changeto,$newhtml))); < chown(str_replace("/PHP", "/", dirname(__FILE__)) . "/" . "Welcome" . str_replace("index","",$index) . ".html", "rjmprogr"); < //} < if (file_exists(str_replace("/PHP", "/", dirname(__FILE__)) . "/" . $index . $isuffix . ".html")) { < if (!file_exists(str_replace("/PHP", "/", dirname(__FILE__)) . "/" . $index . $isuffix . ".html_original")) { < copy(str_replace("/PHP", "/", dirname(__FILE__)) . "/" . $index . $isuffix . ".html",str_replace("/PHP", "/", dirname(__FILE__)) . "/index" . $isuffix . ".html_original"); --- > //file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/Welcome.htm", $newhtml); > //file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/Welcome.html", $newhtml); > file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/Welcome.htm", str_replace("<92>", "'", $newhtml)); > file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/Welcome.html", str_replace("<92>", "'", $newhtml)); > chown(str_replace("/PHP", "/", dirname(__FILE__)) . "/Welcome.html", "rjmprogr"); > if (file_exists(str_replace("/PHP", "/", dirname(__FILE__)) . "/index" . $isuffix . ".html")) { > if (!file_exists(str_replace("/PHP", "/", dirname(__FILE__)) . "/index" . $isuffix . ".html_original")) { > copy(str_replace("/PHP", "/", dirname(__FILE__)) . "/index" . $isuffix . ".html",str_replace("/PHP", "/", dirname(__FILE__)) . "/index" . $isuffix . ".html_original"); 262c229 < $whtml = str_replace(" $whtml = str_replace("", "'", str_replace($changethis,$changeto,$newhtml))); < file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/" . $index . $isuffix . ".html", str_replace("<92>", "'", str_replace($changethis,$changeto,$newhtml))); < chown(str_replace("/PHP", "/", dirname(__FILE__)) . "/" . $index . $isuffix . ".html", "rjmprogr"); --- > //file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/index" . $isuffix . ".htm", $newhtml); > //file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/index" . $isuffix . ".html", $newhtml); > //file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/index" . $isuffix . ".htm", str_replace("<92>", "'", $newhtml)); > file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/index" . $isuffix . ".html", str_replace("<92>", "'", $newhtml)); > chown(str_replace("/PHP", "/", dirname(__FILE__)) . "/index" . $isuffix . ".html", "rjmprogr"); 328c295 < file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/tutorial_options" . str_replace("index","",$index) . ".html", str_replace("<92>", "'", str_replace($changethis,$changeto,$newhtml))); --- > file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/tutorial_options.html", str_replace("<92>", "'", $newhtml)); 331c298 < //mail("rmetcalfe@rjmprogramming.com.au", "Today's list " . date('l jS \of F Y h:i:s A'), file_get_contents("/etc/init.d/todaylist.is")); --- > mail("rmetcalfe@rjmprogramming.com.au", "Today's list " . date('l jS \of F Y h:i:s A'), file_get_contents("/etc/init.d/todaylist.is"));