inc/preview.php

<?php
  $previewtitle 
$_REQUEST["previewtitle"];
  
$previewtext $_REQUEST["previewtext"];
  if (!isset(
$previewtitle))
    
$previewtitle get_title($page);
  else
    
$previewtitle stripslashes($previewtitle);
  if (!isset(
$previewtext))
    
$previewtext "''Preview loading...''";
  else
    
$previewtext stripslashes($previewtext);
?>
<HTML>
<HEAD>
<TITLE>Previewing <?php echo(strip_control($previewtitle));?></TITLE>
<STYLE><!--
A.ext{text-decoration:underline}
A.ext:hover{text-decoration:none}
A.int{text-decoration:none}
A.int:hover{text-decoration:underline}
A.broken{text-decoration:line-through}
A.broken:hover{text-decoration:underline}
IMG{border-width:2px;border-style:none;border-style:hidden}
IMG:hover{border-style:solid}
P{margin-bottom:6pt;margin-top:6pt}
P.text{text-indent:4em}
DIV.indent{margin-left:4em}
DIV.center{text-align:center}
--></STYLE>
</HEAD>
<BODY>
<H1><?php echo(format_title($previewtitle));?></H1>
<?php
  
if(check_files($page)) {
    if(
get_image($page)) {
      
printf('<A HREF="%s"><IMG SRC="%s" %s HSPACE=20></A>\n',
          
get_image($page),($view=="full"?get_image($page):get_small($page)), 
          (
$align=="vert"?"":"ALIGN=LEFT"));
    }
    if(
get_text($page)) {
      
$utext=file_get_contents(get_text($page));
      if (
$utext !== false) {
        echo(
"<P>\n".encode_text(strtr($utext,array("\r\n"=>"\n",
                                                    
"\r"=>"\n")),$page));
        if(
get_image($page))
          echo(
"<BR>\n<FONT SIZE=\"-1\">(<A HREF=\"?setalign=".
             (
$align=="vert"?"horiz":"vert")."\" CLASS=int>Display text ".
             (
$align=="vert"?"beside":"below")." image</A>)</FONT>\n");
      }
      unset(
$utext);
    }
    echo 
"<BR CLEAR=LEFT>\n";
  }
  echo(
"<P>\n".encode_text($previewtext,$page));
?>
<FORM ACTION="?preview" METHOD=POST NAME="previewform">
<INPUT TYPE=hidden NAME="previewtitle">
<INPUT TYPE=hidden NAME="previewtext">
</FORM>
</BODY>
</HTML>


Notes:


Edit this page!
View the most recent revision to this page.
If you haven't yet, read the Wiki Introduction.
Up one level to inc/.
Return to user's home page: Flouri
Return to the Wiki Home.
Hosted by Shyou.org Webservices.