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
/** | |
* Fuel 1.7.2 - PHP 5.3.3 | |
* Fuel 1.7.2 - PHP 5.4.9 | |
*/ | |
foreach( range(1,120) as $d ){ | |
$now = strtotime('today'); | |
$ago = '-'.$d.' days'; | |
echo sprintf( | |
"%s\t-%3d days\t%s\n", |
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 | |
/** | |
* 独自バリデーションを追加 | |
*/ | |
class Validation_Asset | |
{ | |
/** | |
* アップロードファイルをチェック | |
*/ |
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 | |
/** | |
* 独自バリデーションを追加 | |
*/ | |
class Validation_Japanese | |
{ | |
/** | |
* | |
*/ |
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 | |
class Validation_Error extends Fuel\Core\Validation_Error | |
{ | |
/** | |
* Override | |
* | |
* @param error message to parse | |
* @return string | |
*/ |
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 | |
class Validation extends Fuel\Core\Validation | |
{ | |
use Validation_Required; | |
} |
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 | |
return array( | |
'photo1' => array( | |
'path' => APPPATH. 'tmp/image/', | |
'max_size' => 2 * 1024 * 1024, | |
'ext_whitelist' => array('jpg','jpeg','gif','png'), | |
), | |
); |
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 | |
return array( | |
'auto_process' => false, | |
'auto_rename' => false, | |
'overwrite' => true, | |
'randomize' => 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 | |
namespace Fuel\Tasks; | |
class Migrate_indexes | |
{ | |
public static function run() | |
{ | |
} |
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 | |
return array( | |
'countries' => array( | |
'352' => 'Iceland', | |
'372' => 'Ireland', | |
'31' => 'Azerbaijan', | |
'4' => 'Afghanistan', | |
'840' => 'United States', | |
'850' => 'Virgin Islands, U.S.', | |
'16' => 'American Samoa', |
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
<script> | |
$(document).ready(function(){ | |
var elements = ":input[readonly!=readonly]"; | |
$(elements).keypress(function(e) { | |
var c = e.which ? e.which : e.keyCode; | |
if (c == 13) { | |
var index = $(elements).index(this); | |
var criteria = e.shiftKey ? ":lt(" + index + "):last" : ":gt(" + index + "):first"; | |
$(elements + criteria).focus(); | |
e.preventDefault(); |
OlderNewer