diff options
Diffstat (limited to 'demos/blog-tutorial/samples/day2/blog')
5 files changed, 10 insertions, 7 deletions
diff --git a/demos/blog-tutorial/samples/day2/blog/protected/data/blog.db b/demos/blog-tutorial/samples/day2/blog/protected/data/blog.db Binary files differindex 37449fd3..46e82bfb 100644 --- a/demos/blog-tutorial/samples/day2/blog/protected/data/blog.db +++ b/demos/blog-tutorial/samples/day2/blog/protected/data/blog.db diff --git a/demos/blog-tutorial/samples/day2/blog/protected/database/PostRecord.php b/demos/blog-tutorial/samples/day2/blog/protected/database/PostRecord.php index 31451b30..a761286a 100644 --- a/demos/blog-tutorial/samples/day2/blog/protected/database/PostRecord.php +++ b/demos/blog-tutorial/samples/day2/blog/protected/database/PostRecord.php @@ -1,6 +1,6 @@ <?php
/**
- * Auto generated by prado-cli.php on 2007-04-06 08:42:12.
+ * Auto generated by prado-cli.php on 2007-04-07 10:44:20.
*/
class PostRecord extends TActiveRecord
{
@@ -15,6 +15,8 @@ class PostRecord extends TActiveRecord public $title; public $content; + + public $status; public static function finder($className=__CLASS__)
diff --git a/demos/blog-tutorial/samples/day2/blog/protected/database/UserRecord.php b/demos/blog-tutorial/samples/day2/blog/protected/database/UserRecord.php index 2f657cd8..87043894 100644 --- a/demos/blog-tutorial/samples/day2/blog/protected/database/UserRecord.php +++ b/demos/blog-tutorial/samples/day2/blog/protected/database/UserRecord.php @@ -1,6 +1,6 @@ <?php
/**
- * Auto generated by prado-cli.php on 2007-04-06 08:42:08.
+ * Auto generated by prado-cli.php on 2007-04-07 10:44:25.
*/
class UserRecord extends TActiveRecord
{
diff --git a/demos/blog-tutorial/samples/day2/blog/protected/layouts/MainLayout.tpl b/demos/blog-tutorial/samples/day2/blog/protected/layouts/MainLayout.tpl index 5218b98d..6e264936 100644 --- a/demos/blog-tutorial/samples/day2/blog/protected/layouts/MainLayout.tpl +++ b/demos/blog-tutorial/samples/day2/blog/protected/layouts/MainLayout.tpl @@ -12,7 +12,7 @@ </div>
<div id="footer">
-Powered by <%= PRADO::poweredByPrado() %>
+<%= PRADO::poweredByPrado() %>
</div>
</com:TForm>
diff --git a/demos/blog-tutorial/samples/day2/blog/protected/schema.sql b/demos/blog-tutorial/samples/day2/blog/protected/schema.sql index 085e47c3..d3189b40 100644 --- a/demos/blog-tutorial/samples/day2/blog/protected/schema.sql +++ b/demos/blog-tutorial/samples/day2/blog/protected/schema.sql @@ -1,8 +1,8 @@ /* create users table */
CREATE TABLE users (
username VARCHAR(128) NOT NULL PRIMARY KEY,
- email VARCHAR(128) NOT NULL UNIQUE,
- password VARCHAR(128) NOT NULL, /* plain text password */
+ email VARCHAR(128) NOT NULL,
+ password VARCHAR(128) NOT NULL, /* in plain text */
role INTEGER NOT NULL, /* 0: normal user, 1: administrator */
first_name VARCHAR(128),
last_name VARCHAR(128)
@@ -14,10 +14,11 @@ CREATE TABLE posts ( author VARCHAR(128) NOT NULL, /* references users.username */
create_time INTEGER NOT NULL, /* UNIX timestamp */
title VARCHAR(256) NOT NULL, /* title of the post */
- content TEXT NOT NULL /* content of the post */
+ content TEXT NOT NULL, /* content of the post */
+ status INTEGER NOT NULL /* 0: published; 1: draft; 2: pending; 2: denied */
);
/* insert some initial data records for testing */
INSERT INTO users VALUES ('admin', 'admin@example.com', 'demo', 1, 'Qiang', 'Xue');
INSERT INTO users VALUES ('demo', 'demo@example.com', 'demo', 0, 'Wei', 'Zhuo');
-INSERT INTO posts VALUES (NULL, 'admin', 1175708482, 'first post', 'this is my first post');
+INSERT INTO posts VALUES (NULL, 'admin', 1175708482, 'first post', 'this is my first post', 0);
|