3,4d2 < // RJM Programming < // Amended on 12/2/2016 to allow for indexmobile.html be updated via crontab/curl ?mobile=mobile $_GET[] PHP parameter usage 7,9d4 < < $isuffix = ""; < if (isset($_GET['mobile'])) $isuffix = $_GET['mobile']; 97c92 < $hostname = 'localhost'; --- > $hostname = 'localhost'; 115c110 < $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"); --- > $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 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 (substr(IfNull(post_excerpt, ''),1,1) < '0' or substr(IfNull(post_excerpt, ''),1,1) > '9') ORDER BY bpost_title, post_date DESC"); 156c151 < $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"); --- > $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' ORDER BY post_title"); 219d213 < if (strpos($newhtml, "HTML/Javascript") === false) exit; 225,227c219,221 < 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"); --- > if (file_exists(str_replace("/PHP", "/", dirname(__FILE__)) . "/index.html")) { > if (!file_exists(str_replace("/PHP", "/", dirname(__FILE__)) . "/index.html_original")) { > copy(str_replace("/PHP", "/", dirname(__FILE__)) . "/index.html",str_replace("/PHP", "/", dirname(__FILE__)) . "/index.html_original"); 229c223 < $whtml = str_replace(" $whtml = str_replace("", "'", $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"); --- > //file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/index.htm", $newhtml); > //file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/index.html", $newhtml); > //file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/index.htm", str_replace("<92>", "'", $newhtml)); > file_put_contents(str_replace("/PHP", "/", dirname(__FILE__)) . "/index.html", str_replace("<92>", "'", $newhtml)); > chown(str_replace("/PHP", "/", dirname(__FILE__)) . "/index.html", "rjmprogr");