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
$("#etablissementshowform").typeaheadmap({ | |
"source" : function (query, process) { | |
return $.get('index.php?c=ajax&a=getEtablissementJson&q=' + query, function (data) { | |
$('body, html').scrollTop(0); | |
return process(JSON.parse(data)); | |
}); | |
}, | |
"key" : "k", | |
"value" : "v", | |
"items": 17, |
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 | |
/** | |
* Rendering part of code in a var | |
* could be directly display or injected in a bigger view | |
* Perfect for sub menu & co | |
* | |
* @global $app | |
* @param string $filename | |
* @param array $data | |
* @return string Ouput html content |
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 | |
// web/index.php | |
require __DIR__.'/../vendor/autoload.php'; | |
$app = new Silex\Application(); | |
$app->get('/{controllerName}/{actionName}', function ($controllerName, $actionName) use ($app) { | |
$controllerName = ucfirst($controllerName); |
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
$(function() { | |
$( "#sortable" ).sortable({ | |
update: function( event, ui ) { | |
var order = $(this).sortable("serialize")+'&action=updateListeOrder&ID_ETABLISSEMENT=<?php echo $_GET['ID_ETABLISSEMENT'] ?>'; | |
$.post("/updateListe.php", order, function(theResponse) | |
{ | |
$(".reponse").html(theResponse).fadeIn("fast"); | |
setTimeout(function() | |
{ | |
$(".reponse").fadeOut("slow"); |
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 | |
class tcpdf_model extends CoreModel { | |
public $content; | |
public function __construct() | |
{ | |
require_once('vendors/tcpdf/config/lang/fra.php'); | |
require_once('vendors/tcpdf/tcpdf.php'); |
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 | |
use Cutator\View\TwBootstrapView ; | |
use Cutator\Adaptater\SfUrlGeneratorAdaptater; | |
$router = new SfUrlGeneratorAdaptater($app['url_generator'], 'install_listing_page', null, 'page'); | |
$var = new TwBootstrapView(array('urlGenerator'=>$router)); | |
$var->setTotalItem(850)->setItemsPerPage(10)->setCurrentPage(8)->setShowFirstLast(false)->setMaxLinks(10); |
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
public function getPdf($isSecondPage = false, $filename = 'facture') | |
{ | |
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, 'A3', true, 'UTF-8', false); | |
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, '', ''); | |
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); | |
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); | |
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); | |
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); | |
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); | |
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); |
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 | |
class crm_info extends CoreController { | |
public $ItemPerPage = '10'; | |
public $ItemPerGroup = '10'; | |
/** | |
* @param int $_GET['page'] Displayed page |
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 | |
require 'deployer.phar'; | |
task('prod_server', function () { | |
connect('prod.ssh.test.com', 'user', 'password'); | |
}); | |
task('upload', function () { | |
upload(__DIR__, '/home/test'); |
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 | |
$Directory = new RecursiveDirectoryIterator(__DIR__); | |
$Iterator = new RecursiveIteratorIterator($Directory, RecursiveIteratorIterator::SELF_FIRST); | |
$Regex = new RegexIterator($Iterator, '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH); | |
echo'<pre>'; | |
var_dump($Regex); |