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 | |
require 'config.core.php'; | |
require MODX_CORE_PATH . 'config/' . MODX_CONFIG_KEY . '.inc.php'; | |
$filename = $dbase . '-' . date('Y-m-d') . '.sql.gz'; | |
$mime = "application/x-gzip"; | |
header('Content-Type: ' . $mime); | |
header('Content-Disposition: attachment; filename="' . $filename . '"'); |
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 | |
require_once 'postcalc_light_config.php'; | |
global $modx; | |
function postcalc_request($From, $To, $Weight, $Valuation = 0, $Country = 'RU') | |
{ | |
$key = ''; //Ваш ключ | |
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 | |
/** @var $modx modX */ | |
if (!$modx = $object->xpdo AND !$object->xpdo instanceof modX) { | |
return true; | |
} | |
/** @var $options */ | |
switch ($options[xPDOTransport::PACKAGE_ACTION]) { | |
case xPDOTransport::ACTION_INSTALL: |
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 | |
if ($modx->event->name == 'OnDocFormSave') { | |
if ($mode == 'new') { | |
$sellUSD = $modx->stripTags($_POST['sellUSD']); | |
$buyUSD = $modx->stripTags($_POST['buyUSD']); | |
$exchange = array( | |
'sellUSD' => $sellUSD, | |
'buyUSD' => $buyUSD | |
); | |
// $prop["exchange"] = $exchange; |