$value) { switch($j) { case 0: if($value < 10) { $xsec = "0".$value; } else { $xsec = $value; } break; case 1: if($value < 10) { $xmin = "0".$value; } else { $xmin = $value; } break; case 2: if($value < 10) { $xhrs = "0".$value; } else { $xhrs = $value; } break; case 3: if($value < 10) { $xday = "0".$value; } else { $xday = $value; } break; case 5: if($value < 10) { $xmon = "0".$value; } else { $xmon = $value; } break; case 6: $xyr = $value; break; } $j++; } $entryDate = $xyr."-".$xmon."-".$xday." ".$xhrs.":".$xmin.":".$xsec; return $entryDate; } /* Create a thumbnail of $srcFile and save it to $destFile. The thumbnail will be $width pixels. */ function createThumbnail($srcFile, $destFile, $width, $quality = 75) { $thumbnail = ''; if (file_exists($srcFile) && isset($destFile)) { $size = getimagesize($srcFile); $w = number_format($width, 0, ',', ''); $h = number_format(($size[1] / $size[0]) * $width, 0, ',', ''); $thumbnail = copyImage($srcFile, $destFile, $w, $h, $quality); } // return the thumbnail file name on sucess or blank on fail return basename($thumbnail); } /* Copy an image to a destination file. The destination image size will be $w X $h pixels */ function copyImage($srcFile, $destFile, $w, $h, $quality = 75) { $tmpSrc = pathinfo(strtolower($srcFile)); $tmpDest = pathinfo(strtolower($destFile)); $size = getimagesize($srcFile); if ($tmpDest['extension'] == "gif" || $tmpDest['extension'] == "jpg") { $destFile = substr_replace($destFile, 'jpg', -3); $dest = imagecreatetruecolor($w, $h); imageantialias($dest, TRUE); } elseif ($tmpDest['extension'] == "png") { $dest = imagecreatetruecolor($w, $h); imageantialias($dest, TRUE); } else { return false; } switch($size[2]) { case 1: //GIF $src = imagecreatefromgif($srcFile); break; case 2: //JPEG $src = imagecreatefromjpeg($srcFile); break; case 3: //PNG $src = imagecreatefrompng($srcFile); break; default: return false; break; } imagecopyresampled($dest, $src, 0, 0, 0, 0, $w, $h, $size[0], $size[1]); switch($size[2]) { case 1: case 2: imagejpeg($dest,$destFile, $quality); break; case 3: imagepng($dest,$destFile); } return $destFile; } function generatePwd () { $str = ''; $str .= rand(0,9); $upper = chr(rand(65, 90)); $str .= $upper; $num = rand(0,9); $str .= $num; $lower = chr(rand(97, 122)); $str .= $lower; $num = rand(0,9); $str .= $num; $upper = chr(rand(65, 90)); $str .= $upper; $lower = chr(rand(97, 122)); $str .= $lower; $num = rand(0,9); $str .= $num; return $str; } function validate($str) { //email /* if (!preg_match("/^([a-zA-Z0-9])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/", $str)) { return 'invalid email address'; } else { return 'valid email address'; } */ //url //$regexp = "(http(s?)://|[a-zA-Z0-9\-]+\.)[a-zA-Z0-9/~\-]+\.[a-zA-Z0-9/~\-_,&\?\.;]+[^\.,\s<]"; //phone: //$regexp = "^\([0-9]{3}\)\s?[0-9]{3}(-|\s)?[0-9]{4}$|^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$"; //zip: /* if(!ereg($regexp, $str)) { return 'invalid phone'; } else { return 'valid phone'; } */ //zip: //$regexp = "(?^\d{5})([\- ]?(?\d{4})?$)"; //$regexp = "^(\d{5})$|^([a-zA-Z]\d[a-zA-Z]( )?\d[a-zA-Z]\d)$"; //$regexp = "^(?!00000)(?\d{5})(?:(?:[- ]?)(?\d{4}))?$"; //$regexp = "^\d{5}$|^\d{5}-\d{4}$"; //$regexp = "^\d{5}(-\d{4})?$"; //$regexp = "^((\d{5}-\d{4})|(\d{5})|([AaBbCcEeGgHhJjKkLlMmNnPpRrSsTtVvXxYy]\d[A-Za-z]\s?\d[A-Za-z]\d))$"; //$regexp = "^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$"; //$regexp = "^(?^\d{5})$"; //$regexp = "(^\d{5}$)|(^\d{5}-\d{4}$)"; if(empty($str) || strlen($str) != 5 ) { return 'invalid zip'; } else { $regexp = "[0-9]"; if(!ereg($regexp, $str)) { return 'invalid zip'; } else { return 'valid zip'; } } } function showHeader($page) { $today = getdate(); $theDate = prepDate($today); $theDate = convertDate($theDate); switch($page) { case 'Admin Interface': case 'Add New Product': case 'Add New Advertisement': case 'Modify Product': case 'Modify Advertisement': $cssPath = '../library/styles.css'; $jsPath = '../library/seven.js'; pageHead_admin($page, $jsPath, $cssPath, $theDate); break; case 'Stuff': case 'Shopping Cart': case 'Checkout - Step 1 of 2': case 'Checkout - Step 2 of 2': case 'Checkout - Step 3 of 3': case 'Checkout Error': $cssPath = 'library/styles.css'; $jsPath = 'library/seven.js'; $jsPath2 = 'library/chekbrwsr.js'; pageHead($page, $jsPath, $cssPath, $theDate, $jsPath2); break; case 'Checkout Completed Successfully': $cssPath = 'library/styles.css'; $jsPath = 'library/seven.js'; pageHead_noCart($page, $jsPath, $cssPath, $theDate); break; case 'Preview New Product': case 'Preview Modified Product': case 'Preview New Advertisement': case 'Preview Modified Advertisement': $cssPath = 'library/styles.css'; $jsPath = 'library/seven.js'; pageHead_admin($page, $jsPath, $cssPath, $theDate); break; case 'Product List': case 'Advertisement List': $cssPath = '../../library/styles.css'; $jsPath = '../../library/seven.js'; pageHead_admin($page, $jsPath, $cssPath, $theDate); break; default: echo "
No head page specified.
"; } } function pageHead_admin($page, $jsPath, $cssPath, $theDate) { $str = ''; $str .= ''; $str .= ''; $str .= ''; $str .= 'The 7% Factor - '.$page.''; $str .= ''; $str .= ''; $str .= ''; $str .= ''; $str .= ''; $str .= '
'; $str .= ''; $str .= ''; $str .= ''; $str .= '
The 7% Factor - Administration
'.$page.''.$theDate.'
'; echo $str; } function pageHead($page, $jsPath, $cssPath, $theDate, $jsPath2) { ?> The 7% Factor - <? echo $page ?>
The 7% Factor
The 7% Factor - <? echo $page ?>
The 7% FactorNo cart.
createSessVars error, from = ".$from.""; } return $frm_arr; } function displayAdvertForm() { ?>
 

Use the following form to create your marketplace advertisement.

Product Name:
Link Type:Website Link No Website
Link URL:
Image Type:Upload Image No Image
Image File:
(.jpg & .gif only)

* Image size 75 pixels wide by a maximum of 110 pixels high
Advertisement Text:
(HTML not accepted)
Category:
 
Company Name:
Name is required
Address 1:
Name is required
Address 2:
City:
Name is required
State:
Zip:
Country:USA Only
Contact Name:
Email Address:
Phone Number:
 
Billing Option:
Billing Cycle:
* Recurring ads are billed every 4 weeks and can be cancelled at any time prior to the next billing cycle. Weekly ads do not automatically renew.
 
$sc_name, 'address' => $sc_address, 'phone' => $sc_phone, 'email' => $sc_email, 'sendOrderEmail' => $sc_order_email, 'shippingCost' => $sc_shipping_cost, 'currency' => $cy_symbol); } else { $shopConfig = array('name' => '', 'address' => '', 'phone' => '', 'email' => '', 'sendOrderEmail' => '', 'shippingCost' => '', 'currency' => ''); } return $shopConfig; } ?>
Action not set.