Merging fixes into 1.x.x.x branched code:

Revision: [2802]




git-svn-id: https://svn.cakephp.org/repo/branches/1.x.x.x@2805 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2006-05-09 02:15:47 +00:00
parent f5a4a58758
commit 5e268e0805
57 changed files with 3676 additions and 1788 deletions

View file

@ -6,4 +6,4 @@
// +---------------------------------------------------------------------------------------------------+ //
///////////////////////////////////////////////////////////////////////////////////////////////////////////
1.0.1.2767
1.1.2.2802

View file

@ -0,0 +1,264 @@
*{
margin:0;
padding:0;
}
body{
font-family:verdana,helvetica,arial,sans-serif;
font-size:12px;
text-align:center;
color:#fff;
background:#003d4c;
}
/*
* General Style Info
*/
a{
color:#003d4c;
text-decoration:none;
}
a:hover{
color:#003d4c;
text-decoration:underline;
}
a img{
border:none;
}
h1, h2,h3{
font-family:'Gill Sans';
font-size:28px;
font-weight:normal;
}
h1{
padding:0.5em 0;
color:#003d4c;
}
em {
font-size: 12px;
}
h2{
padding-top:0.15em;
margin:0.3em 0;
color:#e32;
}
h3{
font-size:18px;
padding-top:0.5em;
color:#003d4c;
}
h4{
color:#ff9966;
font-size:20px;
padding-top:0.5em;
font-weight:normal;
}
blockquote{
padding: 10px;
padding-left: 20px;
padding-right: 20px;
}
#content ol, #content ul{
margin:0 1em;
padding:0 2em;
}
/*
* Layout
*/
#container{
text-align:left;
margin-left:0px;
}
#header{
height:200px;
background:#003d4c;
}
#header h1{
color:#fff;
font-family: 'Gill Sans';
font-size: 45px;
font-weight:normal;
}
#header h1.logo {
float:left;
}
#header h1.logo a{
display:block;
width:226px;
height:176px;
background: transparent url('images/logo.gif') no-repeat top;
}
#header h1.logo a:hover{
background:url('images/logo.gif') no-repeat bottom;
}
#content{
width: auto;
min-width: 860px;
min-height: 720px;
padding:15px 20px 50px 20px;
margin: 0px 10px 0px 40px;
color:#333;
background:#fff ;
border-right: 6px solid #222;
}
/*
* Navigation
*/
#navigation{
float:left;
height: 146px;
width:710px;
background:#003d4c url(images/nav_bg.gif) no-repeat;
padding-left: 20px;
}
#navigation ul{
}
#navigation ul li{
list-style-type:none;
display:inline;
}
#navigation ul li a{
font-weight:bold;
display:block;
float:left;
color:#000;
}
#navigation ul li a span{
display:block;
margin-right:12px;
padding:10px 6px 9px 9px;
}
#navigation ul li.active a span{
padding:10px 6px 9px 9px;
}
#navigation ul li a:hover, #navigation ul li.active a{
background:url(images/nav_item_bg.gif) no-repeat bottom right;
}
#navigation ul li a:hover span, #navigation ul li.active a span{
background:url(images/nav_item_bg.gif) no-repeat bottom left;
}
#footer {
color: #fff;
background-color: #003d4c;
padding: 4px 10px;
text-align: right;
}
#footer a{
color: #fff;
}
.left {
float:left;
}
.right {
float:right;
}
.clear {
clear:both;
height: 0px;
line-height: 0px;
}
/* tables */
table {
width: 100%;
border: 1px solid #003d4c;
color:#333;
background-color: #fff;
clear:both;
padding: 0;
margin: 0 0 2em 0;
white-space: normal;
}
th {
background-color: #ccc;
border-top: 1px solid #fff;
border-left: 1px solid #fff;
border-right: 1px solid #003d4c;
border-bottom: 1px solid #003d4c;
text-align: center;
padding:1px;
}
table tr td {
border-right: 1px solid #ccc;
padding:4px 4px;
vertical-align:top;
text-align: center;
}
table tr.altRow td {
background: #f4f4f4;
}
/* scaffold show */
div.related {
clear:both;
display:block;
}
dl {
line-height:2em;
margin:1em;
float:left;
width: 400px;
}
dt {
font-weight: bold;
vertical-align:top;
}
dd {
margin-left:10em;
margin-top:-2em;
vertical-align:top;
}
/* scaffold buttons */
.notice {
color: #DB8101;
background-color: #ddd;
display: block;
padding: 1em;
}
.tip {
color: #DB8101;
background-color: #ddd;
display: block;
padding: 1em;
}
/* action links */
ul.actions {
float:left;
margin-left: 10px;
width: 200px;
}

View file

@ -1,195 +0,0 @@
/* CSS Document */
@import url("cake.forms.css");
* {
padding:0;
margin:0;
}
body {
font: 76% Verdana, Arial, Sans-serif;
color: #333;
}
img {
border:0;
}
#wrapper {
text-align:left;
}
#header {
height: 101px;
background: #0D5087 url(../img/cake.header_bg.png) repeat-x left top;
border-bottom: 1px solid #000;
}
#content {
min-height:400px;
background-color: #fff;
padding:2em 4em;
}
#footer {
text-align:center;
padding:1em 0;
font-size:smaller;
border-top:1px solid #333;
background-color: #063260;
color:#fff;
line-height:1.5;
}
#footer a {
color:#fff;
}
h1, h2, h3, h4 {
padding-bottom:0.5em;
}
h1 {
font-family:"Trebuchet MS",Verdana,Arial,Sans-serif;
}
h1, a {
color:#DB8101;
}
h1 em, a em {
color:#008BCC;
font-style: normal;
}
ul.colored a em
h2 {
font-style: italic;
font-weight: bold;
color:#666;
}
a:hover, a:hover em {
color:#A22424;
text-decoration:none;
}
#content p, #content ul, #content ol {
line-height:1.5;
padding-bottom:1em;
}
ul, ol {
margin-left:3em;
}
/* tables */
table {
width: 100%;
background-color: #fff;
border: 1px solid #333;
clear:both;
margin: 0 0 2em 0;
white-space: normal;
}
th {
background-color: #ccc;
border-top: 1px solid #fff;
border-right: 1px solid #666;
border-bottom: 1px solid #666;
text-align: center;
padding:3px;
}
table tr td {
border-right: 1px solid #ccc;
padding:4px 4px;
vertical-align:top;
text-align: center;
}
table tr.altRow td {
background: #f4f4f4;
}
/* scaffold show */
div.related {
clear:both;
display:block;
}
dl {
line-height:2em;
margin:1em;
}
dt {
font-weight: bold;
vertical-align:top;
}
dd {
margin-left:10em;
margin-top:-2em;
vertical-align:top;
}
/* scaffold buttons */
.notice {
color: #DB8101;
background-color: #ddd;
display: block;
padding: 1em;
}
.tip {
color: #DB8101;
background-color: #ddd;
display: block;
padding: 1em;
}
ul.actions {
list-style: none;
text-align:left;
margin:2em 0;
padding: 0;
}
ul.actions li {
margin-left:1em;
list-style: none;
display: inline;
}
ul.actions li a, ul.actions li input {
padding: 2px 12px;
color: #DB8101;
background-color:#ccc;
text-decoration: none;
border: 1px solid #666;
line-height: 24px;
font-weight: bold;
text-align:center;
text-decoration: none;
}
ul.actions li a:hover {
color: #DB8101;
background-color:#fff;
text-decoration: none;
}
td.listactions {
width: 14em;
text-align: center;
white-space: nowrap;
}
td.listactions a {
padding: 0px 8px;
text-align:center;
font-weight: bold;
color: #DB8101;
background-color:#ccc;
text-decoration: none;
border: 1px solid #666;
white-space: nowrap;
}
td.listactions a:hover {
color: #fff;
background-color:#DB8101;
}
/* index links */
ul.colored a {
}
ul.colored a em {
}
a {
font-weight: bold;
}

View file

@ -1,9 +0,0 @@
form div,
form div label.labelCheckbox, form div label.labelRadio,
form div small,
form div label.labelCheckbox, form div label.labelRadio, label.labelCheckbox, label.labelRadio {
height: expression('1%');
}
form div fieldset input.inputText, form div fieldset input.inputPassword, form div fieldset input.inputFile, form div fieldset textarea.inputTextarea {
margin: expression('0px 0px 0px -124px');
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

BIN
app/webroot/css/images/logo.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
app/webroot/css/images/nav_bg.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View file

@ -356,7 +356,7 @@ function listClasses($path)
}
}
closedir($dir);
return $classes;
return $classes;
}
/**
@ -499,11 +499,11 @@ if (!function_exists('sortByKey'))
if ($order == 'asc')
{
asort($sa, $type);
asort($sa, $type);
}
else
{
arsort($sa, $type);
arsort($sa, $type);
}
foreach ($sa as $key=>$val)
@ -608,11 +608,11 @@ function aa()
{
if ($l+1 < count($args))
{
$a[$args[$l]] = $args[$l+1];
$a[$args[$l]] = $args[$l+1];
}
else
{
$a[$args[$l]] = null;
$a[$args[$l]] = null;
}
$l++;
}
@ -729,7 +729,7 @@ function am ()
{
if (!is_array($a))
{
$a = array($a);
$a = array($a);
}
$r = array_merge($r, $a);
}
@ -1141,4 +1141,51 @@ function convertSlash($string)
return $string;
}
/**
* chmod recursively on a directory
*
* @param string $path
* @param int $mode
* @return boolean
*/
function chmodr($path, $mode = 0755)
{
if (!is_dir($path))
{
return chmod($path, $mode);
}
$dir = opendir($path);
while ($file = readdir($dir))
{
if($file != '.' && $file != '..')
{
$fullpath = $path.'/'.$file;
if(!is_dir($fullpath))
{
if (!chmod($fullpath, $mode))
{
return false;
}
}
else
{
if (!chmodr($fullpath, $mode))
{
return false;
}
}
}
}
closedir($dir);
if(chmod($path, $mode))
{
return true;
}
else
{
return false;
}
}
?>

View file

@ -62,7 +62,7 @@ if (empty($uri) && defined('BASE_URL'))
if (strpos($uri, 'index.php') !== false)
{
$uri = r ('?', '', $uri);
$elements = explode('/index.php', $uri);
$elements = explode('/index.php', $uri);
}
else
{

View file

@ -410,8 +410,9 @@ class Dispatcher extends Object
$docRoot = env('DOCUMENT_ROOT');
$scriptName = env('PHP_SELF');
$r = null;
$appDirName = str_replace('/','\/',preg_quote(APP_DIR));
if (preg_match('/'.APP_DIR.'\\'.DS.WEBROOT_DIR.'/', $docRoot))
if (preg_match('/'.$appDirName.'\\'.DS.WEBROOT_DIR.'/', $docRoot))
{
$this->webroot = '/';
if (preg_match('/^(.*)\/index\.php$/', $scriptName, $r))
@ -429,7 +430,7 @@ class Dispatcher extends Object
$webroot = setUri();
$htaccess = preg_replace('/(?:'.APP_DIR.'(.*)|index\\.php(.*))/i', '', $webroot).APP_DIR.'/'.WEBROOT_DIR.'/';
}
if (preg_match('/^(.*)\\/'.APP_DIR.'\\/'.WEBROOT_DIR.'\\/index\\.php$/', $scriptName, $regs))
if (preg_match('/^(.*)\\/'.$appDirName.'\\/'.WEBROOT_DIR.'\\/index\\.php$/', $scriptName, $regs))
{
if(APP_DIR === 'app')
{

View file

@ -265,20 +265,25 @@ class DB_ACL extends AclBase
trigger_error('Null id provided in DB_ACL::get'.$object, E_USER_WARNING);
return null;
}
$obj = new $obj;
$obj = new $object;
if (is_numeric($id))
{
$conditions = array('Aco.user_id' => $id);
$key = 'user_id';
if ($object == 'Aco')
{
$key = 'object_id';
}
$conditions = array($object.'.'.$key => $id);
}
else
{
$conditions = array('Aco.alias' => $id);
$conditions = array($object.'.alias' => $id);
}
$tmp = $obj->find($conditions);
$aco->setId($tmp['Aco']['id']);
return $aco;
$obj->id = $tmp[$object]['id'];
return $obj;
}
/**

View file

@ -65,10 +65,10 @@ class AclNode extends AppModel
if($parent_id == null || $parent_id === 0)
{
$parent = $this->find(null, "MAX(rght)", null, null, 0);
$parent['lft'] = $parent[0]['MAX(rght)'];
$parent = $this->find(null, 'MAX(rght) as rght', null, -1);
$parent['lft'] = $parent[0]['rght'];
if($parent[0]['MAX(rght)'] == null)
if($parent[0]['rght'] == null || !$parent[0]['rght'])
{
// The tree is empty
$parent['lft'] = 0;
@ -141,7 +141,7 @@ class AclNode extends AppModel
if($parent_id == null)
{
$newParent = $this->find(null, "MAX(rght) as lft", null, 0);
$newParent = $this->find(null, 'MAX(rght) as lft', null, -1);
$newParent = $newParent[0];
$newParent['rght'] = $newParent['lft'];
}

View file

@ -52,15 +52,15 @@ class RequestHandlerComponent extends Object
var $disableStartup = false;
var $__requestContent = array(
'js' => 'text/javascript',
'css' => 'text/css',
'html' => 'text/html',
'form' => 'application/x-www-form-urlencoded',
'file' => 'multipart/form-data',
'xhtml' => array('application/xhtml+xml', 'application/xhtml', 'text/xhtml'),
'xml' => array('application/xml', 'text/xml'),
'rss' => 'application/rss+xml',
'atom' => 'application/atom+xml'
'js' => 'text/javascript',
'css' => 'text/css',
'html' => 'text/html',
'form' => 'application/x-www-form-urlencoded',
'file' => 'multipart/form-data',
'xhtml' => array('application/xhtml+xml', 'application/xhtml', 'text/xhtml'),
'xml' => array('application/xml', 'text/xml'),
'rss' => 'application/rss+xml',
'atom' => 'application/atom+xml'
);
var $__acceptTypes = array();
@ -336,7 +336,7 @@ class RequestHandlerComponent extends Object
$str = $this->stripImages($str);
$str = $this->stripScripts($str);
return $str;
}
}
/**
* Strips the specified tags from output

View file

@ -944,6 +944,7 @@ class Controller extends Object
unset($this->params['data'][$this->modelClass][$field['name'].'_min']);
unset($this->params['data'][$this->modelClass][$field['name'].'_meridian']);
$this->params['data'][$this->modelClass][$field['name']] = $newDate;
$this->data[$this->modelClass][$field['name']] = $newDate;
}
else if( 'datetime' == $field['type'] && isset($this->params['data'][$this->modelClass][$field['name'].'_year'] ) )
{
@ -963,6 +964,7 @@ class Controller extends Object
unset($this->params['data'][$this->modelClass][$field['name'].'_min']);
unset($this->params['data'][$this->modelClass][$field['name'].'_meridian']);
$this->params['data'][$this->modelClass][$field['name']] = $newDate;
$this->data[$this->modelClass][$field['name']] = $newDate;
}
}
}

View file

@ -126,9 +126,9 @@ class ErrorHandler extends Object
header("HTTP/1.0 404 Not Found");
$this->error(
array('code' => '404',
'name' => 'Not found',
'message' => sprintf(__("The requested address %s was not found on this server.", true), $url, $message),
array('code' => '404',
'name' => 'Not found',
'message' => sprintf(__("The requested address %s was not found on this server.", true), $url, $message),
'base' => $base
)
);

View file

@ -493,7 +493,7 @@ class DataSource extends Object
* Enter description here... The special {n}, as seen in the Model::generateList method, is taken care of here.
*
* @param array $data
* @param mixed $path As an array, or as a dot-separated string.
* @param mixed $path As an array, or as a dot-separated string.
* @return array
*/
function getFieldValue ($data, $path)

View file

@ -124,14 +124,14 @@ class DboSource extends DataSource
{
if (is_array($data))
{
$out = array();
$keys = array_keys($data);
$count = count($data);
for ($i = 0; $i < $count; $i++)
{
$out = array();
$keys = array_keys($data);
$count = count($data);
for ($i = 0; $i < $count; $i++)
{
$out[$keys[$i]] = $this->value($data[$keys[$i]]);
}
return $out;
}
return $out;
}
else
{
@ -445,11 +445,11 @@ class DboSource extends DataSource
$this->_queriesTime += $this->took;
$this->_queriesLog[] = array(
'query' => $sql,
'error' => $this->error,
'affected' => $this->affected,
'numRows' => $this->numRows,
'took' => $this->took
'query' => $sql,
'error' => $this->error,
'affected' => $this->affected,
'numRows' => $this->numRows,
'took' => $this->took
);
if (count($this->_queriesLog) > $this->_queriesLogMax)
@ -470,25 +470,25 @@ class DboSource extends DataSource
*
* @param string $sql Query to show information on.
*/
function showQuery($sql)
{
$error = $this->error;
function showQuery($sql)
{
$error = $this->error;
if (strlen($sql) > 200 && !$this->fullDebug)
{
$sql = substr($sql, 0, 200) .'[...]';
}
if (strlen($sql) > 200 && !$this->fullDebug)
{
$sql = substr($sql, 0, 200) .'[...]';
}
if ($this->debug || $error)
{
print("<p style=\"text-align:left\"><b>Query:</b> {$sql} <small>[Aff:{$this->affected} Num:{$this->numRows} Took:{$this->took}ms]</small>");
if($error)
{
print("<br /><span style=\"color:Red;text-align:left\"><b>ERROR:</b> {$this->error}</span>");
}
print('</p>');
}
}
if ($this->debug || $error)
{
print("<p style=\"text-align:left\"><b>Query:</b> {$sql} <small>[Aff:{$this->affected} Num:{$this->numRows} Took:{$this->took}ms]</small>");
if($error)
{
print("<br /><span style=\"color:Red;text-align:left\"><b>ERROR:</b> {$this->error}</span>");
}
print('</p>');
}
}
/**
* The "C" in CRUD
@ -708,16 +708,16 @@ class DboSource extends DataSource
if ($query)
{
if (!isset($resultSet) || !is_array($resultSet)) {
if (DEBUG)
{
e('<div style="font: Verdana bold 12px; color: #FF0000">SQL Error in model '.$model->name.': ');
if (isset($this->error) && $this->error != null)
{
e($this->error);
}
e('</div>');
}
return null;
if (DEBUG)
{
e('<div style="font: Verdana bold 12px; color: #FF0000">SQL Error in model '.$model->name.': ');
if (isset($this->error) && $this->error != null)
{
e($this->error);
}
e('</div>');
}
return null;
}
$count = count($resultSet);
@ -787,7 +787,7 @@ class DboSource extends DataSource
}
}
}
$data[$association] = $merge[0][$association];
$data[$association] = $merge[0][$association];
}
}
else
@ -1212,7 +1212,7 @@ class DboSource extends DataSource
$combined = array_combine($fields, $values);
foreach ($combined as $field => $value)
{
$updates[] = $this->name($field).'='.$this->value($value, $model->getColumnType($field));
$updates[] = $this->name($field).'='.$this->value($value, $model->getColumnType($field));
}
$sql = 'UPDATE '.$this->name($model->table);

View file

@ -66,7 +66,7 @@ class DboPostgres extends DboSource
'date' => array('name' => 'date'),
'binary' => array('name' => 'bytea'),
'boolean' => array('name' => 'boolean'),
'number' => array('name' => 'numeric'));
'number' => array('name' => 'numeric'));
var $startQuote = '"';
@ -124,7 +124,7 @@ class DboPostgres extends DboSource
*/
function fetchRow ($assoc = false)
{
if(is_resource($this->_result))
if(is_resource($this->_result))
{
$this->resultSet($this->_result);
$resultRow = $this->fetchResult();
@ -212,7 +212,7 @@ class DboPostgres extends DboSource
{
if ($data == '*')
{
return '*';
return '*';
}
$pos = strpos($data, '"');
if ($pos === false)
@ -499,7 +499,7 @@ class DboPostgres extends DboSource
}
if (strpos($col, 'timestamp') !== false)
{
return 'datetime';
return 'datetime';
}
if ($col == 'boolean')
{

View file

@ -135,7 +135,7 @@ class DboSqlite extends DboSource
*/
function fetchRow ($assoc = false)
{
if(is_resource($this->_result))
if(is_resource($this->_result))
{
$this->resultSet($this->_result);
$resultRow = $this->fetchResult();

View file

@ -249,9 +249,9 @@ class Model extends Object
*
* @var array
*/
var $__associationKeys = array('belongsTo' => array('className', 'conditions', 'order', 'foreignKey', 'counterCache'),
'hasOne' => array('className', 'conditions', 'order', 'foreignKey', 'dependent'),
'hasMany' => array('className', 'conditions', 'order', 'foreignKey', 'fields', 'dependent', 'exclusive', 'finderQuery', 'counterQuery'),
var $__associationKeys = array('belongsTo' => array('className', 'conditions', 'order', 'foreignKey', 'counterCache'),
'hasOne' => array('className', 'conditions', 'order', 'foreignKey', 'dependent'),
'hasMany' => array('className', 'conditions', 'order', 'foreignKey', 'fields', 'dependent', 'exclusive', 'finderQuery', 'counterQuery'),
'hasAndBelongsToMany' => array('className', 'joinTable', 'fields', 'foreignKey', 'associationForeignKey', 'conditions', 'order', 'uniq', 'finderQuery', 'deleteQuery', 'insertQuery')
);
@ -1250,11 +1250,11 @@ class Model extends Object
}
$queryData = array(
'conditions' => $conditions,
'fields' => $fields,
'joins' => array(),
'limit' => $limit_str,
'order' => $order
'conditions' => $conditions,
'fields' => $fields,
'joins' => array(),
'limit' => $limit_str,
'order' => $order
);
if (!$this->beforeFind($queryData))

View file

@ -249,9 +249,9 @@ class Model extends Object
*
* @var array
*/
var $__associationKeys = array('belongsTo' => array('className', 'conditions', 'order', 'foreignKey', 'counterCache'),
'hasOne' => array('className', 'conditions', 'order', 'foreignKey', 'dependent'),
'hasMany' => array('className', 'conditions', 'order', 'foreignKey', 'fields', 'dependent', 'exclusive', 'finderQuery', 'counterQuery'),
var $__associationKeys = array('belongsTo' => array('className', 'conditions', 'order', 'foreignKey', 'counterCache'),
'hasOne' => array('className', 'conditions', 'order', 'foreignKey', 'dependent'),
'hasMany' => array('className', 'conditions', 'order', 'foreignKey', 'fields', 'dependent', 'exclusive', 'finderQuery', 'counterQuery'),
'hasAndBelongsToMany' => array('className', 'joinTable', 'fields', 'foreignKey', 'associationForeignKey', 'conditions', 'order', 'uniq', 'finderQuery', 'deleteQuery', 'insertQuery')
);
@ -1246,11 +1246,11 @@ class Model extends Object
}
$queryData = array(
'conditions' => $conditions,
'fields' => $fields,
'joins' => array(),
'limit' => $limit_str,
'order' => $order
'conditions' => $conditions,
'fields' => $fields,
'joins' => array(),
'limit' => $limit_str,
'order' => $order
);
if (!$this->beforeFind($queryData))

View file

@ -135,7 +135,7 @@ class CakeSession extends Object
if (!isset($_SESSION))
{
$this->__begin();
$this->__begin();
}
$this->__checkValid();
@ -298,9 +298,9 @@ class CakeSession extends Object
*/
function __destroy($key)
{
$db =& ConnectionManager::getDataSource('default');
$db->execute("DELETE FROM ".$db->name('cake_sessions')." WHERE ".$db->name('cake_sessions.id')." = ".$db->value($key, 'integer'));
return true;
$db =& ConnectionManager::getDataSource('default');
$db->execute("DELETE FROM ".$db->name('cake_sessions')." WHERE ".$db->name('cake_sessions.id')." = ".$db->value($key, 'integer'));
return true;
}
/**
@ -334,9 +334,9 @@ class CakeSession extends Object
*/
function __gc($expires)
{
$db =& ConnectionManager::getDataSource('default');
$db->execute("DELETE FROM ".$db->name('cake_sessions')." WHERE ".$db->name('cake_sessions.expires')." < " . $db->value(time()));
return true;
$db =& ConnectionManager::getDataSource('default');
$db->execute("DELETE FROM ".$db->name('cake_sessions')." WHERE ".$db->name('cake_sessions.expires')." < " . $db->value(time()));
return true;
}
/**
@ -506,14 +506,14 @@ class CakeSession extends Object
$row = $db->query("SELECT ".$db->name('cake_sessions.data')." FROM ".$db->name('cake_sessions')." WHERE ".$db->name('cake_sessions.id')." = ".$db->value($key), false);
if ($row && $row[0]['cake_sessions']['data'])
{
return $row[0]['cake_sessions']['data'];
}
else
{
return false;
}
if ($row && $row[0]['cake_sessions']['data'])
{
return $row[0]['cake_sessions']['data'];
}
else
{
return false;
}
}
/**
@ -625,33 +625,33 @@ class CakeSession extends Object
switch (CAKE_SECURITY)
{
case 'high':
$factor = 10;
break;
case 'medium':
$factor = 100;
break;
case 'low':
$factor = 300;
break;
$factor = 10;
break;
case 'medium':
$factor = 100;
break;
case 'low':
$factor = 300;
break;
default:
$factor = 10;
break;
default:
$factor = 10;
break;
}
$expires = time() + CAKE_SESSION_TIMEOUT * $factor;
$row = $db->query("SELECT COUNT(id) AS count FROM ".$db->name('cake_sessions')." WHERE ".$db->name('cake_sessions.id')." = ".$db->value($key), false);
$row = $db->query("SELECT COUNT(id) AS count FROM ".$db->name('cake_sessions')." WHERE ".$db->name('cake_sessions.id')." = ".$db->value($key), false);
if($row[0][0]['count'] > 0)
{
$db->execute("UPDATE ".$db->name('cake_sessions')." SET ".$db->name('cake_sessions.data')." = ".$db->value($value).", ".$db->name('cake_sessions.expires')." = ".$db->value($expires)." WHERE ".$db->name('cake_sessions.id')." = ".$db->value($key));
}
else
{
$db->execute("INSERT INTO ".$db->name('cake_sessions')." (".$db->name('cake_sessions.data').",".$db->name('cake_sessions.expires').",".$db->name('cake_sessions.id').") VALUES (".$db->value($value).", ".$db->value($expires).", ".$db->value($key).")");
}
return true;
if($row[0][0]['count'] > 0)
{
$db->execute("UPDATE ".$db->name('cake_sessions')." SET ".$db->name('cake_sessions.data')." = ".$db->value($value).", ".$db->name('cake_sessions.expires')." = ".$db->value($expires)." WHERE ".$db->name('cake_sessions.id')." = ".$db->value($key));
}
else
{
$db->execute("INSERT INTO ".$db->name('cake_sessions')." (".$db->name('cake_sessions.data').",".$db->name('cake_sessions.expires').",".$db->name('cake_sessions.id').") VALUES (".$db->value($value).", ".$db->value($expires).", ".$db->value($key).")");
}
return true;
}
}
?>

View file

@ -68,7 +68,7 @@ class AjaxHelper extends Helper
*
* @var array
*/
var $dragOptions = array('handle', 'revert', 'constraint', 'change');
var $dragOptions = array('handle', 'revert', 'constraint', 'change', 'ghosting');
/**
* Options for droppable.
@ -359,7 +359,7 @@ class AjaxHelper extends Helper
$htmlOptions['onclick'] = "return false;";
return $this->Html->submit($title, $htmlOptions) .
$this->Javascript->event('"'.$htmlOptions['id'].'"', 'click', $this->remoteFunction($options));
$this->Javascript->event('"'.$htmlOptions['id'].'"', 'click', $this->remoteFunction($options));
}
/**
@ -673,9 +673,9 @@ class AjaxHelper extends Helper
/**
* Returns a string of JavaScript with the given option data as a JavaScript options hash.
*
* @param array $options Options in the shape of keys and values
* @param array $acceptable Array of legal keys in this options context
* @return string String of Javascript array definition
* @param array $options Options in the shape of keys and values
* @param array $acceptable Array of legal keys in this options context
* @return string String of Javascript array definition
*/
function _buildOptions ($options, $acceptable) {
if(is_array($options))
@ -703,7 +703,7 @@ class AjaxHelper extends Helper
*
* @param string $klass Name of JavaScript class
* @param string $name
* @param array $options Ajax options
* @param array $options Ajax options
* @return string Formatted JavaScript
*/
function _buildObserver ($klass, $name, $options=null)
@ -744,8 +744,8 @@ class AjaxHelper extends Helper
/**
* Returns a string of JavaScript with a string representation of given options array.
*
* @param array $options Ajax options array
* @param array $stringOpts Options as strings in an array
* @param array $options Ajax options array
* @param array $stringOpts Options as strings in an array
* @access private
* @return array
*/

View file

@ -86,8 +86,8 @@ class FormHelper extends Helper
{
return true;
}
else
{
else
{
return false;
}
}
@ -136,7 +136,7 @@ class FormHelper extends Helper
* @param bool $required True if this field is a required field.
* @param string $errorMsg Text that will appear if an error has occurred.
* @param int $size Size attribute for INPUT element
* @param array $htmlOptions HTML options array.
* @param array $htmlOptions HTML options array.
* @return string The formatted INPUT element, with a label and wrapped in a div.
*/
function generateInputDiv($tagName, $prompt, $required=false, $errorMsg=null, $size=20, $htmlOptions=null )
@ -173,7 +173,7 @@ class FormHelper extends Helper
* @param string $prompt Text that will appear in the label field.
* @param bool $required True if this field is a required field.
* @param string $errorMsg Text that will appear if an error has occurred.
* @param array $htmlOptions HTML options array.
* @param array $htmlOptions HTML options array.
* @return string The formatted checkbox div
*/
function generateCheckboxDiv($tagName, $prompt, $required=false, $errorMsg=null, $htmlOptions=null )
@ -288,7 +288,7 @@ class FormHelper extends Helper
* @param string $errorMsg ext that will appear if an error has occurred.
* @param integer $cols Number of columns.
* @param integer $rows Number of rows.
* @param array $htmlOptions HTML options array.
* @param array $htmlOptions HTML options array.
* @return string The formatted TEXTAREA element, wrapped in a div.
*/
function generateAreaDiv($tagName, $prompt, $required=false, $errorMsg=null, $cols=60, $rows=10, $htmlOptions=null )
@ -322,15 +322,15 @@ class FormHelper extends Helper
/**
* Returns a formatted SELECT tag for HTML FORMs.
*
* @param string $tagName This should be "Modelname/fieldname"
* @param string $prompt Text that will appear in the label field
* @param array $options Options to be contained in SELECT element
* @param string $selected Currently selected item
* @param array $selectAttr Array of HTML attributes for the SELECT element
* @param array $optionAttr Array of HTML attributes for the OPTION elements
* @param bool $required True if this field is required
* @param string $errorMsg Text that will appear if an error has occurred
* @return string The formatted INPUT element, wrapped in a div
* @param string $tagName This should be "Modelname/fieldname"
* @param string $prompt Text that will appear in the label field
* @param array $options Options to be contained in SELECT element
* @param string $selected Currently selected item
* @param array $selectAttr Array of HTML attributes for the SELECT element
* @param array $optionAttr Array of HTML attributes for the OPTION elements
* @param bool $required True if this field is required
* @param string $errorMsg Text that will appear if an error has occurred
* @return string The formatted INPUT element, wrapped in a div
*/
function generateSelectDiv($tagName, $prompt, $options, $selected=null, $selectAttr=null, $optionAttr=null, $required=false, $errorMsg=null)
{
@ -361,9 +361,9 @@ class FormHelper extends Helper
/**
* Returns a formatted submit widget for HTML FORMs.
*
* @param string $displayText Text that will appear on the widget
* @param array $htmlOptions HTML options array
* @return string The formatted submit widget
* @param string $displayText Text that will appear on the widget
* @param array $htmlOptions HTML options array
* @return string The formatted submit widget
*/
function generateSubmitDiv($displayText, $htmlOptions = null)
{

View file

@ -143,7 +143,7 @@ class HtmlHelper extends Helper
* + '/' - the method will find base URL of application.
* + A combination of controller/action - the method will find url for it.
*
* @param string $url Cake-relative URL, like "/products/edit/92" or "/presidents/elect/4"
* @param string $url Cake-relative URL, like "/products/edit/92" or "/presidents/elect/4"
* @param boolean $return Wheter this method should return a value or
* output it. This overrides AUTO_OUTPUT.
* @return mixed Either string or boolean value, depends on AUTO_OUTPUT
@ -154,8 +154,8 @@ function url($url = null, $return = false)
$base = $this->base;
if($this->plugin != null)
{
$base = preg_replace('/'.$this->plugin.'/', '', $this->base);
$base = str_replace('//','', $base);
$base = preg_replace('/'.$this->plugin.'/', '', $this->base);
$base = str_replace('//','', $base);
$pos1 = strrpos($base, '/');
$char = strlen($base) -1;
if($pos1 == $char)
@ -188,7 +188,7 @@ function url($url = null, $return = false)
* If the $url is empty, $title is used instead.
*
* @param string $title The content of the A tag.
* @param string $url Cake-relative URL, or external URL (starts with http://)
* @param string $url Cake-relative URL, or external URL (starts with http://)
* @param array $htmlAttributes Array of HTML attributes.
* @param string $confirmMessage Confirmation message.
* @param boolean $escapeTitle Whether or not the text in the $title variable should be HTML escaped.
@ -346,17 +346,17 @@ function url($url = null, $return = false)
if (isset($htmlAttributes['value']))
{
$htmlAttributes['checked'] = ($htmlAttributes['value'] == $value)? 'checked': null;
if ($htmlAttributes['checked'] == '0') {
$notCheckedValue = -1;
}
$htmlAttributes['checked'] = ($htmlAttributes['value'] == $value)? 'checked': null;
if ($htmlAttributes['checked'] == '0') {
$notCheckedValue = -1;
}
}
else
{
$model = new $this->model;
$db =& ConnectionManager::getDataSource($model->useDbConfig);
$value = $db->boolean($value);
$htmlAttributes['checked'] = $value? 'checked': null;
$htmlAttributes['checked'] = $value? 'checked': null;
$htmlAttributes['value'] = 1;
}
@ -420,11 +420,11 @@ function url($url = null, $return = false)
{
if(count($this->_crumbs))
{
$out = array();
if($startText)
{
$out[] = $this->link($startText, '/');
}
$out = array();
if($startText)
{
$out[] = $this->link($startText, '/');
}
foreach ($this->_crumbs as $crumb)
{
$out[] = $this->link($crumb[0], $crumb[1]);
@ -532,8 +532,8 @@ function url($url = null, $return = false)
* Creates a set of radio widgets.
*
* @param string $fieldName Name of a field, like this "Modelname/fieldname"
* @param array $options Radio button options array
* @param array $inbetween String that separates the radio buttons.
* @param array $options Radio button options array
* @param array $inbetween String that separates the radio buttons.
* @param array $htmlAttributes Array of HTML attributes.
* @param boolean $return Wheter this method should return a value
* or output it. This overrides AUTO_OUTPUT.
@ -562,9 +562,9 @@ function url($url = null, $return = false)
/**
* Returns a row of formatted and named TABLE headers.
*
* @param array $names Array of tablenames.
* @param array $trOptions HTML options for TR elements.
* @param array $thOptions HTML options for TH elements.
* @param array $names Array of tablenames.
* @param array $trOptions HTML options for TR elements.
* @param array $thOptions HTML options for TH elements.
* @param boolean $return Wheter this method should return a value
* @return string
*/
@ -583,11 +583,11 @@ function url($url = null, $return = false)
/**
* Returns a formatted string of table rows (TR's with TD's in them).
*
* @param array $data Array of table data
* @param array $oddTrOptions HTML options for odd TR elements
* @param array $evenTrOptions HTML options for even TR elements
* @param array $data Array of table data
* @param array $oddTrOptions HTML options for odd TR elements
* @param array $evenTrOptions HTML options for even TR elements
* @param boolean $return Wheter this method should return a value
* @return string Formatted HTML
* @return string Formatted HTML
*/
function tableCells($data, $oddTrOptions=null, $evenTrOptions=null, $return=false)
{
@ -616,7 +616,7 @@ function url($url = null, $return = false)
/**
* Returns value of $fieldName. Null if the tag does not exist.
*
* @param string $fieldName Fieldname as "Modelname/fieldname" string
* @param string $fieldName Fieldname as "Modelname/fieldname" string
* @return unknown Value of the named tag.
*/
function tagValue ($fieldName)
@ -638,8 +638,8 @@ function url($url = null, $return = false)
/**
* Returns false if given FORM field has no errors. Otherwise it returns the constant set in the array Model->validationErrors.
*
* @param string $model Model name as string
* @param string $field Fieldname as string
* @param string $model Model name as string
* @param string $field Fieldname as string
* @return boolean True on errors.
*/
function tagIsInvalid ($model, $field)
@ -682,8 +682,8 @@ function url($url = null, $return = false)
/**
* Returns a formatted error message for given FORM field, NULL if no errors.
*
* @param string $field A field name, like "Modelname/fieldname"
* @param string $text Error message
* @param string $field A field name, like "Modelname/fieldname"
* @param string $text Error message
* @return string If there are errors this method returns an error message, else NULL.
*/
function tagErrorMsg ($field, $text)

View file

@ -191,7 +191,7 @@ class TimeHelper extends Helper
* @return boolean True if datetime string is within current year
*/
function isThisYear ($date_string, $return = false)
{
{
$date = $this->fromString($date_string);
$ret = date('Y', $date) == date('Y', time());
@ -207,7 +207,7 @@ class TimeHelper extends Helper
* @return boolean True if datetime string was yesterday
*/
function wasYesterday ($date_string, $return = false)
{
{
$date = $this->fromString($date_string);
$ret = date('Y-m-d', $date) == date('Y-m-d', strtotime('yesterday'));
@ -223,7 +223,7 @@ class TimeHelper extends Helper
* @return boolean True if datetime string was yesterday
*/
function isTomorrow ($date_string, $return = false)
{
{
$date = $this->fromString($date_string);
$ret = date('Y-m-d', $date) == date('Y-m-d', strtotime('tomorrow'));
@ -239,7 +239,7 @@ class TimeHelper extends Helper
* @return int Unix timestamp
*/
function toUnix ($date_string, $return = false)
{
{
$ret = strtotime($date_string);
return $this->output($ret, $return);
@ -254,7 +254,7 @@ class TimeHelper extends Helper
* @return string Formatted date string
*/
function toAtom ($date_string, $return = false)
{
{
$date = $this->fromString($date_string);
$ret = date('Y-m-d\TH:i:s\Z', $date);
@ -380,7 +380,7 @@ class TimeHelper extends Helper
* @param boolean $return Whether this method should return a value
* or output it. This overrides AUTO_OUTPUT.
* @return string Relative time string.
* @see timeAgoInWords
* @see timeAgoInWords
*/
function relativeTime ($datetime_string, $format = 'j/n/y', $return = false)
{

View file

@ -28,50 +28,51 @@
<!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>
<title>CakePHP : A Rapid Development Framework :: <?php echo $title_for_layout?></title>
<title>CakePHP : The PHP Rapid Development Framework :: <?php echo $title_for_layout?></title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<?php echo $html->charset('UTF-8')?>
<?php echo $html->css('cake.default')?>
<!--[if lt IE 7]>
<?php echo $html->css('cake.ie');?>
<![endif]-->
<?php echo $html->css('cake.basic', 'stylesheet', array("media"=>"all" ));?>
<?php echo $html->css('cake.forms', 'stylesheet', array("media"=>"all" ));?>
</head>
<body>
<div id="wrapper">
<div id="header">
<?php echo $html->image('cake.logo.png', array('alt'=>'CakePHP : Rapid Development Framework', 'border'=>"0"))?>
</div>
<div id="content">
<?php if (isset($this->controller->Session)) $this->controller->Session->flash(); ?>
<?php echo $content_for_layout?>
</div>
<?php echo $cakeDebug;?>
<div id="footer">
<p>CakePHP ::
<a href="http://www.cakefoundation.org/pages/copyright/">&copy; 2006 Cake Software Foundation, Inc.</a>
</p>
<br />
<p>
<!--PLEASE USE ONE OF THE POWERED BY CAKEPHP LOGO-->
<a href="http://www.cakephp.org/" target="_blank">
<?php echo $html->image('cake.power.png', array('alt'=>'CakePHP : Rapid Development Framework',
'height' => "15",
'width' => "80"))?>
</a>
</p>
<p>
<a href="http://validator.w3.org/check?uri=referer">
<?php echo $html->image('w3c_xhtml10.png', array('alt' => 'Valid XHTML 1.0 Transitional',
'height' => "15",
'width' => "80"))?>
</a>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<?php echo $html->image('w3c_css.png', array('alt' => 'Valid CSS!',
'height' => "15",
'width' => "80"))?>
</a>
</p>
</div>
</div>
<body class="main">
<div id="container">
<div id="header">
<h1 class="logo">
<a href="http://cakephp.org"></a>
</h1>
<div id="navigation">
<ul>
<li class="active"><a href="http://cakephp.org"><span>Home</span></a></li>
<li><a href="http://cakephp.org/downloads/"><span>Downloads</span></a></li>
<!--<li><a href="#"><span>Screencasts coming soon!</span></a></li>-->
<li><a href="http://manual.cakephp.org"><span>Manual</span></a></li>
<li><a href="http://api.cakephp.org/"><span>API</span></a></li>
<li><a href="http://bakery.cakephp.org"><span>Bakery</span></a></li>
<li><a href="https://trac.cakephp.org"><span>Trac</span></a></li>
<li><a href="http://cakeforge.org"><span>CakeForge</span></a></li>
</ul>
</div> <!-- #navigation -->
</div> <!-- #header -->
<div id="content">
<?php if ($this->controller->Session->check('Message.flash')) $this->controller->Session->flash(); ?>
<?php echo $content_for_layout?>
<div class="clear"></div>
</div> <!-- #content -->
<div id="footer">
<p>
CakePHP : <a href="http://www.cakefoundation.org/pages/copyright/">&copy; 2006 Cake Software Foundation, Inc.</a>
</p>
<a href="http://www.w3c.org/" target="_new">
<?php echo $html->image('w3c_css.png', array('alt'=>"valid css", 'border'=>"0"))?>
</a>
<a href="http://www.w3c.org/" target="_new">
<?php echo $html->image('w3c_xhtml10.png', array('alt'=>"valid xhtml", 'border'=>"0"))?>
</a>
<a href="http://www.cakephp.org/" target="_new">
<?php echo $html->image('cake.power.png', array('alt'=>"CakePHP : Rapid Development Framework", 'border'=>"0"))?>
</a>
</div>
<?php echo $cakeDebug;?>
</div> <!-- #container -->
</body>
</html>

View file

@ -35,18 +35,18 @@
<p style="background:#DBA941;padding:4px;font-size: 16px;">Cake<?php echo $connected->isConnected() ? ' is able to' : ' is not able to';?> connect to the database.</p>
<br />
<?php endif; ?>
<h1>Cake<em>PHP</em></h1>
<h1>CakePHP</h1>
<p>If you plan to upgrade from an older version, you may also want to read the <a href="http://cakephp.org/pages/changelog">changelog</a></p>
<h2>Editing <em>this Page</em></h2>
<h2>Editing this Page</h2>
<p>
To change the content of this page, create: <em>/app/views/pages/home.thtml</em>.<br />
To change its layout, create: <em>/app/views/layouts/default.thtml</em>.<br />
To change the content of this page, create: /app/views/pages/home.thtml.<br />
To change its layout, create: /app/views/layouts/default.thtml.<br />
<a href="http://wiki.cakephp.org/tutorials:sample_layout">See the wiki for more info</a><br />
You can also add some CSS styles for your pages at: <em>app/webroot/css/</em>.
You can also add some CSS styles for your pages at: app/webroot/css/.
</p>
<h2>More about <em>Cake</em></h2>
<h2>More about Cake</h2>
<p>
CakePHP is a rapid development framework for PHP which uses commonly known design patterns like
Active Record, Association Data Mapping, Front Controller and MVC.
@ -56,24 +56,24 @@ Our primary goal is to provide a structured framework that enables PHP users at
to rapidly develop robust web applications, without any loss to flexibility.
</p>
<ul>
<li><a href="http://www.cakefoundation.org/">Cake<em>Software</em>Foundation</a>
<li><a href="http://www.cakefoundation.org/">Cake Software Foundation</a>
<ul><li>Promoting development related to CakePHP</li></ul></li>
<li><a href="http://www.cafepress.com/cakefoundation">Cake<em>Schwag</em></a>
<li><a href="http://www.cafepress.com/cakefoundation">CakeSchwag</a>
<ul><li>Get your own CakePHP gear - Doughnate to Cake</li></ul></li>
<li><a href="http://www.cakephp.org">Cake<em>PHP</em></a>
<li><a href="http://www.cakephp.org">CakePHP</a>
<ul><li>The Rapid Development Framework</li></ul></li>
<li><a href="http://manual.cakephp.org">Cake<em>PHP</em>Manual</a>
<li><a href="http://manual.cakephp.org">CakePHPManual</a>
<ul><li>Your Rapid Development Cookbook</li></ul></li>
<li><a href="http://wiki.cakephp.org">Cake<em>PHP</em>Wiki</a>
<li><a href="http://wiki.cakephp.org">CakePHPWiki</a>
<ul><li>The Community for CakePHP</li></ul></li>
<li><a href="http://api.cakephp.org">Cake<em>PHP</em>API</a>
<li><a href="http://api.cakephp.org">CakePHPAPI</a>
<ul><li>Docblock Your Best Friend</li></ul></li>
<li><a href="http://www.cakeforge.org">Cake<em>Forge</em></a>
<li><a href="http://www.cakeforge.org">CakeForge</a>
<ul><li>Open Development for CakePHP</li></ul></li>
<li><a href="https://trac.cakephp.org/">Cake<em>PHP</em>Trac</a>
<li><a href="https://trac.cakephp.org/">CakePHPTrac</a>
<ul><li>For the Development of CakePHP (Tickets, SVN browser, Roadmap, Changelogs)</li></ul></li>
<li><a href="http://groups-beta.google.com/group/cake-php">Cake<em>PHP</em> Google Group</a>
<li><a href="http://groups-beta.google.com/group/cake-php">CakePHP Google Group</a>
<ul><li>Community mailing list</li></ul></li>
<li><a href="irc://irc.freenode.net/cakephp">irc.freenode.net #cake<em>php</em></a>
<li><a href="irc://irc.freenode.net/cakephp">irc.freenode.net #cakephp</a>
<ul><li>Live chat about CakePHP</li></ul></li>
</ul>

View file

@ -246,9 +246,9 @@ class View extends Object
* Renders view for given action and layout. If $file is given, that is used
* for a view filename (e.g. customFunkyView.thtml).
*
* @param string $action Name of action to render for
* @param string $layout Layout to use
* @param string $file Custom filename for view
* @param string $action Name of action to render for
* @param string $layout Layout to use
* @param string $file Custom filename for view
*/
function render($action=null, $layout=null, $file=null)
{
@ -392,9 +392,9 @@ class View extends Object
* Element.
*
* @link http://wiki.cakephp.org/docs:view:renderelement
* @param string $name Name of template file in the/app/views/elements/ folder
* @param array $params Array of data to be made available to the for rendered view (i.e. the Element)
* @return string Rendered output
* @param string $name Name of template file in the/app/views/elements/ folder
* @param array $params Array of data to be made available to the for rendered view (i.e. the Element)
* @return string Rendered output
*/
function renderElement($name, $params=array())
{
@ -495,7 +495,7 @@ class View extends Object
/**
* Sets layout to be used when rendering.
*
* @param string $layout Name of layout.
* @param string $layout Name of layout.
*/
function setLayout($layout)
{
@ -505,9 +505,9 @@ class View extends Object
/**
* Displays an error page to the user. Uses layouts/error.html to render the page.
*
* @param int $code HTTP Error code (for instance: 404)
* @param string $name Name of the error (for instance: Not Found)
* @param string $message Error message as a web page
* @param int $code HTTP Error code (for instance: 404)
* @param string $name Name of the error (for instance: Not Found)
* @param string $message Error message as a web page
*/
function error ($code, $name, $message)
{

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,5 @@
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>

View file

@ -0,0 +1,76 @@
;<?php die() ?>
; SVN FILE: $Id$
;/**
; * Short description for file.
; *
; *
; * PHP versions 4 and 5
; *
; * CakePHP : Rapid Development Framework <http://www.cakephp.org/>
; * Copyright (c) 2006, 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.
; *
; * @filesource
; * @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
; * @package cake
; * @subpackage cake.app.config
; * @since CakePHP v 0.10.0.1076
; * @version $Revision$
; * @modifiedby $LastChangedBy$
; * @lastmodified $Date$
; * @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

View file

@ -0,0 +1,50 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
* Copyright (c) 2006, 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.
*
* @filesource
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.app.config
* @since CakePHP v 0.10.8.2117
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @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
?>

View file

@ -0,0 +1,153 @@
<?php
/* SVN FILE: $Id$ */
/**
* This is core configuration file.
*
* Use it to configure core behaviour ofCake.
*
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
* Copyright (c) 2006, 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.
*
* @filesource
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.app.config
* @since CakePHP v 0.2.9
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
* If you do not have mod rewrite on your system
* or if you prefer to use CakePHP pretty urls.
* uncomment the line below.
* Note: If you do have mod rewrite but prefer the
* CakePHP pretty urls, you also have to remove the
* .htaccess files
* release/.htaccess
* release/app/.htaccess
* release/app/webroot/.htaccess
*/
//define ('BASE_URL', env('SCRIPT_NAME'));
/**
* Set debug level here:
* - 0: production
* - 1: development
* - 2: full debug with sql
* - 3: full debug with sql and dump of the current object
*
* In production, the "flash messages" redirect after a time interval.
* With the other debug levels you get to click the "flash message" to continue.
*
*/
define('DEBUG', 1);
/**
* Turn of caching checking wide.
* You must still use the controller var cacheAction inside you controller class.
* You can either set it controller wide, or in each controller method.
* use var $cacheAction = true; or in the controller method $this->cacheAction = true;
*/
define ('CACHE_CHECK', false);
/**
* Error constant. Used for differentiating error logging and debugging.
* Currently PHP supports LOG_DEBUG
*/
define ('LOG_ERROR', 2);
/**
* CakePHP includes 3 types of session saves
* database or file. Set this to your preferred method.
* If you want to use your own save handler place it in
* app/config/name.php DO NOT USE file or database as the name.
* and use just the name portion below.
*
* Setting this to cake will save files to /cakedistro/tmp directory
* Setting it to php will use the php default save path
* Setting it to database will use the database
*
*
*/
define('CAKE_SESSION_SAVE', 'php');
/**
* Set a random string of used in session.
*
*/
define('CAKE_SESSION_STRING', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
/**
* Set the name of session cookie
*
*/
define('CAKE_SESSION_COOKIE', 'CAKEPHP');
/**
* Set level of Cake security.
*
*/
define('CAKE_SECURITY', 'high');
/**
* Set Cake Session time out.
* If CAKE_SECURITY define is set
* high: multiplied by 10
* medium: is multiplied by 100
* low is: multiplied by 300
*
* Number below is seconds.
*/
define('CAKE_SESSION_TIMEOUT', '120');
/**
* Uncomment the define below to use cake built in admin routes.
* You can set this value to anything you want.
* All methods related to the admin route should be prefixed with the
* name you set CAKE_ADMIN to.
* For example: admin_index, admin_edit
*/
//define('CAKE_ADMIN', 'admin');
/**
* The define below is used to turn cake built webservices
* on or off. Default setting is off.
*/
define('WEBSERVICES', 'off');
/**
* Compress output CSS (removing comments, whitespace, repeating tags etc.)
* This requires a/var/cache directory to be writable by the web server (caching).
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use Controller::cssTag().
*/
define('COMPRESS_CSS', false);
/**
* If set to true, helpers would output data instead of returning it.
*/
define('AUTO_OUTPUT', false);
/**
* If set to false, session would not automatically be started.
*/
define('AUTO_SESSION', true);
/**
* Set the max size of file to use md5() .
*/
define('MAX_MD5SIZE', (5*1024)*1024 );
/**
* To use Access Control Lists with Cake...
*/
define('ACL_CLASSNAME', 'DB_ACL');
define('ACL_FILENAME', 'dbacl'.DS.'db_acl');
?>

View file

@ -0,0 +1,79 @@
<?php
/* SVN FILE: $Id$ */
/**
* This is core configuration file.
*
* Use it to configure core behaviour ofCake.
*
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
* Copyright (c) 2006, 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.
*
* @filesource
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.app.config
* @since CakePHP v 0.2.9
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
* In this file you set up your database connection details.
*
* @package cake
* @subpackage cake.config
*/
/**
* Database configuration class.
* You can specify multiple configurations for production, development and testing.
*
* driver =>
* mysql, postgres, sqlite, adodb-drivername, pear-drivername
*
* connect =>
* MySQL set the connect to either mysql_pconnect of mysql_connect
* PostgreSQL set the connect to either pg_pconnect of pg_connect
* SQLite set the connect to sqlite_popen sqlite_open
* ADOdb set the connect to one of these
* (http://phplens.com/adodb/supported.databases.html) and
* append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent)
*
* host =>
* the host you connect to the database
* MySQL 'localhost' to add a port number use 'localhost:port#'
* PostgreSQL 'localhost' to add a port number use 'localhost port=5432'
*
*/
class DATABASE_CONFIG
{
var $default = array('driver' => 'mysql',
'connect' => 'mysql_connect',
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'project_name',
'prefix' => '');
var $test = array('driver' => 'mysql',
'connect' => 'mysql_connect',
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'project_name-test',
'prefix' => '');
}
?>

View file

@ -0,0 +1,74 @@
<?php
/* SVN FILE: $Id$ */
/**
* 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 : Rapid Development Framework <http://www.cakephp.org/>
* Copyright (c) 2006, 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.
*
* @filesource
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.app.config
* @since CakePHP v 1.0.0.2312
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @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);
?>

View file

@ -0,0 +1,51 @@
<?php
/* SVN FILE: $Id$ */
/**
* 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 : Rapid Development Framework <http://www.cakephp.org/>
* Copyright (c) 2006, 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.
*
* @filesource
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.app.config
* @since CakePHP v 0.2.9
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @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.thtml)...
*/
$Route->connect ('/', array('controller'=>'pages', 'action'=>'display', 'home'));
/**
* ...and connect the rest of 'Pages' controller's urls.
*/
$Route->connect ('/pages/*', array('controller'=>'pages', 'action'=>'display'));
/**
* Then we connect url '/test' to our test controller. This is helpfull in
* developement.
*/
$Route->connect ('/tests', array('controller'=>'tests', 'action'=>'index'));
?>

View file

@ -0,0 +1,30 @@
CREATE TABLE `acos` (
`id` int(11) NOT NULL auto_increment,
`model` varchar(255) NOT NULL default '',
`object_id` int(11) default NULL,
`alias` varchar(255) NOT NULL default '',
`lft` int(11) default NULL,
`rght` int(11) default NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `aros` (
`id` int(11) NOT NULL auto_increment,
`model` varchar(255) NOT NULL default '',
`user_id` int(11) default NULL,
`alias` varchar(255) NOT NULL default '',
`lft` int(11) default NULL,
`rght` int(11) default NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `aros_acos` (
`id` int(11) NOT NULL auto_increment,
`aro_id` int(11) default NULL,
`aco_id` int(11) default NULL,
`_create` int(1) NOT NULL default '0',
`_read` int(1) NOT NULL default '0',
`_update` int(1) NOT NULL default '0',
`_delete` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
);

View file

@ -0,0 +1,11 @@
-- @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
-- @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
-- @since CakePHP v 0.10.8.1997
-- @version $Revision$
CREATE TABLE cake_sessions (
id varchar(255) NOT NULL default '',
data text,
expires int(11) default NULL,
PRIMARY KEY (id)
);

View file

@ -0,0 +1,27 @@
<?php
/* SVN FILE: $Id$ */
/**
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
* Copyright (c) 2006, 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.
*
* @filesource
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.app
* @since CakePHP v 0.10.0.1076
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
require 'webroot'.DIRECTORY_SEPARATOR.'index.php';
?>

View file

@ -0,0 +1,31 @@
<?php
/* SVN FILE: $Id$ */
/**
*
*
*
*
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
* Copyright (c) 2006, 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.
*
* @filesource
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.cake.libs.view.templates.layouts
* @since CakePHP v 0.10.0.1076
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
?>
<?php echo $content_for_layout; ?>

View file

@ -0,0 +1,29 @@
<!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>
<title>CakePHP : <?php echo $title_for_layout?></title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<?php echo $html->css('generic.basic');?>
<?php echo $html->css('generic.forms');?>
</head>
<body>
<div id="container">
<div id="header">
<h1>CakePHP Rapid Development</h1>
</div>
<div id="content">
<?php
if ($this->controller->Session->check('Message.flash'))
$this->controller->Session->flash();
?>
<?php echo $content_for_layout?>
</div>
<div id="footer">
&nbsp;
<a href="http://www.cakephp.org/" target="_new">
<?php echo $html->image('cake.power.png', array('alt'=>"CakePHP : Rapid Development Framework", 'border'=>"0"))?>
</a>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,51 @@
<?php
/* SVN FILE: $Id$ */
/**
*
*
*
*
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
* Copyright (c) 2006, 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.
*
* @filesource
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.cake.libs.view.templates.layouts
* @since CakePHP v 0.10.0.1076
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @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>
<title><?php echo $page_title?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<?php if(DEBUG == 0) { ?>
<meta http-equiv="Refresh" content="<?php echo $pause?>;url=<?php echo $url?>"/>
<?php } ?>
<style><!--
P { text-align:center; font:bold 1.1em sans-serif }
A { color:#444; text-decoration:none }
A:HOVER { text-decoration: underline; color:#44E }
--></style>
</head>
<body>
<p><a href="<?php echo $url?>"><?php echo $message?></a></p>
</body>
</html>

View file

@ -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>

View file

@ -0,0 +1,116 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
* Copyright (c) 2006, 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.
*
* @filesource
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.app.webroot
* @since CakePHP v 0.2.9
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
* Enter description here...
*/
require(CONFIGS.'paths.php');
require(CAKE.'basics.php');
require(LIBS.'folder.php');
require(LIBS.'file.php');
require(LIBS.'legacy.php');
/**
* Enter description here...
*
* @param unknown_type $path
* @param unknown_type $name
* @return unknown
*/
function make_clean_css ($path, $name)
{
require(VENDORS.'csspp'.DS.'csspp.php');
$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);
}
header("Date: ".date("D, j M Y G:i:s ", $templateModified).'GMT');
header("Content-Type: text/css");
header("Expires: ".gmdate("D, j M Y H:i:s", time()+DAY)." GMT");
header("Cache-Control: cache");// HTTP/1.1
header("Pragma: cache");// HTTP/1.0
print $output;
?>

View file

@ -0,0 +1,176 @@
*{
margin:0;
padding:0;
}
body{
font-family:verdana,helvetica,arial,sans-serif;
font-size:12px;
text-align:center;
color:#333;
background:#fff;
line-height: 18px;
}
/*
* General Style Info
*/
a{
color:#003d4c;
text-decoration:none;
}
a:hover{
color:#003d4c;
text-decoration:underline;
}
a img{
border:none;
}
h1, h2, h3, h4{
font-family:'Gill Sans';
font-weight:normal;
}
h1{
font-size:28px;
padding:0.5em 0;
color:#003d4c;
}
em {
font-size: 12px;
}
h2{
font-size:24px;
padding-top:0.15em;
margin:0.3em 0;
color:#e32000;
}
h3{
font-size:18px;
padding-top:0.5em;
color:#003d4c;
}
h4{
color:#ff9966;
font-size:16px;
padding-top:0.5em;
font-weight:normal;
}
ul, li {
margin: 0 12px;
}
/*
* Layout
*/
#container{
text-align:left;
}
#header{
background:#003d4c;
padding: 4px 20px;
}
#header h1{
color:#fff;
font-family: 'Gill Sans';
font-size: 45px;
font-weight:normal;
}
#content{
padding: 10px 40px;
}
#footer{
padding: 6px 10px;
background:#003d4c;
text-align: right;
}
/* tables */
table {
width: 100%;
border: 1px solid #003d4c;
color:#333;
background-color: #fff;
clear:both;
padding: 0;
margin: 0 0 2em 0;
white-space: normal;
}
th {
background-color: #ccc;
border-top: 1px solid #fff;
border-left: 1px solid #fff;
border-right: 1px solid #003d4c;
border-bottom: 1px solid #003d4c;
text-align: center;
padding:1px;
}
table tr td {
border-right: 1px solid #ccc;
padding:4px 4px;
vertical-align:top;
text-align: center;
}
table tr.altRow td {
background: #f4f4f4;
}
/* scaffold show */
div.related {
clear:both;
display:block;
}
dl {
line-height:2em;
margin:1em;
float:left;
width: 400px;
}
dt {
font-weight: bold;
vertical-align:top;
}
dd {
margin-left:10em;
margin-top:-2em;
vertical-align:top;
}
/* scaffold buttons */
.notice {
color: #DB8101;
background-color: #ddd;
display: block;
padding: 1em;
}
.tip {
color: #DB8101;
background-color: #ddd;
display: block;
padding: 1em;
}
/* action links */
ul.actions {
float:left;
margin-left: 10px;
width: 200px;
}

View file

@ -0,0 +1,279 @@
/* form.css */
form {
margin: 0 4px;
font-size: 120%;
border-width: 0px 0px 0px 0px;
border-style: solid;
border-color: #DB8101;
}
form fieldset {
font-size: 100%;
border-color: #000000;
border-width: 1px 0px 0px 0px;
border-style: solid none none none;
padding: 10px;
}
form fieldset legend {
font-size: 150%;
font-weight: normal;
color: #000;
padding: 0px 5px;
}
label {
font-size: 150%;
}
label u {
font-style: normal;
text-decoration: underline;
}
input, select, textarea {
font-family: Tahoma, Arial, sans-serif;
font-size: 100%;
color: #000;
}
textarea {
overflow: auto;
}
form div {
clear: left;
display: block;
margin: 5px 0px 0px 0px;
padding: 1px 3px;
}
form fieldset div.notes {
float: right;
width: 158px;
height: auto;
margin: 0px 0px 10px 10px;
padding: 5px;
border: 1px solid #666;
background-color: #ffffe1;
color: #666;
font-size: 88%;
}
form fieldset div.notes h4 {
background-image: url(/images/icon_info.gif);
background-repeat: no-repeat;
background-position: top left;
padding: 3px 0px 3px 27px;
border-width: 0px 0px 1px 0px;
border-style: solid;
border-color: #666;
color: #666;
font-size: 110%;
}
form fieldset div.notes p {
margin: 0em 0em 1.2em 0em;
color: #666;
}
form fieldset div.notes p.last {
margin: 0em;
}
form div fieldset {
clear: none;
border-width: 0px 1px 0px 1px;
border-style: solid;
border-color: #666;
margin: 0px 0px 0px 142px;
padding: 0px 5px 5px 5px;
}
form div fieldset legend {
font-size: 100%;
padding: 0px 3px 0px 9px;
}
form div.required fieldset legend {
font-weight: bold;
}
form div label {
display: block;
float: left;
width: 200px;
background-color: #f4f4f4;
font-size: 16px;
padding: 3px 5px;
margin: 0px 0px 5px 0px;
text-align: right;
}
form div.optional label, label.optional {
font-weight: normal;
}
form div.required label, label.required {
font-weight: bold;
}
form div label.labelCheckbox, form div label.labelRadio {
float: none;
display: block;
margin: 0px 0px 5px 142px;
text-align: left;
}
form div fieldset label.labelCheckbox, form div fieldset label.labelRadio {
margin: 0px 0px 5px 0px;
}
p.error {
color: #DB8101;
background-color: #DBA941;
font-size: 14px;
padding: 1em;
}
form div input, form div select, form div textarea {
padding: 1px 3px;
margin: 0px 0px 0px 0px;
}
form div input.inputFile {
width: 211px;
}
form div select.selectOne, form div select.selectMultiple {
width: 211px;
padding: 1px 3px;
}
form div input.inputCheckbox, form div input.inputRadio, input.inputCheckbox, input.inputRadio {
display: inline;
height: 14px;
width: 14px;
background-color: transparent;
border-width: 0px;
}
form div.submit {
padding: 0px 0px 0px 140px;
clear:both;
display:block;
}
div.submit input {
padding: 2px 12px;
color: #DB8101;
background-color:#ccc;
text-decoration: none;
border: 1px solid #666;
font-size: 14px;
font-weight: bold;
text-align:center;
text-decoration: none;
width: auto;
}
div.submit input:hover {
padding: 2px 12px;
color: #fff;
background-color:#DB8101;
text-decoration: none;
border: 1px solid #666;
font-size: 14px;
font-weight: bold;
text-align:center;
text-decoration: none;
width: auto;
}
form div.submit div input.inputSubmit, form div.submit div input.inputButton {
float: right;
margin: 0px 0px 0px 5px;
}
form div small {
display: block;
margin: 0px 0px 5px 142px;
padding: 1px 3px;
font-size: 88%;
}
/* form.import.css */
form fieldset legend {
line-height: 150%;
}
form input, form select, form textarea {
background-color: #fff;
}
div.optional label:before {
content: '';
}
div.required label:before {
content: '';
}
form div label.labelCheckbox, form div label.labelRadio, label.labelCheckbox, label.labelRadio {
display: block;
width: 190px;
padding: 4px 0px 0px 18px;
text-indent: -18px;
line-height: 120%;
}
form div label.labelCheckbox input.inputCheckbox, form div label.labelRadio input.inputRadio, label.labelCheckbox input.inputCheckbox, label.labelRadio input.inputRadio {
margin: 0;
}
form div fieldset input.inputText, form div fieldset input.inputPassword, form div fieldset input.inputFile, form div fieldset textarea.inputTextarea {
width: 160px;
margin: 0px 0px 0px 18px;
}
form div label.compact {
display: inline;
width: auto;
padding: 4px 10px 0px 0px;
text-indent: 0px;
margin: 0;
}
form div.wide label {
float: none;
display: block;
}
form div label.wide {
width: 348px;
}
form div.wide input.inputText, form div.wide input.inputPassword, form div.wide input.inputFile, form div.wide select, form div.wide textarea {
width: 344px;
margin: 0;
}
form div.notes p, form div small {
line-height: 125%;
}
form div.wide small {
margin: 0px 0px 5px 0px;
}
div.date select {
width:auto;
}
select.autoWidth {
width:auto;
}
option {
padding-left:1em;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -0,0 +1,114 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
* Copyright (c) 2006, 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.
*
* @filesource
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.app.webroot
* @since CakePHP v 0.2.9
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
* Do not change
*/
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.
* Each define has a commented line of code that explains what you would change.
*
*/
if (!defined('ROOT'))
{
//define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
//You should also use the DS define to seperate your directories
define('ROOT', dirname(dirname(dirname(__FILE__))));
}
if (!defined('APP_DIR'))
{
//define('APP_DIR', 'DIRECTORY NAME OF APPLICATION';
define ('APP_DIR', basename(dirname(dirname(__FILE__))));
}
/**
* This only needs to be changed if the cake installed libs are located
* outside of the distributed directory structure.
*/
if (!defined('CAKE_CORE_INCLUDE_PATH'))
{
//define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
//You should also use the DS define to seperate your directories
define('CAKE_CORE_INCLUDE_PATH', ROOT);
}
///////////////////////////////
//DO NOT EDIT BELOW THIS LINE//
///////////////////////////////
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',ini_get('include_path').PATH_SEPARATOR.CAKE_CORE_INCLUDE_PATH.PATH_SEPARATOR.ROOT.DS.APP_DIR.DS);
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);
}
}
require CORE_PATH.'cake'.DS.'bootstrap.php';
if(isset($_GET['url']) && $_GET['url'] === 'favicon.ico')
{
}
else
{
$Dispatcher= new Dispatcher ();
$Dispatcher->dispatch($url);
}
if (DEBUG)
{
echo "<!-- ". round(getMicrotime() - $TIME_START, 4) ."s -->";
}
?>

View file

@ -0,0 +1,40 @@
<?php
/* SVN FILE: $Id$ */
/**
* 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 : Rapid Development Framework <http://www.cakephp.org/>
* Copyright (c) 2006, 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.
*
* @filesource
* @copyright Copyright (c) 2006, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
* @package cake
* @subpackage cake.app.webroot.js
* @since CakePHP v 0.2.9
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
* Enter description here...
*/
if(is_file('../../vendors/javascript/'.$_GET['file']) && (preg_match('/(.+)\\.js/', $_GET['file'])))
{
readfile('../../vendors/javascript/'.$_GET['file']);
}
?>

View file

@ -0,0 +1,16 @@
<?php
$output = "<p style=\"background:#DBA941;padding:4px;font-size: 16px;\">Your database configuration file is <?php echo file_exists(CONFIGS.'database.php') ?' present.' . \$filePresent = ' ' : ' not present.'; ?></p>\n";
$output .= "<?php if (!empty(\$filePresent)):?>\n";
$output .= "<?php \$db = ConnectionManager::getInstance(); ?>\n";
$output .= "<?php \$connected = \$db->getDataSource('default'); ?>\n";
$output .= "<p style=\"background:#DBA941;padding:4px;font-size: 16px;\">Cake<?php echo \$connected->isConnected() ? ' is able to' : ' is not able to';?> connect to the database.</p>\n";
$output .= "<br />\n";
$output .= "<?php endif; ?>\n";
$output .= "<h1>CakePHP just \"Baked\" your application: ".Inflector::humanize($app)."</h1>\n";
$output .= "<h2>Editing this Page</h2>\n";
$output .= "<p>\n";
$output .= "To change the content of this page, edit: ".$dir.DS."views".DS."pages".DS."home.thtml.<br />\n";
$output .= "To change its layout, edit: ".$dir.DS."views".DS."layouts".DS."default.thtml.<br />\n";
$output .= "You can also add some CSS styles for your pages at: ".$dir.DS."webroot/css/.\n";
$output .= "</p>\n";
?>

View file

@ -37,7 +37,7 @@ define ('DS', DIRECTORY_SEPARATOR);
define ('ROOT', dirname(__FILE__));
define ('WEBROOT_DIR', 'webroot');
define('WWW_ROOT', ROOT.APP_DIR.DS.WEBROOT_DIR.DS);
define('WWW_ROOT', ROOT.DS.APP_DIR.DS.WEBROOT_DIR.DS);
/**
* This only needs to be changed if the cake installed libs are located
* outside of the distributed directory structure.