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
| .select2-container.form-control { | |
| height: auto !important; | |
| } |
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 | |
| function age($date) | |
| { | |
| $d = strtotime($date); | |
| //echo strftime('%a %d %b %Y', $d).' > '; | |
| return (int) ((time() - $d) / 3600 / 24 / 365.242); | |
| } | |
| ?> |
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 | |
| App::uses('AppController', 'Controller'); | |
| class InvoicesController extends AppController { | |
| public $uses = array(); | |
| public function pdf($id = null) { | |
| $this->autoRender = false; | |
| $this->layout = null; |
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
| /** | |
| * Calculate Greatest Common Divisor of 2 integers. | |
| * The result is always positive even if either of, or both, input operands are negative. | |
| * By Aurélien Millet | |
| * http://aurelien-dev-notes.blogspot.fr/2012/07/php-calcul-du-plus-grand-commun-diviseur.html | |
| * | |
| * @param int $a | |
| * @param int $b | |
| * @return int | |
| */ |
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 | |
| // Input group | |
| echo $this->Form->input('test', array( | |
| 'beforeInput' => '<div class="input-group">', | |
| 'afterInput' => '<span class="input-group-addon">.00</span></div>' | |
| )); | |
| ?> |
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
| find ./ -type f -name '*.*' -exec chmod 644 '{}' \+ |
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
| Download PHP 5.5.11 | |
| wget http://fr2.php.net/get/php-5.5.11.tar.gz/from/this/mirror -O /usr/local/src/php-5.5.11.tar.gz | |
| Extract and change to the directory | |
| tar xzvf /usr/local/src/php-5.5.11.tar.gz -C /usr/local/src/ | |
| cd /usr/local/src/php-5.5.11/ | |
| Configure PHP 5.5.11 | |
| ./configure --with-libdir=/lib/x86_64-linux-gnu --cache-file=./config.cache --prefix=/usr/local/php-5.5.11 --with-config-file-path=/usr/local/php-5.5.11/etc --disable-debug --with-pic --disable-rpath --with-bz2 --with-curl=/usr/lib/x86_64-linux-gnu/ --with-freetype-dir=/usr/local/php-5.5.11 --with-png-dir=/usr/local/php-5.5.11 --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr/local/php-5.5.11 --with-openssl --with-pspell --with-pcre-regex --with-zlib --enable-exif --enable-ftp --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-kerberos --with-unixODBC=/usr --enable-shmop --enable-calendar --with-libxml-dir=/usr/local/php-5.5.11 --enable-pcntl --with-imap-ssl - |
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 function index() { | |
| $this->paginate = array( | |
| 'conditions' => array('NewsProfiles.profile_id' => $this->authUser['profile_id']), | |
| 'joins' => array( | |
| array( | |
| 'alias' => 'NewsProfiles', | |
| 'table' => 'news_profiles', | |
| 'type' => 'INNER', | |
| 'conditions' => 'News.id = NewsProfiles.news_id' |
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 | |
| App::uses('AppController', 'Controller'); | |
| /** | |
| * Extractions Controller | |
| * | |
| * @property Extraction $Extraction | |
| * @property PaginatorComponent $Paginator | |
| * @property SessionComponent $Session | |
| */ | |
| class ExtractionsController extends AppController { |
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 | |
| echo $this->Form->input('end', array( | |
| 'label' => array('text' => 'Date de fin'), | |
| 'type' => 'date', | |
| 'dateFormat' => 'DMY', | |
| 'minYear' => date('Y'), | |
| 'style' => 'width: 100px; display: inline-block;' | |
| )); | |
| echo $this->Form->input('end', array( | |
| 'label' => array('text' => 'Heure de fin'), |