adding a copy of CakePHP 1.3.6
This commit is contained in:
6
web/html/cake/app/webroot/.htaccess
Normal file
6
web/html/cake/app/webroot/.htaccess
Normal 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>
|
96
web/html/cake/app/webroot/css.php
Normal file
96
web/html/cake/app/webroot/css.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* CSS helping functions
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package cake
|
||||
* @subpackage cake.app.webroot
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
|
||||
header('HTTP/1.1 404 Not Found');
|
||||
exit('File Not Found');
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure required classes are available.
|
||||
*/
|
||||
if (!class_exists('File')) {
|
||||
uses('file');
|
||||
}
|
||||
|
||||
/**
|
||||
* Make clean CSS
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
/**
|
||||
* Write CSS cache
|
||||
*
|
||||
* @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;
|
535
web/html/cake/app/webroot/css/cake.generic.css
Normal file
535
web/html/cake/app/webroot/css/cake.generic.css
Normal file
@@ -0,0 +1,535 @@
|
||||
/**
|
||||
*
|
||||
* Generic CSS for CakePHP
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package cake
|
||||
* @subpackage cake.app.webroot.css
|
||||
* @since CakePHP(tm)
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
* {
|
||||
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 {
|
||||
color: #003d4c;
|
||||
text-decoration: underline;
|
||||
font-weight: bold;
|
||||
}
|
||||
a:hover {
|
||||
color: #367889;
|
||||
text-decoration:none;
|
||||
}
|
||||
a img {
|
||||
border:none;
|
||||
}
|
||||
h1, h2, h3, h4 {
|
||||
font-weight: normal;
|
||||
margin-bottom:0.5em;
|
||||
}
|
||||
h1 {
|
||||
background:#fff;
|
||||
color: #003d4c;
|
||||
font-size: 100%;
|
||||
}
|
||||
h2 {
|
||||
background:#fff;
|
||||
color: #e32;
|
||||
font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif;
|
||||
font-size: 190%;
|
||||
}
|
||||
h3 {
|
||||
color: #993;
|
||||
font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif;
|
||||
font-size: 165%;
|
||||
}
|
||||
h4 {
|
||||
color: #993;
|
||||
font-weight: normal;
|
||||
}
|
||||
ul, li {
|
||||
margin: 0 12px;
|
||||
}
|
||||
|
||||
/** Layout **/
|
||||
#container {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#header{
|
||||
padding: 10px 20px;
|
||||
}
|
||||
#header h1 {
|
||||
line-height:20px;
|
||||
background: #003d4c url('../img/cake.icon.png') 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;
|
||||
}
|
||||
|
||||
/** containers **/
|
||||
div.form,
|
||||
div.index,
|
||||
div.view {
|
||||
float:right;
|
||||
width:76%;
|
||||
border-left:1px solid #666;
|
||||
padding:10px 2%;
|
||||
}
|
||||
div.actions {
|
||||
float:left;
|
||||
width:16%;
|
||||
padding:10px 1.5%;
|
||||
}
|
||||
div.actions h3 {
|
||||
padding-top:0;
|
||||
color:#777;
|
||||
}
|
||||
|
||||
|
||||
/** Tables **/
|
||||
table {
|
||||
background: #fff;
|
||||
border-right:0;
|
||||
clear: both;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
th {
|
||||
border:0;
|
||||
border-bottom:2px solid #555;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
}
|
||||
th a {
|
||||
display: block;
|
||||
padding: 2px 4px;
|
||||
text-decoration: none;
|
||||
}
|
||||
th a.asc:after {
|
||||
content: ' ⇣';
|
||||
}
|
||||
th a.desc:after {
|
||||
content: ' ⇡';
|
||||
}
|
||||
table tr td {
|
||||
background: #fff;
|
||||
padding: 6px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
border-bottom:1px solid #ddd;
|
||||
}
|
||||
table tr:nth-child(2n) td {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
table .altrow td {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
td.actions {
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
table td.actions a {
|
||||
margin: 0px 6px;
|
||||
padding:2px 5px;
|
||||
}
|
||||
.cake-sql-log table {
|
||||
background: #f4f4f4;
|
||||
}
|
||||
.cake-sql-log td {
|
||||
padding: 4px 8px;
|
||||
text-align: left;
|
||||
font-family: Monaco, Consolas, "Courier New", monospaced;
|
||||
}
|
||||
.cake-sql-log caption {
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
/** Paging **/
|
||||
div.paging {
|
||||
background:#fff;
|
||||
color: #ccc;
|
||||
margin-top: 1em;
|
||||
clear:both;
|
||||
}
|
||||
div.paging span.disabled {
|
||||
color: #ddd;
|
||||
display: inline;
|
||||
}
|
||||
div.paging span.current {
|
||||
color: #c73e14;
|
||||
}
|
||||
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: 95%;
|
||||
}
|
||||
fieldset {
|
||||
border: 1px solid #ccc;
|
||||
margin-bottom: 1em;
|
||||
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 .input {
|
||||
color: #444;
|
||||
}
|
||||
form .required {
|
||||
font-weight: bold;
|
||||
}
|
||||
form .required label:after {
|
||||
color: #e32;
|
||||
content: '*';
|
||||
display:inline;
|
||||
}
|
||||
form div.submit {
|
||||
border: 0;
|
||||
clear: both;
|
||||
margin-top: 10px;
|
||||
}
|
||||
label {
|
||||
display: block;
|
||||
font-size: 110%;
|
||||
margin-bottom:3px;
|
||||
}
|
||||
input, textarea {
|
||||
clear: both;
|
||||
font-size: 140%;
|
||||
font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif;
|
||||
padding: 1%;
|
||||
width:98%;
|
||||
}
|
||||
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;
|
||||
}
|
||||
div.checkbox label {
|
||||
display: inline;
|
||||
}
|
||||
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%;
|
||||
width: auto;
|
||||
}
|
||||
form .submit input[type=submit] {
|
||||
background:#62af56;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#a8ea9c), to(#62af56));
|
||||
background-image: -moz-linear-gradient(top, #a8ea9c, #62af56);
|
||||
border-color: #2d6324;
|
||||
color: #000;
|
||||
text-shadow: #8cee7c 0px 1px 0px;
|
||||
}
|
||||
form .submit input[type=submit]:hover {
|
||||
background:#4ca83d;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#85e573), to(#4ca83d));
|
||||
background-image: -moz-linear-gradient(top, #85e573, #4ca83d);
|
||||
}
|
||||
|
||||
/** Notices and Errors **/
|
||||
div.message {
|
||||
clear: both;
|
||||
color: #fff;
|
||||
font-size: 140%;
|
||||
font-weight: bold;
|
||||
margin: 0 0 1em 0;
|
||||
background: #c73e14;
|
||||
padding: 5px;
|
||||
}
|
||||
div.error-message {
|
||||
clear: both;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
background: #c73e14;
|
||||
}
|
||||
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: 0;
|
||||
padding: 0;
|
||||
}
|
||||
div.actions li {
|
||||
margin:0 0 0.5em 0;
|
||||
list-style-type: none;
|
||||
white-space: nowrap;
|
||||
padding: 0;
|
||||
}
|
||||
div.actions ul li a {
|
||||
font-weight: normal;
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
div.actions ul li a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
input[type=submit],
|
||||
div.actions ul li a,
|
||||
td.actions a {
|
||||
font-weight:normal;
|
||||
padding: 4px 8px;
|
||||
background:#e6e49f;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#f1f1d4), to(#e6e49f));
|
||||
background-image: -moz-linear-gradient(top, #f1f1d4, #e6e49f);
|
||||
color:#333;
|
||||
border:1px solid #aaac62;
|
||||
-webkit-border-radius:8px;
|
||||
-moz-border-radius:8px;
|
||||
border-radius:8px;
|
||||
text-decoration:none;
|
||||
text-shadow: #fff 0px 1px 0px;
|
||||
min-width: 0;
|
||||
}
|
||||
input[type=submit]:hover,
|
||||
div.actions ul li a:hover,
|
||||
td.actions a:hover {
|
||||
background: #f0f09a;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#f7f7e1), to(#eeeca9));
|
||||
}
|
||||
|
||||
/** 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;
|
||||
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;
|
||||
}
|
BIN
web/html/cake/app/webroot/favicon.ico
Normal file
BIN
web/html/cake/app/webroot/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 372 B |
0
web/html/cake/app/webroot/files/empty
Normal file
0
web/html/cake/app/webroot/files/empty
Normal file
BIN
web/html/cake/app/webroot/img/cake.icon.png
Normal file
BIN
web/html/cake/app/webroot/img/cake.icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 943 B |
BIN
web/html/cake/app/webroot/img/cake.power.gif
Normal file
BIN
web/html/cake/app/webroot/img/cake.power.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 201 B |
84
web/html/cake/app/webroot/index.php
Normal file
84
web/html/cake/app/webroot/index.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**
|
||||
* Index
|
||||
*
|
||||
* The Front Controller for handling every request
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package cake
|
||||
* @subpackage cake.app.webroot
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
/**
|
||||
* 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();
|
||||
}
|
0
web/html/cake/app/webroot/js/empty
Normal file
0
web/html/cake/app/webroot/js/empty
Normal file
94
web/html/cake/app/webroot/test.php
Normal file
94
web/html/cake/app/webroot/test.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* Web Access Frontend for TestSuite
|
||||
*
|
||||
* PHP versions 4 and 5
|
||||
*
|
||||
* CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
|
||||
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The Open Group Test Suite License
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://book.cakephp.org/view/1196/Testing
|
||||
* @package cake
|
||||
* @subpackage cake.app.webroot
|
||||
* @since CakePHP(tm) v 1.2.0.4433
|
||||
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
||||
*/
|
||||
set_time_limit(0);
|
||||
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 = App::core('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);
|
||||
}
|
||||
|
||||
if (Configure::read('debug') < 1) {
|
||||
die(__('Debug setting does not allow access to this url.', true));
|
||||
}
|
||||
|
||||
require_once CAKE_TESTS_LIB . 'cake_test_suite_dispatcher.php';
|
||||
|
||||
$Dispatcher = new CakeTestSuiteDispatcher();
|
||||
$Dispatcher->dispatch();
|
Reference in New Issue
Block a user