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
<!-- configure a url que irá receber os dados --> | |
<input id="fileupload" type="file" name="Filedata" data-url="<?php echo site_url('admin/portfolio/save_photo/' . $gallery->id); ?>" multiple /> | |
<div id="progress" class="progress progress-striped active"> | |
<div class="bar" style="width: 0;"></div> | |
</div> | |
<div id="upload_result"></div> | |
<hr /> | |
<!-- /end multiple upload --> |
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
// service para buscar fotos | |
.factory('galleryService', function($http, $q){ | |
//var url = 'http://www.pontovips.com.br/api.php'; | |
var url = 'http://localhost/pontovips-app/www/api.php'; | |
return { | |
getItems: function(nuItemsPerRequest, firstItem) { | |
return $http.get(url, { | |
params: { |
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 if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* MY_Pagination Class | |
* | |
* Extends Pagination library | |
* | |
*/ | |
class MY_Pagination extends CI_Pagination { | |
public $add_query_string = FALSE; |
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
//helper cep | |
if ( ! function_exists('buscar_endereco')) | |
{ | |
function buscar_endereco($cep) | |
{ | |
$cep = str_replace('.', '', $cep); | |
$cep = str_replace('-', '', $cep); | |
$url = 'http://republicavirtual.com.br/web_cep.php?cep='.urlencode($cep).'&formato=query_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
/* | |
Jonatan Froes <jonatanfroes@gmail.com> | |
1. on InstagramController.php, remove this line: | |
$Account->set("login_required", 1)->update(); | |
*/ | |
/* | |
2. add this lines: |
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
/** | |
* returns an array w/ key => value to populate a select | |
* | |
* @access public | |
* | |
* @param object active record result | |
* @param string field name that will be displayed | |
* @param string field name that will be used as option value | |
* @param array Add a value before result from db | |
* @param mixed remove a value from list |
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 if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* MY_Form_validation Class | |
* | |
* Extends Form_Validation library | |
* | |
*/ | |
class MY_Form_validation extends CI_Form_validation { | |
function __construct() |