Location: PHPKode > projects > Content*Builder > modules/artbox/artBox.php
<?php
	/*
	* artBox.php
	* Datei gibt normale Artikel aus. Die Datei gibt es, weil manchmal das 
	* Hauptmodul auf das mehrsprachige Artikel Management zeigt und man
	* trotzdem diese Artikel ausgeben will.
	* 
	* ist $artbox_template gesetzt, 
	* (per setModuleValue("moduleName", "artbox_template", "tplName"); )
	* wird dieses Template anstatt artbox.template gewählt
	* 
	* @version $Id: artBox.php,v 1.3 2004/02/14 10:33:34 cb_fog Exp $
	* @copyright 2003 C*B Development Team
	*/

	if($archive == 1) { 
		$artAmount = 10000; 
	} else { 
		if(!$cbOption->getSingleOption("artAmount")) {
			$artAmount = 10;
		} else {
			$artAmount = $cbOption->getSingleOption("artAmount");
		}
	}
	
	$query = mysql_query("SELECT art.title, art.ide, art.folder, folder.fname FROM ".TABLE."_article AS art LEFT JOIN ".TABLE."_columns  AS folder ON art.folder = folder.fid WHERE art.folder = '".$openfolder."' AND art.stage = '3' ORDER BY art.datum DESC LIMIT 0,$artAmount");
		
	$artTitle = array();
	$artIde = array();
	$artFolderId = array();
	
	$noArticles = true;
	while($result = mysql_fetch_object($query)) {
		$folder = $resul->fname;
		$title = substr($result->title, 0, 20);
		if(strlen($result->title) > 20) {
			$title .= "...";
		}
		$artTitle[]		= $title;
		$artIde[]		= $result->ide;
		$artFolderId[]	= $result->folder;
		$noArticles = false;
	}
	
	if($noArticles) {
		$message[] = "No Articles in Folder";
		$tpl->assign("MESSAGE", $message);
		$tpl->assign("messageSet", "1");
		$tpl->assign("artListSet", "0");
	} else {
		$tpl->assign("artListSet", "1");
		$artListData = array(  
			"NAV_FOLDER"	=> $artFolderId,
			"ARTICLE_TITLE" => $artTitle,
			"IDE"			=> $artIde
		);
		$tpl->assign("artListData", $artListData);
		$tpl->assign("OPENFOLDER", $openfolder);
	}
	
	/* 
	* Man kann für jede ArtikelBox ein anderes Template angeben
	*/
	if(!empty($artbox_template)) {
		$tpl->display($artbox_template);
	} else {
		$tpl->display("artBox.template");
	}
?>
Return current item: Content*Builder