-- Table structure for table `Collection_91`
--

CREATE TABLE `Collection_91` (
  `Collection_91_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Collection_91_1` varchar(254) DEFAULT NULL,
  `Collection_91_2` int(11) DEFAULT NULL,
  `Collection_91_3` text,
  PRIMARY KEY (`Collection_91_ID`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Collection_91`
--

INSERT INTO `Collection_91` VALUES (1,'Photo Gallery Template',81,'<script src=\"/js/gallery.js\" type=\"text/javascript\"></script>\r\n<script type=\"text/javascript\">\r\n\r\nvar GalleryPageNum = {{$pageNum}};\r\nvar GalleryPerPage = {{$perPage}};\r\nvar GalleryCollectionID = {{$collectionID}};\r\nvar GalleryOrderBy = \'{{$orderby}}\';\r\n\r\nvar GalleryFilterColumns = \'{{$filterID}}\';\r\nvar GalleryCurentImage   = 0;\r\n\r\nvar GalleryTnailColumn   = \'3\';\r\nvar GalleryImageColumn   = \'2\';\r\nvar GalleryAltColumn     = \'4\';\r\n\r\n{{assign var=TnailColumn value=3}}\r\n{{assign var=ImageColumn value=2}}\r\n{{assign var=AltColumn   value=4}}\r\n\r\n</script>\r\n<div id=\"mediaList\">\r\n{{o2templateDisplay template=2}}\r\n</div>'),(2,'Photo Gallery Pictures Display Template',81,'{{assign var=theLinks value=$links.links}}\r\n{{if $theLinks|@count gt 1}}\r\n{{if $links.pagePrevious neq false}}\r\n	<a href=\"javascript: window.GalleryPageNum= 1; getMedia(\'mediaList\' );\"  style=\"text-decoration:none; \">First</a>  \r\n{{/if}}\r\n{{if $links.pagePrevious neq false}}\r\n	<a href=\"javascript: window.GalleryPageNum= {{$links.pagePrevious}}; getMedia(\'mediaList\' );\"  style=\"text-decoration:none; \"><<</a>  \r\n{{/if}}\r\n{{foreach from=$theLinks item=v key=k name=n}}\r\n	{{if $v eq true}}\r\n		{{$k}}\r\n	{{else}}\r\n		<a href=\"javascript: window.GalleryPageNum= {{$k}}; getMedia(\'mediaList\' ); \" >{{$k}}</a>\r\n	{{/if}}\r\n	{{if !$smarty.foreach.n.last}} | {{/if}}\r\n{{/foreach}}\r\n{{if $links.pageNext neq false}}\r\n	  <a href=\"javascript: window.GalleryPageNum= {{$links.pageNext}}; getMedia(\'mediaList\' );\" style=\"text-decoration:none; \">>></a>\r\n{{/if}}\r\n{{if $links.pageNext neq false}}\r\n	  <a href=\"javascript:  window.GalleryPageNum= {{$links.pageLast}}; getMedia(\'mediaList\' );\" style=\"text-decoration:none; \">Last</a>\r\n{{/if}}\r\n\r\n{{/if}}\r\n<div><img src=\"/images/sep.gif\" height=\"5\"/></div>\r\n{{if $table|@count eq 0}}\r\n<center>There are no pictures into this category</center>\r\n{{else}}\r\n\r\n{{assign var=Tnail value=\'Collection_\'|concat:$collectionID|concat:\'_\'|concat:$TnailColumn}}\r\n{{assign var=Image value=\'Collection_\'|concat:$collectionID|concat:\'_\'|concat:$ImageColumn}}\r\n{{assign var=Alt   value=\'Collection_\'|concat:$collectionID|concat:\'_\'|concat:$AltColumn}}\r\n{{assign var=ID   value=\'Collection_\'|concat:$collectionID|concat:\'_ID\'}}\r\n\r\n				<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" {{if $table|@count gt 7}}width=\"100%\"{{/if}}>\r\n				<tr valign=\"top\">\r\n				{{foreach from=$table item=v key=k name=n}}					\r\n					{{if $smarty.foreach.n.index % 7 eq 0 and $smarty.foreach.n.iteration gt 1}}</tr><tr valign=\"top\">{{/if}}\r\n					<td>\r\n						<img src=\"{{$v.$Tnail}}\" id=\"image_{{$smarty.foreach.n.index}}\" title=\"{{$v.$Alt}}\" class=\"gallery\" onClick=\"showBigImage(\'{{$v.$Image}}\' , \'{{$v.$Alt}}\' , {{$smarty.foreach.n.index}} )\" />\r\n					</td>\r\n				{{/foreach}}\r\n				</tr>\r\n				</table>\r\n				{{assign var=v value=$table[0]}}\r\n				<div id=\"gallerybigimage\">\r\n				{{assign var=imageWidth value=$v.$Image|getWidth}}\r\n				<img src=\"{{$v.$Image}}\" title=\"{{$v.$Alt}}\" id=\"galleryselectedimage\" {{if $imageWidth gt 780}} width=\"780\"{{/if}}/>\r\n				</div>\r\n				<input type=\"hidden\" name=\"gallerypicturesnumber\" value=\"{{$table|@count}}\"/>\r\n{{/if}}\r\n\r\n'),(3,' Default - List Rows Template',NULL,'<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\">\r\n<tr valign=\"top\">\r\n{{foreach from=$ResultsTaxonomy item=vv key=kk}}\r\n	{{if $vv.CollectionHidden neq 1}}\r\n	<th>{{$vv.CollectionFieldName}}</th>\r\n	{{/if}}\r\n{{/foreach}}\r\n</tr>\r\n{{assign var=Prefix value=\"Collection_\"|concat:$ResultsCollectionID|concat:\"_\"}}\r\n{{foreach from=$Results item=v key=k name=n}}\r\n<tr valign=\"top\">\r\n	{{foreach from=$ResultsTaxonomy item=vv key=kk}}\r\n	{{if $vv.CollectionHidden neq 1}}\r\n		{{assign var=fieldName value=$Prefix|concat:$vv.CollectionFieldId}}\r\n	<td {{if $smarty.foreach.n.index % 2 eq 0}} class=\"odd\"{{else}} class=\"even\"{{/if}}>\r\n		{{if $vv.CollectionFieldLookupCollectionID gt 0}}\r\n			{{assign var=lookupValue value=$v.$fieldName}}\r\n			{{assign var=lookups value=$ResultsLookups[$fieldName]}}\r\n			{{$lookups.$lookupValue}}\r\n		{{else}}\r\n		{{$v.$fieldName}}\r\n		{{/if}}\r\n	</td>\r\n	{{/if}}\r\n{{/foreach}}\r\n</tr>\r\n{{/foreach}}\r\n</table>\r\n\r\n<div>\r\n{{assign var=Params value=$smarty.server.REQUEST_URI|explode:\"?\"}}\r\n{{if $Params|@count gt 1}}\r\n	{{assign var=sign value=\"&\"}}\r\n	{{assign var=ParamsTmp value=$Params[1]}}\r\n	{{assign var=Params value=$ParamsTmp|explode:\"&\"}}\r\n	{{assign var=First value=0}}\r\n	{{foreach from=$Params item=v key=k name=n}}\r\n		{{assign var=Tmp value=$v|explode:\"=\"}}\r\n		{{if $Tmp[0] neq \'pageNum\'}}\r\n			{{if $First eq 1}}{{assign var=QueryString value=$QueryString|concat:\"&\"}}{{else}}{{assign var=QueryString value=$QueryString|concat:\"?\"}}{{/if}}\r\n			{{assign var=First value=1}}\r\n			{{assign var=QueryString value=$QueryString|concat:$v}}\r\n		{{/if}}\r\n		\r\n	{{/foreach}}\r\n	\r\n	{{if $QueryString eq \'\'}}{{assign var=sign value=\"?\"}}{{/if}}\r\n	\r\n	\r\n{{else}}\r\n	{{assign var=sign value=\"?\"}}\r\n{{/if}}\r\n\r\n\r\n\r\n{{assign var=theLinks value=$PageResults.links}}\r\n{{if $theLinks|@count gt 1}}\r\n{{if $PageResults.pagePrevious neq false}}\r\n	<a href=\"{{$smarty.server.SCRIPT_URL}}{{$QueryString}}{{$sign}}pageNum=1\"  style=\"text-decoration:none; \">First</a>  \r\n{{/if}}\r\n{{if $PageResults.pagePrevious neq false}}\r\n	<a href=\"{{$smarty.server.SCRIPT_URL}}{{$QueryString}}{{$sign}}pageNum={{$PageResults.pagePrevious}}\"  style=\"text-decoration:none; \"><<</a>  \r\n{{/if}}\r\n{{foreach from=$theLinks item=v key=k name=n}}\r\n	{{if $v eq true}}\r\n		{{$k}}\r\n	{{else}}\r\n		<a href=\"{{$smarty.server.SCRIPT_URL}}{{$QueryString}}{{$sign}}pageNum={{$k}}\">{{$k}}</a>\r\n	{{/if}}\r\n	{{if !$smarty.foreach.n.last}} | {{/if}}\r\n{{/foreach}}\r\n{{if $PageResults.pageNext neq false}}\r\n	  <a href=\"{{$smarty.server.SCRIPT_URL}}{{$QueryString}}{{$sign}}pageNum={{$PageResults.pageNext}}\" style=\"text-decoration:none; \">>></a>\r\n{{/if}}\r\n{{if $PageResults.pageNext neq false}}\r\n	  <a href=\"{{$smarty.server.SCRIPT_URL}}{{$QueryString}}{{$sign}}pageNum={{$PageResults.pageLast}}\" style=\"text-decoration:none; \">Last</a>\r\n{{/if}}\r\n{{/if}}\r\n</div>'),(4,'Republics',NULL,'<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\">\r\n<tr valign=\"top\">\r\n{{foreach from=$ResultsTaxonomy item=vv key=kk}}\r\n	{{if $vv.CollectionHidden neq 1}}\r\n	<th>{{$vv.CollectionFieldName}}</th>\r\n	{{/if}}\r\n{{/foreach}}\r\n</tr>\r\n{{assign var=Prefix value=\"Collection_\"|concat:$ResultsCollectionID|concat:\"_\"}}\r\n{{foreach from=$Results item=v key=k name=n}}\r\n<tr valign=\"top\">\r\n	{{foreach from=$ResultsTaxonomy item=vv key=kk}}\r\n	{{if $vv.CollectionHidden neq 1}}\r\n		{{assign var=fieldName value=$Prefix|concat:$vv.CollectionFieldId}}\r\n	<td {{if $smarty.foreach.n.index % 2 eq 0}} class=\"odd\"{{else}} class=\"even\"{{/if}}>\r\n		{{if $vv.CollectionFieldLookupCollectionID gt 0}}\r\n			{{assign var=lookupValue value=$v.$fieldName}}\r\n			{{assign var=lookups value=$ResultsLookups[$fieldName]}}\r\n			{{$lookups.$lookupValue}}\r\n		{{else}}\r\n		{{$v.$fieldName}}\r\n		{{/if}}\r\n	</td>\r\n	{{/if}}\r\n{{/foreach}}\r\n</tr>\r\n{{/foreach}}\r\n</table>\r\n\r\n<div>\r\n{{assign var=Params value=$smarty.server.REQUEST_URI|explode:\"?\"}}\r\n{{if $Params|@count gt 1}}\r\n	{{assign var=sign value=\"&\"}}\r\n	{{assign var=ParamsTmp value=$Params[1]}}\r\n	{{assign var=Params value=$ParamsTmp|explode:\"&\"}}\r\n	{{assign var=First value=0}}\r\n	{{foreach from=$Params item=v key=k name=n}}\r\n		{{assign var=Tmp value=$v|explode:\"=\"}}\r\n		{{if $Tmp[0] neq \'pageNum\'}}\r\n			{{if $First eq 1}}{{assign var=QueryString value=$QueryString|concat:\"&\"}}{{else}}{{assign var=QueryString value=$QueryString|concat:\"?\"}}{{/if}}\r\n			{{assign var=First value=1}}\r\n			{{assign var=QueryString value=$QueryString|concat:$v}}\r\n		{{/if}}\r\n		\r\n	{{/foreach}}\r\n	\r\n	{{if $QueryString eq \'\'}}{{assign var=sign value=\"?\"}}{{/if}}\r\n	\r\n	\r\n{{else}}\r\n	{{assign var=sign value=\"?\"}}\r\n{{/if}}\r\n\r\n\r\n\r\n{{assign var=theLinks value=$PageResults.links}}\r\n{{if $theLinks|@count gt 1}}\r\n{{if $PageResults.pagePrevious neq false}}\r\n	<a href=\"{{$smarty.server.SCRIPT_URL}}{{$QueryString}}{{$sign}}pageNum=1\"  style=\"text-decoration:none; \">First</a>  \r\n{{/if}}\r\n{{if $PageResults.pagePrevious neq false}}\r\n	<a href=\"{{$smarty.server.SCRIPT_URL}}{{$QueryString}}{{$sign}}pageNum={{$PageResults.pagePrevious}}\"  style=\"text-decoration:none; \"><<</a>  \r\n{{/if}}\r\n{{foreach from=$theLinks item=v key=k name=n}}\r\n	{{if $v eq true}}\r\n		{{$k}}\r\n	{{else}}\r\n		<a href=\"{{$smarty.server.SCRIPT_URL}}{{$QueryString}}{{$sign}}pageNum={{$k}}\">{{$k}}</a>\r\n	{{/if}}\r\n	{{if !$smarty.foreach.n.last}} | {{/if}}\r\n{{/foreach}}\r\n{{if $PageResults.pageNext neq false}}\r\n	  <a href=\"{{$smarty.server.SCRIPT_URL}}{{$QueryString}}{{$sign}}pageNum={{$PageResults.pageNext}}\" style=\"text-decoration:none; \">>></a>\r\n{{/if}}\r\n{{if $PageResults.pageNext neq false}}\r\n	  <a href=\"{{$smarty.server.SCRIPT_URL}}{{$QueryString}}{{$sign}}pageNum={{$PageResults.pageLast}}\" style=\"text-decoration:none; \">Last</a>\r\n{{/if}}\r\n{{/if}}\r\n</div>'),(5,'Video - Display Page',50,'{{if $Results|@count eq 0}}\r\n<center><h3>There are no videos to show for the moment</h3></center>\r\n{{else}}\r\n		{{capture name=jsinclude assign=JavaScriptJQueryIncludeCode}}\r\n				<script type=\"text/javascript\" src=\"/js/video/jquery.jwplayer.js\"></script>\r\n\r\n		{{/capture}}\r\n		{{capture name=jscode assign=JavaScriptJQueryCode}}\r\n\r\n						\r\n							$(\".siteVideo\").css({ cursor: \'pointer\'});\r\n							$(\".siteVideo\").each(function(){\r\n							\r\n								$(this).click(function(event){ \r\n											\r\n									var html 	= \'<video src=\"\'+$(this).attr(\'vsrc\')+\'\" height=\"\'+$(this).attr(\'vheight\')+\'\" id=\"o2player\" poster=\"\'+$(this).attr(\'vimg\')+\'\" width=\"\'+$(this).attr(\'vwidth\')+\'\"></video>\';\r\n									\r\n									\r\n									$(\'#o2player\').remove();\r\n									$(\'#videocontainer\').html(html);				\r\n\r\n									$(\'#o2player\').jwplayer({\r\n											flashplayer:\'/js/video/player.swf\',\r\n											skin:\'/js/video/five/five.xml\'\r\n									  });\r\n\r\n									\r\n										 \r\n								}); //end on click	\r\n						});\r\n						\r\n						$(\'#o2player\').jwplayer({\r\n											flashplayer:\'/js/video/player.swf\',\r\n											skin:\'/js/video/five/five.xml\'\r\n									  });\r\n										\r\n					\r\n    \r\n		{{/capture}}\r\n		\r\n		<table cellpadding=\"4\" cellspacing=\"4\" border=\"0\" width=\"100%\">\r\n		<tr valign=\"top\">\r\n		{{foreach from=$Results item=v key=k name=n}}  \r\n			{{if $smarty.foreach.n.index eq 0}}{{assign var=SelectedVideo value=$v}}{{/if}}\r\n			{{if $smarty.get.video eq $v.Collection_50_ID}}{{assign var=SelectedVideo value=$v}}{{/if}}\r\n			{{if $smarty.foreach.n.index gt 0 and $smarty.foreach.n.index % 5 eq 0}}</tr><tr valign=\"top\">{{/if}}\r\n			<td align=\"center\"><img class=\"siteVideo\" src=\"{{$v.Collection_50_5}}\" vsrc=\"{{$v.Collection_50_3}}\" vimg=\"{{$v.Collection_50_4}}\" alt=\"{{$v.Collection_50_1|addslashes}}\" vheight=\"{{$v.Collection_50_4|getHeight}}\" vwidth=\"{{$v.Collection_50_4|getWidth}}\" id=\"siteVideo{{$v.Collection_50_ID}}\"/><br/><p align=\"center\"><font size=\"-2\">{{$v.Collection_50_1}}</font></p></td>\r\n		{{/foreach}}\r\n		</tr>\r\n		</table>\r\n		<div id=\"videocontainer\"><video src=\"{{$SelectedVideo.Collection_50_3}}\" height=\"{{$SelectedVideo.Collection_50_4|getHeight}}\" id=\"o2player\" poster=\"{{$SelectedVideo.Collection_50_4}}\" width=\"{{$SelectedVideo.Collection_50_4|getWidth}}\"></video></div>\r\n{{/if}}'),(6,'Photo Gallery JQuery',81,'{{capture name=galeryincludes assign=tmp}}\r\n<link href=\"/style/jquery.gallery.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\">\r\n<link href=\"/style/jquery.select.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\">\r\n<script type=\"text/javascript\" src=\"/js/jquery.gallery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.scrollcycle.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.select.js\"></script>\r\n{{/capture}}\r\n{{assign var=JavaScriptJQueryIncludeCode value=$JavaScriptJQueryIncludeCode|concat:\' \'|concat:$tmp}}\r\n{{capture name=galeryincludejs assign=tmp}}\r\n		\r\n		$(\"#galleryscroller\").jCarouselLite({\r\n			btnNext: \"#scrollRight\",\r\n			btnPrev: \"#scrollLeft\",\r\n			visible: {{if $table|@count gt 7}}7{{else}}{{math equation=\'x-1\' x=$table|@count}}{{/if}},\r\n			auto: 3000,\r\n			autoStart: false,\r\n			autoStartText: \'View Slideshow\',\r\n			autoStopText: \'Stop Slideshow\',\r\n			autoID: \'#galleryslideshow\',\r\n			speed: 500,\r\n			beforeStart: function(a) {\r\n           				\r\n						$.galleria.next();\r\n						\r\n       		}\r\n\r\n		});\r\n\r\n		\r\n		$(\'ul.gallerylist\').galleria({\r\n			history   : false, // activates the history object for bookmarking, back-button etc.\r\n			clickNext : true, // helper for making the image clickable\r\n			insert    : \'#main_gallery_image\', // the containing selector for our main image\r\n			onImage   : function(image,caption,thumb) { // let\'s add some image effects for demonstration purposes\r\n				\r\n				// fade in the image & caption\r\n				if(! ($.browser.mozilla && navigator.appVersion.indexOf(\"Win\")!=-1) ) { // FF/Win fades large images terribly slow\r\n					image.css(\'display\',\'none\').fadeIn(1000);\r\n				}\r\n				caption.css(\'display\',\'none\').fadeIn(1000);\r\n				\r\n				// fetch the thumbnail container\r\n				var _li = thumb.parents(\'li\');\r\n				\r\n				// fade out inactive thumbnail\r\n				_li.siblings().children(\'img.selected\').fadeTo(500,0.3);\r\n				\r\n				// fade in active thumbnail\r\n				thumb.fadeTo(\'fast\',1).addClass(\'selected\');\r\n				\r\n				// add a title for the clickable image\r\n				image.attr(\'title\',\'Next image >>\');\r\n			},\r\n			onThumb : function(thumb) { // thumbnail effects goes here\r\n				\r\n				// fetch the thumbnail container\r\n				var _li = thumb.parents(\'li\');\r\n				\r\n				// if thumbnail is active, fade all the way.\r\n				var _fadeTo = _li.is(\'.active\') ? \'1\' : \'0.3\';\r\n				\r\n				// fade in the thumbnail when finnished loading\r\n				thumb.css({display:\'none\',opacity:_fadeTo}).fadeIn(1500);\r\n				\r\n				// hover effects\r\n				thumb.hover(\r\n					function() { thumb.fadeTo(\'fast\',1); },\r\n					function() { _li.not(\'.active\').children(\'img\').fadeTo(\'fast\',0.3); } // don\'t fade out if the parent is active\r\n				)\r\n			}\r\n		});\r\n			\r\n		$(\"#gallerychooser\").selectbox({ onselectchange : function() { var obj = document.getElementById(\'gallerychooser\'); window.location = \'/photo-gallery/\'+obj.options[obj.selectedIndex].value+\'.html\'; } });\r\n{{/capture}}\r\n{{assign var=JavaScriptJQueryCode value=$JavaScriptJQueryCode|concat:\' \'|concat:$tmp}}\r\n{{if $table|@count eq 0}}\r\n<center>There are no pictures into this category</center>\r\n{{else}}\r\n{{assign var=Tnail value=\'Collection_\'|concat:$tableCollectionID|concat:\'_\'|concat:3}}\r\n{{assign var=Image value=\'Collection_\'|concat:$tableCollectionID|concat:\'_\'|concat:3}}\r\n{{assign var=Alt   value=\'Collection_\'|concat:$tableCollectionID|concat:\'_\'|concat:4}}\r\n{{assign var=ID   value=\'Collection_\'|concat:$tableCollectionID|concat:\'_ID\'}}\r\n\r\n<div id=\"photogallery\">\r\n<div id=\"main_gallery_image\"></div>\r\n\r\n<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"imageListContainer\"><tr valign=\"top\">\r\n<td><span id=\"scrollLeft\" class=\"arrow\"><</span></td>\r\n<td>\r\n<div id=\"galleryscroller\">\r\n<ul class=\"gallerylist\" >\r\n{{foreach from=$table item=v key=k name=n}}\r\n<li {{if $smarty.foreach.n.first}}class=\"active\"{{/if}}><img src=\"{{$v.$Image}}\" alt=\"{{$v.$Alt}}\" title=\"{{$v.$Alt}}\"></li>\r\n{{/foreach}}\r\n</ul>\r\n</div>\r\n</td>\r\n<td><span id=\"scrollRight\" class=\"arrow\">></span></td>\r\n</tr></table>\r\n</div>\r\n<div id=\"galleryslideshow\">View Slideshow</div>\r\n{{/if}}\r\n'),(7,'Rss feed for Twitter',NULL,'{{assign var=Prefix value=\"Collection_\"|concat:$ResultsCollectionID|concat:\"_\"}}\r\n{{foreach from=$Results item=v key=k name=n}}\r\n	{{assign var=RssName value=$Prefix|concat:\"1\"}}\r\n	{{assign var=RssUrl  value=$Prefix|concat:\"2\"}}\r\n	{{assign var=RssLimit  value=$Prefix|concat:\"3\"}}\r\n	{{assign var=RssID value=$Prefix|concat:\"ID\"}}\r\n	{{assign var=Limit value=$v.$RssLimit}}\r\n<div id=\"rss_{{$v.$RssID}}\" class=\"rssContainer\">\r\n	{{rssRead url=$v.$RssUrl var=RssData CollectionID=$ResultsCollectionID RowID=$v.$RssID}}\r\n	{{if $RssData.Items|@count eq 0}}\r\n		{{rssRead url=$v.$RssUrl var=RssData CollectionID=$ResultsCollectionID RowID=$v.$RssID}}\r\n	{{/if}}\r\n	{{if $RssData.Items|@count eq 0}}\r\n		{{rssRead url=$v.$RssUrl var=RssData CollectionID=$ResultsCollectionID RowID=$v.$RssID}}\r\n	{{/if}}\r\n	{{foreach from=$RssData.Items item=vv key=kk name=nn}}\r\n	{{if $smarty.foreach.nn.index lt $Limit or $Limit eq \'\' or $Limit eq 0}}\r\n	<div class=\"twitterdatalist\">\r\n	<p>{{$vv.title|findLinks}} {{*<a href=\"{{$vv.link}}\" target=\"_blank\">{{$vv.link|truncate:25:\"...\":true}}</a>*}}</p>\r\n	<label>about {{$vv.date_timestamp|timeAgo|lower}}</label></div>\r\n	{{/if}}	\r\n	{{/foreach}}\r\n</div>\r\n\r\n{{/foreach}}'),(8,'RSS feed for Blog',NULL,'{{assign var=Prefix value=\"Collection_\"|concat:$ResultsCollectionID|concat:\"_\"}}\r\n{{foreach from=$Results item=v key=k name=n}}\r\n	{{assign var=RssName value=$Prefix|concat:\"1\"}}\r\n	{{assign var=RssUrl  value=$Prefix|concat:\"2\"}}\r\n	{{assign var=RssLimit  value=$Prefix|concat:\"3\"}}\r\n	{{assign var=RssID value=$Prefix|concat:\"ID\"}}\r\n	{{assign var=Limit value=$v.$RssLimit}}\r\n<div id=\"rss_{{$v.$RssID}}\" class=\"rssContainer\">\r\n	{{rssRead url=$v.$RssUrl var=RssData CollectionID=$ResultsCollectionID RowID=$v.$RssID}}\r\n	{{if $RssData.Items|@count eq 0}}\r\n		{{rssRead url=$v.$RssUrl var=RssData CollectionID=$ResultsCollectionID RowID=$v.$RssID}}\r\n	{{/if}}\r\n	{{if $RssData.Items|@count eq 0}}\r\n		{{rssRead url=$v.$RssUrl var=RssData CollectionID=$ResultsCollectionID RowID=$v.$RssID}}\r\n	{{/if}}\r\n	{{foreach from=$RssData.Items item=vv key=kk name=nn}}\r\n	{{if $smarty.foreach.nn.index lt $Limit or $Limit eq \'\' or $Limit eq 0}}\r\n	<div class=\"twitterdatalist\">\r\n	<p>{{$vv.title|findLinks}} <a href=\"{{$vv.link}}\" target=\"_blank\">{{$vv.link|truncate:25:\"...\":true}}</a></p>\r\n	<label>about {{$vv.date_timestamp|timeAgo|lower}}</label></div>\r\n	{{/if}}	\r\n	{{/foreach}}\r\n</div>\r\n\r\n{{/foreach}}');

--
-- Table structure for table `Collection_92`
--

CREATE TABLE `Collection_92` (
  `Collection_92_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Collection_92_1` varchar(254) DEFAULT NULL,
  `Collection_92_2` text,
  PRIMARY KEY (`Collection_92_ID`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Collection_92`
--

INSERT INTO `Collection_92` VALUES (1,'Lookup for Row Level Access','						\r\n						$fieldId 			= $v[\'FieldID\'];\r\n						$fieldTaxonomy 		= $api -> getFieldTaxonomy($CollectionID , $fieldId);\r\n						$fieldCollectionID 	= $fieldTaxonomy[\'CollectionFieldLookupCollectionID\'];\r\n						$fieldLookupColumn 	= $api ->getCollection($fieldCollectionID);\r\n						$fieldLookupColumn  = $fieldLookupColumn[0][\'LookupColumn\'];\r\n						\r\n						$queryArray 		= array(\'collection_id\'=>$fieldCollectionID ,\r\n													\'orderby\' => $fieldLookupColumn ,\r\n													\'desc\' => 0 \r\n													);\r\n						if(!$admin)\r\n						{\r\n							$queryArray[\'userId\']=$user_id;\r\n						}\r\n						\r\n						\r\n						\r\n						$fTable = $api->Filter($queryArray);\r\n						$fResults = $fTable[\'Results\'];\r\n						$smarty->assign(\'fResults\' , $fResults);\r\n						$fFieldName = $api -> _getCollectionFieldName($fieldCollectionID , $fieldLookupColumn);\r\n						$smarty->assign(\'fFieldName\' , $fFieldName);\r\n						$fFieldId = $api -> _getCollectionFieldName($fieldCollectionID , \'ID\');\r\n						$smarty->assign(\'fFieldId\' , $fFieldId);\r\n						\r\n						$actFieldName = $api -> _getCollectionFieldName($CollectionID , $fieldId);\r\n						$smarty->assign(\'actFieldName\' , $actFieldName);\r\n						\r\n						\r\n						$displayfields[$fieldId] = $smarty->fetch(ADMIN_APP_DIR.\"/lookupForRowLevel.html\");\r\n						\r\n						\r\n						'),(2,'Toolbar For Fck Editor and Row Level Users','$fieldId      = $v[\'FieldID\'];\r\n$fieldTaxonomy    = $api -> getFieldTaxonomy($CollectionID , $fieldId);\r\n$fieldCollectionID  = $fieldTaxonomy[\'CollectionFieldLookupCollectionID\'];\r\n\r\n$actFieldName = $api -> _getCollectionFieldName($CollectionID , $fieldId);\r\n$smarty->assign(\'actFieldName\' , $actFieldName);\r\n\r\ninclude_once $_SERVER[\'DOCUMENT_ROOT\'].\"/\".ADMIN_APP_DIR.\"/editor/ckeditor.php\";\r\n$CKEditorDisplay = new CKEditor();\r\n \r\n$CKEditorDisplay->basePath      = \'/\'.ADMIN_APP_DIR.\'/editor/\' ;\r\n$CKEditorDisplay->returnOutput  = true;\r\n    \r\n$CKEditorDisplay->config[\'width\'] = \'100%\';\r\n$CKEditorDisplay->config[\'height\'] = 450; \r\n$CKEditorDisplay->initialized = true;\r\n$CKEditorDisplay = CKeditorConfigSettings ($CKEditorDisplay);\r\n\r\n\r\n$CKEditorDisplay->config[\'contentsCss\'] = \"/content.css\";\r\n       \r\n      \r\n/*\r\nif ($CollectionID == 13 && $selectedRow[\'Collection_13_3\'] == 3)\r\n{\r\n  $CKEditorDisplay->config[\'fullPage\'] = true;\r\n}\r\n*/\r\n\r\nif(!$admin)\r\n{ \r\n  $CKEditorDisplay->config[\'toolbar\'] = \"RowLevel\";\r\n}\r\n\r\n    if ($_POST[$actFieldName] != \'\' )\r\n    {\r\n        $theValue =  $_POST[$actFieldName];\r\n    }\r\n    else\r\n    {\r\n        $theValue =  $selectedRow[$actFieldName]; \r\n    }\r\n\r\nif ($CollectionID == 13 && ( $selectedRow[\'Collection_13_3\'] == 3 || $selectedRow[\'Collection_13_4\'] == 3 ))\r\n{\r\n  $displayfields[$fieldId] = \'<textarea wrap=\"off\" class=\"input\" style=\"width: 100%; height: 450px\" id=\"\'.$actFieldName.\'\" name=\"\'.$actFieldName.\'\">\'.$theValue.\'</tex\'.\'\'.\'tarea>\';\r\n}\r\nelse\r\n{\r\n  $displayfields[$fieldId] = $CKEditorDisplay->editor($actFieldName, $theValue);\r\n}\r\n'),(3,'Selectbox With Values from 1 to 30','$fieldId 			= $v[\'FieldID\'];\r\n												\r\n						$tmpArray = array();\r\n						for ($i = 1 ; $i<31; $i++)\r\n						{\r\n							$tmpArray[$i] = $i;\r\n						}\r\n						$smarty->assign(\'fResults\' , $tmpArray);\r\n						$actFieldName = $api -> _getCollectionFieldName($CollectionID , $fieldId);\r\n						$smarty->assign(\'actFieldName\' , $actFieldName);\r\n						\r\n						$displayfields[$fieldId] = $smarty->fetch(ADMIN_APP_DIR.\"/calendar/period.html\");'),(4,'Color Picker','$fieldId 			= $v[\'FieldID\'];\r\n$fFieldName = $api -> _getCollectionFieldName($CollectionID , $fieldId);\r\n$string = \'<input type=\"text\" class=\"input\" style=\"width:60px; \" name=\"\'.$fFieldName.\'\" id=\"\'.$fFieldName.\'\" value=\"\'.$selectedRow[$fFieldName].\'\"/>\';\r\nif ($selectedRow[$fFieldName] != \'\')\r\n	$color = $selectedRow[$fFieldName];\r\nelse\r\n	$color = \'ffffff\';	\r\n$string .= \'<style type=\"text/css\">#ColorPicker_\'.$fFieldName.\' { width: 36px;	height: 36px;	 background: url(images/colorpicker/select2.png); cursor:pointer; background-position:-4px -4px;} </style>\';\r\n$string .= \'<style type=\"text/css\">#ColorPicker_\'.$fFieldName.\' div { width: 28px;	height: 28px;   background: url(images/colorpicker/select2.png); background-position:-4px -4px; } </style>\';\r\n\r\n$string .= \'<div id=\"ColorPicker_\'.$fFieldName.\'\"><div style=\"background-color: #\'.$color .\'\"></div></div>\';\r\n$displayfields[$fieldId] = $smarty->fetch(\'string:\'.$string);					'),(5,'Lookup for Event Type','						\r\n						$fieldId 			= $v[\'FieldID\'];\r\n						$fieldTaxonomy 		= $api -> getFieldTaxonomy($CollectionID , $fieldId);\r\n						$fieldCollectionID 	= $fieldTaxonomy[\'CollectionFieldLookupCollectionID\'];\r\n						$fieldLookupColumn 	= $api ->getCollection($fieldCollectionID);\r\n						$fieldLookupColumn  = $fieldLookupColumn[0][\'LookupColumn\'];\r\n						\r\n						$queryArray 		= array(\'collection_id\'=>$fieldCollectionID ,\r\n													\'orderby\' => $fieldLookupColumn ,\r\n													\'desc\' => 0 \r\n													);\r\n						if(!$admin)\r\n						{\r\n							$queryArray[\'userId\']=$user_id;\r\n						}\r\n						$fTable = $api->Filter($queryArray);\r\n						$fResults = $fTable[\'Results\'];\r\n						$smarty->assign(\'fResults\' , $fResults);\r\n						$fFieldName = $api -> _getCollectionFieldName($fieldCollectionID , $fieldLookupColumn);\r\n						$smarty->assign(\'fFieldName\' , $fFieldName);\r\n						$fFieldId = $api -> _getCollectionFieldName($fieldCollectionID , \'ID\');\r\n						$smarty->assign(\'fFieldId\' , $fFieldId);\r\n						$fFieldColor = $api -> _getCollectionFieldName($fieldCollectionID , \'3\');\r\n						$smarty->assign(\'fFieldColor\' , $fFieldColor);\r\n						\r\n						$actFieldName = $api -> _getCollectionFieldName($CollectionID , $fieldId);\r\n						$smarty->assign(\'actFieldName\' , $actFieldName);\r\n						\r\n						$displayfields[$fieldId] = $smarty->fetch(ADMIN_APP_DIR.\"/calendar/lookupForEventType.html\");\r\n						\r\n						\r\n						');

--
-- Table structure for table `Collection_93`
--

CREATE TABLE `Collection_93` (
  `Collection_93_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Collection_93_1` varchar(254) DEFAULT NULL,
  `Collection_93_2` text,
  PRIMARY KEY (`Collection_93_ID`)
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Collection_93`
--

INSERT INTO `Collection_93` VALUES (3,'Event Default Start Date','{{if $smarty.get.esd gt 0}}\r\n$(\'#{{$fieldName}}\').val(\'{{$smarty.get.esd}}\');\r\n$(\'#Fake_{{$fieldName}}\').val(\'{{$smarty.get.esd|date_format:\"%m/%d/%Y %I:%M%p\"}}\');\r\n{{/if}}\r\n{{if $smarty.get.hsd eq 1}}\r\n$(\'#{{$fieldName}}_row\').css({display:\'none\'});\r\n{{/if}}'),(4,'Event Default End Date','{{if $smarty.get.eed gt 0}}\r\n$(\'#{{$fieldName}}\').val(\'{{$smarty.get.eed}}\');\r\n$(\'#Fake_{{$fieldName}}\').val(\'{{$smarty.get.eed|date_format:\"%m/%d/%Y %I:%M%p\"}}\');\r\n{{/if}}\r\n{{if $smarty.get.hed eq 1}}\r\n$(\'#{{$fieldName}}_row\').css({display:\'none\'});\r\n{{/if}}'),(5,'Color Picker','$(\'#ColorPicker_{{$fieldName}}\').ColorPicker({\r\n			onSubmit: function(hsb, hex, rgb) {\r\n				$(\'#{{$fieldName}}\').val(hex);\r\n				$(\'#ColorPicker_{{$fieldName}} div\').css(\'backgroundColor\', \'#\' + hex);\r\n			},\r\n			onShow: function (colpkr) {\r\n				$(colpkr).fadeIn(500);\r\n				return false;\r\n			},\r\n			onHide: function (colpkr) {\r\n				$(colpkr).fadeOut(500);\r\n				return false;\r\n			},\r\n			onBeforeShow: function () {\r\n				$(this).ColorPickerSetColor($(\'#{{$fieldName}}\').val());\r\n			}\r\n		})\r\n		.bind(\'keyup\', function(){\r\n			$(this).ColorPickerSetColor(this.value);\r\n		});\r\n		\r\n		$(\'#{{$fieldName}}\').ColorPicker({\r\n			onSubmit: function(hsb, hex, rgb) {\r\n				$(\'#{{$fieldName}}\').val(hex);\r\n				$(\'#ColorPicker_{{$fieldName}} div\').css(\'backgroundColor\', \'#\' + hex);\r\n			},\r\n			onShow: function (colpkr) {\r\n				$(colpkr).fadeIn(500);\r\n				return false;\r\n			},\r\n			onHide: function (colpkr) {\r\n				$(colpkr).fadeOut(500);\r\n				return false;\r\n			},\r\n			onBeforeShow: function () {\r\n				$(this).ColorPickerSetColor($(\'#{{$fieldName}}\').val());\r\n			}\r\n		})\r\n		.bind(\'keyup\', function(){\r\n			$(this).ColorPickerSetColor(this.value);\r\n		});'),(6,'Event Type Change','$(\'#{{$fieldName}}\').change( function() {\r\n  var obj = $(this).selectedOptions().each(function(index){\r\n  			 $(\'#Collection_236_20\').val($(this).attr(\'colorcode\'));\r\n  }); \r\n});\r\n'),(8,'Auto Complete for Site Menu','function formatItem(row) {\r\n	return row[0];\r\n}\r\n\r\nfunction findValue(li) {\r\n	if( li == null ) return;\r\n\r\n	// if coming from an AJAX call, let\'s use the CityId as the value\r\n	if( !!li.extra ) var sValue = li.extra[0];\r\n\r\n	// otherwise, let\'s just display the value in the text box\r\n	else var sValue = li.selectValue;\r\n\r\n	\r\n}\r\n\r\nfunction selectItem(li) {\r\n	findValue(li);\r\n}\r\n\r\n\r\n\r\nvar ac = $(\'#{{$fieldName}}\').autocomplete(\"/{{$smarty.const.ADMIN_APP_DIR}}/autocomplete_backend.php\", { delay:10,\r\n			minChars:1,\r\n			matchSubset:1,\r\n			matchContains:1,\r\n			cacheLength:10,\r\n			onItemSelect:selectItem,\r\n			onFindValue:findValue,\r\n			formatItem:formatItem,\r\n			autoFill:true\r\n });\r\n $(\'#{{$fieldName}}\').parent().append(\'<img src=\"/{{$smarty.const.ADMIN_APP_DIR}}/images/arrow.gif\" id=\"{{$fieldName}}_ac\" value=\"find\"/>\');\r\n $(\'#{{$fieldName}}_ac\').click(function(){\r\n		ac[0].autocompleter.getResults();\r\n });\r\n $(\'#{{$fieldName}}_ac\').css(\'cursor\', \'pointer\');'),(9,'Tree Tool','$(\'#{{$fieldName}}\').parent().append(\'<div id=\"tree{{$fieldName}}\"></div>\');\r\n$(\'#tree{{$fieldName}}\').append(\'<div><input type=\"checkbox\" id=\"treeroot{{$fieldName}}\"/> This row will not have any parent</div>\');\r\n$(\'#tree{{$fieldName}}\').append(\'<div id=\"actree{{$fieldName}}\"></div>\');\r\nvar html = $.ajax({\r\n  url: \"/system/treeview.html\",\r\n  data: \"treeid={{$collection}}&eid={{$smarty.get.eid}}&frontendadmin=1\",\r\n  async: false\r\n }).responseText;\r\n \r\n $(\'#actree{{$fieldName}}\').html(html);\r\n \r\n $(\"#actree{{$fieldName}} ul\").treeview({\r\n		persist: \"location\",\r\n		collapsed: true,\r\n		unique: true,\r\n		toggle: function() {}\r\n	});\r\n	\r\n	{{if $smarty.get.eid gt 0}}\r\n		$(\"#{{$fieldName}}\").removeOption(\"{{$smarty.get.eid}}\");\r\n	{{else}}\r\n		$(\'#treeroot{{$fieldName}}\').attr(\'checked\', true);\r\n	{{/if}}\r\n	\r\n	{{if $fieldValue eq \'\'}}$(\'#treeroot{{$fieldName}}\').attr(\'checked\', true);\r\n	{{else}}\r\n	$(\"#actree{{$fieldName}} ul a[itemid={{$fieldValue}}]\").addClass(\'curentlyselected\');\r\n	{{/if}}\r\n	\r\n	$(\"#actree{{$fieldName}} ul a[itemid]\").each(function(){\r\n	\r\n			var notselectable = $(this).attr(\'notselectable\');\r\n			if (notselectable == 1) {  $(this).addClass(\'notselectable\'); }\r\n	\r\n			$(this).click(function(){\r\n					var itemid 		  = $(this).attr(\'itemid\');\r\n					var notselectable = $(this).attr(\'notselectable\');					\r\n					if (notselectable == 0)\r\n					{\r\n						$(\"#actree{{$fieldName}} ul a[itemid]\").removeClass(\'curentlyselected\');\r\n						$(this).addClass(\'curentlyselected\');\r\n						$(\'#{{$fieldName}}\').selectOptions(itemid, true);\r\n						$(\'#treeroot{{$fieldName}}\').attr(\'checked\', false);\r\n					}\r\n					else\r\n					{\r\n						alert(\'This row cannot be his own parent\');\r\n					}\r\n			\r\n			});\r\n			\r\n			$(\'#treeroot{{$fieldName}}\').click(function(){\r\n				$(\'#treeroot{{$fieldName}}\').attr(\'checked\', true);\r\n				$(\"#actree{{$fieldName}} ul a[itemid]\").removeClass(\'curentlyselected\');\r\n				$(\'#{{$fieldName}}\').selectOptions(\"\", true);\r\n			});\r\n			\r\n			$(\"#{{$fieldName}}\").change(function(){\r\n			\r\n			$(\"#actree{{$fieldName}} ul a[itemid]\").removeClass(\'curentlyselected\');\r\n					var thisValue = this.value;\r\n					\r\n					if (thisValue == \'\')\r\n					{\r\n							$(\'#treeroot{{$fieldName}}\').attr(\'checked\', true);\r\n					}\r\n					else\r\n					{\r\n							$(\'#treeroot{{$fieldName}}\').attr(\'checked\', false);\r\n							$(\"#actree{{$fieldName}} ul a[itemid=\"+thisValue+\"]\").addClass(\'curentlyselected\');\r\n					}\r\n			});\r\n\r\n			\r\n	});'),(10,'RSS Collection Feeds','{{literal}}function HideAllRepeatFields (){{{/literal}}\r\n	$(\'#Collection_{{$collection}}_5_row\').css({display:\'none\'});\r\n	$(\'#Collection_{{$collection}}_6_row\').css({display:\'none\'});\r\n	$(\'#Collection_{{$collection}}_7_row\').css({display:\'none\'});\r\n	$(\'#Collection_{{$collection}}_8_row\').css({display:\'none\'});\r\n{{literal}}}{{/literal}}\r\n\r\nvar fields = new Array();\r\n\r\n{{literal}}function GetFieldsForCollection (cid){{{/literal}}\r\nvar fields = new Array();\r\n\r\n$.ajax({\r\n   type: \"GET\",\r\n   url: \"/o2/admin.php?menu_id=4&module_id=11&collectionid=90&colid=2&cid=\"+cid,\r\n   async: false,\r\n   cache: false,\r\n   success: function(html){\r\n    \r\n	 eval(html);\r\n	 \r\n	 \r\n   }\r\n\r\n });\r\n\r\nreturn fields;\r\n{{literal}}}{{/literal}}\r\n\r\n\r\n{{literal}}function ShowAll (cid){{{/literal}}\r\n	\r\n	var fields = GetFieldsForCollection (cid);\r\n	\r\n	var optionsString = \'<option value=\"0\">Select Field...</option>\';\r\n	for (i in fields)\r\n	{\r\n		\r\n		optionsString = optionsString + \"<option value=\\\"\"+i+\"\\\">\"+fields[i]+\"</option>\";\r\n	}\r\n	\r\n	\r\n	\r\n	$(\'#Collection_{{$collection}}_5\').html(optionsString);\r\n	$(\'#Collection_{{$collection}}_6\').html(optionsString);\r\n	$(\'#Collection_{{$collection}}_7\').html(optionsString);\r\n	$(\'#Collection_{{$collection}}_8\').html(optionsString);\r\n	\r\n	var selectedValue = $(\'#Collection_{{$collection}}_5\').attr(\'selvalue\');\r\n	if (selectedValue != \'\'){ $(\'#Collection_{{$collection}}_5\').find(\'option[value=\'+selectedValue+\']\').attr(\'selected\',\'true\'); }\r\n	var selectedValue = $(\'#Collection_{{$collection}}_6\').attr(\'selvalue\');\r\n	if (selectedValue != \'\'){ $(\'#Collection_{{$collection}}_6\').find(\'option[value=\'+selectedValue+\']\').attr(\'selected\',\'true\'); }\r\n	var selectedValue = $(\'#Collection_{{$collection}}_7\').attr(\'selvalue\');\r\n	if (selectedValue != \'\'){ $(\'#Collection_{{$collection}}_7\').find(\'option[value=\'+selectedValue+\']\').attr(\'selected\',\'true\'); }\r\n	var selectedValue = $(\'#Collection_{{$collection}}_8\').attr(\'selvalue\');\r\n	if (selectedValue != \'\'){ $(\'#Collection_{{$collection}}_8\').find(\'option[value=\'+selectedValue+\']\').attr(\'selected\',\'true\'); }\r\n	\r\n	\r\n	$(\'#Collection_{{$collection}}_5_row\').css({display:\'\'});\r\n	$(\'#Collection_{{$collection}}_6_row\').css({display:\'\'});\r\n	$(\'#Collection_{{$collection}}_7_row\').css({display:\'\'});\r\n	$(\'#Collection_{{$collection}}_8_row\').css({display:\'\'});\r\n{{literal}}}{{/literal}}\r\n\r\n$(\'#{{$fieldName}}\').change(\r\n			{{literal}}function(){{{/literal}}\r\n				var value = this.value;\r\n				HideAllRepeatFields ();\r\n				\r\n				$(\'#Collection_{{$collection}}_5\').attr(\'selvalue\',\'\');\r\n				$(\'#Collection_{{$collection}}_6\').attr(\'selvalue\',\'\');\r\n				$(\'#Collection_{{$collection}}_7\').attr(\'selvalue\',\'\');\r\n				$(\'#Collection_{{$collection}}_8\').attr(\'selvalue\',\'\');\r\n				\r\n				ShowAll(value);\r\n			{{literal}}}{{/literal}}\r\n);\r\n\r\n\r\nHideAllRepeatFields ();\r\n\r\n{{if $selectedRow.$fieldName neq \'\'}}\r\n	ShowAll({{$selectedRow.$fieldName}});\r\n	$(\'#Collection_{{$collection}}_1\').parent().append(\"<a href=\\\"http://{{$smarty.server.HTTP_HOST}}/rss-feeds/rss-{{$smarty.get.eid}}.rss\\\" target=\\\"_blank\\\">View Feed</a>\");\r\n\r\n{{/if}}\r\n\r\n'),(13,'Content Migration','$(\'#Collection_400_1\').css(\'width\',\'80%\');\r\n$(\'#Collection_400_4\').css(\'width\',\'80%\');\r\n$(\'#Collection_400_5\').css(\'width\',\'80%\');\r\n\r\n$(\'#Collection_400_6\').css(\'width\',\'80%\');\r\n$(\'#Collection_400_6\').css(\'height\',\'200px\');\r\n$(\'#Collection_400_7\').css(\'width\',\'80%\');\r\n\r\n$(\'#useraccessobject\').css(\'display\',\'none\');\r\n\r\n$(\'.collection_field_name\').each(function(){ $(this).attr(\'defaultfieldname\',$(this).html()); });\r\n\r\nfunction setDefaultFieldNames()\r\n{\r\n		$(\'.collection_field_name\').each(function(){ $(this).html($(this).attr(\'defaultfieldname\')); });\r\n}\r\n\r\nfunction emptyFieldInfo()\r\n{\r\n		$(\'.collection_field_row .infotxt\').html(\'\');\r\n}\r\n\r\n{{assign var=acute value=\"&acu\"|concat:\"te;\"}}\r\n{{RunQuery q=\"SELECT * FROM Collection_403 WHERE 1 \" ResultsVar=TemplatesAvailable}}\r\nfunction ChangeFieldsForTemplate (value)\r\n{\r\n		emptyFieldInfo();\r\n		setDefaultFieldNames();\r\n{{foreach from=$TemplatesAvailable item=kv key=kk name=kn}}\r\n		if (value == {{$kv.Collection_403_ID}}) \r\n		{\r\n				\r\n				{{RunQuery q=\"SELECT * FROM Collection_404 WHERE Collection_404_1 = \'\"|concat:$kv.Collection_403_ID|concat:\"\'\" ResultsVar=AllFieldsToShow}}\r\n				{{if $AllFieldsToShow|@count eq 0}}\r\n						$(\'.collection_field_row\').css(\'display\',\'\');\r\n				{{else}}\r\n						$(\'.collection_field_row\').css(\'display\',\'none\');					\r\n						{{foreach from=$AllFieldsToShow key=kkk item=kvv name=knn}}\r\n						$(\'#Collection_400_{{$kvv.Collection_404_2}}_row\').css(\'display\',\'\');	\r\n						\r\n						{{$kvv.Collection_404_4}}\r\n						\r\n						{{if $kvv.Collection_404_3 neq \'\'}}\r\n							$(\'#Collection_400_{{$kvv.Collection_404_2}}_row .infotxt\').html(\'<div class=\"infotxtvalue\">{{$kvv.Collection_404_3|replace:\"\'\":$acute}}</div>\');\r\n						{{/if}}\r\n						\r\n						{{/foreach}}\r\n				{{/if}}\r\n		}		\r\n{{/foreach}}\r\n\r\n}\r\n\r\n$(\'#Collection_400_3\').change(function(){ var v = $(this).val(); ChangeFieldsForTemplate(v); });\r\n\r\nvar v = $(\'#Collection_400_3\').val(); ChangeFieldsForTemplate(v);\r\n');

--
-- Table structure for table `Collection_94`
--

CREATE TABLE `Collection_94` (
  `Collection_94_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Collection_94_1` varchar(254) DEFAULT NULL,
  `Collection_94_2` text,
  `Collection_94_3` varchar(254) DEFAULT NULL,
  PRIMARY KEY (`Collection_94_ID`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `Collection_94`
--

INSERT INTO `Collection_94` VALUES (1,'Static',NULL,NULL),(2,'TIME','if (intval($RowID) == 0)\r\n$Value = date(time());\r\nelse\r\n $Value = $this->db->quote($oldValues[$field]);',NULL),(3,'Password','$Value = $this -> EncodeValue ($Value);',NULL),(4,'Default to On','if (intval($RowID) == 0)\r\n$Value = $this->db->quote(\'on\');\r\nelse\r\n{\r\nif (isset($_POST[$field]))\r\n{\r\n  $Value = $this->db->quote($_POST[$field]);\r\n}\r\nelse\r\n{\r\n $Value = $this->db->quote($oldValues[$field]);\r\n}\r\n}',NULL),(10,'Smarty Default Value',NULL,NULL),(11,'Video - Create Tnail','global $smarty;\r\nglobal $storage;\r\n\r\n$taxonomy 					= $this->getCollectionTaxonomy($CollectionID);\r\n$FileFieldID 				= 0;\r\n$CanMakeImageTransformation = 1;\r\n$CaptureTime 				= \'00:00:01.000\';\r\n$CaptureSize 				= \'100x100\';\r\n\r\nforeach ($taxonomy as $k => $v)\r\n{\r\n	if ($v[\'CollectionInputType\'] == 7)\r\n	{\r\n			$FileFieldID = $v[\'CollectionFieldId\'];\r\n	}\r\n}\r\n\r\nif ($FileFieldID > 0)\r\n{\r\n		$FieldName = $this -> _getCollectionFieldName($CollectionID, $FileFieldID);\r\n		\r\n		if (REMOTE_STORAGE == false)\r\n		{\r\n					//we need the upload to be properly made\r\n					$error = $_FILES[$FieldName][\'error\'];\r\n					\r\n					if ($error != UPLOAD_ERR_OK) \r\n					{\r\n							$CanMakeImageTransformation = 0;\r\n					}\r\n					\r\n		}\r\n		else\r\n		{\r\n					//we have to see if we can find the image\r\n					$FileToTransform = $ColumnValues[$FieldName];\r\n					\r\n					$FileInfo = $storage->getFileByPath($FileToTransform);\r\n					\r\n					if (empty($FileInfo))\r\n					{\r\n							$CanMakeImageTransformation = 0;\r\n					}\r\n					else\r\n					{\r\n								  //row level access info\r\n								  $user_id = isset($_SESSION[\'UserID\'])?$_SESSION[\'UserID\']:$_SESSION[\'AAuserid\'];\r\n								  //we set the user id for later use\r\n								  $storage->setUserID($user_id);\r\n								\r\n								  $admin = false; \r\n								  if($_SESSION[\'FrontEndAdmin\'] == 1)\r\n								  {\r\n									$admin = true;\r\n								  }\r\n								  \r\n								  $storage->setAdmin($admin);\r\n					\r\n					}\r\n					\r\n					\r\n		}\r\n}\r\nelse\r\n{\r\n		$CanMakeImageTransformation = 0;\r\n}\r\n\r\n\r\n\r\nif ($CanMakeImageTransformation == 1)\r\n{\r\n	\r\n	//we need to write different code if we have remote storage active or not\r\n  	if (REMOTE_STORAGE == false)\r\n	{\r\n			\r\n			//we get the directory where we are going to put the file\r\n			\r\n			$SiteCfg           	= $smarty -> config_load(\'admin.conf\' , \'CollectionsUploadDirectory\');\r\n			$UploadDirectories 	= $smarty -> get_config_vars();\r\n			$UploadDirectory 	= UPLOADED_FILES_DIR . $UploadDirectories[\'CollectionsUploadDirectory\'];\r\n	\r\n	\r\n			$collectionSettings  = $this->getCollectionSettings($CollectionID);\r\n			if ($collectionSettings)\r\n			{\r\n				if (count($collectionSettings[2]) > 0)\r\n				{\r\n					$UploadSettings = $collectionSettings[2];\r\n					$UploadDirName = UPLOADED_FILES_DIR . $UploadSettings[\'UploadDir\'];\r\n					\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$UploadDirName) && $UploadDirName !=\'\')\r\n					{\r\n							$UploadDirectory = $UploadDirName;\r\n							\r\n					}\r\n				}\r\n			}\r\n	\r\n	} //end if we have remote storage active\r\n	\r\n	\r\n	$collection_table = $this->_getCollectionTableName($CollectionID);\r\n	$FieldName = $this -> _getCollectionFieldName($CollectionID, \'ID\');\r\n	\r\n	if (intval($RowID) == 0)\r\n	{\r\n			$q = \"SELECT $FieldName FROM $collection_table WHERE 1 ORDER by $FieldName DESC LIMIT 1\";\r\n			$res = $this -> db-> query($q);\r\n			if($res -> numRows() == 0)\r\n			{\r\n				$id = 1;\r\n			}\r\n			else\r\n			{\r\n				$row = $res -> fetchRow(DB_FETCHMODE_ASSOC);\r\n				$id = $row[$FieldName] + 1;\r\n			}\r\n	}\r\n	else\r\n	{\r\n			$id = $RowID;\r\n			\r\n			//delete the current file if we are editing\r\n			$oldValues = $this-> getCollectionSingleRow (array(\'collection_id\' =>$CollectionID , \'row_id\' => $RowID)); \r\n			$oldFileColumnName = $this -> _getCollectionFieldName($CollectionID, $FieldID);\r\n			\r\n			if (REMOTE_STORAGE == false)\r\n			{					\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$oldValues[$oldFileColumnName]))\r\n					{\r\n						unlink($_SERVER[\'DOCUMENT_ROOT\'].$oldValues[$oldFileColumnName]);\r\n					}\r\n			}\r\n			else\r\n			{\r\n					//we simply delete it because we will create a brand new one\r\n					$TransformedFileInfo = $storage->getFileByPath($oldValues[$oldFileColumnName]);\r\n					\r\n					if (!empty($TransformedFileInfo))\r\n					{\r\n							\r\n							$storage->deleteFileById($TransformedFileInfo[$this -> _getCollectionFieldName(STORAGE_FILES_COLLECTION, \'ID\')] , true );\r\n							\r\n					}\r\n					\r\n					\r\n					\r\n								\r\n			} //end if remote storage delete\r\n			\r\n	}\r\n				\r\n	//we need to get the filename that we are going to use for this transformation			\r\n	if (REMOTE_STORAGE == false)\r\n	{	\r\n			$FieldName = $this -> _getCollectionFieldName($CollectionID, $FileFieldID);\r\n			\r\n			$tmp_name 	= $_FILES[$FieldName][\"tmp_name\"];\r\n			$name 		= $_FILES[$FieldName][\"name\"];\r\n\r\n	}\r\n	else\r\n	{\r\n			$tmp_name 	= $FileInfo[$this -> _getCollectionFieldName(STORAGE_FILES_COLLECTION, STORAGE_FILES_PATH_COLUMN)];\r\n			$name 		= $FileInfo[$this -> _getCollectionFieldName(STORAGE_FILES_COLLECTION, STORAGE_FILES_FILENAME_COLUMN)];\r\n	\r\n	}//end if storage active 		\r\n	\r\n	\r\n		\r\n		$path_parts = pathinfo($name);\r\n		\r\n		if(!isset($path_parts[\'filename\']))   {$path_parts[\'filename\'] = substr($path_parts[\'basename\'], 0, strrpos($path_parts[\'basename\'], \'.\'));}\r\n		\r\n\r\n		$originalfilename = $path_parts[\'filename\'].\".\".$path_parts[\'extension\'];\r\n		$originalextension = $path_parts[\'extension\'];\r\n		$newname	= $path_parts[\'filename\'].\'.jpg\';\r\n		\r\n		//we save this value for later use\r\n		$ActualFileName = $newname;\r\n		\r\n		\r\n		if (REMOTE_STORAGE == false)\r\n		{\r\n				$newname 	= $UploadDirectory . $this->getCollectionUploadFileName($UploadDirectory , $newname);\r\n		}\r\n		else\r\n		{\r\n				//we also need to copy the file to the temporary dir\r\n				$tmp_name = $storage->copyFileFromStorageToTmpFolder( $FileInfo , UPLOADED_FILES_DIR . STORAGE_TMP_DIR , \"tmp-\".date(time()).\"-\" . $originalfilename );		\r\n				$ActualFileName = \"tnail-\" . $newname;\r\n				$newname = UPLOADED_FILES_DIR . STORAGE_TMP_DIR . $newname;\r\n				\r\n				$tmp_name = $_SERVER[\'DOCUMENT_ROOT\'].$tmp_name;\r\n										\r\n		}		\r\n		\r\n		\r\n		\r\n		\r\n		//we need to make one more check before starting to convert\r\n		if ($tmp_name != \'\')	\r\n		{\r\n		\r\n						if (preg_match(\"/video/i\", mime_content_type($tmp_name)) || ( (mime_content_type($tmp_name) == \'text/plain\' ||  mime_content_type($tmp_name) == \'application/octet-stream\' ) && ( strtoupper($originalextension) == \'WMV\'  || strtoupper($originalextension) == \'FLV\'  || strtoupper($originalextension) == \'MOV\' || strtoupper($originalextension) == \'MP4\' || strtoupper($originalextension) == \'AVI\' )) )\r\n						{\r\n										\r\n									\r\n									$ExecStatement = \'export PATH=$PATH:/usr/local/bin/; export LD_LIBRARY_PATH=/usr/local/lib/; ffmpeg -i \' .$tmp_name . \' -vframes 1  -t \' . $CaptureTime . \' -y \'.$_SERVER[\"DOCUMENT_ROOT\"] .$newname.\' \';						\r\n									exec ($ExecStatement , $a , $b);\r\n									\r\n									if (!file_exists($_SERVER[\"DOCUMENT_ROOT\"] . $newname))\r\n									{\r\n									\r\n											$tmpnewnameflv = $tmp_name . \".flv\";\r\n											$ExecStatement = \'export PATH=$PATH:/usr/local/bin/; export LD_LIBRARY_PATH=/usr/local/lib/; ffmpeg -i \'.$tmp_name.\' -y -sameq -ar 11025 \'. $tmpnewnameflv;\r\n											exec ($ExecStatement , $a , $b);\r\n											\r\n											//try to convert now\r\n											$ExecStatement = \'export PATH=$PATH:/usr/local/bin/; export LD_LIBRARY_PATH=/usr/local/lib/; ffmpeg -i \' .$tmpnewnameflv . \' -vframes 1  -t \' . $CaptureTime . \' -y \'.$_SERVER[\"DOCUMENT_ROOT\"] .$newname.\' \';\r\n											exec ($ExecStatement , $a , $b);\r\n											\r\n											unlink ($_SERVER[\"DOCUMENT_ROOT\"] . $tmpnewnameflv);\r\n											\r\n									}		\r\n									\r\n									\r\n									\r\n									if (!file_exists($_SERVER[\"DOCUMENT_ROOT\"] . $newname))\r\n									{\r\n									\r\n											$tmpnewname = $tmp_name . \".mpg\";\r\n											$ExecStatement = \'export PATH=$PATH:/usr/local/bin/; export LD_LIBRARY_PATH=/usr/local/lib/; ffmpeg -i \' . $tmp_name . \' -sameq -y \'.$tmpnewname.\' \';\r\n											exec ($ExecStatement , $a , $b);\r\n									\r\n											$ExecStatement = \'export PATH=$PATH:/usr/local/bin/; export LD_LIBRARY_PATH=/usr/local/lib/; ffmpeg -i \' . $tmpnewname . \' -vframes 1  -t \' . $CaptureTime . \' -y \'.$_SERVER[\"DOCUMENT_ROOT\"] .$newname.\' \';\r\n											exec ($ExecStatement , $a , $b);\r\n											\r\n											unlink ($_SERVER[\"DOCUMENT_ROOT\"] . $tmpnewname);\r\n											\r\n									}		\r\n									\r\n									if (file_exists($_SERVER[\"DOCUMENT_ROOT\"] . $newname))\r\n									{\r\n											exec (\'convert \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname.\' -thumbnail \'.$CaptureSize.\' \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname , $a , $b);\r\n									}\r\n										\r\n																		  \r\n						 }\r\n						 \r\n						\r\n						 \r\n						\r\n						 \r\n						 \r\n						 \r\n		}//end if last check for a tmp file to transform\r\n		 		\r\n				\r\n\r\n				   \r\n		if (REMOTE_STORAGE == true)\r\n		{\r\n					//we have to delete the temp file to free up server space\r\n					if (file_exists($tmp_name))\r\n					{\r\n							unlink($tmp_name);\r\n					} //end if temp file exists\r\n					\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$newname))\r\n					{\r\n								\r\n								//we need to send the file to storage\r\n								\r\n								 \r\n								  \r\n								    if (!$storage->CanUserAccessStorage())\r\n									{\r\n											$Value = $this->db->quote(\'\');\r\n											\r\n									}\r\n									\r\n									$storageArray = array();\r\n									$storageArray[\'ActualFileName\'] = $ActualFileName;\r\n									$storageArray[\'ActualFilePath\'] = $_SERVER[\'DOCUMENT_ROOT\'].$newname;\r\n									\r\n									$returnDetails = $storage-> SendFileToStorage ($storageArray);\r\n									\r\n									\r\n									\r\n									if (count($returnDetails[\'errors\'])> 0)\r\n									{\r\n											$Value = $this->db->quote(\'\');\r\n											\r\n									}\r\n									\r\n									\r\n									\r\n									$PathToTheUploadedFile 	= $returnDetails[\'path\'];\r\n									$UploadedFileName 		= $returnDetails[\'filename\'];\r\n									\r\n									$FileTypeArray = array();\r\n									$FileTypeArray[\'tmp_name\'] = $_SERVER[\'DOCUMENT_ROOT\'].$newname;\r\n									$FileTypeArray[\'type\'] = mime_content_type($_SERVER[\'DOCUMENT_ROOT\'].$newname);\r\n									\r\n									$FileType = $storage -> getFileTypeFromFileUpload($FileTypeArray);\r\n									\r\n									\r\n									$args = array();\r\n									$args[\'FileName\'] = $FileInfo[$this->_getCollectionFieldName(STORAGE_FILES_COLLECTION,STORAGE_FILES_NAME_COLUMN)] . \' \' .$TransformationSize . \' Tnail\';\r\n									$args[\'FileType\'] = $FileType;\r\n									$args[\'PathToTheUploadedFile\'] 	= $PathToTheUploadedFile;	\r\n									$args[\'UploadedFileName\'] 		= $UploadedFileName;\r\n									\r\n									$FileUploadID 			= $storage->SaveUploadedFile($args);\r\n									\r\n									if (intval($FileUploadID) > 0)\r\n									{\r\n											$Value = $this->db->quote($PathToTheUploadedFile);\r\n											\r\n									}\r\n									else\r\n									{\r\n											$Value = $this->db->quote(\'\');\r\n											\r\n									}			\r\n									\r\n								 	unlink($_SERVER[\'DOCUMENT_ROOT\'].$newname);\r\n								\r\n								\r\n								\r\n					} //end if temp file exists\r\n					else\r\n					{\r\n								//we set an empty filename if failed to create the transformed file\r\n								$Value = $this->db->quote(\'\');\r\n					}\r\n					\r\n					\r\n		}\r\n		else\r\n		{\r\n					//if file exists we send it to be saved\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$newname))\r\n					{\r\n								$Value = $this->db->quote($newname);\r\n					} //end if temp file exists\r\n					else\r\n					{\r\n								//we set an empty filename if failed to create the transformed file\r\n								$Value = $this->db->quote(\'\');\r\n					}\r\n					\r\n					\r\n		}\r\n		   \r\n	\r\n} //end if can make image transformation','on'),(12,'Create 600px Width Picture','global $smarty;\r\nglobal $storage;\r\n\r\n$taxonomy 					= $this->getCollectionTaxonomy($CollectionID);\r\n$FileFieldID 				= 0;\r\n$CanMakeImageTransformation = 1;\r\n$TransformationSize 		= \'600x600\';\r\n\r\nforeach ($taxonomy as $k => $v)\r\n{\r\n	if ($v[\'CollectionInputType\'] == 7)\r\n	{\r\n			$FileFieldID = $v[\'CollectionFieldId\'];\r\n	}\r\n}\r\n\r\nif ($FileFieldID > 0)\r\n{\r\n		$FieldName = $this -> _getCollectionFieldName($CollectionID, $FileFieldID);\r\n		\r\n		if (REMOTE_STORAGE == false)\r\n		{\r\n					//we need the upload to be properly made\r\n					$error = $_FILES[$FieldName][\'error\'];\r\n					\r\n					if ($error != UPLOAD_ERR_OK) \r\n					{\r\n							$CanMakeImageTransformation = 0;\r\n					}\r\n					\r\n		}\r\n		else\r\n		{\r\n					//we have to see if we can find the image\r\n					$FileToTransform = $ColumnValues[$FieldName];\r\n					\r\n					$FileInfo = $storage->getFileByPath($FileToTransform);\r\n					\r\n					if (empty($FileInfo))\r\n					{\r\n							$CanMakeImageTransformation = 0;\r\n					}\r\n					else\r\n					{\r\n								  //row level access info\r\n								  $user_id = isset($_SESSION[\'UserID\'])?$_SESSION[\'UserID\']:$_SESSION[\'AAuserid\'];\r\n								  //we set the user id for later use\r\n								  $storage->setUserID($user_id);\r\n								\r\n								  $admin = false; \r\n								  if($_SESSION[\'FrontEndAdmin\'] == 1)\r\n								  {\r\n									$admin = true;\r\n								  }\r\n								  \r\n								  $storage->setAdmin($admin);\r\n					\r\n					}\r\n					\r\n					\r\n		}\r\n}\r\nelse\r\n{\r\n		$CanMakeImageTransformation = 0;\r\n}\r\n\r\n\r\n\r\nif ($CanMakeImageTransformation == 1)\r\n{\r\n	\r\n	//we need to write different code if we have remote storage active or not\r\n  	if (REMOTE_STORAGE == false)\r\n	{\r\n			\r\n			//we get the directory where we are going to put the file\r\n			\r\n			$SiteCfg           	= $smarty -> config_load(\'admin.conf\' , \'CollectionsUploadDirectory\');\r\n			$UploadDirectories 	= $smarty -> get_config_vars();\r\n			$UploadDirectory 	= UPLOADED_FILES_DIR . $UploadDirectories[\'CollectionsUploadDirectory\'];\r\n	\r\n	\r\n			$collectionSettings  = $this->getCollectionSettings($CollectionID);\r\n			if ($collectionSettings)\r\n			{\r\n				if (count($collectionSettings[2]) > 0)\r\n				{\r\n					$UploadSettings = $collectionSettings[2];\r\n					$UploadDirName = UPLOADED_FILES_DIR . $UploadSettings[\'UploadDir\'];\r\n					\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$UploadDirName) && $UploadDirName !=\'\')\r\n					{\r\n							$UploadDirectory = $UploadDirName;\r\n							\r\n					}\r\n				}\r\n			}\r\n	\r\n	} //end if we have remote storage active\r\n	\r\n	\r\n	$collection_table = $this->_getCollectionTableName($CollectionID);\r\n	$FieldName = $this -> _getCollectionFieldName($CollectionID, \'ID\');\r\n	\r\n	if (intval($RowID) == 0)\r\n	{\r\n			$q = \"SELECT $FieldName FROM $collection_table WHERE 1 ORDER by $FieldName DESC LIMIT 1\";\r\n			$res = $this -> db-> query($q);\r\n			if($res -> numRows() == 0)\r\n			{\r\n				$id = 1;\r\n			}\r\n			else\r\n			{\r\n				$row = $res -> fetchRow(DB_FETCHMODE_ASSOC);\r\n				$id = $row[$FieldName] + 1;\r\n			}\r\n	}\r\n	else\r\n	{\r\n			$id = $RowID;\r\n			\r\n			//delete the current file if we are editing\r\n			$oldValues = $this-> getCollectionSingleRow (array(\'collection_id\' =>$CollectionID , \'row_id\' => $RowID)); \r\n			$oldFileColumnName = $this -> _getCollectionFieldName($CollectionID, $FieldID);\r\n			\r\n			if (REMOTE_STORAGE == false)\r\n			{					\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$oldValues[$oldFileColumnName]))\r\n					{\r\n						unlink($_SERVER[\'DOCUMENT_ROOT\'].$oldValues[$oldFileColumnName]);\r\n					}\r\n			}\r\n			else\r\n			{\r\n					//we simply delete it because we will create a brand new one\r\n					$TransformedFileInfo = $storage->getFileByPath($oldValues[$oldFileColumnName]);\r\n					\r\n					if (!empty($TransformedFileInfo))\r\n					{\r\n							\r\n							$storage->deleteFileById($TransformedFileInfo[$this -> _getCollectionFieldName(STORAGE_FILES_COLLECTION, \'ID\')] , true );\r\n							\r\n					}\r\n					\r\n					\r\n					\r\n								\r\n			} //end if remote storage delete\r\n			\r\n	}\r\n				\r\n	//we need to get the filename that we are going to use for this transformation			\r\n	if (REMOTE_STORAGE == false)\r\n	{	\r\n			$FieldName = $this -> _getCollectionFieldName($CollectionID, $FileFieldID);\r\n			\r\n			$tmp_name 	= $_FILES[$FieldName][\"tmp_name\"];\r\n			$name 		= $_FILES[$FieldName][\"name\"];\r\n\r\n	}\r\n	else\r\n	{\r\n			$tmp_name 	= $FileInfo[$this -> _getCollectionFieldName(STORAGE_FILES_COLLECTION, STORAGE_FILES_PATH_COLUMN)];\r\n			$name 		= $FileInfo[$this -> _getCollectionFieldName(STORAGE_FILES_COLLECTION, STORAGE_FILES_FILENAME_COLUMN)];\r\n	\r\n	}//end if storage active 		\r\n	\r\n	\r\n		\r\n		$path_parts = pathinfo($name);\r\n		\r\n		if(!isset($path_parts[\'filename\']))   {$path_parts[\'filename\'] = substr($path_parts[\'basename\'], 0, strrpos($path_parts[\'basename\'], \'.\'));}\r\n		\r\n		$newname	= $path_parts[\'filename\'].\'.jpg\';\r\n		\r\n		//we save this value for later use\r\n		$ActualFileName = $newname;\r\n		\r\n		if (REMOTE_STORAGE == false)\r\n		{\r\n				$newname 	= $UploadDirectory . $this->getCollectionUploadFileName($UploadDirectory , $newname);\r\n		}\r\n		else\r\n		{\r\n				//we also need to copy the file to the temporary dir\r\n				$tmp_name = $storage->copyFileFromStorageToTmpFolder( $FileInfo , UPLOADED_FILES_DIR . STORAGE_TMP_DIR , \"tmp-\".date(time()).\"-\" . $newname );		\r\n				$ActualFileName = \"tnail-\" . $newname;\r\n				$newname = UPLOADED_FILES_DIR . STORAGE_TMP_DIR . \"tnail-\" . $newname;\r\n				\r\n				$tmp_name = $_SERVER[\'DOCUMENT_ROOT\'].$tmp_name;\r\n										\r\n		}		\r\n		\r\n		//we need to make one more check before starting to convert\r\n		if ($tmp_name != \'\')	\r\n		{\r\n		\r\n						if (preg_match(\"/image/i\", mime_content_type($tmp_name)))\r\n						{\r\n										\r\n										if (strtoupper($extension) == \'PSD\')\r\n										{\r\n											exec (\'export PATH=$PATH:/usr/local/bin/; convert \'.$tmp_name.\'[0] \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname .\';  convert -colorspace RGB \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname.\' jpg:\'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname.\';\', $a , $b);\r\n											exec (\'convert -colorspace RGB \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname.\' -thumbnail \'.$TransformationSize.\' \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname , $a , $b);\r\n										}\r\n										else\r\n										{\r\n											exec (\'convert -colorspace RGB \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname.\' jpg:\'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname .\'; convert -colorspace RGB \'.$tmp_name.\' -thumbnail \'.$TransformationSize.\' \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname , $a , $b);\r\n										}	\r\n																		  \r\n						 }\r\n						 \r\n						\r\n						 \r\n						 if ( mime_content_type($tmp_name) == \'application/pdf\' || mime_content_type($tmp_name) == \'application/postscript\' )\r\n						 {\r\n				\r\n										exec (\'export PATH=$PATH:/usr/local/bin/; convert \'.$tmp_name.\'[0] \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname .\';  convert -colorspace RGB \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname.\' jpg:\'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname.\';\', $a , $b);\r\n										exec (\'convert -colorspace RGB \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname.\' -thumbnail \'.$TransformationSize.\' \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname , $a , $b);\r\n							 \r\n						 }\r\n						 \r\n						 if ( strtoupper($extension) == \'EPS\')\r\n						 {\r\n\r\n										exec (\'export PATH=$PATH:/usr/local/bin/; convert -density 72 \'.$tmp_name.\' \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname .\'; convert -colorspace RGB \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname.\' jpg:\'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname.\'; \', $a , $b);\r\n										exec (\'convert -colorspace RGB \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname.\' -thumbnail \'.$TransformationSize.\' \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname , $a , $b);						\r\n\r\n						 }\r\n						 \r\n						 \r\n						 if (preg_match(\"/video/i\", mime_content_type($tmp_name)) || ( mime_content_type($tmp_name) == \'text/plain\' && ( strtoupper($extension) == \'WMV\'  || strtoupper($extension) == \'MOV\' )) )\r\n						 {\r\n								  										\r\n										$tmpnewname = $UploadDirectory .\"tmp_\" . $CollectionID . \"_\" . $FieldID . \"_\" . $id . \".%d.jpg\";\r\n										$tmp1 = $UploadDirectory .\"tmp_\" . $CollectionID . \"_\" . $FieldID . \"_\" . $id . \".1.jpg\";\r\n										$tmp2 = $UploadDirectory .\"tmp_\" . $CollectionID . \"_\" . $FieldID . \"_\" . $id . \".2.jpg\";\r\n										\r\n										$StartFrame = \'00:00:05.001\';\r\n										$CaptureTime = \'00:00:00.001\';\r\n										$InputVideo = $tmp_name;\r\n										$OutputSize = \'320x240\';\r\n										$ExecStatement = \'export PATH=$PATH:/usr/local/bin/; export LD_LIBRARY_PATH=/usr/local/lib/; ffmpeg -i \' . $InputVideo . \' -an -ss \' . $StartFrame . \' -t \' . $CaptureTime . \' -r 1 -y -s \' . $OutputSize . \' \'.$_SERVER[\"DOCUMENT_ROOT\"] .$tmpnewname.\' \';\r\n										exec ($ExecStatement , $a , $b);\r\n														\r\n										exec (\'convert \'.$_SERVER[\"DOCUMENT_ROOT\"] . $tmp1.\' -thumbnail \'.$TransformationSize.\' \'.$_SERVER[\"DOCUMENT_ROOT\"] . $newname , $a , $b);\r\n										unlink ($_SERVER[\"DOCUMENT_ROOT\"] . $tmp1);\r\n										unlink ($_SERVER[\"DOCUMENT_ROOT\"] . $tmp2);\r\n																 \r\n						 }\r\n						 \r\n						//copy ($tmp_name , $_SERVER[\'DOCUMENT_ROOT\']. $newname );\r\n						 \r\n		}//end if last check for a tmp file to transform\r\n		 		   \r\n		if (REMOTE_STORAGE == true)\r\n		{\r\n					//we have to delete the temp file to free up server space\r\n					if (file_exists($tmp_name))\r\n					{\r\n							unlink($tmp_name);\r\n					} //end if temp file exists\r\n					\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$newname))\r\n					{\r\n								\r\n								//we need to send the file to storage\r\n								\r\n								 \r\n								  \r\n								    if (!$storage->CanUserAccessStorage())\r\n									{\r\n											$Value = $this->db->quote(\'\');\r\n											\r\n									}\r\n									\r\n									$storageArray = array();\r\n									$storageArray[\'ActualFileName\'] = $ActualFileName;\r\n									$storageArray[\'ActualFilePath\'] = $_SERVER[\'DOCUMENT_ROOT\'].$newname;\r\n									\r\n									$returnDetails = $storage-> SendFileToStorage ($storageArray);\r\n									\r\n									\r\n									\r\n									if (count($returnDetails[\'errors\'])> 0)\r\n									{\r\n											$Value = $this->db->quote(\'\');\r\n											\r\n									}\r\n									\r\n									\r\n									\r\n									$PathToTheUploadedFile 	= $returnDetails[\'path\'];\r\n									$UploadedFileName 		= $returnDetails[\'filename\'];\r\n									\r\n									$FileTypeArray = array();\r\n									$FileTypeArray[\'tmp_name\'] = $_SERVER[\'DOCUMENT_ROOT\'].$newname;\r\n									$FileTypeArray[\'type\'] = mime_content_type($_SERVER[\'DOCUMENT_ROOT\'].$newname);\r\n									\r\n									$FileType = $storage -> getFileTypeFromFileUpload($FileTypeArray);\r\n									\r\n									\r\n									$args = array();\r\n									$args[\'FileName\'] = $FileInfo[$this->_getCollectionFieldName(STORAGE_FILES_COLLECTION,STORAGE_FILES_NAME_COLUMN)] . \' \' .$TransformationSize . \' Tnail\';\r\n									$args[\'FileType\'] = $FileType;\r\n									$args[\'PathToTheUploadedFile\'] 	= $PathToTheUploadedFile;	\r\n									$args[\'UploadedFileName\'] 		= $UploadedFileName;\r\n									\r\n									$FileUploadID 			= $storage->SaveUploadedFile($args);\r\n									\r\n									if (intval($FileUploadID) > 0)\r\n									{\r\n											$Value = $this->db->quote($PathToTheUploadedFile);\r\n											\r\n									}\r\n									else\r\n									{\r\n											$Value = $this->db->quote(\'\');\r\n											\r\n									}			\r\n									\r\n								 	unlink($_SERVER[\'DOCUMENT_ROOT\'].$newname);\r\n								\r\n								\r\n								\r\n					} //end if temp file exists\r\n					else\r\n					{\r\n								//we set an empty filename if failed to create the transformed file\r\n								$Value = $this->db->quote(\'\');\r\n					}\r\n					\r\n					\r\n		}\r\n		else\r\n		{\r\n					//if file exists we send it to be saved\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$newname))\r\n					{\r\n								$Value = $this->db->quote($newname);\r\n					} //end if temp file exists\r\n					else\r\n					{\r\n								//we set an empty filename if failed to create the transformed file\r\n								$Value = $this->db->quote(\'\');\r\n					}\r\n					\r\n					\r\n		}\r\n		   \r\n	\r\n} //end if can make image transformation\r\n\r\n','on'),(13,'Video - Convert to FLV file','global $smarty;\r\nglobal $storage;\r\n\r\n$taxonomy 					= $this->getCollectionTaxonomy($CollectionID);\r\n$FileFieldID 				= 0;\r\n$CanMakeImageTransformation = 1;\r\n\r\nforeach ($taxonomy as $k => $v)\r\n{\r\n	if ($v[\'CollectionInputType\'] == 7)\r\n	{\r\n			$FileFieldID = $v[\'CollectionFieldId\'];\r\n	}\r\n}\r\n\r\nif ($FileFieldID > 0)\r\n{\r\n		$FieldName = $this -> _getCollectionFieldName($CollectionID, $FileFieldID);\r\n		\r\n		if (REMOTE_STORAGE == false)\r\n		{\r\n					//we need the upload to be properly made\r\n					$error = $_FILES[$FieldName][\'error\'];\r\n					\r\n					if ($error != UPLOAD_ERR_OK) \r\n					{\r\n							$CanMakeImageTransformation = 0;\r\n					}\r\n					\r\n		}\r\n		else\r\n		{\r\n					//we have to see if we can find the image\r\n					$FileToTransform = $ColumnValues[$FieldName];\r\n					\r\n					$FileInfo = $storage->getFileByPath($FileToTransform);\r\n					\r\n					if (empty($FileInfo))\r\n					{\r\n							$CanMakeImageTransformation = 0;\r\n					}\r\n					else\r\n					{\r\n								  //row level access info\r\n								  $user_id = isset($_SESSION[\'UserID\'])?$_SESSION[\'UserID\']:$_SESSION[\'AAuserid\'];\r\n								  //we set the user id for later use\r\n								  $storage->setUserID($user_id);\r\n								\r\n								  $admin = false; \r\n								  if($_SESSION[\'FrontEndAdmin\'] == 1)\r\n								  {\r\n									$admin = true;\r\n								  }\r\n								  \r\n								  $storage->setAdmin($admin);\r\n					\r\n					}\r\n					\r\n					\r\n		}\r\n}\r\nelse\r\n{\r\n		$CanMakeImageTransformation = 0;\r\n}\r\n\r\n\r\n\r\nif ($CanMakeImageTransformation == 1)\r\n{\r\n	\r\n	//we need to write different code if we have remote storage active or not\r\n  	if (REMOTE_STORAGE == false)\r\n	{\r\n			\r\n			//we get the directory where we are going to put the file\r\n			\r\n			$SiteCfg           	= $smarty -> config_load(\'admin.conf\' , \'CollectionsUploadDirectory\');\r\n			$UploadDirectories 	= $smarty -> get_config_vars();\r\n			$UploadDirectory 	= UPLOADED_FILES_DIR . $UploadDirectories[\'CollectionsUploadDirectory\'];\r\n	\r\n	\r\n			$collectionSettings  = $this->getCollectionSettings($CollectionID);\r\n			if ($collectionSettings)\r\n			{\r\n				if (count($collectionSettings[2]) > 0)\r\n				{\r\n					$UploadSettings = $collectionSettings[2];\r\n					$UploadDirName = UPLOADED_FILES_DIR . $UploadSettings[\'UploadDir\'];\r\n					\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$UploadDirName) && $UploadDirName !=\'\')\r\n					{\r\n							$UploadDirectory = $UploadDirName;\r\n							\r\n					}\r\n				}\r\n			}\r\n	\r\n	} //end if we have remote storage active\r\n	\r\n	\r\n	$collection_table = $this->_getCollectionTableName($CollectionID);\r\n	$FieldName = $this -> _getCollectionFieldName($CollectionID, \'ID\');\r\n	\r\n	if (intval($RowID) == 0)\r\n	{\r\n			$q = \"SELECT $FieldName FROM $collection_table WHERE 1 ORDER by $FieldName DESC LIMIT 1\";\r\n			$res = $this -> db-> query($q);\r\n			if($res -> numRows() == 0)\r\n			{\r\n				$id = 1;\r\n			}\r\n			else\r\n			{\r\n				$row = $res -> fetchRow(DB_FETCHMODE_ASSOC);\r\n				$id = $row[$FieldName] + 1;\r\n			}\r\n	}\r\n	else\r\n	{\r\n			$id = $RowID;\r\n			\r\n			//delete the current file if we are editing\r\n			$oldValues = $this-> getCollectionSingleRow (array(\'collection_id\' =>$CollectionID , \'row_id\' => $RowID)); \r\n			$oldFileColumnName = $this -> _getCollectionFieldName($CollectionID, $FieldID);\r\n			\r\n			if (REMOTE_STORAGE == false)\r\n			{					\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$oldValues[$oldFileColumnName]))\r\n					{\r\n						unlink($_SERVER[\'DOCUMENT_ROOT\'].$oldValues[$oldFileColumnName]);\r\n					}\r\n			}\r\n			else\r\n			{\r\n					//we simply delete it because we will create a brand new one\r\n					$TransformedFileInfo = $storage->getFileByPath($oldValues[$oldFileColumnName]);\r\n					\r\n					if (!empty($TransformedFileInfo))\r\n					{\r\n							\r\n							$storage->deleteFileById($TransformedFileInfo[$this -> _getCollectionFieldName(STORAGE_FILES_COLLECTION, \'ID\')] , true );\r\n							\r\n					}\r\n					\r\n					\r\n					\r\n								\r\n			} //end if remote storage delete\r\n			\r\n	}\r\n				\r\n	//we need to get the filename that we are going to use for this transformation			\r\n	if (REMOTE_STORAGE == false)\r\n	{	\r\n			$FieldName = $this -> _getCollectionFieldName($CollectionID, $FileFieldID);\r\n			\r\n			$tmp_name 	= $_FILES[$FieldName][\"tmp_name\"];\r\n			$name 		= $_FILES[$FieldName][\"name\"];\r\n\r\n	}\r\n	else\r\n	{\r\n			$tmp_name 	= $FileInfo[$this -> _getCollectionFieldName(STORAGE_FILES_COLLECTION, STORAGE_FILES_PATH_COLUMN)];\r\n			$name 		= $FileInfo[$this -> _getCollectionFieldName(STORAGE_FILES_COLLECTION, STORAGE_FILES_FILENAME_COLUMN)];\r\n	\r\n	}//end if storage active 		\r\n	\r\n	\r\n		\r\n		$path_parts = pathinfo($name);\r\n		\r\n		if(!isset($path_parts[\'filename\']))   {$path_parts[\'filename\'] = substr($path_parts[\'basename\'], 0, strrpos($path_parts[\'basename\'], \'.\'));}\r\n		\r\n\r\n		$originalfilename = $path_parts[\'filename\'].\".\".$path_parts[\'extension\'];\r\n		$originalextension = $path_parts[\'extension\'];\r\n		$newname	= $path_parts[\'filename\'].\'.flv\';\r\n		\r\n		//we save this value for later use\r\n		$ActualFileName = $newname;\r\n		\r\n		\r\n		if (REMOTE_STORAGE == false)\r\n		{\r\n				$newname 	= $UploadDirectory . $this->getCollectionUploadFileName($UploadDirectory , $newname);\r\n		}\r\n		else\r\n		{\r\n				//we also need to copy the file to the temporary dir\r\n				$tmp_name = $storage->copyFileFromStorageToTmpFolder( $FileInfo , UPLOADED_FILES_DIR . STORAGE_TMP_DIR , \"tmp-\".date(time()).\"-\" . $originalfilename );		\r\n				$ActualFileName = \"tnail-\" . $newname;\r\n				$newname = UPLOADED_FILES_DIR . STORAGE_TMP_DIR . $newname;\r\n				\r\n				$tmp_name = $_SERVER[\'DOCUMENT_ROOT\'].$tmp_name;\r\n										\r\n		}		\r\n		\r\n		\r\n		\r\n		\r\n		//we need to make one more check before starting to convert\r\n		if ($tmp_name != \'\')	\r\n		{\r\n		\r\n						if (preg_match(\"/video/i\", mime_content_type($tmp_name)) || ( (mime_content_type($tmp_name) == \'text/plain\' ||  mime_content_type($tmp_name) == \'application/octet-stream\' ) && ( strtoupper($originalextension) == \'WMV\'  || strtoupper($originalextension) == \'MOV\' || strtoupper($originalextension) == \'MP4\' || strtoupper($originalextension) == \'AVI\' )) )\r\n						{\r\n										\r\n																			\r\n										\r\n										$ExecStatement = \'export PATH=$PATH:/usr/local/bin/; export LD_LIBRARY_PATH=/usr/local/lib/; ffmpeg -i \'.$tmp_name.\' -y -sameq \'. $_SERVER[\"DOCUMENT_ROOT\"] .$newname;\r\n										exec ($ExecStatement , $a , $b);\r\n										\r\n																		  \r\n						 }\r\n						 \r\n						\r\n						 \r\n						 if ( strtoupper($originalextension) == \'FLV\')\r\n						 {\r\n								\r\n								copy($tmp_name, $_SERVER[\"DOCUMENT_ROOT\"] . $newname );\r\n														 \r\n						 \r\n						 }\r\n						 \r\n						 \r\n						 \r\n		}//end if last check for a tmp file to transform\r\n		 		\r\n				\r\n\r\n				   \r\n		if (REMOTE_STORAGE == true)\r\n		{\r\n					//we have to delete the temp file to free up server space\r\n					if (file_exists($tmp_name))\r\n					{\r\n							unlink($tmp_name);\r\n					} //end if temp file exists\r\n					\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$newname))\r\n					{\r\n								\r\n								//we need to send the file to storage\r\n								\r\n								 \r\n								  \r\n								    if (!$storage->CanUserAccessStorage())\r\n									{\r\n											$Value = $this->db->quote(\'\');\r\n											\r\n									}\r\n									\r\n									$storageArray = array();\r\n									$storageArray[\'ActualFileName\'] = $ActualFileName;\r\n									$storageArray[\'ActualFilePath\'] = $_SERVER[\'DOCUMENT_ROOT\'].$newname;\r\n									\r\n									$returnDetails = $storage-> SendFileToStorage ($storageArray);\r\n									\r\n									\r\n									\r\n									if (count($returnDetails[\'errors\'])> 0)\r\n									{\r\n											$Value = $this->db->quote(\'\');\r\n											\r\n									}\r\n									\r\n									\r\n									\r\n									$PathToTheUploadedFile 	= $returnDetails[\'path\'];\r\n									$UploadedFileName 		= $returnDetails[\'filename\'];\r\n									\r\n									$FileTypeArray = array();\r\n									$FileTypeArray[\'tmp_name\'] = $_SERVER[\'DOCUMENT_ROOT\'].$newname;\r\n									$FileTypeArray[\'type\'] = mime_content_type($_SERVER[\'DOCUMENT_ROOT\'].$newname);\r\n									\r\n									$FileType = $storage -> getFileTypeFromFileUpload($FileTypeArray);\r\n									\r\n									\r\n									$args = array();\r\n									$args[\'FileName\'] = $FileInfo[$this->_getCollectionFieldName(STORAGE_FILES_COLLECTION,STORAGE_FILES_NAME_COLUMN)] . \' \' .$TransformationSize . \' Tnail\';\r\n									$args[\'FileType\'] = $FileType;\r\n									$args[\'PathToTheUploadedFile\'] 	= $PathToTheUploadedFile;	\r\n									$args[\'UploadedFileName\'] 		= $UploadedFileName;\r\n									\r\n									$FileUploadID 			= $storage->SaveUploadedFile($args);\r\n									\r\n									if (intval($FileUploadID) > 0)\r\n									{\r\n											$Value = $this->db->quote($PathToTheUploadedFile);\r\n											\r\n									}\r\n									else\r\n									{\r\n											$Value = $this->db->quote(\'\');\r\n											\r\n									}			\r\n									\r\n								 	unlink($_SERVER[\'DOCUMENT_ROOT\'].$newname);\r\n								\r\n								\r\n								\r\n					} //end if temp file exists\r\n					else\r\n					{\r\n								//we set an empty filename if failed to create the transformed file\r\n								$Value = $this->db->quote(\'\');\r\n					}\r\n					\r\n					\r\n		}\r\n		else\r\n		{\r\n					//if file exists we send it to be saved\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$newname))\r\n					{\r\n								$Value = $this->db->quote($newname);\r\n					} //end if temp file exists\r\n					else\r\n					{\r\n								//we set an empty filename if failed to create the transformed file\r\n								$Value = $this->db->quote(\'\');\r\n					}\r\n					\r\n					\r\n		}\r\n		   \r\n	\r\n} //end if can make image transformation','on'),(14,'Video - Screenshot','global $smarty;\r\nglobal $storage;\r\n\r\n$taxonomy 					= $this->getCollectionTaxonomy($CollectionID);\r\n$FileFieldID 				= 0;\r\n$CanMakeImageTransformation = 1;\r\n$CaptureTime 				= \'00:00:01.000\';\r\n\r\nforeach ($taxonomy as $k => $v)\r\n{\r\n	if ($v[\'CollectionInputType\'] == 7)\r\n	{\r\n			$FileFieldID = $v[\'CollectionFieldId\'];\r\n	}\r\n}\r\n\r\nif ($FileFieldID > 0)\r\n{\r\n		$FieldName = $this -> _getCollectionFieldName($CollectionID, $FileFieldID);\r\n		\r\n		if (REMOTE_STORAGE == false)\r\n		{\r\n					//we need the upload to be properly made\r\n					$error = $_FILES[$FieldName][\'error\'];\r\n					\r\n					if ($error != UPLOAD_ERR_OK) \r\n					{\r\n							$CanMakeImageTransformation = 0;\r\n					}\r\n					\r\n		}\r\n		else\r\n		{\r\n					//we have to see if we can find the image\r\n					$FileToTransform = $ColumnValues[$FieldName];\r\n					\r\n					$FileInfo = $storage->getFileByPath($FileToTransform);\r\n					\r\n					if (empty($FileInfo))\r\n					{\r\n							$CanMakeImageTransformation = 0;\r\n					}\r\n					else\r\n					{\r\n								  //row level access info\r\n								  $user_id = isset($_SESSION[\'UserID\'])?$_SESSION[\'UserID\']:$_SESSION[\'AAuserid\'];\r\n								  //we set the user id for later use\r\n								  $storage->setUserID($user_id);\r\n								\r\n								  $admin = false; \r\n								  if($_SESSION[\'FrontEndAdmin\'] == 1)\r\n								  {\r\n									$admin = true;\r\n								  }\r\n								  \r\n								  $storage->setAdmin($admin);\r\n					\r\n					}\r\n					\r\n					\r\n		}\r\n}\r\nelse\r\n{\r\n		$CanMakeImageTransformation = 0;\r\n}\r\n\r\n\r\n\r\nif ($CanMakeImageTransformation == 1)\r\n{\r\n	\r\n	//we need to write different code if we have remote storage active or not\r\n  	if (REMOTE_STORAGE == false)\r\n	{\r\n			\r\n			//we get the directory where we are going to put the file\r\n			\r\n			$SiteCfg           	= $smarty -> config_load(\'admin.conf\' , \'CollectionsUploadDirectory\');\r\n			$UploadDirectories 	= $smarty -> get_config_vars();\r\n			$UploadDirectory 	= UPLOADED_FILES_DIR . $UploadDirectories[\'CollectionsUploadDirectory\'];\r\n	\r\n	\r\n			$collectionSettings  = $this->getCollectionSettings($CollectionID);\r\n			if ($collectionSettings)\r\n			{\r\n				if (count($collectionSettings[2]) > 0)\r\n				{\r\n					$UploadSettings = $collectionSettings[2];\r\n					$UploadDirName = UPLOADED_FILES_DIR . $UploadSettings[\'UploadDir\'];\r\n					\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$UploadDirName) && $UploadDirName !=\'\')\r\n					{\r\n							$UploadDirectory = $UploadDirName;\r\n							\r\n					}\r\n				}\r\n			}\r\n	\r\n	} //end if we have remote storage active\r\n	\r\n	\r\n	$collection_table = $this->_getCollectionTableName($CollectionID);\r\n	$FieldName = $this -> _getCollectionFieldName($CollectionID, \'ID\');\r\n	\r\n	if (intval($RowID) == 0)\r\n	{\r\n			$q = \"SELECT $FieldName FROM $collection_table WHERE 1 ORDER by $FieldName DESC LIMIT 1\";\r\n			$res = $this -> db-> query($q);\r\n			if($res -> numRows() == 0)\r\n			{\r\n				$id = 1;\r\n			}\r\n			else\r\n			{\r\n				$row = $res -> fetchRow(DB_FETCHMODE_ASSOC);\r\n				$id = $row[$FieldName] + 1;\r\n			}\r\n	}\r\n	else\r\n	{\r\n			$id = $RowID;\r\n			\r\n			//delete the current file if we are editing\r\n			$oldValues = $this-> getCollectionSingleRow (array(\'collection_id\' =>$CollectionID , \'row_id\' => $RowID)); \r\n			$oldFileColumnName = $this -> _getCollectionFieldName($CollectionID, $FieldID);\r\n			\r\n			if (REMOTE_STORAGE == false)\r\n			{					\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$oldValues[$oldFileColumnName]))\r\n					{\r\n						unlink($_SERVER[\'DOCUMENT_ROOT\'].$oldValues[$oldFileColumnName]);\r\n					}\r\n			}\r\n			else\r\n			{\r\n					//we simply delete it because we will create a brand new one\r\n					$TransformedFileInfo = $storage->getFileByPath($oldValues[$oldFileColumnName]);\r\n					\r\n					if (!empty($TransformedFileInfo))\r\n					{\r\n							\r\n							$storage->deleteFileById($TransformedFileInfo[$this -> _getCollectionFieldName(STORAGE_FILES_COLLECTION, \'ID\')] , true );\r\n							\r\n					}\r\n					\r\n					\r\n					\r\n								\r\n			} //end if remote storage delete\r\n			\r\n	}\r\n				\r\n	//we need to get the filename that we are going to use for this transformation			\r\n	if (REMOTE_STORAGE == false)\r\n	{	\r\n			$FieldName = $this -> _getCollectionFieldName($CollectionID, $FileFieldID);\r\n			\r\n			$tmp_name 	= $_FILES[$FieldName][\"tmp_name\"];\r\n			$name 		= $_FILES[$FieldName][\"name\"];\r\n\r\n	}\r\n	else\r\n	{\r\n			$tmp_name 	= $FileInfo[$this -> _getCollectionFieldName(STORAGE_FILES_COLLECTION, STORAGE_FILES_PATH_COLUMN)];\r\n			$name 		= $FileInfo[$this -> _getCollectionFieldName(STORAGE_FILES_COLLECTION, STORAGE_FILES_FILENAME_COLUMN)];\r\n	\r\n	}//end if storage active 		\r\n	\r\n	\r\n		\r\n		$path_parts = pathinfo($name);\r\n		\r\n		if(!isset($path_parts[\'filename\']))   {$path_parts[\'filename\'] = substr($path_parts[\'basename\'], 0, strrpos($path_parts[\'basename\'], \'.\'));}\r\n		\r\n\r\n		$originalfilename = $path_parts[\'filename\'].\".\".$path_parts[\'extension\'];\r\n		$originalextension = $path_parts[\'extension\'];\r\n		$newname	= $path_parts[\'filename\'].\'.jpg\';\r\n		\r\n		//we save this value for later use\r\n		$ActualFileName = $newname;\r\n		\r\n		\r\n		if (REMOTE_STORAGE == false)\r\n		{\r\n				$newname 	= $UploadDirectory . $this->getCollectionUploadFileName($UploadDirectory , $newname);\r\n		}\r\n		else\r\n		{\r\n				//we also need to copy the file to the temporary dir\r\n				$tmp_name = $storage->copyFileFromStorageToTmpFolder( $FileInfo , UPLOADED_FILES_DIR . STORAGE_TMP_DIR , \"tmp-\".date(time()).\"-\" . $originalfilename );		\r\n				$ActualFileName = \"tnail-\" . $newname;\r\n				$newname = UPLOADED_FILES_DIR . STORAGE_TMP_DIR . $newname;\r\n				\r\n				$tmp_name = $_SERVER[\'DOCUMENT_ROOT\'].$tmp_name;\r\n										\r\n		}		\r\n		\r\n		\r\n		\r\n		\r\n		//we need to make one more check before starting to convert\r\n		if ($tmp_name != \'\')	\r\n		{\r\n		\r\n						if (preg_match(\"/video/i\", mime_content_type($tmp_name)) || ( (mime_content_type($tmp_name) == \'text/plain\' ||  mime_content_type($tmp_name) == \'application/octet-stream\' ) && ( strtoupper($originalextension) == \'WMV\'  || strtoupper($originalextension) == \'FLV\'  || strtoupper($originalextension) == \'MOV\' || strtoupper($originalextension) == \'MP4\' || strtoupper($originalextension) == \'AVI\' )) )\r\n						{\r\n										\r\n									\r\n									$ExecStatement = \'export PATH=$PATH:/usr/local/bin/; export LD_LIBRARY_PATH=/usr/local/lib/; ffmpeg -i \' .$tmp_name . \' -vframes 1 -t \' . $CaptureTime . \' -y \'.$_SERVER[\"DOCUMENT_ROOT\"] .$newname.\' \';						\r\n									exec ($ExecStatement , $a , $b);\r\n									\r\n									if (!file_exists($_SERVER[\"DOCUMENT_ROOT\"] . $newname))\r\n									{\r\n									\r\n											$tmpnewnameflv = $tmp_name . \".flv\";\r\n											$ExecStatement = \'export PATH=$PATH:/usr/local/bin/; export LD_LIBRARY_PATH=/usr/local/lib/; ffmpeg -i \'.$tmp_name.\' -y -sameq -ar 11025 \'. $tmpnewnameflv;\r\n											exec ($ExecStatement , $a , $b);\r\n											\r\n											//try to convert now\r\n											$ExecStatement = \'export PATH=$PATH:/usr/local/bin/; export LD_LIBRARY_PATH=/usr/local/lib/; ffmpeg -i \' .$tmpnewnameflv . \' -vframes 1 -t \' . $CaptureTime . \' -y \'.$_SERVER[\"DOCUMENT_ROOT\"] .$newname.\' \';\r\n											exec ($ExecStatement , $a , $b);\r\n											\r\n											unlink ($_SERVER[\"DOCUMENT_ROOT\"] . $tmpnewnameflv);\r\n											\r\n									}		\r\n									\r\n									\r\n									\r\n									if (!file_exists($_SERVER[\"DOCUMENT_ROOT\"] . $newname))\r\n									{\r\n									\r\n											$tmpnewname = $tmp_name . \".mpg\";\r\n											$ExecStatement = \'export PATH=$PATH:/usr/local/bin/; export LD_LIBRARY_PATH=/usr/local/lib/; ffmpeg -i \' . $tmp_name . \' -sameq -y \'.$tmpnewname.\' \';\r\n											exec ($ExecStatement , $a , $b);\r\n									\r\n											$ExecStatement = \'export PATH=$PATH:/usr/local/bin/; export LD_LIBRARY_PATH=/usr/local/lib/; ffmpeg -i \' . $tmpnewname . \' -vframes 1 -t \' . $CaptureTime . \' -y \'.$_SERVER[\"DOCUMENT_ROOT\"] .$newname.\' \';\r\n											exec ($ExecStatement , $a , $b);\r\n											\r\n											unlink ($_SERVER[\"DOCUMENT_ROOT\"] . $tmpnewname);\r\n											\r\n									}		\r\n									\r\n									\r\n										\r\n																		  \r\n						 }\r\n						 \r\n						\r\n						 \r\n						\r\n						 \r\n						 \r\n						 \r\n		}//end if last check for a tmp file to transform\r\n		 		\r\n				\r\n\r\n				   \r\n		if (REMOTE_STORAGE == true)\r\n		{\r\n					//we have to delete the temp file to free up server space\r\n					if (file_exists($tmp_name))\r\n					{\r\n							unlink($tmp_name);\r\n					} //end if temp file exists\r\n					\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$newname))\r\n					{\r\n								\r\n								//we need to send the file to storage\r\n								\r\n								 \r\n								  \r\n								    if (!$storage->CanUserAccessStorage())\r\n									{\r\n											$Value = $this->db->quote(\'\');\r\n											\r\n									}\r\n									\r\n									$storageArray = array();\r\n									$storageArray[\'ActualFileName\'] = $ActualFileName;\r\n									$storageArray[\'ActualFilePath\'] = $_SERVER[\'DOCUMENT_ROOT\'].$newname;\r\n									\r\n									$returnDetails = $storage-> SendFileToStorage ($storageArray);\r\n									\r\n									\r\n									\r\n									if (count($returnDetails[\'errors\'])> 0)\r\n									{\r\n											$Value = $this->db->quote(\'\');\r\n											\r\n									}\r\n									\r\n									\r\n									\r\n									$PathToTheUploadedFile 	= $returnDetails[\'path\'];\r\n									$UploadedFileName 		= $returnDetails[\'filename\'];\r\n									\r\n									$FileTypeArray = array();\r\n									$FileTypeArray[\'tmp_name\'] = $_SERVER[\'DOCUMENT_ROOT\'].$newname;\r\n									$FileTypeArray[\'type\'] = mime_content_type($_SERVER[\'DOCUMENT_ROOT\'].$newname);\r\n									\r\n									$FileType = $storage -> getFileTypeFromFileUpload($FileTypeArray);\r\n									\r\n									\r\n									$args = array();\r\n									$args[\'FileName\'] = $FileInfo[$this->_getCollectionFieldName(STORAGE_FILES_COLLECTION,STORAGE_FILES_NAME_COLUMN)] . \' \' .$TransformationSize . \' Tnail\';\r\n									$args[\'FileType\'] = $FileType;\r\n									$args[\'PathToTheUploadedFile\'] 	= $PathToTheUploadedFile;	\r\n									$args[\'UploadedFileName\'] 		= $UploadedFileName;\r\n									\r\n									$FileUploadID 			= $storage->SaveUploadedFile($args);\r\n									\r\n									if (intval($FileUploadID) > 0)\r\n									{\r\n											$Value = $this->db->quote($PathToTheUploadedFile);\r\n											\r\n									}\r\n									else\r\n									{\r\n											$Value = $this->db->quote(\'\');\r\n											\r\n									}			\r\n									\r\n								 	unlink($_SERVER[\'DOCUMENT_ROOT\'].$newname);\r\n								\r\n								\r\n								\r\n					} //end if temp file exists\r\n					else\r\n					{\r\n								//we set an empty filename if failed to create the transformed file\r\n								$Value = $this->db->quote(\'\');\r\n					}\r\n					\r\n					\r\n		}\r\n		else\r\n		{\r\n					//if file exists we send it to be saved\r\n					if (file_exists($_SERVER[\'DOCUMENT_ROOT\'].$newname))\r\n					{\r\n								$Value = $this->db->quote($newname);\r\n					} //end if temp file exists\r\n					else\r\n					{\r\n								//we set an empty filename if failed to create the transformed file\r\n								$Value = $this->db->quote(\'\');\r\n					}\r\n					\r\n					\r\n		}\r\n		   \r\n	\r\n} //end if can make image transformation','on'),(15,'Discussion ID','if (intval($RowID) == 0)\r\n$Value = intval($_GET[\'article\']);\r\nelse\r\n $Value = $this->db->quote($oldValues[$field]);',NULL),(16,'User ID','if (intval($RowID) == 0)\r\n$Value = intval($_SESSION[\'AAuserid\']);\r\nif ($Value== 0)\r\n{\r\n$Value = intval($_SESSION[\'UserID\']);\r\n}\r\nelse\r\n{\r\n if ( $Value != \'NULL\')\r\n {\r\n 	\r\n }\r\n else\r\n {\r\n 	$Value = $this->db->quote($oldValues[$field]);\r\n }\r\n} ',NULL),(17,'FontEnd UserId','if (intval($RowID) == 0)\r\n$Value = intval($_SESSION[\'UserID\']);\r\nelse\r\n $Value = $this->db->quote($oldValues[$field]);',NULL),(18,'Abstract','include_once (\"html2text.inc\");\r\n$FieldName = $this -> _getCollectionFieldName($CollectionID, \'3\');\r\n$htmlToText = new Html2Text ($ColumnValues[$FieldName], 1200);\r\n$Value = $this->db->quote(limit_text($htmlToText->convert(), 100));\r\n\r\n\r\nfunction limit_text($text, $limit) {\r\n    $text = strip_tags($text);\r\n      $words = str_word_count($text, 2);\r\n      $pos = array_keys($words);\r\n      if (count($words) > $limit) {\r\n          $text = substr($text, 0, $pos[$limit]) . \' ...\';\r\n      }\r\n    return $text;\r\n    }',NULL);

--
-- Table structure for table `Collection_95`
--

CREATE TABLE `Collection_95` (
  `Collection_95_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Collection_95_1` varchar(254) NOT NULL,
  `Collection_95_2` int(11) NOT NULL,
  `Collection_95_3` bigint(20) NOT NULL,
  `Collection_95_4` varchar(254) DEFAULT NULL,
  `Collection_95_5` text,
  `Collection_95_6` text,
  `Collection_95_7` text,
  `Collection_95_8` text,
  PRIMARY KEY (`Collection_95_ID`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `Collection_95`
--

INSERT INTO `Collection_95` VALUES (1,'Collection Rules',101,1,'on','You can set up simple <a href=\"admin.php?module_id=1&action=update&id=30\">rules</a> that will be available only  to one collection.','//workflow for rules\r\n\r\n//first we will apply the rules that apply to all cases\r\n\r\n$error = NULL;\r\n$errors = array();\r\n$ruleErrors = array();\r\n\r\nif (count($_FILES) > 0)\r\n{\r\n		//we start calculating the size that the uploaded files will occupy\r\n		$totalSize = 0;\r\n		foreach ($_FILES as $filek => $filev)\r\n		{\r\n			$totalSize = $totalSize + $_FILES[$filek][\"size\"];\r\n		}	\r\n		\r\n		\r\n		exec(\'du -c \'.$_SERVER[\'DOCUMENT_ROOT\'].\' | grep total\', $retval, $rval);\r\n				\r\n		$last_line 			= explode(\" \",$retval[0]);\r\n		$totalSizeOccupied 	= intval($last_line[0]) * 1000;	\r\n				\r\n		$companyInfoCollection = 12;\r\n		$crow = $this -> getFirstRow($companyInfoCollection);			\r\n		\r\n		$quotadisk = intval($crow[$this->_getCollectionFieldName($companyInfoCollection,20)]);\r\n		\r\n		$aaaa = ( $totalSizeOccupied + $totalSize ) / 1000000;\r\n				\r\n		if ($quotadisk < $aaaa && $quotadisk > 0)\r\n				$ruleErrors[] 		= \"Disk Quota Exceeded. Please talk with the hosting administrator to increase it. \";\r\n\r\n}\r\n\r\n\r\nswitch ($ApplyFor)\r\n{\r\ncase COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD:\r\n			\r\n			\r\n			foreach ($taxonomy  as $record)\r\n			{\r\n					$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n					$error = $this->verifyFieldValue($CollectionID, $SubmittedData[$column_name], $record);\r\n							\r\n					if($error != NULL)\r\n					{\r\n						$errors[$record[\"CollectionFieldId\"]] = 1;\r\n					}\r\n					\r\n					if (REMOTE_STORAGE == false)\r\n					{							\r\n							if ($_FILES[$column_name][\'error\'] != UPLOAD_ERR_OK && $res[$column_name] == \'\' && $record[\"CollectionInputType\"] == 7 && $record[\"CollectionFieldRequired\"] == 1)\r\n							{\r\n									$errors[$record[\"CollectionFieldId\"]] = 1;\r\n							}\r\n							\r\n					}		\r\n					else\r\n					{	\r\n						if ($record[\"CollectionInputType\"] == 7 && $record[\"CollectionFieldRequired\"] == 1 && $SubmittedData[$column_name] == \'\')\r\n						{\r\n							$errors[$record[\"CollectionFieldId\"]] = 1;\r\n						}	\r\n						\r\n					}\r\n							\r\n			}\r\n\r\n\r\n  break;  //end admin add specific code\r\ncase COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT:\r\n  			\r\n			$res 	= $this-> getCollectionSingleRow (array(\'collection_id\' =>$CollectionID , \'row_id\' => $EditID));\r\n			\r\n			foreach ($taxonomy  as $record)\r\n			{\r\n				$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n				\r\n				if ($_FILES[$column_name][\'error\'] == UPLOAD_ERR_NO_FILE && $res[$column_name] == \'\' && $record[\"CollectionInputType\"] == 7 && $record[\"CollectionFieldRequired\"] == 1)\r\n				{\r\n					$errors[$record[\"CollectionFieldId\"]] = 1;\r\n				}\r\n				\r\n				if (REMOTE_STORAGE == true && $record[\"CollectionInputType\"] == 7 && $record[\"CollectionFieldRequired\"] == 1 && $SubmittedData[$column_name] == \'\')\r\n				{		\r\n						$errors[$record[\"CollectionFieldId\"]] = 1;\r\n				}\r\n				\r\n				if (isset($SubmittedData[$column_name]) || $_FILES[$column_name][\'error\'] == UPLOAD_ERR_OK )\r\n				{\r\n				\r\n					$error = $this->verifyFieldValue($CollectionID, $SubmittedData[$column_name], $record);		\r\n					if($error != NULL)\r\n					{\r\n						$errors[$record[\"CollectionFieldId\"]] = 1;\r\n					}\r\n					\r\n				}\r\n			}\r\n			\r\n  \r\n  \r\n  break; //end admin edit specific code\r\ncase COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE:\r\n  \r\n  \r\n  \r\n  break;  //end admin delete specific code\r\ncase COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD:\r\n			\r\n			\r\n			\r\n			foreach ($taxonomy  as $record)\r\n			{\r\n				$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n				$error = $this->verifyFieldValue($CollectionID, $SubmittedData[$column_name], $record);\r\n							\r\n				if ($record[\'CollectionFieldRequired\'] == 1 && $SubmittedData[$column_name] == \"\")\r\n				{\r\n					if ($record[\"CollectionInputType\"] == 7 )\r\n					{\r\n						$errorupload = $_FILES[$column_name][\'error\'];\r\n						if ($errorupload != UPLOAD_ERR_OK && $res[$column_name] == \'\')\r\n						{\r\n							$errors[$record[\"CollectionFieldId\"]] = 1;\r\n						}\r\n						\r\n					}\r\n					else\r\n					{\r\n						$errors[$record[\"CollectionFieldId\"]] = 1;\r\n					}	\r\n				}\r\n				\r\n				\r\n				\r\n				\r\n				\r\n				if (($record[\'CollectionHidden\'] == 1 && $SubmittedData[$column_name] ==\'\' && $record[\'CollectionFormula\'] == 1) || ( $_FILES[$column_name][\'error\'] != UPLOAD_ERR_OK) )\r\n				{\r\n							//do not add the field into the edit \r\n				}\r\n				else\r\n				{\r\n					\r\n				}	\r\n	\r\n			}\r\n\r\n\r\n  break;  //end front end add specific code\r\ncase COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT:\r\n  				\r\n			$res 	= $this-> getCollectionSingleRow (array(\'collection_id\' =>$CollectionID , \'row_id\' => $EditID));\r\n			\r\n			foreach ($taxonomy  as $record)\r\n			{\r\n				$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n				$error = $this->verifyFieldValue($CollectionID, $SubmittedData[$column_name], $record);\r\n							\r\n				if ($record[\'CollectionFieldRequired\'] == 1 && $SubmittedData[$column_name] == \"\")\r\n				{\r\n					if ($record[\"CollectionInputType\"] == 7 )\r\n					{\r\n						$errorupload = $_FILES[$column_name][\'error\'];\r\n						if ($errorupload != UPLOAD_ERR_OK && $res[$column_name] == \'\')\r\n						{\r\n							$errors[$record[\"CollectionFieldId\"]] = 1;\r\n						}\r\n					}\r\n					else\r\n					{\r\n						if ($record[\"CollectionInputType\"] == 3 )\r\n						{\r\n						\r\n						}\r\n						else\r\n						{\r\n							$errors[$record[\"CollectionFieldId\"]] = 1;\r\n						}	\r\n					}	\r\n				}\r\n				\r\n				if (($record[\'CollectionHidden\'] == 1 && $SubmittedData[$column_name] ==\'\' && $record[\'CollectionFormula\'] == 1) || ( $_FILES[$column_name][\'error\'] != UPLOAD_ERR_OK) )\r\n				{\r\n					//do not add the field into the edit \r\n				}\r\n				else\r\n				{\r\n					\r\n				}	\r\n	\r\n			}	\r\n  \r\n  \r\n  break; //end front end edit specific code\r\ncase COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE:\r\n  \r\n  \r\n  \r\n  break;   //end front end delete specific code\r\ndefault:\r\n  \r\n  // we will not run any code here\r\n  \r\n} \r\n\r\n\r\n\r\n\r\n			$collection_table 	= $this->_getCollectionTableName(COLLECTION_RULES);\r\n			$addName 			= $this->_getCollectionFieldName(COLLECTION_RULES, COLLECTION_RULES_ADD);\r\n			$deleteName 		= $this->_getCollectionFieldName(COLLECTION_RULES, COLLECTION_RULES_DELETE);\r\n			$editName 			= $this->_getCollectionFieldName(COLLECTION_RULES, COLLECTION_RULES_EDIT);\r\n			$collectionName		= $this->_getCollectionFieldName(COLLECTION_RULES, COLLECTION_RULES_COLLECTION);\r\n			$pluginName			= $this->_getCollectionFieldName(COLLECTION_RULES, COLLECTION_RULES_FILE);\r\n			$collectionAdmin	= $this->_getCollectionFieldName(COLLECTION_RULES, COLLECTION_RULES_ADMIN);\r\n			$collectionFront	= $this->_getCollectionFieldName(COLLECTION_RULES, COLLECTION_RULES_FRONT_END);\r\n			$collectionSort		= $this->_getCollectionFieldName(COLLECTION_RULES, COLLECTION_RULES_SORT_ORDER);\r\n\r\nswitch ($ApplyFor)\r\n{\r\ncase COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD:\r\n\r\n   $q = \"SELECT $pluginName as pluginName FROM $collection_table WHERE $collectionAdmin=\'on\' and $addName=\'on\' and $collectionName=\'\".$CollectionID.\"\' Order By \". $collectionSort;\r\n   \r\n   $UserAccessGroups = $this->GetUserGroupAccess($UserID);\r\n   if ($SuperAdminUser || count($UserAccessGroups) > 0)\r\n   {\r\n			//do nothinh		   \r\n   }\r\n   else\r\n   {\r\n   		$ruleErrors[] = \"You do not have right to add into this collection row.\";\r\n   }\r\n   \r\n  break;  //end admin add specific code\r\ncase COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT:\r\n  \r\n  $q = \"SELECT $pluginName as pluginName FROM $collection_table WHERE $collectionAdmin=\'on\' and $editName =\'on\' and $collectionName=\'\".$CollectionID.\"\' Order By \". $collectionSort;\r\n  \r\n  if(!$SuperAdminUser && !$this->CanUserAccess($UserID,  $CollectionID, intval($EditID)))\r\n  {\r\n		$ruleErrors[] = \"You do not have right to edit this collection row.\";\r\n  }\r\n  \r\n  break; //end admin edit specific code\r\ncase COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE:\r\n  \r\n  $q = \"SELECT $pluginName as pluginName FROM $collection_table WHERE $collectionAdmin=\'on\' and $deleteName =\'on\' and $collectionName=\'\".$CollectionID.\"\' Order By \". $collectionSort;\r\n  \r\n  if(!$SuperAdminUser && !$this->CanUserAccess($UserID,  $CollectionID, intval($DeleteID)))\r\n  {\r\n		$ruleErrors[] = \"You do not have right to delete this collection row.\";\r\n  }\r\n  \r\n  break;  //end admin delete specific code\r\ncase COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD:\r\n\r\n  $q = \"SELECT $pluginName as pluginName FROM $collection_table WHERE $collectionFront=\'on\' and $addName=\'on\' and $collectionName=\'\".$CollectionID.\"\' Order By \". $collectionSort;\r\n\r\n  break;  //end front end add specific code\r\ncase COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT:\r\n  \r\n  $q = \"SELECT $pluginName as pluginName FROM $collection_table WHERE $collectionFront=\'on\' and $editName =\'on\' and $collectionName=\'\".$CollectionID.\"\' Order By \". $collectionSort;\r\n    \r\n  break; //end front end edit specific code\r\ncase COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE:\r\n  \r\n  $q = \"SELECT $pluginName as pluginName FROM $collection_table WHERE $collectionFront=\'on\' and $deleteName =\'on\' and $collectionName=\'\".$CollectionID.\"\' Order By \". $collectionSort;\r\n  \r\n  if(!$SuperAdminUser && !$this->CanUserAccess($UserID,  $CollectionID, intval($DeleteID)))\r\n  {\r\n		$ruleErrors[] = \"You do not have right to delete this collection row.\";\r\n  }\r\n  \r\n  break;   //end front end delete specific code\r\ndefault:\r\n  \r\n  // we will not run any code here\r\n  \r\n} \r\n\r\n$Rules = $this-> db -> queryAll($q);\r\n\r\nif ($Rules)\r\n	foreach ( $Rules as $k => $v )\r\n		eval($v[\'pluginName\']);\r\n\r\n\r\n\r\n/*\r\n				We will also see if the uploaded files are of the allowed type but only if \r\n				if we are on the front end\r\n*/\r\n\r\nif (count($_FILES) > 0 && ( REMOTE_STORAGE == true && ( $ApplyFor == COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD || $ApplyFor == COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT ) ) || REMOTE_STORAGE == false )\r\n{\r\n\r\n	foreach ($taxonomy  as $record)\r\n	{\r\n				$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n				if ( $record[\"CollectionInputType\"] == 7)\r\n				{\r\n							$errorupload = $_FILES[$column_name][\'error\'];\r\n							\r\n							if ($errorupload == UPLOAD_ERR_OK )\r\n							{	\r\n												\r\n												$UploadArgs = array();\r\n												$UploadArgs[\'UploadedFile\'] = $_FILES[$column_name];\r\n												$FileTypeErrors = $storage->CheckIfFileIsAllowedToBeUploaded($UploadArgs);\r\n\r\n												if (count($FileTypeErrors)> 0)\r\n												{\r\n														foreach ($FileTypeErrors as $ErrorKey => $ErrorValue)\r\n														{\r\n																$ruleErrors[] = $record[\"CollectionFieldName\"] . \" - \"  . $ErrorValue;\r\n														}\r\n												} //end if there are errors\r\n												\r\n							}	//end if error upload is no error				\r\n				}//end if field is of file type\r\n	} //end foreach\r\n\r\n}//end if we check file types\r\n\r\n\r\n\r\n$WorkFlowReturnArray[\'Errors\'] = $errors;\r\n$WorkFlowReturnArray[\'RuleErrors\'] = $ruleErrors;','{{if $smarty.post.save eq \'save\'}}\r\n\r\n{{else}}\r\n\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=101 ColumnID=1 Value=$CollectionID Collection_101_2=1 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_101_3 eq \'on\'}}{{assign var=wFlowRuleAddAdminActive value=\'checked\'}}{{else}}{{assign var=wFlowRuleAddAdminActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=101 ColumnID=1 Value=$CollectionID Collection_101_2=2 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_101_3 eq \'on\'}}{{assign var=wFlowRuleEditAdminActive value=\'checked\'}}{{else}}{{assign var=wFlowRuleEditAdminActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=101 ColumnID=1 Value=$CollectionID Collection_101_2=3 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_101_3 eq \'on\'}}{{assign var=wFlowRuleDeleteAdminActive value=\'checked\'}}{{else}}{{assign var=wFlowRuleDeleteAdminActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=101 ColumnID=1 Value=$CollectionID Collection_101_2=4 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_101_3 eq \'on\'}}{{assign var=wFlowRuleAddFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowRuleAddFrontEndActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=101 ColumnID=1 Value=$CollectionID Collection_101_2=5 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_101_3 eq \'on\'}}{{assign var=wFlowRuleEditFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowRuleEditFrontEndActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=101 ColumnID=1 Value=$CollectionID Collection_101_2=6 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_101_3 eq \'on\'}}{{assign var=wFlowRuleDeleteFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowRuleDeleteFrontEndActive value=\'\'}}{{/if}}\r\n\r\n{{/if}}\r\n\r\n\r\n<h3>Front End</h3>\r\n<p><input type=\"checkbox\" name=\"wFlowRuleAddFrontEndActive\" {{$wFlowRuleAddFrontEndActive}} /> Rules will be executed when a collection row is <em>added</em> using the front end of the site</p>\r\n<p><input type=\"checkbox\" name=\"wFlowRuleEditFrontEndActive\" {{$wFlowRuleEditFrontEndActive}} /> Rules will be executed when a collection row is <em>edited</em> using the front end of the site</p>\r\n<p><input type=\"checkbox\" name=\"wFlowRuleDeleteFrontEndActive\" {{$wFlowRuleDeleteFrontEndActive}} /> Rules will be executed when a collection row is <em>deleted</em> using the front end of the site</p>\r\n\r\n\r\n<h3>Administrator Area</h3>\r\n<p><input type=\"checkbox\" name=\"wFlowRuleAddAdminActive\" {{$wFlowRuleAddAdminActive}} /> Rules will be applied when a collection row is <em>added</em> in admin</p>\r\n<p><input type=\"checkbox\" name=\"wFlowRuleEditAdminActive\" {{$wFlowRuleEditAdminActive}} /> Rules will be applied when a collection row is <em>edited</em> in admin</p>\r\n<p><input type=\"checkbox\" name=\"wFlowRuleDeleteAdminActive\" {{$wFlowRuleDeleteAdminActive}} /> Rules will be applied when a collection row is <em>deleted</em> in admin</p>\r\n','//save workflow for rules\r\n$WCollectionID 				= $WorkFlowData[\'WFlowCollection\'];\r\n$WCollectionTable 			= $this -> _getCollectionTableName($WCollectionID);\r\n$WCollectionFieldName 		= $this->_getCollectionFieldName($WCollectionID, 1);\r\n$WCollectionFieldNameApply 	= $this->_getCollectionFieldName($WCollectionID, 2);\r\n\r\n$ApplyIn = array();\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD] 			= \'wFlowRuleAddAdminActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT] 			= \'wFlowRuleEditAdminActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE] 		= \'wFlowRuleDeleteAdminActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD] 		= \'wFlowRuleAddFrontEndActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT] 		= \'wFlowRuleEditFrontEndActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE] 		= \'wFlowRuleDeleteFrontEndActive\';\r\n\r\nforeach ($ApplyIn as $ApplyKey => $ApplyValue)\r\n{\r\n\r\n$q = \"SELECT * FROM \". $WCollectionTable. \" WHERE \" . $WCollectionFieldName . \" = \" . $CollectionID . \" AND \" . $WCollectionFieldNameApply . \" = \" . $ApplyKey;\r\n$res = $db->query($q);\r\n\r\nif ($res->numRows() == 0)\r\n{\r\n		$addArray = array();\r\n		$addArray[$WCollectionFieldName] = $CollectionID;\r\n		$addArray[$WCollectionFieldNameApply] = $ApplyKey;\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 4)] = $Data[$ApplyValue];\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_INSERT);\r\n}\r\nelse\r\n{\r\n		$row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);\r\n		$addArray = array();\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 4)] = $Data[$ApplyValue];\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_UPDATE, \' \'.$this->_getCollectionFieldName($WCollectionID, \'ID\').\' = \' . $row[$this->_getCollectionFieldName($WCollectionID, \'ID\')]);\r\n}\r\n\r\n}//end foreach'),(2,'Write to Database',96,2,'on','After all the rules are okay, we can write to database.','//workflow for write to database\r\n//first we will apply the rules that apply to all cases\r\n\r\nif (count($WorkFlowReturnArray[\'Errors\']) == 0 && count ($WorkFlowReturnArray[\'RuleErrors\']) == 0)\r\n{\r\n				\r\n				switch ($ApplyFor)\r\n				{\r\n				case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD:\r\n				\r\n								\r\n								foreach ($taxonomy  as $record)\r\n								{\r\n										$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n										$column_values[$column_name] = CollectionConverter::ConvertValue($SubmittedData[$column_name], $record[\"CollectionFieldType\"]);											\r\n								}\r\n								\r\n								//save the row in the collection\r\n								$inserted_id = $this->insertCollectionRow_($CollectionID, $column_values , $UploadDirectory , $UploadPrefix);\r\n								\r\n								//save the user access levels for this row\r\n								$UserAccessGroups = $this->GetUserGroupAccess($UserID);\r\n								if ($SubmittedData[\'SelectedValuesUserGroups\'] || count($UserAccessGroups) > 0)\r\n								{\r\n									$ugroups = array();\r\n									foreach ($SubmittedData[\'SelectedValuesUserGroups\'] as $saveKey => $saveItem)\r\n									{\r\n											$ugroups[$saveItem] = $saveItem;\r\n									}\r\n									\r\n									//only super admins can update row access level\r\n									if ($SuperAdminUser) \r\n									{\r\n										$this->updateCollectionUserGroupAccessRow($CollectionID, $inserted_id, $ugroups, $UserID);\r\n									}	\r\n									else\r\n									{\r\n										$this->updateCollectionUserGroupAccessRow($CollectionID, $inserted_id, $UserAccessGroups, $UserID);\r\n									}\r\n								}\r\n								\r\n								//we need to save xrefs if they exist\r\n								if ($collectionSettings)\r\n								{\r\n									//we get to see if this collection has xrefs :)\r\n									if (count($collectionSettings[5]) > 0)\r\n									{						\r\n										$tmpCollectionsXRefSave  = $collectionSettings[5];\r\n										\r\n										foreach ($tmpCollectionsXRefSave as $key => $value)\r\n										{\r\n											$collectionXrefSave = $value[\'collectionXrefsSave\'];\r\n											$collectionXref 	= $value[\'collectionXrefs\'];\r\n											\r\n											//first we delete the xrefs\r\n											$this -> deleteCollectionXrefs ($collectionXrefSave  ,  $inserted_id);\r\n											if ($SubmittedData[\'SelectedValues_\'.$collectionXref])\r\n											{\r\n												foreach ($SubmittedData[\'SelectedValues_\'.$collectionXref] as $saveKey => $saveItem)\r\n												{\r\n														$xref_column_values = array();\r\n														\r\n														$field1 = $this-> _getCollectionFieldName($collectionXrefSave, 1);\r\n														$field2 = $this-> _getCollectionFieldName($collectionXrefSave, 2);\r\n														\r\n														$xref_column_values[$field1] = $inserted_id;\r\n														$xref_column_values[$field2] = $saveItem;\r\n														$res2 = $this->insertCollectionRow_($collectionXrefSave, $xref_column_values , $UploadDirectory , $UploadPrefix);\r\n												}\r\n											}\r\n										}\r\n									}\r\n									\r\n									if (count($collectionSettings[6]) > 0)\r\n									{\r\n												\r\n												$tmpCollectionsXRefWith  = $collectionSettings[6];\r\n												\r\n												foreach ($tmpCollectionsXRefWith as $key => $collection_value)\r\n												{\r\n													$value = $collection_value[\'collectionComplexXref\'];\r\n													$taxonomyXref = $this->getCollectionTaxonomy($value);\r\n													\r\n													if (count($SubmittedData[\'ExtAttribute_\'.$value.\'_ID\']) > 0)\r\n													{\r\n														\r\n														foreach ($SubmittedData[\'ExtAttribute_\'.$value.\'_ID\'] as $k => $v)\r\n														{\r\n																$XrefValues = array();\r\n																$del = 1;\r\n																foreach ($taxonomyXref as $kk => $vv )\r\n																{\r\n																	if ($vv[\'CollectionFieldRequired\'] == 1 && $SubmittedData[\'ExtAttribute_\'.$value.\'_\'.$vv[\'CollectionFieldId\']][$k] != \'\')\r\n																	{\r\n																		$del = 0;\r\n																	}\r\n																	$column_name = $this->_getCollectionFieldName($value, $vv[\'CollectionFieldId\']);\r\n																	$XrefValues[$column_name] = $SubmittedData[\'ExtAttribute_\'.$value.\'_\'.$vv[\'CollectionFieldId\']][$k];\r\n																	\r\n																}//end foreach\r\n																\r\n																$column_name = $this->_getCollectionFieldName($value, 1);\r\n																$XrefValues[$column_name] = $inserted_id;\r\n																\r\n																if ($del == 1 && $v !=0)\r\n																{\r\n																	//we will delete the entry\r\n																	$this->deleteCollectionRow_($value, $v);\r\n																}\r\n																else\r\n																{\r\n																	//we will add/edit the entry\r\n																	if ($v == 0)\r\n																	{\r\n																		//we will add the value\r\n																		if ($del == 0)\r\n																		{\r\n																		  $this->insertCollectionRow_($value, $XrefValues , $UploadDirectory , $UploadPrefix);	\r\n																		}\r\n																	}\r\n																	else\r\n																	{\r\n																		//we will edit the value\r\n																		$this->updateCollectionRow_($value,  $v , $XrefValues , $UploadDirectory , $UploadPrefix);\r\n																	}\r\n																}//end if delete =0\r\n																\r\n														}//end foreach\r\n														\r\n													}\r\n													\r\n													\r\n												}\r\n																			\r\n									}//end complex xref\r\n									\r\n									\r\n										\r\n								}//edn if save xrefs\r\n								\r\n								$WorkFlowReturnArray[\'InsertedID\'] = $inserted_id;\r\n				\r\n				  break;  //end admin add specific code\r\n				case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT:\r\n				  \r\n				  				//we need the edit id param to be set up\r\n								if (intval($EditID) > 0)\r\n								{\r\n										\r\n										if (count($this->revisionCollections[$CollectionID]) > 0)\r\n										{\r\n												//add new revision with previous data\r\n												$RevisionID = $this-> RevisionsAddRevisionForRow($CollectionID , $EditID , $UserID , COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT );\r\n										}\r\n										\r\n										foreach ($taxonomy  as $record)\r\n										{\r\n											$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n											if (isset($SubmittedData[$column_name]) || $_FILES[$column_name][\'error\'] == UPLOAD_ERR_OK )\r\n											{\r\n												$column_values[$column_name] = CollectionConverter::ConvertValue($SubmittedData[$column_name], $record[\"CollectionFieldType\"]);\r\n											}\r\n										}\r\n										\r\n										\r\n										\r\n										$res = $this->updateCollectionRow_($CollectionID, $EditID, $column_values , $UploadDirectory , $UploadPrefix);\r\n										\r\n										//user level access is only updated if the row is edited by admins\r\n										if ($SuperAdminUser)\r\n										{\r\n												if ($SubmittedData[\'SelectedValuesUserGroups\'])\r\n												{\r\n													$ugroups = array();\r\n													foreach ($SubmittedData[\'SelectedValuesUserGroups\'] as $saveKey => $saveItem)\r\n													{\r\n															$ugroups[$saveItem] = $saveItem;\r\n													}\r\n												}\r\n												$this->updateCollectionUserGroupAccessRow($CollectionID, $EditID, $ugroups, $UserID);	\r\n										}\r\n										\r\n										\r\n										//we need to save xrefs if they exist\r\n										if ($collectionSettings)\r\n										{\r\n											//we get to see if this collection has xrefs :)\r\n											if (count($collectionSettings[5]) > 0)\r\n											{\r\n												$edit_id = $EditID;\r\n												\r\n												$tmpCollectionsXRefSave  = $collectionSettings[5];\r\n												\r\n												foreach ($tmpCollectionsXRefSave as $key => $value)\r\n												{\r\n													$collectionXrefSave = $value[\'collectionXrefsSave\'];\r\n													$collectionXref 	= $value[\'collectionXrefs\'];\r\n													\r\n													//first we delete the xrefs\r\n													$this -> deleteCollectionXrefs ($collectionXrefSave , $edit_id);\r\n													if ($SubmittedData[\'SelectedValues_\'.$collectionXref])\r\n													{\r\n														foreach ($SubmittedData[\'SelectedValues_\'.$collectionXref] as $saveKey => $saveItem)\r\n														{\r\n																$xref_column_values = array();\r\n																\r\n																$field1 = $this-> _getCollectionFieldName($collectionXrefSave, 1);\r\n																$field2 = $this-> _getCollectionFieldName($collectionXrefSave, 2);\r\n																\r\n																$xref_column_values[$field1] = $edit_id;\r\n																$xref_column_values[$field2] = $saveItem;\r\n																\r\n																$res = $this->insertCollectionRow_($collectionXrefSave, $xref_column_values , $UploadDirectory , $UploadPrefix);\r\n														}\r\n													}\r\n												}\r\n											}	\r\n											\r\n											if (count($collectionSettings[6]) > 0)\r\n											{\r\n											\r\n														$tmpCollectionsXRefWith  = $collectionSettings[6];\r\n														\r\n														$edit_id = $EditID;														\r\n														\r\n														foreach ($tmpCollectionsXRefWith as $key => $collection_value)\r\n														{\r\n															$value = $collection_value[\'collectionComplexXref\'];\r\n															\r\n															$taxonomyXref = $this->getCollectionTaxonomy($value);\r\n															\r\n															if (count($SubmittedData[\'ExtAttribute_\'.$value.\'_ID\']) > 0)\r\n															{\r\n																\r\n																if ($args[\'ComplexXREFDelete\'] == 1)\r\n																{\r\n																	$this -> deleteCollectionXrefs ($value , $EditID);\r\n																}\r\n																\r\n																foreach ($SubmittedData[\'ExtAttribute_\'.$value.\'_ID\'] as $k => $v)\r\n																{\r\n																		$XrefValues = array();\r\n																		$del = 1;\r\n																		foreach ($taxonomyXref as $kk => $vv )\r\n																		{\r\n																			if ($vv[\'CollectionFieldRequired\'] == 1 && $SubmittedData[\'ExtAttribute_\'.$value.\'_\'.$vv[\'CollectionFieldId\']][$k] != \'\')\r\n																			{\r\n																				$del = 0;\r\n																			}\r\n																			$column_name = $this->_getCollectionFieldName($value, $vv[\'CollectionFieldId\']);\r\n																			$XrefValues[$column_name] = $SubmittedData[\'ExtAttribute_\'.$value.\'_\'.$vv[\'CollectionFieldId\']][$k];\r\n																			\r\n																		}//end foreach\r\n																		\r\n																		$column_name = $this->_getCollectionFieldName($value, 1);\r\n																		$XrefValues[$column_name] = $edit_id;\r\n																		\r\n																		\r\n																																				\r\n																		if ($del == 1 && $v !=0)\r\n																		{\r\n																			//we will delete the entry\r\n																			$this->deleteCollectionRow_($value, $v);\r\n																		}\r\n																		else\r\n																		{\r\n																			//we will add/edit the entry\r\n																			if ($v == 0)\r\n																			{\r\n																				//we will add the value\r\n																				if ($del == 0)\r\n																				{\r\n																				  $this->insertCollectionRow_($value, $XrefValues , $UploadDirectory , $UploadPrefix);	\r\n																				}\r\n																			}\r\n																			else\r\n																			{\r\n																				//we will edit the value\r\n																				$this->updateCollectionRow_($value,  $v , $XrefValues , $UploadDirectory , $UploadPrefix);\r\n																			}\r\n																		}//end if delete =0\r\n																		\r\n																}//end foreach\r\n																\r\n															}\r\n															\r\n															\r\n														}\r\n																					\r\n											}//end complex xref\r\n											\r\n											\r\n										}//edn if save xrefs\r\n								\r\n								$WorkFlowReturnArray[\'EditedID\'] = $EditID;\r\n								\r\n								}//end if we have edit id\r\n				  \r\n				  \r\n				  break; //end admin edit specific code\r\n				case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE:\r\n				  				\r\n								\r\n								if (count($this->revisionCollections[$CollectionID]) > 0)\r\n								{\r\n										//add new revision with previous data\r\n										$RevisionID = $this-> RevisionsDeleteRevisionForRow($CollectionID , $DeleteID );\r\n								}\r\n								\r\n								//we delete the row access levels\r\n								$this->deleteCollectionUserGroupAccessRow($CollectionID, $DeleteID);\r\n								//we delete the xrefs\r\n								if (count($collectionSettings[5]) > 0)\r\n								{\r\n									\r\n									$tmpCollectionsXRefSave  = $collectionSettings[5];\r\n									\r\n									foreach ($tmpCollectionsXRefSave as $key => $value)\r\n									{\r\n										$collectionXrefSave = $value[\'collectionXrefsSave\'];\r\n										$this -> deleteCollectionXrefs ($collectionXrefSave , $DeleteID);\r\n									}\r\n								}	\r\n								if (count($collectionSettings[6]) > 0)\r\n								{\r\n									$tmpCollectionsXRefWith  = $collectionSettings[6];\r\n									\r\n									foreach ($tmpCollectionsXRefWith as $key => $value)\r\n									{\r\n										$this -> deleteCollectionXrefs ($value[\'collectionComplexXref\'] , $DeleteID);\r\n									}\r\n								}\r\n								//we delete the actual row\r\n								$this->deleteCollectionRow_($CollectionID, $DeleteID);\r\n				  			\r\n				  \r\n				  break;  //end admin delete specific code\r\n				case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD:\r\n								\r\n							foreach ($taxonomy  as $record)\r\n							{\r\n								$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n																\r\n								if (($record[\'CollectionHidden\'] == 1 && $SubmittedData[$column_name] ==\'\' && $record[\'CollectionFormula\'] == 1) || ( $_FILES[$column_name][\'error\'] != UPLOAD_ERR_OK) )\r\n								{\r\n									//do not add the field into the edit \r\n								}\r\n								else\r\n								{\r\n									$column_values[$column_name] = CollectionConverter::ConvertValue($SubmittedData[$column_name], $record[\"CollectionFieldType\"]);\r\n								}	\r\n					\r\n							}\r\n							\r\n							//we need to treat the uploads in a different way if remote storage is active for front end\r\n							include_once $_SERVER[\'DOCUMENT_ROOT\'].\'/classes/class.storage.php\';\r\n 							$storage = new StorageAPI($this);\r\n							\r\n							define(\"REMOTE_STORAGE\", $storage->isRemoteStorageActive ());\r\n							print REMOTE_STORAGE . \"<hr/>\"; \r\n							if (REMOTE_STORAGE == true)\r\n							{\r\n										\r\n										//loop through every upload and get it done\r\n										foreach ($taxonomy  as $record)\r\n										{\r\n												$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n												if ($record[\'CollectionInputType\'] == 7 && $_FILES[$column_name][\'error\'] == UPLOAD_ERR_OK )\r\n												{\r\n															$FileTypeArray = $storage->getFileTypeFromFileUpload($_FILES[$column_name]);\r\n															$FileType = $FileTypeArray[\'FileType\'];\r\n															\r\n															$ActualFileName = $_FILES[$column_name][\"name\"];\r\n			\r\n															$storageArray = array();\r\n															$storageArray[\'ActualFileName\'] = $ActualFileName;\r\n															$storageArray[\'ActualFilePath\'] = $_FILES[$column_name][\"tmp_name\"];\r\n															$storageArray[\'FileTypeDetails\']	= $FileTypeArray;\r\n															$storageArray[\'UploadedFile\']		= $_FILES[$column_name];\r\n															\r\n															//we get the default storage setting for uploads on front end\r\n															$StorageMedia 	= intval($collectionSettings[2][\'RemoteStorageType\']);\r\n															$StorageFolder 	= intval($collectionSettings[2][\'RemoteStorageFolder\']);\r\n															\r\n															$storage->setStorage($StorageMedia , $StorageFolder);\r\n															\r\n															$returnDetails = $storage-> SendFileToStorage ($storageArray);\r\n															\r\n																														\r\n															if (count($returnDetails[\'errors\'])> 0)\r\n															{\r\n																	//we do not save anything\r\n															}\r\n															else\r\n															{\r\n																	$PathToTheUploadedFile 	= $returnDetails[\'path\'];\r\n																	$UploadedFileName 		= $returnDetails[\'filename\'];\r\n																	\r\n																	\r\n																	$args = array();\r\n																	$args[\'FileName\'] = $ActualFileName;\r\n																	$args[\'FileType\'] = $FileType;\r\n																	$args[\'PathToTheUploadedFile\'] = $PathToTheUploadedFile;	\r\n																	$args[\'UploadedFileName\'] = $UploadedFileName;\r\n																	\r\n																	$FileUploadID = $storage->SaveUploadedFile($args);\r\n																	\r\n																	if (intval($FileUploadID) > 0)\r\n																	{\r\n																				//add the path to the collection save array\r\n																				$column_values[$column_name] = $PathToTheUploadedFile;\r\n																	}\r\n																	else\r\n																	{\r\n																			//do nothing\r\n																	}			\r\n																	\r\n															}\r\n															\r\n												}\r\n											\r\n										}//end foreach\r\n										\r\n																	\r\n							}//end if remote storage active\r\n							\r\n														\r\n							//end remote storage code\r\n							\r\n							$inserted_id = $this->insertCollectionRow_($CollectionID, $column_values , $UploadDirectory , $UploadPrefix);\r\n								\r\n							$WorkFlowReturnArray[\'InsertedID\'] = $inserted_id;\r\n				\r\n				  break;  //end front end add specific code\r\n				case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT:\r\n				  \r\n				  										\r\n							foreach ($taxonomy  as $record)\r\n							{\r\n								$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n																\r\n								if (($record[\'CollectionHidden\'] == 1 && $SubmittedData[$column_name] ==\'\' && $record[\'CollectionFormula\'] == 1) || ( $_FILES[$column_name][\'error\'] != UPLOAD_ERR_OK) )\r\n								{\r\n									//do not add the field into the edit \r\n								}\r\n								else\r\n								{\r\n									$column_values[$column_name] = CollectionConverter::ConvertValue($SubmittedData[$column_name], $record[\"CollectionFieldType\"]);\r\n								}	\r\n					\r\n							}\r\n							\r\n							//we need to treat the uploads in a different way if remote storage is active for front end\r\n							include_once $_SERVER[\'DOCUMENT_ROOT\'].\'/classes/class.storage.php\';\r\n 							$storage = new StorageAPI($this);\r\n							\r\n							define(\"REMOTE_STORAGE\", $storage->isRemoteStorageActive ());\r\n							\r\n							if (REMOTE_STORAGE == true)\r\n							{\r\n										\r\n										\r\n										//loop through every upload and get it done\r\n										foreach ($taxonomy  as $record)\r\n										{\r\n												$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n												if ($record[\'CollectionInputType\'] == 7 && $_FILES[$column_name][\'error\'] == UPLOAD_ERR_OK )\r\n												{\r\n															$FileType = $storage->getFileTypeFromFileUpload($_FILES[$column_name]);\r\n															$ActualFileName = $_FILES[$column_name][\"name\"];\r\n			\r\n															$storageArray = array();\r\n															$storageArray[\'ActualFileName\'] = $ActualFileName;\r\n															$storageArray[\'ActualFilePath\'] = $_FILES[$column_name][\"tmp_name\"];\r\n															\r\n															//we get the default storage setting for uploads on front end\r\n															$StorageMedia 	= intval($collectionSettings[2][\'RemoteStorageType\']);\r\n															$StorageFolder 	= intval($collectionSettings[2][\'RemoteStorageFolder\']);\r\n											\r\n															$storage->setStorage($StorageMedia , $StorageFolder);\r\n															\r\n															$returnDetails = $storage-> SendFileToStorage ($storageArray);\r\n															\r\n															\r\n															\r\n															if (count($returnDetails[\'errors\'])> 0)\r\n															{\r\n																	//we do not save anything\r\n															}\r\n															else\r\n															{\r\n																	$PathToTheUploadedFile 	= $returnDetails[\'path\'];\r\n																	$UploadedFileName 		= $returnDetails[\'filename\'];\r\n																	\r\n																	\r\n																	$args = array();\r\n																	$args[\'FileName\'] = $ActualFileName;\r\n																	$args[\'FileType\'] = $FileType;\r\n																	$args[\'PathToTheUploadedFile\'] = $PathToTheUploadedFile;	\r\n																	$args[\'UploadedFileName\'] = $UploadedFileName;\r\n																	\r\n																	$FileUploadID = $storage->SaveUploadedFile($args);\r\n																	\r\n																	if (intval($FileUploadID) > 0)\r\n																	{\r\n																				//add the path to the collection save array\r\n																				$column_values[$column_name] = $PathToTheUploadedFile;\r\n																	}\r\n																	else\r\n																	{\r\n																			//do nothing\r\n																	}			\r\n																	\r\n															}\r\n															\r\n												}\r\n											\r\n										}//end foreach\r\n										\r\n																	\r\n							}//end if remote storage active\r\n							\r\n							//end remote storage code\r\n							\r\n							$this->updateCollectionRow_($CollectionID, $EditID , $column_values , $UploadDirectory , $UploadPrefix);\r\n							$WorkFlowReturnArray[\'EditedID\'] = $EditID;\r\n				  \r\n				  break; //end front end edit specific code\r\n				case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE:\r\n				  \r\n				  			\r\n				  \r\n				  break;   //end front end delete specific code\r\n				default:\r\n				  \r\n				  // we will not run any code here\r\n				  \r\n				} \r\n				\r\n		\r\n}','{{if $smarty.post.save eq \'save\'}}\r\n\r\n{{else}}\r\n\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=96 ColumnID=1 Value=$CollectionID Collection_96_2=1 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_96_3 eq \'on\'}}{{assign var=wFlowWriteAddAdminActive value=\'checked\'}}{{else}}{{assign var=wFlowWriteAddAdminActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=96 ColumnID=1 Value=$CollectionID Collection_96_2=2 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_96_3 eq \'on\'}}{{assign var=wFlowWriteEditAdminActive value=\'checked\'}}{{else}}{{assign var=wFlowWriteEditAdminActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=96 ColumnID=1 Value=$CollectionID Collection_96_2=3 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_96_3 eq \'on\'}}{{assign var=wFlowWriteDeleteAdminActive value=\'checked\'}}{{else}}{{assign var=wFlowWriteDeleteAdminActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=96 ColumnID=1 Value=$CollectionID Collection_96_2=4 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_96_3 eq \'on\'}}{{assign var=wFlowWriteAddFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowWriteAddFrontEndActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=96 ColumnID=1 Value=$CollectionID Collection_96_2=5 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_96_3 eq \'on\'}}{{assign var=wFlowWriteEditFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowWriteEditFrontEndActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=96 ColumnID=1 Value=$CollectionID Collection_96_2=6 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_96_3 eq \'on\'}}{{assign var=wFlowWriteDeleteFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowWriteDeleteFrontEndActive value=\'\'}}{{/if}}\r\n\r\n{{/if}}\r\n\r\n<h3>Front End</h3>\r\n<p><input type=\"checkbox\" id=\"wFlowWriteAddFrontEndActive\" name=\"wFlowWriteAddFrontEndActive\" {{$wFlowWriteAddFrontEndActive}} />\r\n Collection rows can be <em>added</em> using the front end of the site</p>\r\n<p><input type=\"checkbox\" id=\"wFlowWriteEditFrontEndActive\" name=\"wFlowWriteEditFrontEndActive\"  {{$wFlowWriteEditFrontEndActive}} /> Collection rows can be <em>edited</em> using the front end of the site</p>\r\n<p><input type=\"checkbox\" id=\"wFlowWriteDeleteFrontEndActive\" name=\"wFlowWriteDeleteFrontEndActive\" {{$wFlowWriteDeleteFrontEndActive}} /> Collection rows can be <em>deleted</em> using the front end of the site</p>\r\n\r\n\r\n<h3>Administrator Area</h3>\r\n<p><input type=\"checkbox\" id=\"wFlowWriteAddAdminActive\" name=\"wFlowWriteAddAdminActive\" {{$wFlowWriteAddAdminActive}} /> Collection rows can be <em>added</em> in admin</p>\r\n<p><input type=\"checkbox\" id=\"wFlowWriteEditAdminActive\" name=\"wFlowWriteEditAdminActive\" {{$wFlowWriteEditAdminActive}} /> Collection rows can be <em>edited</em> in admin</p>\r\n<p><input type=\"checkbox\" id=\"wFlowWriteDeleteAdminActive\" name=\"wFlowWriteDeleteAdminActive\" {{$wFlowWriteDeleteAdminActive}} /> Collection rows can be <em>deleted</em> in admin</p>\r\n','//save workflow for write to database\r\n$WCollectionID 				= $WorkFlowData[\'WFlowCollection\'];\r\n$WCollectionTable 			= $this -> _getCollectionTableName($WCollectionID);\r\n$WCollectionFieldName 		= $this->_getCollectionFieldName($WCollectionID, 1);\r\n$WCollectionFieldNameApply 	= $this->_getCollectionFieldName($WCollectionID, 2);\r\n\r\n$ApplyIn = array();\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD] 			= \'wFlowWriteAddAdminActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT] 			= \'wFlowWriteEditAdminActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE] 		= \'wFlowWriteDeleteAdminActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD] 		= \'wFlowWriteAddFrontEndActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT] 		= \'wFlowWriteEditFrontEndActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE] 		= \'wFlowWriteDeleteFrontEndActive\';\r\n\r\nforeach ($ApplyIn as $ApplyKey => $ApplyValue)\r\n{\r\n\r\n$q = \"SELECT * FROM \". $WCollectionTable. \" WHERE \" . $WCollectionFieldName . \" = \" . $CollectionID . \" AND \" . $WCollectionFieldNameApply . \" = \" . $ApplyKey;\r\n$res = $db->query($q);\r\n\r\nif ($res->numRows() == 0)\r\n{\r\n		$addArray = array();\r\n		$addArray[$WCollectionFieldName] = $CollectionID;\r\n		$addArray[$WCollectionFieldNameApply] = $ApplyKey;\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 4)] = $Data[$ApplyValue];\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_INSERT);\r\n}\r\nelse\r\n{\r\n		$row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);\r\n		$addArray = array();\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 4)] = $Data[$ApplyValue];\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_UPDATE, \' \'.$this->_getCollectionFieldName($WCollectionID, \'ID\').\' = \' . $row[$this->_getCollectionFieldName($WCollectionID, \'ID\')]);\r\n}\r\n\r\n}//end foreach'),(3,'Send Email Alert',97,6,'on','o2 can send an email alert when a row was inserted into a certain collection','//workflow for sending email\r\n\r\n//we will only send email if there are no errors\r\n\r\nif (count($WorkFlowReturnArray[\'Errors\']) == 0 && count ($WorkFlowReturnArray[\'RuleErrors\']) == 0)\r\n{\r\n\r\n		switch ($ApplyFor)\r\n		{\r\n		case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD:\r\n		\r\n		\r\n		\r\n		  break;  //end admin add specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT:\r\n		  \r\n		  \r\n		  \r\n		  break; //end admin edit specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE:\r\n		  \r\n		  \r\n		  \r\n		  break;  //end admin delete specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD:\r\n		\r\n					//we send email only if data was succesfuly saved\r\n							if ($WorkFlowReturnArray[\'InsertedID\'] > 0)\r\n							{\r\n							\r\n										\r\n										$EmailFrom 			= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 7)];\r\n										$EmailFromName 		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 6)];\r\n										$EmailHost 			= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 8)];\r\n										$EmailSubject		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 9)];\r\n										$EmailTemplate		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 10)];\r\n										$SendEmailTo		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 5)];\r\n										$EmailHTML			= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 11)];\r\n										$EmailToName		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 4)];\r\n										\r\n										require_once(\"class.phpmailer.php\");	\r\n				\r\n										$mail = new PHPMailer();\r\n										$mail->From     = $EmailFrom;\r\n										$mail->FromName = $EmailFromName;\r\n										$mail->Host     = $EmailHost;\r\n										$mail->Subject  = $EmailSubject;\r\n										\r\n										$page_id = $EmailTemplate;\r\n										\r\n										$collection_table = $this->_getCollectionTableName($CollectionID);\r\n										$query  = \"SELECT * FROM $collection_table WHERE \". COLLECTION_TABLE_FIELD_PREFIX . $CollectionID .\"_ID=\'\".$WorkFlowReturnArray[\'InsertedID\'].\"\'\";\r\n										$res =  $this->db->query($query);\r\n										$row =  $res -> fetchRow(MDB2_FETCHMODE_ASSOC);\r\n										\r\n										$i = 0;\r\n										foreach ($taxonomy as $key => $v )\r\n										{\r\n											$prefix = COLLECTION_TABLE_FIELD_PREFIX . $CollectionID. \"_\" . $v[\'CollectionFieldId\'];\r\n											if ($v[\'CollectionInputType\'] != 7)\r\n											{\r\n													if ($v[\'CollectionInputType\'] == 2)\r\n													{\r\n														\r\n														$emailArray[] = array ( \"taxonomy\" => $v , \"value\" => nl2br($column_values[$prefix]) , \"lookups\" => $lookups[$prefix]);\r\n													}\r\n													else\r\n													{\r\n														$emailArray[] = array ( \"taxonomy\" => $v , \"value\" => $column_values[$prefix] , \"lookups\" => $lookups[$prefix]);\r\n													}\r\n											}\r\n											else\r\n											{\r\n													if (stripos($row[$prefix], \'http\') !== 0) \r\n													{\r\n													   $emailArray[] = array ( \"taxonomy\" => $v , \"value\" => \"http://\" . $_SERVER[\'HTTP_HOST\'] . $row[$prefix] , \"lookups\" => $lookups[$prefix] );\r\n													}\r\n													else\r\n													{\r\n														$emailArray[] = array ( \"taxonomy\" => $v , \"value\" => $row[$prefix] , \"lookups\" => $lookups[$prefix] );\r\n													}\r\n\r\n\r\n													\r\n											}\r\n										\r\n										}\r\n										\r\n										$tmp = $this->getCollection($CollectionID);\r\n										$smarty -> assign (\"Collection\" , $tmp[0]);\r\n										$smarty -> assign (\"EmailData\" , $emailArray);\r\n										\r\n										$arr = array (\'id\' => $page_id, \'display\' => 1);\r\n										$Content = print_page_data($arr, $smarty);\r\n										\r\n										if ($EmailHTML == \'on\')\r\n										{\r\n											$mail->IsHTML (true);\r\n											$mail->AltBody = $Content;\r\n										}\r\n										else\r\n										{\r\n											$mail->IsHTML (false);\r\n										}	\r\n										\r\n										$mail->Body    = $Content;\r\n										\r\n										$tmpEmailAddressesNames = explode(\',\',$EmailToName);\r\n										$tmpEmailAddresses = explode(\',\',$SendEmailTo);\r\n										\r\n										foreach ($tmpEmailAddresses as $k => $v)\r\n										{\r\n												$mail->AddAddress($v , $tmpEmailAddressesNames[$k]);		\r\n										\r\n										}\r\n										\r\n												\r\n										$mail->Send();\r\n										$mail->ClearAddresses();\r\n							\r\n							\r\n							}\r\n		\r\n		  break;  //end front end add specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT:\r\n		  \r\n		  \r\n		  \r\n		  break; //end front end edit specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE:\r\n		  \r\n		  \r\n		  \r\n		  break;   //end front end delete specific code\r\n		default:\r\n		  \r\n		  // we will not run any code here\r\n		  \r\n		} \r\n\r\n\r\n\r\n} //end workflow for sending email','{{if $smarty.post.save eq \'save\'}}\r\n\r\n{{else}}\r\n\r\n	\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=97 ColumnID=1 Value=$CollectionID Collection_97_2=4 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_97_3 eq \'on\'}}{{assign var=wFlowEmailAddFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowEmailAddFrontEndActive value=\'\'}}{{/if}}\r\n	{{assign var=emailToName value=$Tmp.Collection_97_4}}\r\n	{{assign var=emailToAddress value=$Tmp.Collection_97_5}}\r\n	{{assign var=emailFromName value=$Tmp.Collection_97_6}}\r\n	{{assign var=emailFromAddress value=$Tmp.Collection_97_7}}\r\n	{{assign var=emailHost value=$Tmp.Collection_97_8}}\r\n	{{assign var=emailSubject value=$Tmp.Collection_97_9}}\r\n	{{assign var=emailHTML value=$Tmp.Collection_97_11}}\r\n	{{assign var=emailPage value=$Tmp.Collection_97_10}}\r\n	\r\n\r\n{{/if}}\r\n\r\n<p><input type=\"checkbox\" name=\"wFlowEmailAddFrontEndActive\" {{$wFlowEmailAddFrontEndActive}} /> Activate email sending capability</p>\r\n\r\n<h3>Recipient Info</h3>\r\n\r\n<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\">\r\n<tr>\r\n	<td width=\"150\"><p>Recipient Name</p></td>\r\n	<td>\r\n		<p><input type=\"text\" class=\"input\" size=\"40\" name=\"emailToName\" value=\"{{$emailToName}}\" /></p>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td><p>Recipient Email Address</p></td>\r\n	<td>\r\n		<p><input type=\"text\" class=\"input\" size=\"40\" name=\"emailToAddress\" value=\"{{$emailToAddress}}\" /></p>\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n<h3>Sender Info</h3>\r\n\r\n<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\">\r\n<tr>\r\n	<td width=\"150\"><p>Sender Name</p></td>\r\n	<td>\r\n		<p><input type=\"text\" class=\"input\" size=\"40\" name=\"emailFromName\" value=\"{{$emailFromName}}\" /></p>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td><p>Sender Email Address</p></td>\r\n	<td>\r\n		<p><input type=\"text\" class=\"input\" size=\"40\" name=\"emailFromAddress\" value=\"{{$emailFromAddress}}\" /></p>\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n<h3>Email Content Info</h3>\r\n\r\n<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\">\r\n<tr>\r\n	<td width=\"150\"><p>Host</p></td>\r\n	<td>\r\n		<p><input type=\"text\" class=\"input\" size=\"40\" name=\"emailHost\" value=\"{{$emailHost}}\" /></p>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td><p>Email Subject</p></td>\r\n	<td>\r\n		<p><input type=\"text\" class=\"input\" size=\"40\" name=\"emailSubject\" value=\"{{$emailSubject}}\" /></p>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td><p>HTML Email</p></td>\r\n	<td>\r\n		<p><select name=\"emailHTML\" class=\"input\">\r\n										<option value=\"on\" {{if $emailHTML eq \'on\'}}selected {{/if}}>YES</option>\r\n										<option value=\"\" {{if $emailHTML neq \'on\'}}selected {{/if}}>NO</option>\r\n								</select></p>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td><p>Email Template</p></td>\r\n	<td>\r\n		{{getCollectionByCategory CollectionID=17 ColumnID=4 Value=2 OrderColumn=1 var=PagesEmail}}\r\n		<p><select name=\"emailPage\" class=\"input\">\r\n										<option value=\"\">Select an email template...</option>\r\n										{{foreach from=$PagesEmail item=vPage key=kPage}}\r\n										<option value=\"{{$vPage.Collection_17_ID}}\" {{if $emailPage eq $vPage.Collection_17_ID}}selected {{/if}}>{{$vPage.Collection_17_1}}</option>\r\n										{{/foreach}}\r\n			</select></p>\r\n	</td>\r\n</tr>\r\n</table>','//save workflow for email sending\r\n$WCollectionID 				= $WorkFlowData[\'WFlowCollection\'];\r\n$WCollectionTable 			= $this -> _getCollectionTableName($WCollectionID);\r\n$WCollectionFieldName 		= $this->_getCollectionFieldName($WCollectionID, 1);\r\n$WCollectionFieldNameApply 	= $this->_getCollectionFieldName($WCollectionID, 2);\r\n\r\n$ApplyIn = array();\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD] 		= \'wFlowEmailAddFrontEndActive\';\r\n\r\n\r\nforeach ($ApplyIn as $ApplyKey => $ApplyValue)\r\n{\r\n\r\n$q = \"SELECT * FROM \". $WCollectionTable. \" WHERE \" . $WCollectionFieldName . \" = \" . $CollectionID . \" AND \" . $WCollectionFieldNameApply . \" = \" . $ApplyKey;\r\n$res = $db->query($q);\r\n\r\nif ($res->numRows() == 0)\r\n{\r\n		$addArray = array();\r\n		$addArray[$WCollectionFieldName] = $CollectionID;\r\n		$addArray[$WCollectionFieldNameApply] = $ApplyKey;\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 4)] = $Data[\'emailToName\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 5)] = $Data[\'emailToAddress\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 6)] = $Data[\'emailFromName\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 7)] = $Data[\'emailFromAddress\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 8)] = $Data[\'emailHost\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 9)] = $Data[\'emailSubject\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 11)] = $Data[\'emailHTML\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 10)] = $Data[\'emailPage\'];\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_INSERT);\r\n}\r\nelse\r\n{\r\n		$row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);\r\n		$addArray = array();\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 4)] = $Data[\'emailToName\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 5)] = $Data[\'emailToAddress\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 6)] = $Data[\'emailFromName\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 7)] = $Data[\'emailFromAddress\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 8)] = $Data[\'emailHost\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 9)] = $Data[\'emailSubject\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 11)] = $Data[\'emailHTML\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 10)] = $Data[\'emailPage\'];\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_UPDATE, \' \'.$this->_getCollectionFieldName($WCollectionID, \'ID\').\' = \' . $row[$this->_getCollectionFieldName($WCollectionID, \'ID\')]);\r\n}\r\n\r\n}//end foreach'),(4,'Approval',99,5,'on','Instead of writting to database this workflow will create copies and send email to admins to approve the entries.\r\nBy enabling this workflow, write to database workflow will be automaticaly disabled.','//workflow for approval\r\n//first we will apply the rules that apply to all cases\r\n\r\nif (count($WorkFlowReturnArray[\'Errors\']) == 0 && count ($WorkFlowReturnArray[\'RuleErrors\']) == 0)\r\n{\r\n				$WorkFlowReturnArray[\'ApprovalID\'] = 0; \r\n				switch ($ApplyFor)\r\n				{\r\n				case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD:\r\n														\r\n								foreach ($taxonomy  as $record)\r\n								{\r\n										$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n										$column_values[$column_name] = CollectionConverter::ConvertValue($SubmittedData[$column_name], $record[\"CollectionFieldType\"]);											\r\n								}\r\n								\r\n								//save the row in the collection\r\n								$inserted_id = $this->insertCollectionRow_($CollectionID, $column_values , $UploadDirectory , $UploadPrefix);\r\n								\r\n								//we need to add code so we can retreive the info and approve it\r\n								$approval_column_values = array();\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_COLLECTION_ID)] = $CollectionID;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_REFERENCE_ID)] = $inserted_id;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_CHANGED_DATA_ID)] = 0;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_ACTION_ID)] = COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_USER_ID)] = $UserID;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_TIMESTAMP)] = date(time());\r\n								\r\n								$mainApproveId = $this->insertCollectionRow_(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, $approval_column_values , \'\' , \'\');\r\n																\r\n								//save the user access levels for this row\r\n								$UserAccessGroups = $this->GetUserGroupAccess($UserID);\r\n								if ($SubmittedData[\'SelectedValuesUserGroups\'] || count($UserAccessGroups) > 0)\r\n								{\r\n									$ugroups = array();\r\n									foreach ($SubmittedData[\'SelectedValuesUserGroups\'] as $saveKey => $saveItem)\r\n									{\r\n											$ugroups[$saveItem] = $saveItem;\r\n									}\r\n									\r\n									//only super admins can update row access level\r\n									if ($SuperAdminUser) \r\n									{\r\n										$this->updateCollectionUserGroupAccessRow($CollectionID, $inserted_id, $ugroups, $UserID);\r\n									}	\r\n									else\r\n									{\r\n										\r\n										$this->updateCollectionUserGroupAccessRow($CollectionID, $inserted_id, $UserAccessGroups, $UserID);\r\n									}\r\n								}\r\n								\r\n								//we need to save xrefs if they exist\r\n								if ($collectionSettings)\r\n								{\r\n									//we get to see if this collection has xrefs :)\r\n									if (count($collectionSettings[5]) > 0)\r\n									{						\r\n										$tmpCollectionsXRefSave  = $collectionSettings[5];\r\n										\r\n										foreach ($tmpCollectionsXRefSave as $key => $value)\r\n										{\r\n											$collectionXrefSave = $value[\'collectionXrefsSave\'];\r\n											$collectionXref 	= $value[\'collectionXrefs\'];\r\n											\r\n											//first we delete the xrefs\r\n											$this -> deleteCollectionXrefs ($collectionXrefSave  ,  $inserted_id);\r\n											if ($SubmittedData[\'SelectedValues_\'.$collectionXref])\r\n											{\r\n												foreach ($SubmittedData[\'SelectedValues_\'.$collectionXref] as $saveKey => $saveItem)\r\n												{\r\n														$xref_column_values = array();\r\n														\r\n														$field1 = $this-> _getCollectionFieldName($collectionXrefSave, 1);\r\n														$field2 = $this-> _getCollectionFieldName($collectionXrefSave, 2);\r\n														\r\n														$xref_column_values[$field1] = $inserted_id;\r\n														$xref_column_values[$field2] = $saveItem;\r\n														$res2 = $this->insertCollectionRow_($collectionXrefSave, $xref_column_values , $UploadDirectory , $UploadPrefix);\r\n												}\r\n											}\r\n										}\r\n									}\r\n									\r\n									if (count($collectionSettings[6]) > 0)\r\n									{\r\n												\r\n												$tmpCollectionsXRefWith  = $collectionSettings[6];\r\n												\r\n												foreach ($tmpCollectionsXRefWith as $key => $collection_value)\r\n												{\r\n													$value = $collection_value[\'collectionComplexXref\'];\r\n													$taxonomyXref = $this->getCollectionTaxonomy($value);\r\n													\r\n													if (count($SubmittedData[\'ExtAttribute_\'.$value.\'_ID\']) > 0)\r\n													{\r\n														\r\n														foreach ($SubmittedData[\'ExtAttribute_\'.$value.\'_ID\'] as $k => $v)\r\n														{\r\n																$XrefValues = array();\r\n																$del = 1;\r\n																foreach ($taxonomyXref as $kk => $vv )\r\n																{\r\n																	if ($vv[\'CollectionFieldRequired\'] == 1 && $SubmittedData[\'ExtAttribute_\'.$value.\'_\'.$vv[\'CollectionFieldId\']][$k] != \'\')\r\n																	{\r\n																		$del = 0;\r\n																	}\r\n																	$column_name = $this->_getCollectionFieldName($value, $vv[\'CollectionFieldId\']);\r\n																	$XrefValues[$column_name] = $SubmittedData[\'ExtAttribute_\'.$value.\'_\'.$vv[\'CollectionFieldId\']][$k];\r\n																	\r\n																}//end foreach\r\n																\r\n																$column_name = $this->_getCollectionFieldName($value, 1);\r\n																$XrefValues[$column_name] = $inserted_id;\r\n																\r\n																if ($del == 1 && $v !=0)\r\n																{\r\n																	//we will delete the entry\r\n																	$this->deleteCollectionRow_($value, $v);\r\n																}\r\n																else\r\n																{\r\n																	//we will add/edit the entry\r\n																	if ($v == 0)\r\n																	{\r\n																		//we will add the value\r\n																		if ($del == 0)\r\n																		{\r\n																		  $this->insertCollectionRow_($value, $XrefValues , $UploadDirectory , $UploadPrefix);	\r\n																		}\r\n																	}\r\n																	else\r\n																	{\r\n																		//we will edit the value\r\n																		$this->updateCollectionRow_($value,  $v , $XrefValues , $UploadDirectory , $UploadPrefix);\r\n																	}\r\n																}//end if delete =0\r\n																\r\n														}//end foreach\r\n														\r\n													}\r\n													\r\n													\r\n												}\r\n																			\r\n									}//end complex xref\r\n									\r\n									\r\n										\r\n								}//edn if save xrefs\r\n								\r\n								$WorkFlowReturnArray[\'InsertedID\'] = $inserted_id;\r\n								$WorkFlowReturnArray[\'ApprovalID\'] = $mainApproveId;\r\n				\r\n				  break;  //end admin add specific code\r\n				case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT:\r\n				  \r\n				  				//we need the edit id param to be set up\r\n								if (intval($EditID) > 0)\r\n								{\r\n										\r\n										//we need to check if there was an edit made before to this row by the same user\r\n										$qTest = \"SELECT * FROM \" . $this-> _getCollectionTableName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID) . \" WHERE \r\n											 	\".$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_CHANGED_DATA_ID).\" = \'\".$EditID.\"\'\r\n												AND \".$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_USER_ID).\" = \'\".$UserID.\"\'\r\n										     \";\r\n											\r\n										$testRes = $this->db->query($qTest);	 \r\n										\r\n										if ($testRes -> numRows() == 0)\r\n										{\r\n										\r\n															foreach ($taxonomy  as $record)\r\n															{\r\n																	$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n																	$column_values[$column_name] = CollectionConverter::ConvertValue($SubmittedData[$column_name], $record[\"CollectionFieldType\"]);											\r\n															}\r\n															\r\n															//save the row in the collection\r\n															$inserted_id = $this->insertCollectionRow_($CollectionID, $column_values , $UploadDirectory , $UploadPrefix);\r\n															\r\n															//we need to add code so we can retreive the info and approve it\r\n															$approval_column_values = array();\r\n															$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_COLLECTION_ID)] = $CollectionID;\r\n															$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_REFERENCE_ID)] = $inserted_id;\r\n															$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_CHANGED_DATA_ID)] = $EditID;\r\n															$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_ACTION_ID)] = COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT;\r\n															$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_USER_ID)] = $UserID;\r\n															$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_TIMESTAMP)] = date(time());\r\n															\r\n															$mainApproveId = $this->insertCollectionRow_(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, $approval_column_values , \'\' , \'\');\r\n																							\r\n															//save the user access levels for this row\r\n															$UserAccessGroups = $this->GetUserGroupAccess($UserID);\r\n															if ($SubmittedData[\'SelectedValuesUserGroups\'] || count($UserAccessGroups) > 0)\r\n															{\r\n																$ugroups = array();\r\n																foreach ($SubmittedData[\'SelectedValuesUserGroups\'] as $saveKey => $saveItem)\r\n																{\r\n																		$ugroups[$saveItem] = $saveItem;\r\n																}\r\n																\r\n																//only super admins can update row access level\r\n																if ($SuperAdminUser) \r\n																{\r\n																	$this->updateCollectionUserGroupAccessRow($CollectionID, $inserted_id, $ugroups, $UserID);\r\n																}	\r\n																else\r\n																{\r\n																	\r\n																	$this->updateCollectionUserGroupAccessRow($CollectionID, $inserted_id, $UserAccessGroups, $UserID);\r\n																}\r\n															}\r\n															\r\n															//we need to save xrefs if they exist\r\n															if ($collectionSettings)\r\n															{\r\n																//we get to see if this collection has xrefs :)\r\n																if (count($collectionSettings[5]) > 0)\r\n																{						\r\n																	$tmpCollectionsXRefSave  = $collectionSettings[5];\r\n																	\r\n																	foreach ($tmpCollectionsXRefSave as $key => $value)\r\n																	{\r\n																		$collectionXrefSave = $value[\'collectionXrefsSave\'];\r\n																		$collectionXref 	= $value[\'collectionXrefs\'];\r\n																		\r\n																		//first we do not delete the xrefs because we create a new one and we do not want to erase the old ones\r\n																		//$this -> deleteCollectionXrefs ($collectionXrefSave  ,  $inserted_id);\r\n																		\r\n																		if ($SubmittedData[\'SelectedValues_\'.$collectionXref])\r\n																		{\r\n																			foreach ($SubmittedData[\'SelectedValues_\'.$collectionXref] as $saveKey => $saveItem)\r\n																			{\r\n																					$xref_column_values = array();\r\n																					\r\n																					$field1 = $this-> _getCollectionFieldName($collectionXrefSave, 1);\r\n																					$field2 = $this-> _getCollectionFieldName($collectionXrefSave, 2);\r\n																					\r\n																					$xref_column_values[$field1] = $inserted_id;\r\n																					$xref_column_values[$field2] = $saveItem;\r\n																					$res2 = $this->insertCollectionRow_($collectionXrefSave, $xref_column_values , $UploadDirectory , $UploadPrefix);\r\n																			}\r\n																		}\r\n																	}\r\n																}\r\n																\r\n																if (count($collectionSettings[6]) > 0)\r\n																{\r\n																			\r\n																			$tmpCollectionsXRefWith  = $collectionSettings[6];\r\n																			\r\n																			foreach ($tmpCollectionsXRefWith as $key => $collection_value)\r\n																			{\r\n																				$value = $collection_value[\'collectionComplexXref\'];\r\n																				$taxonomyXref = $this->getCollectionTaxonomy($value);\r\n																				\r\n																				if (count($SubmittedData[\'ExtAttribute_\'.$value.\'_ID\']) > 0)\r\n																				{\r\n																					\r\n																					foreach ($SubmittedData[\'ExtAttribute_\'.$value.\'_ID\'] as $k => $v)\r\n																					{\r\n																							$XrefValues = array();\r\n																							$del = 1;\r\n																							foreach ($taxonomyXref as $kk => $vv )\r\n																							{\r\n																								if ($vv[\'CollectionFieldRequired\'] == 1 && $SubmittedData[\'ExtAttribute_\'.$value.\'_\'.$vv[\'CollectionFieldId\']][$k] != \'\')\r\n																								{\r\n																									$del = 0;\r\n																								}\r\n																								$column_name = $this->_getCollectionFieldName($value, $vv[\'CollectionFieldId\']);\r\n					\r\n																								$XrefValues[$column_name] = $SubmittedData[\'ExtAttribute_\'.$value.\'_\'.$vv[\'CollectionFieldId\']][$k];\r\n																								\r\n																							}//end foreach\r\n																							\r\n																							$column_name = $this->_getCollectionFieldName($value, 1);\r\n																							$XrefValues[$column_name] = $inserted_id;\r\n																							\r\n																							if ($del == 1 && $v !=0)\r\n																							{\r\n																								//we will not delete any of the entries\r\n																								//$this->deleteCollectionRow_($value, $v);\r\n																							}\r\n																							else\r\n																							{\r\n																								\r\n																								if ($v == 0)\r\n																								{\r\n																									\r\n																									if ($del == 0)\r\n																									{\r\n																									  $this->insertCollectionRow_($value, $XrefValues , $UploadDirectory , $UploadPrefix);	\r\n																									}\r\n																								}\r\n																								else\r\n																								{\r\n																									\r\n																									$this->insertCollectionRow_($value, $XrefValues , $UploadDirectory , $UploadPrefix);	\r\n																								}\r\n																							}//end if delete =0\r\n																							\r\n																					}//end foreach\r\n																					\r\n																				}\r\n																				\r\n																				\r\n																			}\r\n																										\r\n																}//end complex xref\r\n																\r\n																\r\n																	\r\n															}//edn if save xrefs\r\n															\r\n															$WorkFlowReturnArray[\'ApprovalID\'] = $mainApproveId;\r\n															\r\n											}\r\n											else\r\n											{\r\n													//in this case we need to edit the row that was already pending\r\n													$pendingRow = $testRes -> fetchRow(MDB2_FETCHMODE_ASSOC);\r\n													$editPendingRowId = $pendingRow[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_REFERENCE_ID)];\r\n													\r\n													//we simply edit the row\r\n													foreach ($taxonomy  as $record)\r\n													{\r\n														$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n														if (isset($SubmittedData[$column_name]) || $_FILES[$column_name][\'error\'] == UPLOAD_ERR_OK )\r\n														{\r\n															$column_values[$column_name] = CollectionConverter::ConvertValue($SubmittedData[$column_name], $record[\"CollectionFieldType\"]);\r\n														}\r\n													}\r\n													\r\n													\r\n													\r\n													$res = $this->updateCollectionRow_($CollectionID, $editPendingRowId, $column_values , $UploadDirectory , $UploadPrefix);\r\n													\r\n													//user level access is only updated if the row is edited by admins\r\n													if ($SuperAdminUser)\r\n													{\r\n															if ($SubmittedData[\'SelectedValuesUserGroups\'])\r\n															{\r\n																$ugroups = array();\r\n																foreach ($SubmittedData[\'SelectedValuesUserGroups\'] as $saveKey => $saveItem)\r\n																{\r\n																		$ugroups[$saveItem] = $saveItem;\r\n																}\r\n															}\r\n															$this->updateCollectionUserGroupAccessRow($CollectionID, $editPendingRowId, $ugroups, $UserID);	\r\n													}\r\n													\r\n													\r\n													//we need to save xrefs if they exist\r\n													if ($collectionSettings)\r\n													{\r\n														//we get to see if this collection has xrefs :)\r\n														if (count($collectionSettings[5]) > 0)\r\n														{\r\n															$edit_id = $editPendingRowId;\r\n															\r\n															$tmpCollectionsXRefSave  = $collectionSettings[5];\r\n															\r\n															foreach ($tmpCollectionsXRefSave as $key => $value)\r\n															{\r\n																$collectionXrefSave = $value[\'collectionXrefsSave\'];\r\n																$collectionXref 	= $value[\'collectionXrefs\'];\r\n																\r\n																//first we delete the xrefs\r\n																$this -> deleteCollectionXrefs ($collectionXrefSave , $edit_id);\r\n																if ($SubmittedData[\'SelectedValues_\'.$collectionXref])\r\n																{\r\n																	foreach ($SubmittedData[\'SelectedValues_\'.$collectionXref] as $saveKey => $saveItem)\r\n																	{\r\n																			$xref_column_values = array();\r\n																			\r\n																			$field1 = $this-> _getCollectionFieldName($collectionXrefSave, 1);\r\n																			$field2 = $this-> _getCollectionFieldName($collectionXrefSave, 2);\r\n																			\r\n																			$xref_column_values[$field1] = $edit_id;\r\n																			$xref_column_values[$field2] = $saveItem;\r\n																			\r\n																			$res = $this->insertCollectionRow_($collectionXrefSave, $xref_column_values , $UploadDirectory , $UploadPrefix);\r\n																	}\r\n																}\r\n															}\r\n														}	\r\n														\r\n														if (count($collectionSettings[6]) > 0)\r\n														{\r\n														\r\n																	$tmpCollectionsXRefWith  = $collectionSettings[6];\r\n																	\r\n																	$edit_id = $editPendingRowId;														\r\n																	\r\n																	foreach ($tmpCollectionsXRefWith as $key => $collection_value)\r\n																	{\r\n																		$value = $collection_value[\'collectionComplexXref\'];\r\n																		\r\n																		$taxonomyXref = $this->getCollectionTaxonomy($value);\r\n																		\r\n																		if (count($SubmittedData[\'ExtAttribute_\'.$value.\'_ID\']) > 0)\r\n																		{\r\n																			\r\n																			$this -> deleteCollectionXrefs ($value , $editPendingRowId);\r\n																			\r\n																			foreach ($SubmittedData[\'ExtAttribute_\'.$value.\'_ID\'] as $k => $v)\r\n																			{\r\n																					$XrefValues = array();\r\n																					$del = 1;\r\n																					foreach ($taxonomyXref as $kk => $vv )\r\n																					{\r\n																						if ($vv[\'CollectionFieldRequired\'] == 1 && $SubmittedData[\'ExtAttribute_\'.$value.\'_\'.$vv[\'CollectionFieldId\']][$k] != \'\')\r\n																						{\r\n																							$del = 0;\r\n																						}\r\n																						$column_name = $this->_getCollectionFieldName($value, $vv[\'CollectionFieldId\']);\r\n																						$XrefValues[$column_name] = $SubmittedData[\'ExtAttribute_\'.$value.\'_\'.$vv[\'CollectionFieldId\']][$k];\r\n																						\r\n																					}//end foreach\r\n																					\r\n																					$column_name = $this->_getCollectionFieldName($value, 1);\r\n																					$XrefValues[$column_name] = $edit_id;\r\n																					\r\n																					\r\n																					$this->insertCollectionRow_($value, $XrefValues , $UploadDirectory , $UploadPrefix);	\r\n																						\r\n\r\n																					\r\n																			}//end foreach\r\n																			\r\n																		}\r\n																		\r\n																		\r\n																	}\r\n																								\r\n														}//end complex xref\r\n														\r\n														\r\n													}//edn if save xrefs\r\n													\r\n													\r\n													$WorkFlowReturnArray[\'ApprovalID\'] = $pendingRow[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, \'ID\')];;\r\n													$WorkFlowReturnArray[\'ApprovalNoEmail\'] = 1;\r\n											} //end if desire to edit twice the same row by the same user\r\n								\r\n								\r\n								$WorkFlowReturnArray[\'EditedID\'] = $inserted_id;\r\n								\r\n								\r\n								}//end if we have edit id\r\n				  \r\n				  \r\n				  break; //end admin edit specific code\r\n				case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE:\r\n				  				\r\n								$approval_column_values = array();\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_COLLECTION_ID)] = $CollectionID;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_REFERENCE_ID)] = $DeleteID;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_CHANGED_DATA_ID)] = $DeleteID;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_ACTION_ID)] = COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_USER_ID)] = $UserID;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_TIMESTAMP)] = date(time());\r\n							\r\n								$mainApproveId = $this->insertCollectionRow_(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, $approval_column_values , \'\' , \'\');\r\n								\r\n								$WorkFlowReturnArray[\'DeletedID\'] = $DeleteID;\r\n								$WorkFlowReturnArray[\'ApprovalID\'] = $mainApproveId;				\r\n								  			\r\n				  \r\n				  break;  //end admin delete specific code\r\n				case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD:\r\n								\r\n							foreach ($taxonomy  as $record)\r\n							{\r\n								$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n																\r\n								if (($record[\'CollectionHidden\'] == 1 && $SubmittedData[$column_name] ==\'\' && $record[\'CollectionFormula\'] == 1) || ( $_FILES[$column_name][\'error\'] != UPLOAD_ERR_OK) )\r\n								{\r\n									//do not add the field into the edit \r\n								}\r\n								else\r\n								{\r\n									$column_values[$column_name] = CollectionConverter::ConvertValue($SubmittedData[$column_name], $record[\"CollectionFieldType\"]);\r\n								}	\r\n					\r\n							}\r\n							\r\n							$inserted_id = $this->insertCollectionRow_($CollectionID, $column_values , $UploadDirectory , $UploadPrefix);\r\n							\r\n								$approval_column_values = array();\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_COLLECTION_ID)] = $CollectionID;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_REFERENCE_ID)] = $inserted_id;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_CHANGED_DATA_ID)] = 0;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_ACTION_ID)] = COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_USER_ID)] = $UserID;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_TIMESTAMP)] = date(time());\r\n							\r\n								$mainApproveId = $this->insertCollectionRow_(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, $approval_column_values , \'\' , \'\');\r\n								\r\n							$WorkFlowReturnArray[\'InsertedID\'] = $inserted_id;\r\n							$WorkFlowReturnArray[\'ApprovalID\'] = $mainApproveId;\r\n				\r\n				  break;  //end front end add specific code\r\n				case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT:\r\n				  \r\n				  						//we need to check if there was an edit made before to this row by the same user\r\n										$qTest = \"SELECT * FROM \" . $this-> _getCollectionTableName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID) . \" WHERE \r\n											 	\".$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_CHANGED_DATA_ID).\" = \'\".$EditID.\"\'\r\n												AND \".$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_USER_ID).\" = \'\".$UserID.\"\'\r\n										     \";\r\n										$testRes = $this->db->query($qTest);	 \r\n										\r\n										if ($testRes -> numRows() == 0)\r\n										{	\r\n							\r\n													foreach ($taxonomy  as $record)\r\n													{\r\n														$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n																						\r\n														if (($record[\'CollectionHidden\'] == 1 && $SubmittedData[$column_name] ==\'\' && $record[\'CollectionFormula\'] == 1) || ( $_FILES[$column_name][\'error\'] != UPLOAD_ERR_OK) )\r\n														{\r\n															//do not add the field into the edit \r\n														}\r\n														else\r\n														{\r\n															$column_values[$column_name] = CollectionConverter::ConvertValue($SubmittedData[$column_name], $record[\"CollectionFieldType\"]);\r\n														}	\r\n											\r\n													}\r\n													\r\n													$inserted_id = $this->insertCollectionRow_($CollectionID, $column_values , $UploadDirectory , $UploadPrefix);\r\n													\r\n														$approval_column_values = array();\r\n														$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_COLLECTION_ID)] = $CollectionID;\r\n														$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_REFERENCE_ID)] = $inserted_id;\r\n														$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_CHANGED_DATA_ID)] = $EditID;\r\n														$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_ACTION_ID)] = COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT;\r\n														$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_USER_ID)] = $UserID;\r\n														$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_TIMESTAMP)] = date(time());\r\n													\r\n														$mainApproveId = $this->insertCollectionRow_(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, $approval_column_values , \'\' , \'\');\r\n													\r\n													\r\n													$WorkFlowReturnArray[\'ApprovalID\'] = $mainApproveId;\r\n													\r\n										}\r\n										else\r\n										{\r\n												$pendingRow = $testRes -> fetchRow(MDB2_FETCHMODE_ASSOC);\r\n												$editPendingRowId = $pendingRow[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_REFERENCE_ID)];\r\n												\r\n												foreach ($taxonomy  as $record)\r\n												{\r\n													$column_name = $this->_getCollectionFieldName($CollectionID, $record[\"CollectionFieldId\"]);\r\n																					\r\n													if (($record[\'CollectionHidden\'] == 1 && $SubmittedData[$column_name] ==\'\' && $record[\'CollectionFormula\'] == 1) || ( $_FILES[$column_name][\'error\'] != UPLOAD_ERR_OK) )\r\n													{\r\n														//do not add the field into the edit \r\n													}\r\n													else\r\n													{\r\n														$column_values[$column_name] = CollectionConverter::ConvertValue($SubmittedData[$column_name], $record[\"CollectionFieldType\"]);\r\n													}	\r\n										\r\n												}\r\n							\r\n												$this->updateCollectionRow_($CollectionID, $editPendingRowId , $column_values , $UploadDirectory , $UploadPrefix);\r\n													\r\n										\r\n												$WorkFlowReturnArray[\'ApprovalID\'] = $pendingRow[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, \'ID\')];;\r\n												$WorkFlowReturnArray[\'ApprovalNoEmail\'] = 1;\r\n										}			\r\n													\r\n										$WorkFlowReturnArray[\'EditedID\'] = $EditID;	\r\n													\r\n				  \r\n				  break; //end front end edit specific code\r\n				case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE:\r\n				  			\r\n							$approval_column_values = array();\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_COLLECTION_ID)] = $CollectionID;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_REFERENCE_ID)] = $DeleteID;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_CHANGED_DATA_ID)] = $DeleteID;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_ACTION_ID)] = COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_USER_ID)] = $UserID;\r\n								$approval_column_values[$this-> _getCollectionFieldName(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, COLLECTION_WORKFLOW_APPROVE_TABLE_TIMESTAMP)] = date(time());\r\n							\r\n								$mainApproveId = $this->insertCollectionRow_(COLLECTION_WORKFLOW_APPROVE_TABLE_ID, $approval_column_values , \'\' , \'\');\r\n							\r\n							$WorkFlowReturnArray[\'DeletedID\'] = $DeleteID;\r\n				  			$WorkFlowReturnArray[\'ApprovalID\'] = $mainApproveId;\r\n				  \r\n				  break;   //end front end delete specific code\r\n				default:\r\n				  \r\n				  // we will not run any code here\r\n				  \r\n				} \r\n				\r\n		if ($WorkFlowReturnArray[\'ApprovalID\'] > 0 && $WorkFlowReturnArray[\'ApprovalNoEmail\'] != 1)\r\n		{\r\n				//we are going to send the approval email\r\n				$args = array();\r\n				$args[\'changeid\'] 	= $WorkFlowReturnArray[\'ApprovalID\'];\r\n				$args[\'settingid\'] 	= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, \'ID\')];\r\n				\r\n				$EmailFrom 			= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 5)];\r\n				$EmailFromName 		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 6)];\r\n				$EmailSubject		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 7)];\r\n				$EmailTemplate		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 9)];\r\n				$SendEmailTo		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 4)];\r\n				$EmailToName		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 10)];\r\n				\r\n				require_once(\"class.phpmailer.php\");	\r\n								\r\n				$mail = new PHPMailer();\r\n				$mail->From     = $EmailFrom;\r\n				$mail->FromName = $EmailFromName;\r\n				$mail->Subject  = $EmailSubject;\r\n				\r\n				$page_id = $EmailTemplate;\r\n														\r\n				$smarty -> assign (\"args\" , $args);\r\n				\r\n				$arr = array (\'id\' => $page_id, \'display\' => 1);\r\n				$Content = print_page_data($arr, $smarty);\r\n				\r\n				$mail->IsHTML (true);\r\n				$mail->AltBody = $Content;\r\n				$mail->Body    = $Content;\r\n				\r\n				$mail->AddAddress($EmailToName.\" <\".$SendEmailTo.\">\");			\r\n				$mail->Send();\r\n				$mail->ClearAddresses();\r\n		}\r\n}','{{if $smarty.post.save eq \'save\'}}\r\n\r\n{{else}}\r\n\r\n	\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=99 ColumnID=1 Value=$CollectionID Collection_99_2=1 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_99_3 eq \'on\'}}{{assign var=wFlowApproveActive value=\'checked\'}}{{else}}{{assign var=wFlowApproveActive value=\'\'}}{{/if}}\r\n	{{assign var=approveToAddress value=$Tmp.Collection_99_4}}\r\n	{{assign var=approveFromName value=$Tmp.Collection_99_5}}\r\n	{{assign var=approveFromAddress value=$Tmp.Collection_99_6}}\r\n	{{assign var=approveSubject value=$Tmp.Collection_99_7}}\r\n	{{assign var=approveNotes value=$Tmp.Collection_99_8}}\r\n	{{assign var=approvePage value=$Tmp.Collection_99_9}}\r\n	{{assign var=approveToName value=$Tmp.Collection_99_10}}\r\n\r\n\r\n{{/if}}\r\n\r\n{{capture name=jsWorkflowCodeApproval assign=tmpJSApproval}}\r\n				\r\n		$(\"#wFlowApproveActive\").click(function(){ var ch = $(this).attr(\'checked\'); \r\n		\r\n				if (ch == true)\r\n				{\r\n						$(\'#wFlowWriteAddFrontEndActive\').attr(\'checked\',false);\r\n						$(\'#wFlowWriteEditFrontEndActive\').attr(\'checked\',false);\r\n						$(\'#wFlowWriteDeleteFrontEndActive\').attr(\'checked\',false);\r\n						\r\n						$(\'#wFlowWriteAddAdminActive\').attr(\'checked\',false);\r\n						$(\'#wFlowWriteEditAdminActive\').attr(\'checked\',false);\r\n						$(\'#wFlowWriteDeleteAdminActive\').attr(\'checked\',false);\r\n				}\r\n		\r\n		});\r\n		\r\n		$(\"#wFlowWriteAddFrontEndActive\").click(function(){ var ch = $(this).attr(\'checked\');  if (ch == true) {  $(\'#wFlowApproveActive\').attr(\'checked\',false);  } });\r\n		$(\"#wFlowWriteEditFrontEndActive\").click(function(){ var ch = $(this).attr(\'checked\');  if (ch == true) {  $(\'#wFlowApproveActive\').attr(\'checked\',false);  } });\r\n		$(\"#wFlowWriteDeleteFrontEndActive\").click(function(){ var ch = $(this).attr(\'checked\');  if (ch == true) {  $(\'#wFlowApproveActive\').attr(\'checked\',false);  } });\r\n		\r\n		$(\"#wFlowWriteAddAdminActive\").click(function(){ var ch = $(this).attr(\'checked\');  if (ch == true) {  $(\'#wFlowApproveActive\').attr(\'checked\',false);  } });\r\n		$(\"#wFlowWriteEditAdminActive\").click(function(){ var ch = $(this).attr(\'checked\');  if (ch == true) {  $(\'#wFlowApproveActive\').attr(\'checked\',false);  } });\r\n		$(\"#wFlowWriteDeleteAdminActive\").click(function(){ var ch = $(this).attr(\'checked\');  if (ch == true) {  $(\'#wFlowApproveActive\').attr(\'checked\',false);  } });\r\n\r\n{{/capture}}\r\n{{assign var=JavascriptJQueryCode value=$JavascriptJQueryCode|concat:\" \"|concat:$tmpJSApproval}} \r\n\r\n{{RunQuery ResultsVar=XREFsTest q=\"SELECT * FROM CollectionSettings_5  WHERE collectionXrefsSave = \"|concat:$CollectionID}}\r\n{{RunQuery ResultsVar=XREFsTest2 q=\"SELECT * FROM CollectionSettings_6  WHERE collectionComplexXref = \"|concat:$CollectionID}}\r\n\r\n{{if $XREFsTest|@count gt 0 or $XREFsTest2|@count gt 0}}\r\n<div class=\"ui-state-error ui-corner-all\" style=\"padding: 0pt 0.7em;\">\r\n<p style=\"margin-top:4px; margin-bottom:4px;\">\r\n<span class=\"ui-icon ui-icon-alert\" style=\"float: left; margin-right: 0.3em;\"></span>\r\n<strong>Alert:</strong>\r\nThis workflow is disabled because another collection uses this collection to store information.\r\n</p>\r\n</div>\r\n{{else}}\r\n\r\n<p><input type=\"checkbox\" id=\"wFlowApproveActive\" name=\"wFlowApproveActive\" {{$wFlowApproveActive}} /> Activate approval workflow</p>\r\n\r\n<h3>Email Verification Settings</h3>\r\n\r\n<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\">\r\n<tr>\r\n	<td><p>Recipient Name</p></td>\r\n	<td>\r\n		<p><input type=\"text\" class=\"input\" size=\"40\" name=\"approveToName\" value=\"{{$approveToName}}\" /></p>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td><p>Recipient Email Address</p></td>\r\n	<td>\r\n		<p><input type=\"text\" class=\"input\" size=\"40\" name=\"approveToAddress\" value=\"{{$approveToAddress}}\" /></p>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td width=\"150\"><p>Sender Name</p></td>\r\n	<td>\r\n		<p><input type=\"text\" class=\"input\" size=\"40\" name=\"approveFromName\" value=\"{{$approveFromName}}\" /></p>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td><p>Sender Email Address</p></td>\r\n	<td>\r\n		<p><input type=\"text\" class=\"input\" size=\"40\" name=\"approveFromAddress\" value=\"{{$approveFromAddress}}\" /></p>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td><p>Subject</p></td>\r\n	<td>\r\n		<p><input type=\"text\" class=\"input\" size=\"40\" name=\"approveSubject\" value=\"{{$approveSubject}}\" /></p>\r\n	</td>\r\n</tr>\r\n\r\n<tr valign=\"top\">\r\n	<td width=\"150\"><p>Notes</p></td>\r\n	<td>\r\n		<p><text{{**}}area class=\"input\" cols=\"40\" rows=\"8\" name=\"approveNotes\">{{$approveNotes}}</text{{**}}area></p>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td><p>Email Template</p></td>\r\n	<td>\r\n		{{getCollectionByCategory CollectionID=17 ColumnID=4 Value=2 OrderColumn=1 var=PagesEmail}}\r\n		<p><select name=\"approvePage\" class=\"input\">\r\n										<option value=\"\">Select an email template...</option>\r\n										{{foreach from=$PagesEmail item=vPage key=kPage}}\r\n										<option value=\"{{$vPage.Collection_17_ID}}\" {{if $approvePage eq $vPage.Collection_17_ID}}selected {{/if}}>{{$vPage.Collection_17_1}}</option>\r\n										{{/foreach}}\r\n			</select></p>\r\n	</td>\r\n</tr>\r\n</table>\r\n{{/if}}','//save workflow for approve\r\n$WCollectionID 				= $WorkFlowData[\'WFlowCollection\'];\r\n$WCollectionTable 			= $this -> _getCollectionTableName($WCollectionID);\r\n$WCollectionFieldName 		= $this->_getCollectionFieldName($WCollectionID, 1);\r\n$WCollectionFieldNameApply 	= $this->_getCollectionFieldName($WCollectionID, 2);\r\n\r\n$ApplyIn = array();\r\n\r\n//we save the same settings for each workflowapply\r\n\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD] 			= \'wFlowApproveActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT] 		    = \'wFlowApproveActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE] 		= \'wFlowApproveActive\';\r\n\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD] 		= \'wFlowApproveActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT] 		= \'wFlowApproveActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE] 		= \'wFlowApproveActive\';\r\n\r\n\r\nforeach ($ApplyIn as $ApplyKey => $ApplyValue)\r\n{\r\n\r\n$q = \"SELECT * FROM \". $WCollectionTable. \" WHERE \" . $WCollectionFieldName . \" = \" . $CollectionID . \" AND \" . $WCollectionFieldNameApply . \" = \" . $ApplyKey;\r\n$res = $db->query($q);\r\n\r\nif ($res->numRows() == 0)\r\n{\r\n		$addArray = array();\r\n		$addArray[$WCollectionFieldName] = $CollectionID;\r\n		$addArray[$WCollectionFieldNameApply] = $ApplyKey;\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 4)] = $Data[\'approveToAddress\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 5)] = $Data[\'approveFromName\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 6)] = $Data[\'approveFromAddress\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 7)] = $Data[\'approveSubject\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 8)] = $Data[\'approveNotes\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 9)] = $Data[\'approvePage\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 10)] = $Data[\'approveToName\'];\r\n		\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_INSERT);\r\n}\r\nelse\r\n{\r\n		$row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);\r\n		$addArray = array();\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 4)] = $Data[\'approveToAddress\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 5)] = $Data[\'approveFromName\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 6)] = $Data[\'approveFromAddress\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 7)] = $Data[\'approveSubject\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 8)] = $Data[\'approveNotes\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 9)] = $Data[\'approvePage\'];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 10)] = $Data[\'approveToName\'];\r\n		\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_UPDATE, \' \'.$this->_getCollectionFieldName($WCollectionID, \'ID\').\' = \' . $row[$this->_getCollectionFieldName($WCollectionID, \'ID\')]);\r\n}\r\n\r\n}//end foreach'),(5,'Collection Behaviours',102,6,'on','After a collection row is added we can define other simple <a href=\"admin.php?module_id=1&action=update&id=31\">behaviours</a> that will work only for one collection.','//workflow for behaviours\r\n\r\n//we will only run behaviours if there are no errors\r\n\r\nif (count($WorkFlowReturnArray[\'Errors\']) == 0 && count ($WorkFlowReturnArray[\'RuleErrors\']) == 0)\r\n{\r\n		\r\n		$collection_table 	= $this->_getCollectionTableName(COLLECTION_BEHAVIOURS);\r\n		$addName 			= $this->_getCollectionFieldName(COLLECTION_BEHAVIOURS, COLLECTION_BEHAVIOURS_ADD);\r\n		$deleteName 		= $this->_getCollectionFieldName(COLLECTION_BEHAVIOURS, COLLECTION_BEHAVIOURS_DELETE);\r\n		$editName 			= $this->_getCollectionFieldName(COLLECTION_BEHAVIOURS, COLLECTION_BEHAVIOURS_EDIT);\r\n		$collectionName		= $this->_getCollectionFieldName(COLLECTION_BEHAVIOURS, COLLECTION_BEHAVIOURS_COLLECTION);\r\n		$pluginName			= $this->_getCollectionFieldName(COLLECTION_BEHAVIOURS, COLLECTION_BEHAVIOURS_CODE);\r\n		$idName				= $this->_getCollectionFieldName(COLLECTION_BEHAVIOURS, \'ID\');\r\n		$adminName 			= $this->_getCollectionFieldName(COLLECTION_BEHAVIOURS, COLLECTION_BEHAVIOURS_ADMIN);\r\n		$collectionFront	= $this->_getCollectionFieldName(COLLECTION_BEHAVIOURS, COLLECTION_BEHAVIOURS_FRONT_END);\r\n		$collectionSort		= $this->_getCollectionFieldName(COLLECTION_BEHAVIOURS, COLLECTION_BEHAVIOURS_SORT_ORDER);\r\n		\r\n		switch ($ApplyFor)\r\n		{\r\n		case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD:\r\n					\r\n					$q = \"SELECT $pluginName as pluginName FROM $collection_table WHERE $addName=\'on\' and $adminName=\'on\' and $collectionName=\'\".$CollectionID.\"\' order by \" . $collectionSort;\r\n		\r\n		\r\n		  break;  //end admin add specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT:\r\n		  \r\n		  			$q = \"SELECT $pluginName as pluginName FROM $collection_table WHERE $editName=\'on\' and $adminName=\'on\' and $collectionName=\'\".$CollectionID.\"\' order by \" . $collectionSort;\r\n		  \r\n		  break; //end admin edit specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE:\r\n		  \r\n		  		$q = \"SELECT $pluginName as pluginName FROM $collection_table WHERE $deleteName=\'on\' and $adminName=\'on\' and $collectionName=\'\".$CollectionID.\"\' order by \" . $collectionSort;\r\n		  \r\n		  break;  //end admin delete specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD:\r\n		\r\n					$q = \"SELECT $pluginName as pluginName FROM $collection_table WHERE $addName=\'on\' and $collectionFront=\'on\' and $collectionName=\'\".$CollectionID.\"\' order by \" . $collectionSort;\r\n		\r\n		  break;  //end front end add specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT:\r\n		  \r\n		  			$q = \"SELECT $pluginName as pluginName FROM $collection_table WHERE $editName=\'on\' and $collectionFront=\'on\' and $collectionName=\'\".$CollectionID.\"\' order by \" . $collectionSort;\r\n		  \r\n		  break; //end front end edit specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE:\r\n		  \r\n		  			$q = \"SELECT $pluginName as pluginName FROM $collection_table WHERE $deleteName=\'on\' and $collectionFront=\'on\' and $collectionName=\'\".$CollectionID.\"\' order by \" . $collectionSort;\r\n		  \r\n		  break;   //end front end delete specific code\r\n		default:\r\n		  \r\n		  // we will not run any code here\r\n		  \r\n		} \r\n\r\n		$Behaviours = $this-> db -> queryAll($q);\r\n		\r\n		if ($Behaviours)\r\n			foreach ( $Behaviours as $k => $v )\r\n				eval($v[\'pluginName\']);\r\n				\r\n				\r\n		//we run functions if necessary\r\n		$funcArray = array();\r\n		$funcArray[1] = addslashes($ExtraGetParams[\'func\']);\r\n		$funcArray[2] = $ApplyFor;\r\n		\r\n		$functionsToRun = $this -> getRowsByColValues( COLLECTION_WORKFLOW_FUNCTIONS_TABLE_ID , $funcArray);		\r\n		\r\n		\r\n		\r\n		if (count($functionsToRun) > 0)\r\n		{\r\n				$funcCodeName = $this->_getCollectionFieldName(COLLECTION_WORKFLOW_FUNCTIONS_TABLE_ID, COLLECTION_WORKFLOW_FUNCTIONS_CODE_ID);\r\n				\r\n				foreach ($functionsToRun as $funcKey => $funcValue)\r\n				{\r\n												\r\n						if ($funcValue[$funcCodeName] != \'\')\r\n						{\r\n							eval ($funcValue[$funcCodeName]);\r\n						}				\r\n				}\r\n				\r\n				\r\n		}\r\n				\r\n		\r\n} //end workflow for extra behaviours','{{if $smarty.post.save eq \'save\'}}\r\n\r\n{{else}}\r\n\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=102 ColumnID=1 Value=$CollectionID Collection_102_2=1 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_102_3 eq \'on\'}}{{assign var=wFlowBehaviourAddAdminActive value=\'checked\'}}{{else}}{{assign var=wFlowBehaviourAddAdminActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=102 ColumnID=1 Value=$CollectionID Collection_102_2=2 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_102_3 eq \'on\'}}{{assign var=wFlowBehaviourEditAdminActive value=\'checked\'}}{{else}}{{assign var=wFlowBehaviourEditAdminActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=102 ColumnID=1 Value=$CollectionID Collection_102_2=3 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_102_3 eq \'on\'}}{{assign var=wFlowBehaviourDeleteAdminActive value=\'checked\'}}{{else}}{{assign var=wFlowBehaviourDeleteAdminActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=102 ColumnID=1 Value=$CollectionID Collection_102_2=4 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_102_3 eq \'on\'}}{{assign var=wFlowBehaviourAddFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowBehaviourAddFrontEndActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=102 ColumnID=1 Value=$CollectionID Collection_102_2=5 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_102_3 eq \'on\'}}{{assign var=wFlowBehaviourEditFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowBehaviourEditFrontEndActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=102 ColumnID=1 Value=$CollectionID Collection_102_2=6 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_102_3 eq \'on\'}}{{assign var=wFlowBehaviourDeleteFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowBehaviourDeleteFrontEndActive value=\'\'}}{{/if}}\r\n\r\n{{/if}}\r\n\r\n<h3>Front End</h3>\r\n<p><input type=\"checkbox\" name=\"wFlowBehaviourAddFrontEndActive\" {{$wFlowBehaviourAddFrontEndActive}} /> Behaviours will be executed when a collection row is <em>added</em> using the front end of the site</p>\r\n<p><input type=\"checkbox\" name=\"wFlowBehaviourEditFrontEndActive\" {{$wFlowBehaviourEditFrontEndActive}} /> Behaviours will be executed when a collection row is <em>edited</em> using the front end of the site</p>\r\n<p><input type=\"checkbox\" name=\"wFlowBehaviourDeleteFrontEndActive\" {{$wFlowBehaviourDeleteFrontEndActive}} /> Behaviours will be executed when a collection row is <em>deleted</em> using the front end of the site</p>\r\n\r\n\r\n<h3>Administrator Area</h3>\r\n<p><input type=\"checkbox\" name=\"wFlowBehaviourAddAdminActive\" {{$wFlowBehaviourAddAdminActive}} /> Behaviours will be executed when a collection row is <em>added</em> in admin</p>\r\n<p><input type=\"checkbox\" name=\"wFlowBehaviourEditAdminActive\" {{$wFlowBehaviourEditAdminActive}} /> Behaviours will be executed when a collection row is <em>edited</em> in admin</p>\r\n<p><input type=\"checkbox\" name=\"wFlowBehaviourDeleteAdminActive\" {{$wFlowBehaviourDeleteAdminActive}} /> Behaviours will be executed when a collection row is <em>deleted</em> in admin</p>\r\n','//save workflow for behaviours\r\n$WCollectionID 				= $WorkFlowData[\'WFlowCollection\'];\r\n$WCollectionTable 			= $this -> _getCollectionTableName($WCollectionID);\r\n$WCollectionFieldName 		= $this->_getCollectionFieldName($WCollectionID, 1);\r\n$WCollectionFieldNameApply 	= $this->_getCollectionFieldName($WCollectionID, 2);\r\n\r\n$ApplyIn = array();\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD] 			= \'wFlowBehaviourAddAdminActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT] 			= \'wFlowBehaviourEditAdminActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE] 		= \'wFlowBehaviourDeleteAdminActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD] 		= \'wFlowBehaviourAddFrontEndActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT] 		= \'wFlowBehaviourEditFrontEndActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE] 		= \'wFlowBehaviourDeleteFrontEndActive\';\r\n\r\nforeach ($ApplyIn as $ApplyKey => $ApplyValue)\r\n{\r\n\r\n$q = \"SELECT * FROM \". $WCollectionTable. \" WHERE \" . $WCollectionFieldName . \" = \" . $CollectionID . \" AND \" . $WCollectionFieldNameApply . \" = \" . $ApplyKey;\r\n$res = $db->query($q);\r\n\r\nif ($res->numRows() == 0)\r\n{\r\n		$addArray = array();\r\n		$addArray[$WCollectionFieldName] = $CollectionID;\r\n		$addArray[$WCollectionFieldNameApply] = $ApplyKey;\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 4)] = $Data[$ApplyValue];\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_INSERT);\r\n}\r\nelse\r\n{\r\n		$row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);\r\n		$addArray = array();\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 4)] = $Data[$ApplyValue];\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_UPDATE, \' \'.$this->_getCollectionFieldName($WCollectionID, \'ID\').\' = \' . $row[$this->_getCollectionFieldName($WCollectionID, \'ID\')]);\r\n}\r\n\r\n}//end foreach'),(6,'Redirect',98,7,'on','Redirecting is useful on the front end side and avoid the alert when visitors refresh the pages after submitting forms.','//workflow for redirecting\r\n\r\n//we will only redirecting if there are no errors\r\n\r\nif (count($WorkFlowReturnArray[\'Errors\']) == 0 && count ($WorkFlowReturnArray[\'RuleErrors\']) == 0)\r\n{\r\n\r\n		switch ($ApplyFor)\r\n		{\r\n		case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD:\r\n		\r\n						//if being in admin there are 2 situations\r\n						//we execute from inside the cms or from the front end as a dialog window\r\n						if ($ExtraGetParams[\'dialog\']==1)\r\n						{\r\n								if (isset($WorkFlowReturnArray[\'ApprovalID\']) )\r\n								{\r\n									if ($SuperAdminUser == true)\r\n									{\r\n											$smarty->assign(\'AwaitingApprovalRowID\',$WorkFlowReturnArray[\'EditedID\']);\r\n									}\r\n									\r\n									$smarty->assign(\'AwaitingApproval\',1);\r\n								}	\r\n								$smarty->display (ADMIN_APP_DIR.\'/closeDialog.html\');\r\n								die();\r\n						}\r\n						\r\n						if (isset($WorkFlowReturnArray[\'ApprovalID\']) )\r\n						{\r\n							if ($SuperAdminUser == true)\r\n							{\r\n								header(\"Location: /\".ADMIN_APP_DIR.\"/admin.php?\". $QueryURLString.\"&apinfo=approve&eid=\".$WorkFlowReturnArray[\'InsertedID\']);\r\n							}\r\n							else\r\n							{\r\n								header(\"Location: /\".ADMIN_APP_DIR.\"/admin.php?\". $QueryURLString.\"&apinfo=waitapprove\");\r\n							}	\r\n						}\r\n						else\r\n						{\r\n							header(\"Location: /\".ADMIN_APP_DIR.\"/admin.php?\". $QueryURLString.\"&eid=\".$WorkFlowReturnArray[\'InsertedID\']);\r\n						}\r\n						die();\r\n		\r\n		  break;  //end admin add specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT:\r\n		  			\r\n						if ($ExtraGetParams[\'dialog\']==1)\r\n						{\r\n								if (isset($WorkFlowReturnArray[\'ApprovalID\']) )\r\n								{\r\n									if ($SuperAdminUser == true)\r\n									{\r\n											$smarty->assign(\'AwaitingApprovalRowID\',$WorkFlowReturnArray[\'EditedID\']);\r\n									}\r\n									\r\n									$smarty->assign(\'AwaitingApproval\',1);\r\n								}	\r\n								$smarty->display (ADMIN_APP_DIR.\'/closeDialog.html\');\r\n								die();\r\n						}\r\n						\r\n						if (isset($WorkFlowReturnArray[\'ApprovalID\']) )\r\n						{\r\n							if ($SuperAdminUser == true)\r\n							{\r\n								header(\"Location: /\".ADMIN_APP_DIR.\"/admin.php?\". $QueryURLString.\"&apinfo=approve&eid=\".$WorkFlowReturnArray[\'EditedID\']);\r\n							}\r\n							else\r\n							{\r\n								header(\"Location: /\".ADMIN_APP_DIR.\"/admin.php?\". $QueryURLString.\"&apinfo=waitapprove&eid=\".$ExtraGetParams[\'eid\']);\r\n							}	\r\n						}\r\n						else\r\n						{\r\n							header(\"Location: /\".ADMIN_APP_DIR.\"/admin.php?\". $QueryURLString.\"&eid=\".$EditID);\r\n						}	\r\n						die();\r\n		  \r\n		  \r\n		  break; //end admin edit specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE:\r\n		  \r\n		  				if ($ExtraGetParams[\'dialog\']==1)\r\n						{\r\n								$smarty->display (ADMIN_APP_DIR.\'/closeDialog.html\');\r\n								die();\r\n						}\r\n						\r\n						if ($SuperAdminUser == true && isset($WorkFlowReturnArray[\'ApprovalID\']))\r\n						{\r\n							header(\"Location: /\".ADMIN_APP_DIR.\"/admin.php?\". $QueryURLString.\"&eid=\".$ExtraGetParams[\'did\']);\r\n						}\r\n						else\r\n						{\r\n							header(\"Location: /\".ADMIN_APP_DIR.\"/admin.php?\". $QueryURLString);\r\n						}\r\n						die();\r\n		  \r\n		  break;  //end admin delete specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD:\r\n		\r\n					\r\n					$RedirectActive		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 3)];\r\n					$RedirectURL 		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 4)];\r\n					$RedirectHTTPS		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 5)];\r\n						\r\n					\r\n					if ($RedirectActive == \'on\')		\r\n					{\r\n							$pos = strpos($RedirectURL, \'http\');\r\n							\r\n							if ($pos == false)\r\n							{\r\n									\r\n									$tmpUrl = $smarty->fetch(\'string:\'. $RedirectURL);\r\n									if ($RedirectHTTPS == \'on\')\r\n									{\r\n											$urlTo = \'https://\' . $_SERVER[\'HTTP_HOST\']. $tmpUrl;\r\n									}\r\n									else\r\n									{\r\n											$urlTo = \'http://\' . $_SERVER[\'HTTP_HOST\']. $tmpUrl;\r\n									}\r\n							}\r\n							else\r\n							{\r\n									$urlTo = $RedirectURL;\r\n							}\r\n							\r\n							header(\'Location: \'. $urlTo);\r\n							die();\r\n					}		\r\n		\r\n		  break;  //end front end add specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT:\r\n		  		\r\n				\r\n					$RedirectActive		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 3)];\r\n					$RedirectURL 		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 4)];\r\n					$RedirectHTTPS		= $WorkFlow[\'WorkflowSetting\'][$this->_getCollectionFieldName($WFlowCollection, 5)];\r\n					\r\n					\r\n					\r\n					if ($RedirectActive == \'on\')		\r\n					{\r\n							$pos = strpos($RedirectURL, \'http\');\r\n							\r\n							if ($pos == false)\r\n							{\r\n									\r\n									$tmpUrl = $smarty->fetch(\'string:\'. $RedirectURL);\r\n									if ($RedirectHTTPS == \'on\')\r\n									{\r\n											$urlTo = \'https://\' . $_SERVER[\'HTTP_HOST\']. $tmpUrl;\r\n									}\r\n									else\r\n									{\r\n											$urlTo = \'http://\' . $_SERVER[\'HTTP_HOST\']. $tmpUrl;\r\n									}\r\n							}\r\n							else\r\n							{\r\n									$urlTo = $RedirectURL;\r\n							}\r\n							header(\'Location: \'. $urlTo);\r\n							die();\r\n					}		\r\n		  \r\n		  \r\n		  break; //end front end edit specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE:\r\n		  \r\n		  \r\n		  \r\n		  break;   //end front end delete specific code\r\n		default:\r\n		  \r\n		  // we will not run any code here\r\n		  \r\n		} \r\n\r\n\r\n\r\n} //end workflow for redirecting','{{capture name=jsWorkflowCode assign=tmpJS}}		\r\n\r\n{{/capture}}\r\n{{assign var=JavascriptJQueryCode value=$JavascriptJQueryCode|concat:\" \"|concat:$tmpJS}} \r\n\r\n{{if $smarty.post.save eq \'save\'}}\r\n\r\n{{else}}\r\n\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=98 ColumnID=1 Value=$CollectionID Collection_98_2=4 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_98_3 eq \'on\'}}{{assign var=wFlowRedirectAddFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowRedirectAddFrontEndActive value=\'\'}}{{/if}}\r\n	{{if $Tmp.Collection_98_5 eq \'on\'}}{{assign var=wFlowRedirectAddFrontEndHTTPS value=\'checked\'}}{{else}}{{assign var=wFlowRedirectAddFrontEndHTTPS value=\'\'}}{{/if}}\r\n	{{assign var=wFlowRedirectAddFrontEndURL value=$Tmp.Collection_98_4}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=98 ColumnID=1 Value=$CollectionID Collection_98_2=5 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_98_3 eq \'on\'}}{{assign var=wFlowRedirectEditFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowRedirectEditFrontEndActive value=\'\'}}{{/if}}\r\n	{{if $Tmp.Collection_98_5 eq \'on\'}}{{assign var=wFlowRedirectEditFrontEndHTTPS value=\'checked\'}}{{else}}{{assign var=wFlowRedirectEditFrontEndHTTPS value=\'\'}}{{/if}}\r\n	{{assign var=wFlowRedirectEditFrontEndURL value=$Tmp.Collection_98_4}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=98 ColumnID=1 Value=$CollectionID Collection_98_2=6 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_98_3 eq \'on\'}}{{assign var=wFlowRedirectDeleteFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowRedirectDeleteFrontEndActive value=\'\'}}{{/if}}\r\n	{{if $Tmp.Collection_98_5 eq \'on\'}}{{assign var=wFlowRedirectDeleteFrontEndHTTPS value=\'checked\'}}{{else}}{{assign var=wFlowRedirectDeleteFrontEndHTTPS value=\'\'}}{{/if}}\r\n	{{assign var=wFlowRedirectDeleteFrontEndURL value=$Tmp.Collection_98_4}}\r\n\r\n{{/if}}\r\n\r\n<h3>Redirect on Add</h3>\r\n\r\n<p><input type=\"checkbox\" name=\"wFlowRedirectAddFrontEndActive\" {{$wFlowRedirectAddFrontEndActive}} /> Activate redirecting</p>\r\n<p><input type=\"checkbox\" name=\"wFlowRedirectAddFrontEndHTTPS\" {{$wFlowRedirectAddFrontEndHTTPS}} /> Activate redirecting to <strong>https</strong></p>\r\n<p>Url to redirect <input type=\"text\" class=\"input\" name=\"wFlowRedirectAddFrontEndURL\" value=\"{{$wFlowRedirectAddFrontEndURL|addslashes}}\" size=\"40\"/></p>\r\n\r\n<h3>Redirect on Edit</h3>\r\n\r\n<p><input type=\"checkbox\" name=\"wFlowRedirectEditFrontEndActive\" {{$wFlowRedirectEditFrontEndActive}} /> Activate redirecting</p>\r\n<p><input type=\"checkbox\" name=\"wFlowRedirectEditFrontEndHTTPS\" {{$wFlowRedirectEditFrontEndHTTPS}} /> Activate redirecting to <strong>https</strong></p>\r\n<p>Url to redirect <input type=\"text\" class=\"input\" name=\"wFlowRedirectEditFrontEndURL\" value=\"{{$wFlowRedirectEditFrontEndURL|addslashes}}\" size=\"40\"/></p>\r\n\r\n<h3>Redirect on Delete</h3>\r\n\r\n<p><input type=\"checkbox\" name=\"wFlowRedirectDeleteFrontEndActive\" {{$wFlowRedirectDeleteFrontEndActive}} /> Activate redirecting</p>\r\n<p><input type=\"checkbox\" name=\"wFlowRedirectDeleteFrontEndHTTPS\" {{$wFlowRedirectDeleteFrontEndHTTPS}} /> Activate redirecting to <strong>https</strong></p>\r\n<p>Url to redirect <input type=\"text\" class=\"input\" name=\"wFlowRedirectDeleteFrontEndURL\" value=\"{{$wFlowRedirectDeleteFrontEndURL|addslashes}}\" size=\"40\"/></p>\r\n','//save workflow for redirecting\r\n$WCollectionID 				= $WorkFlowData[\'WFlowCollection\'];\r\n$WCollectionTable 			= $this -> _getCollectionTableName($WCollectionID);\r\n$WCollectionFieldName 		= $this->_getCollectionFieldName($WCollectionID, 1);\r\n$WCollectionFieldNameApply 	= $this->_getCollectionFieldName($WCollectionID, 2);\r\n\r\n$ApplyIn = array();\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD] 		= \'wFlowRedirectAddFrontEndActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT] 		= \'wFlowRedirectEditFrontEndActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE] 		= \'wFlowRedirectDeleteFrontEndActive\';\r\n\r\n$ApplyInHTTPS = array();\r\n$ApplyInHTTPS[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD] 		= \'wFlowRedirectAddFrontEndHTTPS\';\r\n$ApplyInHTTPS[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT] 		= \'wFlowRedirectEditFrontEndHTTPS\';\r\n$ApplyInHTTPS[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE] 	= \'wFlowRedirectDeleteFrontEndHTTPS\';\r\n\r\n$ApplyInURL = array();\r\n$ApplyInURL[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD] 		= \'wFlowRedirectAddFrontEndURL\';\r\n$ApplyInURL[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT] 	= \'wFlowRedirectEditFrontEndURL\';\r\n$ApplyInURL[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE] 	= \'wFlowRedirectDeleteFrontEndURL\';\r\n\r\n\r\nforeach ($ApplyIn as $ApplyKey => $ApplyValue)\r\n{\r\n\r\n$q = \"SELECT * FROM \". $WCollectionTable. \" WHERE \" . $WCollectionFieldName . \" = \" . $CollectionID . \" AND \" . $WCollectionFieldNameApply . \" = \" . $ApplyKey;\r\n$res = $db->query($q);\r\n\r\nif ($res->numRows() == 0)\r\n{\r\n		$addArray = array();\r\n		$addArray[$WCollectionFieldName] = $CollectionID;\r\n		$addArray[$WCollectionFieldNameApply] = $ApplyKey;\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 4)] = $Data[$ApplyInURL[$ApplyKey]];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 5)] = $Data[$ApplyInHTTPS[$ApplyKey]];\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_INSERT);\r\n}\r\nelse\r\n{\r\n		$row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);\r\n		$addArray = array();\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 4)] = $Data[$ApplyInURL[$ApplyKey]];\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 5)] = $Data[$ApplyInHTTPS[$ApplyKey]];\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_UPDATE, \' \'.$this->_getCollectionFieldName($WCollectionID, \'ID\').\' = \' . $row[$this->_getCollectionFieldName($WCollectionID, \'ID\')]);\r\n}\r\n\r\n}//end foreach'),(7,'Audit',104,3,'on','Collection actions will be recorded when this workflow is active.','//workflow for audit\r\n\r\n//we will only run audit if there are no errors\r\n\r\nif (count($WorkFlowReturnArray[\'Errors\']) == 0 && count ($WorkFlowReturnArray[\'RuleErrors\']) == 0)\r\n{\r\n		\r\n		$columnValues = array();\r\n		$CollectionIDFieldName		= $this->_getCollectionFieldName(105, 1);\r\n		$UserIDFieldName			= $this->_getCollectionFieldName(105, 2);\r\n		$RowIDFieldName				= $this->_getCollectionFieldName(105, 3);\r\n		$ActionFieldName			= $this->_getCollectionFieldName(105, 4);\r\n		$TimeFieldName				= $this->_getCollectionFieldName(105, 5);\r\n		\r\n		$columnValues[$CollectionIDFieldName] = $CollectionID;\r\n		$columnValues[$UserIDFieldName] = $UserID;\r\n		\r\n		$columnValues[$ActionFieldName] = $ApplyFor;\r\n		$columnValues[$TimeFieldName] = date(time());\r\n		\r\n		switch ($ApplyFor)\r\n		{\r\n		case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD:\r\n					\r\n					$columnValues[$RowIDFieldName] = $WorkFlowReturnArray[\'InsertedID\'];\r\n		\r\n		\r\n		  break;  //end admin add specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT:\r\n		  \r\n		  			$columnValues[$RowIDFieldName] = $WorkFlowReturnArray[\'EditedID\'];\r\n		  \r\n		  break; //end admin edit specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE:\r\n		  \r\n		  			$columnValues[$RowIDFieldName] = $DeleteID;\r\n		  \r\n		  break;  //end admin delete specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD:\r\n		\r\n					$columnValues[$RowIDFieldName] = $WorkFlowReturnArray[\'InsertedID\'];\r\n		\r\n		  break;  //end front end add specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT:\r\n		  \r\n		  			$columnValues[$RowIDFieldName] = $WorkFlowReturnArray[\'EditedID\'];\r\n		  \r\n		  break; //end front end edit specific code\r\n		case COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE:\r\n		  \r\n		  			$columnValues[$RowIDFieldName] = $DeleteID;\r\n		  \r\n		  break;   //end front end delete specific code\r\n		default:\r\n		  \r\n		  // we will not run any code here\r\n		  \r\n		} \r\n\r\n		$auditrow = $this->insertCollectionRow_(105, $columnValues , \'\' , \'\');\r\n		\r\n		$WorkFlowReturnArray[\'AuditInsertedID\'] = $auditrow;\r\n		\r\n		\r\n\r\n} //end workflow for audit','{{if $smarty.post.save eq \'save\'}}\r\n\r\n{{else}}\r\n\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=104 ColumnID=1 Value=$CollectionID Collection_104_2=1 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_104_3 eq \'on\'}}{{assign var=wFlowAuditAddAdminActive value=\'checked\'}}{{else}}{{assign var=wFlowAuditAddAdminActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=104 ColumnID=1 Value=$CollectionID Collection_104_2=2 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_104_3 eq \'on\'}}{{assign var=wFlowAuditEditAdminActive value=\'checked\'}}{{else}}{{assign var=wFlowAuditEditAdminActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=104 ColumnID=1 Value=$CollectionID Collection_104_2=3 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_104_3 eq \'on\'}}{{assign var=wFlowAuditDeleteAdminActive value=\'checked\'}}{{else}}{{assign var=wFlowAuditDeleteAdminActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=104 ColumnID=1 Value=$CollectionID Collection_104_2=4 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_104_3 eq \'on\'}}{{assign var=wFlowAuditAddFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowAuditAddFrontEndActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=104 ColumnID=1 Value=$CollectionID Collection_104_2=5 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_104_3 eq \'on\'}}{{assign var=wFlowAuditEditFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowAuditEditFrontEndActive value=\'\'}}{{/if}}\r\n	\r\n	{{getCollectionByCategory OrderColumn=1 CollectionID=104 ColumnID=1 Value=$CollectionID Collection_104_2=6 var=TmpVars}}{{assign var=Tmp value=$TmpVars[0]}}\r\n	{{if $Tmp.Collection_104_3 eq \'on\'}}{{assign var=wFlowAuditDeleteFrontEndActive value=\'checked\'}}{{else}}{{assign var=wFlowAuditDeleteFrontEndActive value=\'\'}}{{/if}}\r\n\r\n{{/if}}\r\n\r\n<h3>Front End</h3>\r\n<p><input type=\"checkbox\" name=\"wFlowAuditAddFrontEndActive\" {{$wFlowAuditAddFrontEndActive}} /> Action will be recorded when a collection row is <em>added</em> using the front end of the site</p>\r\n<p><input type=\"checkbox\" name=\"wFlowAuditEditFrontEndActive\" {{$wFlowAuditEditFrontEndActive}} /> Action will be recorded when a collection row is <em>edited</em> using the front end of the site</p>\r\n<p><input type=\"checkbox\" name=\"wFlowAuditDeleteFrontEndActive\" {{$wFlowAuditDeleteFrontEndActive}} /> Action will be recorded when a collection row is <em>deleted</em> using the front end of the site</p>\r\n\r\n\r\n<h3>Administrator Area</h3>\r\n<p><input type=\"checkbox\" name=\"wFlowAuditAddAdminActive\" {{$wFlowAuditAddAdminActive}} /> Action will be recorded when a collection row is <em>added</em> in admin</p>\r\n<p><input type=\"checkbox\" name=\"wFlowAuditEditAdminActive\" {{$wFlowAuditEditAdminActive}} /> Action will be recorded when a collection row is <em>edited</em> in admin</p>\r\n<p><input type=\"checkbox\" name=\"wFlowAuditDeleteAdminActive\" {{$wFlowAuditDeleteAdminActive}} /> Action will be recorded when a collection row is <em>deleted</em> in admin</p>\r\n','//save workflow for behaviours\r\n$WCollectionID 				= $WorkFlowData[\'WFlowCollection\'];\r\n$WCollectionTable 			= $this -> _getCollectionTableName($WCollectionID);\r\n$WCollectionFieldName 		= $this->_getCollectionFieldName($WCollectionID, 1);\r\n$WCollectionFieldNameApply 	= $this->_getCollectionFieldName($WCollectionID, 2);\r\n\r\n$ApplyIn = array();\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_ADD] 			= \'wFlowAuditAddAdminActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_EDIT] 			= \'wFlowAuditEditAdminActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_ADMIN_DELETE] 		= \'wFlowAuditDeleteAdminActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_ADD] 		= \'wFlowAuditAddFrontEndActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_EDIT] 		= \'wFlowAuditEditFrontEndActive\';\r\n$ApplyIn[COLLECTION_WORKFLOW_APPLY_IN_FRONTEND_DELETE] 		= \'wFlowAuditDeleteFrontEndActive\';\r\n\r\nforeach ($ApplyIn as $ApplyKey => $ApplyValue)\r\n{\r\n\r\n$q = \"SELECT * FROM \". $WCollectionTable. \" WHERE \" . $WCollectionFieldName . \" = \" . $CollectionID . \" AND \" . $WCollectionFieldNameApply . \" = \" . $ApplyKey;\r\n$res = $db->query($q);\r\n\r\nif ($res->numRows() == 0)\r\n{\r\n		$addArray = array();\r\n		$addArray[$WCollectionFieldName] = $CollectionID;\r\n		$addArray[$WCollectionFieldNameApply] = $ApplyKey;\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_INSERT);\r\n}\r\nelse\r\n{\r\n		$row = $res->fetchRow(MDB2_FETCHMODE_ASSOC);\r\n		$addArray = array();\r\n		$addArray[$this->_getCollectionFieldName($WCollectionID, 3)] = $Data[$ApplyValue];\r\n		$db->extended->autoExecute($WCollectionTable, $addArray, MDB2_AUTOQUERY_UPDATE, \' \'.$this->_getCollectionFieldName($WCollectionID, \'ID\').\' = \' . $row[$this->_getCollectionFieldName($WCollectionID, \'ID\')]);\r\n}\r\n\r\n}//end foreach');

--
-- Table structure for table `Collection_96`
--

CREATE TABLE `Collection_96` (
  `Collection_96_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Collection_96_1` int(11) NOT NULL,
  `Collection_96_2` int(11) NOT NULL,
  `Collection_96_3` varchar(254) DEFAULT NULL,
  `Collection_96_4` varchar(254) DEFAULT NULL,
  PRIMARY KEY (`Collection_96_ID`)
) ENGINE=MyISAM AUTO_INCREMENT=604 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `Collection_96`
--

INSERT INTO `Collection_96` VALUES (4,1,1,'on','on'),(5,1,2,'on','on'),(6,1,3,'on','on'),(7,2,1,'on','on'),(8,2,2,'on','on'),(9,2,3,'on','on'),(10,3,1,'on','on'),(11,3,2,'on','on'),(12,3,3,'on','on'),(13,4,1,'on','on'),(14,4,2,'on','on'),(15,4,3,'on','on'),(16,5,1,'on','on'),(17,5,2,'on','on'),(18,5,3,'on','on'),(19,6,1,'on','on'),(20,6,2,'on','on'),(21,6,3,'on','on'),(22,7,1,'on','on'),(23,7,2,'on','on'),(24,7,3,'on','on'),(25,8,1,'on','on'),(26,8,2,'on','on'),(27,8,3,'on','on'),(28,9,1,'on','on'),(29,9,2,'on','on'),(30,9,3,'on','on'),(31,10,1,'on','on'),(32,10,2,'on','on'),(33,10,3,'on','on'),(34,11,1,'on','on'),(35,11,2,'on','on'),(36,11,3,'on','on'),(37,12,1,'on','on'),(38,12,2,'on','on'),(39,12,3,'on','on'),(40,13,1,'on','on'),(41,13,2,'on','on'),(42,13,3,'on','on'),(43,14,1,'on','on'),(44,14,2,'on','on'),(45,14,3,'on','on'),(46,15,1,'on','on'),(47,15,2,'on','on'),(48,15,3,'on','on'),(49,16,1,'on','on'),(50,16,2,'on','on'),(51,16,3,'on','on'),(52,17,1,'on','on'),(53,17,2,'on','on'),(54,17,3,'on','on'),(55,18,1,'on','on'),(56,18,2,'on','on'),(57,18,3,'on','on'),(58,19,1,'on','on'),(59,19,2,'on','on'),(60,19,3,'on','on'),(61,20,1,'on','on'),(62,20,2,'on','on'),(63,20,3,'on','on'),(64,21,1,'on','on'),(65,21,2,'on','on'),(66,21,3,'on','on'),(67,22,1,'on','on'),(68,22,2,'on','on'),(69,22,3,'on','on'),(70,23,1,'on','on'),(71,23,2,'on','on'),(72,23,3,'on','on'),(73,24,1,'on','on'),(74,24,2,'on','on'),(75,24,3,'on','on'),(76,25,1,'on','on'),(77,25,2,'on','on'),(78,25,3,'on','on'),(79,26,1,'on','on'),(80,26,2,'on','on'),(81,26,3,'on','on'),(91,30,1,'on','on'),(92,30,2,'on','on'),(93,30,3,'on','on'),(94,31,1,'on','on'),(95,31,2,'on','on'),(96,31,3,'on','on'),(97,32,1,'on','on'),(98,32,2,'on','on'),(99,32,3,'on','on'),(100,38,1,'on','on'),(101,38,2,'on','on'),(102,38,3,'on','on'),(103,38,1,'on','on'),(104,39,2,'on','on'),(105,39,3,'on','on'),(106,50,1,'on','on'),(107,50,2,'on','on'),(108,50,3,'on','on'),(109,60,1,'on','on'),(110,60,2,'on','on'),(111,60,3,'on','on'),(112,61,1,'on','on'),(113,61,2,'on','on'),(114,61,3,'on','on'),(115,62,1,'on','on'),(116,62,2,'on','on'),(117,62,3,'on','on'),(118,60,1,'on','on'),(119,80,2,'on','on'),(120,80,3,'on','on'),(121,60,1,'on','on'),(122,81,2,'on','on'),(123,81,3,'on','on'),(124,60,1,'on','on'),(125,89,2,'on','on'),(126,89,3,'on','on'),(127,90,1,'on','on'),(128,90,2,'on','on'),(129,90,3,'on','on'),(130,91,1,'on','on'),(131,91,2,'on','on'),(132,91,3,'on','on'),(133,92,1,'on','on'),(134,92,2,'on','on'),(135,92,3,'on','on'),(136,93,1,'on','on'),(137,93,2,'on','on'),(138,93,3,'on','on'),(139,94,1,'on','on'),(140,94,2,'on','on'),(141,94,3,'on','on'),(142,95,1,'on','on'),(143,95,2,'on','on'),(144,95,3,'on','on'),(145,96,1,'on','on'),(146,96,2,'on','on'),(147,96,3,'on','on'),(148,97,1,'on','on'),(149,97,2,'on','on'),(150,97,3,'on','on'),(151,98,1,'on','on'),(152,98,2,'on','on'),(153,98,3,'on','on'),(154,99,1,'on','on'),(155,99,2,'on','on'),(156,99,3,'on','on'),(157,100,1,'on','on'),(158,100,2,'on','on'),(159,100,3,'on','on'),(160,101,1,'on','on'),(161,101,2,'on','on'),(162,101,3,'on','on'),(163,102,1,'on','on'),(164,102,2,'on','on'),(165,102,3,'on','on'),(166,103,1,'on','on'),(167,103,2,'on','on'),(168,103,3,'on','on'),(169,129,1,'on','on'),(170,129,2,'on','on'),(171,129,3,'on','on'),(172,130,1,'on','on'),(173,130,2,'on','on'),(174,130,3,'on','on'),(175,131,1,'on','on'),(176,131,2,'on','on'),(177,131,3,'on','on'),(178,132,1,'on','on'),(179,132,2,'on','on'),(180,132,3,'on','on'),(181,133,1,'on','on'),(182,133,2,'on','on'),(183,133,3,'on','on'),(184,134,1,'on','on'),(185,134,2,'on','on'),(186,134,3,'on','on'),(187,135,1,'on','on'),(188,135,2,'on','on'),(189,135,3,'on','on'),(190,136,1,'on','on'),(191,136,2,'on','on'),(192,136,3,'on','on'),(193,137,1,'on','on'),(194,137,2,'on','on'),(195,137,3,'on','on'),(196,138,1,'on','on'),(197,138,2,'on','on'),(198,138,3,'on','on'),(199,139,1,'on','on'),(200,139,2,'on','on'),(201,139,3,'on','on'),(202,140,1,'on','on'),(203,140,2,'on','on'),(204,140,3,'on','on'),(205,141,1,'on','on'),(206,141,2,'on','on'),(207,141,3,'on','on'),(208,142,1,'on','on'),(209,142,2,'on','on'),(210,142,3,'on','on'),(211,143,1,'on','on'),(212,143,2,'on','on'),(213,143,3,'on','on'),(214,144,1,'on','on'),(215,144,2,'on','on'),(216,144,3,'on','on'),(217,146,1,'on','on'),(218,146,2,'on','on'),(219,146,3,'on','on'),(220,147,1,'on','on'),(221,147,2,'on','on'),(222,147,3,'on','on'),(223,148,1,'on','on'),(224,148,2,'on','on'),(225,148,3,'on','on'),(226,149,1,'on','on'),(227,149,2,'on','on'),(228,149,3,'on','on'),(229,150,1,'on','on'),(230,150,2,'on','on'),(231,150,3,'on','on'),(232,151,1,'on','on'),(233,151,2,'on','on'),(234,151,3,'on','on'),(235,152,1,'on','on'),(236,142,2,'on','on'),(237,152,3,'on','on'),(238,153,1,'on','on'),(239,143,2,'on','on'),(240,153,3,'on','on'),(241,154,1,'on','on'),(242,144,2,'on','on'),(243,154,3,'on','on'),(244,159,1,'on','on'),(245,149,2,'on','on'),(246,159,3,'on','on'),(247,160,1,'on','on'),(248,160,2,'on','on'),(249,160,3,'on','on'),(253,162,1,'on','on'),(254,162,2,'on','on'),(255,162,3,'on','on'),(256,163,1,'on','on'),(257,163,2,'on','on'),(258,163,3,'on','on'),(259,236,1,'on','on'),(260,236,2,'on','on'),(261,236,3,'on','on'),(262,237,1,'on','on'),(263,237,2,'on','on'),(264,237,3,'on','on'),(265,238,1,'on','on'),(266,238,2,'on','on'),(267,238,3,'on','on'),(268,239,1,'on','on'),(269,239,2,'on','on'),(270,239,3,'on','on'),(271,240,1,'on','on'),(272,240,2,'on','on'),(273,240,3,'on','on'),(274,241,1,'on','on'),(275,241,2,'on','on'),(276,241,3,'on','on'),(277,273,1,'on','on'),(278,273,2,'on','on'),(279,273,3,'on','on'),(280,274,1,'on','on'),(281,274,2,'on','on'),(282,274,3,'on','on'),(283,275,1,'on','on'),(284,275,2,'on','on'),(285,275,3,'on','on'),(286,276,1,'on','on'),(287,276,2,'on','on'),(288,276,3,'on','on'),(295,303,1,'on','on'),(296,303,2,'on','on'),(297,303,3,'on','on'),(298,304,1,'on','on'),(299,304,2,'on','on'),(300,304,3,'on','on'),(307,324,3,'on','on'),(306,324,2,'on','on'),(305,324,1,'on','on'),(311,32,4,'on','on'),(312,32,5,NULL,NULL),(313,32,6,NULL,NULL),(314,129,4,NULL,NULL),(315,129,5,NULL,NULL),(316,129,6,NULL,NULL),(317,13,4,NULL,NULL),(318,13,5,NULL,NULL),(319,13,6,NULL,NULL),(320,17,4,NULL,NULL),(321,17,5,NULL,NULL),(322,17,6,NULL,NULL),(323,325,1,'on','on'),(324,325,2,'on','on'),(325,325,3,'on','on'),(326,326,1,'on','on'),(327,326,2,'on','on'),(328,326,3,'on','on'),(329,276,4,NULL,NULL),(330,276,5,NULL,NULL),(331,276,6,NULL,NULL),(332,80,1,'on','on'),(333,80,4,NULL,NULL),(334,80,5,NULL,NULL),(335,80,6,NULL,NULL),(336,81,1,'on','on'),(337,81,4,NULL,NULL),(338,81,5,NULL,NULL),(339,81,6,NULL,NULL),(340,236,4,NULL,NULL),(341,236,5,NULL,NULL),(342,236,6,NULL,NULL),(343,274,4,NULL,NULL),(344,274,5,NULL,NULL),(345,274,6,NULL,NULL),(346,327,1,'on','on'),(347,327,2,'on','on'),(348,327,3,'on','on'),(394,342,1,'on','on'),(393,341,3,'on','on'),(387,339,3,'on','on'),(386,339,2,'on','on'),(385,339,1,'on','on'),(392,341,2,'on','on'),(391,341,1,'on','on'),(402,138,6,NULL,NULL),(401,138,5,'on','on'),(404,139,5,'on','on'),(403,139,4,'on','on'),(400,138,4,'on','on'),(399,159,3,'on','on'),(398,159,2,'on','on'),(397,159,1,'on','on'),(396,342,3,'on','on'),(395,342,2,'on','on'),(406,141,4,'on','on'),(405,139,6,NULL,NULL),(408,141,6,NULL,NULL),(407,141,5,'on','on'),(412,150,4,'on','on'),(411,149,6,NULL,NULL),(410,149,5,'on','on'),(409,149,4,'on','on'),(413,150,5,'on','on'),(414,150,6,NULL,NULL),(471,62,6,NULL,NULL),(469,62,4,NULL,NULL),(470,62,5,NULL,NULL),(513,390,3,'on','on'),(512,390,2,'on','on'),(511,390,1,'on','on'),(484,381,1,'on','on'),(485,381,2,'on','on'),(486,381,3,'on','on'),(490,383,1,'on','on'),(491,383,2,'on','on'),(492,383,3,'on','on'),(519,392,3,'on','on'),(518,392,2,'on','on'),(517,392,1,'on','on'),(510,389,3,'on','on'),(509,389,2,'on','on'),(508,389,1,'on','on'),(520,1,4,'on','on'),(521,1,5,'on','on'),(522,1,6,NULL,NULL),(523,393,1,'on','on'),(524,393,2,'on','on'),(525,393,3,'on','on'),(526,394,1,'on','on'),(527,394,2,'on','on'),(528,394,3,'on','on'),(529,395,1,'on','on'),(530,395,2,'on','on'),(531,395,3,'on','on'),(532,396,1,'on','on'),(533,396,2,'on','on'),(534,396,3,'on','on'),(535,397,1,'on','on'),(536,397,2,'on','on'),(537,397,3,'on','on'),(538,398,1,'on','on'),(539,398,2,'on','on'),(540,398,3,'on','on'),(541,23,4,NULL,NULL),(542,23,5,NULL,NULL),(543,23,6,NULL,NULL),(544,399,1,'on','on'),(545,399,2,'on','on'),(546,399,3,'on','on'),(547,400,1,'on','on'),(548,400,2,'on','on'),(549,400,3,'on','on'),(550,401,1,'on','on'),(551,401,2,'on','on'),(552,401,3,'on','on'),(558,403,3,'on','on'),(557,403,2,'on','on'),(556,403,1,'on','on'),(559,404,1,'on','on'),(560,404,2,'on','on'),(561,404,3,'on','on'),(562,405,1,'on','on'),(563,405,2,'on','on'),(564,405,3,'on','on'),(571,408,1,'on','on'),(572,408,2,'on','on'),(573,408,3,'on','on'),(574,409,1,'on','on'),(575,409,2,'on','on'),(576,409,3,'on','on'),(577,410,1,'on','on'),(578,410,2,'on','on'),(579,410,3,'on','on'),(580,411,1,'on','on'),(581,411,2,'on','on'),(582,411,3,'on','on'),(583,412,1,'on','on'),(584,412,2,'on','on'),(585,412,3,'on','on'),(586,413,1,'on','on'),(587,413,2,'on','on'),(588,413,3,'on','on'),(589,414,1,'on','on'),(590,414,2,'on','on'),(591,414,3,'on','on'),(592,415,1,'on','on'),(593,415,2,'on','on'),(594,415,3,'on','on'),(595,416,1,'on','on'),(596,416,2,'on','on'),(597,416,3,'on','on'),(598,417,1,'on','on'),(599,417,2,'on','on'),(600,417,3,'on','on'),(601,417,4,'on','on'),(602,417,5,NULL,NULL),(603,417,6,NULL,NULL);

--
-- Table structure for table `Collection_97`
--

CREATE TABLE `Collection_97` (
  `Collection_97_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Collection_97_1` int(11) NOT NULL,
  `Collection_97_2` int(11) NOT NULL,
  `Collection_97_3` varchar(254) DEFAULT NULL,
  `Collection_97_4` varchar(254) NOT NULL,
  `Collection_97_5` varchar(254) NOT NULL,
  `Collection_97_6` varchar(254) NOT NULL,
  `Collection_97_7` varchar(254) NOT NULL,
  `Collection_97_8` varchar(254) DEFAULT NULL,
  `Collection_97_9` varchar(254) NOT NULL,
  `Collection_97_10` int(11) NOT NULL,
  `Collection_97_11` varchar(254) DEFAULT NULL,
  PRIMARY KEY (`Collection_97_ID`)
) ENGINE=MyISAM AUTO_INCREMENT=23 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `Collection_97`
--

INSERT INTO `Collection_97` VALUES (19,62,4,NULL,'','','','','','',0,'on'),(2,32,4,'on','Dinescu Daniel','ddinescu@oxiem.com','Experience Site','contact@experience.oxiem.com','localhost','Contact Message',4,'on'),(3,129,4,NULL,'','','','','','',0,''),(4,13,4,NULL,'','','','','','',0,''),(5,17,4,NULL,'','','','','','',0,''),(6,276,4,NULL,'','','','','','',0,''),(7,80,4,NULL,'','','','','','',0,''),(8,81,4,NULL,'','','','','','',0,''),(9,236,4,NULL,'','','','','','',0,''),(10,274,4,NULL,'','','','','','',0,''),(12,138,4,NULL,'','','','','','',0,''),(13,139,4,NULL,'','','','','','',0,''),(14,141,4,NULL,'','','','','','',0,''),(15,149,4,NULL,'','','','','','',0,''),(16,150,4,NULL,'','','','','','',0,''),(20,1,4,NULL,'','','','','','',0,''),(21,23,4,NULL,'','','','','','',0,'on'),(22,417,4,'on','Dinescu Daniel','ddinescu@oxiem.com','Pureti Website','info@pureti.com','localhost','Request Info Message',4,'on');

--
-- Table structure for table `Collection_98`
--

CREATE TABLE `Collection_98` (
  `Collection_98_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Collection_98_1` int(11) NOT NULL,
  `Collection_98_2` int(11) NOT NULL,
  `Collection_98_3` varchar(254) DEFAULT NULL,
  `Collection_98_4` varchar(254) DEFAULT NULL,
  `Collection_98_5` varchar(254) DEFAULT NULL,
  PRIMARY KEY (`Collection_98_ID`)
) ENGINE=MyISAM AUTO_INCREMENT=597 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `Collection_98`
--

INSERT INTO `Collection_98` VALUES (1,1,1,'on','',''),(2,1,2,'on','',''),(3,1,3,'on','',''),(4,2,1,'on','',''),(5,2,2,'on','',''),(6,2,3,'on','',''),(7,3,1,'on','',''),(8,3,2,'on','',''),(9,3,3,'on','',''),(10,4,1,'on','',''),(11,4,2,'on','',''),(12,4,3,'on','',''),(13,5,1,'on','',''),(14,5,2,'on','',''),(15,5,3,'on','',''),(16,6,1,'on','',''),(17,6,2,'on','',''),(18,6,3,'on','',''),(19,7,1,'on','',''),(20,7,2,'on','',''),(21,7,3,'on','',''),(22,8,1,'on','',''),(23,8,2,'on','',''),(24,8,3,'on','',''),(25,9,1,'on','',''),(26,9,2,'on','',''),(27,9,3,'on','',''),(28,10,1,'on','',''),(29,10,2,'on','',''),(30,10,3,'on','',''),(31,11,1,'on','',''),(32,11,2,'on','',''),(33,11,3,'on','',''),(34,12,1,'on','',''),(35,12,2,'on','',''),(36,12,3,'on','',''),(37,13,1,'on','',''),(38,13,2,'on','',''),(39,13,3,'on','',''),(40,14,1,'on','',''),(41,14,2,'on','',''),(42,14,3,'on','',''),(43,15,1,'on','',''),(44,15,2,'on','',''),(45,15,3,'on','',''),(46,16,1,'on','',''),(47,16,2,'on','',''),(48,16,3,'on','',''),(49,17,1,'on','',''),(50,17,2,'on','',''),(51,17,3,'on','',''),(52,18,1,'on','',''),(53,18,2,'on','',''),(54,18,3,'on','',''),(55,19,1,'on','',''),(56,19,2,'on','',''),(57,19,3,'on','',''),(58,20,1,'on','',''),(59,20,2,'on','',''),(60,20,3,'on','',''),(61,21,1,'on','',''),(62,21,2,'on','',''),(63,21,3,'on','',''),(64,22,1,'on','',''),(65,22,2,'on','',''),(66,22,3,'on','',''),(67,23,1,'on','',''),(68,23,2,'on','',''),(69,23,3,'on','',''),(70,24,1,'on','',''),(71,24,2,'on','',''),(72,24,3,'on','',''),(73,25,1,'on','',''),(74,25,2,'on','',''),(75,25,3,'on','',''),(76,26,1,'on','',''),(77,26,2,'on','',''),(78,26,3,'on','',''),(88,30,1,'on','',''),(89,30,2,'on','',''),(90,30,3,'on','',''),(91,31,1,'on','',''),(92,31,2,'on','',''),(93,31,3,'on','',''),(94,32,1,'on','',''),(95,32,2,'on','',''),(96,32,3,'on','',''),(97,38,1,'on','',''),(98,38,2,'on','',''),(99,38,3,'on','',''),(100,38,1,'on','',''),(101,39,2,'on','',''),(102,39,3,'on','',''),(103,50,1,'on','',''),(104,50,2,'on','',''),(105,50,3,'on','',''),(106,60,1,'on','',''),(107,60,2,'on','',''),(108,60,3,'on','',''),(109,61,1,'on','',''),(110,61,2,'on','',''),(111,61,3,'on','',''),(112,62,1,'on','',''),(113,62,2,'on','',''),(114,62,3,'on','',''),(115,60,1,'on','',''),(116,80,2,'on','',''),(117,80,3,'on','',''),(118,60,1,'on','',''),(119,81,2,'on','',''),(120,81,3,'on','',''),(121,60,1,'on','',''),(122,89,2,'on','',''),(123,89,3,'on','',''),(124,90,1,'on','',''),(125,90,2,'on','',''),(126,90,3,'on','',''),(127,91,1,'on','',''),(128,91,2,'on','',''),(129,91,3,'on','',''),(130,92,1,'on','',''),(131,92,2,'on','',''),(132,92,3,'on','',''),(133,93,1,'on','',''),(134,93,2,'on','',''),(135,93,3,'on','',''),(136,94,1,'on','',''),(137,94,2,'on','',''),(138,94,3,'on','',''),(139,95,1,'on','',''),(140,95,2,'on','',''),(141,95,3,'on','',''),(142,96,1,'on','',''),(143,96,2,'on','',''),(144,96,3,'on','',''),(145,97,1,'on','',''),(146,97,2,'on','',''),(147,97,3,'on','',''),(148,98,1,'on','',''),(149,98,2,'on','',''),(150,98,3,'on','',''),(151,99,1,'on','',''),(152,99,2,'on','',''),(153,99,3,'on','',''),(154,100,1,'on','',''),(155,100,2,'on','',''),(156,100,3,'on','',''),(157,101,1,'on','',''),(158,101,2,'on','',''),(159,101,3,'on','',''),(160,102,1,'on','',''),(161,102,2,'on','',''),(162,102,3,'on','',''),(163,103,1,'on','',''),(164,103,2,'on','',''),(165,103,3,'on','',''),(166,129,1,'on','',''),(167,129,2,'on','',''),(168,129,3,'on','',''),(169,130,1,'on','',''),(170,130,2,'on','',''),(171,130,3,'on','',''),(172,131,1,'on','',''),(173,131,2,'on','',''),(174,131,3,'on','',''),(175,132,1,'on','',''),(176,132,2,'on','',''),(177,132,3,'on','',''),(178,133,1,'on','',''),(179,133,2,'on','',''),(180,133,3,'on','',''),(181,134,1,'on','',''),(182,134,2,'on','',''),(183,134,3,'on','',''),(184,135,1,'on','',''),(185,135,2,'on','',''),(186,135,3,'on','',''),(187,136,1,'on','',''),(188,136,2,'on','',''),(189,136,3,'on','',''),(190,137,1,'on','',''),(191,137,2,'on','',''),(192,137,3,'on','',''),(193,138,1,'on','',''),(194,138,2,'on','',''),(195,138,3,'on','',''),(196,139,1,'on','',''),(197,139,2,'on','',''),(198,139,3,'on','',''),(199,140,1,'on','',''),(200,140,2,'on','',''),(201,140,3,'on','',''),(202,141,1,'on','',''),(203,141,2,'on','',''),(204,141,3,'on','',''),(205,142,1,'on','',''),(206,142,2,'on','',''),(207,142,3,'on','',''),(208,143,1,'on','',''),(209,143,2,'on','',''),(210,143,3,'on','',''),(211,144,1,'on','',''),(212,144,2,'on','',''),(213,144,3,'on','',''),(214,146,1,'on','',''),(215,146,2,'on','',''),(216,146,3,'on','',''),(217,147,1,'on','',''),(218,147,2,'on','',''),(219,147,3,'on','',''),(220,148,1,'on','',''),(221,148,2,'on','',''),(222,148,3,'on','',''),(223,149,1,'on','',''),(224,149,2,'on','',''),(225,149,3,'on','',''),(226,150,1,'on','',''),(227,150,2,'on','',''),(228,150,3,'on','',''),(229,151,1,'on','',''),(230,151,2,'on','',''),(231,151,3,'on','',''),(232,152,1,'on','',''),(233,142,2,'on','',''),(234,152,3,'on','',''),(235,153,1,'on','',''),(236,143,2,'on','',''),(237,153,3,'on','',''),(238,154,1,'on','',''),(239,144,2,'on','',''),(240,154,3,'on','',''),(241,159,1,'on','',''),(242,149,2,'on','',''),(243,159,3,'on','',''),(244,160,1,'on','',''),(245,160,2,'on','',''),(246,160,3,'on','',''),(250,162,1,'on','',''),(251,162,2,'on','',''),(252,162,3,'on','',''),(253,163,1,'on','',''),(254,163,2,'on','',''),(255,163,3,'on','',''),(256,236,1,'on','',''),(257,236,2,'on','',''),(258,236,3,'on','',''),(259,237,1,'on','',''),(260,237,2,'on','',''),(261,237,3,'on','',''),(262,238,1,'on','',''),(263,238,2,'on','',''),(264,238,3,'on','',''),(265,239,1,'on','',''),(266,239,2,'on','',''),(267,239,3,'on','',''),(268,240,1,'on','',''),(269,240,2,'on','',''),(270,240,3,'on','',''),(271,241,1,'on','',''),(272,241,2,'on','',''),(273,241,3,'on','',''),(274,273,1,'on','',''),(275,273,2,'on','',''),(276,273,3,'on','',''),(277,274,1,'on','',''),(278,274,2,'on','',''),(279,274,3,'on','',''),(280,275,1,'on','',''),(281,275,2,'on','',''),(282,275,3,'on','',''),(283,276,1,'on','',''),(284,276,2,'on','',''),(285,276,3,'on','',''),(292,303,1,'on','',''),(293,303,2,'on','',''),(294,303,3,'on','',''),(295,304,1,'on','',''),(296,304,2,'on','',''),(297,304,3,'on','',''),(304,324,3,'on','',''),(303,324,2,'on','',''),(302,324,1,'on','',''),(308,32,4,'on','/contact-us-thank-you.html',NULL),(309,32,5,NULL,'',NULL),(310,32,6,NULL,'',NULL),(311,129,4,NULL,'',NULL),(312,129,5,NULL,'',NULL),(313,129,6,NULL,'',NULL),(314,13,4,NULL,'',NULL),(315,13,5,NULL,'',NULL),(316,13,6,NULL,'',NULL),(317,17,4,NULL,'',NULL),(318,17,5,NULL,'',NULL),(319,17,6,NULL,'',NULL),(320,325,1,'on','',''),(321,325,2,'on','',''),(322,325,3,'on','',''),(323,326,1,'on','',''),(324,326,2,'on','',''),(325,326,3,'on','',''),(326,276,4,NULL,'',NULL),(327,276,5,NULL,'',NULL),(328,276,6,NULL,'',NULL),(329,80,4,NULL,'',NULL),(330,80,5,NULL,'',NULL),(331,80,6,NULL,'',NULL),(332,81,4,NULL,'',NULL),(333,81,5,NULL,'',NULL),(334,81,6,NULL,'',NULL),(335,236,4,NULL,'',NULL),(336,236,5,NULL,'',NULL),(337,236,6,NULL,'',NULL),(338,274,4,NULL,'',NULL),(339,274,5,NULL,'',NULL),(340,274,6,NULL,'',NULL),(341,327,1,'on','',''),(342,327,2,'on','',''),(343,327,3,'on','',''),(389,342,1,'on','',''),(388,341,3,'on','',''),(382,339,3,'on','',''),(381,339,2,'on','',''),(380,339,1,'on','',''),(387,341,2,'on','',''),(386,341,1,'on','',''),(393,138,5,'on','/checkout/shipping-information.html',NULL),(395,139,4,'on','/checkout/payment-information.html',NULL),(394,138,6,NULL,'',NULL),(392,138,4,'on','/checkout/shipping-information.html',NULL),(391,342,3,'on','',''),(390,342,2,'on','',''),(396,139,5,'on','/checkout/payment-information.html',NULL),(397,139,6,NULL,'',NULL),(398,141,4,'on','/checkout/payment-check.html',NULL),(399,141,5,'on','/checkout/payment-check.html',NULL),(400,141,6,NULL,'',NULL),(401,149,4,'on','/checkout/payment-check.html',NULL),(402,149,5,'on','/checkout/payment-check.html',NULL),(403,149,6,NULL,'',NULL),(404,150,4,'on','/checkout/payment-check.html',NULL),(405,150,5,'on','/checkout/payment-check.html',NULL),(406,150,6,NULL,'',NULL),(463,62,6,NULL,'',NULL),(461,62,4,NULL,'',NULL),(462,62,5,NULL,'',NULL),(464,81,1,'on',NULL,NULL),(506,390,3,'on','',''),(505,390,2,'on','',''),(504,390,1,'on','',''),(477,381,1,'on','',''),(478,381,2,'on','',''),(479,381,3,'on','',''),(483,383,1,'on','',''),(484,383,2,'on','',''),(485,383,3,'on','',''),(512,392,3,'on','',''),(511,392,2,'on','',''),(510,392,1,'on','',''),(503,389,3,'on','',''),(502,389,2,'on','',''),(501,389,1,'on','',''),(513,1,4,'on','/register-done.html',NULL),(514,1,5,'on','/welcome.html',NULL),(515,1,6,NULL,'',NULL),(516,393,1,'on','',''),(517,393,2,'on','',''),(518,393,3,'on','',''),(519,394,1,'on','',''),(520,394,2,'on','',''),(521,394,3,'on','',''),(522,395,1,'on','',''),(523,395,2,'on','',''),(524,395,3,'on','',''),(525,396,1,'on','',''),(526,396,2,'on','',''),(527,396,3,'on','',''),(528,397,1,'on','',''),(529,397,2,'on','',''),(530,397,3,'on','',''),(531,398,1,'on','',''),(532,398,2,'on','',''),(533,398,3,'on','',''),(534,23,4,NULL,'',NULL),(535,23,5,NULL,'',NULL),(536,23,6,NULL,'',NULL),(537,399,1,'on','',''),(538,399,2,'on','',''),(539,399,3,'on','',''),(540,400,1,'on','',''),(541,400,2,'on','',''),(542,400,3,'on','',''),(543,401,1,'on','',''),(544,401,2,'on','',''),(545,401,3,'on','',''),(551,403,3,'on','',''),(550,403,2,'on','',''),(549,403,1,'on','',''),(552,404,1,'on','',''),(553,404,2,'on','',''),(554,404,3,'on','',''),(555,405,1,'on','',''),(556,405,2,'on','',''),(557,405,3,'on','',''),(564,408,1,'on','',''),(565,408,2,'on','',''),(566,408,3,'on','',''),(567,409,1,'on','',''),(568,409,2,'on','',''),(569,409,3,'on','',''),(570,410,1,'on','',''),(571,410,2,'on','',''),(572,410,3,'on','',''),(573,411,1,'on','',''),(574,411,2,'on','',''),(575,411,3,'on','',''),(576,412,1,'on','',''),(577,412,2,'on','',''),(578,412,3,'on','',''),(579,413,1,'on','',''),(580,413,2,'on','',''),(581,413,3,'on','',''),(582,414,1,'on','',''),(583,414,2,'on','',''),(584,414,3,'on','',''),(585,415,1,'on','',''),(586,415,2,'on','',''),(587,415,3,'on','',''),(588,416,1,'on','',''),(589,416,2,'on','',''),(590,416,3,'on','',''),(591,417,1,'on','',''),(592,417,2,'on','',''),(593,417,3,'on','',''),(594,417,4,'on','/request-info-thank-you.html',NULL),(595,417,5,NULL,'',NULL),(596,417,6,NULL,'',NULL);

--
-- Table structure for table `Collection_99`
--

CREATE TABLE `Collection_99` (
  `Collection_99_ID` int(11) NOT NULL AUTO_INCREMENT,
  `Collection_99_1` int(11) NOT NULL,
  `Collection_99_2` int(11) NOT NULL,
  `Collection_99_3` varchar(254) DEFAULT NULL,
  `Collection_99_4` varchar(254) NOT NULL,
  `Collection_99_5` varchar(254) NOT NULL,
  `Collection_99_6` varchar(254) NOT NULL,
  `Collection_99_7` varchar(254) NOT NULL,
  `Collection_99_8` text,
  `Collection_99_9` int(11) NOT NULL,
  `Collection_99_10` varchar(254) NOT NULL,
  PRIMARY KEY (`Collection_99_ID`)
) ENGINE=MyISAM AUTO_INCREMENT=133 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `Collection_99`
--

INSERT INTO `Collection_99` VALUES (114,62,6,NULL,'','','','','',0,''),(109,62,1,NULL,'','','','','',0,''),(110,62,2,NULL,'','','','','',0,''),(111,62,3,NULL,'','','','','',0,''),(112,62,4,NULL,'','','','','',0,''),(113,62,5,NULL,'','','','','',0,''),(7,129,1,NULL,'','','','','',0,''),(45,236,3,NULL,'ddinescu@oxiem.com','Oxiem CMS','info@oxiem.com','Event Approval Required','',441,'Dinescu Daniel'),(8,129,2,NULL,'','','','','',0,''),(44,236,2,NULL,'ddinescu@oxiem.com','Oxiem CMS','info@oxiem.com','Event Approval Required','',441,'Dinescu Daniel'),(9,129,3,NULL,'','','','','',0,''),(42,81,6,NULL,'','','','','',0,''),(43,236,1,NULL,'ddinescu@oxiem.com','Oxiem CMS','info@oxiem.com','Event Approval Required','',441,'Dinescu Daniel'),(10,129,4,NULL,'','','','','',0,''),(38,81,2,NULL,'','','','','',0,''),(39,81,3,NULL,'','','','','',0,''),(40,81,4,NULL,'','','','','',0,''),(41,81,5,NULL,'','','','','',0,''),(11,129,5,NULL,'','','','','',0,''),(34,80,4,NULL,'','','','','',0,''),(35,80,5,NULL,'','','','','',0,''),(36,80,6,NULL,'','','','','',0,''),(37,81,1,NULL,'','','','','',0,''),(12,129,6,NULL,'','','','','',0,''),(26,276,2,NULL,'','','','','',0,''),(27,276,3,NULL,'','','','','',0,''),(28,276,4,NULL,'','','','','',0,''),(29,276,5,NULL,'','','','','',0,''),(30,276,6,NULL,'','','','','',0,''),(31,80,1,NULL,'','','','','',0,''),(32,80,2,NULL,'','','','','',0,''),(33,80,3,NULL,'','','','','',0,''),(25,276,1,NULL,'','','','','',0,''),(13,13,1,NULL,'bsterzenbach@oxiem.com','Oxiem CMS','approval@oxiem.com','Content approval needed','',441,'Bill'),(14,13,2,NULL,'bsterzenbach@oxiem.com','Oxiem CMS','approval@oxiem.com','Content approval needed','',441,'Bill'),(15,13,3,NULL,'bsterzenbach@oxiem.com','Oxiem CMS','approval@oxiem.com','Content approval needed','',441,'Bill'),(16,13,4,NULL,'bsterzenbach@oxiem.com','Oxiem CMS','approval@oxiem.com','Content approval needed','',441,'Bill'),(17,13,5,NULL,'bsterzenbach@oxiem.com','Oxiem CMS','approval@oxiem.com','Content approval needed','',441,'Bill'),(18,13,6,NULL,'bsterzenbach@oxiem.com','Oxiem CMS','approval@oxiem.com','Content approval needed','',441,'Bill'),(19,17,1,NULL,'bsterzenbach@oxiem.com','Oxiem CMS','approval@oxiem.com','Page needs approval','',441,'Bill'),(20,17,2,NULL,'bsterzenbach@oxiem.com','Oxiem CMS','approval@oxiem.com','Page needs approval','',441,'Bill'),(21,17,3,NULL,'bsterzenbach@oxiem.com','Oxiem CMS','approval@oxiem.com','Page needs approval','',441,'Bill'),(22,17,4,NULL,'bsterzenbach@oxiem.com','Oxiem CMS','approval@oxiem.com','Page needs approval','',441,'Bill'),(23,17,5,NULL,'bsterzenbach@oxiem.com','Oxiem CMS','approval@oxiem.com','Page needs approval','',441,'Bill'),(24,17,6,NULL,'bsterzenbach@oxiem.com','Oxiem CMS','approval@oxiem.com','Page needs approval','',441,'Bill'),(46,236,4,NULL,'ddinescu@oxiem.com','Oxiem CMS','info@oxiem.com','Event Approval Required','',441,'Dinescu Daniel'),(47,236,5,NULL,'ddinescu@oxiem.com','Oxiem CMS','info@oxiem.com','Event Approval Required','',441,'Dinescu Daniel'),(48,236,6,NULL,'ddinescu@oxiem.com','Oxiem CMS','info@oxiem.com','Event Approval Required','',441,'Dinescu Daniel'),(49,274,1,NULL,'ddinescu@oxiem.com','Oxiem CMS','info@oxiem.com','News Approval Needed','',441,'Dinescu Daniel'),(50,274,2,NULL,'ddinescu@oxiem.com','Oxiem CMS','info@oxiem.com','News Approval Needed','',441,'Dinescu Daniel'),(51,274,3,NULL,'ddinescu@oxiem.com','Oxiem CMS','info@oxiem.com','News Approval Needed','',441,'Dinescu Daniel'),(52,274,4,NULL,'ddinescu@oxiem.com','Oxiem CMS','info@oxiem.com','News Approval Needed','',441,'Dinescu Daniel'),(53,274,5,NULL,'ddinescu@oxiem.com','Oxiem CMS','info@oxiem.com','News Approval Needed','',441,'Dinescu Daniel'),(54,274,6,NULL,'ddinescu@oxiem.com','Oxiem CMS','info@oxiem.com','News Approval Needed','',441,'Dinescu Daniel'),(66,138,6,NULL,'','','','','',0,''),(65,138,5,NULL,'','','','','',0,''),(64,138,4,NULL,'','','','','',0,''),(63,138,3,NULL,'','','','','',0,''),(62,138,2,NULL,'','','','','',0,''),(61,138,1,NULL,'','','','','',0,''),(67,139,1,NULL,'','','','','',0,''),(68,139,2,NULL,'','','','','',0,''),(69,139,3,NULL,'','','','','',0,''),(70,139,4,NULL,'','','','','',0,''),(71,139,5,NULL,'','','','','',0,''),(72,139,6,NULL,'','','','','',0,''),(73,141,1,NULL,'','','','','',0,''),(74,141,2,NULL,'','','','','',0,''),(75,141,3,NULL,'','','','','',0,''),(76,141,4,NULL,'','','','','',0,''),(77,141,5,NULL,'','','','','',0,''),(78,141,6,NULL,'','','','','',0,''),(79,149,1,NULL,'','','','','',0,''),(80,149,2,NULL,'','','','','',0,''),(81,149,3,NULL,'','','','','',0,''),(82,149,4,NULL,'','','','','',0,''),(83,149,5,NULL,'','','','','',0,''),(84,149,6,NULL,'','','','','',0,''),(85,150,1,NULL,'','','','','',0,''),(86,150,2,NULL,'','','','','',0,''),(87,150,3,NULL,'','','','','',0,''),(88,150,4,NULL,'','','','','',0,''),(89,150,5,NULL,'','','','','',0,''),(90,150,6,NULL,'','','','','',0,''),(91,32,1,NULL,'','','','','',0,''),(92,32,2,NULL,'','','','','',0,''),(93,32,3,NULL,'','','','','',0,''),(94,32,4,NULL,'','','','','',0,''),(95,32,5,NULL,'','','','','',0,''),(96,32,6,NULL,'','','','','',0,''),(115,1,1,NULL,'','','','','',0,''),(116,1,2,NULL,'','','','','',0,''),(117,1,3,NULL,'','','','','',0,''),(118,1,4,NULL,'','','','','',0,''),(119,1,5,NULL,'','','','','',0,''),(120,1,6,NULL,'','','','','',0,''),(121,23,1,NULL,'','','','','',0,''),(122,23,2,NULL,'','','','','',0,''),(123,23,3,NULL,'','','','','',0,''),(124,23,4,NULL,'','','','','',0,''),(125,23,5,NULL,'','','','','',0,''),(126,23,6,NULL,'','','','','',0,''),(127,417,1,NULL,'','','','','',0,''),(128,417,2,NULL,'','','','','',0,''),(129,417,3,NULL,'','','','','',0,''),(130,417,4,NULL,'','','','','',0,''),(131,417,5,NULL,'','','','','',0,''),(132,417,6,NULL,'','','','','',0,'');

--
-- Table structure for table `Rev_Collection_13`
--

CREATE TABLE `Rev_Collection_13` (
  `RevisionID` int(11) NOT NULL AUTO_INCREMENT,
  `RevisionUserID` bigint(20) unsigned NOT NULL DEFAULT '0',
  `RevisionCreateTime` bigint(20) unsigned NOT NULL DEFAULT '0',
  `RevisionReason` bigint(20) unsigned NOT NULL DEFAULT '0',
  `RevisionSetID` bigint(20) unsigned NOT NULL DEFAULT '0',
  `Collection_13_ID` int(11) NOT NULL DEFAULT '0',
  `Collection_13_1` varchar(254) NOT NULL DEFAULT '',
  `Collection_13_2` longtext,
  `Collection_13_3` int(11) DEFAULT NULL,
  `Collection_13_4` int(11) DEFAULT NULL,
  `Collection_13_6` longtext,
  `Collection_13_7` bigint(20) DEFAULT NULL,
  `Collection_13_8` longtext,
  `Collection_13_9` longtext,
  `Collection_13_10` longtext,
  `Collection_13_11` varchar(254) DEFAULT NULL,
  `Collection_13_12` varchar(254) DEFAULT NULL,
  `Collection_13_13` varchar(254) DEFAULT NULL,
  `Collection_13_14` longtext,
  `Collection_13_15` longtext,
  `Collection_13_16` varchar(254) DEFAULT NULL,
  `Collection_13_17` longtext,
  `Collection_13_18` varchar(254) DEFAULT NULL,
  PRIMARY KEY (`RevisionID`)
) ENGINE=MyISAM AUTO_INCREMENT=193 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Rev_Collection_13`
--

INSERT INTO `Rev_Collection_13` VALUES (1,1,1323343396,2,1,519,'Content - Homepage - Rotator',NULL,2,3,'{{capture name=Rot assign=rotator}}\r\n{{getCollectionByCategory CollectionID=304 ColumnID=\'4\' Value=\'on\' var=Results OrderColumn=5 }}\r\n\r\n<div id=\"rotator\">\r\n			<div id=\"rotatornav\">\r\n					<div id=\"rotatorresume\">Resume</div>\r\n					<div id=\"rotatorpause\">Pause</div>\r\n					<div id=\"rotatorpages\"></div>\r\n					<div id=\"rotatornext\"><img src=\"/images/cycle/next.png\"/></div>\r\n					<div id=\"rotatorprev\"><img src=\"/images/cycle/previous.png\"/></div>\r\n			</div>\r\n			<div id=\"contentstarter\"></div>\r\n			<div id=\"rotatortitlebg\"><div id=\"rotatortitle\"></div></div>\r\n			<div id=\"rotatorsubtitle\"></div>\r\n			<div id=\"rotatorlink\"></div>\r\n\r\n			<div class=\"pics\" id=\"slideshow\">\r\n			{{foreach from=$Results item=v key=k name=n}} \r\n			{{assign var=canAccess value=0}}\r\n			{{if $smarty.session.UserID gt 0}}\r\n					{{CollectionCanAccess userId=$smarty.session.UserID CollectionId=273 rowId=$v.$catId var=canAccess}}\r\n			{{/if}}\r\n			<a href=\"{{$v.Collection_304_6}}\"><img {{if $canAccess eq true}}collectionid=\"304\" collectionrowid=\"{{$v.Collection_304_ID}}\" collectioneditor=\"1\" collectionfilter=\"11\"{{/if}} id=\"rotatorimageid{{$smarty.foreach.n.index}}\" title=\"{{$v.Collection_304_1|replace:\'\"\':\"\"\"}}\" height=\"271\" width=\"960\" alt=\"{{$v.Collection_304_2|replace:\'\"\':\"\"\"}}\" link=\"{{$v.Collection_304_6}}\" src=\"{{$v.Collection_304_3}}\" /></a> \r\n			{{/foreach}}\r\n			</div>\r\n</div>			\r\n{{/capture}}\r\n{{eval var=$rotator}}\r\n\r\n',1239980175,'<script type=\"text/javascript\" src=\"/js/jquery.cycle.js\"></script>\r\n<link media=\"screen\" href=\"/style/jquery.cycle.css\" type=\"text/css\" rel=\"stylesheet\" />','function onBefore(curr, next, opts) \r\n{ \r\n	var index = $(this).parent().children().index(this);\r\n	var title = $(\'#rotatorimageid\'+ index).attr(\'title\'); \r\n	var alt = $(\'#rotatorimageid\'+ index).attr(\'alt\'); \r\n	var link = $(\'#rotatorimageid\'+ index).attr(\'link\'); \r\n \r\n	\r\n	$(\'#rotatortitle\').fadeOut(\'slow\', function() { \r\n			$(\'#rotatortitle\').html(title); \r\n			$(\'#rotatortitle\').fadeIn(\'slow\'); \r\n	}); \r\n	$(\'#rotatorsubtitle\').fadeOut(\'slow\', function() { \r\n			$(\'#rotatorsubtitle\').html(alt); \r\n			$(\'#rotatorsubtitle\').fadeIn(\'slow\'); \r\n	}); \r\n	\r\n	\r\n} \r\n	\r\n	$(\'#slideshow\').cycle({ speed: 2400, timeout: 10000, continuous: 0, before: onBefore, pager: \'#rotatorpages\' , next:   \'#rotatornext\',     prev:   \'#rotatorprev\'  }); \r\n	$(\'#rotatorpause\').click(function() { $(\'#slideshow\').cycle(\'pause\'); }); \r\n	$(\'#rotatorresume\').click(function() { $(\'#slideshow\').cycle(\'resume\', true); }); ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,2,1324400884,2,2,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\r\n	<div id=\"smarty_plugin\">\r\n		{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n	<h1>\r\n		Oxiem CMS1</h1>\r\n	<h3>\r\n		Heading 33</h3>\r\n	<p>\r\n		Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n	<h4>\r\n		Heading 4</h4>\r\n	<p>\r\n		<span>Unordered list.</span></p>\r\n	<ul>\r\n		<li>\r\n			In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n		<li>\r\n			Ut eleifend lacus non augue venenatis varius.</li>\r\n		<li>\r\n			Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n		<li>\r\n			Morbi in orci erat.</li>\r\n		<li>\r\n			Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	</ul>\r\n	<p>\r\n		<span>Ordered list.</span></p>\r\n	<ol>\r\n		<li>\r\n			In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n		<li>\r\n			Ut eleifend lacus non augue venenatis varius.</li>\r\n		<li>\r\n			Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n		<li>\r\n			Morbi in orci erat.</li>\r\n		<li>\r\n			Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	</ol>\r\n	<p>\r\n		<span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n	<br />\r\n	<div>\r\n		<div id=\"smarty_plugin\">\r\n			{{getcontent id=\'653\' }}</div>\r\n	</div>\r\n	<p>\r\n		 </p>\r\n</div>\r\n<p>\r\n	 </p>\r\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,2,1324400915,2,3,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Oxiem CMS1!</h1>\r\n<h3>Heading 33</h3>\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n<br />\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,2,1324400939,2,4,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Oxiem CMS1</h1>\r\n<h3>Heading 33</h3>\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n<br />\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,2,1324912105,2,5,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\r\n	<div id=\"smarty_plugin\">\r\n		{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"content\">\r\n	<h1>\r\n		Oxiem CMS Lander Page</h1>\r\n	<h2>\r\n		Heading 2!</h2>\r\n	<p>\r\n		Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n	<h4>\r\n		Heading 4</h4>\r\n	<p>\r\n		<span>Unordered list.</span></p>\r\n	<ul>\r\n		<li>\r\n			In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n		<li>\r\n			Ut eleifend lacus non augue venenatis varius.</li>\r\n		<li>\r\n			Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n		<li>\r\n			Morbi in orci erat.</li>\r\n		<li>\r\n			Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	</ul>\r\n	<p>\r\n		<span>Ordered list.</span></p>\r\n	<ol>\r\n		<li>\r\n			In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n		<li>\r\n			Ut eleifend lacus non augue venenatis varius.</li>\r\n		<li>\r\n			Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n		<li>\r\n			Morbi in orci erat.</li>\r\n		<li>\r\n			Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	</ol>\r\n	<p>\r\n		<span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n</div>\r\n<div id=\"rightside\">\r\n	<div id=\"smarty_plugin\">\r\n		{{getcontent id=248}}</div>\r\n	<div id=\"smarty_plugin\">\r\n		{{getcontent id=269}}</div>\r\n</div>\r\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,1,1325866305,2,6,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\n	<div id=\"smarty_plugin\">\n		{{getcontent id=12}}</div>\n</div>\n<div id=\"content\">\n	<h1>\n		Oxiem CMS Lander Page</h1>\n	<h2>\n		Heading 2!</h2>\n	<p>\n		Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\n	<h4>\n		Heading 4</h4>\n	<p>\n		<span>Unordered list.</span></p>\n	<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n	<li>One more element\n	<ul>\n		<li>Sub element</li>\n	</ul>\n	</li>\n</ul>\n\n	<p>\n		<span>Ordered list.</span></p>\n	<ol>\n		<li>\n			In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n		<li>\n			Ut eleifend lacus non augue venenatis varius.</li>\n		<li>\n			Donec nec eros eget felis ornare varius commodo nec purus.</li>\n		<li>\n			Morbi in orci erat.</li>\n		<li>\n			Fusce tincidunt neque orci, congue fermentum enim.</li>\n	</ol>\n	<p>\n		<span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n</div>\n<div id=\"rightside\">\n	<div id=\"smarty_plugin\">\n		{{getcontent id=248}}</div>\n	<div id=\"smarty_plugin\">\n		{{getcontent id=269}}</div>\n</div>\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(7,2,1325868376,2,7,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\n	<div id=\"smarty_plugin\">\n		{{getcontent id=12}}</div>\n</div>\n<div id=\"content\">\n	<h1>\n		Oxiem CMS Lander Page</h1>\n	<h2>Heading 2</h2>\n\n	<p>\n		Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\n	<h4>\n		Heading 4</h4>\n	<p>\n		<span>Unordered list.</span></p>\n	<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n	<li>One more element\n	<ul>\n		<li>Sub element</li>\n	</ul>\n	</li>\n</ul>\n\n	<p>\n		<span>Ordered list.</span></p>\n	<ol>\n		<li>\n			In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n		<li>\n			Ut eleifend lacus non augue venenatis varius.</li>\n		<li>\n			Donec nec eros eget felis ornare varius commodo nec purus.</li>\n		<li>\n			Morbi in orci erat.</li>\n		<li>\n			Fusce tincidunt neque orci, congue fermentum enim.</li>\n	</ol>\n	<p>\n		<span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n</div>\n<div id=\"rightside\">\n	<div id=\"smarty_plugin\">\n		{{getcontent id=248}}</div>\n	<div id=\"smarty_plugin\">\n		{{getcontent id=269}}</div>\n</div>\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(8,2,1325868403,2,8,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\n	<div id=\"smarty_plugin\">\n		{{getcontent id=12}}</div>\n</div>\n<div id=\"content\">\n	<h1>Oxiem CMS Lander Page.</h1>\n\n	<h2>Heading 2</h2>\n\n	<p>\n		Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\n	<h4>\n		Heading 4</h4>\n	<p>\n		<span>Unordered list.</span></p>\n	<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n	<li>One more element\n	<ul>\n		<li>Sub element</li>\n	</ul>\n	</li>\n</ul>\n\n	<p>\n		<span>Ordered list.</span></p>\n	<ol>\n		<li>\n			In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n		<li>\n			Ut eleifend lacus non augue venenatis varius.</li>\n		<li>\n			Donec nec eros eget felis ornare varius commodo nec purus.</li>\n		<li>\n			Morbi in orci erat.</li>\n		<li>\n			Fusce tincidunt neque orci, congue fermentum enim.</li>\n	</ol>\n	<p>\n		<span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n</div>\n<div id=\"rightside\">\n	<div id=\"smarty_plugin\">\n		{{getcontent id=248}}</div>\n	<div id=\"smarty_plugin\">\n		{{getcontent id=269}}</div>\n</div>\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(9,1,1327073821,2,9,2,'Content - Homepage',NULL,1,1,'<div id=\"contentfull\">\r\n	<div id=\"smarty_plugin\">\r\n		{{getcontent id=519}}</div>\r\n</div>\r\n<div class=\"sep\">\r\n	&nbsp;</div>\r\n<div id=\"leftside\">\r\n	<div id=\"smarty_plugin\">\r\n		{{getcontent id=13}}</div>\r\n</div>\r\n<div id=\"content\">\r\n	<h1>\r\n		Integer aliquet tortor sit amet metus semper ornare.</h1>\r\n	<div>\r\n		<div id=\"smarty_plugin\">\r\n			{{getcontent id=248}}</div>\r\n	</div>\r\n	<div>\r\n		<div id=\"smarty_plugin\">\r\n			{{getcontent id=269}}</div>\r\n	</div>\r\n</div>\r\n<div id=\"rightside\">\r\n	<div id=\"smarty_plugin\">\r\n		{{getcontent id=248}}</div>\r\n	<div id=\"smarty_plugin\">\r\n		{{getcontent id=269}}</div>\r\n</div>\r\n',1188298498,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,1,1328034632,2,10,21,'Menu - Middle',NULL,2,3,'{{* Get all menu items that have no parents  *}}\r\n{{getTreeChildNumberAdmin var=primaryCategories CID=276 Level=1 NoDisplay=1}} \r\n{{* To be able to highlight the current menu, we do the folowing *}}\r\n{{assign var=filename value=$smarty.server.REQUEST_URI}}\r\n{{* If somewhere in the code we want to highlight something else , the folowing lines do that *}}\r\n{{if $fileNameToUse neq \'\'}}{{assign var=filename value=$fileNameToUse}}{{/if}}\r\n\r\n{{* We get the data for the selected item *}}\r\n{{getCollectionByCategory CollectionID=276 ColumnID=2 Value=$filename OrderColumn=1 var=CurentPageDatas}}\r\n{{assign var=CurentPageData value=$CurentPageDatas[0]}}\r\n\r\n{{* We get all the parents of the selected item and we save the one that has no parents *}}\r\n{{getTreeChildPath CID=276  Node=$CurentPageData.Collection_276_ID var=ParentPath}}\r\n{{assign var=FirstParent value=$ParentPath[1]}}\r\n\r\n{{* Time to display the menu *}}\r\n<ul>\r\n{{assign var=first value=0}}\r\n{{foreach from=$primaryCategories item=v key=k}}\r\n{{if $v.Collection_276_4 eq \'on\'}}\r\n\r\n	{{* For EIP. We need to decide weather we want the logined user to be able to right click and edit the menu item *}}\r\n	{{assign var=canAccess value=0}}{{if $smarty.session.UserID gt 0}}\r\n	{{CollectionCanAccess userId=$smarty.session.UserID CollectionId=276 rowId=$v.Collection_276_ID var=canAccess}}{{/if}}\r\n	<li><a href=\"{{$v.Collection_276_2}}\" {{if $canAccess eq true}}collectionid=\"276\" collectionrowid=\"{{$v.Collection_276_ID}}\" collectioneditor=\"1\"{{/if}} {{if $v.Collection_276_2 eq $filename or $v.Collection_276_ID eq $FirstParent}} class=\"selected\"{{/if}}>{{$v.Collection_276_1}}</a></li>\r\n{{/if}}\r\n{{/foreach}}\r\n</ul>',1204543330,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,1,1328189318,2,11,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Oxiem CMS1</h1>\r\n<h3>Heading 33</h3>\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n<br />\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,2,1330378526,2,12,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\n	<div id=\"smarty_plugin\">\n		{{getcontent id=12}}</div>\n</div>\n<div id=\"content\">\n	<h1>Oxiem CMS Lander Page.</h1>\n\n	<h2>Heading 2</h2>\n\n	<p>\n		Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\n	<h4>\n		Heading 4</h4>\n	<p>\n		<span>Unordered list.</span></p>\n	<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n	<li>One more element\n	<ul>\n		<li>Sub element</li>\n	</ul>\n	</li>\n	<li>Another</li>\n</ul>\n\n\n\n	<p>\n		<span>Ordered list.</span></p>\n	<ol>\n		<li>\n			In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n		<li>\n			Ut eleifend lacus non augue venenatis varius.</li>\n		<li>\n			Donec nec eros eget felis ornare varius commodo nec purus.</li>\n		<li>\n			Morbi in orci erat.</li>\n		<li>\n			Fusce tincidunt neque orci, congue fermentum enim.</li>\n	</ol>\n	<p>\n		<span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n</div>\n<div id=\"rightside\">\n	<div id=\"smarty_plugin\">\n		{{getcontent id=248}}</div>\n	<div id=\"smarty_plugin\">\n		{{getcontent id=269}}</div>\n</div>\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,2,1332789863,2,13,2,'Content - Homepage',NULL,1,1,'<div id=\"contentfull\">\r\n<div id=\"smarty_plugin\">{{getcontent id=519}}</div>\r\n</div>\r\n<div class=\"sep\">&nbsp;</div>\r\n<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=666}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=13}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Integer aliquet tortor sit amet metus semper ornare.</h1>\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n</div>\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1188298498,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,2,1332790753,2,14,5,'Menu - Top',NULL,6,1,'<ul>\r\n	<li>\r\n		<a href=\"/about/index.html\">About Us</a></li>\r\n	<li>\r\n		|</li>\r\n	<li>\r\n		<a href=\"/contact-us.html\">Contact Us</a></li>\r\n</ul>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(15,2,1332877162,2,15,519,'Content - Homepage - Rotator',NULL,2,3,'{{capture name=Rot assign=rotator}}\r\n{{getCollectionByCategory CollectionID=304 ColumnID=\'4\' Value=\'on\' var=Results OrderColumn=5 }}\r\n\r\n<div id=\"rotator\">\r\n			<div id=\"rotatornav\">\r\n					<div id=\"rotatorresume\">Resume</div>\r\n					<div id=\"rotatorpause\">Pause</div>\r\n					<div id=\"rotatorpages\"></div>\r\n					<div id=\"rotatornext\"><img src=\"/images/cycle/next.png\"/></div>\r\n					<div id=\"rotatorprev\"><img src=\"/images/cycle/previous.png\"/></div>\r\n			</div>\r\n			<div id=\"contentstarter\"></div>\r\n			<div id=\"rotatortitlebg\"><div id=\"rotatortitle\"></div></div>\r\n			<div id=\"rotatorsubtitle\"></div>\r\n			<div id=\"rotatorlink\"></div>\r\n			{{assign var=tmp value=\"&qu\"|concat:\"ot;\"}}\r\n			<div class=\"pics\" id=\"slideshow\">\r\n			{{foreach from=$Results item=v key=k name=n}} \r\n			{{assign var=canAccess value=0}}\r\n			{{if $smarty.session.UserID gt 0}}\r\n					{{CollectionCanAccess userId=$smarty.session.UserID CollectionId=273 rowId=$v.$catId var=canAccess}}\r\n			{{/if}}\r\n			<a href=\"{{$v.Collection_304_6}}\"><img {{if $canAccess eq true}}collectionid=\"304\" collectionrowid=\"{{$v.Collection_304_ID}}\" collectioneditor=\"1\" collectionfilter=\"11\"{{/if}} id=\"rotatorimageid{{$smarty.foreach.n.index}}\" title=\"{{$v.Collection_304_1|replace:\'\"\':$tmp}}\" height=\"271\" width=\"960\" alt=\"{{$v.Collection_304_2|replace:\'\"\':$tmp}}\" link=\"{{$v.Collection_304_6}}\" src=\"{{$v.Collection_304_3}}\" /></a> \r\n			{{/foreach}}\r\n			</div>\r\n</div>			\r\n{{/capture}}\r\n{{eval var=$rotator}}\r\n\r\n',1239980175,'<script type=\"text/javascript\" src=\"/js/jquery.cycle.js\"></script>\r\n<link media=\"screen\" href=\"/style/jquery.cycle.css\" type=\"text/css\" rel=\"stylesheet\" />','function onBefore(curr, next, opts) \r\n{ \r\n	var index = $(this).parent().children().index(this);\r\n	var title = $(\'#rotatorimageid\'+ index).attr(\'title\'); \r\n	var alt = $(\'#rotatorimageid\'+ index).attr(\'alt\'); \r\n	var link = $(\'#rotatorimageid\'+ index).attr(\'link\'); \r\n \r\n	\r\n	$(\'#rotatortitle\').fadeOut(\'slow\', function() { \r\n			$(\'#rotatortitle\').html(title); \r\n			$(\'#rotatortitle\').fadeIn(\'slow\'); \r\n	}); \r\n	$(\'#rotatorsubtitle\').fadeOut(\'slow\', function() { \r\n			$(\'#rotatorsubtitle\').html(alt); \r\n			$(\'#rotatorsubtitle\').fadeIn(\'slow\'); \r\n	}); \r\n	\r\n	\r\n} \r\n	\r\n	$(\'#slideshow\').cycle({ speed: 2400, timeout: 10000, continuous: 0, before: onBefore, pager: \'#rotatorpages\' , next:   \'#rotatornext\',     prev:   \'#rotatorprev\'  }); \r\n	$(\'#rotatorpause\').click(function() { $(\'#slideshow\').cycle(\'pause\'); }); \r\n	$(\'#rotatorresume\').click(function() { $(\'#slideshow\').cycle(\'resume\', true); }); ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,2,1333116418,2,16,669,'Homepage',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Oxiem CMS1</h1>\r\n<h3>Heading 33</h3>\r\n<p>Integer<img alt=\"\" src=\"/content/images/photo81236.jpg\" style=\"width: 200px; height: 125px;\" /> aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n<br />\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1332790013,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,2,1333379927,2,17,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Oxiem CMS1</h1>\r\n<h3>Heading 33</h3>\r\n<p>Integer<img alt=\"\" src=\"/content/images/photo81236.jpg\" style=\"width: 200px; height: 125px;\" /> aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n<br />\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,2,1334758188,2,18,2,'Content - Homepage',NULL,1,1,'<div id=\"contentfull\">\r\n<div id=\"smarty_plugin\">{{getcontent id=519}}</div>\r\n</div>\r\n<div class=\"sep\">&nbsp;</div>\r\n<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=666}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=13}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Integer aliquet tortor sit amet metus semper ornare.</h1>\r\n<p>Share your story with us.</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n</div>\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1188298498,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(20,1,1336039807,2,20,25,'Content - Contact Us',NULL,1,1,'<div id=\"leftside\">\r\n	<div id=\"smarty_plugin\">\r\n		{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n	<h1>\r\n		Contact Us?</h1>\r\n	<div>\r\n		<div id=\"smarty_plugin\">\r\n			{{ViewCollection CollectionID=32}}</div>\r\n	</div>\r\n</div>\r\n<p>\r\n	&nbsp;</p>\r\n',1204545762,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(21,1,1336040292,2,21,25,'Content - Contact Us',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Contact Us?</h1>\r\n<div>\r\n<div id=\"smarty_plugin\">{{ViewCollection CollectionID=23}}</div>\r\n</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1204545762,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(22,1,1336040636,2,22,19,'FORMS - Edit Account',NULL,2,1,'<div id=\"contents\">\r\n	<h1>\r\n		Edit Account</h1>\r\n	<p>\r\n		<strong>Manage Your Account Here. </strong></p>\r\n	<div>\r\n		<div id=\"smarty_plugin\">\r\n			{{ViewCollection CollectionID=1 mode=\'Edit\' rowid=$smarty.session.UserID TemplateID=6}}</div>\r\n	</div>\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(23,1,1336041056,2,23,15,'FORMS - Register',NULL,2,1,'<div id=\"content\">\r\n	<h1>\r\n		Register</h1>\r\n	<div id=\"smarty_plugin\">\r\n		{{ViewCollection CollectionID=1 TemplateID=5}}</div>\r\n	<p>\r\n		&nbsp;</p>\r\n	<p>\r\n		&nbsp;</p>\r\n	<p>\r\n		&nbsp;</p>\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(24,1,1336045033,2,24,19,'FORMS - Edit Account',NULL,2,1,'<div id=\"contents\">\r\n<h1>Edit Account</h1>\r\n<p><strong>Manage Your Account Here. </strong></p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{ViewCollection CollectionID=1 mode=\'Edit\' rowid=$smarty.session.UserID TemplateIDa=6}}</div>\r\n</div>\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(25,1,1336045323,2,25,19,'FORMS - Edit Account',NULL,2,1,'<div id=\"contents\">\r\n<h1>Edit Account</h1>\r\n<p><strong>Manage Your Account Here. </strong></p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{ViewCollection CollectionID=1 mode=\'Edit\' rowid=$smarty.session.UserID TemplateID=6}}</div>\r\n</div>\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(26,1,1336046938,2,26,19,'FORMS - Edit Account',NULL,2,1,'<div id=\"contents\">\r\n<h1>Edit Account</h1>\r\n<p><strong>Manage Your Account Here. </strong></p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{ViewCollection CollectionID=1 mode=\'Edit\' rowid=$smarty.session.UserID TemplateIDa=6}}</div>\r\n</div>\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(27,1,1336046963,2,27,15,'FORMS - Register',NULL,2,1,'<div id=\"content\">\r\n<h1>Register</h1>\r\n<div id=\"smarty_plugin\">{{ViewCollection CollectionID=1 TemplateIDa=5}}</div>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(28,1,1336050406,2,28,25,'Content - Contact Us',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Contact Us?</h1>\r\n<div>\r\n<div id=\"smarty_plugin\">{{ViewCollection CollectionID=32}}</div>\r\n</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1204545762,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(29,1,1336050741,2,29,25,'Content - Contact Us',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Contact Us?</h1>\r\n<div>\r\n<div id=\"smarty_plugin\">{{ViewCollection CollectionID=23}}</div>\r\n</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1204545762,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(30,1,1336050837,2,30,25,'Content - Contact Us',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Contact Us?</h1>\r\n<div>\r\n<div id=\"smarty_plugin\">{{ViewCollection CollectionID=32}}</div>\r\n</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1204545762,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(31,1,1336056788,2,31,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\n</div>\n<div id=\"contentalt\">\n<h1>Oxiem CMS1</h1>\n<h3>Heading 33</h3>\n<p>Integer<img alt=\"\" src=\"/content/images/Aviary-appicontactcom-Picture-1.png\" style=\"width: 114px; height: 119px; \"> aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\n<h4>Heading 4</h4>\n<p><span>Unordered list.</span></p>\n<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n</ul>\n<p><span>Ordered list.</span></p>\n<ol>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n</ol>\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n<br>\n<div>\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\n</div>\n<p>&nbsp;</p>\n</div>\n<p>&nbsp;</p>\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(34,1,1336397609,2,34,25,'Content - Contact Us',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Contact Us?</h1>\r\n<div>\r\n<div id=\"smarty_plugin\">{{ViewCollection CollectionID=23}}</div>\r\n</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1204545762,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(35,1,1336398434,2,35,2,'Content - Homepage',NULL,1,1,'<div id=\"contentfull\">\r\n<div id=\"smarty_plugin\">{{getcontent id=519}}</div>\r\n</div>\r\n<div class=\"sep\">&nbsp;</div>\r\n<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=666}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=13}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Demo</h1>\r\n<p>Share your story with us.</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n</div>\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1188298498,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(36,1,1336398495,2,36,2,'Content - Homepage',NULL,1,1,'<div id=\"contentfull\">\r\n<div id=\"smarty_plugin\">{{getcontent id=519}}</div>\r\n</div>\r\n<div class=\"sep\">&nbsp;</div>\r\n<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=666}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=13}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Demo</h1>\r\n<p>Share your story with us.</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n</div>\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1188298498,'<style type=\"text/css\">\r\n#rightside { margin-left:0px;}\r\n</style>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(37,1,1336409452,2,37,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Oxiem CMS Lander Page.</h1>\r\n<h2>Heading 2</h2>\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{Player file=\'/content/videos/video_50_2_4.flv\' id=\'videoplayer\' image=\'\' }}</div>\r\n</div>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	<li>One more element\r\n	<ul>\r\n		<li>Sub element</li>\r\n	</ul>\r\n	</li>\r\n	<li>Another</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(38,1,1336409535,2,38,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Oxiem CMS Lander Page.</h1>\r\n<h2>Heading 2a</h2>\r\n\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{Player file=\'/content/videos/video_50_2_4.flv\' id=\'videoplayer\' image=\'\' }}</div>\r\n</div>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	<li>One more element\r\n	<ul>\r\n		<li>Sub element</li>\r\n	</ul>\r\n	</li>\r\n	<li>Another</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(39,1,1336409568,2,39,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Oxiem CMS Lander Page.</h1>\r\n<h2>Heading 2a</h2>\r\n\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{Player file=\'/content/videos/video_50_2_4.flv\' id=\'videoplayer\' image=\'\' }}</div>\r\n</div>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	<li>One more element\r\n	<ul>\r\n		<li>Sub element</li>\r\n	</ul>\r\n	</li>\r\n	<li>Another</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(40,1,1336409744,2,40,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Oxiem CMS Lander Page.</h1>\r\n<h2>Heading 2a</h2>\r\n\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{Player file=\'/content/videos/video_50_2_4.flv\' id=\'videoplayer\' image=\'\' }}</div>\r\n</div>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	<li>One more element\r\n	<ul>\r\n		<li>Sub element</li>\r\n	</ul>\r\n	</li>\r\n	<li>Another</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(41,1,1336409847,2,41,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Oxiem CMS Lander Page.</h1>\r\n<h2>Heading 2</h2>\r\n\r\n\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{Player file=\'/content/videos/video_50_2_4.flv\' id=\'videoplayer\' image=\'\' }}</div>\r\n</div>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	<li>One more element\r\n	<ul>\r\n		<li>Sub element</li>\r\n	</ul>\r\n	</li>\r\n	<li>Another</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(42,1,1336410190,2,42,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Oxiem CMS Lander Page.</h1>\r\n<h2>Heading 2aa</h2>\r\n\r\n\r\n\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{Player file=\'/content/videos/video_50_2_4.flv\' id=\'videoplayer\' image=\'\' }}</div>\r\n</div>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	<li>One more element\r\n	<ul>\r\n		<li>Sub element</li>\r\n	</ul>\r\n	</li>\r\n	<li>Another</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(43,1,1336410193,2,43,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Oxiem CMS Lander Page.</h1>\r\n<h2>Heading 2</h2>\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{Player file=\'/content/videos/video_50_2_4.flv\' id=\'videoplayer\' image=\'\' }}</div>\r\n</div>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	<li>One more element\r\n	<ul>\r\n		<li>Sub element</li>\r\n	</ul>\r\n	</li>\r\n	<li>Another</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(44,1,1336487546,2,44,37,'SHOPPING CART - Add Product',NULL,2,3,'{{assign var=ProductID 	value=$smarty.get.prodid}}\r\n{{assign var=Quantity  	value=$smarty.get.quantity|string_format:\'%d\'}}\r\n{{assign var=PriceID   	value=$smarty.get.price}}\r\n{{assign var=PageToRedirect   	value=$smarty.get.page}}\r\n{{assign var=SessionID   value=\'\'|sessionid}}\r\n{{assign var=Time	 	  value=$smarty.now}}\r\n{{assign var=CartCollection value=133}}\r\n{{assign var=ProdCollection value=129}}\r\n{{assign var=PriceCollection	value=131}}\r\n{{assign var=CartDetailsCollection value=134}}\r\n\r\n{{* Check if we allready have a cart defined and if it is closed *}}\r\n{{if $smarty.get.prodid gt 0 and $smarty.get.quantity gt 0 and $smarty.get.price gt 0}}\r\n\r\n{{getCollectionByCategory CollectionID=$CartCollection Collection_133_1=$SessionID aditionalFilter=\' (Collection_133_5<>\"on\" or Collection_133_5 IS NULL) \' var=CartData OrderColumn=\'ID\'}}\r\n\r\n{{if $CartData|@count eq 0}}\r\n	{{* We will need to define the cart *}}\r\n	{{CollectionAdd CollectionID=$CartCollection var=CartID Collection_133_1=$SessionID Collection_133_2=$smarty.session.UserID Collection_133_3=$smarty.now Collection_133_4=$smarty.server.REMOTE_ADDR Collection_133_5=\' \'}}\r\n	{{SetCookie name=$smarty.const.CART_NAME value=$SessionID period=30}}\r\n{{else}}\r\n	{{assign var=CartDataItem value=$CartData[0]}}\r\n	{{assign var=CartID value=$CartDataItem.Collection_133_ID}}\r\n{{/if}}\r\n\r\n{{assign var=CartClosed value=$CartDataItem.Collection_133_28}}\r\n{{if $CartClosed neq \'on\'}}\r\n\r\n	{{* We need to determine if the product and price are valid *}}\r\n	{{assign var=CartAddValid value=1}}	\r\n	{{* We check to see if product exists *}}\r\n	\r\n	{{getCollectionByCategory CollectionID=$ProdCollection ColumnID=\'ID\' Collection_129_8=\'on\' Value=$ProductID var=Prod OrderColumn=\'ID\'}}\r\n	{{if $Prod|@count eq 0}}\r\n			{{assign var=CartAddValid value=0}}	\r\n			prod not valid\r\n	{{else}}\r\n			{{assign var=ProdDetails value=$Prod[0]}}	\r\n	{{/if}}\r\n	\r\n	\r\n	{{* We check to see if priceid is right *}}\r\n	{{getCollectionByCategory CollectionID=$PriceCollection ColumnID=\'ID\' Value=$PriceID Collection_131_1=$ProductID var=Price OrderColumn=\'ID\'}}\r\n	{{if $Price|@count eq 0}}\r\n			{{assign var=CartAddValid value=0}}	\r\n			price not valid\r\n	{{else}}\r\n			{{assign var=PriceDetails value=$Price[0]}}\r\n	{{/if}}\r\n	\r\n	{{* We check to see if quantity is greater than 0 *}}\r\n	{{if $Quantity lt 1}}\r\n		{{assign var=CartAddValid value=0}}	\r\n		quantity {{$Quantity}} not valid\r\n	{{/if}}\r\n	\r\n	{{if $CartAddValid eq 1}}\r\n			{{* If the cart add is valid we need to determine if the product & price is allready added or not *}}\r\n			\r\n			{{addProductToCart productID=$ProductID priceID=$PriceID cartID=$CartID quantity=$Quantity productDetails=$ProdDetails priceDetails=$PriceDetails }}\r\n			\r\n			{{getCollectionByCategory CollectionID=$CartDetailsCollection ColumnID=1 Value=$CartID var=CartDetails OrderColumn=\'ID\'}}\r\n			{{updateCartSummary cartID=$CartID cartData=$CartData cartDetails=$CartDetails}}\r\n									\r\n	{{else}}\r\n			\r\n	{{/if}}\r\n{{* end if cart is closed *}}\r\n{{/if}}	\r\n{{/if}} 		\r\n	{{if $smarty.get.r neq 1}}\r\n		 {{redirect page=$PageToRedirect}} \r\n    {{/if}} ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(45,1,1336562944,2,45,53,'SHOPPING CART - Payment Information',NULL,2,3,'	{{* if we do not have a valid cart we will redirect to shopping-cart.html page *}}\r\n	{{assign var=CartCollection				value=133}}\r\n	{{assign var=TaxCollection				value=151}}\r\n	{{assign var=ShippingCollection			value=139}}\r\n	{{assign var=CartDetailsCollection		value=134}}\r\n	{{assign var=SessionID   		value=\'\'|sessionid}}\r\n	{{getCollectionByCategory CollectionID=$CartCollection Collection_133_1=$SessionID aditionalFilter=\' (Collection_133_5<>\"on\" or Collection_133_5 IS NULL) \' var=CartData OrderColumn=\'ID\'}}\r\n	{{assign var=CartDataItem value=$CartData[0]}}\r\n	{{assign var=CartID value=$CartDataItem.Collection_133_ID}}\r\n	{{assign var=MethodID value=$CartDataItem.Collection_133_17}}\r\n	{{assign var=PaymentMethodID value=$CartDataItem.Collection_133_19}}\r\n	{{getCollectionByCategory CollectionID=$CartDetailsCollection ColumnID=1 Value=$CartID var=CartDetails OrderColumn=\'ID\'}}\r\n	\r\n		\r\n	{{if $CartDetails|@count eq 0 or $CartData|@count eq 0 or $MethodID lt 1}}\r\n		{{redirect page=\'/shopping-cart.html\'}}	\r\n	{{/if}}\r\n	\r\n	{{* if we do not have a valid billing info page we will redirect to personal-information *}}	\r\n	{{getCollectionByCategory CollectionID=138 ColumnID=1 Value=$CartID var=BillingInformation OrderColumn=\'ID\'}}\r\n	{{if $BillingInformation|@count eq 0}}\r\n		{{redirect page=\'/checkout/personal-information.html\'}}	\r\n	{{else}}\r\n		{{assign var=BillingInfo value=$BillingInformation[0]}}\r\n	{{/if}}\r\n	\r\n	\r\n	\r\n	{{getCollectionByCategory CollectionID=$ShippingCollection ColumnID=1 Value=$CartID var=ShippingInformation OrderColumn=\'ID\'}}\r\n	{{if $ShippingInformation|@count eq 0}}\r\n			{{redirect page=\'/checkout/shipping-information.html\'}}	\r\n	{{/if}}\r\n		\r\n	\r\n<div id=\"middle2\">\r\n\r\n	{{if $CartData|@count gt 0 and $CartDetails|@count gt 0}}\r\n		<div id=\"shopping_cart_details\">\r\n		{{getcontent id=55}}\r\n		</div>\r\n	{{/if}}\r\n	\r\n	{{getCollectionByCategory CollectionID=138 Collection_138_1=$CartID var=PInfo OrderColumn=\'ID\'}}\r\n	{{if $PInfo|@count neq 0}}\r\n			{{assign var=PinfoData value=$PInfo[0]}}\r\n	{{/if}}\r\n	\r\n	<h1>Your Payment Information</h1>\r\n\r\n	 {{if $smarty.get.errors}}\r\n	 {{assign var=errorlist value=$smarty.get.errors}}\r\n	 {{assign var=authorizeerrors    value=$errorlist|explode:\'-\'}}\r\n	 {{if $authorizeerrors|@count gt 0}}\r\n            <div class=\"ErrorBox\">\r\n			We encountered some problems when checking the information you provided.\r\n			<ul>\r\n			{{assign var=errorscount value=0}}			\r\n			{{foreach from=$authorizeerrors item=v key=k}}\r\n					{{getCollectionByCategory CollectionID=144 ColumnID=\'ID\' Value=$v var=PayError OrderColumn=\'ID\'}}\r\n					{{if $PayError|@count gt 0}}\r\n					{{assign var=PayE value=$PayError[0]}}\r\n					<li>{{$PayE.Collection_144_1}}</li>\r\n					{{assign var=errorscount value=$errorscount|add:\'1\'}}\r\n					{{/if}}\r\n			{{/foreach}}			\r\n			{{if $errorscount eq 0 and $smarty.get.errors neq \'\'}}\r\n				<li>{{$smarty.get.errors}}</li>\r\n			{{/if}}\r\n			</ul>\r\n            </div>\r\n     {{/if}}\r\n	 {{/if}}\r\n	\r\n\r\n		{{* We need to see if personal info has been completed once *}}\r\n		{{* If yes we need to edit not add again *}}\r\n		\r\n		\r\n		\r\n		\r\n		{{getCollectionByCategory CollectionID=$PaymentMethodID Column=1 Value=$CartID var=PayInfo OrderColumn=\'ID\'}}\r\n		{{if $PayInfo|@count eq 0}}\r\n			{{* if we add for the first time we could try to get the info from personal info *}}\r\n			\r\n		{{else}}\r\n			{{assign var=PMethodPrefix value=\'Collection_\'}}\r\n			{{assign var=PMethodPrefix value=$PMethodPrefix|concat:$PaymentMethodID|concat:\'_ID\'}}\r\n		\r\n			{{foreach from=$PayInfo item=v key=k }}\r\n				{{assign var=PayInfoID value=$v.$PMethodPrefix}}\r\n				{{CollectionDeleteRow CollectionID=$PaymentMethodID RowID=$PayInfoID}}\r\n			{{/foreach}}\r\n		{{/if}}	\r\n		\r\n		{{getCollectionByCategory CollectionID=147 ColumnID=ID Value=$PaymentMethodID var=PaymentMethodData OrderColumn=\'ID\'}}\r\n		{{assign var=P value=$PaymentMethodData[0]}}\r\n		{{$P.Collection_147_3}}\r\n		<div id=\"cartform\">\r\n			{{ViewCollection mode=\'Add\' CollectionID=$PaymentMethodID}}\r\n		</div>\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(46,1,1336568110,2,46,142,'EMAIL - Automatic New User',NULL,10,3,'{{assign var=BillingInfo value=$args}}\r\n\r\n<h3>Your User Account Information for USAction Sports</h3>\r\n\r\n<table cellpadding=\"4\" cellspacing=\"4\" border=\"0\">\r\n<tr>\r\n	<td colspan=\"2\" bgcolor=\"#509821\"><strong><font color=\"#025E8D\">Login Information</font></strong></td>\r\n</tr>\r\n<tr>\r\n	<td bgcolor=\"#509821\"><font color=\"#FFFFFF\"><strong>Username:</strong></font></td>\r\n	<td>{{$BillingInfo.Collection_138_12}}</td>\r\n</tr>\r\n<tr>\r\n	<td bgcolor=\"#509821\"><font color=\"#FFFFFF\"><strong>Password:</strong></font></td>\r\n	<td>{{$BillingInfo.Collection_138_12|password:\'oxiem\'}}</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"2\" bgcolor=\"#509821\"><strong><font color=\"#025E8D\">Personal information</font></strong></td>\r\n</tr>\r\n<tr>\r\n	<td bgcolor=\"#509821\"><font color=\"#FFFFFF\"><strong>Company Name:</strong></font></td>\r\n	<td>{{$BillingInfo.Collection_138_4}}</td>\r\n</tr>\r\n\r\n<tr>\r\n	<td bgcolor=\"#509821\"><font color=\"#FFFFFF\"><strong>Contact First Name:</strong></font></td>\r\n	<td>{{$BillingInfo.Collection_138_2}}</td>\r\n</tr>\r\n<tr>\r\n	<td bgcolor=\"#509821\"><font color=\"#FFFFFF\"><strong>Contact Last Name:</strong></font></td>\r\n	<td>{{$BillingInfo.Collection_138_3}}</td>\r\n</tr>\r\n\r\n<tr><td colspan=\"2\" bgcolor=\"#509821\"><strong><font color=\"#025E8D\">Contact Information</font></strong></td></tr>\r\n<tr>\r\n	<td bgcolor=\"#509821\"><font color=\"#FFFFFF\"><strong>Email:</strong></font></td>\r\n	<td>{{$BillingInfo.Collection_138_12}}</td>\r\n</tr>\r\n<tr>\r\n	<td bgcolor=\"#509821\"><font color=\"#FFFFFF\"><strong>Phone:</strong></font></td>\r\n	<td>{{$BillingInfo.Collection_138_10}}</td>\r\n</tr>\r\n\r\n<tr valign=\"top\">\r\n	<td bgcolor=\"#509821\"><font color=\"#FFFFFF\"><strong>Address:</strong></font></td>\r\n	<td>{{$BillingInfo.Collection_138_5}} {{if $BillingInfo.Collection_138_6 neq \'\'}}<br/> {{$BillingInfo.Collection_138_6}}{{/if}}</td>\r\n</tr>\r\n<tr>\r\n	<td bgcolor=\"#509821\"><font color=\"#FFFFFF\"><strong>City:</strong></font></td>\r\n	<td>{{$BillingInfo.Collection_138_7}}</td>\r\n</tr>\r\n<tr>\r\n	<td bgcolor=\"#509821\"><font color=\"#FFFFFF\"><strong>State:</strong></font></td>\r\n	<td>{{createOptions CollectionID=10 Column=1 var=states}} {{assign var=stateid value=$BillingInfo.Collection_138_8}} {{$states.$stateid}}</td>\r\n</tr>\r\n<tr>\r\n	<td bgcolor=\"#509821\"><font color=\"#FFFFFF\"><strong>Zip:</strong></font></td>\r\n	<td>{{$BillingInfo.Collection_138_9}}</td>\r\n</tr>\r\n</table>\r\n',1219074626,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(47,2,1337189806,2,47,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Oxiem CMS Lander Page.</h1>\r\n<h2>Heading 2</h2>\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{Player file=\'/content/videos/video_50_2_4.flv\' id=\'videoplayer\' image=\'\' }}</div>\r\n</div>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	<li>One more element\r\n	<ul>\r\n		<li>Sub element</li>\r\n	</ul>\r\n	</li>\r\n	<li>Another</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(48,2,1337704686,2,48,1,'Main Template',NULL,3,1,'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n	<head xmlns=\"\">\r\n		<title>{{$page.Collection_17_2}}</title>\r\n	</head>\r\n	<body xmlns=\"\">\r\n		<div id=\"container\">\r\n			<div id=\"sitename\">\r\n				{{getcontent id=5}}</div>\r\n			<div id=\"mainmenu\">\r\n				{{getcontent id=21}}</div>\r\n			<div id=\"wrap\">\r\n				<div>\r\n					{{$content}}</div>\r\n				<div class=\"clearingdiv\">\r\n					&nbsp;</div>\r\n			</div>\r\n		</div>\r\n		<div id=\"footer\">\r\n			{{getcontent id=23}}</div>\r\n<!-- edit -->\r\n	</body>\r\n</html>\r\n',NULL,'<meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\" />\r\n<meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n<meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n<meta content=\"index,follow\" name=\"robots\" />\r\n<link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/print.css\" media=\"print\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n {{$FrontEndJavaScriptJQueryIncludeCode}} {{$JavaScriptJQueryIncludeCode}}','<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(49,2,1337704947,2,49,1,'Main Template',NULL,3,1,'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n	<head xmlns=\"\">\r\n		<title>{{$page.Collection_17_2}}</title>\r\n	</head>\r\n	<body xmlns=\"\">\r\n		<div id=\"container\">\r\n			<div id=\"sitename\">\r\n				{{getcontent id=5}}</div>\r\n			<div id=\"mainmenu\">\r\n				{{getcontent id=21}}</div>\r\n			<div id=\"wrap\">\r\n				<div>\r\n					{{$content}}</div>\r\n				<div class=\"clearingdiv\">\r\n					 </div>\r\n			</div>\r\n		</div>\r\n		<div id=\"footer\">\r\n			{{getcontent id=23}}</div>\r\n<!-- edit -->\r\n	</body>\r\n</html>\r\n',NULL,'<meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\" />\r\n<meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n<meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n<meta content=\"index,follow\" name=\"robots\" />\r\n<link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/print.css\" media=\"print\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n<script type=\'text/javascript\' src=\'http://api.handsetdetection.com/sites/js/28837.js\'></script>\r\n<script src=\"http://www.all-flo.com/js/redirect.js\"></script>\r\n {{$FrontEndJavaScriptJQueryIncludeCode}} {{$JavaScriptJQueryIncludeCode}}','<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(50,2,1337705134,2,50,1,'Main Template',NULL,3,1,'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n	<head xmlns=\"\">\r\n		<title>{{$page.Collection_17_2}}</title>\r\n	</head>\r\n	<body xmlns=\"\">\r\n		<div id=\"container\">\r\n			<div id=\"sitename\">\r\n				{{getcontent id=5}}</div>\r\n			<div id=\"mainmenu\">\r\n				{{getcontent id=21}}</div>\r\n			<div id=\"wrap\">\r\n				<div>\r\n					{{$content}}</div>\r\n				<div class=\"clearingdiv\">\r\n					 </div>\r\n			</div>\r\n		</div>\r\n		<div id=\"footer\">\r\n			{{getcontent id=23}}</div>\r\n<!-- edit -->\r\n	</body>\r\n</html>\r\n',NULL,'<meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\" />\r\n<meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n<meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n<meta content=\"index,follow\" name=\"robots\" />\r\n<link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/print.css\" media=\"print\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n<script type=\'text/javascript\' src=\'http://api.handsetdetection.com/sites/js/28837.js\'></script>\r\n<script>\r\nif (HandsetDetection.ismobile == true) {\r\n  var url = window.location.pathname;\r\n  var mobile_url = \"/mobile\"+url;\r\n  var http = new XMLHttpRequest();\r\n  http.open(\'HEAD\', mobile_url, false);\r\n  http.send();\r\n  if(http.status == 200) {\r\n    window.location = mobile_url; return 1;      \r\n  } else {\r\n    window.location = \"http://o2v1.oxiemsites.com/mobile/\"; return 1;\r\n  }\r\n}\r\n</script>\r\n {{$FrontEndJavaScriptJQueryIncludeCode}} {{$JavaScriptJQueryIncludeCode}}','<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(51,2,1337705177,2,51,1,'Main Template',NULL,3,1,'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n	<head xmlns=\"\">\r\n		<title>{{$page.Collection_17_2}}</title>\r\n	</head>\r\n	<body xmlns=\"\">\r\n		<div id=\"container\">\r\n			<div id=\"sitename\">\r\n				{{getcontent id=5}}</div>\r\n			<div id=\"mainmenu\">\r\n				{{getcontent id=21}}</div>\r\n			<div id=\"wrap\">\r\n				<div>\r\n					{{$content}}</div>\r\n				<div class=\"clearingdiv\">\r\n					 </div>\r\n			</div>\r\n		</div>\r\n		<div id=\"footer\">\r\n			{{getcontent id=23}}</div>\r\n<!-- edit -->\r\n	</body>\r\n</html>\r\n',NULL,'<meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\" />\r\n<meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n<meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n<meta content=\"index,follow\" name=\"robots\" />\r\n<link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/print.css\" media=\"print\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n<script type=\'text/javascript\' src=\'http://api.handsetdetection.com/sites/js/28837.js\'></script>\r\n<script>\r\nif (HandsetDetection.ismobile == true) {\r\n  alert(\'mobile\');\r\n}\r\n</script>\r\n {{$FrontEndJavaScriptJQueryIncludeCode}} {{$JavaScriptJQueryIncludeCode}}','<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(60,2,1338928988,2,60,244,'CALENDAR - Content Page - Daily',NULL,2,3,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{assign var=fileNameToUse value=\'/calendar.html\'}}{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Calendar Daily</h1>\r\n<div>\r\n<div id=\"smarty_plugin\">{{if $smarty.get.month gt 0}} {{assign var=month value=$smarty.get.month}} {{else}} {{assign var=month value=$smarty.now|date_format:\'%m\'}} {{/if}} {{if $smarty.get.year gt 0}} {{assign var=year value=$smarty.get.year}} {{else}} {{assign var=year value=$smarty.now|date_format:\'%Y\'}} {{/if}} {{calendar CollectionID=236 CollectionTypeID=238 CollectionTypeXrefID=239 filter=1 Template=\'calendar-daily.html\' url_format=\'/calendar-daily.html?year=%y&month=%m\' year=$year month=$month day=$smarty.now|date_format:\'%d\'}}</div>\r\n</div>\r\n</div>',NULL,'<link rel=\"stylesheet\" type=\"text/css\" href=\"/style/calendar.css\" />\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(58,2,1338928931,2,58,1,'Main Template',NULL,3,1,'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n	<head xmlns=\"\">\r\n		<title>{{$page.Collection_17_2}}</title>\r\n                <meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\" />\r\n                <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n                <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n                <meta content=\"index,follow\" name=\"robots\" />\r\n                <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n	</head>\r\n	<body xmlns=\"\">\r\n		<div id=\"container\">\r\n			<div id=\"sitename\">\r\n				{{getcontent id=5}}</div>\r\n			<div id=\"mainmenu\">\r\n				{{getcontent id=21}}</div>\r\n			<div id=\"wrap\">\r\n				<div>\r\n					{{$content}}</div>\r\n				<div class=\"clearingdiv\">\r\n					 </div>\r\n			</div>\r\n		</div>\r\n		<div id=\"footer\">\r\n			{{getcontent id=23}}</div>\r\n<!-- edit -->\r\n	</body>\r\n</html>',NULL,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n {{$FrontEndJavaScriptJQueryIncludeCode}} {{$JavaScriptJQueryIncludeCode}}','<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(59,2,1338928979,2,59,245,'CALENDAR - Content Page',NULL,2,3,'<div id=\"leftside\">\r\n	<div id=\"smarty_plugin\">\r\n		{{assign var=fileNameToUse value=\'/calendar.html\'}}{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n	<h1>\r\n		Calendar</h1>\r\n	<div>\r\n		<div id=\"smarty_plugin\">\r\n			{{if $smarty.get.month gt 0}} {{assign var=month value=$smarty.get.month}} {{else}} {{assign var=month value=$smarty.now|date_format:\'%m\'}} {{/if}} {{if $smarty.get.year gt 0}} {{assign var=year value=$smarty.get.year}} {{else}} {{assign var=year value=$smarty.now|date_format:\'%Y\'}} {{/if}} {{calendar CollectionID=236 CollectionTypeID=238 CollectionTypeXrefID=239 Template=\'calendar.html\' filter=1 url_format=\'/calendar.html?year=%y&amp;month=%m\' year=$year month=$month day=$smarty.now|date_format:\'%d\'}}</div>\r\n	</div>\r\n</div>\r\n',NULL,'<link rel=\"stylesheet\" type=\"text/css\" href=\"/style/calendar.css\" />\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(54,1,1338275394,2,54,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Oxiem CMS Lander Page.</h1>\r\n<h2>Heading 2</h2>\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies ers</p>\r\n\r\n\r\n<div>\r\n<div id=\"smarty_plugin\">{{Player file=\'/content/videos/video_50_2_4.flv\' id=\'videoplayer\' image=\'\' }}</div>\r\n</div>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	<li>One more element\r\n	<ul>\r\n		<li>Sub element</li>\r\n	</ul>\r\n	</li>\r\n	<li>Another</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(55,1,1338275412,2,55,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\n</div>\n<div id=\"content\">\n<h1>Oxiem CMS Lander Page.</h1>\n<h2>Heading 2</h2>\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies ers</p>\n\n\n<div>\n<div id=\"smarty_plugin\">{{Player file=\'/content/videos/video_50_2_4.flv\' id=\'videoplayer\' image=\'\' }}</div>\n</div>\n<h4>Heading 4 edited</h4>\n\n<p><span>Unordered list.</span></p>\n<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n	<li>One more element\n	<ul>\n		<li>Sub element</li>\n	</ul>\n	</li>\n	<li>Another</li>\n</ul>\n<p><span>Ordered list.</span></p>\n<ol>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n</ol>\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n</div>\n<div id=\"rightside\">\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\n</div>\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(56,2,1338928821,2,56,1,'Main Template',NULL,3,1,'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n	<head xmlns=\"\">\r\n		<title>{{$page.Collection_17_2}}</title>\r\n	</head>\r\n	<body xmlns=\"\">\r\n		<div id=\"container\">\r\n			<div id=\"sitename\">\r\n				{{getcontent id=5}}</div>\r\n			<div id=\"mainmenu\">\r\n				{{getcontent id=21}}</div>\r\n			<div id=\"wrap\">\r\n				<div>\r\n					{{$content}}</div>\r\n				<div class=\"clearingdiv\">\r\n					 </div>\r\n			</div>\r\n		</div>\r\n		<div id=\"footer\">\r\n			{{getcontent id=23}}</div>\r\n<!-- edit -->\r\n	</body>\r\n</html>\r\n',NULL,'<meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\" />\r\n<meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n<meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n<meta content=\"index,follow\" name=\"robots\" />\r\n<link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/print.css\" media=\"print\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n<script type=\'text/javascript\' src=\'http://api.handsetdetection.com/sites/js/28837.js\'></script>\r\n<script src=\"http://www.all-flo.com/js/redirect.js\"></script>\r\n {{$FrontEndJavaScriptJQueryIncludeCode}} {{$JavaScriptJQueryIncludeCode}}','<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(57,2,1338928867,2,57,519,'Content - Homepage - Rotator',NULL,2,3,'{{capture name=Rot assign=rotator}}\r\n{{getCollectionByCategory CollectionID=304 ColumnID=\'4\' Value=\'on\' var=Results OrderColumn=5 }}\r\n\r\n<div id=\"rotator\">\r\n			<div id=\"rotatornavbg\"></div> \r\n								<div id=\"rotatornav\"> \r\n								  <div id=\"rotatorpause\"></div> \r\n								  <div id=\"rotatorresume\"></div> \r\n								  <div id=\"rotatorpages\" style=\"padding-left:357px \"></div> \r\n								</div> \r\n								<div id=\"rotatortitlebg\"></div> \r\n								<div id=\"rotatortitle\"></div> \r\n								<div id=\"rotatorsubtitlebg\"></div> \r\n								<div id=\"rotatorsubtitle\"></div> \r\n			{{assign var=tmp value=\"&qu\"|concat:\"ot;\"}}\r\n			<div class=\"pics\" id=\"slideshow\">\r\n			{{foreach from=$Results item=v key=k name=n}} \r\n			{{assign var=canAccess value=0}}\r\n			{{if $smarty.session.UserID gt 0}}\r\n					{{CollectionCanAccess userId=$smarty.session.UserID CollectionId=273 rowId=$v.$catId var=canAccess}}\r\n			{{/if}}\r\n			<a href=\"{{$v.Collection_304_6}}\"><img {{if $canAccess eq true}}collectionid=\"304\" collectionrowid=\"{{$v.Collection_304_ID}}\" collectioneditor=\"1\" collectionfilter=\"11\"{{/if}} id=\"rotatorimageid{{$smarty.foreach.n.index}}\" title=\"{{$v.Collection_304_1|replace:\'\"\':$tmp}}\" height=\"271\" width=\"960\" alt=\"{{$v.Collection_304_2|replace:\'\"\':$tmp}}\" link=\"{{$v.Collection_304_6}}\" src=\"{{$v.Collection_304_3}}\" /></a> \r\n			{{/foreach}}\r\n			</div>\r\n</div>			\r\n{{/capture}}\r\n{{eval var=$rotator}}\r\n',1239980175,'<script type=\"text/javascript\" src=\"/js/jquery.cycle.js\"></script>\r\n<link media=\"screen\" href=\"/style/jquery.cycle.css\" type=\"text/css\" rel=\"stylesheet\" />','function onBefore(curr, next, opts) \r\n{ \r\n	var index = $(this).parent().children().index(this);\r\n	var title = $(\'#rotatorimageid\'+ index).attr(\'title\'); \r\n	var alt = $(\'#rotatorimageid\'+ index).attr(\'alt\'); \r\n	var link = $(\'#rotatorimageid\'+ index).attr(\'link\'); \r\n \r\n	\r\n	$(\'#rotatortitle\').fadeOut(\'slow\', function() { \r\n			$(\'#rotatortitle\').html(title); \r\n			$(\'#rotatortitle\').fadeIn(\'slow\'); \r\n	}); \r\n	$(\'#rotatorsubtitle\').fadeOut(\'slow\', function() { \r\n			$(\'#rotatorsubtitle\').html(alt); \r\n			$(\'#rotatorsubtitle\').fadeIn(\'slow\'); \r\n	}); \r\n	\r\n	\r\n} \r\n	\r\n	$(\'#slideshow\').cycle({ speed: 2400, timeout: 10000, continuous: 0, before: onBefore, pager: \'#rotatorpages\' , next:   \'#rotatornext\',     prev:   \'#rotatorprev\'  }); \r\n	$(\'#rotatorpause\').click(function() { $(\'#slideshow\').cycle(\'pause\'); }); \r\n	$(\'#rotatorresume\').click(function() { $(\'#slideshow\').cycle(\'resume\', true); }); ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(61,2,1338928997,2,61,247,'CALENDAR - Content Page - Weekly',NULL,2,3,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{assign var=fileNameToUse value=\'/calendar.html\'}}{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Calendar Weekly</h1>\r\n<div>\r\n<div id=\"smarty_plugin\">{{if $smarty.get.month gt 0}} {{assign var=month value=$smarty.get.month}} {{else}} {{assign var=month value=$smarty.now|date_format:\'%m\'}} {{/if}} {{if $smarty.get.year gt 0}} {{assign var=year value=$smarty.get.year}} {{else}} {{assign var=year value=$smarty.now|date_format:\'%Y\'}} {{/if}} {{calendarweekly CollectionID=236 CollectionTypeID=238 CollectionTypeXrefID=239 filter=1 Template=\'calendar-weekly.html\' url_format=\'/calendar-weekly.html?year=%y&month=%m\' year=$year month=$month day=$smarty.now|date_format:\'%d\'}}</div>\r\n</div>\r\n</div>',NULL,'<link rel=\"stylesheet\" type=\"text/css\" href=\"/style/calendar.css\" />\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(62,2,1338929007,2,62,491,'GALLERY - Content Page',NULL,2,3,'{{assign var=galleryid value=$smarty.get.gallery|addslashes}}\r\n{{getCollectionByCategory CollectionID=80 ColumnID=ID Value=$galleryid OrderColumn=ID var=Galleries}}\r\n{{assign var=Gallery value=$Galleries[0]}}\r\n{{assign var=fileNameToUse value=\'/photo-gallery.html\'}}\r\n{{getCollectionByCategory CollectionID=80 ColumnID=3 Value=\'on\' OrderColumn=2 var=AllGalleries}}\r\n{{if $Galleries|@count eq 0}}\r\n	{{assign var=Gallery value=$AllGalleries[0]}}\r\n{{/if}}\r\n{{if $Gallery.Collection_80_3 neq \'on\'}}{{urlredirect page=\'/notfound.html\'}}{{/if}}\r\n{{assign var=\'PageTitle\' value=$Gallery.Collection_80_1}} {{assign var=\'PageTitle\' value=$PageTitle|concat:\' - Photo Galleries \'}}{{setPage var=Collection_17_2 value=$PageTitle}} \r\n{{assign var=fileNameToUse value=\'/photo-gallery.html\'}}\r\n<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n	<h1>{{$Gallery.Collection_80_1}}</h1>\r\n    	\r\n		{{getCollectionByCategory CollectionID=81 ColumnID=5 Value=$Gallery.Collection_80_ID OrderColumn=1 var=table}}\r\n		{{if $table|@count eq 0}}\r\n			<h2>There are no pictures into this category</h2>\r\n		{{else}}\r\n		{{assign var=tableCollectionID value=81}}\r\n		{{assign var=Tnail value=\'Collection_\'|concat:$tableCollectionID|concat:\'_\'|concat:3}}\r\n		{{assign var=Image value=\'Collection_\'|concat:$tableCollectionID|concat:\'_\'|concat:3}}\r\n		{{assign var=Alt   value=\'Collection_\'|concat:$tableCollectionID|concat:\'_\'|concat:4}}\r\n		{{assign var=ID   value=\'Collection_\'|concat:$tableCollectionID|concat:\'_ID\'}}\r\n		<div id=\"photogallery\">\r\n		<div id=\"main_gallery_image\"></div>\r\n		\r\n		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"imageListContainer\"><tr valign=\"top\">\r\n		<td><span id=\"scrollLeft\" class=\"arrow\"><</span></td>\r\n		<td>\r\n		<div id=\"galleryscroller\">\r\n		<ul class=\"gallerylist\" >\r\n		{{foreach from=$table item=v key=k name=n}}\r\n		<li {{if $smarty.foreach.n.first}}class=\"active\"{{/if}}><img src=\"{{$v.$Image}}\" alt=\"{{$v.$Alt|replace:\'\"\':\'\"\'}}\" title=\"{{$v.$Alt|replace:\'\"\':\'\"\'}}\"></li>\r\n		{{/foreach}}\r\n		</ul>\r\n		</div>\r\n		</td>\r\n		<td><span id=\"scrollRight\" class=\"arrow\">></span></td>\r\n		</tr></table>\r\n		</div>\r\n		<div id=\"galleryslideshow\">View Slideshow</div>\r\n		{{/if}}\r\n		\r\n  \r\n</div>',1220883146,'<link href=\"/style/jquery.gallery.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\">\r\n<script type=\"text/javascript\" src=\"/js/jquery.gallery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.scrollcycle.js\"></script>\r\n','$(\"#galleryscroller\").jCarouselLite({\r\n			btnNext: \"#scrollRight\",\r\n			btnPrev: \"#scrollLeft\",\r\n			visible: {{if $table|@count gt 7}}7{{else}}{{math equation=\'x-1\' x=$table|@count}}{{/if}},\r\n			auto: 3000,\r\n			autoStart: false,\r\n			autoStartText: \'View Slideshow\',\r\n			autoStopText: \'Stop Slideshow\',\r\n			autoID: \'#galleryslideshow\',\r\n			speed: 500,\r\n			beforeStart: function(a) {\r\n           				\r\n						$.galleria.next();\r\n						\r\n       		}\r\n\r\n		});\r\n\r\n		\r\n		$(\'ul.gallerylist\').galleria({\r\n			history   : false, // activates the history object for bookmarking, back-button etc.\r\n			clickNext : true, // helper for making the image clickable\r\n			insert    : \'#main_gallery_image\', // the containing selector for our main image\r\n			onImage   : function(image,caption,thumb) { // let\'s add some image effects for demonstration purposes\r\n				\r\n				// fade in the image & caption\r\n				if(! ($.browser.mozilla && navigator.appVersion.indexOf(\"Win\")!=-1) ) { // FF/Win fades large images terribly slow\r\n					image.css(\'display\',\'none\').fadeIn(1000);\r\n				}\r\n				caption.css(\'display\',\'none\').fadeIn(1000);\r\n				\r\n				// fetch the thumbnail container\r\n				var _li = thumb.parents(\'li\');\r\n				\r\n				// fade out inactive thumbnail\r\n				_li.siblings().children(\'img.selected\').fadeTo(500,0.3);\r\n				\r\n				// fade in active thumbnail\r\n				thumb.fadeTo(\'fast\',1).addClass(\'selected\');\r\n				\r\n				// add a title for the clickable image\r\n				image.attr(\'title\',\'Next image >>\');\r\n			},\r\n			onThumb : function(thumb) { // thumbnail effects goes here\r\n				\r\n				// fetch the thumbnail container\r\n				var _li = thumb.parents(\'li\');\r\n				\r\n				// if thumbnail is active, fade all the way.\r\n				var _fadeTo = _li.is(\'.active\') ? \'1\' : \'0.3\';\r\n				\r\n				// fade in the thumbnail when finnished loading\r\n				thumb.css({display:\'none\',opacity:_fadeTo}).fadeIn(1500);\r\n				\r\n				// hover effects\r\n				thumb.hover(\r\n					function() { thumb.fadeTo(\'fast\',1); },\r\n					function() { _li.not(\'.active\').children(\'img\').fadeTo(\'fast\',0.3); } // don\'t fade out if the parent is active\r\n				)\r\n			}\r\n		});',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(63,2,1338929024,2,63,663,'GALLERY - JQuery Gallery',NULL,2,3,'{{RunQuery ResultsVar=galleries q=\"SELECT Collection_80.* , Collection_81.* FROM Collection_81 INNER JOIN Collection_80 ON Collection_80_ID = Collection_81_5 WHERE Collection_80_1 IS NOT NULL AND Collection_80_4 IS NOT NULL AND Collection_80_3 = \'on\' Group By Collection_80_ID Order By Collection_80_2 , Collection_81_6 , Collection_81_1 \"}}\r\n<div id=\"photo-module\">{{assign var=tmp value=\"&qu\"|concat:\"ot;\"}}\r\n{{if $galleries|@count gt 0}}\r\n{{assign var=morepages value=0}}\r\n<div id=\"thumbs\">\r\n	<div class=\"thumb-section\">\r\n	{{foreach from=$galleries item=v kye=k name=n}}\r\n		{{if $smarty.foreach.n.index gt 0 and $smarty.foreach.n.index % 9 eq 0}}{{assign var=morepages value=1}}</div><div class=\"thumb-section\">{{/if}}\r\n		<a href=\"{{$v.Collection_81_2}}\" class=\"thumb\" id=\"gallery-{{$v.Collection_80_ID}}\">\r\n          <img src=\"{{$v.Collection_80_4}}\" alt=\"{{$v.Collection_80_1|replace:\'\"\':$tmp}}\">\r\n          <div class=\"thumb-text\">\r\n            {{$v.Collection_80_1|replace:\'\"\':$tmp}}\r\n          </div><!-- div.thumb-text -->\r\n        </a><!-- div.thumb -->\r\n	{{/foreach}}\r\n	</div>\r\n</div>\r\n{{if $morepages eq 1}}\r\n<div id=\"thumbs-nav\">\r\n      <ul>\r\n      </ul>\r\n</div><!-- div#photo-module-nav -->	\r\n{{/if}}\r\n{{/if}}\r\n</div>\r\n<div class=\"clear\"></div>',1318429416,'<link rel=\"stylesheet\" href=\"/style/gallery/ox-box.css\" media=\"screen\">\r\n<link rel=\"stylesheet\" href=\"/style/gallery/prettyPhoto.css\" media=\"screen\">\r\n<script src=\"/js/gallery/jquery.cycle.all.js\"></script>\r\n<script src=\"/js/gallery/jquery.prettyPhoto.js\"></script>\r\n<script src=\"/js/gallery/jquery.oxbox.js\"></script>','{{foreach from=$galleries item=v kye=k name=n}}\r\n	\r\n	{{getCollectionByCategory CollectionID=81 ColumnID=5 Value=$v.Collection_80_ID OrderColumn=6 var=Gphotos}}\r\n	$(\'#gallery-{{$v.Collection_80_ID}}\').click(function(){\r\n		\r\n		{{assign var=gimg value=\'\'}}\r\n		{{assign var=galbum value=\'\'}}\r\n		{{assign var=gtitles value=\'\'}}\r\n		{{assign var=gdesc value=\'\'}}\r\n		\r\n		{{assign var=quottmp value=\"&ac\"|concat:\"ute;\"}}\r\n		\r\n		{{foreach from=$Gphotos item=vv key=kk name=nn}}\r\n				{{if $smarty.foreach.nn.index gt 0}}\r\n						{{assign var=gimg value=$gimg|concat:\',\'}}\r\n						{{assign var=galbum value=$galbum|concat:\',\'}}\r\n						{{assign var=gtitles value=$gtitles|concat:\',\'}}\r\n						{{assign var=gdesc value=$gdesc|concat:\',\'}}\r\n				{{/if}}\r\n				\r\n				{{assign var=theValue value=$vv.Collection_81_2|replace:\"\'\":$quottmp}}{{assign var=gimg value=$gimg|concat:\"\'\"|concat:$theValue|concat:\"\'\"}}\r\n				{{assign var=theValue value=$v.Collection_80_1|replace:\"\'\":$quottmp}}{{assign var=galbum value=$galbum|concat:\"\'\"|concat:$theValue|concat:\"\'\"}}\r\n				{{assign var=theValue value=$vv.Collection_81_1|replace:\"\'\":$quottmp}}{{assign var=gtitles value=$gtitles|concat:\"\'\"|concat:$theValue|concat:\"\'\"}}\r\n				{{assign var=theValue value=$vv.Collection_81_4|replace:\"\'\":$quottmp}}{{assign var=gdesc value=$gdesc|concat:\"\'\"|concat:$theValue|concat:\"\'\"}}\r\n		\r\n		{{/foreach}}\r\n	\r\n        gallery_{{$v.Collection_80_ID}}_images = [{{$gimg}}]\r\n        gallery_{{$v.Collection_80_ID}}_album = [{{$galbum}}];\r\n        gallery_{{$v.Collection_80_ID}}_titles = [{{$gtitles}}];\r\n        gallery_{{$v.Collection_80_ID}}_desc = [{{$gdesc}}];\r\n        $.prettyPhoto.open(gallery_{{$v.Collection_80_ID}}_images,gallery_{{$v.Collection_80_ID}}_album,gallery_{{$v.Collection_80_ID}}_titles,gallery_{{$v.Collection_80_ID}}_desc);\r\n        return false;\r\n      });\r\n{{/foreach}}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(64,2,1338929034,2,64,48,'SHOPPING CART - Edit Cart Code',NULL,2,3,'{{assign var=CartCollection				value=133}}\r\n{{assign var=ShippingCollection			value=139}}\r\n{{assign var=CartDetailsCollection		value=134}}\r\n{{assign var=TaxCollection				value=151}}\r\n{{assign var=SessionID   		value=\'\'|sessionid}}\r\n{{getCollectionByCategory CollectionID=$CartCollection Collection_133_1=$SessionID aditionalFilter=\' (Collection_133_5<>\"on\" or Collection_133_5 IS NULL) \' var=CartData OrderColumn=\'ID\'}}\r\n\r\n{{assign var=CartDataItem value=$CartData[0]}}\r\n{{assign var=CartID value=$CartDataItem.Collection_133_ID}}\r\n{{assign var=CouponID value=$CartDataItem.Collection_133_16}}\r\n{{assign var=CouponDiscountValue value=$CartDataItem.Collection_133_27}}\r\n{{assign var=MethodID value=$CartDataItem.Collection_133_17}}\r\n{{assign var=ChoosenZip value=$CartDataItem.Collection_133_30}}\r\n{{assign var=ChoosenShippingPrice value=$CartDataItem.Collection_133_26}}\r\n{{assign var=PaymentMethodID value=$CartDataItem.Collection_133_19}}\r\n{{assign var=ProductsTotalValue value=$CartDataItem.Collection_133_24}}\r\n{{assign var=CartTotalValue value=$CartDataItem.Collection_133_23}}\r\n{{assign var=CartTaxValue value=$CartDataItem.Collection_133_25}}\r\n\r\n\r\n{{assign var=CartClosed value=$CartDataItem.Collection_133_28}}\r\n	\r\n{{if $CouponID gt 0}}	\r\n	{{getCollectionByCategory CollectionID=135 ColumnID=\'ID\' Value=$CouponID var=Coupons OrderColumn=\'ID\'}}\r\n	{{assign var=CouponData value=$Coupons[0]}}\r\n	{{assign var=Coupon value=$CouponData.Collection_135_3}}\r\n{{/if}}\r\n	\r\n	\r\n	{{getCollectionByCategory CollectionID=$CartDetailsCollection ColumnID=1 Value=$CartID var=CartDetails OrderColumn=\'ID\'}}\r\n	{{assign var=CartDetailPrefix   	value=\'Collection_\'}}\r\n	{{assign var=CartDetailPrefix   	value=$CartDetailPrefix|concat:$CartDetailsCollection|concat:\'_\'}}\r\n	{{assign var=CartDetailID 			value=$CartDetailPrefix|concat:\'ID\'}}\r\n	{{assign var=CartDetailFreeShipping	value=$CartDetailPrefix|concat:\'8\'}}\r\n	{{assign var=CartDetailName 		value=$CartDetailPrefix|concat:\'7\'}}\r\n	{{assign var=CartDetailProductID 	value=$CartDetailPrefix|concat:\'2\'}}\r\n	{{assign var=CartDetailQuantity 	value=$CartDetailPrefix|concat:\'3\'}}\r\n	{{assign var=CartDetailPriceID 		value=$CartDetailPrefix|concat:\'4\'}}\r\n	{{assign var=CartDetailPrice 		value=$CartDetailPrefix|concat:\'5\'}}\r\n	{{assign var=CartDetailPriceDesc 	value=$CartDetailPrefix|concat:\'6\'}}\r\n	{{assign var=CartDetailTax 	        value=$CartDetailPrefix|concat:\'12\'}}\r\n	{{assign var=CartDetailOffer 	    value=$CartDetailPrefix|concat:\'11\'}}\r\n	{{assign var=CartDetailPriceWithDiscount       value=$CartDetailPrefix|concat:\'10\'}}\r\n	\r\n	\r\n<form name=\"sh_cart\" action=\"\" method=\"post\" id=\"shcartForm\">\r\n	\r\n	{{if $errors neq \'\'}}\r\n		<div id=\"carterrors\">\r\n			<ul>{{$errors}}</ul>\r\n		</div>\r\n	{{/if}}\r\n	<div id=\"editcartcontainer\">\r\n				<div class=\"sep\"><img src=\"/images/sep.gif\" height=\"5\"/></div>\r\n				<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\r\n				<tr>\r\n					<td  class=\"heading\"><strong>Item</strong></td>\r\n					<td  class=\"heading\"><strong>Qty.</strong></td>\r\n					<td  class=\"heading\" align=\"right\"><strong>Price</strong></td>\r\n					<td  class=\"heading\"><img src=\"/images/sep.gif\" height=\"15\"/></td>\r\n				</tr>\r\n				{{foreach from=$CartDetails item=v key=k name=clist}}\r\n					\r\n					\r\n					{{if $smarty.foreach.clist.iteration % 2 eq 0}}\r\n						{{assign var=class value=\'odd\'}}\r\n					{{else}}\r\n						{{assign var=class value=\'even\'}}\r\n					{{/if}}\r\n					\r\n					<tr valign=\"top\">\r\n							<td class=\"item {{$class}}\">{{$v.$CartDetailName}} <br/>  {{if $v.$CartDetailOffer neq \'\'}}<br/>{{$v.$CartDetailOffer}}{{/if}}</td>\r\n							<td class=\"data {{$class}}\" width=\"50\">{{if $CartClosed neq \'on\'}}<input type=\"text\" size=\"2\" value=\"{{$v.$CartDetailQuantity}}\" id=\"q_{{$v.$CartDetailID}}\" name=\"q_{{$v.$CartDetailID}}\" class=\"input\"/> <img src=\"/images/update.gif\" class=\"updateicon\" title=\"Update Cart\"/> {{else}}{{$v.$CartDetailQuantity}}{{/if}}</td>\r\n							<td class=\"data {{$class}}\" align=\"right\">${{$v.$CartDetailPriceWithDiscount|string_format:\'%.2f\'}}{{if $v.$CartDetailPriceWithDiscount neq $v.$CartDetailPrice}}<br/>(Regular Price: ${{$v.$CartDetailPrice|string_format:\'%.2f\'}}){{/if}}<br/>\r\n							{{if $CartClosed neq \'on\'}}\r\n									<a href=\"javascript://\" id=\"remove{{$v.$CartDetailID}}\">Remove</a>\r\n									{{capture name=nozip assign=needhelp}}\r\n									$(\'#remove{{$v.$CartDetailID}}\').click(function(){ $(\'#q_{{$v.$CartDetailID}}\').val(\'0\'); $(\'#shcartForm\').submit(); });\r\n									\r\n									{{/capture}}\r\n								{{assign var=JavaScriptJQueryCode value=$JavaScriptJQueryCode|concat:\' \'|concat:$needhelp}}\r\n							{{/if}}\r\n							</td>\r\n							<td class=\"{{$class}}\"><img src=\"/images/sep.gif\" height=\"15\"/></td>\r\n					</tr>\r\n				{{/foreach}}\r\n					</table>\r\n		</div>			\r\n		<div class=\"totals right\"><strong>Total: ${{$ProductsTotalValue|string_format:\'%.2f\'}}</strong></div>\r\n		\r\n		<div id=\"cartdetailscontainer\">\r\n					<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n					<tr valign=\"top\">\r\n						<td>Payment Method:</td>\r\n						{{getCollectionByCategory CollectionID=147 ColumnID=\'2\' Value=\'on\' var=PaymentMethods OrderColumn=\'ID\'}}\r\n						<td>\r\n						\r\n						{{if $PaymentMethods|@count gt 1}}\r\n								\r\n								\r\n									{{foreach from=$PaymentMethods item=v key=k}}\r\n										<input type=\"radio\" name=\"paymentmethod\" {{if $v.Collection_147_ID eq $MethodID}} checked{{/if}} value=\"{{$v.Collection_147_ID}}\"/> {{$v.Collection_147_1}}<br/>\r\n									{{/foreach}}\r\n								\r\n								{{else}}\r\n								{{assign var=PaymentMethod	value=$PaymentMethods[0]}}\r\n								<input type=\"hidden\" name=\"paymentmethod\" value=\"{{$PaymentMethod.Collection_147_ID}}\"/> {{$PaymentMethod.Collection_147_1}}\r\n								{{/if}}\r\n						\r\n						</td>\r\n					</tr>\r\n					<tr valign=\"top\">\r\n						<td>Discount Code:</td>\r\n						<td><input type=\"text\" size=\"28\" name=\"coupon\" class=\"input\" value=\"{{$Coupon}}\"/></td>\r\n					</tr>\r\n					<tr valign=\"top\">\r\n						<td>ZIP Code (to calculate tax):</td>\r\n						<td><input type=\"text\" class=\"input\" value=\"{{$ChoosenZip}}\" name=\"zipcode\" id=\"zipcodeshipping\"/></td>\r\n					</tr>\r\n					<tr>\r\n						<td colspan=\"2\">\r\n						<input type=\"submit\" name=\"startcalculate\" id=\"startcalculate\" value=\"Update Cart\" />\r\n						{{if $smarty.get.page neq \'\'}}\r\n			    			<p><a href=\"{{$smarty.get.page}}\">Continue Shopping</a></p>\r\n						{{else}}\r\n							<p><a href=\"/store/\">Continue Shopping</a></p>\r\n			    		{{/if}}  \r\n						</td>\r\n					</tr>\r\n					</table>\r\n		\r\n		</div>\r\n		\r\n		<div id=\"cartsummary\">\r\n					<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n					<tr valign=\"top\">\r\n						<td class=\"text\">Merchandise Value</td>\r\n						<td class=\"value\">${{$ProductsTotalValue|string_format:\'%.2f\'}}</td>\r\n					</tr>\r\n					<tr valign=\"top\">\r\n						<td class=\"text\">Shipping Value</td>\r\n						<td class=\"value\">${{$ChoosenShippingPrice|string_format:\'%.2f\'}}</td>\r\n					</tr>\r\n					<tr valign=\"top\">\r\n						<td class=\"text\">Tax Value</td>\r\n						<td class=\"value\">${{$CartTaxValue|string_format:\'%.2f\'}}</td>\r\n					</tr>\r\n					{{if $Coupon neq \'\'}}\r\n					<tr>\r\n						<td class=\"text\"><strong>Coupon Code:</strong></td>\r\n						<td class=\"value\">{{$Coupon}}</td>\r\n					</tr>\r\n					<tr>\r\n						<td colspan=\"2\">{{$CouponData.Collection_135_7}}</td>\r\n					</tr>\r\n					<tr>\r\n						<td class=\"text\"><strong>Coupon Discount Value:</strong></td>\r\n						<td class=\"value\">${{$CouponDiscountValue|string_format:\'%.2f\'}}</td>\r\n					</tr>\r\n					{{/if}}\r\n					<tr>\r\n						<td class=\"totals\"><strong>Grand Total:</strong></td>\r\n						<td class=\"totals\">${{$CartTotalValue|string_format:\'%.2f\'}}</td>\r\n					</tr>\r\n					\r\n					</table>\r\n		\r\n		</div>										\r\n		\r\n		<div id=\"cartcheckout\">\r\n				<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">\r\n				<tr valign=\"middle\">\r\n					<td class=\"column\" align=\"center\" width=\"50%\">\r\n						<p>Need Help?</p>\r\n						<p><a href=\"javascript://\" class=\"needhelp\">Click here!</a></p>\r\n					</td>\r\n					<td class=\"column\" align=\"center\">\r\n						<input type=\"submit\" name=\"checkout\" id=\"startcalculate\" value=\"Checkout\" />\r\n					</td>\r\n				</tr>\r\n				</table>\r\n		\r\n		</div>			\r\n					\r\n					 \r\n										\r\n				<div id=\"needhelp\" style=\"display:none \">{{getcontent id=141}}</div>\r\n				{{capture name=nozip assign=needhelp}}\r\n					$(\'.needhelp\').click(function(){\r\n\r\n							var tmpHtml = $(\'#needhelp\').html();\r\n							$(this).o2dialog( {\r\n									width: 300, \r\n									height: 60 ,\r\n									title: \'Need Help?\',\r\n									content: \'<br/>\'+tmpHtml ,\r\n									onUnLoad: function(){\r\n										$(\'#needhelpdialog\').remove();\r\n									}\r\n							});\r\n					\r\n					});\r\n					\r\n					$(\'.updateicon\').click(function(){\r\n									$(\'#shcartForm\').submit();						\r\n							}).css(\'cursor\',\'pointer\');\r\n					\r\n				{{/capture}}\r\n				{{assign var=JavaScriptJQueryCode value=$JavaScriptJQueryCode|concat:\' \'|concat:$needhelp}}\r\n				\r\n				\r\n	\r\n	\r\n	\r\n				\r\n				\r\n			\r\n\r\n</form>',NULL,'<script type=\"text/javascript\" src=\"/js/jquery.dialog.js\"></script>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(65,2,1338929593,2,65,1,'Main Template',NULL,3,1,'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n	<head xmlns=\"\">\r\n		<title>{{$page.Collection_17_2}}</title>\r\n                <meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\" />\r\n                <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n                <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n                <meta content=\"index,follow\" name=\"robots\" />\r\n                <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n	</head>\r\n	<body xmlns=\"\">\r\n		<div id=\"container\">\r\n			<div id=\"sitename\">\r\n				{{getcontent id=5}}</div>\r\n			<div id=\"mainmenu\">\r\n				{{getcontent id=21}}</div>\r\n			<div id=\"wrap\">\r\n				<div>\r\n					{{$content}}</div>\r\n				<div class=\"clearingdiv\">\r\n					 </div>\r\n			</div>\r\n		</div>\r\n		<div id=\"footer\">\r\n			{{getcontent id=23}}</div>\r\n<!-- edit -->\r\n	</body>\r\n</html>',NULL,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n {{$FrontEndJavaScriptJQueryIncludeCode}} {{$JavaScriptJQueryIncludeCode}}','<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(66,2,1338989880,2,66,1,'Main Template',NULL,3,1,'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n	<head xmlns=\"\">\r\n		<title>{{$page.Collection_17_2}}</title>\r\n                <meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\" />\r\n                <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n                <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n                <meta content=\"index,follow\" name=\"robots\" />\r\n                <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n	</head>\r\n	<body xmlns=\"\">\r\n		<div id=\"container\">\r\n			<div id=\"sitename\">\r\n				{{getcontent id=5}}</div>\r\n			<div id=\"mainmenu\">\r\n				{{getcontent id=21}}</div>\r\n			<div id=\"wrap\">\r\n				<div>\r\n					{{$content}}</div>\r\n				<div class=\"clearingdiv\">\r\n					 </div>\r\n			</div>\r\n		</div>\r\n		<div id=\"footer\">\r\n			{{getcontent id=23}}</div>\r\n<!-- edit -->\r\n	</body>\r\n</html>',NULL,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>','{{$FrontEndJavaScriptJQueryIncludeCode}} {{$JavaScriptJQueryIncludeCode}}\r\n<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(67,2,1344449881,2,67,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Oxiem CMS1</h1>\r\n<h3>Heading 33</h3>\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n<br />\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(68,2,1344449945,2,68,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\n</div>\n<div id=\"contentalt\">\n<h1>Oxiem CMS1</h1>\n<h3>Heading 33</h3>\n<p>This is a new piece of content. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\n\n<h4>Heading 4</h4>\n<p><span>Unordered list.</span></p>\n<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n</ul>\n<p><span>Ordered list.</span></p>\n<ol>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n</ol>\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n<br>\n<div>\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\n</div>\n<p>&nbsp;</p>\n</div>\n<p>&nbsp;</p>\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(120,22,1373551706,2,120,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\n</div>\n<div id=\"contentalt\">\n<h1>Oxiem CMS1</h1>\n<h3>Heading 33</h3>\n<p>This is a new piece of content. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\n<p>Fusce pretium gravida sollicitudin. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam gravida dictum lobortis. Donec fermentum quam sit amet elit viverra cursus sodales nisl porta. Suspendisse luctus augue eget ante congue vitae dapibus leo placerat. Fusce ipsum enim, lacinia eu volutpat vel, scelerisque in erat. Aliquam erat volutpat. In pulvinar tellus sit amet nulla eleifend sit amet scelerisque tortor auctor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>\n<p>Ut euismod, lacus a ullamcorper facilisis, est ipsum iaculis tortor, vitae pellentesque eros sapien vel est. In ac libero nisl. Praesent mi massa, fermentum dapibus cursus eget, feugiat eget urna. Nunc nec turpis vel tellus commodo scelerisque. Vestibulum ultricies molestie quam non vulputate. Etiam lobortis consequat euismod. Sed sed diam urna. Integer euismod venenatis ultrices. Aliquam eu sodales nibh. Sed aliquet sodales laoreet. Curabitur a urna eu dolor eleifend sollicitudin. Nullam dignissim rutrum massa, varius sagittis lorem scelerisque ac. Aliquam ut magna eget mauris ultricies mollis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam venenatis, massa laoreet rutrum vulputate, diam magna placerat metus, sit amet suscipit lorem arcu id lorem.</p>\n<p>Aliquam at nisl et enim gravida tincidunt eu et sapien. Nullam eleifend, erat quis mattis placerat, risus nulla ultricies nibh, eget dictum elit nisl sed mi. In hac habitasse platea dictumst. Fusce commodo, ipsum vitae egestas tempus, enim urna aliquet quam, nec cursus quam diam nec augue. Nulla facilisi. Aenean id purus aliquam dolor condimentum iaculis. Sed eu nibh lectus. Maecenas nec augue at nibh vestibulum malesuada. Quisque pellentesque, purus consequat tempor convallis, lectus enim faucibus leo, eget eleifend orci ipsum commodo sapien. Mauris vitae vehicula urna. Vivamus volutpat sollicitudin dolor, et consectetur tellus egestas vitae. Cras luctus dignissim euismod. Nam semper, diam a accumsan dictum, tellus leo ultrices justo, a convallis tortor leo non felis. Donec pharetra urna sed massa vulputate tristique.</p>\n<p>Proin enim ante, luctus vel tristique varius, bibendum nec magna. Vestibulum rutrum elit nec elit scelerisque vulputate. Nulla vitae est odio, at malesuada tortor. Pellentesque et tincidunt risus. Sed nec ligula ligula, eu porttitor nibh.</p>\n\n<h4>Heading 4</h4>\n<p><span>Unordered list.</span></p>\n<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n	<li>regterg</li>\n</ul>\n<p><span>Ordered list.</span></p>\n<ol>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n</ol>\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n<br>\n<div>\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\n</div>\n<p>&nbsp;</p>\n</div>\n<p>&nbsp;</p>\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(119,1,1373541051,2,119,1,'Main Template',NULL,3,1,'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n	<head xmlns=\"\">\r\n		<title>{{$page.Collection_17_2}}</title>\r\n                <meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\" />\r\n                <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n                <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n                <meta content=\"index,follow\" name=\"robots\" />\r\n                <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n	</head>\r\n	<body xmlns=\"\">\r\n		<div id=\"container\">\r\n			<div id=\"sitename\">\r\n				{{getcontent id=5}}</div>\r\n			<div id=\"mainmenu\">\r\n				{{getcontent id=21}}</div>\r\n			<div id=\"wrap\">\r\n				<div>\r\n					{{$content}}</div>\r\n				<div class=\"clearingdiv\">\r\n					 </div>\r\n			</div>\r\n		</div>\r\n		<div id=\"footer\">\r\n			{{getcontent id=23}}</div>\r\n<!-- edit -->\r\n</bo{{**}}dy>\r\n</html>',NULL,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n{{$JavaScriptJQueryIncludeCode}}','{{$FrontEndJavaScriptJQueryIncludeCode}}\r\n<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(118,1,1373540783,2,118,1,'Main Template',NULL,3,1,'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n	<head xmlns=\"\">\r\n		<title>{{$page.Collection_17_2}}</title>\r\n                <meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\" />\r\n                <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n                <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n                <meta content=\"index,follow\" name=\"robots\" />\r\n                <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n	</head>\r\n	<body xmlns=\"\">\r\n		<div id=\"container\">\r\n			<div id=\"sitename\">\r\n				{{getcontent id=5}}</div>\r\n			<div id=\"mainmenu\">\r\n				{{getcontent id=21}}</div>\r\n			<div id=\"wrap\">\r\n				<div>\r\n					{{$content}}</div>\r\n				<div class=\"clearingdiv\">\r\n					 </div>\r\n			</div>\r\n		</div>\r\n		<div id=\"footer\">\r\n			{{getcontent id=23}}</div>\r\n<!-- edit -->\r\n	</body>\r\n</html>',NULL,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n{{$JavaScriptJQueryIncludeCode}}','{{$FrontEndJavaScriptJQueryIncludeCode}}\r\n<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(127,1,1373613429,2,127,260,'NEWS - Category News',NULL,2,3,'{{assign var=fileNameToUse value=\'/news/\'}}\r\n<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n{{getCollectionByCategory CollectionID=273 ColumnID=\'ID\' Value=$smarty.get.category OrderColumn=\'ID\' var=Category}} \r\n{{assign var=CategoryDetails value=$Category[0]}} \r\n{{assign var=\'PageTitle\' value=\'News - \'}} \r\n{{assign var=\'PageTitle\' value=$PageTitle|concat:$CategoryDetails.Collection_273_1}} \r\n{{setPage var=Collection_17_2 value=$PageTitle}}\r\n{{createArray array=$Category var=Categories CollectionID=273 ColumnID=\'ID\'}}\r\n<h1>{{$CategoryDetails.Collection_273_1}}</h1>\r\n<p>Click <a href=\"/news/archives/{{$smarty.get.category}}/\">here</a> for <em>{{$CategoryDetails.Collection_273_1}}</em> archives</p>\r\n<p>{{$CategoryDetails.Collection_273_3}}</p>\r\n{{news newsContentID=270 isArchived=0 filterCategories=$Categories var=Results NewsCollection=274 NewsCategoriesCollection=273 NewsCategoriesXRefCollection=275}}\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(124,1,1373612484,2,124,23,'Footer',NULL,6,1,'<p>\r\n	<label>Locations</label></p>\r\n<div class=\"location\">\r\n	<strong>Springfield</strong> <span>1 South Limestone</span> <span>Springfield, OH 45502</span></div>\r\n<div class=\"location\">\r\n	<strong>Columbus</strong> <span>7003 Post Road, Suite 416</span> <span>Dublin, OH 43016</span></div>\r\n',1204543904,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(125,1,1373613352,2,125,256,'NEWS - Archive',NULL,2,3,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>News Archives</h1>\r\n{{news newsContentID=263 var=Results NewsCollection=274 NewsCategoriesCollection=273 NewsCategoriesXRefCollection=275 limit=20 filterCategories=0 isArchived=1}}\r\n</div>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(126,1,1373613380,2,126,257,'NEWS - Archives Category News',NULL,2,3,'{{assign var=fileNameToUse value=\'/news/archives/\'}}\r\n<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n{{getCollectionByCategory CollectionID=273 ColumnID=\'ID\' Value=$smarty.get.category OrderColumn=\'ID\' var=Category}} \r\n{{assign var=CategoryDetails value=$Category[0]}} \r\n{{assign var=\'PageTitle\' value=\'News Archives - \'}} \r\n{{assign var=\'PageTitle\' value=$PageTitle|concat:$CategoryDetails.Collection_273_1}} \r\n{{setPage var=Collection_17_2 value=$PageTitle}}\r\n{{createArray array=$Category var=Categories CollectionID=273 ColumnID=\'ID\'}}\r\n<h1>{{$CategoryDetails.Collection_273_1}}</h1>\r\n<p>{{$CategoryDetails.Collection_273_3}}</p>\r\n\r\n{{news newsContentID=263 isArchived=1 filterCategories=$Categories var=Results NewsCollection=274 NewsCategoriesCollection=273 NewsCategoriesXRefCollection=275}}\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(74,1,1347537389,2,74,663,'GALLERY - JQuery Gallery',NULL,2,3,'{{RunQuery ResultsVar=galleries q=\"SELECT Collection_80.* , Collection_81.* FROM Collection_81 INNER JOIN Collection_80 ON Collection_80_ID = Collection_81_5 WHERE Collection_80_1 IS NOT NULL AND Collection_80_4 IS NOT NULL AND Collection_80_3 = \'on\' Group By Collection_80_ID Order By Collection_80_2 , Collection_81_6 , Collection_81_1 \"}}\r\n<div id=\"photo-module\">{{assign var=tmp value=\"&qu\"|concat:\"ot;\"}}\r\n{{if $galleries|@count gt 0}}\r\n{{assign var=morepages value=0}}\r\n<div id=\"thumbs\">\r\n	<div class=\"thumb-section\">\r\n	{{foreach from=$galleries item=v kye=k name=n}}\r\n		{{if $smarty.foreach.n.index gt 0 and $smarty.foreach.n.index % 9 eq 0}}{{assign var=morepages value=1}}</div><div class=\"thumb-section\">{{/if}}\r\n		<a href=\"{{$v.Collection_81_2}}\" class=\"thumb\" id=\"gallery-{{$v.Collection_80_ID}}\">\r\n          <img src=\"{{$v.Collection_80_4}}\" alt=\"{{$v.Collection_80_1|replace:\'\"\':$tmp}}\">\r\n          <div class=\"thumb-text\">\r\n            {{$v.Collection_80_1|replace:\'\"\':$tmp}}\r\n          </div><!-- div.thumb-text -->\r\n        </a><!-- div.thumb -->\r\n	{{/foreach}}\r\n	</div>\r\n</div>\r\n{{if $morepages eq 1}}\r\n<div id=\"thumbs-nav\">\r\n      <ul>\r\n      </ul>\r\n</div><!-- div#photo-module-nav -->	\r\n{{/if}}\r\n{{/if}}\r\n</div>\r\n<div class=\"clear\"></div>',1318429416,'<script src=\"/js/gallery/jquery.cycle.all.js\"></script>\r\n<script src=\"/js/gallery/jquery.prettyPhoto.js\"></script>\r\n<script src=\"/js/gallery/jquery.oxbox.js\"></script>','{{foreach from=$galleries item=v kye=k name=n}}\r\n	\r\n	{{getCollectionByCategory CollectionID=81 ColumnID=5 Value=$v.Collection_80_ID OrderColumn=6 var=Gphotos}}\r\n	$(\'#gallery-{{$v.Collection_80_ID}}\').click(function(){\r\n		\r\n		{{assign var=gimg value=\'\'}}\r\n		{{assign var=galbum value=\'\'}}\r\n		{{assign var=gtitles value=\'\'}}\r\n		{{assign var=gdesc value=\'\'}}\r\n		\r\n		{{assign var=quottmp value=\"&ac\"|concat:\"ute;\"}}\r\n		\r\n		{{foreach from=$Gphotos item=vv key=kk name=nn}}\r\n				{{if $smarty.foreach.nn.index gt 0}}\r\n						{{assign var=gimg value=$gimg|concat:\',\'}}\r\n						{{assign var=galbum value=$galbum|concat:\',\'}}\r\n						{{assign var=gtitles value=$gtitles|concat:\',\'}}\r\n						{{assign var=gdesc value=$gdesc|concat:\',\'}}\r\n				{{/if}}\r\n				\r\n				{{assign var=theValue value=$vv.Collection_81_2|replace:\"\'\":$quottmp}}{{assign var=gimg value=$gimg|concat:\"\'\"|concat:$theValue|concat:\"\'\"}}\r\n				{{assign var=theValue value=$v.Collection_80_1|replace:\"\'\":$quottmp}}{{assign var=galbum value=$galbum|concat:\"\'\"|concat:$theValue|concat:\"\'\"}}\r\n				{{assign var=theValue value=$vv.Collection_81_1|replace:\"\'\":$quottmp}}{{assign var=gtitles value=$gtitles|concat:\"\'\"|concat:$theValue|concat:\"\'\"}}\r\n				{{assign var=theValue value=$vv.Collection_81_4|replace:\"\'\":$quottmp}}{{assign var=gdesc value=$gdesc|concat:\"\'\"|concat:$theValue|concat:\"\'\"}}\r\n		\r\n		{{/foreach}}\r\n	\r\n        gallery_{{$v.Collection_80_ID}}_images = [{{$gimg}}]\r\n        gallery_{{$v.Collection_80_ID}}_album = [{{$galbum}}];\r\n        gallery_{{$v.Collection_80_ID}}_titles = [{{$gtitles}}];\r\n        gallery_{{$v.Collection_80_ID}}_desc = [{{$gdesc}}];\r\n        $.prettyPhoto.open(gallery_{{$v.Collection_80_ID}}_images,gallery_{{$v.Collection_80_ID}}_album,gallery_{{$v.Collection_80_ID}}_titles,gallery_{{$v.Collection_80_ID}}_desc);\r\n        return false;\r\n      });\r\n{{/foreach}}','<link rel=\"stylesheet\" href=\"/style/gallery/ox-box.css\" media=\"screen\">\r\n<link rel=\"stylesheet\" href=\"/style/gallery/prettyPhoto.css\" media=\"screen\">',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(75,1,1351242253,2,75,678,'SYSTEM - Tree View - Migration - Details',NULL,2,3,NULL,1351242249,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(76,1,1351244044,2,76,678,'SYSTEM - Tree View - Migration - Details',NULL,2,3,'{{if $TreeData|@count gt 0}}\r\n<ul {{if $Level eq 0}}class=\"treeview\" id=\"treeview{{$CID}}\"{{/if}}>\r\n{{foreach from=$TreeData item=v key=k name=n}}{{assign var=Level value=$Level|add:\'1\'}}\r\n	{{assign var=className value=\'black\'}}\r\n	{{if $v.Collection_400_3 eq 5}}{{assign var=className value=\'green\'}}{{/if}}\r\n	{{if $v.Collection_400_3 eq 4}}{{assign var=className value=\'red\'}}{{/if}}\r\n	<li id=\"liitem{{$CID}}{{$v.CategoryID}}\">\r\n		<a id=\"item{{$CID}}{{$v.CategoryID}}\" href=\"/{{$smarty.const.ADMIN_APP_DIR}}/admin.php?module_id=1&action=update&id=400&gs=&st=&Search=Apply+Filter&FilterSave=0&FilterName=&&eid={{$v.CategoryID}}\" target=\"_blank\">\r\n			<span class=\"{{$className}}\">{{$v.CategoryName}}</span>\r\n		</a>\r\n		{{getTreeChildNumberAdmin var=TreeData CategoryID=$v.CategoryID CID=$CID SCID=$SCID OrderCol=$OrderCol OrderWay=OrderWay DisplayColumn=$DisplayColumn Level=$Level page=$TreePageTemplate}}\r\n	</li>\r\n{{/foreach}}{{assign var=Level value=$Level|add:\'-1\'}}\r\n</ul>\r\n{{else}}{{assign var=Level value=$Level|add:\'-1\'}}{{/if}}',1351242249,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(77,1,1351254223,2,77,260,'NEWS - Category News',NULL,2,3,'{{assign var=fileNameToUse value=\'/news/\'}}\r\n<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n{{getCollectionByCategory CollectionID=273 ColumnID=\'ID\' Value=$smarty.get.category OrderColumn=\'ID\' var=Category}} \r\n{{assign var=CategoryDetails value=$Category[0]}} \r\n{{assign var=\'PageTitle\' value=\'News - \'}} \r\n{{assign var=\'PageTitle\' value=$PageTitle|concat:$CategoryDetails.Collection_273_1}} \r\n{{setPage var=Collection_17_2 value=$PageTitle}}\r\n{{createArray array=$Category var=Categories CollectionID=273 ColumnID=\'ID\'}}\r\n<h1>{{$CategoryDetails.Collection_273_1}}</h1>\r\n<p>Click <a href=\"/news/archives/{{$smarty.get.category}}/\">here</a> for <em>{{$CategoryDetails.Collection_273_1}} News</em> archives</p>\r\n<p>{{$CategoryDetails.Collection_273_3}}</p>\r\n{{news newsContentID=270 isArchived=0 filterCategories=$Categories var=Results NewsCollection=274 NewsCategoriesCollection=273 NewsCategoriesXRefCollection=275}}\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(78,22,1356645037,2,78,26,'Content - Contact Us - TQ',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Contact Us</h1>\r\n<h2>Thank You. Your message has been sucessfuly sent.</h2>\r\n\r\n</div>\r\n',1204545835,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(79,1,1358258667,2,79,244,'CALENDAR - Content Page - Daily',NULL,2,3,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{assign var=fileNameToUse value=\'/calendar.html\'}}{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Calendar Daily</h1>\r\n<div>\r\n<div id=\"smarty_plugin\">{{if $smarty.get.month gt 0}} {{assign var=month value=$smarty.get.month}} {{else}} {{assign var=month value=$smarty.now|date_format:\'%m\'}} {{/if}} {{if $smarty.get.year gt 0}} {{assign var=year value=$smarty.get.year}} {{else}} {{assign var=year value=$smarty.now|date_format:\'%Y\'}} {{/if}} {{calendar CollectionID=236 CollectionTypeID=238 CollectionTypeXrefID=239 filter=1 Template=\'calendar-daily.html\' url_format=\'/calendar-daily.html?year=%y&month=%m\' year=$year month=$month day=$smarty.now|date_format:\'%d\'}}</div>\r\n</div>\r\n</div>',NULL,NULL,NULL,'<link rel=\"stylesheet\" type=\"text/css\" href=\"/style/calendar.css\" />',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(80,1,1358258682,2,80,247,'CALENDAR - Content Page - Weekly',NULL,2,3,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{assign var=fileNameToUse value=\'/calendar.html\'}}{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Calendar Weekly</h1>\r\n<div>\r\n<div id=\"smarty_plugin\">{{if $smarty.get.month gt 0}} {{assign var=month value=$smarty.get.month}} {{else}} {{assign var=month value=$smarty.now|date_format:\'%m\'}} {{/if}} {{if $smarty.get.year gt 0}} {{assign var=year value=$smarty.get.year}} {{else}} {{assign var=year value=$smarty.now|date_format:\'%Y\'}} {{/if}} {{calendarweekly CollectionID=236 CollectionTypeID=238 CollectionTypeXrefID=239 filter=1 Template=\'calendar-weekly.html\' url_format=\'/calendar-weekly.html?year=%y&month=%m\' year=$year month=$month day=$smarty.now|date_format:\'%d\'}}</div>\r\n</div>\r\n</div>',NULL,NULL,NULL,'<link rel=\"stylesheet\" type=\"text/css\" href=\"/style/calendar.css\" />',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(81,1,1359044128,2,81,6,'FORMS - Login',NULL,2,1,'<div id=\"contents\">\r\n	<script type=\"text/javascript\" src=\"/js/forgot-password.js\"></script>\r\n	<h1>\r\n		Login</h1>\r\n	<div>\r\n		<div id=\"smarty_plugin\">\r\n			{{login}}{{getcontent id=18}}</div>\r\n	</div>\r\n	<form action=\"\" method=\"post\" name=\"login\">\r\n		<p>\r\n			&nbsp;</p>\r\n		<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\r\n			<tbody>\r\n				<tr>\r\n					<td>\r\n						<span class=\"normal\">User Name</span></td>\r\n					<td>\r\n						<font size=\"2\"><input class=\"input\" id=\"UserName\" maxlength=\"256\" name=\"UserName\" size=\"25\" type=\"text\" /></font></td>\r\n				</tr>\r\n				<tr>\r\n					<td>\r\n						<span class=\"normal\">Password</span></td>\r\n					<td>\r\n						<font size=\"2\"><input class=\"input\" id=\"UserPassword\" maxlength=\"256\" name=\"UserPassword\" size=\"25\" type=\"password\" /></font></td>\r\n				</tr>\r\n				<tr>\r\n					<td colspan=\"2\">\r\n						<input name=\"remember\" type=\"checkbox\" value=\"on\" /> Remember my information?</td>\r\n				</tr>\r\n				<tr>\r\n					<td colspan=\"2\">\r\n						<input class=\"button\" type=\"submit\" value=\"Login\" /></td>\r\n				</tr>\r\n				<tr>\r\n					<td>\r\n						&nbsp;</td>\r\n				</tr>\r\n				<tr>\r\n					<td colspan=\"2\">\r\n						Not registered? Click <a href=\"/register.html\">here</a> to create a new account</td>\r\n				</tr>\r\n				<tr>\r\n					<td colspan=\"2\">\r\n						Forgot your password? <a href=\"#\" onclick=\"sendPassword(document.getElementById(\'UserName\').value)\">Send my password to my email address</a>\r\n						<div id=\"sendEmail\">\r\n							<img alt=\"\" height=\"1\" src=\"/images/sep.gif\" /></div>\r\n					</td>\r\n				</tr>\r\n			</tbody>\r\n		</table>\r\n	</form>\r\n	<p>\r\n		&nbsp;</p>\r\n	<p>\r\n		&nbsp;</p>\r\n	<script type=\"text/javascript\">\r\ndocument.getElementById(\'UserName\').focus();\r\n</script>\r\n	<p>\r\n		&nbsp;</p>\r\n	<p>\r\n		&nbsp;</p>\r\n	<p>\r\n		&nbsp;</p>\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(82,1,1359044229,2,82,18,'FORMS - Login Errors',NULL,2,3,'{{if $errors}}\r\n<div class=\"ErrorBox\">{{if $errors.UserName eq 1}}\r\n<li>Username cannot be left blank</li>\r\n{{/if}}\r\n {{if $errors.UserPassword eq 1}}\r\n<li>Password cannot be left blank </li>{{/if}}\r\n{{if $errors.UserName eq 2}}<li>Username and password do not match </li>{{/if}}\r\n</div>\r\n{{/if}}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(83,1,1359044263,2,83,10,'FORMS - Send Lost Password',NULL,2,3,'{{SendLostPassword UserName=$smarty.get.q pageid=5}} {{if $EmailSent gt 0}}<span class=\"error\">Please check your email. Your password was sent to the email address you provided</span>{{else}} <span class=\"error\">The user name you entered does not exist. Please choose another one</span> {{/if}}\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(84,1,1359044891,2,84,10,'FORMS - Send Lost Password',NULL,2,3,'<div id=\"contents\">\r\n<h1>Reset Password</h1>\r\n<div>\r\n<div id=\"smarty_plugin\">\r\n		{{loginResetPassword var=ResetResults email=$smarty.post.EmailAddress}}\r\n		{{if $ResetResults.success eq 1}}\r\n		<p class=\"info\">Your new password has been sent to your email address.</p>\r\n		{{/if}}\r\n		{{if $ResetResults.errors|@count gt 0}}\r\n		<div class=\"ErrorBox\">\r\n		<ul>\r\n			{{foreach from=$ResetResults.errors item=v key=k name=n}}		\r\n			<li>{{$v}}</li>\r\n			{{/foreach}}\r\n		</ul>\r\n		</div>\r\n		{{/if}}\r\n\r\n</div>\r\n</div>\r\n<form action=\"\" method=\"post\" name=\"login\">\r\n\r\n	<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\r\n		<tbody>\r\n			<tr>\r\n				<td>\r\n					<span class=\"normal\">Email Address</span></td>\r\n				<td>\r\n					<font size=\"2\"><input class=\"input\" id=\"UserName\" maxlength=\"256\" name=\"EmailAddress\" size=\"25\" type=\"text\" /></font></td>\r\n			</tr>\r\n			\r\n			<tr>\r\n				<td colspan=\"2\">\r\n					<input class=\"button\" type=\"submit\" value=\"Reset Password\" /></td>\r\n			</tr>\r\n			<tr>\r\n				<td>\r\n					 </td>\r\n			</tr>\r\n			\r\n		</tbody>\r\n	</table>\r\n</form>\r\n<script type=\"text/javascript\">\r\ndocument.getElementById(\'UserName\').focus();\r\n</script>\r\n\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(85,1,1359045121,2,85,20,'FORMS - Logout',NULL,2,1,'<div id=\"contents\">\r\n	<h1>\r\n		Logout</h1>\r\n	<p>\r\n		<strong>Thank You For Using the Site\'s Features.</strong></p>\r\n	<p>\r\n		<strong>You have succesfuly logged out.</strong></p>\r\n	<p>\r\n		{{logout}}</p>\r\n	<p>\r\n		&nbsp;</p>\r\n	<p>\r\n		&nbsp;</p>\r\n	<p>\r\n		&nbsp;</p>\r\n</div>\r\n',1199457831,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(86,22,1360612096,2,86,26,'Content - Contact Us - TQ',NULL,1,1,'<div id=\"leftside\">\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\n</div>\n<div id=\"contentalt\">\n<h1>Contact Us</h1>\n<h2>Thank You. Your message has been successfully sent.</h2>\n\n\n</div>\n',1204545835,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(87,22,1360612107,2,87,26,'Content - Contact Us - TQ',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Contact Us</h1>\r\n<h2>Thank <sup><sub>You</sub></sup>. Your message has been successfully sent.</h2>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1204545835,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(88,22,1366836275,2,88,17,'FORMS - Welcome',NULL,2,1,'<div id=\"content\">\r\n	<h1>\r\n		Welcome</h1>\r\n	<p>\r\n		&nbsp;</p>\r\n	<ul>\r\n		<li>\r\n			<a href=\"/edit-account.html\">Edit Account Details</a></li>\r\n	</ul>\r\n</div>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(89,22,1366836642,2,89,17,'FORMS - Welcome',NULL,2,1,'<div id=\"content\">\r\n<h1>Welcome</h1>\r\n<p>&nbsp;</p>\r\n<ul>\r\n	<li><a href=\"/edit-account.html\">Edit Account Details</a></li>\r\n</ul>\r\n<p>&nbsp;</p>\r\n<h1><span style=\"line-height: 1.5em;\">Editing the Site Content</span></h1>\r\n<ul>\r\n	<li><a href=\"/content/documents/editing-site.pdf\">Edit web page content</a></li>\r\n	<li><a href=\"/content/documents/Editing-page-details.pdf\">Edit the page name and details</a></li>\r\n	<li><a href=\"/content/documents/creating-new-page.pdf\">Creating a new page</a></li>\r\n	<li><a href=\"/content/documents/creating-links.pdf\">Creating Links</a></li>\r\n	<li><a href=\"/content/documents/toolbar.pdf\">Using the Toolbar</a></li>\r\n	<li>Using Filters</li>\r\n	<li>Creating Tables</li>\r\n	<li>Uploading Images</li>\r\n</ul>\r\n<div>&nbsp;</div>\r\n<h1>Adding News Items</h1>\r\n<ul>\r\n	<li>How to add news document</li>\r\n	<li>Link to Add News</li>\r\n</ul>\r\n<h1>&nbsp;</h1>\r\n<h1>Photo Galleries and Videos</h1>\r\n<ul>\r\n	<li>How to add a new photo gallery</li>\r\n	<li>Link to the photo gallery collection</li>\r\n	<li>How to add a new video</li>\r\n	<li>Link to the video collection</li>\r\n</ul>\r\n<div>&nbsp;</div>\r\n<h1>Contact Forms and Signups</h1>\r\n<ul>\r\n	<li>&nbsp;</li>\r\n	<li>How to Export a Collection</li>\r\n	<li>Link to Export Newsletter Sign-Ups</li>\r\n	<li>Link to Export Contact Us Requests</li>\r\n</ul>\r\n<div>&nbsp;</div>\r\n<h1>Homepage Rotator&nbsp;</h1>\r\n<div>&nbsp;</div>\r\n<div>How to change, edit or add a Homepage Rotator</div>\r\n<div>Link to Edit the Rotator</div>\r\n<div>How to change, edit or add a Homepage Tabs</div>\r\n<div>Link to Edit the Homepage Tabs</div>\r\n<div>How to edit or add a Homepage Carousel</div>\r\n<div>Edit the Homepage Carousel</div>\r\n<p>&nbsp;</p>\r\n</div>\r\n<p>&nbsp;</p>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(90,22,1366836759,2,90,17,'FORMS - Welcome',NULL,2,1,'<div id=\"content\">\r\n<h1>Welcome</h1>\r\n<p>&nbsp;</p>\r\n<ul>\r\n	<li><a href=\"/edit-account.html\">Edit Account Details</a></li>\r\n</ul>\r\n<p>&nbsp;</p>\r\n<h1><span style=\"line-height: 1.5em;\">Editing the Site Content</span></h1>\r\n<ul>\r\n	<li><a href=\"/content/documents/editing-site.pdf\">Edit web page content</a></li>\r\n	<li><a href=\"/content/documents/Editing-page-details.pdf\">Edit the page name and details</a></li>\r\n	<li><a href=\"/content/documents/creating-new-page.pdf\">Creating a new page</a></li>\r\n	<li><a href=\"/content/documents/creating-links.pdf\">Creating Links</a></li>\r\n	<li><a href=\"/content/documents/toolbar.pdf\">Using the Toolbar</a></li>\r\n	<li><a href=\"/content/documents/Tolles---CMS-Guide---Using-Filters.pdf\">Using Filters</a></li>\r\n	<li><a href=\"/content/documents/creating-tables.pdf\">Creating Tables</a></li>\r\n	<li><a href=\"/content/documents/adding-images.pdf\">Uploading Images</a></li>\r\n	<li><a href=\"/content/documents/News-Item.pdf\">How to add news document</a></li>\r\n	<li><a href=\"/content/documents/Event.pdf\">How to add an event</a></li>\r\n	<li><a href=\"/content/documents/export.pdf\">How to Export a Collection</a></li>\r\n</ul>\r\n<div>&nbsp;</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(91,22,1366836828,2,91,17,'FORMS - Welcome',NULL,2,1,'<div id=\"content\">\r\n<h1>Welcome</h1>\r\n<p>&nbsp;</p>\r\n<ul>\r\n	<li><a href=\"/edit-account.html\">Edit Account Details</a></li>\r\n</ul>\r\n<p>&nbsp;</p>\r\n<h1><span style=\"line-height: 1.5em;\">Editing the Site Content</span></h1>\r\n<ul>\r\n	<li><a href=\"/content/documents/Editing-Page.pdf\">Edit web page content</a></li>\r\n	<li><a href=\"/content/documents/Editing-page-details.pdf\">Edit the page name and details</a></li>\r\n	<li><a href=\"/content/documents/creating-new-page.pdf\">Creating a new page</a></li>\r\n	<li><a href=\"/content/documents/creating-links.pdf\">Creating Links</a></li>\r\n	<li><a href=\"/content/documents/toolbar.pdf\">Using the Toolbar</a></li>\r\n	<li><a href=\"/content/documents/Tolles---CMS-Guide---Using-Filters.pdf\">Using Filters</a></li>\r\n	<li><a href=\"/content/documents/creating-tables.pdf\">Creating Tables</a></li>\r\n	<li><a href=\"/content/documents/adding-images.pdf\">Uploading Images</a></li>\r\n	<li><a href=\"/content/documents/News-Item.pdf\">How to add news document</a></li>\r\n	<li><a href=\"/content/documents/Event.pdf\">How to add an event</a></li>\r\n	<li><a href=\"/content/documents/export.pdf\">How to Export a Collection</a></li>\r\n</ul>\r\n<div>&nbsp;</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(92,22,1366838148,2,92,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\n</div>\n<div id=\"contentalt\">\n<h1>Oxiem CMS1</h1>\n<h3>Heading 33</h3>\n<p>This is a new piece of content. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\n\n<h4>Heading 4</h4>\n<p><span>Unordered list.</span></p>\n<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n	<li>regterg</li>\n</ul>\n\n<p><span>Ordered list.</span></p>\n<ol>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n</ol>\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n<br>\n<div>\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\n</div>\n<p>&nbsp;</p>\n</div>\n<p>&nbsp;</p>\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(93,22,1366838313,2,93,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Oxiem CMS1</h1>\r\n<h3>Heading 33</h3>\r\n<p>This is a new piece of content. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<p>Fusce pretium gravida sollicitudin. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam gravida dictum lobortis. Donec fermentum quam sit amet elit viverra cursus sodales nisl porta. Suspendisse luctus augue eget ante congue vitae dapibus leo placerat. Fusce ipsum enim, lacinia eu volutpat vel, scelerisque in erat. Aliquam erat volutpat. In pulvinar tellus sit amet nulla eleifend sit amet scelerisque tortor auctor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut euismod, lacus a ullamcorper facilisis, est ipsum iaculis tortor, vitae pellentesque eros sapien vel est. In ac libero nisl. Praesent mi massa, fermentum dapibus cursus eget, feugiat eget urna. Nunc nec turpis vel tellus commodo scelerisque. Vestibulum ultricies molestie quam non vulputate. Etiam lobortis consequat euismod. Sed sed diam urna. Integer euismod venenatis ultrices. Aliquam eu sodales nibh. Sed aliquet sodales laoreet. Curabitur a urna eu dolor eleifend sollicitudin. Nullam dignissim rutrum massa, varius sagittis lorem scelerisque ac. Aliquam ut magna eget mauris ultricies mollis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam venenatis, massa laoreet rutrum vulputate, diam magna placerat metus, sit amet suscipit lorem arcu id lorem. Aliquam at nisl et enim gravida tincidunt eu et sapien. Nullam eleifend, erat quis mattis placerat, risus nulla ultricies nibh, eget dictum elit nisl sed mi. In hac habitasse platea dictumst. Fusce commodo, ipsum vitae egestas tempus, enim urna aliquet quam, nec cursus quam diam nec augue. Nulla facilisi. Aenean id purus aliquam dolor condimentum iaculis. Sed eu nibh lectus. Maecenas nec augue at nibh vestibulum malesuada. Quisque pellentesque, purus consequat tempor convallis, lectus enim faucibus leo, eget eleifend orci ipsum commodo sapien. Mauris vitae vehicula urna. Vivamus volutpat sollicitudin dolor, et consectetur tellus egestas vitae. Cras luctus dignissim euismod. Nam semper, diam a accumsan dictum, tellus leo ultrices justo, a convallis tortor leo non felis. Donec pharetra urna sed massa vulputate tristique. Proin enim ante, luctus vel tristique varius, bibendum nec magna. Vestibulum rutrum elit nec elit scelerisque vulputate. Nulla vitae est odio, at malesuada tortor. Pellentesque et tincidunt risus. Sed nec ligula ligula, eu porttitor nibh.</p>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	<li>regterg</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n<br />\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(137,1,1373620203,2,137,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>Oxiem ergrtfgCMS1</h1>\r\n<h3>Heading 33</h3>\r\n<p>This is a new piece of content. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\r\n<p>Fusce pretium gravida sollicitudin. Crth rth ytjhrtyjhyrtum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam gravida dictum lobortis. Donec fermentum quam sit amet elit viverra cursus sodales nisl porta. Suspendisse luctus augue eget ante congue vitae dapibus leo placerat. Fusce ipsum enim, lacinia eu volutpat vel, scelerisque in erat. Aliquam erat volutpat. In pulvinar tellus sit amet nulla eleifend sit amet scelerisque tortor auctor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>\r\n<p>Ut euismod, lacus a ullamcorper facilisis, est ipsum iaculis tortor, vitae pellentesque eros sapien vel est. In ac libero nisl. Praesent mi massa, fermentum dapibus cursus eget, feugiat eget urna. Nunc nec turpis vel tellus commodo scelerisque. Vestibulum ultricies molestie quam non vulputate. Etiam lobortis consequat euismod. Sed sed diam urna. Integer euismod venenatis ultrices. Aliquam eu sodales nibh. Sed aliquet sodales laoreet. Curabitur a urna eu dolor eleifend sollicitudin. Nullam dignissim rutrum massa, varius sagittis lorem scelerisque ac. Aliquam ut magna eget mauris ultricies mollis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam venenatis, massa laoreet rutrum vulputate, diam magna placerat metus, sit amet suscipit lorem arcu id lorem.</p>\r\n<p>Aliquam at nisl et enim gravida tincidunt eu et sapien. Nullam eleifend, erat quis mattis placerat, risus nulla ultricies nibh, eget dictum elit nisl sed mi. In hac habitasse platea dictumst. Fusce commodo, ipsum vitae egestas tempus, enim urna aliquet quam, nec cursus quam diam nec augue. Nulla facilisi. Aenean id purus aliquam dolor condimentum iaculis. Sed eu nibh lectus. Maecenas nec augue at nibh vestibulum malesuada. Quisque pellentesque, purus consequat tempor convallis, lectus enim faucibus leo, eget eleifend orci ipsum commodo sapien. Mauris vitae vehicula urna. Vivamus volutpat sollicitudin dolor, et consectetur tellus egestas vitae. Cras luctus dignissim euismod. Nam semper, diam a accumsan dictum, tellus leo ultrices justo, a convallis tortor leo non felis. Donec pharetra urna sed massa vulputate tristique.</p>\r\n<p>Proin enim ante, luctus vel tristique varius, bibendum nec magna. Vestibulum rutrum elit nec elit scelerisque vulputate. Nulla vitae est odio, at malesuada tortor. Pellentesque et tincidunt risus. Sed nec ligula ligula, eu porttitor nibh.</p>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	<li>regterg</li>\r\n	<li>erg</li>\r\n	<li>erg</li>\r\n	<li>reg</li>\r\n	<li>rgeg</li>\r\n	<li>erg</li>\r\n	<li>erg</li>\r\n	<li>rg</li>\r\n	<li>&nbsp;</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n<br />\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\r\n</div>\r\n<p>&nbsp;</p>\r\n</div>\r\n<p>&nbsp;</p>\r\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(136,1,1373617098,2,136,12,'Menu - Left Automatic',NULL,2,3,'{{assign var=filename value=$smarty.server.REQUEST_URI}}\r\n{{if $fileNameToUse neq \'\'}}{{assign var=filename value=$fileNameToUse}}{{/if}}\r\n{{getCollectionByCategory CollectionID=276 var=Menus OrderColumn=3 ColumnID=\'2\' Value=$filename}} \r\n{{if $Menus|@count gt 0}}\r\n<div id=\"pagemenu\">\r\n{{assign var=menudata value=$Menus[0]}}\r\n{{assign var=MPrefix value=\'Collection_\'|concat:\'276\'|concat:\'_\'}}\r\n{{assign var=ModuleLink value=$MPrefix|concat:\'2\'}}\r\n{{assign var=ModuleAlt value=$MPrefix|concat:\'1\'}}\r\n{{assign var=ModuleCatID value=$MPrefix|concat:\'ID\'}}\r\n\r\n{{getTreeChildPath Node=$menudata.Collection_276_ID CID=276 var=Nodes}}\r\n{{getCollectionByCategory CollectionID=276 var=FirstNodes OrderColumn=ID ColumnID=\'ID\' Value=$Nodes[1]}} \r\n{{assign var=FirstNode value=$FirstNodes[0]}}\r\n<h3>{{$FirstNode.$ModuleAlt}}</h3>\r\n{{getTreeChildNumberAdmin var=primaryCategories CategoryID=$Nodes[1] CID=276 Level=1 MenuTemplate=\'treemenu.html\'}}\r\n\r\n</div>\r\n{{/if}}',1218543487,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(128,1,1373613481,2,128,261,'NEWS - Main News Page',NULL,2,3,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n<h1>News</h1>\r\n{{news newsContentID=270 var=Results NewsCollection=274 NewsCategoriesCollection=273 NewsCategoriesXRefCollection=275 filterCategories=0 isArchived=0}}\r\n</div>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(129,1,1373613808,2,129,262,'NEWS - One News',NULL,2,3,'{{assign var=fileNameToUse value=\'/news/\'}}\r\n<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"contentalt\">\r\n{{news newsContentID=0 var=Result newsId=$smarty.get.newsid isArchived=2 NewsCollection=274 NewsCategoriesCollection=273 NewsCategoriesXRefCollection=275}}\r\n			<div class=\"mainnewsimage\">{{displayImage src=$Result.Image alternateImage=\'/images/sep.gif\' alt=$Result.Headline}}</div>\r\n            <h1>{{$Result.Headline}}</h1>\r\n            <h3>{{$Result.SubHead}}</h3>\r\n            \r\n            {{if $Result.ArticleContent neq \'\'}}\r\n            <div>{{$Result.ArticleContent}}</div>\r\n            {{/if}}\r\n            \r\n            {{assign var=\'PageTitle\' value=\'News - \'}} \r\n			{{assign var=\'PageTitle\' value=$PageTitle|concat:$Result.Headline}} \r\n			{{setPage var=Collection_17_2 value=$PageTitle}}\r\n            \r\n</div>\r\n{{if $smarty.session.UserID gt 0}}\r\n{{CollectionCanAccess userId=$smarty.session.UserID CollectionId=274 rowId=$smarty.get.newsid var=DisplayLink}}\r\n{{if $DisplayLink}}\r\n{{capture name=eventfadmin assign=eventFrontEndAdmin}}\r\n\r\nvar obj = $(\'#AdminMenu10\').parent().find(\'ul\');\r\n$(\"<li id=\'adminFrontEditNews\'><a class=\\\"level2\\\" href=\'javascript: adminDialog ( \\\"1\\\" , \\\"&id=274&eid={{$smarty.get.newsid}}\\\" , \\\"\\\"  , 900 , 600 , \\\"\\\" );\'>Edit News</a></li>\").appendTo(obj);\r\n\r\n$(\'#AdminMenu13\').remove();\r\n$(\'#AdminMenu2\').remove();\r\n\r\n{{/capture}}\r\n{{assign var=JavaScriptJQueryCode value=$JavaScriptJQueryCode|concat:\' \'|concat:$eventFrontEndAdmin}}\r\n{{/if}}{{/if}}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(130,1,1373613824,2,130,270,'NEWS FORMAT - All News',NULL,2,3,'{{foreach from=$Results item=v key=k name=newsleft}}\r\n<div class=\"onenews\">\r\n<h3>{{$v.Headline}}</h3>\r\n<h4>{{$v.DateStart|date_format:\"%D\"}}</h4>\r\n<p>{{$v.Abstract|nl2br}}<br/>\r\n<a href=\"/news/{{$v.Category}}/{{$v.Id}}/\">Learn More ></a></p>\r\n</div>\r\n{{/foreach}}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(131,1,1373614921,2,131,269,'NEWS - Homepage News',NULL,2,3,'{{math equation=\"x + 2592000\" x=$smarty.now assign=oneWeekLater}}\r\n{{news skipFromFuture=0 futureLimit=$oneWeekLater  var=Results NewsCollection=274 NewsCategoriesCollection=273 NewsCategoriesXRefCollection=275 limit=4 filterCategories=0 isArchived=0}}\r\n{{if $Results|@count gt 0}}\r\n<div id=\"rightnews\">\r\n<h3>News</h3>\r\n{{foreach from=$Results item=v key=k name=newsleft}}\r\n{{assign var=canAccess value=0}}\r\n{{if $smarty.session.UserID gt 0}}\r\n{{CollectionCanAccess userId=$smarty.session.UserID CollectionId=274 rowId=$v.Id var=canAccess}}\r\n{{/if}}\r\n<p {{if $canAccess eq true}}collectionid=\"274\" collectionrowid=\"{{$v.Id}}\" collectioneditor=\"1\"{{/if}}>\r\n<a href=\"/news/{{$v.Category}}/{{$v.Id}}/\">\r\n	{{if $v.ImageTnail neq \'\'}}<img src=\"{{$v.ImageTnail}}\" class=\"leftimage\" align=\"left\" />{{else}}<img src=\"/images/newsdefault.gif\" class=\"leftimage\" align=\"left\" />{{/if}}\r\n	<strong>{{$v.Headline}}</strong><br/>\r\n	{{$v.Abstract|nl2br}}\r\n</a>\r\n</p>\r\n{{/foreach}}\r\n</div>\r\n{{/if}}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(132,1,1373615011,2,132,261,'NEWS - Main News Page',NULL,2,3,'<div>\r\n<h1>News</h1>\r\n{{assign var=fileNameToUse value=\'/news/\'}}\r\n{{news newsContentID=270 resultsPerPage=10 skipFromFuture=1 PagesVar=Pages var=Results NewsCollection=274 NewsCategoriesCollection=273 NewsCategoriesXRefCollection=275 filterCategories=0 isArchived=0}}\r\n</div>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(133,1,1373615129,2,133,261,'NEWS - Main News Page',NULL,2,3,'<div>\r\n<h1>News</h1>\r\n{{assign var=fileNameToUse value=\'/news/\'}}\r\n{{news newsContentID=270 resultsPerPage=1 skipFromFuture=1 PagesVar=Pages var=Results NewsCollection=274 NewsCategoriesCollection=273 NewsCategoriesXRefCollection=275 filterCategories=0 isArchived=0}}\r\n</div>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(134,1,1373615292,2,134,261,'NEWS - Main News Page',NULL,2,3,'<div>\r\n<h1>News</h1>\r\n{{assign var=fileNameToUse value=\'/news/\'}}\r\n{{news newsContentID=270 resultsPerPage=10 skipFromFuture=1 PagesVar=Pages var=Results NewsCollection=274 NewsCategoriesCollection=273 NewsCategoriesXRefCollection=275 filterCategories=0 isArchived=0}}\r\n</div>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(135,1,1373616323,2,135,21,'Menu - Middle',NULL,2,3,'{{* Get all menu items that have no parents  *}}\r\n{{getTreeChildNumberAdmin var=primaryCategories CID=276 Level=1 NoDisplay=1}} \r\n{{* To be able to highlight the current menu, we do the folowing *}}\r\n{{assign var=filename value=$smarty.server.REQUEST_URI}}\r\n{{* If somewhere in the code we want to highlight something else , the folowing lines do that *}}\r\n{{if $fileNameToUse neq \'\'}}{{assign var=filename value=$fileNameToUse}}{{/if}}\r\n\r\n{{* We get the data for the selected item *}}\r\n{{getCollectionByCategory CollectionID=276 ColumnID=2 Value=$filename OrderColumn=1 var=CurentPageDatas}}\r\n{{assign var=CurentPageData value=$CurentPageDatas[0]}}\r\n\r\n{{* We get all the parents of the selected item and we save the one that has no parents *}}\r\n{{getTreeChildPath CID=276  Node=$CurentPageData.Collection_276_ID var=ParentPath}}\r\n{{assign var=FirstParent value=$ParentPath[1]}}\r\n\r\n{{* Time to display the menu *}}\r\n<ul>\r\n{{assign var=first value=0}}\r\n{{foreach from=$primaryCategories item=v key=k}}\r\n{{if $v.Collection_276_4 eq \'on\' and $v.Collection_276_5 eq \'\' }}\r\n\r\n	{{* For EIP. We need to decide weather we want the logined user to be able to right click and edit the menu item *}}\r\n	{{assign var=canAccess value=0}}{{if $smarty.session.UserID gt 0}}\r\n	{{CollectionCanAccess userId=$smarty.session.UserID CollectionId=276 rowId=$v.Collection_276_ID var=canAccess}}{{/if}}\r\n	<li><a href=\"{{$v.Collection_276_2}}\" {{if $canAccess eq true}}collectionid=\"276\" collectionrowid=\"{{$v.Collection_276_ID}}\" collectioneditor=\"1\"{{/if}} {{if $v.Collection_276_2 eq $filename or $v.Collection_276_ID eq $FirstParent}} class=\"selected\"{{/if}}>{{$v.Collection_276_1}}</a></li>\r\n{{/if}}\r\n{{/foreach}}\r\n</ul>',1204543330,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(122,22,1373552056,2,122,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\n</div>\n<div id=\"contentalt\">\n<h1>Chris is AWESOME!</h1>\n\n\n<h3>Heading 33</h3>\n<p>This is a new piece of content. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\n<p>Fusce pretium gravida sollicitudin. Crth rth ytjhrtyjhyrtum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam gravida dictum lobortis. Donec fermentum quam sit amet elit viverra cursus sodales nisl porta. Suspendisse luctus augue eget ante congue vitae dapibus leo placerat. Fusce ipsum enim, lacinia eu volutpat vel, scelerisque in erat. Aliquam erat volutpat. In pulvinar tellus sit amet nulla eleifend sit amet scelerisque tortor auctor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>\n\n<p>Ut euismod, lacus a ullamcorper facilisis, est ipsum iaculis tortor, vitae pellentesque eros sapien vel est. In ac libero nisl. Praesent mi massa, fermentum dapibus cursus eget, feugiat eget urna. Nunc nec turpis vel tellus commodo scelerisque. Vestibulum ultricies molestie quam non vulputate. Etiam lobortis consequat euismod. Sed sed diam urna. Integer euismod venenatis ultrices. Aliquam eu sodales nibh. Sed aliquet sodales laoreet. Curabitur a urna eu dolor eleifend sollicitudin. Nullam dignissim rutrum massa, varius sagittis lorem scelerisque ac. Aliquam ut magna eget mauris ultricies mollis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam venenatis, massa laoreet rutrum vulputate, diam magna placerat metus, sit amet suscipit lorem arcu id lorem.</p>\n<p>Aliquam at nisl et enim gravida tincidunt eu et sapien. Nullam eleifend, erat quis mattis placerat, risus nulla ultricies nibh, eget dictum elit nisl sed mi. In hac habitasse platea dictumst. Fusce commodo, ipsum vitae egestas tempus, enim urna aliquet quam, nec cursus quam diam nec augue. Nulla facilisi. Aenean id purus aliquam dolor condimentum iaculis. Sed eu nibh lectus. Maecenas nec augue at nibh vestibulum malesuada. Quisque pellentesque, purus consequat tempor convallis, lectus enim faucibus leo, eget eleifend orci ipsum commodo sapien. Mauris vitae vehicula urna. Vivamus volutpat sollicitudin dolor, et consectetur tellus egestas vitae. Cras luctus dignissim euismod. Nam semper, diam a accumsan dictum, tellus leo ultrices justo, a convallis tortor leo non felis. Donec pharetra urna sed massa vulputate tristique.</p>\n<p>Proin enim ante, luctus vel tristique varius, bibendum nec magna. Vestibulum rutrum elit nec elit scelerisque vulputate. Nulla vitae est odio, at malesuada tortor. Pellentesque et tincidunt risus. Sed nec ligula ligula, eu porttitor nibh.</p>\n\n<h4>Heading 4</h4>\n<p><span>Unordered list.</span></p>\n<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n	<li>regterg</li>\n	<li>erg</li>\n	<li>erg</li>\n	<li>reg</li>\n	<li>rgeg</li>\n	<li>erg</li>\n	<li>erg</li>\n	<li>rg</li>\n	<li>&nbsp;</li>\n</ul>\n\n<p><span>Ordered list.</span></p>\n<ol>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n</ol>\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n<br>\n<div>\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\n</div>\n<p>&nbsp;</p>\n</div>\n<p>&nbsp;</p>\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(121,22,1373552008,2,121,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\n</div>\n<div id=\"contentalt\">\n<h1>Oxiem ergrtfgCMS1</h1>\n\n<h3>Heading 33</h3>\n<p>This is a new piece of content. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\n<p>Fusce pretium gravida sollicitudin. Crth rth ytjhrtyjhyrtum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam gravida dictum lobortis. Donec fermentum quam sit amet elit viverra cursus sodales nisl porta. Suspendisse luctus augue eget ante congue vitae dapibus leo placerat. Fusce ipsum enim, lacinia eu volutpat vel, scelerisque in erat. Aliquam erat volutpat. In pulvinar tellus sit amet nulla eleifend sit amet scelerisque tortor auctor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>\n\n<p>Ut euismod, lacus a ullamcorper facilisis, est ipsum iaculis tortor, vitae pellentesque eros sapien vel est. In ac libero nisl. Praesent mi massa, fermentum dapibus cursus eget, feugiat eget urna. Nunc nec turpis vel tellus commodo scelerisque. Vestibulum ultricies molestie quam non vulputate. Etiam lobortis consequat euismod. Sed sed diam urna. Integer euismod venenatis ultrices. Aliquam eu sodales nibh. Sed aliquet sodales laoreet. Curabitur a urna eu dolor eleifend sollicitudin. Nullam dignissim rutrum massa, varius sagittis lorem scelerisque ac. Aliquam ut magna eget mauris ultricies mollis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam venenatis, massa laoreet rutrum vulputate, diam magna placerat metus, sit amet suscipit lorem arcu id lorem.</p>\n<p>Aliquam at nisl et enim gravida tincidunt eu et sapien. Nullam eleifend, erat quis mattis placerat, risus nulla ultricies nibh, eget dictum elit nisl sed mi. In hac habitasse platea dictumst. Fusce commodo, ipsum vitae egestas tempus, enim urna aliquet quam, nec cursus quam diam nec augue. Nulla facilisi. Aenean id purus aliquam dolor condimentum iaculis. Sed eu nibh lectus. Maecenas nec augue at nibh vestibulum malesuada. Quisque pellentesque, purus consequat tempor convallis, lectus enim faucibus leo, eget eleifend orci ipsum commodo sapien. Mauris vitae vehicula urna. Vivamus volutpat sollicitudin dolor, et consectetur tellus egestas vitae. Cras luctus dignissim euismod. Nam semper, diam a accumsan dictum, tellus leo ultrices justo, a convallis tortor leo non felis. Donec pharetra urna sed massa vulputate tristique.</p>\n<p>Proin enim ante, luctus vel tristique varius, bibendum nec magna. Vestibulum rutrum elit nec elit scelerisque vulputate. Nulla vitae est odio, at malesuada tortor. Pellentesque et tincidunt risus. Sed nec ligula ligula, eu porttitor nibh.</p>\n\n<h4>Heading 4</h4>\n<p><span>Unordered list.</span></p>\n<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n	<li>regterg</li>\n	<li>erg</li>\n	<li>erg</li>\n	<li>reg</li>\n	<li>rgeg</li>\n	<li>erg</li>\n	<li>erg</li>\n	<li>rg</li>\n	<li>&nbsp;</li>\n</ul>\n\n<p><span>Ordered list.</span></p>\n<ol>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n</ol>\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n<br>\n<div>\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\n</div>\n<p>&nbsp;</p>\n</div>\n<p>&nbsp;</p>\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(138,1,1386143066,2,138,560,'a Content Page',NULL,1,1,'<div id=\"leftside\">\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\n</div>\n<div id=\"contentalt\">\n<h1>Oxiem CMS1</h1>\n\n<h3>Heading 33</h3>\n<p>This is a new piece of content. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies er</p>\n<p>Fusce pretium gravida sollicitudin. Crth rth ytjhrtyjhyrtum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam gravida dictum lobortis. Donec fermentum quam sit amet elit viverra cursus sodales nisl porta. Suspendisse luctus augue eget ante congue vitae dapibus leo placerat. Fusce ipsum enim, lacinia eu volutpat vel, scelerisque in erat. Aliquam erat volutpat. In pulvinar tellus sit amet nulla eleifend sit amet scelerisque tortor auctor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>\n<p>Ut euismod, lacus a ullamcorper facilisis, est ipsum iaculis tortor, vitae pellentesque eros sapien vel est. In ac libero nisl. Praesent mi massa, fermentum dapibus cursus eget, feugiat eget urna. Nunc nec turpis vel tellus commodo scelerisque. Vestibulum ultricies molestie quam non vulputate. Etiam lobortis consequat euismod. Sed sed diam urna. Integer euismod venenatis ultrices. Aliquam eu sodales nibh. Sed aliquet sodales laoreet. Curabitur a urna eu dolor eleifend sollicitudin. Nullam dignissim rutrum massa, varius sagittis lorem scelerisque ac. Aliquam ut magna eget mauris ultricies mollis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam venenatis, massa laoreet rutrum vulputate, diam magna placerat metus, sit amet suscipit lorem arcu id lorem.</p>\n<p>Aliquam at nisl et enim gravida tincidunt eu et sapien. Nullam eleifend, erat quis mattis placerat, risus nulla ultricies nibh, eget dictum elit nisl sed mi. In hac habitasse platea dictumst. Fusce commodo, ipsum vitae egestas tempus, enim urna aliquet quam, nec cursus quam diam nec augue. Nulla facilisi. Aenean id purus aliquam dolor condimentum iaculis. Sed eu nibh lectus. Maecenas nec augue at nibh vestibulum malesuada. Quisque pellentesque, purus consequat tempor convallis, lectus enim faucibus leo, eget eleifend orci ipsum commodo sapien. Mauris vitae vehicula urna. Vivamus volutpat sollicitudin dolor, et consectetur tellus egestas vitae. Cras luctus dignissim euismod. Nam semper, diam a accumsan dictum, tellus leo ultrices justo, a convallis tortor leo non felis. Donec pharetra urna sed massa vulputate tristique.</p>\n<p>Proin enim ante, luctus vel tristique varius, bibendum nec magna. Vestibulum rutrum elit nec elit scelerisque vulputate. Nulla vitae est odio, at malesuada tortor. Pellentesque et tincidunt risus. Sed nec ligula ligula, eu porttitor nibh.</p>\n<h4>Heading 4</h4>\n<p><span>Unordered list.</span></p>\n<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n	<li>regterg</li>\n	<li>erg</li>\n	<li>erg</li>\n	<li>reg</li>\n	<li>rgeg</li>\n	<li>erg</li>\n	<li>erg</li>\n	<li>rg</li>\n	<li>&nbsp;</li>\n</ul>\n<p><span>Ordered list.</span></p>\n<ol>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n</ol>\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n<br>\n<div>\n<div id=\"smarty_plugin\">{{getcontent id=\'653\' }}</div>\n</div>\n<p>&nbsp;</p>\n</div>\n<p>&nbsp;</p>\n',1276691228,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(139,1,1386143101,2,139,560,'a Content Page',NULL,1,1,'<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ac ante eget justo lacinia dignissim et non libero. Duis et molestie dolor, eget tristique eros. Aliquam lobortis aliquet lorem eu vulputate. Phasellus eget odio ut metus tempus egestas ut at mi. Quisque dui mauris, lobortis nec felis dapibus, suscipit rhoncus mauris. Ut in facilisis justo. Vestibulum placerat dictum dolor, et </p>\r\n<p>Sed dolor orci, ultrices vitae nisl vitae, volutpat mattis felis. Duis fringilla ligula in velit rhoncus egestas. Proin id lacinia turpis, et placerat erat. Proin vehicula blandit quam sed blandit. Etiam sit amet sagittis quam, ac vulputate est. Etiam eu hendrerit arcu, non pulvinar felis. Quisque egestas nulla ac felis vulputate, at tempor lorem luctus.</p>\r\n<p>Nulla vestibulum, lorem nec posuere tempor, augue augue tincidunt lacus, eget placerat urna tellus id tellus. Curabitur facilisis, nisl ut eleifend malesuada, lorem velit ullamcorper magna, at porta sapien lacus non nulla. Proin eros risus, rhoncus eget vulputate et, dictum a nunc. Vestibulum porta sem libero, vitae elementum libero vestibulum a. Nullam varius mollis nunc, semper lobortis tortor accumsan non. In pretium libero ac neque congue, vitae suscipit tellus iaculis. Proin tincidunt arcu nec sodales lobortis. Integer sed dui nibh. Sed nisi nulla, adipiscing eu nunc id, tristique varius purus. Pellentesque enim purus, elementum quis semper et, rhoncus vitae orci. Duis nibh ipsum, pharetra ut dolor ut, ultrices aliquam arcu. Sed at mag ligula condimentum fringilla bibendum non erat.</p>',1276691228,NULL,NULL,NULL,'','','','SUSTAINABILITY  Headline Goes Right Here.','Fusce leo orci, susct augue imperdiet set eid lacia. Eed sicropot aigie meced mo nuseide. Pureti susced augue impieo orci, susct augue imperdiet set eid.','/images/inset.jpg',NULL,NULL),(140,1,1386143125,2,140,560,'a Content Page',NULL,1,1,'<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ac ante eget justo lacinia dignissim et non libero. Duis et molestie dolor, eget tristique eros. Aliquam lobortis aliquet lorem eu vulputate. Phasellus eget odio ut metus tempus egestas ut at mi. Quisque dui mauris, lobortis nec felis dapibus, suscipit rhoncus mauris. Ut in facilisis justo. Vestibulum placerat dictum dolor, et</p>\r\n<p>Sed dolor orci, ultrices vitae nisl vitae, volutpat mattis felis. Duis fringilla ligula in velit rhoncus egestas. Proin id lacinia turpis, et placerat erat. Proin vehicula blandit quam sed blandit. Etiam sit amet sagittis quam, ac vulputate est. Etiam eu hendrerit arcu, non pulvinar felis. Quisque egestas nulla ac felis vulputate, at tempor lorem luctus.</p>\r\n<p>Nulla vestibulum, lorem nec posuere tempor, augue augue tincidunt lacus, eget placerat urna tellus id tellus. Curabitur facilisis, nisl ut eleifend malesuada, lorem velit ullamcorper magna, at porta sapien lacus non nulla. Proin eros risus, rhoncus eget vulputate et, dictum a nunc. Vestibulum porta sem libero, vitae elementum libero vestibulum a. Nullam varius mollis nunc, semper lobortis tortor accumsan non. In pretium libero ac neque congue, vitae suscipit tellus iaculis. Proin tincidunt arcu nec sodales lobortis. Integer sed dui nibh. Sed nisi nulla, adipiscing eu nunc id, tristique varius purus. Pellentesque enim purus, elementum quis semper et, rhoncus vitae orci. Duis nibh ipsum, pharetra ut dolor ut, ultrices aliquam arcu. Sed at mag ligula condimentum fringilla bibendum non erat.</p>\r\n',1276691228,NULL,NULL,NULL,'','','','SUSTAINABILITY  Headline Goes Right Here.','Fusce leo orci, susct augue imperdiet set eid lacia. Eed sicropot aigie meced mo nuseide. Pureti susced augue impieo orci, susct augue imperdiet set eid.','/images/inset.jpg','Lorem ipsum dor\r\nsit amet, Brian',NULL),(141,1,1386143201,2,141,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\n</div>\n<div id=\"content\">\n<h1>Oxiem CMS Lander Page.</h1>\n<h2>Heading 2</h2>\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies ers</p>\n\n\n<div>\n<div id=\"smarty_plugin\">{{Player file=\'/content/videos/video_50_2_4.flv\' id=\'videoplayer\' image=\'\' }}</div>\n</div>\n<h4>Heading 4</h4>\n\n\n<p><span>Unordered list.</span></p>\n<ul>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n	<li>One more element\n	<ul>\n		<li>Sub element</li>\n	</ul>\n	</li>\n	<li>Another</li>\n</ul>\n<p><span>Ordered list.</span></p>\n<ol>\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\n	<li>Morbi in orci erat.</li>\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\n</ol>\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\n</div>\n<div id=\"rightside\">\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\n</div>\n',1276692693,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(142,1,1386143985,2,142,561,'a Landing Page',NULL,1,1,'<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=12}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Oxiem CMS Lander Page.</h1>\r\n<h2>Heading 2</h2>\r\n<p>Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit avitae tincidunt velit commodo. Cras tincidunt lectus metus, ac pulvinar risus. Nunc ornare malesuada arcu nec mole Maecenas nec ultricie snec gravida placerat, quam est bibendum ante, vel dignissim sapien ante in metus. Maecenas nec ultricies erultricies er uada arcu nec molestie. Ut porttitor, metus nec gravida placerat, quam est bibendum ante, vel dignissim sapien antein metus. Maecenas nec ultricies eros. Integer aliquet tortor sit amet metus semper ornare. Nulla facilisi. Integer vitae magna erat. Donec molestie nibh sit amet ante dapibus vitae tinciduntultricies erultricies erultricies erultricies ers</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{Player file=\'/content/videos/video_50_2_4.flv\' id=\'videoplayer\' image=\'\' }}</div>\r\n</div>\r\n<h4>Heading 4</h4>\r\n<p><span>Unordered list.</span></p>\r\n<ul>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n	<li>One more element\r\n	<ul>\r\n		<li>Sub element</li>\r\n	</ul>\r\n	</li>\r\n	<li>Another</li>\r\n</ul>\r\n<p><span>Ordered list.</span></p>\r\n<ol>\r\n	<li>In felis nulla, ultricies id sollicitudin in, eleifend id lorem.</li>\r\n	<li>Ut eleifend lacus non augue venenatis varius.</li>\r\n	<li>Donec nec eros eget felis ornare varius commodo nec purus.</li>\r\n	<li>Morbi in orci erat.</li>\r\n	<li>Fusce tincidunt neque orci, congue fermentum enim.</li>\r\n</ol>\r\n<p><span>Visit our website at <a href=\"#\">http://www.oxiem.com.</a></span></p>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1276692693,NULL,NULL,NULL,'','','','PURETI Fresh Headline Goes Right Here.','Fusce leo orci, susct augue imperdiet set eid lacia. Eed sicropot aigie meced mo nuseide. Pureti susced augue impieo orci, susct augue imperdiet set eid.','',NULL,NULL),(143,1,1386144150,2,143,561,'a Landing Page',NULL,1,1,'<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam scelerisque sollicitudin diam, nec pulvinar ipsum dictum ac. Sed posuere purus in hendrerit consequat. Aenean feugiat urna eu nisi commodo, nec accumsan risus sagittis. Pellentesque at sem sit amet dui viverra sodales. Nulla facilisi. Donec condimentum mauris ac neque faucibus, at laoreet nunc fermentum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aenean tincidunt tempor ante a varius. Proin nec orci eu erat lobortis convallis sit amet sed turpis. Duis felis neque, porta sodales nisi.</p>\r\n',1276692693,NULL,NULL,NULL,'/images/desktop/lander1.jpg','/images/tablet/lander1.jpg','/images/mobile/lander1.jpg','PURETI Fresh Headline Goes Right Here.','Fusce leo orci, susct augue imperdiet set eid lacia. Eed sicropot aigie meced mo nuseide. Pureti susced augue impieo orci, susct augue imperdiet set eid.','',NULL,'/images/landerimage.png'),(144,1,1386144162,2,144,561,'a Landing Page',NULL,1,1,'<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam scelerisque sollicitudin diam, nec pulvinar ipsum dictum ac. Sed posuere purus in hendrerit consequat. Aenean feugiat urna eu nisi commodo, nec accumsan risus sagittis. Pellentesque at sem sit amet dui viverra sodales. Nulla facilisi. Donec condimentum mauris ac neque faucibus, at laoreet nunc fermentum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aenean tincidunt tempor ante a varius. Proin nec orci eu erat lobortis convallis sit amet sed turpis. Duis felis neque, porta sodales nisi.</p>\r\n',1276692693,NULL,NULL,NULL,'/images/desktop/lander1.jpg','/images/tablet/lander1.jpg','/images/mobile/lander1.jpg','PURETI Fresh Headline Goes Right Here.','Fusce leo orci, susct augue imperdiet set eid lacia. Eed sicropot aigie meced mo nuseide. Pureti susced augue impieo orci, susct augue imperdiet set eid.','',NULL,'/images/landerimage.png'),(145,1,1386144797,2,145,666,'Menu - Quicklinks',NULL,1,1,'<div id=\"ai-quicklinks\">\r\n<h3>Quick Links</h3>\r\n<ul>\r\n	<li><a href=\"/\">Home</a></li>\r\n	<li><a href=\"/site-map.html\">Site Map</a></li>\r\n	<li><a href=\"/contact-us.html\">Contact Us</a></li>\r\n</ul>\r\n</div>\r\n',1327064903,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(146,1,1386144833,2,146,666,'Menu - Request Quote',NULL,6,3,'<div id=\"ai-quicklinks\">\r\n<h3>Quick Links</h3>\r\n<ul>\r\n	<li><a href=\"/\">Home</a></li>\r\n	<li><a href=\"/site-map.html\">Site Map</a></li>\r\n	<li><a href=\"/contact-us.html\">Contact Us</a></li>\r\n</ul>\r\n</div>\r\n',1327064903,NULL,NULL,NULL,'','','',NULL,NULL,'',NULL,''),(147,1,1386145065,2,147,683,'Menu - Request Quote',NULL,6,3,'<div id=\"requestQuote\" class=\"hiddenfromview clearfix\">\r\n                        <div id=\"requestQuoteText\"><p>Pureti <strong>Transforms</strong> Surfaces into <br/>Self-cleaning, Air Purifying Materials.</p></div>\r\n                        <form name=\"requestQuoteForm\" enctype=\"multipart/form-data\" class=\"collectionform\" id=\"Form322\" method=\"post\" action=\"\">\r\n                                <input type=\"hidden\" value=\"32\" name=\"collection\">\r\n                                <div class=\"collectionformfields\">\r\n                                        <div id=\"fieldsleft\">\r\n\r\n                                            <div id=\"Field_Collection_322_1\" class=\"collectionfield\">\r\n                                                    <label id=\"Label_Collection_322_1\" for=\"Collection_322_1\">Name <span class=\"required\">*</span></label> \r\n                                                    <input type=\"text\" value=\"\" size=\"25\" maxlength=\"255\" id=\"Collection_322_1\" placeholder=\"Name\" name=\"Collection_322_1\" autocomplete=\"off\" title=\"Please enter your First and Last Name in this field\" class=\"input\">\r\n                                            </div> \r\n\r\n                                            <div id=\"Field_Collection_322_2\" class=\"collectionfield\">\r\n                                                    <label id=\"Label_Collection_322_2\" for=\"Collection_322_2\">Email <span class=\"required\">*</span></label> \r\n                                                    <input type=\"text\" value=\"\" size=\"25\" maxlength=\"255\" id=\"Collection_322_2\" placeholder=\"Email\" name=\"Collection_322_2\" autocomplete=\"off\" title=\"Please enter your First and Last Name in this field\" class=\"input\">\r\n                                            </div>  \r\n                                        </div>        \r\n\r\n                                             <div id=\"Field_Collection_322_3\" class=\"collectionfield\">\r\n                                                    <label id=\"Label_Collection_322_3\" for=\"Collection_322_3\">Message <span class=\"required\">*</span></label> \r\n                                                    <textarea title=\"\" class=\"input\" id=\"Collection_322_3\" placeholder=\"Message\" name=\"Collection_322_3\" cols=\"40\" rows=\"5\"></text{{**}}area>\r\n                                            </div>  \r\n\r\n\r\n                                            <div class=\"collectionsubmit\"><input type=\"submit\" value=\"Submit\" name=\"Save\" class=\"button\"></div>     \r\n                                </div>\r\n                        </form>\r\n                </div>',1386145053,NULL,NULL,NULL,'','','',NULL,NULL,'',NULL,''),(148,1,1386145257,2,148,684,'Menu - Search Form',NULL,6,3,'<form action=\"/search.html\" id=\"searchform\" class=\"clearfix\">\r\n                        <input type=\"text\" name=\"q\" title=\"Search\" id=\"searchwords\" value=\"Search\">\r\n                        <input type=\"submit\" class=\"button\" id=\"searchbutton\" value=\"Search >\">\r\n                    </form>',1386145244,NULL,NULL,NULL,'','','',NULL,NULL,'',NULL,''),(149,1,1386145323,2,149,685,'Menu - Quick Links',NULL,6,1,'<h3>QUICK LINKS</h3>\r\n<ul>\r\n	<li><a href=\"\">Contact Us</a></li>\r\n	<li><a href=\"\">About Us</a></li>\r\n	<li><a href=\"\">Careers</a></li>\r\n	<li><a href=\"\">Testimonials</a></li>\r\n	<li><a href=\"\">Request a Quote</a></li>\r\n	<li><a href=\"\">Support</a></li>\r\n	<li><a href=\"\">Contact Support</a></li>\r\n</ul>\r\n',1386145310,NULL,NULL,NULL,'','','',NULL,NULL,'',NULL,''),(150,1,1386145355,2,150,686,'Menu - Quick Links - Col 2',NULL,6,1,'<h3>header</h3>\r\n<ul>\r\n	<li><a href=\"\">Contact Us</a></li>\r\n	<li><a href=\"\">About Us</a></li>\r\n	<li><a href=\"\">Careers</a></li>\r\n	<li><a href=\"\">Testimonials</a></li>\r\n	<li><a href=\"\">Request a Quote</a></li>\r\n	<li><a href=\"\">Support</a></li>\r\n	<li><a href=\"\">Contact Support</a></li>\r\n</ul>\r\n',1386145341,NULL,NULL,NULL,'','','',NULL,NULL,'',NULL,''),(151,1,1386145390,2,151,687,'Menu - Quick Links - Social Links',NULL,6,1,'<ul>\r\n	<li><a href=\"\" id=\"facebook\" target=\"_blank\">Facebook</a></li>\r\n	<li><a href=\"\" id=\"youtube\" target=\"_blank\">Youtube</a></li>\r\n	<li><a href=\"\" id=\"twitter\" target=\"_blank\">Twitter</a></li>\r\n</ul>\r\n',1386145362,NULL,NULL,NULL,'','','',NULL,NULL,'',NULL,''),(152,1,1386145426,2,152,23,'Menu - Footer',NULL,6,1,'<p><label>Locations</label></p>\r\n<div class=\"location\"><strong>Springfield</strong> <span>1 South Limestone</span> <span>Springfield, OH 45502</span></div>\r\n<div class=\"location\"><strong>Columbus</strong> <span>7003 Post Road, Suite 416</span> <span>Dublin, OH 43016</span></div>\r\n',1204543904,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(153,1,1386145864,2,153,1,'Main Template',NULL,3,1,'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n	<head>\r\n		<title>{{$page.Collection_17_2}}</title>\r\n                <meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\" />\r\n                <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n                <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n                <meta content=\"index,follow\" name=\"robots\" />\r\n                <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n	</head>\r\n	<body xmlns=\"\">\r\n		<div id=\"container\">\r\n			<div id=\"sitename\">\r\n				{{getcontent id=5}}</div>\r\n			<div id=\"mainmenu\">\r\n				{{getcontent id=21}}</div>\r\n			<div id=\"wrap\">\r\n				<div>\r\n					{{$content}}</div>\r\n				<div class=\"clearingdiv\">\r\n					 </div>\r\n			</div>\r\n		</div>\r\n		<div id=\"footer\">\r\n			{{getcontent id=23}}</div>\r\n<!-- edit -->\r\n</bo{{**}}dy>\r\n</html>',NULL,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n{{$JavaScriptJQueryIncludeCode}}','{{$FrontEndJavaScriptJQueryIncludeCode}}\r\n<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(154,1,1386145879,2,154,688,'Main Template',NULL,3,1,'<!DOCTYPE html>\r\n<!--[if lt IE 7]>       <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8 lt-ie7\"> <![endif]-->\r\n<!--[if IE 7]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8\"> <![endif]-->\r\n<!--[if IE 8]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9\"> <![endif]-->\r\n<!--[if IE 9]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10\"> <![endif]-->\r\n<!--[if IE 10]>         <html class=\"no-js lt-ie12 lt-ie11\"> <![endif]-->\r\n<!--[if IE 11]>         <html class=\"no-js lt-ie12\"> <![endif]-->\r\n<!--[if gt IE 11]><!--> <html class=\"no-js\"> <!--<![endif]-->\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\r\n        <title>{{$page.Collection_17_2}}</title>\r\n        <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n        <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n\r\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0\">\r\n\r\n        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->\r\n        <link rel=\"shortcut icon\" href=\"/favicon.ico\">\r\n        \r\n                \r\n        <link rel=\"stylesheet\" href=\"/style/normalize.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/animate.css\">\r\n        <link rel=\"stylesheet\" href=\"/content.css\">\r\n        <link rel=\"stylesheet\" media=\"print\" href=\"/print.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/style/rotator.css\">\r\n\r\n         <!--[if lt IE 9]>\r\n            <link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"/ie8.css\"/>\r\n        <![endif]-->\r\n\r\n        <!-- Important Owl stylesheet -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.carousel.css\">\r\n \r\n        <!-- Default Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.theme.css\">  \r\n        \r\n        <!-- Form Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/futurico.css\">   \r\n        \r\n        <script type=\"text/javascript\" src=\"//use.typekit.net/snl8jlg.js\"></script>\r\n        <script type=\"text/javascript\">try{Typekit.load();}catch(e){}</script>\r\n\r\n        <script src=\"/js/vendor/modernizr-2.6.2.min.js\"></script>\r\n        <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\r\n        <script>window.jQuery || document.write(\'<script src=\"/js/vendor/jquery-1.9.1.min.js\"><\\/script>\')</script>\r\n        <script src=\"/js/plugins.js\"></script>\r\n        <script src=\"/js/main.js\"></script>\r\n\r\n        {{if $smarty.const.GOOGLE_UA_CODE neq \'\'}}\r\n        <!-- Google Analytics: change UA-XXXXX-X to be your site\'s ID. -->\r\n        <script>\r\n            var _gaq=[[\'_setAccount\',\'{{$smarty.const.GOOGLE_UA_CODE}}\'],[\'_trackPageview\']];\r\n            (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];\r\n            g.src=\'//www.google-analytics.com/ga.js\';\r\n            s.parentNode.insertBefore(g,s)}(document,\'script\'));\r\n        </script>\r\n        {{/if}}\r\n    </head>\r\n    <body>\r\n        \r\n         <header>\r\n            <div class=\"container clearfix\">    \r\n                {{getcontent id=666 cache=1}}\r\n\r\n                <div id=\"htop\" class=\"clearfix\">\r\n                <img src=\"images/desktop/logo.png\" class=\"print\"/>\r\n                <a id=\"logo\" href=\"/\">{{$smarty.const.LOGO_TEXT}}</a>\r\n                <a id=\"toggleMenu\" href=\"#\">Menu</a> \r\n                <a id=\"phone\" href=\"tel:{{$smarty.const.PHONE_NUMBER}}\">{{$smarty.const.PHONE_NUMBER}}</a>\r\n                </div>\r\n\r\n                <nav class=\"clearfix\">\r\n                    {{getcontent id=683 cache=1}}\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-top.php\'}}\r\n                    <div id=\"requestQuoteButton\"><a class=\"button\" href=\"#requestQuote\">Request Info</a></div>\r\n                    <div id=\"mobile-flyouts\" class=\"clearfix\"></div>\r\n                    <div id=\"mobile-request\" class=\"requesthidden\"></div>\r\n                </nav>\r\n            </div>\r\n         </header>\r\n        \r\n        \r\n        <div class=\"container clearfix\">\r\n\r\n            <div id=\"left\">\r\n                {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-left.php\'}}\r\n            </div>\r\n            \r\n            <div id=\"content\">\r\n\r\n                <div class=\"contentimage\" id=\"header1\"> </div>\r\n                <div id=\"breadcrumb\">\r\n                       <p>{{$breadcrumb}}</p>\r\n                </div>\r\n            \r\n                <article>\r\n                    {{if $contentdata.Collection_13_14 neq \'\'}}<h1>{{$contentdata.Collection_13_14}}</h1>{{/if}}\r\n                    {{if $contentdata.Collection_13_15 neq \'\'}}<p class=\"intro\">{{$contentdata.Collection_13_15}}</p>{{/if}}\r\n                    \r\n                    {{if $contentdata.Collection_13_16 neq \'\'}}\r\n                        <div class=\"insetright\">\r\n                            <img src=\"{{$contentdata.Collection_13_16}}\" alt=\"\">\r\n                            {{$contentdata.Collection_13_17|everylineparagraph}}\r\n                        </div>\r\n                    {{/if}}\r\n\r\n                    {{$content}}\r\n\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-adlets.php\'}}\r\n                                  \r\n\r\n                </article>\r\n\r\n            </div>\r\n            \r\n\r\n        </div> \r\n\r\n\r\n         <footer class=\"clearfix\">\r\n            \r\n                <div id=\"footertop\">\r\n                        <div class=\"container\">\r\n                            {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-notable.php\'}}\r\n                        </div>\r\n                </div>\r\n\r\n                <div id=\"footerbottom\">\r\n                    <div class=\"clearfix\">\r\n                        <div id=\"footerbottomleft\">\r\n                            {{getcontent id=683 cache=1}}\r\n                            \r\n                            <div id=\"footerbleft\">\r\n                                {{getcontent id=23 cache=1}}\r\n                                <p id=\"oxiem\"><a href=\"http://www.oxiem.com\" target=\"_blank\">Web Design</a></p>\r\n                            </div>\r\n\r\n                            <div id=\"footerbright\">\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=687 cache=1}}\r\n                                </div>\r\n                                \r\n                                <div class=\"fcol fcolsecond\">\r\n                                    {{getcontent id=684 cache=1}}\r\n                                </div>\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=685 cache=1}}\r\n                                </div>\r\n                                <div id=\"social\">\r\n                                    {{getcontent id=686 cache=1}}\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>    \r\n                </div>\r\n                \r\n         </footer>\r\n        \r\n    <script type=\"text/javascript\">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push([\"load\",new Date().getTime()]);var e=document.createElement(\"script\");e.type=\"text/javascript\";e.src=((\"http:\"===document.location.protocol)?\"http:\":\"https:\")+\"//\"+\"js-agent.newrelic.com/nr-100.js\";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push([\"nrfj\",\"beacon-6.newrelic.com\",\"ddc7ff1892\",\"2328076\",\"YFZaNxFVV0oAWkNQX1kcbREKG1YLTlhTVFlZHUgLEw==\",0,253,new Date().getTime(),\"\",\"\",\"\",\"\",\"\"]);</script></body>\r\n</html>\r\n',1386145870,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n{{$JavaScriptJQueryIncludeCode}}','{{$FrontEndJavaScriptJQueryIncludeCode}}\r\n<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}','','','',NULL,NULL,'',NULL,''),(155,1,1386145892,2,155,689,'Lander Template',NULL,3,1,'<!DOCTYPE html>\r\n<!--[if lt IE 7]>       <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8 lt-ie7\"> <![endif]-->\r\n<!--[if IE 7]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8\"> <![endif]-->\r\n<!--[if IE 8]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9\"> <![endif]-->\r\n<!--[if IE 9]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10\"> <![endif]-->\r\n<!--[if IE 10]>         <html class=\"no-js lt-ie12 lt-ie11\"> <![endif]-->\r\n<!--[if IE 11]>         <html class=\"no-js lt-ie12\"> <![endif]-->\r\n<!--[if gt IE 11]><!--> <html class=\"no-js\"> <!--<![endif]-->\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\r\n        <title>{{$page.Collection_17_2}}</title>\r\n        <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n        <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n\r\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0\">\r\n\r\n        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->\r\n        <link rel=\"shortcut icon\" href=\"/favicon.ico\">\r\n        \r\n                \r\n        <link rel=\"stylesheet\" href=\"/style/normalize.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/animate.css\">\r\n        <link rel=\"stylesheet\" href=\"/content.css\">\r\n        <link rel=\"stylesheet\" media=\"print\" href=\"/print.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/style/rotator.css\">\r\n\r\n         <!--[if lt IE 9]>\r\n            <link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"/ie8.css\"/>\r\n        <![endif]-->\r\n\r\n        <!-- Important Owl stylesheet -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.carousel.css\">\r\n \r\n        <!-- Default Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.theme.css\">  \r\n        \r\n        <!-- Form Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/futurico.css\">   \r\n        \r\n        <script type=\"text/javascript\" src=\"//use.typekit.net/snl8jlg.js\"></script>\r\n        <script type=\"text/javascript\">try{Typekit.load();}catch(e){}</script>\r\n\r\n        <script src=\"/js/vendor/modernizr-2.6.2.min.js\"></script>\r\n        <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\r\n        <script>window.jQuery || document.write(\'<script src=\"/js/vendor/jquery-1.9.1.min.js\"><\\/script>\')</script>\r\n        <script src=\"/js/plugins.js\"></script>\r\n        <script src=\"/js/main.js\"></script>\r\n\r\n        {{if $smarty.const.GOOGLE_UA_CODE neq \'\'}}\r\n        <!-- Google Analytics: change UA-XXXXX-X to be your site\'s ID. -->\r\n        <script>\r\n            var _gaq=[[\'_setAccount\',\'{{$smarty.const.GOOGLE_UA_CODE}}\'],[\'_trackPageview\']];\r\n            (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];\r\n            g.src=\'//www.google-analytics.com/ga.js\';\r\n            s.parentNode.insertBefore(g,s)}(document,\'script\'));\r\n        </script>\r\n        {{/if}}\r\n    </head>\r\n    <body>\r\n        \r\n         <header>\r\n            <div class=\"container clearfix\">    \r\n                {{getcontent id=666 cache=1}}\r\n\r\n                <div id=\"htop\" class=\"clearfix\">\r\n                <img src=\"images/desktop/logo.png\" class=\"print\"/>\r\n                <a id=\"logo\" href=\"/\">{{$smarty.const.LOGO_TEXT}}</a>\r\n                <a id=\"toggleMenu\" href=\"#\">Menu</a> \r\n                <a id=\"phone\" href=\"tel:{{$smarty.const.PHONE_NUMBER}}\">{{$smarty.const.PHONE_NUMBER}}</a>\r\n                </div>\r\n\r\n                <nav class=\"clearfix\">\r\n                    {{getcontent id=683 cache=1}}\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-top.php\'}}\r\n                    <div id=\"requestQuoteButton\"><a class=\"button\" href=\"#requestQuote\">Request Info</a></div>\r\n                    <div id=\"mobile-flyouts\" class=\"clearfix\"></div>\r\n                    <div id=\"mobile-request\" class=\"requesthidden\"></div>\r\n                </nav>\r\n            </div>\r\n         </header>\r\n        \r\n        \r\n        <div class=\"container clearfix\">\r\n\r\n            <div id=\"left\">\r\n                {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-left.php\'}}\r\n            </div>\r\n            \r\n            <div id=\"content\">\r\n\r\n                <div class=\"contentimage\" id=\"header1\"> </div>\r\n                <div id=\"breadcrumb\">\r\n                       <p>{{$breadcrumb}}</p>\r\n                </div>\r\n            \r\n                <article>\r\n                    {{if $contentdata.Collection_13_14 neq \'\'}}<h1>{{$contentdata.Collection_13_14}}</h1>{{/if}}\r\n                    {{if $contentdata.Collection_13_15 neq \'\'}}<p class=\"intro\">{{$contentdata.Collection_13_15}}</p>{{/if}}\r\n                    \r\n                    {{if $contentdata.Collection_13_16 neq \'\'}}\r\n                        <div class=\"insetright\">\r\n                            <img src=\"{{$contentdata.Collection_13_16}}\" alt=\"\">\r\n                            {{$contentdata.Collection_13_17|everylineparagraph}}\r\n                        </div>\r\n                    {{/if}}\r\n\r\n                    {{$content}}\r\n\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-adlets.php\'}}\r\n                                  \r\n\r\n                </article>\r\n\r\n            </div>\r\n            \r\n\r\n        </div> \r\n\r\n\r\n         <footer class=\"clearfix\">\r\n            \r\n                <div id=\"footertop\">\r\n                        <div class=\"container\">\r\n                            {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-notable.php\'}}\r\n                        </div>\r\n                </div>\r\n\r\n                <div id=\"footerbottom\">\r\n                    <div class=\"clearfix\">\r\n                        <div id=\"footerbottomleft\">\r\n                            {{getcontent id=683 cache=1}}\r\n                            \r\n                            <div id=\"footerbleft\">\r\n                                {{getcontent id=23 cache=1}}\r\n                                <p id=\"oxiem\"><a href=\"http://www.oxiem.com\" target=\"_blank\">Web Design</a></p>\r\n                            </div>\r\n\r\n                            <div id=\"footerbright\">\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=687 cache=1}}\r\n                                </div>\r\n                                \r\n                                <div class=\"fcol fcolsecond\">\r\n                                    {{getcontent id=684 cache=1}}\r\n                                </div>\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=685 cache=1}}\r\n                                </div>\r\n                                <div id=\"social\">\r\n                                    {{getcontent id=686 cache=1}}\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>    \r\n                </div>\r\n                \r\n         </footer>\r\n        \r\n    <script type=\"text/javascript\">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push([\"load\",new Date().getTime()]);var e=document.createElement(\"script\");e.type=\"text/javascript\";e.src=((\"http:\"===document.location.protocol)?\"http:\":\"https:\")+\"//\"+\"js-agent.newrelic.com/nr-100.js\";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push([\"nrfj\",\"beacon-6.newrelic.com\",\"ddc7ff1892\",\"2328076\",\"YFZaNxFVV0oAWkNQX1kcbREKG1YLTlhTVFlZHUgLEw==\",0,253,new Date().getTime(),\"\",\"\",\"\",\"\",\"\"]);</script><script type=\"text/javascript\">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push([\"load\",new Date().getTime()]);var e=document.createElement(\"script\");e.type=\"text/javascript\";e.src=((\"http:\"===document.location.protocol)?\"http:\":\"https:\")+\"//\"+\"js-agent.newrelic.com/nr-100.js\";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push([\"nrfj\",\"beacon-6.newrelic.com\",\"ddc7ff1892\",\"2328076\",\"YFZaNxFVV0oAWkNQX1kcbREKG1YLTlhTVFlZHUgLEw==\",0,194,new Date().getTime(),\"\",\"\",\"\",\"\",\"\"]);</script><script type=\"text/javascript\">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push([\"load\",new Date().getTime()]);var e=document.createElement(\"script\");e.type=\"text/javascript\";e.src=((\"http:\"===document.location.protocol)?\"http:\":\"https:\")+\"//\"+\"js-agent.newrelic.com/nr-100.js\";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push([\"nrfj\",\"beacon-6.newrelic.com\",\"ddc7ff1892\",\"2328076\",\"YFZaNxFVV0oAWkNQX1kcbREKG1YLTlhTVFlZHUgLEw==\",0,191,new Date().getTime(),\"\",\"\",\"\",\"\",\"\"]);</script></body>\r\n</html>\r\n',1386145884,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n{{$JavaScriptJQueryIncludeCode}}','{{$FrontEndJavaScriptJQueryIncludeCode}}\r\n<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}','','','',NULL,NULL,'',NULL,''),(156,1,1386145950,2,156,688,'Lander Template',NULL,3,1,'<!DOCTYPE html>\r\n<!--[if lt IE 7]>       <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8 lt-ie7\"> <![endif]-->\r\n<!--[if IE 7]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8\"> <![endif]-->\r\n<!--[if IE 8]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9\"> <![endif]-->\r\n<!--[if IE 9]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10\"> <![endif]-->\r\n<!--[if IE 10]>         <html class=\"no-js lt-ie12 lt-ie11\"> <![endif]-->\r\n<!--[if IE 11]>         <html class=\"no-js lt-ie12\"> <![endif]-->\r\n<!--[if gt IE 11]><!--> <html class=\"no-js\"> <!--<![endif]-->\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\r\n        <title>{{$page.Collection_17_2}}</title>\r\n        <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n        <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n\r\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0\">\r\n\r\n        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->\r\n        <link rel=\"shortcut icon\" href=\"/favicon.ico\">\r\n        \r\n                \r\n        <link rel=\"stylesheet\" href=\"/style/normalize.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/animate.css\">\r\n        <link rel=\"stylesheet\" href=\"/content.css\">\r\n        <link rel=\"stylesheet\" media=\"print\" href=\"/print.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/style/rotator.css\">\r\n\r\n         <!--[if lt IE 9]>\r\n            <link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"/ie8.css\"/>\r\n        <![endif]-->\r\n\r\n        <!-- Important Owl stylesheet -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.carousel.css\">\r\n \r\n        <!-- Default Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.theme.css\">  \r\n        \r\n        <!-- Form Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/futurico.css\">   \r\n        \r\n        <script type=\"text/javascript\" src=\"//use.typekit.net/snl8jlg.js\"></script>\r\n        <script type=\"text/javascript\">try{Typekit.load();}catch(e){}</script>\r\n\r\n        <script src=\"/js/vendor/modernizr-2.6.2.min.js\"></script>\r\n        <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\r\n        <script>window.jQuery || document.write(\'<script src=\"/js/vendor/jquery-1.9.1.min.js\"><\\/script>\')</script>\r\n        <script src=\"/js/plugins.js\"></script>\r\n        <script src=\"/js/main.js\"></script>\r\n\r\n        {{if $smarty.const.GOOGLE_UA_CODE neq \'\'}}\r\n        <!-- Google Analytics: change UA-XXXXX-X to be your site\'s ID. -->\r\n        <script>\r\n            var _gaq=[[\'_setAccount\',\'{{$smarty.const.GOOGLE_UA_CODE}}\'],[\'_trackPageview\']];\r\n            (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];\r\n            g.src=\'//www.google-analytics.com/ga.js\';\r\n            s.parentNode.insertBefore(g,s)}(document,\'script\'));\r\n        </script>\r\n        {{/if}}\r\n    </head>\r\n    <body>\r\n        \r\n         <header>\r\n            <div class=\"container clearfix\">    \r\n                {{getcontent id=666 cache=1}}\r\n\r\n                <div id=\"htop\" class=\"clearfix\">\r\n                <img src=\"images/desktop/logo.png\" class=\"print\"/>\r\n                <a id=\"logo\" href=\"/\">{{$smarty.const.LOGO_TEXT}}</a>\r\n                <a id=\"toggleMenu\" href=\"#\">Menu</a> \r\n                <a id=\"phone\" href=\"tel:{{$smarty.const.PHONE_NUMBER}}\">{{$smarty.const.PHONE_NUMBER}}</a>\r\n                </div>\r\n\r\n                <nav class=\"clearfix\">\r\n                    {{getcontent id=683 cache=1}}\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-top.php\'}}\r\n                    <div id=\"requestQuoteButton\"><a class=\"button\" href=\"#requestQuote\">Request Info</a></div>\r\n                    <div id=\"mobile-flyouts\" class=\"clearfix\"></div>\r\n                    <div id=\"mobile-request\" class=\"requesthidden\"></div>\r\n                </nav>\r\n            </div>\r\n         </header>\r\n        \r\n        \r\n        <div class=\"container clearfix\">\r\n\r\n            <div id=\"left\">\r\n                {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-left.php\'}}\r\n            </div>\r\n            \r\n            <div id=\"content\">\r\n\r\n                <div class=\"contentimage\" id=\"header1\"> </div>\r\n                <div id=\"breadcrumb\">\r\n                       <p>{{$breadcrumb}}</p>\r\n                </div>\r\n            \r\n                <article>\r\n                    {{if $contentdata.Collection_13_14 neq \'\'}}<h1>{{$contentdata.Collection_13_14}}</h1>{{/if}}\r\n                    {{if $contentdata.Collection_13_15 neq \'\'}}<p class=\"intro\">{{$contentdata.Collection_13_15}}</p>{{/if}}\r\n                    \r\n                    {{if $contentdata.Collection_13_16 neq \'\'}}\r\n                        <div class=\"insetright\">\r\n                            <img src=\"{{$contentdata.Collection_13_16}}\" alt=\"\">\r\n                            {{$contentdata.Collection_13_17|everylineparagraph}}\r\n                        </div>\r\n                    {{/if}}\r\n\r\n                    {{$content}}\r\n\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-adlets.php\'}}\r\n                                  \r\n\r\n                </article>\r\n\r\n            </div>\r\n            \r\n\r\n        </div> \r\n\r\n\r\n         <footer class=\"clearfix\">\r\n            \r\n                <div id=\"footertop\">\r\n                        <div class=\"container\">\r\n                            {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-notable.php\'}}\r\n                        </div>\r\n                </div>\r\n\r\n                <div id=\"footerbottom\">\r\n                    <div class=\"clearfix\">\r\n                        <div id=\"footerbottomleft\">\r\n                            {{getcontent id=683 cache=1}}\r\n                            \r\n                            <div id=\"footerbleft\">\r\n                                {{getcontent id=23 cache=1}}\r\n                                <p id=\"oxiem\"><a href=\"http://www.oxiem.com\" target=\"_blank\">Web Design</a></p>\r\n                            </div>\r\n\r\n                            <div id=\"footerbright\">\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=687 cache=1}}\r\n                                </div>\r\n                                \r\n                                <div class=\"fcol fcolsecond\">\r\n                                    {{getcontent id=684 cache=1}}\r\n                                </div>\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=685 cache=1}}\r\n                                </div>\r\n                                <div id=\"social\">\r\n                                    {{getcontent id=686 cache=1}}\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>    \r\n                </div>\r\n                \r\n         </footer>\r\n        \r\n    <script type=\"text/javascript\">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push([\"load\",new Date().getTime()]);var e=document.createElement(\"script\");e.type=\"text/javascript\";e.src=((\"http:\"===document.location.protocol)?\"http:\":\"https:\")+\"//\"+\"js-agent.newrelic.com/nr-100.js\";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push([\"nrfj\",\"beacon-6.newrelic.com\",\"ddc7ff1892\",\"2328076\",\"YFZaNxFVV0oAWkNQX1kcbREKG1YLTlhTVFlZHUgLEw==\",0,253,new Date().getTime(),\"\",\"\",\"\",\"\",\"\"]);</script><script type=\"text/javascript\">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push([\"load\",new Date().getTime()]);var e=document.createElement(\"script\");e.type=\"text/javascript\";e.src=((\"http:\"===document.location.protocol)?\"http:\":\"https:\")+\"//\"+\"js-agent.newrelic.com/nr-100.js\";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push([\"nrfj\",\"beacon-6.newrelic.com\",\"ddc7ff1892\",\"2328076\",\"YFZaNxFVV0oAWkNQX1kcbREKG1YLTlhTVFlZHUgLEw==\",0,194,new Date().getTime(),\"\",\"\",\"\",\"\",\"\"]);</script></body>\r\n</html>\r\n',1386145870,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n{{$JavaScriptJQueryIncludeCode}}','{{$FrontEndJavaScriptJQueryIncludeCode}}\r\n<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}','','','',NULL,NULL,'',NULL,''),(157,1,1386145962,2,157,1,'Main Template',NULL,3,1,'<!DOCTYPE html>\r\n<!--[if lt IE 7]>       <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8 lt-ie7\"> <![endif]-->\r\n<!--[if IE 7]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8\"> <![endif]-->\r\n<!--[if IE 8]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9\"> <![endif]-->\r\n<!--[if IE 9]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10\"> <![endif]-->\r\n<!--[if IE 10]>         <html class=\"no-js lt-ie12 lt-ie11\"> <![endif]-->\r\n<!--[if IE 11]>         <html class=\"no-js lt-ie12\"> <![endif]-->\r\n<!--[if gt IE 11]><!--> <html class=\"no-js\"> <!--<![endif]-->\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\r\n        <title>{{$page.Collection_17_2}}</title>\r\n        <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n        <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n\r\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0\">\r\n\r\n        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->\r\n        <link rel=\"shortcut icon\" href=\"/favicon.ico\">\r\n        \r\n                \r\n        <link rel=\"stylesheet\" href=\"/style/normalize.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/animate.css\">\r\n        <link rel=\"stylesheet\" href=\"/content.css\">\r\n        <link rel=\"stylesheet\" media=\"print\" href=\"/print.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/style/rotator.css\">\r\n\r\n         <!--[if lt IE 9]>\r\n            <link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"/ie8.css\"/>\r\n        <![endif]-->\r\n\r\n        <!-- Important Owl stylesheet -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.carousel.css\">\r\n \r\n        <!-- Default Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.theme.css\">  \r\n        \r\n        <!-- Form Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/futurico.css\">   \r\n        \r\n        <script type=\"text/javascript\" src=\"//use.typekit.net/snl8jlg.js\"></script>\r\n        <script type=\"text/javascript\">try{Typekit.load();}catch(e){}</script>\r\n\r\n        <script src=\"/js/vendor/modernizr-2.6.2.min.js\"></script>\r\n        <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\r\n        <script>window.jQuery || document.write(\'<script src=\"/js/vendor/jquery-1.9.1.min.js\"><\\/script>\')</script>\r\n        <script src=\"/js/plugins.js\"></script>\r\n        <script src=\"/js/main.js\"></script>\r\n\r\n        {{if $smarty.const.GOOGLE_UA_CODE neq \'\'}}\r\n        <!-- Google Analytics: change UA-XXXXX-X to be your site\'s ID. -->\r\n        <script>\r\n            var _gaq=[[\'_setAccount\',\'{{$smarty.const.GOOGLE_UA_CODE}}\'],[\'_trackPageview\']];\r\n            (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];\r\n            g.src=\'//www.google-analytics.com/ga.js\';\r\n            s.parentNode.insertBefore(g,s)}(document,\'script\'));\r\n        </script>\r\n        {{/if}}\r\n    </head>\r\n    <body>\r\n        \r\n         <header>\r\n            <div class=\"container clearfix\">    \r\n                {{getcontent id=666 cache=1}}\r\n\r\n                <div id=\"htop\" class=\"clearfix\">\r\n                <img src=\"images/desktop/logo.png\" class=\"print\"/>\r\n                <a id=\"logo\" href=\"/\">{{$smarty.const.LOGO_TEXT}}</a>\r\n                <a id=\"toggleMenu\" href=\"#\">Menu</a> \r\n                <a id=\"phone\" href=\"tel:{{$smarty.const.PHONE_NUMBER}}\">{{$smarty.const.PHONE_NUMBER}}</a>\r\n                </div>\r\n\r\n                <nav class=\"clearfix\">\r\n                    {{getcontent id=683 cache=1}}\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-top.php\'}}\r\n                    <div id=\"requestQuoteButton\"><a class=\"button\" href=\"#requestQuote\">Request Info</a></div>\r\n                    <div id=\"mobile-flyouts\" class=\"clearfix\"></div>\r\n                    <div id=\"mobile-request\" class=\"requesthidden\"></div>\r\n                </nav>\r\n            </div>\r\n         </header>\r\n        \r\n        \r\n        <div class=\"container clearfix\">\r\n\r\n            <div id=\"left\">\r\n                {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-left.php\'}}\r\n            </div>\r\n            \r\n            <div id=\"content\">\r\n\r\n                <div class=\"contentimage\" id=\"header1\">&nbsp;</div>\r\n                <div id=\"breadcrumb\">\r\n                       <p>{{$breadcrumb}}</p>\r\n                </div>\r\n            \r\n                <article>\r\n                    {{if $contentdata.Collection_13_14 neq \'\'}}<h1>{{$contentdata.Collection_13_14}}</h1>{{/if}}\r\n                    {{if $contentdata.Collection_13_15 neq \'\'}}<p class=\"intro\">{{$contentdata.Collection_13_15}}</p>{{/if}}\r\n                    \r\n                    {{if $contentdata.Collection_13_16 neq \'\'}}\r\n                        <div class=\"insetright\">\r\n                            <img src=\"{{$contentdata.Collection_13_16}}\" alt=\"\">\r\n                            {{$contentdata.Collection_13_17|everylineparagraph}}\r\n                        </div>\r\n                    {{/if}}\r\n\r\n                    {{$content}}\r\n\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-adlets.php\'}}\r\n                                  \r\n\r\n                </article>\r\n\r\n            </div>\r\n            \r\n\r\n        </div> \r\n\r\n\r\n         <footer class=\"clearfix\">\r\n            \r\n                <div id=\"footertop\">\r\n                        <div class=\"container\">\r\n                            {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-notable.php\'}}\r\n                        </div>\r\n                </div>\r\n\r\n                <div id=\"footerbottom\">\r\n                    <div class=\"clearfix\">\r\n                        <div id=\"footerbottomleft\">\r\n                            {{getcontent id=683 cache=1}}\r\n                            \r\n                            <div id=\"footerbleft\">\r\n                                {{getcontent id=23 cache=1}}\r\n                                <p id=\"oxiem\"><a href=\"http://www.oxiem.com\" target=\"_blank\">Web Design</a></p>\r\n                            </div>\r\n\r\n                            <div id=\"footerbright\">\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=687 cache=1}}\r\n                                </div>\r\n                                \r\n                                <div class=\"fcol fcolsecond\">\r\n                                    {{getcontent id=684 cache=1}}\r\n                                </div>\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=685 cache=1}}\r\n                                </div>\r\n                                <div id=\"social\">\r\n                                    {{getcontent id=686 cache=1}}\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>    \r\n                </div>\r\n                \r\n         </footer>\r\n        \r\n    </body>\r\n</html>\r\n',NULL,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n{{$JavaScriptJQueryIncludeCode}}','{{$FrontEndJavaScriptJQueryIncludeCode}}\r\n<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}','','','',NULL,NULL,'',NULL,''),(158,1,1386145971,2,158,689,'Homepage Template',NULL,3,1,'<!DOCTYPE html>\r\n<!--[if lt IE 7]>       <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8 lt-ie7\"> <![endif]-->\r\n<!--[if IE 7]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8\"> <![endif]-->\r\n<!--[if IE 8]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9\"> <![endif]-->\r\n<!--[if IE 9]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10\"> <![endif]-->\r\n<!--[if IE 10]>         <html class=\"no-js lt-ie12 lt-ie11\"> <![endif]-->\r\n<!--[if IE 11]>         <html class=\"no-js lt-ie12\"> <![endif]-->\r\n<!--[if gt IE 11]><!--> <html class=\"no-js\"> <!--<![endif]-->\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\r\n        <title>{{$page.Collection_17_2}}</title>\r\n        <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n        <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n\r\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0\">\r\n\r\n        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->\r\n        <link rel=\"shortcut icon\" href=\"/favicon.ico\">\r\n        \r\n                \r\n        <link rel=\"stylesheet\" href=\"/style/normalize.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/animate.css\">\r\n        <link rel=\"stylesheet\" href=\"/content.css\">\r\n        <link rel=\"stylesheet\" media=\"print\" href=\"/print.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/style/rotator.css\">\r\n\r\n         <!--[if lt IE 9]>\r\n            <link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"/ie8.css\"/>\r\n        <![endif]-->\r\n\r\n        <!-- Important Owl stylesheet -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.carousel.css\">\r\n \r\n        <!-- Default Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.theme.css\">  \r\n        \r\n        <!-- Form Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/futurico.css\">   \r\n        \r\n        <script type=\"text/javascript\" src=\"//use.typekit.net/snl8jlg.js\"></script>\r\n        <script type=\"text/javascript\">try{Typekit.load();}catch(e){}</script>\r\n\r\n        <script src=\"/js/vendor/modernizr-2.6.2.min.js\"></script>\r\n        <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\r\n        <script>window.jQuery || document.write(\'<script src=\"/js/vendor/jquery-1.9.1.min.js\"><\\/script>\')</script>\r\n        <script src=\"/js/plugins.js\"></script>\r\n        <script src=\"/js/main.js\"></script>\r\n\r\n        {{if $smarty.const.GOOGLE_UA_CODE neq \'\'}}\r\n        <!-- Google Analytics: change UA-XXXXX-X to be your site\'s ID. -->\r\n        <script>\r\n            var _gaq=[[\'_setAccount\',\'{{$smarty.const.GOOGLE_UA_CODE}}\'],[\'_trackPageview\']];\r\n            (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];\r\n            g.src=\'//www.google-analytics.com/ga.js\';\r\n            s.parentNode.insertBefore(g,s)}(document,\'script\'));\r\n        </script>\r\n        {{/if}}\r\n    </head>\r\n    <body>\r\n        \r\n         <header>\r\n            <div class=\"container clearfix\">    \r\n                {{getcontent id=666 cache=1}}\r\n\r\n                <div id=\"htop\" class=\"clearfix\">\r\n                <img src=\"images/desktop/logo.png\" class=\"print\"/>\r\n                <a id=\"logo\" href=\"/\">{{$smarty.const.LOGO_TEXT}}</a>\r\n                <a id=\"toggleMenu\" href=\"#\">Menu</a> \r\n                <a id=\"phone\" href=\"tel:{{$smarty.const.PHONE_NUMBER}}\">{{$smarty.const.PHONE_NUMBER}}</a>\r\n                </div>\r\n\r\n                <nav class=\"clearfix\">\r\n                    {{getcontent id=683 cache=1}}\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-top.php\'}}\r\n                    <div id=\"requestQuoteButton\"><a class=\"button\" href=\"#requestQuote\">Request Info</a></div>\r\n                    <div id=\"mobile-flyouts\" class=\"clearfix\"></div>\r\n                    <div id=\"mobile-request\" class=\"requesthidden\"></div>\r\n                </nav>\r\n            </div>\r\n         </header>\r\n        \r\n        \r\n        <div class=\"container clearfix\">\r\n\r\n            <div id=\"left\">\r\n                {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-left.php\'}}\r\n            </div>\r\n            \r\n            <div id=\"content\">\r\n\r\n                <div class=\"contentimage\" id=\"header1\"> </div>\r\n                <div id=\"breadcrumb\">\r\n                       <p>{{$breadcrumb}}</p>\r\n                </div>\r\n            \r\n                <article>\r\n                    {{if $contentdata.Collection_13_14 neq \'\'}}<h1>{{$contentdata.Collection_13_14}}</h1>{{/if}}\r\n                    {{if $contentdata.Collection_13_15 neq \'\'}}<p class=\"intro\">{{$contentdata.Collection_13_15}}</p>{{/if}}\r\n                    \r\n                    {{if $contentdata.Collection_13_16 neq \'\'}}\r\n                        <div class=\"insetright\">\r\n                            <img src=\"{{$contentdata.Collection_13_16}}\" alt=\"\">\r\n                            {{$contentdata.Collection_13_17|everylineparagraph}}\r\n                        </div>\r\n                    {{/if}}\r\n\r\n                    {{$content}}\r\n\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-adlets.php\'}}\r\n                                  \r\n\r\n                </article>\r\n\r\n            </div>\r\n            \r\n\r\n        </div> \r\n\r\n\r\n         <footer class=\"clearfix\">\r\n            \r\n                <div id=\"footertop\">\r\n                        <div class=\"container\">\r\n                            {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-notable.php\'}}\r\n                        </div>\r\n                </div>\r\n\r\n                <div id=\"footerbottom\">\r\n                    <div class=\"clearfix\">\r\n                        <div id=\"footerbottomleft\">\r\n                            {{getcontent id=683 cache=1}}\r\n                            \r\n                            <div id=\"footerbleft\">\r\n                                {{getcontent id=23 cache=1}}\r\n                                <p id=\"oxiem\"><a href=\"http://www.oxiem.com\" target=\"_blank\">Web Design</a></p>\r\n                            </div>\r\n\r\n                            <div id=\"footerbright\">\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=687 cache=1}}\r\n                                </div>\r\n                                \r\n                                <div class=\"fcol fcolsecond\">\r\n                                    {{getcontent id=684 cache=1}}\r\n                                </div>\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=685 cache=1}}\r\n                                </div>\r\n                                <div id=\"social\">\r\n                                    {{getcontent id=686 cache=1}}\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>    \r\n                </div>\r\n                \r\n         </footer>\r\n        \r\n    <script type=\"text/javascript\">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push([\"load\",new Date().getTime()]);var e=document.createElement(\"script\");e.type=\"text/javascript\";e.src=((\"http:\"===document.location.protocol)?\"http:\":\"https:\")+\"//\"+\"js-agent.newrelic.com/nr-100.js\";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push([\"nrfj\",\"beacon-6.newrelic.com\",\"ddc7ff1892\",\"2328076\",\"YFZaNxFVV0oAWkNQX1kcbREKG1YLTlhTVFlZHUgLEw==\",0,253,new Date().getTime(),\"\",\"\",\"\",\"\",\"\"]);</script><script type=\"text/javascript\">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push([\"load\",new Date().getTime()]);var e=document.createElement(\"script\");e.type=\"text/javascript\";e.src=((\"http:\"===document.location.protocol)?\"http:\":\"https:\")+\"//\"+\"js-agent.newrelic.com/nr-100.js\";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push([\"nrfj\",\"beacon-6.newrelic.com\",\"ddc7ff1892\",\"2328076\",\"YFZaNxFVV0oAWkNQX1kcbREKG1YLTlhTVFlZHUgLEw==\",0,194,new Date().getTime(),\"\",\"\",\"\",\"\",\"\"]);</script><script type=\"text/javascript\">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push([\"load\",new Date().getTime()]);var e=document.createElement(\"script\");e.type=\"text/javascript\";e.src=((\"http:\"===document.location.protocol)?\"http:\":\"https:\")+\"//\"+\"js-agent.newrelic.com/nr-100.js\";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push([\"nrfj\",\"beacon-6.newrelic.com\",\"ddc7ff1892\",\"2328076\",\"YFZaNxFVV0oAWkNQX1kcbREKG1YLTlhTVFlZHUgLEw==\",0,191,new Date().getTime(),\"\",\"\",\"\",\"\",\"\"]);</script><script type=\"text/javascript\">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push([\"load\",new Date().getTime()]);var e=document.createElement(\"script\");e.type=\"text/javascript\";e.src=((\"http:\"===document.location.protocol)?\"http:\":\"https:\")+\"//\"+\"js-agent.newrelic.com/nr-100.js\";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push([\"nrfj\",\"beacon-6.newrelic.com\",\"ddc7ff1892\",\"2328076\",\"YFZaNxFVV0oAWkNQX1kcbREKG1YLTlhTVFlZHUgLEw==\",0,200,new Date().getTime(),\"\",\"\",\"\",\"\",\"\"]);</script></body>\r\n</html>\r\n',1386145884,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n{{$JavaScriptJQueryIncludeCode}}','{{$FrontEndJavaScriptJQueryIncludeCode}}\r\n<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}','','','',NULL,NULL,'',NULL,''),(159,1,1386146131,2,159,1,'Main Template',NULL,3,1,'<!DOCTYPE html>\r\n<!--[if lt IE 7]>       <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8 lt-ie7\"> <![endif]-->\r\n<!--[if IE 7]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8\"> <![endif]-->\r\n<!--[if IE 8]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9\"> <![endif]-->\r\n<!--[if IE 9]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10\"> <![endif]-->\r\n<!--[if IE 10]>         <html class=\"no-js lt-ie12 lt-ie11\"> <![endif]-->\r\n<!--[if IE 11]>         <html class=\"no-js lt-ie12\"> <![endif]-->\r\n<!--[if gt IE 11]><!--> <html class=\"no-js\"> <!--<![endif]-->\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\r\n        <title>{{$page.Collection_17_2}}</title>\r\n        <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n        <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n\r\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0\">\r\n\r\n        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->\r\n        <link rel=\"shortcut icon\" href=\"/favicon.ico\">\r\n        \r\n                \r\n        <link rel=\"stylesheet\" href=\"/style/normalize.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/animate.css\">\r\n        <link rel=\"stylesheet\" href=\"/content.css\">\r\n        <link rel=\"stylesheet\" media=\"print\" href=\"/print.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/style/rotator.css\">\r\n\r\n         <!--[if lt IE 9]>\r\n            <link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"/ie8.css\"/>\r\n        <![endif]-->\r\n\r\n        <!-- Important Owl stylesheet -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.carousel.css\">\r\n \r\n        <!-- Default Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.theme.css\">  \r\n        \r\n        <!-- Form Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/futurico.css\">   \r\n        \r\n        <script type=\"text/javascript\" src=\"//use.typekit.net/snl8jlg.js\"></script>\r\n        <script type=\"text/javascript\">try{Typekit.load();}catch(e){}</script>\r\n\r\n        <script src=\"/js/vendor/modernizr-2.6.2.min.js\"></script>\r\n        <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\r\n        <script>window.jQuery || document.write(\'<script src=\"/js/vendor/jquery-1.9.1.min.js\"><\\/script>\')</script>\r\n        <script src=\"/js/plugins.js\"></script>\r\n        <script src=\"/js/main.js\"></script>\r\n\r\n        {{if $smarty.const.GOOGLE_UA_CODE neq \'\'}}\r\n        <!-- Google Analytics: change UA-XXXXX-X to be your site\'s ID. -->\r\n        <script>\r\n            var _gaq=[[\'_setAccount\',\'{{$smarty.const.GOOGLE_UA_CODE}}\'],[\'_trackPageview\']];\r\n            (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];\r\n            g.src=\'//www.google-analytics.com/ga.js\';\r\n            s.parentNode.insertBefore(g,s)}(document,\'script\'));\r\n        </script>\r\n        {{/if}}\r\n    </head>\r\n    <body>\r\n        \r\n         <header>\r\n            <div class=\"container clearfix\">    \r\n                {{getcontent id=666 cache=1}}\r\n\r\n                <div id=\"htop\" class=\"clearfix\">\r\n                <img src=\"images/desktop/logo.png\" class=\"print\"/>\r\n                <a id=\"logo\" href=\"/\">{{$smarty.const.LOGO_TEXT}}</a>\r\n                <a id=\"toggleMenu\" href=\"#\">Menu</a> \r\n                <a id=\"phone\" href=\"tel:{{$smarty.const.PHONE_NUMBER}}\">{{$smarty.const.PHONE_NUMBER}}</a>\r\n                </div>\r\n\r\n                <nav class=\"clearfix\">\r\n                    {{getcontent id=683 cache=1}}\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-top.php\'}}\r\n                    <div id=\"requestQuoteButton\"><a class=\"button\" href=\"#requestQuote\">Request Info</a></div>\r\n                    <div id=\"mobile-flyouts\" class=\"clearfix\"></div>\r\n                    <div id=\"mobile-request\" class=\"requesthidden\"></div>\r\n                </nav>\r\n            </div>\r\n         </header>\r\n        \r\n        \r\n        <div class=\"container clearfix\">\r\n\r\n            <div id=\"left\">\r\n                {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-left.php\'}}\r\n            </div>\r\n            \r\n            <div id=\"content\">\r\n\r\n                <div class=\"contentimage\" id=\"header1\">&nbsp;</div>\r\n                <div id=\"breadcrumb\">\r\n                       <p>{{$breadcrumb}}</p>\r\n                </div>\r\n            \r\n                <article>\r\n                    {{if $contentdata.Collection_13_14 neq \'\'}}<h1>{{$contentdata.Collection_13_14}}</h1>{{/if}}\r\n                    {{if $contentdata.Collection_13_15 neq \'\'}}<p class=\"intro\">{{$contentdata.Collection_13_15}}</p>{{/if}}\r\n                    \r\n                    {{if $contentdata.Collection_13_16 neq \'\'}}\r\n                        <div class=\"insetright\">\r\n                            <img src=\"{{$contentdata.Collection_13_16}}\" alt=\"\">\r\n                            {{$contentdata.Collection_13_17|everylineparagraph}}\r\n                        </div>\r\n                    {{/if}}\r\n\r\n                    {{$content}}\r\n\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-adlets.php\'}}\r\n                                  \r\n\r\n                </article>\r\n\r\n            </div>\r\n            \r\n\r\n        </div> \r\n\r\n\r\n         <footer class=\"clearfix\">\r\n            \r\n                <div id=\"footertop\">\r\n                        <div class=\"container\">\r\n                            {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-notable.php\'}}\r\n                        </div>\r\n                </div>\r\n\r\n                <div id=\"footerbottom\">\r\n                    <div class=\"clearfix\">\r\n                        <div id=\"footerbottomleft\">\r\n                            {{getcontent id=683 cache=1}}\r\n                            \r\n                            <div id=\"footerbleft\">\r\n                                {{getcontent id=23 cache=1}}\r\n                                <p id=\"oxiem\"><a href=\"http://www.oxiem.com\" target=\"_blank\">Web Design</a></p>\r\n                            </div>\r\n\r\n                            <div id=\"footerbright\">\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=687 cache=1}}\r\n                                </div>\r\n                                \r\n                                <div class=\"fcol fcolsecond\">\r\n                                    {{getcontent id=684 cache=1}}\r\n                                </div>\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=685 cache=1}}\r\n                                </div>\r\n                                <div id=\"social\">\r\n                                    {{getcontent id=686 cache=1}}\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>    \r\n                </div>\r\n                \r\n         </footer>\r\n        \r\n    </bo{{**}}dy>\r\n</html>',NULL,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n{{$JavaScriptJQueryIncludeCode}}','{{$FrontEndJavaScriptJQueryIncludeCode}}\r\n<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}','','','',NULL,NULL,'',NULL,''),(160,1,1386146706,2,160,688,'Lander Template',NULL,3,1,'<!DOCTYPE html>\r\n<!--[if lt IE 7]>       <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8 lt-ie7\"> <![endif]-->\r\n<!--[if IE 7]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8\"> <![endif]-->\r\n<!--[if IE 8]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9\"> <![endif]-->\r\n<!--[if IE 9]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10\"> <![endif]-->\r\n<!--[if IE 10]>         <html class=\"no-js lt-ie12 lt-ie11\"> <![endif]-->\r\n<!--[if IE 11]>         <html class=\"no-js lt-ie12\"> <![endif]-->\r\n<!--[if gt IE 11]><!--> <html class=\"no-js\"> <!--<![endif]-->\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\r\n        <title>{{$page.Collection_17_2}}</title>\r\n        <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n        <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n\r\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0\">\r\n\r\n        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->\r\n        <link rel=\"shortcut icon\" href=\"/favicon.ico\">\r\n        \r\n                \r\n        <link rel=\"stylesheet\" href=\"/style/normalize.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/animate.css\">\r\n        <link rel=\"stylesheet\" href=\"/content.css\">\r\n        <link rel=\"stylesheet\" media=\"print\" href=\"/print.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/style/rotator.css\">\r\n\r\n         <!--[if lt IE 9]>\r\n            <link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"/ie8.css\"/>\r\n        <![endif]-->\r\n\r\n        <!-- Important Owl stylesheet -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.carousel.css\">\r\n \r\n        <!-- Default Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.theme.css\">  \r\n        \r\n        <!-- Form Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/futurico.css\">   \r\n        \r\n        <script type=\"text/javascript\" src=\"//use.typekit.net/snl8jlg.js\"></script>\r\n        <script type=\"text/javascript\">try{Typekit.load();}catch(e){}</script>\r\n\r\n        <script src=\"/js/vendor/modernizr-2.6.2.min.js\"></script>\r\n        <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\r\n        <script>window.jQuery || document.write(\'<script src=\"/js/vendor/jquery-1.9.1.min.js\"><\\/script>\')</script>\r\n        <script src=\"/js/plugins.js\"></script>\r\n        <script src=\"/js/main.js\"></script>\r\n\r\n        {{if $smarty.const.GOOGLE_UA_CODE neq \'\'}}\r\n        <!-- Google Analytics: change UA-XXXXX-X to be your site\'s ID. -->\r\n        <script>\r\n            var _gaq=[[\'_setAccount\',\'{{$smarty.const.GOOGLE_UA_CODE}}\'],[\'_trackPageview\']];\r\n            (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];\r\n            g.src=\'//www.google-analytics.com/ga.js\';\r\n            s.parentNode.insertBefore(g,s)}(document,\'script\'));\r\n        </script>\r\n        {{/if}}\r\n    </head>\r\n    <body>\r\n        \r\n         <header>\r\n            <div class=\"container clearfix\">    \r\n                {{getcontent id=666 cache=1}}\r\n\r\n                <div id=\"htop\" class=\"clearfix\">\r\n                <img src=\"images/desktop/logo.png\" class=\"print\"/>\r\n                <a id=\"logo\" href=\"/\">{{$smarty.const.LOGO_TEXT}}</a>\r\n                <a id=\"toggleMenu\" href=\"#\">Menu</a> \r\n                <a id=\"phone\" href=\"tel:{{$smarty.const.PHONE_NUMBER}}\">{{$smarty.const.PHONE_NUMBER}}</a>\r\n                </div>\r\n\r\n                <nav class=\"clearfix\">\r\n                    {{getcontent id=683 cache=1}}\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-top.php\'}}\r\n                    <div id=\"requestQuoteButton\"><a class=\"button\" href=\"#requestQuote\">Request Info</a></div>\r\n                    <div id=\"mobile-flyouts\" class=\"clearfix\"></div>\r\n                    <div id=\"mobile-request\" class=\"requesthidden\"></div>\r\n                </nav>\r\n            </div>\r\n         </header>\r\n        \r\n        \r\n        <div class=\"container clearfix\">\r\n\r\n            <div id=\"left\">\r\n                {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-left.php\'}}\r\n            </div>\r\n            \r\n            <div id=\"content\">\r\n\r\n                <div class=\"contentimage\" id=\"header1\">&nbsp;</div>\r\n                <div id=\"breadcrumb\">\r\n                       <p>{{$breadcrumb}}</p>\r\n                </div>\r\n            \r\n                <article>\r\n                    {{if $contentdata.Collection_13_14 neq \'\'}}<h1>{{$contentdata.Collection_13_14}}</h1>{{/if}}\r\n                    {{if $contentdata.Collection_13_15 neq \'\'}}<p class=\"intro\">{{$contentdata.Collection_13_15}}</p>{{/if}}\r\n                    \r\n                    {{if $contentdata.Collection_13_16 neq \'\'}}\r\n                        <div class=\"insetright\">\r\n                            <img src=\"{{$contentdata.Collection_13_16}}\" alt=\"\">\r\n                            {{$contentdata.Collection_13_17|everylineparagraph}}\r\n                        </div>\r\n                    {{/if}}\r\n\r\n                    {{$content}}\r\n\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-adlets.php\'}}\r\n                                  \r\n\r\n                </article>\r\n\r\n            </div>\r\n            \r\n\r\n        </div> \r\n\r\n\r\n         <footer class=\"clearfix\">\r\n            \r\n                <div id=\"footertop\">\r\n                        <div class=\"container\">\r\n                            {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-notable.php\'}}\r\n                        </div>\r\n                </div>\r\n\r\n                <div id=\"footerbottom\">\r\n                    <div class=\"clearfix\">\r\n                        <div id=\"footerbottomleft\">\r\n                            {{getcontent id=683 cache=1}}\r\n                            \r\n                            <div id=\"footerbleft\">\r\n                                {{getcontent id=23 cache=1}}\r\n                                <p id=\"oxiem\"><a href=\"http://www.oxiem.com\" target=\"_blank\">Web Design</a></p>\r\n                            </div>\r\n\r\n                            <div id=\"footerbright\">\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=687 cache=1}}\r\n                                </div>\r\n                                \r\n                                <div class=\"fcol fcolsecond\">\r\n                                    {{getcontent id=684 cache=1}}\r\n                                </div>\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=685 cache=1}}\r\n                                </div>\r\n                                <div id=\"social\">\r\n                                    {{getcontent id=686 cache=1}}\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>    \r\n                </div>\r\n                \r\n         </footer>\r\n        \r\n    </bo{{**}}dy>\r\n</html>\r\n',1386145870,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n{{$JavaScriptJQueryIncludeCode}}','{{$FrontEndJavaScriptJQueryIncludeCode}}\r\n<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}','','','',NULL,NULL,'',NULL,''),(161,1,1386146761,2,161,689,'Homepage Template',NULL,3,1,'<!DOCTYPE html>\r\n<!--[if lt IE 7]>       <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8 lt-ie7\"> <![endif]-->\r\n<!--[if IE 7]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9 lt-ie8\"> <![endif]-->\r\n<!--[if IE 8]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10 lt-ie9\"> <![endif]-->\r\n<!--[if IE 9]>          <html class=\"no-js lt-ie12 lt-ie11 lt-ie10\"> <![endif]-->\r\n<!--[if IE 10]>         <html class=\"no-js lt-ie12 lt-ie11\"> <![endif]-->\r\n<!--[if IE 11]>         <html class=\"no-js lt-ie12\"> <![endif]-->\r\n<!--[if gt IE 11]><!--> <html class=\"no-js\"> <!--<![endif]-->\r\n    <head>\r\n        <meta charset=\"utf-8\">\r\n        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\r\n        <title>{{$page.Collection_17_2}}</title>\r\n        <meta content=\"{{$page.Collection_17_7}}\" name=\"keywords\" />\r\n        <meta content=\"{{$page.Collection_17_8}}\" name=\"description\" />\r\n\r\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0\">\r\n\r\n        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->\r\n        <link rel=\"shortcut icon\" href=\"/favicon.ico\">\r\n        \r\n                \r\n        <link rel=\"stylesheet\" href=\"/style/normalize.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/animate.css\">\r\n        <link rel=\"stylesheet\" href=\"/content.css\">\r\n        <link rel=\"stylesheet\" media=\"print\" href=\"/print.css\">\r\n        \r\n        <link rel=\"stylesheet\" href=\"/style/rotator.css\">\r\n\r\n         <!--[if lt IE 9]>\r\n            <link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"/ie8.css\"/>\r\n        <![endif]-->\r\n\r\n        <!-- Important Owl stylesheet -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.carousel.css\">\r\n \r\n        <!-- Default Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/owl.theme.css\">  \r\n        \r\n        <!-- Form Theme -->\r\n        <link rel=\"stylesheet\" href=\"/style/futurico.css\">   \r\n        \r\n        <script type=\"text/javascript\" src=\"//use.typekit.net/snl8jlg.js\"></script>\r\n        <script type=\"text/javascript\">try{Typekit.load();}catch(e){}</script>\r\n\r\n        <script src=\"/js/vendor/modernizr-2.6.2.min.js\"></script>\r\n        <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\"></script>\r\n        <script>window.jQuery || document.write(\'<script src=\"/js/vendor/jquery-1.9.1.min.js\"><\\/script>\')</script>\r\n        <script src=\"/js/plugins.js\"></script>\r\n        <script src=\"/js/main.js\"></script>\r\n\r\n        {{if $smarty.const.GOOGLE_UA_CODE neq \'\'}}\r\n        <!-- Google Analytics: change UA-XXXXX-X to be your site\'s ID. -->\r\n        <script>\r\n            var _gaq=[[\'_setAccount\',\'{{$smarty.const.GOOGLE_UA_CODE}}\'],[\'_trackPageview\']];\r\n            (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];\r\n            g.src=\'//www.google-analytics.com/ga.js\';\r\n            s.parentNode.insertBefore(g,s)}(document,\'script\'));\r\n        </script>\r\n        {{/if}}\r\n    </head>\r\n    <body>\r\n        \r\n         <header>\r\n            <div class=\"container clearfix\">    \r\n                {{getcontent id=666 cache=1}}\r\n\r\n                <div id=\"htop\" class=\"clearfix\">\r\n                <img src=\"images/desktop/logo.png\" class=\"print\"/>\r\n                <a id=\"logo\" href=\"/\">{{$smarty.const.LOGO_TEXT}}</a>\r\n                <a id=\"toggleMenu\" href=\"#\">Menu</a> \r\n                <a id=\"phone\" href=\"tel:{{$smarty.const.PHONE_NUMBER}}\">{{$smarty.const.PHONE_NUMBER}}</a>\r\n                </div>\r\n\r\n                <nav class=\"clearfix\">\r\n                    {{getcontent id=683 cache=1}}\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-top.php\'}}\r\n                    <div id=\"requestQuoteButton\"><a class=\"button\" href=\"#requestQuote\">Request Info</a></div>\r\n                    <div id=\"mobile-flyouts\" class=\"clearfix\"></div>\r\n                    <div id=\"mobile-request\" class=\"requesthidden\"></div>\r\n                </nav>\r\n            </div>\r\n         </header>\r\n        \r\n        \r\n        <div class=\"container clearfix\">\r\n\r\n            <div id=\"left\">\r\n                {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-left.php\'}}\r\n            </div>\r\n            \r\n            <div id=\"content\">\r\n\r\n                <div class=\"contentimage\" id=\"header1\">&nbsp;</div>\r\n                <div id=\"breadcrumb\">\r\n                       <p>{{$breadcrumb}}</p>\r\n                </div>\r\n            \r\n                <article>\r\n                    {{if $contentdata.Collection_13_14 neq \'\'}}<h1>{{$contentdata.Collection_13_14}}</h1>{{/if}}\r\n                    {{if $contentdata.Collection_13_15 neq \'\'}}<p class=\"intro\">{{$contentdata.Collection_13_15}}</p>{{/if}}\r\n                    \r\n                    {{if $contentdata.Collection_13_16 neq \'\'}}\r\n                        <div class=\"insetright\">\r\n                            <img src=\"{{$contentdata.Collection_13_16}}\" alt=\"\">\r\n                            {{$contentdata.Collection_13_17|everylineparagraph}}\r\n                        </div>\r\n                    {{/if}}\r\n\r\n                    {{$content}}\r\n\r\n                    {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-adlets.php\'}}\r\n                                  \r\n\r\n                </article>\r\n\r\n            </div>\r\n            \r\n\r\n        </div> \r\n\r\n\r\n         <footer class=\"clearfix\">\r\n            \r\n                <div id=\"footertop\">\r\n                        <div class=\"container\">\r\n                            {{include_php file=\'file:\'|concat:$smarty.server.DOCUMENT_ROOT|concat:\'/includes/cache/menu-notable.php\'}}\r\n                        </div>\r\n                </div>\r\n\r\n                <div id=\"footerbottom\">\r\n                    <div class=\"clearfix\">\r\n                        <div id=\"footerbottomleft\">\r\n                            {{getcontent id=683 cache=1}}\r\n                            \r\n                            <div id=\"footerbleft\">\r\n                                {{getcontent id=23 cache=1}}\r\n                                <p id=\"oxiem\"><a href=\"http://www.oxiem.com\" target=\"_blank\">Web Design</a></p>\r\n                            </div>\r\n\r\n                            <div id=\"footerbright\">\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=687 cache=1}}\r\n                                </div>\r\n                                \r\n                                <div class=\"fcol fcolsecond\">\r\n                                    {{getcontent id=684 cache=1}}\r\n                                </div>\r\n                                <div class=\"fcol\">\r\n                                    {{getcontent id=685 cache=1}}\r\n                                </div>\r\n                                <div id=\"social\">\r\n                                    {{getcontent id=686 cache=1}}\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>    \r\n                </div>\r\n                \r\n         </footer>\r\n        \r\n    </bo{{**}}dy>\r\n</html>',1386145884,'<script type=\"text/javascript\" src=\"/js/jquery.js\"></script>\r\n<script type=\"text/javascript\" src=\"/js/jquery.ui.js\"></script>\r\n{{$JavaScriptJQueryIncludeCode}}','{{$FrontEndJavaScriptJQueryIncludeCode}}\r\n<script type=\"text/javascript\">$(document).ready(function(){ {{$FrontEndJavaScriptJQueryCode}} {{$JavaScriptJQueryCode}} });</script>','<link rel=\"stylesheet\" type=\"text/css\" href=\"/content.css\" />\r\n<link type=\"text/css\" href=\"/style/ui/jquery.ui.css\" rel=\"stylesheet\" />\r\n{{$CSSIncludes}}','','','',NULL,NULL,'',NULL,''),(162,1,1386146777,2,162,2,'Content - Homepage',NULL,1,1,'<div id=\"contentfull\">\r\n<div id=\"smarty_plugin\">{{getcontent id=519}}</div>\r\n</div>\r\n<div class=\"sep\">&nbsp;</div>\r\n<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=666}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=13}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Demo</h1>\r\n<p>Share your story with us.</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n</div>\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1188298498,'<style type=\"text/css\">\r\n#rightside { margin-left:0px;}\r\n#ai-quicklinks { padding-bottom:15px;}\r\n</style>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(163,1,1386146808,2,163,2,'Content - Homepage',NULL,1,3,'<div id=\"contentfull\">\r\n<div id=\"smarty_plugin\">{{getcontent id=519}}</div>\r\n</div>\r\n<div class=\"sep\">&nbsp;</div>\r\n<div id=\"leftside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=666}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=13}}</div>\r\n</div>\r\n<div id=\"content\">\r\n<h1>Demo</h1>\r\n<p>Share your story with us.</p>\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n</div>\r\n<div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n</div>\r\n<div id=\"rightside\">\r\n<div id=\"smarty_plugin\">{{getcontent id=248}}</div>\r\n<div id=\"smarty_plugin\">{{getcontent id=269}}</div>\r\n</div>\r\n',1188298498,'<style type=\"text/css\">\r\n#rightside { margin-left:0px;}\r\n#ai-quicklinks { padding-bottom:15px;}\r\n</style>',NULL,NULL,'','','',NULL,NULL,'',NULL,''),