Permalink
Browse files

Teste do plugin CakePdf.

  • Loading branch information...
vitorpacheco committed Jul 6, 2012
1 parent e71c1e2 commit fb1cac36228b085d712774ea4ef8d4073f5159cc
Showing with 3,189 additions and 1 deletion.
  1. +4 −1 .gitignore
  2. +5 −0 .htaccess
  3. +74 −0 Config/Schema/db_acl.php
  4. +40 −0 Config/Schema/db_acl.sql
  5. +51 −0 Config/Schema/i18n.php
  6. +26 −0 Config/Schema/i18n.sql
  7. +48 −0 Config/Schema/sessions.php
  8. +16 −0 Config/Schema/sessions.sql
  9. +68 −0 Config/acl.ini.php
  10. +112 −0 Config/bootstrap.php
  11. +334 −0 Config/core.php
  12. +13 −0 Config/database.php
  13. +84 −0 Config/database.php.default
  14. +97 −0 Config/email.php.default
  15. +45 −0 Config/routes.php
  16. +31 −0 Console/Command/AppShell.php
  17. +33 −0 Console/cake
  18. +32 −0 Console/cake.bat
  19. +33 −0 Console/cake.php
  20. +35 −0 Controller/AppController.php
  21. +67 −0 Controller/PagesController.php
  22. +108 −0 Controller/PostsController.php
  23. +34 −0 Model/AppModel.php
  24. +9 −0 Model/Post.php
  25. +1 −0 Plugin/CakePdf
  26. +59 −0 Test/Case/Controller/PostsControllerTest.php
  27. +40 −0 Test/Case/Model/PostTest.php
  28. +40 −0 Test/Fixture/PostFixture.php
  29. +25 −0 View/Emails/html/default.ctp
  30. +19 −0 View/Emails/text/default.ctp
  31. +31 −0 View/Errors/error400.ctp
  32. +28 −0 View/Errors/error500.ctp
  33. +33 −0 View/Helper/AppHelper.php
  34. +31 −0 View/Layouts/Emails/html/default.ctp
  35. +22 −0 View/Layouts/Emails/text/default.ctp
  36. +19 −0 View/Layouts/ajax.ctp
  37. +59 −0 View/Layouts/default.ctp
  38. +59 −0 View/Layouts/error.ctp
  39. +37 −0 View/Layouts/flash.ctp
  40. +2 −0 View/Layouts/js/default.ctp
  41. +3 −0 View/Layouts/pdf/default.ctp
  42. +14 −0 View/Layouts/rss/default.ctp
  43. +1 −0 View/Layouts/xml/default.ctp
  44. +188 −0 View/Pages/home.ctp
  45. +18 −0 View/Posts/add.ctp
  46. +20 −0 View/Posts/edit.ctp
  47. +48 −0 View/Posts/index.ctp
  48. +1 −0 View/Posts/pdf/view.ctp
  49. +39 −0 View/Posts/view.ctp
  50. +17 −0 index.php
  51. +6 −0 webroot/.htaccess
  52. +739 −0 webroot/css/cake.generic.css
  53. BIN webroot/favicon.ico
  54. BIN webroot/img/cake.icon.png
  55. BIN webroot/img/cake.power.gif
  56. BIN webroot/img/test-error-icon.png
  57. BIN webroot/img/test-fail-icon.png
  58. BIN webroot/img/test-pass-icon.png
  59. BIN webroot/img/test-skip-icon.png
  60. +97 −0 webroot/index.php
  61. +94 −0 webroot/test.php
View
@@ -2,4 +2,7 @@ tmp/*
config/database.php
app/tmp/*
app/config/database.php
-!empty
+!empty
+.buildpath
+.project
+.settings/
View
@@ -0,0 +1,5 @@
+<IfModule mod_rewrite.c>
+ RewriteEngine on
+ RewriteRule ^$ webroot/ [L]
+ RewriteRule (.*) webroot/$1 [L]
+</IfModule>
View
@@ -0,0 +1,74 @@
+<?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-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright 2005-2012, 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))
+ );
+
+}
View
@@ -0,0 +1,40 @@
+# $Id$
+#
+# Copyright 2005-2012, Cake Software Foundation, Inc.
+#
+# Licensed under The MIT License
+# Redistributions of files must retain the above copyright notice.
+# MIT License (http://www.opensource.org/licenses/mit-license.php)
+
+CREATE TABLE acos (
+ id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+ parent_id INTEGER(10) DEFAULT NULL,
+ model VARCHAR(255) DEFAULT '',
+ foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
+ alias VARCHAR(255) DEFAULT '',
+ lft INTEGER(10) DEFAULT NULL,
+ rght INTEGER(10) DEFAULT NULL,
+ PRIMARY KEY (id)
+);
+
+CREATE TABLE aros_acos (
+ id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+ aro_id INTEGER(10) UNSIGNED NOT NULL,
+ aco_id INTEGER(10) UNSIGNED NOT NULL,
+ _create CHAR(2) NOT NULL DEFAULT 0,
+ _read CHAR(2) NOT NULL DEFAULT 0,
+ _update CHAR(2) NOT NULL DEFAULT 0,
+ _delete CHAR(2) NOT NULL DEFAULT 0,
+ PRIMARY KEY(id)
+);
+
+CREATE TABLE aros (
+ id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+ parent_id INTEGER(10) DEFAULT NULL,
+ model VARCHAR(255) DEFAULT '',
+ foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
+ alias VARCHAR(255) DEFAULT '',
+ lft INTEGER(10) DEFAULT NULL,
+ rght INTEGER(10) DEFAULT NULL,
+ PRIMARY KEY (id)
+);
View
@@ -0,0 +1,51 @@
+<?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-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright 2005-2012, 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))
+ );
+
+}
View
@@ -0,0 +1,26 @@
+# $Id$
+#
+# Copyright 2005-2012, Cake Software Foundation, Inc.
+#
+# Licensed under The MIT License
+# Redistributions of files must retain the above copyright notice.
+# MIT License (http://www.opensource.org/licenses/mit-license.php)
+
+CREATE TABLE i18n (
+ id int(10) NOT NULL auto_increment,
+ locale varchar(6) NOT NULL,
+ model varchar(255) NOT NULL,
+ foreign_key int(10) NOT NULL,
+ field varchar(255) NOT NULL,
+ content mediumtext,
+ PRIMARY KEY (id),
+# UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field),
+# INDEX I18N_LOCALE_ROW(locale, model, foreign_key),
+# INDEX I18N_LOCALE_MODEL(locale, model),
+# INDEX I18N_FIELD(model, foreign_key, field),
+# INDEX I18N_ROW(model, foreign_key),
+ INDEX locale (locale),
+ INDEX model (model),
+ INDEX row_id (foreign_key),
+ INDEX field (field)
+);
View
@@ -0,0 +1,48 @@
+<?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-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright 2005-2012, 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))
+ );
+
+}
View
@@ -0,0 +1,16 @@
+# $Id$
+#
+# Copyright 2005-2012, Cake Software Foundation, Inc.
+# 1785 E. Sahara Avenue, Suite 490-204
+# Las Vegas, Nevada 89104
+#
+# Licensed under The MIT License
+# Redistributions of files must retain the above copyright notice.
+# MIT License (http://www.opensource.org/licenses/mit-license.php)
+
+CREATE TABLE cake_sessions (
+ id varchar(255) NOT NULL default '',
+ data text,
+ expires int(11) default NULL,
+ PRIMARY KEY (id)
+);
View
@@ -0,0 +1,68 @@
+;<?php exit() ?>
+;/**
+; * ACL Configuration
+; *
+; *
+; * PHP 5
+; *
+; * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+; * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+; *
+; * Licensed under The MIT License
+; * Redistributions of files must retain the above copyright notice.
+; *
+; * @copyright Copyright 2005-2012, 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
Oops, something went wrong.

0 comments on commit fb1cac3

Please sign in to comment.