8) {$textname="rdt01-01";$invalidparamreset=1;} if (substr($textname,3,5)=="today") {$textname=substr($textname,0,3).date("m-d"); } /* if (preg_match("/[tfe|tfm|tft|rdt]today$/",$textname)) {echo "Matched";} else {echo "Not matched";} */ if (!preg_match("/^[t|r][f|d][t|m|e][0|1][0-9]-[0-3][0-9]$/",$textname)) {$textname="rdt01-01";$invalidparamreset=1;} $thoughttype=substr($textname,0,3); $thistitle=gettitle($thoughttype.".txt",substr($textname,3,5)); $thisurl=grabCurrentURL(); /*$pathname="../../text/thoughts/"; */ $pathname="gtjr_text/thoughts/"; $mnum=substr($textname,3,2); $dnum=substr($textname,6,2); if ($dnum=="00") { $inctextfile=$pathname."intro.html";} else { $inctextfile=$pathname."month".$mnum."/".$textname.".html";} $month_num=str_pad(substr($textname,3,2),2,'0',STR_PAD_LEFT); if ($textname != $thoughttype."intro" and substr($textname,6,2)!="00") { $inctext=file_get_contents("gtjr_inc/thoughts/".substr($textname,0,5).".inc",1); $pos1=strpos($inctext,'id="'.$textname.'"'); $tstr=substr($inctext,$pos1,200); $pos2=strpos($tstr,""); $pos1=strpos($tstr,">"); $texttitle=substr($tstr,$pos1+1+5,$pos2-$pos1-1-5); } else { switch( $thoughttype ) { case "tft": $texttitle="Thoughts for Today"; break; case "tfe": $texttitle="Thoughts for the Evening"; break; case "tfm": $texttitle="Thoughts for the Morning"; break; case "rdt": $texttitle="Random Thoughts"; break; }} ?> <?php echo "Going to Jesus.com - $thistitle";?> " />

 

Go Top