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 | |
/* | |
1. Source code lines are limited to 120 characters | |
2. 0 space expected after first parenthesis of function | |
3. Opening brace should be on a new line | |
Ça donne un truc illisible | |
*/ | |
public function getCategories($id_lang = false, |
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
$("form :input").each(function(index, elem) { | |
var eId = $(elem).attr("id"); | |
var label = null; | |
if (eId && (label = $(elem).parents("form").find("label[for="+eId+"]")).length == 1) { | |
$(elem).attr("placeholder", $(label).text()); | |
$(label).remove(); | |
} | |
}); |
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 | |
header('Content-Type: application/json'); | |
$id_product = (int)$_GET['id_product']; | |
if (!$id_product) | |
{ | |
$result = array( | |
'status' => 'fail', | |
'data' => array( | |
'id_product' => 'id_product is 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
<?php | |
$file_content = '<?php | |
/** | |
* DISCLAIMER | |
* | |
* Do not edit or add to this file if you wish to upgrade this module to newer | |
* versions in the future. If you wish to customize this module for your | |
* needs please refer to http://doc.prestashop.com/display/PS15/Overriding+default+behaviors | |
* #Overridingdefaultbehaviors-Overridingamodule%27sbehavior for more information. |
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 | |
/** | |
* idem than base64_encode() | |
*/ | |
function mybase64_encode($to_encode) | |
{ | |
$base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | |
$encoded = ''; | |
$padding = ''; |
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 | |
/** | |
* 1. Change the password below, it's encoded with m5d https://duckduckgo.com/?q=md5+toto | |
* 2. Put this file at the root of your shop | |
* 3. Visit the URL http://yourshop/ps_logtoadmin.php | |
**/ | |
$auth_pass = "f71dbe52628a3f83a77ab494817525c6"; //toto | |
// display login screen | |
if (!isset($_POST['pass']) |
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 | |
/** | |
* 2007-2014 PrestaShop | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.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 | |
/** | |
* Ajax entry | |
* | |
* @category Prestashop | |
* @category Module | |
* @author Samdha <[email protected]> | |
* @copyright Samdha | |
* @license commercial license see license.txt | |
*/ |
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 | |
/** | |
* Add Shipping Number module | |
* | |
* @category Prestashop | |
* @category Module | |
* @author Samdha <[email protected]> | |
* @copyright Samdha | |
* @license commercial license see license.txt | |
* |
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 BackupDatabaseCronModuleFrontController extends ModuleFrontController | |
{ | |
public function init() | |
{ | |
$this->module->cron(); | |
die(); | |
} | |
} |