From ee468647aa498ff8229b9e98d4abf286c01c18bf Mon Sep 17 00:00:00 2001
From: Steve Sutton
We will email you a link to the PDF version of the {brochure}.
+ORDER BY MAIL:
+{contactForm:h} diff --git a/Toolkit/Contacts/templates/contactForm.html b/Toolkit/Contacts/templates/contactForm.html new file mode 100644 index 0000000..2f2f84a --- /dev/null +++ b/Toolkit/Contacts/templates/contactForm.html @@ -0,0 +1,92 @@ ++ {sec.header:h} | +||||||||
+ | {elem.html:h} | +|||||||
+ {if:elem.required}*{end:}
+ {if:elem.error} {end:}
+ {elem.label:h} {end:}
+ {else:}
+ {if:elem.isType(#CAPTCHA_Image#)}
+ + {if:elem.error} |
+ {if:elem.required}*{end:}
+ {if:elem.error} {end:}
+ {elem.label:h}
+ {if:elem.error} {end:}
+ |
+ + {else:} + {if:elem.isType(#group#)} + |
+ {if:elem.required}*{end:}
+ {if:elem.error} {end:}
+ {elem.label:h} {end:}
+ {else:}
+ + {if:elem.error} |
+ {if:elem.required}*{end:}
+ {if:elem.error} {end:}
+ {elem.label:h}
+ {if:elem.error} {end:}
+ |
+ {if:elem.isName(#interest#)}
+ + {else:} + |
+ {end:}
+ {end:}
+ {end:}
+ {end:}
+ {if:elem.error} {elem.error} {end:}
+ {if:elem.isType(#group#)}
+ {foreach:elem.elements,gitem}
+ {gitem.label:h}
+ {gitem.html:h}{if:gitem.required}* {end:}
+ {if:elem.separator}{elem.separator:h}{end:}
+ {end:}
+ {else:}
+ {elem.html:h}
+ {if:elem.isName(#captcha_rmv#)}
+ What is this?
+
+ {end:}
+ {end:}
+ |
+
Below is the list of businesses you have added to your Trip Planner. The form below will be sent to each individual business listing that has an email address listed with their business listing. For those businesses with no email address, we have included their phone numbers for you to call directly and request additional information.
+These business listings have no current email address on file. To receive additional information please call the phone numbers listed next to each business name.
+Name + | Phone + | + |
---|---|---|
{member[memberName]} | +{member[memberPhone]} | +Remove | +
This list of businesses will receive the following information form directly to their email account.
+{member[memberName]} | +Remove | +
+ + {subject:h} + +
++ + From {fname:h} {lname:h} + +
+
+
|
+ |||
+
|
+
Dear {fname}
+Your friend {yname} has been to demo.gaslightmedia.com, and thought you might be interested in it.
+Message here.
+Thank you for requesting the {pdfName} Link. Here is the link to the Adobe PDF version: +
+Brochure ({pdfFileSize})
+Thank you for your interest in {client_info[name]:h}'!
+Sincerely,
+{client_info[name]:h}
+{client_info[url]:h}
+ + + diff --git a/Toolkit/Coupons/AdminEditCategoryForm.php b/Toolkit/Coupons/AdminEditCategoryForm.php new file mode 100644 index 0000000..763ab10 --- /dev/null +++ b/Toolkit/Coupons/AdminEditCategoryForm.php @@ -0,0 +1,292 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @version CVS: $Id: AdminEditCategoryForm.php,v 1.1 2010/02/12 21:16:32 jamie Exp $ + * @link http://demo.gaslightmedia.com + */ + +/** + * Coupon Category form + * + * Manages the creation and editing form for manipulating coupon categories + * + * @category Coupons + * @package Toolkit_Coupons + * @author Jamie Kahgee'.print_r($values, true).''; + if (ctype_digit((string)$_GET['id'])) { + // Editing a banner + $coupon = $cFactory->fetch($dbh, $_GET['id']); + } else { + $coupon = $cFactory->createCoupon($values); + } + + + return ctype_digit($_GET['id']) + ? $coupon->update($dbh, $values) + : $coupon->save($dbh); + } + + // }}} + + // {{{ sendCouponToImageServer() + + /** + * Send a coupon image to the image server + * + * Sets the image name in the submit values, so when saving + * the banner, we keep the image that was uploaded. + * + * Injects the thumbnail image of this uploaded coupon into + * the form, this way if validation fails, the thumbnail will + * be shown on the form so the user knows they don't have to + * re-upload the coupon. + * + * @param Toolkit_Image_Server $is Image server + * @param string $file key of upload in $_FILES super array + * + * @return void + * @access protected + */ + protected function sendCouponToImageServer( + Toolkit_Image_Server $is, + $file + ) { + $oldCoupon = $this->getSubmitValue('image'); + if (!empty($oldCoupon)) { + $is->imageDelete($oldCoupon); + } + + $imgTag = '
$desc
"; + } + + $chkBoxTpl = ''; + $chkBox = sprintf($chkBoxTpl, $this->getId()); + + $out = '$desc
"; + } + if (defined("MEMBERS_DB") && MEMBERS_DB) { + $memberName = $this->getMemberName( + Toolkit_Database::getInstance() + ); + if (!empty($memberName)) { + $memberName = "$memberName'.print_r($this, true).''; + $this->sdate = $this->edate = null; + if (isset($data['sdate'])) { + if ($data['sdate'] instanceof Date) { + $this->setSdate($data['sdate']); + } + } + if (isset($data['edate'])) { + if ($data['edate'] instanceof Date) { + $this->setEdate($data['edate']); + } + } + if (isset($data['expiration'])) { + if ($data['expiration'] instanceof Date) { + $this->setExpiration($data['expiration']); + } + } + $this->compareDates(); + if (empty($this->sdate)) { + $this->sdate = $oldSdate; + } + if (empty($this->edate)) { + $this->edate = $oldEdate; + } + + if (isset($data['url'])) { + $this->setUrl($data['url']); + } + if (isset($data['active'])) { + $this->setActive($data['active']); + } + if (isset($data['category'])) { + $this->setCategory($data['category']); + } + parent::update($data); + try { + if (!is_int($this->id)) { + throw new RuntimeException( + '$id is not set. cannot update coupon' + ); + } + + $classData = get_object_vars($this); + if (defined('MEMBERS_DB') && !MEMBERS_DB) { + unset($classData['member']); + } + $classData['image'] = ($data['image']) ? $this->image->getSrc(): ''; + $classData['sdate'] = $this->sdate->format('%m-%d-%Y'); + $classData['edate'] = $this->edate->format('%m-%d-%Y'); + $classData['expiration'] = $this->expiration->format('%m-%d-%Y'); + + $sql = Toolkit_Common::createSQLUpdate( + 'coupons', + array_keys($classData), + array('id = :id') + ); + + $stmt = Toolkit_Common::prepareQuery( + $dbh, + 'coupons', + $sql, + $classData + ); + return $stmt->execute(); + } catch (PDOException $e) { + Toolkit_Logger::logException('DB Error', $e); + throw new Toolkit_Coupons_Exception('Error updating coupon'); + } catch (RuntimeException $e) { + Toolkit_Logger::logException('Runtime Error', $e); + throw new Toolkit_Coupons_Exception('Coupon not set'); + } + + return false; + } + + // }}} +} \ No newline at end of file diff --git a/Toolkit/Coupons/WebCouponFactory.php b/Toolkit/Coupons/WebCouponFactory.php new file mode 100644 index 0000000..31234e3 --- /dev/null +++ b/Toolkit/Coupons/WebCouponFactory.php @@ -0,0 +1,15 @@ + diff --git a/Toolkit/Coupons/class.ezpdf.php b/Toolkit/Coupons/class.ezpdf.php new file mode 100755 index 0000000..0b7e872 --- /dev/null +++ b/Toolkit/Coupons/class.ezpdf.php @@ -0,0 +1,1555 @@ +10); // used for storing most of the page configuration parameters +var $y; // this is the current vertical positon on the page of the writing point, very important +var $ezPages=array(); // keep an array of the ids of the pages, making it easy to go back and add page numbers etc. +var $ezPageCount=0; + +// ------------------------------------------------------------------------------ + +function Cezpdf($paper='a4',$orientation='portrait'){ + // Assuming that people don't want to specify the paper size using the absolute coordinates + // allow a couple of options: + // orientation can be 'portrait' or 'landscape' + // or, to actually set the coordinates, then pass an array in as the first parameter. + // the defaults are as shown. + // + // ------------------------- + // 2002-07-24 - Nicola Asuni (info@tecnick.com): + // Added new page formats (45 standard ISO paper formats and 4 american common formats) + // paper cordinates are calculated in this way: (inches * 72) where 1 inch = 2.54 cm + // + // Now you may also pass a 2 values array containing the page width and height in centimeters + // ------------------------- + + if (!is_array($paper)){ + switch (strtoupper($paper)){ + case '4A0': {$size = array(0,0,4767.87,6740.79); break;} + case '2A0': {$size = array(0,0,3370.39,4767.87); break;} + case 'A0': {$size = array(0,0,2383.94,3370.39); break;} + case 'A1': {$size = array(0,0,1683.78,2383.94); break;} + case 'A2': {$size = array(0,0,1190.55,1683.78); break;} + case 'A3': {$size = array(0,0,841.89,1190.55); break;} + case 'A4': default: {$size = array(0,0,595.28,841.89); break;} + case 'A5': {$size = array(0,0,419.53,595.28); break;} + case 'A6': {$size = array(0,0,297.64,419.53); break;} + case 'A7': {$size = array(0,0,209.76,297.64); break;} + case 'A8': {$size = array(0,0,147.40,209.76); break;} + case 'A9': {$size = array(0,0,104.88,147.40); break;} + case 'A10': {$size = array(0,0,73.70,104.88); break;} + case 'B0': {$size = array(0,0,2834.65,4008.19); break;} + case 'B1': {$size = array(0,0,2004.09,2834.65); break;} + case 'B2': {$size = array(0,0,1417.32,2004.09); break;} + case 'B3': {$size = array(0,0,1000.63,1417.32); break;} + case 'B4': {$size = array(0,0,708.66,1000.63); break;} + case 'B5': {$size = array(0,0,498.90,708.66); break;} + case 'B6': {$size = array(0,0,354.33,498.90); break;} + case 'B7': {$size = array(0,0,249.45,354.33); break;} + case 'B8': {$size = array(0,0,175.75,249.45); break;} + case 'B9': {$size = array(0,0,124.72,175.75); break;} + case 'B10': {$size = array(0,0,87.87,124.72); break;} + case 'C0': {$size = array(0,0,2599.37,3676.54); break;} + case 'C1': {$size = array(0,0,1836.85,2599.37); break;} + case 'C2': {$size = array(0,0,1298.27,1836.85); break;} + case 'C3': {$size = array(0,0,918.43,1298.27); break;} + case 'C4': {$size = array(0,0,649.13,918.43); break;} + case 'C5': {$size = array(0,0,459.21,649.13); break;} + case 'C6': {$size = array(0,0,323.15,459.21); break;} + case 'C7': {$size = array(0,0,229.61,323.15); break;} + case 'C8': {$size = array(0,0,161.57,229.61); break;} + case 'C9': {$size = array(0,0,113.39,161.57); break;} + case 'C10': {$size = array(0,0,79.37,113.39); break;} + case 'RA0': {$size = array(0,0,2437.80,3458.27); break;} + case 'RA1': {$size = array(0,0,1729.13,2437.80); break;} + case 'RA2': {$size = array(0,0,1218.90,1729.13); break;} + case 'RA3': {$size = array(0,0,864.57,1218.90); break;} + case 'RA4': {$size = array(0,0,609.45,864.57); break;} + case 'SRA0': {$size = array(0,0,2551.18,3628.35); break;} + case 'SRA1': {$size = array(0,0,1814.17,2551.18); break;} + case 'SRA2': {$size = array(0,0,1275.59,1814.17); break;} + case 'SRA3': {$size = array(0,0,907.09,1275.59); break;} + case 'SRA4': {$size = array(0,0,637.80,907.09); break;} + case 'LETTER': {$size = array(0,0,612.00,792.00); break;} + case 'LEGAL': {$size = array(0,0,612.00,1008.00); break;} + case 'EXECUTIVE': {$size = array(0,0,521.86,756.00); break;} + case 'FOLIO': {$size = array(0,0,612.00,936.00); break;} + } + switch (strtolower($orientation)){ + case 'landscape': + $a=$size[3]; + $size[3]=$size[2]; + $size[2]=$a; + break; + } + } else { + if (count($paper)>2) { + // then an array was sent it to set the size + $size = $paper; + } + else { //size in centimeters has been passed + $size[0] = 0; + $size[1] = 0; + $size[2] = ( $paper[0] / 2.54 ) * 72; + $size[3] = ( $paper[1] / 2.54 ) * 72; + } + } + $this->Cpdf($size); + $this->ez['pageWidth']=$size[2]; + $this->ez['pageHeight']=$size[3]; + + // also set the margins to some reasonable defaults + $this->ez['topMargin']=30; + $this->ez['bottomMargin']=30; + $this->ez['leftMargin']=30; + $this->ez['rightMargin']=30; + + // set the current writing position to the top of the first page + $this->y = $this->ez['pageHeight']-$this->ez['topMargin']; + // and get the ID of the page that was created during the instancing process. + $this->ezPages[1]=$this->getFirstPageId(); + $this->ezPageCount=1; +} + +// ------------------------------------------------------------------------------ +// 2002-07-24: Nicola Asuni (info@tecnick.com) +// Set Margins in centimeters +function ezSetCmMargins($top,$bottom,$left,$right){ + $top = ( $top / 2.54 ) * 72; + $bottom = ( $bottom / 2.54 ) * 72; + $left = ( $left / 2.54 ) * 72; + $right = ( $right / 2.54 ) * 72; + $this->ezSetMargins($top,$bottom,$left,$right); +} +// ------------------------------------------------------------------------------ + + +function ezColumnsStart($options=array()){ + // start from the current y-position, make the set number of columne + if (isset($this->ez['columns']) && $this->ez['columns']==1){ + // if we are already in a column mode then just return. + return; + } + $def=array('gap'=>10,'num'=>2); + foreach($def as $k=>$v){ + if (!isset($options[$k])){ + $options[$k]=$v; + } + } + // setup the columns + $this->ez['columns']=array('on'=>1,'colNum'=>1); + + // store the current margins + $this->ez['columns']['margins']=array( + $this->ez['leftMargin'] + ,$this->ez['rightMargin'] + ,$this->ez['topMargin'] + ,$this->ez['bottomMargin'] + ); + // and store the settings for the columns + $this->ez['columns']['options']=$options; + // then reset the margins to suit the new columns + // safe enough to assume the first column here, but start from the current y-position + $this->ez['topMargin']=$this->ez['pageHeight']-$this->y; + $width=($this->ez['pageWidth']-$this->ez['leftMargin']-$this->ez['rightMargin']-($options['num']-1)*$options['gap'])/$options['num']; + $this->ez['columns']['width']=$width; + $this->ez['rightMargin']=$this->ez['pageWidth']-$this->ez['leftMargin']-$width; + +} +// ------------------------------------------------------------------------------ +function ezColumnsStop(){ + if (isset($this->ez['columns']) && $this->ez['columns']['on']==1){ + $this->ez['columns']['on']=0; + $this->ez['leftMargin']=$this->ez['columns']['margins'][0]; + $this->ez['rightMargin']=$this->ez['columns']['margins'][1]; + $this->ez['topMargin']=$this->ez['columns']['margins'][2]; + $this->ez['bottomMargin']=$this->ez['columns']['margins'][3]; + } +} +// ------------------------------------------------------------------------------ +function ezInsertMode($status=1,$pageNum=1,$pos='before'){ + // puts the document into insert mode. new pages are inserted until this is re-called with status=0 + // by default pages wil be inserted at the start of the document + switch($status){ + case '1': + if (isset($this->ezPages[$pageNum])){ + $this->ez['insertMode']=1; + $this->ez['insertOptions']=array('id'=>$this->ezPages[$pageNum],'pos'=>$pos); + } + break; + case '0': + $this->ez['insertMode']=0; + break; + } +} +// ------------------------------------------------------------------------------ + +function ezNewPage(){ + $pageRequired=1; + if (isset($this->ez['columns']) && $this->ez['columns']['on']==1){ + // check if this is just going to a new column + // increment the column number +//echo 'HERE
'; +var_dump($_REQUEST); +var_dump($_POST); +var_dump($sql); +echo ''; +exit; + */ +try { + $res = $dbh->query($sql); + while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + $data[] = $row; + } +} catch(PDOException $e) { + Toolkit_Common::handleError($e); +} +if (!is_array($data)) { + die('
'.$sql.'
'); +// header("Location: /index.php"); +} +class Creport extends Cezpdf +{ + var $reportContents = array(); + + function Creport($p, $o) + { + $this->Cezpdf($p, $o); + } +} + +$pdf = new Creport('a4', 'portrait'); +$pdf->selectFont(GLM_APP_BASE."coupons/fonts/Helvetica.afm"); +$pdf->ezSetMargins(90, 30, 30, 35); +// put a line top and bottom on all the pages +$all = $pdf->openObject(); +$pdf->saveState(); +$pdf->setLineStyle(1, '', '', array(20, 5, 10, 5)); +$pdf->setStrokeColor(0, 0, 0, 1); +$pdf->addText(50, 34, 6, MEDIA_BASE_URL.date('F jS, Y')); +$pdf->restoreState(); +$pdf->closeObject(); +// note that object can be told to appear on just odd or even pages by changing 'all' to 'odd' +// or 'even'. +$pdf->addObject($all, 'all'); + +$coupon_lft_opt = array( + 'left' => 5, + 'right' => 280, + 'justification'=>'left' +); +$coupon_rgt_opt = array( + 'left' => 290, + 'justification'=>'left' +); +$minY = $y // y is verticle position starting at lower left hand corner + = 800; +$x = 20; // x is horizontal position starting at lover left hand corner +$coupon_width = 265; // +$mycount = $count = 1; // +foreach ($data as $key => $val) { + $reset = $y; + if (is_numeric($val['member'])) { + $query = " + SELECT member_name,street,city_name,state_abb,zip,phone + FROM member + LEFT OUTER JOIN city ON (city.city_id = member.city_id) + LEFT OUTER JOIN state ON (state.state_id = member.state_id) + WHERE member_id = {$val['member']}"; + $memberData = $dbh->query($query)->fetch(PDO::FETCH_ASSOC); + if ($memberData) { + $member_name = htmlentities($memberData['member_name']); + } + $addressFormat = "%s\n%s, %s %s"; + $memberAddress = sprintf( + $addressFormat, + $memberData['street'], + $memberData['city_name'], + $memberData['state_abb'], + $memberData['zip'] + ); + $phone = $memberData['phone']; + $header = "".$member_name."\n"; + } else { + $memberAddress = ''; + $phone = ''; + $header = ''; + } + $val['header'] = iconv('UTF-8', 'ISO-8859-1//IGNORE', $val['header']); + $val['description'] = iconv('UTF-8', 'ISO-8859-1//IGNORE', $val['description']); + $header .= "".$val['header']."\n"; + $descr = preg_replace( + "/+ You will need Adobe Acrobat Reader to view and print the documents + contained within this section. You can download the Reader for free at + Adobe Online. +
++ Select the coupons you would like to print and click "Print Selected + Coupons" or "Print These Coupons" to select all. +
diff --git a/Toolkit/DataGridBuilder.php b/Toolkit/DataGridBuilder.php new file mode 100644 index 0000000..ced09b6 --- /dev/null +++ b/Toolkit/DataGridBuilder.php @@ -0,0 +1,288 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @link http://demo.gaslightmedia.com + */ + +/** + * Create Datagrids for displaying data + * + * This abstract class handles all the base functionality of creating + * handeling all the details associated w/ a regular dataGrid. + * 1. Creation + * 2. Sorting (via column headers or sortform) + * 3. Pagenation + * + * @category Structures + * @package Toolkit_DataGridBuilder + * @author Jamie KahgeeWe sent the following XML:
$entryA total and complete failure occured."; + break; + case "PRODUCTION": + break; + } + } + if ($ss->debug == true) { + echo '
+ USE: + Hold down the Ctrl key to select or unselect more than one photo + at a time. Hold down the Shift key to select a range.
+'.print_r($this, true).''; + } else { + $output = parent::toHTML(); + } + return $output; + } + + // }}} +} +?> diff --git a/Toolkit/Photos/Admin/PageTree.php b/Toolkit/Photos/Admin/PageTree.php new file mode 100644 index 0000000..9e52bfa --- /dev/null +++ b/Toolkit/Photos/Admin/PageTree.php @@ -0,0 +1,145 @@ + + * @copyright 2012 Gaslight Media + * @license Gaslight Media + * @version SVN: (0.1) + * @link <> + */ + +/** + * Toolkit_Package_PageTree + * + * Display the toolbox page as ul lil list for jQuery-Column viewer + * + * @category Toolkit + * @package Blocks + * @author Steve Sutton