2c03124c377ca9c26ee98fc0cb6dec28708c2f56

Author: gwoo

Date: 2009-01-23 14:47:08 -0800

initial application layout and schema file

diff --git a/.gitignore b/.gitignore index e69de29..5909ac5 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +tmp +config/database.php \ No newline at end of file diff --git a/.htaccess b/.htaccess new file mode 100755 index 0000000..0ed8662 --- /dev/null +++ b/.htaccess @@ -0,0 +1,5 @@ +<IfModule mod_rewrite.c> + RewriteEngine on + RewriteRule ^$ webroot/ [L] + RewriteRule (.*) webroot/$1 [L] + </IfModule> \ No newline at end of file diff --git a/app_controller.php b/app_controller.php new file mode 100755 index 0000000..fba7c00 --- /dev/null +++ b/app_controller.php @@ -0,0 +1,39 @@ +<?php +/* SVN FILE: $Id: app_controller.php 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * Short description for file. + * + * This file is application-wide controller file. You can put all + * application-wide controller-related methods here. + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * Short description for class. + * + * Add your application-wide methods in the class below, your controllers + * will inherit them. + * + * @package cake + * @subpackage cake.app + */ +class AppController extends Controller { +} +?> \ No newline at end of file diff --git a/app_helper.php b/app_helper.php new file mode 100755 index 0000000..2e9e555 --- /dev/null +++ b/app_helper.php @@ -0,0 +1,41 @@ +<?php +/* SVN FILE: $Id: app_helper.php 7904 2008-12-05 16:49:43Z mark_story $ */ +/** + * Short description for file. + * + * This file is application-wide helper file. You can put all + * application-wide helper-related methods here. + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.cake + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7904 $ + * @modifiedby $LastChangedBy: mark_story $ + * @lastmodified $Date: 2008-12-05 08:49:43 -0800 (Fri, 05 Dec 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +App::import('Core', 'Helper'); +/** + * This is a placeholder class. + * Create the same file in app/app_helper.php + * + * Add your application-wide methods in the class below, your helpers + * will inherit them. + * + * @package cake + * @subpackage cake.cake + */ +class AppHelper extends Helper { +} +?> \ No newline at end of file diff --git a/app_model.php b/app_model.php new file mode 100755 index 0000000..50a520e --- /dev/null +++ b/app_model.php @@ -0,0 +1,41 @@ +<?php +/* SVN FILE: $Id: app_model.php 7847 2008-11-08 02:54:07Z renan.saddam $ */ + +/** + * Application model for Cake. + * + * This file is application-wide model file. You can put all + * application-wide model-related methods here. + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7847 $ + * @modifiedby $LastChangedBy: renan.saddam $ + * @lastmodified $Date: 2008-11-07 18:54:07 -0800 (Fri, 07 Nov 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ + +/** + * Application model for Cake. + * + * Add your application-wide methods in the class below, your models + * will inherit them. + * + * @package cake + * @subpackage cake.app + */ +class AppModel extends Model { +} +?> \ No newline at end of file diff --git a/config/acl.ini.php b/config/acl.ini.php new file mode 100755 index 0000000..fba3b2e --- /dev/null +++ b/config/acl.ini.php @@ -0,0 +1,74 @@ +;<?php die() ?> +; SVN FILE: $Id: acl.ini.php 7805 2008-10-30 17:30:26Z AD7six $ +;/** +; * Short description for file. +; * +; * +; * PHP versions 4 and 5 +; * +; * CakePHP(tm) : Rapid Development Framework http://www.cakephp.org/ +; * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) +; * +; * Licensed under The MIT License +; * Redistributions of files must retain the above copyright notice. +; * +; * @filesource +; * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) +; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project +; * @package cake +; * @subpackage cake.app.config +; * @since CakePHP(tm) v 0.10.0.1076 +; * @version $Revision: 7805 $ +; * @modifiedby $LastChangedBy: AD7six $ +; * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ +; * @license http://www.opensource.org/licenses/mit-license.php The MIT License +; */ + +; acl.ini.php - Cake ACL Configuration +; --------------------------------------------------------------------- +; Use this file to specify user permissions. +; aco = access control object (something in your application) +; aro = access request object (something requesting access) +; +; User records are added as follows: +; +; [uid] +; groups = group1, group2, group3 +; allow = aco1, aco2, aco3 +; deny = aco4, aco5, aco6 +; +; Group records are added in a similar manner: +; +; [gid] +; allow = aco1, aco2, aco3 +; deny = aco4, aco5, aco6 +; +; The allow, deny, and groups sections are all optional. +; NOTE: groups names *cannot* ever be the same as usernames! +; +; ACL permissions are checked in the following order: +; 1. Check for user denies (and DENY if specified) +; 2. Check for user allows (and ALLOW if specified) +; 3. Gather user's groups +; 4. Check group denies (and DENY if specified) +; 5. Check group allows (and ALLOW if specified) +; 6. If no aro, aco, or group information is found, DENY +; +; --------------------------------------------------------------------- + +;------------------------------------- +;Users +;------------------------------------- + +[username-goes-here] +groups = group1, group2 +deny = aco1, aco2 +allow = aco3, aco4 + +;------------------------------------- +;Groups +;------------------------------------- + +[groupname-goes-here] +deny = aco5, aco6 +allow = aco7, aco8 \ No newline at end of file diff --git a/config/bootstrap.php b/config/bootstrap.php new file mode 100755 index 0000000..e771c59 --- /dev/null +++ b/config/bootstrap.php @@ -0,0 +1,44 @@ +<?php +/* SVN FILE: $Id: bootstrap.php 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * Short description for file. + * + * Long description for file + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP(tm) v 0.10.8.2117 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * + * This file is loaded automatically by the app/webroot/index.php file after the core bootstrap.php is loaded + * This is an application wide file to load any function that is not used within a class define. + * You can also use this to include or require any files in your application. + * + */ +/** + * The settings below can be used to set additional paths to models, views and controllers. + * This is related to Ticket #470 (https://trac.cakephp.org/ticket/470) + * + * $modelPaths = array('full path to models', 'second full path to models', 'etc...'); + * $viewPaths = array('this path to views', 'second full path to views', 'etc...'); + * $controllerPaths = array('this path to controllers', 'second full path to controllers', 'etc...'); + * + */ +//EOF +?> \ No newline at end of file diff --git a/config/core.php b/config/core.php new file mode 100755 index 0000000..4074696 --- /dev/null +++ b/config/core.php @@ -0,0 +1,227 @@ +<?php +/* SVN FILE: $Id: core.php 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * This is core configuration file. + * + * Use it to configure core behavior of Cake. + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * CakePHP Debug Level: + * + * Production Mode: + * 0: No error messages, errors, or warnings shown. Flash messages redirect. + * + * Development Mode: + * 1: Errors and warnings shown, model caches refreshed, flash messages halted. + * 2: As in 1, but also with full debug messages and SQL output. + * 3: As in 2, but also with full controller dump. + * + * In production mode, flash messages redirect after a time interval. + * In development mode, you need to click the flash message to continue. + */ + Configure::write('debug', 2); +/** + * Application wide charset encoding + */ + Configure::write('App.encoding', 'UTF-8'); +/** + * To configure CakePHP *not* to use mod_rewrite and to + * use CakePHP pretty URLs, remove these .htaccess + * files: + * + * /.htaccess + * /app/.htaccess + * /app/webroot/.htaccess + * + * And uncomment the App.baseUrl below: + */ + //Configure::write('App.baseUrl', env('SCRIPT_NAME')); +/** + * Uncomment the define below to use CakePHP admin routes. + * + * The value of the define determines the name of the route + * and its associated controller actions: + * + * 'admin' -> admin_index() and /admin/controller/index + * 'superuser' -> superuser_index() and /superuser/controller/index + */ + //Configure::write('Routing.admin', 'admin'); + +/** + * Turn off all caching application-wide. + * + */ + //Configure::write('Cache.disable', true); +/** + * Enable cache checking. + * + * If set to true, for view caching you must still use the controller + * var $cacheAction inside your controllers to define caching settings. + * You can either set it controller-wide by setting var $cacheAction = true, + * or in each action using $this->cacheAction = true. + * + */ + //Configure::write('Cache.check', true); +/** + * Defines the default error type when using the log() function. Used for + * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG. + */ + define('LOG_ERROR', 2); +/** + * The preferred session handling method. Valid values: + * + * 'php' Uses settings defined in your php.ini. + * 'cake' Saves session files in CakePHP's /tmp directory. + * 'database' Uses CakePHP's database sessions. + * + * To define a custom session handler, save it at /app/config/<name>.php. + * Set the value of 'Session.save' to <name> to utilize it in CakePHP. + * + * To use database sessions, execute the SQL file found at /app/config/sql/sessions.sql. + * + */ + Configure::write('Session.save', 'php'); +/** + * The name of the table used to store CakePHP database sessions. + * + * 'Session.save' must be set to 'database' in order to utilize this constant. + * + * The table name set here should *not* include any table prefix defined elsewhere. + */ + //Configure::write('Session.table', 'cake_sessions'); +/** + * The DATABASE_CONFIG::$var to use for database session handling. + * + * 'Session.save' must be set to 'database' in order to utilize this constant. + */ + //Configure::write('Session.database', 'default'); +/** + * The name of CakePHP's session cookie. + */ + Configure::write('Session.cookie', 'CAKEPHP'); +/** + * Session time out time (in seconds). + * Actual value depends on 'Security.level' setting. + */ + Configure::write('Session.timeout', '120'); +/** + * If set to false, sessions are not automatically started. + */ + Configure::write('Session.start', true); +/** + * When set to false, HTTP_USER_AGENT will not be checked + * in the session + */ + Configure::write('Session.checkAgent', true); +/** + * The level of CakePHP security. The session timeout time defined + * in 'Session.timeout' is multiplied according to the settings here. + * Valid values: + * + * 'high' Session timeout in 'Session.timeout' x 10 + * 'medium' Session timeout in 'Session.timeout' x 100 + * 'low' Session timeout in 'Session.timeout' x 300 + * + * CakePHP session IDs are also regenerated between requests if + * 'Security.level' is set to 'high'. + */ + Configure::write('Security.level', 'high'); +/** + * A random string used in security hashing methods. + */ + Configure::write('Security.salt', 'f56c824dc376761bb74bfcfc6bf7bfd94372b4cc'); +/** + * Compress CSS output by removing comments, whitespace, repeating tags, etc. + * This requires a/var/cache directory to be writable by the web server for caching. + * and /vendors/csspp/csspp.php + * + * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css(). + */ + //Configure::write('Asset.filter.css', 'css.php'); +/** + * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the + * output, and setting the config below to the name of the script. + * + * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link(). + */ + //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php'); +/** + * The classname and database used in CakePHP's + * access control lists. + */ + Configure::write('Acl.classname', 'DbAcl'); + Configure::write('Acl.database', 'default'); +/** + * + * Cache Engine Configuration + * Default settings provided below + * + * File storage engine. + * + * Cache::config('default', array( + * 'engine' => 'File', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path + * 'prefix' => 'cake_', //[optional] prefix every cache file with this string + * 'lock' => false, //[optional] use file locking + * 'serialize' => true, [optional] + * )); + * + * + * APC (http://pecl.php.net/package/APC) + * + * Cache::config('default', array( + * 'engine' => 'Apc', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string + * )); + * + * Xcache (http://xcache.lighttpd.net/) + * + * Cache::config('default', array( + * 'engine' => 'Xcache', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string + * 'user' => 'user', //user from xcache.admin.user settings + * 'password' => 'password', //plaintext password (xcache.admin.pass) + * )); + * + * + * Memcache (http://www.danga.com/memcached/) + * + * Cache::config('default', array( + * 'engine' => 'Memcache', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string + * 'servers' => array( + * '127.0.0.1:11211' // localhost, default port 11211 + * ), //[optional] + * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory) + * )); + * + */ + Cache::config('default', array('engine' => 'File')); +?> \ No newline at end of file diff --git a/config/database.php.default b/config/database.php.default new file mode 100755 index 0000000..c46faef --- /dev/null +++ b/config/database.php.default @@ -0,0 +1,101 @@ +<?php +/* SVN FILE: $Id: database.php.default 7968 2008-12-31 15:30:11Z mark_story $ */ +/** + * This is core configuration file. + * + * Use it to configure core behaviour ofCake. + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7968 $ + * @modifiedby $LastChangedBy: mark_story $ + * @lastmodified $Date: 2008-12-31 07:30:11 -0800 (Wed, 31 Dec 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * In this file you set up your database connection details. + * + * @package cake + * @subpackage cake.config + */ +/** + * Database configuration class. + * You can specify multiple configurations for production, development and testing. + * + * driver => The name of a supported driver; valid options are as follows: + * mysql - MySQL 4 & 5, + * mysqli - MySQL 4 & 5 Improved Interface (PHP5 only), + * sqlite - SQLite (PHP5 only), + * postgres - PostgreSQL 7 and higher, + * mssql - Microsoft SQL Server 2000 and higher, + * db2 - IBM DB2, Cloudscape, and Apache Derby (http://php.net/ibm-db2) + * oracle - Oracle 8 and higher + * firebird - Firebird/Interbase + * sybase - Sybase ASE + * adodb-[drivername] - ADOdb interface wrapper (see below), + * odbc - ODBC DBO driver + * + * You can add custom database drivers (or override existing drivers) by adding the + * appropriate file to app/models/datasources/dbo. Drivers should be named 'dbo_x.php', + * where 'x' is the name of the database. + * + * persistent => true / false + * Determines whether or not the database should use a persistent connection + * + * connect => + * ADOdb set the connect to one of these + * (http://phplens.com/adodb/supported.databases.html) and + * append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent) + * For all other databases, this setting is deprecated. + * + * host => + * the host you connect to the database. To add a socket or port number, use 'port' => # + * + * prefix => + * Uses the given prefix for all the tables in this database. This setting can be overridden + * on a per-table basis with the Model::$tablePrefix property. + * + * schema => + * For Postgres and DB2, specifies which schema you would like to use the tables in. Postgres defaults to + * 'public', DB2 defaults to empty. + * + * encoding => + * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding to use when connecting to the + * database. Uses database default. + * + */ +class DATABASE_CONFIG { + + var $default = array( + 'driver' => 'mysql', + 'persistent' => false, + 'host' => 'localhost', + 'login' => 'user', + 'password' => 'password', + 'database' => 'database_name', + 'prefix' => '', + ); + + var $test = array( + 'driver' => 'mysql', + 'persistent' => false, + 'host' => 'localhost', + 'login' => 'user', + 'password' => 'password', + 'database' => 'test_database_name', + 'prefix' => '', + ); +} +?> \ No newline at end of file diff --git a/config/inflections.php b/config/inflections.php new file mode 100755 index 0000000..b07bcd8 --- /dev/null +++ b/config/inflections.php @@ -0,0 +1,70 @@ +<?php +/* SVN FILE: $Id: inflections.php 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * Custom Inflected Words. + * + * This file is used to hold words that are not matched in the normail Inflector::pluralize() and + * Inflector::singularize() + * + * PHP versions 4 and % + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP(tm) v 1.0.0.2312 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * This is a key => value array of regex used to match words. + * If key matches then the value is returned. + * + * $pluralRules = array('/(s)tatus$/i' => '\1\2tatuses', '/^(ox)$/i' => '\1\2en', '/([m|l])ouse$/i' => '\1ice'); + */ + $pluralRules = array(); +/** + * This is a key only array of plural words that should not be inflected. + * Notice the last comma + * + * $uninflectedPlural = array('.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox'); + */ + $uninflectedPlural = array(); +/** + * This is a key => value array of plural irregular words. + * If key matches then the value is returned. + * + * $irregularPlural = array('atlas' => 'atlases', 'beef' => 'beefs', 'brother' => 'brothers') + */ + $irregularPlural = array(); +/** + * This is a key => value array of regex used to match words. + * If key matches then the value is returned. + * + * $singularRules = array('/(s)tatuses$/i' => '\1\2tatus', '/(matr)ices$/i' =>'\1ix','/(vert|ind)ices$/i') + */ + $singularRules = array(); +/** + * This is a key only array of singular words that should not be inflected. + * You should not have to change this value below if you do change it use same format + * as the $uninflectedPlural above. + */ + $uninflectedSingular = $uninflectedPlural; +/** + * This is a key => value array of singular irregular words. + * Most of the time this will be a reverse of the above $irregularPlural array + * You should not have to change this value below if you do change it use same format + * + * $irregularSingular = array('atlases' => 'atlas', 'beefs' => 'beef', 'brothers' => 'brother') + */ + $irregularSingular = array_flip($irregularPlural); +?> \ No newline at end of file diff --git a/config/routes.php b/config/routes.php new file mode 100755 index 0000000..443af21 --- /dev/null +++ b/config/routes.php @@ -0,0 +1,39 @@ +<?php +/* SVN FILE: $Id: routes.php 7820 2008-11-03 18:27:56Z renan.saddam $ */ +/** + * Short description for file. + * + * In this file, you set up routes to your controllers and their actions. + * Routes are very important mechanism that allows you to freely connect + * different urls to chosen controllers and their actions (functions). + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7820 $ + * @modifiedby $LastChangedBy: renan.saddam $ + * @lastmodified $Date: 2008-11-03 10:27:56 -0800 (Mon, 03 Nov 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * Here, we are connecting '/' (base path) to controller called 'Pages', + * its action called 'display', and we pass a param to select the view file + * to use (in this case, /app/views/pages/home.ctp)... + */ + Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home')); +/** + * ...and connect the rest of 'Pages' controller's urls. + */ + Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display')); +?> \ No newline at end of file diff --git a/config/sql/db_acl.php b/config/sql/db_acl.php new file mode 100755 index 0000000..25fd6c5 --- /dev/null +++ b/config/sql/db_acl.php @@ -0,0 +1,79 @@ +<?php +/* SVN FILE: $Id: db_acl.php 7805 2008-10-30 17:30:26Z AD7six $ */ +/*DbAcl schema generated on: 2007-11-24 15:11:13 : 1195945453*/ +/** + * This is Acl Schema file + * + * Use it to configure database for ACL + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config.sql + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/* + * + * Using the Schema command line utility + * cake schema run create DbAcl + * + */ +class DbAclSchema extends CakeSchema { + + var $name = 'DbAcl'; + + function before($event = array()) { + return true; + } + + function after($event = array()) { + } + + var $acos = array( + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'model' => array('type'=>'string', 'null' => true), + 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'alias' => array('type'=>'string', 'null' => true), + 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + + var $aros = array( + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'model' => array('type'=>'string', 'null' => true), + 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'alias' => array('type'=>'string', 'null' => true), + 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + + var $aros_acos = array( + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'aro_id' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), + 'aco_id' => array('type'=>'integer', 'null' => false, 'length' => 10), + '_create' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), + '_read' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), + '_update' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), + '_delete' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1)) + ); + +} +?> \ No newline at end of file diff --git a/config/sql/db_acl.sql b/config/sql/db_acl.sql new file mode 100755 index 0000000..5dd43a4 --- /dev/null +++ b/config/sql/db_acl.sql @@ -0,0 +1,40 @@ +# $Id: db_acl.sql 7805 2008-10-30 17:30:26Z AD7six $ +# +# Copyright 2005-2008, Cake Software Foundation, Inc. +# +# Licensed under The MIT License +# Redistributions of files must retain the above copyright notice. +# http://www.opensource.org/licenses/mit-license.php The MIT License + +CREATE TABLE acos ( + id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + parent_id INTEGER(10) DEFAULT NULL, + model VARCHAR(255) DEFAULT '', + foreign_key INTEGER(10) UNSIGNED DEFAULT NULL, + alias VARCHAR(255) DEFAULT '', + lft INTEGER(10) DEFAULT NULL, + rght INTEGER(10) DEFAULT NULL, + PRIMARY KEY (id) +); + +CREATE TABLE aros_acos ( + id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + aro_id INTEGER(10) UNSIGNED NOT NULL, + aco_id INTEGER(10) UNSIGNED NOT NULL, + _create CHAR(2) NOT NULL DEFAULT 0, + _read CHAR(2) NOT NULL DEFAULT 0, + _update CHAR(2) NOT NULL DEFAULT 0, + _delete CHAR(2) NOT NULL DEFAULT 0, + PRIMARY KEY(id) +); + +CREATE TABLE aros ( + id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, + parent_id INTEGER(10) DEFAULT NULL, + model VARCHAR(255) DEFAULT '', + foreign_key INTEGER(10) UNSIGNED DEFAULT NULL, + alias VARCHAR(255) DEFAULT '', + lft INTEGER(10) DEFAULT NULL, + rght INTEGER(10) DEFAULT NULL, + PRIMARY KEY (id) +); \ No newline at end of file diff --git a/config/sql/i18n.php b/config/sql/i18n.php new file mode 100755 index 0000000..a4eb56a --- /dev/null +++ b/config/sql/i18n.php @@ -0,0 +1,56 @@ +<?php +/* SVN FILE: $Id: i18n.php 7805 2008-10-30 17:30:26Z AD7six $ */ +/*i18n schema generated on: 2007-11-25 07:11:25 : 1196004805*/ +/** + * This is i18n Schema file + * + * Use it to configure database for i18n + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config.sql + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/* + * + * Using the Schema command line utility + * cake schema run create i18n + * + */ +class i18nSchema extends CakeSchema { + + var $name = 'i18n'; + + function before($event = array()) { + return true; + } + + function after($event = array()) { + } + + var $i18n = array( + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'locale' => array('type'=>'string', 'null' => false, 'length' => 6, 'key' => 'index'), + 'model' => array('type'=>'string', 'null' => false, 'key' => 'index'), + 'foreign_key' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), + 'field' => array('type'=>'string', 'null' => false, 'key' => 'index'), + 'content' => array('type'=>'text', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0)) + ); + +} +?> \ No newline at end of file diff --git a/config/sql/i18n.sql b/config/sql/i18n.sql new file mode 100755 index 0000000..9a265e3 --- /dev/null +++ b/config/sql/i18n.sql @@ -0,0 +1,26 @@ +# $Id: i18n.sql 7805 2008-10-30 17:30:26Z AD7six $ +# +# Copyright 2005-2008, Cake Software Foundation, Inc. +# +# Licensed under The MIT License +# Redistributions of files must retain the above copyright notice. +# http://www.opensource.org/licenses/mit-license.php The MIT License + +CREATE TABLE i18n ( + id int(10) NOT NULL auto_increment, + locale varchar(6) NOT NULL, + model varchar(255) NOT NULL, + foreign_key int(10) NOT NULL, + field varchar(255) NOT NULL, + content mediumtext, + PRIMARY KEY (id), +# UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field), +# INDEX I18N_LOCALE_ROW(locale, model, foreign_key), +# INDEX I18N_LOCALE_MODEL(locale, model), +# INDEX I18N_FIELD(model, foreign_key, field), +# INDEX I18N_ROW(model, foreign_key), + INDEX locale (locale), + INDEX model (model), + INDEX row_id (foreign_key), + INDEX field (field) +); \ No newline at end of file diff --git a/config/sql/schema.php b/config/sql/schema.php new file mode 100644 index 0000000..9b44405 --- /dev/null +++ b/config/sql/schema.php @@ -0,0 +1,173 @@ +<?php +/* SVN FILE: $Id$ */ +/* Bakery schema generated on: 2009-01-23 14:01:15 : 1232750775*/ +class BakerySchema extends CakeSchema { + var $name = 'Bakery'; + + function before($event = array()) { + return true; + } + + function after($event = array()) { + } + + var $articles = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'slug' => array('type' => 'string', 'null' => false, 'length' => 200, 'key' => 'index'), + 'category_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10, 'key' => 'index'), + 'rate_count' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'rate_sum' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'viewed' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'version' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 45), + 'title' => array('type' => 'string', 'null' => false, 'length' => 200, 'key' => 'index'), + 'intro' => array('type' => 'text', 'null' => true, 'default' => NULL), + 'comments' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 4), + 'body' => array('type' => 'text', 'null' => true, 'default' => NULL), + 'isdraft' => array('type' => 'boolean', 'null' => false, 'default' => '0', 'key' => 'index'), + 'allow_comments' => array('type' => 'boolean', 'null' => false, 'default' => '1'), + 'moderate_comments' => array('type' => 'boolean', 'null' => false, 'default' => '1'), + 'published' => array('type' => 'boolean', 'null' => false, 'default' => '0'), + 'multipage' => array('type' => 'boolean', 'null' => false, 'default' => '0'), + 'published_date' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'deleted' => array('type' => 'boolean', 'null' => false, 'default' => '0'), + 'deleted_date' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'created' => array('type' => 'datetime', 'null' => false, 'default' => '0000-00-00 00:00:00', 'key' => 'index'), + 'modified' => array('type' => 'datetime', 'null' => false, 'default' => '0000-00-00 00:00:00', 'key' => 'index'), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'DATE_INDEX' => array('column' => 'created', 'unique' => 0), 'MOD_INDEX' => array('column' => 'modified', 'unique' => 0), 'DRAFT_INDEX' => array('column' => 'isdraft', 'unique' => 0), 'USER_INDEX' => array('column' => 'user_id', 'unique' => 0), 'ARTICLE_INDEX' => array('column' => 'title', 'unique' => 0), 'SLUG_INDEX' => array('column' => 'slug', 'unique' => 0)) + ); + var $articles_tags = array( + 'article_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'tag_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'indexes' => array() + ); + var $attachments = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'article_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'name' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'link' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'filesize' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'filetype' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'count' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $categories = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'group_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'parent_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'name' => array('type' => 'string', 'null' => false), + 'icon' => array('type' => 'string', 'null' => false), + 'description' => array('type' => 'text', 'null' => false), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $comment_types = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 20), + 'public' => array('type' => 'boolean', 'null' => false, 'default' => '0'), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $comments = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'comment_type_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'article_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'comment_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'created' => array('type' => 'datetime', 'null' => false, 'default' => '0000-00-00 00:00:00'), + 'title' => array('type' => 'string', 'null' => false), + 'body' => array('type' => 'text', 'null' => false), + 'subscribed' => array('type' => 'boolean', 'null' => false, 'default' => '0'), + 'published' => array('type' => 'boolean', 'null' => false, 'default' => '0', 'key' => 'index'), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'PUBLISHED_INDEX' => array('column' => 'published', 'unique' => 0)) + ); + var $config = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'property' => array('type' => 'string', 'null' => false, 'length' => 64), + 'value' => array('type' => 'text', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $featured = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'article_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'category_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'published_date' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'end_date' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $groups = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'level_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 20), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $leafs = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'article_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'title' => array('type' => 'string', 'null' => false), + 'pagenum' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 3), + 'content' => array('type' => 'text', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $levels = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 20), + 'value' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 3), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $profiles = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10, 'key' => 'unique'), + 'published' => array('type' => 'boolean', 'null' => false, 'default' => '0'), + 'location' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'interests' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'occupation' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'icq' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 20), + 'aim' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'yahoo' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'msnm' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'jabber' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'time_zone' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'birthday' => array('type' => 'date', 'null' => true, 'default' => NULL), + 'user_icon' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'signature' => array('type' => 'text', 'null' => true, 'default' => NULL), + 'url' => array('type' => 'string', 'null' => true, 'default' => NULL), + 'bio' => array('type' => 'text', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'USER_ID_UNIQUE_INDEX' => array('column' => 'user_id', 'unique' => 1)) + ); + var $ratings = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'user_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'article_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'value' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + var $tags = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'linked' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 20), + 'keyname' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 20, 'key' => 'unique'), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'KEYNAME_UNIQUE_INDEX' => array('column' => 'keyname', 'unique' => 1)) + ); + var $users = array( + 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'group_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'level_id' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10), + 'realname' => array('type' => 'string', 'null' => false), + 'username' => array('type' => 'string', 'null' => false, 'key' => 'unique'), + 'email' => array('type' => 'string', 'null' => false, 'key' => 'unique'), + 'psword' => array('type' => 'string', 'null' => false), + 'temppassword' => array('type' => 'string', 'null' => false), + 'tos' => array('type' => 'boolean', 'null' => false, 'default' => '0'), + 'mail_comments' => array('type' => 'boolean', 'null' => false, 'default' => '1'), + 'email_authenticated' => array('type' => 'boolean', 'null' => true, 'default' => NULL), + 'email_token' => array('type' => 'string', 'null' => false, 'length' => 45), + 'email_token_expires' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL), + 'display_name' => array('type' => 'integer', 'null' => true, 'default' => '0', 'length' => 1), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'USERNAME_UNIQUE_INDEX' => array('column' => 'username', 'unique' => 1), 'EMAIL_UNIQUE_INDEX' => array('column' => 'email', 'unique' => 1)) + ); +} +?> \ No newline at end of file diff --git a/config/sql/sessions.php b/config/sql/sessions.php new file mode 100755 index 0000000..c4f84b1 --- /dev/null +++ b/config/sql/sessions.php @@ -0,0 +1,53 @@ +<?php +/* SVN FILE: $Id: sessions.php 7805 2008-10-30 17:30:26Z AD7six $ */ +/*Sessions schema generated on: 2007-11-25 07:11:54 : 1196004714*/ +/** + * This is Sessions Schema file + * + * Use it to configure database for Sessions + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.config.sql + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/* + * + * Using the Schema command line utility + * cake schema run create Sessions + * + */ +class SessionsSchema extends CakeSchema { + + var $name = 'Sessions'; + + function before($event = array()) { + return true; + } + + function after($event = array()) { + } + + var $cake_sessions = array( + 'id' => array('type'=>'string', 'null' => false, 'key' => 'primary'), + 'data' => array('type'=>'text', 'null' => true, 'default' => NULL), + 'expires' => array('type'=>'integer', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + +} +?> \ No newline at end of file diff --git a/config/sql/sessions.sql b/config/sql/sessions.sql new file mode 100755 index 0000000..5895220 --- /dev/null +++ b/config/sql/sessions.sql @@ -0,0 +1,16 @@ +# $Id: sessions.sql 7062 2008-05-30 11:29:53Z nate $ +# +# Copyright 2005-2008, Cake Software Foundation, Inc. +# 1785 E. Sahara Avenue, Suite 490-204 +# Las Vegas, Nevada 89104 +# +# Licensed under The MIT License +# Redistributions of files must retain the above copyright notice. +# http://www.opensource.org/licenses/mit-license.php The MIT License + +CREATE TABLE cake_sessions ( + id varchar(255) NOT NULL default '', + data text, + expires int(11) default NULL, + PRIMARY KEY (id) +); \ No newline at end of file diff --git a/controllers/pages_controller.php b/controllers/pages_controller.php new file mode 100755 index 0000000..e3b1d0f --- /dev/null +++ b/controllers/pages_controller.php @@ -0,0 +1,86 @@ +<?php +/* SVN FILE: $Id: pages_controller.php 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * Static content controller. + * + * This file will render views from views/pages/ + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.cake.libs.controller + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * Static content controller + * + * Override this controller by placing a copy in controllers directory of an application + * + * @package cake + * @subpackage cake.cake.libs.controller + */ +class PagesController extends AppController { +/** + * Controller name + * + * @var string + * @access public + */ + var $name = 'Pages'; +/** + * Default helper + * + * @var array + * @access public + */ + var $helpers = array('Html'); +/** + * This controller does not use a model + * + * @var array + * @access public + */ + var $uses = array(); +/** + * Displays a view + * + * @param mixed What page to display + * @access public + */ + function display() { + $path = func_get_args(); + + $count = count($path); + if (!$count) { + $this->redirect('/'); + } + $page = $subpage = $title = null; + + if (!empty($path[0])) { + $page = $path[0]; + } + if (!empty($path[1])) { + $subpage = $path[1]; + } + if (!empty($path[$count - 1])) { + $title = Inflector::humanize($path[$count - 1]); + } + $this->set(compact('page', 'subpage', 'title')); + $this->render(join('/', $path)); + } +} + +?> \ No newline at end of file diff --git a/index.php b/index.php new file mode 100755 index 0000000..e9dfe73 --- /dev/null +++ b/index.php @@ -0,0 +1,24 @@ +<?php +/* SVN FILE: $Id: index.php 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app + * @since CakePHP(tm) v 0.10.0.1076 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +require 'webroot' . DIRECTORY_SEPARATOR . 'index.php'; +?> \ No newline at end of file diff --git a/views/elements/email/html/default.ctp b/views/elements/email/html/default.ctp new file mode 100755 index 0000000..0b8978e --- /dev/null +++ b/views/elements/email/html/default.ctp @@ -0,0 +1,31 @@ +<?php +/* SVN FILE: $Id: default.ctp 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.cake.libs.view.templates.elements.email.html + * @since CakePHP(tm) v 0.10.0.1076 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +?> +<?php +$content = explode("\n", $content); + +foreach ($content as $line): + echo '<p> ' . $line . '</p>'; +endforeach; +?> \ No newline at end of file diff --git a/views/elements/email/text/default.ctp b/views/elements/email/text/default.ctp new file mode 100755 index 0000000..d8458c2 --- /dev/null +++ b/views/elements/email/text/default.ctp @@ -0,0 +1,25 @@ +<?php +/* SVN FILE: $Id: default.ctp 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.cake.libs.view.templates.elements.email.text + * @since CakePHP(tm) v 0.10.0.1076 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +?> +<?php echo $content; ?> \ No newline at end of file diff --git a/views/layouts/ajax.ctp b/views/layouts/ajax.ctp new file mode 100755 index 0000000..719b89e --- /dev/null +++ b/views/layouts/ajax.ctp @@ -0,0 +1,25 @@ +<?php +/* SVN FILE: $Id: ajax.ctp 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.cake.libs.view.templates.layouts + * @since CakePHP(tm) v 0.10.0.1076 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +?> +<?php echo $content_for_layout; ?> \ No newline at end of file diff --git a/views/layouts/default.ctp b/views/layouts/default.ctp new file mode 100755 index 0000000..fefb5d5 --- /dev/null +++ b/views/layouts/default.ctp @@ -0,0 +1,64 @@ +<?php +/* SVN FILE: $Id: default.ctp 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.cake.console.libs.templates.skel.views.layouts + * @since CakePHP(tm) v 0.10.0.1076 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <?php echo $html->charset(); ?> + <title> + <?php __('CakePHP: the rapid development php framework:'); ?> + <?php echo $title_for_layout; ?> + </title> + <?php + echo $html->meta('icon'); + + echo $html->css('cake.generic'); + + echo $scripts_for_layout; + ?> +</head> +<body> + <div id="container"> + <div id="header"> + <h1><?php echo $html->link(__('CakePHP: the rapid development php framework', true), 'http://cakephp.org'); ?></h1> + </div> + <div id="content"> + + <?php $session->flash(); ?> + + <?php echo $content_for_layout; ?> + + </div> + <div id="footer"> + <?php echo $html->link( + $html->image('cake.power.gif', array('alt'=> __("CakePHP: the rapid development php framework", true), 'border'=>"0")), + 'http://www.cakephp.org/', + array('target'=>'_blank'), null, false + ); + ?> + </div> + </div> + <?php echo $cakeDebug; ?> +</body> +</html> \ No newline at end of file diff --git a/views/layouts/email/html/default.ctp b/views/layouts/email/html/default.ctp new file mode 100755 index 0000000..95089e6 --- /dev/null +++ b/views/layouts/email/html/default.ctp @@ -0,0 +1,37 @@ +<?php +/* SVN FILE: $Id: default.ctp 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.cake.libs.view.templates.layouts.email.html + * @since CakePHP(tm) v 0.10.0.1076 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> + +<html> +<head> + <title><?php echo $title_for_layout;?></title> +</head> + +<body> + <?php echo $content_for_layout;?> + + <p>This email was sent using the <a href="http://cakephp.org">CakePHP Framework</a></p> +</body> +</html> diff --git a/views/layouts/email/text/default.ctp b/views/layouts/email/text/default.ctp new file mode 100755 index 0000000..a3571bc --- /dev/null +++ b/views/layouts/email/text/default.ctp @@ -0,0 +1,29 @@ +<?php +/* SVN FILE: $Id: default.ctp 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.cake.libs.view.templates.layouts.email.text + * @since CakePHP(tm) v 0.10.0.1076 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +?> + +<?php echo $content_for_layout;?> + +This email was sent using the CakePHP Framework, http://cakephp.org. + diff --git a/views/layouts/flash.ctp b/views/layouts/flash.ctp new file mode 100755 index 0000000..21de415 --- /dev/null +++ b/views/layouts/flash.ctp @@ -0,0 +1,44 @@ +<?php +/* SVN FILE: $Id: flash.ctp 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.cake.libs.view.templates.layouts + * @since CakePHP(tm) v 0.10.0.1076 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<?php echo $html->charset(); ?> +<title><?php echo $page_title; ?></title> + + +<?php if (Configure::read() == 0) { ?> +<meta http-equiv="Refresh" content="<?php echo $pause?>;url=<?php echo $url?>"/> +<?php } ?> +<style><!-- +P { text-align:center; font:bold 1.1em sans-serif } +A { color:#444; text-decoration:none } +A:HOVER { text-decoration: underline; color:#44E } +--></style> +</head> +<body> +<p><a href="<?php echo $url?>"><?php echo $message?></a></p> +</body> +</html> \ No newline at end of file diff --git a/views/layouts/js/default.ctp b/views/layouts/js/default.ctp new file mode 100755 index 0000000..d94dc90 --- /dev/null +++ b/views/layouts/js/default.ctp @@ -0,0 +1,2 @@ +<?php echo $scripts_for_layout; ?> +<script type="text/javascript"><?php echo $content_for_layout; ?></script> \ No newline at end of file diff --git a/views/layouts/rss/default.ctp b/views/layouts/rss/default.ctp new file mode 100755 index 0000000..94067f2 --- /dev/null +++ b/views/layouts/rss/default.ctp @@ -0,0 +1,17 @@ +<?php +echo $rss->header(); + +if (!isset($channel)) { + $channel = array(); +} +if (!isset($channel['title'])) { + $channel['title'] = $title_for_layout; +} + +echo $rss->document( + $rss->channel( + array(), $channel, $content_for_layout + ) +); + +?> \ No newline at end of file diff --git a/views/layouts/xml/default.ctp b/views/layouts/xml/default.ctp new file mode 100755 index 0000000..c688702 --- /dev/null +++ b/views/layouts/xml/default.ctp @@ -0,0 +1,2 @@ +<?php e($xml->header()); ?> +<?php echo $content_for_layout; ?> \ No newline at end of file diff --git a/views/pages/home.ctp b/views/pages/home.ctp new file mode 100644 index 0000000..e8583a1 --- /dev/null +++ b/views/pages/home.ctp @@ -0,0 +1,80 @@ +<h2>Sweet, "Bakery" got Baked by CakePHP!</h2> + +<?php +if (Configure::read() > 0): + Debugger::checkSessionKey(); +endif; +?> +<p> +<?php + if (is_writable(TMP)): + echo '<span class="notice success">'; + __('Your tmp directory is writable.'); + echo '</span>'; + else: + echo '<span class="notice">'; + __('Your tmp directory is NOT writable.'); + echo '</span>'; + endif; +?> +</p> +<p> +<?php + $settings = Cache::settings(); + if (!empty($settings)): + echo '<span class="notice success">'; + echo sprintf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), '<em>'. $settings['engine'] . 'Engine</em>'); + echo '</span>'; + else: + echo '<span class="notice">'; + __('Your cache is NOT working. Please check the settings in APP/config/core.php'); + echo '</span>'; + endif; +?> +</p> +<p> +<?php + $filePresent = null; + if (file_exists(CONFIGS . 'database.php')): + echo '<span class="notice success">'; + __('Your database configuration file is present.'); + $filePresent = true; + echo '</span>'; + else: + echo '<span class="notice">'; + __('Your database configuration file is NOT present.'); + echo '<br/>'; + __('Rename config/database.php.default to config/database.php'); + echo '</span>'; + endif; +?> +</p> +<?php +if (!empty($filePresent)): + uses('model' . DS . 'connection_manager'); + $db = ConnectionManager::getInstance(); + $connected = $db->getDataSource('default'); +?> +<p> +<?php + if ($connected->isConnected()): + echo '<span class="notice success">'; + __('Cake is able to connect to the database.'); + echo '</span>'; + else: + echo '<span class="notice">'; + __('Cake is NOT able to connect to the database.'); + echo '</span>'; + endif; +?> +</p> +<?php endif;?> +<h3><?php __('Editing this Page') ?></h3> +<p> +<?php + echo sprintf(__('To change the content of this page, edit: %s + To change its layout, edit: %s + You can also add some CSS styles for your pages at: %s', true), + APP . 'views' . DS . 'pages' . DS . 'home.ctp.<br />', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.<br />', APP . 'webroot' . DS . 'css'); +?> +</p> diff --git a/webroot/.htaccess b/webroot/.htaccess new file mode 100755 index 0000000..f9d8b93 --- /dev/null +++ b/webroot/.htaccess @@ -0,0 +1,6 @@ +<IfModule mod_rewrite.c> + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] +</IfModule> \ No newline at end of file diff --git a/webroot/css.php b/webroot/css.php new file mode 100755 index 0000000..057be6f --- /dev/null +++ b/webroot/css.php @@ -0,0 +1,102 @@ +<?php +/* SVN FILE: $Id: css.php 7883 2008-11-21 04:29:22Z mark_story $ */ +/** + * Short description for file. + * + * Long description for file + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.webroot + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7883 $ + * @modifiedby $LastChangedBy: mark_story $ + * @lastmodified $Date: 2008-11-20 20:29:22 -0800 (Thu, 20 Nov 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +if (!defined('CAKE_CORE_INCLUDE_PATH')) { + header('HTTP/1.1 404 Not Found'); + exit('File Not Found'); +} +/** + * Enter description here... + */ +if (!class_exists('File')) { + uses('file'); +} +/** + * Enter description here... + * + * @param unknown_type $path + * @param unknown_type $name + * @return unknown + */ + function make_clean_css($path, $name) { + App::import('Vendor', 'csspp' . DS . 'csspp'); + $data = file_get_contents($path); + $csspp = new csspp(); + $output = $csspp->compress($data); + $ratio = 100 - (round(strlen($output) / strlen($data), 3) * 100); + $output = " /* file: $name, ratio: $ratio% */ " . $output; + return $output; + } +/** + * Enter description here... + * + * @param unknown_type $path + * @param unknown_type $content + * @return unknown + */ + function write_css_cache($path, $content) { + if (!is_dir(dirname($path))) { + mkdir(dirname($path)); + } + $cache = new File($path); + return $cache->write($content); + } + + if (preg_match('|\.\.|', $url) || !preg_match('|^ccss/(.+)$|i', $url, $regs)) { + die('Wrong file name.'); + } + + $filename = 'css/' . $regs[1]; + $filepath = CSS . $regs[1]; + $cachepath = CACHE . 'css' . DS . str_replace(array('/','\\'), '-', $regs[1]); + + if (!file_exists($filepath)) { + die('Wrong file name.'); + } + + if (file_exists($cachepath)) { + $templateModified = filemtime($filepath); + $cacheModified = filemtime($cachepath); + + if ($templateModified > $cacheModified) { + $output = make_clean_css($filepath, $filename); + write_css_cache($cachepath, $output); + } else { + $output = file_get_contents($cachepath); + } + } else { + $output = make_clean_css($filepath, $filename); + write_css_cache($cachepath, $output); + $templateModified = time(); + } + + header("Date: " . date("D, j M Y G:i:s ", $templateModified) . 'GMT'); + header("Content-Type: text/css"); + header("Expires: " . gmdate("D, j M Y H:i:s", time() + DAY) . " GMT"); + header("Cache-Control: max-age=86400, must-revalidate"); // HTTP/1.1 + header("Pragma: cache"); // HTTP/1.0 + print $output; +?> \ No newline at end of file diff --git a/webroot/css/cake.generic.css b/webroot/css/cake.generic.css new file mode 100755 index 0000000..7ab98c4 --- /dev/null +++ b/webroot/css/cake.generic.css @@ -0,0 +1,480 @@ +/* SVN FILE: $Id: cake.generic.css 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.webroot.css + * @since CakePHP(tm) + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ + + +* { + margin:0; + padding:0; +} + +/* General Style Info */ +body { + background: #003d4c; + color: #fff; + font-family:'lucida grande',verdana,helvetica,arial,sans-serif; + font-size:90%; + margin: 0; +} +a { + background:#fff; + color: #003d4c; + text-decoration: underline; + font-weight: bold; +} +a:hover { + background:#fff; + color: #003d4c; + text-decoration:none; +} +a img { + border:none; +} +h1, h2, h3, h4 { + font-weight: normal; +} +h1 { + background:#fff; + color: #003d4c; + font-size: 100%; + margin: 0.1em 0; +} +h2 { + background:#fff; + color: #e32; + font-family:'Gill Sans','lucida grande',helvetica, arial, sans-serif; + font-size: 190%; + margin: 0.3em 0; + padding-top: 0.8em; +} +h3 { + color: #993; + font-family:'Gill Sans','lucida grande',helvetica, arial, sans-serif; + font-size: 165%; + padding-top: 1.5em; +} +h4 { + color: #993; + font-weight: normal; + padding-top: 0.5em; +} +ul, li { + margin: 0 12px; +} + +/* Layout */ +#container { + text-align: left; +} + +#header{ + padding: 10px 20px; +} +#header h1 { + background: #003d4c url('../img/cake.icon.gif') no-repeat left; + color: #fff; + padding: 0px 30px; +} +#header h1 a { + color: #fff; + background: #003d4c; + font-weight: normal; + text-decoration: none; +} +#header h1 a:hover { + color: #fff; + background: #003d4c; + text-decoration: underline; +} +#content{ + background: #fff; + clear: both; + color: #333; + padding: 10px 20px 40px 20px; + overflow: auto; +} +#footer { + clear: both; + padding: 6px 10px; + text-align: right; +} + +/* Tables */ +table { + background: #fff; + border:1px solid #ccc; + border-right:0; + clear: both; + color: #333; + margin-bottom: 10px; + width: 100%; +} +th { + background: #f2f2f2; + border:1px solid #bbb; + border-top: 1px solid #fff; + border-left: 1px solid #fff; + text-align: center; +} +th a { + background:#f2f2f2; + display: block; + padding: 2px 4px; + text-decoration: none; +} +th a:hover { + background: #ccc; + color: #333; + text-decoration: none; +} +table tr td { + background: #fff; + border-right: 1px solid #ccc; + padding: 4px; + text-align: center; + vertical-align: top; +} +table tr.altrow td { + background: #f4f4f4; +} +td.actions { + text-align: center; + white-space: nowrap; +} +td.actions a { + margin: 0px 6px; +} +.cake-sql-log table { + background: #f4f4f4; +} +.cake-sql-log td { + padding: 4px 8px; + text-align: left; +} + +/* Paging */ +div.paging { + background:#fff; + color: #ccc; + margin-bottom: 2em; +} +div.paging div.disabled { + color: #ddd; + display: inline; +} +div.paging span { +} +div.paging span.current { + color: #000; +} +div.paging span a { +} + +/* Scaffold View */ +dl { + line-height: 2em; + margin: 0em 0em; + width: 60%; +} +dl.altrow { + background: #f4f4f4; +} +dt { + font-weight: bold; + padding-left: 4px; + vertical-align: top; +} +dd { + margin-left: 10em; + margin-top: -2em; + vertical-align: top; +} + +/* Forms */ +form { + clear: both; + margin-right: 20px; + padding: 0; + width: 80%; +} +fieldset { + border: 1px solid #ccc; + margin-top: 30px; + padding: 16px 20px; +} +fieldset legend { + background:#fff; + color: #e32; + font-size: 160%; + font-weight: bold; +} +fieldset fieldset { + margin-top: 0px; + margin-bottom: 20px; + padding: 16px 10px; +} +fieldset fieldset legend { + font-size: 120%; + font-weight: normal; +} +fieldset fieldset div { + clear: left; + margin: 0 20px; +} +form div { + clear: both; + margin-bottom: 1em; + padding: .5em; + vertical-align: text-top; +} +form div.input { + color: #444; +} +form div.required { + color: #333; + font-weight: bold; +} +form div.submit { + border: 0; + clear: both; + margin-top: 10px; + margin-left: 140px; +} +label { + display: block; + font-size: 110%; + padding-right: 20px; +} +input, textarea { + clear: both; + font-size: 140%; + font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif; + padding: 2px; + width: 100%; +} +select { + clear: both; + font-size: 120%; + vertical-align: text-bottom; +} +select[multiple=multiple] { + width: 100%; +} +option { + font-size: 120%; + padding: 0 3px; +} +input[type=checkbox] { + clear: left; + float: left; + margin: 0px 6px 7px 2px; + width: auto; +} +input[type=radio] { + float:left; + width:auto; + margin: 0 3px 7px 0; +} +div.radio label { + margin: 0 0 6px 20px; +} +input[type=submit] { + display: inline; + font-size: 110%; + padding: 2px 5px; + width: auto; + vertical-align: bottom; +} + +/* Notices and Errors */ +div.message { + clear: both; + color: #900; + font-size: 140%; + font-weight: bold; + margin: 1em 0; +} +div.error-message { + clear: both; + color: #900; + font-weight: bold; +} +p.error { + background-color: #e32; + color: #fff; + font-family: Courier, monospace; + font-size: 120%; + line-height: 140%; + padding: 0.8em; + margin: 1em 0; +} +p.error em { + color: #000; + font-weight: normal; + line-height: 140%; +} +.notice { + background: #ffcc00; + color: #000; + display: block; + font-family: Courier, monospace; + font-size: 120%; + line-height: 140%; + padding: 0.8em; + margin: 1em 0; +} +.success { + background: green; + color: #fff; +} + +/* Actions */ +div.actions ul { + margin: 0px 0; + padding: 0; +} +div.actions li { + display: inline; + list-style-type: none; + line-height: 2em; + margin: 0 2em 0 0; + white-space: nowrap; +} +div.actions ul li a { + background:#fff; + color: #003d4c; + text-decoration: none; +} +div.actions ul li a:hover { + color: #333; + text-decoration: underline; +} + +/* Related */ +div.related { + clear: both; + display: block; +} + +/* Debugging */ +pre { + color: #000; + background: #f0f0f0; + padding: 1em; +} +pre.cake-debug { + background: #ffcc00; + font-size: 120%; + line-height: 140%; + margin-top: 1em; + overflow: auto; + position: relative; +} +div.cake-stack-trace { + background: #fff; + border: 4px dotted #ffcc00; + color: #333; + margin: 0px; + padding: 6px; + font-size: 120%; + line-height: 140%; + overflow: auto; + position: relative; +} +div.cake-code-dump pre { + position: relative; + overflow: auto; +} +div.cake-stack-trace pre, div.cake-code-dump pre { + color: #000; + background-color: #F0F0F0; + margin: 0px; + padding: 1em; + overflow: auto; +} +div.cake-code-dump pre, div.cake-code-dump pre code { + clear: both; + font-size: 12px; + line-height: 15px; + margin: 4px 2px; + padding: 4px; + overflow: auto; +} +div.cake-code-dump span.code-highlight { + background-color: #ff0; + padding: 4px; +} +div.code-coverage-results div.code-line { + padding-left:5px; + display:block; + margin-left:10px; +} +div.code-coverage-results div.uncovered span.content { + background:#ecc; +} +div.code-coverage-results div.covered span.content { + background:#cec; +} +div.code-coverage-results div.ignored span.content { + color:#aaa; +} +div.code-coverage-results span.line-num { + color:#666; + display:block; + float:left; + width:20px; + text-align:right; + margin-right:5px; +} +div.code-coverage-results span.line-num strong { + color:#666; +} +div.code-coverage-results div.start { + border:1px solid #aaa; + border-width:1px 1px 0px 1px; + margin-top:30px; + padding-top:5px; +} +div.code-coverage-results div.end { + border:1px solid #aaa; + border-width:0px 1px 1px 1px; + margin-bottom:30px; + padding-bottom:5px; +} +div.code-coverage-results div.realstart { + margin-top:0px; +} +div.code-coverage-results p.note { + color:#bbb; + padding:5px; + margin:5px 0 10px; + font-size:10px; +} +div.code-coverage-results span.result-bad { + color: #a00; +} +div.code-coverage-results span.result-ok { + color: #fa0; +} +div.code-coverage-results span.result-good { + color: #0a0; +} \ No newline at end of file diff --git a/webroot/favicon.ico b/webroot/favicon.ico new file mode 100755 index 0000000..b36e81f Binary files /dev/null and b/webroot/favicon.ico differ diff --git a/webroot/img/cake.icon.gif b/webroot/img/cake.icon.gif new file mode 100755 index 0000000..f29f72e Binary files /dev/null and b/webroot/img/cake.icon.gif differ diff --git a/webroot/img/cake.power.gif b/webroot/img/cake.power.gif new file mode 100755 index 0000000..8f8d570 Binary files /dev/null and b/webroot/img/cake.power.gif differ diff --git a/webroot/index.php b/webroot/index.php new file mode 100755 index 0000000..f8d1e02 --- /dev/null +++ b/webroot/index.php @@ -0,0 +1,93 @@ +<?php +/* SVN FILE: $Id: index.php 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * Short description for file. + * + * Long description for file + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.webroot + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * Use the DS to separate the directories in other defines + */ + if (!defined('DS')) { + define('DS', DIRECTORY_SEPARATOR); + } +/** + * These defines should only be edited if you have cake installed in + * a directory layout other than the way it is distributed. + * When using custom settings be sure to use the DS and do not add a trailing DS. + */ + +/** + * The full path to the directory which holds "app", WITHOUT a trailing DS. + * + */ + if (!defined('ROOT')) { + define('ROOT', dirname(dirname(dirname(__FILE__)))); + } +/** + * The actual directory name for the "app". + * + */ + if (!defined('APP_DIR')) { + define('APP_DIR', basename(dirname(dirname(__FILE__)))); + } +/** + * The absolute path to the "cake" directory, WITHOUT a trailing DS. + * + */ + if (!defined('CAKE_CORE_INCLUDE_PATH')) { + define('CAKE_CORE_INCLUDE_PATH', '/Volumes/Home/htdocs/cake/repo/branches/1.2.x.x'); + } + +/** + * Editing below this line should not be necessary. + * Change at your own risk. + * + */ + if (!defined('WEBROOT_DIR')) { + define('WEBROOT_DIR', basename(dirname(__FILE__))); + } + if (!defined('WWW_ROOT')) { + define('WWW_ROOT', dirname(__FILE__) . DS); + } + if (!defined('CORE_PATH')) { + if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) { + define('APP_PATH', null); + define('CORE_PATH', null); + } else { + define('APP_PATH', ROOT . DS . APP_DIR . DS); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); + } + } + if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { + trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); + } + if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') { + return; + } else { + $Dispatcher = new Dispatcher(); + $Dispatcher->dispatch($url); + } + if (Configure::read() > 0) { + echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->"; + } +?> \ No newline at end of file diff --git a/webroot/js/vendors.php b/webroot/js/vendors.php new file mode 100755 index 0000000..e04b923 --- /dev/null +++ b/webroot/js/vendors.php @@ -0,0 +1,42 @@ +<?php +/* SVN FILE: $Id: vendors.php 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * Short description for file. + * + * This file includes js vendor-files from /vendor/ directory if they need to + * be accessible to the public. + * + * PHP versions 4 and 5 + * + * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project + * @package cake + * @subpackage cake.app.webroot.js + * @since CakePHP(tm) v 0.2.9 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * Enter description here... + */ +if (isset($_GET['file'])) { + $file = $_GET['file']; + $pos = strpos($file, '..'); + if ($pos === false) { + if (is_file('../../vendors/javascript/'.$file) && (preg_match('/(\/.+)\\.js/', $file))) { + readfile('../../vendors/javascript/'.$file); + return; + } + } +} +header('HTTP/1.1 404 Not Found'); +?> \ No newline at end of file diff --git a/webroot/test.php b/webroot/test.php new file mode 100755 index 0000000..25d6c30 --- /dev/null +++ b/webroot/test.php @@ -0,0 +1,181 @@ +<?php +/* SVN FILE: $Id: test.php 7805 2008-10-30 17:30:26Z AD7six $ */ +/** + * Short description for file. + * + * Long description for file + * + * PHP versions 4 and 5 + * + * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite> + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) + * @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests + * @package cake + * @subpackage cake.cake.tests.libs + * @since CakePHP(tm) v 1.2.0.4433 + * @version $Revision: 7805 $ + * @modifiedby $LastChangedBy: AD7six $ + * @lastmodified $Date: 2008-10-30 10:30:26 -0700 (Thu, 30 Oct 2008) $ + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +error_reporting(E_ALL); +set_time_limit(0); +ini_set('memory_limit','128M'); +ini_set('display_errors', 1); +/** + * Use the DS to separate the directories in other defines + */ + if (!defined('DS')) { + define('DS', DIRECTORY_SEPARATOR); + } +/** + * These defines should only be edited if you have cake installed in + * a directory layout other than the way it is distributed. + * When using custom settings be sure to use the DS and do not add a trailing DS. + */ + +/** + * The full path to the directory which holds "app", WITHOUT a trailing DS. + * + */ + if (!defined('ROOT')) { + define('ROOT', dirname(dirname(dirname(__FILE__)))); + } +/** + * The actual directory name for the "app". + * + */ + if (!defined('APP_DIR')) { + define('APP_DIR', basename(dirname(dirname(__FILE__)))); + } +/** + * The absolute path to the "cake" directory, WITHOUT a trailing DS. + * + */ + if (!defined('CAKE_CORE_INCLUDE_PATH')) { + define('CAKE_CORE_INCLUDE_PATH', '/Volumes/Home/htdocs/cake/repo/branches/1.2.x.x'); + } + +/** + * Editing below this line should not be necessary. + * Change at your own risk. + * + */ +if (!defined('WEBROOT_DIR')) { + define('WEBROOT_DIR', basename(dirname(__FILE__))); +} +if (!defined('WWW_ROOT')) { + define('WWW_ROOT', dirname(__FILE__) . DS); +} +if (!defined('CORE_PATH')) { + if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) { + define('APP_PATH', null); + define('CORE_PATH', null); + } else { + define('APP_PATH', ROOT . DS . APP_DIR . DS); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); + } +} +if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { + trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); +} + +$corePath = Configure::corePaths('cake'); +if (isset($corePath[0])) { + define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS); +} else { + define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH); +} + +require_once CAKE_TESTS_LIB . 'test_manager.php'; + +if (Configure::read('debug') < 1) { + die(__('Debug setting does not allow access to this url.', true)); +} + +if (!isset($_SERVER['SERVER_NAME'])) { + $_SERVER['SERVER_NAME'] = ''; +} +if (empty( $_GET['output'])) { + $_GET['output'] = 'html'; +} +/** + * + * Used to determine output to display + */ +define('CAKE_TEST_OUTPUT_HTML', 1); +define('CAKE_TEST_OUTPUT_TEXT', 2); + +if (isset($_GET['output']) && $_GET['output'] == 'html') { + define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_HTML); +} else { + Debugger::output('txt'); + define('CAKE_TEST_OUTPUT', CAKE_TEST_OUTPUT_TEXT); +} + +if (!App::import('Vendor', 'simpletest' . DS . 'reporter')) { + CakePHPTestHeader(); + include CAKE_TESTS_LIB . 'simpletest.php'; + CakePHPTestSuiteFooter(); + exit(); +} + +$analyzeCodeCoverage = false; +if (isset($_GET['code_coverage'])) { + $analyzeCodeCoverage = true; + require_once CAKE_TESTS_LIB . 'code_coverage_manager.php'; + if (!extension_loaded('xdebug')) { + CakePHPTestHeader(); + include CAKE_TESTS_LIB . 'xdebug.php'; + CakePHPTestSuiteFooter(); + exit(); + } +} + +CakePHPTestHeader(); +CakePHPTestSuiteHeader(); +define('RUN_TEST_LINK', $_SERVER['PHP_SELF']); + +if (isset($_GET['group'])) { + if ('all' == $_GET['group']) { + TestManager::runAllTests(CakeTestsGetReporter()); + } else { + if ($analyzeCodeCoverage) { + CodeCoverageManager::start($_GET['group'], CakeTestsGetReporter()); + } + TestManager::runGroupTest(ucfirst($_GET['group']), CakeTestsGetReporter()); + if ($analyzeCodeCoverage) { + CodeCoverageManager::report(); + } + } + + CakePHPTestRunMore(); + CakePHPTestAnalyzeCodeCoverage(); +} elseif (isset($_GET['case'])) { + if ($analyzeCodeCoverage) { + CodeCoverageManager::start($_GET['case'], CakeTestsGetReporter()); + } + + TestManager::runTestCase($_GET['case'], CakeTestsGetReporter()); + + if ($analyzeCodeCoverage) { + CodeCoverageManager::report(); + } + + CakePHPTestRunMore(); + CakePHPTestAnalyzeCodeCoverage(); +} elseif (isset($_GET['show']) && $_GET['show'] == 'cases') { + CakePHPTestCaseList(); +} else { + CakePHPTestGroupTestList(); +} +CakePHPTestSuiteFooter(); +$output = ob_get_clean(); +echo $output; +?> \ No newline at end of file