// Check availability if ($filecheck['status']) { if (downloadcURL($download['externalLink'], $tempPath . $tempFileName)) { $folderPath = $tempPath . $tempFileName; // The full folder path } else { die('File download failed!'); } } else { die("File cannot be found at link provided."); } } else { $folderPath = "{$config[settings][library_path]}/{$folderName}"; // The full folder path } idCheck($download['profileID']); // Make sure ID is numeric // This is a digital variation of - get the details $dspResult = mysqli_query($db, "\r\n\t\t\tSELECT *\r\n\t\t\tFROM {$dbinfo[pre]}media_digital_sizes \r\n\t\t\tWHERE ds_id = '{$download[profileID]}' \r\n\t\t\tAND media_id = '{$download[mediaID]}'\r\n\t\t\t"); $dsp = mysqli_fetch_array($dspResult); //echo $download[profileID]; exit; // Get the original digital profile details $digitalResult = mysqli_query($db, "\r\n\t\t\tSELECT *\r\n\t\t\tFROM {$dbinfo[pre]}digital_sizes \r\n\t\t\tWHERE ds_id = '{$download[profileID]}'\r\n\t\t\t"); if ($digitalVarRows = mysqli_num_rows($digitalResult)) { $digital = mysqli_fetch_array($digitalResult); $download['deliveryMethod'] = $digital['delivery_method']; // Take setting from dp } //print_r($digital); exit; // Testing if ($dsp['customized']) { $digital['width'] = $dsp['width'] ? $dsp['width'] : $digital['width'];
require_once BASE_PATH . '/assets/includes/commands.php'; require_once BASE_PATH . '/assets/includes/init.member.php'; require_once BASE_PATH . '/assets/includes/security.inc.php'; require_once BASE_PATH . '/assets/includes/language.inc.php'; //require_once BASE_PATH.'/assets/includes/cart.inc.php'; //require_once BASE_PATH.'/assets/includes/affiliate.inc.php'; require_once BASE_PATH . '/assets/includes/header.inc.php'; require_once BASE_PATH . '/assets/includes/errors.php'; try { $useMediaID = $mediaID; // Original untouched media ID if (!$mediaID) { // Make sure a media ID was passed exit; } else { idCheck($mediaID); // Make sure ID is numeric $sql = "SELECT SQL_CALC_FOUND_ROWS * FROM {$dbinfo[pre]}media WHERE media_id = '{$mediaID}'"; $mediaInfo = new mediaList($sql); if ($mediaInfo->getRows()) { $media = $mediaInfo->getSingleMediaDetails('preview'); $galleryIDArray = $mediaInfo->getMediaGalleryIDs(); // Get an array of galleries this media is in switch ($incMode) { default: case 'digital': $galleryIDArrayFlat = $galleryIDArray ? implode(",", $galleryIDArray) : 0; // Get the gallery IDs for this photo require_once 'media.details.inc.php'; $smarty->assign('mediaID', $mediaID); $smarty->display('download.mini.window.tpl');
require_once BASE_PATH . '/assets/includes/affiliate.inc.php'; //define('META_TITLE',''); // Override page title, description, keywords and page encoding here //define('META_DESCRIPTION',''); //define('META_KEYWORDS',''); //define('PAGE_ENCODING',''); require_once BASE_PATH . '/assets/includes/header.inc.php'; require_once BASE_PATH . '/assets/includes/errors.php'; try { if ($config['EncryptIDs']) { // Decrypt IDs $id = k_decrypt($id); } if (!is_numeric($id)) { $id = k_decrypt($id); } idCheck($id); // Make sure ID is numeric $promoResult = mysqli_query($db, "\r\n\t\t\tSELECT *\r\n\t\t\tFROM {$dbinfo[pre]}promotions \r\n\t\t\tLEFT JOIN {$dbinfo[pre]}perms\r\n\t\t\tON ({$dbinfo[pre]}promotions.promo_id = {$dbinfo[pre]}perms.item_id AND {$dbinfo[pre]}perms.perm_area = 'promotions') \r\n\t\t\tWHERE {$dbinfo[pre]}promotions.promo_id = {$id}\r\n\t\t\tAND ({$dbinfo[pre]}promotions.everyone = 1 OR {$dbinfo[pre]}perms.perm_value IN ({$memberPermissionsForDB}))\r\n\t\t\t"); if ($returnRows = mysqli_num_rows($promoResult)) { $promo = mysqli_fetch_assoc($promoResult); $promoArray = promotionsList($promo); if ($promo['active'] == 1 and $promo['deleted'] == 0) { $smarty->assign('promo', $promoArray); $smarty->assign('promoRows', $returnRows); } else { $smarty->assign('noAccess', 1); } } else { $smarty->assign('noAccess', 1); } $smarty->display('promo.tpl');
if (!$miniCart) { unset($_SESSION['currentMode']); } // Unset the gallery mode //print_k($_SESSION['cartTotalsSession']); exit; // Testing try { if ($config['EncryptIDs']) { $id = k_decrypt($id); if ($mediaID) { $mediaID = k_decrypt($mediaID); idCheck($mediaID); // Make sure ID is numeric } if ($profileID) { $profileID = k_decrypt($profileID); idCheck($profileID); // Make sure ID is numeric } } /* * Update the pay type on a cart item */ if ($cartMode == 'updatePayType') { $cid = k_decrypt($cid); mysqli_query($db, "UPDATE {$dbinfo[pre]}invoice_items SET paytype='{$payType}' WHERE oi_id = '{$cid}'"); @mysqli_query($db, "UPDATE {$dbinfo[pre]}commission SET comtype='{$payType}' WHERE oitem_id = '{$cid}'"); // Update the pay type in the commissions table } /* * Apply a coupon code */