';
}
/**
* display the HTML head and metadata
*/
function html_head(){
global $ID;
global $ACT;
global $INFO;
global $conf;
global $lang;
print '<'.'?xml version="1.0"?'.">\n";
print '';
print "\n";
?>
=$ID?> [=$conf['title']?>]
if($ACT=='show' || $ACT=='export_html'){
if($INFO['exists']){
print ' '."\n";
print ' '."\n";
}else{
print ' '."\n";
}
}else{
print ' '."\n";
}
?>
@include("includes/meta.html")?>
}
/**
* Displays a button (using it's own form)
*/
function html_btn($name,$id,$akey,$params,$method='get'){
global $conf;
global $lang;
$label = $lang['btn_'.$name];
$ret = '';
$id = idfilter($id);
//make nice URLs even for buttons
$link = getBaseURL().'/';
$link = preg_replace('#//$#','/',$link);
if(!$conf['userewrite']){
$script = $link.'doku.php';
$params['id'] = $id;
}else{
$script = $link.$id;
}
$ret .= '
}
/**
* Prints the glovbal message array
*/
function html_msgarea(){
global $MSG;
if(!isset($MSG)) return;
foreach($MSG as $msg){
print '
';
print $msg['msg'];
print '
';
}
}
/**
* Prints the registration form
*/
function html_register(){
global $lang;
global $ID;
print parsedLocale('register');
?>
}
/**
* This displays the edit form (lots of logic included)
*/
function html_edit($text=null,$include='edit'){ //FIXME: include needed?
global $ID;
global $REV;
global $DATE;
global $RANGE;
global $PRE;
global $SUF;
global $INFO;
global $SUM;
global $lang;
global $conf;
//check for create permissions first
if(!$INFO['exists'] && !html_acl(AUTH_CREATE)) return;
//set summary default
if(!$SUM){
if($REV){
$SUM = $lang['restored'];
}elseif(!$INFO['exists']){
$SUM = $lang['created'];
}
}
//no text? Load it!
if(!isset($text)){
$pr = false; //no preview mode
if($RANGE){
list($PRE,$text,$SUF) = rawWikiSlices($RANGE,$ID,$REV);
}else{
$text = rawWiki($ID,$REV);
}
}else{
$pr = true; //preview mode
}
$wr = $INFO['writable'];
if($wr){
if ($REV) print parsedLocale('editrev');
print parsedLocale($include);
}else{
print parsedLocale('read');
$ro='readonly="readonly"';
}
if(!$DATE) $DATE = $INFO['lastmod'];
?>
}?>
}?>
=$lang['summary']?>:
}?>
}
/**
* prepares the signature string as configured in the config
*/
function html_signature(){
global $conf;
global $INFO;
$sig = $conf['signature'];
$sig = strftime($sig);
$sig = str_replace('@USER@',$_SERVER['REMOTE_USER'],$sig);
$sig = str_replace('@NAME@',$INFO['userinfo']['name'],$sig);
$sig = str_replace('@MAIL@',$INFO['userinfo']['mail'],$sig);
$sig = str_replace('@DATE@',date($conf['dformat']),$sig);
return $sig;
}
/**
* prints some debug info
*/
function html_debug(){
global $conf;
print '';
print '
When reporting bugs please send all the following ';
print 'output as a mail to andi@splitbrain.org ';
print 'The best way to do this is to save this page in your browser