cvs: php-gtk-web /include layout.php

[email protected] ("Steph Fox") Wed, 05 Jul 2006 05:56:26 -0000
Newsgroups php.gtk.webmaster
Message-ID <cvssfox1152078986@cvsserver>
sfox		Wed Jul  5 05:56:26 2006 UTC

  Modified files:              
    /php-gtk-web/include	layout.php 
  Log:
  Output buffering and stuff. (This file needs a good cleanout at some point.)
  
http://cvs.php.net/viewvc.cgi/php-gtk-web/include/layout.php?r1=1.51&r2=1.52&diff_format=u
Index: php-gtk-web/include/layout.php
diff -u php-gtk-web/include/layout.php:1.51 php-gtk-web/include/layout.php:1.52
--- php-gtk-web/include/layout.php:1.51	Wed Jul  5 05:49:05 2006
+++ php-gtk-web/include/layout.php	Wed Jul  5 05:56:26 2006
@@ -1,5 +1,5 @@
 <?php
-/* $Id: layout.php,v 1.51 2006/07/05 05:49:05 cweiske Exp $ */
+/* $Id: layout.php,v 1.52 2006/07/05 05:56:26 sfox Exp $ */
 
 # spacer()
 # print a IMG tag for a sized spacer GIF
@@ -135,6 +135,7 @@
 #
 function commonHeader($title=false, $padding=true) {
 	global $SIDEBAR_DATA;
+	ob_start();
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
@@ -189,7 +190,7 @@
     <form method="post" action="/search.php" style="display:inline">
       <font color="#FFFFFF">
        <small>search for</small>
-       <input class="small" type="text" name="pattern" value="<?php echo htmlentities($prevsearch); ?>" size="30" />
+       <input class="small" type="text" name="pattern" value="<?php if (isset($_GET['prevsearch'])) echo htmlentities($prevsearch); ?>" size="30" />
        <small>in the</small>
        <select name="show" class="small">
         <option value="manual">PHP-GTK 2 manual</option>
@@ -364,6 +365,11 @@
     }
 }
 
+function stretchPage($pixels) {
+	$div = "<div style = 'margin: ".$pixels."%'>";
+	return $div;
+}
+
 /*
  * Local variables:
  * tab-width: 4