d8c2fc51c66c1dabb2f36ccdce4ad53c34a9ed32
Author: Jonathan Bradley
Date: 2009-07-22 22:49:52 -0400
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d6fe828
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+plugins/debug_kit
+config/database.php
\ No newline at end of file
diff --git a/.htaccess b/.htaccess
new file mode 100644
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 100644
index 0000000..555e97c
--- /dev/null
+++ b/app_controller.php
@@ -0,0 +1,8 @@
+<?php
+
+class AppController extends Controller {
+
+ var $components = array('DebugKit.Toolbar');
+
+}
+?>
\ No newline at end of file
diff --git a/app_model.php b/app_model.php
new file mode 100644
index 0000000..5e25678
--- /dev/null
+++ b/app_model.php
@@ -0,0 +1,5 @@
+<?php
+
+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 100644
index 0000000..94a9a9a
--- /dev/null
+++ b/config/acl.ini.php
@@ -0,0 +1,74 @@
+;<?php die() ?>
+; SVN FILE: $Id: acl.ini.php 7945 2008-12-19 02:16:01Z gwoo $
+;/**
+; * 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: 7945 $
+; * @modifiedby $LastChangedBy: gwoo $
+; * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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 100644
index 0000000..2c89c74
--- /dev/null
+++ b/config/bootstrap.php
@@ -0,0 +1,44 @@
+<?php
+/* SVN FILE: $Id: bootstrap.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ * 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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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 100644
index 0000000..6db3b97
--- /dev/null
+++ b/config/core.php
@@ -0,0 +1,227 @@
+<?php
+/* SVN FILE: $Id: core.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ * 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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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', 'DYhG93b0qyJfIxfs2guVoUubWwvnia2G0FgaC9mi');
+/**
+ * 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 100644
index 0000000..8970394
--- /dev/null
+++ b/config/database.php.default
@@ -0,0 +1,30 @@
+<?php
+
+class DATABASE_CONFIG {
+
+ var $default = array(
+ 'driver' => 'mysql',
+ 'persistent' => false,
+ 'host' => 'localhost',
+ 'login' => 'root',
+ 'password' => '',
+ 'database' => 'dreamhost',
+ 'prefix' => '',
+ );
+
+ var $dreamhost = array(
+ 'datasource' => 'dreamhost',
+ 'key' => '' //
+ );
+
+ 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 100644
index 0000000..429c085
--- /dev/null
+++ b/config/inflections.php
@@ -0,0 +1,70 @@
+<?php
+/* SVN FILE: $Id: inflections.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ * 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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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 100644
index 0000000..44e4c40
--- /dev/null
+++ b/config/routes.php
@@ -0,0 +1,39 @@
+<?php
+/* SVN FILE: $Id: routes.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ * 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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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 100644
index 0000000..5f24eab
--- /dev/null
+++ b/config/sql/db_acl.php
@@ -0,0 +1,79 @@
+<?php
+/* SVN FILE: $Id: db_acl.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/*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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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 100644
index 0000000..080f06c
--- /dev/null
+++ b/config/sql/db_acl.sql
@@ -0,0 +1,40 @@
+# $Id: db_acl.sql 7945 2008-12-19 02:16:01Z gwoo $
+#
+# 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)
+);
diff --git a/config/sql/i18n.php b/config/sql/i18n.php
new file mode 100644
index 0000000..72233ff
--- /dev/null
+++ b/config/sql/i18n.php
@@ -0,0 +1,56 @@
+<?php
+/* SVN FILE: $Id: i18n.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/*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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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 100644
index 0000000..4660a5a
--- /dev/null
+++ b/config/sql/i18n.sql
@@ -0,0 +1,26 @@
+# $Id: i18n.sql 7945 2008-12-19 02:16:01Z gwoo $
+#
+# 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)
+);
diff --git a/config/sql/sessions.php b/config/sql/sessions.php
new file mode 100644
index 0000000..7f00a26
--- /dev/null
+++ b/config/sql/sessions.php
@@ -0,0 +1,53 @@
+<?php
+/* SVN FILE: $Id: sessions.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/*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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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 100644
index 0000000..23a1925
--- /dev/null
+++ b/config/sql/sessions.sql
@@ -0,0 +1,16 @@
+# $Id: sessions.sql 7118 2008-06-04 20:49:29Z gwoo $
+#
+# 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/components/empty b/controllers/components/empty
new file mode 100644
index 0000000..e69de29
diff --git a/controllers/crons_controller.php b/controllers/crons_controller.php
deleted file mode 100644
index 6a9fde4..0000000
--- a/controllers/crons_controller.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-class CronsController extends DreamhostAppController {
-
- var $name = 'crons';
- var $uses = array('Dreamhost.User', 'Dreamhost.Domain');
-
- function users() {
- $data = ClassRegistry::init('Dreamhost.DreamhostUser')->getList();
-
- $new = 0; $old = 0;
- foreach ($data as $key => $value) {
-
- $users['User'] = (array)$value;
- if ($this->User->check($users) == 0) {
- $this->User->create();
- $this->User->save($users);
- $new++;
- }
- else {
- $this->User->save($users['User']);
- $old++;
- }
- }
- $str = 'New users added ' . $new . ' and updated ' . $old . ' users </br>';
- echo '<pre>' . $str; die;
- }
-
- function domains() {
- $data = ClassRegistry::init('Dreamhost.DreamhostDomain')->active();
- $this->Domain->truncate();
- $new = 0; $old = 0;
- foreach ($data as $key => $value) {
- $domain['Domain'] = (array)$value;
- if (isset($value->user) && $value->user != null) {
- $domain['Domain']['dreamhost_user_id'] = $this->User->getUser($value->user);
- }
-
- if ($this->Domain->check($domain) == 0) {
- $this->Domain->create();
- $this->Domain->save($domain);
- $new++;
- }
- else {
- $this->Domain->save($domain['Domain']);
- $old++;
- }
- }
- $this->Session->setFlash('Database updated');
- $this->redirect(array('controller' => 'domains', 'action' => 'index'));
-
- }
-}
-?>
\ No newline at end of file
diff --git a/controllers/domains_controller.php b/controllers/domains_controller.php
index 12351e5..dacb288 100644
--- a/controllers/domains_controller.php
+++ b/controllers/domains_controller.php
@@ -1,23 +1,20 @@
<?php
-class DomainsController extends DreamhostAppController {
+class DomainsController extends AppController {
var $name = 'Domains';
- var $uses = array('Dreamhost.Domain');
-
- function beforeFilter() {
- parent::beforeFilter();
- }
+ var $uses = array('Domain', 'Registered');
function index() {
$data = $this->Domain->find('all', array(
- 'fields' => array('Domain.domain', 'Domain.path', 'User.username', 'Domain.home')
+ 'conditions' => array('Domain.type !=' => 'mysqldns'),
+ 'fields' => array('Domain.domain', 'Domain.path', 'Domain.home', 'User.username', 'User.password', 'User.shell', 'User.type')
));
$this->set(compact('data'));
}
function registered() {
- $data = $this->Domain->registered();
+ $data = $this->Registered->find('all');
$this->set(compact('data'));
}
}
diff --git a/controllers/setup_controller.php b/controllers/setup_controller.php
deleted file mode 100644
index cf27283..0000000
--- a/controllers/setup_controller.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-class SetupController extends DreamhostAppController {
-
- var $name = 'Setup';
- var $uses = array();
-
- function index() {
-
- }
-}
-?>
\ No newline at end of file
diff --git a/database.sql b/database.sql
deleted file mode 100644
index 95af560..0000000
--- a/database.sql
+++ /dev/null
@@ -1,33 +0,0 @@
-CREATE TABLE dreamhost_domains (
- id int(20) auto_increment NOT NULL,
- dreamhost_user_id int(20) NOT NULL,
- account_id varchar(255) NOT NULL,
- domain varchar(255) NOT NULL default '',
- home varchar(255) NOT NULL default '',
- type varchar(255) NOT NULL default '',
- unique_ip varchar(255) NOT NULL default '',
- hosting_type varchar(255) NOT NULL default '',
- path varchar(255) NOT NULL default '',
- outside_url varchar(255) NOT NULL default '',
- www_or_not varchar(255) NOT NULL default '',
- php varchar(255) NOT NULL default '',
- security varchar(255) NOT NULL default '',
- fastcgi varchar(255) NOT NULL default '',
- xcache varchar(255) NOT NULL default '',
- php_fcgid varchar(255) NOT NULL default '',
- PRIMARY KEY (id)
-);
-
-CREATE TABLE dreamhost_users (
- id int(20) auto_increment NOT NULL,
- account_id varchar(255) NOT NULL,
- username varchar(255) NOT NULL,
- type varchar(255) NOT NULL,
- shell varchar(255) NOT NULL,
- home varchar(255) NOT NULL,
- password varchar(255) NOT NULL,
- disk_used_mb varchar(255) NOT NULL,
- quota_mb varchar(255) NOT NULL,
- gecos varchar(255) NOT NULL,
- PRIMARY KEY (id)
-);
diff --git a/dreamhost_app_controller.php b/dreamhost_app_controller.php
deleted file mode 100644
index a7be2fc..0000000
--- a/dreamhost_app_controller.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-class DreamhostAppController extends AppController {
-
- var $helpers = array('Javascript', 'Form', 'Html');
-
- function bytes ($dsize) {
- if (strlen($dsize) <= 9 && strlen($dsize) >= 7) {
- $dsize = number_format($dsize / 1048576,1);
- return "$dsize MB";
- } elseif (strlen($dsize) >= 10) {
- $dsize = number_format($dsize / 1073741824,1);
- return "$dsize GB";
- } else {
- $dsize = number_format($dsize / 1024,1);
- return "$dsize KB";
- }
- }
-}
-?>
\ No newline at end of file
diff --git a/dreamhost_app_model.php b/dreamhost_app_model.php
deleted file mode 100644
index c8d3f83..0000000
--- a/dreamhost_app_model.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-class DreamhostAppModel extends AppModel {
-
- function __construct() {
- App::import(array('type' => 'File', 'name' => 'Dreamhost.DreamhostSource', 'file' => 'models'.DS.'datasources'.DS.'dreamhost_source.php'));
- $this->Dreamhost =& ConnectionManager::getDataSource('dreamhost');
-
- parent::__construct();
- }
-}
-?>
\ No newline at end of file
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..4e60b84
--- /dev/null
+++ b/index.php
@@ -0,0 +1,24 @@
+<?php
+/* SVN FILE: $Id: index.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ * 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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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/locale/eng/LC_MESSAGES/empty b/locale/eng/LC_MESSAGES/empty
new file mode 100644
index 0000000..e69de29
diff --git a/models/behaviors/empty b/models/behaviors/empty
new file mode 100644
index 0000000..e69de29
diff --git a/models/datasources/dreamhost_source.php b/models/datasources/dreamhost_source.php
deleted file mode 100644
index 71a8c84..0000000
--- a/models/datasources/dreamhost_source.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
-class DreamhostSource extends DataSource {
-
- var $description = "Dreamhost Data Source";
-
- var $url = 'https://api.dreamhost.com';
-
- var $params = array();
- var $database = null;
-
- function setProperties($arrProperties){
- $this->_set($arrProperties);
- }
-
- function __destruct() {
- parent::__destruct();
- }
-
- function __construct($config) {
- $this->debug = Configure::read() > 0;
- $this->fullDebug = Configure::read() > 1;
- parent::__construct($config);
- $this->params = array(
- 'format' => 'json',
- 'unique_id' => $this->uuid(),
- 'key' => $this->config['key']
- );
- }
-
- function list_domains() {
- return $this->connect('domain-list_domains');
- }
-
- function save($params) {
- return $this->connect('mysql-add_hostname', $params);
- }
-
- function delete($cmd, $params) {
- return $this->connect($cmd, $params);
- }
-
- function find($command) {
- return $this->connect($command);
- }
-
- function connect($cmd, $conditions = array()) {
- $this->params['cmd'] = $cmd;
- $this->params = array_merge($this->params, $conditions);
-
- $str = $this->getString($this->params);
-
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $this->url . '?' . substr($str, 0, -1));
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $result = curl_exec($ch);
- curl_close($ch);
- $json = json_decode($result);
- return $json->data;
- }
-
- function uuid($prefix = array()) {
- $chars = md5(microtime());
- $uuid = substr($chars,0,8) . '-';
- $uuid .= substr($chars,8,4) . '-';
- $uuid .= substr($chars,12,4) . '-';
- $uuid .= substr($chars,16,4) . '-';
- $uuid .= substr($chars,20,12);
- return $this->getString($prefix, 'string') . $uuid;
- }
-
- function getString($array = array(), $type = 'query') {
- $str = '';
- if ($type == 'query') {
- foreach ($array as $key => $value) {
- $str .= $key . '=' . $value . '&';
- }
- }
- if ($type == 'string') {
- foreach ($array as $key => $value) {
- $str .= $key . $value;
- }
- }
- return $str;
- }
-}
-?>
\ No newline at end of file
diff --git a/models/domain.php b/models/domain.php
index c3d1cc9..8527085 100644
--- a/models/domain.php
+++ b/models/domain.php
@@ -1,20 +1,19 @@
<?php
-class Domain extends DreamhostAppModel {
+class Domain extends AppModel {
var $name = 'Domain';
- var $useTable = 'dreamhost_domains';
var $belongsTo = array(
'User' => array(
- 'className' => 'Dreamhost.User',
- 'foreignKey' => 'dreamhost_user_id'
+ 'className' => 'User',
+ 'foreignKey' => 'user_id'
)
);
function check($data) {
return $this->find('count', array(
'conditions' => array(
- 'domain' => $data['Domain']['domain']
+ 'domain' => $data['Domain']['domain']
)
));
}
diff --git a/models/dreamhost_database.php b/models/dreamhost_database.php
deleted file mode 100644
index fb53923..0000000
--- a/models/dreamhost_database.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-class DreamhostDatabase extends DreamhostAppModel {
-
- var $name = 'DreamhostDatabase';
- var $useDbConfig = 'dreamhost';
- var $useTable = false;
- var $Dreamhost = null;
-
- function schema() {
- return array();
- }
-
- function save($params) {
- return $this->Dreamhost->connect('mysql-add_hostname', $params);
- }
-
- function delete($cmd, $params) {
- return $this->Dreamhost->connect($cmd, $params);
- }
-
- function find($command) {
- return $this->Dreamhost->connect($command);
- }
-}
-?>
\ No newline at end of file
diff --git a/models/dreamhost_domain.php b/models/dreamhost_domain.php
deleted file mode 100644
index 9d3eed4..0000000
--- a/models/dreamhost_domain.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-class DreamhostDomain extends DreamhostAppModel {
-
- var $name = 'DreamhostDomain';
- var $useDbConfig = 'dreamhost';
- var $useTable = false;
-
- function domains() {
- $results = $this->Dreamhost->list_domains();
- foreach ($results as $key => $value) {
- if ($this->Dreamhost->isDomain($value->domain) == true) {
- $domains[$value->domain] = $value->domain;
- }
- }
- ksort($domains);
- return $domains;
- }
-
- function active() {
- $results = $this->Dreamhost->list_domains();
- return $results;
- }
-
- function registered() {
- $results = $this->Dreamhost->find('domain-list_registrations');
- return $results;
- }
-
- function isDomain($domain) {
- $array = explode('.', $domain);
- if (count($array) == 3) return false;
- else return true;
- }
-}
-?>
\ No newline at end of file
diff --git a/models/dreamhost_user.php b/models/dreamhost_user.php
deleted file mode 100644
index a0a9bb9..0000000
--- a/models/dreamhost_user.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-class DreamhostUser extends DreamhostAppModel {
-
- var $name = 'DreamhostUser';
- var $useDbConfig = 'dreamhost';
- var $useTable = false;
-
- function getList() {
- $results = $this->Dreamhost->find('user-list_users ');
- return $results;
- }
-}
-?>
\ No newline at end of file
diff --git a/models/registered.php b/models/registered.php
new file mode 100644
index 0000000..0e422c1
--- /dev/null
+++ b/models/registered.php
@@ -0,0 +1,20 @@
+<?php
+
+class Registered extends AppModel {
+
+ var $name = 'Registered';
+ var $useTable = 'registered';
+
+ function check($data) {
+ return $this->find('count', array(
+ 'conditions' => array(
+ 'domain' => $data['Reserved']['domain']
+ )
+ ));
+ }
+
+ function truncate() {
+ $this->query('TRUNCATE TABLE ' . $this->useTable);
+ }
+}
+?>
\ No newline at end of file
diff --git a/models/user.php b/models/user.php
index da1f9e2..d42ac94 100644
--- a/models/user.php
+++ b/models/user.php
@@ -1,9 +1,8 @@
<?php
-class User extends DreamhostAppModel {
+class User extends AppModel {
var $name = 'User';
- var $useTable = 'dreamhost_users';
function check($data) {
return $this->find('count', array(
@@ -22,5 +21,9 @@ class User extends DreamhostAppModel {
));
return $user['User']['id'];
}
+
+ function truncate() {
+ $this->query('TRUNCATE TABLE ' . $this->useTable);
+ }
}
?>
\ No newline at end of file
diff --git a/plugins/api_generator b/plugins/api_generator
new file mode 160000
index 0000000..60287df
--- /dev/null
+++ b/plugins/api_generator
@@ -0,0 +1 @@
+Subproject commit 60287dfdaa3b217e1e27019ca593393288189835
diff --git a/plugins/dreamhost/controllers/crons_controller.php b/plugins/dreamhost/controllers/crons_controller.php
new file mode 100644
index 0000000..38ba64b
--- /dev/null
+++ b/plugins/dreamhost/controllers/crons_controller.php
@@ -0,0 +1,73 @@
+<?php
+
+class CronsController extends DreamhostAppController {
+
+ var $name = 'crons';
+ var $uses = array('User', 'Domain', 'Registered');
+
+ function users() {
+ $data = ClassRegistry::init('Dreamhost.DreamhostUser')->getList();
+
+ $new = 0; $old = 0;
+ foreach ($data as $key => $value) {
+
+ $users['User'] = (array)$value;
+ if ($this->User->check($users) == 0) {
+ $this->User->create();
+ $this->User->save($users);
+ $new++;
+ }
+ else {
+ $this->User->save($users['User']);
+ $old++;
+ }
+ }
+ $str = 'New users added ' . $new . ' and updated ' . $old . ' users </br>';
+ echo '<pre>' . $str; die;
+ }
+
+ function domains() {
+ $data = ClassRegistry::init('Dreamhost.DreamhostDomain')->active();
+ $this->Domain->truncate();
+ $new = 0; $old = 0;
+ foreach ($data as $key => $value) {
+ $domain['Domain'] = (array)$value;
+ if (isset($value->user) && $value->user != null) {
+ $domain['Domain']['user_id'] = $this->User->getUser($value->user);
+ }
+
+ if ($this->Domain->check($domain) == 0) {
+ $this->Domain->create();
+ $this->Domain->save($domain);
+ $new++;
+ }
+ else {
+ $this->Domain->save($domain['Domain']);
+ $old++;
+ }
+ }
+ $this->Session->setFlash('Database updated');
+ $this->redirect(array('controller' => 'domains', 'action' => 'index'));
+
+ }
+
+ function registered() {
+ $data = ClassRegistry::init('Dreamhost.DreamhostDomain')->registered();
+ $this->Registered->truncate();
+ foreach ($data as $key => $value) {
+ $registered['Registered'] = (array)$value;
+
+ if ($this->Registered->check($registered) == 0) {
+ $this->Registered->create();
+ $this->Registered->save($registered);
+ }
+ else {
+ $this->Reserved->save($registered['Registered']);
+ }
+ }
+ $this->Session->setFlash('Database updated');
+ $this->redirect(array('controller' => 'domains', 'action' => 'registered', 'plugin' => ''));
+
+ }
+}
+?>
\ No newline at end of file
diff --git a/plugins/dreamhost/controllers/setup_controller.php b/plugins/dreamhost/controllers/setup_controller.php
new file mode 100644
index 0000000..cf27283
--- /dev/null
+++ b/plugins/dreamhost/controllers/setup_controller.php
@@ -0,0 +1,12 @@
+<?php
+
+class SetupController extends DreamhostAppController {
+
+ var $name = 'Setup';
+ var $uses = array();
+
+ function index() {
+
+ }
+}
+?>
\ No newline at end of file
diff --git a/plugins/dreamhost/database.sql b/plugins/dreamhost/database.sql
new file mode 100644
index 0000000..dcdb1fb
--- /dev/null
+++ b/plugins/dreamhost/database.sql
@@ -0,0 +1,91 @@
+CREATE TABLE dreamhost_domains (
+ id int(20) auto_increment NOT NULL,
+ dreamhost_user_id int(20) NOT NULL,
+ account_id varchar(255) NOT NULL,
+ domain varchar(255) NOT NULL default '',
+ home varchar(255) NOT NULL default '',
+ type varchar(255) NOT NULL default '',
+ unique_ip varchar(255) NOT NULL default '',
+ hosting_type varchar(255) NOT NULL default '',
+ path varchar(255) NOT NULL default '',
+ outside_url varchar(255) NOT NULL default '',
+ www_or_not varchar(255) NOT NULL default '',
+ php varchar(255) NOT NULL default '',
+ security varchar(255) NOT NULL default '',
+ fastcgi varchar(255) NOT NULL default '',
+ xcache varchar(255) NOT NULL default '',
+ php_fcgid varchar(255) NOT NULL default '',
+ PRIMARY KEY (id)
+);
+
+CREATE TABLE dreamhost_users (
+ id int(20) auto_increment NOT NULL,
+ account_id varchar(255) NOT NULL,
+ username varchar(255) NOT NULL,
+ type varchar(255) NOT NULL,
+ shell varchar(255) NOT NULL,
+ home varchar(255) NOT NULL,
+ password varchar(255) NOT NULL,
+ disk_used_mb varchar(255) NOT NULL,
+ quota_mb varchar(255) NOT NULL,
+ gecos varchar(255) NOT NULL,
+ PRIMARY KEY (id)
+);
+
+CREATE TABLE domains (
+ registrant varchar(255) NOT NULL,
+ tech_zip varchar(255) NOT NULL,
+ registrant_zip varchar(255) NOT NULL,
+ tech_city varchar(255) NOT NULL,
+ registrant_fax varchar(255) NOT NULL,
+ registrant_street1 varchar(255) NOT NULL,
+ registrant_org varchar(255) NOT NULL,
+ billing_street1 varchar(255) NOT NULL,
+ admin_state varchar(255) NOT NULL,
+ billing_country varchar(255) NOT NULL,
+ admin_phone varchar(255) NOT NULL,
+ registrant_country varchar(255) NOT NULL,
+ tech_state varchar(255) NOT NULL,
+ registrant_email varchar(255) NOT NULL,
+ tech varchar(255) NOT NULL,
+ registrant_phone varchar(255) NOT NULL,
+ modified varchar(255) NOT NULL,
+ account_id varchar(255) NOT NULL,
+ tech_phone varchar(255) NOT NULL,
+ admin_org varchar(255) NOT NULL,
+ billing_org varchar(255) NOT NULL,
+ admin_zip varchar(255) NOT NULL,
+ registrant_street2 varchar(255) NOT NULL,
+ ns1 varchar(255) NOT NULL,
+ autorenew varchar(255) NOT NULL,
+ billing_fax varchar(255) NOT NULL,
+ billing_email varchar(255) NOT NULL,
+ billing_phone varchar(255) NOT NULL,
+ tech_email varchar(255) NOT NULL,
+ billing_street2 varchar(255) NOT NULL,
+ ns3 varchar(255) NOT NULL,
+ billing_zip varchar(255) NOT NULL,
+ tech_fax varchar(255) NOT NULL,
+ admin_country varchar(255) NOT NULL,
+ admin_email varchar(255) NOT NULL,
+ ns4 varchar(255) NOT NULL,
+ domain varchar(255) NOT NULL,
+ expired varchar(255) NOT NULL,
+ admin_street2 varchar(255) NOT NULL,
+ registrant_state varchar(255) NOT NULL,
+ admin_fax varchar(255) NOT NULL,
+ admin_city varchar(255) NOT NULL,
+ registrant_city varchar(255) NOT NULL,
+ locked varchar(255) NOT NULL,
+ admin_street1 varchar(255) NOT NULL,
+ ns2 varchar(255) NOT NULL,
+ tech_street2 varchar(255) NOT NULL,
+ billing_state varchar(255) NOT NULL,
+ tech_street1 varchar(255) NOT NULL,
+ tech_country varchar(255) NOT NULL,
+ tech_org varchar(255) NOT NULL,
+ created varchar(255) NOT NULL,
+ billing_city varchar(255) NOT NULL,
+ admin_registrant varchar(255) NOT NULL,
+ expires varchar(255) NOT NULL,
+ billing varchar(255) NOT NULL,
\ No newline at end of file
diff --git a/plugins/dreamhost/dreamhost_app_controller.php b/plugins/dreamhost/dreamhost_app_controller.php
new file mode 100644
index 0000000..a7be2fc
--- /dev/null
+++ b/plugins/dreamhost/dreamhost_app_controller.php
@@ -0,0 +1,20 @@
+<?php
+
+class DreamhostAppController extends AppController {
+
+ var $helpers = array('Javascript', 'Form', 'Html');
+
+ function bytes ($dsize) {
+ if (strlen($dsize) <= 9 && strlen($dsize) >= 7) {
+ $dsize = number_format($dsize / 1048576,1);
+ return "$dsize MB";
+ } elseif (strlen($dsize) >= 10) {
+ $dsize = number_format($dsize / 1073741824,1);
+ return "$dsize GB";
+ } else {
+ $dsize = number_format($dsize / 1024,1);
+ return "$dsize KB";
+ }
+ }
+}
+?>
\ No newline at end of file
diff --git a/plugins/dreamhost/dreamhost_app_model.php b/plugins/dreamhost/dreamhost_app_model.php
new file mode 100644
index 0000000..c8d3f83
--- /dev/null
+++ b/plugins/dreamhost/dreamhost_app_model.php
@@ -0,0 +1,12 @@
+<?php
+
+class DreamhostAppModel extends AppModel {
+
+ function __construct() {
+ App::import(array('type' => 'File', 'name' => 'Dreamhost.DreamhostSource', 'file' => 'models'.DS.'datasources'.DS.'dreamhost_source.php'));
+ $this->Dreamhost =& ConnectionManager::getDataSource('dreamhost');
+
+ parent::__construct();
+ }
+}
+?>
\ No newline at end of file
diff --git a/plugins/dreamhost/models/datasources/dreamhost_source.php b/plugins/dreamhost/models/datasources/dreamhost_source.php
new file mode 100644
index 0000000..71a8c84
--- /dev/null
+++ b/plugins/dreamhost/models/datasources/dreamhost_source.php
@@ -0,0 +1,88 @@
+<?php
+
+class DreamhostSource extends DataSource {
+
+ var $description = "Dreamhost Data Source";
+
+ var $url = 'https://api.dreamhost.com';
+
+ var $params = array();
+ var $database = null;
+
+ function setProperties($arrProperties){
+ $this->_set($arrProperties);
+ }
+
+ function __destruct() {
+ parent::__destruct();
+ }
+
+ function __construct($config) {
+ $this->debug = Configure::read() > 0;
+ $this->fullDebug = Configure::read() > 1;
+ parent::__construct($config);
+ $this->params = array(
+ 'format' => 'json',
+ 'unique_id' => $this->uuid(),
+ 'key' => $this->config['key']
+ );
+ }
+
+ function list_domains() {
+ return $this->connect('domain-list_domains');
+ }
+
+ function save($params) {
+ return $this->connect('mysql-add_hostname', $params);
+ }
+
+ function delete($cmd, $params) {
+ return $this->connect($cmd, $params);
+ }
+
+ function find($command) {
+ return $this->connect($command);
+ }
+
+ function connect($cmd, $conditions = array()) {
+ $this->params['cmd'] = $cmd;
+ $this->params = array_merge($this->params, $conditions);
+
+ $str = $this->getString($this->params);
+
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_URL, $this->url . '?' . substr($str, 0, -1));
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ $result = curl_exec($ch);
+ curl_close($ch);
+ $json = json_decode($result);
+ return $json->data;
+ }
+
+ function uuid($prefix = array()) {
+ $chars = md5(microtime());
+ $uuid = substr($chars,0,8) . '-';
+ $uuid .= substr($chars,8,4) . '-';
+ $uuid .= substr($chars,12,4) . '-';
+ $uuid .= substr($chars,16,4) . '-';
+ $uuid .= substr($chars,20,12);
+ return $this->getString($prefix, 'string') . $uuid;
+ }
+
+ function getString($array = array(), $type = 'query') {
+ $str = '';
+ if ($type == 'query') {
+ foreach ($array as $key => $value) {
+ $str .= $key . '=' . $value . '&';
+ }
+ }
+ if ($type == 'string') {
+ foreach ($array as $key => $value) {
+ $str .= $key . $value;
+ }
+ }
+ return $str;
+ }
+}
+?>
\ No newline at end of file
diff --git a/plugins/dreamhost/models/dreamhost_database.php b/plugins/dreamhost/models/dreamhost_database.php
new file mode 100644
index 0000000..fb53923
--- /dev/null
+++ b/plugins/dreamhost/models/dreamhost_database.php
@@ -0,0 +1,26 @@
+<?php
+
+class DreamhostDatabase extends DreamhostAppModel {
+
+ var $name = 'DreamhostDatabase';
+ var $useDbConfig = 'dreamhost';
+ var $useTable = false;
+ var $Dreamhost = null;
+
+ function schema() {
+ return array();
+ }
+
+ function save($params) {
+ return $this->Dreamhost->connect('mysql-add_hostname', $params);
+ }
+
+ function delete($cmd, $params) {
+ return $this->Dreamhost->connect($cmd, $params);
+ }
+
+ function find($command) {
+ return $this->Dreamhost->connect($command);
+ }
+}
+?>
\ No newline at end of file
diff --git a/plugins/dreamhost/models/dreamhost_domain.php b/plugins/dreamhost/models/dreamhost_domain.php
new file mode 100644
index 0000000..9d3eed4
--- /dev/null
+++ b/plugins/dreamhost/models/dreamhost_domain.php
@@ -0,0 +1,36 @@
+<?php
+
+class DreamhostDomain extends DreamhostAppModel {
+
+ var $name = 'DreamhostDomain';
+ var $useDbConfig = 'dreamhost';
+ var $useTable = false;
+
+ function domains() {
+ $results = $this->Dreamhost->list_domains();
+ foreach ($results as $key => $value) {
+ if ($this->Dreamhost->isDomain($value->domain) == true) {
+ $domains[$value->domain] = $value->domain;
+ }
+ }
+ ksort($domains);
+ return $domains;
+ }
+
+ function active() {
+ $results = $this->Dreamhost->list_domains();
+ return $results;
+ }
+
+ function registered() {
+ $results = $this->Dreamhost->find('domain-list_registrations');
+ return $results;
+ }
+
+ function isDomain($domain) {
+ $array = explode('.', $domain);
+ if (count($array) == 3) return false;
+ else return true;
+ }
+}
+?>
\ No newline at end of file
diff --git a/plugins/dreamhost/models/dreamhost_user.php b/plugins/dreamhost/models/dreamhost_user.php
new file mode 100644
index 0000000..a0a9bb9
--- /dev/null
+++ b/plugins/dreamhost/models/dreamhost_user.php
@@ -0,0 +1,14 @@
+<?php
+
+class DreamhostUser extends DreamhostAppModel {
+
+ var $name = 'DreamhostUser';
+ var $useDbConfig = 'dreamhost';
+ var $useTable = false;
+
+ function getList() {
+ $results = $this->Dreamhost->find('user-list_users ');
+ return $results;
+ }
+}
+?>
\ No newline at end of file
diff --git a/plugins/dreamhost/readme.textile b/plugins/dreamhost/readme.textile
new file mode 100644
index 0000000..573a2b3
--- /dev/null
+++ b/plugins/dreamhost/readme.textile
@@ -0,0 +1,21 @@
+h1. Control Panel from Dreamhost
+
+A CakePHP datasource for interacting with the Dreamhost's new API. http://wiki.dreamhost.com/API
+
+h2. Project Site
+
+http://thechaw.com/dreamhost_control_panel
+
+h3. Configuration
+
+Add to config/database.php
+
+ var $dreamhost = array(
+ 'datasource' => 'dreamhost',
+ 'key' => ''
+ );
+
+h3. Copyright
+
+Created by Jonathan Bradley <jonathan@sixninellc.com>
+
diff --git a/plugins/dreamhost/views/setup/index.ctp b/plugins/dreamhost/views/setup/index.ctp
new file mode 100644
index 0000000..6c4459d
--- /dev/null
+++ b/plugins/dreamhost/views/setup/index.ctp
@@ -0,0 +1,22 @@
+
+
+CREATE TABLE dreamhost_domains (
+ id int(20) auto_increment NOT NULL,
+ user_id int(20)
+ account_id varchar(255) NOT NULL default '',
+ domain varchar(255) NOT NULL default '',
+ home varchar(255) NOT NULL default '',
+ type varchar(255) NOT NULL default '',
+ unique_ip varchar(255) NOT NULL default '',
+ hosting_type varchar(255) NOT NULL default '',
+ user varchar(255) NOT NULL default '',
+ path varchar(255) NOT NULL default '',
+ outside_url varchar(255) NOT NULL default '',
+ www_or_not varchar(255) NOT NULL default '',
+ php varchar(255) NOT NULL default '',
+ security varchar(255) NOT NULL default '',
+ fastcgi varchar(255) NOT NULL default '',
+ xcache varchar(255) NOT NULL default '',
+ php_fcgid varchar(255) NOT NULL default '',
+ PRIMARY KEY (id)
+);
\ No newline at end of file
diff --git a/plugins/empty b/plugins/empty
new file mode 100644
index 0000000..e69de29
diff --git a/readme.textile b/readme.textile
deleted file mode 100644
index 573a2b3..0000000
--- a/readme.textile
+++ /dev/null
@@ -1,21 +0,0 @@
-h1. Control Panel from Dreamhost
-
-A CakePHP datasource for interacting with the Dreamhost's new API. http://wiki.dreamhost.com/API
-
-h2. Project Site
-
-http://thechaw.com/dreamhost_control_panel
-
-h3. Configuration
-
-Add to config/database.php
-
- var $dreamhost = array(
- 'datasource' => 'dreamhost',
- 'key' => ''
- );
-
-h3. Copyright
-
-Created by Jonathan Bradley <jonathan@sixninellc.com>
-
diff --git a/tests/cases/behaviors/empty b/tests/cases/behaviors/empty
new file mode 100644
index 0000000..e69de29
diff --git a/tests/cases/components/empty b/tests/cases/components/empty
new file mode 100644
index 0000000..e69de29
diff --git a/tests/cases/controllers/empty b/tests/cases/controllers/empty
new file mode 100644
index 0000000..e69de29
diff --git a/tests/cases/helpers/empty b/tests/cases/helpers/empty
new file mode 100644
index 0000000..e69de29
diff --git a/tests/cases/models/empty b/tests/cases/models/empty
new file mode 100644
index 0000000..e69de29
diff --git a/tests/fixtures/empty b/tests/fixtures/empty
new file mode 100644
index 0000000..e69de29
diff --git a/tests/groups/empty b/tests/groups/empty
new file mode 100644
index 0000000..e69de29
diff --git a/tmp/cache/models/empty b/tmp/cache/models/empty
new file mode 100644
index 0000000..e69de29
diff --git a/tmp/cache/persistent/empty b/tmp/cache/persistent/empty
new file mode 100644
index 0000000..e69de29
diff --git a/tmp/cache/views/empty b/tmp/cache/views/empty
new file mode 100644
index 0000000..e69de29
diff --git a/tmp/logs/debug.log b/tmp/logs/debug.log
new file mode 100644
index 0000000..b781225
--- /dev/null
+++ b/tmp/logs/debug.log
@@ -0,0 +1,57 @@
+2009-07-21 22:20:03 Debug: Notice (8): Undefined property: Domain::$config in [APP\plugins\dreamhost\dreamhost_app_model.php, line 6]
+2009-07-21 22:25:27 Debug: Notice (8): Undefined property: DreamhostSource::$Session in [APP\plugins\dreamhost\models\datasources\dreamhost_source.php, line 21]
+2009-07-21 22:26:27 Debug: Notice (8): Undefined variable: Session in [APP\plugins\dreamhost\models\datasources\dreamhost_source.php, line 21]
+2009-07-21 22:37:21 Debug: Notice (8): Undefined variable: config in [APP\plugins\dreamhost\models\datasources\dreamhost_source.php, line 22]
+2009-07-21 22:37:22 Debug: Notice (8): Trying to get property of non-object in [APP\plugins\dreamhost\models\datasources\dreamhost_source.php, line 59]
+2009-07-21 22:37:32 Debug: Notice (8): Undefined variable: config in [APP\plugins\dreamhost\models\datasources\dreamhost_source.php, line 22]
+2009-07-21 22:45:15 Debug: Notice (8): Undefined property: Domain::$Session in [APP\plugins\dreamhost\dreamhost_app_model.php, line 8]
+2009-07-21 22:47:04 Debug: Notice (8): Undefined variable: _SESSION in [CORE\cake\libs\session.php, line 319]
+2009-07-21 22:47:40 Debug: Notice (8): Undefined variable: _SESSION in [CORE\cake\libs\session.php, line 319]
+2009-07-21 22:47:57 Debug: Notice (8): Undefined variable: _SESSION in [CORE\cake\libs\session.php, line 319]
+2009-07-21 22:48:24 Debug: Notice (8): Undefined property: Domain::$Session in [APP\plugins\dreamhost\dreamhost_app_model.php, line 6]
+2009-07-21 22:49:41 Debug: Notice (8): Undefined variable: _SESSION in [APP\plugins\dreamhost\dreamhost_app_model.php, line 6]
+2009-07-21 22:54:50 Debug: Notice (8): Undefined property: Domain::$Session in [APP\plugins\dreamhost\dreamhost_app_model.php, line 6]
+2009-07-22 21:21:59 Debug: Notice (8): Undefined variable: list in [APP\plugins\dreamhost\controllers\crons_controller.php, line 14]
+2009-07-22 21:27:42 Debug: Notice (8): Undefined variable: list in [APP\plugins\dreamhost\controllers\crons_controller.php, line 15]
+2009-07-22 21:43:56 Debug: Notice (8): Undefined index: dreamhost in [APP\plugins\dreamhost\models\user.php, line 11]
+2009-07-22 21:52:26 Debug: Notice (8): Undefined property: stdClass::$username in [APP\plugins\dreamhost\controllers\crons_controller.php, line 33]
+2009-07-22 21:52:26 Debug: Notice (8): Undefined variable: data in [APP\plugins\dreamhost\models\user.php, line 19]
+2009-07-22 21:52:26 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1683]
+2009-07-22 21:52:26 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1687]
+2009-07-22 21:52:26 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1691]
+2009-07-22 21:52:26 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1692]
+2009-07-22 21:52:47 Debug: Notice (8): Undefined variable: data in [APP\plugins\dreamhost\models\user.php, line 19]
+2009-07-22 21:52:47 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1683]
+2009-07-22 21:52:47 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1687]
+2009-07-22 21:52:47 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1691]
+2009-07-22 21:52:47 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1692]
+2009-07-22 21:53:14 Debug: Notice (8): Undefined variable: data in [APP\plugins\dreamhost\models\user.php, line 19]
+2009-07-22 21:53:14 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1683]
+2009-07-22 21:53:14 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1687]
+2009-07-22 21:53:14 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1691]
+2009-07-22 21:53:14 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1692]
+2009-07-22 21:53:30 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1683]
+2009-07-22 21:53:30 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1687]
+2009-07-22 21:53:30 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1691]
+2009-07-22 21:53:30 Debug: Notice (8): Array to string conversion in [CORE\cake\libs\model\datasources\dbo_source.php, line 1692]
+2009-07-22 21:54:56 Debug: Notice (8): Undefined property: stdClass::$user in [APP\plugins\dreamhost\controllers\crons_controller.php, line 34]
+2009-07-22 21:55:19 Debug: Notice (8): Undefined property: CronsController::$domain in [APP\plugins\dreamhost\controllers\crons_controller.php, line 41]
+2009-07-22 21:55:36 Debug: Notice (8): Undefined index: domain in [APP\plugins\dreamhost\controllers\crons_controller.php, line 41]
+2009-07-22 21:55:36 Debug: Notice (8): Undefined property: stdClass::$user in [APP\plugins\dreamhost\controllers\crons_controller.php, line 34]
+2009-07-22 21:56:10 Debug: Notice (8): Undefined property: stdClass::$user in [APP\plugins\dreamhost\controllers\crons_controller.php, line 34]
+2009-07-22 21:57:11 Debug: Notice (8): Undefined property: stdClass::$user in [APP\plugins\dreamhost\controllers\crons_controller.php, line 34]
+2009-07-22 21:57:48 Debug: Notice (8): Undefined property: stdClass::$user in [APP\plugins\dreamhost\controllers\crons_controller.php, line 34]
+2009-07-22 21:58:20 Debug: Notice (8): Undefined property: stdClass::$user in [APP\plugins\dreamhost\controllers\crons_controller.php, line 34]
+2009-07-22 22:40:53 Debug: Notice (8): Undefined variable: str in [APP\plugins\dreamhost\controllers\crons_controller.php, line 57]
+2009-07-22 22:45:01 Debug: Notice (8): Undefined variable: str in [APP\plugins\dreamhost\controllers\crons_controller.php, line 57]
+2009-07-22 22:45:01 Debug: Notice (8): Undefined property: CronsController::$Reserved in [APP\plugins\dreamhost\controllers\crons_controller.php, line 64]
+2009-07-22 22:45:36 Debug: Notice (8): Undefined property: CronsController::$Reserved in [APP\plugins\dreamhost\controllers\crons_controller.php, line 60]
+2009-07-22 22:46:08 Debug: Notice (8): Undefined index: Reserved in [APP\models\registered.php, line 11]
+2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 14]
+2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 15]
+2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 16]
+2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 17]
+2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 18]
+2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 19]
+2009-07-22 22:47:08 Debug: Notice (8): Trying to get property of non-object in [APP\views\domains\registered.ctp, line 20]
+2009-07-22 22:48:25 Debug: Notice (8): Undefined index: Reserved in [APP\models\registered.php, line 11]
diff --git a/tmp/logs/empty b/tmp/logs/empty
new file mode 100644
index 0000000..e69de29
diff --git a/tmp/logs/error.log b/tmp/logs/error.log
new file mode 100644
index 0000000..63581f0
--- /dev/null
+++ b/tmp/logs/error.log
@@ -0,0 +1,27 @@
+2009-07-21 03:17:29 Error: Fatal Error (256): ConnectionManager::getDataSource - Non-existent data source default in [CORE\cake\libs\model\connection_manager.php, line 109]
+2009-07-21 03:27:21 Error: Fatal Error (256): ConnectionManager::getDataSource - Non-existent data source default in [CORE\cake\libs\model\connection_manager.php, line 109]
+2009-07-21 03:27:50 Error: Fatal Error (256): Unable to load DataSource file dreamhost_source.php in [CORE\cake\libs\model\connection_manager.php, line 179]
+2009-07-21 22:37:21 Warning: Warning (2): array_merge() [<a href='http://php.net/function.array-merge'>function.array-merge</a>]: Argument #3 is not an array in [CORE\cake\libs\model\datasources\datasource.php, line 379]
+2009-07-21 22:37:22 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\plugins\dreamhost\views\domains\index.ctp, line 9]
+2009-07-21 22:37:32 Warning: Warning (2): array_merge() [<a href='http://php.net/function.array-merge'>function.array-merge</a>]: Argument #3 is not an array in [CORE\cake\libs\model\datasources\datasource.php, line 379]
+2009-07-22 21:09:58 Error: Fatal Error (256): ConnectionManager::getDataSource - Non-existent data source dreamhost in [CORE\cake\libs\model\connection_manager.php, line 109]
+2009-07-22 21:13:10 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'fetch' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 21:14:13 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getList' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 21:15:25 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getList' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 21:15:57 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getList' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 21:16:21 Error: Fatal Error (256): Unable to load DataSource file dreamhost_source.php in [CORE\cake\libs\model\connection_manager.php, line 179]
+2009-07-22 21:52:26 Warning: Warning (2): preg_match() expects parameter 2 to be string, array given in [CORE\cake\libs\model\datasources\dbo_source.php, line 1680]
+2009-07-22 21:52:26 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'User.Array' in 'field list'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 21:52:47 Warning: Warning (2): preg_match() expects parameter 2 to be string, array given in [CORE\cake\libs\model\datasources\dbo_source.php, line 1680]
+2009-07-22 21:52:47 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'User.Array' in 'field list'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 21:53:14 Warning: Warning (2): preg_match() expects parameter 2 to be string, array given in [CORE\cake\libs\model\datasources\dbo_source.php, line 1680]
+2009-07-22 21:53:14 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'User.Array' in 'field list'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 21:53:30 Warning: Warning (2): preg_match() expects parameter 2 to be string, array given in [CORE\cake\libs\model\datasources\dbo_source.php, line 1680]
+2009-07-22 21:53:30 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'User.Array' in 'field list'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 21:54:56 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 22:03:40 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'Domain.name' in 'field list'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 22:04:20 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1054: Unknown column 'Domain.server' in 'field list'</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 22:46:35 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'registered' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 22:46:35 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\domains\registered.ctp, line 12]
+2009-07-22 22:46:36 Warning: Warning (512): <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'registered' at line 1</span> in [CORE\cake\libs\model\datasources\dbo_source.php, line 525]
+2009-07-22 22:46:36 Warning: Warning (2): Invalid argument supplied for foreach() in [APP\views\domains\registered.ctp, line 12]
diff --git a/tmp/sessions/empty b/tmp/sessions/empty
new file mode 100644
index 0000000..e69de29
diff --git a/tmp/tests/empty b/tmp/tests/empty
new file mode 100644
index 0000000..e69de29
diff --git a/vendors/shells/tasks/empty b/vendors/shells/tasks/empty
new file mode 100644
index 0000000..e69de29
diff --git a/vendors/shells/templates/empty b/vendors/shells/templates/empty
new file mode 100644
index 0000000..e69de29
diff --git a/views/crons/users.ctp b/views/crons/users.ctp
deleted file mode 100644
index e69de29..0000000
diff --git a/views/domains/index.ctp b/views/domains/index.ctp
index 19b5ecf..69121d2 100644
--- a/views/domains/index.ctp
+++ b/views/domains/index.ctp
@@ -1,18 +1,23 @@
<h2>Active Domains</h2>
-<? echo $html->link('Update From Dreamhost', array('controller' => 'crons', 'action' => 'domains')); ?>
+<? echo $html->link('Update From Dreamhost', array('controller' => 'crons', 'action' => 'domains', 'plugin' => 'dreamhost')); ?>
<table>
<tr>
<th>Name</th>
<th>Path</th>
- <th>User</th>
- <th>Server</th>
+ <th>FTP Address</th>
+ <th>Username</th>
+ <th>Password</th>
+ <th>Access</th>
</tr>
<?php foreach($data as $key => $value) { ?>
<tr>
<td><?php echo $value['Domain']['domain']; ?></td>
- <td><?php if (isset($value['Domain']['path'])) echo $value['Domain']['path']; ?></td>
- <td><?php if (isset($value['User']['username'])) echo $value['User']['username']; ?></td>
+ <td><?php echo $value['Domain']['path']; ?></td>
<td><?php echo $value['Domain']['home']; ?></td>
+ <td><?php echo $value['User']['username']; ?></td>
+ <td><?php echo $value['User']['password']; ?></td>
+ <td><?php echo $value['User']['shell'] . ' ' .$value['User']['type']; ?></td>
</tr>
<?php } ?>
-</table>
\ No newline at end of file
+</table>
+
diff --git a/views/domains/registered.ctp b/views/domains/registered.ctp
index 7b23a6e..4476825 100644
--- a/views/domains/registered.ctp
+++ b/views/domains/registered.ctp
@@ -1,4 +1,5 @@
<h2>Registered Domains</h2>
+<? echo $html->link('Update From Dreamhost', array('controller' => 'crons', 'action' => 'registered', 'plugin' => 'dreamhost')); ?>
<table>
<tr>
<th>Name</th>
@@ -11,13 +12,13 @@
</tr>
<?php foreach($data as $key => $value) { ?>
<tr>
- <td><?php echo $value->domain; ?></td>
- <td><?php echo $value->modified; ?></td>
- <td><?php echo $value->created; ?></td>
- <td><?php echo $value->expires; ?></td>
- <td><?php echo $value->ns1; ?></td>
- <td><?php echo $value->ns2; ?></td>
- <td><?php echo $value->ns3; ?></td>
+ <td><?php echo $value['Registered']['domain']; ?></td>
+ <td><?php echo $value['Registered']['modified']; ?></td>
+ <td><?php echo $value['Registered']['created']; ?></td>
+ <td><?php echo $value['Registered']['expires']; ?></td>
+ <td><?php echo $value['Registered']['ns1']; ?></td>
+ <td><?php echo $value['Registered']['ns2']; ?></td>
+ <td><?php echo $value['Registered']['ns3']; ?></td>
</tr>
<?php } ?>
</table>
\ No newline at end of file
diff --git a/views/errors/empty b/views/errors/empty
new file mode 100644
index 0000000..e69de29
diff --git a/views/helpers/css_menu.php b/views/helpers/css_menu.php
new file mode 100644
index 0000000..5e57683
--- /dev/null
+++ b/views/helpers/css_menu.php
@@ -0,0 +1,51 @@
+<?php
+/*
+ * CSS menu helper.
+ * Author: John Reeves.
+ */
+class CssMenuHelper extends Helper{
+
+ var $helpers = array('Html');
+
+ /*
+ * display a menu list.
+ * @arg $data: a nested associative array. The keys are the text that
+ * is displayed for that menu item. If the value is an array, it is
+ * treated as a sub menu, with the same format. Otherwise it is
+ * interpreted as a URL to be used for a link.
+ * @arg $type: the type of array. Can be right, left, or down.
+ */
+ function menu($data=array(), $type='right'){
+ global $cm_css_inc;
+ $out ='';
+ if($cm_css_inc != true){
+ $cm_css_inc = true;
+ $out .= $this->Html->css('css_menu');
+ }
+ return $this->output($out . $this->_cm_render($data, $type));
+ }
+
+ /* render a menu.
+ * This is a helper for recursion. The arguments are the
+ * same as for $this->menu().
+ */
+ function _cm_render($data=array(), $type='right'){
+ $out='';
+ if($data == array()) return;
+ if(is_array($data)){
+ $out .= "<ul class=\"css_menu cm_$type\">\n";
+ foreach($data as $key => $item){
+ if(is_array($item)){
+ $out .= '<li class="parent">'. $key. "\n";
+ $out .= $this->_cm_render($item, $type);
+ $out .= "</li>\n";
+ }else{
+ $out .= '<li><a href="'. $item. '">'. $key. '</a></li>'. "\n";
+ }
+ }
+ $out .= "</ul>\n";
+ }
+ return $out;
+ }
+}
+?>
\ No newline at end of file
diff --git a/views/helpers/html_cleaner.php b/views/helpers/html_cleaner.php
new file mode 100644
index 0000000..1ea1792
--- /dev/null
+++ b/views/helpers/html_cleaner.php
@@ -0,0 +1,205 @@
+<?php
+/**
+ * Created: Sat February 26 EDT 2008
+ *
+ * A class to balance out html tags in texts. Makes your texts ready for excerpts with the TextHelper's truncate function.
+ *
+ *
+ * Copyright (c) Debuggable Ltd. <http://debuggable.com>
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * Example:
+ * $bogusHtml = $htmlCleaner->clean($bogusHtml);
+ *
+ * It also replaces the single closed tags with their proper xhtml equivalents. Like <br> --> <br />
+ *
+ *
+ * @copyright Copyright (c) 2008, Debuggable Ltd. <http://debuggable.com>
+ * @link http://www.debuggable.com
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+class HtmlCleanerHelper extends Helper {
+/**
+ * An array of html tags that are singled ended: <img />
+ *
+ * @var string
+ */
+ var $singleTags = array('br', 'hr', 'img', 'input');
+/**
+ * An array of nestable html tags
+ *
+ * @var string
+ */
+ var $nestableTags = array('blockquote', 'div', 'span');
+/**
+ * Keeps track of which tags are in the text and thus need to be ended
+ *
+ * @var string
+ */
+ var $tagStack = array();
+/**
+ * String of closing tags that is appended to the text to close all unclosed open tags
+ *
+ * @var string
+ */
+ var $tagQueue = '';
+/**
+ * Resets stack and queue for a new processing
+ *
+ * @return void
+ */
+ function reset() {
+ $this->tagStack = array();
+ $this->tagQueue = '';
+ }
+/**
+ * Main function of this helper: clean and balance out html tags for a given string
+ *
+ * @param string $txt
+ * @return void
+ */
+ function clean($txt) {
+ $this->reset();
+ $result = '';
+
+ // just to cache the stack size and to prevent countless count()s
+ $stackSize = 0;
+
+ $txt = $this->takeOutComments($txt);
+ $txt = $this->clearUnclosedTagsAtEnd($txt);
+
+ while (preg_match("#<(/?\w*)\s*([^>]*)>#", $txt, $matches)) {
+ $result .= $this->tagQueue;
+ $this->tagQueue = '';
+
+ $tagPos = strpos($txt, $matches[0]);
+ $tagLength = strlen($matches[0]);
+ $isStartingTag = $matches[1][0] != "/";
+
+ if ($isStartingTag) {
+ $tag = low($matches[1]);
+
+ $isSingleTag = in_array($tag, $this->singleTags);
+ $tagNotEmpty = (substr($matches[2], -1) != '/' && $tag != '');
+
+ if ($tagNotEmpty && $isSingleTag) {
+ $matches[2] .= '/';
+ } else {
+ $isNoNestableTag = !in_array($tag, $this->nestableTags);
+ $isLastTag = ($stackSize > 0 && $this->tagStack[$stackSize - 1] == $tag);
+
+ if ($isNoNestableTag && $isLastTag) {
+ $this->tagQueue = '</'.array_pop($this->tagStack).'>';
+ }
+ $stackSize = array_push($this->tagStack, $tag);
+ }
+
+ $attributes = $matches[2];
+ if ($attributes) {
+ $attributes = ' ' . $attributes;
+ }
+ $tag = '<' . $tag . $attributes . '>';
+
+ if (!empty($this->tagQueue)) {
+ $this->tagQueue .= $tag;
+ $tag = '';
+ }
+ } else {
+ $tag = low(substr($matches[1], 1));
+
+ if ($stackSize <= 0) {
+ $tag = '';
+ } elseif ($this->tagStack[$stackSize - 1] == $tag) {
+ $tag = '</' . $tag . '>';
+ array_pop($this->tagStack);
+ $stackSize--;
+ } else {
+ for ($j = $stackSize - 1; $j >= 0; $j--) {
+ if ($this->tagStack[$j] == $tag) {
+ for ($k = $stackSize - 1; $k >= $j; $k--) {
+ $this->tagQueue .= '</' . array_pop($this->tagStack) . '>';
+ $stackSize--;
+ }
+ break;
+ }
+ }
+ $tag = '';
+ }
+ }
+ $result .= substr($txt, 0, $tagPos).$tag;
+ $txt = substr($txt, $tagPos + $tagLength);
+ }
+ $result .= $this->tagQueue . $txt;
+
+ $result = $this->addRemainingTags($result);
+ $result = $this->reAddComments($result);
+
+ return $result;
+ }
+/**
+ * Closes all tags in the text that are in the tag stack
+ *
+ * @param string $txt
+ * @return void
+ */
+ function addRemainingTags($txt) {
+ while ($x = array_pop($this->tagStack)) {
+ $txt .= '</' . $x . '>';
+ }
+ return $txt;
+ }
+/**
+ * Clean up shitty comments ;p No idea for a better name for this...
+ * It basically replaces comments temporarily with something else, so comments are not balanced out.
+ * Haha how would that work anyway?
+ *
+ * @param string $txt
+ * @return void
+ */
+ function takeOutComments($txt) {
+ $txt = r('< !--', '< !--', $txt);
+ $txt = preg_replace('#<([0-9]{1})#', '<$1', $txt);
+ return $txt;
+ }
+/**
+ * Re-replace the comments. : )
+ *
+ * @param string $txt
+ * @return void
+ */
+ function reAddComments($txt) {
+ $txt = r('< !--', '<!--', $txt);
+ $txt = r('< !--', '< !--', $txt);
+ return $txt;
+ }
+/**
+ * Well cleans the '<div ' in <span>lala</span><div '. This is useful when you use CakePHP's truncate function
+ * (from TextHelper) to build text excerpts, but use html in these texts. ; / Truncate could cut a html tag in two. ; /
+ *
+ * @param string $txt
+ * @return void
+ */
+ function clearUnclosedTagsAtEnd($txt) {
+ $tags = array('a', 'form', 'input', 'textarea', 'select', 'option', 'optiongroup', 'img',
+ 'table', 'th', 'tr', 'td', 'div', 'span', 'p', 'label', 'fieldset', 'legend',
+ 'style', 'ul', 'ol', 'li'
+ );
+
+ foreach ($tags as $tag) {
+ $length = strlen($tag);
+
+ for ($i = 0; $i < $length - 1; $i++) {
+ $current = substr($tag, 0, $i);
+ $pattern = '/^(.*?)<'.$current.'\s*([^>]*)$/im';
+ if (preg_match($pattern, $txt)) {
+ $txt = preg_replace($pattern, '$1', $txt);
+ }
+ }
+ }
+
+ return $txt;
+ }
+}
+?>
\ No newline at end of file
diff --git a/views/layouts/default.ctp b/views/layouts/default.ctp
new file mode 100644
index 0000000..fc95330
--- /dev/null
+++ b/views/layouts/default.ctp
@@ -0,0 +1,65 @@
+<?php
+/* SVN FILE: $Id: default.ctp 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ *
+ * 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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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>
+ Dreamhost Control Panel
+ <?php echo $title_for_layout; ?>
+ </title>
+ <?php
+ echo $html->meta('icon');
+
+ echo $html->css(array('reset','cake.generic','styles','menu'));
+
+ echo $scripts_for_layout;
+ ?>
+</head>
+<body>
+ <div id="container">
+ <div id="header">
+ <h1>Dreamhost Control Panel</h1>
+ </div>
+ <?php echo $this->element('menu'); ?>
+ <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/js/empty b/views/layouts/js/empty
new file mode 100644
index 0000000..e69de29
diff --git a/views/layouts/rss/empty b/views/layouts/rss/empty
new file mode 100644
index 0000000..e69de29
diff --git a/views/layouts/xml/empty b/views/layouts/xml/empty
new file mode 100644
index 0000000..e69de29
diff --git a/views/scaffolds/empty b/views/scaffolds/empty
new file mode 100644
index 0000000..e69de29
diff --git a/views/setup/index.ctp b/views/setup/index.ctp
deleted file mode 100644
index 6c4459d..0000000
--- a/views/setup/index.ctp
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-CREATE TABLE dreamhost_domains (
- id int(20) auto_increment NOT NULL,
- user_id int(20)
- account_id varchar(255) NOT NULL default '',
- domain varchar(255) NOT NULL default '',
- home varchar(255) NOT NULL default '',
- type varchar(255) NOT NULL default '',
- unique_ip varchar(255) NOT NULL default '',
- hosting_type varchar(255) NOT NULL default '',
- user varchar(255) NOT NULL default '',
- path varchar(255) NOT NULL default '',
- outside_url varchar(255) NOT NULL default '',
- www_or_not varchar(255) NOT NULL default '',
- php varchar(255) NOT NULL default '',
- security varchar(255) NOT NULL default '',
- fastcgi varchar(255) NOT NULL default '',
- xcache varchar(255) NOT NULL default '',
- php_fcgid varchar(255) NOT NULL default '',
- PRIMARY KEY (id)
-);
\ No newline at end of file
diff --git a/webroot/.htaccess b/webroot/.htaccess
new file mode 100644
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 100644
index 0000000..1bce609
--- /dev/null
+++ b/webroot/css.php
@@ -0,0 +1,102 @@
+<?php
+/* SVN FILE: $Id: css.php 8120 2009-03-19 20:25:10Z gwoo $ */
+/**
+ * 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: 8120 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2009-03-19 13:25:10 -0700 (Thu, 19 Mar 2009) $
+ * @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, d 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 100644
index 0000000..db12fbd
--- /dev/null
+++ b/webroot/css/cake.generic.css
@@ -0,0 +1,479 @@
+/* SVN FILE: $Id: cake.generic.css 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ *
+ * 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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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/css/menu.css b/webroot/css/menu.css
new file mode 100644
index 0000000..dc88f31
--- /dev/null
+++ b/webroot/css/menu.css
@@ -0,0 +1,82 @@
+
+ul#navmenu-h li, ul#navmenu-h li ul li {
+margin:0;
+}
+
+ul#navmenu-h { background: #8b8b8b; margin: 0; padding: 0; list-style: none; position: relative; }
+
+ul#navmenu-h ul {
+ width: 160px; /* Sub Menu Width */
+ margin: 0;
+ list-style: none;
+ display: none;
+ position: absolute;
+ top: 100%;
+ left: 0;
+ background: #8b8b8b;
+}
+
+ul#navmenu-h ul ul,ul#navmenu-h ul ul ul { top: 0; left: 100%; }
+
+ul#navmenu-h li { float: left; display: inline; position: relative; }
+ul#navmenu-h ul li { width: 100%; display: block; }
+
+/* Root Menu */
+ul#navmenu-h a {
+ padding: 10px;
+ float: left;
+ display: block;
+ background: #8b8b8b;
+ color: #fff;
+ font: bold 11px Arial, sans-serif;
+ text-decoration: none;
+ height: 1%;
+}
+
+/* Root Menu Hover Persistence */
+ul#navmenu-h a:hover,ul#navmenu-h li:hover a,ul#navmenu-h li.iehover a {
+ background: #ddd;
+ color: #333;
+}
+
+/* 2nd Menu */
+ul#navmenu-h li:hover li a,ul#navmenu-h li.iehover li a {
+ float: none;
+ background: #6a6969;
+ color: #fff;
+}
+
+/* 2nd Menu Hover Persistence */
+ul#navmenu-h li:hover li a:hover,ul#navmenu-h li:hover li:hover a,ul#navmenu-h li.iehover li a:hover,ul#navmenu-h li.iehover li.iehover a {
+ background: #ddd;
+ color: #333;
+}
+
+/* 3rd Menu */
+ul#navmenu-h li:hover li:hover li a,ul#navmenu-h li.iehover li.iehover li a {
+ background: #6a6969;
+ color: #fff;
+}
+
+/* 3rd Menu Hover Persistence */
+ul#navmenu-h li:hover li:hover li a:hover,ul#navmenu-h li:hover li:hover li:hover a,ul#navmenu-h li.iehover li.iehover li a:hover,ul#navmenu-h li.iehover li.iehover li.iehover a {
+ background: #ddd;
+ color: #333;
+}
+
+/* 4th Menu */
+ul#navmenu-h li:hover li:hover li:hover li a,ul#navmenu-h li.iehover li.iehover li.iehover li a {
+ background: #6a6969;
+ color: #fff;
+}
+
+/* 4th Menu Hover */
+ul#navmenu-h li:hover li:hover li:hover li a:hover,ul#navmenu-h li.iehover li.iehover li.iehover li a:hover {
+ background: #ddd;
+ color: #fff;
+}
+
+/* Hover Function - Do Not Move */
+ul#navmenu-h li:hover ul ul,ul#navmenu-h li:hover ul ul ul,ul#navmenu-h li.iehover ul ul,ul#navmenu-h li.iehover ul ul ul { display: none; }
+ul#navmenu-h li:hover ul,ul#navmenu-h ul li:hover ul,ul#navmenu-h ul ul li:hover ul,ul#navmenu-h li.iehover ul,ul#navmenu-h ul li.iehover ul,ul#navmenu-h ul ul li.iehover ul { display: block; }
+
diff --git a/webroot/css/reset.css b/webroot/css/reset.css
new file mode 100644
index 0000000..f8a2988
--- /dev/null
+++ b/webroot/css/reset.css
@@ -0,0 +1,9 @@
+/* reset */
+html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
+body {line-height:1.5;}
+table {border-collapse:separate;border-spacing:0;}
+caption, th, td {text-align:left;font-weight:normal;}
+table, td, th {vertical-align:middle;}
+blockquote:before, blockquote:after, q:before, q:after {content:"";}
+blockquote, q {quotes:"" "";}
+a img {border:none;}
\ No newline at end of file
diff --git a/webroot/css/styles.css b/webroot/css/styles.css
new file mode 100644
index 0000000..cbe1c80
--- /dev/null
+++ b/webroot/css/styles.css
@@ -0,0 +1,30 @@
+body {
+ background: #ccc;
+}
+
+#header {
+ padding: 4px 0;
+}
+
+#header h1 {
+ background: inherit;
+ margin: 0;
+ font-weight: bold;
+ color: #000;
+ padding: 3px 0 0 10px;
+}
+
+a, a:hover {
+ background: transparent;
+ text-decoration: none;
+}
+
+#menu{
+ display: block;
+ width: 100%;
+ background: #8b8b8b;
+ clear: both;
+ margin: 0;
+ padding: 0;
+ height: 34px;
+}
\ No newline at end of file
diff --git a/webroot/favicon.ico b/webroot/favicon.ico
new file mode 100644
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 100644
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 100644
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 100644
index 0000000..3f5a255
--- /dev/null
+++ b/webroot/index.php
@@ -0,0 +1,93 @@
+<?php
+/* SVN FILE: $Id: index.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ * 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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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', ROOT);
+ }
+
+/**
+ * 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 100644
index 0000000..a6fcf32
--- /dev/null
+++ b/webroot/js/vendors.php
@@ -0,0 +1,42 @@
+<?php
+/* SVN FILE: $Id: vendors.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ * 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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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 100644
index 0000000..264d780
--- /dev/null
+++ b/webroot/test.php
@@ -0,0 +1,181 @@
+<?php
+/* SVN FILE: $Id: test.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ * 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: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 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', ROOT);
+ }
+
+/**
+ * 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
