Browse Source

Original site captured on 2007-12-22 (+ VERSION.txt).

Frédéric G. MARAND 10 years ago
commit
cffcf649ab
100 changed files with 2698 additions and 0 deletions
  1. 1 0
      .cvsignore
  2. 12 0
      .htaccess
  3. 1 0
      VERSION.txt
  4. 121 0
      about.php
  5. 61 0
      admin-login.php
  6. 19 0
      admin-logout.php
  7. 1 0
      apps/.cvsignore
  8. 13 0
      apps/CVS/Entries
  9. 12 0
      apps/CVS/Entries.Extra
  10. 0 0
      apps/CVS/Entries.Extra.Old
  11. 0 0
      apps/CVS/Entries.Old
  12. 1 0
      apps/CVS/Repository
  13. 1 0
      apps/CVS/Root
  14. 90 0
      apps/add.php
  15. 245 0
      apps/admin-apps.php
  16. 105 0
      apps/apps.php
  17. 21 0
      apps/apps.sql
  18. 116 0
      apps/edit.php
  19. 133 0
      apps/form.php
  20. 17 0
      apps/index.php
  21. 26 0
      apps/modified.php
  22. 26 0
      apps/pending.php
  23. 30 0
      apps/rate.php
  24. 12 0
      apps/screenshot.php
  25. 211 0
      changelog.php
  26. 69 0
      copyright.php
  27. 17 0
      credits.php
  28. 28 0
      do_download.php
  29. 68 0
      docs-rss.php
  30. 163 0
      docs.php
  31. 160 0
      download-docs.php
  32. 110 0
      download.php
  33. 2 0
      error/CVS/Entries
  34. 1 0
      error/CVS/Entries.Extra
  35. 0 0
      error/CVS/Entries.Extra.Old
  36. 0 0
      error/CVS/Entries.Old
  37. 1 0
      error/CVS/Repository
  38. 1 0
      error/CVS/Root
  39. 132 0
      error/index.php
  40. 256 0
      faq.php
  41. 38 0
      gifs/CVS/Entries
  42. 37 0
      gifs/CVS/Entries.Extra
  43. 0 0
      gifs/CVS/Entries.Extra.Old
  44. 0 0
      gifs/CVS/Entries.Old
  45. 1 0
      gifs/CVS/Repository
  46. 1 0
      gifs/CVS/Root
  47. BIN
      gifs/black.gif
  48. BIN
      gifs/blank.gif
  49. BIN
      gifs/box-0.gif
  50. BIN
      gifs/box-1.gif
  51. BIN
      gifs/caret-l.gif
  52. BIN
      gifs/caret-r.gif
  53. BIN
      gifs/caret-rg.gif
  54. BIN
      gifs/caret-t.gif
  55. BIN
      gifs/caret-u.gif
  56. BIN
      gifs/checkerboard.gif
  57. BIN
      gifs/favicon.ico
  58. BIN
      gifs/icon-c0.gif
  59. BIN
      gifs/icon-c1.gif
  60. BIN
      gifs/icon-e0.gif
  61. BIN
      gifs/icon-e1.gif
  62. BIN
      gifs/icon-m0.gif
  63. BIN
      gifs/icon-m1.gif
  64. BIN
      gifs/icon-o0.gif
  65. BIN
      gifs/icon-o1.gif
  66. BIN
      gifs/icon-s0.gif
  67. BIN
      gifs/icon-s1.gif
  68. 5 0
      gifs/index.php
  69. BIN
      gifs/inhier-arrow.gif
  70. BIN
      gifs/inhier-blank.gif
  71. BIN
      gifs/notes-about.gif
  72. BIN
      gifs/notes-add.gif
  73. BIN
      gifs/notes-checkmark.gif
  74. BIN
      gifs/notes-delete.gif
  75. BIN
      gifs/notes-edit.gif
  76. BIN
      gifs/notes-reject.gif
  77. BIN
      gifs/php-gtk.gif
  78. BIN
      gifs/php-logo.gif
  79. BIN
      gifs/revhier-arrow.gif
  80. BIN
      gifs/small_submit.gif
  81. BIN
      gifs/small_submit_black.gif
  82. BIN
      gifs/small_submit_white.gif
  83. BIN
      gifs/spacer.gif
  84. 14 0
      include/CVS/Entries
  85. 14 0
      include/CVS/Entries.Extra
  86. 13 0
      include/CVS/Entries.Extra.Old
  87. 14 0
      include/CVS/Entries.Old
  88. 1 0
      include/CVS/Repository
  89. 1 0
      include/CVS/Root
  90. 1 0
      include/PhpGtkDoc/.cvsignore
  91. 3 0
      include/PhpGtkDoc/CVS/Entries
  92. 3 0
      include/PhpGtkDoc/CVS/Entries.Extra
  93. 2 0
      include/PhpGtkDoc/CVS/Entries.Extra.Old
  94. 3 0
      include/PhpGtkDoc/CVS/Entries.Old
  95. 1 0
      include/PhpGtkDoc/CVS/Repository
  96. 1 0
      include/PhpGtkDoc/CVS/Root
  97. 257 0
      include/PhpGtkDoc/Search2.php
  98. 2 0
      include/PhpGtkDoc/Search2/CVS/Entries
  99. 2 0
      include/PhpGtkDoc/Search2/CVS/Entries.Extra
  100. 1 0
      include/PhpGtkDoc/Search2/CVS/Entries.Extra.Old

+ 1 - 0
.cvsignore

@@ -0,0 +1 @@
+logs


+ 12 - 0
.htaccess

@@ -0,0 +1,12 @@
+DirectoryIndex index.php
+ErrorDocument 404 /error/
+ErrorDocument 401 /error/
+ErrorDocument 403 /error/
+
+RewriteOptions MaxRedirects=6
+
+Order deny,allow
+deny from all
+allow from 82.238.217.133
+allow from 82.234.62.122
+allow from 217.109.113.144

+ 1 - 0
VERSION.txt

@@ -0,0 +1 @@
+2007-12-22

+ 121 - 0
about.php

@@ -0,0 +1,121 @@
+<?php
+/*
+ * $Id: about.php,v 1.1 2006/07/15 18:16:08 andrei Exp $
+ */
+require_once('include/prepend.php');
+commonHeader('About PHP-GTK 2');
+
+?>
+
+<h1>PHP-GTK 2</h1>
+
+<p>
+PHP-GTK is an extension for the PHP programming language that implements
+language bindings for GTK+. It provides an object-oriented interface to GTK+
+classes and functions and greatly simplifies writing client-side cross-platform
+GUI applications.
+</p>
+
+<p>
+PHP-GTK 2 is the second major release of PHP-GTK. PHP-GTK 2 combines the power
+of PHP 5 with the flexibility of Gtk+ 2 to allow developers to create extremely
+rich desktop applications with relative ease. PHP-GTK 2 not only
+simplifies the process of building applications with PHP, but also
+provides greater flexibility and more features than its predecessor.
+</p>
+
+<a name="features"></a>
+<h2>Features</h2>
+
+<ul>
+<li><b>Powerful Object Oriented Programming</b><br />
+Because PHP-GTK 2 is built ontop of PHP 5, it makes heavy use of the improved
+object model. PHP-GTK 2 applications can implement Object Oriented practices
+such as inheritance, interfaces, overloading and exceptions.
+</li>
+
+<li><b>Improved Garbage Collection</b><br />
+PHP-GTK 1 suffered from memory allocation issue because it was built ontop of
+PHP 4, which was not designed with long running applications in mind.
+Improvements in PHP 5 have minimized memory leaks allowing for long running
+applications without the fear of excessive memory consumption.
+</li>
+
+<li><b>Unicode Support</b><br />
+Text in PHP-GTK 2 is always UTF-8 encoded making for applications which can
+easily be internationalized. PHP-GTK 2 will seamlessly handle conversion of
+input and output strings based on a global code-page setting freeing the
+developer from worrying about most encoding problems.
+</li>
+
+<li><b>Model-View Architecture</b><br />
+Gtk+ 2 implements a Model-View architecture to separate data from the display.
+This allows for multiple representations of the same data in different ways and
+greater control over the data itself. The separation of data from display makes
+working with complex data like trees and multi-line text much easier than
+before.
+</li>
+
+<li><b>Improved Graphics Support</b><br />
+Improvements in image support in Gtk+ 2 make displaying and manipulating images
+and animations much easier with PHP-GTK 2. Aside from an extensive collection
+of stock images, loading and manipulating custom images is relatively simple
+when compared to working with images in PHP-GTK 1.
+</li>
+
+</ul>
+
+<a name="changed"></a>
+<h2>Changes</h2>
+
+<p>
+While every attempt has been made to preserve backward compatibility whereever
+possible, some backward compatibility breaks were necessary.
+</p>
+
+<ul>
+
+<li><b>Exceptions</b><br />
+PHP-GTK 2 takes advantage of PHP 5's support for exceptions. Several widgets
+may throw exceptions, normally during construction or when trying to convert
+text to UTF-8.
+</li>
+
+<li><b>No More Global Constants</b><br />
+In PHP-GTK 1, all constants were declared in the global namespace. In PHP-GTK
+2, constants are declared in the top-level classes: Gtk, Gdk, Atk, and Pango.
+This means the PHP-GTK 1 constant
+<pre style="display: inline;">GTK_WIN_POS_CENTER</pre> is accessed as
+<pre style="display: inline;">Gtk::WIN_POS_CENTER</pre> in PHP-GTK 2.
+</li>
+
+<li><b>Creating Signal Handlers</b><br />
+The <pre style="display: inline;">connect_object()</pre> and
+<pre style="display: inline;">connect_object_after()</pre> methods
+have been deprecated in favor of
+<pre style="display: inline;">connect_simple()</pre> and
+<pre style="display: inline;">connect_simple_after()</pre>.
+</li>
+
+<li><b>Deprecated Widgets</b><br />
+Many widgets have been deprecated in Gtk+ 2, and therefore are also deprecated
+in PHP-GTK 2. Most deprecated widgets have been replaced with more powerful
+widgets that are easier to use. While most deprecated widgets will still
+function as they did with PHP-GTK 1, developers are strongly encouraged to
+update their applications to use the new and improved versions.
+</li>
+
+</ul>
+
+<a name="more"></a>
+<h2>More</h2>
+<p>
+These changes and more are covered in greater detail in the <a href="http://gtk.php.net/manual/en/tutorials.changes.php">Changes since PHP-GTK 1</a> tutorial. Users looking for help with the new release are
+encouraged to read the PHP-GTK 2 manual or contact the PHP-GTK General mailing list.
+</p>
+
+<?php
+
+commonFooter();
+
+?>

+ 61 - 0
admin-login.php

@@ -0,0 +1,61 @@
+<?php
+
+// rather than have login pages spread throughout the site let's have one place for logging in
+// that's easy to remember
+require_once('include/cvs-auth.inc');
+
+commonHeader("Administration Login");
+print "<br />\n";
+
+if (!isset($_COOKIE['PHP-GTK'])) {
+	if (isset($_POST['submit']) && isset($_POST['pass'])) {
+		$user = verify_password(htmlentities($_POST['user']), htmlentities($_POST['pass']), $_SERVER['PHP_SELF']);
+	} else {
+		$user = null;
+?>
+	<h1>Administration Login</h1>
+	<form action = "<?php echo $_SERVER['PHP_SELF']; ?>" method = 'POST'>
+	<table border='0' cellpadding='3' bgcolor='#e0e0e0' width=<?php echo isset($SIDEBAR_DATA) ? '50%' : '40%'; ?>>
+	<tr>
+	<td><br />User name:</td>
+	<td><br /><input type = 'text' name = 'user' value = "<?php echo $user;?>"><br /></td>
+	<tr>
+	<td>Password:</td>
+	<td><input type = 'password' name = 'pass' value = '' size = '12'><br /></td>
+	<tr>
+	<td colspan='2' align='right'><input type = 'submit' name = 'submit'></td>
+	</tr>
+	</table>
+	</form>
+
+<?php
+	print stretchPage(3);
+	print "&nbsp;</div>\n";
+	}
+} else {
+	unset($user);
+	unset($pass);
+	print("
+		<h1>You are logged in</h1>
+		<br />
+		<ul>
+			<li>Applications Administration (currently offline)<br /></li>
+			<li><a href='manual/browse-notes.php'>Notes Administration</a><br /></li>
+			<li><a href='info.php'>Check phpinfo()</a><br /></li>
+			<li><a href='manual/admin-notes.php?test'>Set up test environment</a>
+				(restricted) <b>".(isset($_COOKIE[get_user()]) ? 'Test mode enabled' :
+				'Test mode disabled')."</b><br /></li>
+			<li><a href='manual/admin-notes.php'>Switch public access to user notes
+				<b>".(file_exists($okfile) ? 'off' : 'on')."</b></a> (restricted)<br /></li>
+			<li><a href='manual/admin-notes.php?m'>Switch outgoing mail
+				<b>".(file_exists($mailfile) ? 'off' : 'on')."</b></a> (restricted)<br /></li>
+			<li><a href='admin-logout.php'>Log out</a></li>
+		</ul>
+	");
+}
+
+print stretchPage(7);
+print "&nbsp;</div>\n";
+commonFooter();
+
+?>

+ 19 - 0
admin-logout.php

@@ -0,0 +1,19 @@
+<?php
+
+require('include/cvs-auth.inc');
+
+/* allow for timezone differences */
+setcookie($user = get_user(), '', time() - (3600*24), '/');
+setcookie('PHP-GTK', '', time() - (3600*24), '/');
+
+/* kill any test data */
+if (file_exists(DB_DIR."/$user.notes.sqlite")) unlink(DB_DIR."/$user.notes.sqlite");
+if (file_exists(DB_DIR."/$user.queue.sqlite")) unlink(DB_DIR."/$user.queue.sqlite");
+if (file_exists(DB_DIR."/$user.lastid.txt")) unlink(DB_DIR."/$user.lastid.txt");
+
+$referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/';
+
+header("Location: $referrer");
+exit;
+
+?>

+ 1 - 0
apps/.cvsignore

@@ -0,0 +1 @@
+screenshots


+ 13 - 0
apps/CVS/Entries

@@ -0,0 +1,13 @@
+/.cvsignore/1.1/Fri Mar 22 22:42:05 2002//

+/add.php/1.5/Thu Aug 11 03:18:45 2005//

+/admin-apps.php/1.8/Thu May 22 12:11:27 2003//

+/apps.php/1.11/Thu Jul 13 06:10:12 2006//

+/apps.sql/1.1/Fri Mar 22 22:22:30 2002//

+/edit.php/1.1/Fri Mar 22 22:22:31 2002//

+/form.php/1.5/Thu Aug 11 03:18:45 2005//

+/index.php/1.2/Mon May 12 01:40:05 2003//

+/modified.php/1.2/Mon May 12 01:40:05 2003//

+/pending.php/1.1/Fri Mar 22 22:22:31 2002//

+/rate.php/1.1/Fri Mar 22 22:22:31 2002//

+/screenshot.php/1.2/Tue May 13 00:59:22 2003//

+D


+ 12 - 0
apps/CVS/Entries.Extra

@@ -0,0 +1,12 @@
+/.cvsignore////*///
+/add.php////*///
+/admin-apps.php////*///
+/apps.php////*///
+/apps.sql////*///
+/edit.php////*///
+/form.php////*///
+/index.php////*///
+/modified.php////*///
+/pending.php////*///
+/rate.php////*///
+/screenshot.php////*///

+ 0 - 0
apps/CVS/Entries.Extra.Old


+ 0 - 0
apps/CVS/Entries.Old


+ 1 - 0
apps/CVS/Repository

@@ -0,0 +1 @@
+php-gtk-web/apps


+ 1 - 0
apps/CVS/Root

@@ -0,0 +1 @@
+:pserver:cvsread:phpfi@cvs.php.net:/repository


+ 90 - 0
apps/add.php

@@ -0,0 +1,90 @@
+<?php
+
+// 
+// this is the "add an app" form that end users use.  
+// 
+
+require_once("apps.inc");
+
+commonHeader('Add an Application', false);
+appHeader();
+
+print("<h1>Add a PHPGTK Application</h1>");
+
+// 
+// if the form was submitted add it to the databas
+// 
+if( $action == "add" ) {
+
+/*
+	if( !empty($_FILES[screenshot][name]) 
+		&& ereg("^image/", $_FILES[screenshot][type]) 
+		&& !ereg("gif", $_FILES[screenshot][type]) 
+	)  {
+		$has_screenshot = 'Y';
+	}else {
+		$has_screenshot = 'N';
+	}
+
+
+	$res = mysql_query("
+			INSERT INTO app
+			(id, status, cat_id, date_added, name, has_screenshot, homepage_url, submitter, blurb)
+			VALUES
+			(0, 'P', $cat_id, NOW(), '$name', '$has_screenshot', '$homepage_url', '$submitter', '$blurb')
+		");
+
+	if( $res == true ) {
+
+		$app_id = mysql_insert_id();
+
+		if( $has_screenshot == 'Y' ) {
+			$app_id = mysql_insert_id();
+
+			handleAppImage($_FILES[screenshot][tmp_name], $app_id);
+
+			$screen_shot_link = "Screenshot : http://$_SERVER[SERVER_NAME]/apps/screenshot.php/$app_id.jpg\n";
+			
+		}
+		
+		mail($mailto, "app '$name' submitted for approval.",
+			"The following application was submitted for approval:\n\n" .
+			"Name       : $name\n" .
+			"URL        : $homepage_url\n" .
+			"Category   : " . $appCats[$cat_id]->name . "\n" .
+			"Submitter  : $submitter\n" .
+			$screen_shot_link .
+			"Description: $blurb\n" .
+			"\n" .
+			"Administrative Actions\n" .
+			"----------------------\n" .
+			"Approve: http://$_SERVER[SERVER_NAME]/apps/admin-apps.php?action=approve&app_id=$app_id\n" .
+			"Edit: http://$_SERVER[SERVER_NAME]/apps/admin-apps.php?action=edit&app_id=$app_id\n" .
+			"Reject: http://$_SERVER[SERVER_NAME]/apps/admin-apps.php?action=reject&app_id=$app_id\n" .
+			"Delete: http://$_SERVER[SERVER_NAME]/apps/admin-apps.php?action=delete&app_id=$app_id\n" .
+			"",
+			"From: $mailto");
+
+		print("Thank you for the submission.  Someone will review it shortly.");
+	}else {
+		print("There was a problem with your submission.  Please try it again.");
+		print("<br>");
+		print("Error: (" . mysql_errno() . ") " . mysql_error() );
+	}
+*/
+    print('Submissions have been disabled until the form is safe from spammers.');
+}else {
+	$form_app = (object) 0;
+	if( !empty($cat_id) ) { 
+		$form_app->cat_id = $cat_id;
+	}
+	$form_url = "add.php";
+	$form_action = "add";
+	$form_submit = "Add";
+	include_once("form.php");
+}
+
+appFooter();
+commonFooter(false);
+
+?>

+ 245 - 0
apps/admin-apps.php

@@ -0,0 +1,245 @@
+<?php
+
+// 
+// This is the main administration page where approvals, rejections, deletions, etc. take place
+// 
+
+//require_once("cvs-auth.inc");
+require_once("email-validation.inc");
+require_once("apps.inc");
+
+if( !isset($MAGIC_COOKIE) ) {
+	Header("Location: http://master.php.net/manage/users.php");
+	exit;
+}
+
+list($user, $pass) = explode(":", base64_decode($MAGIC_COOKIE));
+
+$MAGIC_COOKIE = 'temp';
+
+commonHeader("Applications Administration");
+appHeader($the_cat, $the_subcat);
+
+print("
+	<h1>Applications Administration</h1>
+	If you just want to browse the applications, you're better off <A href='/apps/'>here</A>.
+	<hr noshade size=1>
+");
+
+
+// 
+// this block contains all the actions the script can take.  if we can't authenticate
+// or find the app in question we bail out.
+// 
+if( !empty($action) && !empty($app_id) ) {
+
+	$res = mysql_query("SELECT * FROM app WHERE id = $app_id");
+	if( $res ) {
+		$app = mysql_fetch_object($res);
+	}else {
+		print("<p><b>Unable to find app #$app_id.</b></p>");
+		appFooter();
+		commonFooter();
+		exit;
+	}
+
+	switch($action) {
+	
+	case 'approve':
+		if( !empty($app->modify_id) ) {
+			$res = mysql_query("UPDATE app SET status = 'A' WHERE id = $app_id");
+			$res = mysql_query("DELETE FROM app WHERE id = $app->modify_id");
+			@unlink(APP_SCREENSHOT_DIR . "/$app->modify_id-thumb.jpg");
+			@unlink(APP_SCREENSHOT_DIR . "/$app->modify_id.jpg");
+		}else {
+			$res = mysql_query("UPDATE app SET status = 'A' WHERE id = $app_id");
+		}
+		if( $res ) {
+			$msg = "Application #$app_id approved.";
+		}else {
+			$msg = "Unable to approve application #$app_id.";
+		}
+		print("<script language='JavaScript'> alert('$msg'); document.location.href = 'admin-apps.php';</script>");
+		break;
+
+	case 'delete':
+		$res = mysql_query("DELETE FROM app WHERE id = $app_id");
+
+		if( $res ) {
+			@unlink(APP_SCREENSHOT_DIR . "/$app_id-thumb.jpg");
+			@unlink(APP_SCREENSHOT_DIR . "/$app_id.jpg");
+
+			mail($mailto, "app #$app->id deleted by $user",
+				"The following application was deleted from the system:\n\n" .
+				"Name       : $app->name\n" .
+				"Category   : " . $appCats[$app->cat_id]->name . "\n" .
+				"Submitter  : $app->submitter\n" .
+				"Description: $app->blurb\n",
+				"From: $user@php.net");
+
+			$msg = "Application #$app_id deleted.";
+		}else {
+			$msg = "Unable to delete application #$app_id.";
+		}
+
+		print("<script language='JavaScript'> alert('$msg'); document.location.href = 'admin-apps.php';</script>");
+		break;
+
+	
+	case 'reject':
+		$reject_text  = "If you are receiving this email it is because your application\n";
+		$reject_text .= "posted to the on-line PHP-GTK application database has been\n";
+		$reject_text .= "rejected by one of the editors.\n\n";
+		$reject_text .= "This is most likely due to the fact that your submission does\n";
+		$reject_text .= "not appear to be a geniune PHP-GTK application.\n\n";
+
+		$res = mysql_query("DELETE FROM app WHERE id = $app_id");
+
+		if( $res ) {
+			@unlink(APP_SCREENSHOT_DIR . "/$app_id-thumb.jpg");
+			@unlink(APP_SCREENSHOT_DIR . "/$app_id.jpg");
+
+
+			// email the submitter if the address looks reasonable
+			// uses functions in include/email-validation.inc
+			$submitter = clean_AntiSPAM($app->submitter);
+			if (is_emailable_address($submitter)) {
+				mail($submitter,"app '$app->name' rejected by app editor $user",
+					$reject_text .
+					"----- Copy of your submission below -----\n\n" .
+					"Name       : $app->name\n" .
+					"Category   : " . $appCats[$app->cat_id]->name . "\n" .
+					"Description: $app->blurb\n",
+					"From: $user@php.net");
+			}
+
+			// email to the list
+			mail($mailto,"app '$app->name' rejected by app editor $user",
+				"The following application was rejected from the system:\n\n" .
+				"Name       : $app->name\n" .
+				"Category   : " . $appCats[$app->cat_id]->name . "\n" .
+				"Description: $app->blurb\n",
+				"From: $user@php.net");
+
+			$msg = "Application #$app_id rejected.";
+		}else {
+			$msg = "Unable to reject application #$app_id.";
+		}
+
+		print("<script language='JavaScript'> alert('$msg'); document.location.href = 'admin-apps.php';</script>");
+
+ 		break;
+
+	case 'edit':
+		$form_app = $app;
+		$form_url = "admin-apps.php";
+		$form_action = "modify";
+		$form_submit = "Edit";
+
+		include_once("form.php");
+
+		appFooter();
+		commonFooter();
+		exit;
+
+		break;
+
+	case 'modify':
+		$app_old = $app;
+
+		if( !empty($_FILES[screenshot][name]) 
+			&& ereg("^image/", $_FILES[screenshot][type]) 
+			&& !ereg("gif", $_FILES[screenshot][type]) 
+		)  {
+			$has_new_screenshot = 'Y';
+		}else {
+			$has_screenshot = 'N';
+		}
+
+		if( $has_new_screenshot == "Y" || ($had_screenshot == 1 && $delete_screenshot != 1) ) { 
+				$has_screenshot = 'Y';
+		}
+
+		$res = mysql_query("
+				UPDATE app
+				SET
+					status = '$status',
+					cat_id = $cat_id,
+					name = '$name',
+					has_screenshot = '$has_screenshot',
+					homepage_url = '$homepage_url',
+					submitter = '$submitter',
+					blurb = '$blurb'
+				WHERE id = $app_id
+			");
+
+		$res = mysql_query("SELECT * FROM app WHERE id = $app_id");
+		$app = mysql_fetch_object($res);
+
+		if( $res == true ) {
+
+			if( $delete_screenshot == 1 ) {
+				@unlink(APP_SCREENSHOT_DIR . "/$app_id.jpg");
+				@unlink(APP_SCREENSHOT_DIR . "/$app_id-thumb.jpg");
+			}
+
+			if( $has_new_screenshot == 'Y' ) {
+				handleAppImage($_FILES[screenshot][tmp_name], $app_id);
+			}
+			
+			print("<p><b>Application was edited successfully.</b></p>");
+
+			// email to the list
+			mail($mailto,"app '$app->name' modified by app editor $user",
+				"The following application was modified from this:\n\n" .
+				"-------------------------------------------------\n" .
+				"Name       : $app_old->name\n" .
+				"Status     : $app_old->status\n" .
+				"Category   : " . $appCats[$app_old->cat_id]->name . "\n" .
+				"Description: $app_old->blurb\n".
+				"\n".
+				"to this:\n\n".
+				"-------------------------------------------------\n" .
+				"Name       : $app->name\n" .
+				"Status     : $app->status\n" .
+				"Category   : " . $appCats[$app->cat_id]->name . "\n" .
+				"Description: $app->blurb\n",
+				"From: $user@php.net");
+
+		}else {
+			print("<p><b><font color='#ff0000'>");
+			print("There was a problem editing the application.");
+			print("<br>");
+			print("Error: (" . mysql_errno() . ") " . mysql_error() );
+			print("</font></b></p>");
+		}
+
+		print("<table border=0 cellpadding=2 cellspacing=0 width=100%>");
+			displayApp($app, $the_cat, $the_subcat, $offset);
+		print("</table>");
+
+		appFooter();
+		commonFooter();
+		exit;
+
+		break;
+
+	default:
+		if( !empty($action) ) {
+			print("<p><b><font color='#ff0000'>Error: Didn't understand action '$action'.</font></b></p>");
+		}
+	}
+}
+
+if( empty($the_cat) && empty($the_subcat) && empty($key) ) {
+	include("pending.php");
+}else if( $key == "modified" ) {
+	include("modified.php");
+}else {
+	include("apps.php");
+}
+
+appFooter();
+commonFooter();
+
+?>

+ 105 - 0
apps/apps.php

@@ -0,0 +1,105 @@
+<?php
+
+// 
+// this file gets included from a couple of different places and depending on the values of $this_cat
+// and $key will run slightly different queries to prodocue the appropriate list of applications
+// 
+
+require_once("apps.inc");
+
+$limit = 10;
+if( empty($_GET['offset']) ) {
+	$offset = 0;
+}
+
+if( !empty($_GET['the_cat']) )  {
+	$title = " : " . $appCats[$_GET['the_cat']]->name;
+	$this_cat = $_GET['the_cat'];
+	if( !empty($_GET['the_subcat']) ) {
+		$title .= " : " . $appCats[$_GET['the_cat']]->sub[$_GET['the_subcat']]->name;
+		$this_cat = $_GET['the_subcat'];
+	}
+}
+
+if( !empty($this_cat) )  {
+
+	if( is_array($appCats[$this_cat]->sub) )  {
+		$these_cats = $this_cat . "," . join(",", array_keys($appCats[$this_cat]->sub));
+		$res = mysql_query("SELECT * FROM app WHERE status = 'A' AND cat_id IN ($these_cats) ORDER BY name LIMIT $offset,$limit");
+	}else {
+		$res = mysql_query("SELECT * FROM app WHERE status = 'A' AND cat_id = $this_cat ORDER BY name LIMIT $offset,$limit");
+	}
+	print("<h1>Applications $title</h1>");
+
+}else if( $_GET['key'] == "new" ) {
+	$res = mysql_query("SELECT * FROM app WHERE status = 'A' ORDER BY date_added DESC LIMIT $offset,$limit");
+
+	print("<h1>Applications : New</h1>");
+
+}else if( $_GET['key'] == "rating" ) {
+	$res = mysql_query("SELECT * FROM app WHERE status = 'A' ORDER BY rating DESC LIMIT $offset,$limit");
+
+	print("<h1>Applications : Highest Rating</h1>");
+
+}else {
+	$res = mysql_query("SELECT * FROM app WHERE status = 'A' ORDER BY date_added DESC LIMIT 4");
+
+	print("
+		<h1>Applications</h1>
+
+		Here you will find PHP-GTK applications.  If you know of an application that
+		isn't in this database you can add it via the link on the left.  If there is a category
+		that you think should be added to this database please
+		<a href='mailto:php-gtk-webmaster@lists.php.net'>email the webmaster</a>
+
+		<h3>Rating applications</h3>
+
+		If you like - or dislike - an application that you find on this
+		site, please rate it to give others an idea of its usefulness. 
+		Ratings run from 1 (not good) through to 5 (brilliant).
+
+		<h3>Newest Applications</h3>
+	");
+
+
+}
+
+$num_rows = mysql_num_rows($res);
+if( $res && $num_rows > 0 ) {
+	print("<table border='0' cellpadding='2' cellspacing='0' width='100%'>");
+	while( $row = mysql_fetch_object($res) )  {
+		displayApp($row, $_GET['the_cat'], $_GET['the_subcat'], $_GET['offset']);
+	}
+	print("</table>");
+
+	if( $num_rows >= $limit ) {
+		print("<br/>");
+		print("<p align=right>");
+		print("<small>");
+
+		if( !empty($this_cat) )  {
+			print("<a href='index.php?the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=".($_GET['offset'] + $limit)."'>see more applications...</a>&nbsp;&nbsp;");
+		}else if( !empty($_GET['key']) ) {
+			print("<a href='index.php?key={$_GET['key']}&offset=" . ($_GET['offset'] + $limit) . "'>see more applications...</a>&nbsp;&nbsp;");
+		}else {
+			print("<a href='index.php?key=new'>see more new applications...</a>&nbsp;&nbsp;");
+		}
+
+		print("</small>");
+		print("</p>");
+		print("<br/>");
+		print("<br/>");
+	}
+}else {
+	if( $offset > 0 ) {
+		print("There are no more applications in this category.");
+	}else {
+		print("There are not any applications in this category.");
+		print("<br/>");
+		print("<br/>");
+		print("Maybe you'd like to <a href='add.php?cat_id=$this_cat'>add one</a>?");
+
+	}
+}
+
+?>

+ 21 - 0
apps/apps.sql

@@ -0,0 +1,21 @@
+DROP TABLE IF EXISTS app;
+CREATE TABLE app (
+	id				INT UNSIGNED NOT NULL AUTO_INCREMENT,
+	modify_id		INT UNSIGNED,
+	status			CHAR(1) DEFAULT 'P' NOT NULL,
+	cat_id			INT UNSIGNED NOT NULL,
+	date_added		DATETIME NOT NULL,
+	rating			FLOAT DEFAULT 0.0 NOT NULL,
+	votes			INT UNSIGNED DEFAULT 0 NOT NULL,
+	name			VARCHAR(255) NOT NULL,
+	has_screenshot	CHAR(1) DEFAULT 'N' NOT NULL,
+	homepage_url	VARCHAR(255),
+	submitter		VARCHAR(100),
+	approved_by		VARCHAR(20),
+	blurb			TEXT,
+	#
+	PRIMARY KEY app_pk (id),
+	INDEX app_status_idx (status),
+	INDEX app_cat_id_idx (cat_id),
+	INDEX app_date_added_idx (date_added)
+);

+ 116 - 0
apps/edit.php

@@ -0,0 +1,116 @@
+<?php
+
+// 
+// This is the form end users use to submit modifications to their apps to the database.
+// A modified app is actually a new record with a pointer to the old one.  Once an administrator
+// approves the new one the status is changed to active and the old one is removed from the system.
+// This has the added benefit of bringing it to the top of the "newest applications" list.
+// 
+
+require_once("apps.inc");
+
+commonHeader('Edit your Application', false);
+appHeader();
+
+print("<h1>Edit Your PHPGTK Application</h1>");
+
+// 
+// if the form was submitted add it to the databas
+// 
+if( $action == "modify" ) {
+	$res = mysql_query("SELECT * FROM app WHERE id = $app_id");
+	if( $res ) {
+		$app = mysql_fetch_object($res);
+		if( $app->submitter == $submitter ) {
+
+			if( !empty($_FILES[screenshot][name]) && ereg("^image/", $_FILES[screenshot][type]) )  {
+				$has_screenshot = 'Y';
+			}else {
+				$has_screenshot = 'N';
+			}
+
+			$res = mysql_query("
+					INSERT INTO app
+					(id, modify_id, status, cat_id, date_added, name, has_screenshot, homepage_url, submitter, blurb)
+					VALUES
+					(0, $app->id, 'M', $cat_id, NOW(), '$name', '$has_screenshot', '$homepage_url', '$submitter', '$blurb')
+				");
+
+			if( $res == true ) {
+
+				if( $has_screenshot == 'Y' ) {
+					$app_id = mysql_insert_id();
+
+					handleAppImage($_FILES[screenshot][tmp_name], $app_id);
+					
+				}
+				
+
+				print("Thank you for the update.  Someone will review it shortly.");
+			}else {
+				print("There was a problem with your update.  Please try it again.");
+				print("<br>");
+				print("Error: (" . mysql_errno() . ") " . mysql_error() );
+			}
+	
+		}else {
+			print("<p><b>Sorry, the email address you entered does not match the address on file for this application.</b></p>");
+		}
+	}else {
+		print("<p><b>Unable to find app #$app_id for editing.</b></p>");
+	}
+
+	
+	
+}else if( $action == "edit" ) {
+	$res = mysql_query("SELECT * FROM app WHERE id = $app_id");
+	if( $res ) {
+		$form_app = mysql_fetch_object($res);
+		$form_app->submitter = "";
+		$form_url = "edit.php";
+		$form_action = "modify";
+		$form_submit = "Edit";
+
+		print("Please enter your email again for security purposes.");
+		include_once("form.php");
+
+		appFooter();
+		commonFooter();
+		exit;
+	}else {
+		print("<p><b>Unable to find app #$app_id for editing.</b></p>");
+	}
+}else if( $action == "list" ) {
+	$email = ereg_replace("'", "", $email);
+	$res = mysql_query("SELECT * FROM app WHERE status = 'A' AND submitter = '$email' ORDER BY name");
+	$num_rows = mysql_num_rows($res);
+	if( $res && $num_rows > 0 ) {
+		print("<table border=0 cellpadding=2 cellspacing=0 width=100%>");
+		while( $row = mysql_fetch_object($res) )  {
+			displayApp($row, $the_cat, $the_subcat, 0, true);
+		}
+		print("</table>");
+	}else {
+		print("Unable to find any applications that you submitted.");
+	}
+}else {
+	print("
+		<form action='edit.php' method=post>
+			<input type=hidden name='action' value='list'>
+
+			Please enter your email address.
+			<br>
+			<br>
+			<input type=text name='email'>
+			<input type=submit value='Continue'>
+			<br>
+			<br>
+			Your email address will be used to locate applications that you have submitted.
+		</form>
+	");
+}
+
+appFooter();
+commonFooter(false);
+
+?>

+ 133 - 0
apps/form.php

@@ -0,0 +1,133 @@
+<?php
+	// 
+	// This page gets included from a couple of different forms.  
+	// It uses the following variables to lay things out correctly.
+
+	// $form_app - an object containing the form properties (usually a result of mysql_fetch_object)
+	// $form_url - what url to submit to.
+	// $form_action - what the hidden field "action" should have its value set to.
+	// $form_submit - what the submit button should say
+	// 
+
+print('The submission form has been turned off until we modify the form to prevent spammers.');
+
+/*
+?>
+<script language='JavaScript'>
+<!--
+
+function checkForm(f) {
+
+	if( f.submitter.value.length == 0 )  {
+		alert("You must provide your name.");
+		f.submitter.focus();
+		f.submitter.select();
+		return(false);
+	}
+
+	if( f.name.value.length == 0 )  {
+		alert("You must provide an application name.");
+		f.name.focus();
+		f.name.select();
+		return(false);
+	}
+
+	if( f.homepage_url.value.length == 0 )  {
+		alert("You must provide a homepage url.");
+		f.homepage_url.focus();
+		f.homepage_url.select();
+		return(false);
+	}
+
+	if( f.blurb.value.length == 0 )  {
+		alert("You must provide a description.");
+		f.blurb.focus();
+		f.blurb.select();
+		return(false);
+	}
+
+	return(true);
+}
+
+//-->
+</script>
+
+<form action='<?php print($form_url) ?>' method=post enctype='multipart/form-data' onsubmit='return checkForm(this)'>
+<input type=hidden name='action' value='<?php print($form_action) ?>'>
+<?php 
+	if( $form_action == "modify" ) {
+		print("<input type=hidden name='app_id' value='$form_app->id'>");
+	}
+?>
+
+<table border=0 cellpadding=5 cellspacing=0 bgcolor='#e0e0e0'>
+<?php 
+if( $MAGIC_COOKIE ) {
+	print("<tr valign=top>");
+		print("<td align=right nowrap>Status:</td>");
+		print("<td>");
+			$statusAry = array("A" => "Active", "P" => "Pending", "M" => "Modified");	
+			print("<select name='status'>");
+			foreach( $statusAry as $k => $v ) {
+				if( $form_app->status == $k ) {
+					print("<option value='$k' selected>$v");
+				}else {
+					print("<option value='$k'>$v");
+				}
+			}
+			print("</select>");
+		print("</td>");
+	print("</tr>");
+}
+?>
+<tr valign=top>
+	<td align=right nowrap><?php if( $MAGIC_COOKIE ) { print("Submitter"); }else { print("Your"); } ?> Email:</td>
+	<td><input type=text name='submitter' value='<?php print($form_app->submitter) ?>' size=50></td>
+</tr>
+<tr valign=top>
+	<td align=right nowrap>Application Name:</td>
+	<td><input type=text name='name' value='<?php print($form_app->name) ?>' size=50></td>
+</tr>
+<tr valign=top>
+	<td align=right nowrap>Homepage URL:</td>
+	<td><input type=text name='homepage_url' value='<?php print($form_app->homepage_url) ?>' size=50></td>
+</tr>
+<tr valign=top>
+	<td align=right nowrap>Category:</td>
+	<td><select name='cat_id'><?php print makeAppSelectMenuOptions($form_app->cat_id); ?></select></td>
+</tr>
+<tr valign=top>
+	<td align=right nowrap>Description:</td>
+	<td><textarea name='blurb' rows=7 cols=40><?php print($form_app->blurb) ?></textarea></td>
+</tr>
+<?php if( $form_action == "modify" && $form_app->has_screenshot == "Y" ) { ?>
+	<tr valign=top>
+		<td align=right nowrap>Current<br>Screen Shot:</td>
+		<td>
+			<a href='screenshot.php/<?php print($form_app->id) ?>.jpg' target='apppop'><img src='screenshot.php/<?php print($form_app->id) ?>-thumb.jpg' alt='' border=0></a>
+			<br>
+			<input type=checkbox name='delete_screenshot' value='1'> Check to delete current screen shot.
+			<input type=hidden name='had_screenshot' value='1'>
+		</td>
+	</tr>
+	<tr valign=top>
+		<td align=right nowrap>New Screen Shot:</td>
+		<td><input type=file name='screenshot'><br><small>(JPEG or PNG only, please)</small></td>
+	</tr>
+<?php }else { ?>
+	<tr valign=top>
+		<td align=right nowrap>Screen Shot:</td>
+		<td><input type=file name='screenshot'><br><small>(JPEG or PNG only, please)</small></td>
+	</tr>
+<?php } ?>
+<tr valign=top>
+	<td align=right nowrap colspan=2>
+		<input type=reset value='Reset'>
+		<input type=submit value='<?php print($form_submit) ?>'>
+	</td>
+</tr>
+</table>
+</form>
+<?
+/* */
+?>

+ 17 - 0
apps/index.php

@@ -0,0 +1,17 @@
+<?php
+
+// 
+// this is the main page that gets loaded by end users
+// 
+
+require_once("apps.inc");
+
+commonHeader('Applications' . $title, false);
+appHeader($_GET['the_cat'], $_GET['the_subcat']);
+
+include("apps.php");
+
+appFooter();
+commonFooter(false);
+
+?>

+ 26 - 0
apps/modified.php

@@ -0,0 +1,26 @@
+<?php
+
+// 
+// this page gets used by administrators to see what apps have had
+// modifications made and need to be updated
+// 
+
+require_once("apps.inc");
+
+$res = mysql_query("SELECT * FROM app WHERE status = 'M' ORDER BY date_added");
+
+print("<h1>Modified Applications</h1>");
+
+$num_rows = mysql_num_rows($res);
+if( $res && $num_rows > 0 ) {
+	print("<table border=0 cellpadding=2 cellspacing=0 width=100%>");
+	while( $row = mysql_fetch_object($res) )  {
+		displayApp($row, 0, 0, 0);
+	}
+	print("</table>");
+
+}else {
+	print("There are no modified applications at this time.");
+}
+
+?>

+ 26 - 0
apps/pending.php

@@ -0,0 +1,26 @@
+<?php
+
+// 
+// this page gets used by administrators to see what apps are pending approval.
+// 
+
+require_once("apps.inc");
+
+$res = mysql_query("SELECT * FROM app WHERE status = 'P' ORDER BY date_added");
+
+print("<h1>Pending Applications</h1>");
+
+
+$num_rows = mysql_num_rows($res);
+if( $res && $num_rows > 0 ) {
+	print("<table border=0 cellpadding=2 cellspacing=0 width=100%>");
+	while( $row = mysql_fetch_object($res) )  {
+		displayApp($row, 0, 0, 0);
+	}
+	print("</table>");
+
+}else {
+	print("There are no pending applications at this time.");
+}
+
+?>

+ 30 - 0
apps/rate.php

@@ -0,0 +1,30 @@
+<?php
+	require_once("apps.inc");
+
+	// 
+	// try to prevent external rating scripts
+	// 
+
+	if( isset($APP_RATE_COOKIE) ) {
+		$ratingAry = unserialize(base64_decode($APP_RATE_COOKIE));
+	}
+	if( !is_array($ratingAry) ) {
+		$ratingAry = array();
+	}
+	if( $rate >= 1 && $rate <= 5 && !array_key_exists($app_id, $ratingAry) && ereg("http://$_SERVER[SERVER_NAME]/apps", $_SERVER[HTTP_REFERER]) )  {
+		mysql_query("
+			UPDATE app
+			SET 
+				rating = (rating * votes + $rate) / (votes + 1),
+				votes = votes + 1
+			WHERE id = $app_id
+		");
+
+		$ratingAry[$app_id] = 1;
+
+		SetCookie("APP_RATE_COOKIE", base64_encode(serialize($ratingAry)), time()+86400, '/' );
+	}
+
+
+	include_once("index.php");
+?>

+ 12 - 0
apps/screenshot.php

@@ -0,0 +1,12 @@
+<?php
+
+	// 
+	// All the links to screenshots pass through this file.  The url looks something like this:
+	// http://host.com/apps/screenshot.php/8.jpg.  This would read 8.jpg from APP_SCREENSHOT_DIR.
+	// 
+
+	Header("Content-type: image/jpeg");
+	require_once("apps.inc");
+
+	readfile(APP_SCREENSHOT_DIR.$PATH_INFO);
+?>

+ 211 - 0
changelog.php

@@ -0,0 +1,211 @@
+<?php
+require_once('include/prepend.php');
+commonHeader('PHP-GTK Changelog');
+
+?>
+
+<h1>PHP-GTK ChangeLog</h1>
+
+<a name="2.0.0alpha"></a>
+<h3>Version 2.0.0alpha "renaissance redux"</h3>
+<b>15-July-2006</b>
+<ul>
+<li>first preview release of the new architecture</li>
+<li>make PHP 5, ZendEngine 2, and 1.5 gajillion little and big pieces (including my brain and caffeine metabolizer cells) work, basically. (Andrei, et al)</li>
+</ul>
+
+<a name="1.0.1"></a>
+<h3>Version 1.0.1 "you thought we were done?"</h3>
+<b>09-Aug-2004</b>
+<ul>
+<li>buildconf script now takes an optional --with-phpize=&lt;path&gt; option to specify the location of phpize script. (Andrei)</li>
+<li>removed support for old build system. PHP 4.3.x is now required to build PHP-GTK. (Andrei)</li>
+<li>implemented append_element(), prepend_element(), insert_element(), append_item(), prepend_item(), and insert_item() methods of GtkToolbar class. (Andrei)</li>
+<li>exposed the following (read-only) GtkToolbar properties: (Andrei)
+	<ul style="list-style-type: square">
+	<li>style</li>
+	<li>space_style</li>
+	<li>space_size</li>
+	<li>orientation</li>
+	</ul>
+</li>
+<li>reimplemented Gdk::cursor_new_from_pixmap() so it actually works. (Tom Rogers, Andrei)</li>
+</ul>
+
+<a name="1.0.0"></a>
+<h3>Version 1.0.0 "mountain view special"</h3>
+<b>23-Oct-2003</b>
+<ul>
+<li>added support for GtkCanvas widget (Alan)</li>
+<li>added support for GdkImLib toolkit - experimental (Alan)</li>
+<li>added support for GtkExtra widgets, GtkPlot, GtkSheet and many others (Angel Maza, Alan)</li>
+<li>added get_wrap_mode, set_wrap_mode to GtkScintilla (Benjamin Smith)</li>
+<li>fixed segfault when providing GtkCtree::insert_node wrong parameters</li>
+<li>added GtkScintilla, GtkComboButton, GtkSpaned, GtkScrollpane to Win32 distribution (Frank)</li>
+<li>fixed warning on GtkNotebook::switch-page signal (Alan)</li>
+</ul>
+
+<a name="0.5.2"></a>
+<h3>Version 0.5.2 "Bass does a body good"</h3>
+<b>01-Nov-2002</b>
+<ul>
+<li>simplified GdkPixbuf constructor parameters. (Andrei)</li>
+<li>fixed setting of tile/stipple/clip_mask/bg_pixmap properties of GdkGC.  (Andrei)</li>
+<li>implemented GdkPixbuf::fill(). (Andrei)</li>
+<li>changed failure to allocate color to output only a notice instead of a warning. (Andrei)</li>
+<li>made depth parameter of GdkPixmap constructor optional. (Andrei)</li>
+<li>added copy_area() method for drawables. (Andrei)</li>
+<li>added group() and set_group() methods for GtkRadioButton/GtkRadioMenuItem.  (Andrei)</li>
+<li>added GDK functions pointer_grab(), pointer_ungrab(), keyboard_grab(), keyboard_ungrab(). (Andrei)</li>
+<li>added utf8 support to GtkRadioButton, GtkToggleButton, GtkCheckMenuItem, and GtkCheckButton. (Frank)</li>
+<li>fixed a crash bug when using non-string variables to access overloaded object's properties. (Andrei)</li>
+<li>fixed a crash bug in GtkCheckButton constructor. (Andrei)</li>
+</ul>
+
+<a name="0.5.1"></a>
+<h3>Version 0.5.1 "hardboiled wonderland"</h3>
+<b>26-Apr-2002</b>
+<ul>
+<li>changed gdkwindow::set_cursor() to allow reverting the cursor to default one. (Andrei)</li>
+<li>fixed gtk::input_add() for pre-streams PHP versions. (Andrei)</li>
+<li>adapted build system to work with the new PHP build system. (Andrei)</li>
+<li>made gtk::input_add() work with PHP streams. (Andrei)</li>
+<li>fixed gtkscintilla::marker_add return type. (Alan)</li>
+<li>fixed property and method access on GdkBitmap. (Andrei)</li>
+<li>fixed a crash bug in gtkclist::append() when size of input was greater than the number of columns. (Markus)</li>
+</ul>
+
+<a name="0.5.0"></a>
+<h3>Version 0.5.0 "monday starts on saturday"</h3>
+<b>24-Jan-2002</b>
+<ul>
+<li>added new widgets with samples: GtkComboButton, GtkSPaned, GtkScrollPane and GtkPieMenu. (Markus)</li>
+<li>implemented GtkFontSelection::set_filter(), GtkFontSelectionDialog::set_filter(), Gtk::button_box_get_child_ipadding_default(), Gtk::button_box_get_child_size_default() and GtkWidget::get_pointer(). (Markus)</li>
+<li>implemented gdkpixbuf extension (loading and displaying images). (Andrei)</li>
+<li>added GtkCTree methods find_by_row_data, find_all_by_row_data. (Andrei)</li>
+<li>added gtkhtml extension which provides support for GtkHTML, an HTML rendering widget. (Alan Knowles)</li>
+<li>added GtkClist methods find_row_from_data(), get_pixmap(). (Andrei)</li>
+<li>added GtkList::remove_items() method. (Andrei)</li>
+<li>added ability to build extensions as shared libraries and load them selectively. (Andrei)</li>
+<li>made libglade work on Win32 platforms. (Frank)</li>
+<li>added support for GtkSQPane widget. (Markus)</li>
+<li>added GtkCList::get_pixtext(). (Andrei, Rich Payne)</li>
+</ul>
+
+<?php echo hdelim(); ?>
+
+<a name="0.1.1"></a>
+<h3>Version 0.1.1 "no-holds-barred memento"</h3>
+<b>24-Sep-2001</b>
+<ul>
+<li>made type checking of parameters passed to PHP-GTK functions more forgiving. (Andrei)</li>
+<li>added GtkNotebook::query_tab_label_packing(), GtkBox::query_child_packing(). (Markus)</li>
+<li>added event watcher, dialog, file selection, panes, and notebook examples to gtk.php. (Markus)</li>
+<li>added Gtk::signal_(add|remove)_emission_hook(), Gtk::signal_name(), and Gtk::signal_lookup() functions. (Markus)</li>
+<li>added GtkCList::get_selection_info(). (Andrei)</li>
+<li>added GtkCList methods set_row_data(), get_row_data(). (Markus)</li>
+<li>added support for GtkScintilla, a text-editing widget. (Andrei)</li>
+<li>implemented GladeXML methods signal_connect_object() and signal_autoconnect_object(). (Andrei)</li>
+<li>fixed GDK keysym constants warnings by prefixing some of them with underscores. (Frank)</li>
+<li>changed PHP-visible extension name from 'gtk' to 'php-gtk'. (Andrei)</li>
+</ul>
+
+<?php echo hdelim(); ?>
+
+<a name="0.1"></a>
+<h3>Version 0.1 "the void which binds"</h3>
+<b>1-Aug-2001</b>
+<ul>
+<li>added GDK keysyms constants. (Andrei)</li>
+<li>fixed bug with GtkStyle::copy() that was not returning the result properly. (Andrei)</li>
+<li>implemented support for struct based classes (GdkRectangle, GtkAllocation, GtkRequisition, etc). (Andrei)</li>
+<li>finished drag-n-drop support. (Andrei)</li>
+<li>ported Scribble example from C. (Andrei)</li>
+<li>modified GdkWindow::get_pointer() to be simpler, without XInput support.  (Andrei)</li>
+<li>changed 'area' event property to be a GdkRectangle. (Andrei)</li>
+<li>changed 'is_hint' event property to be boolean. (Andrei)</li>
+<li>added ability to query the state and allocation of a widget. (Andrei)</li>
+<li>added direct construction of pixmaps. (Andrei)</li>
+<li>added GdkWindow::set_icon() method. (Andrei)</li>
+<li>implemented GtkList methods insert_items() and prepend_items(). (Andrei)</li>
+<li>implemented new PHP-like build system that supports adding extensions to PHP-GTK. (Andrei)</li>
+<li>implemented GtkCTree methods node_get_pixtext(), node_get_pixmap(), and get_node_info().  (Andrei)</li>
+<li>implemented GtkObject::emit(), thus allowing programmatical emission of signals. (Andrei)</li>
+<li>added support for accessing GtkObject arguments via get_arg() and set_arg() methods. (Andrei)</li>
+</ul>
+
+<?php echo hdelim(); ?>
+
+<a name="0.0.4"></a>
+<h3>Version 0.0.4 "indistinguishable from magic"</h3>
+<b>5-May-2001</b>
+<ul>
+<li>improved speed/memory efficiency by having only one wrapper for boxed types, except for GdkEvent, GdkColor and GdkAtom. (Andrei)</li>
+<li>implemented object overloading emulation layer to correct for Zend engine's problems, now it's possible to assign and read custom properties on Gtk+ objects. (Andrei)</li>
+<li>added GtkAspectFrame class definition. (Andrei)</li>
+<li>added GtkCTree traversal functions. (Andrei)</li>
+<li>optimized internal resource handling, this should save on memory. (Andrei)</li>
+<li>fixed a bug that would corrupt object type when setting cascaded property.  (Andrei)</li>
+<li>added a few more properties to GtkCTree and GtkCList. (Andrei)</li>
+<li>implemented GtkMenu::popup(). (Andrei)</li>
+<li>fixed GtkCTree::insert_row() for good, added GtkCTree methods node_set_row_data() and node_get_row_data(). (Andrei)</li>
+<li>added helper GtkCListRow class. (Andrei)</li>
+<li>separated GdkWindow, GdkBitmap, GdkPixmap implementations to allow for more flexibility and clarity. (Andrei)</li>
+<li>implemented GtkObject methods get_data(), set_data, connect_after(), connect_object_after(). (Andrei)</li>
+<li>added several more widget examples to gtk.php. (Andrei)</li>
+<li>added ability to get and set color for GtkColorSelection. (Andrei)</li>
+</ul>
+
+<?php echo hdelim(); ?>
+
+<a name="0.0.3"></a>
+<h3>Version 0.0.3 "slow glass"</h3>
+<b>20-Mar-2001</b>
+<ul>
+<li>added libglade support. (Andrei)</li>
+<li>fixed cascading property access in objects. (Andrei)</li>
+<li>added GtkRadioMenuItem, GtkRadioButton constructors. (Andrei)</li>
+<li>added Gdk::pixmap_create_from_xpm_d(). (Andrei)</li>
+<li>added GtkCList::prepend(), GtkClist::insert(). (Andrei)</li>
+<li>added GtkCList example to gtk.php. (Andrei)</li>
+<li>made Gdk::input_add() work with file resources. (Andrei)</li>
+<li>fixed GDK locale support. (Alex Bokovoy)</li>
+<li>reworked the generator to make it more generalized. (Andrei)</li>
+<li>re-engineered the build system a bit to accomodate the need to build additional modules. (Andrei)</li>
+<li>added helper GtkBoxChild, GtkFixedChild classes. (Andrei)</li>
+<li>added some properties for GtkWidget, GtkBin, GtkMisc, GtkArrow, GtkBox, GtkCalendar, GtkCTree, GtkList, and GtkCList classes. (Andrei)</li>
+</ul>
+
+<?php echo hdelim(); ?>
+
+<a name="0.0.2"></a>
+<h3>Version 0.0.2 "primordial nucleosynthesis"</h3>
+<b>7-Mar-2001</b>
+<ul>
+<li>added 'child' property to GtkBin and its descendants. (Andrei)</li>
+<li>all callbacks now take user supplied extra arguments and better error messages are shown if the callbacks are not valid. (Andrei)</li>
+<li>added GtkCombo::set_popdown_strings(), GdkPixmap::create_from_xpm().  (Andrei)</li>
+<li>implemented support for creating menus via GtkItemFactory. (Andrei)</li>
+<li>fixed loading of the extension via php.ini. (Andrei)</li>
+<li>fixed timeout and idle handler marshaller so that they are called more than once. (Andrei)</li>
+<li>added connect_object() method that allows calling an object method as a signal callback. (Andrei)</li>
+<li>fixed a silent crash that was happening due to object corruption. (Andrei)</li>
+<li>implemented GtkTipsQuery class. (Andrei)</li>
+</ul>
+
+<?php echo hdelim(); ?>
+
+<a name="0.0.1"></a>
+<h3>Version 0.0.1 "Genesis"</h3>
+<b>1-Mar-2001</b>
+<ul>
+<li>first release. (Andrei)</li>
+</ul>
+
+<?php
+
+commonFooter();
+
+/* s/^\s*-\s*\(.\+\)$/<li>\1<\/li>/g */
+
+?>

+ 69 - 0
copyright.php

@@ -0,0 +1,69 @@
+<?php
+/*
+ * $Id
+ */
+
+require_once('include/prepend.php');
+commonHeader("Copyright and License");
+
+?>
+
+<h1>Copyright and License</h1>
+
+
+<h2>PHP License</h2>
+
+<p>For information on the PHP License (i.e. using the PHP language),
+    <?php print_link('http://www.php.net/license/', 'click here'); ?>.
+    </p>
+
+<h2>PHP-GTK License</h2>
+
+<p>PHP-GTK is released under the LGPL.
+    <?php print_link('http://www.gnu.org/copyleft/lesser.html#SEC1', 'Click here'); ?>
+    for more info on the LGPL.</p>
+
+<h2>Website Copyright</h2>
+
+<p>The code, text, PHP logo, and graphical elements on this website and the
+    mirror websites (the "Site") are Copyright &copy; 2001-<?php echo date('Y'); ?> The PHP
+    Group.  All rights reserved.</p>
+
+<p>Except as otherwise indicated elsewhere on this Site, you are free view,
+    download and print the documents and information available on this Site
+    subject to the following conditions:</p>
+
+<ul>
+    <li>You may not remove any copyright or other proprietary notices
+        contained in the documents and information on this Site.</li>
+    <li>The rights granted to you constitute a license and not a transfer of
+        title.</li>
+    <li>The rights specified above to view, download and print the documents
+        and information available on this Site are not applicable to the
+        graphical elements, design or layout of this Site.These elements of
+        the Site are protected by trade dress and other laws and may not be
+        copied or imitated in whole or in part.</li>
+</ul>
+
+<p>You can contact the webmaster at
+    <?php print_email('php-gtk-webmaster@lists.php.net'); ?>.</p>
+
+<p>For more information on the PHP Group and the PHP project, please see
+    <?php print_link('http://www.php.net/'); ?>.</p>
+
+<p>For more information on the PHP-GTK project, please see
+    <?php print_link('http://gtk.php.net/'); ?>.</p>
+
+<br />
+
+<?php
+commonFooter();
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: expandtab sw=4 ts=4 fdm=marker
+ */
+?>

+ 17 - 0
credits.php

@@ -0,0 +1,17 @@
+<?php
+require_once('include/prepend.php');
+commonHeader('Credits');
+
+?>
+
+<h1>Credits</h1>
+
+<P>
+Coming soon ...
+</P>
+
+<?php
+
+commonFooter();
+
+?>

+ 28 - 0
do_download.php

@@ -0,0 +1,28 @@
+<?php
+
+if (!isset($_SERVER['HTTP_REFERER'])) {
+	$_SERVER['HTTP_REFERER'] = "-";
+}
+
+if (!isset($download_file) || !file_exists("distributions/$download_file")) {
+	exit("Invalid file requested for download!");
+}
+
+header("Location: http://$SERVER_NAME/distributions/$download_file");
+
+$remote_addr = $_SERVER['HTTP_X_FORWARDED_FOR'] ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
+
+$remote_log =
+	@fopen("http://php-gtk.audean.com/log_download.php".
+		"?download_file=" . urlencode($download_file).
+		"&mirror=" . urlencode($_SERVER['SERVER_NAME']).
+		"&user_referer=" . urlencode($_SERVER['HTTP_REFERER']).
+		"&user_ip=" . urlencode($remote_addr),
+	'r');
+
+if ($remote_log) {
+	fread($remote_log, 1024);
+	fclose($remote_log);
+}
+
+?>

+ 68 - 0
docs-rss.php

@@ -0,0 +1,68 @@
+<?php
+/*
+ * $Id: docs-rss.php,v 1.3 2006/03/27 13:08:09 sfox Exp $
+ */
+
+// Send the appropriate header
+header('Content-type: application/rss+xml');
+
+// Start output buffering in order to grab the data from the documentation
+// CVS updates file (that is echoed when included) and save to a variable
+// instead of echoing it right away.
+/* ob_start();
+ echo '<?xml version=\'1.0\' standalone=\'yes\'?' . '>' . "\n";
+ include_once 'http://gtk.php.net/manual/en/updates.php';
+$xmlstr = ob_get_clean();
+$xml = simplexml_load_string($xmlstr);
+*/
+$xmlstr = '<?xml version=\'1.0\' standalone=\'yes\'?>' . "\n"
+   . '<links>'
+   . file_get_contents('http://gtk.php.net/manual/en/updates.php')
+   . '</links>'
+   ;
+$xml = simplexml_load_string($xmlstr);
+
+echo '<?xml version="1.0" encoding="UTF-8"?>';
+?>
+<rdf:RDF
+    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+    xmlns="http://purl.org/rss/1.0/"
+    xmlns:dc="http://purl.org/dc/elements/1.1/">
+
+<channel rdf:about="http://gtk.php.net/manual1">
+    <title>PHP-GTK Manual</title>
+    <link>http://gtk.php.net/manual1</link>
+    <description>The PHP-GTK on-line manual</description>
+    <items>
+        <rdf:Seq>
+<?php
+foreach ($xml->a as $link) {
+    echo '            <rdf:li rdf:resource="' . $link->attributes() . '" />';
+    echo "\n";
+}
+?>
+        </rdf:Seq>
+    </items>
+</channel>
+
+<?php
+foreach ($xml->a as $link) {
+    foreach ($link->attributes() as $key => $value) {
+        if ($key == 'date') {
+            $date = date('Y-m-d', strtotime($value));
+        } else {
+            $url = $value;
+        }
+    }
+?>
+<item rdf:about="<?php echo $url; ?>">
+    <title><?php echo $link; ?></title>
+    <link><?php echo $url; ?></link>
+    <description>Documentation update: <?php echo $link; ?></description>
+    <dc:date><?php echo $date; ?></dc:date>
+</item>
+
+<?php
+}
+?>
+</rdf:RDF>

+ 163 - 0
docs.php

@@ -0,0 +1,163 @@
+<?php
+/*
+ * $Id: docs.php,v 1.15 2006/10/02 05:36:52 andrei Exp $
+ */
+
+require_once('include/prepend.php');
+// Start output buffering in order to grab the data from the documentation
+// CVS updates file (that is echoed when included) and save to a variable
+// instead of echoing it right away.
+ob_start();
+?>
+<div id="docsupdates">
+<h3>Docs Updates</h3>
+<?php
+//include_once 'manual/en/updates.php';
+echo file_get_contents('http://gtk.php.net/manual/en/updates.php');
+?>
+</div>
+<?php
+$RIGHT_SIDEBAR_DATA = ob_get_clean();
+
+
+$SIDEBAR_DATA = <<< EOF
+<h3>FAQ</h3>
+<p>The <a href="/faq.php">PHP-GTK FAQ</a> is your first stop for general
+    information and those questions that seem to be on most people&#8217;s
+    minds.</p>
+
+<!--
+<p>The <a href="/wiki/">PHP-GTK Wiki</a> also provides an <a href="/wiki/PhpGtk/PhpGtkFaq">extended
+    FAQ</a> section.</p>
+-->
+
+<h3>Changelog</h3>
+<p>You can also find the <a href="/changelog.php">PHP-GTK Changelog</a> useful,
+    if you would like to look up changes between various versions of
+    PHP-GTK.</p>
+
+<h3>More Information</h3>
+<p>The <a href="/wiki/">PHP-GTK Wiki</a> is an excellent resource and
+    addendum to the documentation listed here.</p>
+
+<h3>Sample Code</h3>
+<p>Sample code and example scripts are often the best way to learn PHP-GTK.
+    The manual comes complete with a <a href="/manual1/en/tutorials.php">Tutorials
+    section</a> that contains some sample code.  However, the Wiki also has a
+    <a href="/wiki/Code">code section</a> dedicated to samples.</p>
+EOF;
+
+commonHeader("Documentation");
+
+?>
+
+<h1>Documentation</h1>
+
+<p>The documentation for PHP-GTK 2 is a work in progress, as can be seen from the
+    updates list to the right. Translations are very much in the early stages, and
+    will be added here as they start to come in.</p>
+
+<p>Note that, in translated versions of the manual, untranslated sections will
+    still be in English.</p>
+
+<table border="0" cellpadding="3" cellspacing="2" width="100%">
+    <tr bgcolor="#cccccc">
+        <th>Formats</th>
+        <th>Languages</th>
+    </tr>
+    <tr>
+        <th bgcolor="#dddddd">View Online</th>
+        <td bgcolor="#eeeeee">
+<?php
+
+$lastlang = count($man2_languages) - 1;
+foreach ($man2_languages as $langnum => $langcode) {
+	echo '<a href="/manual/'.$langcode.'/">'.$LANGUAGES[$langcode].'</a>';
+	echo ($lastlang != $langnum) ? ", " : "";
+}
+
+?>
+        </td>
+    </tr>
+    <tr>
+        <th bgcolor="#dddddd">Printer friendly</th>
+        <td bgcolor="#eeeeee">
+<?php
+
+foreach ($man2_languages as $langnum => $langcode) {
+	echo '<a href="/manual/'.$langcode.'/html/index.html">'.$LANGUAGES[$langcode].'</a>';
+	echo ($lastlang != $langnum) ? ", " : "";
+}
+
+?>
+        </td>
+    </tr>
+    <tr>
+        <th bgcolor="#dddddd">Downloads</th>
+        <td bgcolor="#eeeeee">For other downloadable formats, please visit
+            our <a href="download-docs.php">documentation downloads</a> page.</td>
+    </tr>
+</table>
+
+<p>The PHP-GTK 1 manual is available online in a selection of languages. You can
+    choose between the printer friendly and graphically designed versions.
+    Please pick a language and format from the table below.</p>
+
+<p> Note, that many languages are just under translation, and the untranslated
+    parts are still in English. Also some translated parts might be outdated.
+    The translation teams are open to contributions. Please send an e-mail to
+    <a href="mailto:php-gtk-doc+at+lists+dot+php+dot+net">php-gtk-doc at lists
+    dot php dot net</a> to offer your help.</p>
+
+<table border="0" cellpadding="3" cellspacing="2" width="100%">
+    <tr bgcolor="#cccccc">
+        <th>Formats</th>
+        <th>Languages</th>
+    </tr>
+    <tr>
+        <th bgcolor="#dddddd">View Online</th>
+        <td bgcolor="#eeeeee">
+<?php
+
+$lastlang = count($man_languages) - 1;
+foreach ($man_languages as $langnum => $langcode) {
+	echo '<a href="/manual1/'.$langcode.'/">'.$LANGUAGES[$langcode].'</a>';
+	echo ($lastlang != $langnum) ? ", " : "";
+}
+
+?>
+        </td>
+    </tr>
+    <tr>
+        <th bgcolor="#dddddd">Printer friendly</th>
+        <td bgcolor="#eeeeee">
+<?php
+
+foreach ($man_languages as $langnum => $langcode) {
+	echo '<a href="/manual1/'.$langcode.'/html/index.html">'.$LANGUAGES[$langcode].'</a>';
+	echo ($lastlang != $langnum) ? ", " : "";
+}
+
+?>
+        </td>
+    </tr>
+    <tr>
+        <th bgcolor="#dddddd">Downloads</th>
+        <td bgcolor="#eeeeee">For other downloadable formats, please visit
+            our <a href="download-docs.php">documentation downloads</a>
+            page.</td>
+
+    </tr>
+</table>
+
+<?php
+commonFooter();
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: expandtab sw=4 ts=4 fdm=marker
+ */
+?>

+ 160 - 0
download-docs.php

@@ -0,0 +1,160 @@
+<?php
+require_once('include/prepend.php');
+
+$SIDEBAR_DATA='
+<h3>Documentation online</h3>
+<p>
+You can read the <a href="/docs.php">documentation online</a>.
+</p>
+
+<h3>File sizes and dates</h3>
+<p>
+If you are using a capable browser, the file size and
+date will show up when you move the mouse above the link.
+If you use another browser, or would like to see all the
+information, you can <a href="/download-docs.php?sizes=1">click
+here to see all the file sizes and dates</a>.
+</p>
+
+<h3>Tip for Windows users</h3>
+<p>
+Note, that the recent versions of WinZip and other
+zip programs on Windows can handle .tar.gz compressed
+files. If you have such a program, you can save
+download time for yourself, if you choose the .tar.gz
+formats, instead of .zip.
+</p>
+';
+
+commonHeader("Download documentation");
+
+# array structure: (header, link_text, show_size_for_package)
+$formats = array(
+ "manual.txt.gz"           => array("Plain text",          "txt.gz"),
+ "bigmanual.html.gz"       => array("Single HTML",         "html.gz"),
+ "manual.tar.gz"           => array("Many HTML files",     "tar.gz"),
+ "manual.tar.bz2"          => array("Many HTML files",     "tar.bz2"),
+ "manual.zip"              => array("Many HTML files",     "zip")
+);
+?>
+
+<h1>Download documentation</h1>
+
+<p>
+Both the PHP-GTK 2 and the PHP-GTK 1 manual are available in various formats.
+Pick a version, a language and a format from the table below to start downloading.
+</p>
+
+<p>
+Note that the packaged HTML versions of the manual
+(tar.gz, tar.bz2 and zip) don't contain any directories,
+so all of the files will be dumped into your current working
+directory when you expand the archive unless the tool you
+use does otherwise.
+</p>
+
+<table border="0" cellpadding="2" cellspacing="1" width="100%">
+ <tr bgcolor="#bbbbbb">
+  <th colspan="<?php echo (sizeof($formats) + 1); ?>"><b>PHP-GTK 2 manual</b></td>
+ </tr>
+ <tr bgcolor="#cccccc">
+  <td>&nbsp;</td>
+  <?php
+	while (list($k, $v) = each($formats)) {
+		echo "<th valign=\"bottom\">$v[0]</th>\n";
+	}?>
+ </tr>
+ <?php
+	while (list(,$langcode) = each($man2_languages)) {
+		$language = $LANGUAGES[$langcode];
+		echo "<tr>\n<td bgcolor=\"#dddddd\"><b>$language</b></td>\n";
+		reset($formats);
+		while (list($fn,$details) = each($formats)) {
+			echo "<td align=\"center\" bgcolor=\"#eeeeee\">";
+
+			$link_to = "";
+			if (file_exists("manual/$langcode/$fn")) {
+				$link_to = "manual/$langcode/$fn";
+			}
+			elseif (file_exists("distributions/manual/php_gtk_manual_$langcode.$details[1]")) {
+				$link_to = "distributions/manual/php_gtk_manual_$langcode.$details[1]";
+			}
+			elseif (file_exists("distributions/manual/manual-$langcode.$details[1]")) {
+				$link_to = "distributions/manual/manual-$langcode.$details[1]";
+			}
+
+			if (!$link_to) {
+			echo "&nbsp;";
+			}
+			else {
+				$size = @filesize($link_to);
+				$changed = @filemtime($link_to);
+				$date_format = "j M Y"; // Part of the RFC date type (to be short)
+				if ($size) {
+					echo "<a href=\"$link_to\" title=\" Size: ", (int) ($size/1024), "Kb\n Date: ", date($date_format, $changed), "\">$details[1]</a>";
+					if ($sizes) {
+						echo "<br /><small>Size: ", (int) ($size/1024), "Kb<br />Date: ", date($date_format, $changed), "</small>";
+					}
+				} else {
+					echo "&nbsp;";
+				}
+			}
+			echo "</td>\n";
+		}
+		echo "</tr>\n";
+	}
+	reset($formats);
+?>
+ <tr bgcolor="#bbbbbb">
+  <th colspan="<?php echo (sizeof($formats) + 1); ?>"><b>PHP-GTK 1 manual</b></td>
+ </tr>
+ <tr bgcolor="#cccccc">
+  <td>&nbsp;</td>
+  <?php
+	while (list($k, $v) = each($formats)) {
+		echo "<th valign=\"bottom\">$v[0]</th>\n";
+	}?>
+ </tr>
+ <?php
+	while (list(,$langcode) = each($man_languages)) {
+		$language = $LANGUAGES[$langcode];
+		echo "<tr>\n<td bgcolor=\"#dddddd\"><b>$language</b></td>\n";
+		reset($formats);
+		while (list($fn,$details) = each($formats)) {
+			echo "<td align=\"center\" bgcolor=\"#eeeeee\">";
+
+			$link_to = "";
+			if (file_exists("manual1/$langcode/$fn")) {
+				$link_to = "manual1/$langcode/$fn";
+			}
+			elseif (file_exists("distributions/manual1/php_gtk_manual_$langcode.$details[1]")) {
+				$link_to = "distributions/manual1/php_gtk_manual_$langcode.$details[1]";
+			}
+			elseif (file_exists("distributions/manual1/manual-$langcode.$details[1]")) {
+				$link_to = "distributions/manual1/manual-$langcode.$details[1]";
+			}
+
+			if (!$link_to) {
+			echo "&nbsp;";
+			}
+			else {
+				$size = @filesize($link_to);
+				$changed = @filemtime($link_to);
+				$date_format = "j M Y"; // Part of the RFC date type (to be short)
+				if ($size) {
+					echo "<a href=\"$link_to\" title=\" Size: ", (int) ($size/1024), "Kb\n Date: ", date($date_format, $changed), "\">$details[1]</a>";
+					if ($sizes) {
+						echo "<br /><small>Size: ", (int) ($size/1024), "Kb<br />Date: ", date($date_format, $changed), "</small>";
+					}
+				} else {
+					echo "&nbsp;";
+				}
+			}
+			echo "</td>\n";
+		}
+		echo "</tr>\n";
+	}
+?>
+</table>
+
+<?php commonFooter(); ?>

+ 110 - 0
download.php

@@ -0,0 +1,110 @@
+<?php
+require_once('include/prepend.php');
+commonHeader('Downloads');
+
+?>
+
+<h1>Download</h1>
+<h2>Latest Development Release</h2>
+
+<p>
+<b>GTK+ version:</b>
+<br />
+PHP-GTK 2 currently supports GTK+ 2.6.9 or greater. You can obtain the latest
+stable release of GTK+ 2.x from <?php print_link('ftp://ftp.gtk.org/pub/gtk/'); ?>.
+</p>
+<p>
+<b>PHP version:</b>
+<br />
+PHP-GTK 2 requires PHP 5.1.x or greater. The latest version of
+the PHP_5_2 branch in CVS will work, too.
+</p>
+
+<ul>
+<li><?php print_link('http://gtk.php.net/do_download.php?download_file=php-gtk-2.0.0alpha.tar.gz', 'php-gtk-2.0.0 alpha Source'); ?> - 17-Jul-2006</li>
+<li><?php print_link('http://gtk.php.net/do_download.php?download_file=php-gtk2-alpha-5_1-win32.zip', 'php-gtk-2.0.0 alpha Windows binary for PHP 5.1.*'); ?> - 19-Jul-2006</li>
+<li><?php print_link('http://gtk.php.net/do_download.php?download_file=php-gtk2-alpha-5_2-win32.zip', 'php-gtk-2.0.0 alpha Windows binary for PHP 5.2.*'); ?> - 19-Jul-2006</li>
+</ul>
+
+<hr />
+
+<h2>Latest Stable Release</h2>
+
+<p>
+<b>GTK+ version:</b>
+<br />
+PHP-GTK currently supports GTK+ 1.2.6 or greater. You can obtain the
+latest stable release of GTK+ 1.2.x from
+<?php print_link('ftp://ftp.gtk.org/pub/gtk/v1.2/'); ?>.
+</p>
+<p>
+<b>PHP version:</b>
+<br />
+PHP-GTK 1 requires PHP 4.0.5 or greater, with versions from
+1.0.1 up requiring PHP 4.3.x to build.
+</p>
+
+<ul>
+<li><?php print_link('http://gtk.php.net/do_download.php?download_file=php-gtk-1.0.2.tar.gz', 'php-gtk-1.0.2 Source'); ?> - 15-Jul-2005</li>
+<li><?php print_link('http://gtk.php.net/do_download.php?download_file=php-gtk-1.0.1.tar.gz', 'php-gtk-1.0.1 Source'); ?> - 09-Aug-2004</li>
+<li><?php print_link('http://gtk.php.net/do_download.php?download_file=php-gtk-1.0.2-win32.zip', 'php-gtk-1.0.2 Windows and PHP Binaries'); ?> - 15-Jul-2005</li>
+<li><?php print_link('http://gtk.php.net/do_download.php?download_file=php-gtk-1.0.1a-win32.zip', 'php-gtk-1.0.1a Windows and PHP Binaries'); ?> - 25-Aug-2004</li>
+<li><?php print_link('http://gtk.php.net/do_download.php?download_file=php-gtk-1.0.0-win32.zip',
+	'php-gtk-1.0.0 Windows and PHP Binaries including ComboButton, Extra, libGlade, Scintilla, Spaned, SQPane'); ?> - 23-Oct-2003</li>
+</ul>
+
+<hr />
+
+<h2>CVS Version</h2>
+
+<p>
+Alternatively, you can get the latest and greatest
+version of PHP-GTK directly from the PHP CVS server.
+</p>
+
+<ol>
+
+<li>
+Log in to the PHP anonymous CVS server (use <b>phpfi</b> as the password):
+<pre>
+cvs -d :pserver:cvsread@cvs.php.net:/repository login
+</pre>
+</li>
+
+<li>
+Obtain the PHP-GTK tree.
+<br />
+<br />For PHP-GTK 2:
+<pre>
+cvs -d :pserver:cvsread@cvs.php.net:/repository co php-gtk
+</pre>
+For PHP-GTK 1:
+<pre>
+cvs -d :pserver:cvsread@cvs.php.net:/repository co -r PHP_GTK_1 php-gtk
+</pre>
+</li>
+
+<li>
+Move into the source tree:
+<pre>
+cd php-gtk
+</pre>
+</li>
+
+<li>
+Configure and install:
+<pre>
+./buildconf
+./configure
+make
+make install
+</pre>
+</li>
+
+</ol>
+
+<?php
+
+commonFooter();
+
+?>

+ 2 - 0
error/CVS/Entries

@@ -0,0 +1,2 @@
+/index.php/1.8/Mon Mar 27 16:19:20 2006//

+D


+ 1 - 0
error/CVS/Entries.Extra

@@ -0,0 +1 @@
+/index.php////*///

+ 0 - 0
error/CVS/Entries.Extra.Old


+ 0 - 0
error/CVS/Entries.Old


+ 1 - 0
error/CVS/Repository

@@ -0,0 +1 @@
+php-gtk-web/error


+ 1 - 0
error/CVS/Root

@@ -0,0 +1 @@
+:pserver:cvsread:phpfi@cvs.php.net:/repository


+ 132 - 0
error/index.php

@@ -0,0 +1,132 @@
+<?php
+// Include the prepend file.
+require_once '../include/prepend.php';
+
+/**
+ * Output a page not found message.
+ *
+ * @access public
+ * @return void
+ */
+function make404() {
+	// Send the HTTP header.
+	header('HTTP/1.0 404 Not Found');
+	// Output a header for page not found.
+	commonHeader('404 Not Found');
+	// Output a message telling the user the page was not found.
+	echo "<H1>Not Found</H1>\n";
+	echo "<P>The page <B>" . htmlspecialchars($_SERVER['REQUEST_URI']) . "</B> could not be found.</P>\n";
+	// Output the footer.
+	commonFooter();
+}
+
+// Get the configuration file.
+if (file_exists("../configuration.inc")) {
+  include_once "../configuration.inc";
+}
+
+// Clean up the request URI.
+$ri = htmlspecialchars($_SERVER['REQUEST_URI']);
+
+// Check to see if an GIF, JPEG or PDF was requested.
+if (preg_match('/\.(pdf|gif|jpg)$/', $_SERVER['REQUEST_URI'])) {
+    // Spit out the 404 and exit.
+    make404();
+    exit;
+}
+
+// Set the default language to English.
+$lang = "en";
+if (!is_dir("{$_SERVER['DOCUMENT_ROOT']}/manual1/$lang")) {
+	$lang = "en"; // fall back to English
+}
+
+# handle .php3 files that were renamed to .php
+// We don't really need this but I am leaving it in for now. Until I have a
+// better understanding of what needs to happen.
+if (preg_match("/(.*\.php)3$/", $ri, $array)) {
+	if($_SERVER['SERVER_PORT']!=80) {
+		$url = "http://".$_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT'].$array[1];
+	} else {
+		$url = "http://".$_SERVER['SERVER_NAME'].$array[1];
+	}
+	$urle = htmlspecialchars($url);
+
+	header("HTTP/1.0 302 Redirect");
+	header("Location: $url");
+
+	print "<html><title>Redirect to $urle</title><body>";
+	print "<a href=\"".$url."\">Please click here</a></body></html>";
+	exit;
+}
+
+# handle moving english manual down into its own directory
+// This changes .../manual1/html/page.html to .../manual1/en/html/page.html
+if (eregi("^(.*)/manual1/((html/)?[^/]+)$", $ri, $array)) {
+	// Make sure the same port is used. Are any other ports open for this?
+	if($_SERVER['SERVER_PORT']!=80) {
+		$url = "http://".$_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT']."$array[1]/manual1/$lang/".$array[2];
+	} else {
+		$url = "http://".$_SERVER['SERVER_NAME']."$array[1]/manual1/$lang/".$array[2];
+	}
+
+	// URL Encode the new URL.
+	$urle = htmlspecialchars($url);
+
+	// Send the redirect header.
+	header("HTTP/1.0 302 Redirect");
+	// Send the redirect location.
+	header("Location: $url");
+
+	// Let the user know what is going on incase the redirect doesn't work.
+	print "<html><title>Redirect to $urle</title><body>";
+	print "<a href=\"".$url."\">Please click here</a></body></html>";
+	exit;
+}
+
+// I have no idea what is going on here. I think this may strip out the host
+// name and protocol.
+$uri = substr($REDIRECT_REDIRECT_ERROR_NOTES,
+			  strpos($REDIRECT_REDIRECT_ERROR_NOTES,
+					 $_SERVER['DOCUMENT_ROOT']
+					 ) + strlen($_SERVER['DOCUMENT_ROOT']) + 1
+			  );
+
+# try to find the uri as a manual entry
+
+require "../include/manual1-lookup.inc";
+// Check to see if the URI has a '/' in it. If it does then a page like
+// .../en/show_all was requested.
+if(strchr($uri, '/')) {
+	// Break the URI up into language and page.
+	list($lang, $function) = explode('/', $uri, 2);
+	$function = strtolower($function);
+	$lang = strtolower($lang);
+} else {
+    $function = strtolower($uri);
+}
+
+// Check to see if there is a manual page for the language and function.
+$try = find_manual_page($lang, $function);
+if($try) {
+	// Send a redirect header.
+	header("HTTP/1.0 302 Redirect");
+	// Send the redirect location.
+	header("Location: $try");
+	exit;
+}
+
+
+# If all else fails ... redirect to the search page with the pattern set to $_SERVER['REQUEST_URI']
+
+#if ($_SERVER['REQUEST_URI']) {
+#	header('HTTP/1.0 302 Redirect');
+#	header('Location: /search.php?show=nosource&pattern='.urlencode($_SERVER['REQUEST_URI']) );
+#	exit;
+#}
+
+make404();
+exit;
+
+
+?>

+ 256 - 0
faq.php

@@ -0,0 +1,256 @@
+<?php
+require_once('include/prepend.php');
+commonHeader('Frequently Asked Questions');
+
+?>
+
+<h1>Frequently Asked Questions</h1>
+
+
+<ul>
+ <li><a href="#1">What is PHP-GTK?</a></li>
+ <li><a href="#2">Why is it not working with the browser/web server?</a></li>
+ <li><a href="#3">How do I install PHP-GTK on Win32?</a></li>
+ <li><a href="#4">How do I use the buttons in GtkFileSelection?</a></li>
+ <li><a href="#5">How do I know which GTK Classes are supported?</a></li>
+ <li><a href="#6">Can I use Themes under Win32?</a></li>
+ <li><a href="#7">Where do I go from here?</a></li>
+</ul>
+
+<dl>
+
+<dt>
+ <a name="1"><b>What is PHP-GTK?</b></a>
+</dt>
+
+<dd>
+<p>
+PHP-GTK is a PHP extension that implements language bindings for GTK+. It
+provides an object-oriented interface to GTK+ classes and functions and greatly
+simplifies writing client side cross-platform GUI applications.
+</p>
+</dd>
+
+<dt>
+ <a name="2"><b>Why is it not working with the browser/web server?</b></a>
+</dt>
+
+<dd>
+<p>
+PHP-GTK is not meant to be used in the Web environment. It is intended for
+creation of standalone applications (run via command-line, user's desktop, etc.).
+</p>
+</dd>
+
+<dt>
+ <a name="3"><b>How do I install PHP-GTK on Win32?</b></a>
+</dt>
+
+<dd>
+<p>
+Download the latest binaries from <a href="http://gtk.php.net/download.php">gtk.php.net</a>.
+The zip file contains all binaries needed to run core PHP-GTK, as well as extra features such as Glade/XML and Scintilla.
+Extract the files to a temporary directory and then copy them into the following locations:
+</p>
+
+<p>
+ <b>For Windows 98/NT/2000/XP:</b>
+</p>
+
+<p>In your PHP directory (e.g., c:\php4):</p>
+<ul>
+  <li>php.exe</li>
+  <li>php_win.exe</li>
+  <li>php-cgi.exe</li>
+  <li>php.ini</li>
+  <li>php.ini-gtk</li>
+  <li>all .dll files</li>
+</ul>
+<p>In a test directory (e.g., c:\php4\test):</p>
+<ul>
+  <li>all .php files</li>
+  <li>testgtkrc</li>
+  <li>testgtkrc2</li>
+  <li>window.xpm</li>
+</ul>
+<p>
+NOTE: You can install the php.ini into your Windows directory (i.e., c:\winnt
+or c:\windows) as indicated by the zip file, but it is often not a good option,
+depending on the installation. It is also no longer required; the php.exe (CLI
+version as of PHP 4.3.0) will search the working directory, e.g., c:\php4, as
+well as the Windows directory. Or you can specify your php.ini location in your
+command line statement with '-c' option, as given in the php_win example below.
+</p>
+
+<p>
+ <b>For Windows 95:</b>
+</p>
+
+<p>
+ PHP-GTK has <b>not</b> been tested on Windows 95 ... sorry.
+</p>
+
+<p>
+ <b>Testing the installation</b>
+</p>
+<p>
+ When the PHP-GTK files are installed, you can verify your setup using a DOS
+ command line. A typical example would be: c:\php4\php c:\php4\test\hello.php
+</p>
+<p>
+ To avoid the DOS box, you can use the php_win executable, provided in the install file:
+</p>
+<pre>
+c:\php4\php_win c:\php4\test\hello.php
+</pre>
+<p>
+or
+</p>
+<pre>
+start c:\php4\php_win c:\php4\test\hello.php
+</pre>
+<p>
+or
+</p>
+<pre>
+c:\php4\php_win -c \php4\php.ini -f c:\php4\test\hello.php
+</pre>
+<p>
+If you have installed your php.ini file in your Windows directory, the -c option
+can be dropped. For more information on command line options, see
+<a href="http://www.php.net/manual/en/features.commandline.php">'Using PHP from
+the command line'</a> on the main PHP site.
+</p>
+
+<p>
+ <b>Troubleshooting</b>
+</p>
+
+<p>If you can't produce the hello window, try the following:</p>
+<ul>
+  <li>Verify the hello.php location, i.e., [drive:]\php4\test</li>
+  <li>Open hello.php in Notepad, and make sure there is no obvious corruption in the code.</li>
+  <li>Modify your php.ini file, to log any errors, as detailed below.</li>
+  <li>Review the postings at the <a href=
+  "http://marc.theaimsgroup.com/?l=php-gtk-general">PHP-GTK discussion list archive</a>
+  for possible solutions.</li>
+  <li>If you still have a problem, subscribe to the <a
+  href="mailto:php-gtk-general-subscribe@lists.php.net">PHP-GTK general discussion
+  list</a> and post your question there.</li>
+</ul>
+
+<p>
+ <b>Tips/Tricks:</b>
+</p>
+<ul>
+  <li>To debug your scripts, modify the php.ini file as follows:
+   <ul>
+     <li>Find the line for 'log_errors'. Set it to 'On'.</li>
+     <li>Find the line for 'error_log'. Remove the beginning semicolon (uncomment)
+         and replace 'filename' with an actual file location<br/>
+         Example: error_log=c:\php4\error_log.txt.</li>
+     <li>If the error file does not exist, php will create it on the next run. Open
+         the file and review.</li>
+   </ul>
+  </li>
+  <li>If you are planning to launch on an association, decide which extension you
+  want to use for your scripts. Be aware that other applications register .php, so
+  something like .php-gtk might be a better option.</li>
+  <!--
+  <li>Check out the Code Snippets and Code Hints on the
+  <a href="http://gtk.php.net/wiki/">PHP-GTK Wiki page</a>.</li>
+  -->
+  <li>You can set your scripts to use Win32 themes, courtesy of Christian Weiske.
+  Check out the info page at:<br/>
+  <a href="http://www.cweiske.de/phpgtk_themes.htm ">http://www.cweiske.de/phpgtk_themes.htm </a></li>
+  <li>Install the <a href="http://www.cweiske.de/phpgtk_apps.htm#phpgtklauncher">php-gtk launcher</a>.
+  It handles many of the Windows directory issues and provides a series of PHP-GTK
+  icons. Also from Christian.</li>
+  <li>Consider using Glade/XML for setting up your screens and reducing maintenance time.<br/>
+   Start with the info page at: <a
+   href="http://gtk.php.net/manual1/en/glade.gladexml.php">http://gtk.php.net/manual1/en/glade.gladexml.php</a>.
+  </li>
+</ul>
+</dd>
+
+<dt>
+ <a name="4"><b>How do I use the buttons in GtkFileSelection?</b></a>
+</dt>
+
+<dd>
+<pre class="code">
+// Create the dialog window:
+    $fs = &amp;new GtkFileSelection("Save file");
+
+// Get a handle to the Ok button:
+    $ok_button = $fs->ok_button;
+
+// Connect a function:
+    $ok_button->connect("clicked", "enddialog");
+
+// Connect the destroy action on the dialog window:
+    $ok_button->connect_object("clicked", "destroy", $fs);
+</pre>
+
+<p>
+ It is <b>not</b> currently possible to do it this way:
+</p>
+<pre class="code">
+// Create the dialog window
+    $fs = &amp;new GtkFileSelection("Save file");
+
+// Connect a function
+    $fs->ok_button->connect("clicked", "enddialog");
+
+// Connect the destroy action on the dialog window
+    $fs->ok_button->connect_object("clicked", "destroy", $fs);
+</pre>
+</dd>
+
+<dt>
+ <a name="5"><b>How do I know which GTK Classes are supported?</b></a>
+</dt>
+
+<dd>
+<p>
+ The following code will show the defined classes. All the PHP-GTK
+ classes will be listed along with one or two others.
+</p>
+<pre class="code">
+$array = get_declared_classes();
+while(list(,$classname) = each($array)) {
+    echo $classname."\n";
+}
+</pre>
+<p>
+See the <?php print_link('http://www.php.net/manual/en/ref.classobj.php', 'Class/Object functions'); ?>
+in the PHP Manual for other useful functions.
+</p></dd>
+
+
+<dt>
+ <a name="6"><b>Can I use Themes under Win32?</b></a>
+</dt>
+<dd>
+ <p>
+  No, The Win32 GTK port does not currently support this.
+ </p>
+</dd>
+
+
+<dt>
+ <a name="7"><b>Where do I go from here?</b></a>
+</dt>
+<dd>
+ <p>
+  Check out the <?php print_link('/resources.php', 'Resources page'); ?>.
+ </p>
+</dd>
+
+</dl>
+
+<?php
+
+commonFooter();
+
+?>

+ 38 - 0
gifs/CVS/Entries

@@ -0,0 +1,38 @@
+/black.gif/1.1/Thu May  3 18:49:35 2001/-kb/

+/blank.gif/1.1/Thu May  3 18:49:35 2001/-kb/

+/box-0.gif/1.1/Wed May  9 18:28:09 2001/-kb/

+/box-1.gif/1.1/Wed May  9 18:28:09 2001/-kb/

+/caret-l.gif/1.1/Wed May  9 18:28:09 2001/-kb/

+/caret-r.gif/1.1/Wed May  9 18:28:09 2001/-kb/

+/caret-rg.gif/1.1/Wed May  9 18:28:09 2001/-kb/

+/caret-t.gif/1.1/Wed May  9 18:28:09 2001/-kb/

+/caret-u.gif/1.1/Wed May  9 18:28:09 2001/-kb/

+/checkerboard.gif/1.1/Thu May  3 18:49:35 2001/-kb/

+/favicon.ico/1.1/Wed Apr 24 19:56:07 2002/-kb/

+/icon-c0.gif/1.2/Thu Aug  9 21:08:01 2001/-kb/

+/icon-c1.gif/1.2/Thu Aug  9 21:08:01 2001/-kb/

+/icon-e0.gif/1.2/Thu Aug  9 21:08:01 2001/-kb/

+/icon-e1.gif/1.2/Thu Aug  9 21:08:01 2001/-kb/

+/icon-m0.gif/1.2/Thu Aug  9 21:08:01 2001/-kb/

+/icon-m1.gif/1.2/Thu Aug  9 21:08:01 2001/-kb/

+/icon-o0.gif/1.2/Thu Aug  9 21:08:01 2001/-kb/

+/icon-o1.gif/1.2/Thu Aug  9 21:08:01 2001/-kb/

+/icon-s0.gif/1.2/Thu Aug  9 21:08:01 2001/-kb/

+/icon-s1.gif/1.2/Thu Aug  9 21:08:01 2001/-kb/

+/index.php/1.1/Mon Mar 27 13:08:09 2006//

+/inhier-arrow.gif/1.3/Thu May 10 21:37:53 2001/-kb/

+/inhier-blank.gif/1.2/Thu May 10 21:36:43 2001/-kb/

+/notes-about.gif/1.1/Thu Aug  9 16:22:35 2001/-kb/

+/notes-add.gif/1.1/Thu Aug  9 16:22:35 2001/-kb/

+/notes-checkmark.gif/1.1/Thu Aug  9 16:22:35 2001/-kb/

+/notes-delete.gif/1.1/Thu Aug  9 16:22:35 2001/-kb/

+/notes-edit.gif/1.1/Thu Aug  9 16:22:35 2001/-kb/

+/notes-reject.gif/1.1/Thu Aug  9 16:22:35 2001/-kb/

+/php-gtk.gif/1.2/Thu May  3 19:37:09 2001/-kb/

+/php-logo.gif/1.1/Thu May  3 18:49:35 2001/-kb/

+/revhier-arrow.gif/1.1/Tue Jun 10 19:21:02 2003/-kb/

+/small_submit.gif/1.1/Wed May  9 18:28:09 2001/-kb/

+/small_submit_black.gif/1.1/Thu May  3 18:49:35 2001/-kb/

+/small_submit_white.gif/1.1/Thu May  3 18:49:35 2001/-kb/

+/spacer.gif/1.1/Fri Sep 21 01:10:45 2001/-kb/

+D


+ 37 - 0
gifs/CVS/Entries.Extra

@@ -0,0 +1,37 @@
+/black.gif////*///
+/blank.gif////*///
+/box-0.gif////*///
+/box-1.gif////*///
+/caret-l.gif////*///
+/caret-r.gif////*///
+/caret-rg.gif////*///
+/caret-t.gif////*///
+/caret-u.gif////*///
+/checkerboard.gif////*///
+/favicon.ico////*///
+/icon-c0.gif////*///
+/icon-c1.gif////*///
+/icon-e0.gif////*///
+/icon-e1.gif////*///
+/icon-m0.gif////*///
+/icon-m1.gif////*///
+/icon-o0.gif////*///
+/icon-o1.gif////*///
+/icon-s0.gif////*///
+/icon-s1.gif////*///
+/index.php////*///
+/inhier-arrow.gif////*///
+/inhier-blank.gif////*///
+/notes-about.gif////*///
+/notes-add.gif////*///
+/notes-checkmark.gif////*///
+/notes-delete.gif////*///
+/notes-edit.gif////*///
+/notes-reject.gif////*///
+/php-gtk.gif////*///
+/php-logo.gif////*///
+/revhier-arrow.gif////*///
+/small_submit.gif////*///
+/small_submit_black.gif////*///
+/small_submit_white.gif////*///
+/spacer.gif////*///

+ 0 - 0
gifs/CVS/Entries.Extra.Old


+ 0 - 0
gifs/CVS/Entries.Old


+ 1 - 0
gifs/CVS/Repository

@@ -0,0 +1 @@
+php-gtk-web/gifs


+ 1 - 0
gifs/CVS/Root

@@ -0,0 +1 @@
+:pserver:cvsread:phpfi@cvs.php.net:/repository


BIN
gifs/black.gif


BIN
gifs/blank.gif


BIN
gifs/box-0.gif


BIN
gifs/box-1.gif


BIN
gifs/caret-l.gif


BIN
gifs/caret-r.gif


BIN
gifs/caret-rg.gif


BIN
gifs/caret-t.gif


BIN
gifs/caret-u.gif


BIN
gifs/checkerboard.gif


BIN
gifs/favicon.ico


BIN
gifs/icon-c0.gif


BIN
gifs/icon-c1.gif


BIN
gifs/icon-e0.gif


BIN
gifs/icon-e1.gif


BIN
gifs/icon-m0.gif


BIN
gifs/icon-m1.gif


BIN
gifs/icon-o0.gif


BIN
gifs/icon-o1.gif


BIN
gifs/icon-s0.gif


BIN
gifs/icon-s1.gif


+ 5 - 0
gifs/index.php

@@ -0,0 +1,5 @@
+<?php
+
+header("Location: /");
+
+?>

BIN
gifs/inhier-arrow.gif


BIN
gifs/inhier-blank.gif


BIN
gifs/notes-about.gif


BIN
gifs/notes-add.gif


BIN
gifs/notes-checkmark.gif


BIN
gifs/notes-delete.gif


BIN
gifs/notes-edit.gif


BIN
gifs/notes-reject.gif


BIN
gifs/php-gtk.gif


BIN
gifs/php-logo.gif


BIN
gifs/revhier-arrow.gif


BIN
gifs/small_submit.gif


BIN
gifs/small_submit_black.gif


BIN
gifs/small_submit_white.gif


BIN
gifs/spacer.gif


+ 14 - 0
include/CVS/Entries

@@ -0,0 +1,14 @@
+/apps.inc/1.15/Thu Jul 13 06:10:12 2006//

+/config.inc/1.6/Sun Jul  9 15:19:37 2006//

+/cvs-auth.inc/1.11/Tue Jul 11 06:47:53 2006//

+/email-validation.inc/1.3/Wed Jul  5 04:17:40 2006//

+/index.php/1.2/Mon Mar 27 13:08:09 2006//

+/layout.php/1.64/Mon Oct  2 05:36:52 2006//

+/make-manual2-index.php/1.3/Fri Apr 14 05:09:55 2006//

+/manual-lookup.inc/1.8/Wed Jul 28 04:14:04 2004//

+/manual1-lookup.inc/1.1/Tue Mar 14 21:37:13 2006//

+/prepend.php/1.5/Tue Jul 11 00:18:30 2006//

+/shared-manual.inc/1.78/Sun Oct  8 12:45:17 2006//

+/shared-manual1.inc/1.3/Mon Mar 27 17:22:07 2006//

+/site.php/1.12/Tue Oct 17 13:10:33 2006//

+D/PhpGtkDoc////


+ 14 - 0
include/CVS/Entries.Extra

@@ -0,0 +1,14 @@
+/apps.inc////*///
+/config.inc////*///
+/cvs-auth.inc////*///
+/email-validation.inc////*///
+/index.php////*///
+/layout.php////*///
+/make-manual2-index.php////*///
+/manual-lookup.inc////*///
+/manual1-lookup.inc////*///
+/prepend.php////*///
+/shared-manual.inc////*///
+/shared-manual1.inc////*///
+/site.php////*///
+D/PhpGtkDoc///////

+ 13 - 0
include/CVS/Entries.Extra.Old

@@ -0,0 +1,13 @@
+/apps.inc////*///
+/config.inc////*///
+/cvs-auth.inc////*///
+/email-validation.inc////*///
+/index.php////*///
+/layout.php////*///
+/make-manual2-index.php////*///
+/manual-lookup.inc////*///
+/manual1-lookup.inc////*///
+/prepend.php////*///
+/shared-manual.inc////*///
+/shared-manual1.inc////*///
+/site.php////*///

+ 14 - 0
include/CVS/Entries.Old

@@ -0,0 +1,14 @@
+/apps.inc/1.15/Thu Jul 13 06:10:12 2006//
+/config.inc/1.6/Sun Jul  9 15:19:37 2006//
+/cvs-auth.inc/1.11/Tue Jul 11 06:47:53 2006//
+/email-validation.inc/1.3/Wed Jul  5 04:17:40 2006//
+/index.php/1.2/Mon Mar 27 13:08:09 2006//
+/layout.php/1.64/Mon Oct  2 05:36:52 2006//
+/make-manual2-index.php/1.3/Fri Apr 14 05:09:55 2006//
+/manual-lookup.inc/1.8/Wed Jul 28 04:14:04 2004//
+/manual1-lookup.inc/1.1/Tue Mar 14 21:37:13 2006//
+/prepend.php/1.5/Tue Jul 11 00:18:30 2006//
+/shared-manual.inc/1.78/Sun Oct  8 12:45:17 2006//
+/shared-manual1.inc/1.3/Mon Mar 27 17:22:07 2006//
+/site.php/1.12/Tue Oct 17 13:10:33 2006//
+D

+ 1 - 0
include/CVS/Repository

@@ -0,0 +1 @@
+php-gtk-web/include


+ 1 - 0
include/CVS/Root

@@ -0,0 +1 @@
+:pserver:cvsread:phpfi@cvs.php.net:/repository


+ 1 - 0
include/PhpGtkDoc/.cvsignore

@@ -0,0 +1 @@
+index.dat


+ 3 - 0
include/PhpGtkDoc/CVS/Entries

@@ -0,0 +1,3 @@
+/.cvsignore/1.1/Tue Apr 11 09:44:14 2006//

+/Search2.php/1.1/Tue Apr 11 09:41:22 2006//

+D/Search2////


+ 3 - 0
include/PhpGtkDoc/CVS/Entries.Extra

@@ -0,0 +1,3 @@
+/.cvsignore////*///
+/Search2.php////*///
+D/Search2///////

+ 2 - 0
include/PhpGtkDoc/CVS/Entries.Extra.Old

@@ -0,0 +1,2 @@
+/.cvsignore////*///
+/Search2.php////*///

+ 3 - 0
include/PhpGtkDoc/CVS/Entries.Old

@@ -0,0 +1,3 @@
+/.cvsignore/1.1/Tue Apr 11 09:44:14 2006//
+/Search2.php/1.1/Tue Apr 11 09:41:22 2006//
+D

+ 1 - 0
include/PhpGtkDoc/CVS/Repository

@@ -0,0 +1 @@
+php-gtk-web/include/PhpGtkDoc


+ 1 - 0
include/PhpGtkDoc/CVS/Root

@@ -0,0 +1 @@
+:pserver:cvsread:phpfi@cvs.php.net:/repository


+ 257 - 0
include/PhpGtkDoc/Search2.php

@@ -0,0 +1,257 @@
+<?php
+/**
+*   Class to search the phpgtk2 manual.
+*
+*   Use the static PhpGtkDoc_Search2::find() method
+*   to search for a string, and use one of the
+*   PhpGtkDoc_Search2_Result_* classes to display the result.
+*
+*   @author Christian Weiske <cweiske@php.net>
+*/
+class PhpGtkDoc_Search2
+{
+    /**
+    *   Searches for the given string
+    *   This function returns a nested array which allows the search results
+    *       being displayed by sections like enums/methods/classes/...
+    *
+    *   @param  string  The string to search. It is automatically split into substrings by the space char
+    *   @param  string  The index file to use
+    *
+    *   @return array   Nested array with results. Format:
+    *                       array( 1 => subarray(), 2 => subarray(), 3 => subarray())
+    *                       subarray( 'class' => array_of_files(), 'method' => array_of_files(), ...)
+    */
+    public static function find($strSearch, $strIndexFile)
+    {
+        if (!file_exists($strIndexFile)) {
+            throw new Exception('Index file does not exist: ' . $strIndexFile);
+        }
+        //TODO: Split better, so that we can exclude something with minus and so
+        $arSearchWords  = explode(' ', strtolower($strSearch));
+        $arIndex        = unserialize(file_get_contents($strIndexFile));
+
+        $arResults      = array();//all the found files for the indices
+        $arWordsResults = array();//the found files which were found for each word
+
+        foreach ($arSearchWords as $strWord) {
+            $arWordsResults[$strWord]   = array();//needs to be done
+            if (isset($arIndex[$strWord])) {
+                $arFound    = $arIndex[$strWord];
+                foreach ($arFound as $nIndex => $arFiles) {
+                    foreach ($arFiles as $strFile) {
+                        $arWordsResults[$strWord][]   = $strFile;
+                        $arResults[$nIndex][$strFile] = 1;
+                    }
+                }
+            }
+        }
+
+        //remove all the files which were not found for all the words
+        //firstly, intersect all the single arrays of the words
+        $arAllWords = array();
+        $bFirst     = true;
+        foreach ($arWordsResults as $strWord => $arWordResults) {
+            if ($bFirst) {
+                $arAllWords = $arWordResults;
+                $bFirst     = false;
+            } else {
+                $arAllWords = array_intersect($arAllWords, $arWordResults);
+            }
+        }
+
+        ksort($arResults);//that key 1 is first
+
+        //remove the not-in-all found files from the $arResults array 
+        foreach ($arResults as $nId => $arWords) {
+            foreach ($arWords as $strWord => $nOne) {
+                if (!in_array($strWord, $arAllWords)) {
+                    //remove the one file from the found list
+                    unset($arResults[$nId][$strWord]);
+                } else {
+                    //remove the file from the accept list to ensure every file is
+                    //listed only once (try searching for "window gtk force")
+                    unset($arAllWords[array_search($strWord, $arAllWords)]);
+                }
+            }
+        }
+
+        //now split the subarrays 2 and 3 into sections: enums, properties, signals...
+        foreach ($arResults as $nId => $arFiles) {
+            $arResults[$nId]    = self::splitIntoSections( $arFiles);
+        }
+
+        return self::reorderResult($arResults);
+    }//public static function find($strSearch, $strIndexFile)
+
+
+
+    /**
+    *   Re-orders the result to give a better order.
+    *   E.g. methods of the class which have the search string in it
+    *   will be moved to level 3
+    *
+    *   @param array    $arResults  Result array
+    *   @return array               Fixed result array
+    */
+    protected static function reorderResult($arResult)
+    {
+        //if a class is found, move the methods of this class to level 3,
+        //as they all match. So non-same-class methods with the search
+        //string should have higher priority
+        if (isset($arResult[1]['class'])) {
+            foreach ($arResult[1] as $strType => $arLevel) {
+                if ($strType != 'class') {
+                    $arResult[3][$strType] = $arLevel;
+                    unset($arResult[1][$strType]);
+                }
+            }
+        }
+
+        return $arResult;
+    }//protected static function reorderResult($arResult)
+
+
+
+    /**
+    *   splits an array with files as keys into sections
+    *   like enums, properties, signals, ...
+    *
+    *   @param  array $arFiles  array with file names as keys and a number as value
+    *   @return array           array with subarrays, files as values in the subarrays. The keys for the subarrays are the section names
+    */
+    protected static function splitIntoSections($arFiles)
+    {
+        $arSected   = array();
+
+        $arRegexs['tutorials']  = '/^tutorials\\./';//has to be before class and method
+
+        $arRegexs['class']      = '/^[a-zA-Z0-9]+\\.[a-zA-Z0-9]+\\.[a-zA-Z0-9]+$/';
+        $arRegexs['constructor']= '/\\.constructor\\.([a-zA-Z0-9_]+\\.)?/';
+        $arRegexs['enum']       = '/^[a-zA-Z0-9]+\\.enum\\./';
+        $arRegexs['method']     = '/^[a-zA-Z0-9]+(\\.[a-zA-Z0-9]+)?\\.method\\./'; //the (..)? is for things like gdk::main()
+        $arRegexs['property']   = '/^[a-zA-Z0-9]+\\.[a-zA-Z0-9]+\\.(prop|property)\\./';
+        $arRegexs['field']      = '/^[a-zA-Z0-9]+\\.[a-zA-Z0-9]+\\.(field)\\./';
+        $arRegexs['signal']     = '/^[a-zA-Z0-9]+\\.[a-zA-Z0-9]+\\.signal\\./';
+
+        foreach ($arFiles as $strFile => $nOne) {
+            $strBaseFile = basename($strFile);
+            $bFound = false;
+            foreach ($arRegexs as $strSection => $strRegex) {
+                if( preg_match( $strRegex, $strBaseFile)) {
+                    $arSected[$strSection][]    = $strFile;
+                    $bFound                     = true;
+                    break;
+                }
+            }
+            if( !$bFound) {
+                $arSected['unknown'][]          = $strFile;
+            }
+        }
+
+        //sort the sections internally by filename
+        foreach( $arSected as $strSection => $arFiles) {
+            sort( $arSected[$strSection]);
+        }
+
+        return $arSected;
+    }//protected static function splitIntoSections($arFiles)
+
+
+
+    /**
+    *   Returns the file title for the given file
+    *   for efficient working, the category has to be given
+    *
+    *   The function tries to get the file title with some algorithms,
+    *   NOT from the direct html files.
+    *
+    *   @param  string  $strFilename    The file name, e.g. gtk.gtkcolorselection.method.get_color.php
+    *   @param  string  $strCategory    The category of the file, e.g. class/enum/constructor/...
+    *
+    *   @return string  The file title, can be used for link titles
+    */
+    public static function getFileTitle($strFilename, $strCategory)
+    {
+        $arParts    = explode('.', basename($strFilename));
+        $nParts     = count($arParts);
+
+        switch ($strCategory) {
+            case 'class':
+                if ($arParts[1] == 'functions') {
+                    //function list gtk.functions.php
+                    return self::niceClassName($arParts[0]) . ' functions';
+                } else {
+                    //normal class name gtk.gtkentry.php
+                    return self::niceClassName($arParts[1]);
+                }
+            case 'constructor':
+                if ($nParts == 5) {//static method constructor
+                    return self::niceClassName($arParts[1]) . '::' . $arParts[3] . '()';
+                } else {
+                    return self::niceClassName($arParts[1]) . ' constructor';
+                }
+            case 'method':
+                if ($nParts == 5) {//class with method
+                    return self::niceClassName($arParts[1]) . '::' . $arParts[3] . '()';
+                } else {//gtk/gdk method
+                    return self::niceClassName($arParts[0]) . '::' . $arParts[2] . '()';
+                }
+            case 'property':
+                if ($nParts == 5) {//class property
+                    return self::niceClassName($arParts[1]) . '::' . $arParts[3];
+                } else {//gtk/gdk property //does this exist?
+                    return self::niceClassName($arParts[0]) . '::' . $arParts[2];
+                }
+            case 'field':
+                if ($nParts == 5) {//class field
+                    return self::niceClassName($arParts[1]) . '::' . $arParts[3];
+                } else {//gtk/gdk field //does this exist?
+                    return self::niceClassName($arParts[0]) . '::' . $arParts[2];
+                }
+            case 'signal':
+                if ($nParts == 5) {//class signal
+                    return self::niceClassName($arParts[1]) . ': ' . $arParts[3];
+                } else {//gtk/gdk signal
+                    return self::niceClassName($arParts[0]) . ': ' . $arParts[2];
+                }
+            case 'enum':
+                return self::niceClassName($arParts[0]) . ucfirst($arParts[2]) . ' enum';
+            case 'tutorials':
+                if ($nParts == 2) {
+                    return 'Tutorial list';
+                } else if ($nParts == 3) {
+                    return ucfirst($arParts[1])  . ' tutorial';
+                } else {
+                    return ucfirst( $arParts[1])  . ' tutorial: ' . $arParts[2];
+                }
+            default:
+                return $strFilename;
+        }
+    }//public static function getFileTitle($strFilename, $strCategory)
+
+
+
+    /**
+    *   Makes a nice class name from a lowercase name
+    *   given "gdkcolor" it returns "GdkColor"
+    *
+    *   @param  string  The lowercase class name
+    *   @return string  The nice cased class name
+    */
+    protected static function niceClassName( $strLowercaseClass)
+    {
+        $strPrefix  = substr( $strLowercaseClass, 0, 3);
+        if ($strPrefix == 'gdk' || $strPrefix == 'gtk' || $strPrefix == 'atk') {
+            $strNice    = ucfirst($strPrefix) . ucfirst(substr($strLowercaseClass, 3));
+        } else if ($strPrefix == 'pan') {
+            $strNice    = ucfirst($strPrefix) . ucfirst(substr($strLowercaseClass, 5));
+        } else {
+            $strNice    = ucfirst($strLowercaseClass);
+        }
+
+        return $strNice;
+    }//protected static function niceClassName( $strLowercaseClass)
+
+}//class PhpGtkDoc_Search2
+?>

+ 2 - 0
include/PhpGtkDoc/Search2/CVS/Entries

@@ -0,0 +1,2 @@
+/Index.php/1.1/Tue Apr 11 09:41:22 2006//

+D/Result////


+ 2 - 0
include/PhpGtkDoc/Search2/CVS/Entries.Extra

@@ -0,0 +1,2 @@
+/Index.php////*///
+D/Result///////

+ 1 - 0
include/PhpGtkDoc/Search2/CVS/Entries.Extra.Old

@@ -0,0 +1 @@
+/Index.php////*///

Some files were not shown because too many files changed in this diff