Example #1
0
function adm_browse($page,$path) {//{{{
	global $mformat,$filter;
	$back = "";
	while (list($p,$v) = @each($page)) {
		$spec = split('\.',$mformat[$p]);
		if ($spec[0] == 'A') {	
			$back.= "<tr><td valign=top align=right><b class=file>$p</b><bR></td><td valign=top align=left>";
			include c_buildconf($path,"filter","filter");
			//$back.= htmlentities(cm_richtext($v));
			$back.= cm_richtext($v);
			$back.= "</td></tr>\n";
		} elseif ($spec[0] == "m") {
			$it = split("\n",$v);
			$back.= "<tr><td valign=top align=right><b class=file>$p</b><br></td><td valign=top align=left>";
			$back.= "<table border=0 cellpadding=0 cellspacing=0><tr><td valign=top align=left bgcolor=#999999>";
			$back.= "<table border=0 cellpadding=3 cellspacing=1>";
			foreach ($it as $t) {
				if (trim($t) == '') {
					$back.= "<tr><td colspan=".$spec[1]." bgcolor=#dedede>";
					$back.= "<img src=/img/0.png width=1 height=1 hspace=0 vspace=0 border=0 alt=''></td></tr>\n";
				} elseif (substr(trim($t),0,1) == "#") {
					$back.= "<tr><td colspan=".$spec[1]." bgcolor=#dedede>$t</td></tr>\n";
				} else {
					$g = split(':::',$t);
					$back.= "<tr>";
					for ($u=0;$u < $spec[1];$u++) {
						$back.= "<td valign=top bgcolor=#ffffff>".htmlentities(trim($g[$u]))."</td>";
						//$back.= "<td valign=top bgcolor=#ffffff>".trim($g[$u])."</td>";
					}
					$back.= "</tr>";
				}
			}
			$back.= "</table></td></tr>\n";
			$back.= "</table></td></tr>\n";
		} else {
			$back.= "<tr><td valign=top align=right><b class=file>$p</b><br></td><td valign=top align=left>".str_replace("\r\n","<br>",htmlentities($v))."</td></tr>\n";
		}
	}
	return $back;
}//}}}
Example #2
0
<?/* $Id: index.php,v 1.1 2003/09/17 12:40:47 terraces Exp $
Copyright (C) 2001, Makina Corpus, http://makinacorpus.org
Created and maintained by mose <*****@*****.**>
Released under GPL version 2 or later, see LICENSE file
or http://www.gnu.org/copyleft/gpl.html
*/

include 'inc/conf.php';

if (!c_iscached($p,$cm_q)) {
	$page = cm_getarray($p,$format);
	$page[CONTENU] = cm_richtext($page[CONTENU]);
	$feed = c_inc('head');
    $feed.= c_inc('show');
	$feed.= c_inc('foot');
	c_writecache($feed,$p,$cm_q);
}
c_readcache($p,$cm_q);
?>
<?/* 
<pre><?print_r(get_defined_vars())?></pre> 
*/?>