This file contains hidden or 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 Admin; | |
class Controller_Vendas extends \Controller_Rest { | |
//Chamando uma function de outro module | |
public function get_fornecedores() { |
This file contains hidden or 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
//MODEL | |
public function categorias_item() { | |
$loja = $this->load->database('loja', TRUE); | |
$query = $loja->query("SELECT * FROM categorias ORDER BY categoria ASC"); | |
foreach($query->result_array() as $row) { | |
$categoria = $row['categoria']; |
This file contains hidden or 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 Model_Ativos extends Orm\Model | |
{ | |
protected static $_properties = array( | |
'id', | |
'user_id', | |
'created_at', | |
); |
This file contains hidden or 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 | |
public static function publics_slide() | |
{ | |
$query = DB::select() | |
->from('publics') | |
->limit(4) | |
->execute(); | |
foreach($query as $row) |
This file contains hidden or 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
$query = DB::select('*') | |
->select(array(DB::expr('LEFT(`descricao`,10)'), 'descricao')) | |
->from('publics') | |
->limit(4) | |
->execute(); | |
------------------------------------------------------------------ | |
public static function publics_slide() | |
{ |
This file contains hidden or 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
<%= form_for @user, :html => { :class => 'ui form attached fluid segment cadastro', :onsubmit => 'cadastro()' } do |f| %> | |
<% if @user.errors[:email].any? %> | |
<div class="ui error message visible"> | |
<div class="header"><i class="icon attention"></i>Atenção</div> | |
<p><%= @user.errors[:email] %></p> | |
</div> | |
<% end %> | |
<div class="two fields"> |
This file contains hidden or 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 Session | |
include ActiveModel::Model | |
attr_accessor :email, :password | |
validates :email, :presence => { :message => 'Entre com o seu e-mail' } | |
validates :password, :presence => { :message => 'Coloque a sua senha' } | |
def initialize(attr={}) | |
@email = attr[:email] | |
@password = attr[:password] |
This file contains hidden or 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
#!/bin/bash | |
# http://wiki.compiz.org/C%2B%2BCompiling | |
# This is basically a script version of the official documentation above | |
# with a few fix needed to successfully compile on debian jessie | |
wget https://launchpad.net/compiz/0.9.12/0.9.12.2/+download/compiz-0.9.12.2.tar.bz2 | |
tar -xf compiz-0.9.12.2.tar.bz2 | |
rm compiz-0.9.12.2.tar.bz2 | |
cd compiz-0.9.12.2/ |
This file contains hidden or 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
# Formulário | |
<%= form_tag invites_path, class: 'ui invite' do %> | |
<div class="ui action input" style="width:45%"> | |
<%= text_field_tag 'email', nil, placeholder: "E-mail..." %> | |
<div class="ui icon button refresh" type="submit"><i class="mail icon"></i></div> | |
</div> | |
<% end %> | |
# Controller |
This file contains hidden or 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
worker_processes 1; | |
error_log /opt/nginx/logs/error.log; | |
pid /opt/nginx/logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { |
OlderNewer