From 3261f4dcadf1e7aa45446153f654b20530c950b9 Mon Sep 17 00:00:00 2001
From: wei <>
Date: Wed, 9 May 2007 08:35:52 +0000
Subject: Update northwind db

---
 demos/northwind-db/protected/pages/Home.page       |  17 +++++++------
 demos/northwind-db/protected/pages/Home.php        |  28 ---------------------
 .../protected/pages/NorthwindCrud.page             |  10 ++++++++
 .../northwind-db/protected/pages/NorthwindCrud.php |  28 +++++++++++++++++++++
 demos/northwind-db/protected/pages/northwind.gif   | Bin 25177 -> 36713 bytes
 5 files changed, 47 insertions(+), 36 deletions(-)
 delete mode 100644 demos/northwind-db/protected/pages/Home.php
 create mode 100644 demos/northwind-db/protected/pages/NorthwindCrud.page
 create mode 100644 demos/northwind-db/protected/pages/NorthwindCrud.php

(limited to 'demos')

diff --git a/demos/northwind-db/protected/pages/Home.page b/demos/northwind-db/protected/pages/Home.page
index e2c3668e..ba88bb43 100644
--- a/demos/northwind-db/protected/pages/Home.page
+++ b/demos/northwind-db/protected/pages/Home.page
@@ -1,12 +1,13 @@
 <html>
-<com:THead Title="Welcome to Prado" />
+<com:THead Title="Northwind Database Sample" />
 <body>
-<h1>Welcome to PRADO!</h1>
-<com:TForm>
-	
-	<com:TDropDownList ID="class_list" AutoPostBack="true"/>
-	<com:TScaffoldView ID="scaffold1" RecordClass="<%= $this->class_list->selectedItem->Text %>" />
-
-</com:TForm>
+<h1>Northwind Database Sample</h1>
+<p>
+The Northwind Traders sample database contains the sales data for a fictitious 
+company called Northwind Traders, which imports and exports specialty foods from around the world.
+The database contains information about customers, suppliers, products, orders and employees (as well as a few other bits of miscellaneous information). 
+<a href="?page=NorthwindCrud">View database</a>
+</p>
+<img src=<%~ northwind.gif %> />
 </body>
 </html>
\ No newline at end of file
diff --git a/demos/northwind-db/protected/pages/Home.php b/demos/northwind-db/protected/pages/Home.php
deleted file mode 100644
index 06035069..00000000
--- a/demos/northwind-db/protected/pages/Home.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-class Home extends TPage
-{
-	function onInit($param)
-	{
-		$classes = $this->getRecordClassList(Prado::getPathOfNamespace('Application.database.*'));
-		$this->class_list->dataSource = $classes;
-		$this->class_list->dataBind();
-	}
-
-	protected function getRecordClassList($directory)
-	{
-		$list=array();
-		$folder=@opendir($directory);
-		while($entry=@readdir($folder))
-		{
-			if($entry[0]==='.')
-				continue;
-			else if(is_file($directory.'/'.$entry))
-				$list[] = str_replace('.php', '', $entry);
-		}
-		closedir($folder);
-		return $list;
-	}
-}
-
-?>
\ No newline at end of file
diff --git a/demos/northwind-db/protected/pages/NorthwindCrud.page b/demos/northwind-db/protected/pages/NorthwindCrud.page
new file mode 100644
index 00000000..34d8ecd0
--- /dev/null
+++ b/demos/northwind-db/protected/pages/NorthwindCrud.page
@@ -0,0 +1,10 @@
+<html>
+<com:THead Title="Northwind Database" />
+<body>
+<h1>Northwind Database</h1>
+<com:TForm>
+	<com:TDropDownList ID="class_list" AutoPostBack="true"/>
+	<com:TScaffoldView ID="scaffold1" RecordClass="<%= $this->class_list->selectedItem->Text %>" />
+</com:TForm>
+</body>
+</html>
\ No newline at end of file
diff --git a/demos/northwind-db/protected/pages/NorthwindCrud.php b/demos/northwind-db/protected/pages/NorthwindCrud.php
new file mode 100644
index 00000000..57694caa
--- /dev/null
+++ b/demos/northwind-db/protected/pages/NorthwindCrud.php
@@ -0,0 +1,28 @@
+<?php
+
+class NorthwindCrud extends TPage
+{
+	function onInit($param)
+	{
+		$classes = $this->getRecordClassList(Prado::getPathOfNamespace('Application.database.*'));
+		$this->class_list->dataSource = $classes;
+		$this->class_list->dataBind();
+	}
+
+	protected function getRecordClassList($directory)
+	{
+		$list=array();
+		$folder=@opendir($directory);
+		while($entry=@readdir($folder))
+		{
+			if($entry[0]==='.')
+				continue;
+			else if(is_file($directory.'/'.$entry) && strpos($entry,'.php'))
+				$list[] = str_replace('.php', '', $entry);
+		}
+		closedir($folder);
+		return $list;
+	}
+}
+
+?>
\ No newline at end of file
diff --git a/demos/northwind-db/protected/pages/northwind.gif b/demos/northwind-db/protected/pages/northwind.gif
index 34e1f2ed..acbacaea 100644
Binary files a/demos/northwind-db/protected/pages/northwind.gif and b/demos/northwind-db/protected/pages/northwind.gif differ
-- 
cgit v1.2.3