} break; } $form = ''; if ($showform) { $form = file_get_contents("pages/_pressaddedt.frm"); } else { $form = '<div class="container"><p>@STATUS@</p></div>'; } if ($pressid == -1) { $button = 'Add'; $action = 'addnews'; } else { $button = 'Save'; $action = 'updnews'; $details = GetPressDetails($pressid); //print_r($details); $title = $details['title']; $subtitle = $details['subtitle']; $lead = $details['lead']; $body = $details['body']; $date = $details['date']; $flags = $details['flags']; $meta = $details['Meta']; $imgalt = $details['imgalt']; $date = date('F j, Y', $details['date']); if ($details['image'] != null) { $img_lnk = '<img src="getfile.php?id=' . $details['id'] . '">'; } } if ($flags & 1) {
<?php $pressID = _GET('prid', -1); $dtls = GetPressDetails($pressID); $what = ''; $towhat = ''; $presstmpl = file_get_contents('pages/blogdtls.tpl'); if (is_array($dtls)) { $date = date('F j, Y', $dtls['date']); $title = $dtls['title']; $body = $dtls['body']; $meta_tags = $dtls['Meta']; $author = $dtls['author']; $subtitle = $dtls['subtitle']; if ($subtitle != '') { $subtitle = "<h2 class=\"article-subtitle\">" . $subtitle . "</h2>"; } $what = array("@TITLE@", "@SUBTITLE@", "@DATE@", "@BODY@", "@AUTHOR@"); $towhat = array($title, $subtitle, $date, $body, $author); } else { $presstmpl = ''; } $content = str_replace($what, $towhat, $presstmpl);