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'; //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);
if ($download['customizeID']) { $download['customizeID'] = k_decrypt($download['customizeID']); } // Customize ID if ($download['invoiceItemID']) { $download['invoiceItemID'] = k_decrypt($download['invoiceItemID']); } if ($download['memberID']) { $download['memberID'] = k_decrypt($download['memberID']); } if ($download['downloadTypeID']) { $download['downloadTypeID'] = k_decrypt($download['downloadTypeID']); } } if ($download['externalLink']) { $download['externalLink'] = k_decrypt($download['externalLink']); } // Decrypt External Link //print_k($download); exit; function getHeaderscURL($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_MAXREDIRS, 3); curl_exec($ch); $headers = curl_getinfo($ch); curl_close($ch); return $headers;
require_once BASE_PATH . '/assets/includes/session.php'; require_once BASE_PATH . '/assets/includes/initialize.php'; 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'; require_once BASE_PATH . '/assets/classes/mediatools.php'; $mediaDate = new kdate(); //GET ID PASSED TO THIS FILE if ($_GET['id']) { if ($config['EncryptIDs'] == 1) { $id = k_decrypt($_GET['id']); } else { $id = $_GET['id']; } } switch ($mode) { /* function getXML($table,$query,$limit,$sortBy,$sortOrder,$title,$mode) $table = table without prefix, $query = additional queries or conditions needed, $limit = limit of query how many results, $sortyBy = sort by table field, $sortOrder = sort order of field, $title = title of xml, $mode = 1 = gallery of some type, 2 = news or articles (non-photos) $case = actual case called below
exit; */ if (strpos($_SERVER['HTTP_REFERER'], 'cart.php') or strpos($_SERVER['HTTP_REFERER'], 'index.php')) { // Clear the crumbs if coming from the cart or index unset($_SESSION['crumbsSession']); } try { //$useGalleryID = $galleryID; // Original untouched gallery ID $useMediaID = $mediaID; // Original untouched media ID if (!$mediaID) { // Make sure a media ID was passed $smarty->assign('noAccess', 1); } else { if ($config['EncryptIDs']) { $mediaID = k_decrypt($mediaID); $useGalleryID = k_encrypt($_SESSION['id']); } else { $useGalleryID = $_SESSION['id']; } //echo $mediaID; 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 if (@(!in_array($mediaID, $_SESSION['viewedMedia']))) { $newMediaViews = $media['views'] + 1;
$commissionItemPrice = $itemPrice; $commissionItemPercent = $digital['commission']; //$commissionItemPrice = round($digital['price']*($digital['commission']/100),2); } else { // Dollar Value $commissionItemPrice = $digital['commission_dollar']; $commissionItemPercent = 100; } //echo $itemPrice; exit; // Testing $digital = digitalsList($digital, $mediaID); //print_r($digital['price']); } } if ($licenseType == 'rm') { $itemPrice = k_decrypt($rmPriceEnc); $itemCredits = k_decrypt($rmCreditsEnc); //echo $itemPrice; exit; // Create RM selections string foreach ($rmGroup as $grpID => $selectedID) { $rmSelections .= "{$grpID}:{$selectedID},"; } } mysqli_query($db, "\r\n\t\t\t\t\t\t\tUPDATE {$dbinfo[pre]}invoice_items SET \r\n\t\t\t\t\t\t\tprice='{$itemPrice}',\r\n\t\t\t\t\t\t\tprice_total='{$itemPrice}',\r\n\t\t\t\t\t\t\tcredits='{$itemCredits}',\r\n\t\t\t\t\t\t\tcredits_total='{$itemCredits}',\r\n\t\t\t\t\t\t\trm_selections='{$rmSelections}'\r\n\t\t\t\t\t\t\tWHERE oi_id = '{$cartItemID}'\r\n\t\t\t\t\t\t\t"); // Update the invoice item with the prices if ($owner) { //echo $commission[memPercent]; exit; // testing $commission['oitemID'] = $cartItemID; //commission // for commission percentage //commission_type = 1 // dollar //commission_dollar $commission['comTotal'] = $commissionItemPrice;
//header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($thumbnail)) . ' GMT'); //ob_clean(); //flush(); readfile($cachePathFile); exit; } else { // Cleanup old cached file @unlink($cachePathFile); } } } require_once BASE_PATH . '/assets/includes/initialize.php'; require_once BASE_PATH . '/assets/classes/imagetools.php'; require_once BASE_PATH . '/assets/classes/mediatools.php'; $mediaID = k_decrypt($mediaID); $folderID = k_decrypt($folderID); $hcrop = $_GET['hcrop']; //echo 'mid'.$mediaID; exit; if (!is_numeric($mediaID) or !is_numeric($folderID)) { die('An error has occurred!'); } // Check to make sure the IDs are numeric try { $mediaInfo = new mediaTools($mediaID); $folderInfo = $mediaInfo->getFolderInfoFromDB($folderID); $folderName = $mediaInfo->getFolderName(); switch ($type) { default: case "thumbnail": if ($size and !is_numeric($size)) { header("location: error.php?eType=invalidQuery");
$content = getDatabaseContent('emailForgottenPassword'); // Get content from db $content['name'] = $smarty->fetch('eval:' . $content['name']); $content['body'] = $smarty->fetch('eval:' . $content['body']); $options['replyEmail'] = $config['settings']['support_email']; $options['replyName'] = $config['settings']['business_name']; //$form['toEmail'] kmail($form['toEmail'], $form['toEmail'], $config['settings']['support_email'], $config['settings']['business_name'], $content['name'], $content['body'], $options); // Send email echo '{"errorCode": "sentPasswordToEmail"}'; } else { echo '{"errorCode": "passwordToEmailFailed"}'; } break; case "deleteContrMedia": $mediaID = k_decrypt($_REQUEST['mediaID']); try { $media = new mediaTools($mediaID); $media->deleteMedia(); echo '{"errorCode": "0","mediaID":"' . $mediaID . '"}'; } catch (Exception $e) { $errorMessage = $e->getMessage(); echo '{"errorCode": "1","mediaID":"' . $mediaID . '","errorMessage":"' . $errorMessage . '"}'; } break; case "removeContrKeyword": mysqli_query($db, "DELETE FROM {$dbinfo[pre]}keywords WHERE key_id = '{$keyID}'"); // Remove keyword from DB echo '{"errorCode": "1","keyID":"' . $keyID . '","errorMessage":""}'; break; case "addContrKeyword":
// Define the base path define('PAGE_ID', 'hover'); // Page ID define('ACCESS', 'public'); // Page access type - public|private define('INIT_SMARTY', true); // Use Smarty require_once BASE_PATH . '/assets/includes/session.php'; require_once BASE_PATH . '/assets/includes/initialize.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/header.inc.php'; require_once BASE_PATH . '/assets/classes/mediatools.php'; try { $unencryptedMediaID = k_decrypt($mediaID); // Get the mediaID unencrypted $sql = "SELECT SQL_CALC_FOUND_ROWS * FROM {$dbinfo[pre]}media WHERE media_id = '{$unencryptedMediaID}'"; $mediaObj = new mediaList($sql); // Create a new mediaList object if ($returnRows = $mediaObj->getRows()) { $media = $mediaObj->getSingleMediaDetails(); } $mediaInfo = new mediaTools($unencryptedMediaID); $thumb = $mediaInfo->getThumbInfoFromDB(); $sample = $mediaInfo->getSampleInfoFromDB(); if ($media['dsp_type'] == 'video') { if ($video = $mediaInfo->getVidSampleInfoFromDB()) { $videoCheck = $mediaInfo->verifyVidSampleExists(); if ($videoCheck['status']) { // Make sure the video exists
require_once BASE_PATH . '/assets/includes/errors.php'; require_once BASE_PATH . '/assets/classes/invoicetools.php'; require_once BASE_PATH . '/assets/classes/mediatools.php'; //sleep(2); try { $queryStr = k_decrypt($dlKey); parse_str($queryStr, $downloadKey); // Parse the query string //$downloadKey['collectionID']; //$downloadKey['uorderID']; if ($config['EncryptIDs']) { $downloadKey['collectionID'] = k_decrypt($downloadKey['collectionID']); // Collection ID $downloadKey['uorderID'] = k_decrypt($downloadKey['uorderID']); // Order ID $downloadKey['invoiceItemID'] = k_decrypt($downloadKey['invoiceItemID']); // Invoice Item ID } //print_r($downloadKey); exit; $invoice = new invoiceTools(); $invoice->setOrderID($downloadKey['uorderID']); // Set the order ID $invoiceItem = $invoice->getSingleInvoiceItem($downloadKey['invoiceItemID']); //echo $downloadKey['invoiceItemID']; exit; if ($orderInfo = $invoice->getOrderDetails()) { $collectionResult = mysqli_query($db, "\t\t\t\r\n\t\t\t\tSELECT SQL_CALC_FOUND_ROWS *\r\n\t\t\t\tFROM {$dbinfo[pre]}collections \r\n\t\t\t\tWHERE coll_id = '{$downloadKey[collectionID]}'\r\n\t\t\t"); if ($returnRows = getRows()) { $collection = mysqli_fetch_array($collectionResult); $collectionArray = collectionsList($collection); $smarty->assign('collectionRows', $returnRows); $smarty->assign('collection', $collectionArray);