Location: PHPKode > projects > Content*Builder > modules/headline/showHeadline.inc.php
<?php
// Oft genutzte Funktionen bei Texten
include_once($rel."libraries/BTPL_functions.inc.php");

// Medien Klasse einbinden, keine Ahnung warum aber ich machs mal.
// Später: jetzt weiß ich's: Replacements
require_once($path['cb'].$cbDirLib.'CB_media.class.php');
$myMedia  = new MediaManagement();
$myMedia->setOptionObject($cbOption);
$myMedia->setBranchID($cbOption->getSingleOption("rpBranch"));
$rpBranch = $myMedia->getBranchDirectory();

$hlQuery = mysql_query("SELECT * FROM ".TABLE."_headlines WHERE headlineid = '".$_REQUEST[hID]."'");
if($hlQuery) {
	$hlRow = mysql_fetch_object($hlQuery);
	$title = $hlRow->headline;
	$text  = $hlRow->msg;
		
	$title = stripslashes($title);
	$text  = stripslashes($text);
		
	$datetime = $hlRow->datum;
	$d1 = substr($datetime,0,4);
	$d2 = substr($datetime,4,2);
	$d3 = substr($datetime,6,2);
	$t1 = substr($datetime,8,2);
	$t2 = substr($datetime,10,2);
	$t3 = substr($datetime,12,2);
	$date = $d3.".".$d2.".".$d1;
	$time = $t1.":".$t2.":".$t3;
		
	/********* REPLACEMENT START **********/
	$text	= str_replace('[REPLACEDIR]', $path["cb"].'uploads/files/'.$rpBranch.'/', $text);
	/********** REPLACEMENT END ***********/
		
	// CB Article Link ... Internal Link Hack
	$text = preg_replace("/\[CBLINK module=([0-9a-zA-Z-]*) id=([0-9a-f-]*)\]([ 0-9a-zA-Z]*)\[\/CBLINK]/i", "<a href=\"".$PHP_SELF."?load=$1&sub=full&id=$2\">$3</a>", $text);
		
	$tpl->assign("headline",
		array ( "title" => $title,
				"text"  => $text,
				"id"    => $hlRow->headlineid,
				"date"  => $date,
				"time"  => $time
		)
	);
	$tpl->display("headline.template");
}
?>
Return current item: Content*Builder