code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
<?php App::uses('AppModel', 'Model'); /** * Group Model * * @property User $User * @property Photo $Photo */ class Group extends AppModel { /** * Validation rules * * @var array */ public $validate = array( '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 ), ), ); //The Associations below have been created with all possible keys, those that are not needed can be removed /** * hasMany associations * * @var array */ public $hasMany = array( 'User' => array( 'className' => 'User', 'foreignKey' => 'group_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ); /** * hasAndBelongsToMany associations * * @var array */ public $hasAndBelongsToMany = array( 'Photo' => array( 'className' => 'Photo', 'joinTable' => 'photo_groups', 'foreignKey' => 'group_id', 'associationForeignKey' => 'photo_id', 'unique' => true, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => '' ) ); }
0001-bee
trunk/cakephp2/app/Model/Group.php
PHP
gpl3
1,540
<?php App::uses('AppModel', 'Model'); /** * EduType Model * * @property Education $Education */ class EduType extends AppModel { //The Associations below have been created with all possible keys, those that are not needed can be removed /** * hasMany associations * * @var array */ public $hasMany = array( 'Education' => array( 'className' => 'Education', 'foreignKey' => 'edu_type_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ); }
0001-bee
trunk/cakephp2/app/Model/EduType.php
PHP
gpl3
644
<?php App::uses('AppModel', 'Model'); /** * Message Model * * @property User $User * @property User $User */ class Message extends AppModel { /** * Validation rules * * @var array */ public $validate = array( '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 ), ), ); //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( 'User' => array( 'className' => 'User', 'foreignKey' => 'user_id', 'conditions' => '', 'fields' => '', 'order' => '' ) ); /** * hasAndBelongsToMany associations * * @var array */ public $hasAndBelongsToMany = array( 'User' => array( 'className' => 'User', 'joinTable' => 'messages_users', 'foreignKey' => 'message_id', 'associationForeignKey' => 'user_id', 'unique' => true, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => '' ) ); }
0001-bee
trunk/cakephp2/app/Model/Message.php
PHP
gpl3
1,406
<?php App::uses('AppModel', 'Model'); /** * TranslatorFriend Model * * @property Translator $Translator * @property Friend $Friend */ class TranslatorFriend extends AppModel { /** * Validation rules * * @var array */ public $validate = array( 'translator_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 ), ), 'friend_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 ), ), ); //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( 'Translator' => array( 'className' => 'Translator', 'foreignKey' => 'translator_id', 'conditions' => '', 'fields' => '', 'order' => '' ), 'Friend' => array( 'className' => 'Friend', 'foreignKey' => 'friend_id', 'conditions' => '', 'fields' => '', 'order' => '' ) ); }
0001-bee
trunk/cakephp2/app/Model/TranslatorFriend.php
PHP
gpl3
1,479
<?php App::uses('AppModel', 'Model'); /** * MessagesUser Model * * @property Message $Message * @property User $User */ class MessagesUser extends AppModel { /** * Validation rules * * @var array */ public $validate = array( 'message_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 ), ), '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 ), ), ); //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( 'Message' => array( 'className' => 'Message', 'foreignKey' => 'message_id', 'conditions' => '', 'fields' => '', 'order' => '' ), 'User' => array( 'className' => 'User', 'foreignKey' => 'user_id', 'conditions' => '', 'fields' => '', 'order' => '' ) ); }
0001-bee
trunk/cakephp2/app/Model/MessagesUser.php
PHP
gpl3
1,441
<?php App::uses('AppModel', 'Model'); /** * Job Model * * @property User $User * @property Bid $Bid */ class Job extends AppModel { /** * Validation rules * * @var array */ public $validate = array( '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 ), ), ); //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( 'User' => array( 'className' => 'User', 'foreignKey' => 'user_id', 'conditions' => '', 'fields' => '', 'order' => '' ) ); /** * hasMany associations * * @var array */ public $hasMany = array( 'Bid' => array( 'className' => 'Bid', 'foreignKey' => 'job_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ); }
0001-bee
trunk/cakephp2/app/Model/Job.php
PHP
gpl3
1,290
<?php App::uses('AppModel', 'Model'); /** * Destination Model * * @property Language $Language */ class Destination extends AppModel { //The Associations below have been created with all possible keys, those that are not needed can be removed /** * hasMany associations * * @var array */ public $hasMany = array( 'Language' => array( 'className' => 'Language', 'foreignKey' => 'destination_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ); }
0001-bee
trunk/cakephp2/app/Model/Destination.php
PHP
gpl3
651
<?php App::uses('AppModel', 'Model'); /** * UsersLanguage Model * * @property User $User * @property Language $Language */ class UsersLanguage extends AppModel { /** * Validation rules * * @var array */ public $validate = array( '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 ), ), 'language_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 ), ), ); //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( 'User' => array( 'className' => 'User', 'foreignKey' => 'user_id', 'conditions' => '', 'fields' => '', 'order' => '' ), 'Language' => array( 'className' => 'Language', 'foreignKey' => 'language_id', 'conditions' => '', 'fields' => '', 'order' => '' ) ); }
0001-bee
trunk/cakephp2/app/Model/UsersLanguage.php
PHP
gpl3
1,449
<?php App::uses('AppModel', 'Model'); /** * PhotoGroup Model * * @property Photo $Photo */ class PhotoGroup extends AppModel { //The Associations below have been created with all possible keys, those that are not needed can be removed /** * hasMany associations * * @var array */ public $hasMany = array( 'Photo' => array( 'className' => 'Photo', 'foreignKey' => 'photo_group_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ); }
0001-bee
trunk/cakephp2/app/Model/PhotoGroup.php
PHP
gpl3
637
<?php /** * Requests collector. * * This file collects requests if: * - no mod_rewrite is avilable or .htaccess files are not supported * - requires App.baseUrl to be uncommented in app/Config/core.php * - app/webroot is not set as a document root. * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** * Get Cake's root directory */ define('APP_DIR', 'app'); define('DS', DIRECTORY_SEPARATOR); define('ROOT', dirname(__FILE__)); define('WEBROOT_DIR', 'webroot'); define('WWW_ROOT', ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS); /** * This only needs to be changed if the "cake" directory is located * outside of the distributed structure. * Full path to the directory containing "cake". Do not add trailing directory separator */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); } require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php';
0001-bee
trunk/cakephp2/index.php
PHP
gpl3
1,411
<div id="success">success ...</div> <div class="photoGroups form" id="group"> <?php echo $this->Form->create('PhotoGroup'); ?> <fieldset> <legend><?php echo __('Add Photo Group'); ?></legend> <?php echo $this->Form->input('name'); echo $this->Form->input('text'); ?> </fieldset> <?php echo $this->Js->submit('Send',array( 'before'=>$this->Js->get('#sending')->effect('fadeIn'), 'success'=>$this->Js->get('#sending')->effect('fadeOut'), 'update'=>'#success' )); echo $this->Form->end(); ?> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Html->link(__('List Photo Groups'), array('action' => 'index')); ?></li> <li><?php echo $this->Html->link(__('List Photos'), array('controller' => 'photos', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo'), array('controller' => 'photos', 'action' => 'add')); ?> </li> </ul> </div> <div id="sending">sending ... </div> <?php echo $this->Js->writeBuffer(array('cache'=>TRUE)); ?>
0001-bee
trunk/cakephp2/7010/View/PhotoGroups/add.ctp
PHP
gpl3
1,157
<div id="sending" style="display: none;">Sending ...</div> <div class="photoGroups form" id="group"> <?php echo $this->Form->create('PhotoGroup'); ?> <fieldset> <legend><?php echo __('Add Photo Group'); ?></legend> <?php echo $this->Form->input('name'); echo $this->Form->input('text'); ?> </fieldset> <?php echo $this->Js->submit('Send',array( 'before'=>$this->Js->get('#sending')->effect('fadeIn'), 'success'=>$this->Js->get('#sending')->effect('fadeOut'), 'update'=>'#success' )); echo $this->Form->end(); ?> </div> <div class="photoGroups index" id="success"> <h2><?php echo __('Photo Groups');?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('id');?></th> <th><?php echo $this->Paginator->sort('name');?></th> <th><?php echo $this->Paginator->sort('text');?></th> <th class="actions"><?php echo __('Actions');?></th> </tr> <?php $i = 0; foreach ($photoGroups as $photoGroup): ?> <tr> <td><?php echo h($photoGroup['PhotoGroup']['id']); ?>&nbsp;</td> <td><?php echo h($photoGroup['PhotoGroup']['name']); ?>&nbsp;</td> <td><?php echo h($photoGroup['PhotoGroup']['text']); ?>&nbsp;</td> <td class="actions"> <?php echo $this->Html->link(__('View'), array('action' => 'view', $photoGroup['PhotoGroup']['id'])); ?> <?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $photoGroup['PhotoGroup']['id'])); ?> <?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $photoGroup['PhotoGroup']['id']), null, __('Are you sure you want to delete # %s?', $photoGroup['PhotoGroup']['id'])); ?> </td> </tr> <?php endforeach; ?> </table> <p> <?php echo $this->Paginator->counter(array( 'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}') )); ?> </p> <div class="paging"> <?php echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled')); echo $this->Paginator->numbers(array('separator' => '')); echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled')); ?> </div> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Html->link(__('New Photo Group'), array('action' => 'add')); ?></li> <li><?php echo $this->Html->link(__('List Photos'), array('controller' => 'photos', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo'), array('controller' => 'photos', 'action' => 'add')); ?> </li> </ul> </div> <?php echo $this->Js->writeBuffer(array('cache'=>TRUE)); ?>
0001-bee
trunk/cakephp2/7010/View/PhotoGroups/index.ctp
PHP
gpl3
2,797
<div class="photoGroups view"> <h2><?php echo __('Photo Group');?></h2> <dl> <dt><?php echo __('Id'); ?></dt> <dd> <?php echo h($photoGroup['PhotoGroup']['id']); ?> &nbsp; </dd> <dt><?php echo __('Name'); ?></dt> <dd> <?php echo h($photoGroup['PhotoGroup']['name']); ?> &nbsp; </dd> <dt><?php echo __('Text'); ?></dt> <dd> <?php echo h($photoGroup['PhotoGroup']['text']); ?> &nbsp; </dd> </dl> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Html->link(__('Edit Photo Group'), array('action' => 'edit', $photoGroup['PhotoGroup']['id'])); ?> </li> <li><?php echo $this->Form->postLink(__('Delete Photo Group'), array('action' => 'delete', $photoGroup['PhotoGroup']['id']), null, __('Are you sure you want to delete # %s?', $photoGroup['PhotoGroup']['id'])); ?> </li> <li><?php echo $this->Html->link(__('List Photo Groups'), array('action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo Group'), array('action' => 'add')); ?> </li> <li><?php echo $this->Html->link(__('List Photos'), array('controller' => 'photos', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo'), array('controller' => 'photos', 'action' => 'add')); ?> </li> </ul> </div> <div class="related"> <h3><?php echo __('Related Photos');?></h3> <?php if (!empty($photoGroup['Photo'])):?> <table cellpadding = "0" cellspacing = "0"> <tr> <th><?php echo __('Id'); ?></th> <th><?php echo __('Name'); ?></th> <th><?php echo __('Photo Group Id'); ?></th> <th class="actions"><?php echo __('Actions');?></th> </tr> <?php $i = 0; foreach ($photoGroup['Photo'] as $photo): ?> <tr> <td><?php echo $photo['id'];?></td> <td><?php echo $photo['name'];?></td> <td><?php echo $photo['photo_group_id'];?></td> <td class="actions"> <?php echo $this->Html->link(__('View'), array('controller' => 'photos', 'action' => 'view', $photo['id'])); ?> <?php echo $this->Html->link(__('Edit'), array('controller' => 'photos', 'action' => 'edit', $photo['id'])); ?> <?php echo $this->Form->postLink(__('Delete'), array('controller' => 'photos', 'action' => 'delete', $photo['id']), null, __('Are you sure you want to delete # %s?', $photo['id'])); ?> </td> </tr> <?php endforeach; ?> </table> <?php endif; ?> <div class="actions"> <ul> <li><?php echo $this->Html->link(__('New Photo'), array('controller' => 'photos', 'action' => 'add'));?> </li> </ul> </div> </div>
0001-bee
trunk/cakephp2/7010/View/PhotoGroups/view.ctp
PHP
gpl3
2,582
<div class="photoGroups form"> <?php echo $this->Form->create('PhotoGroup');?> <fieldset> <legend><?php echo __('Edit Photo Group'); ?></legend> <?php echo $this->Form->input('id'); echo $this->Form->input('name'); echo $this->Form->input('text'); ?> </fieldset> <?php echo $this->Form->end(__('Submit'));?> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $this->Form->value('PhotoGroup.id')), null, __('Are you sure you want to delete # %s?', $this->Form->value('PhotoGroup.id'))); ?></li> <li><?php echo $this->Html->link(__('List Photo Groups'), array('action' => 'index'));?></li> <li><?php echo $this->Html->link(__('List Photos'), array('controller' => 'photos', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo'), array('controller' => 'photos', 'action' => 'add')); ?> </li> </ul> </div>
0001-bee
trunk/cakephp2/7010/View/PhotoGroups/edit.ctp
PHP
gpl3
975
<div id="success"> <h2><?php echo __('Photo Groups');?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('id');?></th> <th><?php echo $this->Paginator->sort('name');?></th> <th><?php echo $this->Paginator->sort('text');?></th> <th class="actions"><?php echo __('Actions');?></th> </tr> <?php $i = 0; foreach ($photoGroups as $photoGroup): ?> <tr> <td><?php echo h($photoGroup['PhotoGroup']['id']); ?>&nbsp;</td> <td><?php echo h($photoGroup['PhotoGroup']['name']); ?>&nbsp;</td> <td><?php echo h($photoGroup['PhotoGroup']['text']); ?>&nbsp;</td> <td class="actions"> <?php echo $this->Html->link(__('View'), array('action' => 'view', $photoGroup['PhotoGroup']['id'])); ?> <?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $photoGroup['PhotoGroup']['id'])); ?> <?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $photoGroup['PhotoGroup']['id']), null, __('Are you sure you want to delete # %s?', $photoGroup['PhotoGroup']['id'])); ?> </td> </tr> <?php endforeach; ?> </table> <p> <?php echo $this->Paginator->counter(array( 'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}') )); ?> </p> <div class="paging"> <?php echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled')); echo $this->Paginator->numbers(array('separator' => '')); echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled')); ?> </div> </div> <?php echo $this->Js->writeBuffer(array('cache'=>TRUE)); ?>
0001-bee
trunk/cakephp2/7010/View/PhotoGroups/indax.ctp
PHP
gpl3
1,715
<div class="users form"> <?php echo $this->Session->flash('auth'); ?> <?php echo $this->Form->create('User');?> <fieldset> <legend><?php echo __('Please enter your username and password'); ?></legend> <?php echo $this->Form->input('username'); echo $this->Form->input('password'); ?> </fieldset> <?php echo $this->Form->end(__('Login'));?> </div>
0001-bee
trunk/cakephp2/7010/View/Users/login.ctp
PHP
gpl3
397
<!-- app/View/Users/add.ctp --> <div class="users form"> <?php echo $this->Form->create('User');?> <fieldset> <legend><?php echo __('Add User'); ?></legend> <?php echo $this->Form->input('username'); echo $this->Form->input('password'); echo $this->Form->input('role', array( 'options' => array('admin' => 'Admin', 'author' => 'Author') )); ?> </fieldset> <?php echo $this->Form->end(__('Submit'));?> </div>
0001-bee
trunk/cakephp2/7010/View/Users/add.ctp
PHP
gpl3
489
<div class="users index"> <h2><?php echo __('Users');?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('id');?></th> <th><?php echo $this->Paginator->sort('username');?></th> <th><?php echo $this->Paginator->sort('password');?></th> <th><?php echo $this->Paginator->sort('created');?></th> <th><?php echo $this->Paginator->sort('modified');?></th> <th><?php echo $this->Paginator->sort('role');?></th> <th class="actions"><?php echo __('Actions');?></th> </tr> <?php $i = 0; foreach ($users as $user): ?> <tr> <td><?php echo h($user['User']['id']); ?>&nbsp;</td> <td><?php echo h($user['User']['username']); ?>&nbsp;</td> <td><?php echo h($user['User']['password']); ?>&nbsp;</td> <td><?php echo h($user['User']['created']); ?>&nbsp;</td> <td><?php echo h($user['User']['modified']); ?>&nbsp;</td> <td><?php echo h($user['User']['role']); ?>&nbsp;</td> <td class="actions"> <?php echo $this->Html->link(__('View'), array('action' => 'view', $user['User']['id'])); ?> <?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $user['User']['id'])); ?> <?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $user['User']['id']), null, __('Are you sure you want to delete # %s?', $user['User']['id'])); ?> </td> </tr> <?php endforeach; ?> </table> <p> <?php echo $this->Paginator->counter(array( 'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}') )); ?> </p> <div class="paging"> <?php echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled')); echo $this->Paginator->numbers(array('separator' => '')); echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled')); ?> </div> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Html->link(__('New User'), array('action' => 'add')); ?></li> </ul> </div>
0001-bee
trunk/cakephp2/7010/View/Users/index.ctp
PHP
gpl3
2,109
<div class="users view"> <h2><?php echo __('User');?></h2> <dl> <dt><?php echo __('Id'); ?></dt> <dd> <?php echo h($user['User']['id']); ?> &nbsp; </dd> <dt><?php echo __('Username'); ?></dt> <dd> <?php echo h($user['User']['username']); ?> &nbsp; </dd> <dt><?php echo __('Password'); ?></dt> <dd> <?php echo h($user['User']['password']); ?> &nbsp; </dd> <dt><?php echo __('Created'); ?></dt> <dd> <?php echo h($user['User']['created']); ?> &nbsp; </dd> <dt><?php echo __('Modified'); ?></dt> <dd> <?php echo h($user['User']['modified']); ?> &nbsp; </dd> <dt><?php echo __('Role'); ?></dt> <dd> <?php echo h($user['User']['role']); ?> &nbsp; </dd> </dl> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Html->link(__('Edit User'), array('action' => 'edit', $user['User']['id'])); ?> </li> <li><?php echo $this->Form->postLink(__('Delete User'), array('action' => 'delete', $user['User']['id']), null, __('Are you sure you want to delete # %s?', $user['User']['id'])); ?> </li> <li><?php echo $this->Html->link(__('List Users'), array('action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New User'), array('action' => 'add')); ?> </li> </ul> </div>
0001-bee
trunk/cakephp2/7010/View/Users/view.ctp
PHP
gpl3
1,339
<div class="users form"> <?php echo $this->Form->create('User');?> <fieldset> <legend><?php echo __('Edit User'); ?></legend> <?php echo $this->Form->input('id'); echo $this->Form->input('username'); echo $this->Form->input('password'); echo $this->Form->input('role'); ?> </fieldset> <?php echo $this->Form->end(__('Submit'));?> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $this->Form->value('User.id')), null, __('Are you sure you want to delete # %s?', $this->Form->value('User.id'))); ?></li> <li><?php echo $this->Html->link(__('List Users'), array('action' => 'index'));?></li> </ul> </div>
0001-bee
trunk/cakephp2/7010/View/Users/edit.ctp
PHP
gpl3
747
<div class="posts form"> <?php echo $this->Form->create('Photo', array('type' => 'file')); ?> <fieldset> <legend><?php echo __('Add Photo'); ?></legend> <?php echo $this->Form->file('file'); echo $this->Form->input('photo_group_id'); ?> </fieldset> <?php echo $this->Form->end(__('Submit'));?> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Html->link(__('List Photos'), array('action' => 'index')); ?></li> <li><?php echo $this->Html->link(__('List Photo Groups'), array('controller' => 'photo_groups', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo Group'), array('controller' => 'photo_groups', 'action' => 'add')); ?> </li> </ul> </div>
0001-bee
trunk/cakephp2/7010/View/Photos/add.ctp
PHP
gpl3
817
<div class="posts form"> <?php echo $this->Form->create('Photo', array('type' => 'file')); ?> <fieldset> <legend><?php echo __('Add Photo'); ?></legend> <?php echo $this->Form->file('file'); echo $this->Form->input('photo_group_id'); ?> </fieldset> <?php echo $this->Js->submit('Send',array( 'before'=>$this->Js->get('#sending')->effect('fadeIn'), 'success'=>$this->Js->get('#sending')->effect('fadeOut'), 'update'=>'#success' )); echo $this->Form->end();?> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Html->link(__('New Photo'), array('action' => 'add')); ?></li> <li><?php echo $this->Html->link(__('List Photo Groups'), array('controller' => 'photo_groups', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo Group'), array('controller' => 'photo_groups', 'action' => 'add')); ?> </li> </ul> </div> <div class="photos index" id="success"> <h2><?php echo __('Photos');?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('id');?></th> <th><?php echo $this->Paginator->sort('name');?></th> <th><?php echo $this->Paginator->sort('photo_group_id');?></th> <th><?php echo $this->Paginator->sort('dir');?></th> <th><?php echo $this->Paginator->sort('mimetype');?></th> <th><?php echo $this->Paginator->sort('filesize');?></th> <th class="actions"><?php echo __('Actions');?></th> </tr> <?php $i = 0; foreach ($photos as $photo): ?> <tr> <td><?php echo h($photo['Photo']['id']); ?>&nbsp;</td> <td><?php echo h($photo['Photo']['name']); ?>&nbsp;</td> <td> <?php echo $this->Html->link($photo['PhotoGroup']['name'], array('controller' => 'photo_groups', 'action' => 'view', $photo['PhotoGroup']['id'])); ?> </td> <td><?php echo h($photo['Photo']['dir']); ?>&nbsp;</td> <td><?php echo h($photo['Photo']['mimetype']); ?>&nbsp;</td> <td><?php echo h($photo['Photo']['filesize']); ?>&nbsp;</td> <td class="actions"> <?php echo $this->Html->link(__('View'), array('action' => 'view', $photo['Photo']['id'])); ?> <?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $photo['Photo']['id'])); ?> <?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $photo['Photo']['id']), null, __('Are you sure you want to delete # %s?', $photo['Photo']['id'])); ?> </td> </tr> <?php endforeach; ?> </table> <p> <?php echo $this->Paginator->counter(array( 'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}') )); ?> </p> <div class="paging"> <?php echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled')); echo $this->Paginator->numbers(array('separator' => '')); echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled')); ?> </div> </div> <?php echo $this->Js->writeBuffer(array('cache'=>TRUE)); ?>
0001-bee
trunk/cakephp2/7010/View/Photos/index.ctp
PHP
gpl3
3,122
<div class="photos view"> <h2><?php echo __('Photo');?></h2> <dl> <dt><?php echo __('Id'); ?></dt> <dd> <?php echo h($photo['Photo']['id']); ?> &nbsp; </dd> <dt><?php echo __('Name'); ?></dt> <dd> <?php echo h($photo['Photo']['name']); ?> &nbsp; </dd> <dt><?php echo __('Photo Group'); ?></dt> <dd> <?php echo $this->Html->link($photo['PhotoGroup']['name'], array('controller' => 'photo_groups', 'action' => 'view', $photo['PhotoGroup']['id'])); ?> &nbsp; </dd> <dt><?php echo __('Dir'); ?></dt> <dd> <?php echo h($photo['Photo']['dir']); ?> &nbsp; </dd> <dt><?php echo __('Mimetype'); ?></dt> <dd> <?php echo h($photo['Photo']['mimetype']); ?> &nbsp; </dd> <dt><?php echo __('Filesize'); ?></dt> <dd> <?php echo h($photo['Photo']['filesize']); ?> &nbsp; </dd> </dl> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Html->link(__('Edit Photo'), array('action' => 'edit', $photo['Photo']['id'])); ?> </li> <li><?php echo $this->Form->postLink(__('Delete Photo'), array('action' => 'delete', $photo['Photo']['id']), null, __('Are you sure you want to delete # %s?', $photo['Photo']['id'])); ?> </li> <li><?php echo $this->Html->link(__('List Photos'), array('action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo'), array('action' => 'add')); ?> </li> <li><?php echo $this->Html->link(__('List Photo Groups'), array('controller' => 'photo_groups', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo Group'), array('controller' => 'photo_groups', 'action' => 'add')); ?> </li> </ul> </div>
0001-bee
trunk/cakephp2/7010/View/Photos/view.ctp
PHP
gpl3
1,720
<div class="photos form"> <?php echo $this->Form->create('Photo');?> <fieldset> <legend><?php echo __('Edit Photo'); ?></legend> <?php echo $this->Form->input('id'); echo $this->Form->input('name'); echo $this->Form->input('photo_group_id'); echo $this->Form->input('dir'); echo $this->Form->input('mimetype'); echo $this->Form->input('filesize'); ?> </fieldset> <?php echo $this->Form->end(__('Submit'));?> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $this->Form->value('Photo.id')), null, __('Are you sure you want to delete # %s?', $this->Form->value('Photo.id'))); ?></li> <li><?php echo $this->Html->link(__('List Photos'), array('action' => 'index'));?></li> <li><?php echo $this->Html->link(__('List Photo Groups'), array('controller' => 'photo_groups', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo Group'), array('controller' => 'photo_groups', 'action' => 'add')); ?> </li> </ul> </div>
0001-bee
trunk/cakephp2/7010/View/Photos/edit.ctp
PHP
gpl3
1,092
<div class="photos" id="success"> <h2><?php echo __('Photos');?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('id');?></th> <th><?php echo $this->Paginator->sort('name');?></th> <th><?php echo $this->Paginator->sort('photo_group_id');?></th> <th><?php echo $this->Paginator->sort('dir');?></th> <th><?php echo $this->Paginator->sort('mimetype');?></th> <th><?php echo $this->Paginator->sort('filesize');?></th> <th class="actions"><?php echo __('Actions');?></th> </tr> <?php $i = 0; foreach ($photos as $photo): ?> <tr> <td><?php echo h($photo['Photo']['id']); ?>&nbsp;</td> <td><?php echo h($photo['Photo']['name']); ?>&nbsp;</td> <td> <?php echo $this->Html->link($photo['PhotoGroup']['name'], array('controller' => 'photo_groups', 'action' => 'view', $photo['PhotoGroup']['id'])); ?> </td> <td><?php echo h($photo['Photo']['dir']); ?>&nbsp;</td> <td><?php echo h($photo['Photo']['mimetype']); ?>&nbsp;</td> <td><?php echo h($photo['Photo']['filesize']); ?>&nbsp;</td> <td class="actions"> <?php echo $this->Html->link(__('View'), array('action' => 'view', $photo['Photo']['id'])); ?> <?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $photo['Photo']['id'])); ?> <?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $photo['Photo']['id']), null, __('Are you sure you want to delete # %s?', $photo['Photo']['id'])); ?> </td> </tr> <?php endforeach; ?> </table> <p> <?php echo $this->Paginator->counter(array( 'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}') )); ?> </p> <div class="paging"> <?php echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled')); echo $this->Paginator->numbers(array('separator' => '')); echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled')); ?> </div> </div>
0001-bee
trunk/cakephp2/7010/View/Photos/ijax.ctp
PHP
gpl3
2,072
<iframe src="http://cakephp.org/bake-banner" width="830" height="160" style="overflow:hidden; border:none;"> <p>For updates and important announcements, visit http://cakefest.org</p> </iframe> <h2>Sweet, "7010" got Baked by CakePHP!</h2> <?php App::uses('Debugger', 'Utility'); if (Configure::read('debug') > 0): Debugger::checkSecurityKeys(); endif; ?> <p> <?php if (version_compare(PHP_VERSION, '5.2.6', '>=')): echo '<span class="notice success">'; echo __d('cake_dev', 'Your version of PHP is 5.2.6 or higher.'); echo '</span>'; else: echo '<span class="notice">'; echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.2.6 or higher to use CakePHP.'); echo '</span>'; endif; ?> </p> <p> <?php if (is_writable(TMP)): echo '<span class="notice success">'; echo __d('cake_dev', 'Your tmp directory is writable.'); echo '</span>'; else: echo '<span class="notice">'; echo __d('cake_dev', 'Your tmp directory is NOT writable.'); echo '</span>'; endif; ?> </p> <p> <?php $settings = Cache::settings(); if (!empty($settings)): echo '<span class="notice success">'; echo __d('cake_dev', 'The %s is being used for caching. To change the config edit APP/Config/core.php ', '<em>'. $settings['engine'] . 'Engine</em>'); echo '</span>'; else: echo '<span class="notice">'; echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in APP/Config/core.php'); echo '</span>'; endif; ?> </p> <p> <?php $filePresent = null; if (file_exists(APP . 'Config' . DS . 'database.php')): echo '<span class="notice success">'; echo __d('cake_dev', 'Your database configuration file is present.'); $filePresent = true; echo '</span>'; else: echo '<span class="notice">'; echo __d('cake_dev', 'Your database configuration file is NOT present.'); echo '<br/>'; echo __d('cake_dev', 'Rename APP/Config/database.php.default to APP/Config/database.php'); echo '</span>'; endif; ?> </p> <?php if (isset($filePresent)): App::uses('ConnectionManager', 'Model'); try { $connected = ConnectionManager::getDataSource('default'); } catch (Exception $e) { $connected = false; } ?> <p> <?php if ($connected && $connected->isConnected()): echo '<span class="notice success">'; echo __d('cake_dev', 'Cake is able to connect to the database.'); echo '</span>'; else: echo '<span class="notice">'; echo __d('cake_dev', 'Cake is NOT able to connect to the database.'); echo '</span>'; endif; ?> </p> <?php endif;?> <?php App::uses('Validation', 'Utility'); if (!Validation::alphaNumeric('cakephp')) { echo '<p><span class="notice">'; __d('cake_dev', 'PCRE has not been compiled with Unicode support.'); echo '<br/>'; __d('cake_dev', 'Recompile PCRE with Unicode support by adding <code>--enable-unicode-properties</code> when configuring'); echo '</span></p>'; } ?> <h3><?php echo __d('cake_dev', 'Editing this Page'); ?></h3> <p> <?php echo __d('cake_dev', 'To change the content of this page, edit: %s To change its layout, edit: %s You can also add some CSS styles for your pages at: %s', APP . 'View' . DS . 'Pages' . DS . 'home.ctp.<br />', APP . 'View' . DS . 'Layouts' . DS . 'default.ctp.<br />', APP . 'webroot' . DS . 'css'); ?> </p>
0001-bee
trunk/cakephp2/7010/View/Pages/home.ctp
PHP
gpl3
3,387
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php $content = explode("\n", $content); foreach ($content as $line): echo '<p> ' . $line . '</p>'; endforeach; ?>
0001-bee
trunk/cakephp2/7010/View/Emails/html/default.ctp
PHP
gpl3
727
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php echo $content; ?>
0001-bee
trunk/cakephp2/7010/View/Emails/text/default.ctp
PHP
gpl3
633
<?php echo $scripts_for_layout; ?> <script type="text/javascript"><?php echo $content_for_layout; ?></script>
0001-bee
trunk/cakephp2/7010/View/Layouts/js/default.ctp
PHP
gpl3
109
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package app.View.Layouts * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php echo $content_for_layout; ?>
0001-bee
trunk/cakephp2/7010/View/Layouts/ajax.ctp
PHP
gpl3
640
<?php echo $xml->header(); ?> <?php echo $content_for_layout; ?>
0001-bee
trunk/cakephp2/7010/View/Layouts/xml/default.ctp
PHP
gpl3
64
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package app.View.Layouts * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php echo $this->Html->charset(); ?> <title><?php echo $page_title; ?></title> <?php if (Configure::read('debug') == 0) { ?> <meta http-equiv="Refresh" content="<?php echo $pause?>;url=<?php echo $url?>"/> <?php } ?> <style><!-- P { text-align:center; font:bold 1.1em sans-serif } A { color:#444; text-decoration:none } A:HOVER { text-decoration: underline; color:#44E } --></style> </head> <body> <p><a href="<?php echo $url?>"><?php echo $message?></a></p> </body> </html>
0001-bee
trunk/cakephp2/7010/View/Layouts/flash.ctp
PHP
gpl3
1,255
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package app.View.Layouts * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php echo $this->Html->charset(); ?> <title> <?php echo __('CakePHP: the rapid development php framework:'); ?> <?php echo $title_for_layout; ?> </title> <?php echo $this->Html->meta('icon'); echo $this->Html->css('cake.generic'); echo $this->Html->css('reset'); echo $this->Html->css('text'); echo $this->Html->css('960'); echo $this->Html->css('ui-lightness/jquery-ui-1.8.16.custom'); echo $this->Html->css('jquery.fileupload-ui'); echo $this->Html->script('jquery.min'); echo $this->Html->script('jquery-ui.custom.min'); echo $this->Html->script('jquery.fileupload-ui'); echo $this->Html->script('jquery.fileupload'); echo $this->Html->script('jquery.iframe-transport'); echo $scripts_for_layout; ?> </head> <body> <div id="container" class="container_12"> <div id="header" class="grid_12"> <h1><?php echo $this->Html->link(__('CakePHP: the rapid development php framework'), 'http://cakephp.org'); ?></h1> </div> <div class="clear"></div> <div id="content" class="grid_12"> <?php echo $this->Session->flash(); ?> <?php echo $content_for_layout; ?> </div> <div id="footer" class="grid_12"> <?php echo $this->Html->link( $this->Html->image('cake.power.gif', array('alt'=> __('CakePHP: the rapid development php framework'), 'border' => '0')), 'http://www.cakephp.org/', array('target' => '_blank', 'escape' => false) ); ?> </div> </div> <?php echo $this->element('sql_dump'); ?> </body> </html>
0001-bee
trunk/cakephp2/7010/View/Layouts/default.ctp
PHP
gpl3
2,608
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package app.View.Layouts.Email.html * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title><?php echo $title_for_layout;?></title> </head> <body> <?php echo $content_for_layout;?> <p>This email was sent using the <a href="http://cakephp.org">CakePHP Framework</a></p> </body> </html>
0001-bee
trunk/cakephp2/7010/View/Layouts/Emails/html/default.ctp
PHP
gpl3
887
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package app.View.Layouts.Email.text * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php echo $content_for_layout;?> This email was sent using the CakePHP Framework, http://cakephp.org.
0001-bee
trunk/cakephp2/7010/View/Layouts/Emails/text/default.ctp
PHP
gpl3
722
<?php echo $rss->header(); if (!isset($channel)) { $channel = array(); } if (!isset($channel['title'])) { $channel['title'] = $title_for_layout; } echo $rss->document( $rss->channel( array(), $channel, $content_for_layout ) ); ?>
0001-bee
trunk/cakephp2/7010/View/Layouts/rss/default.ctp
PHP
gpl3
238
<div class="groups form"> <?php echo $this->Form->create('Group');?> <fieldset> <legend><?php echo __('Add Group'); ?></legend> <?php echo $this->Form->input('name'); echo $this->Form->input('Photo'); ?> </fieldset> <?php echo $this->Form->end(__('Submit'));?> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Html->link(__('List Groups'), array('action' => 'index'));?></li> <li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li> <li><?php echo $this->Html->link(__('List Photos'), array('controller' => 'photos', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo'), array('controller' => 'photos', 'action' => 'add')); ?> </li> </ul> </div>
0001-bee
trunk/cakephp2/7010/View/Groups/add.ctp
PHP
gpl3
932
<div class="groups index"> <h2><?php echo __('Groups');?></h2> <table cellpadding="0" cellspacing="0"> <tr> <th><?php echo $this->Paginator->sort('id');?></th> <th><?php echo $this->Paginator->sort('name');?></th> <th><?php echo $this->Paginator->sort('created');?></th> <th><?php echo $this->Paginator->sort('modified');?></th> <th class="actions"><?php echo __('Actions');?></th> </tr> <?php $i = 0; foreach ($groups as $group): ?> <tr> <td><?php echo h($group['Group']['id']); ?>&nbsp;</td> <td><?php echo h($group['Group']['name']); ?>&nbsp;</td> <td><?php echo h($group['Group']['created']); ?>&nbsp;</td> <td><?php echo h($group['Group']['modified']); ?>&nbsp;</td> <td class="actions"> <?php echo $this->Html->link(__('View'), array('action' => 'view', $group['Group']['id'])); ?> <?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $group['Group']['id'])); ?> <?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $group['Group']['id']), null, __('Are you sure you want to delete # %s?', $group['Group']['id'])); ?> </td> </tr> <?php endforeach; ?> </table> <p> <?php echo $this->Paginator->counter(array( 'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}') )); ?> </p> <div class="paging"> <?php echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled')); echo $this->Paginator->numbers(array('separator' => '')); echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled')); ?> </div> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Html->link(__('New Group'), array('action' => 'add')); ?></li> <li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li> <li><?php echo $this->Html->link(__('List Photos'), array('controller' => 'photos', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo'), array('controller' => 'photos', 'action' => 'add')); ?> </li> </ul> </div>
0001-bee
trunk/cakephp2/7010/View/Groups/index.ctp
PHP
gpl3
2,346
<div class="groups view"> <h2><?php echo __('Group');?></h2> <dl> <dt><?php echo __('Id'); ?></dt> <dd> <?php echo h($group['Group']['id']); ?> &nbsp; </dd> <dt><?php echo __('Name'); ?></dt> <dd> <?php echo h($group['Group']['name']); ?> &nbsp; </dd> <dt><?php echo __('Created'); ?></dt> <dd> <?php echo h($group['Group']['created']); ?> &nbsp; </dd> <dt><?php echo __('Modified'); ?></dt> <dd> <?php echo h($group['Group']['modified']); ?> &nbsp; </dd> </dl> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Html->link(__('Edit Group'), array('action' => 'edit', $group['Group']['id'])); ?> </li> <li><?php echo $this->Form->postLink(__('Delete Group'), array('action' => 'delete', $group['Group']['id']), null, __('Are you sure you want to delete # %s?', $group['Group']['id'])); ?> </li> <li><?php echo $this->Html->link(__('List Groups'), array('action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Group'), array('action' => 'add')); ?> </li> <li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li> <li><?php echo $this->Html->link(__('List Photos'), array('controller' => 'photos', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo'), array('controller' => 'photos', 'action' => 'add')); ?> </li> </ul> </div> <div class="related"> <h3><?php echo __('Related Users');?></h3> <?php if (!empty($group['User'])):?> <table cellpadding = "0" cellspacing = "0"> <tr> <th><?php echo __('Id'); ?></th> <th><?php echo __('Username'); ?></th> <th><?php echo __('Password'); ?></th> <th><?php echo __('Created'); ?></th> <th><?php echo __('Modified'); ?></th> <th><?php echo __('Group Id'); ?></th> <th class="actions"><?php echo __('Actions');?></th> </tr> <?php $i = 0; foreach ($group['User'] as $user): ?> <tr> <td><?php echo $user['id'];?></td> <td><?php echo $user['username'];?></td> <td><?php echo $user['password'];?></td> <td><?php echo $user['created'];?></td> <td><?php echo $user['modified'];?></td> <td><?php echo $user['group_id'];?></td> <td class="actions"> <?php echo $this->Html->link(__('View'), array('controller' => 'users', 'action' => 'view', $user['id'])); ?> <?php echo $this->Html->link(__('Edit'), array('controller' => 'users', 'action' => 'edit', $user['id'])); ?> <?php echo $this->Form->postLink(__('Delete'), array('controller' => 'users', 'action' => 'delete', $user['id']), null, __('Are you sure you want to delete # %s?', $user['id'])); ?> </td> </tr> <?php endforeach; ?> </table> <?php endif; ?> <div class="actions"> <ul> <li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add'));?> </li> </ul> </div> </div> <div class="related"> <h3><?php echo __('Related Photos');?></h3> <?php if (!empty($group['Photo'])):?> <table cellpadding = "0" cellspacing = "0"> <tr> <th><?php echo __('Id'); ?></th> <th><?php echo __('Name'); ?></th> <th><?php echo __('Photo Group Id'); ?></th> <th class="actions"><?php echo __('Actions');?></th> </tr> <?php $i = 0; foreach ($group['Photo'] as $photo): ?> <tr> <td><?php echo $photo['id'];?></td> <td><?php echo $photo['name'];?></td> <td><?php echo $photo['photo_group_id'];?></td> <td class="actions"> <?php echo $this->Html->link(__('View'), array('controller' => 'photos', 'action' => 'view', $photo['id'])); ?> <?php echo $this->Html->link(__('Edit'), array('controller' => 'photos', 'action' => 'edit', $photo['id'])); ?> <?php echo $this->Form->postLink(__('Delete'), array('controller' => 'photos', 'action' => 'delete', $photo['id']), null, __('Are you sure you want to delete # %s?', $photo['id'])); ?> </td> </tr> <?php endforeach; ?> </table> <?php endif; ?> <div class="actions"> <ul> <li><?php echo $this->Html->link(__('New Photo'), array('controller' => 'photos', 'action' => 'add'));?> </li> </ul> </div> </div>
0001-bee
trunk/cakephp2/7010/View/Groups/view.ctp
PHP
gpl3
4,318
<div class="groups form"> <?php echo $this->Form->create('Group');?> <fieldset> <legend><?php echo __('Edit Group'); ?></legend> <?php echo $this->Form->input('id'); echo $this->Form->input('name'); echo $this->Form->input('Photo'); ?> </fieldset> <?php echo $this->Form->end(__('Submit'));?> </div> <div class="actions"> <h3><?php echo __('Actions'); ?></h3> <ul> <li><?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $this->Form->value('Group.id')), null, __('Are you sure you want to delete # %s?', $this->Form->value('Group.id'))); ?></li> <li><?php echo $this->Html->link(__('List Groups'), array('action' => 'index'));?></li> <li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li> <li><?php echo $this->Html->link(__('List Photos'), array('controller' => 'photos', 'action' => 'index')); ?> </li> <li><?php echo $this->Html->link(__('New Photo'), array('controller' => 'photos', 'action' => 'add')); ?> </li> </ul> </div>
0001-bee
trunk/cakephp2/7010/View/Groups/edit.ctp
PHP
gpl3
1,174
<?php /** * Application level View Helper * * This file is application-wide helper file. You can put all * application-wide helper-related methods here. * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::uses('Helper', 'View'); /** * This is a placeholder class. * Create the same file in app/View/Helper/AppHelper.php * * Add your application-wide methods in the class below, your helpers * will inherit them. * * @package app.View.Helper */ class AppHelper extends Helper { }
0001-bee
trunk/cakephp2/7010/View/Helper/AppHelper.php
PHP
gpl3
1,037
/* * jQuery Iframe Transport Plugin 1.2.3 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2011, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://creativecommons.org/licenses/MIT/ */ /*jslint unparam: true */ /*global jQuery */ (function ($) { 'use strict'; // Helper variable to create unique names for the transport iframes: var counter = 0; // The iframe transport accepts three additional options: // options.fileInput: a jQuery collection of file input fields // options.paramName: the parameter name for the file form data, // overrides the name property of the file input field(s) // options.formData: an array of objects with name and value properties, // equivalent to the return data of .serializeArray(), e.g.: // [{name: a, value: 1}, {name: b, value: 2}] $.ajaxTransport('iframe', function (options, originalOptions, jqXHR) { if (options.type === 'POST' || options.type === 'GET') { var form, iframe; return { send: function (headers, completeCallback) { form = $('<form style="display:none;"></form>'); // javascript:false as initial iframe src // prevents warning popups on HTTPS in IE6. // IE versions below IE8 cannot set the name property of // elements that have already been added to the DOM, // so we set the name along with the iframe HTML markup: iframe = $( '<iframe src="javascript:false;" name="iframe-transport-' + (counter += 1) + '"></iframe>' ).bind('load', function () { var fileInputClones; iframe .unbind('load') .bind('load', function () { var response; // Wrap in a try/catch block to catch exceptions thrown // when trying to access cross-domain iframe contents: try { response = iframe.contents(); // Google Chrome and Firefox do not throw an // exception when calling iframe.contents() on // cross-domain requests, so we unify the response: if (!response.length || !response[0].firstChild) { throw new Error(); } } catch (e) { response = undefined; } // The complete callback returns the // iframe content document as response object: completeCallback( 200, 'success', {'iframe': response} ); // Fix for IE endless progress bar activity bug // (happens on form submits to iframe targets): $('<iframe src="javascript:false;"></iframe>') .appendTo(form); form.remove(); }); form .prop('target', iframe.prop('name')) .prop('action', options.url) .prop('method', options.type); if (options.formData) { $.each(options.formData, function (index, field) { $('<input type="hidden"/>') .prop('name', field.name) .val(field.value) .appendTo(form); }); } if (options.fileInput && options.fileInput.length && options.type === 'POST') { fileInputClones = options.fileInput.clone(); // Insert a clone for each file input field: options.fileInput.after(function (index) { return fileInputClones[index]; }); if (options.paramName) { options.fileInput.each(function () { $(this).prop('name', options.paramName); }); } // Appending the file input fields to the hidden form // removes them from their original location: form .append(options.fileInput) .prop('enctype', 'multipart/form-data') // enctype must be set as encoding for IE: .prop('encoding', 'multipart/form-data'); } form.submit(); // Insert the file input fields at their original location // by replacing the clones with the originals: if (fileInputClones && fileInputClones.length) { options.fileInput.each(function (index, input) { var clone = $(fileInputClones[index]); $(input).prop('name', clone.prop('name')); clone.replaceWith(input); }); } }); form.append(iframe).appendTo('body'); }, abort: function () { if (iframe) { // javascript:false as iframe src aborts the request // and prevents warning popups on HTTPS in IE6. // concat is used to avoid the "Script URL" JSLint error: iframe .unbind('load') .prop('src', 'javascript'.concat(':false;')); } if (form) { form.remove(); } } }; } }); // The iframe transport returns the iframe content document as response. // The following adds converters from iframe to text, json, html, and script: $.ajaxSetup({ converters: { 'iframe text': function (iframe) { return iframe.find('body').text(); }, 'iframe json': function (iframe) { return $.parseJSON(iframe.find('body').text()); }, 'iframe html': function (iframe) { return iframe.find('body').html(); }, 'iframe script': function (iframe) { return $.globalEval(iframe.find('body').text()); } } }); }(jQuery));
0001-bee
trunk/cakephp2/7010/webroot/js/jquery.iframe-transport.js
JavaScript
gpl3
7,475
<?php /** * Index * * The Front Controller for handling every request * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package app.webroot * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** * Use the DS to separate the directories in other defines */ if (!defined('DS')) { define('DS', DIRECTORY_SEPARATOR); } /** * These defines should only be edited if you have cake installed in * a directory layout other than the way it is distributed. * When using custom settings be sure to use the DS and do not add a trailing DS. */ /** * The full path to the directory which holds "app", WITHOUT a trailing DS. * */ if (!defined('ROOT')) { define('ROOT', dirname(dirname(dirname(__FILE__)))); } /** * The actual directory name for the "app". * */ if (!defined('APP_DIR')) { define('APP_DIR', basename(dirname(dirname(__FILE__)))); } /** * The absolute path to the "cake" directory, WITHOUT a trailing DS. * * Un-comment this line to specify a fixed path to CakePHP. * This should point at the directory containg `Cake`. * * For ease of development CakePHP uses PHP's include_path. If you * cannot modify your include_path set this value. * * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php */ //define('CAKE_CORE_INCLUDE_PATH', 'D:' . DS . 'xampp' . DS . 'htdocs' . DS . 'cakephp2' . DS . 'lib'); /** * Editing below this line should NOT be necessary. * Change at your own risk. * */ if (!defined('WEBROOT_DIR')) { define('WEBROOT_DIR', basename(dirname(__FILE__))); } if (!defined('WWW_ROOT')) { define('WWW_ROOT', dirname(__FILE__) . DS); } if (!defined('CAKE_CORE_INCLUDE_PATH')) { if (function_exists('ini_set')) { ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); } if (!include('Cake' . DS . 'bootstrap.php')) { $failed = true; } } else { if (!include(CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) { $failed = true; } } if (!empty($failed)) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } if (isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] == '/favicon.ico') { return; } App::uses('Dispatcher', 'Routing'); $Dispatcher = new Dispatcher(); $Dispatcher->dispatch(new CakeRequest(), new CakeResponse(array('charset' => Configure::read('App.encoding'))));
0001-bee
trunk/cakephp2/7010/webroot/index.php
PHP
gpl3
3,021
<?php /** * Web Access Frontend for TestSuite * * PHP 5 * * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing> * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/view/1196/Testing * @package app.webroot * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ set_time_limit(0); ini_set('display_errors', 1); /** * Use the DS to separate the directories in other defines */ if (!defined('DS')) { define('DS', DIRECTORY_SEPARATOR); } /** * These defines should only be edited if you have cake installed in * a directory layout other than the way it is distributed. * When using custom settings be sure to use the DS and do not add a trailing DS. */ /** * The full path to the directory which holds "app", WITHOUT a trailing DS. * */ if (!defined('ROOT')) { define('ROOT', dirname(dirname(dirname(__FILE__)))); } /** * The actual directory name for the "app". * */ if (!defined('APP_DIR')) { define('APP_DIR', basename(dirname(dirname(__FILE__)))); } /** * The absolute path to the "Cake" directory, WITHOUT a trailing DS. * * For ease of development CakePHP uses PHP's include_path. If you * need to cannot modify your include_path, you can set this path. * * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php */ //define('CAKE_CORE_INCLUDE_PATH', 'D:' . DS . 'xampp' . DS . 'htdocs' . DS . 'cakephp2' . DS . 'lib'); /** * Editing below this line should not be necessary. * Change at your own risk. * */ if (!defined('WEBROOT_DIR')) { define('WEBROOT_DIR', basename(dirname(__FILE__))); } if (!defined('WWW_ROOT')) { define('WWW_ROOT', dirname(__FILE__) . DS); } if (!defined('CAKE_CORE_INCLUDE_PATH')) { if (!include('Cake' . DS . 'bootstrap.php')) { $failed = true; } } else { if (!include(CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) { $failed = true; } } if (!empty($failed)) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } if (Configure::read('debug') < 1) { die(__d('cake_dev', 'Debug setting does not allow access to this url.')); } require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php'; CakeTestSuiteDispatcher::run();
0001-bee
trunk/cakephp2/7010/webroot/test.php
PHP
gpl3
2,738
@charset 'UTF-8'; /* * jQuery File Upload UI Plugin CSS 5.0.6 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://creativecommons.org/licenses/MIT/ */ .fileupload-buttonbar .ui-button input { position: absolute; top: 0; right: 0; margin: 0; border: solid transparent; border-width: 0 0 100px 200px; opacity: 0; filter: alpha(opacity=0); -o-transform: translate(250px, -50px) scale(1); -moz-transform: translate(-300px, 0) scale(4); direction: ltr; cursor: pointer; } .fileinput-button { overflow: hidden; } /* Fix for IE 6: */ *html .fileinput-button { padding: 2px 0; } /* Fix for IE 7: */ *+html .fileinput-button { padding: 2px 0; } .fileupload-buttonbar { padding: 0.2em 0.4em; } .fileupload-buttonbar .ui-button { vertical-align: middle; } .fileupload-content { padding: 0.2em 0.4em; border-top-width: 0; } .fileupload-content .ui-progressbar { width: 200px; height: 20px; } .fileupload-content .ui-progressbar-value { background: url(pbar-ani.gif); } .fileupload-content .fileupload-progressbar { width: 400px; margin: 10px 0; } .files { margin: 10px 0; border-collapse: collapse; } .files td { padding: 5px; border-spacing: 5px; } .files img { border: none; } .files .name { padding: 0 10px; } .files .size { padding: 0 10px 0 0; text-align: right; white-space: nowrap; } .ui-state-disabled .ui-state-disabled { opacity: 1; filter: alpha(opacity=100); } .ui-state-disabled input { cursor: default; }
0001-bee
trunk/cakephp2/7010/webroot/css/jquery.fileupload-ui.css
CSS
gpl3
1,604
/* 960 Grid System ~ Core CSS. Learn more ~ http://960.gs/ Licensed under GPL and MIT. */ /* Forces backgrounds to span full width, even if there is horizontal scrolling. Increase this if your layout is wider. Note: IE6 works fine without this fix. */ body { min-width: 960px; } /* `Container ----------------------------------------------------------------------------------------------------*/ .container_12, .container_16 { margin-left: auto; margin-right: auto; width: 960px; } /* `Grid >> Global ----------------------------------------------------------------------------------------------------*/ .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12, .grid_13, .grid_14, .grid_15, .grid_16 { display: inline; float: left; margin-left: 10px; margin-right: 10px; } .push_1, .pull_1, .push_2, .pull_2, .push_3, .pull_3, .push_4, .pull_4, .push_5, .pull_5, .push_6, .pull_6, .push_7, .pull_7, .push_8, .pull_8, .push_9, .pull_9, .push_10, .pull_10, .push_11, .pull_11, .push_12, .pull_12, .push_13, .pull_13, .push_14, .pull_14, .push_15, .pull_15 { position: relative; } .container_12 .grid_3, .container_16 .grid_4 { width: 220px; } .container_12 .grid_6, .container_16 .grid_8 { width: 460px; } .container_12 .grid_9, .container_16 .grid_12 { width: 700px; } .container_12 .grid_12, .container_16 .grid_16 { width: 940px; } /* `Grid >> Children (Alpha ~ First, Omega ~ Last) ----------------------------------------------------------------------------------------------------*/ .alpha { margin-left: 0; } .omega { margin-right: 0; } /* `Grid >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .grid_1 { width: 60px; } .container_12 .grid_2 { width: 140px; } .container_12 .grid_4 { width: 300px; } .container_12 .grid_5 { width: 380px; } .container_12 .grid_7 { width: 540px; } .container_12 .grid_8 { width: 620px; } .container_12 .grid_10 { width: 780px; } .container_12 .grid_11 { width: 860px; } /* `Grid >> 16 Columns ----------------------------------------------------------------------------------------------------*/ .container_16 .grid_1 { width: 40px; } .container_16 .grid_2 { width: 100px; } .container_16 .grid_3 { width: 160px; } .container_16 .grid_5 { width: 280px; } .container_16 .grid_6 { width: 340px; } .container_16 .grid_7 { width: 400px; } .container_16 .grid_9 { width: 520px; } .container_16 .grid_10 { width: 580px; } .container_16 .grid_11 { width: 640px; } .container_16 .grid_13 { width: 760px; } .container_16 .grid_14 { width: 820px; } .container_16 .grid_15 { width: 880px; } /* `Prefix Extra Space >> Global ----------------------------------------------------------------------------------------------------*/ .container_12 .prefix_3, .container_16 .prefix_4 { padding-left: 240px; } .container_12 .prefix_6, .container_16 .prefix_8 { padding-left: 480px; } .container_12 .prefix_9, .container_16 .prefix_12 { padding-left: 720px; } /* `Prefix Extra Space >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .prefix_1 { padding-left: 80px; } .container_12 .prefix_2 { padding-left: 160px; } .container_12 .prefix_4 { padding-left: 320px; } .container_12 .prefix_5 { padding-left: 400px; } .container_12 .prefix_7 { padding-left: 560px; } .container_12 .prefix_8 { padding-left: 640px; } .container_12 .prefix_10 { padding-left: 800px; } .container_12 .prefix_11 { padding-left: 880px; } /* `Prefix Extra Space >> 16 Columns ----------------------------------------------------------------------------------------------------*/ .container_16 .prefix_1 { padding-left: 60px; } .container_16 .prefix_2 { padding-left: 120px; } .container_16 .prefix_3 { padding-left: 180px; } .container_16 .prefix_5 { padding-left: 300px; } .container_16 .prefix_6 { padding-left: 360px; } .container_16 .prefix_7 { padding-left: 420px; } .container_16 .prefix_9 { padding-left: 540px; } .container_16 .prefix_10 { padding-left: 600px; } .container_16 .prefix_11 { padding-left: 660px; } .container_16 .prefix_13 { padding-left: 780px; } .container_16 .prefix_14 { padding-left: 840px; } .container_16 .prefix_15 { padding-left: 900px; } /* `Suffix Extra Space >> Global ----------------------------------------------------------------------------------------------------*/ .container_12 .suffix_3, .container_16 .suffix_4 { padding-right: 240px; } .container_12 .suffix_6, .container_16 .suffix_8 { padding-right: 480px; } .container_12 .suffix_9, .container_16 .suffix_12 { padding-right: 720px; } /* `Suffix Extra Space >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .suffix_1 { padding-right: 80px; } .container_12 .suffix_2 { padding-right: 160px; } .container_12 .suffix_4 { padding-right: 320px; } .container_12 .suffix_5 { padding-right: 400px; } .container_12 .suffix_7 { padding-right: 560px; } .container_12 .suffix_8 { padding-right: 640px; } .container_12 .suffix_10 { padding-right: 800px; } .container_12 .suffix_11 { padding-right: 880px; } /* `Suffix Extra Space >> 16 Columns ----------------------------------------------------------------------------------------------------*/ .container_16 .suffix_1 { padding-right: 60px; } .container_16 .suffix_2 { padding-right: 120px; } .container_16 .suffix_3 { padding-right: 180px; } .container_16 .suffix_5 { padding-right: 300px; } .container_16 .suffix_6 { padding-right: 360px; } .container_16 .suffix_7 { padding-right: 420px; } .container_16 .suffix_9 { padding-right: 540px; } .container_16 .suffix_10 { padding-right: 600px; } .container_16 .suffix_11 { padding-right: 660px; } .container_16 .suffix_13 { padding-right: 780px; } .container_16 .suffix_14 { padding-right: 840px; } .container_16 .suffix_15 { padding-right: 900px; } /* `Push Space >> Global ----------------------------------------------------------------------------------------------------*/ .container_12 .push_3, .container_16 .push_4 { left: 240px; } .container_12 .push_6, .container_16 .push_8 { left: 480px; } .container_12 .push_9, .container_16 .push_12 { left: 720px; } /* `Push Space >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .push_1 { left: 80px; } .container_12 .push_2 { left: 160px; } .container_12 .push_4 { left: 320px; } .container_12 .push_5 { left: 400px; } .container_12 .push_7 { left: 560px; } .container_12 .push_8 { left: 640px; } .container_12 .push_10 { left: 800px; } .container_12 .push_11 { left: 880px; } /* `Push Space >> 16 Columns ----------------------------------------------------------------------------------------------------*/ .container_16 .push_1 { left: 60px; } .container_16 .push_2 { left: 120px; } .container_16 .push_3 { left: 180px; } .container_16 .push_5 { left: 300px; } .container_16 .push_6 { left: 360px; } .container_16 .push_7 { left: 420px; } .container_16 .push_9 { left: 540px; } .container_16 .push_10 { left: 600px; } .container_16 .push_11 { left: 660px; } .container_16 .push_13 { left: 780px; } .container_16 .push_14 { left: 840px; } .container_16 .push_15 { left: 900px; } /* `Pull Space >> Global ----------------------------------------------------------------------------------------------------*/ .container_12 .pull_3, .container_16 .pull_4 { left: -240px; } .container_12 .pull_6, .container_16 .pull_8 { left: -480px; } .container_12 .pull_9, .container_16 .pull_12 { left: -720px; } /* `Pull Space >> 12 Columns ----------------------------------------------------------------------------------------------------*/ .container_12 .pull_1 { left: -80px; } .container_12 .pull_2 { left: -160px; } .container_12 .pull_4 { left: -320px; } .container_12 .pull_5 { left: -400px; } .container_12 .pull_7 { left: -560px; } .container_12 .pull_8 { left: -640px; } .container_12 .pull_10 { left: -800px; } .container_12 .pull_11 { left: -880px; } /* `Pull Space >> 16 Columns ----------------------------------------------------------------------------------------------------*/ .container_16 .pull_1 { left: -60px; } .container_16 .pull_2 { left: -120px; } .container_16 .pull_3 { left: -180px; } .container_16 .pull_5 { left: -300px; } .container_16 .pull_6 { left: -360px; } .container_16 .pull_7 { left: -420px; } .container_16 .pull_9 { left: -540px; } .container_16 .pull_10 { left: -600px; } .container_16 .pull_11 { left: -660px; } .container_16 .pull_13 { left: -780px; } .container_16 .pull_14 { left: -840px; } .container_16 .pull_15 { left: -900px; } /* `Clear Floated Elements ----------------------------------------------------------------------------------------------------*/ /* http://sonspring.com/journal/clearing-floats */ .clear { clear: both; display: block; overflow: hidden; visibility: hidden; width: 0; height: 0; } /* http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified */ .clearfix:before, .clearfix:after, .container_12:before, .container_12:after, .container_16:before, .container_16:after { content: '.'; display: block; overflow: hidden; visibility: hidden; font-size: 0; line-height: 0; width: 0; height: 0; } .clearfix:after, .container_12:after, .container_16:after { clear: both; } /* The following zoom:1 rule is specifically for IE6 + IE7. Move to separate stylesheet if invalid CSS is a problem. */ .clearfix, .container_12, .container_16 { zoom: 1; }
0001-bee
trunk/cakephp2/7010/webroot/css/960.css
CSS
gpl3
9,989
/** * * Generic CSS for CakePHP * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package app.webroot.css * @since CakePHP(tm) * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ * { margin:0; padding:0; } /** General Style Info **/ body { background: #003d4c; color: #fff; font-family:'lucida grande',verdana,helvetica,arial,sans-serif; font-size:90%; margin: 0; } a { color: #003d4c; text-decoration: underline; font-weight: bold; } a:hover { color: #367889; text-decoration:none; } a img { border:none; } h1, h2, h3, h4 { font-weight: normal; margin-bottom:0.5em; } h1 { background:#fff; color: #003d4c; font-size: 100%; } h2 { background:#fff; color: #e32; font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif; font-size: 190%; } h3 { color: #2c6877; font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif; font-size: 165%; } h4 { color: #993; font-weight: normal; } ul, li { margin: 0 12px; } p { margin: 0 0 1em 0; } /** Layout **/ #container { text-align: left; } #header{ padding: 10px 20px; } #header h1 { line-height:20px; background: #003d4c url('../img/cake.icon.png') no-repeat left; color: #fff; padding: 0px 30px; } #header h1 a { color: #fff; background: #003d4c; font-weight: normal; text-decoration: none; } #header h1 a:hover { color: #fff; background: #003d4c; text-decoration: underline; } #content{ background: #fff; clear: both; color: #333; padding: 10px 20px 40px 20px; overflow: auto; } #footer { clear: both; padding: 6px 10px; text-align: right; } /** containers **/ div.form, div.index, div.view { float:right; width:76%; border-left:1px solid #666; padding:10px 2%; } div.actions { float:left; width:16%; padding:10px 1.5%; } div.actions h3 { padding-top:0; color:#777; } /** Tables **/ table { border-right:0; clear: both; color: #333; margin-bottom: 10px; width: 100%; } th { border:0; border-bottom:2px solid #555; text-align: left; padding:4px; } th a { display: block; padding: 2px 4px; text-decoration: none; } th a.asc:after { content: ' ⇣'; } th a.desc:after { content: ' ⇡'; } table tr td { padding: 6px; text-align: left; vertical-align: top; border-bottom:1px solid #ddd; } table tr:nth-child(even) { background: #f9f9f9; } td.actions { text-align: center; white-space: nowrap; } table td.actions a { margin: 0px 6px; padding:2px 5px; } /* SQL log */ .cake-sql-log { background: #fff; } .cake-sql-log td { padding: 4px 8px; text-align: left; font-family: Monaco, Consolas, "Courier New", monospaced; } .cake-sql-log caption { color:#fff; } /** Paging **/ .paging { background:#fff; color: #ccc; margin-top: 1em; clear:both; } .paging .current, .paging .disabled, .paging a { text-decoration: none; padding: 5px 8px; display: inline-block } .paging > span { display: inline-block; border: 1px solid #ccc; border-left: 0; } .paging > span:hover { background: #efefef; } .paging .prev { border-left: 1px solid #ccc; -moz-border-radius: 4px 0 0 4px; -webkit-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .paging .next { -moz-border-radius: 0 4px 4px 0; -webkit-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .paging .disabled { color: #ddd; } .paging .disabled:hover { background: transparent; } .paging .current { background: #efefef; color: #c73e14; } /** Scaffold View **/ dl { line-height: 2em; margin: 0em 0em; width: 60%; } dl dd:nth-child(4n+2), dl dt:nth-child(4n+1) { background: #f4f4f4; } dt { font-weight: bold; padding-left: 4px; vertical-align: top; width: 10em; } dd { margin-left: 10em; margin-top: -2em; vertical-align: top; } /** Forms **/ form { clear: both; margin-right: 20px; padding: 0; width: 95%; } fieldset { border: none; margin-bottom: 1em; padding: 16px 10px; } fieldset legend { color: #e32; font-size: 160%; font-weight: bold; } fieldset fieldset { margin-top: 0; padding: 10px 0 0; } fieldset fieldset legend { font-size: 120%; font-weight: normal; } fieldset fieldset div { clear: left; margin: 0 20px; } form div { clear: both; margin-bottom: 1em; padding: .5em; vertical-align: text-top; } form .input { color: #444; } form .required { font-weight: bold; } form .required label:after { color: #e32; content: '*'; display:inline; } form div.submit { border: 0; clear: both; margin-top: 10px; } label { display: block; font-size: 110%; margin-bottom:3px; } input, textarea { clear: both; font-size: 140%; font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif; padding: 1%; width:98%; } select { clear: both; font-size: 120%; vertical-align: text-bottom; } select[multiple=multiple] { width: 100%; } option { font-size: 120%; padding: 0 3px; } input[type=checkbox] { clear: left; float: left; margin: 0px 6px 7px 2px; width: auto; } div.checkbox label { display: inline; } input[type=radio] { float:left; width:auto; margin: 6px 0; padding: 0; line-height: 26px; } .radio label { margin: 0 0 6px 20px; line-height: 26px; } input[type=submit] { display: inline; font-size: 110%; width: auto; } form .submit input[type=submit] { background:#62af56; background-image: -webkit-gradient(linear, left top, left bottom, from(#76BF6B), to(#3B8230)); background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230); background-image: -moz-linear-gradient(top, #76BF6B, #3B8230); border-color: #2d6324; color: #fff; text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px; padding: 8px 10px; } form .submit input[type=submit]:hover { background: #5BA150; } /* Form errors */ form .error { background: #FFDACC; -moz-order-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; font-weight: normal; } form .error-message { -moz-border-radius: none; -webkit-border-radius: none; border-radius: none; border: none; background: none; margin: 0; padding-left: 4px; padding-right: 0; } form .error, form .error-message { color: #9E2424; -webkit-box-shadow: none; -moz-box-shadow: none; -ms-box-shadow: none; -o-box-shadow: none; box-shadow: none; text-shadow: none; } /** Notices and Errors **/ .message { clear: both; color: #fff; font-size: 140%; font-weight: bold; margin: 0 0 1em 0; padding: 5px; } .success, .message, .cake-error, .cake-debug, .notice, p.error, .error-message { background: #ffcc00; background-repeat: repeat-x; background-image: -moz-linear-gradient(top, #ffcc00, #E6B800); background-image: -ms-linear-gradient(top, #ffcc00, #E6B800); background-image: -webkit-gradient(linear, left top, left bottom, from(#ffcc00), to(#E6B800)); background-image: -webkit-linear-gradient(top, #ffcc00, #E6B800); background-image: -o-linear-gradient(top, #ffcc00, #E6B800); background-image: linear-gradient(top, #ffcc00, #E6B800); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); border: 1px solid rgba(0, 0, 0, 0.2); margin-bottom: 18px; padding: 7px 14px; color: #404040; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); } .success, .message, .cake-error, p.error, .error-message { clear: both; color: #fff; background: #c43c35; border: 1px solid rgba(0, 0, 0, 0.5); background-repeat: repeat-x; background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35); background-image: -webkit-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35)); background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); background-image: linear-gradient(top, #ee5f5b, #c43c35); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); } .success { clear: both; color: #fff; border: 1px solid rgba(0, 0, 0, 0.5); background: #3B8230; background-repeat: repeat-x; background-image: -webkit-gradient(linear, left top, left bottom, from(#76BF6B), to(#3B8230)); background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230); background-image: -moz-linear-gradient(top, #76BF6B, #3B8230); background-image: -ms-linear-gradient(top, #76BF6B, #3B8230); background-image: -o-linear-gradient(top, #76BF6B, #3B8230); background-image: linear-gradient(top, #76BF6B, #3B8230); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); } p.error { font-family: Monaco, Consolas, Courier, monospace; font-size: 120%; padding: 0.8em; margin: 1em 0; } p.error em { font-weight: normal; line-height: 140%; } .notice { color: #000; display: block; font-size: 120%; padding: 0.8em; margin: 1em 0; } .success { color: #fff; } /** Actions **/ .actions ul { margin: 0; padding: 0; } .actions li { margin:0 0 0.5em 0; list-style-type: none; white-space: nowrap; padding: 0; } .actions ul li a { font-weight: normal; display: block; clear: both; } /* Buttons and button links */ input[type=submit], .actions ul li a, .actions a { font-weight:normal; padding: 4px 8px; background: #dcdcdc; background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#dcdcdc)); background-image: -webkit-linear-gradient(top, #fefefe, #dcdcdc); background-image: -moz-linear-gradient(top, #fefefe, #dcdcdc); background-image: -ms-linear-gradient(top, #fefefe, #dcdcdc); background-image: -o-linear-gradient(top, #fefefe, #dcdcdc); background-image: linear-gradient(top, #fefefe, #dcdcdc); color:#333; border:1px solid #bbb; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; text-decoration: none; text-shadow: #fff 0px 1px 0px; min-width: 0; -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); -webkit-user-select: none; user-select: none; } .actions ul li a:hover, .actions a:hover { background: #ededed; border-color: #acacac; text-decoration: none; } input[type=submit]:active, .actions ul li a:active, .actions a:active { background: #eee; background-image: -webkit-gradient(linear, left top, left bottom, from(#dfdfdf), to(#eee)); background-image: -webkit-linear-gradient(top, #dfdfdf, #eee); background-image: -moz-linear-gradient(top, #dfdfdf, #eee); background-image: -ms-linear-gradient(top, #dfdfdf, #eee); background-image: -o-linear-gradient(top, #dfdfdf, #eee); background-image: linear-gradient(top, #dfdfdf, #eee); text-shadow: #eee 0px 1px 0px; -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); border-color: #aaa; text-decoration: none; } /** Related **/ .related { clear: both; display: block; } /** Debugging **/ pre { color: #000; background: #f0f0f0; padding: 15px; -moz-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); -webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); } .cake-debug-output { padding: 0; position: relative; } .cake-debug-output > span { position: absolute; top: 5px; right: 5px; background: rgba(255, 255, 255, 0.3); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; padding: 5px 6px; color: #000; display: block; float: left; -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5); -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5); box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5); text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); } .cake-debug, .cake-error { font-size: 16px; line-height: 20px; clear: both; } .cake-error > a { text-shadow: none; } .cake-error { white-space: normal; } .cake-stack-trace { background: rgba(255, 255, 255, 0.7); color: #333; margin: 10px 0 5px 0; padding: 10px 10px 0 10px; font-size: 120%; line-height: 140%; overflow: auto; position: relative; -moz-border-radius: 4px; -wekbkit-border-radius: 4px; border-radius: 4px; } .cake-stack-trace a { text-shadow: none; background: rgba(255, 255, 255, 0.7); padding: 5px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; margin: 0px 4px 10px 2px; font-family: sans-serif; font-size: 14px; line-height: 14px; display: inline-block; text-decoration: none; -moz-box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3); -webkit-box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3); box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3); } .cake-code-dump pre { position: relative; overflow: auto; } .cake-context { margin-bottom: 10px; } .cake-stack-trace pre { color: #000; background-color: #F0F0F0; margin: 0px 0 10px 0; padding: 1em; overflow: auto; text-shadow: none; } /* excerpt */ .cake-code-dump pre, .cake-code-dump pre code { clear: both; font-size: 12px; line-height: 15px; margin: 4px 2px; padding: 4px; overflow: auto; } .cake-code-dump .code-highlight { display: block; background-color: rgba(255, 255, 0, 0.5); } .code-coverage-results div.code-line { padding-left:5px; display:block; margin-left:10px; } .code-coverage-results div.uncovered span.content { background:#ecc; } .code-coverage-results div.covered span.content { background:#cec; } .code-coverage-results div.ignored span.content { color:#aaa; } .code-coverage-results span.line-num { color:#666; display:block; float:left; width:20px; text-align:right; margin-right:5px; } .code-coverage-results span.line-num strong { color:#666; } .code-coverage-results div.start { border:1px solid #aaa; border-width:1px 1px 0px 1px; margin-top:30px; padding-top:5px; } .code-coverage-results div.end { border:1px solid #aaa; border-width:0px 1px 1px 1px; margin-bottom:30px; padding-bottom:5px; } .code-coverage-results div.realstart { margin-top:0px; } .code-coverage-results p.note { color:#bbb; padding:5px; margin:5px 0 10px; font-size:10px; } .code-coverage-results span.result-bad { color: #a00; } .code-coverage-results span.result-ok { color: #fa0; } .code-coverage-results span.result-good { color: #0a0; } /** Elements **/ #url-rewriting-warning { display:none; }
0001-bee
trunk/cakephp2/7010/webroot/css/cake.generic.css
CSS
gpl3
14,775
/* `XHTML, HTML4, HTML5 Reset ----------------------------------------------------------------------------------------------------*/ a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, body, canvas, caption, center, cite, code, dd, del, details, dfn, dialog, div, dl, dt, em, embed, fieldset, figcaption, figure, font, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu, meter, nav, object, ol, output, p, pre, progress, q, rp, rt, ruby, s, samp, section, small, span, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr, tt, u, ul, var, video, xmp { border: 0; margin: 0; padding: 0; font-size: 100%; } html, body { height: 100%; } article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { /* Override the default (display: inline) for browsers that do not recognize HTML5 tags. IE8 (and lower) requires a shiv: http://ejohn.org/blog/html5-shiv */ display: block; } b, strong { /* Makes browsers agree. IE + Opera = font-weight: bold. Gecko + WebKit = font-weight: bolder. */ font-weight: bold; } img { color: transparent; font-size: 0; vertical-align: middle; /* For IE. http://css-tricks.com/ie-fix-bicubic-scaling-for-images */ -ms-interpolation-mode: bicubic; } li { /* For IE6 + IE7. */ display: list-item; } table { border-collapse: collapse; border-spacing: 0; } th, td, caption { font-weight: normal; vertical-align: top; text-align: left; } q { quotes: none; } q:before, q:after { content: ''; content: none; } sub, sup, small { font-size: 75%; } sub, sup { line-height: 0; position: relative; vertical-align: baseline; } sub { bottom: -0.25em; } sup { top: -0.5em; } svg { /* For IE9. */ overflow: hidden; }
0001-bee
trunk/cakephp2/7010/webroot/css/reset.css
CSS
gpl3
1,865
/* 960 Grid System ~ Text CSS. Learn more ~ http://960.gs/ Licensed under GPL and MIT. */ /* `Basic HTML ----------------------------------------------------------------------------------------------------*/ body { font: 13px/1.5 'Helvetica Neue', Arial, 'Liberation Sans', FreeSans, sans-serif; } pre, code { font-family: 'DejaVu Sans Mono', Monaco, Consolas, monospace; } hr { border: 0 #ccc solid; border-top-width: 1px; clear: both; height: 0; } /* `Headings ----------------------------------------------------------------------------------------------------*/ h1 { font-size: 25px; } h2 { font-size: 23px; } h3 { font-size: 21px; } h4 { font-size: 19px; } h5 { font-size: 17px; } h6 { font-size: 15px; } /* `Spacing ----------------------------------------------------------------------------------------------------*/ ol { list-style: decimal; } ul { list-style: disc; } li { margin-left: 30px; } p, dl, hr, h1, h2, h3, h4, h5, h6, ol, ul, pre, table, address, fieldset, figure { margin-bottom: 20px; }
0001-bee
trunk/cakephp2/7010/webroot/css/text.css
CSS
gpl3
1,064
<?php App::uses('AppController', 'Controller'); /** * PhotoGroups Controller * * @property PhotoGroup $PhotoGroup */ class PhotoGroupsController extends AppController { /** * index method * * @return void */ public function index() { $this->PhotoGroup->recursive = 0; $this->set('photoGroups', $this->paginate()); } /** * view method * * @param string $id * @return void */ public function view($id = null) { $this->PhotoGroup->id = $id; if (!$this->PhotoGroup->exists()) { throw new NotFoundException(__('Invalid photo group')); } $this->set('photoGroup', $this->PhotoGroup->read(null, $id)); } /** * add method * * @return void */ public function add() { if ($this->request->is('post')) { $this->PhotoGroup->create(); if ($this->PhotoGroup->save($this->request->data)) { $this->Session->setFlash(__('The photo group has been saved')); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The photo group could not be saved. Please, try again.')); } } } /** * edit method * * @param string $id * @return void */ public function edit($id = null) { $this->PhotoGroup->id = $id; if (!$this->PhotoGroup->exists()) { throw new NotFoundException(__('Invalid photo group')); } if ($this->request->is('post') || $this->request->is('put')) { if ($this->PhotoGroup->save($this->request->data)) { $this->Session->setFlash(__('The photo group has been saved')); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The photo group could not be saved. Please, try again.')); } } else { $this->request->data = $this->PhotoGroup->read(null, $id); } } /** * delete method * * @param string $id * @return void */ public function delete($id = null) { if (!$this->request->is('post')) { throw new MethodNotAllowedException(); } $this->PhotoGroup->id = $id; if (!$this->PhotoGroup->exists()) { throw new NotFoundException(__('Invalid photo group')); } if ($this->PhotoGroup->delete()) { $this->Session->setFlash(__('Photo group deleted')); $this->redirect(array('action'=>'index')); } $this->Session->setFlash(__('Photo group was not deleted')); $this->redirect(array('action' => 'index')); } }
0001-bee
trunk/cakephp2/7010/Controller/PhotoGroupsController.php
PHP
gpl3
2,387
<?php /** * Static content controller. * * This file will render views from views/pages/ * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** * Static content controller * * Override this controller by placing a copy in controllers directory of an application * * @package app.Controller */ class PagesController extends AppController { /** * Controller name * * @var string */ public $name = 'Pages'; /** * Default helper * * @var array */ public $helpers = array('Html'); /** * This controller does not use a model * * @var array */ public $uses = array(); /** * Displays a view * * @param mixed What page to display */ public function display() { $path = func_get_args(); $count = count($path); if (!$count) { $this->redirect('/'); } $page = $subpage = $title_for_layout = null; if (!empty($path[0])) { $page = $path[0]; } if (!empty($path[1])) { $subpage = $path[1]; } if (!empty($path[$count - 1])) { $title_for_layout = Inflector::humanize($path[$count - 1]); } $this->set(compact('page', 'subpage', 'title_for_layout')); $this->render(implode('/', $path)); } }
0001-bee
trunk/cakephp2/7010/Controller/PagesController.php
PHP
gpl3
1,685
<?php // app/Controller/AppController.php class AppController extends Controller { //... public $components = array( 'Session', 'Auth' => array( 'loginRedirect' => array('controller' => 'photos', 'action' => 'index'), 'logoutRedirect' => array('controller' => 'pages', 'action' => 'display', 'home') ) ); function beforeFilter() { $this->Auth->allow('index', 'view'); } }
0001-bee
trunk/cakephp2/7010/Controller/AppController.php
PHP
gpl3
449
<?php App::uses('AppController', 'Controller'); /** * Photos Controller * * @property Photo $Photo */ class PhotosController extends AppController { /** * index method * * @return void */ public function index() { $this->Photo->recursive = 0; $this->set('photos', $this->paginate()); } /** * view method * * @param string $id * @return void */ public function view($id = null) { $this->Photo->id = $id; if (!$this->Photo->exists()) { throw new NotFoundException(__('Invalid photo')); } $this->set('photo', $this->Photo->read(null, $id)); } /** * add method * * @return void */ public function add() { if ($this->request->is('post')) { $upload_handler = new UploadHandler(); header('Pragma: no-cache'); header('Cache-Control: private, no-cache'); header('Content-Disposition: inline; filename="files.json"'); header('X-Content-Type-Options: nosniff'); switch ($_SERVER['REQUEST_METHOD']) { case 'HEAD': case 'GET': $upload_handler->get(); break; case 'POST': $upload_handler->post(); break; case 'DELETE': $upload_handler->delete(); break; case 'OPTIONS': break; default: header('HTTP/1.0 405 Method Not Allowed'); } $this->Photo->create(); if ($this->Photo->save($this->request->data)) { $this->Session->setFlash(__('The photo has been saved')); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The photo could not be saved. Please, try again.')); } } $photoGroups = $this->Photo->PhotoGroup->find('list'); $this->set(compact('photoGroups')); } /** * edit method * * @param string $id * @return void */ public function edit($id = null) { $this->Photo->id = $id; if (!$this->Photo->exists()) { throw new NotFoundException(__('Invalid photo')); } if ($this->request->is('post') || $this->request->is('put')) { if ($this->Photo->save($this->request->data)) { $this->Session->setFlash(__('The photo has been saved')); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The photo could not be saved. Please, try again.')); } } else { $this->request->data = $this->Photo->read(null, $id); } $photoGroups = $this->Photo->PhotoGroup->find('list'); $this->set(compact('photoGroups')); } /** * delete method * * @param string $id * @return void */ public function delete($id = null) { if (!$this->request->is('post')) { throw new MethodNotAllowedException(); } $this->Photo->id = $id; if (!$this->Photo->exists()) { throw new NotFoundException(__('Invalid photo')); } if ($this->Photo->delete()) { $this->Session->setFlash(__('Photo deleted')); $this->redirect(array('action' => 'index')); } $this->Session->setFlash(__('Photo was not deleted')); $this->redirect(array('action' => 'index')); } }
0001-bee
trunk/cakephp2/7010/Controller/PhotosController.php
PHP
gpl3
3,786
<?php App::uses('AppController', 'Controller'); /** * Users Controller * * @property User $User */ class UsersController extends AppController { /** * index method * * @return void */ public function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('login', 'logout','add'); } public function login() { if ($this->Auth->login()) { $this->redirect($this->Auth->redirect()); } else { $this->Session->setFlash(__('Invalid username or password, try again')); } } public function logout() { $this->redirect($this->Auth->logout()); } public function index() { $this->User->recursive = 0; $this->set('users', $this->paginate()); } /** * view method * * @param string $id * @return void */ public function view($id = null) { $this->User->id = $id; if (!$this->User->exists()) { throw new NotFoundException(__('Invalid user')); } $this->set('user', $this->User->read(null, $id)); } /** * add method * * @return void */ public function add() { if ($this->request->is('post')) { $this->User->create(); if ($this->User->save($this->request->data)) { $this->Session->setFlash(__('The user has been saved')); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The user could not be saved. Please, try again.')); } } } /** * edit method * * @param string $id * @return void */ public function edit($id = null) { $this->User->id = $id; if (!$this->User->exists()) { throw new NotFoundException(__('Invalid user')); } if ($this->request->is('post') || $this->request->is('put')) { if ($this->User->save($this->request->data)) { $this->Session->setFlash(__('The user has been saved')); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The user could not be saved. Please, try again.')); } } else { $this->request->data = $this->User->read(null, $id); } } /** * delete method * * @param string $id * @return void */ public function delete($id = null) { if (!$this->request->is('post')) { throw new MethodNotAllowedException(); } $this->User->id = $id; if (!$this->User->exists()) { throw new NotFoundException(__('Invalid user')); } if ($this->User->delete()) { $this->Session->setFlash(__('User deleted')); $this->redirect(array('action' => 'index')); } $this->Session->setFlash(__('User was not deleted')); $this->redirect(array('action' => 'index')); } }
0001-bee
trunk/cakephp2/7010/Controller/UsersController.php
PHP
gpl3
3,163
<?php App::uses('AppController', 'Controller'); /** * Groups Controller * * @property Group $Group */ class GroupsController extends AppController { /** * index method * * @return void */ public function index() { $this->Group->recursive = 0; $this->set('groups', $this->paginate()); } /** * view method * * @param string $id * @return void */ public function view($id = null) { $this->Group->id = $id; if (!$this->Group->exists()) { throw new NotFoundException(__('Invalid group')); } $this->set('group', $this->Group->read(null, $id)); } /** * add method * * @return void */ public function add() { if ($this->request->is('post')) { $this->Group->create(); if ($this->Group->save($this->request->data)) { $this->Session->setFlash(__('The group has been saved')); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The group could not be saved. Please, try again.')); } } $photos = $this->Group->Photo->find('list'); $this->set(compact('photos')); } /** * edit method * * @param string $id * @return void */ public function edit($id = null) { $this->Group->id = $id; if (!$this->Group->exists()) { throw new NotFoundException(__('Invalid group')); } if ($this->request->is('post') || $this->request->is('put')) { if ($this->Group->save($this->request->data)) { $this->Session->setFlash(__('The group has been saved')); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The group could not be saved. Please, try again.')); } } else { $this->request->data = $this->Group->read(null, $id); } $photos = $this->Group->Photo->find('list'); $this->set(compact('photos')); } /** * delete method * * @param string $id * @return void */ public function delete($id = null) { if (!$this->request->is('post')) { throw new MethodNotAllowedException(); } $this->Group->id = $id; if (!$this->Group->exists()) { throw new NotFoundException(__('Invalid group')); } if ($this->Group->delete()) { $this->Session->setFlash(__('Group deleted')); $this->redirect(array('action'=>'index')); } $this->Session->setFlash(__('Group was not deleted')); $this->redirect(array('action' => 'index')); } }
0001-bee
trunk/cakephp2/7010/Controller/GroupsController.php
PHP
gpl3
2,402
<?php /* Photo Fixture generated on: 2011-11-11 08:26:14 : 1320996374 */ /** * PhotoFixture * */ class PhotoFixture extends CakeTestFixture { /** * Fields * * @var array */ public $fields = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''), 'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'latin1_swedish_ci', 'comment' => '', 'charset' => 'latin1'), 'photo_group_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index', 'collate' => NULL, 'comment' => ''), 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'fk_photos_photo_groups' => array('column' => 'photo_group_id', 'unique' => 0)), 'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB') ); /** * Records * * @var array */ public $records = array( array( 'id' => 1, 'name' => 'Lorem ipsum dolor sit amet', 'photo_group_id' => 1 ), ); }
0001-bee
trunk/cakephp2/7010/Test/Fixture/PhotoFixture.php
PHP
gpl3
1,092
<?php /* Group Fixture generated on: 2011-11-11 07:33:21 : 1320993201 */ /** * GroupFixture * */ class GroupFixture extends CakeTestFixture { /** * Fields * * @var array */ public $fields = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''), 'name' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 100, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'), 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''), 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''), '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', 'created' => '2011-11-11 07:33:21', 'modified' => '2011-11-11 07:33:21' ), ); }
0001-bee
trunk/cakephp2/7010/Test/Fixture/GroupFixture.php
PHP
gpl3
1,168
<?php /* PhotoGroup Fixture generated on: 2011-11-11 08:26:14 : 1320996374 */ /** * PhotoGroupFixture * */ class PhotoGroupFixture extends CakeTestFixture { /** * Fields * * @var array */ public $fields = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''), 'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'latin1_swedish_ci', 'comment' => '', 'charset' => 'latin1'), 'text' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'latin1_swedish_ci', 'comment' => '', 'charset' => 'latin1'), 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)), 'tableParameters' => array('charset' => 'latin1', 'collate' => 'latin1_swedish_ci', 'engine' => 'InnoDB') ); /** * Records * * @var array */ public $records = array( array( 'id' => 1, 'name' => 'Lorem ipsum dolor sit amet', '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.' ), ); }
0001-bee
trunk/cakephp2/7010/Test/Fixture/PhotoGroupFixture.php
PHP
gpl3
1,379
<?php /* User Fixture generated on: 2011-11-11 08:26:14 : 1320996374 */ /** * UserFixture * */ class UserFixture extends CakeTestFixture { /** * Fields * * @var array */ public $fields = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'primary', 'collate' => NULL, 'comment' => ''), 'username' => array('type' => 'string', 'null' => false, 'default' => NULL, 'key' => 'unique', 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'), 'password' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 40, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'), 'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''), 'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL, 'collate' => NULL, 'comment' => ''), 'role' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => '', 'charset' => 'utf8'), 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'username' => array('column' => 'username', 'unique' => 1)), 'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB') ); /** * Records * * @var array */ public $records = array( array( 'id' => 1, 'username' => 'Lorem ipsum dolor sit amet', 'password' => 'Lorem ipsum dolor sit amet', 'created' => '2011-11-11 08:26:14', 'modified' => '2011-11-11 08:26:14', 'role' => 'Lorem ipsum dolor sit amet' ), ); }
0001-bee
trunk/cakephp2/7010/Test/Fixture/UserFixture.php
PHP
gpl3
1,638
<?php /* Users Test cases generated on: 2011-11-11 07:40:12 : 1320993612*/ App::uses('UsersController', 'Controller'); /** * TestUsersController * */ class TestUsersController extends UsersController { /** * Auto render * * @var boolean */ public $autoRender = false; /** * Redirect action * * @param mixed $url * @param mixed $status * @param boolean $exit * @return void */ public function redirect($url, $status = null, $exit = true) { $this->redirectUrl = $url; } } /** * UsersController Test Case * */ class UsersControllerTestCase extends CakeTestCase { /** * Fixtures * * @var array */ public $fixtures = array('app.user'); /** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->Users = new TestUsersController(); $this->Users->constructClasses(); } /** * tearDown method * * @return void */ public function tearDown() { unset($this->Users); parent::tearDown(); } /** * testIndex method * * @return void */ public function testIndex() { } /** * testView method * * @return void */ public function testView() { } /** * testAdd method * * @return void */ public function testAdd() { } /** * testEdit method * * @return void */ public function testEdit() { } /** * testDelete method * * @return void */ public function testDelete() { } }
0001-bee
trunk/cakephp2/7010/Test/Case/Controller/UsersControllerTest.php
PHP
gpl3
1,484
<?php /* PhotoGroups Test cases generated on: 2011-11-11 08:26:49 : 1320996409*/ App::uses('PhotoGroupsController', 'Controller'); /** * TestPhotoGroupsController * */ class TestPhotoGroupsController extends PhotoGroupsController { /** * Auto render * * @var boolean */ public $autoRender = false; /** * Redirect action * * @param mixed $url * @param mixed $status * @param boolean $exit * @return void */ public function redirect($url, $status = null, $exit = true) { $this->redirectUrl = $url; } } /** * PhotoGroupsController Test Case * */ class PhotoGroupsControllerTestCase extends CakeTestCase { /** * Fixtures * * @var array */ public $fixtures = array('app.photo_group', 'app.photo'); /** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->PhotoGroups = new TestPhotoGroupsController(); $this->PhotoGroups->constructClasses(); } /** * tearDown method * * @return void */ public function tearDown() { unset($this->PhotoGroups); parent::tearDown(); } /** * testIndex method * * @return void */ public function testIndex() { } /** * testView method * * @return void */ public function testView() { } /** * testAdd method * * @return void */ public function testAdd() { } /** * testEdit method * * @return void */ public function testEdit() { } /** * testDelete method * * @return void */ public function testDelete() { } }
0001-bee
trunk/cakephp2/7010/Test/Case/Controller/PhotoGroupsControllerTest.php
PHP
gpl3
1,570
<?php /* Groups Test cases generated on: 2011-11-11 07:33:35 : 1320993215*/ App::uses('GroupsController', 'Controller'); /** * TestGroupsController * */ class TestGroupsController extends GroupsController { /** * Auto render * * @var boolean */ public $autoRender = false; /** * Redirect action * * @param mixed $url * @param mixed $status * @param boolean $exit * @return void */ public function redirect($url, $status = null, $exit = true) { $this->redirectUrl = $url; } } /** * GroupsController Test Case * */ class GroupsControllerTestCase extends CakeTestCase { /** * Fixtures * * @var array */ public $fixtures = array('app.group', 'app.user', 'app.photo', 'app.photo_group'); /** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->Groups = new TestGroupsController(); $this->Groups->constructClasses(); } /** * tearDown method * * @return void */ public function tearDown() { unset($this->Groups); parent::tearDown(); } /** * testIndex method * * @return void */ public function testIndex() { } /** * testView method * * @return void */ public function testView() { } /** * testAdd method * * @return void */ public function testAdd() { } /** * testEdit method * * @return void */ public function testEdit() { } /** * testDelete method * * @return void */ public function testDelete() { } }
0001-bee
trunk/cakephp2/7010/Test/Case/Controller/GroupsControllerTest.php
PHP
gpl3
1,540
<?php /* Photos Test cases generated on: 2011-11-11 08:48:19 : 1320997699*/ App::uses('PhotosController', 'Controller'); /** * TestPhotosController * */ class TestPhotosController extends PhotosController { /** * Auto render * * @var boolean */ public $autoRender = false; /** * Redirect action * * @param mixed $url * @param mixed $status * @param boolean $exit * @return void */ public function redirect($url, $status = null, $exit = true) { $this->redirectUrl = $url; } } /** * PhotosController Test Case * */ class PhotosControllerTestCase extends CakeTestCase { /** * Fixtures * * @var array */ public $fixtures = array('app.photo', 'app.photo_group'); /** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->Photos = new TestPhotosController(); $this->Photos->constructClasses(); } /** * tearDown method * * @return void */ public function tearDown() { unset($this->Photos); parent::tearDown(); } /** * testIndex method * * @return void */ public function testIndex() { } /** * testView method * * @return void */ public function testView() { } /** * testAdd method * * @return void */ public function testAdd() { } /** * testEdit method * * @return void */ public function testEdit() { } /** * testDelete method * * @return void */ public function testDelete() { } }
0001-bee
trunk/cakephp2/7010/Test/Case/Controller/PhotosControllerTest.php
PHP
gpl3
1,515
<?php /* PhotoGroup Test cases generated on: 2011-11-11 08:26:14 : 1320996374*/ App::uses('PhotoGroup', 'Model'); /** * PhotoGroup Test Case * */ class PhotoGroupTestCase extends CakeTestCase { /** * Fixtures * * @var array */ public $fixtures = array('app.photo_group', 'app.photo'); /** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->PhotoGroup = ClassRegistry::init('PhotoGroup'); } /** * tearDown method * * @return void */ public function tearDown() { unset($this->PhotoGroup); parent::tearDown(); } }
0001-bee
trunk/cakephp2/7010/Test/Case/Model/PhotoGroupTest.php
PHP
gpl3
618
<?php /* Group Test cases generated on: 2011-11-11 07:33:21 : 1320993201*/ App::uses('Group', 'Model'); /** * Group Test Case * */ class GroupTestCase extends CakeTestCase { /** * Fixtures * * @var array */ public $fixtures = array('app.group', 'app.user', 'app.photo', 'app.photo_group'); /** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->Group = ClassRegistry::init('Group'); } /** * tearDown method * * @return void */ public function tearDown() { unset($this->Group); parent::tearDown(); } }
0001-bee
trunk/cakephp2/7010/Test/Case/Model/GroupTest.php
PHP
gpl3
608
<?php /* Photo Test cases generated on: 2011-11-11 08:26:14 : 1320996374*/ App::uses('Photo', 'Model'); /** * Photo Test Case * */ class PhotoTestCase extends CakeTestCase { /** * Fixtures * * @var array */ public $fixtures = array('app.photo', 'app.photo_group'); /** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->Photo = ClassRegistry::init('Photo'); } /** * tearDown method * * @return void */ public function tearDown() { unset($this->Photo); parent::tearDown(); } }
0001-bee
trunk/cakephp2/7010/Test/Case/Model/PhotoTest.php
PHP
gpl3
583
<?php /* User Test cases generated on: 2011-11-11 08:26:14 : 1320996374*/ App::uses('User', 'Model'); /** * User Test Case * */ class UserTestCase extends CakeTestCase { /** * Fixtures * * @var array */ public $fixtures = array('app.user'); /** * setUp method * * @return void */ public function setUp() { parent::setUp(); $this->User = ClassRegistry::init('User'); } /** * tearDown method * * @return void */ public function tearDown() { unset($this->User); parent::tearDown(); } }
0001-bee
trunk/cakephp2/7010/Test/Case/Model/UserTest.php
PHP
gpl3
556
<?php /** * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package app * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';
0001-bee
trunk/cakephp2/7010/index.php
PHP
gpl3
642
#!/usr/bin/php -q <?php /** * Command-line code generation utility to automate programmer chores. * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package app.Console * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ $ds = DIRECTORY_SEPARATOR; $dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php'; $found = false; $paths = explode(PATH_SEPARATOR, ini_get('include_path')); foreach ($paths as $path) { if (file_exists($path . $ds . $dispatcher)) { $found = $path; } } if (!$found && function_exists('ini_set')) { $root = dirname(dirname(dirname(__FILE__))); ini_set('include_path', 'D:' . $ds . 'xampp' . $ds . 'htdocs' . $ds . 'cakephp2' . $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, $found, $dispatcher, $root, $ds); return ShellDispatcher::run($argv);
0001-bee
trunk/cakephp2/7010/Console/cake.php
PHP
gpl3
1,351
#!/bin/bash ################################################################################ # # Bake is a shell script for running CakePHP bake script # PHP 5 # # CakePHP(tm) : Rapid Development Framework (http://cakephp.org) # Copyright 2005-2011, Cake Software Foundation, Inc. # # Licensed under The MIT License # Redistributions of files must retain the above copyright notice. # # @copyright Copyright 2005-2011, Cake Software Foundation, Inc. # @link http://cakephp.org CakePHP(tm) Project # @package app.Console # @since CakePHP(tm) v 2.0 # @license MIT License (http://www.opensource.org/licenses/mit-license.php) # ################################################################################ LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0") while [ -h "$LIB" ]; do DIR=$(dirname -- "$LIB") SYM=$(readlink "$LIB") LIB=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM") done LIB=$(dirname -- "$LIB")/ APP=`pwd` exec php -q "$LIB"cake.php -working "$APP" "$@" exit;
0001-bee
trunk/cakephp2/7010/Console/.svn/text-base/cake.svn-base
Shell
gpl3
1,050
#!/usr/bin/php -q <?php /** * Command-line code generation utility to automate programmer chores. * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package app.Console * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ $ds = DIRECTORY_SEPARATOR; $dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php'; $found = false; $paths = explode(PATH_SEPARATOR, ini_get('include_path')); foreach ($paths as $path) { if (file_exists($path . $ds . $dispatcher)) { $found = $path; } } if (!$found && function_exists('ini_set')) { $root = dirname(dirname(dirname(__FILE__))); ini_set('include_path', 'D:' . $ds . 'xampp' . $ds . 'htdocs' . $ds . 'cakephp2' . $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, $found, $dispatcher, $root, $ds); return ShellDispatcher::run($argv);
0001-bee
trunk/cakephp2/7010/Console/.svn/text-base/cake.php.svn-base
PHP
gpl3
1,351
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: :: Bake is a shell script for running CakePHP bake script :: PHP 5 :: :: CakePHP(tm) : Rapid Development Framework (http://cakephp.org) :: Copyright 2005-2011, Cake Software Foundation, Inc. :: :: Licensed under The MIT License :: Redistributions of files must retain the above copyright notice. :: :: @copyright Copyright 2005-2011, Cake Software Foundation, Inc. :: @link http://cakephp.org CakePHP(tm) Project :: @package app.Console :: @since CakePHP(tm) v 2.0 :: @license MIT License (http://www.opensource.org/licenses/mit-license.php) :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: 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%
0001-bee
trunk/cakephp2/7010/Console/cake.bat
Batchfile
gpl3
963
#!/bin/bash ################################################################################ # # Bake is a shell script for running CakePHP bake script # PHP 5 # # CakePHP(tm) : Rapid Development Framework (http://cakephp.org) # Copyright 2005-2011, Cake Software Foundation, Inc. # # Licensed under The MIT License # Redistributions of files must retain the above copyright notice. # # @copyright Copyright 2005-2011, Cake Software Foundation, Inc. # @link http://cakephp.org CakePHP(tm) Project # @package app.Console # @since CakePHP(tm) v 2.0 # @license MIT License (http://www.opensource.org/licenses/mit-license.php) # ################################################################################ LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0") while [ -h "$LIB" ]; do DIR=$(dirname -- "$LIB") SYM=$(readlink "$LIB") LIB=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM") done LIB=$(dirname -- "$LIB")/ APP=`pwd` exec php -q "$LIB"cake.php -working "$APP" "$@" exit;
0001-bee
trunk/cakephp2/7010/Console/cake
Shell
gpl3
1,050
<?php /** * This is core configuration file. * * Use it to configure core behaviour of Cake. * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** * In this file you set up your database connection details. * * @package cake.config */ /** * Database configuration class. * You can specify multiple configurations for production, development and testing. * * driver => The name of a supported driver; valid options are as follows: * 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 drivers (or override existing drivers) by adding the * appropriate file to app/Model/Datasource/Database. Drivers should be named 'MyDriver.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 specifies which schema you would like to use the tables in. Postgres defaults to 'public'. * * 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` */ class DATABASE_CONFIG { public $default = array( 'datasource' => 'Database/Mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'root', 'password' => 'morethan', 'database' => '7010', 'prefix' => '', //'encoding' => 'utf8', ); public $test = array( 'datasource' => 'Database/Mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'root', 'password' => 'morethan', 'database' => '7010', 'prefix' => '', //'encoding' => 'utf8', ); }
0001-bee
trunk/cakephp2/7010/Config/database.php
PHP
gpl3
2,632
<?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). * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** * 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' => 'pages', 'action' => 'display', 'home')); /** * ...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. Remove this if you do not want to use * the built-in default routes. */ require CAKE . 'Config' . DS . 'routes.php';
0001-bee
trunk/cakephp2/7010/Config/routes.php
PHP
gpl3
1,591
;<?php exit() ?> ;/** ; * ACL Configuration ; * ; * ; * PHP 5 ; * ; * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) ; * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) ; * ; * Licensed under The MIT License ; * Redistributions of files must retain the above copyright notice. ; * ; * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) ; */ ; 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
0001-bee
trunk/cakephp2/7010/Config/acl.ini.php
PHP
gpl3
2,028
<?php /** * This is core configuration file. * * Use it to configure core behavior of Cake. * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** * 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', 0); /** * 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 callback type, * including anonymous functions. * - `level` - int - 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. * - `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/Error. This class needs to implement a render method. * - `log` - boolean - Should Exceptions be logged? * * @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: */ //Configure::write('App.baseUrl', env('SCRIPT_NAME')); /** * 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); /** * Defines the default error type when using the log() function. Used for * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG. */ define('LOG_ERROR', 2); /** * 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 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' )); /** * The level of CakePHP security. */ Configure::write('Security.level', 'medium'); /** * A random string used in security hashing methods. */ Configure::write('Security.salt', '1c0d889adf8asd18f4asd8g8fj8j8khjkh8510bf15ac55'); /** * A random numeric string (digits only) used to encrypt/decrypt strings. */ Configure::write('Security.cipherSeed', '3718415434735741839323566363161'); /** * Apply timestamps with the last modified time to static assets (js, css, images). * Will append a querystring 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 JavaScriptHelper::link(). */ //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php'); /** * The classname and database used in CakePHP's * access control lists. */ Configure::write('Acl.classname', 'DbAcl'); Configure::write('Acl.database', 'default'); /** * If you are on PHP 5.3 uncomment this line and correct your server timezone * to fix the date & time related errors. */ //date_default_timezone_set('UTC'); /** * * Cache Engine Configuration * Default settings provided below * * File storage engine. * * Cache::config('default', array( * 'engine' => 'File', //[required] * 'duration'=> 3600, //[optional] * 'probability'=> 100, //[optional] * 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path * 'prefix' => 'cake_', //[optional] prefix every cache file with this string * 'lock' => false, //[optional] use file locking * 'serialize' => true, [optional] * )); * * APC (http://pecl.php.net/package/APC) * * Cache::config('default', array( * 'engine' => 'Apc', //[required] * 'duration'=> 3600, //[optional] * 'probability'=> 100, //[optional] * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string * )); * * Xcache (http://xcache.lighttpd.net/) * * Cache::config('default', array( * 'engine' => 'Xcache', //[required] * 'duration'=> 3600, //[optional] * 'probability'=> 100, //[optional] * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string * 'user' => 'user', //user from xcache.admin.user settings * 'password' => 'password', //plaintext password (xcache.admin.pass) * )); * * Memcache (http://www.danga.com/memcached/) * * Cache::config('default', array( * 'engine' => 'Memcache', //[required] * 'duration'=> 3600, //[optional] * 'probability'=> 100, //[optional] * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string * 'servers' => array( * '127.0.0.1:11211' // localhost, default port 11211 * ), //[optional] * '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 * )); */ /** * Pick the caching engine to use. If APC is enabled use it. * If running via cli - apc is disabled by default. ensure it's available and enabled in this case * */ $engine = 'File'; if (extension_loaded('apc') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) { $engine = 'Apc'; } // In development mode, caches should expire quickly. $duration = '+999 days'; if (Configure::read('debug') >= 1) { $duration = '+10 seconds'; } /** * 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' => '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' => 'cake_model_', 'path' => CACHE . 'models' . DS, 'serialize' => ($engine === 'File'), 'duration' => $duration ));
0001-bee
trunk/cakephp2/7010/Config/core.php
PHP
gpl3
11,763
<?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. * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) */ // 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( * 'Plugin' => array('/full/path/to/plugins/', '/next/full/path/to/plugins/'), * 'Model' => array('/full/path/to/models/', '/next/full/path/to/models/'), * 'View' => array('/full/path/to/views/', '/next/full/path/to/views/'), * 'Controller' => array('/full/path/to/controllers/', '/next/full/path/to/controllers/'), * 'Model/Datasource' => array('/full/path/to/datasources/', '/next/full/path/to/datasources/'), * 'Model/Behavior' => array('/full/path/to/behaviors/', '/next/full/path/to/behaviors/'), * 'Controller/Component' => array('/full/path/to/components/', '/next/full/path/to/components/'), * 'View/Helper' => array('/full/path/to/helpers/', '/next/full/path/to/helpers/'), * 'Vendor' => array('/full/path/to/vendors/', '/next/full/path/to/vendors/'), * 'Console/Command' => array('/full/path/to/shells/', '/next/full/path/to/shells/'), * 'locales' => array('/full/path/to/locale/', '/next/full/path/to/locale/') * )); * */ /** * 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 * */
0001-bee
trunk/cakephp2/7010/Config/bootstrap.php
PHP
gpl3
3,000
<?php /*DbAcl schema generated on: 2007-11-24 15:11:13 : 1195945453*/ /** * This is Acl Schema file * * Use it to configure database for ACL * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) */ /* * * Using the Schema command line utility * cake schema run create DbAcl * */ class DbAclSchema extends CakeSchema { public $name = 'DbAcl'; 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)) ); }
0001-bee
trunk/cakephp2/7010/Config/Schema/db_acl.php
PHP
gpl3
3,210
<?php /*i18n schema generated on: 2007-11-25 07:11:25 : 1196004805*/ /** * This is i18n Schema file * * Use it to configure database for i18n * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) */ /* * * Using the Schema command line utility * 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)) ); }
0001-bee
trunk/cakephp2/7010/Config/Schema/i18n.php
PHP
gpl3
1,843
<?php /*Sessions schema generated on: 2007-11-25 07:11:54 : 1196004714*/ /** * This is Sessions Schema file * * Use it to configure database for Sessions * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) */ /* * * 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)) ); }
0001-bee
trunk/cakephp2/7010/Config/Schema/sessions.php
PHP
gpl3
1,354
<?php /** * MeioUpload Behavior * This behavior is based on Tane Piper's improved uplaod behavior (http://digitalspaghetti.tooum.net/switchboard/blog/2497:Upload_Behavior_for_CakePHP_12) * @author Vinicius Mendes (vbmendes@gmail.com) * @link http://www.meiocodigo.com * @filesource http://www.meiocodigo.com/meioupload * @version 1.0.1 * @lastmodified 2008-10-04 * * Usage: * 1) Download this behaviour and place it in your models/behaviours/upload.php * 2) If you require thumbnails for image generation, download Nate's phpThumb Component (http://bakery.cakephp.org/articles/view/phpthumb-component) * 3) Insert the following SQL into your database. This is a basic model you can expand on: * CREATE TABLE `images` ( * `id` int(8) unsigned NOT NULL auto_increment, * `filename` varchar() default NULL, * `dir` varchar(255) default NULL, * `mimetype` varchar(255) NULL, * `filesize` int(11) unsigned default NULL, * `created` datetime default NULL, * `modified` datetime default NULL, * PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; * 4) In your model that you want to have the upload behavior work, place the below code. This example is for an Image model: * * var $actsAs = array('Upload' => array( * 'filename' => array( * 'dir' => 'files/images', * 'create_directory' => false, * 'allowed_mime' => array('image/jpeg', 'image/pjpeg', 'image/gif', 'image/png'), * 'allowed_ext' => array('.jpg', '.jpeg', '.png', '.gif'), * 'thumbsizes' => array( * 'small' => array('width'=>100, 'height'=>100), * 'medium' => array('width'=>220, 'height'=>220), * 'large' => array('width'=>800, 'height'=>600) * ) * ) * ) * ); * The above code will save the uploaded file's name in the 'filename' field in database, * it will not overwrite existing files, instead it will create a new filename based on the original * plus a counter. * Allowed Mimetypes and extentions should be pretty explanitory. * For thumbnails, when the file is uploaded, it will create 3 thumbnail sizes and prepend the name * to the thumbfiles (i.e. image_001.jpg will produced thumb.small.image_001.jpg, thumb.medium.image_001.jpg, etc) * * 5) Create your upload view, make sure it's a multipart/form-data form, and the filename field is of type $form->file * 6) Make sure your directory is at least CHMOD 775, also check your php.ini MAX_FILE_SIZE is enough to support the filesizes you are uploading * * Version Details * * 1.0.1 * + Fixed a bug in the create folder method * + Now you can use the $validate var of the model to apply the changes to default validation rules; * + Changed the my_array_merge function, now it's part of the behavior, name arrayMerge; * + Allow use of {DS}, {model} and {field} constants in directory name and fields names; * + Fixed a bug with the replacement of the default names. * * 1.0 * + Initial release. */ App::uses('Folder', 'Utility'); App::uses('File', 'Utility'); class MeioUploadBehavior extends ModelBehavior { /** * The default options for the behavior */ var $default_options = array( 'dir' => '', 'allowed_mime' => array(), 'allowed_ext' => array(), 'create_directory' => true, 'max_size' => 2097152, 'thumbsizes' => array(), 'default' => false, 'fields' => array( 'dir' => 'dir', 'filesize' => 'filesize', 'mimetype' => 'mimetype' ), 'validations' => array( 'FieldName' => array( 'rule' => array('uploadCheckFieldName'), 'check' => true, 'message' => 'Este campo não foi definido entre os parâmetros do MeioUploadBehavior.' ), 'Dir' => array( 'rule' => array('uploadCheckDir'), 'check' => true, 'message' => 'O diretório onde este arquivo seria colocado não existe ou é protegido contra escrita.' ), 'Empty' => array( 'rule' => array('uploadCheckEmpty'), 'check' => true, 'on' => 'create', 'message' => 'O arquivo não pode ser vazio' ), 'UploadError' => array( 'rule' => array('uploadCheckUploadError'), 'check' => true, 'message' => 'Ocorreram problemas no upload do arquivo.' ), 'MaxSize' => array( 'rule' => array('uploadCheckMaxSize'), 'check' => true, 'message' => 'O tamanho máximo de arquivo foi excedido.' ), 'InvalidMime' => array( 'rule' => array('uploadCheckInvalidMime'), 'check' => true, 'message' => 'Tipo de arquivo inválido.' ), 'InvalidExt' => array( 'rule' => array('uploadCheckInvalidExt'), 'check' => true, 'message' => 'Extensão de arquivo inválida.' ) ) ); var $default_validations = array( 'FieldName' => array( 'rule' => array('uploadCheckFieldName'), 'check' => true, 'message' => 'Este campo não foi definido entre os parâmetros do MeioUploadBehavior.' ), 'Dir' => array( 'rule' => array('uploadCheckDir'), 'check' => true, 'message' => 'O diretório onde este arquivo seria colocado não existe ou é protegido contra escrita.' ), 'Empty' => array( 'rule' => array('uploadCheckEmpty'), 'check' => true, 'on' => 'create', 'message' => 'O arquivo não pode ser vazio' ), 'UploadError' => array( 'rule' => array('uploadCheckUploadError'), 'check' => true, 'message' => 'Ocorreram problemas no upload do arquivo.' ), 'MaxSize' => array( 'rule' => array('uploadCheckMaxSize'), 'check' => true, 'message' => 'O tamanho máximo de arquivo foi excedido.' ), 'InvalidMime' => array( 'rule' => array('uploadCheckInvalidMime'), 'check' => true, 'message' => 'Tipo de arquivo inválido.' ), 'InvalidExt' => array( 'rule' => array('uploadCheckInvalidExt'), 'check' => true, 'message' => 'Extensão de arquivo inválida.' ) ); /** * The message for move error. */ var $moveErrorMsg = 'Ocorreram problemas na cópia do arquivo.'; /** * The array that saves the $options for the behavior */ var $__fields = array(); /** * Patterns of reserved words */ var $patterns = array( "thumb", "default" ); /** * Words to replace the patterns of reserved words */ var $replacements = array( "t_umb", "d_fault" ); /** * Array of files to be removed on the afterSave callback */ var $__filesToRemove = array(); /** * Setup the behavior. It stores a reference to the model, merges the default options with the options for each field, and setup the validation rules. * * @author Vinicius Mendes * @return null * @param $model Object * @param $config Array[optional] */ function setup(&$model, $config=array()) { $this->Folder = &new Folder; $this->__model = $model; $this->__fields = array(); foreach($config as $field => $options) { // Check if given field exists if(!$model->hasField($field)) { trigger_error('MeioUploadBehavior Error: The field "'.$field.'" doesn\'t exists in the model "'.$model->name.'".', E_USER_WARNING); } // Merge given options with defaults $options = $this->arrayMerge($this->default_options, $options); // Including the default name to the replacements if($options['default']){ if(!preg_match('/^.+\..+$/',$options['default'])){ trigger_error('MeioUploadBehavior Error: The default option must be the filename with extension.', E_USER_ERROR); } $this->_includeDefaultReplacement($options['default']); } // Verifies if the thumbsizes names is alphanumeric foreach($options['thumbsizes'] as $name => $size){ if(!preg_match('/^[0-9a-zA-Z]+$/',$name)){ trigger_error('MeioUploadBehavior Error: The thumbsizes names must be alphanumeric.', E_USER_ERROR); } } // Process the max_size if it is not numeric $options['max_size'] = $this->sizeToBytes($options['max_size']); $this->__fields[$field] = $options; // Generate temporary directory if none provided if(empty($options['dir'])) { $this->__fields[$field]['dir'] = 'uploads' . DS . $model->name; // Else replace the tokens of the dir. } else { $this->__fields[$field]['dir'] = $this->replaceTokens($options['dir'],$field); } // Replace tokens in the fields names. foreach($this->__fields[$field]['fields'] as $fieldToken => $fieldName){ $this->__fields[$field]['fields'][$fieldToken] = $this->replaceTokens($fieldName,$field); } // Check that the given directory does not have a DS on the end if($options['dir'][strlen($options['dir'])-1] == DS) { $options['dir'] = substr($options['dir'],0,strlen($options['dir'])-2); } } } /** * Merges two arrays recursively * * @author Vinicius Mendes * @return Array * @param $arr Array * @param $ins Array */ function arrayMerge($arr, $ins) { if (is_array($arr)) { if (is_array($ins)) { foreach ($ins as $k=>$v) { if (isset($arr[$k])&&is_array($v)&&is_array($arr[$k])) { $arr[$k] = $this->arrayMerge($arr[$k],$v); } else $arr[$k] = $v; } } } elseif (!is_array($arr)&&(strlen($arr)==0||$arr==0)) { $arr=$ins; } return($arr); } /** * Replaces some tokens. {model} to the underscore version of the model name, {field} to the field name, {DS}. / or \ to DS constant value. * * @author Vinicius Mendes * @return String * @param $string String * @param $fieldName String */ function replaceTokens($string,$fieldName){ return str_replace(array('{model}', '{field}', '{DS}','/','\\'),array(Inflector::underscore($this->__model->name),$fieldName,DS,DS,DS),$string); } /** * Convert a size value to bytes. For example: 2 MB to 2097152. * * @author Vinicius Mendes * @return int * @param $size String */ function sizeToBytes($size){ if(is_numeric($size)) return $size; if(!preg_match('/^[1-9][0-9]* (kb|mb|gb|tb)$/i', $size)){ trigger_error('MeioUploadBehavior Error: The max_size option format is invalid.', E_USER_ERROR); return 0; } list($size, $unit) = explode(' ',$size); if(strtolower($unit) == 'kb') return $size*1024; if(strtolower($unit) == 'mb') return $size*1048576; if(strtolower($unit) == 'gb') return $size*1073741824; if(strtolower($unit) == 'tb') return $size*1099511627776; trigger_error('MeioUploadBehavior Error: The max_size unit is invalid.', E_USER_ERROR); return 0; } /** * Sets the validation for each field, based on the options. * * @author Vinicius Mendes * @return null * @param $fieldName String * @param $options Array */ function setupValidation($fieldName, $options){ $options = $this->__fields[$fieldName]; if(isset($this->__model->validate[$fieldName])){ if(isset($this->__model->validate[$fieldName]['rule'])){ $this->__model->validate[$fieldName] = array( 'oldValidation' => $this->__model->validates[$fieldName] ); } } else { $this->__model->validate[$fieldName] = array(); } $this->__model->validate[$fieldName] = $this->arrayMerge($this->default_validations,$this->__model->validate[$fieldName]); $this->__model->validate[$fieldName] = $this->arrayMerge($options['validations'],$this->__model->validate[$fieldName]); } /** * Checks if the field was declared in the MeioUpload Behavior setup * * @author Vinicius Mendes * @return boolean * @param $model Object * @param $data Array */ function uploadCheckFieldName(&$model, $data,$other){ foreach($data as $fieldName => $field){ if(!$this->__model->validate[$fieldName]['FieldName']['check']) return true; if(isset($this->__fields[$fieldName])){ return true; } else { $this->log('UploadBehavior Error: The field "'.$fieldName.'" wasn\'t declared as part of the UploadBehavior in model "'.$model->name.'".'); return false; } } return true; } /** * Checks if the folder exists or can be created or writable. * * @author Vinicius Mendes * @return boolean * @param $model Object * @param $data Array */ function uploadCheckDir(&$model, $data){ foreach($data as $fieldName => $field){ if(!$this->__model->validate[$fieldName]['Dir']['check']) return true; $options = $this->__fields[$fieldName]; if(empty($field['remove']) || empty($field['name'])){ // Check if directory exists and create it if required if(!is_dir($options['dir'])) { if($options['create_directory']){ if(!$this->Folder->mkdir($options['dir'])) { trigger_error('UploadBehavior Error: The directory '.$options['dir'].' does not exist and cannot be created.', E_USER_WARNING); return false; } } else { trigger_error('UploadBehavior Error: The directory'.$options['dir'].' does not exist.', E_USER_WARNING); return false; } } // Check if directory is writable if(!is_writable($options['dir'])) { trigger_error('UploadBehavior Error: The directory '.$options['dir'].' isn\'t writable.', E_USER_WARNING); return false; } } } return true; } /** * Checks if the filename is not empty. * * @author Vinicius Mendes * @return boolean * @param $model Object * @param $data Array */ function uploadCheckEmpty(&$model, $data){ foreach($data as $fieldName => $field){ if(!$this->__model->validate[$fieldName]['Empty']['check']) return true; if(empty($field['remove'])){ if(!is_array($field) || empty($field['name'])){ return false; } } } return true; } /** * Checks if ocurred erros in the upload. * * @author Vinicius Mendes * @return boolean * @param $model Object * @param $data Array */ function uploadCheckUploadError(&$model, $data){ foreach($data as $fieldName => $field){ if(!$this->__model->validate[$fieldName]['UploadError']['check']) return true; if(!empty($field['name']) && $field['error'] > 0){ return false; } } return true; } /** * Checks if the file isn't bigger then the max file size option. * * @author Vinicius Mendes * @return boolean * @param $model Object * @param $data Array */ function uploadCheckMaxSize(&$model, $data){ foreach($data as $fieldName => $field){ if(!$this->__model->validate[$fieldName]['MaxSize']['check']) return true; $options = $this->__fields[$fieldName]; if(!empty($field['name']) && $field['size'] > $options['max_size']) { return false; } } return true; } /** * Checks if the file is of an allowed mime-type. * * @author Vinicius Mendes * @return boolean * @param $model Object * @param $data Array */ function uploadCheckInvalidMime(&$model, $data){ foreach($data as $fieldName => $field){ if(!$this->__model->validate[$fieldName]['InvalidMime']['check']) return true; $options = $this->__fields[$fieldName]; if(!empty($field['name']) && count($options['allowed_mime']) > 0 && !in_array($field['type'], $options['allowed_mime'])) { return false; } } return true; } /** * Checks if the file has an allowed extension. * * @author Vinicius Mendes * @return boolean * @param $model Object * @param $data Array */ function uploadCheckInvalidExt(&$model, $data){ foreach($data as $fieldName => $field){ if(!$this->__model->validate[$fieldName]['InvalidExt']['check']) return true; $options = $this->__fields[$fieldName]; if(!empty($field['name'])){ if(count($options['allowed_ext']) > 0) { $matches = 0; foreach($options['allowed_ext'] as $extension) { if(substr($field['name'],-strlen($extension)) == $extension) { $matches++; } } if($matches == 0) { return false; } } } } return true; } /** * Set a file to be removed in afterSave callback * * @author Vinicius Mendes * @return null * @param $fieldName String */ function setFileToRemove($fieldName){ $filename = $this->__model->field($fieldName); if(!empty($filename) && $filename != $this->__fields[$fieldName]['default']){ $this->__filesToRemove[] = array( 'dir' => $this->__fields[$fieldName]['dir'], 'name' => $filename ); } } /** * Include a pattern of reserved word based on a filename, and it's replacement. * * @author Vinicius Mendes * @return null * @param $default String */ function _includeDefaultReplacement($default){ $replacements = $this->replacements; list($newPattern, $ext) = $this->splitFilenameAndExt($default); if(!in_array($newPattern, $this->patterns)){ $this->patterns[] = $newPattern; $newReplacement = $newPattern; if(isset($newReplacement[1])){ if($newReplacement[1] != '_'){ $newReplacement[1] = '_'; } else { $newReplacement[1] = 'a'; } } elseif($newReplacement != '_') { $newReplacement = '_'; } else { $newReplacement = 'a'; } $this->replacements[] = $newReplacement; } } /** * Removes the bad characters from the $filename and replace reserved words. It updates the $model->data. * * @author Vinicius Mendes * @return null * @param $fieldName String */ function fixName($fieldName){ // updates the filename removing the keywords thumb and default name for the field. list($filename, $ext) = $this->splitFilenameAndExt($this->__model->data[$this->__model->name][$fieldName]['name']); $filename = str_replace($this->patterns,$this->replacements,$filename); $filename = Inflector::slug($filename); $i = 0; $newFilename = $filename; while(file_exists($this->__fields[$fieldName]['dir'].DS.$newFilename.'.'.$ext)){ $newFilename = $filename.$i; $i++; } $this->__model->data[$this->__model->name][$fieldName]['name'] = $newFilename.'.'.$ext; } /** * Splits a filename in two parts: the name and the extension. Returns an array with it respectively. * * @author Vinicius Mendes * @return Array * @param $filename String */ function splitFilenameAndExt($filename){ $parts = explode('.',$filename); $ext = $parts[count($parts)-1]; unset($parts[count($parts)-1]); $filename = implode('.',$parts); return array($filename,$ext); } /** * Sets the validation rules for each field. * * @return true * @param $model Object */ function beforeValidate(&$model) { foreach($this->__fields as $fieldName=>$options){ $this->setupValidation($fieldName, $options); } return true; } /** * Uploads the files before saving the record. * * @author Vinicius Mendes * @param $model Object */ function beforeSave(&$model) { foreach($this->__fields as $fieldName=>$options){ // if the file is marked to be deleted, use the default or set the field to null if(!empty($model->data[$model->name][$fieldName]['remove'])){ if($options['default']){ $model->data[$model->name][$fieldName] = $options['default']; } else { $model->data[$model->name][$fieldName] = null; } //if the record is already saved in the database, set the existing file to be removed after the save is sucessfull if(!empty($model->data[$model->name][$model->primaryKey])){ $this->setFileToRemove($fieldName); } continue; } // If no file has been upload, then unset the field to avoid overwriting existant file if(!isset($model->data[$model->name][$fieldName]) || !is_array($model->data[$model->name][$fieldName]) || empty($model->data[$model->name][$fieldName]['name'])){ if(!empty($model->data[$model->name][$model->primaryKey]) || !$options['default']){ unset($model->data[$model->name][$fieldName]); } else { $model->data[$model->name][$fieldName] = $options['default']; } continue; } //if the record is already saved in the database, set the existing file to be removed after the save is sucessfull if(!empty($model->data[$model->name][$model->primaryKey])){ $this->setFileToRemove($fieldName); } // Fix the filename, removing bad characters and avoiding from overwriting existing ones $this->_includeDefaultReplacement($options['default']); $this->fixName($fieldName); $saveAs = $options['dir'].DS.$model->data[$model->name][$fieldName]['name']; // Attempt to move uploaded file if(!move_uploaded_file($model->data[$model->name][$fieldName]['tmp_name'], $saveAs)){ $model->validationErrors[$field] = $moveErrorMsg; return false; } // It the file is an image, try to make the thumbnails if (count($options['allowed_ext']) > 0 && in_array($model->data[$model->name][$fieldName]['type'], array('image/jpeg', 'image/pjpeg', 'image/png'))) { foreach ($options['thumbsizes'] as $key => $value) { // If a 'normal' thumbnail is set, then it will overwrite the original file if($key == 'normal'){ $thumbSaveAs = $saveAs; // Otherwise, set the thumb filename to thumb.$key.$filename.$ext } else { $thumbSaveAs = $options['dir'].DS.'thumb.'.$key.'.'.$model->data[$model->name][$fieldName]['name']; } $this->createthumb($saveAs, $thumbSaveAs, $value['width'], $value['height']); } } // Update model data $model->data[$model->name][$options['fields']['dir']] = $options['dir']; $model->data[$model->name][$options['fields']['mimetype']] = $model->data[$model->name][$fieldName]['type']; $model->data[$model->name][$options['fields']['filesize']] = $model->data[$model->name][$fieldName]['size']; $model->data[$model->name][$fieldName] = $model->data[$model->name][$fieldName]['name']; } return true; } /** * Deletes the files marked to be deleted in the save method. A file can be marked to be deleted if it is overwriten by another or if the user mark it to be deleted. * * @author Vinicius Mendes * @param $model Object */ function afterSave(&$model) { foreach($this->__filesToRemove as $file){ if($file['name']) $this->_deleteFiles($file['name'], $file['dir']); } // Reset the filesToRemove array $this->__filesToRemove = array(); } /** * Deletes all files associated with the record beforing delete it. * * @author Vinicius Mendes * @param $model Object */ function beforeDelete(&$model) { $model->read(null, $model->id); if(isset($model->data)) { foreach($this->__fields as $field=>$options) { $file = $model->data[$model->name][$field]; if($file && $file != $options['default']) $this->_deleteFiles($file, $options['dir']); } } return true; } /** * Delete the $filename inside the $dir and the thumbnails. * Returns true if the file is deleted and false otherwise. * * @author Vinicius Mendes * @return boolean * @param $filename Object * @param $dir Object */ function _deleteFiles($filename, $dir){ $saveAs = $dir . DS . $filename; if(is_file($saveAs) && !unlink($saveAs)) { return false; } $folder = &new Folder($dir); $files = $folder->find('thumb\.[a-zA-Z0-9]+\.'.$filename); foreach($files as $f) unlink($dir.DS.$f); return true; } // Function to create thumbnail image // This requires Nate Constant's thumbnail generator for PHPThumb // http://bakery.cakephp.org/articles/view/phpthumb-component // Thi function is original from digital spaghetti's version function createthumb($name, $filename, $new_w, $new_h) { App::import('Component', 'Thumb'); $system = explode(".", $name); if (preg_match("/jpg|jpeg/", $system[1])) { $src_img = imagecreatefromjpeg($name); } if (preg_match("/png/", $system[1])) { $src_img = imagecreatefrompng($name); } $old_x = imagesx($src_img); $old_y = imagesy($src_img); if ($old_x >= $old_y) { $thumb_w = $new_w; $ratio = $old_y / $old_x; $thumb_h = $ratio * $new_w; } else if ($old_x < $old_y) { $thumb_h = $new_h; $ratio = $old_x / $old_y; $thumb_w = $ratio * $new_h; } $dst_img = imagecreatetruecolor($thumb_w, $thumb_h); imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $thumb_w, $thumb_h, $old_x, $old_y); if (preg_match("/png/", $system[1])) { imagepng($dst_img, $filename); } else { imagejpeg($dst_img, $filename); } imagedestroy($dst_img); imagedestroy($src_img); } } ?>
0001-bee
trunk/cakephp2/7010/Model/Behavior/meio_upload.php
PHP
gpl3
24,182
<?php /* * jQuery File Upload Plugin PHP Example 5.2.9 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://creativecommons.org/licenses/MIT/ */ class UploadBehavior extends ModelBehavior { private $options; function __construct($options=null) { $this->options = array( 'script_url' => $_SERVER['PHP_SELF'], 'upload_dir' => dirname(__FILE__).DS.'img'.DS.'files'.DS, 'upload_url' => dirname($_SERVER['PHP_SELF']).DS.'img'.DS.'files'.DS, 'param_name' => 'files', // The php.ini settings upload_max_filesize and post_max_size // take precedence over the following max_file_size setting: 'max_file_size' => null, 'min_file_size' => 1, 'accept_file_types' => '/.+$/i', 'max_number_of_files' => null, 'discard_aborted_uploads' => true, 'image_versions' => array( // Uncomment the following version to restrict the size of // uploaded images. You can also add additional versions with // their own upload directories: /* 'large' => array( 'upload_dir' => dirname(__FILE__).'/files/', 'upload_url' => dirname($_SERVER['PHP_SELF']).'/files/', 'max_width' => 1920, 'max_height' => 1200 ), */ 'thumbnail' => array( 'upload_dir' => dirname(__FILE__).'/img/thumbnails/', 'upload_url' => dirname($_SERVER['PHP_SELF']).'/img/thumbnails/', 'max_width' => 80, 'max_height' => 80 ) ) ); if ($options) { $this->options = array_replace_recursive($this->options, $options); } } private function get_file_object($file_name) { $file_path = $this->options['upload_dir'].$file_name; if (is_file($file_path) && $file_name[0] !== '.') { $file = new stdClass(); $file->name = $file_name; $file->size = filesize($file_path); $file->url = $this->options['upload_url'].rawurlencode($file->name); foreach($this->options['image_versions'] as $version => $options) { if (is_file($options['upload_dir'].$file_name)) { $file->{$version.'_url'} = $options['upload_url'] .rawurlencode($file->name); } } $file->delete_url = $this->options['script_url'] .'?file='.rawurlencode($file->name); $file->delete_type = 'DELETE'; return $file; } return null; } private function get_file_objects() { return array_values(array_filter(array_map( array($this, 'get_file_object'), scandir($this->options['upload_dir']) ))); } private function create_scaled_image($file_name, $options) { $file_path = $this->options['upload_dir'].$file_name; $new_file_path = $options['upload_dir'].$file_name; list($img_width, $img_height) = @getimagesize($file_path); if (!$img_width || !$img_height) { return false; } $scale = min( $options['max_width'] / $img_width, $options['max_height'] / $img_height ); if ($scale > 1) { $scale = 1; } $new_width = $img_width * $scale; $new_height = $img_height * $scale; $new_img = @imagecreatetruecolor($new_width, $new_height); switch (strtolower(substr(strrchr($file_name, '.'), 1))) { case 'jpg': case 'jpeg': $src_img = @imagecreatefromjpeg($file_path); $write_image = 'imagejpeg'; break; case 'gif': @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0)); $src_img = @imagecreatefromgif($file_path); $write_image = 'imagegif'; break; case 'png': @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0)); @imagealphablending($new_img, false); @imagesavealpha($new_img, true); $src_img = @imagecreatefrompng($file_path); $write_image = 'imagepng'; break; default: $src_img = $image_method = null; } $success = $src_img && @imagecopyresampled( $new_img, $src_img, 0, 0, 0, 0, $new_width, $new_height, $img_width, $img_height ) && $write_image($new_img, $new_file_path); // Free up memory (imagedestroy does not delete files): @imagedestroy($src_img); @imagedestroy($new_img); return $success; } private function has_error($uploaded_file, $file, $error) { if ($error) { return $error; } if (!preg_match($this->options['accept_file_types'], $file->name)) { return 'acceptFileTypes'; } if ($uploaded_file && is_uploaded_file($uploaded_file)) { $file_size = filesize($uploaded_file); } else { $file_size = $_SERVER['CONTENT_LENGTH']; } if ($this->options['max_file_size'] && ( $file_size > $this->options['max_file_size'] || $file->size > $this->options['max_file_size']) ) { return 'maxFileSize'; } if ($this->options['min_file_size'] && $file_size < $this->options['min_file_size']) { return 'minFileSize'; } if (is_int($this->options['max_number_of_files']) && ( count($this->get_file_objects()) >= $this->options['max_number_of_files']) ) { return 'maxNumberOfFiles'; } return $error; } private function trim_file_name($name, $type) { // Remove path information and dots around the filename, to prevent uploading // into different directories or replacing hidden system files. // Also remove control characters and spaces (\x00..\x20) around the filename: $file_name = trim(basename(stripslashes($name)), ".\x00..\x20"); // Add missing file extension for known image types: if (strpos($file_name, '.') === false && preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) { $file_name .= '.'.$matches[1]; } return $file_name; } private function handle_file_upload($uploaded_file, $name, $size, $type, $error) { $file = new stdClass(); $file->name = $this->trim_file_name($name, $type); $file->size = intval($size); $file->type = $type; $error = $this->has_error($uploaded_file, $file, $error); if (!$error && $file->name) { $file_path = $this->options['upload_dir'].$file->name; $append_file = !$this->options['discard_aborted_uploads'] && is_file($file_path) && $file->size > filesize($file_path); clearstatcache(); if ($uploaded_file && is_uploaded_file($uploaded_file)) { // multipart/formdata uploads (POST method uploads) if ($append_file) { file_put_contents( $file_path, fopen($uploaded_file, 'r'), FILE_APPEND ); } else { move_uploaded_file($uploaded_file, $file_path); } } else { // Non-multipart uploads (PUT method support) file_put_contents( $file_path, fopen('php://input', 'r'), $append_file ? FILE_APPEND : 0 ); } $file_size = filesize($file_path); if ($file_size === $file->size) { $file->url = $this->options['upload_url'].rawurlencode($file->name); foreach($this->options['image_versions'] as $version => $options) { if ($this->create_scaled_image($file->name, $options)) { $file->{$version.'_url'} = $options['upload_url'] .rawurlencode($file->name); } } } else if ($this->options['discard_aborted_uploads']) { unlink($file_path); $file->error = 'abort'; } $file->size = $file_size; $file->delete_url = $this->options['script_url'] .'?file='.rawurlencode($file->name); $file->delete_type = 'DELETE'; } else { $file->error = $error; } return $file; } public function get() { $file_name = isset($_REQUEST['file']) ? basename(stripslashes($_REQUEST['file'])) : null; if ($file_name) { $info = $this->get_file_object($file_name); } else { $info = $this->get_file_objects(); } header('Content-type: application/json'); echo json_encode($info); } public function post() { $upload = isset($_FILES[$this->options['param_name']]) ? $_FILES[$this->options['param_name']] : null; $info = array(); if ($upload && is_array($upload['tmp_name'])) { foreach ($upload['tmp_name'] as $index => $value) { $info[] = $this->handle_file_upload( $upload['tmp_name'][$index], isset($_SERVER['HTTP_X_FILE_NAME']) ? $_SERVER['HTTP_X_FILE_NAME'] : $upload['name'][$index], isset($_SERVER['HTTP_X_FILE_SIZE']) ? $_SERVER['HTTP_X_FILE_SIZE'] : $upload['size'][$index], isset($_SERVER['HTTP_X_FILE_TYPE']) ? $_SERVER['HTTP_X_FILE_TYPE'] : $upload['type'][$index], $upload['error'][$index] ); } } elseif ($upload) { $info[] = $this->handle_file_upload( $upload['tmp_name'], isset($_SERVER['HTTP_X_FILE_NAME']) ? $_SERVER['HTTP_X_FILE_NAME'] : $upload['name'], isset($_SERVER['HTTP_X_FILE_SIZE']) ? $_SERVER['HTTP_X_FILE_SIZE'] : $upload['size'], isset($_SERVER['HTTP_X_FILE_TYPE']) ? $_SERVER['HTTP_X_FILE_TYPE'] : $upload['type'], $upload['error'] ); } header('Vary: Accept'); if (isset($_SERVER['HTTP_ACCEPT']) && (strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false)) { header('Content-type: application/json'); } else { header('Content-type: text/plain'); } echo json_encode($info); } public function delete() { $file_name = isset($_REQUEST['file']) ? basename(stripslashes($_REQUEST['file'])) : null; $file_path = $this->options['upload_dir'].$file_name; $success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path); if ($success) { foreach($this->options['image_versions'] as $version => $options) { $file = $options['upload_dir'].$file_name; if (is_file($file)) { unlink($file); } } } header('Content-type: application/json'); echo json_encode($success); } } ?>
0001-bee
trunk/cakephp2/7010/Model/Behavior/upload.php
PHP
gpl3
11,966
<?php App::uses('AppModel', 'Model'); /** * Photo Model * * @property PhotoGroup $PhotoGroup */ class Photo extends AppModel { /** * Validation rules * * @var array */ var $actsAs = array('Upload'); public $validate = array( 'photo_group_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 ), ), ); //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( 'PhotoGroup' => array( 'className' => 'PhotoGroup', 'foreignKey' => 'photo_group_id', 'conditions' => '', 'fields' => '', 'order' => '' ) ); }
0001-bee
trunk/cakephp2/7010/Model/Photo.php
PHP
gpl3
1,182
<?php App::uses('AppModel', 'Model'); /** * User Model * */ class User extends AppModel { /** * Validation rules * * @var array */ public function beforeSave() { if (isset($this->data[$this->alias]['password'])) { $this->data[$this->alias]['password'] = AuthComponent::password($this->data[$this->alias]['password']); } return true; } public $validate = array( 'username' => 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 ), ), '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 ), ), ); }
0001-bee
trunk/cakephp2/7010/Model/User.php
PHP
gpl3
1,322
<?php /** * Application model for Cake. * * This file is application-wide model file. You can put all * application-wide model-related methods here. * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, 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 MIT License (http://www.opensource.org/licenses/mit-license.php) */ 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 { }
0001-bee
trunk/cakephp2/7010/Model/AppModel.php
PHP
gpl3
961
<?php App::uses('AppModel', 'Model'); /** * Group Model * * @property User $User * @property Photo $Photo */ class Group extends AppModel { /** * Validation rules * * @var array */ public $validate = array( '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 ), ), ); //The Associations below have been created with all possible keys, those that are not needed can be removed /** * hasMany associations * * @var array */ public $hasMany = array( 'User' => array( 'className' => 'User', 'foreignKey' => 'group_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ); /** * hasAndBelongsToMany associations * * @var array */ public $hasAndBelongsToMany = array( 'Photo' => array( 'className' => 'Photo', 'joinTable' => 'photo_groups', 'foreignKey' => 'group_id', 'associationForeignKey' => 'photo_id', 'unique' => true, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => '' ) ); }
0001-bee
trunk/cakephp2/7010/Model/Group.php
PHP
gpl3
1,540
<?php App::uses('AppModel', 'Model'); /** * PhotoGroup Model * * @property Photo $Photo */ class PhotoGroup extends AppModel { //The Associations below have been created with all possible keys, those that are not needed can be removed /** * hasMany associations * * @var array */ public $hasMany = array( 'Photo' => array( 'className' => 'Photo', 'foreignKey' => 'photo_group_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) ); }
0001-bee
trunk/cakephp2/7010/Model/PhotoGroup.php
PHP
gpl3
637
<?php /** * Scaffold. * * Automatic forms and actions generation for rapid web application development. * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package Cake.View * @since Cake v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::uses('ThemeView', 'View'); /** * ScaffoldView provides specific view file loading features for scaffolded views. * * @package Cake.View */ class ScaffoldView extends ThemeView { /** * Override _getViewFileName Appends special scaffolding views in. * * @param string $name name of the view file to get. * @return string action * @throws MissingViewException */ protected function _getViewFileName($name = null) { if ($name === null) { $name = $this->action; } $name = Inflector::underscore($name); $prefixes = Configure::read('Routing.prefixes'); if (!empty($prefixes)) { foreach ($prefixes as $prefix) { if (strpos($name, $prefix . '_') !== false) { $name = substr($name, strlen($prefix) + 1); break; } } } if ($name === 'add' || $name == 'edit') { $name = 'form'; } $scaffoldAction = 'scaffold.' . $name; if (!is_null($this->subDir)) { $subDir = strtolower($this->subDir) . DS; } else { $subDir = null; } $names[] = $this->viewPath . DS . $subDir . $scaffoldAction; $names[] = 'Scaffolds' . DS . $subDir . $name; $paths = $this->_paths($this->plugin); $exts = array($this->ext); if ($this->ext !== '.ctp') { array_push($exts, '.ctp'); } foreach ($exts as $ext) { foreach ($paths as $path) { foreach ($names as $name) { if (file_exists($path . $name . $ext)) { return $path . $name . $ext; } } } } if ($name === 'Scaffolds' . DS . $subDir . 'error') { return CAKE . 'View' . DS . 'Errors' . DS . 'scaffold_error.ctp'; } throw new MissingViewException($paths[0] . $name . $this->ext); } }
0001-bee
trunk/cakephp2/lib/Cake/View/ScaffoldView.php
PHP
gpl3
2,325
<?php /** * A custom view class that is used for themeing * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package Cake.View * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::uses('View', 'View'); /** * Theme view class * * Allows the creation of multiple themes to be used in an app. Theme views are regular view files * that can provide unique HTML and static assets. If theme views are not found for the current view * the default app view files will be used. You can set `$this->theme` and `$this->viewClass = 'Theme'` * in your Controller to use the ThemeView. * * Example of theme path with `$this->theme = 'super_hot';` Would be `app/View/Themed/SuperHot/Posts` * * @package Cake.View */ class ThemeView extends View { /** * Constructor for ThemeView sets $this->theme. * * @param Controller $controller Controller object to be rendered. */ public function __construct($controller) { parent::__construct($controller); if ($controller) { $this->theme = $controller->theme; } } /** * Return all possible paths to find view files in order * * @param string $plugin The name of the plugin views are being found for. * @param boolean $cached Set to true to force dir scan. * @return array paths * @todo Make theme path building respect $cached parameter. */ protected function _paths($plugin = null, $cached = true) { $paths = parent::_paths($plugin, $cached); $themePaths = array(); if (!empty($this->theme)) { $count = count($paths); for ($i = 0; $i < $count; $i++) { if (strpos($paths[$i], DS . 'Plugin' . DS) === false && strpos($paths[$i], DS . 'Cake' . DS . 'View') === false) { if ($plugin) { $themePaths[] = $paths[$i] . 'Themed'. DS . $this->theme . DS . 'Plugin' . DS . $plugin . DS; } $themePaths[] = $paths[$i] . 'Themed'. DS . $this->theme . DS; } } $paths = array_merge($themePaths, $paths); } return $paths; } }
0001-bee
trunk/cakephp2/lib/Cake/View/ThemeView.php
PHP
gpl3
2,410
<?php /** * Backend for helpers. * * Internal methods for the Helpers. * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package Cake.View * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::uses('Router', 'Routing'); /** * Abstract base class for all other Helpers in CakePHP. * Provides common methods and features. * * @package Cake.View */ class Helper extends Object { /** * List of helpers used by this helper * * @var array */ public $helpers = array(); /** * A helper lookup table used to lazy load helper objects. * * @var array */ protected $_helperMap = array(); /** * The current theme name if any. * * @var string */ public $theme = null; /** * Request object * * @var CakeRequest */ public $request = null; /** * Plugin path * * @var string */ public $plugin = null; /** * Holds the fields array('field_name' => array('type'=> 'string', 'length'=> 100), * primaryKey and validates array('field_name') * * @var array */ public $fieldset = array(); /** * Holds tag templates. * * @var array */ public $tags = array(); /** * Holds the content to be cleaned. * * @var mixed */ protected $_tainted = null; /** * Holds the cleaned content. * * @var mixed */ protected $_cleaned = null; /** * The View instance this helper is attached to * * @var View */ protected $_View; /** * A list of strings that should be treated as suffixes, or * sub inputs for a parent input. This is used for date/time * inputs primarily. * * @var array */ protected $_fieldSuffixes = array( 'year', 'month', 'day', 'hour', 'min', 'second', 'meridian' ); /** * The name of the current model entities are in scope of. * * @see Helper::setEntity() * @var string */ protected $_modelScope; /** * The name of the current model association entities are in scope of. * * @see Helper::setEntity() * @var string */ protected $_association; /** * The dot separated list of elements the current field entity is for. * * @see Helper::setEntity() * @var string */ protected $_entityPath; /** * Default Constructor * * @param View $View The View this helper is being attached to. * @param array $settings Configuration settings for the helper. */ public function __construct(View $View, $settings = array()) { $this->_View = $View; $this->request = $View->request; if (!empty($this->helpers)) { $this->_helperMap = ObjectCollection::normalizeObjectArray($this->helpers); } } /** * Provide non fatal errors on missing method calls. * * @param string $method Method to invoke * @param array $params Array of params for the method. * @return void */ public function __call($method, $params) { trigger_error(__d('cake_dev', 'Method %1$s::%2$s does not exist', get_class($this), $method), E_USER_WARNING); } /** * Lazy loads helpers. Provides access to deprecated request properties as well. * * @param string $name Name of the property being accessed. * @return mixed Helper or property found at $name */ public function __get($name) { if (isset($this->_helperMap[$name]) && !isset($this->{$name})) { $settings = array_merge((array)$this->_helperMap[$name]['settings'], array('enabled' => false)); $this->{$name} = $this->_View->loadHelper($this->_helperMap[$name]['class'], $settings); } if (isset($this->{$name})) { return $this->{$name}; } switch ($name) { case 'base': case 'here': case 'webroot': case 'data': return $this->request->{$name}; case 'action': return isset($this->request->params['action']) ? $this->request->params['action'] : ''; case 'params': return $this->request; } } /** * Provides backwards compatiblity access for setting values to the request object. * * @param string $name Name of the property being accessed. * @param mixed $value * @return mixed Return the $value */ public function __set($name, $value) { switch ($name) { case 'base': case 'here': case 'webroot': case 'data': return $this->request->{$name} = $value; case 'action': return $this->request->params['action'] = $value; } return $this->{$name} = $value; } /** * Finds URL for specified action. * * Returns a URL pointing at the provided parameters. * * @param mixed $url Either a relative string url like `/products/view/23` or * an array of url parameters. Using an array for urls will allow you to leverage * the reverse routing features of CakePHP. * @param boolean $full If true, the full base URL will be prepended to the result * @return string Full translated URL with base path. * @link http://book.cakephp.org/2.0/en/views/helpers.html */ public function url($url = null, $full = false) { return h(Router::url($url, $full)); } /** * Checks if a file exists when theme is used, if no file is found default location is returned * * @param string $file The file to create a webroot path to. * @return string Web accessible path to file. */ public function webroot($file) { $asset = explode('?', $file); $asset[1] = isset($asset[1]) ? '?' . $asset[1] : null; $webPath = "{$this->request->webroot}" . $asset[0]; $file = $asset[0]; if (!empty($this->theme)) { $file = trim($file, '/'); $theme = $this->theme . '/'; if (DS === '\\') { $file = str_replace('/', '\\', $file); } if (file_exists(Configure::read('App.www_root') . 'theme' . DS . $this->theme . DS . $file)) { $webPath = "{$this->request->webroot}theme/" . $theme . $asset[0]; } else { $themePath = App::themePath($this->theme); $path = $themePath . 'webroot' . DS . $file; if (file_exists($path)) { $webPath = "{$this->request->webroot}theme/" . $theme . $asset[0]; } } } if (strpos($webPath, '//') !== false) { return str_replace('//', '/', $webPath . $asset[1]); } return $webPath . $asset[1]; } /** * Adds a timestamp to a file based resource based on the value of `Asset.timestamp` in * Configure. If Asset.timestamp is true and debug > 0, or Asset.timestamp == 'force' * a timestamp will be added. * * @param string $path The file path to timestamp, the path must be inside WWW_ROOT * @return string Path with a timestamp added, or not. */ public function assetTimestamp($path) { $stamp = Configure::read('Asset.timestamp'); $timestampEnabled = $stamp === 'force' || ($stamp === true && Configure::read('debug') > 0); if ($timestampEnabled && strpos($path, '?') === false) { $filepath = preg_replace('/^' . preg_quote($this->request->webroot, '/') . '/', '', $path); $webrootPath = WWW_ROOT . str_replace('/', DS, $filepath); if (file_exists($webrootPath)) { return $path . '?' . @filemtime($webrootPath); } $segments = explode('/', ltrim($filepath, '/')); if ($segments[0] === 'theme') { $theme = $segments[1]; unset($segments[0], $segments[1]); $themePath = App::themePath($theme) . 'webroot' . DS . implode(DS, $segments); return $path . '?' . @filemtime($themePath); } else { $plugin = Inflector::camelize($segments[0]); if (CakePlugin::loaded($plugin)) { unset($segments[0]); $pluginPath = CakePlugin::path($plugin) . 'webroot' . DS . implode(DS, $segments); return $path . '?' . @filemtime($pluginPath); } } } return $path; } /** * Used to remove harmful tags from content. Removes a number of well known XSS attacks * from content. However, is not guaranteed to remove all possibilities. Escaping * content is the best way to prevent all possible attacks. * * @param mixed $output Either an array of strings to clean or a single string to clean. * @return string|array cleaned content for output */ public function clean($output) { $this->_reset(); if (empty($output)) { return null; } if (is_array($output)) { foreach ($output as $key => $value) { $return[$key] = $this->clean($value); } return $return; } $this->_tainted = $output; $this->_clean(); return $this->_cleaned; } /** * Returns a space-delimited string with items of the $options array. If a * key of $options array happens to be one of: * * - 'compact' * - 'checked' * - 'declare' * - 'readonly' * - 'disabled' * - 'selected' * - 'defer' * - 'ismap' * - 'nohref' * - 'noshade' * - 'nowrap' * - 'multiple' * - 'noresize' * * And its value is one of: * * - '1' (string) * - 1 (integer) * - true (boolean) * - 'true' (string) * * Then the value will be reset to be identical with key's name. * If the value is not one of these 3, the parameter is not output. * * 'escape' is a special option in that it controls the conversion of * attributes to their html-entity encoded equivalents. Set to false to disable html-encoding. * * If value for any option key is set to `null` or `false`, that option will be excluded from output. * * @param array $options Array of options. * @param array $exclude Array of options to be excluded, the options here will not be part of the return. * @param string $insertBefore String to be inserted before options. * @param string $insertAfter String to be inserted after options. * @return string Composed attributes. * @deprecated This method has been moved to HtmlHelper */ protected function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { if (!is_string($options)) { $options = (array) $options + array('escape' => true); if (!is_array($exclude)) { $exclude = array(); } $exclude = array('escape' => true) + array_flip($exclude); $escape = $options['escape']; $attributes = array(); foreach ($options as $key => $value) { if (!isset($exclude[$key]) && $value !== false && $value !== null) { $attributes[] = $this->_formatAttribute($key, $value, $escape); } } $out = implode(' ', $attributes); } else { $out = $options; } return $out ? $insertBefore . $out . $insertAfter : ''; } /** * Formats an individual attribute, and returns the string value of the composed attribute. * Works with minimized attributes that have the same value as their name such as 'disabled' and 'checked' * * @param string $key The name of the attribute to create * @param string $value The value of the attribute to create. * @param boolean $escape Define if the value must be escaped * @return string The composed attribute. * @deprecated This method has been moved to HtmlHelper */ protected function _formatAttribute($key, $value, $escape = true) { $attribute = ''; if (is_array($value)) { $value = ''; } if (is_numeric($key)) { $attribute = sprintf($this->_minimizedAttributeFormat, $value, $value); } elseif (in_array($key, $this->_minimizedAttributes)) { if ($value === 1 || $value === true || $value === 'true' || $value === '1' || $value == $key) { $attribute = sprintf($this->_minimizedAttributeFormat, $key, $key); } } else { $attribute = sprintf($this->_attributeFormat, $key, ($escape ? h($value) : $value)); } return $attribute; } /** * Sets this helper's model and field properties to the dot-separated value-pair in $entity. * * @param mixed $entity A field name, like "ModelName.fieldName" or "ModelName.ID.fieldName" * @param boolean $setScope Sets the view scope to the model specified in $tagValue * @return void */ public function setEntity($entity, $setScope = false) { if ($entity === null) { $this->_modelScope = false; } if ($setScope === true) { $this->_modelScope = $entity; } $parts = array_values(Set::filter(explode('.', $entity), true)); if (empty($parts)) { return; } $count = count($parts); $lastPart = isset($parts[$count - 1]) ? $parts[$count - 1] : null; // Either 'body' or 'date.month' type inputs. if ( ($count === 1 && $this->_modelScope && $setScope == false) || ( $count === 2 && in_array($lastPart, $this->_fieldSuffixes) && $this->_modelScope && $parts[0] !== $this->_modelScope ) ) { $entity = $this->_modelScope . '.' . $entity; } // 0.name, 0.created.month style inputs. if ( $count >= 2 && is_numeric($parts[0]) && !is_numeric($parts[1]) && $this->_modelScope ) { $entity = $this->_modelScope . '.' . $entity; } $this->_association = null; // habtm models are special if ( isset($this->fieldset[$this->_modelScope]['fields'][$parts[0]]['type']) && $this->fieldset[$this->_modelScope]['fields'][$parts[0]]['type'] === 'multiple' ) { $this->_association = $parts[0]; $entity = $parts[0] . '.' . $parts[0]; } else { // check for associated model. $reversed = array_reverse($parts); foreach ($reversed as $part) { if ( !isset($this->fieldset[$this->_modelScope]['fields'][$part]) && preg_match('/^[A-Z]/', $part) ) { $this->_association = $part; break; } } } $this->_entityPath = $entity; return; } /** * Returns the entity reference of the current context as an array of identity parts * * @return array An array containing the identity elements of an entity */ public function entity() { return explode('.', $this->_entityPath); } /** * Gets the currently-used model of the rendering context. * * @return string */ public function model() { if ($this->_association) { return $this->_association; } return $this->_modelScope; } /** * Gets the currently-used model field of the rendering context. * * @return string */ public function field() { $entity = $this->entity(); $count = count($entity); $last = $entity[$count - 1]; if (in_array($last, $this->_fieldSuffixes)) { $last = isset($entity[$count - 2]) ? $entity[$count - 2] : null; } return $last; } /** * Generates a DOM ID for the selected element, if one is not set. * Uses the current View::entity() settings to generate a CamelCased id attribute. * * @param mixed $options Either an array of html attributes to add $id into, or a string * with a view entity path to get a domId for. * @param string $id The name of the 'id' attribute. * @return mixed If $options was an array, an array will be returned with $id set. If a string * was supplied, a string will be returned. * @todo Refactor this method to not have as many input/output options. */ public function domId($options = null, $id = 'id') { if (is_array($options) && array_key_exists($id, $options) && $options[$id] === null) { unset($options[$id]); return $options; } elseif (!is_array($options) && $options !== null) { $this->setEntity($options); return $this->domId(); } $entity = $this->entity(); $model = array_shift($entity); $dom = $model . join('', array_map(array('Inflector', 'camelize'), $entity)); if (is_array($options) && !array_key_exists($id, $options)) { $options[$id] = $dom; } elseif ($options === null) { return $dom; } return $options; } /** * Gets the input field name for the current tag. Creates input name attributes * using CakePHP's data[Model][field] formatting. * * @param mixed $options If an array, should be an array of attributes that $key needs to be added to. * If a string or null, will be used as the View entity. * @param string $field * @param string $key The name of the attribute to be set, defaults to 'name' * @return mixed If an array was given for $options, an array with $key set will be returned. * If a string was supplied a string will be returned. * @todo Refactor this method to not have as many input/output options. */ protected function _name($options = array(), $field = null, $key = 'name') { if ($options === null) { $options = array(); } elseif (is_string($options)) { $field = $options; $options = 0; } if (!empty($field)) { $this->setEntity($field); } if (is_array($options) && array_key_exists($key, $options)) { return $options; } switch ($field) { case '_method': $name = $field; break; default: $name = 'data[' . implode('][', $this->entity()) . ']'; break; } if (is_array($options)) { $options[$key] = $name; return $options; } else { return $name; } } /** * Gets the data for the current tag * * @param mixed $options If an array, should be an array of attributes that $key needs to be added to. * If a string or null, will be used as the View entity. * @param string $field * @param string $key The name of the attribute to be set, defaults to 'value' * @return mixed If an array was given for $options, an array with $key set will be returned. * If a string was supplied a string will be returned. * @todo Refactor this method to not have as many input/output options. */ public function value($options = array(), $field = null, $key = 'value') { if ($options === null) { $options = array(); } elseif (is_string($options)) { $field = $options; $options = 0; } if (is_array($options) && isset($options[$key])) { return $options; } if (!empty($field)) { $this->setEntity($field); } $result = null; $data = $this->request->data; $entity = $this->entity(); if (!empty($data) && !empty($entity)) { $result = Set::extract(implode('.', $entity), $data); } $habtmKey = $this->field(); if (empty($result) && isset($data[$habtmKey][$habtmKey]) && is_array($data[$habtmKey])) { $result = $data[$habtmKey][$habtmKey]; } elseif (empty($result) && isset($data[$habtmKey]) && is_array($data[$habtmKey])) { if (ClassRegistry::isKeySet($habtmKey)) { $model = ClassRegistry::getObject($habtmKey); $result = $this->_selectedArray($data[$habtmKey], $model->primaryKey); } } if (is_array($options)) { if ($result === null && isset($options['default'])) { $result = $options['default']; } unset($options['default']); } if (is_array($options)) { $options[$key] = $result; return $options; } else { return $result; } } /** * Sets the defaults for an input tag. Will set the * name, value, and id attributes for an array of html attributes. Will also * add a 'form-error' class if the field contains validation errors. * * @param string $field The field name to initialize. * @param array $options Array of options to use while initializing an input field. * @return array Array options for the form input. */ protected function _initInputField($field, $options = array()) { if ($field !== null) { $this->setEntity($field); } $options = (array)$options; $options = $this->_name($options); $options = $this->value($options); $options = $this->domId($options); if ($this->tagIsInvalid() !== false) { $options = $this->addClass($options, 'form-error'); } return $options; } /** * Adds the given class to the element options * * @param array $options Array options/attributes to add a class to * @param string $class The classname being added. * @param string $key the key to use for class. * @return array Array of options with $key set. */ public function addClass($options = array(), $class = null, $key = 'class') { if (isset($options[$key]) && trim($options[$key]) != '') { $options[$key] .= ' ' . $class; } else { $options[$key] = $class; } return $options; } /** * Returns a string generated by a helper method * * This method can be overridden in subclasses to do generalized output post-processing * * @param string $str String to be output. * @return string * @deprecated This method will be removed in future versions. */ public function output($str) { return $str; } /** * Before render callback. beforeRender is called before the view file is rendered. * * Overridden in subclasses. * * @param string $viewFile The view file that is going to be rendered * @return void */ public function beforeRender($viewFile) { } /** * After render callback. afterRender is called after the view file is rendered * but before the layout has been rendered. * * Overridden in subclasses. * * @param string $viewFile The view file that was rendered. * @return void */ public function afterRender($viewFile) { } /** * Before layout callback. beforeLayout is called before the layout is rendered. * * Overridden in subclasses. * * @param string $layoutFile The layout about to be rendered. * @return void */ public function beforeLayout($layoutFile) { } /** * After layout callback. afterLayout is called after the layout has rendered. * * Overridden in subclasses. * * @param string $layoutFile The layout file that was rendered. * @return void */ public function afterLayout($layoutFile) { } /** * Transforms a recordset from a hasAndBelongsToMany association to a list of selected * options for a multiple select element * * @param mixed $data * @param string $key * @return array */ protected function _selectedArray($data, $key = 'id') { if (!is_array($data)) { $model = $data; if (!empty($this->request->data[$model][$model])) { return $this->request->data[$model][$model]; } if (!empty($this->request->data[$model])) { $data = $this->request->data[$model]; } } $array = array(); if (!empty($data)) { foreach ($data as $row) { if (isset($row[$key])) { $array[$row[$key]] = $row[$key]; } } } return empty($array) ? null : $array; } /** * Resets the vars used by Helper::clean() to null * * @return void */ protected function _reset() { $this->_tainted = null; $this->_cleaned = null; } /** * Removes harmful content from output * * @return void */ protected function _clean() { if (get_magic_quotes_gpc()) { $this->_cleaned = stripslashes($this->_tainted); } else { $this->_cleaned = $this->_tainted; } $this->_cleaned = str_replace(array("&amp;", "&lt;", "&gt;"), array("&amp;amp;", "&amp;lt;", "&amp;gt;"), $this->_cleaned); $this->_cleaned = preg_replace('#(&\#*\w+)[\x00-\x20]+;#u', "$1;", $this->_cleaned); $this->_cleaned = preg_replace('#(&\#x*)([0-9A-F]+);*#iu', "$1$2;", $this->_cleaned); $this->_cleaned = html_entity_decode($this->_cleaned, ENT_COMPAT, "UTF-8"); $this->_cleaned = preg_replace('#(<[^>]+[\x00-\x20\"\'\/])(on|xmlns)[^>]*>#iUu', "$1>", $this->_cleaned); $this->_cleaned = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)[\\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu', '$1=$2nojavascript...', $this->_cleaned); $this->_cleaned = preg_replace('#([a-z]*)[\x00-\x20]*=([\'\"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu', '$1=$2novbscript...', $this->_cleaned); $this->_cleaned = preg_replace('#([a-z]*)[\x00-\x20]*=*([\'\"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#iUu','$1=$2nomozbinding...', $this->_cleaned); $this->_cleaned = preg_replace('#([a-z]*)[\x00-\x20]*=([\'\"]*)[\x00-\x20]*data[\x00-\x20]*:#Uu', '$1=$2nodata...', $this->_cleaned); $this->_cleaned = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*expression[\x00-\x20]*\([^>]*>#iU', "$1>", $this->_cleaned); $this->_cleaned = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*behaviour[\x00-\x20]*\([^>]*>#iU', "$1>", $this->_cleaned); $this->_cleaned = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*>#iUu', "$1>", $this->_cleaned); $this->_cleaned = preg_replace('#</*\w+:\w[^>]*>#i', "", $this->_cleaned); do { $oldstring = $this->_cleaned; $this->_cleaned = preg_replace('#</*(applet|meta|xml|blink|link|style|script|embed|object|iframe|frame|frameset|ilayer|layer|bgsound|title|base)[^>]*>#i', "", $this->_cleaned); } while ($oldstring != $this->_cleaned); $this->_cleaned = str_replace(array("&amp;", "&lt;", "&gt;"), array("&amp;amp;", "&amp;lt;", "&amp;gt;"), $this->_cleaned); } }
0001-bee
trunk/cakephp2/lib/Cake/View/Helper.php
PHP
gpl3
24,384
<?php /** * Helpers collection is used as a registry for loaded helpers and handles loading * and constructing helper class objects. * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package Cake.View * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::uses('ObjectCollection', 'Utility'); class HelperCollection extends ObjectCollection { /** * View object to use when making helpers. * * @var View */ protected $_View; /** * Constructor * * @param View $view */ public function __construct(View $view) { $this->_View = $view; } /** * Loads/constructs a helper. Will return the instance in the registry if it already exists. * By setting `$enable` to false you can disable callbacks for a helper. Alternatively you * can set `$settings['enabled'] = false` to disable callbacks. This alias is provided so that when * declaring $helpers arrays you can disable callbacks on helpers. * * You can alias your helper as an existing helper by setting the 'className' key, i.e., * {{{ * public $helpers = array( * 'Html' => array( * 'className' => 'AliasedHtml' * ); * ); * }}} * All calls to the `Html` helper would use `AliasedHtml` instead. * * @param string $helper Helper name to load * @param array $settings Settings for the helper. * @return Helper A helper object, Either the existing loaded helper or a new one. * @throws MissingHelperException when the helper could not be found */ public function load($helper, $settings = array()) { if (is_array($settings) && isset($settings['className'])) { $alias = $helper; $helper = $settings['className']; } list($plugin, $name) = pluginSplit($helper, true); if (!isset($alias)) { $alias = $name; } if (isset($this->_loaded[$alias])) { return $this->_loaded[$alias]; } $helperClass = $name . 'Helper'; App::uses($helperClass, $plugin . 'View/Helper'); if (!class_exists($helperClass)) { throw new MissingHelperException(array( 'class' => $helperClass, 'plugin' => substr($plugin, 0, -1) )); } $this->_loaded[$alias] = new $helperClass($this->_View, $settings); $vars = array('request', 'theme', 'plugin'); foreach ($vars as $var) { $this->_loaded[$alias]->{$var} = $this->_View->{$var}; } $enable = isset($settings['enabled']) ? $settings['enabled'] : true; if ($enable === true) { $this->_enabled[] = $alias; } return $this->_loaded[$alias]; } }
0001-bee
trunk/cakephp2/lib/Cake/View/HelperCollection.php
PHP
gpl3
2,867
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package Cake.View.Scaffolds * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <div class="<?php echo $pluralVar;?> index"> <h2><?php echo $pluralHumanName;?></h2> <table cellpadding="0" cellspacing="0"> <tr> <?php foreach ($scaffoldFields as $_field):?> <th><?php echo $this->Paginator->sort($_field);?></th> <?php endforeach;?> <th><?php echo __d('cake', 'Actions');?></th> </tr> <?php $i = 0; foreach (${$pluralVar} as ${$singularVar}): echo "<tr>"; foreach ($scaffoldFields as $_field) { $isKey = false; if (!empty($associations['belongsTo'])) { foreach ($associations['belongsTo'] as $_alias => $_details) { if ($_field === $_details['foreignKey']) { $isKey = true; echo "<td>" . $this->Html->link(${$singularVar}[$_alias][$_details['displayField']], array('controller' => $_details['controller'], 'action' => 'view', ${$singularVar}[$_alias][$_details['primaryKey']])) . "</td>"; break; } } } if ($isKey !== true) { echo "<td>" . h(${$singularVar}[$modelClass][$_field]) . "</td>"; } } echo '<td class="actions">'; echo $this->Html->link(__d('cake', 'View'), array('action' => 'view', ${$singularVar}[$modelClass][$primaryKey])); echo $this->Html->link(__d('cake', 'Edit'), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey])); echo $this->Form->postLink( __d('cake', 'Delete'), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), null, __d('cake', 'Are you sure you want to delete').' #' . ${$singularVar}[$modelClass][$primaryKey] ); echo '</td>'; echo '</tr>'; endforeach; ?> </table> <p><?php echo $this->Paginator->counter(array( 'format' => __d('cake', 'Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}') )); ?></p> <div class="paging"> <?php echo $this->Paginator->prev('< ' . __d('cake', 'previous'), array(), null, array('class' => 'prev disabled')); echo $this->Paginator->numbers(array('separator' => '')); echo $this->Paginator->next(__d('cake', 'next') .' >', array(), null, array('class' => 'next disabled')); ?> </div> </div> <div class="actions"> <h3><?php echo __d('cake', 'Actions'); ?></h3> <ul> <li><?php echo $this->Html->link(__d('cake', 'New %s', $singularHumanName), array('action' => 'add')); ?></li> <?php $done = array(); foreach ($associations as $_type => $_data) { foreach ($_data as $_alias => $_details) { if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) { echo "<li>" . $this->Html->link(__d('cake', 'List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "</li>"; echo "<li>" . $this->Html->link(__d('cake', 'New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "</li>"; $done[] = $_details['controller']; } } } ?> </ul> </div>
0001-bee
trunk/cakephp2/lib/Cake/View/Scaffolds/index.ctp
PHP
gpl3
3,548
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package Cake.View.Scaffolds * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <div class="<?php echo $pluralVar;?> view"> <h2><?php echo __d('cake', 'View %s', $singularHumanName); ?></h2> <dl> <?php $i = 0; foreach ($scaffoldFields as $_field) { $isKey = false; if (!empty($associations['belongsTo'])) { foreach ($associations['belongsTo'] as $_alias => $_details) { if ($_field === $_details['foreignKey']) { $isKey = true; echo "\t\t<dt>" . Inflector::humanize($_alias) . "</dt>\n"; echo "\t\t<dd>\n\t\t\t" . $this->Html->link(${$singularVar}[$_alias][$_details['displayField']], array('controller' => $_details['controller'], 'action' => 'view', ${$singularVar}[$_alias][$_details['primaryKey']])) . "\n\t\t&nbsp;</dd>\n"; break; } } } if ($isKey !== true) { echo "\t\t<dt>" . Inflector::humanize($_field) . "</dt>\n"; echo "\t\t<dd>" . h(${$singularVar}[$modelClass][$_field]) . "&nbsp;</dd>\n"; } } ?> </dl> </div> <div class="actions"> <h3><?php echo __d('cake', 'Actions'); ?></h3> <ul> <?php echo "\t\t<li>" .$this->Html->link(__d('cake', 'Edit %s', $singularHumanName), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey])). " </li>\n"; echo "\t\t<li>" .$this->Html->link(__d('cake', 'Delete %s', $singularHumanName), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), null, __d('cake', 'Are you sure you want to delete').' #' . ${$singularVar}[$modelClass][$primaryKey] . '?'). " </li>\n"; echo "\t\t<li>" .$this->Html->link(__d('cake', 'List %s', $pluralHumanName), array('action' => 'index')). " </li>\n"; echo "\t\t<li>" .$this->Html->link(__d('cake', 'New %s', $singularHumanName), array('action' => 'add')). " </li>\n"; $done = array(); foreach ($associations as $_type => $_data) { foreach ($_data as $_alias => $_details) { if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) { echo "\t\t<li>" . $this->Html->link(__d('cake', 'List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "</li>\n"; echo "\t\t<li>" . $this->Html->link(__d('cake', 'New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "</li>\n"; $done[] = $_details['controller']; } } } ?> </ul> </div> <?php if (!empty($associations['hasOne'])) : foreach ($associations['hasOne'] as $_alias => $_details): ?> <div class="related"> <h3><?php echo __d('cake', "Related %s", Inflector::humanize($_details['controller'])); ?></h3> <?php if (!empty(${$singularVar}[$_alias])):?> <dl> <?php $i = 0; $otherFields = array_keys(${$singularVar}[$_alias]); foreach ($otherFields as $_field) { echo "\t\t<dt>" . Inflector::humanize($_field) . "</dt>\n"; echo "\t\t<dd>\n\t" . ${$singularVar}[$_alias][$_field] . "\n&nbsp;</dd>\n"; } ?> </dl> <?php endif; ?> <div class="actions"> <ul> <li><?php echo $this->Html->link(__d('cake', 'Edit %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'edit', ${$singularVar}[$_alias][$_details['primaryKey']]))."</li>\n";?> </ul> </div> </div> <?php endforeach; endif; if (empty($associations['hasMany'])) { $associations['hasMany'] = array(); } if (empty($associations['hasAndBelongsToMany'])) { $associations['hasAndBelongsToMany'] = array(); } $relations = array_merge($associations['hasMany'], $associations['hasAndBelongsToMany']); $i = 0; foreach ($relations as $_alias => $_details): $otherSingularVar = Inflector::variable($_alias); ?> <div class="related"> <h3><?php echo __d('cake', "Related %s", Inflector::humanize($_details['controller'])); ?></h3> <?php if (!empty(${$singularVar}[$_alias])):?> <table cellpadding="0" cellspacing="0"> <tr> <?php $otherFields = array_keys(${$singularVar}[$_alias][0]); if (isset($_details['with'])) { $index = array_search($_details['with'], $otherFields); unset($otherFields[$index]); } foreach ($otherFields as $_field) { echo "\t\t<th>" . Inflector::humanize($_field) . "</th>\n"; } ?> <th class="actions">Actions</th> </tr> <?php $i = 0; foreach (${$singularVar}[$_alias] as ${$otherSingularVar}): echo "\t\t<tr>\n"; foreach ($otherFields as $_field) { echo "\t\t\t<td>" . ${$otherSingularVar}[$_field] . "</td>\n"; } echo "\t\t\t<td class=\"actions\">\n"; echo "\t\t\t\t" . $this->Html->link(__d('cake', 'View'), array('controller' => $_details['controller'], 'action' => 'view', ${$otherSingularVar}[$_details['primaryKey']])). "\n"; echo "\t\t\t\t" . $this->Html->link(__d('cake', 'Edit'), array('controller' => $_details['controller'], 'action' => 'edit', ${$otherSingularVar}[$_details['primaryKey']])). "\n"; echo "\t\t\t\t" . $this->Html->link(__d('cake', 'Delete'), array('controller' => $_details['controller'], 'action' => 'delete', ${$otherSingularVar}[$_details['primaryKey']]), null, __d('cake', 'Are you sure you want to delete', true).' #' . ${$otherSingularVar}[$_details['primaryKey']] . '?'). "\n"; echo "\t\t\t</td>\n"; echo "\t\t</tr>\n"; endforeach; ?> </table> <?php endif; ?> <div class="actions"> <ul> <li><?php echo $this->Html->link(__d('cake', "New %s", Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add'));?> </li> </ul> </div> </div> <?php endforeach;?>
0001-bee
trunk/cakephp2/lib/Cake/View/Scaffolds/view.ctp
PHP
gpl3
6,003
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package Cake.View.Scaffolds * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <div class="<?php echo $pluralVar;?> form"> <?php echo $this->Form->create(); echo $this->Form->inputs($scaffoldFields, array('created', 'modified', 'updated')); echo $this->Form->end(__d('cake', 'Submit')); ?> </div> <div class="actions"> <h3><?php echo __d('cake', 'Actions'); ?></h3> <ul> <?php if ($this->request->action != 'add'): ?> <li><?php echo $this->Form->postLink( __d('cake', 'Delete'), array('action' => 'delete', $this->Form->value($modelClass . '.' . $primaryKey)), null, __d('cake', 'Are you sure you want to delete # %s?', $this->Form->value($modelClass . '.' . $primaryKey))); ?></li> <?php endif;?> <li><?php echo $this->Html->link(__d('cake', 'List') . ' ' . $pluralHumanName, array('action' => 'index'));?></li> <?php $done = array(); foreach ($associations as $_type => $_data) { foreach ($_data as $_alias => $_details) { if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) { echo "\t\t<li>" . $this->Html->link(__d('cake', 'List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' =>'index')) . "</li>\n"; echo "\t\t<li>" . $this->Html->link(__d('cake', 'New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' =>'add')) . "</li>\n"; $done[] = $_details['controller']; } } } ?> </ul> </div>
0001-bee
trunk/cakephp2/lib/Cake/View/Scaffolds/form.ctp
PHP
gpl3
2,039
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package Cake.View.Pages * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (Configure::read('debug') == 0): throw new NotFoundException(); endif; App::uses('Debugger', 'Utility'); ?> <iframe src="http://cakephp.org/bake-banner" width="830" height="160" style="overflow:hidden; border:none;"> <p>For updates and important announcements, visit http://cakefest.org</p> </iframe> <h2><?php echo __d('cake_dev', 'Release Notes for CakePHP %s.', Configure::version()); ?></h2> <a href="http://cakephp.org/changelogs/2.0.0"><?php __d('cake_dev', 'Read the changelog'); ?> </a> <?php if (Configure::read('debug') > 0): Debugger::checkSecurityKeys(); endif; ?> <p id="url-rewriting-warning" style="background-color:#e32; color:#fff;"> <?php echo __d('cake_dev', 'URL rewriting is not properly configured on your server.'); ?> 1) <a target="_blank" href="http://book.cakephp.org/2.0/en/installation/advanced-installation.html#apache-and-mod-rewrite-and-htaccess" style="color:#fff;">Help me configure it</a> 2) <a target="_blank" href="http://book.cakephp.org/2.0/en/development/configuration.html#cakephp-core-configuration" style="color:#fff;">I don't / can't use URL rewriting</a> </p> <p> <?php if (version_compare(PHP_VERSION, '5.2.6', '>=')): echo '<span class="notice success">'; echo __d('cake_dev', 'Your version of PHP is 5.2.6 or higher.'); echo '</span>'; else: echo '<span class="notice">'; echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.2.6 or higher to use CakePHP.'); echo '</span>'; endif; ?> </p> <p> <?php if (is_writable(TMP)): echo '<span class="notice success">'; echo __d('cake_dev', 'Your tmp directory is writable.'); echo '</span>'; else: echo '<span class="notice">'; echo __d('cake_dev', 'Your tmp directory is NOT writable.'); echo '</span>'; endif; ?> </p> <p> <?php $settings = Cache::settings(); if (!empty($settings)): echo '<span class="notice success">'; echo __d('cake_dev', 'The %s is being used for caching. To change the config edit APP/Config/core.php ', '<em>'. $settings['engine'] . 'Engine</em>'); echo '</span>'; else: echo '<span class="notice">'; echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in APP/Config/core.php'); echo '</span>'; endif; ?> </p> <p> <?php $filePresent = null; if (file_exists(APP . 'Config' . DS . 'database.php')): echo '<span class="notice success">'; echo __d('cake_dev', 'Your database configuration file is present.'); $filePresent = true; echo '</span>'; else: echo '<span class="notice">'; echo __d('cake_dev', 'Your database configuration file is NOT present.'); echo '<br/>'; echo __d('cake_dev', 'Rename APP/Config/database.php.default to APP/Config/database.php'); echo '</span>'; endif; ?> </p> <?php if (isset($filePresent)): App::uses('ConnectionManager', 'Model'); try { $connected = ConnectionManager::getDataSource('default'); } catch (Exception $e) { $connected = false; } ?> <p> <?php if ($connected && $connected->isConnected()): echo '<span class="notice success">'; echo __d('cake_dev', 'Cake is able to connect to the database.'); echo '</span>'; else: echo '<span class="notice">'; echo __d('cake_dev', 'Cake is NOT able to connect to the database.'); echo '</span>'; endif; ?> </p> <?php endif;?> <?php App::uses('Validation', 'Utility'); if (!Validation::alphaNumeric('cakephp')) { echo '<p><span class="notice">'; __d('cake_dev', 'PCRE has not been compiled with Unicode support.'); echo '<br/>'; __d('cake_dev', 'Recompile PCRE with Unicode support by adding <code>--enable-unicode-properties</code> when configuring'); echo '</span></p>'; } ?> <h3><?php echo __d('cake_dev', 'Editing this Page'); ?></h3> <p> <?php echo __d('cake_dev', 'To change the content of this page, create: APP/View/Pages/home.ctp.<br /> To change its layout, create: APP/View/Layouts/default.ctp.<br /> You can also add some CSS styles for your pages at: APP/webroot/css.'); ?> </p> <h3><?php echo __d('cake_dev', 'Getting Started'); ?></h3> <p> <?php echo $this->Html->link( sprintf('<strong>%s</strong> %s', __d('cake_dev', 'New'), __d('cake_dev', 'CakePHP 1.3 Docs')), 'http://book.cakephp.org/2.0/en/', array('target' => '_blank', 'escape' => false) ); ?> </p> <p> <?php echo $this->Html->link( __d('cake_dev', 'The 15 min Blog Tutorial'), 'http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html', array('target' => '_blank', 'escape' => false) ); ?> </p> <h3><?php echo __d('cake_dev', 'More about Cake'); ?></h3> <p> <?php echo __d('cake_dev', 'CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.'); ?> </p> <p> <?php echo __d('cake_dev', '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.'); ?> </p> <ul> <li><a href="http://cakefoundation.org/"><?php echo __d('cake_dev', 'Cake Software Foundation'); ?> </a> <ul><li><?php echo __d('cake_dev', 'Promoting development related to CakePHP'); ?></li></ul></li> <li><a href="http://www.cakephp.org"><?php echo __d('cake_dev', 'CakePHP'); ?> </a> <ul><li><?php echo __d('cake_dev', 'The Rapid Development Framework'); ?></li></ul></li> <li><a href="http://book.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Documentation'); ?> </a> <ul><li><?php echo __d('cake_dev', 'Your Rapid Development Cookbook'); ?></li></ul></li> <li><a href="http://api.cakephp.org"><?php echo __d('cake_dev', 'CakePHP API'); ?> </a> <ul><li><?php echo __d('cake_dev', 'Quick Reference'); ?></li></ul></li> <li><a href="http://bakery.cakephp.org"><?php echo __d('cake_dev', 'The Bakery'); ?> </a> <ul><li><?php echo __d('cake_dev', 'Everything CakePHP'); ?></li></ul></li> <li><a href="http://live.cakephp.org"><?php echo __d('cake_dev', 'The Show'); ?> </a> <ul><li><?php echo __d('cake_dev', 'The Show is a live and archived internet radio broadcast CakePHP-related topics and answer questions live via IRC, Skype, and telephone.'); ?></li></ul></li> <li><a href="http://groups.google.com/group/cake-php"><?php echo __d('cake_dev', 'CakePHP Google Group'); ?> </a> <ul><li><?php echo __d('cake_dev', 'Community mailing list'); ?></li></ul></li> <li><a href="irc://irc.freenode.net/cakephp">irc.freenode.net #cakephp</a> <ul><li><?php echo __d('cake_dev', 'Live chat about CakePHP'); ?></li></ul></li> <li><a href="http://github.com/cakephp/"><?php echo __d('cake_dev', 'CakePHP Code'); ?> </a> <ul><li><?php echo __d('cake_dev', 'For the Development of CakePHP Git repository, Downloads'); ?></li></ul></li> <li><a href="http://cakephp.lighthouseapp.com/"><?php echo __d('cake_dev', 'CakePHP Lighthouse'); ?> </a> <ul><li><?php echo __d('cake_dev', 'CakePHP Tickets, Wiki pages, Roadmap'); ?></li></ul></li> </ul>
0001-bee
trunk/cakephp2/lib/Cake/View/Pages/home.ctp
PHP
gpl3
7,558
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package Cake.View.Emails.html * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php $content = explode("\n", $content); foreach ($content as $line): echo '<p> ' . $line . "</p>\n"; endforeach; ?>
0001-bee
trunk/cakephp2/lib/Cake/View/Emails/html/default.ctp
PHP
gpl3
730
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package Cake.View.Emails.text * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php echo $content; ?>
0001-bee
trunk/cakephp2/lib/Cake/View/Emails/text/default.ctp
PHP
gpl3
634
<?php echo $scripts_for_layout; ?> <script type="text/javascript"><?php echo $content_for_layout; ?></script>
0001-bee
trunk/cakephp2/lib/Cake/View/Layouts/js/default.ctp
PHP
gpl3
109
<?php /** * * PHP 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package Cake.View.Layouts * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> <?php echo $content_for_layout; ?>
0001-bee
trunk/cakephp2/lib/Cake/View/Layouts/ajax.ctp
PHP
gpl3
641