before upload
This commit is contained in:
commit
2d72ae7982
|
@ -0,0 +1,13 @@
|
|||
; This file is for unifying the coding style for different editors and IDEs.
|
||||
; More information at http://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.bat]
|
||||
end_of_line = crlf
|
|
@ -0,0 +1,23 @@
|
|||
# User specific & automatically generated files #
|
||||
#################################################
|
||||
/app/Config/database.php
|
||||
/app/tmp
|
||||
/lib/Cake/Console/Templates/skel/tmp/
|
||||
/plugins
|
||||
/vendors
|
||||
/build
|
||||
/dist
|
||||
/tags
|
||||
upload.sh
|
||||
*~
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
Icon?
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
|
@ -0,0 +1,5 @@
|
|||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
RewriteRule ^$ app/webroot/ [L]
|
||||
RewriteRule (.*) app/webroot/$1 [L]
|
||||
</IfModule>
|
|
@ -0,0 +1,118 @@
|
|||
language: php
|
||||
|
||||
php:
|
||||
- 5.2
|
||||
- 5.3
|
||||
- 5.4
|
||||
- 5.5
|
||||
|
||||
env:
|
||||
- DB=mysql
|
||||
- DB=pgsql
|
||||
- DB=sqlite
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- php: 5.4
|
||||
env:
|
||||
- PHPCS=1
|
||||
|
||||
before_script:
|
||||
- sudo locale-gen de_DE
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test2;'; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test3;'; fi"
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test2;' -U postgres -d cakephp_test; fi"
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test3;' -U postgres -d cakephp_test; fi"
|
||||
- chmod -R 777 ./app/tmp
|
||||
- sudo apt-get install lighttpd
|
||||
- sh -c "if [ '$PHPCS' = '1' ]; then pear channel-discover pear.cakephp.org; fi"
|
||||
- sh -c "if [ '$PHPCS' = '1' ]; then pear install --alldeps cakephp/CakePHP_CodeSniffer; fi"
|
||||
- phpenv rehash
|
||||
- set +H
|
||||
- echo "<?php
|
||||
class DATABASE_CONFIG {
|
||||
private \$identities = array(
|
||||
'mysql' => array(
|
||||
'datasource' => 'Database/Mysql',
|
||||
'host' => '0.0.0.0',
|
||||
'login' => 'travis'
|
||||
),
|
||||
'pgsql' => array(
|
||||
'datasource' => 'Database/Postgres',
|
||||
'host' => '127.0.0.1',
|
||||
'login' => 'postgres',
|
||||
'database' => 'cakephp_test',
|
||||
'schema' => array(
|
||||
'default' => 'public',
|
||||
'test' => 'public',
|
||||
'test2' => 'test2',
|
||||
'test_database_three' => 'test3'
|
||||
)
|
||||
),
|
||||
'sqlite' => array(
|
||||
'datasource' => 'Database/Sqlite',
|
||||
'database' => array(
|
||||
'default' => ':memory:',
|
||||
'test' => ':memory:',
|
||||
'test2' => '/tmp/cakephp_test2.db',
|
||||
'test_database_three' => '/tmp/cakephp_test3.db'
|
||||
),
|
||||
)
|
||||
);
|
||||
public \$default = array(
|
||||
'persistent' => false,
|
||||
'host' => '',
|
||||
'login' => '',
|
||||
'password' => '',
|
||||
'database' => 'cakephp_test',
|
||||
'prefix' => ''
|
||||
);
|
||||
public \$test = array(
|
||||
'persistent' => false,
|
||||
'host' => '',
|
||||
'login' => '',
|
||||
'password' => '',
|
||||
'database' => 'cakephp_test',
|
||||
'prefix' => ''
|
||||
);
|
||||
public \$test2 = array(
|
||||
'persistent' => false,
|
||||
'host' => '',
|
||||
'login' => '',
|
||||
'password' => '',
|
||||
'database' => 'cakephp_test2',
|
||||
'prefix' => ''
|
||||
);
|
||||
public \$test_database_three = array(
|
||||
'persistent' => false,
|
||||
'host' => '',
|
||||
'login' => '',
|
||||
'password' => '',
|
||||
'database' => 'cakephp_test3',
|
||||
'prefix' => ''
|
||||
);
|
||||
public function __construct() {
|
||||
\$db = 'mysql';
|
||||
if (!empty(\$_SERVER['DB'])) {
|
||||
\$db = \$_SERVER['DB'];
|
||||
}
|
||||
foreach (array('default', 'test', 'test2', 'test_database_three') as \$source) {
|
||||
\$config = array_merge(\$this->{\$source}, \$this->identities[\$db]);
|
||||
if (is_array(\$config['database'])) {
|
||||
\$config['database'] = \$config['database'][\$source];
|
||||
}
|
||||
if (!empty(\$config['schema']) && is_array(\$config['schema'])) {
|
||||
\$config['schema'] = \$config['schema'][\$source];
|
||||
}
|
||||
\$this->{\$source} = \$config;
|
||||
}
|
||||
}
|
||||
}" > app/Config/database.php
|
||||
|
||||
script:
|
||||
- sh -c "if [ '$PHPCS' = '1' ]; then phpcs -p --extensions=php --standard=CakePHP ./lib/Cake; elif [ '$DB' = 'mysql' ]; then ./lib/Cake/Console/cake test core AllTests --stderr; else ./lib/Cake/Console/cake test core AllDbRelated --stderr; fi"
|
||||
|
||||
notifications:
|
||||
email: false
|
|
@ -0,0 +1,73 @@
|
|||
# How to contribute
|
||||
|
||||
CakePHP loves to welcome your contributions. There are several ways to help out:
|
||||
* Create an [issue](https://github.com/cakephp/cakephp/issues) on GitHub, if you have found a bug
|
||||
* Write testcases for open bug issues
|
||||
* Write patches for open bug/feature issues, preferably with testcases included
|
||||
* Contribute to the [documentation](https://github.com/cakephp/docs)
|
||||
|
||||
There are a few guidelines that we need contributors to follow so that we have a
|
||||
chance of keeping on top of things.
|
||||
|
||||
## Getting Started
|
||||
|
||||
* Make sure you have a [GitHub account](https://github.com/signup/free).
|
||||
* Submit an [issue](https://github.com/cakephp/cakephp/issues), assuming one does not already exist.
|
||||
* Clearly describe the issue including steps to reproduce when it is a bug.
|
||||
* Make sure you fill in the earliest version that you know has the issue.
|
||||
* Fork the repository on GitHub.
|
||||
|
||||
## Making Changes
|
||||
|
||||
* Create a topic branch from where you want to base your work.
|
||||
* This is usually the master branch.
|
||||
* Only target release branches if you are certain your fix must be on that
|
||||
branch.
|
||||
* To quickly create a topic branch based on master; `git branch
|
||||
master/my_contribution master` then checkout the new branch with `git
|
||||
checkout master/my_contribution`. Better avoid working directly on the
|
||||
`master` branch, to avoid conflicts if you pull in updates from origin.
|
||||
* Make commits of logical units.
|
||||
* Check for unnecessary whitespace with `git diff --check` before committing.
|
||||
* Use descriptive commit messages and reference the #issue number.
|
||||
* Core testcases should continue to pass. You can run tests locally or enable
|
||||
[travis-ci](https://travis-ci.org/) for your fork, so all tests and codesniffs
|
||||
will be executed.
|
||||
* Your work should apply the CakePHP coding standards.
|
||||
|
||||
## Which branch to base the work
|
||||
|
||||
* Bugfix branches will be based on master.
|
||||
* New features that are backwards compatible will be based on next minor release
|
||||
branch.
|
||||
* New features or other non-BC changes will go in the next major release branch.
|
||||
|
||||
## Submitting Changes
|
||||
|
||||
* Push your changes to a topic branch in your fork of the repository.
|
||||
* Submit a pull request to the repository in the cakephp organization, with the
|
||||
correct target branch.
|
||||
|
||||
## Testcases and codesniffer
|
||||
|
||||
CakePHP tests requires [PHPUnit](http://www.phpunit.de/manual/current/en/installation.html)
|
||||
3.5 or higher. To run the testcases locally use the following command:
|
||||
|
||||
./lib/Cake/Console/cake test core AllTests --stderr
|
||||
|
||||
To run the sniffs for CakePHP coding standards:
|
||||
|
||||
phpcs -p --extensions=php --standard=CakePHP ./lib/Cake
|
||||
|
||||
Check the [cakephp-codesniffer](https://github.com/cakephp/cakephp-codesniffer)
|
||||
repository to setup the CakePHP standard. The README contains installation info
|
||||
for the sniff and phpcs.
|
||||
|
||||
# Additional Resources
|
||||
|
||||
* [CakePHP coding standards](http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html)
|
||||
* [Existing issues](https://github.com/cakephp/cakephp/issues)
|
||||
* [Development Roadmaps](https://github.com/cakephp/cakephp/wiki#roadmaps)
|
||||
* [General GitHub documentation](https://help.github.com/)
|
||||
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
|
||||
* #cakephp IRC channel on freenode.org
|
|
@ -0,0 +1,43 @@
|
|||
CakePHP
|
||||
=======
|
||||
|
||||
[![CakePHP](http://cakephp.org/img/cake-logo.png)](http://www.cakephp.org)
|
||||
|
||||
CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.
|
||||
Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.
|
||||
|
||||
Some Handy Links
|
||||
----------------
|
||||
|
||||
[CakePHP](http://www.cakephp.org) - The rapid development PHP framework
|
||||
|
||||
[CookBook](http://book.cakephp.org) - THE CakePHP user documentation; start learning here!
|
||||
|
||||
[API](http://api.cakephp.org) - A reference to CakePHP's classes
|
||||
|
||||
[Plugins](http://plugins.cakephp.org/) - A repository of extensions to the framework
|
||||
|
||||
[The Bakery](http://bakery.cakephp.org) - Tips, tutorials and articles
|
||||
|
||||
[Community Center](http://community.cakephp.org) - A source for everything community related
|
||||
|
||||
[Training](http://training.cakephp.org) - Join a live session and get skilled with the framework
|
||||
|
||||
[CakeFest](http://cakefest.org) - Don't miss our annual CakePHP conference
|
||||
|
||||
[Cake Software Foundation](http://cakefoundation.org) - Promoting development related to CakePHP
|
||||
|
||||
Get Support!
|
||||
------------
|
||||
|
||||
[#cakephp](http://webchat.freenode.net/?channels=#cakephp) on irc.freenode.net - Come chat with us, we have cake
|
||||
|
||||
[Google Group](https://groups.google.com/group/cake-php) - Community mailing list and forum
|
||||
|
||||
[GitHub Issues](https://github.com/cakephp/cakephp/issues) - Got issues? Please tell us!
|
||||
|
||||
[Roadmaps](https://github.com/cakephp/cakephp/wiki#roadmaps) - Want to contribute? Get involved!
|
||||
|
||||
[![Bake Status](https://secure.travis-ci.org/cakephp/cakephp.png?branch=master)](http://travis-ci.org/cakephp/cakephp)
|
||||
|
||||
![Cake Power](https://raw.github.com/cakephp/cakephp/master/lib/Cake/Console/Templates/skel/webroot/img/cake.power.gif)
|
|
@ -0,0 +1,5 @@
|
|||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
RewriteRule ^$ webroot/ [L]
|
||||
RewriteRule (.*) webroot/$1 [L]
|
||||
</IfModule>
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
/**
|
||||
* This is Acl Schema file
|
||||
*
|
||||
* Use it to configure database for ACL
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config.Schema
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* Using the Schema command line utility
|
||||
* cake schema run create DbAcl
|
||||
*
|
||||
*/
|
||||
class DbAclSchema extends CakeSchema {
|
||||
|
||||
public function before($event = array()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function after($event = array()) {
|
||||
}
|
||||
|
||||
public $acos = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
||||
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'model' => array('type' => 'string', 'null' => true),
|
||||
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'alias' => array('type' => 'string', 'null' => true),
|
||||
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
|
||||
);
|
||||
|
||||
public $aros = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
||||
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'model' => array('type' => 'string', 'null' => true),
|
||||
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'alias' => array('type' => 'string', 'null' => true),
|
||||
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
||||
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
|
||||
);
|
||||
|
||||
public $aros_acos = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
||||
'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
|
||||
'aco_id' => array('type' => 'integer', 'null' => false, 'length' => 10),
|
||||
'_create' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
||||
'_read' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
||||
'_update' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
||||
'_delete' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
||||
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1))
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
# $Id$
|
||||
#
|
||||
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
#
|
||||
# Licensed under The MIT License
|
||||
# For full copyright and license information, please see the LICENSE.txt
|
||||
# Redistributions of files must retain the above copyright notice.
|
||||
# MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
|
||||
CREATE TABLE acos (
|
||||
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
parent_id INTEGER(10) DEFAULT NULL,
|
||||
model VARCHAR(255) DEFAULT '',
|
||||
foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
|
||||
alias VARCHAR(255) DEFAULT '',
|
||||
lft INTEGER(10) DEFAULT NULL,
|
||||
rght INTEGER(10) DEFAULT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE aros_acos (
|
||||
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
aro_id INTEGER(10) UNSIGNED NOT NULL,
|
||||
aco_id INTEGER(10) UNSIGNED NOT NULL,
|
||||
_create CHAR(2) NOT NULL DEFAULT 0,
|
||||
_read CHAR(2) NOT NULL DEFAULT 0,
|
||||
_update CHAR(2) NOT NULL DEFAULT 0,
|
||||
_delete CHAR(2) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY(id)
|
||||
);
|
||||
|
||||
CREATE TABLE aros (
|
||||
id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
parent_id INTEGER(10) DEFAULT NULL,
|
||||
model VARCHAR(255) DEFAULT '',
|
||||
foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
|
||||
alias VARCHAR(255) DEFAULT '',
|
||||
lft INTEGER(10) DEFAULT NULL,
|
||||
rght INTEGER(10) DEFAULT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
/**
|
||||
* This is i18n Schema file
|
||||
*
|
||||
* Use it to configure database for i18n
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config.Schema
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* Using the Schema command line utility
|
||||
*
|
||||
* Use it to configure database for i18n
|
||||
*
|
||||
* cake schema run create i18n
|
||||
*/
|
||||
class I18nSchema extends CakeSchema {
|
||||
|
||||
public $name = 'i18n';
|
||||
|
||||
public function before($event = array()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function after($event = array()) {
|
||||
}
|
||||
|
||||
public $i18n = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
||||
'locale' => array('type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'),
|
||||
'model' => array('type' => 'string', 'null' => false, 'key' => 'index'),
|
||||
'foreign_key' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
|
||||
'field' => array('type' => 'string', 'null' => false, 'key' => 'index'),
|
||||
'content' => array('type' => 'text', 'null' => true, 'default' => null),
|
||||
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0))
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
# $Id$
|
||||
#
|
||||
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
#
|
||||
# Licensed under The MIT License
|
||||
# For full copyright and license information, please see the LICENSE.txt
|
||||
# Redistributions of files must retain the above copyright notice.
|
||||
# MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
|
||||
CREATE TABLE i18n (
|
||||
id int(10) NOT NULL auto_increment,
|
||||
locale varchar(6) NOT NULL,
|
||||
model varchar(255) NOT NULL,
|
||||
foreign_key int(10) NOT NULL,
|
||||
field varchar(255) NOT NULL,
|
||||
content mediumtext,
|
||||
PRIMARY KEY (id),
|
||||
# UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field),
|
||||
# INDEX I18N_LOCALE_ROW(locale, model, foreign_key),
|
||||
# INDEX I18N_LOCALE_MODEL(locale, model),
|
||||
# INDEX I18N_FIELD(model, foreign_key, field),
|
||||
# INDEX I18N_ROW(model, foreign_key),
|
||||
INDEX locale (locale),
|
||||
INDEX model (model),
|
||||
INDEX row_id (foreign_key),
|
||||
INDEX field (field)
|
||||
);
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* This is Sessions Schema file
|
||||
*
|
||||
* Use it to configure database for Sessions
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config.Schema
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* Using the Schema command line utility
|
||||
* cake schema run create Sessions
|
||||
*
|
||||
*/
|
||||
class SessionsSchema extends CakeSchema {
|
||||
|
||||
public $name = 'Sessions';
|
||||
|
||||
public function before($event = array()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function after($event = array()) {
|
||||
}
|
||||
|
||||
public $cake_sessions = array(
|
||||
'id' => array('type' => 'string', 'null' => false, 'key' => 'primary'),
|
||||
'data' => array('type' => 'text', 'null' => true, 'default' => null),
|
||||
'expires' => array('type' => 'integer', 'null' => true, 'default' => null),
|
||||
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
# $Id$
|
||||
#
|
||||
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
# 1785 E. Sahara Avenue, Suite 490-204
|
||||
# Las Vegas, Nevada 89104
|
||||
#
|
||||
# Licensed under The MIT License
|
||||
# For full copyright and license information, please see the LICENSE.txt
|
||||
# Redistributions of files must retain the above copyright notice.
|
||||
# MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
|
||||
CREATE TABLE cake_sessions (
|
||||
id varchar(255) NOT NULL default '',
|
||||
data text,
|
||||
expires int(11) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
|
@ -0,0 +1,65 @@
|
|||
;<?php exit() ?>
|
||||
;/**
|
||||
; * ACL Configuration
|
||||
; *
|
||||
; * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
; * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
; *
|
||||
; * Licensed under The MIT License
|
||||
; * Redistributions of files must retain the above copyright notice.
|
||||
; *
|
||||
; * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
; * @link http://cakephp.org CakePHP(tm) Project
|
||||
; * @package app.Config
|
||||
; * @since CakePHP(tm) v 0.10.0.1076
|
||||
; * @license http://www.opensource.org/licenses/mit-license.php 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
|
|
@ -0,0 +1,133 @@
|
|||
<?php
|
||||
/**
|
||||
* This is the PHP base ACL configuration file.
|
||||
*
|
||||
* Use it to configure access control of your CakePHP application.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config
|
||||
* @since CakePHP(tm) v 2.1
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Example
|
||||
* -------
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
* 1. In your application you created a User model with the following properties:
|
||||
* username, group_id, password, email, firstname, lastname and so on.
|
||||
* 2. You configured AuthComponent to authorize actions via
|
||||
* $this->Auth->authorize = array('Actions' => array('actionPath' => 'controllers/'),...)
|
||||
*
|
||||
* Now, when a user (i.e. jeff) authenticates successfully and requests a controller action (i.e. /invoices/delete)
|
||||
* that is not allowed by default (e.g. via $this->Auth->allow('edit') in the Invoices controller) then AuthComponent
|
||||
* will ask the configured ACL interface if access is granted. Under the assumptions 1. and 2. this will be
|
||||
* done via a call to Acl->check() with
|
||||
*
|
||||
* array('User' => array('username' => 'jeff', 'group_id' => 4, ...))
|
||||
*
|
||||
* as ARO and
|
||||
*
|
||||
* '/controllers/invoices/delete'
|
||||
*
|
||||
* as ACO.
|
||||
*
|
||||
* If the configured map looks like
|
||||
*
|
||||
* $config['map'] = array(
|
||||
* 'User' => 'User/username',
|
||||
* 'Role' => 'User/group_id',
|
||||
* );
|
||||
*
|
||||
* then PhpAcl will lookup if we defined a role like User/jeff. If that role is not found, PhpAcl will try to
|
||||
* find a definition for Role/4. If the definition isn't found then a default role (Role/default) will be used to
|
||||
* check rules for the given ACO. The search can be expanded by defining aliases in the alias configuration.
|
||||
* E.g. if you want to use a more readable name than Role/4 in your definitions you can define an alias like
|
||||
*
|
||||
* $config['alias'] = array(
|
||||
* 'Role/4' => 'Role/editor',
|
||||
* );
|
||||
*
|
||||
* In the roles configuration you can define roles on the lhs and inherited roles on the rhs:
|
||||
*
|
||||
* $config['roles'] = array(
|
||||
* 'Role/admin' => null,
|
||||
* 'Role/accountant' => null,
|
||||
* 'Role/editor' => null,
|
||||
* 'Role/manager' => 'Role/editor, Role/accountant',
|
||||
* 'User/jeff' => 'Role/manager',
|
||||
* );
|
||||
*
|
||||
* In this example manager inherits all rules from editor and accountant. Role/admin doesn't inherit from any role.
|
||||
* Lets define some rules:
|
||||
*
|
||||
* $config['rules'] = array(
|
||||
* 'allow' => array(
|
||||
* '*' => 'Role/admin',
|
||||
* 'controllers/users/(dashboard|profile)' => 'Role/default',
|
||||
* 'controllers/invoices/*' => 'Role/accountant',
|
||||
* 'controllers/articles/*' => 'Role/editor',
|
||||
* 'controllers/users/*' => 'Role/manager',
|
||||
* 'controllers/invoices/delete' => 'Role/manager',
|
||||
* ),
|
||||
* 'deny' => array(
|
||||
* 'controllers/invoices/delete' => 'Role/accountant, User/jeff',
|
||||
* 'controllers/articles/(delete|publish)' => 'Role/editor',
|
||||
* ),
|
||||
* );
|
||||
*
|
||||
* Ok, so as jeff inherits from Role/manager he's matched every rule that references User/jeff, Role/manager,
|
||||
* Role/editor, Role/accountant and Role/default. However, for jeff, rules for User/jeff are more specific than
|
||||
* rules for Role/manager, rules for Role/manager are more specific than rules for Role/editor and so on.
|
||||
* This is important when allow and deny rules match for a role. E.g. Role/accountant is allowed
|
||||
* controllers/invoices/* but at the same time controllers/invoices/delete is denied. But there is a more
|
||||
* specific rule defined for Role/manager which is allowed controllers/invoices/delete. However, the most specific
|
||||
* rule denies access to the delete action explicitly for User/jeff, so he'll be denied access to the resource.
|
||||
*
|
||||
* If we would remove the role definition for User/jeff, then jeff would be granted access as he would be resolved
|
||||
* to Role/manager and Role/manager has an allow rule.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The role map defines how to resolve the user record from your application
|
||||
* to the roles you defined in the roles configuration.
|
||||
*/
|
||||
$config['map'] = array(
|
||||
'User' => 'User/username',
|
||||
'Role' => 'User/group_id',
|
||||
);
|
||||
|
||||
/**
|
||||
* define aliases to map your model information to
|
||||
* the roles defined in your role configuration.
|
||||
*/
|
||||
$config['alias'] = array(
|
||||
'Role/4' => 'Role/editor',
|
||||
);
|
||||
|
||||
/**
|
||||
* role configuration
|
||||
*/
|
||||
$config['roles'] = array(
|
||||
'Role/admin' => null,
|
||||
);
|
||||
|
||||
/**
|
||||
* rule configuration
|
||||
*/
|
||||
$config['rules'] = array(
|
||||
'allow' => array(
|
||||
'*' => 'Role/admin',
|
||||
),
|
||||
'deny' => array(),
|
||||
);
|
|
@ -0,0 +1,107 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is loaded automatically by the app/webroot/index.php file after core.php
|
||||
*
|
||||
* This file should load/create any application wide configuration settings, such as
|
||||
* Caching, Logging, loading additional configuration files.
|
||||
*
|
||||
* You should also use this file to include any files that provide global functions/constants
|
||||
* that your application uses.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config
|
||||
* @since CakePHP(tm) v 0.10.8.2117
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
// Setup a 'default' cache configuration for use in the application.
|
||||
Cache::config('default', array('engine' => 'File'));
|
||||
|
||||
/**
|
||||
* The settings below can be used to set additional paths to models, views and controllers.
|
||||
*
|
||||
* App::build(array(
|
||||
* 'Model' => array('/path/to/models/', '/next/path/to/models/'),
|
||||
* 'Model/Behavior' => array('/path/to/behaviors/', '/next/path/to/behaviors/'),
|
||||
* 'Model/Datasource' => array('/path/to/datasources/', '/next/path/to/datasources/'),
|
||||
* 'Model/Datasource/Database' => array('/path/to/databases/', '/next/path/to/database/'),
|
||||
* 'Model/Datasource/Session' => array('/path/to/sessions/', '/next/path/to/sessions/'),
|
||||
* 'Controller' => array('/path/to/controllers/', '/next/path/to/controllers/'),
|
||||
* 'Controller/Component' => array('/path/to/components/', '/next/path/to/components/'),
|
||||
* 'Controller/Component/Auth' => array('/path/to/auths/', '/next/path/to/auths/'),
|
||||
* 'Controller/Component/Acl' => array('/path/to/acls/', '/next/path/to/acls/'),
|
||||
* 'View' => array('/path/to/views/', '/next/path/to/views/'),
|
||||
* 'View/Helper' => array('/path/to/helpers/', '/next/path/to/helpers/'),
|
||||
* 'Console' => array('/path/to/consoles/', '/next/path/to/consoles/'),
|
||||
* 'Console/Command' => array('/path/to/commands/', '/next/path/to/commands/'),
|
||||
* 'Console/Command/Task' => array('/path/to/tasks/', '/next/path/to/tasks/'),
|
||||
* 'Lib' => array('/path/to/libs/', '/next/path/to/libs/'),
|
||||
* 'Locale' => array('/path/to/locales/', '/next/path/to/locales/'),
|
||||
* 'Vendor' => array('/path/to/vendors/', '/next/path/to/vendors/'),
|
||||
* 'Plugin' => array('/path/to/plugins/', '/next/path/to/plugins/'),
|
||||
* ));
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Custom Inflector rules can be set to correctly pluralize or singularize table, model, controller names or whatever other
|
||||
* string is passed to the inflection functions
|
||||
*
|
||||
* Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
|
||||
* Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
|
||||
* Uncomment one of the lines below, as you need. Make sure you read the documentation on CakePlugin to use more
|
||||
* advanced ways of loading plugins
|
||||
*
|
||||
* CakePlugin::loadAll(); // Loads all plugins at once
|
||||
* CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* You can attach event listeners to the request lifecycle as Dispatcher Filter. By default CakePHP bundles two filters:
|
||||
*
|
||||
* - AssetDispatcher filter will serve your asset files (css, images, js, etc) from your themes and plugins
|
||||
* - CacheDispatcher filter will read the Cache.check configure variable and try to serve cached content generated from controllers
|
||||
*
|
||||
* Feel free to remove or add filters as you see fit for your application. A few examples:
|
||||
*
|
||||
* Configure::write('Dispatcher.filters', array(
|
||||
* 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app.
|
||||
* 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin.
|
||||
* array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch
|
||||
* array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch
|
||||
*
|
||||
* ));
|
||||
*/
|
||||
Configure::write('Dispatcher.filters', array(
|
||||
'AssetDispatcher',
|
||||
'CacheDispatcher'
|
||||
));
|
||||
|
||||
/**
|
||||
* Configures default file logging options
|
||||
*/
|
||||
App::uses('CakeLog', 'Log');
|
||||
CakeLog::config('debug', array(
|
||||
'engine' => 'File',
|
||||
'types' => array('notice', 'info', 'debug'),
|
||||
'file' => 'debug',
|
||||
));
|
||||
CakeLog::config('error', array(
|
||||
'engine' => 'File',
|
||||
'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
|
||||
'file' => 'error',
|
||||
));
|
|
@ -0,0 +1,385 @@
|
|||
<?php
|
||||
/**
|
||||
* This is core configuration file.
|
||||
*
|
||||
* Use it to configure core behavior of Cake.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* CakePHP Debug Level:
|
||||
*
|
||||
* Production Mode:
|
||||
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
|
||||
*
|
||||
* Development Mode:
|
||||
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
|
||||
* 2: As in 1, but also with full debug messages and SQL output.
|
||||
*
|
||||
* In production mode, flash messages redirect after a time interval.
|
||||
* In development mode, you need to click the flash message to continue.
|
||||
*/
|
||||
Configure::write('debug', 2);
|
||||
|
||||
/**
|
||||
* Configure the Error handler used to handle errors for your application. By default
|
||||
* ErrorHandler::handleError() is used. It will display errors using Debugger, when debug > 0
|
||||
* and log errors with CakeLog when debug = 0.
|
||||
*
|
||||
* Options:
|
||||
*
|
||||
* - `handler` - callback - The callback to handle errors. You can set this to any callable type,
|
||||
* including anonymous functions.
|
||||
* Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
|
||||
* - `level` - integer - The level of errors you are interested in capturing.
|
||||
* - `trace` - boolean - Include stack traces for errors in log files.
|
||||
*
|
||||
* @see ErrorHandler for more information on error handling and configuration.
|
||||
*/
|
||||
Configure::write('Error', array(
|
||||
'handler' => 'ErrorHandler::handleError',
|
||||
'level' => E_ALL & ~E_DEPRECATED,
|
||||
'trace' => true
|
||||
));
|
||||
|
||||
/**
|
||||
* Configure the Exception handler used for uncaught exceptions. By default,
|
||||
* ErrorHandler::handleException() is used. It will display a HTML page for the exception, and
|
||||
* while debug > 0, framework errors like Missing Controller will be displayed. When debug = 0,
|
||||
* framework errors will be coerced into generic HTTP errors.
|
||||
*
|
||||
* Options:
|
||||
*
|
||||
* - `handler` - callback - The callback to handle exceptions. You can set this to any callback type,
|
||||
* including anonymous functions.
|
||||
* Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
|
||||
* - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you
|
||||
* should place the file for that class in app/Lib/Error. This class needs to implement a render method.
|
||||
* - `log` - boolean - Should Exceptions be logged?
|
||||
* - `skipLog` - array - list of exceptions to skip for logging. Exceptions that
|
||||
* extend one of the listed exceptions will also be skipped for logging.
|
||||
* Example: `'skipLog' => array('NotFoundException', 'UnauthorizedException')`
|
||||
*
|
||||
* @see ErrorHandler for more information on exception handling and configuration.
|
||||
*/
|
||||
Configure::write('Exception', array(
|
||||
'handler' => 'ErrorHandler::handleException',
|
||||
'renderer' => 'ExceptionRenderer',
|
||||
'log' => true
|
||||
));
|
||||
|
||||
/**
|
||||
* Application wide charset encoding
|
||||
*/
|
||||
Configure::write('App.encoding', 'UTF-8');
|
||||
|
||||
/**
|
||||
* To configure CakePHP *not* to use mod_rewrite and to
|
||||
* use CakePHP pretty URLs, remove these .htaccess
|
||||
* files:
|
||||
*
|
||||
* /.htaccess
|
||||
* /app/.htaccess
|
||||
* /app/webroot/.htaccess
|
||||
*
|
||||
* And uncomment the App.baseUrl below. But keep in mind
|
||||
* that plugin assets such as images, CSS and JavaScript files
|
||||
* will not work without URL rewriting!
|
||||
* To work around this issue you should either symlink or copy
|
||||
* the plugin assets into you app's webroot directory. This is
|
||||
* recommended even when you are using mod_rewrite. Handling static
|
||||
* assets through the Dispatcher is incredibly inefficient and
|
||||
* included primarily as a development convenience - and
|
||||
* thus not recommended for production applications.
|
||||
*/
|
||||
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
|
||||
|
||||
/**
|
||||
* To configure CakePHP to use a particular domain URL
|
||||
* for any URL generation inside the application, set the following
|
||||
* configuration variable to the http(s) address to your domain. This
|
||||
* will override the automatic detection of full base URL and can be
|
||||
* useful when generating links from the CLI (e.g. sending emails)
|
||||
*/
|
||||
//Configure::write('App.fullBaseUrl', 'http://example.com');
|
||||
|
||||
/**
|
||||
* Web path to the public images directory under webroot.
|
||||
* If not set defaults to 'img/'
|
||||
*/
|
||||
//Configure::write('App.imageBaseUrl', 'img/');
|
||||
|
||||
/**
|
||||
* Web path to the CSS files directory under webroot.
|
||||
* If not set defaults to 'css/'
|
||||
*/
|
||||
//Configure::write('App.cssBaseUrl', 'css/');
|
||||
|
||||
/**
|
||||
* Web path to the js files directory under webroot.
|
||||
* If not set defaults to 'js/'
|
||||
*/
|
||||
//Configure::write('App.jsBaseUrl', 'js/');
|
||||
|
||||
/**
|
||||
* Uncomment the define below to use CakePHP prefix routes.
|
||||
*
|
||||
* The value of the define determines the names of the routes
|
||||
* and their associated controller actions:
|
||||
*
|
||||
* Set to an array of prefixes you want to use in your application. Use for
|
||||
* admin or other prefixed routes.
|
||||
*
|
||||
* Routing.prefixes = array('admin', 'manager');
|
||||
*
|
||||
* Enables:
|
||||
* `admin_index()` and `/admin/controller/index`
|
||||
* `manager_index()` and `/manager/controller/index`
|
||||
*
|
||||
*/
|
||||
Configure::write('Routing.prefixes', array('admin'));
|
||||
|
||||
/**
|
||||
* Turn off all caching application-wide.
|
||||
*
|
||||
*/
|
||||
//Configure::write('Cache.disable', true);
|
||||
|
||||
/**
|
||||
* Enable cache checking.
|
||||
*
|
||||
* If set to true, for view caching you must still use the controller
|
||||
* public $cacheAction inside your controllers to define caching settings.
|
||||
* You can either set it controller-wide by setting public $cacheAction = true,
|
||||
* or in each action using $this->cacheAction = true.
|
||||
*
|
||||
*/
|
||||
//Configure::write('Cache.check', true);
|
||||
|
||||
/**
|
||||
* Enable cache view prefixes.
|
||||
*
|
||||
* If set it will be prepended to the cache name for view file caching. This is
|
||||
* helpful if you deploy the same application via multiple subdomains and languages,
|
||||
* for instance. Each version can then have its own view cache namespace.
|
||||
* Note: The final cache file name will then be `prefix_cachefilename`.
|
||||
*/
|
||||
//Configure::write('Cache.viewPrefix', 'prefix');
|
||||
|
||||
/**
|
||||
* Session configuration.
|
||||
*
|
||||
* Contains an array of settings to use for session configuration. The defaults key is
|
||||
* used to define a default preset to use for sessions, any settings declared here will override
|
||||
* the settings of the default config.
|
||||
*
|
||||
* ## Options
|
||||
*
|
||||
* - `Session.cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'
|
||||
* - `Session.timeout` - The number of minutes you want sessions to live for. This timeout is handled by CakePHP
|
||||
* - `Session.cookieTimeout` - The number of minutes you want session cookies to live for.
|
||||
* - `Session.checkAgent` - Do you want the user agent to be checked when starting sessions? You might want to set the
|
||||
* value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX
|
||||
* - `Session.defaults` - The default configuration set to use as a basis for your session.
|
||||
* There are four builtins: php, cake, cache, database.
|
||||
* - `Session.handler` - Can be used to enable a custom session handler. Expects an array of callables,
|
||||
* that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler`
|
||||
* to the ini array.
|
||||
* - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and
|
||||
* sessionids that change frequently. See CakeSession::$requestCountdown.
|
||||
* - `Session.ini` - An associative array of additional ini values to set.
|
||||
*
|
||||
* The built in defaults are:
|
||||
*
|
||||
* - 'php' - Uses settings defined in your php.ini.
|
||||
* - 'cake' - Saves session files in CakePHP's /tmp directory.
|
||||
* - 'database' - Uses CakePHP's database sessions.
|
||||
* - 'cache' - Use the Cache class to save sessions.
|
||||
*
|
||||
* To define a custom session handler, save it at /app/Model/Datasource/Session/<name>.php.
|
||||
* Make sure the class implements `CakeSessionHandlerInterface` and set Session.handler to <name>
|
||||
*
|
||||
* To use database sessions, run the app/Config/Schema/sessions.php schema using
|
||||
* the cake shell command: cake schema create Sessions
|
||||
*
|
||||
*/
|
||||
Configure::write('Session', array(
|
||||
'defaults' => 'php'
|
||||
));
|
||||
|
||||
/**
|
||||
* A random string used in security hashing methods.
|
||||
*/
|
||||
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9ma');
|
||||
|
||||
/**
|
||||
* A random numeric string (digits only) used to encrypt/decrypt strings.
|
||||
*/
|
||||
Configure::write('Security.cipherSeed', '76859309657453542496749683643');
|
||||
|
||||
/**
|
||||
* Apply timestamps with the last modified time to static assets (js, css, images).
|
||||
* Will append a query string parameter containing the time the file was modified. This is
|
||||
* useful for invalidating browser caches.
|
||||
*
|
||||
* Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable
|
||||
* timestamping regardless of debug value.
|
||||
*/
|
||||
//Configure::write('Asset.timestamp', true);
|
||||
|
||||
/**
|
||||
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
|
||||
* This requires a/var/cache directory to be writable by the web server for caching.
|
||||
* and /vendors/csspp/csspp.php
|
||||
*
|
||||
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
|
||||
*/
|
||||
//Configure::write('Asset.filter.css', 'css.php');
|
||||
|
||||
/**
|
||||
* Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
|
||||
* output, and setting the config below to the name of the script.
|
||||
*
|
||||
* To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JsHelper::link().
|
||||
*/
|
||||
//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
|
||||
|
||||
/**
|
||||
* The class name and database used in CakePHP's
|
||||
* access control lists.
|
||||
*/
|
||||
Configure::write('Acl.classname', 'DbAcl');
|
||||
Configure::write('Acl.database', 'default');
|
||||
|
||||
/**
|
||||
* Uncomment this line and correct your server timezone to fix
|
||||
* any date & time related errors.
|
||||
*/
|
||||
//date_default_timezone_set('UTC');
|
||||
|
||||
/**
|
||||
* `Config.timezone` is available in which you can set users' timezone string.
|
||||
* If a method of CakeTime class is called with $timezone parameter as null and `Config.timezone` is set,
|
||||
* then the value of `Config.timezone` will be used. This feature allows you to set users' timezone just
|
||||
* once instead of passing it each time in function calls.
|
||||
*/
|
||||
//Configure::write('Config.timezone', 'Europe/Paris')
|
||||
|
||||
/**
|
||||
*
|
||||
* Cache Engine Configuration
|
||||
* Default settings provided below
|
||||
*
|
||||
* File storage engine.
|
||||
*
|
||||
* Cache::config('default', array(
|
||||
* 'engine' => 'File', //[required]
|
||||
* 'duration' => 3600, //[optional]
|
||||
* 'probability' => 100, //[optional]
|
||||
* 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
|
||||
* 'prefix' => 'cake_', //[optional] prefix every cache file with this string
|
||||
* 'lock' => false, //[optional] use file locking
|
||||
* 'serialize' => true, //[optional]
|
||||
* 'mask' => 0664, //[optional]
|
||||
* ));
|
||||
*
|
||||
* APC (http://pecl.php.net/package/APC)
|
||||
*
|
||||
* Cache::config('default', array(
|
||||
* 'engine' => 'Apc', //[required]
|
||||
* 'duration' => 3600, //[optional]
|
||||
* 'probability' => 100, //[optional]
|
||||
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
||||
* ));
|
||||
*
|
||||
* Xcache (http://xcache.lighttpd.net/)
|
||||
*
|
||||
* Cache::config('default', array(
|
||||
* 'engine' => 'Xcache', //[required]
|
||||
* 'duration' => 3600, //[optional]
|
||||
* 'probability' => 100, //[optional]
|
||||
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
||||
* 'user' => 'user', //user from xcache.admin.user settings
|
||||
* 'password' => 'password', //plaintext password (xcache.admin.pass)
|
||||
* ));
|
||||
*
|
||||
* Memcache (http://www.danga.com/memcached/)
|
||||
*
|
||||
* Cache::config('default', array(
|
||||
* 'engine' => 'Memcache', //[required]
|
||||
* 'duration' => 3600, //[optional]
|
||||
* 'probability' => 100, //[optional]
|
||||
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
||||
* 'servers' => array(
|
||||
* '127.0.0.1:11211' // localhost, default port 11211
|
||||
* ), //[optional]
|
||||
* 'persistent' => true, // [optional] set this to false for non-persistent connections
|
||||
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
|
||||
* ));
|
||||
*
|
||||
* Wincache (http://php.net/wincache)
|
||||
*
|
||||
* Cache::config('default', array(
|
||||
* 'engine' => 'Wincache', //[required]
|
||||
* 'duration' => 3600, //[optional]
|
||||
* 'probability' => 100, //[optional]
|
||||
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
||||
* ));
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configure the cache handlers that CakePHP will use for internal
|
||||
* metadata like class maps, and model schema.
|
||||
*
|
||||
* By default File is used, but for improved performance you should use APC.
|
||||
*
|
||||
* Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
|
||||
* Please check the comments in bootstrap.php for more info on the cache engines available
|
||||
* and their settings.
|
||||
*/
|
||||
$engine = 'File';
|
||||
|
||||
// In development mode, caches should expire quickly.
|
||||
$duration = '+999 days';
|
||||
if (Configure::read('debug') > 0) {
|
||||
$duration = '+10 seconds';
|
||||
}
|
||||
|
||||
// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
|
||||
$prefix = 'myapp_';
|
||||
|
||||
/**
|
||||
* Configure the cache used for general framework caching. Path information,
|
||||
* object listings, and translation cache files are stored with this configuration.
|
||||
*/
|
||||
Cache::config('_cake_core_', array(
|
||||
'engine' => $engine,
|
||||
'prefix' => $prefix . 'cake_core_',
|
||||
'path' => CACHE . 'persistent' . DS,
|
||||
'serialize' => ($engine === 'File'),
|
||||
'duration' => $duration
|
||||
));
|
||||
|
||||
/**
|
||||
* Configure the cache for model and datasource caches. This cache configuration
|
||||
* is used to store schema descriptions, and table listings in connections.
|
||||
*/
|
||||
Cache::config('_cake_model_', array(
|
||||
'engine' => $engine,
|
||||
'prefix' => $prefix . 'cake_model_',
|
||||
'path' => CACHE . 'models' . DS,
|
||||
'serialize' => ($engine === 'File'),
|
||||
'duration' => $duration
|
||||
));
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Database configuration class.
|
||||
*
|
||||
* You can specify multiple configurations for production, development and testing.
|
||||
*
|
||||
* datasource => The name of a supported datasource; valid options are as follows:
|
||||
* Database/Mysql - MySQL 4 & 5,
|
||||
* Database/Sqlite - SQLite (PHP5 only),
|
||||
* Database/Postgres - PostgreSQL 7 and higher,
|
||||
* Database/Sqlserver - Microsoft SQL Server 2005 and higher
|
||||
*
|
||||
* You can add custom database datasources (or override existing datasources) by adding the
|
||||
* appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php',
|
||||
*
|
||||
*
|
||||
* persistent => true / false
|
||||
* Determines whether or not the database should use a persistent connection
|
||||
*
|
||||
* host =>
|
||||
* the host you connect to the database. To add a socket or port number, use 'port' => #
|
||||
*
|
||||
* prefix =>
|
||||
* Uses the given prefix for all the tables in this database. This setting can be overridden
|
||||
* on a per-table basis with the Model::$tablePrefix property.
|
||||
*
|
||||
* schema =>
|
||||
* For Postgres/Sqlserver specifies which schema you would like to use the tables in.
|
||||
* Postgres defaults to 'public'. For Sqlserver, it defaults to empty and use
|
||||
* the connected user's default schema (typically 'dbo').
|
||||
*
|
||||
* encoding =>
|
||||
* For MySQL, Postgres specifies the character encoding to use when connecting to the
|
||||
* database. Uses database default not specified.
|
||||
*
|
||||
* unix_socket =>
|
||||
* For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`
|
||||
*
|
||||
* settings =>
|
||||
* Array of key/value pairs, on connection it executes SET statements for each pair
|
||||
* For MySQL : http://dev.mysql.com/doc/refman/5.6/en/set-statement.html
|
||||
* For Postgres : http://www.postgresql.org/docs/9.2/static/sql-set.html
|
||||
* For Sql Server : http://msdn.microsoft.com/en-us/library/ms190356.aspx
|
||||
*/
|
||||
class DATABASE_CONFIG {
|
||||
|
||||
public $default = array(
|
||||
'datasource' => 'Database/Mysql',
|
||||
'persistent' => false,
|
||||
'host' => 'localhost',
|
||||
'login' => 'user',
|
||||
'password' => 'password',
|
||||
'database' => 'database_name',
|
||||
'prefix' => '',
|
||||
//'encoding' => 'utf8',
|
||||
);
|
||||
|
||||
public $test = array(
|
||||
'datasource' => 'Database/Mysql',
|
||||
'persistent' => false,
|
||||
'host' => 'localhost',
|
||||
'login' => 'user',
|
||||
'password' => 'password',
|
||||
'database' => 'test_database_name',
|
||||
'prefix' => '',
|
||||
//'encoding' => 'utf8',
|
||||
);
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config
|
||||
* @since CakePHP(tm) v 2.0.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* This is email configuration file.
|
||||
*
|
||||
* Use it to configure email transports of CakePHP.
|
||||
*
|
||||
* Email configuration class.
|
||||
* You can specify multiple configurations for production, development and testing.
|
||||
*
|
||||
* transport => The name of a supported transport; valid options are as follows:
|
||||
* Mail - Send using PHP mail function
|
||||
* Smtp - Send using SMTP
|
||||
* Debug - Do not send the email, just return the result
|
||||
*
|
||||
* You can add custom transports (or override existing transports) by adding the
|
||||
* appropriate file to app/Network/Email. Transports should be named 'YourTransport.php',
|
||||
* where 'Your' is the name of the transport.
|
||||
*
|
||||
* from =>
|
||||
* The origin email. See CakeEmail::from() about the valid values
|
||||
*
|
||||
*/
|
||||
class EmailConfig {
|
||||
|
||||
public $default = array(
|
||||
'transport' => 'Mail',
|
||||
'from' => 'you@localhost',
|
||||
//'charset' => 'utf-8',
|
||||
//'headerCharset' => 'utf-8',
|
||||
);
|
||||
|
||||
public $smtp = array(
|
||||
'transport' => 'Smtp',
|
||||
'from' => array('site@localhost' => 'My Site'),
|
||||
'host' => 'localhost',
|
||||
'port' => 25,
|
||||
'timeout' => 30,
|
||||
'username' => 'user',
|
||||
'password' => 'secret',
|
||||
'client' => null,
|
||||
'log' => false,
|
||||
//'charset' => 'utf-8',
|
||||
//'headerCharset' => 'utf-8',
|
||||
);
|
||||
|
||||
public $fast = array(
|
||||
'from' => 'you@localhost',
|
||||
'sender' => null,
|
||||
'to' => null,
|
||||
'cc' => null,
|
||||
'bcc' => null,
|
||||
'replyTo' => null,
|
||||
'readReceipt' => null,
|
||||
'returnPath' => null,
|
||||
'messageId' => true,
|
||||
'subject' => null,
|
||||
'message' => null,
|
||||
'headers' => null,
|
||||
'viewRender' => null,
|
||||
'template' => false,
|
||||
'layout' => false,
|
||||
'viewVars' => null,
|
||||
'attachments' => null,
|
||||
'emailFormat' => null,
|
||||
'transport' => 'Smtp',
|
||||
'host' => 'localhost',
|
||||
'port' => 25,
|
||||
'timeout' => 30,
|
||||
'username' => 'user',
|
||||
'password' => 'secret',
|
||||
'client' => null,
|
||||
'log' => true,
|
||||
//'charset' => 'utf-8',
|
||||
//'headerCharset' => 'utf-8',
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
/**
|
||||
* Routes configuration
|
||||
*
|
||||
* 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).
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Config
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license http://www.opensource.org/licenses/mit-license.php 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/View/Pages/home.ctp)...
|
||||
*/
|
||||
Router::connect('/', array('controller' => 'home', 'action' => 'home'));
|
||||
Router::connect('/login', array('controller' => 'home', 'action' => 'login'));
|
||||
Router::connect('/logout', array('controller' => 'home', 'action' => 'logout'));
|
||||
Router::connect('/impressum', array('controller' => 'home', 'action' => 'impressum'));
|
||||
Router::connect('/contact', array('controller' => 'home', 'action' => 'contact'));
|
||||
|
||||
Router::connect('/profil', array('controller' => 'user', 'action' => 'profil'));
|
||||
Router::connect('/profil/page/:page', array('controller' => 'user', 'action' => 'profil'),array("page" => "[0-9]+"));
|
||||
Router::connect('/user/:id', array('controller' => 'user', 'action' => 'profil'),array("id" => "[0-9]+"));
|
||||
Router::connect('/user/:id/page/:page', array('controller' => 'user', 'action' => 'profil'),array("id" => "[0-9]+","page" => "[0-9]+"));
|
||||
|
||||
Router::connect('/test/', array('controller' => 'user', 'action' => 'test'));
|
||||
/**
|
||||
* ...and connect the rest of 'Pages' controller's URLs.
|
||||
*/
|
||||
//Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
|
||||
|
||||
/**
|
||||
* Load all plugin routes. See the CakePlugin documentation on
|
||||
* how to customize the loading of plugin routes.
|
||||
*/
|
||||
// CakePlugin::routes();
|
||||
|
||||
/**
|
||||
* Load the CakePHP default routes. Only remove this if you do not want to use
|
||||
* the built-in default routes.
|
||||
*/
|
||||
// require CAKE . 'Config' . DS . 'routes.php';
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
* AppShell file
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @since CakePHP(tm) v 2.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
App::uses('Shell', 'Console');
|
||||
|
||||
/**
|
||||
* Application Shell
|
||||
*
|
||||
* Add your application-wide methods in the class below, your shells
|
||||
* will inherit them.
|
||||
*
|
||||
* @package app.Console.Command
|
||||
*/
|
||||
class AppShell extends Shell {
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env bash
|
||||
################################################################################
|
||||
#
|
||||
# Bake is a shell script for running CakePHP bake script
|
||||
#
|
||||
# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
#
|
||||
# Licensed under The MIT License
|
||||
# For full copyright and license information, please see the LICENSE.txt
|
||||
# Redistributions of files must retain the above copyright notice.
|
||||
#
|
||||
# @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
# @link http://cakephp.org CakePHP(tm) Project
|
||||
# @package app.Console
|
||||
# @since CakePHP(tm) v 1.2.0.5012
|
||||
# @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Canonicalize by following every symlink of the given name recursively
|
||||
canonicalize() {
|
||||
NAME="$1"
|
||||
if [ -f "$NAME" ]
|
||||
then
|
||||
DIR=$(dirname -- "$NAME")
|
||||
NAME=$(cd -P "$DIR" && pwd -P)/$(basename -- "$NAME")
|
||||
fi
|
||||
while [ -h "$NAME" ]; do
|
||||
DIR=$(dirname -- "$NAME")
|
||||
SYM=$(readlink "$NAME")
|
||||
NAME=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
|
||||
done
|
||||
echo "$NAME"
|
||||
}
|
||||
|
||||
CONSOLE=$(dirname -- "$(canonicalize "$0")")
|
||||
APP=$(dirname "$CONSOLE")
|
||||
|
||||
exec php -q "$CONSOLE"/cake.php -working "$APP" "$@"
|
||||
exit
|
|
@ -0,0 +1,31 @@
|
|||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::
|
||||
:: Bake is a shell script for running CakePHP bake script
|
||||
::
|
||||
:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
::
|
||||
:: Licensed under The MIT License
|
||||
:: Redistributions of files must retain the above copyright notice.
|
||||
::
|
||||
:: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
:: @link http://cakephp.org CakePHP(tm) Project
|
||||
:: @package app.Console
|
||||
:: @since CakePHP(tm) v 2.0
|
||||
:: @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
:: In order for this script to work as intended, the cake\console\ folder must be in your PATH
|
||||
|
||||
@echo.
|
||||
@echo off
|
||||
|
||||
SET app=%0
|
||||
SET lib=%~dp0
|
||||
|
||||
php -q "%lib%cake.php" -working "%CD% " %*
|
||||
|
||||
echo.
|
||||
|
||||
exit /B %ERRORLEVEL%
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/php -q
|
||||
<?php
|
||||
/**
|
||||
* Command-line code generation utility to automate programmer chores.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Console
|
||||
* @since CakePHP(tm) v 2.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
$ds = DIRECTORY_SEPARATOR;
|
||||
$dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php';
|
||||
|
||||
if (function_exists('ini_set')) {
|
||||
$root = dirname(dirname(dirname(__FILE__)));
|
||||
|
||||
// the following line differs from its sibling
|
||||
// /lib/Cake/Console/Templates/skel/Console/cake.php
|
||||
ini_set('include_path', $root . $ds . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
|
||||
}
|
||||
|
||||
if (!include $dispatcher) {
|
||||
trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
|
||||
}
|
||||
unset($paths, $path, $dispatcher, $root, $ds);
|
||||
|
||||
return ShellDispatcher::run($argv);
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
/**
|
||||
* Application level Controller
|
||||
*
|
||||
* This file is application-wide controller file. You can put all
|
||||
* application-wide controller-related methods here.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Controller
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
App::uses('Controller', 'Controller');
|
||||
|
||||
/**
|
||||
* Application Controller
|
||||
*
|
||||
* Add your application-wide methods in the class below, your controllers
|
||||
* will inherit them.
|
||||
*
|
||||
* @package app.Controller
|
||||
* @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller
|
||||
*/
|
||||
class AppController extends Controller {
|
||||
|
||||
public $components = array('Security','MiconwareSession');
|
||||
|
||||
function beforeFilter(){
|
||||
parent::beforeFilter();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
<?php
|
||||
App::uses('Component', 'Controller');
|
||||
class MiconwareSessionComponent extends Component {
|
||||
|
||||
public $components = array('Session');
|
||||
|
||||
public function init($controller){
|
||||
$controller->Security->requireSecure();
|
||||
$this->User = ClassRegistry::init('User');
|
||||
}
|
||||
|
||||
public function initWeb($controller){
|
||||
$controller->set("isLoggedin",$this->isLoggedin());
|
||||
$controller->set("isStaff",$this->isStaff());
|
||||
$controller->set("MEDIA_URL","http://dev.dreamjob.cc/media/");
|
||||
$controller->set('default',array(
|
||||
'inputDefaults' => array(
|
||||
'div' => array('class' => 'control-group'),
|
||||
'label' => array('class' => 'control-label'),
|
||||
'between' => '<div class="controls">',
|
||||
'after' => '</div>',
|
||||
'class' => ''))
|
||||
);
|
||||
}
|
||||
|
||||
public function isLoggedin(){
|
||||
return $this->Session->check('user');
|
||||
}
|
||||
|
||||
public function isStaff(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function login($mail,$password){
|
||||
$users=$this->User->find('first', array(
|
||||
'fields' => array('User.id','User.password'),
|
||||
'conditions' => array('User.mail' => $mail)
|
||||
));
|
||||
if($this->validate_password($password,$users['User']['password']) and !$this->isLoggedin()){
|
||||
echo $users['User']['id'];
|
||||
$this->Session->write('user',$users['User']['id']);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function logout(){
|
||||
if($this->isLoggedin()){
|
||||
$this->Session->delete('user');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function setFlash($message,$element = 'flash',$params = array(),$key = 'flash') {
|
||||
$this->Session->setFlash($message, $element,$params,$key);
|
||||
}
|
||||
|
||||
public function getApplication($appDirectory,$user_id=false){
|
||||
if(!$user_id)
|
||||
$user_id = $this->Session->read('user');
|
||||
$this->$appDirectory = ClassRegistry::init($appDirectory);
|
||||
return $this->$appDirectory->find('first',array(
|
||||
'conditions' => array('AppUser.user_id' => $user_id)
|
||||
));
|
||||
}
|
||||
/**
|
||||
* PasswordHasg
|
||||
*/
|
||||
private function create_hash($password)
|
||||
{
|
||||
$salt = base64_encode(mcrypt_create_iv(8, MCRYPT_DEV_URANDOM));
|
||||
return "pbkdf2_sha1$10000$" . $salt . "$" .base64_encode($this->pbkdf2("sha1",$password,$salt,10000,20,true));
|
||||
}
|
||||
|
||||
private function validate_password($password, $correct_hash)
|
||||
{
|
||||
$params = explode("$", $correct_hash);
|
||||
if(count($params) < 4) return false;
|
||||
$pbkdf2 = base64_decode($params[3]);
|
||||
return $this->slow_equals($pbkdf2,$this->pbkdf2($params[0],$password,$params[2],(int)$params[1],strlen($pbkdf2),true));
|
||||
}
|
||||
|
||||
private function slow_equals($a, $b)
|
||||
{
|
||||
$diff = strlen($a) ^ strlen($b);
|
||||
for($i = 0; $i < strlen($a) && $i < strlen($b); $i++)
|
||||
$diff |= ord($a[$i]) ^ ord($b[$i]);
|
||||
return $diff === 0;
|
||||
}
|
||||
|
||||
private function pbkdf2($algorithm, $password, $salt, $count, $key_length, $raw_output = false)
|
||||
{
|
||||
$algorithm = strtolower(ltrim($algorithm,"pbkdf2_"));
|
||||
if(!in_array($algorithm, hash_algos(), true))
|
||||
die('PBKDF2 ERROR: Invalid hash algorithm.');
|
||||
if($count <= 0 || $key_length <= 0)
|
||||
die('PBKDF2 ERROR: Invalid parameters.');
|
||||
if (function_exists("hash_pbkdf2")) {
|
||||
if (!$raw_output)
|
||||
$key_length = $key_length * 2;
|
||||
return hash_pbkdf2($algorithm, $password, $salt, $count, $key_length, $raw_output);
|
||||
}
|
||||
$hash_length = strlen(hash($algorithm, "", true));
|
||||
$block_count = ceil($key_length / $hash_length);
|
||||
$output = "";
|
||||
for($i = 1; $i <= $block_count; $i++) {
|
||||
$last = $salt . pack("N", $i);
|
||||
$last = $xorsum = hash_hmac($algorithm, $last, $password, true);
|
||||
for ($j = 1; $j < $count; $j++)
|
||||
$xorsum ^= ($last = hash_hmac($algorithm, $last, $password, true));
|
||||
$output .= $xorsum;
|
||||
}
|
||||
if($raw_output)
|
||||
return substr($output, 0, $key_length);
|
||||
else
|
||||
return bin2hex(substr($output, 0, $key_length));
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
|
||||
App::uses('AppController', 'Controller');
|
||||
|
||||
class HomeController extends AppController {
|
||||
|
||||
/**
|
||||
* This controller use User Model
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $uses = array();
|
||||
|
||||
/**
|
||||
* Displays a view
|
||||
*
|
||||
* @param mixed What page to display
|
||||
* @return void
|
||||
* @throws NotFoundException When the view file could not be found
|
||||
* or MissingViewException in debug mode.
|
||||
*/
|
||||
|
||||
public function home() {
|
||||
$this->MiconwareSession->init($this);
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
$this->MiconwareSession->setFlash('In Entwicklung','flash',array('alert'=>'info'));
|
||||
$this->set('title', 'dreamjob.startpage');
|
||||
$this->set('MENU_START', true);
|
||||
$this->render('/Home/home');
|
||||
}
|
||||
|
||||
|
||||
public function login(){
|
||||
$this->MiconwareSession->init($this);
|
||||
|
||||
if($this->request->is('post') and isset($this->request->data['User']['mail']) and isset($this->request->data['User']['password'])){
|
||||
if($this->MiconwareSession->login(
|
||||
$this->request->data['User']['mail'],
|
||||
$this->request->data['User']['password'])
|
||||
){
|
||||
$this->MiconwareSession->setFlash('dreamjob.loggedin','flash',array('alert'=>'success'));
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.loggedinError','flash',array('alert'=>'danger'));
|
||||
}
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.loggedinError','flash',array('alert'=>'danger'));
|
||||
}
|
||||
|
||||
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
|
||||
$this->set('title', 'dreamjob.startpage');
|
||||
$this->set('MENU_START', true);
|
||||
$this->render('/Home/home');
|
||||
}
|
||||
|
||||
public function logout(){
|
||||
$this->MiconwareSession->init($this);
|
||||
|
||||
if($this->MiconwareSession->logout())
|
||||
$this->MiconwareSession->setFlash('dreamjob.loggingoutSucess','flash',array('alert'=>'success'));
|
||||
else
|
||||
$this->MiconwareSession->setFlash('dreamjob.loggingoutError','flash',array('alert'=>'danger'));
|
||||
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
|
||||
$this->set('title', 'dreamjob.startpage');
|
||||
$this->set('MENU_START', true);
|
||||
$this->render('/Home/home');
|
||||
}
|
||||
|
||||
|
||||
public function contact() {
|
||||
$this->MiconwareSession->init($this);
|
||||
sleep(1);
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
$this->set('title', 'dreamjob.contact');
|
||||
$this->render('/Home/contact');
|
||||
}
|
||||
|
||||
|
||||
public function impressum() {
|
||||
$this->MiconwareSession->init($this);
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
$this->set('title', 'dreamjob.impressum');
|
||||
$this->render('/Home/impressum');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
<?php
|
||||
|
||||
App::uses('AppController', 'Controller');
|
||||
|
||||
class UserController extends AppController {
|
||||
|
||||
/**
|
||||
* This controller use User Model
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $uses = array('DreamjobListGraducation','DreamjobWorker','DreamjobCompany','DreamjobPageText','DreamjobPageImage','DreamjobJobOpening');
|
||||
|
||||
/**
|
||||
* Displays a view
|
||||
*
|
||||
* @param mixed What page to display
|
||||
* @return void
|
||||
* @throws NotFoundException When the view file could not be found
|
||||
* or MissingViewException in debug mode.
|
||||
*/
|
||||
public function profil() {
|
||||
$this->MiconwareSession->init($this);
|
||||
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
|
||||
|
||||
|
||||
//self check
|
||||
$self_company = false;
|
||||
$self = $this->MiconwareSession->getApplication('DreamjobWorker');
|
||||
if(!is_array($self) or count($self)<= 0){
|
||||
$self = $this->MiconwareSession->getApplication('DreamjobCompany');
|
||||
$self_company = true;
|
||||
}
|
||||
|
||||
//get Profil
|
||||
$company = false;
|
||||
if(empty($this->request->params['id'])) {
|
||||
$profil = $self;
|
||||
$company = $self_company;
|
||||
}else{
|
||||
$profil = $this->DreamjobWorker->find('first',array('conditions' => array('AppUser.id' => $this->request->params['id'])));
|
||||
if(!is_array($profil) or count($profil)<= 0){
|
||||
$profil = $this->DreamjobCompany->find('first',array('conditions' => array('AppUser.id' => $this->request->params['id'])));
|
||||
$company = true;
|
||||
}
|
||||
$this->set('id', $this->request->params['id']);
|
||||
}
|
||||
//get Page
|
||||
|
||||
$page = null;
|
||||
if(is_array($profil) or count($profil) > 0){
|
||||
if(!empty($this->request->params['page'])){
|
||||
$page = $this->DreamjobPageText->find('first',
|
||||
array('conditions' => array("DreamjobPageInh.id" => $this->request->params['page'],'DreamjobPageInh.user_id' => $profil['AppUser']['id']))
|
||||
);
|
||||
if(!is_array($page) or count($page)<= 0)
|
||||
$page = $this->DreamjobPageImage->find('first',
|
||||
array('conditions' => array("DreamjobPageInh.id" => $this->request->params['page'],'DreamjobPageInh.user_id' => $profil['AppUser']['id']))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//error
|
||||
$hard_error = false;
|
||||
if($profil['AppUser']['id'] != $self['AppUser']['id']){
|
||||
if(($company == $self_company) and !($this->MiconwareSession->isStaff())){
|
||||
$hard_error = true;
|
||||
$this->MiconwareSession->setFlash(__('dreamjob.error.page.notFound'),'flash',array('alert'=>'danger'));
|
||||
$this->set('error', 'dreamjob.error.noPermision');
|
||||
$this->render('/Home/error');
|
||||
}
|
||||
}else{
|
||||
$this->set('edit', true);
|
||||
$this->set('MENU_PROFIL',true);
|
||||
}
|
||||
if(!empty($this->request->params['page']) and (!is_array($page) or count($page)<= 0))
|
||||
$this->MiconwareSession->setFlash(__('dreamjob.error.page.notFound'),'flash',array('alert'=>'danger'));
|
||||
//render
|
||||
$this->set('profil', $profil);
|
||||
$this->set('page',$page);
|
||||
if(!$hard_error)
|
||||
if($company){
|
||||
$openings = $this->DreamjobJobOpening->find('all',array('conditions' => array('DreamjobJobOpening.company_id' => $profil['AppUser']['id'])));
|
||||
$this->set("openings",$openings);
|
||||
$this->render('/User/company');
|
||||
}else
|
||||
$this->render('/User/worker');
|
||||
}
|
||||
|
||||
public function test() {
|
||||
$this->MiconwareSession->init($this);
|
||||
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
// $this->set('data', $this->DreamjobCompany->find('all'));
|
||||
$this->set('data', $this->MiconwareSession->getApplication('DreamjobWorker'));
|
||||
$this->render('/User/test');
|
||||
}
|
||||
}
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,88 @@
|
|||
dreamjob=Dreamjob
|
||||
dreamjob.contact=Kontakt
|
||||
dreamjob.impressum=Impressum
|
||||
dreamjob.company=Firma
|
||||
dreamjob.search=Suche
|
||||
dreamjob.news=News
|
||||
dreamjob.logoutmsg=Sie sind nun abgemeldet.
|
||||
dreamjob.loginmsg=Sie sind nun angemeldet.
|
||||
dreamjob.registration.slogan=Einfach und kostenlos
|
||||
dreamjob.mail=E-Mail
|
||||
dreamjob.password=Passwort
|
||||
dreamjob.password.forgotten=Passwort vergessen
|
||||
dreamjob.login=Login
|
||||
dreamjob.registration=Registration
|
||||
dreamjob.registration.to=Zur Registration!
|
||||
dreamjob.uscompany=Firma
|
||||
dreamjob.agb=AGBs
|
||||
dreamjob.advbyus=Werbung auf Dreamjob
|
||||
dreamjob.help=Hilfe
|
||||
dreamjob.faq=Fragen zum Produkt
|
||||
dreamjob.advertisers=Werbe-Partner
|
||||
dreamjob.cooperators=Kooperations-Partner
|
||||
dreamjob.sponsorus=Sponsoren
|
||||
dreamjob.logout=Abmelden
|
||||
dreamjob.my.profil=Mein Profil
|
||||
dreamjob.my.opening=Mein Ausschreibungen
|
||||
dreamjob.city=Stadt
|
||||
dreamjob.city.worker=Wohnort
|
||||
dreamjob.graducation=Ausbildung
|
||||
dreamjob.kindofjob=Art der Stelle
|
||||
dreamjob.branch=Branche
|
||||
|
||||
dreamjob.cv=Lebenslauf
|
||||
dreamjob.opening=Stellenausschreibung
|
||||
dreamjob.opening.enddate = Ausschreibungsende
|
||||
dreamjob.applicate=Bewerben
|
||||
dreamjob.detail=Detail
|
||||
dreamjob.error.footer=Wir bedanken uns f\u00fcr Ihr Verst\u00e4ndnis
|
||||
dreamjob.error.header=Wir bitten um Entschuldigung
|
||||
dreamjob.error.notloggin=Sie sind nicht eingeloggt
|
||||
dreamjob.error.loginincorrect=Sie konnten sich nicht einloggen!
|
||||
dreamjob.error.nocompanyandworker=Sie haben kein Dreamjob-Account
|
||||
dreamjob.error.nocompany=Sie sind keine Firma
|
||||
dreamjob.error.noworker=Sie sind kein Benutzer
|
||||
dreamjob.error.noprivilegs=Sie haben keine Rechte, dies zu sehen
|
||||
dreamjob.error.usernotfound=Benutzer/Firma konnte nicht gefunden werden
|
||||
dreamjob.error.pagenotfound=Anhang wurde nicht gefunden
|
||||
dreamjob.admin=Admin
|
||||
dreamjob.my.application=Meine Bewerbungen
|
||||
dreamjob.settings=Einstellungen
|
||||
dreamjob.edit=Bearbeiten
|
||||
dreamjob.saved=Ihre \u00c4nderungen an "{0}" wurden erfolgreich gespeichert
|
||||
dreamjob.error.saved=Ihre \u00c4nderungen an "{0}" konnten nicht gespeichert werden
|
||||
dreamjob.save=Speichern
|
||||
dreamjob.text=Beschreibung
|
||||
dreamjob.title=\u00dcberschrift
|
||||
dreamjob.address=Adresse
|
||||
dreamjob.street=Stra\u00dfe
|
||||
dreamjob.postcode=Postleitzahl
|
||||
dreamjob.active=Aktivieren
|
||||
dreamjob.opening.startdate=Ausschreibungsbegin
|
||||
dreamjob.opening.detail=Detail
|
||||
dreamjob.company.to=Zur Firma
|
||||
dreamjob.favority.adding=Zur Favoriten hinzuf\u00fcgen
|
||||
dreamjob.graducation.company=Vorraussetzung
|
||||
dreamjob.headcount=Mitarbeiterzahl
|
||||
dreamjob.owner=Ansprechpartner
|
||||
dreamjob.opening.titleinfo=Informationen zur Stellenausschreibung
|
||||
dreamjob.company.titleinfo=Firmeninformation
|
||||
dreamjob.my.favority=Meine Favoriten
|
||||
dreamjob.favority.removed=Ausschreibung wurde erfolgreich aus den Favoriten gel\u00f6scht
|
||||
dreamjob.favority.added=Ausschreibung wurde erfolgreich zu den Favoriten hinzugef\u00fcgt
|
||||
dreamjob.error.notfound=Es wurde der gew\u00fcnschte Inhalt nicht gefunden
|
||||
dreamjob.favority.removeing=Aus den Favoriten l\u00f6schen
|
||||
dreamjob.website=Webseite
|
||||
dreamjob.iam=Ich bin (Berufsbezeichnung)
|
||||
dreamjob.bday=Geburtstag
|
||||
dreamjob.country.worker=Nationalit\u00e4t
|
||||
dreamjob.country=Land
|
||||
dreamjob.workexperience=Berufserfahrung (in Jahren)
|
||||
dreamjob.graducation.worker=Letzter schulischer Abschluss
|
||||
dreamjob.service=Service
|
||||
dreamjob.startpage=Startseite
|
||||
dreamjob.applicated=Bewerbung
|
||||
dreamjob.message.send=Kontaktieren
|
||||
dreamjob.application.close=Archivieren
|
||||
dreamjob.opening.add=Neue Stellenausschreibung
|
||||
dreamjob.message.sended=Nachricht verschickt!
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/**
|
||||
* Application model for CakePHP.
|
||||
*
|
||||
* This file is application-wide model file. You can put all
|
||||
* application-wide model-related methods here.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.Model
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
App::uses('Model', 'Model');
|
||||
|
||||
/**
|
||||
* Application model for Cake.
|
||||
*
|
||||
* Add your application-wide methods in the class below, your models
|
||||
* will inherit them.
|
||||
*
|
||||
* @package app.Model
|
||||
*/
|
||||
class AppModel extends Model {
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* MicSysMicapp Model
|
||||
*
|
||||
* @property User $User
|
||||
* @property Mannerofaddress $Mannerofaddress
|
||||
*/
|
||||
class AppUser extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_sys_micapp';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'id';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'id' => array(
|
||||
'naturalNumber' => array(
|
||||
'rule' => array('naturalNumber'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'user_id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'take_systemwide' => array(
|
||||
'boolean' => array(
|
||||
'rule' => array('boolean'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
public $belongsTo = array(
|
||||
'User' => array(
|
||||
'className' => 'User',
|
||||
'foreignKey' => 'user_id'
|
||||
),
|
||||
'Mannerofaddress' => array(
|
||||
'className' => 'Mannerofaddress',
|
||||
'foreignKey' => 'mannerofaddress_id',
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => ''
|
||||
)
|
||||
);
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* DreamjobCompany Model
|
||||
*
|
||||
* TODO
|
||||
*
|
||||
* @property
|
||||
*/
|
||||
class DreamjobCompany extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_account_cmpy';
|
||||
|
||||
/**
|
||||
* Primary key field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $primaryKey = 'djaccount_ptr_id';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'djaccount_ptr_id';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'djaccount_ptr_id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'corporateform' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'owner' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'branch' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
public $hasAndBelongsToMany = array(
|
||||
'User' =>
|
||||
array(
|
||||
'className' => 'User',
|
||||
'with' => 'AppUser',
|
||||
//'joinTable' => 'mic_sys_micapp',
|
||||
'foreignKey' => 'id',
|
||||
'associationForeignKey' => 'user_id',
|
||||
'limit' => 1
|
||||
)
|
||||
);
|
||||
public $hasOne = array(
|
||||
'DreamjobUser' => array(
|
||||
'className' => 'DreamjobUser',
|
||||
'foreignKey' => 'micapplication_ptr_id'
|
||||
),
|
||||
'AppUser' => array(
|
||||
'className' => 'AppUser',
|
||||
'foreignKey' => 'id'
|
||||
)
|
||||
);
|
||||
public $hasMany = array(
|
||||
'DreamjobPageInh' => array(
|
||||
'className' => 'DreamjobPageInh',
|
||||
'foreignKey' => 'user_id'
|
||||
),
|
||||
'DreamjobJobOpening' => array(
|
||||
'className' => 'DreamjobJobOpening',
|
||||
'foreignKey' => 'company_id'
|
||||
)
|
||||
);
|
||||
}
|
|
@ -0,0 +1,199 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* MicDjJobsOpening Model
|
||||
*
|
||||
* @property Company $Company
|
||||
* @property Graducation $Graducation
|
||||
* @property Kindofjob $Kindofjob
|
||||
*/
|
||||
class DreamjobJobOpening extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_jobs_opening';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'title';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'userDefined' => array(
|
||||
'rule' => array('userDefined'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'street' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'city' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'postcode' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'title' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'company_id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'branch' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'kindofjob_id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'startdate' => array(
|
||||
'date' => array(
|
||||
'rule' => array('date'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'enddate' => array(
|
||||
'date' => array(
|
||||
'rule' => array('date'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'active' => array(
|
||||
'boolean' => array(
|
||||
'rule' => array('boolean'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'text' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
|
||||
/**
|
||||
* belongsTo associations
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $belongsTo = array(
|
||||
'DreamjobCompany' => array(
|
||||
'className' => 'DreamjobCompany',
|
||||
'foreignKey' => 'company_id',
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => ''
|
||||
),
|
||||
'DreamjobListGraducation' => array(
|
||||
'className' => 'DreamjobListGraducation',
|
||||
'foreignKey' => 'graducation_id',
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => ''
|
||||
),
|
||||
'DreamjobListKindofjob' => array(
|
||||
'className' => 'DreamjobListKindofjob',
|
||||
'foreignKey' => 'kindofjob_id',
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => ''
|
||||
)
|
||||
);
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* DreamjobListBranch Model
|
||||
*
|
||||
*/
|
||||
class DreamjobListBranch extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_list_branch';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'name';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'id' => array(
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'naturalNumber' => array(
|
||||
'rule' => array('naturalNumber'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'name' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* DreamjobListCity Model
|
||||
*
|
||||
*/
|
||||
class DreamjobListCity extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_list_city';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'name';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'id' => array(
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'naturalNumber' => array(
|
||||
'rule' => array('naturalNumber'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'name' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* DreamjobListCountry Model
|
||||
*
|
||||
*/
|
||||
class DreamjobListCountry extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_list_country';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'name';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'id' => array(
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'naturalNumber' => array(
|
||||
'rule' => array('naturalNumber'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'name' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* DreamjobListGraducation Model
|
||||
*
|
||||
*/
|
||||
class DreamjobListGraducation extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_list_graducation';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'name';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'id' => array(
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'naturalNumber' => array(
|
||||
'rule' => array('naturalNumber'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'name' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* DreamjobListJob Model
|
||||
*
|
||||
*/
|
||||
class DreamjobListJob extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_list_job';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'name';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'id' => array(
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'naturalNumber' => array(
|
||||
'rule' => array('naturalNumber'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'name' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* DreamjobListKindofjob Model
|
||||
*
|
||||
*/
|
||||
class DreamjobListKindofjob extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_list_kindofjob';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'name';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'id' => array(
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'naturalNumber' => array(
|
||||
'rule' => array('naturalNumber'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'name' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* MicDjPageImage Model
|
||||
*
|
||||
* @property PagePtr $PagePtr
|
||||
*/
|
||||
class DreamjobPageImage extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_page_image';
|
||||
|
||||
/**
|
||||
* Primary key field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $primaryKey = 'page_ptr_id';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'page_ptr_id';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'page_ptr_id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'image' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'alphaNumeric' => array(
|
||||
'rule' => array('alphaNumeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
|
||||
/**
|
||||
* belongsTo associations
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $belongsTo = array(
|
||||
'DreamjobPageInh' => array(
|
||||
'className' => 'DreamjobPageInh',
|
||||
'foreignKey' => 'page_ptr_id',
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => ''
|
||||
)
|
||||
);
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* MicDjPageInh Model
|
||||
*
|
||||
*/
|
||||
class DreamjobPageInh extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_page_inh';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'title';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'id' => array(
|
||||
'naturalNumber' => array(
|
||||
'rule' => array('naturalNumber'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'user_id' => array(
|
||||
'naturalNumber' => array(
|
||||
'rule' => array('naturalNumber'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'title' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'position' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* MicDjPageTxt Model
|
||||
*
|
||||
* @property PagePtr $PagePtr
|
||||
*/
|
||||
class DreamjobPageText extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_page_txt';
|
||||
|
||||
/**
|
||||
* Primary key field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $primaryKey = 'page_ptr_id';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'page_ptr_id';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'page_ptr_id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'text' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
|
||||
/**
|
||||
* belongsTo associations
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $belongsTo = array(
|
||||
'DreamjobPageInh' => array(
|
||||
'className' => 'DreamjobPageInh',
|
||||
'foreignKey' => 'page_ptr_id',
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => ''
|
||||
)
|
||||
);
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* DreamjobUser Model
|
||||
*
|
||||
* TODO
|
||||
*
|
||||
* @property MicapplicationPtr $MicapplicationPtr
|
||||
*/
|
||||
class DreamjobUser extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_account_acc';
|
||||
|
||||
/**
|
||||
* Primary key field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $primaryKey = 'micapplication_ptr_id';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'micapplication_ptr_id';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'micapplication_ptr_id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'street' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'city' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'postcode' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
public $hasOne = array(
|
||||
'AppUser' => array(
|
||||
'className' => 'AppUser',
|
||||
'foreignKey' => 'id'
|
||||
)
|
||||
);
|
||||
}
|
|
@ -0,0 +1,158 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* DreamjobWorker Model
|
||||
*
|
||||
* TODO
|
||||
*
|
||||
* @property DjaccountPtr $DjaccountPtr
|
||||
* @property Graducation $Graducation
|
||||
*/
|
||||
class DreamjobWorker extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_dj_account_wrk';
|
||||
|
||||
/**
|
||||
* Primary key field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $primaryKey = 'djaccount_ptr_id';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'djaccount_ptr_id';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'djaccount_ptr_id' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'searchhidden' => array(
|
||||
'boolean' => array(
|
||||
'rule' => array('boolean'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'advertising' => array(
|
||||
'boolean' => array(
|
||||
'rule' => array('boolean'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'leadership_ability' => array(
|
||||
'boolean' => array(
|
||||
'rule' => array('boolean'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'country' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'iam' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
public $hasAndBelongsToMany = array(
|
||||
'User' =>
|
||||
array(
|
||||
'className' => 'User',
|
||||
'with' => 'AppUser',
|
||||
//'joinTable' => 'mic_sys_micapp',
|
||||
'foreignKey' => 'id',
|
||||
'associationForeignKey' => 'user_id',
|
||||
'limit' => 1
|
||||
)
|
||||
);
|
||||
public $belongsTo = array(
|
||||
'DreamjobListGraducation' => array(
|
||||
'className' => 'DreamjobListGraducation',
|
||||
'foreignKey' => 'graducation_id'
|
||||
)
|
||||
);
|
||||
public $hasOne = array(
|
||||
'DreamjobUser' => array(
|
||||
'className' => 'DreamjobUser',
|
||||
'foreignKey' => 'micapplication_ptr_id'
|
||||
),
|
||||
'AppUser' => array(
|
||||
'className' => 'AppUser',
|
||||
'foreignKey' => 'id'
|
||||
)
|
||||
);
|
||||
public $hasMany = array(
|
||||
'DreamjobPageInh' => array(
|
||||
'className' => 'DreamjobPageInh',
|
||||
'foreignKey' => 'user_id'
|
||||
)
|
||||
);
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* MicSysMannerofaddr Model
|
||||
*
|
||||
*/
|
||||
class Mannerofaddress extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_sys_mannerofaddr';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'name';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'id' => array(
|
||||
'naturalNumber' => array(
|
||||
'rule' => array('naturalNumber'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'name' => array(
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
|
@ -0,0 +1,210 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* MicSysMicacc Model
|
||||
*
|
||||
* @property Mannerofaddress $Mannerofaddress
|
||||
*/
|
||||
class User extends AppModel {
|
||||
|
||||
/**
|
||||
* Use database config
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $useDbConfig = 'dreamjobMain';
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'mic_sys_micacc';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'id';
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'id' => array(
|
||||
'multiple' => array(
|
||||
'rule' => array('multiple'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'naturalNumber' => array(
|
||||
'rule' => array('naturalNumber'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'first_name' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'last_name' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'is_staff' => array(
|
||||
'boolean' => array(
|
||||
'rule' => array('boolean'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'is_active' => array(
|
||||
'boolean' => array(
|
||||
'rule' => array('boolean'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'is_superuser' => array(
|
||||
'boolean' => array(
|
||||
'rule' => array('boolean'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'last_login' => array(
|
||||
'datetime' => array(
|
||||
'rule' => array('datetime'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'date_joined' => array(
|
||||
'datetime' => array(
|
||||
'rule' => array('datetime'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'password' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'mail' => array(
|
||||
'email' => array(
|
||||
'rule' => array('email'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'code' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'avatar' => array(
|
||||
'url' => array(
|
||||
'rule' => array('url'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'bday' => array(
|
||||
'date' => array(
|
||||
'rule' => array('date'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
'comment' => array(
|
||||
'notEmpty' => array(
|
||||
'rule' => array('notEmpty'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
|
||||
/**
|
||||
* belongsTo associations
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $belongsTo = array(
|
||||
'Mannerofaddress' => array(
|
||||
'className' => 'Mannerofaddress',
|
||||
'foreignKey' => 'mannerofaddress_id',
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => ''
|
||||
),
|
||||
);
|
||||
public $hasMany = array(
|
||||
'AppUser' => array(
|
||||
'className' => 'AppUser',
|
||||
'foreignKey' => 'user_id',
|
||||
'dependent' => true
|
||||
)
|
||||
);
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
App::uses('MicSysMannerofaddrsController', 'Controller');
|
||||
|
||||
/**
|
||||
* MicSysMannerofaddrsController Test Case
|
||||
*
|
||||
*/
|
||||
class MicSysMannerofaddrsControllerTest extends ControllerTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_sys_mannerofaddr'
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
App::uses('MicSysMicaccsController', 'Controller');
|
||||
|
||||
/**
|
||||
* MicSysMicaccsController Test Case
|
||||
*
|
||||
*/
|
||||
class MicSysMicaccsControllerTest extends ControllerTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_sys_micacc',
|
||||
'app.mannerofaddress'
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
App::uses('MicSysMicappsController', 'Controller');
|
||||
|
||||
/**
|
||||
* MicSysMicappsController Test Case
|
||||
*
|
||||
*/
|
||||
class MicSysMicappsControllerTest extends ControllerTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_sys_micapp',
|
||||
'app.user',
|
||||
'app.mannerofaddress'
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
App::uses('MicDjAccountAcc', 'Model');
|
||||
|
||||
/**
|
||||
* MicDjAccountAcc Test Case
|
||||
*
|
||||
*/
|
||||
class MicDjAccountAccTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_dj_account_acc'
|
||||
);
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->MicDjAccountAcc = ClassRegistry::init('MicDjAccountAcc');
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
unset($this->MicDjAccountAcc);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
App::uses('MicDjAccountCmpy', 'Model');
|
||||
|
||||
/**
|
||||
* MicDjAccountCmpy Test Case
|
||||
*
|
||||
*/
|
||||
class MicDjAccountCmpyTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_dj_account_cmpy',
|
||||
'app.djaccount_ptr'
|
||||
);
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->MicDjAccountCmpy = ClassRegistry::init('MicDjAccountCmpy');
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
unset($this->MicDjAccountCmpy);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
App::uses('MicDjAccountWrk', 'Model');
|
||||
|
||||
/**
|
||||
* MicDjAccountWrk Test Case
|
||||
*
|
||||
*/
|
||||
class MicDjAccountWrkTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_dj_account_wrk',
|
||||
'app.djaccount_ptr',
|
||||
'app.graducation'
|
||||
);
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->MicDjAccountWrk = ClassRegistry::init('MicDjAccountWrk');
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
unset($this->MicDjAccountWrk);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
App::uses('MicDjJobsOpening', 'Model');
|
||||
|
||||
/**
|
||||
* MicDjJobsOpening Test Case
|
||||
*
|
||||
*/
|
||||
class MicDjJobsOpeningTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_dj_jobs_opening',
|
||||
'app.company',
|
||||
'app.graducation',
|
||||
'app.kindofjob'
|
||||
);
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->MicDjJobsOpening = ClassRegistry::init('MicDjJobsOpening');
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
unset($this->MicDjJobsOpening);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
App::uses('MicDjListGraducation', 'Model');
|
||||
|
||||
/**
|
||||
* MicDjListGraducation Test Case
|
||||
*
|
||||
*/
|
||||
class MicDjListGraducationTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_dj_list_graducation'
|
||||
);
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->MicDjListGraducation = ClassRegistry::init('MicDjListGraducation');
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
unset($this->MicDjListGraducation);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
App::uses('MicDjPageImage', 'Model');
|
||||
|
||||
/**
|
||||
* MicDjPageImage Test Case
|
||||
*
|
||||
*/
|
||||
class MicDjPageImageTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_dj_page_image',
|
||||
'app.page_ptr'
|
||||
);
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->MicDjPageImage = ClassRegistry::init('MicDjPageImage');
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
unset($this->MicDjPageImage);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
App::uses('MicDjPageInh', 'Model');
|
||||
|
||||
/**
|
||||
* MicDjPageInh Test Case
|
||||
*
|
||||
*/
|
||||
class MicDjPageInhTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_dj_page_inh'
|
||||
);
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->MicDjPageInh = ClassRegistry::init('MicDjPageInh');
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
unset($this->MicDjPageInh);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
App::uses('MicDjPageTxt', 'Model');
|
||||
|
||||
/**
|
||||
* MicDjPageTxt Test Case
|
||||
*
|
||||
*/
|
||||
class MicDjPageTxtTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_dj_page_txt',
|
||||
'app.page_ptr'
|
||||
);
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->MicDjPageTxt = ClassRegistry::init('MicDjPageTxt');
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
unset($this->MicDjPageTxt);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
App::uses('MicSysMannerofaddr', 'Model');
|
||||
|
||||
/**
|
||||
* MicSysMannerofaddr Test Case
|
||||
*
|
||||
*/
|
||||
class MicSysMannerofaddrTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_sys_mannerofaddr'
|
||||
);
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->MicSysMannerofaddr = ClassRegistry::init('MicSysMannerofaddr');
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
unset($this->MicSysMannerofaddr);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
App::uses('MicSysMicacc', 'Model');
|
||||
|
||||
/**
|
||||
* MicSysMicacc Test Case
|
||||
*
|
||||
*/
|
||||
class MicSysMicaccTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_sys_micacc',
|
||||
'app.mannerofaddress'
|
||||
);
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->MicSysMicacc = ClassRegistry::init('MicSysMicacc');
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
unset($this->MicSysMicacc);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
App::uses('MicSysMicapp', 'Model');
|
||||
|
||||
/**
|
||||
* MicSysMicapp Test Case
|
||||
*
|
||||
*/
|
||||
class MicSysMicappTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fixtures = array(
|
||||
'app.mic_sys_micapp',
|
||||
'app.user',
|
||||
'app.mannerofaddress'
|
||||
);
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->MicSysMicapp = ClassRegistry::init('MicSysMicapp');
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function tearDown() {
|
||||
unset($this->MicSysMicapp);
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* MicDjAccountAccFixture
|
||||
*
|
||||
*/
|
||||
class MicDjAccountAccFixture extends CakeTestFixture {
|
||||
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'mic_dj_account_acc';
|
||||
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'micapplication_ptr_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
|
||||
'street' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'city' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'postcode' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'indexes' => array(
|
||||
'PRIMARY' => array('column' => 'micapplication_ptr_id', 'unique' => 1)
|
||||
),
|
||||
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
|
||||
);
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array(
|
||||
'micapplication_ptr_id' => 1,
|
||||
'street' => 'Lorem ipsum dolor sit amet',
|
||||
'city' => 'Lorem ipsum dolor sit amet',
|
||||
'postcode' => 'Lorem ipsum dolor sit amet'
|
||||
),
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
/**
|
||||
* MicDjAccountCmpyFixture
|
||||
*
|
||||
*/
|
||||
class MicDjAccountCmpyFixture extends CakeTestFixture {
|
||||
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'mic_dj_account_cmpy';
|
||||
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'djaccount_ptr_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
|
||||
'corporateform' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 30, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'owner' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'branch' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'headcount' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 6),
|
||||
'bank_details' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'website' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 200, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'css' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 200, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'indexes' => array(
|
||||
'PRIMARY' => array('column' => 'djaccount_ptr_id', 'unique' => 1)
|
||||
),
|
||||
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
|
||||
);
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array(
|
||||
'djaccount_ptr_id' => 1,
|
||||
'corporateform' => 'Lorem ipsum dolor sit amet',
|
||||
'owner' => 'Lorem ipsum dolor sit amet',
|
||||
'branch' => 'Lorem ipsum dolor sit amet',
|
||||
'headcount' => 1,
|
||||
'bank_details' => 'Lorem ipsum dolor sit amet',
|
||||
'website' => 'Lorem ipsum dolor sit amet',
|
||||
'css' => 'Lorem ipsum dolor sit amet'
|
||||
),
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
/**
|
||||
* MicDjAccountWrkFixture
|
||||
*
|
||||
*/
|
||||
class MicDjAccountWrkFixture extends CakeTestFixture {
|
||||
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'mic_dj_account_wrk';
|
||||
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'djaccount_ptr_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
|
||||
'graducation_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'key' => 'index'),
|
||||
'workexperience' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 6),
|
||||
'searchhidden' => array('type' => 'boolean', 'null' => false, 'default' => null),
|
||||
'advertising' => array('type' => 'boolean', 'null' => false, 'default' => null),
|
||||
'leadership_ability' => array('type' => 'boolean', 'null' => false, 'default' => null),
|
||||
'country' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'iam' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 300, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'indexes' => array(
|
||||
'PRIMARY' => array('column' => 'djaccount_ptr_id', 'unique' => 1),
|
||||
'mic_dj_account_wrk_b05158b4' => array('column' => 'graducation_id', 'unique' => 0)
|
||||
),
|
||||
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
|
||||
);
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array(
|
||||
'djaccount_ptr_id' => 1,
|
||||
'graducation_id' => 1,
|
||||
'workexperience' => 1,
|
||||
'searchhidden' => 1,
|
||||
'advertising' => 1,
|
||||
'leadership_ability' => 1,
|
||||
'country' => 'Lorem ipsum dolor sit amet',
|
||||
'iam' => 'Lorem ipsum dolor sit amet'
|
||||
),
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
/**
|
||||
* MicDjJobsOpeningFixture
|
||||
*
|
||||
*/
|
||||
class MicDjJobsOpeningFixture extends CakeTestFixture {
|
||||
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'mic_dj_jobs_opening';
|
||||
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
|
||||
'street' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'city' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'postcode' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'title' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'company_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'index'),
|
||||
'graducation_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'key' => 'index'),
|
||||
'branch' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'kindofjob_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'index'),
|
||||
'startdate' => array('type' => 'date', 'null' => false, 'default' => null),
|
||||
'enddate' => array('type' => 'date', 'null' => true, 'default' => null),
|
||||
'active' => array('type' => 'boolean', 'null' => false, 'default' => null),
|
||||
'text' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'indexes' => array(
|
||||
'PRIMARY' => array('column' => 'id', 'unique' => 1),
|
||||
'mic_dj_jobs_opening_543518c6' => array('column' => 'company_id', 'unique' => 0),
|
||||
'mic_dj_jobs_opening_b05158b4' => array('column' => 'graducation_id', 'unique' => 0),
|
||||
'mic_dj_jobs_opening_840a080f' => array('column' => 'kindofjob_id', 'unique' => 0)
|
||||
),
|
||||
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
|
||||
);
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array(
|
||||
'id' => 1,
|
||||
'street' => 'Lorem ipsum dolor sit amet',
|
||||
'city' => 'Lorem ipsum dolor sit amet',
|
||||
'postcode' => 'Lorem ipsum dolor sit amet',
|
||||
'title' => 'Lorem ipsum dolor sit amet',
|
||||
'company_id' => 1,
|
||||
'graducation_id' => 1,
|
||||
'branch' => 'Lorem ipsum dolor sit amet',
|
||||
'kindofjob_id' => 1,
|
||||
'startdate' => '2014-02-15',
|
||||
'enddate' => '2014-02-15',
|
||||
'active' => 1,
|
||||
'text' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.'
|
||||
),
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
/**
|
||||
* MicDjListGraducationFixture
|
||||
*
|
||||
*/
|
||||
class MicDjListGraducationFixture extends CakeTestFixture {
|
||||
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'mic_dj_list_graducation';
|
||||
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
|
||||
'name' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'indexes' => array(
|
||||
'PRIMARY' => array('column' => 'id', 'unique' => 1)
|
||||
),
|
||||
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
|
||||
);
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array(
|
||||
'id' => 1,
|
||||
'name' => 'Lorem ipsum dolor sit amet'
|
||||
),
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
/**
|
||||
* MicDjPageImageFixture
|
||||
*
|
||||
*/
|
||||
class MicDjPageImageFixture extends CakeTestFixture {
|
||||
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'mic_dj_page_image';
|
||||
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'page_ptr_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
|
||||
'image' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'indexes' => array(
|
||||
'PRIMARY' => array('column' => 'page_ptr_id', 'unique' => 1)
|
||||
),
|
||||
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
|
||||
);
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array(
|
||||
'page_ptr_id' => 1,
|
||||
'image' => 'Lorem ipsum dolor sit amet'
|
||||
),
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
/**
|
||||
* MicDjPageInhFixture
|
||||
*
|
||||
*/
|
||||
class MicDjPageInhFixture extends CakeTestFixture {
|
||||
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'mic_dj_page_inh';
|
||||
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
|
||||
'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'index'),
|
||||
'title' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'position' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 6),
|
||||
'indexes' => array(
|
||||
'PRIMARY' => array('column' => 'id', 'unique' => 1),
|
||||
'mic_dj_page_inh_fbfc09f1' => array('column' => 'user_id', 'unique' => 0)
|
||||
),
|
||||
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
|
||||
);
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array(
|
||||
'id' => 1,
|
||||
'user_id' => 1,
|
||||
'title' => 'Lorem ipsum dolor sit amet',
|
||||
'position' => 1
|
||||
),
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
/**
|
||||
* MicDjPageTxtFixture
|
||||
*
|
||||
*/
|
||||
class MicDjPageTxtFixture extends CakeTestFixture {
|
||||
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'mic_dj_page_txt';
|
||||
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'page_ptr_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
|
||||
'text' => array('type' => 'text', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'indexes' => array(
|
||||
'PRIMARY' => array('column' => 'page_ptr_id', 'unique' => 1)
|
||||
),
|
||||
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
|
||||
);
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array(
|
||||
'page_ptr_id' => 1,
|
||||
'text' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.'
|
||||
),
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
/**
|
||||
* MicSysMannerofaddrFixture
|
||||
*
|
||||
*/
|
||||
class MicSysMannerofaddrFixture extends CakeTestFixture {
|
||||
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'mic_sys_mannerofaddr';
|
||||
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
|
||||
'name' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'indexes' => array(
|
||||
'PRIMARY' => array('column' => 'id', 'unique' => 1)
|
||||
),
|
||||
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
|
||||
);
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array(
|
||||
'id' => 1,
|
||||
'name' => 'Lorem ipsum dolor sit amet'
|
||||
),
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
/**
|
||||
* MicSysMicaccFixture
|
||||
*
|
||||
*/
|
||||
class MicSysMicaccFixture extends CakeTestFixture {
|
||||
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'mic_sys_micacc';
|
||||
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
|
||||
'first_name' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 30, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'last_name' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 30, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'is_staff' => array('type' => 'boolean', 'null' => false, 'default' => null),
|
||||
'is_active' => array('type' => 'boolean', 'null' => false, 'default' => null),
|
||||
'is_superuser' => array('type' => 'boolean', 'null' => false, 'default' => null),
|
||||
'last_login' => array('type' => 'datetime', 'null' => true, 'default' => null),
|
||||
'date_joined' => array('type' => 'datetime', 'null' => true, 'default' => null),
|
||||
'password' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 128, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'mail' => array('type' => 'string', 'null' => false, 'default' => null, 'length' => 75, 'key' => 'unique', 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'code' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'mannerofaddress_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'key' => 'index'),
|
||||
'avatar' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'nickname' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'bday' => array('type' => 'date', 'null' => true, 'default' => null),
|
||||
'comment' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'indexes' => array(
|
||||
'PRIMARY' => array('column' => 'id', 'unique' => 1),
|
||||
'mail' => array('column' => 'mail', 'unique' => 1),
|
||||
'mic_sys_micacc_6bef5955' => array('column' => 'mannerofaddress_id', 'unique' => 0)
|
||||
),
|
||||
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
|
||||
);
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array(
|
||||
'id' => 1,
|
||||
'first_name' => 'Lorem ipsum dolor sit amet',
|
||||
'last_name' => 'Lorem ipsum dolor sit amet',
|
||||
'is_staff' => 1,
|
||||
'is_active' => 1,
|
||||
'is_superuser' => 1,
|
||||
'last_login' => '2014-01-26 13:53:30',
|
||||
'date_joined' => '2014-01-26 13:53:30',
|
||||
'password' => 'Lorem ipsum dolor sit amet',
|
||||
'mail' => 'Lorem ipsum dolor sit amet',
|
||||
'code' => 'Lorem ipsum dolor sit amet',
|
||||
'mannerofaddress_id' => 1,
|
||||
'avatar' => 'Lorem ipsum dolor sit amet',
|
||||
'nickname' => 'Lorem ipsum dolor sit amet',
|
||||
'bday' => '2014-01-26',
|
||||
'comment' => 'Lorem ipsum dolor sit amet'
|
||||
),
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
/**
|
||||
* MicSysMicappFixture
|
||||
*
|
||||
*/
|
||||
class MicSysMicappFixture extends CakeTestFixture {
|
||||
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $table = 'mic_sys_micapp';
|
||||
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
|
||||
'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'index'),
|
||||
'take_systemwide' => array('type' => 'boolean', 'null' => false, 'default' => null),
|
||||
'avatar' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'nickname' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'mannerofaddress_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'key' => 'index'),
|
||||
'first_name' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'last_name' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||
'bday' => array('type' => 'date', 'null' => true, 'default' => null),
|
||||
'indexes' => array(
|
||||
'PRIMARY' => array('column' => 'id', 'unique' => 1),
|
||||
'mic_sys_micapp_fbfc09f1' => array('column' => 'user_id', 'unique' => 0),
|
||||
'mic_sys_micapp_6bef5955' => array('column' => 'mannerofaddress_id', 'unique' => 0)
|
||||
),
|
||||
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
|
||||
);
|
||||
|
||||
/**
|
||||
* Records
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array(
|
||||
'id' => 1,
|
||||
'user_id' => 1,
|
||||
'take_systemwide' => 1,
|
||||
'avatar' => 'Lorem ipsum dolor sit amet',
|
||||
'nickname' => 'Lorem ipsum dolor sit amet',
|
||||
'mannerofaddress_id' => 1,
|
||||
'first_name' => 'Lorem ipsum dolor sit amet',
|
||||
'last_name' => 'Lorem ipsum dolor sit amet',
|
||||
'bday' => '2014-01-26'
|
||||
),
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
if($isLoggedin){
|
||||
?>
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
<!--
|
||||
.bar #barleft {
|
||||
position:relative;
|
||||
right:-50px;
|
||||
}
|
||||
.column-center{
|
||||
padding-left:50px;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
|
||||
<ul class="list-unstyled">
|
||||
<li<?php if(isset($MENU_PROFIL)){?> class="active"<?php } ?>><?=$this->Html->image('bar-profil.png',array('url'=>array('controller'=>'user','action'=>'profil'))); ?></li>
|
||||
<c:if test="${COMPANY!=null}">
|
||||
<li<?php if(isset($MENU_OPENING)){?> class="active"<?php } ?>><a href="<c:url value="${URL}opening/"/>"><img src="<c:url value="${STATIC_URL}img/bar-job.png"/>"/></a></li>
|
||||
</c:if>
|
||||
<c:if test="${WORKER!=null}">
|
||||
<li<?php if(isset($MENU_APPLICATION)){?> class="active"<?php } ?>><a href="<c:url value="${URL}application/"/>"><img src="<c:url value="${STATIC_URL}img/bar-job.png"/>"/></a></li>
|
||||
<li<?php if(isset($MENU_FAVORITY)){?> class="active"<?php } ?>><a href="<c:url value="${URL}favority/"/>"><img src="<c:url value="${STATIC_URL}img/bar-favority.png"/>"/></a></li>
|
||||
</c:if>
|
||||
<li<?php if(isset($MENU_SETTINGS)){?> class="active"<?php } ?>><a href=""><img src="<c:url value="${STATIC_URL}img/bar-settings.png"/>"/></a></li>
|
||||
</ul>
|
||||
<?php
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
Werbung
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<div class="alert alert-<?= (isset($alert)? $alert : 'info' ) ?>">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<?php echo __d($message, $message); ?>
|
||||
</div>
|
|
@ -0,0 +1,95 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
$opening_in_fav = false;
|
||||
$opening_in_app = false;
|
||||
?>
|
||||
|
||||
<c:if test="${WORKER!=null}">
|
||||
<c:forEach var="item" items="${WORKER.applications}">
|
||||
<c:if test="${item.opening.id eq opening.id}">
|
||||
<c:set var="opening_in_app" value="true" />
|
||||
<c:set var="opening_app" value="${item}" />
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:forEach var="item" items="${WORKER.favority}">
|
||||
<c:if test="${item.id eq opening.id}">
|
||||
<c:set var="opening_in_fav" value="true" />
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty opening_MINI || not (opening_in_app || opening_in_fav)}">
|
||||
<div class="openingitem">
|
||||
<h3><?=$opening['DreamjobJobOpening']['title'];?></h3>
|
||||
<c:if test="${WORKER!=null}">
|
||||
<c:if test="${not opening_in_app}">
|
||||
<span style="float: right;">
|
||||
<a href="<c:url value="${URL}favority/toggle/${opening.id}/"/>"><c:choose>
|
||||
<c:when test="${opening_in_fav}"><img src="<c:url value="${STATIC_URL}img/favority_on.png"/>"/></c:when><c:otherwise><img src="<c:url value="${STATIC_URL}img/favority_off.png"/>"/></c:otherwise></c:choose></a>
|
||||
</span>
|
||||
</c:if>
|
||||
</c:if>
|
||||
<div>
|
||||
<c:choose>
|
||||
<c:when test="${opening.company.avatar != null}">
|
||||
<div class="icon">
|
||||
<span><c:out value="${opening.company.nickname}${opening.company.corporateform}"/></span>
|
||||
<div>
|
||||
<img src="<c:url value="${MEDIA_URL}${profil.avatar}"/>"/>
|
||||
</div>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="noicon-title">
|
||||
<span><c:out value="${opening.company.nickname}${opening.company.corporateform}"/></span>
|
||||
</div>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="left">
|
||||
<span><?=__("dreamjob.graducation.company");?>: <?=$opening['DreamjobListGraducation']['name'];?></span>
|
||||
<span><?=__("dreamjob.branch");?>: <?=$opening['DreamjobJobOpening']['branch'];?></span>
|
||||
<span><?=__("dreamjob.city");?>: <?=$opening['DreamjobJobOpening']['city'];?></span>
|
||||
<span><?=__("dreamjob.kindofjob");?>: <?=$opening['DreamjobListKindofjob']['name'];?></span>
|
||||
<span<?php if( time() > strtotime($opening['DreamjobJobOpening']['enddate'])){ ?> class="opening_outdate"<?php } ?>><?=__("dreamjob.opening.enddate");?>: <?=$this->Time->format('d.m.Y', $opening['DreamjobJobOpening']['enddate']);?></span>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="btn-group-vertical">
|
||||
<a class="btn btn-default" href="<c:url value="${URL}opening/${opening.id}/"/>">
|
||||
<spring:message code="dreamjob.opening.detail"/>
|
||||
</a>
|
||||
<c:choose>
|
||||
<c:when test="${COMPANY.id==opening.company.id}">
|
||||
<a class="btn btn-default" href="<c:url value="${URL}opening/edit/${opening.id}/"/>">
|
||||
<spring:message code="dreamjob.edit"/>
|
||||
</a>
|
||||
</c:when>
|
||||
<c:when test="${opening_in_app}">
|
||||
<c:set var="count" value="0"/>
|
||||
<c:set var="newcount" value="0"/>
|
||||
<c:forEach var="item" items="${opening_app.messages}">
|
||||
<c:if test="${item.fromcompany && not saw}">
|
||||
<c:set var="newcount" value="${newcount + 1}"/>
|
||||
</c:if>
|
||||
<c:set var="count" value="${count + 1}"/>
|
||||
</c:forEach>
|
||||
<a class="btn btn-default" href="<c:url value="${URL}application/${opening_app.id}/"/>">
|
||||
<spring:message code="dreamjob.applicated"/>
|
||||
<span class="badge">
|
||||
<c:if test="${newcount eq count}">${newcount}/</c:if>
|
||||
${count}</span>
|
||||
</a>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<a class="btn btn-default
|
||||
<c:if test="${WORKER ==null}">disabled</c:if>"
|
||||
href="{% url de.miconware.dreamjob.jobs.views.application_send opening.pk %}">
|
||||
<spring:message code="dreamjob.applicate"/>
|
||||
</a>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
if(!empty($isLoggedin)){
|
||||
?>
|
||||
<ul>
|
||||
<?php if(!empty($isStaff)){ ?>
|
||||
<li<?php if(isset($MENU_ADMIN)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.admin'),'/admin/');?></li>
|
||||
<?php } ?>
|
||||
<li<?php if(isset($MENU_START)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.startpage'),array('controller'=>'home','action'=>'home'));?></li>
|
||||
<li<?php if(isset($MENU_SEARCH)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.search'),'/search/');?></li>
|
||||
<li<?php if(isset($MENU_SETTINGS)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.settings'),'/settings/');?></li>
|
||||
<li<?php if(isset($MENU_SERVICE)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.service'),'/service/');?></li>
|
||||
<li><?=$this->Html->link(__('dreamjob.logout'),array('controller'=>'home','action'=>'logout'));?></li>
|
||||
</ul>
|
||||
<?php }else{ ?>
|
||||
<div>
|
||||
<?php
|
||||
echo $this->Form->create(null, array('inputDefaults'=> array('div' => false,'label'=>false,
|
||||
'style' => 'width:160px;',
|
||||
'class' => 'form-control'),
|
||||
'class'=>'navbar-form',
|
||||
'back'=>'true',
|
||||
'url'=> array('controller'=>'home','action'=>'login')
|
||||
// 'url' => array('controller' => 'recipes', 'action' => 'add')
|
||||
));
|
||||
echo $this->Form->input('User.mail',array('placeholder'=>__('dreamjob.mail')));
|
||||
echo "\n";
|
||||
echo $this->Form->input('User.password',array('placeholder'=>__('dreamjob.password')));
|
||||
echo "\n";
|
||||
echo $this->Form->button(__('dreamjob.login'),array('div' => false,'class'=>"btn btn-default",'type' => 'submit'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<?php }
|
||||
/*
|
||||
|
||||
<button type="submit" class="btn btn-default"><?=__('dreamjob.login');?></button>
|
||||
<form class="navbar-form" method="post" action="${PURL}login/" back="true">
|
||||
<input class="form-control" type="text" name="mail" placeholder="<?=__('dreamjob.mail');?>" style="width:160px;"/>
|
||||
<input class="form-control" type="password" name="password" placeholder="<?=__('dreamjob.password');?>" style="width:160px;"/>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="nav-header">Nav header</li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
<li><a href="#">One more separated link</a></li>
|
||||
</ul>
|
||||
</li> */?>
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<h1><?=$page['DreamjobPageInh']['title'];?></h1>
|
||||
<?php
|
||||
if(isset($page['DreamjobPageImage'])){
|
||||
?>
|
||||
<center>
|
||||
<img src="<?=$MEDIA_URL.$page['DreamjobPageImage']['image'];?>"/>
|
||||
</center>
|
||||
<?php
|
||||
}else{
|
||||
echo $page['DreamjobPageText']['text'];
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<div class="columns">
|
||||
<div class="bar avatar">
|
||||
<img src="<?php
|
||||
if($profil['AppUser']['take_systemwide'])
|
||||
if($profil['User'][0]['avatar'])
|
||||
echo $MEDIA_URL.$profil['User'][0]['avatar'];
|
||||
else
|
||||
echo $STATIC_URL."img/icon_user.png";
|
||||
else
|
||||
if($profil['AppUser']['avatar'])
|
||||
echo $MEDIA_URL.$profil['AppUser']['avatar'];
|
||||
else
|
||||
echo $STATIC_URL."img/icon_user.png";
|
||||
?>"/>
|
||||
</div>
|
||||
<div class="bar">
|
||||
<h1>
|
||||
<?php
|
||||
if($profil['AppUser']['take_systemwide'])
|
||||
echo $profil['User'][0]['first_name'].' '.$profil['User'][0]['last_name'];
|
||||
else
|
||||
echo $profil['AppUser']['first_name'].' '.$profil['AppUser']['last_name'];
|
||||
?>
|
||||
</h1>
|
||||
<br/>
|
||||
<p>
|
||||
<?=__("dreamjob.iam");?>:<br/>
|
||||
<?=$profil['DreamjobWorker']['iam'];?>
|
||||
<c:out value="${profil.iam}"/>
|
||||
</p>
|
||||
<h3><?=__("dreamjob.mail");?></h3>
|
||||
<a href="mailto:<?=$profil['User'][0]['mail'];?>">
|
||||
<?=$profil['User'][0]['mail'];?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bar">
|
||||
<p>
|
||||
<?=__("dreamjob.bday");?>:<br/>
|
||||
<?php
|
||||
if($profil['AppUser']['take_systemwide'])
|
||||
echo $this->Time->format('d.m.Y', $profil['User'][0]['bday']);
|
||||
else
|
||||
echo $this->Time->format('d.m.Y', $profil['AppUser']['bday']);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?=__("dreamjob.workexperience");?>:<br/>
|
||||
<?=$profil['DreamjobWorker']['workexperience'];?>
|
||||
</p>
|
||||
<p>
|
||||
<?=__("dreamjob.graducation.worker");?>:<br/>
|
||||
<?=$profil['DreamjobListGraducation']['name'];?>
|
||||
</p>
|
||||
<p>
|
||||
<?=__("dreamjob.country.worker");?>:<br/>
|
||||
<?=$profil['DreamjobWorker']['country'];?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Emails.html
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
$content = explode("\n", $content);
|
||||
|
||||
foreach ($content as $line):
|
||||
echo '<p> ' . $line . "</p>\n";
|
||||
endforeach;
|
||||
?>
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Emails.text
|
||||
* @since CakePHP(tm) v 0.10.0.1076
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
?>
|
||||
<?php echo $content; ?>
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<div class="box">
|
||||
<?php
|
||||
|
||||
if (Configure::read('debug') > 0):
|
||||
echo $this->element('exception_stack_trace');
|
||||
endif;
|
||||
echo $name;
|
||||
|
||||
?>
|
||||
</div>
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<div class="alert alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<strong><?php echo __d('cake', 'Error'); ?></strong>
|
||||
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||
</div>
|
||||
<div class="box">
|
||||
<?php
|
||||
|
||||
if (Configure::read('debug') > 0):
|
||||
echo $this->element('exception_stack_trace');
|
||||
endif;
|
||||
echo $name;
|
||||
|
||||
?>
|
||||
</div>
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/**
|
||||
* Application level View Helper
|
||||
*
|
||||
* This file is application-wide helper file. You can put all
|
||||
* application-wide helper-related methods here.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://cakephp.org CakePHP(tm) Project
|
||||
* @package app.View.Helper
|
||||
* @since CakePHP(tm) v 0.2.9
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
App::uses('Helper', 'View');
|
||||
|
||||
/**
|
||||
* Application helper
|
||||
*
|
||||
* Add your application-wide methods in the class below, your helpers
|
||||
* will inherit them.
|
||||
*
|
||||
* @package app.View.Helper
|
||||
*/
|
||||
class AppHelper extends Helper {
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<div class="box">
|
||||
<h1><?=__($title);?></h1>
|
||||
<p><span style="font-size: medium;">Haben sie eine Frage oder wollen sie sich informieren?</span><br /><span style="font-size: medium;">
|
||||
Dann Kontaktieren sie uns einfach, unser Team steht Ihnen gerne zur Verfügung <a href="mailto:service@miconware.de">klick hier!</a></span></p>
|
||||
</div>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue