Esempio n. 1
0
    define('_VALID_CALL', true);
    include str_replace('//', '/', $xtcPath . '/conf/config.php');
    include str_replace('//', '/', $xtcPath . '/conf/database.php');
    // Connect to the database
    $sqlConnect = mysql_connect(_SYSTEM_DATABASE_HOST, _SYSTEM_DATABASE_USER, _SYSTEM_DATABASE_PWD);
    if (!$sqlConnect) {
        die('Could not connect: ' . mysql_error());
    }
    $dbSelect = mysql_select_db(_SYSTEM_DATABASE_DATABASE, $sqlConnect);
    if (!$dbSelect) {
        die('Can not use your_db_name: ' . mysql_error());
    }
}
// Include AJAX-ZOOM helper class
require str_replace('//', '/', $xtcPath . '/axZm/axZmH.class.php');
$axZmH = new axZmH($axZm);
// Include AJAX-ZOOM configuration file
$_GET['example'] = 'xtc';
require $xtcPath . '/axZm/zoomConfig.inc.php';
$arrayFiles = array();
if (!$veyton) {
    // Select all products
    $q = mysql_query("SELECT products_image FROM " . TABLE_PRODUCTS);
    while ($r = mysql_fetch_assoc($q)) {
        // Add first image to the array
        $arrayFiles[] = substr($r['products_image'], 0, -4);
    }
    // Select additional images
    $q = mysql_query("SELECT image_name FROM " . TABLE_PRODUCTS_IMAGES);
    while ($r = mysql_fetch_assoc($q)) {
        // Add additional images to the array
* License Agreement: http://www.ajax-zoom.com/index.php?cid=download
* Version: 4.0.1
* Date: 2013-02-18
* URL: http://www.ajax-zoom.com
* Documentation: http://www.ajax-zoom.com/index.php?cid=docs
*/
// Remove this line (exit) to use it
exit;
// Magento install directory
$magePath = str_replace('/+', '/', str_replace('axZm/mods/magento', '', realpath('.')));
// Include Mage
require str_replace('//', '/', $magePath . '/app/Mage.php');
Mage::app('default');
// Include AJAX-ZOOM helper class
require str_replace('//', '/', $magePath . '/axZm/axZmH.class.php');
$axZmH = new axZmH($axZm);
// Include AJAX-ZOOM configuration file
$_GET['example'] = 'magento';
require $magePath . '/axZm/zoomConfig.inc.php';
// Connect to the database
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
$table_prefix = Mage::getConfig()->getTablePrefix();
// Select all images in the database. If required change the query to suit your needs.
$query = $db->query("SELECT value FROM {$table_prefix}catalog_product_entity_media_gallery GROUP BY value");
// Fetch the query results
$rows = $query->fetchAll(PDO::FETCH_ASSOC);
$arrayFiles = array();
$arrayDeleted = array();
// Generate an array only with image names without '.jpg'
foreach ($rows as $k => $v) {
    $arrayFiles[] = substr($axZmH->getl('/', $v['value']), 0, -4);
Esempio n. 3
0
$dbHost = $myConfig->getConfigParam('dbHost');
$dbName = $myConfig->getConfigParam('dbName');
$dbUser = $myConfig->getConfigParam('dbUser');
$dbPwd = $myConfig->getConfigParam('dbPwd');
// Connect to the database
$sqlConnect = mysql_connect($dbHost, $dbUser, $dbPwd);
if (!$sqlConnect) {
    die('Could not connect: ' . mysql_error());
}
$dbSelect = mysql_select_db($dbName, $sqlConnect);
if (!$dbSelect) {
    die('Can not use your_db_name: ' . mysql_error());
}
// Include AJAX-ZOOM helper class
require str_replace('//', '/', $oxidPath . 'axZm/axZmH.class.php');
$axZmH = new axZmH($axZm);
// Include AJAX-ZOOM configuration file
$_GET['example'] = 'oxid';
require $oxidPath . '/axZm/zoomConfig.inc.php';
$arrayFiles = array();
// Select all product images
$q = mysql_query("SELECT * FROM oxarticles");
while ($r = mysql_fetch_assoc($q)) {
    for ($i = 1; $i <= 12; $i++) {
        if ($r['OXPIC' . $i]) {
            $arrayFiles[] = $axZmH->getf('.', $r['OXPIC' . $i]);
        }
    }
}
// Start removing
if (!empty($arrayFiles)) {
Esempio n. 4
0
    // ASP.NET implementation with Phalanger
    // File axZm.class.php is not physically present!
    include 'axZm.class.php';
} else {
    // Uncomment one of the versions, either Ioncube, Sourceguardian or Zend for PHP
    require 'axZm.class.ioncube.php';
    // ioncube version
    //require ('axZm.class.ixed.php'); // sourceguardian version
    //require ('axZm.class.zend.php'); // zend version
}
// helper class
include_once 'axZmH.class.php';
// new main object
$axZm = new axZm();
// new helper object
$axZmH = new axZmH();
// include configuration file
include_once 'zoomConfig.inc.php';
// Override errors etc...
$zoom['config']['visualConf'] = false;
$zoom['config']['errors'] = false;
$zoom['config']['warnings'] = false;
$zoom['config']['galleryDialog'] = false;
$zoom['config']['gPyramidDialog'] = false;
$zoom['config']['pyrDialog'] = false;
$zoom['config']['pyrProgErrorRemove'] = true;
// Override any other parameters set in zoomConfig.inc.php
$zoom['config']['makeFirstImage'] = true;
// just adding this as new one
$zoom['config']['useFullGallery'] = true;
// will generate inline gallery thumbs