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
| /** | |
| * | |
| * @return object | |
| */ | |
| public function getBackgroundHomeFunc() | |
| { | |
| return $this->getEntityManager() | |
| ->createQueryBuilder() | |
| ->select('b') |
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 Entity; | |
| use Doctrine\ORM\Mapping as ORM; | |
| /** | |
| * NoticiaGaleria | |
| * | |
| * @ORM\Table(name="tb_noticia_galeria", indexes={@ORM\Index(name="IDX_3135593E478D78F9", columns={"id_galeria"}), @ORM\Index(name="IDX_3135593ED8407959", columns={"id_noticia"})}) |
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
| ; |
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
| public function authenticate() { | |
| //Dados de usuário que são necessários | |
| $dadosUser['loginUser'] = $this->username; | |
| $dadosUser['grupo'] = 1; | |
| // $consult = $this->em2->getConnection()->executeQuery("SELECT TX_LOGIN_USUARIO, TX_NOME_USUARIO, TX_TELEFONE_USUARIO, TX_RAMAL_USUARIO, TX_EMAIL_USUARIO, TX_SENHA_USUARIO, TX_ESTADO_USUARIO, DT_INICIO_ESTADO_USUARIO, DT_MUDANCA_ESTADO_USUARIO, " | |
| // . "TX_USUARIO_BLOQUEADO, DT_ULTIMO_ACESSO, TX_USUARIO_CONECTADO, QT_TENTATIVA_CONEXAO, DT_EXPIRACAO_SENHA, TX_SIGLA_SETOR, TX_CLASSE_USUARIO, TX_CNPJ_EMPRESA " | |
| // . "FROM USUARIO " . "WHERE TX_LOGIN_USUARIO = '{$this->username}' AND TX_SENHA_USUARIO = '".sha1($this->password)."' "); | |
| // | |
| // analsl |
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 Container; | |
| use Zend\Session\SessionManager; | |
| use Pimple; | |
| use Zend\Log\Logger; | |
| use Zend\Log\Writer\Stream; | |
| /** |
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
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| sass: { | |
| dist: { | |
| options:{ | |
| style:'compressed' | |
| }, | |
| files: { | |
| 'css/style.css' : 'scss/style.scss' |
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
| # sudo vim /etc/apache2/sites-available/exemplo.local.com.conf | |
| <VirtualHost *:80> | |
| ServerName exemplo.local.com | |
| DocumentRoot /var/www/html/exemplo | |
| <Directory /var/www/html/exemplo> | |
| DirectoryIndex index.php | |
| AllowOverride All | |
| Order allow,deny | |
| Allow from all | |
| </Directory> |
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 | |
| // in function .php write following code | |
| //Here we gather the files which sent by the HTML forms. and send it to //another function called kv_handle_attachement(). This is a simple function //this will help you to store the files to your wp uploads directory. Add //the following code into your Theme “ functions.php” | |
| //img upload// | |
| function kv_handle_attachment($file_handler,$post_id,$set_thu=false) { | |
| // check to make sure its a successful upload | |
| if ($_FILES[$file_handler][‘error’] !== UPLOAD_ERR_OK) __return_false(); | |
| require_once(ABSPATH . “wp-admin” . ‘/includes/image.php’); | |
| require_once(ABSPATH . “wp-admin” . ‘/includes/file.php’); |
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 | |
| // https://wordpress.org/support/topic/uploaded-image-with-accents-in-name-image-dont-show-in-safari-6 | |
| function sanitize_filename_on_upload($filename) { | |
| $ext = end(explode('.', $filename)); | |
| // Replace all weird characters | |
| $sanitized = preg_replace('/[^a-zA-Z0-9-_.]/', '', substr($filename, 0, -(strlen($ext)+1))); | |
| // Replace dots inside filename | |
| $sanitized = str_replace('.', '-', $sanitized); | |
| return strtolower($sanitized.'.'.$ext); | |
| } |
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 | |
| /** | |
| * Include posts from authors in the search results where | |
| * either their display name or user login matches the query string | |
| * | |
| * @author danielbachhuber | |
| */ | |
| add_filter( 'posts_search', 'db_filter_authors_search' ); | |
| function db_filter_authors_search( $posts_search ) { |