This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Singleton instance of Session. | |
*/ | |
public static function instance() | |
{ | |
if (Session::$instance == NULL) | |
{ | |
// Create a new instance | |
new Session; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IndexController extends Zend_Controller_Action | |
{ | |
public function init() | |
{ | |
/* Initialize action controller here */ | |
} | |
public function indexAction() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') OR die('No direct access allowed.'); | |
/** | |
* User controller. | |
* | |
* @package wd | |
* @author Alvaro Guimaraes | |
* @copyright (c) 2009 Alvaro Guimaraes | |
* @license http://kohanaphp.com/license.html | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// user ORM factory | |
$orm_user = ORM::factory('user'); | |
// change data | |
$orm_user->username = $username; | |
if($password){ | |
$orm_user->password = $password; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') OR die('No direct access allowed.'); | |
class Users_Controller extends Template_Controller { | |
/** | |
* See if method needs to have a template. | |
* If user is not logged in he is redirected to the login method. | |
* | |
* @return void | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') OR die('No direct access allowed.'); | |
abstract class Template_Controller extends Controller { | |
// View to be used with template | |
public $template = 'template/base'; | |
// Template will be loaded in the end of controller | |
public $auto_render = TRUE; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') OR die('No direct access allowed.'); | |
/** | |
* Allows a template to be automatically loaded and displayed. Display can be | |
* dynamically turned off in the controller methods, and the template file | |
* can be overloaded. | |
* | |
* To use it, declare your controller to extend this class: | |
* `class Your_Controller extends Template_Controller` | |
* | |
* $Id: template.php 3769 2008-12-15 00:48:56Z zombor $ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Valor mensal: 200 | |
1=> R$ 200 | |
2=> R$ 410 | |
3=> R$ 630.5 | |
4=> R$ 862.03 | |
5=> R$ 1105.13 | |
6=> R$ 1360.38 | |
7=> R$ 1628.4 | |
8=> R$ 1909.82 | |
9=> R$ 2205.31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#addform").validate({ | |
rules: { | |
username: { | |
required: true, | |
minLength: 3, | |
maxLength: 32 | |
} | |
}, | |
messages: { | |
username: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') OR die('No direct access allowed.'); | |
class Auth_User_Model extends ORM { | |
/** | |
* Validates and optionally saves a new user record from an array. | |
* | |
* @param array values to check | |
* @param boolean save the record when validation succeeds | |
* @return boolean |
OlderNewer