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('SYSPATH') or die('No direct access allowed.'); | |
/** | |
* Ajax Template Controller template | |
* | |
* @package Templates | |
* @author Sergei Gladkovskiy <[email protected]> | |
*/ | |
abstract class Controller_Ajax_Template extends Controller { |
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 | |
/* vars for export */ | |
// database record to be exported | |
$db_record = 'XXXXXXXXX'; | |
// optional where query | |
$where = 'WHERE 1 ORDER BY 1'; | |
// filename for export | |
$csv_filename = 'db_export_'.$db_record.'_'.date('Y-m-d').'.csv'; | |
// database variables |
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(php_sapi_name() != 'cli') | |
{ | |
die('only via cli'); | |
} | |
require 'app/Mage.php'; | |
umask(0); |