+
+}
+
+/**
+ * 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