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 | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class MY_Input extends CI_Input { | |
/** | |
* Instance de CI_Security | |
* | |
* @var CI_Security | |
*/ |
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 | |
function block_get_refreshed_fragments_for_specific_bots() { | |
// Vérifie si la requête est celle de WooCommerce pour les fragments | |
if (isset($_REQUEST['wc-ajax']) && $_REQUEST['wc-ajax'] === 'get_refreshed_fragments') { | |
// Liste des patterns pour les user agents à bloquer (exemples) | |
$bot_patterns = array( | |
' YLT', | |
'^Aether', | |
'^Amazon Simple Notification Service Agent$', |
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
/* | |
* Permet de rendre une checkbox obligatoire parmis plusieurs | |
* | |
* Jquery required. | |
* | |
* <input name="tranche[]" type="checkbox" class="tel-checkbox" id="modal-usual-call-matin" value="matin" required> | |
* <input name="tranche[]" type="checkbox" class="tel-checkbox" id="modal-usual-call-midi" value="midi" required> | |
* <input name="tranche[]" type="checkbox" class="tel-checkbox" id="modal-usual-call-apmidi" value="apres-midi" required> | |
* <input name="tranche[]" type="checkbox" class="tel-checkbox" id="modal-usual-call-soir" value="soir" required> | |
* |
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 add_loading_lazy_to_images($attr) { | |
$attr['loading'] = 'lazy'; | |
return $attr; | |
} | |
add_filter( 'wp_get_attachment_image_attributes', 'add_loading_lazy_to_images'); |
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 | |
session_start() ; | |
$cmd1 = 'python -u /var/www/blabla/test/Test.py'; | |
$proc=proc_open($cmd1, | |
array( | |
array("pipe","r"), | |
array("pipe","w"), | |
array("pipe","w") | |
), |
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
jQuery(document).ready(function($) | |
{ | |
function CopyPasta() | |
{ | |
var commentaire = " : coucou : "; | |
var url = window.location.href; | |
var copy = window.getSelection(); | |
var brut = copy.toString(); | |
var divPaste = document.createElement('div'); |
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 getUrlParam(name) { | |
var results = new RegExp('[\\?&]' + name + '=([^]*)').exec(window.location.href); | |
return (results && results[1]) || undefined; | |
} |
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 | |
if ( ! function_exists('isLundi')) | |
{ | |
function isLundi($date = FALSE) { | |
if($date === FALSE) | |
{ | |
return (date('N', strtotime(date("Y-m-d H:i:s"))) == 1); | |
} | |
return (date('N', strtotime($date)) == 1); | |
} |
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
<div class="form-group"> | |
<label for="f_nom_arret">Heure de passage normal : </label> | |
<select name="heure"> | |
<option value="h">heure</option> | |
<?php for ($heure = 00 ; $heure <= 23 ; $heure++): | |
$hour = sprintf("%02d", $heure); | |
?> | |
<option value="<?php echo $hour ?>"><?=$hour;?></option> | |
<?php endfor; ?> | |
</select> |
NewerOlder