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
| if (!isset($_SERVER['PHP_AUTH_USER']) | |
| || $_SERVER['PHP_AUTH_USER'] != 'user' || $_SERVER['PHP_AUTH_PW'] != 'passwd') | |
| { | |
| header('WWW-Authenticate: Basic realm="My Realm"'); | |
| header('HTTP/1.0 401 Unauthorized'); | |
| echo 'Authentification requise.'; | |
| exit; | |
| } |
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
| // string input ($date = '2013-01-01';) | |
| $day = \DateTime::createFromFormat('Y-m-d', $date); | |
| $date_errors = \DateTime::getLastErrors(); | |
| if ($date_errors['warning_count'] + $date_errors['error_count'] > 0) { | |
| throw $this->createNotFoundException('Input date does not exist.'); | |
| } | |
| $next_day = clone $day; |
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 | |
| /* | |
| * Import data from old application | |
| * http://docs.doctrine-project.org/en/2.0.x/reference/configuration.html | |
| */ | |
| require '../vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php'; | |
| $classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Common', '../vendor/doctrine/common/lib'); | |
| $classLoader->register(); |
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
| // Init Method | |
| $query = $this->createQueryBuilder('b') | |
| ->select('b') | |
| ->orderBy('b.number', 'DESC'); | |
| // WRONG Query | |
| // Was feching task's works with additional SQL Queries (task's works loop in twig tmpl) | |
| $query = $this->retrieve(true) |
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 action="" method="post" novalidate="novalidate"> |
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
| Process: httpd [1432] | |
| Path: /usr/sbin/httpd | |
| Identifier: httpd | |
| Version: 786 | |
| Code Type: X86-64 (Native) | |
| Parent Process: httpd [1431] | |
| Responsible: httpd [1431] | |
| User ID: 70 | |
| PlugIn Path: /usr/local/php5/lib/php/extensions/no-debug-non-zts-20121212/apcu.so |
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
| global $wpdb; | |
| $sql = " | |
| SELECT wp_posts.*, meta1.meta_value as employee_nom, meta2.meta_value as employee_prenom, bureau.post_title | |
| FROM {$wpdb->posts} wp_posts | |
| INNER JOIN {$wpdb->postmeta} meta1 on meta1.post_id = wp_posts.ID and meta1.meta_key = 'employee_nom' | |
| INNER JOIN {$wpdb->postmeta} meta2 on meta2.post_id = wp_posts.ID and meta2.meta_key = 'employee_prenom' | |
| INNER JOIN {$wpdb->postmeta} meta3 on meta3.post_id = wp_posts.ID and meta3.meta_key = 'employee_bureau' | |
| INNER JOIN {$wpdb->posts} bureau on bureau.ID = meta3.meta_value | |
| WHERE |
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
| SELECT wp_users.*, meta_lastname.meta_value as last_name, meta_firstname.meta_value as first_name, meta_workplace.meta_value as workplace, meta_desc.meta_value as description | |
| FROM wp_users | |
| INNER JOIN wp_usermeta AS meta_lastname ON (wp_users.ID = meta_lastname.user_id) AND (meta_lastname.meta_key = 'last_name') | |
| INNER JOIN wp_usermeta AS meta_firstname ON (wp_users.ID = meta_firstname.user_id) AND (meta_firstname.meta_key = 'first_name') | |
| INNER JOIN wp_usermeta AS meta_ulevel ON (wp_users.ID = meta_ulevel.user_id) AND (meta_ulevel.meta_key = 'wp_user_level') | |
| INNER JOIN wp_usermeta AS meta_workplace ON (wp_users.ID = meta_workplace.user_id) AND (meta_workplace.meta_key = 'workplace') | |
| INNER JOIN wp_usermeta AS meta_desc ON (wp_users.ID = meta_desc.user_id) AND (meta_desc.meta_key = 'description') | |
| WHERE | |
| CAST(meta_ulevel.meta_value AS CHAR) != '0' | |
| AND CAST(meta_workplace.meta_value AS CHAR) LIKE '%{$workplace}%' |
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
| /** | |
| * jquery.filterTable | |
| * | |
| * This plugin will add a search filter to tables. When typing in the filter, | |
| * any rows that do not contain the filter will be hidden. | |
| * | |
| * Utilizes bindWithDelay() if available. https://github.com/bgrins/bindWithDelay | |
| * | |
| * @version v1.5 | |
| * @author Sunny Walker, swalker@hawaii.edu |
OlderNewer