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
{"version":1,"resource":"file:///Users/david/Sites/hemcael.com/common/class/ax/Cart.php","entries":[{"id":"yK6m.php","timestamp":1655340730949},{"id":"xWBg.php","timestamp":1661183517781},{"id":"UgEh.php","timestamp":1661183578260},{"id":"cqSc.php","timestamp":1661183675573},{"id":"zsU4.php","timestamp":1661183693050},{"id":"mXCf.php","timestamp":1661183718708},{"id":"eIp0.php","timestamp":1661183791011}]} |
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 | |
// https://stackoverflow.com/questions/43249998/chrome-err-blocked-by-xss-auditor-details | |
header('X-XSS-Protection:0'); |
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(move_uploaded_file($_FILES["immagine_luogo_url"]["tmp_name"],PATH_RELATIVO_GALLERIE_LUOGO.$id."-".cleanFilename($_FILES["immagine_luogo_url"]["name"]))) { | |
$immagine_url = $id."-".cleanFilename($_FILES["immagine_luogo_url"]["name"]); | |
resizeMax(PATH_RELATIVO_GALLERIE_LUOGO.$immagine_url,PATH_RELATIVO_GALLERIE_LUOGO."g-".$immagine_url,GALLERIE_LUOGO_G_W,GALLERIE_LUOGO_G_H,GALLERIE_LUOGO_G_Q); | |
resizeMaxCroping(PATH_RELATIVO_GALLERIE_LUOGO.$immagine_url,PATH_RELATIVO_GALLERIE_LUOGO."m-".$immagine_url,GALLERIE_LUOGO_M_W,GALLERIE_LUOGO_M_H,GALLERIE_LUOGO_M_Q); | |
croping(PATH_RELATIVO_GALLERIE_LUOGO."m-".$immagine_url,PATH_RELATIVO_GALLERIE_LUOGO."m-".$immagine_url,GALLERIE_LUOGO_M_W,GALLERIE_LUOGO_M_H,GALLERIE_LUOGO_M_Q); | |
resizeMaxCroping(PATH_RELATIVO_GALLERIE_LUOGO.$immagine_url,PATH_RELATIVO_GALLERIE_LUOGO."p-".$immagine_url,GALLERIE_LUOGO_P_W,GALLERIE_LUOGO_P_H,GALLERIE_LUOGO_P_Q); | |
croping(PATH_RELATIVO_GALLERIE_LUOGO."p-".$immagine_url,PATH_RELATIVO_GALLERIE_LUOGO."p-".$immagine_url,GALLERI |
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 | |
// PHPExcel_Shared_Date::PHPToExcel utilizza UTC 0 quindi in base all'UTC del server (italia + 2) toglie x ore alla data passata | |
// per questo se viene passata solo la data senza orario lui lavora sulla data - x ore e quindi sul giorno precedente | |
// quindi l'ideale sarebbe passare la data + UTC in modo che quando vengono tolti la data è l'originale | |
$when_cell_content = '2016-01-30 12:00:00'; | |
$when_cell_content = PHPExcel_Shared_Date::PHPToExcel(strtotime($when_cell_content)); | |
$objPHPExcel->getActiveSheet()->getStyleByColumnAndRow($xlsc, $xlsr)->getNumberFormat()->setFormatCode('dd/mm/yyyy'); | |
// PHPExcel_Style_NumberFormat::FORMAT_DATE_DDMMYYYY | |
// PHPExcel_Style_NumberFormat::FORMAT_DATE_DDMMYYYY | |
// PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD2 |
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 | |
$detected_lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); | |
switch ($detected_lang){ | |
case "fr": | |
$_REQUEST['lang'] = 'fr'; | |
break; | |
case "de": | |
$_REQUEST['lang'] = 'de'; | |
break; | |
case "es": |
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 | |
// http://silvermapleweb.com/using-the-php-session-in-wordpress/ | |
// first of all | |
add_action('init', 'startSession', 1); | |
add_action('wp_logout', 'endSession'); | |
add_action('wp_login', 'endSession'); | |
function startSession() { |
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 | |
public static function isUTF8($string){ | |
return preg_match('%(?: | |
[\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte | |
|\xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs | |
|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte | |
|\xED[\x80-\x9F][\x80-\xBF] # excluding surrogates | |
|\xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3 | |
|[\xF1-\xF3][\x80-\xBF]{3} # planes 4-15 | |
|\xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16 |
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 Utils{ | |
public static function minify($buffer) { | |
$search = array( | |
'/\>[^\S ]+/s', // strip whitespaces after tags, except space | |
'/[^\S ]+\</s', // strip whitespaces before tags, except space | |
'/(\s)+/s', // shorten multiple whitespace sequences | |
); | |
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 | |
// Report all PHP errors | |
error_reporting(-1); | |
// Same as error_reporting(E_ALL); | |
ini_set('error_reporting', E_ALL); |
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 | |
static function isValidMail($mail){ | |
if (!preg_match("/^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i", $mail)) { | |
return false; | |
} | |
return true; | |
} |
NewerOlder