<?php
// Variables for dynamic pricing chart current pricing calculations used
$pshort = 2000;//pixel size from image just uploaded or selected to go to Step 2 - shorter of the two pixel dimensions - logical calcualtion
$plong = 3000; // same as above - longer of the two pixel dimensions
$shortmax = round($pshort/72); //values should also be shown below uploaded image summary div as suggested maximum print size
$longmax = round($plong/72);
$s1 = 8; //set short dimensions for table - 9 rows set
$s2 = 10;
$s3 = 12;
$s4 = 14;
$s5 = 16;
$s6 = 10;
$s7 = 10;
$s8 = 10;
$s9 = 10;
// $s10 = ; //from drop down in custom row ten - update remaing buttons on change of selections
$L1 = round($s1*$plong/$pshort); //nearest inch length-long inch based on image pixel size and set shorts
$L2 = round($s2*$plong/$pshort);
$L3 = round($s3*$plong/$pshort);
$L4 = round($s4*$plong/$pshort);
$L5 = round($s5*$plong/$pshort);
$L6 = round($s6*$plong/$pshort);
$L7 = round($s7*$plong/$pshort);
$L8 = round($s8*$plong/$pshort);
$L9 = round($s9*$plong/$pshort);
$lus1 = round($s1*$L1*0.035,1); //lustre paper pricing with too small or too large for shipping argument
if ($L2 > $longmax or $L2 > 48){
$lus2 = "NA";
} else {
$lus2 = round($s2*$L2*0.035,1);
}
if ($L3 > $longmax or $L3 > 48){
$lus3 = "NA";
} else {
$lus3 = round($s3*$L3*0.035,1);
}
if ($L4 > $longmax or $L4 > 48){
$lus4 = "NA";
} else {
$lus4 = round($s4*$L4*0.035,1);
}
if ($L5 > $longmax or $L5 > 48){
$lus5 = "NA";
} else {
$lus5 = round($s5*$L5*0.035,1);
}
if ($L6 > $longmax or $L6 > 48){
$lus6 = "NA";
} else {
$lus6 = round($s6*$L6*0.035,1);
}
if ($L7 > $longmax or $L7 > 48){
$lus7 = "NA";
} else {
$lus7 = round($s7*$L7*0.035,1);
}
if ($L8 > $longmax or $L8 > 48){
$lus8 = "NA";
} else {
$lus8 = round($s8*$L8*0.035,1);
}
if ($L9 > $longmax or $L9 > 48){
$lus9 = "NA";
} else {
$lus9 = round($s9*$L9*0.035,1);
}
$cot1 = round($s1*$L1*0.04,1); //cotton paper pricing with too small or too large for shipping argument
if ($L2 > $longmax or $L2 > 46){
$cot2 = "NA";
} else {
$cot2 = round($s2*$L2*0.04,1);
}
if ($L3 > $longmax or $L3 > 46){
$cot3 = "NA";
} else {
$cot3 = round($s3*$L3*0.04,1);
}
if ($L4 > $longmax or $L4 > 46){
$cot4 = "NA";
} else {
$cot4 = round($s4*$L4*0.04,1);
}
if ($L5 > $longmax or $L5 > 46){
$cot5 = "NA";
} else {
$cot5 = round($s5*$L5*0.04,1);
}
if ($L6 > $longmax or $L6 > 46){
$cot6 = "NA";
} else {
$cot6 = round($s6*$L6*0.04,1);
}
if ($L7 > $longmax or $L7 > 46){
$cot7 = "NA";
} else {
$cot7 = round($s7*$L7*0.04,1);
}
if ($L8 > $longmax or $L8 > 46){
$cot8 = "NA";
} else {
$cot8 = round($s8*$L8*0.04,1);
}
if ($L9 > $longmax or $L9 > 46){
$cot9 = "NA";
} else {
$cot9 = round($s9*$L9*0.04,1);
}
$roll1 = round(($s1+4)*($L1+4)*0.055+4); //rollled canvas pricing with too small or too large for shipping argument
if ($L2 > $longmax or $L2 > 46){
$roll2 = "NA";
} else {
$roll2 = round($s2*$L2*0.04,1);
}
if ($L3 > $longmax or $L3 > 46){
$roll3 = "NA";
} else {
$roll3 = round($s3*$L3*0.04,1);
}
if ($L4 > $longmax or $L4 > 46){
$roll4 = "NA";
} else {
$roll4 = round($s4*$L4*0.04,1);
}
if ($L5 > $longmax or $L5 > 46){
$roll5 = "NA";
} else {
$roll5 = round($s5*$L5*0.04,1);
}
if ($L6 > $longmax or $L6 > 46){
$roll6 = "NA";
} else {
$roll6 = round($s6*$L6*0.04,1);
}
if ($L7 > $longmax or $L7 > 46){
$roll7 = "NA";
} else {
$roll7 = round($s7*$L7*0.04,1);
}
if ($L8 > $longmax or $L8 > 46){
$roll8 = "NA";
} else {
$roll8 = round($s8*$L8*0.04,1);
}
if ($L9 > $longmax or $L9 > 46){
$roll9 = "NA";
} else {
$roll9 = round($s9*$L9*0.04,1);
}
echo $roll1
?>
preferences:
50.7 ms | 402 KiB | 5 Q