The Daily Text page

Yesterday, a friend in the US sent me a file containing the TMS schedule as well as the es2007 (English) in Excel format. As I was still patching this site together I thought why not use the file in WordPress, and that was it.
Currently, the page only shows today’s scripture + comments. And I added the weekly reading schedule at the bottom. If you feel something else could be added feel free to contact me.

$dq = '"';
$p_verse = '/^(.+?)\?(\w+?\.\s\d+:\d+\.)\s\s/';
$r_verse = '
$1$2
'; $p_ref = '/(w\s\d.+?)$/'; $r_ref = '

$1

'; $p_tms = '/^TMS: (.*?)\s(\d+)-(.*)/'; $r_tms = 'Bible reading (TMS): $1: $2-$3'; $today = date('Y-m-d'); $this_week = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d")-(date("w") - 1), date("Y"))); $sql = "SELECT subject, description FROM `ad_dtext_tms` WHERE ("; $sql .= ' (`start_date` = '.$dq .$today.$dq. ' AND `subject` = "Daily Text" ) '; $sql .= ' OR ( `start_date` = '.$dq . $this_week .$dq. ' AND `subject` = '.$dq.'TMS Reading'.$dq.' ) )'; $rs = mysql_query($sql); while ($row = mysql_fetch_assoc($rs)) { if ($row['subject'] == 'Daily Text') { $daily_text = $row['description']; } if ($row['subject'] == 'TMS Reading') { $tms_reading = $row['description']; } } $daily_text = preg_replace($p_verse, $r_verse, $daily_text); $daily_text = preg_replace($p_ref, $r_ref, $daily_text); $daily_text = str_replace('?', '? ', $daily_text); $tms_reading = preg_replace($p_tms, $r_tms, $tms_reading); echo $daily_text . '
'; echo $tms_reading . '
';

Similar Posts:

    None Found




No Comments


You can leave the first : )