--- /dev/null
+<Files ~ "^\.ht">
+Order allow,deny
+Deny from all
+</Files>
+<Files ~ "^setup.phtml">
+Order allow,deny
+Deny from all
+</Files>
+<Files ~ "\.ini$">
+Order allow,deny
+Deny from all
+</Files>
+ErrorDocument 404 /404.html
+RewriteEngine On
+AddDefaultCharset utf-8
+
+RewriteBase /www.cedarvillemarine.com/
+
+# Redirect non-www to www
+RewriteCond %{ENV:GLM_HOST_ID} PRODUCTION
+RewriteCond %{HTTP_HOST} !^www\. [NC]
+RewriteCond %{HTTP_HOST} !^demo\. [NC]
+RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
+
+# CacheBusting
+RewriteCond %{REQUEST_URI} v/[0-9\.]+/
+RewriteRule ^v/[0-9\.]+/(.*) $1 [L]
+
+# Combine resource files into one
+# but only for PRODUCTION MODE
+#RewriteCond %{ENV:GLM_HOST_ID} PRODUCTION
+#RewriteCond %{HTTPS} !=on
+#RewriteRule ^javascript/(.*\.js) combine.php?type=javascript&files=$1
+#RewriteCond %{ENV:GLM_HOST_ID} =PRODUCTION
+#RewriteCond %{HTTPS} !=on
+#RewriteRule ^css/(.*\.css) combine.php?type=css&files=$1
+
+############
+## Events ##
+############
+RewriteRule ^events/([0-9]*)/([0-9]*)/$ index.php?catid=$1&eventid=$2 [QSA,L]
+RewriteRule ^events/([0-9]*)/$ index.php?catid=$1 [QSA,L]
+
+RewriteRule ^VisitorGuide/(.*)/$ pdf-download.php?uidpdf=$1&pdf_file=VisitorGuide [L]
+RewriteRule ^.*-([0-9]*)/([0-9]*)/$ index.php?catid=$1&photo_catid=$2 [L]
+# rewrites for the toolbox pages
+RewriteRule ^.*-([0-9]*)/index.php index\.php?%{QUERY_STRING}
+RewriteRule ^.*-([0-9]*)/$ index\.php?catid=$1 [QSA,L]
+
+# trailing slash
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_URI} ^.*-([0-9]*)$
+RewriteRule ^(.*)$ %{REQUEST_URI}/ [L,R=301]
+
+RewriteRule bannerClick.php Toolkit/Banners/banner_click_through.php [QSA,L]
+
+##############
+## MemberDB ##
+##############
+# Members only area
+RewriteRule ^members-only-area/$ Toolkit/Members/MembersOnly/index.php [QSA,L]
+RewriteRule ^member-area-google-map/$ Toolkit/Members/memberDBGoogleAreaMap.php [QSA,L]
+RewriteRule ^member-city-google-map/$ Toolkit/Members/memberDBGoogleAreaMapCity.php [QSA,L]
+# Ajax call for google map
+RewriteRule ^member-db-google-map/$ Toolkit/Members/memberDBGoogleMap.php [QSA,L]
+# Ajax call for google maps w/ SEO urls - extract catid from url to pass
+# along w/ the query string.
+RewriteRule ^.*-([0-9]*)/member-db-google-map/$ Toolkit/Members/memberDBGoogleMap.php?catid=$1 [QSA,L]
+# short urls w/ google maps
+RewriteRule ^([A-Za-z0-9_-]*)/member-db-google-map/$ Toolkit/Members/memberDBGoogleMap.php?glmPage=$1 [L]
+# Downloading member files from profile pages
+RewriteRule ^member-file/([0-9]*)/([0-9]*)/$ Toolkit/Members/memberFileDownload.php?mid=$1&fid=$2 [L]
+# Ajax call for saving photo repositioning
+RewriteRule ^member-save-photos/$ Toolkit/Members/sortPhotos.php [QSA,L]
+RewriteRule ^memberdb-site-map index.php?catid=0&memberDbSiteMap=1 [L]
+
+RewriteRule ^map/([0-9A-F]{6})/([0-9]*).png Toolkit/Maps/marker.php?color=$1&text=$2 [L]
+RewriteRule ^areamap/([0-9A-F]{6}).png Toolkit/Maps/marker2.php?color=$1 [L]
+
+# Trip planner
+RewriteRule ^trip-planner-map.js$ Toolkit/Members/libjs/trip-planner-map.js [L]
+RewriteRule ^trip-planner-members/$ Toolkit/Members/TripPlanner/googleMapData.php [L]
+RewriteRule ^trip-planner-wish-list/([0-9]*)/([0-9]*)/$ Toolkit/Members/TripPlanner/wish-list.php?catid=$1&member_id=$2&detail=1 [L]
+# This is the rewrite rule for the pending member emails that get sent
+# out when a user updates their member record from the members only area.
+RewriteRule ^pending-member/([0-9]*)/$ admin/members.php?page=memberUpdates&module=authorizeUpdates&id=$1 [L]
+# Profile pages
+#RewriteRule ^member-profile/([0-9]*)/([0-9]*)/$ index.php?catid=$1&member_id=$2 [L]
+RewriteRule ^member-([0-9]*)/.*-([0-9]*).html$ index.php?catid=$1&member_id=$2 [L]
+
+# trip planner list (member sessions)
+RewriteRule ^trip-planner-list/([0-9]*)/([0-9]*)/ Toolkit/Members/TripPlanner/memberList.php?member_id=$1&catid=$2 [L]
+
+#############
+## Banners ##
+#############
+# Ajax call for incrementing rotating banner impressions
+RewriteRule ^rotating-banner/([0-9]*)/([0-9]*)/$ Toolkit/Banners/incrementRotatingBanner.php?banner=$1&catid=$2 [L]
+
+############
+## Blocks ##
+############
+RewriteRule ^block-pos/ Toolkit/Blocks/positionBlock.php [QSA,L]
+
+#############
+## Toolbox ##
+#############
+# Ajax call for changing state (active/inactive)
+RewriteRule ^toolbox-change-state/([0-9]*)/ Toolkit/Toolbox/pageChangeState.php?kpass=&catid=$1 [L]
+RewriteRule ^toolbox-change-state-mobile/([0-9]*)/ Toolkit/Toolbox/pageMobileChangeState.php?kpass=&catid=$1 [L]
+RewriteRule ^toolbox-paragraph-change-state/([0-9]*)/ Toolkit/Toolbox/paragraphChangeState.php?kpass=¶graphId=$1 [L]
+# Ajax call for changing position (move up / move down)
+RewriteRule ^toolbox-page-move/cat_([0-9]*)/([a-z]*)/$ Toolkit/Toolbox/pageMove.php?id=$1&direction=$2&kpass= [L]
+RewriteRule ^toolbox-page-move-sel/pos([0-9]*)/([0-9]*)/([0-9]*)/$ Toolkit/Toolbox/moveBySelect.php?id=$1&oldpos=$2&newpos=$3 [L]
+RewriteRule ^toolbox-paragraph-move-sel/pos([0-9]*)/([0-9]*)/([0-9]*)/$ Toolkit/Toolbox/moveBySelectPara.php?id=$1&oldpos=$2&newpos=$3 [L]
+RewriteRule ^toolbox-paragraph-move/cat_([0-9]*)/([a-z]*)/$ Toolkit/Toolbox/paragraphMove.php?id=$1&direction=$2&kpass= [L]
+# Ajax call for uploading a file
+RewriteRule ^toolbox-paragraph-upload/$ Toolkit/Toolbox/paragraphFileUpload.php?kpass= [L]
+
+################
+## short urls ##
+################
+#RewriteCond %{REQUEST_URI} !(^.*-([0-9]*)/$)
+#RewriteRule ^([A-Za-z0-9_-]*)/$ index.php?glmPage=$1 [L]
+
+RewriteRule site-map index.php?catid=1&sitemap=1
+
+###############
+## Templates ##
+###############
+# View flexy templates as php files
+AddType application/x-httpd-php .tpl
+
+###############
+## Videos ##
+###############
+# call for changing position on videos
+RewriteRule ^video-move/([0-9]*)/([0-9]*)/$ Toolkit/Videos/moveVideo.php?kpass=&id=$1&newpos=$2
+# Toggle active on / off
+RewriteRule ^video-active-toggle/([0-9]*)/ Toolkit/Videos/toggleActive.php?kpass=&id=$1
+# Toggle featured on /off
+RewriteRule ^video-featured-toggle/([0-9]*)/ Toolkit/Videos/toggleFeatured.php?kpass=&id=$1
+
+###############
+## REDIRECTS ##
+###############
+
--- /dev/null
+<?php
+/**
+ * BaseControllerAbstract.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Toolkit_BaseControllerAbstract
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_BaseControllerAbstract
+ *
+ * Creates object of toolkit registry
+ *
+ * @category Toolkit
+ * @package Toolkit_BaseControllerAbstract
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+abstract class Toolkit_BaseControllerAbstract
+{
+ /**
+ * Description of $registry
+ * @var Toolkit_Registry
+ * @access protected
+ */
+ protected $registry;
+
+ /**
+ * Class constructor
+ *
+ * Creates object of Toolkit Registry
+ *
+ * @param Toolkit_Registry $registry Toolkit Registry
+ */
+ public function __construct(Toolkit_Registry $registry)
+ {
+ $this->registry = $registry;
+ }
+}
+?>
--- /dev/null
+<?php
+/**
+ * BreadCrumbsFactory.php
+ *
+ * PHP Version 5.2
+ *
+ * @category Toolkit
+ * @package Members_MembersOnly
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_BreadCrumbsFactory
+ *
+ * Description of Toolkit_BreadCrumbsFactory
+ *
+ * @category Toolkit
+ * @package Members_MembersOnly
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_BreadCrumbsFactory
+{
+ /**
+ * Description of $_gatewayFactory
+ * @var Toolkit_Toolbox_GatewayFactoryAbstract
+ * @access private
+ */
+ private $_gatewayFactory;
+
+ /**
+ * Class constructor
+ *
+ * @param Toolkit_Toolbox_GatewayFactoryAbstract $factory Gateway Factory
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(
+ Toolkit_Toolbox_GatewayFactoryAbstract $factory
+ ) {
+ $this->_gatewayFactory = $factory;
+ }
+
+ /**
+ * Description for createBreadCrumbsHelper
+ *
+ * @return \Toolkit_Template_BreadCrumbs
+ * @access public
+ */
+ public function createBreadCrumbsHelper()
+ {
+ $gateway = $this->_gatewayFactory->createGateway();
+ if (isset($_GET['member_id'])
+ && ctype_digit((string)$_GET['member_id'])
+ ) {
+ $breadCrumbs = new Toolkit_Members_BreadCrumbs(
+ $gateway,
+ Toolkit_Database::getInstance()
+ );
+ } elseif ($gateway instanceof Toolkit_Toolbox_PageGatewayDraft) {
+ // Need to have a publish gateway so we can get parent pages
+ $publishGateway = new Toolkit_Toolbox_PageGatewayPublish(
+ Toolkit_Database::getInstance()
+ );
+
+ $breadCrumbs = new Toolkit_Template_DraftBreadCrumbs(
+ $publishGateway,
+ $gateway
+ );
+ } else {
+ $breadCrumbs = new Toolkit_Template_BreadCrumbs($gateway);
+ }
+
+ return $breadCrumbs;
+ }
+}
+?>
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * Connects the CKImage browser to the server for image manipulation
+ *
+ * PHP version 5
+ *
+ * @category CKImages
+ * @package Toolkit_CKImages
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: Connector.php,v 1.15 2010/07/20 01:19:50 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+
+
+/**
+ * Connects the CKImage browser to the server for image manipulation
+ *
+ * @category CKImages
+ * @package Toolkit_CKImages
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version Release: @package_version@
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_CKImages_Connector
+{
+ // {{{ setDbh()
+
+ /**
+ * Sets the database handler for the object to use
+ *
+ * @param PDO $pdo PHP Data Object
+ *
+ * @return void
+ * @access public
+ */
+ public function setDbh(PDO $pdo)
+ {
+ $this->dbh = $pdo;
+ }
+
+ // }}}
+
+ // {{{ createFolder()
+
+ /**
+ * Creates a new folder
+ *
+ * @return void
+ * @access public
+ */
+ public function createFolder()
+ {
+ // get the folder id
+ $folder = filter_var(
+ $_GET['name'],
+ FILTER_SANITIZE_STRING,
+ FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH
+ );
+ if ($parent = filter_var($_GET['folder'], FILTER_VALIDATE_INT)) {
+ // do nothing, $parent set and validated
+ // from the $_GET['folder'] variable
+ } else {
+ $parent = 1;
+ }
+
+ // if the parentFolder variable is set and valid, then override the
+ // existing parent folder value
+ if ($newParent = filter_var($_GET['parentFolder'], FILTER_VALIDATE_INT)) {
+ $parent = $newParent;
+ }
+
+ // unset unneeded param values
+ unset($_GET['command'], $_GET['name'], $_GET['parentFolder']);
+
+ try {
+ $sql = "
+ INSERT INTO ckeditor_folders(name, parent)
+ VALUES (:name, :parent)";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':name', $folder, PDO::PARAM_INT);
+ $stmt->bindParam(':parent', $parent, PDO::PARAM_INT);
+ $stmt->execute();
+ header('Location:' . MEDIA_BASE_URL . 'Toolkit/CKImages/browser.php?' . http_build_query($_GET));
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+
+ // {{{ deleteFile()
+
+ /**
+ * Deletes a file from the image server for client
+ *
+ * @param Toolkit_FileServer_ImageAdapter $ia Image Server Object
+ *
+ * @return void
+ * @access public
+ */
+ public function deleteFile(Toolkit_FileServer_ImageAdapter $ia)
+ {
+ $getImg = filter_input(INPUT_GET, 'img');
+ // Get offset where target img starts at
+ $start = strrpos($getImg, '/') + 1;
+ // get the image name
+ $img = substr($getImg, $start);
+ // unset unneeded param values
+ unset($_GET['command'], $_GET['img']);
+
+ $ia->delete($img);
+
+ try {
+ $sql = "
+ DELETE FROM ckeditor_images
+ WHERE name_on_disk = :nod";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':nod', $img, PDO::PARAM_STR);
+ $stmt->execute();
+ header('Location:' . MEDIA_BASE_URL . 'Toolkit/CKImages/browser.php?' . http_build_query($_GET));
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+ // {{{ deleteFolder()
+
+ /**
+ * Deletes a folder and any sub folders
+ *
+ * Moves all containing images to home folder so they are not
+ * inadvertently deleted
+ *
+ * @return void
+ * @access public
+ */
+ public function deleteFolder()
+ {
+ // get the folder id
+ $folder = $_GET['folder'];
+ if ($folder == 1) {
+ unset($_COOKIE['glm_image_browser_open'], $_COOKIE['glm_image_browser_selected']);
+ header('Location:' . MEDIA_BASE_URL . 'Toolkit/CKImages/browser.php?' . http_build_query($_GET));
+ exit();
+ }
+ // unset unneeded param values
+ unset($_GET['command'], $_GET['tgt']);
+ $_GET['folder'] = 1;
+
+ try {
+ $tree = Toolkit_Common::getHierarchicalTreeStructure(
+ $this->dbh,
+ 'ckeditor_folders',
+ 'id',
+ 'parent',
+ 'id',
+ $folder,
+ 0,
+ false
+ );
+
+ $sql = "
+ UPDATE ckeditor_images
+ SET folder = 1
+ WHERE folder = :folder";
+
+ $imgStmt = $this->dbh->prepare($sql);
+
+ $sql = "
+ DELETE FROM ckeditor_folders
+ WHERE id = :folder";
+ $fldrStmt = $this->dbh->prepare($sql);
+ while (list($tgt) = each($tree)) {
+ $imgStmt->bindParam(':folder', $tgt, PDO::PARAM_INT);
+ $imgStmt->execute();
+
+ $fldrStmt->bindParam(':folder', $tgt, PDO::PARAM_INT);
+ $fldrStmt->execute();
+ }
+ // These cookies are defined in the libjs/image_selector.js file
+ // when the tree is created.
+ unset($_COOKIE['glm_image_browser_open'], $_COOKIE['glm_image_browser_selected']);
+ header('Location:' . MEDIA_BASE_URL . 'Toolkit/CKImages/browser.php?' . http_build_query($_GET));
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+
+ // {{{ browseImages()
+
+ /**
+ * Creates the browser window
+ *
+ * @param HTML_Template_Flexy $tEngine Flexy Rendering Engine Object
+ *
+ * @return string HTML page to browse images
+ * @access public
+ */
+ public function browseImages(HTMl_Template_Flexy $tEngine)
+ {
+ $page = new stdClass();
+ $page->baseUrl = MEDIA_BASE_URL;
+ $page->glmAppBaseUrl = MEDIA_APP_BASE_URL;
+ $page->originalPath = CKIMAGE;
+ $page->imageManager = IMAGE_MANAGER;
+
+ if ($folderId = filter_input(INPUT_GET, 'folder', FILTER_VALIDATE_INT)) {
+ $folder = "&folder=$folderId";
+ } else {
+ $folder = '';
+ }
+
+ $ckEditorFuncNum
+ = filter_input(INPUT_GET, 'CKEditorFuncNum', FILTER_VALIDATE_INT);
+ $ckEditor = filter_input(INPUT_GET, 'CKEditor');
+ $langCode = filter_input(INPUT_GET, 'langCode');
+
+ $form = new HTML_QuickForm(
+ 'quick_upload',
+ 'post',
+ MEDIA_BASE_URL . "Toolkit/CKImages/controller.php?CKEditor=$ckEditor&CKEditorFuncNum=$ckEditorFuncNum&langCode=$langCode&command=UploadFile$folder"
+ );
+ $form->addElement('file', 'upload');
+ $page->quickUploadForm = $form->toHtml();
+
+ $folders = new Toolkit_CKImages_Folders($this->dbh);
+ $page->folders = $folders->getFolders(0);
+
+ try {
+ $ckEditorFolderId = $folderId ? $folderId : 1;
+ $sql = "
+ SELECT *
+ FROM ckeditor_images
+ WHERE folder = :folder
+ ORDER BY id ASC";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':folder', $ckEditorFolderId, PDO::PARAM_INT);
+ $stmt->execute();
+
+ $images = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ // loop thru images and reset their sizes
+ $isa = new Toolkit_FileServer_ImageAdapter();
+ if (is_array($images) && !empty($images)) {
+ foreach ($images as &$img) {
+ if ( $img['original_width'] > 700
+ || $img['original_height'] > 500
+ ) {
+ // get real size for the CKImage Style
+ $imgData = $isa->getImageSize(CKIMAGE . $img['name_on_disk']);
+ $img['original_width'] = $imgData[0];
+ $img['original_height'] = $imgData[1];
+ }
+ }
+ }
+ $page->images = $images;
+ $page->CKEditorFuncNum = $ckEditorFuncNum;
+
+ $tEngine->compile('thumbnails.html');
+ $tEngine->outputObject($page);
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+
+ // {{{ handleUpload()
+
+
+ /**
+ * Handles inserting the upload into the database
+ *
+ * @param string $imageName image to insert
+ * @param array $dimensions dimensions of the image
+ *
+ * @return object Return description (if any) ...
+ * @access protected
+ */
+ protected function handleUpload($imageName, array $dimensions)
+ {
+ if ( !$dimensions['oWidth']
+ || !$dimensions['oHeight']
+ ) {
+ return false;
+ }
+ try {
+ if ($folder = filter_input(INPUT_GET, 'folder', FILTER_VALIDATE_INT)) {
+ // do nothing, $folder is already set and validated
+ } else {
+ $folder = 1;
+ }
+ $sql = "
+ INSERT INTO ckeditor_images (file_name, name_on_disk, folder,
+ original_width, original_height)
+ VALUES (:fname, :nod, :folder, :width, :height)";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(
+ ':fname',
+ $_FILES['upload']['name'],
+ PDO::PARAM_STR
+ );
+ $stmt->bindParam(':nod', $imageName, PDO::PARAM_STR);
+ $stmt->bindValue(':folder', $folder, PDO::PARAM_INT);
+ $stmt->bindValue(':width', $dimensions['oWidth'], PDO::PARAM_INT);
+ $stmt->bindValue(':height', $dimensions['oHeight'], PDO::PARAM_INT);
+
+
+ return $stmt->execute();
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+
+ // {{{ quickUpload()
+
+
+ /**
+ * send uploaded image to image server
+ *
+ * @param Toolkit_FileServer_ImageAdapter $ia Image Server
+ *
+ * @return void
+ * @access public
+ */
+ public function quickUpload(Toolkit_FileServer_ImageAdapter $ia)
+ {
+ try {
+ ob_start();
+ $image = $ia->upload('upload');
+ ob_end_clean();
+ } catch (RangeException $e) {
+ Toolkit_Logger::logException('Runtime Error', $e);
+ throw new Toolkit_CKImages_Exception('Error uploading image');
+ }
+
+ $dimensions = $ia->getImageSize(CKIMAGE . $image['name']);
+ list($i['oWidth'], $i['oHeight'],) = $dimensions;
+ $this->handleUpload($image['name'], $i);
+
+ unset($_GET['command']);
+ header('Location:' . MEDIA_BASE_URL . 'Toolkit/CKImages/browser.php?' . http_build_query($_GET));
+ }
+
+ // }}}
+
+ // {{{ uploadFile()
+
+
+ /**
+ * send uploaded image to image server and select that file to be used
+ *
+ * @param Toolkit_FileServer_ImageAdapter $ia Image server object
+ *
+ * @return void
+ * @access public
+ */
+ public function uploadFile(Toolkit_FileServer_ImageAdapter $ia)
+ {
+ if ($ckEditorFuncNum = filter_input(INPUT_GET, 'CKEditorFuncNum', FILTER_VALIDATE_INT)) {
+ // Do nothing, $ckEditorFuncNum set and validated
+ } else {
+ $ckEditorFuncNum = 1;
+ }
+ echo '<script type="text/javascript">';
+ try {
+ ob_start();
+ $image = $ia->upload('upload');
+ ob_end_clean();
+ } catch (RangeException $e) {
+ Toolkit_Logger::logException('Runtime Error', $e);
+ echo "window.parent.CKEDITOR.tools.callFunction($ckEditorFuncNum, '', 'Invalid Image Format');";
+ }
+
+ $dimensions = $ia->getImageSize(CKIMAGE . $image['name']);
+ list($i['oWidth'], $i['oHeight'],) = $dimensions;
+ $this->handleUpload($image['name'], $i);
+
+ // path to image we are going to use
+ $ip = CKIMAGE . $image['name'];
+ echo "window.parent.CKEDITOR.tools.callFunction($ckEditorFuncNum, '$ip', '');";
+ echo '</script>';
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+class Toolkit_CKImages_database_Import
+{
+ // {{{ Class Properties
+ protected $dbh;
+ protected $pathToImages;
+ protected $is;
+ protected $urlPathToImages;
+
+ // }}}
+ // {{{ __construct()
+ function __construct(PDO $pdo)
+ {
+ $this->dbh = $pdo;
+ $this->pathToImages = BASE . 'images/ht_images/';
+ $this->urlPathToImages = HT_IMAGES_URL;
+ $this->is = new Toolkit_Image_Server();
+ }
+ // }}}
+ // {{{ addFolderToDatabase()
+ function addFolderToDatabase($folder, $parent)
+ {
+ static $stmt;
+ if (!$stmt) {
+ $sql = "
+ INSERT INTO ckeditor_folders
+ (name, parent)
+ VALUES
+ (:name, :parent)
+ RETURNING id";
+ $stmt = $this->dbh->prepare($sql);
+ }
+ try {
+ $stmt->bindParam(":name", $folder, PDO::PARAM_STR);
+ $stmt->bindParam(":parent", $parent, PDO::PARAM_STR);
+ $stmt->execute();
+ return $stmt->fetchColumn();
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+ // }}}
+ // {{{ addImageToDatabase()
+ function addImageToDatabase($file, $folder)
+ {
+ static $stmt;
+ if (!$stmt) {
+ $sql = "
+ INSERT INTO ckeditor_images
+ (file_name, name_on_disk, original_width, original_height, folder)
+ VALUES
+ (:file_name, :name_on_disk, :original_width, :original_height, :folder)";
+ $stmt = $this->dbh->prepare($sql);
+ }
+ try {
+ $stmt->bindParam(":file_name", $file['file_name'], PDO::PARAM_STR);
+ $stmt->bindParam(":name_on_disk", $file['name_on_disk'], PDO::PARAM_STR);
+ $stmt->bindParam(":original_width", $file['original_width'], PDO::PARAM_STR);
+ $stmt->bindParam(":original_height", $file['original_height'], PDO::PARAM_STR);
+ $stmt->bindParam(":folder", $folder, PDO::PARAM_INT);
+ $stmt->execute();
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }// }}}
+ // {{{ processFilesArray
+ function processFilesArray($files, $parent = 1)
+ {
+ //echo '<pre>'.print_r($files, true).'</pre>';
+ foreach ($files as $folderName => $file) {
+ if (is_array($file)) {
+ $fKey = key($file);
+ $folderToAdd = preg_replace("%/$%", "", $fKey);
+ //echo '<pre>'.print_r($folderToAdd, true).'</pre>';
+ $folder = $this->addFolderToDatabase($folderToAdd, $parent);
+ //echo '<pre>'.print_r($folder, true).'</pre>';
+ //var_dump($files[$folderName][$fKey]);
+ // echo '<pre>'.print_r($file[$folderName][$fKey], true).'</pre>';
+ $processedFile[] = $this->processFilesArray($files[$folderName][$fKey], $folder);
+ } else {
+ $processedFile[] = $this->sendToImageServer($file, $parent);
+ }
+ }
+ return $processedFile;
+ }
+ // }}}
+ // {{{ readImageDir()
+ function readImageDir($path = '')
+ {
+ $dirName = $this->pathToImages . preg_replace("%/$%", "", $path);
+ //var_dump($dirName);echo '<br />';
+ $d = dir($dirName);
+ while (false !== ($entry = $d->read())) {
+ if (!preg_match("%^\.|^CVS%", $entry)) {
+ $entryPath = $this->pathToImages . $path . $entry;
+ //var_dump($entryPath); echo '<br />';
+ if ($dirCheck = is_dir($entryPath)) {
+ $files[$path][] = $this->readImageDir($path . $entry . '/');
+ } else if ($fileCheck = is_file($entryPath)) {
+ $files[$path][] = $path . $entry;
+ }
+ }
+ }
+ return $files;
+ }
+ // }}}
+ //{{{ runImport()
+ function runImport()
+ {
+ $files = $this->readImageDir();
+ echo '<pre>'.print_r($files, true).'</pre>';
+ $processedFiles = $this->processFilesArray($files['']);
+// echo '<pre>'.print_r($processedFiles, true).'</pre>';
+ }
+ //}}}
+ // {{{ sendToImageServer()
+ function sendToImageServer($file, $folder)
+ {
+ $file_name = basename($file);
+ $size = getImageSize($this->pathToImages . $file);
+ try {
+ $urlToImage = $this->urlPathToImages . '/' . str_replace(' ', '%20', $file);
+ $name_on_disk = $this->is->imageUpload(
+ $urlToImage
+ );
+// var_dump($name_on_disk);
+// var_dump($this->urlPathToImages);
+// exit;
+ } catch(PEAR_Exception $e) {
+ var_dump($file);
+ var_dump($urlToImage);
+ var_dump($e);
+ exit;
+ }
+ $image = array(
+ 'name_on_disk' => $name_on_disk,
+ 'file_name' => $file_name,
+ 'original_width' => $size[0],
+ 'original_height' => $size[1],
+ );
+ $this->addImageToDatabase($image, $folder);
+ }
+ // }}}
+}
+?>
--- /dev/null
+CREATE SCHEMA ckimages;
+GRANT ALL ON SCHEMA ckimages TO nobody;
+
+--
+-- Tables
+--
+\i ./tables/ckeditor_folders.sql
+\i ./tables/ckeditor_images.sql
+
+--
+-- Procedures
+--
+
+--
+-- Modules
+--
+
+--
+-- Data
+--
+\i ./data/applicationData.sql
--- /dev/null
+INSERT INTO ckimages.ckeditor_folders(id, name, parent) VALUES(1, 'Home', 0);
+SELECT setval('"ckimages".ckeditor_folders_id_seq', 2, false);
--- /dev/null
+<?php
+require_once '../../../setup.phtml';
+// set this to the real sites url
+// is0.gaslightmedia.com will only fetch the images if
+// it has access and it cannot do http auth
+define('HT_IMAGES_URL', 'http://www.petoskeyarea.com/images/ht_images/');
+$dbh = Toolkit_Database::getInstance();
+$import = new Toolkit_CKImages_Database_Import($dbh);
+$import->runImport();
+?>
--- /dev/null
+ALTER TABLE ckimages.ckeditor_images
+ ADD COLUMN original_image TEXT;
--- /dev/null
+--
+-- This will drop everything in the ckimages schema
+-- Nothing better be in here except ckeditor related object
+-- or it will be dropp
+--
+-- The force is strong w/ this one, use it wisely.
+--
+
+DROP SCHEMA IF EXISTS ckimages CASCADE;
--- /dev/null
+DROP TABLE IF EXISTS ckimage.ckeditor_folders CASCADE;
+
+CREATE TABLE ckimages.ckeditor_folders
+(id SERIAL,
+ name TEXT NOT NULL,
+ parent INTEGER DEFAULT 1 NOT NULL,
+ PRIMARY KEY (id));
+
+GRANT ALL ON ckimages.ckeditor_folders_id_seq TO nobody;
+GRANT ALL ON ckimages.ckeditor_folders TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS ckimages.ckeditor_images CASCADE;
+
+CREATE TABLE ckimages.ckeditor_images
+(id SERIAL,
+ create_date DATE DEFAULT CURRENT_DATE,
+ file_name text NOT NULL,
+ name_on_disk text NOT NULL,
+ original_width TEXT NOT NULL,
+ original_height TEXT NOT NULL,
+ original_image TEXT,
+ folder INTEGER DEFAULT 1
+ REFERENCES ckimages.ckeditor_folders (id)
+ ON UPDATE CASCADE
+ ON DELETE SET DEFAULT,
+ PRIMARY KEY (id)
+);
+
+GRANT ALL ON ckimages.ckeditor_images_id_seq TO nobody;
+GRANT ALL ON ckimages.ckeditor_images TO nobody;
--- /dev/null
+<?php
+class Toolkit_CKImages_Exception extends Exception {}
+?>
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * CKImage Factory
+ *
+ * PHP version 5
+ *
+ * @category CKImages
+ * @package Toolkit_CKImages
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: Factory.php,v 1.1 2009/09/24 14:43:02 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ * @see References to other sections (if any)...
+ */
+
+
+/**
+ * CKImage Factory
+ *
+ * @category CKImages
+ * @package Toolkit_CKImages
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version Release: @package_version@
+ * @link http://demo.gaslightmedia.com
+ * @see References to other sections (if any)...
+ */
+class Toolkit_CKImages_Factory
+{
+ // {{{ properties
+
+ /**
+ * array of instances
+ * @var array
+ * @access public
+ * @static
+ */
+ public static $instances = array();
+
+ // }}}
+ // {{{ init()
+
+ /**
+ * initialize the factory
+ *
+ * @return void
+ * @access public
+ * @static
+ */
+ public static function init()
+ {
+ }
+
+ // }}}
+ // {{{ &instance()
+
+ /**
+ * Get a single instance of an object
+ *
+ * @param string $class Class name to create
+ *
+ * @return mixed instantiated object
+ * @access public
+ * @static
+ */
+ public static function &instance($class)
+ {
+ $class = "Toolkit_CKImages_$class";
+
+ if (empty(Toolkit_CKImages_Factory::$instances)) {
+ Toolkit_CKImages_Factory::$instances[$class] = new $class;
+ }
+
+ return Toolkit_CKImages_Factory::$instances[$class];
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * Handles create a UL list to simulate a folder hierarchy
+ *
+ * PHP version 5
+ *
+ * @category CKImages
+ * @package Toolkit_CKImages
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: Folders.php,v 1.6 2009/10/27 14:39:27 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Handles create a UL list to simulate a folder hierarchy
+ *
+ * @category CKImages
+ * @package Toolkit_CKImages
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version Release: @package_version@
+ * @link http://demo.gaslightmedia.com
+ * @see References to other sections (if any)...
+ */
+class Toolkit_CKImages_Folders
+{
+ // {{{ properties
+
+
+ /**
+ * Levels deep we are into the hierarchy
+ * @var integer
+ * @access private
+ */
+ private $_lvlsOpen = 0;
+
+ /**
+ * The previous level we were at
+ * @var integer
+ * @access private
+ */
+ private $_prevLvl = 0;
+
+ // }}}
+
+ // {{{ __construct()
+
+ /**
+ * Constructor
+ *
+ * @param PDO $pdo PHP Data Object
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(PDO $pdo)
+ {
+ $this->dbh = $pdo;
+ }
+
+ // }}}
+
+ // {{{ closeFolder()
+
+
+ /**
+ * Closes a folder level
+ *
+ * @return string closing ul tag
+ * @access protected
+ */
+ protected function closeFolder()
+ {
+ return "\n</ul>";
+ }
+
+ // }}}
+ // {{{ closeNode()
+
+
+ /**
+ * Closes a node
+ *
+ * @return string closing li tag
+ * @access protected
+ */
+ protected function closeNode()
+ {
+ return "\n\t</li>";
+ }
+
+ // }}}
+ // {{{ createFolder()
+
+
+ /**
+ * Creates a folder level
+ *
+ * @return string opening ul tag
+ * @access protected
+ */
+ protected function createFolder()
+ {
+ return "\n<ul>";
+ }
+
+ // }}}
+ // {{{ createLink()
+
+
+ /**
+ * Creates a folder link so we can browse to each folder
+ *
+ * @param array $row Folder information
+ *
+ * @return string anchor link for folder
+ * @access protected
+ */
+ protected function createLink(array $row)
+ {
+ $format = '<a class="%s" href="'.MEDIA_BASE_URL.'Toolkit/CKImages/browser.php?CKEditor=%s&CKEditorFuncNum=%s&langCode=%s&folder=%s">%s</a>';
+
+ $link = sprintf(
+ $format,
+ ($_GET['folder'] == $row['id']) ? 'clicked' : null,
+ $_GET['CKEditor'],
+ $_GET['CKEditorFuncNum'],
+ $_GET['langCode'],
+ $row['id'],
+ $row['name']
+ );
+
+ return $link;
+ }
+
+ // }}}
+
+ // {{{ fetchFoldersArray()
+
+
+ /**
+ * Fetches a tree hierarchy of the folder structure into a linear array
+ *
+ * @param integer $start node to start at
+ *
+ * @return array folder structure with levels
+ * @access protected
+ */
+ protected function fetchFoldersArray($start)
+ {
+ return Toolkit_Common::getHierarchicalTreeStructure(
+ $this->dbh,
+ 'ckeditor_folders',
+ 'id',
+ 'parent',
+ 'id',
+ $start
+ );
+ }
+
+ // }}}
+
+ // {{{ getFolders()
+
+
+ /**
+ * Gets the folders ul list
+ *
+ * @param integer $parent start at a certain level
+ *
+ * @return string list of folders
+ * @access public
+ */
+ public function getFolders($parent = 0)
+ {
+ $folders = $this->fetchFoldersArray($parent);
+ try {
+ $sql = "
+ SELECT *
+ FROM ckeditor_folders
+ WHERE id = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ foreach ($folders as $i => $j) {
+ $stmt->bindParam(':id', $i, PDO::PARAM_INT);
+ $stmt->execute();
+ $row = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if ($j == $this->_prevLvl) {
+ $tree .= $this->openNode($row);
+ $tree .= $this->createLink($row);
+ $this->_prevLvl = $j;
+ } elseif ($j > $this->_prevLvl) {
+ ++$this->_lvlsOpen;
+ $tree .= $this->createFolder();
+ $tree .= $this->openNode($row);
+ $tree .= $this->createLink($row);
+ $this->_prevLvl = $j;
+ } elseif ($j < $this->_prevLvl) {
+ do {
+ $tree .= $this->closeNode();
+ $tree .= $this->closeFolder();
+ } while (--$this->_lvlsOpen > $j);
+ $tree .= $this->closeNode();
+ $tree .= $this->openNode($row);
+ $tree .= $this->createLink($row);
+ $this->_prevLvl = $this->_lvlsOpen;
+ }
+ }
+ $tree .= $this->closeFolder();
+ return $tree;
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+
+ // {{{ openNode()
+
+
+ /**
+ * Opens a branch or leaf node
+ *
+ * @param array $row Folder information
+ *
+ * @return string opening li tag
+ * @access protected
+ */
+ protected function openNode(array $row)
+ {
+ return "\n\t<li id=\"pred_{$row['id']}\">";
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+class Toolkit_CKImages_ImageUpdater
+{
+ // {{{ properties
+
+ private $_imageData = array();
+ private $_dbh;
+
+ // }}}
+ // {{{ __construct()
+
+ public function __construct(PDO $dbh)
+ {
+ $this->_dbh = $dbh;
+ }
+
+ // }}}
+
+ // {{{ load()
+
+ public function load($image)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM ckeditor_images
+ WHERE name_on_disk = :image";
+
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':image', $image, PDO::PARAM_STR);
+ $stmt->setFetchMode(PDO::FETCH_INTO, $this);
+ $stmt->execute();
+ $this->_imageData = $stmt->fetch(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_CKImages_Exception(
+ "Error fetching image row for image `$image`"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ update()
+
+ public function update(Toolkit_FileServer_ImageAdapter $ia)
+ {
+ if ( !is_array($this->_imageData)
+ || empty($this->_imageData)
+ ) {
+ throw new RuntimeException(
+ 'You must load an image first before trying to update'
+ );
+ }
+
+ $targetImage = $this->_imageData['name_on_disk'];
+
+ $path = BASE . "Toolkit/CKImages/editedImages/$targetImage";
+ $newImage = $ia->uploadImageFile($path);
+ list($w, $h, ) = $ia->getImageSize(CKIMAGE_ORIGINAL . $newImage['name']);
+
+ try {
+ $sql = "
+ UPDATE ckeditor_images
+ SET original_image = COALESCE(original_image, name_on_disk),
+ file_name = :image_name,
+ name_on_disk = :newFileName,
+ original_width = :newWidth,
+ original_height = :newHeight
+ WHERE name_on_disk = :originalFileName
+ OR original_image = :originalFileName";
+
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':newFileName', $newImage['name'], PDO::PARAM_STR);
+ $stmt->bindParam(':image_name', $_REQUEST['image_name'], PDO::PARAM_STR);
+ $stmt->bindParam(':newWidth', $w, PDO::PARAM_INT);
+ $stmt->bindParam(':newHeight', $h, PDO::PARAM_INT);
+ $stmt->bindParam(':originalFileName', $targetImage, PDO::PARAM_STR);
+ $stmt->execute();
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_CKImages_Exception(
+ "Error updating image `{$this->_imageData['name_on_disk']}`"
+ );
+ }
+
+ // If we have updated the file previously
+ // then remove the old update - b/c it will now be orphaned.
+ if ($targetImage == $this->_imageData['original_image']) {
+ $ia->delete($this->_imageData['name_on_disk']);
+ }
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * popup browser window
+ *
+ * This file creates the popup browser window to manage images
+ *
+ * PHP versions 4 and 5
+ *
+ * @category CKImages
+ * @package Toolkit_CKImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: browser.php,v 1.4 2010/06/04 10:48:50 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * bootstrap
+ */
+require_once '../../setup.phtml';
+
+// make sure the image directories exists for editor
+$imgDirs = array(
+ BASE . 'Toolkit/CKImages/editedImages',
+ BASE . 'Toolkit/PHPImageEditor/editimagesoriginal',
+ BASE . 'Toolkit/PHPImageEditor/editimagespng',
+ BASE . 'Toolkit/PHPImageEditor/editimagesworkwith',
+);
+$oldMask = umask(0);
+foreach ($imgDirs as $dir) {
+ if (!is_dir($dir)) {
+ mkdir($dir, 0770, true);
+ }
+}
+umask($oldMask);
+
+Toolkit_CKImages_Factory::init();
+$connector = Toolkit_CKImages_Factory::instance('Connector');
+$connector->setDbh(Toolkit_Database::getInstance());
+$flexyOpts = $GLOBALS['flexyOptions'];
+$flexyOpts['templateDir'] = BASE . 'Toolkit/CKImages/templates/';
+$flexyOpts['compileDir'] = BASE . 'Toolkit/CKImages/templates/compiled/';
+$tEngine = new HTML_Template_Flexy($flexyOpts);
+
+$connector->browseImages($tEngine);
+?>
--- /dev/null
+<?php
+
+/**
+ * Controller file
+ *
+ * PHP versions 4 and 5
+ *
+ * @category CKImages
+ * @package Toolkit_CKImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: controller.php,v 1.3 2010/06/04 11:32:36 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * bootstrap
+ */
+require_once '../../setup.phtml';
+
+Toolkit_CKImages_Factory::init();
+$controller = Toolkit_CKImages_Factory::instance('Connector');
+$controller->setDbh(Toolkit_Database::getInstance());
+
+switch ($_GET['command']) {
+case 'CreateFolder' :
+ $controller->createFolder();
+ break;
+
+case 'DeleteFile' :
+ $controller->deleteFile(new Toolkit_FileServer_ImageAdapter());
+ break;
+
+case 'DeleteFolder' :
+ $controller->deleteFolder();
+ break;
+
+case 'Upload' :
+ $controller->uploadFile(new Toolkit_FileServer_ImageAdapter());
+ break;
+
+case 'UploadFile' :
+ $controller->quickUpload(new Toolkit_FileServer_ImageAdapter());
+ break;
+
+default :
+ die('not yet implemented');
+ $controller->throwError();
+ break;
+}
+?>
--- /dev/null
+<?php
+if (!ctype_digit($_GET['file'])) {
+ exit();
+}
+
+require_once '../../setup.phtml';
+$dbh = Toolkit_Database::getInstance();
+
+try {
+ $sql = "
+ SELECT *
+ FROM ckeditor_images
+ WHERE id = :id";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $_GET['file'], PDO::PARAM_INT);
+ $stmt->execute();
+ $row = $stmt->fetch(PDO::FETCH_ASSOC);
+
+// $fileToFetch = empty($row['original_image'])
+// ? $row['name_on_disk']
+// : $row['original_image'];
+ $fileToFetch = $row['name_on_disk'];
+} catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+}
+set_time_limit(0);
+
+// file to save the info
+$fp = fopen(dirname(__FILE__) . "/editedImages/$fileToFetch", 'w+');
+
+// file we are downloading
+$ch = curl_init(CKIMAGE_ORIGINAL . $fileToFetch);
+curl_setopt($ch, CURLOPT_TIMEOUT, 50);
+curl_setopt($ch, CURLOPT_FILE, $fp);
+curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
+curl_exec($ch);
+curl_close($ch);
+fclose($fp);
+
+$path = urlencode(BASE . "Toolkit/CKImages/editedImages/$fileToFetch");
+$image_name = urlencode($row['file_name']);
+header('Location: ' . MEDIA_BASE_URL . "Toolkit/PHPImageEditor/index.php?imagesrc=$path&image_name=$image_name");
+?>
--- /dev/null
+var IMAGE_SELECTOR =
+{
+ parentFolder: null,
+
+ init: function()
+ {
+ $('.tLeft').tipsy({gravity: 'sw'});
+ $('.tCenter').tipsy({gravity: 's'});
+ $('.tRight').tipsy({gravity: 'se'});
+ $('.tDelete').tipsy({gravity: 'se'});
+
+ $('a.CKImageEdit').click(function(event) {
+ var $newWindow = window.open(
+ $(this).attr('href'),
+ '',
+ 'width=775,height=775',
+ true
+ );
+
+ $newWindow.focus();
+ return false;
+ });
+
+ tree1 = new tree_component();
+ tree1.init($("#folders"), {
+ cookies : {
+ prefix : "glm_image_browser",
+ opts : { path : '/' }
+ },
+ ui : {
+ animation : 500
+ }
+ });
+
+ // Make the tree default to all opened
+ $('#folders li.closed')
+ .toggleClass('open')
+ .toggleClass('closed');
+
+ $('#folders a').click(IMAGE_SELECTOR.viewFolder);
+
+ // Stop clicks on the LI elements, so the folders branches
+ // will not close.
+ $('#folders li').click(function(event) {
+ event.stopImmediatePropagation();
+ });
+
+ $('div.thumb span.CKImageUse').click(function() {
+ var img = $(this).parent().siblings('img');
+ var funcNum = $('#CKEditorFuncNum').text();
+
+ window.opener.CKEDITOR.tools.callFunction(funcNum, img.attr('rel'));
+ window.close();
+ });
+
+ $('div.thumb span.CKImageDelete').click(function(event) {
+ event.preventDefault();
+ if (confirm('Are you sure you want to delete this image?')) {
+ var img = $(this).parent().siblings('img').attr('rel');
+ var href = window.location.href.replace(/(.*)browser.php(.*)/, '$1controller.php$2&command=DeleteFile&img=' + img);
+
+ window.location.href = href;
+ }
+ });
+
+ $('#imageDialog').dialog({
+ bgiframe : true,
+ autoOpen : false,
+ resizable: false,
+ modal : true,
+ buttons : {
+ Cancel : function() {
+ $(this).dialog('close');
+ },
+ 'Upload Selected File' : function() {
+ if ($('#imageDialog form input[type=file]').val()) {
+ $('.ui-dialog-buttonpane button').attr('disabled', true);
+ $('#imageDialog form').trigger('submit');
+ } else {
+ alert('You need to select a file first');
+ }
+ }
+ }
+ });
+
+ $('#upload').click(function() {
+ $('#imageDialog').dialog('open');
+ });
+
+ $('#newFolder').submit(IMAGE_SELECTOR.createFolder);
+ $('#folderDialog').dialog({
+ bgiframe : true,
+ autoOpen : false,
+ resizable: false,
+ modal : true,
+ buttons: {
+ Cancel : function() {
+ $('#folderName').removeClass('ui-state-error');
+ $(this).dialog('close');
+ },
+ 'Create' : IMAGE_SELECTOR.createFolder
+ }
+ });
+ $('#folderNew').click(function() {
+ $('#folderDialog').dialog('open');
+ });
+ $('#folderDelete').click(function() {
+ if (confirm('Are you sure you want to delete this folder?')) {
+ var href = window.location.href.replace(/(.*)browser.php(.*)/, '$1controller.php$2&command=DeleteFolder');
+
+ window.location.href = href;
+ }
+ });
+ },
+
+ createFolder: function(event)
+ {
+ event.preventDefault();
+ // don't submit empty folder
+ var folderName = $('#folderName');
+ var val = folderName.val();
+ if (val == '') {
+ alert('You need to type a folder name first');
+ return false;
+ } else {
+ $('.ui-dialog-buttonpane button').attr('disabled', true);
+ var href = window.location.href.replace(/(.*)browser.php(.*)/, '$1controller.php$2&command=CreateFolder&name=' + $('#folderName').val());
+ if (IMAGE_SELECTOR.parentFolder != null) {
+ href += '&parentFolder=' + IMAGE_SELECTOR.parentFolder;
+ IMAGE_SELECTOR.parentFolder = null;
+ }
+ window.location.href = href;
+ }
+ },
+
+ viewFolder: function(event)
+ {
+ location.href = $(this).attr('href');
+ }
+};
+
+$(document).ready(IMAGE_SELECTOR.init);
--- /dev/null
+body {\r
+ font-family: arial, sans-serif;\r
+ font-size: 11px;\r
+ background: url(assets/night-fate-stock2.jpg) no-repeat fixed;/* #E3E3C7; */\r
+ margin: 0;\r
+ padding: 0;\r
+}\r
+#wrapper {\r
+ width: 750px;\r
+ height: 1%;\r
+ overflow: hidden;\r
+ margin: 10px 0px 5px 10px;\r
+}\r
+h1 {\r
+ font-size: 24px;\r
+ margin: 0;\r
+ padding: 10px;\r
+ background: rgba(255, 255, 255, 0.8);\r
+ position: fixed;\r
+ }\r
+\r
+#toolbar {\r
+ background: #F1F1E3;\r
+ width: 140px;\r
+ border: 1px solid #D5D59D;\r
+ float: left;\r
+ padding: 8px;\r
+ margin-right: 20px;\r
+ margin-top: 60px;\r
+ position: fixed;\r
+ }\r
+#toolbar > ul {\r
+ border-bottom: 1px solid #333;\r
+ padding: 0 0 6px 0;\r
+ margin: 0 0 6px 0;\r
+ }\r
+#toolbar > ul, #toolbar > ul li {\r
+ list-style: none;\r
+ display: block;\r
+}\r
+#toolbar > ul li {\r
+ padding: 2px 2px 2px 26px;\r
+ line-height: 18px;\r
+ border: 1px solid #F1F1E3;\r
+ margin: 0;\r
+ background-position: 2px center;\r
+ background-repeat: no-repeat;\r
+ text-decoration: underline;\r
+ cursor: hand;\r
+ cursor: pointer;\r
+}\r
+#toolbar > ul li:hover {\r
+ border: 1px solid #D5D59D;\r
+ text-decoration: none;\r
+}\r
+#toolbar #upload {\r
+ background-image: url(//app.gaslightmedia.com/assets/icons/add.png);\r
+}\r
+#toolbar #folderNew {\r
+ background-image: url(//app.gaslightmedia.com/assets/icons/folder_add.png);\r
+}\r
+#toolbar #folderDelete {\r
+ background-image: url(//app.gaslightmedia.com/assets/icons/folder_delete.png);\r
+}\r
+.tree ul {\r
+ margin: 0;\r
+ padding-top: 1px;\r
+}\r
+.tree li a {\r
+ background-image: url(//app.gaslightmedia.com/assets/icons/folder.png);\r
+}\r
+.tree li.open {\r
+ background: none;\r
+ }\r
+#pred_1 {\r
+ padding-left: 3px;\r
+ padding-top: 3px;\r
+}\r
+.tree li li.open {\r
+ background: transparent url(//app.gaslightmedia.com/libjs/jsTree/source/images/li.gif) no-repeat scroll 7px 7px;\r
+}\r
+/* Main Section */\r
+#photo-gallery {\r
+ height: 1%;\r
+ overflow: hidden;\r
+ padding-top: 10px;\r
+ margin: 50px 0 0 180px;\r
+ }\r
+.thumb {\r
+ width: 120px;\r
+ height: 160px;\r
+ float: left;\r
+ margin: 0 20px 20px 0;\r
+ background: #F1F1E3;\r
+ background: rgba(241, 241, 227, 0.5);\r
+ font-size: 10px;\r
+ border-radius:5px;\r
+ -moz-border-radius:5px;\r
+ -webkit-border-radius:5px;\r
+ border: 1px solid #D5D59D;\r
+ }\r
+.rowTop {\r
+ height: 1%;\r
+ overflow: hidden;\r
+}\r
+.thumb img {\r
+ display: block;\r
+ margin: 0px 10px 2px 10px;\r
+ border: 1px dotted #ccc;\r
+ clear: left;\r
+}\r
+\r
+.CKImageFunctions {\r
+ margin: 10px 5px;\r
+ }\r
+.CKImageFunctions a,\r
+.CKImageFunctions span {\r
+ display: block;\r
+ line-height: 16px;\r
+ margin: 0 5px 0 5px;\r
+ text-decoration: underline;\r
+ width: 16px;\r
+ height: 16px;\r
+ text-indent: -9000px;\r
+ float: left;\r
+ }\r
+ \r
+/* cursor */\r
+.CKImageUse, .CKImageEdit, .CKImageDelete {\r
+ cursor: hand;\r
+ cursor: pointer;\r
+ }\r
+\r
+.CKImageUse {background: url(//app.gaslightmedia.com/assets/icons/accept.png) no-repeat; }\r
+.CKImageEdit {background: url(//app.gaslightmedia.com/assets/icons/image_edit.png) no-repeat; }\r
+.CKImageView {background: url(//app.gaslightmedia.com/assets/icons/image.png) no-repeat;}\r
+.CKImageDelete {background: url(//app.gaslightmedia.com/assets/icons/image_delete.png) no-repeat;}\r
+\r
+.CKImageName {\r
+ display: none;\r
+}\r
+\r
+\r
+.CKImageProperties {\r
+ margin: 3px auto;\r
+ text-align: center;\r
+}\r
+.CKImageDate {\r
+ display: none;\r
+}\r
+#menuFolder, #menuImage, #column {\r
+ display: none;\r
+}\r
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+"http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Thumbnail Images</title>
+<meta http-equiv="content-type" content="text/html;charset=utf-8">
+<link rel="stylesheet" type="text/css" href="<?php echo MEDIA_APP_BASE_URL;?>libjs/jqueryui/1.8/css/smoothness/jquery-ui-1.8.custom.css">
+<link rel="stylesheet" type="text/css" href="<?php echo MEDIA_APP_BASE_URL;?>libjs/jsTree/source/tree_component.css">
+<link rel="stylesheet" type="text/css" href="<?php echo MEDIA_APP_BASE_URL;?>libjs/plugins/tipsy/0.1.7/tipsy.css">
+<link rel="stylesheet" type="text/css" href="styles.css">
+<script type="text/javascript" src="<?php echo MEDIA_APP_BASE_URL;?>libjs/jquery/jquery-1.4.2.min.js"></script>
+</head>
+<body>
+ <h1>GLM Image Browser</h1>
+ <div id="wrapper">
+ <div id="toolbar">
+ <ul>
+ <li id="upload">Upload New Image</li>
+ </ul>
+ <ul>
+ <li id="folderNew">Create New Folder</li>
+ <li id="folderDelete">Delete This Folder</li>
+ </ul>
+ <div id="folders" class="tree">
+ Folders
+ {folders:h}
+ </div>
+ </div><!-- /#toolbar -->
+ <div id="photo-gallery" class="galleryRow">
+ <div flexy:foreach="images,i" class="thumb">
+ <div class="CKImageProperties">{i[original_width]:h}x{i[original_height]:h}</div>
+ <img src="{imageManager}{i[name_on_disk]:h}" rel="{originalPath}{i[name_on_disk]:h}" title="{i[file_name]:h}" alt="{i[name_on_disk]:h}">
+ <div class="CKImageFunctions">
+ <span class="CKImageUse tLeft" title="Insert Image">Insert this image</span>
+ <a class="CKImageView tCenter" href="{originalPath}{i[name_on_disk]:h}" target="_blank" title="View Image">View Full Image</a>
+ <a href="{baseUrl:h}Toolkit/CKImages/imageFetch.php?file={i[id]}" class="CKImageEdit tRight" target="_blank" title="Edit Image">Edit this image</a>
+ <span class="CKImageDelete tDelete" title="Delete Image">Delete Image</span>
+ </div><!-- /#CKImageFunctions -->
+ <div class="CKImageName">{i[file_name]:h}</div>
+ <div class="CKImageDate">{i[create_date]:h}</div>
+ </div>
+ </div><!-- /#photo-gallery -->
+ </div><!-- /#wrapper -->
+ <!-- dialog box for adding new folders -->
+ <div id="folderDialog" class="dialog" style="display: none;" title="Create new folder">
+ <form id="newFolder">
+ <label for="folderName">Name</label>
+ <input type="text" name="folderName" id="folderName">
+ </form>
+ </div>
+ <!-- dialog box for adding new images -->
+ <div id="imageDialog" class="dialog" style="display: none;" title="Upload new image">
+ {quickUploadForm:h}
+ </div>
+
+ <!-- Function number -->
+ <span style="display: none;" id="CKEditorFuncNum">{CKEditorFuncNum}</span>
+
+ <script type="text/javascript" src="<?php echo MEDIA_APP_BASE_URL;?>libjs/jqueryui/1.8/development-bundle/ui/minified/jquery.ui.core.min.js"></script>
+ <script type="text/javascript" src="<?php echo MEDIA_APP_BASE_URL;?>libjs/jqueryui/1.8/development-bundle/ui/minified/jquery.ui.widget.min.js"></script>
+ <script type="text/javascript" src="<?php echo MEDIA_APP_BASE_URL;?>libjs/jqueryui/1.8/development-bundle/ui/minified/jquery.ui.position.min.js"></script>
+ <script type="text/javascript" src="<?php echo MEDIA_APP_BASE_URL;?>libjs/jqueryui/1.8/development-bundle/ui/minified/jquery.ui.dialog.min.js"></script>
+ <script type="text/javascript" src="<?php echo MEDIA_APP_BASE_URL;?>libjs/jsTree/libjs/css.js"></script>
+ <script type="text/javascript" src="<?php echo MEDIA_APP_BASE_URL;?>libjs/jquery.listen.js"></script>
+ <script type="text/javascript" src="<?php echo MEDIA_APP_BASE_URL;?>libjs/jquery.cookie.js"></script>
+ <script type="text/javascript" src="<?php echo MEDIA_APP_BASE_URL;?>libjs/jsTree/source/tree_component.js"></script>
+ <script type="text/javascript" src="libjs/image_selector.js"></script>
+ <script type="text/javascript" src="<?php echo MEDIA_APP_BASE_URL;?>libjs/plugins/tipsy/0.1.7/jquery.tipsy.js"></script>
+</body>
+</html>
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * Common Toolkit application function repository
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Common
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release CVS: $Id: Common.php,v 1.68 2010/08/15 19:31:47 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Common collection of functions used throughout the GLM Toolkit
+ *
+ * @category Toolkit
+ * @package Common
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2008 Gaslight Media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_Common
+{
+ // {{{ properties
+
+ /**
+ * Who to send email to when a problem occurs on a live site
+ *
+ * This property doesn't matter for the development servers b/c the
+ * script will display the error encountered and terminate immediately.
+ * On the live site, a notification will be displayed to the user that
+ * an unexpected error has occured and will inform them to try again later.
+ * It will then send an email to the admin alerting them of the email.
+ *
+ * @var string
+ * @access protected
+ * @see Toolkit_Common::handleError()
+ */
+ protected static $admin = ERROR_EMAIL_ADDRESS;
+
+ /**
+ * Who to set the mail from when emailing errors
+ *
+ * @var string
+ * @access protected
+ * @see Toolkit_Common::handleError()
+ */
+ protected static $from = 'Gaslight Media Toolkit <server@gaslightmedia.com>';
+
+ // }}}
+
+ // {{{ arrayFlatten()
+
+ /**
+ * Recursively reduces multi-dimensional arrays to single-dimensional arrays
+ *
+ * @param array $array The array to flatten.
+ * @param int $preserveKeys How to handle array keys
+ * 0 = Never
+ * 1 = Strings
+ * 2 = Always
+ * @param array &$newArray The new created from the flattening
+ *
+ * @return array Single dimensional array.
+ * @access public
+ */
+ public function arrayFlatten(
+ $array,
+ $preserveKeys = 1,
+ &$newArray = Array()
+ ) {
+ foreach ($array as $key => $child) {
+ if (is_array($child)) {
+ $newArray =& Toolkit_Common::arrayFlatten(
+ $child,
+ $preserveKeys,
+ $newArray
+ );
+ } elseif ((int) $preserveKeys + (int) is_string($key) > 1) {
+ $newArray[$key] = $child;
+ } else {
+ $newArray[] = $child;
+ }
+ }
+ return $newArray;
+ }
+
+ // }}}
+
+ // {{{ cleanArray()
+
+ /**
+ * removes values from an array where the key ends in '_rmv'
+ *
+ * @param array &$values array to clean
+ *
+ * @return array array w/ unneeded elements removed
+ * @access public
+ * @static
+ */
+ public static function cleanArray(&$values)
+ {
+ // Get rid of any defined un-needed elements.
+ // un-needed elements after the form is submitted are defined
+ // by the ending _rmv name.
+ foreach ($values as $k => &$v) {
+ if (preg_match('/^.+_rmv$/', $k)) {
+ unset($values[$k]);
+ }
+ }
+
+ return $values;
+ }
+
+ // }}}
+ // {{{ createEmailBody()
+
+ /**
+ * Convert the form into an acceptable table to include in email
+ *
+ * This function can be called from any form class to generate
+ * a HTML table that we can use in an email. Elements can be dynamically
+ * rendered to meet your needs if you wish.
+ *
+ * If you wish to have any element(s) rendered differently than what the
+ * form already rendered them as, you need to define a public method
+ * named "emailRenderElement" in the calling class that will accept an
+ * elements name and you can create the rendering template in that class.
+ *
+ * Example:
+ * This example will turn groups like radio buttons or checkboxes
+ * from lists like:
+ * [ ] element_one [x] element_two [x] element_three
+ * ( ) element_one (x) element_two ( ) element_three
+ * into lists like:
+ * [ ] element_one ( ) element_one
+ * [x] element_two (x) element_two
+ * [x] element_three ( ) element_three
+ * <code>
+ * public function &emailRenderElement($e)
+ * {
+ * switch ($e) {
+ * case 'element_one' :
+ * case 'element_two' :
+ * case 'element_three' :
+ * $renderer =& $this->defaultRenderer();
+ * $renderer->clearAllTemplates();
+ * $renderer->setGroupTemplate('{content}', $e);
+ * $renderer->setGroupElementTemplate('{element}<br>', $e);
+ * break;
+ *
+ * default :
+ * $renderer = null;
+ * break;
+ * }
+ *
+ * return $renderer;
+ * }
+ * </code>
+ *
+ * @param array $newLabels Assoc array of element names and new
+ * labels to be used in the email form.
+ * eg [$newLabels['element'] => 'Label']
+ * @param array $excludeList Any element that needs to be removed
+ * from the form when creating the table
+ * eg [$list = array(e1, e2, e3, etc..)]
+ *
+ * @return mixed The table body for the email.
+ */
+ public function createEmailBody(
+ array $newLabels = array(),
+ array $excludeList = array()
+ ) {
+ $this->freeze();
+ // Get the values corresponding to the elements present in the form.
+ $formData = $this->exportValues();
+ // The array keys holds all the names of the elements.
+ $elements = array_keys($formData);
+ // Remove any unwanted elements from our elements array.
+ foreach ($excludeList as $trgt) {
+ unset($elements[array_search($trgt, $elements)]);
+ }
+
+ // Which row we are at.
+ $i = 0;
+ $table = new HTML_Table(array('class' => 'data'));
+ // Auto grow the table, since the forms will by dynamic in size.
+ $table->setAutoGrow(true);
+ // Get the labels and values of the elements.
+ foreach ($elements as $name) {
+ $e =& $this->getElement($name);
+ // Get the default HTML for each element.
+ $html = $e->toHtml();
+ // If any elements need to have their html
+ // changed for an email, this function in the
+ // class should exist and will return a renderer
+ // object of how the element should be rendered.
+ if (method_exists($this, 'emailRenderElement')) {
+ $renderer =& $this->emailRenderElement($name);
+ // make sure we have an actual rendering object
+ // if the element doesn't need to be altered it should
+ // just return null.
+ if (is_object($renderer)) {
+ $e->accept($renderer);
+ $html = $renderer->toHtml($name);
+ // We have to reset the entire forms html
+ // otherwise we'll just keep adding to it everytime
+ // we render a new element.
+ // This is a bit of a hack to make this work (because
+ // the _html element is supposed to be a private
+ // property)
+ $renderer->_html = null;
+ }
+ }
+ // Get the label for the element.
+ $label = array_key_exists($name, $newLabels) ?
+ $newLabels[$name] :
+ $e->getLabel();
+
+ // Make the row and increment the row counter.
+ $table->setCellContents($i, 0, $label);
+ $table->setCellAttributes($i, 0, array('class' => 'label'));
+ $table->setCellAttributes($i, 1, array('class' => 'field'));
+ $table->setCellContents($i++, 1, $html);
+ }
+ return $table->toHtml();;
+ }
+
+ // }}}
+ // {{{ createSQLInsert()
+
+ /**
+ * Generates a properly formatted sql query to insert data into a table
+ *
+ * @param string $table Name of the table to insert into
+ * @param array $columns Array of column names you want to set in the
+ * insert statement and bind names
+ *
+ * <code>
+ * Toolkit_Common::createSQLInsert('member', array('name', 'pos'));
+ * will create the sql statement
+ * INSERT INTO member (name, pos) VALUES(:name, :pos)
+ * </code>
+ *
+ * @return string Formatted SQL string
+ * @access public
+ * @static
+ */
+ public static function createSQLInsert($table, array $columns)
+ {
+ $params = implode(', ', $columns);
+ $bindParams = ':' . implode(', :', $columns);
+
+ return "INSERT INTO $table ($params) VALUES ($bindParams)";
+ }
+
+ // }}}
+ // {{{ createSQLUpdate()
+
+ /**
+ * Generates a properly formatted sql query to update data in a table
+ *
+ * <code>
+ * Toolkit_Common::createSQLUpdate('member',
+ * array('name', 'pos'),
+ * array('id = :id');
+ * will create the sql statement
+ * UPDATE member SET name = :name, pos = :pos WHERE id = :id
+ * </code>
+ *
+ * @param string $table Name of the table to update
+ * @param array $columns Array of columns names you want to update
+ * @param array $constraints Constraints to apply to the table to prevent
+ * running the update on every row in the db
+ *
+ * @return string formatted query string
+ * @access public
+ * @static
+ */
+ public static function createSQLUpdate(
+ $table,
+ array $columns,
+ array $constraints = null
+ ) {
+ $length = count($columns);
+ for ($i = 0; $i < $length; ++$i) {
+ $bindParams .= "{$columns[$i]} = :{$columns[$i]}";
+ if ($i < ($length - 1)) {
+ $bindParams .= ', ';
+ }
+ }
+ $sql = "UPDATE $table SET $bindParams";
+
+ if (!empty($constraints)) {
+ $sql .= ' WHERE ' . implode(' AND ', $constraints);
+ }
+
+ return $sql;
+ }
+
+ // }}}
+ // {{{ createTables()
+
+ /**
+ * Read file from parameter and use the PDO parameter to create process file
+ *
+ * @param PDO $pdo PHP Data Object to use for DB calls
+ * @param string $file full path of file to parse
+ *
+ * @return void
+ * @access public
+ * @static
+ */
+ public static function createTables(PDO $pdo, $file)
+ {
+ $sql = file_get_contents($file);
+ // break multiple queries apart by ';'
+ $tok = strtok($sql, ';');
+ try {
+ // while we have valid tokens, execute the query
+ // and grab the next token
+ while ($tok !== false) {
+ $pdo->query($tok);
+ $tok = strtok(';');
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+
+ // {{{ dieGracefully()
+
+ /**
+ * Gracefully exit from the script when an unrecoverable error is created
+ *
+ * @param string $msg Message to display to user
+ * @param mixed $e Error object
+ * @param boolean $moreInfo More debugging info when in development
+ *
+ * @return void
+ * @access public
+ */
+ public function dieGracefully($msg = null, $e = null, $moreInfo = false)
+ {
+ if (is_null($e)) {
+ if (is_null($msg)) {
+ die('There was an error, please try again later!');
+ } else {
+ die($msg);
+ }
+ } else {
+ echo $msg . '<br>';
+ echo 'Error Caught. <br>';
+ echo 'Error: ' . $e->getMessage() . '<br>';
+ if ($moreInfo) {
+ echo 'Code: <pre>' . $e->getCode() . '</pre><br>';
+ echo 'Debug Info: <pre>' . $e->getDebugInfo() . '</pre><br>';
+ }
+ }
+ }
+
+ // }}}
+
+ // {{{ errorException()
+
+ /**
+ * Stops script on Exception error
+ *
+ * Stops the script when an Exception is raised inside a
+ * try/catch block.
+ *
+ * When a site is no longer in DEVELOPMENT, ie: its live on ws3.
+ * We don't show any error info, but let the user know an unexpected
+ * error has occured and then mail the error info the the admin.
+ *
+ * Example usage:
+ * <code>
+ * try {
+ if ($foo != $bar) {
+ throw new Exception ("Foo Doesn't equal Bar");
+ }
+ * } catch (Exception $e) {
+ * return Toolkit_Common::handleError($e);
+ * }
+ * </code>
+ *
+ * @param Exception $e Exception Object
+ * @param Mail $mail What to use to send mail to admin
+ *
+ * @return false
+ * @access public
+ * @static
+ */
+ public static function errorException(Exception $e, Mail $mail = null)
+ {
+ if (!is_null($mail)) {
+ $subject = 'Exception Error for ' . SITENAME;
+ self::mailError($mail, $subject, $e);
+ } else {
+ echo self::getErrorInfo($e);
+ }
+
+ return false;
+ }
+
+ // }}}
+ // {{{ errorHTMLQuickFormError()
+
+ /**
+ * Handles PEAR Errors for our developers
+ *
+ * When a site is no longer in DEVELOPMENT, ie: its live on ws3.
+ * We don't show any error info, but let the user know an unexpected
+ * error has occured and then mail the error info the the admin.
+ *
+ * HTML_QuickForm Example usage:
+ * <code>
+ * $e =& $this->getElement('elementName');
+ * if (PEAR::isError($e)) {
+ * return Toolkit_Common::handleError($e);
+ * }
+ * </code>
+ *
+ * @param HTML_QuickForm_Error $e QuickFormError Object
+ * @param Mail $mail What to use to send mail to admin
+ *
+ * @return false
+ * @access public
+ * @since Method available since Release 1.0.1
+ * @static
+ */
+ public static function errorHTMLQuickFormError(
+ HTML_QuickForm_Error $e,
+ Mail $mail = null
+ ) {
+ if (!is_null($mail)) {
+ $subject = 'PEAR Error for ' . SITENAME;
+ self::mailError($mail, $subject);
+ } else {
+ echo self::getErrorInfo($e);
+ }
+
+ return false;
+ }
+
+ // }}}
+ // {{{ errorPDOException()
+
+ /**
+ * Stops script on database error
+ *
+ * Stops the script when a PDOException is raised inside a
+ * try/catch block.
+ *
+ * When a site is no longer in DEVELOPMENT, ie: its live on ws3.
+ * We don't show any error info, but let the user know an unexpected
+ * error has occured and then mail the error info the the admin.
+ *
+ * Example usage:
+ * <code>
+ * try {
+ * $sql = "
+ * SELECT *
+ * FROM table_name
+ * WHERE id = :id";
+ *
+ * $stmt = $this->dbh->prepare($sql);
+ * $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ * return $stmt->execute();
+ * } catch (PDOException $e) {
+ * return Toolkit_Common::handleError($e);
+ * }
+ * </code>
+ *
+ * @param PDOException $e PDO Error Object.
+ * @param Mail $mail Mail object used to send admin email
+ *
+ * @return false
+ * @access public
+ * @since Method available since Release 1.0.1
+ */
+ public function errorPDOException(PDOException $e, Mail $mail = null)
+ {
+ if (!is_null($mail)) {
+ $subject = 'SQL Error for ' . SITENAME;
+ self::mailError($mail, $subject, $e);
+ } else {
+ echo self::getErrorInfo($e);
+ }
+
+ return false;
+ }
+
+ // }}}
+ // {{{ errorPEARError()
+
+ /**
+ * Handles PEAR Errors for our developers
+ *
+ * When a site is no longer in DEVELOPMENT, ie: its live on ws3.
+ * We don't show any error info, but let the user know an unexpected
+ * error has occured and then mail the error info the the admin.
+ *
+ * @param PEAR_Error $e PEARError Object
+ * @param Mail $mail Mail object used to send admin email
+ *
+ * @return false
+ * @access public
+ * @since Method available since Release 1.0.1
+ */
+ public function errorPEARError(PEAR_Error $e, Mail $mail = null)
+ {
+ if (!is_null($mail)) {
+ $subject = 'PEAR Error for ' . SITENAME;
+ self::mailError($mail, $subject);
+ } else {
+ echo self::getErrorInfo($e);
+ }
+
+ return false;
+ }
+
+ // }}}
+ // {{{ errorPEARException()
+
+ /**
+ * Handles PEAR Exception for our developers
+ *
+ * When a site is no longer in DEVELOPMENT, ie: its live on ws3.
+ * We don't show any error info, but let the user know an unexpected
+ * error has occured and then mail the error info the the admin.
+ *
+ * @param PEAR_Exception $e PEARException Object
+ * @param Mail $mail Mail object used to send admin email
+ *
+ * @return false
+ * @access public
+ * @since Method available since Release 1.0.1
+ */
+ public function errorPEARException(PEAR_Exception $e, Mail $mail = null)
+ {
+ if (!is_null($mail)) {
+ $subject = 'SQL Error for ' . SITENAME;
+ self::mailError($mail, $subject, $e);
+ } else {
+ echo self::getErrorInfo($e);
+ }
+
+ return false;
+ }
+
+ // }}}
+ // {{{ errorRuntimeException()
+
+ /**
+ * Stops script on runtime error
+ *
+ * Stops the script when a runtimeException is raised inside a
+ * try/catch block.
+ *
+ * When a site is no longer in DEVELOPMENT, ie: its live on ws3.
+ * We don't show any error info, but let the user know an unexpected
+ * error has occured and then mail the error info the the admin.
+ *
+ * @param RuntimeException $e PDO Error Object.
+ * @param Mail $mail Mail object used to send admin email
+ *
+ * @return false
+ * @access public
+ * @since Method available since Release 1.0.2
+ */
+ public function errorRuntimeException(
+ RuntimeException $e,
+ Mail $mail = null
+ ) {
+ if (!is_null($mail)) {
+ $subject = 'Runtime Exception for ' . SITENAME;
+ self::mailError($mail, $subject, $e);
+ } else {
+ echo self::getErrorInfo($e);
+ }
+
+ return false;
+ }
+
+ // }}}
+ // {{{ errorBadMethodCallException()
+
+ /**
+ * Stops script on bad method call error
+ *
+ * Stops the script when a badMethodCallException is raised inside a
+ * try/catch block.
+ *
+ * When a site is no longer in DEVELOPMENT, ie: its live on ws3.
+ * We don't show any error info, but let the user know an unexpected
+ * error has occured and then mail the error info the the admin.
+ *
+ * @param BadMethodCallException $e PDO Error Object.
+ * @param Mail $mail Mail object used to send admin email
+ *
+ * @return false
+ * @access public
+ * @since Method available since Release 1.0.3
+ */
+ public function errorBadMethodCallException(
+ BadMethodCallException $e,
+ Mail $mail = null
+ ) {
+ if (!is_null($mail)) {
+ $subject = 'Bad Method Call Exception for ' . SITENAME;
+ self::mailError($mail, $subject, $e);
+ } else {
+ echo self::getErrorInfo($e);
+ }
+
+ return false;
+ }
+
+ // }}}
+
+ // {{{ filterURI()
+
+ /**
+ * Filters uri's before they are validated
+ *
+ * @param string $uri URI to filter
+ *
+ * @return mixed new uri if missing scheme
+ * @access public
+ * @static
+ */
+ public static function filterURI($uri)
+ {
+ $validProtocol = '/^https?\:\/\/.*/';
+ $invalidProtocol = '/^.*?\:\/\/.*/';
+ if (empty($uri)) {
+ // Empty field, just return
+ return $uri;
+ } elseif (preg_match($validProtocol, $uri)) {
+ // has valid protocol, return unchanged
+ // should pass validation.
+ return $uri;
+ } elseif (!preg_match($invalidProtocol, $uri)) {
+ // missing protocol, prepend default
+ // http:// protocol and return.
+ return "http://$uri";
+ } else {
+ // has invalid protocol, return unchanged
+ // validation should catch this and throw error.
+ return $uri;
+ }
+ }
+
+ // }}}
+ // {{{ filterPhone()
+
+ /**
+ * Filters phone numbers before they are validated
+ *
+ * @param string $phone number to filter
+ *
+ * @return mixed newly formatted phone number
+ * @access public
+ * @static
+ */
+ public static function filterPhone($phone)
+ {
+ // Ditch anything that is not a number
+ $number = preg_replace('/[^0-9]/', '', $phone);
+
+ // Invalid Number, validation will catch error
+ $len = strlen($number);
+ if (($len < 10) || ($len > 11)) {
+ return $phone;
+ }
+
+ // subscriber number
+ $sn = substr($number, -4);
+ // city code
+ $cc = substr($number, -7, 3);
+ // area code
+ $ac = substr($number, -10, 3);
+ if ($len == 11) {
+ // country prefix
+ $cp = $number[0];
+ }
+
+ $filteredNumber = "($ac) $cc-$sn";
+ if (!is_null($cp)) {
+ $filteredNumber = "$cp $filteredNumber";
+ }
+
+ return $filteredNumber;
+ }
+
+ // }}}
+
+ // {{{ getCities()
+
+ /**
+ * Get an array of cities from the database
+ *
+ * @param PDO $dbh Database handler
+ * @param integer $state State id the city is in
+ * @param integer $county County id the city is in
+ * @param integer $region Region id the city is in
+ *
+ * @return array states
+ * @access public
+ * @static
+ */
+ public static function getCities(
+ PDO $dbh,
+ $state = null,
+ $county = null,
+ $region = null
+ ) {
+ $param = array();
+ if (ctype_digit((string)$state)) {
+ $param[] = 'state_id = ' . $dbh->quote($state);
+ }
+ if (ctype_digit((string)$county)) {
+ $param[] = 'county_id = ' . $dbh->quote($county);
+ }
+ if (ctype_digit((string)$region)) {
+ $param[] = 'region_id = ' . $dbh->quote($region);
+ }
+
+ try {
+ $sql = "
+ SELECT *
+ FROM city";
+
+ if (!empty($param)) {
+ $sql .= ' WHERE ' . implode(' AND ', $param);
+ }
+ $sql .= ' ORDER BY city_name';
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->execute();
+
+ $cities = array();
+ while ($row = $stmt->fetch()) {
+ $cities[$row['city_id']] = $row['city_name'];
+ }
+
+ return $cities;
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+ // {{{ getErrorInfo()
+
+ /**
+ * extract error info from error object
+ *
+ * @param mixed $obj Error object to get info for
+ *
+ * @return string formatted error information
+ * @access public
+ */
+ public function getErrorInfo($obj)
+ {
+ $state = '<b>' . get_class($obj) . ' error: </b>';
+
+ $state .= '<br>$_SERVER[\'QUERY_STRING\']: ' . $_SERVER['QUERY_STRING']
+ . "\n";
+ $state .= '<br>$_SERVER[\'HTTP_REFERER\']: ' . $_SERVER['HTTP_REFERER']
+ . "\n";
+ $state .= '<br>$_SERVER[\'REDIRECT_QUERY_STRING\']: '
+ . $_SERVER['REDIRECT_QUERY_STRING'] . "\n";
+ $state .= '<br>$_SERVER[\'REQUEST_URI\']: ' . $_SERVER['REQUEST_URI']
+ . "\n";
+
+ $state .= '<br>$_GET: <pre>' . print_r($_GET, true) . '</pre>';
+ $state .= '<br>$_POST: <pre>' . print_r($_POST, true) . '</pre>';
+ $state .= '<br>$_SESSION: <pre>' . print_r($_SESSION, true) . '</pre>';
+
+ if (method_exists($obj, 'getMessage')) {
+ $state .= $obj->getMessage();
+ if (method_exists($obj, 'getDebugInfo')) {
+ $state .= '; ' . $obj->getDebugInfo();
+ }
+ }
+ if (method_exists($obj, 'getFile')) {
+ $state .= ' in <b>' . $obj->getFile() . '</b>';
+ }
+ if (method_exists($obj, 'getLine')) {
+ $state .= ' on line <b>' . $obj->getLine() . '</b>';
+ }
+ if (method_exists($obj, 'getBacktrace')) {
+ $backtrace = print_r($obj->getBacktrace(), true);
+
+ $state .= "<br><pre>$backtrace</pre>";
+ }
+
+ return $state;
+ }
+
+ // }}}
+ // {{{ getHierarchicalTreeStructure()
+
+ /**
+ * Create a hierarchical tree stored in an linear array
+ *
+ * Produces a representation of a hierarchical tree structure into a
+ * linear array so you can iterate straight through to get the tree
+ * structure.
+ *
+ * @param PDO $pdo Database handler
+ * @param string $table Name of the source relation
+ * @param string $key Name of the key field
+ * @param string $parent Name of the parent-key field
+ * @param string $order Name of the field to order siblings by
+ * @param integer $start Key value of the row to start at
+ * @param integer $maxDepth Maximum depth to descend to, or zero
+ * for unlimited depth
+ * @param boolean $validParent exclude branches that have null
+ * parent values
+ *
+ * @return array Linear array of tree structure
+ * @access public
+ * @see http://www.postgresql.org/doc/8.3/interactive/tablefunc.html#AEN104085
+ */
+ public function getHierarchicalTreeStructure(
+ PDO $pdo,
+ $table = 'pages',
+ $key = 'id',
+ $parent = 'parent',
+ $order = 'pos',
+ $start = 0,
+ $maxDepth = 0,
+ $validParent = true
+ ) {
+ try {
+ $tree = array();
+
+ $sql = "
+ SELECT *
+ FROM connectby('{$table}', '{$key}', '{$parent}',
+ '{$order}', '{$start}', {$maxDepth})
+ as t(id text, parent text, level int, pos int)";
+ if ($validParent) {
+ $sql .= " WHERE parent is not null";
+ }
+ foreach ($pdo->query($sql) as $row) {
+ $tree[$row['id']] = $row['level'];
+ }
+
+ return $tree;
+ } catch (PDOException $e) {
+ return self::handleError($e);
+ }
+ }
+
+ // }}}
+ // {{{ getScripts()
+
+ /**
+ * Gets all scripts for the page
+ *
+ * adds version number to url for all local (non-app.glm) urls
+ * so we can use .htaccess cachebusting
+ *
+ * combines script by server id, so we can decrease http requests to fetch
+ * the needed scripts
+ *
+ * @param array $scripts The array of js scripts for the page
+ *
+ * @return string HTML markup for scripts
+ * @access public
+ * @static
+ */
+ public static function getScripts(array $scripts)
+ {
+ if (!is_array($scripts) || empty($scripts)) {
+ return false;
+ }
+
+ $uniqueScripts = array_unique($scripts);
+ // Get the main jquery file
+ $jquery = JQUERY_CDN_JS;
+ $key = array_search($jquery, $uniqueScripts);
+ // If it exists, remove it from its current location
+ // and put at front of array.
+ if ($key !== false) {
+ unset($uniqueScripts[$key]);
+ array_unshift($uniqueScripts, $jquery);
+ }
+ $format = '<script type="text/javascript" src="%s"></script>';
+
+ $ret = '';
+ $baseUrlStrLen = strlen(MEDIA_BASE_URL);
+ $appUrlStrLen = strlen(MEDIA_APP_BASE_URL);
+
+ // Use versioning with local scripts for cachebusting
+ $localPath = MEDIA_BASE_URL . 'v/' . VERSION . '/javascript/';
+ $appPath = MEDIA_APP_BASE_URL . 'javascript/';
+
+ $localScripts = array();
+ $appScripts = array();
+ foreach ($uniqueScripts as $origScript) {
+ $ret .= sprintf($format, $origScript) . "\n";
+ }
+
+ if (!empty($appScripts)) {
+ $appPath = $appPath . implode(',', $appScripts);
+ $ret .= sprintf($format, $appPath) . "\n";
+ }
+
+ if (!empty($localScripts)) {
+ $localPath = $localPath . implode(',', $localScripts);
+ $ret .= sprintf($format, $localPath) . "\n";
+ }
+
+ return $ret;
+ }
+
+ // }}}
+ // {{{ getStates()
+
+
+ /**
+ * Get an array of states from the database
+ *
+ * @param PDO $dbh Database handler
+ * @param boolean $unionStatesOnly If we want to only retrieve
+ * the 50 US states
+ *
+ * @return array states
+ * @access public
+ * @static
+ */
+ public static function getStates(PDO $dbh, $unionStatesOnly = false)
+ {
+ if ($unionStatesOnly) {
+ // Just grab the 50 states of the union
+ $where = "WHERE us_state = :bool";
+ }
+
+ try {
+ $sql = "
+ SELECT *
+ FROM state
+ $where
+ ORDER BY state_name";
+
+ $stmt = $dbh->prepare($sql);
+ if ($unionStatesOnly) {
+ $stmt->bindValue(':bool', 1, PDO::PARAM_BOOL);
+ }
+ $stmt->execute();
+
+ $states = array();
+ while ($row = $stmt->fetch()) {
+ $states[$row['state_id']] = $row['state_name'];
+ }
+
+ return $states;
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+ // {{{ getStyleSheets()
+
+ /**
+ * Gets all style sheets for the page
+ *
+ * adds version number to url for all local (non-app.glm) urls
+ * so we can use .htaccess cachebusting
+ *
+ * combines style sheets by server id, so we can decrease http
+ * requests to fetch the needed style sheets
+ *
+ * @return string HTML markup for stylesheets
+ * @access public
+ * @static
+ */
+ public static function getStyleSheets()
+ {
+ if ( !isset($GLOBALS['styleSheets'])
+ || !is_array($GLOBALS['styleSheets'])
+ || empty($GLOBALS['styleSheets'])
+ ) {
+ return false;
+ }
+
+ $uniqueStyleSheets = array_unique($GLOBALS['styleSheets']);
+ $format = '<link type="text/css" rel="stylesheet" href="%s">';
+
+ $baseUrlStrLen = strlen(MEDIA_BASE_URL);
+ $appUrlStrLen = strlen(MEDIA_APP_BASE_URL);
+ $ret = '';
+
+ $localPath = MEDIA_BASE_URL . 'v/' . VERSION . '/css/';
+ $appPath = MEDIA_APP_BASE_URL . 'css/';
+
+ $localStyleSheets = array();
+ $appStyleSheets = array();
+ foreach ($uniqueStyleSheets as $origStyleSheet) {
+ $ret .= sprintf($format, $origStyleSheet) . "\n";
+ }
+
+ if (!empty($appStyleSheets)) {
+ $appPath = $appPath . implode(',', $appStyleSheets);
+ $ret .= sprintf($format, $appPath) . "\n";
+ }
+ if (!empty($localStyleSheets)) {
+ $localPath = $localPath . implode(',', $localStyleSheets);
+ $ret .= sprintf($format, $localPath) . "\n";
+ }
+
+ return $ret;
+ }
+
+ // }}}
+ // {{{ getTableMetaData()
+
+ /**
+ * Gets the meta data of the calling classes table columns
+ *
+ * The table used when retrieving the meta data is defined
+ * in the class property $tableName. The class or parent class
+ * must also have a $tableMetaData property
+ *
+ * @param PDO $pdo Database Handler
+ * @param string $tableName The name of the table to get the meta data for.
+ * @param array $clauses Only retrieve meta data for certain column types
+ *
+ * @return array metadata for table
+ * @access protected
+ */
+ public function getTableMetaData(
+ PDO $pdo,
+ $tableName,
+ array $clauses = null
+ ) {
+ if (is_array($clauses)) {
+ while ($c = current($clauses)) {
+ $ands .= " data_type = '{$c}'";
+ if (false !== next($clauses)) {
+ $ands .= " OR ";
+ }
+ }
+ $ands = " AND ($ands)";
+ }
+ try {
+ $sql = "
+ SELECT column_name, data_type
+ FROM information_schema.columns
+ WHERE table_name = :tname
+ $ands";
+ $stmt = $pdo->prepare($sql);
+ $stmt->bindParam(':tname', $tableName, PDO::PARAM_STR);
+
+ $stmt->execute();
+
+ $metaData = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $metaData[$row['column_name']] = $row['data_type'];
+ }
+
+ return $metaData;
+ } catch (PDOException $e) {
+ return self::handleError($e);
+ }
+ }
+
+ // }}}
+
+ // {{{ handleError()
+
+ /**
+ * Handles various script error
+ *
+ * @param Object $e Error Object
+ * @param boolean $developmentServer If we are on a development server
+ *
+ * @return mixed String, false, void
+ * @access public
+ * @static
+ */
+ public static function handleError($e, $developmentServer = DEVELOPMENT)
+ {
+ $errorType = str_replace('_', '', get_class($e));
+ $errorType = "error$errorType";
+
+ if (method_exists(__CLASS__, $errorType)) {
+ if (!$developmentServer) {
+ // Tell the user we encountered an Error.
+ if (file_exists(BASE . '404.html')) {
+ include_once BASE . "404.html";
+ }
+
+ $mail = Mail::factory('mail');
+ self::$errorType($e, $mail);
+ exit();
+ } else {
+ return self::$errorType($e, $mail);
+ }
+ } else {
+ echo '<p>The system has encountered an un-recoverable error!</p>';
+ }
+ }
+
+ // }}}
+
+ // {{{ mailError()
+
+ /**
+ * Mails the error to the site admin
+ *
+ * @param Mail $mail Mail object to use
+ * @param string $subject Subject of email
+ * @param Exception $e exception
+ *
+ * @return void
+ * @access public
+ * @static
+ */
+ public static function mailError(
+ Mail $mail,
+ $subject,
+ Exception $e = null
+ ) {
+ $msg = '<p>' . self::getErrorInfo($e) . '</p>';
+
+ $htmlMsg = "<html><head></head><body>$msg</body></html>";
+ $crlf = "\n";
+ $mimeMail = new Mail_mime($crlf);
+ $mimeMail->setFrom(self::$from);
+ $mimeMail->setSubject($subject);
+ $mimeMail->setHTMLBody($htmlMsg);
+ $mimeMail->setTXTBody($msg);
+
+ $body = $mimeMail->get();
+ $headers = $mimeMail->headers();
+
+ $mail->send(self::$admin, $headers, $body);
+ }
+
+ // }}}
+ // {{{ multiDimArrayLocate()
+
+ /**
+ * Locates an array value in a multi-dimensional array
+ *
+ * @param array $array The Array which holds the value you need.
+ * @param mixed $text The value that you are looking for.
+ *
+ * @return mixed The search result.
+ */
+ public function multiDimArrayLocate($array, $text)
+ {
+ if (!is_array($array)) {
+ return;
+ }
+ $arrayResult = array();
+ foreach ($array as $k => $v) {
+ if (is_array($v)) {
+ $temp[$k] = self::multiDimArrayLocate($v, $text);
+ if ($temp[$k]) {
+ $arrayResult[$k] = $temp[$k];
+ }
+ } else {
+ if ($v == $text) {
+ $arrayResult[$k] = $v;
+ }
+ }
+ }
+ return $arrayResult;
+ }
+
+ // }}}
+
+ // {{{ processQuery()
+ //The type hint of the argument is incorrect for the type
+ //definition of the @param tag with argument $dbh in processQuery()
+ /**
+ * Performs the sql insert statement
+ *
+ * If using a Postgresql driver for the PDO, metadata is used when
+ * binding parameters to the prepared statement.
+ *
+ * @param PDO $dbh Database handler object
+ * @param string $tableName table used in query
+ * @param string $sql sql query string
+ * @param array $values associative array of key/value pairs that will
+ * be used to bind to the sql query string
+ *
+ * @return boolean result of the execute statement on the database
+ * @access public
+ * @static
+ */
+ public static function processQuery(
+ PDO $dbh,
+ $tableName,
+ $sql,
+ array $values = null
+ ) {
+ $dbType = $dbh->getAttribute(PDO::ATTR_DRIVER_NAME);
+ if ($dbType == 'pgsql') {
+ $md = Toolkit_Common::getTableMetaData($dbh, $tableName);
+ }
+ $stmt = $dbh->prepare($sql);
+ foreach ($values as $k => &$v) {
+ if ($dbType == 'pgsql') {
+ $metaData = $md[$k];
+ if ($metaData == 'integer') {
+ $dataType = PDO::PARAM_INT;
+ } elseif ($metaData == 'boolean') {
+ $dataType = PDO::PARAM_BOOL;
+ } else {
+ $dataType = PDO::PARAM_STR;
+ }
+ // for empty values that are not actually a zero (0), we
+ // want to insert null's.
+ // as empty values '', are not considered unique
+ if ( empty($v)
+ && $dataType !== PDO::PARAM_BOOL
+ && $dataType !== PDO::PARAM_INT
+ ) {
+ $v = null;
+ $dataType = PDO::PARAM_NULL;
+ }
+ $stmt->bindParam(":$k", $v, $dataType);
+ } else {
+ $stmt->bindParam(":$k", $v);
+ }
+ }
+
+ return $stmt->execute();
+ }
+
+ // }}}
+ // {{{ prepareQuery()
+
+ /**
+ * Prepares the sql statement
+ *
+ * If using a Postgresql driver for the PDO, metadata is used when
+ * binding parameters to the prepared statement.
+ *
+ * @param PDO &$dbh Database handler object
+ * @param string $tableName table used in query
+ * @param string $sql sql query string
+ * @param array $values associative array of key/value pairs that will
+ * be used to bind to the sql query string
+ *
+ * @return PDOStatement if successfully prepares statement
+ * @access public
+ * @static
+ */
+ public static function prepareQuery(
+ PDO &$dbh,
+ $tableName,
+ $sql,
+ array $values = null
+ ) {
+ $dbType = $dbh->getAttribute(PDO::ATTR_DRIVER_NAME);
+ if ($dbType == 'pgsql') {
+ $md = Toolkit_Common::getTableMetaData($dbh, $tableName);
+ }
+ $stmt = $dbh->prepare($sql);
+ foreach ($values as $k => &$v) {
+ if ($dbType == 'pgsql') {
+ $metaData = $md[$k];
+ if ($metaData == 'integer') {
+ $dataType = PDO::PARAM_INT;
+ } elseif ($metaData == 'boolean') {
+ $dataType = PDO::PARAM_BOOL;
+ } else {
+ $dataType = PDO::PARAM_STR;
+ }
+ // for empty values that are not actually a zero (0), we
+ // want to insert null's.
+ // as empty values '', are not considered unique
+ if ( empty($v)
+ && $dataType !== PDO::PARAM_BOOL
+ && $dataType !== PDO::PARAM_INT
+ ) {
+ $v = null;
+ $dataType = PDO::PARAM_NULL;
+ } elseif ($v === '' && $dataType === PDO::PARAM_INT) {
+ $v = null;
+ $dataType = PDO::PARAM_NULL;
+ }
+
+ $stmt->bindParam(":$k", $v, $dataType);
+ } else {
+ $stmt->bindParam(":$k", $v);
+ }
+ }
+
+ return $stmt;
+ }
+
+ // }}}
+
+ // {{{ recursiveArraySearch()
+
+ /**
+ * Recursive multi-dimensional array search
+ *
+ * @param string $n Needle
+ * @param array $h Haystack
+ *
+ * @return mixed search result - false if not found
+ * @access public
+ * @static
+ */
+ public static function recursiveArraySearch($n, array $h)
+ {
+ foreach ($h as $i => $j) {
+ $curr = $i;
+ if ( $n === $j
+ || (is_array($j) && self::recursiveArraySearch($n, $j) !== false)
+ ) {
+ return $curr;
+ }
+ }
+
+ return false;
+ }
+
+ // }}}
+
+ // {{{ show()
+
+ /**
+ * Renders the calling class to the screen
+ *
+ * @access public
+ * @return string calls the toHTML function of calling class
+ */
+ public function show()
+ {
+ echo $this->toHTML();
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * EditContact.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2010 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: EditContact.php,v 1.3 2010/05/13 20:18:38 matrix Exp $
+ * @link http://pear.php.net/package/Contacts
+ * @see References to other sections (if any)...
+ */
+/**
+ * Error codes for Toolkit_Contacts_ContactUs
+ *
+ * Codes are mapped to textual messaged by errorMessage() method,
+ * if you add a new code be sure to add a new message for it to errorMessage()
+ *
+ * @see Toolkit_Contacts_ContactUs::errorMessage()
+ */
+define('FORM_OK', 1);
+
+/**
+ * Description for define
+ */
+define('FORM_ERROR', -1);
+
+/**
+ * Description for define
+ */
+define('NO_RECORD', -2);
+
+/**
+ * Description for define
+ */
+define('INVALID_DB', -3);
+
+/**
+ * Description for define
+ */
+define('MISSING_CONSTANT', -4);
+
+/**
+ * Description for define
+ */
+define('MISSING_CONTACT_TYPE', -5);
+
+/**
+ * Toolkit_Contacts_Admin_EditContact
+ *
+ * Edit Process class to insert or update a contact
+ * can be used with customer table with little modification
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2010 Steve Sutton
+ * @license Gaslight Media
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/Contacts
+ * @see References to other sections (if any)...
+ */
+class Toolkit_Contacts_Admin_EditContact
+ extends Toolkit_FormBuilder implements Toolkit_Form
+{
+ // {{{ properties
+
+ /**
+ * Table in Database which holds the contact data
+ *
+ * @var string
+ * @access public
+ */
+ public $tableName = 'contact';
+
+ /**
+ * Primary Key for the table
+ *
+ * @var string
+ * @access public
+ */
+ public $primaryKey = 'id';
+
+ /**
+ * Sequence for the table
+ *
+ * @var string
+ * @access public
+ */
+ public $sequence = 'contact_id_seq';
+
+ /**
+ * Table meta data
+ *
+ * This is used when inserting/updating data for the records
+ * so the PDO's can use explicit data types for the parameters.
+ *
+ * @var array
+ * @access public
+ */
+ public $tableMetaData = array();
+
+ /**
+ * The interests from the contact db
+ *
+ * @var array
+ * @access protected
+ */
+ protected $inquiries = array();
+
+ /**
+ * What do you want the error msg to be if the form doesn't validate
+ *
+ * @var string
+ * @access protected
+ */
+ protected $errorMsg
+ = '<div id="form-warning-top">
+ Warning: The form was not sent, please review the errors below.
+ </div>';
+
+ /**
+ * What do you want the success msg to be if the form validates successfully
+ *
+ * @var string
+ * @access protected
+ */
+ protected $successMsg
+ = '<div id="form-success-top">
+ The information below has been successfully submitted.
+ </div>';
+
+ /**
+ * Include a captcha on the form or not
+ *
+ * @var boolean
+ * @access protected
+ */
+ protected $useCaptcha = false;
+
+ /**
+ * The default templates to inject into the form renderer
+ *
+ * @var string
+ * @access protected
+ */
+ protected $template;
+
+ /**
+ * The default rules to register for validating
+ *
+ * We have to register these rules, or any others we want, before
+ * we are able to use them in our forms.
+ *
+ * These rules can be removed in subclasses before the rules are configured
+ * if you want to omit any of them from validating input - just remember
+ * to not call them in your configured rules!
+ *
+ * Phone: validates input against US and CA style phone #'s
+ * <code>
+ * $rules[] = array('element' => 'phone',
+ * 'message' => 'ERROR: Invalid Phone Format!',
+ * 'type' => 'phone',
+ * 'format' => null,
+ * 'validation' => $this->validationType,
+ * 'reset' => true,
+ * 'force' => false);
+ * </code>
+ *
+ * Zip: Validates input against US and CA zip codes, if DB check is
+ * set to true, validate zip codes against all the zip codes in the
+ * DB.
+ * <code>
+ * $rules[] = array('element' => 'zip',
+ * 'message' => 'ERROR: Invalid Zip!',
+ * 'type' => 'zip',
+ * 'format' => array('requireDBCheck' => true),
+ * 'validation' => $this->validationType,
+ * 'reset' => true,
+ * 'force' => false);
+ * </code>
+ *
+ * Banwords: Make sure each each doesn't contain a banned word. Checking
+ * against a DB of banned words.
+ *
+ * State: Validate input against US and CA region / province codes. If DB
+ * check is set to true, validate region / province against all the
+ * regions / provinces in the DB.
+ * <code>
+ * $rules[] = array('element' => 'state_id',
+ * 'message' => 'ERROR: Invalid State / Province!',
+ * 'type' => 'state',
+ * 'format' => array('requireDBCheck' => true),
+ * 'validation' => $this->validationType,
+ * 'reset' => true,
+ * 'force' => false);
+ * </code>
+ *
+ * @var array
+ * @access protected
+ * @see app.gaslightmedia.com/glmPEAR/HTML/QuickForm/Rule/Zip.php
+ * @see app.gaslightmedia.com/glmPEAR/HTML/QuickForm/Rule/Phone.php
+ * @see app.gaslightmedia.com/glmPEAR/HTML/QuickForm/Rule/Banwords.php
+ * @see app.gaslightmedia.com/glmPEAR/HTML/QuickForm/Rule/State.php
+ */
+ protected $registeredRules = array('phone', 'zip', 'state');
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param object $pdo PHP Data Object
+ * @param string $formName Form's name.
+ * @param string $method (optional)Form's method defaults to 'POST'
+ * @param string $action (optional)Form's action
+ * @param string $target (optional)Form's target defaults to '_self'
+ * @param mixed $attributes (optional)Extra attributes for <form> tag
+ * @param bool $trackSubmit (optional)Whether to track if the form was
+ * submitted by adding a special hidden field
+ *
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @access public
+ * @link http://pear.php.net/package/HTML_QuickForm/docs/latest/HTML_QuickForm/HTML_QuickForm.html
+ * @see HTML_QuickForm
+ */
+ public function __construct(
+ PDO $pdo,
+ $formName,
+ $method = 'post',
+ $action = '',
+ $target = '',
+ $attributes = null,
+ $trackSubmit = false
+ ) {
+ parent::__construct(
+ $formName,
+ $method,
+ $action,
+ $target,
+ $attributes,
+ $trackSubmit
+ );
+
+ $this->dbh = $pdo;
+
+ /**
+ * Where are the flexy templates stored at for this class.
+ */
+ define('TEMPLATES_DIR', BASE . 'Toolkit/Contacts/templates');
+
+ /**
+ * Where are the compiled flexy templates stored at for this class.
+ */
+ define('COMPILED_DIR', BASE . 'Toolkit/Contacts/templates/compiled');
+ $oldUmask = umask(0);
+ if (!is_dir(TEMPLATES_DIR)) {
+ mkdir(TEMPLATES_DIR, 0770, true);
+ }
+ if (!is_dir(COMPILED_DIR)) {
+ mkdir(COMPILED_DIR, 0770, true);
+ }
+ umask($oldUmask);
+
+ $this->flexyOptions = $GLOBALS['flexyOptions'];
+ $this->flexyOptions['templateDir'] = TEMPLATES_DIR;
+ $this->flexyOptions['compileDir'] = COMPILED_DIR;
+
+ }
+
+ // }}}
+
+ // {{{ checkContactEmail()
+
+ /**
+ * Checks if the member name already exists in the database
+ *
+ * @param array $data The name of the member to check for.
+ *
+ * @return bool False on SQL Query error, otherwise true.
+ * @access protected
+ */
+ public function checkContactEmail($data)
+ {
+ try {
+ // If we're editing a contact, they
+ // can save that member as its
+ // own name. so don't include that
+ // member in the check.
+ if (ctype_digit($_REQUEST[$this->primaryKey])) {
+ $and = "AND {$this->primaryKey} <> :id";
+ }
+ $sql = "
+ SELECT count(*) AS total
+ FROM {$this->tableName}
+ WHERE email = :email
+ $and";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':email', $data, PDO::PARAM_STR);
+ if (ctype_digit($_REQUEST[$this->primaryKey])) {
+ $stmt->bindParam(':id', $_REQUEST[$this->primaryKey], PDO::PARAM_STR);
+ }
+ $stmt->execute();
+ $stmt->bindColumn('total', $valid);
+ $stmt->fetch();
+
+ return !(bool) $valid;
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+ // {{{ configureConstats()
+
+ /**
+ * Constant variables for the form
+ *
+ * These values won't get overridden by POST or GET vars
+ *
+ * @return void
+ * @access public
+ */
+ public function configureConstants()
+ {
+ if (ctype_digit($_REQUEST['id'])) {
+ $constants = array('id' => $_REQUEST['id']);
+ } else {
+ $constants = array();
+ }
+ $this->setupConstants($constants);
+ }
+
+ // }}}
+ // {{{ configureDefaults()
+
+ /**
+ * Initializes default form values
+ *
+ * @return void
+ * @access public
+ */
+ public function configureDefaults()
+ {
+ if (ctype_digit($_REQUEST[$this->primaryKey])) {
+ try {
+ $sql = "
+ SELECT ci.id,ig.name
+ FROM contact_inq ci LEFT OUTER JOIN inq_group ig ON (ci.groupid = ig.id)
+ WHERE ci.id = :id";
+ $getIntData = $this->dbh->prepare($sql);
+ $sql = "
+ SELECT *
+ FROM {$this->tableName}
+ WHERE {$this->primaryKey} = :id";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(":id", $_REQUEST[$this->primaryKey], PDO::PARAM_INT);
+ $stmt->execute();
+ $defaults = $stmt->fetch(PDO::FETCH_ASSOC);
+ if ($defaults['interest']) {
+ $pattern = "/^:|:$/";
+ $intString = preg_replace($pattern, "", $defaults['interest']);
+ $intArray = explode(":", $intString);
+ if (is_array($intArray) && !empty($intArray)) {
+ $newIntArray = array();
+ foreach ($intArray as $intId) {
+ if (is_numeric($intId)) {
+ $getIntData->bindParam(":id", $intId, PDO::PARAM_INT);
+ $getIntData->execute();
+ $row = $getIntData->fetch(PDO::FETCH_ASSOC);
+ // set the new interest array
+ $newIntArray[$row['name']][$row['id']] = true;
+ }
+ }
+ $defaults['interest'] = $newIntArray;
+ }
+ }
+ if ($defaults['contact_type']) {
+ $pattern = "/^:|:$/";
+ $cTypesString = preg_replace($pattern, "", $defaults['contact_type']);
+ // set the new contact type array
+ $defaults['contact_type'] = explode(":", $cTypesString);
+ }
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ } else {
+ $defaults = array(
+ 'state' => '',
+ 'mail_ok' => 1
+ );
+ }
+
+ $this->setupDefaults($defaults);
+ }
+
+ // }}}
+ // {{{ configureElements()
+
+ /**
+ * Form element definitions
+ *
+ * @return void
+ * @access public
+ */
+ public function configureElements()
+ {
+ $e = array();
+ $this->setInterestFields();
+ // Grouped Elements are defined here.
+ $this->interestsGroups =& $this->getInterestFields();
+
+ $contactTypesSetup
+ = $this->config->getItem('section', 'contact_types')
+ ->toArray();
+ $cType = $contactTypesSetup['contact_types'];
+ // All Elements are created here. This includes group element definitions.
+ $e[] = array(
+ 'type' => 'hidden',
+ 'name' => 'start',
+ 'display' => $_REQUEST['start']
+ );
+ $e[] = array(
+ 'type' => 'static',
+ 'req' => false,
+ 'name' => 'user_agent',
+ 'display' => 'User Agent'
+ );
+ $e[] = array(
+ 'type' => 'static',
+ 'req' => false,
+ 'name' => 'remote_addr',
+ 'display' => 'Remote Address'
+ );
+ if (ctype_digit($_REQUEST[$this->primaryKey])) {
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => $this->primaryKey
+ );
+ }
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'fname',
+ 'display' => 'First Name'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'lname',
+ 'display' => 'Last Name'
+ );
+ if ($this->tableName == 'customer') {
+ $add1 = 'add1';
+ $add2 = 'add2';
+ } else {
+ $add1 = 'address';
+ $add2 = 'address2';
+ }
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => $add1,
+ 'display' => 'Address 1'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => $add2,
+ 'display' => 'Address 2'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'city',
+ 'display' => 'City'
+ );
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => false,
+ 'name' => 'state',
+ 'display' => 'State/Province',
+ 'opts' => $GLOBALS['states']
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'zip',
+ 'display' => 'ZIP/Postal Code'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'email',
+ 'display' => 'Email'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'phone',
+ 'display' => 'Phone'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'fax',
+ 'display' => 'Fax'
+ );
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'mail_ok',
+ 'display' => 'Mail Ok?',
+ 'opts' => 'Yes',
+ 'val' => array(0, 1)
+ );
+ if (is_array($this->interestsGroups)) {
+ foreach ($this->interestsGroups as $group => $gData) {
+ $this->myGroups[] = $gData;
+ $e[] = array(
+ 'type' => 'group',
+ 'req' => false,
+ 'name' => 'interest['.$group.']',
+ 'group' => $gData,
+ 'label' => $group,
+ 'seperator' => ' ',
+ 'appendName' => true
+ );
+ }
+ }
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => false,
+ 'name' => 'contact_type',
+ 'display' => 'Contact Type',
+ 'opts' => $cType,
+ 'att' => array('multiple' => 'multiple')
+ );
+ $e[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'submit_rmv',
+ 'display' => 'Submit Form'
+ );
+
+ $this->setupElements($e);
+ }
+
+ // }}}
+ // {{{ configureRules()
+
+ /**
+ * Form rule definitions
+ *
+ * Adds validation rules for the given fields
+ *
+ * @return void
+ * @access public
+ */
+ public function configureRules()
+ {
+ $r = array();
+ // Form Rules
+ $r[] = array(
+ 'element' => 'email',
+ 'message' => 'ERROR: Invalid Email Format!',
+ 'type' => 'email',
+ 'format' => array('use_rfc822' => true),
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'phone',
+ 'message' => 'ERROR: Invalid number (xxx) xxx-xxxx!',
+ 'type' => 'phone',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'fax',
+ 'message' => 'ERROR: Invalid number (xxx) xxx-xxxx!',
+ 'type' => 'phone',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'zip',
+ 'message' => 'ERROR: Invalid Zip!',
+ 'type' => 'zip',
+ 'format' => array('requireDBCheck' => false),
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'mail_ok',
+ 'message' => 'ERROR: Invalid Value!',
+ 'type' => 'numeric',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'email',
+ 'message' => 'ERROR: There is an existing account with this name!',
+ 'type' => 'callback',
+ 'format' => array($this, 'checkContactEmail'),
+ 'validation' => $this->validationType,
+ 'reset' => false,
+ 'force' => false
+ );
+
+ $this->setupRules($r);
+ }
+
+ // }}}
+ // {{{ configureFilters()
+
+ /**
+ * Form filter definitions
+ *
+ * Applies a data filter for the given fields when the form is submitted
+ *
+ * @return void
+ * @access public
+ */
+ public function configureFilters()
+ {
+ $f = array();
+
+ $f[] = array(
+ 'element' => '__ALL__',
+ 'filter' => 'trim'
+ );
+
+ $this->setupFilters($f);
+ }
+
+ // }}}
+ // {{{ configureForm()
+
+ /**
+ * Helper function, configures the entire form
+ *
+ * @return void
+ * @access public
+ */
+ public function configureForm()
+ {
+ $this->configureElements();
+ $this->configureFilters();
+ $this->configureRules();
+ $this->configureDefaults();
+ $this->configureConstants();
+ }
+
+ // }}}
+ // {{{ contactExists()
+
+ /**
+ * Checks for a duplicate email address already in the DB.
+ *
+ * @param string $email The email address to check for in the DB
+ *
+ * @return boolean If the email address already exists
+ * @access protected
+ */
+ protected function contactExists($email)
+ {
+ // Check if a contact w/ the submitted email already exists.
+ // if so, then we need to update, if not then do a fresh insert.
+ try {
+ $sql = "
+ SELECT count(*) AS count
+ FROM {$this->tableName}
+ WHERE email = :email";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':email', $email, PDO::PARAM_STR);
+ $stmt->execute();
+ $stmt->bindColumn('count', $contactExists);
+ $stmt->fetch();
+
+ return (bool) $contactExists;
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+
+ // {{{ error()
+
+ /**
+ * Display errors with the form to the user
+ *
+ * @param object $error PEAR Error Object
+ *
+ * @return void
+ * @access public
+ */
+ public function error($error)
+ {
+ // make the variables static so that is only has to do the defining
+ // on the first call.
+ static $errorMessages;
+ static $className;
+
+ // define the various error messages
+ if (!isset($errorMessages)) {
+ $className = get_class($this);
+ $errorMessages = array(
+ FORM_OK => 'No error',
+ FORM_ERROR => 'Unknown error',
+ NO_RECORD => 'Setting both properties (email and hasContactDB) to false in the <i>' . $className . '</i> class will result in no email record being sent and no record being inserted into the database. There will be no record that this form was ever filled out.',
+ INVALID_DB => 'Please set the property hasContactDB to a boolean value in the class <i>' . $className . '</i> before continuing',
+ MISSING_CONSTANT => 'You have failed to set a CONSTANT for the class <i>' . $className . '</i> to function properly',
+ MISSING_CONTACT_TYPE => 'Please set the property contactType in the class <i>'. $className . '</i> before continuing',);
+ }
+
+ if (!is_null($error->message)) {
+ $message = $error->message;
+ } elseif (isset($errorMessages[$error->code])) {
+ $message = $errorMessages[$error->code];
+ } else {
+ $message = $errorMessages[$error->code];
+ $message = $errorMessages[FORM_ERROR];
+ }
+
+ echo "<div id=\"form-warning-top\">{$message}</div>";
+ }
+
+ // }}}
+
+ // {{{ getInterestFields()
+
+ /**
+ * Returns the field definitions of the contact db interest fields
+ *
+ * @return array Group definitions for the interest fields
+ * @access protected
+ */
+ protected function getInterestFields()
+ {
+ if (is_array($this->inquiries)) {
+ foreach ($this->inquiries as $group => $data) {
+ foreach ($data as $k => $v) {
+ $interests[$group][] = array(
+ 'type' => 'checkbox',
+ 'req' => false,
+ 'name' => $k,
+ 'opts' => $v
+ );
+ }
+ }
+ }
+
+ return $interests;
+ }
+
+ // }}}
+
+ // {{{ processData()
+
+ /**
+ * Handles how to process the form when submitted
+ *
+ * @param array $values Form submitted values
+ *
+ * @return array Result of Insert / Update function
+ * @access protected
+ */
+ public function processData($values)
+ {
+ // Form data used for the insert/update sql queries and
+ // the form email.
+ $e = array(
+ 'user_agent',
+ 'remote_addr',
+ 'contact_type',
+ );
+ $this->setFormData($e);
+ $this->start = $values['start'];
+ unset($values['start']);
+ // Get rid of any elements in the values array that
+ // aren't going to be used when inserting/updating the db.
+ $values = Toolkit_Common::cleanArray($values);
+
+ $isUpdate = (ctype_digit($_REQUEST[$this->primaryKey])) ? true: false;
+
+ if (is_array($values['interest']) && !empty($values['interest'])) {
+ foreach ($values['interest'] as $iGroup => $interests) {
+ $newInterest[] = implode(':', array_keys($interests));
+ }
+ if (is_array($newInterest)) {
+ $values['interest'] = ':' . implode(':', $newInterest) . ':';
+ }
+ }
+ if (!isset($values['interest'])) {
+ $values['interest'] = '';
+ }
+ if (is_array($values['contact_type']) && !empty($values['contact_type'])) {
+ $values['contact_type'] = ':' . implode(':', $values['contact_type']) . ':';
+ }
+ if (!isset($values['contact_type'])) {
+ $values['contact_type'] = '';
+ }
+
+ if ($isUpdate) {
+ $this->Action = 'Contact Updated';
+ } else {
+ $this->Action = 'Contact Added';
+ }
+ $values['create_date'] = date('m/d/Y');
+ // build a contact or customer class object with the values from
+ // the Contact form
+ if ($this->tableName == 'contact') {
+ $contact = Toolkit_LeadManager_Contact::createByValues($values);
+ } else {
+ $contact = Toolkit_LeadManager_Customer::createByValues($values);
+ }
+
+ if ($contact->getMailOk()) {
+ if ( defined('STREAMSEND_FORMS_API')
+ && STREAMSEND_FORMS_API) {
+ $contact->attach(new Toolkit_LeadManager_StreamSend());
+ }
+ if ( defined('CONSTANT_CONTACT')
+ && CONSTANT_CONTACT) {
+ $contact->attach(new Toolkit_LeadManager_ConstantContact());
+ }
+ }
+
+ $contact->save($this->dbh, false);
+ return true;
+ }
+
+ // }}}
+ // {{{ setConfig()
+ /**
+ * setConfig
+ *
+ * @param Config_Container $c instance of Config Container
+ *
+ * @access public
+ * @return string
+ */
+ function setConfig(Config_Container $c)
+ {
+ $this->config = $c;
+ }// }}}
+ // {{{ setInterestFields()
+
+ /**
+ * Contact DB interests
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setInterestFields()
+ {
+ try {
+ $sql = "
+ SELECT contact_inq.*, inq_group.name
+ FROM contact_inq LEFT OUTER JOIN inq_group ON (contact_inq.groupid = inq_group.id)
+ ORDER BY groupid, pos";
+
+ $i = array();
+ foreach ($this->dbh->query($sql) as $row) {
+ $i[$row['name']][$row['id']] = $row['header'];
+ }
+
+ $this->inquiries = $i;
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+ // {{{ setPrimaryKey()
+ /**
+ * setPrimaryKey
+ *
+ * @param mixed $fieldName Primary Key of Table
+ *
+ * @access public
+ * @return string
+ */
+ function setPrimaryKey($fieldName)
+ {
+ $this->primaryKey = $fieldName;
+ }// }}}
+ // {{{ setTableName()
+ /**
+ * setTableName
+ *
+ * @param mixed $tableName Database table name
+ *
+ * @access public
+ * @return string
+ */
+ function setTableName($tableName)
+ {
+ $this->tableName = $tableName;
+ }// }}}
+
+ // {{{ setupRenderers()
+ // @codeCoverageIgnoreStart
+
+ /**
+ * Custom rendering templates for special fields on the form
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupRenderers()
+ {
+ parent::setupRenderers();
+ $renderer =& $this->defaultRenderer();
+ $required = '<!-- BEGIN required -->
+ <span class="req"> * </span>
+ <!-- END required -->';
+ $error = '<!-- BEGIN error -->
+ <div class="req"> {error} </div>
+ <!-- END error -->';
+ $renderer->setElementTemplate(
+ '<tr>
+ <td colspan="2" class="fieldcell checkbox">
+ '.$required.'{label}'.$error.'{element}
+ </td>
+ </tr>',
+ 'interest'
+ );
+ if (is_array($this->interestsGroups)) {
+ foreach ($this->interestsGroups as $group => $gData) {
+ $renderer->setGroupTemplate(
+ '<br>{content}',
+ 'interest['.$group.']'
+ );
+ $renderer->setGroupElementTemplate(
+ '{element}',
+ 'interest['.$group.']'
+ );
+ $renderer->setElementTemplate(
+ '<tr>
+ <td colspan="2">'.$required.'{label}'.$error.'{element}
+ </td>
+ </tr>',
+ 'interest['.$group.']'
+ );
+ }
+ }
+ $renderer->setElementTemplate(
+ '<tr><td colspan="2">'.$required.'{label}'.$error.'{element}</td></tr>',
+ 'comments'
+ );
+ $renderer->setElementTemplate(
+ '<tr align="center">
+ <td colspan="2">'.$required.'{label}'.$error.'{element}
+ </td>
+ </tr>',
+ 'submit'
+ );
+
+ $renderer->setElementTemplate(
+ '<tr>
+ <td class="labelcell">
+ <label>{label}</label>
+ </td>
+ <td class="fieldcell captcha">
+ {element}
+ </td>
+ </tr>',
+ 'captcha_question');
+ $renderer->setElementTemplate(
+ '<tr>
+ <td class="labelcell">
+ '.$required.'<label>{label}</label>
+ </td>
+ <td class="fieldcell">
+ '.$error.'{element}
+ <span class="tooltip" title="Verification Code|To help us
+ distinguish between information submitted by individuals
+ and those automatically entered by software robots, please
+ type the letters shown.">What is this?</span>
+ </td>
+ </tr>',
+ 'captcha_rmv'
+ );
+ }
+
+ // @codeCoverageIgnoreEnd
+ // }}}
+ // {{{ toHtml()
+
+ /**
+ * Handles how to display the current step the user is at in the form
+ *
+ * destroying and resetting the captcha value dis-allows someone from
+ * re-sending a form on a previous captcha.
+ *
+ * @return string form HTML state
+ * @access public
+ */
+ public function toHtml()
+ {
+ $this->setupRenderers();
+ if ($this->validate()) {
+ $this->cleanForm();
+ if ($this->process(array(&$this, 'processData'), $this->mergeFiles)) {
+ $this->freeze();
+ $output = $this->successMsg;
+ header("Location: list_contact.phtml?back=1&start="
+ . $this->start . "&Action=" . $this->Action);
+ exit;
+ }
+ } elseif ($this->isSubmitted()) {
+ $output = $this->errorMsg;
+ $output .= parent::toHTML();
+ } else {
+ $output = parent::toHTML();
+ }
+ return $output;
+ }
+
+ // }}}
+
+}
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * File Doc Comment
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: ContactUs.php,v 1.36 2010/07/14 23:33:15 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Error codes for Toolkit_Contacts_ContactUs
+ *
+ * Codes are mapped to textual messaged by errorMessage() method,
+ * if you add a new code be sure to add a new message for it to errorMessage()
+ *
+ * @see Toolkit_Contacts_ContactUs::errorMessage()
+ */
+define('FORM_OK', 1);
+define('FORM_ERROR', -1);
+define('NO_RECORD', -2);
+define('INVALID_DB', -3);
+define('MISSING_CONSTANT', -4);
+define('MISSING_CONTACT_TYPE', -5);
+
+/**
+ * GLM Contact Us form
+ *
+ * This form handles rendering and processing the contact us form.
+ * Controls the email functionality of the form, whether the client
+ * has a contact DB to store contact records and how to insert/update
+ * submitted form values.
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ * @see Toolkit_FormBuilder
+ */
+class Toolkit_Contacts_ContactUs
+ extends Toolkit_FormBuilder implements Toolkit_Form
+{
+
+ /**
+ * Table in Database which holds the contact data
+ *
+ * @var string
+ * @access public
+ */
+ public $tableName = 'contact';
+
+ /**
+ * Table meta data
+ *
+ * This is used when inserting/updating data for the records
+ * so the PDO's can use explicit data types for the parameters.
+ *
+ * @var array
+ * @access public
+ */
+ public $tableMetaData = array();
+
+ /**
+ * Contact type to be inserted into the DB as when the form is submitted
+ *
+ * This property is only valid when the [hasContactDB] property is set
+ * to true.
+ *
+ * N.B.
+ * If you subclass this class out to other forms that are
+ * inserted into the contact db, be sure to make each one of their
+ * contactType properties unique. We don't check for duplicates.
+ *
+ * @var string
+ * @access protected
+ */
+ protected $contactType = '1';
+ /**
+ * which groups to use on form if empty will grab all groups
+ */
+ protected $contactInqGroups = array();
+
+ /**
+ * Who to send the email to when the contact form is submitted
+ *
+ * If you leave this blank, its value will get set to the OWNER_EMAIL
+ * in the constructor.
+ *
+ * If you ***DO NOT*** want any emails to go out when the form is submitted
+ * then set the value to false. Do not set it to 0 for false, because the
+ * check uses a strict type check to determine if the value is actually
+ * false. This is what allows for the empty value as an option, which sets
+ * the value to OWNER_EMAIL and won't override the $email property if
+ * this class gets subclassed and the value for this property gets set in
+ * the properties of the subclass and not in the constructor after this
+ * constructor function is called.
+ *
+ * tongue twister...I know.
+ * <code>
+ * protected $email = false;
+ * </code>
+ *
+ * @var string
+ * @access protected
+ */
+ protected $email;
+
+ /**
+ * From header in the owner email
+ *
+ * This just sets the From header in the owner email
+ * SITENAME <from@email.com>
+ *
+ * It gets set to the constant SITENAME in the constructor if you leave
+ * empty here, but you can set it to something different here to override
+ * that if you desire.
+ *
+ * @var string
+ * @access protected
+ */
+ protected $siteName;
+
+ /**
+ * Email subject and <h1> header in email
+ *
+ * It gets set in the constructor if you leave empty here, but you
+ * can set it to something different here to override that if you desire.
+ *
+ * @var string
+ * @access protected
+ */
+ public $subject;
+
+ /**
+ * Whether the site has a contact DB to store contact records
+ *
+ * If this value is set to false, an email will still be sent to the
+ * addressed specified in the email property.
+ *
+ * @var boolean
+ * @access protected
+ */
+ protected $hasContactDB = true;
+
+ /**
+ * The interests from the contact db
+ *
+ * @var array
+ * @access protected
+ */
+ protected $inquiries = array();
+
+ /**
+ * Message to display if the form is successfully submitted
+ *
+ * @var string
+ * @access protected
+ */
+ protected $successMsg = '
+ <style type="text/css">
+ #category {display:none;}
+ .listing {display:none;}
+ </style>
+ <div id="form-success-top">
+ Thank you for your questions or comments!
+ </div>';
+
+ /**
+ * Extra rules for processesing
+ *
+ * This registers the Zip validation rules (and any others listed) for
+ * QuickForm.
+ *
+ * Zip validation checks both US and Canadian Zip codes
+ *
+ * @var array
+ * @access protected
+ * @see app.gaslightmedia.com/glmPEAR/HTML/QuickForm/Rules/Zip.php
+ */
+ protected $registeredRules = array(
+ 'zip',
+ 'phone',
+ array(
+ 'checkEmail',
+ 'callback',
+ 'email',
+ 'Validate'
+ ),
+ );
+
+ /**
+ * Options for flexy templating engine
+ *
+ * Pulls the preset options from the setup.phtml file
+ * overwrites the templateDir and compileDir to match this classes needs
+ *
+ * @var array
+ * @access protected
+ */
+ protected $flexyOptions;
+
+ /**
+ * FormTemplate to use
+ *
+ * @var string
+ */
+ public $formTemplate = 'contactForm.html';
+
+ /**
+ * Class constructor
+ *
+ * @param object $pdo PHP Data Object
+ * @param string $formName Form's name.
+ * @param string $method (optional)Form's method defaults to 'POST'
+ * @param string $action (optional)Form's action
+ * @param string $target (optional)Form's target defaults to '_self'
+ * @param mixed $attributes (optional)Extra attributes for <form> tag
+ * @param bool $trackSubmit (optional)Whether to track if the form was
+ * submitted by adding a special hidden field
+ *
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @access public
+ * @link http://pear.php.net/package/HTML_QuickForm/docs/latest/HTML_QuickForm/HTML_QuickForm.html
+ * @see HTML_QuickForm
+ */
+ public function __construct(
+ PDO $pdo,
+ $formName,
+ $method = 'post',
+ $action = '',
+ $target = '',
+ $attributes = null,
+ $trackSubmit = false
+ ) {
+ // Make sure these end cases are never met.
+ // These are more for the development phase.
+ if ($this->email === false && $this->hasContactDB === false) {
+ PEAR::raiseError(
+ null,
+ NO_RECORD,
+ PEAR_ERROR_CALLBACK,
+ array(&$this, 'error')
+ );
+ }
+ if (!is_bool($this->hasContactDB)) {
+ PEAR::raiseError(
+ null,
+ INVALID_DB,
+ PEAR_ERROR_CALLBACK,
+ array(&$this, 'error')
+ );
+ }
+ // we haven't defined the FROM_NEWS_EMAIL constant and
+ // the email will default to relying on it.
+ if ( !defined('FROM_NEWS_EMAIL')
+ && (empty($this->email) && $this->email !== false)
+ ) {
+ PEAR::raiseError(
+ 'You need to define the FROM_NEWS_EMAIL
+ constant for this form to work correctly',
+ MISSING_CONSTANT,
+ PEAR_ERROR_CALLBACK,
+ array(&$this, 'error')
+ );
+ }
+ if (!is_numeric($this->contactType) && $this->hasContactDB) {
+ PEAR::raiseError(
+ null,
+ MISSING_CONTACT_TYPE,
+ PEAR_ERROR_CALLBACK,
+ array(&$this, 'error')
+ );
+ }
+ parent::__construct(
+ $formName,
+ $method,
+ $action,
+ $target,
+ $attributes,
+ $trackSubmit
+ );
+
+ $this->dbh = $pdo;
+
+ $conf = new Config;
+ $c =& $conf->parseConfig(
+ BASE . 'Toolkit/Contacts/config.ini',
+ 'IniFile'
+ );
+ $table = $c->getItem('section', 'conf')
+ ->getItem('directive', 'table')
+ ->getContent();
+ $this->tableName = $table;
+
+ // Default Renderer Form templates for QuickForm in respect to this
+ // classes needs.
+ if ($this->email !== false && empty($this->email)) {
+ // Set to false to turn off email function.
+ $this->email = CONTACT_EMAIL;
+ }
+ if (empty($this->siteName)) {
+ $this->siteName = SITENAME;
+ }
+ if (empty($this->subject)) {
+ $this->subject = 'Contact Request from website ' . SITENAME;
+ }
+
+ /**
+ * Where are the flexy templates stored at for this class.
+ */
+ define('TEMPLATES_DIR', BASE . 'Toolkit/Contacts/templates');
+
+ /**
+ * Where are the compiled flexy templates stored at for this class.
+ */
+ define('COMPILED_DIR', BASE . 'Toolkit/Contacts/templates/compiled');
+ $oldUmask = umask(0);
+ if (!is_dir(TEMPLATES_DIR)) {
+ mkdir(TEMPLATES_DIR, 0770, true);
+ }
+ if (!is_dir(COMPILED_DIR)) {
+ mkdir(COMPILED_DIR, 0770, true);
+ }
+ umask($oldUmask);
+
+ $this->flexyOptions = $GLOBALS['flexyOptions'];
+ $this->flexyOptions['templateDir'] = TEMPLATES_DIR;
+ $this->flexyOptions['compileDir'] = COMPILED_DIR;
+
+ $var = basename(__FILE__, '.php');
+
+ $callbackUrl = ($_SERVER['HTTPS'] == 'on') ?
+ BASE_SECURE_URL : MEDIA_BASE_URL;
+
+ $this->captchaOptions = array(
+ 'width' => 100,
+ 'height' => 50,
+ 'callback' => "{$callbackUrl}Toolkit/qfcaptcha.php?var=$var",
+ 'sessionVar' => $var,
+ 'imageOptions' => array(
+ 'font_size' => 20,
+ 'font_path' => GLM_APP_BASE . 'glmPEAR/Image/Canvas/Fonts/',
+ 'font_file' => 'times.ttf',
+ 'background_color' => '#cccccc',
+ 'obfuscation' => false,
+ 'angle' => true,
+ ),
+ );
+ $this->useCaptcha(true);
+ }
+
+ /**
+ * Constant variables for the form
+ *
+ * These values won't get overridden by POST or GET vars
+ *
+ * @return void
+ * @access public
+ */
+ public function configureConstants()
+ {
+ $constants = array(
+ 'user_agent' => $_SERVER['HTTP_USER_AGENT'],
+ 'remote_addr' => $_SERVER['REMOTE_ADDR'],
+ );
+ $this->setupConstants($constants);
+ }
+
+ /**
+ * Initializes default form values
+ *
+ * @return void
+ * @access public
+ */
+ public function configureDefaults()
+ {
+ $defaults = array(
+ 'state' => '',
+ 'mail_ok' => 1
+ );
+ if (defined("MEMBERS_DB") && MEMBERS_DB) {
+ $defaults['members'] = 1;
+ }
+
+ $this->setupDefaults($defaults);
+ }
+
+ /**
+ * Form element definitions
+ *
+ * @return void
+ * @access public
+ */
+ public function configureElements()
+ {
+ $e = array();
+ if ($this->hasContactDB) {
+ $this->setInterestFields();
+ // Grouped Elements are defined here.
+ $this->interestsGroups =& $this->getInterestFields();
+ }
+
+ // All Elements are created here. This includes group element definitions.
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'user_agent'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'remote_addr'
+ );
+ $e[] = array(
+ 'type' => 'header',
+ 'name' => 'firstHdr_rmv',
+ 'display' => ''
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'fname',
+ 'display' => 'First Name'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'lname',
+ 'display' => 'Last Name'
+ );
+ if ($this->tableName == 'customer') {
+ $add1 = 'add1';
+ $add2 = 'add2';
+ } else {
+ $add1 = 'address';
+ $add2 = 'address2';
+ }
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => $add1,
+ 'display' => 'Address 1'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => $add2,
+ 'display' => 'Address 2'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'city',
+ 'display' => 'City'
+ );
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => false,
+ 'name' => 'state',
+ 'display' => 'State/Province',
+ 'opts' => $GLOBALS['states']
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'zip',
+ 'display' => 'ZIP/Postal Code'
+ );
+ $e[] = array(
+ 'type' => 'email',
+ 'req' => true,
+ 'name' => 'email',
+ 'display' => 'Email'
+ );
+ $e[] = array(
+ 'type' => 'email',
+ 'req' => true,
+ 'name' => 'email_rmv',
+ 'display' => 'Verify Email'
+ );
+ $e[] = array(
+ 'type' => 'tel',
+ 'req' => false,
+ 'name' => 'phone',
+ 'display' => 'Phone'
+ );
+ $e[] = array(
+ 'type' => 'tel',
+ 'req' => false,
+ 'name' => 'fax',
+ 'display' => 'Fax'
+ );
+ $e[] = array(
+ 'type' => 'textarea',
+ 'req' => false,
+ 'name' => 'comments',
+ 'display' => 'Comments'
+ );
+ if ($this->hasContactDB) {
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'mail_ok',
+ 'display' => '',
+ 'opts' => 'Yes, I would like to receive Email Newsletters',
+ 'val' => array(0, 1)
+ );
+ if (defined("MEMBERS_DB") && MEMBERS_DB) {
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'members',
+ 'display' => '',
+ 'opts' => 'Yes, I would like to receive information via e-mail from '.SITENAME.' Members',
+ 'val' => array(0, 1)
+ );
+ }
+ }
+ if (is_array($this->interestsGroups)) {
+ foreach ($this->interestsGroups as $group => $gData) {
+ $this->myGroups[] = $gData;
+ $e[] = array(
+ 'type' => 'group',
+ 'req' => false,
+ 'name' => 'interest['.$group.']',
+ 'group' => $gData,
+ 'label' => $group,
+ 'seperator' => ' ',
+ 'appendName' => true
+ );
+ }
+ }
+ $e[] = array(
+ 'type' => 'CAPTCHA_Image',
+ 'req' => false,
+ 'name' => 'captcha_question',
+ 'display' => 'Verification code',
+ 'opts' => $this->captchaOptions
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'captcha_rmv',
+ 'display' => 'Enter verification code'
+ );
+ $e[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'submit_rmv',
+ 'display' => 'Submit Form'
+ );
+
+ $this->setupElements($e);
+ }
+
+ /**
+ * Form rule definitions
+ *
+ * Adds validation rules for the given fields
+ *
+ * @return void
+ * @access public
+ */
+ public function configureRules()
+ {
+ $r = array();
+ // Form Rules
+ $r[] = array(
+ 'element' => array('email', 'email_rmv'),
+ 'message' => 'ERROR: Your Email Addresses Do Not Match!',
+ 'type' => 'compare',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'email',
+ 'message' => 'ERROR: Invalid Email Format!',
+ 'type' => 'checkEmail',
+ 'format' => array('use_rfc822' => true),
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ /*
+ $r[] = array(
+ 'element' => 'state',
+ 'message' => 'ERROR: Invalid State!',
+ 'type' => 'numeric',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ */
+ $r[] = array(
+ 'element' => 'phone',
+ 'message' => 'ERROR: Invalid number (xxx) xxx-xxxx!',
+ 'type' => 'phone',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'fax',
+ 'message' => 'ERROR: Invalid number (xxx) xxx-xxxx!',
+ 'type' => 'phone',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ /*
+ $r[] = array(
+ 'element' => 'zip',
+ 'message' => 'ERROR: Invalid Zip!',
+ 'type' => 'zip',
+ 'format' => array('requireDBCheck' => false),
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ */
+ $r[] = array(
+ 'element' => 'mail_ok',
+ 'message' => 'ERROR: Invalid Value!',
+ 'type' => 'numeric',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'captcha_rmv',
+ 'message' => 'ERROR: Incorrect verification code!',
+ 'type' => 'CAPTCHA',
+ 'format' => $this->captchaQuestion,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+
+ $this->setupRules($r);
+ }
+
+ /**
+ * Form filter definitions
+ *
+ * Applies a data filter for the given fields when the form is submitted
+ *
+ * @return void
+ * @access public
+ */
+ public function configureFilters()
+ {
+ $f = array();
+
+ $f[] = array(
+ 'element' => '__ALL__',
+ 'filter' => 'trim'
+ );
+
+ $this->setupFilters($f);
+ }
+
+ /**
+ * Helper function, configures the entire form
+ *
+ * @return void
+ * @access public
+ */
+ public function configureForm()
+ {
+ $this->configureElements();
+ $this->configureFilters();
+ $this->configureRules();
+ $this->configureDefaults();
+ $this->configureConstants();
+ }
+
+ /**
+ * Checks for a duplicate email address already in the DB.
+ *
+ * @param string $email The email address to check for in the DB
+ *
+ * @return boolean If the email address already exists
+ * @access protected
+ */
+ protected function contactExists($email)
+ {
+ // Check if a contact w/ the submitted email already exists.
+ // if so, then we need to update, if not then do a fresh insert.
+ try {
+ $sql = "
+ SELECT count(*) AS count
+ FROM {$this->tableName}
+ WHERE email = :email";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':email', $email, PDO::PARAM_STR);
+ $stmt->execute();
+ $stmt->bindColumn('count', $contactExists);
+ $stmt->fetch();
+
+ return (bool) $contactExists;
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ /**
+ * Check for a contact or customer with given email address if found
+ * it returns the contact or customer id
+ *
+ * @param type $email Matching email for contact or customer
+ *
+ * @return integer
+ */
+ protected function getContactIdByEmail($email)
+ {
+ try {
+ $id = ($this->tableName == 'contact')
+ ? 'id'
+ : 'cust_id';
+ $sql = "
+ SELECT {$id}
+ FROM {$this->tableName}
+ WHERE email = :email";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':email', $email, PDO::PARAM_STR);
+ $stmt->execute();
+ return $stmt->fetchColumn();
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ /**
+ * Emails the owner the submitted data from the submitted form
+ *
+ * Uses a flexy template to render a nice looking html email.
+ * Fills in the supplied data from the form and doesn't add the
+ * empty fields the user didn't fill in.
+ *
+ * @param string $mailFactory What type of mail factory should we use
+ *
+ * @return boolean result of the mailing
+ * @access protected
+ */
+ protected function emailOwner($mailFactory = 'mail')
+ {
+ if (!$this->email) {
+ return;
+ }
+
+ $template = new HTML_Template_Flexy($this->flexyOptions);
+ $page = new stdClass();
+ // for comments textarea need to replace newlines with br
+ $this->formData['comments']['element']
+ = nl2br($this->getSubmitValue('comments'));
+
+ $userEmail = $this->getSubmitValue('email');
+ $page->email_from = GLM_TOOLBOX::valid_email(($userEmail))
+ ? $userEmail
+ : OWNER_EMAIL;
+ $page->subject = $this->subject;
+ $page->client_info = $this->clientInfo;
+ $page->fname = $this->getSubmitValue('fname');
+ $page->lname = $this->getSubmitValue('lname');
+ $page->formData = $this->formData;
+
+ if ( isset($this->newInterest)
+ && is_array($this->newInterest)
+ && !empty($this->newInterest)
+ ) {
+ // Clean up the interests so they will look nice in the email
+ $page->formData['interest']['nowrap'] = 'nowrap';
+ $page->formData['interest']['element'] = null;
+
+ foreach ($this->newInterest as $group => $elements) {
+ $page->formData['interest['.$group.']']['label'] = $group;
+ foreach ($elements as $e => $vale) {
+ $interest[] = $this->inquiries[$group][$e];
+ }
+ $page->formData['interest['.$group.']']['element']
+ = implode("<br>", $interest);
+ unset($interest);
+ }
+ }
+
+ if ($this->elementExists('mail_ok')) {
+ // Clean up the mail_ok flag so its human readable
+ $page->formData['mail_ok']['label'] = 'Emails';
+ $page->formData['mail_ok']['element']
+ = ($page->formData['mail_ok']['element']) ? 'Yes' : 'No';
+ }
+
+ if (defined("MEMBERS_DB") && MEMBERS_DB) {
+ if ($this->elementExists('members')) {
+ // Clean up the mail_ok flag so its human readable
+ $page->formData['members']['label'] = 'Members';
+ $page->formData['members']['element']
+ = ($page->formData['members']['element']) ? 'Yes' : 'No';
+ }
+ }
+
+ $template->compile('emailOwner.tpl');
+ $htmlMsg = $template->bufferedOutputObject($page);
+
+ if ($hasInterestField) {
+ // Text version can't have HTML in it
+ // so reset the interests to use commas
+ $page->formData['interest']['element'] = implode(", ", $interests);
+ }
+ $msg = "{$page->subject}\n\n";
+ $msg .= "From {$page->fname} {$page->lname}\n\n";
+ $msg .= "Information\n\n";
+ foreach ($page->formData as $i) {
+ $msg .= "{$i['label']}: {$i['element']}\n";
+ }
+
+ $mimeMail = new Mail_mime("\n");
+ $fromName = preg_replace(
+ '/[^A-Z ]/i', '',
+ $page->fname.' '.$page->lname
+ );
+ $mimeMail->setFrom("{$fromName} <{$page->email_from}>");
+ $mimeMail->setSubject($this->subject);
+ $mimeMail->setHTMLBody($htmlMsg);
+ $mimeMail->setTXTBody($msg);
+
+ $mail =& Mail::factory($mailFactory);
+ $body = $mimeMail->get();
+ $setHeader['Reply-To'] = sprintf(
+ '%1$s %2$s <%3$s>',
+ trim($this->getSubmitValue('fname'), "\r"),
+ trim($this->getSubmitValue('lname'), "\r"),
+ trim($this->getSubmitValue('email'), "\r")
+ );
+
+ $headers = $mimeMail->headers($setHeader);
+
+ $res = $mail->send($this->email, $headers, $body);
+ if (PEAR::isError($res)) {
+ return Toolkit_Common::handleError($res);
+ } else {
+ return $res;
+ }
+ }
+
+ /**
+ * Display errors with the form to the user
+ *
+ * @param object $error PEAR Error Object
+ *
+ * @return void
+ * @access public
+ */
+ public function error($error)
+ {
+ // make the variables static so that is only has to do the defining
+ // on the first call.
+ static $errorMessages;
+ static $className;
+
+ // define the various error messages
+ if (!isset($errorMessages)) {
+ $className = get_class($this);
+ $errorMessages = array(
+ FORM_OK => 'No error',
+ FORM_ERROR => 'Unknown error',
+ NO_RECORD => 'Setting both properties (email and hasContactDB) to false in the <i>' . $className . '</i> class will result in no email record being sent and no record being inserted into the database. There will be no record that this form was ever filled out.',
+ INVALID_DB => 'Please set the property hasContactDB to a boolean value in the class <i>' . $className . '</i> before continuing',
+ MISSING_CONSTANT => 'You have failed to set a CONSTANT for the class <i>' . $className . '</i> to function properly',
+ MISSING_CONTACT_TYPE => 'Please set the property contactType in the class <i>'. $className . '</i> before continuing',);
+ }
+
+ if (!is_null($error->message)) {
+ $message = $error->message;
+ } elseif (isset($errorMessages[$error->code])) {
+ $message = $errorMessages[$error->code];
+ } else {
+ $message = $errorMessages[$error->code];
+ $message = $errorMessages[FORM_ERROR];
+ }
+
+ echo "<div id=\"form-warning-top\">{$message}</div>";
+ }
+
+ /**
+ * Returns the field definitions of the contact db interest fields
+ *
+ * @return array Group definitions for the interest fields
+ * @access protected
+ */
+ protected function getInterestFields()
+ {
+ if (is_array($this->inquiries)) {
+ foreach ($this->inquiries as $group => $data) {
+ foreach ($data as $k => $v) {
+ $interests[$group][] = array('type' => 'checkbox',
+ 'req' => false,
+ 'name' => $k,
+ 'opts' => $v);
+ }
+ }
+ }
+
+ return $interests;
+ }
+
+ /**
+ * Handles how to process the form when submitted
+ *
+ * @param array $values Form submitted values
+ *
+ * @return array Result of Insert / Update function
+ * @access protected
+ */
+ public function processData($values)
+ {
+ unset($values['catid']);
+ // Form data used for the insert/update sql queries and
+ // the form email.
+ $e = array(
+ 'user_agent',
+ 'remote_addr',
+ 'contact_type',
+ );
+ $this->setFormData($e);
+
+
+ // If no contact db, return true so we can send owner email.
+ if (!$this->hasContactDB) {
+ return true;
+ }
+
+ // Get rid of any elements in the values array that
+ // aren't going to be used when inserting/updating the db.
+ $values = Toolkit_Common::cleanArray($values);
+
+ // Check if we are updating an existing contact or not
+ // question: is this the best approach? what if someone else
+ // sends a form through w/ different data but the same emil addy
+ // the old users data can be completely wiped out.
+ $existingContact = $this->contactExists($values['email']);
+ // setup newInterest aray with the interest values
+ // because their grouped can't be found with getElement('interest')
+ $this->newInterest = $values['interest'];
+ // update create_date for this contact
+ $values['create_date'] = date('m/d/Y');
+
+ // set up interest field values
+ if (is_array($values['interest']) && !empty($values['interest'])) {
+ foreach ($values['interest'] as $iGroup => $interests) {
+ $newInterest[] = implode(':', array_keys($interests));
+ }
+ if (is_array($newInterest)) {
+ $values['interest'] = ':' . implode(':', $newInterest) . ':';
+ }
+ }
+ if ($existingContact) {
+ $contactId = $this->getContactIdByEmail($values['email']);
+ $cType = $this->_getExistingContactTypes($contactId);
+ $idFieldName
+ = ($this->tableName == 'contact')
+ ? 'id'
+ : 'cust_id';
+ $values[$idFieldName] = $contactId;
+ $existingTypes
+ = (is_array($cType))
+ ? explode(':', $cType)
+ : array();
+ if (!in_array($this->contactType, $existingTypes)) {
+ $values['contact_type'] = "$cType{$this->contactType}:";
+ } else {
+ $values['contact_type'] = ":".implode(':', array_filter($existingTypes)).":";
+ }
+ } else {
+ $values['contact_type'] = ":{$this->contactType}:";
+ }
+ // build a contact or customer class object with the values from
+ // the Contact form
+ if ($this->tableName == 'contact') {
+ $contact = Toolkit_LeadManager_Contact::createByValues($values);
+ } else {
+ $contact = Toolkit_LeadManager_Customer::createByValues($values);
+ }
+ if ($contact->getMailOk()) {
+ if ( defined('STREAMSEND_FORMS_API')
+ && STREAMSEND_FORMS_API) {
+ $contact->attach(new Toolkit_LeadManager_StreamSend());
+ }
+ if ( defined('CONSTANT_CONTACT')
+ && CONSTANT_CONTACT) {
+ $contact->attach(new Toolkit_LeadManager_ConstantContact());
+ }
+ }
+ $contact->save($this->dbh, false);
+ return true;
+ }
+
+ /**
+ * Contact DB interests
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setInterestFields()
+ {
+ try {
+ $groupWhere
+ = (!empty($this->contactInqGroups))
+ ? "WHERE contact_inq.groupid IN (".implode(',',$this->contactInqGroups).")"
+ : "";
+ $sql = "
+ SELECT contact_inq.*, inq_group.name
+ FROM contact_inq
+ LEFT OUTER JOIN inq_group
+ ON (contact_inq.groupid = inq_group.id)
+ $groupWhere
+ ORDER BY inq_group.name, contact_inq.pos";
+
+ $i = array();
+ foreach ($this->dbh->query($sql) as $row) {
+ $i[$row['name']][$row['id']] = $row['header'];
+ }
+
+ $this->inquiries = $i;
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ // @codeCoverageIgnoreStart
+
+ /**
+ * Custom rendering templates for special fields on the form
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupRenderers()
+ {
+ $formConfig = new Zend_Config_Ini(
+ BASE . 'Toolkit/Contacts/application.ini',
+ strtolower($_ENV['GLM_HOST_ID'])
+ );
+
+ $renderer = new HTML_QuickForm_Renderer_Object(true);
+ $this->accept($renderer);
+ $this->template = new HTML_Template_Flexy(
+ $formConfig->flexyOptions->toArray()
+ );
+
+ $this->view = $this;
+ $this->view->form = $renderer->toObject();
+ $this->template->compile($this->formTemplate);
+ }
+
+ // @codeCoverageIgnoreEnd
+
+ /**
+ * Handles how to display the current step the user is at in the form
+ *
+ * destroying and resetting the captcha value dis-allows someone from
+ * re-sending a form on a previous captcha.
+ *
+ * @return string form HTML state
+ * @access public
+ */
+ public function toHtml()
+ {
+ if ($this->validate()) {
+ $this->captchaQuestion->destroy();
+ $this->cleanForm();
+ $this->setupRenderers();
+ if ($this->process(array(&$this, 'processData'), $this->mergeFiles)) {
+ $this->freeze();
+ $this->emailOwner();
+ $output = $this->successMsg;
+ }
+ $this->sent = true;
+ } elseif ($this->isSubmitted()) {
+ $this->captchaQuestion->destroy();
+ $this->captchaAnswer->setValue('');
+ $this->setupRenderers();
+ $output = $this->errorMsg;
+ $output .= $this->template->bufferedOutputObject($this->view);
+ } else {
+ $this->captchaQuestion->destroy();
+ $this->captchaAnswer->setValue('');
+ $this->setupRenderers();
+ $output .= $this->template->bufferedOutputObject($this->view);
+ }
+ return $output;
+ }
+
+ /**
+ * Return the existing contact/customer contact_type
+ *
+ * @param type $contactId id of cust/contact
+ *
+ * @return type
+ */
+ protected function _getExistingContactTypes($contactId)
+ {
+ try {
+ $idField
+ = ($this->tableName == 'contact')
+ ? 'id'
+ : 'cust_id';
+ $sql = "
+ SELECT contact_type
+ FROM {$this->tableName}
+ WHERE {$idField} = :id";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $contactId, PDO::PARAM_STR);
+ $stmt->execute();
+ return $stmt->fetchColumn();
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+}
+
--- /dev/null
+CREATE SCHEMA contacts;
+GRANT ALL ON SCHEMA contacts TO nobody;
+
+--
+-- Tables
+--
+\i ./tables/contact.sql
+\i ./tables/contact_inq.sql
+\i ./tables/inq_group.sql
+\i ./tables/query_db.sql
+\i ./tables/news_response.sql
+
+--
+-- Procedures
+--
--- /dev/null
+--
+-- This will drop everything in the contacts schema.
+-- Nothin better be in here except contact related object
+-- or it will be dropp
+--
+-- The force is strong w/ this one, use it wisely.
+--
+DROP SCHEMA IF EXISTS contacts CASCADE;
--- /dev/null
+DROP TABLE IF EXISTS contacts.contact CASCADE;
+
+CREATE TABLE contacts.contact
+(id SERIAL,
+ create_date DATE DEFAULT CURRENT_DATE,
+ fname text,
+ lname text,
+ company text,
+ address text,
+ address2 text,
+ city text,
+ state text,
+ zip text,
+ country text,
+ phone text,
+ fax text,
+ email text,
+ user_agent text,
+ remote_addr text,
+ interest text,
+ mail_ok BOOLEAN DEFAULT FALSE,
+ visitorguide BOOLEAN DEFAULT FALSE,
+ uidpdf text,
+ visitorguide_download BOOLEAN DEFAULT FALSE,
+ email_verified BOOLEAN DEFAULT true,
+ contact_type text,
+ discover text,
+ member_ok BOOLEAN DEFAULT FALSE,
+ staff BOOLEAN DEFAULT FALSE,
+ comments text,
+ password text,
+ verify_password text,
+ gift_cert BOOLEAN DEFAULT FALSE,
+ members BOOLEAN DEFAULT FALSE,
+ PRIMARY KEY (id));
+
+CREATE INDEX contact_create_date_indx ON contacts.contact USING btree(create_date);
+CREATE INDEX contact_email_indx ON contacts.contact USING btree(email);
+CREATE INDEX contact_fname_indx ON contacts.contact USING btree(fname);
+CREATE INDEX contact_lname_indx ON contacts.contact USING btree(lname);
+CREATE UNIQUE INDEX news_response_id_indx ON contacts.contact USING btree(id);
+CREATE UNIQUE INDEX query_db_id_indx ON contacts.contact USING btree(id);
+
+GRANT ALL ON contacts.contact_id_seq TO nobody;
+GRANT ALL ON contacts.contact TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS contacts.contact_inq CASCADE;
+
+CREATE TABLE contacts.contact_inq
+(id SERIAL,
+ header text,
+ pos integer,
+ description text,
+ image text,
+ groupid integer,
+ PRIMARY KEY (id));
+
+GRANT ALL ON contacts.contact_inq_id_seq TO nobody;
+GRANT ALL ON contacts.contact_inq TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS contacts.inq_group CASCADE;
+
+CREATE TABLE contacts.inq_group
+(id SERIAL,
+ name text,
+ PRIMARY KEY (id));
+
+GRANT ALL ON contacts.inq_group_id_seq TO nobody;
+GRANT ALL ON contacts.inq_group TO nobody;
+
+INSERT INTO contacts.inq_group (name) VALUES ('Interests');
\ No newline at end of file
--- /dev/null
+DROP TABLE IF EXISTS contacts.news_response;
+
+CREATE TABLE contacts.news_response
+(id SERIAL,
+ subject TEXT,
+ response TEXT,
+ image TEXT,
+ image2 TEXT,
+ image3 TEXT,
+ image_align TEXT,
+ image2_align TEXT,
+ image3_align TEXT,
+ mailout DATE DEFAULT CURRENT_DATE,
+ last_update DATE DEFAULT CURRENT_DATE,
+ PRIMARY KEY (id));
+
+GRANT ALL ON contacts.news_response_id_seq TO nobody;
+GRANT ALL ON contacts.news_response TO nobody;
+
+INSERT INTO contacts.news_response (subject, response) VALUES ('subject', 'response');
--- /dev/null
+DROP TABLE IF EXISTS contacts.query_db;
+
+CREATE TABLE contacts.query_db
+(id SERIAL,
+ query_name TEXT,
+ query TEXT,
+ file TEXT,
+ delimiter text,
+ PRIMARY KEY (id));
+
+GRANT ALL ON contacts.query_db_id_seq TO nobody;
+GRANT ALL ON contacts.query_db TO nobody;
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * File Doc Comment
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: ContactUs.php,v 1.36 2010/07/14 23:33:15 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Error codes for Toolkit_Contacts_ContactUs
+ *
+ * Codes are mapped to textual messaged by errorMessage() method,
+ * if you add a new code be sure to add a new message for it to errorMessage()
+ *
+ * @see Toolkit_Contacts_ContactUs::errorMessage()
+ */
+
+/**
+ * GLM Contact Us form
+ *
+ * This form handles rendering and processing the contact us form.
+ * Controls the email functionality of the form, whether the client
+ * has a contact DB to store contact records and how to insert/update
+ * submitted form values.
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ * @see Toolkit_FormBuilder
+ */
+class Toolkit_Contacts_ENewsSignup
+ extends Toolkit_Contacts_ContactUs
+{
+ /**
+ * Contact type to be inserted into the DB as when the form is submitted
+ *
+ * This property is only valid when the [hasContactDB] property is set
+ * to true.
+ *
+ * N.B.
+ * If you subclass this class out to other forms that are
+ * inserted into the contact db, be sure to make each one of their
+ * contactType properties unique. We don't check for duplicates.
+ *
+ * @var string
+ * @access protected
+ */
+ protected $contactType = '2';
+ /**
+ * Email subject and <h1> header in email
+ *
+ * It gets set in the constructor if you leave empty here, but you
+ * can set it to something different here to override that if you desire.
+ *
+ * @var string
+ * @access protected
+ */
+ public $subject = "ENews Signup Form from website";
+ /**
+ * Message to display if the form is successfully submitted
+ *
+ * @var string
+ * @access protected
+ */
+ protected $successMsg = '
+ <style type="text/css">
+ #category {display:none;}
+ .listing {display:none;}
+ </style>
+ <div id="form-success-top">
+ Thank you for requesting the ENewsetter.
+ </div>';
+ // {{{ configureConstats()
+
+ /**
+ * Class constructor
+ *
+ * @param object $pdo PHP Data Object
+ * @param string $formName Form's name.
+ * @param string $method (optional)Form's method defaults to 'POST'
+ * @param string $action (optional)Form's action
+ * @param string $target (optional)Form's target defaults to '_self'
+ * @param mixed $attributes (optional)Extra attributes for <form> tag
+ * @param bool $trackSubmit (optional)Whether to track if the form was
+ * submitted by adding a special hidden field
+ *
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @access public
+ * @link http://pear.php.net/package/HTML_QuickForm/docs/latest/HTML_QuickForm/HTML_QuickForm.html
+ * @see HTML_QuickForm
+ */
+ public function __construct(
+ PDO $pdo,
+ $formName,
+ $method = 'post',
+ $action = '',
+ $target = '',
+ $attributes = null,
+ $trackSubmit = false
+ ) {
+ parent::__construct(
+ $pdo,
+ $formName,
+ $method,
+ $action,
+ $target,
+ $attributes,
+ $trackSubmit
+ );
+ $this->email = ENEWS_EMAIL;
+ }
+
+ /**
+ * Constant variables for the form
+ *
+ * These values won't get overridden by POST or GET vars
+ *
+ * @return void
+ * @access public
+ */
+ public function configureConstants()
+ {
+ $constants = array(
+ 'user_agent' => $_SERVER['HTTP_USER_AGENT'],
+ 'remote_addr' => $_SERVER['REMOTE_ADDR'],
+ 'mail_ok' => 1
+ );
+ $this->setupConstants($constants);
+ }
+
+ // }}}
+ // {{{ configureElements()
+
+ /**
+ * Form element definitions
+ *
+ * @return void
+ * @access public
+ */
+ public function configureElements()
+ {
+ $e = array();
+ if ($this->hasContactDB) {
+ $this->setInterestFields();
+ // Grouped Elements are defined here.
+ $this->interestsGroups =& $this->getInterestFields();
+ }
+
+ // All Elements are created here. This includes group element definitions.
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'user_agent'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'remote_addr'
+ );
+ $e[] = array(
+ 'type' => 'header',
+ 'name' => 'firstHdr_rmv',
+ 'display' => ''
+ );
+ $e[] = array(
+ 'type' => 'email',
+ 'req' => true,
+ 'name' => 'email',
+ 'display' => 'Email'
+ );
+ $e[] = array(
+ 'type' => 'email',
+ 'req' => true,
+ 'name' => 'email_rmv',
+ 'display' => 'Verify Email'
+ );
+ if ($this->hasContactDB) {
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'mail_ok',
+ );
+ }
+ $e[] = array(
+ 'type' => 'CAPTCHA_Image',
+ 'req' => false,
+ 'name' => 'captcha_question',
+ 'display' => 'Verification code',
+ 'opts' => $this->captchaOptions
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'captcha_rmv',
+ 'display' => 'Enter verification code'
+ );
+ $e[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'submit_rmv',
+ 'display' => 'Submit Form'
+ );
+
+ $this->setupElements($e);
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * File Doc Comment
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+
+/**
+ * Ask the concierge form
+ *
+ * This form handles rendering and processing the contact form.
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id:
+ * @link <>
+ * @see Toolkit_FormBuilder
+ */
+class Toolkit_Contacts_SaveTripPlanner
+ extends Toolkit_Contacts_ContactUs
+{
+ // {{{ properties
+
+ /**
+ * Contact type to be inserted into the DB as when the form is submitted
+ *
+ * This property is only valid when the [hasContactDB] property is set
+ * to true.
+ *
+ * N.B.
+ * If you subclass this class out to other forms that are
+ * inserted into the contact db, be sure to make each one of their
+ * contactType properties unique. We don't check for duplicates.
+ *
+ * @var string
+ * @access public
+ */
+ public $contactType = '3';
+
+ /**
+ * Who to send the email to when the contact form is submitted
+ *
+ * If you leave this blank, its value will get set to the OWNER_EMAIL
+ * in the constructor.
+ *
+ * If you ***DO NOT*** want any emails to go out when the form is submitted
+ * then set the value to false. Do not set it to 0 for false, because the
+ * check uses a strict type check to determine if the value is actually
+ * false. This is what allows for the empty value as an option, which sets
+ * the value to OWNER_EMAIL and won't override the $email property if
+ * this class gets subclassed and the value for this property gets set in
+ * the properties of the subclass and not in the constructor after this
+ * constructor function is called.
+ *
+ * tongue twister...I know.
+ * <code>
+ * public $email = false;
+ * </code>
+ *
+ * @var unknown
+ * @access public
+ */
+ public $email = false;
+
+ /**
+ * Message to display if the form is successfully submitted
+ *
+ * @var string
+ * @access public
+ */
+ public $successMsg = '
+ <div id="form-success-top">
+ You have successfully created a new account.
+ </div>';
+
+ /**
+ * Email subject and <h1> header in email
+ *
+ * It gets set in the constructor if you leave empty here, but you
+ * can set it to something different here to override that if you desire.
+ *
+ * @var string
+ * @access public
+ */
+ public $subject;
+
+ protected $plannerListPageId;
+ protected $plannerFormPageId;
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param string $pdo PDO object
+ * @param string $formName Form's name.
+ * @param string $method (optional)Form's method defaults to 'POST'
+ * @param string $action (optional)Form's action
+ * @param string $target (optional)Form's target defaults to '_self'
+ * @param mixed $attributes (optional)Extra attributes for <form> tag
+ * @param bool $trackSubmit (optional)Whether to track if the form was
+ * submitted by adding a special hidden field
+ *
+ * @access public
+ */
+ public function __construct(
+ PDO $pdo,
+ $formName,
+ $method = 'post',
+ $action = '',
+ $target = '',
+ $attributes = null,
+ $trackSubmit = false
+ ) {
+ parent::__construct(
+ $pdo,
+ $formName,
+ $method,
+ $action,
+ $target,
+ $attributes,
+ $trackSubmit
+ );
+ $this->subject = 'Travel List from website ' . SITENAME;
+ $this->plannerListPageId = MEMBER_SESSION_PAGE;
+ $this->plannerFormPageId = MEMBER_SESSION_FORM;
+ }
+
+ // }}}
+
+ // {{{ configureElements()
+
+ /**
+ * Form element definitions
+ *
+ * @return void
+ * @access public
+ */
+ public function configureElements()
+ {
+ $e = array();
+ $this->setInterestFields();
+ // Grouped Elements are defined here.
+ $this->interestsGroups =& $this->getInterestFields();
+
+ // All Elements are created here. This includes group element definitions.
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'user_agent'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'remote_addr'
+ );
+ $e[] = array(
+ 'type' => 'header',
+ 'name' => 'infoHdr_rmv',
+ 'display' => ''
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'fname',
+ 'display' => 'First Name'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'lname',
+ 'display' => 'Last Name'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'address',
+ 'display' => 'Address 1'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'address2',
+ 'display' => 'Address 2'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'city',
+ 'display' => 'City'
+ );
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => false,
+ 'name' => 'state',
+ 'display' => 'State/Province',
+ 'opts' => $GLOBALS['states']
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'zip',
+ 'display' => 'ZIP/Postal Code'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'email',
+ 'display' => 'Email'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'email_rmv',
+ 'display' => 'Verify Email'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'phone',
+ 'display' => 'Phone'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'password',
+ 'display' => 'Password'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'verify_password',
+ 'display' => 'Verify Password'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'fax',
+ 'display' => 'Fax'
+ );
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'mail_ok',
+ 'display' => ', I would like to receive Email Newsletters',
+ 'opts' => 'Yes',
+ 'val' => array(0, 1)
+ );
+ if (is_array($this->interestsGroups)) {
+ foreach ($this->interestsGroups as $group => $gData) {
+ $this->myGroups[] = $gData;
+ $e[] = array(
+ 'type' => 'group',
+ 'req' => false,
+ 'name' => 'interest['.$group.']',
+ 'group' => $gData,
+ 'label' => $group,
+ 'seperator' => ' ',
+ 'appendName' => true
+ );
+ }
+ }
+ $e[] = array(
+ 'type' => 'CAPTCHA_Image',
+ 'req' => false,
+ 'name' => 'captcha_question',
+ 'display' => 'Verification code',
+ 'opts' => $this->captchaOptions
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'captcha_rmv',
+ 'display' => 'Enter verification code'
+ );
+ $e[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'submit_rmv',
+ 'display' => 'Submit Form'
+ );
+
+ $this->setupElements($e);
+ }
+
+ // }}}
+ // {{{ configureRules()
+
+ /**
+ * Form rule definitions
+ *
+ * Adds validation rules for the given fields
+ *
+ * @return void
+ * @access public
+ */
+ public function configureRules()
+ {
+ $r = array();
+ // Form Rules
+ $r[] = array(
+ 'element' => array('email', 'email_rmv'),
+ 'message' => 'ERROR: Your Email Addresses Do Not Match!',
+ 'type' => 'compare',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => array('password', 'verify_password'),
+ 'message' => 'ERROR: Your Passwords do not match!',
+ 'type' => 'compare',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'email',
+ 'message' => 'ERROR: Invalid Email Format!',
+ 'type' => 'checkEmail',
+ 'format' => array('use_rfc822' => true),
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ /*
+ $r[] = array(
+ 'element' => 'state',
+ 'message' => 'ERROR: Invalid State!',
+ 'type' => 'numeric',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ */
+ $r[] = array(
+ 'element' => 'phone',
+ 'message' => 'ERROR: Invalid number (xxx) xxx-xxxx!',
+ 'type' => 'phone',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'fax',
+ 'message' => 'ERROR: Invalid number (xxx) xxx-xxxx!',
+ 'type' => 'phone',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'zip',
+ 'message' => 'ERROR: Invalid Zip!',
+ 'type' => 'zip',
+ 'format' => array('requireDBCheck' => false),
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'mail_ok',
+ 'message' => 'ERROR: Invalid Value!',
+ 'type' => 'numeric',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'captcha_rmv',
+ 'message' => 'ERROR: Incorrect verification code!',
+ 'type' => 'CAPTCHA',
+ 'format' => $this->captchaQuestion,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+
+ $this->setupRules($r);
+ }
+
+ // }}}
+ // {{{ contactExists()
+
+ /**
+ * Checks for a duplicate email address already in the DB.
+ *
+ * @param string $email The email address to check for in the DB
+ *
+ * @return boolean If the email address already exists
+ * @access protected
+ */
+ protected function contactExists($email)
+ {
+ // Check if a contact w/ the submitted email already exists.
+ // if so, then we need to update, if not then do a fresh insert.
+ try {
+ $sql = "
+ SELECT id,password
+ FROM contact
+ WHERE email = :email";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':email', $email, PDO::PARAM_STR);
+ $stmt->execute();
+ //$stmt->bindColumn('id', $contactExists);
+ //$stmt->bindColumn('password', $password);
+ $row = $stmt->fetch();
+ //die('<pre>'.print_r($row, true).'</pre>');
+ if (!empty($row)) {
+ return array(
+ 'contactId' => $row['id'],
+ 'password' => $row['password']
+ );
+ } else {
+ return false;
+ }
+
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+
+ // {{{ processData()
+
+ /**
+ * Handles how to process the form when submitted
+ *
+ * @param array $values Form submitted values
+ *
+ * @return array Result of Insert / Update function
+ * @access protected
+ */
+ public function processData($values)
+ {
+ // Form data used for the insert/update sql queries and
+ // the form email.
+ $e = array(
+ 'user_agent',
+ 'remote_addr',
+ 'contact_type',
+ 'catid',
+ 'cPage',
+ );
+ $this->setFormData($e);
+
+
+ // If no contact db, return true so we can send owner email.
+ if (!$this->hasContactDB) {
+ return true;
+ }
+
+ // Get rid of any elements in the values array that
+ // aren't going to be used when inserting/updating the db.
+ $values = Toolkit_Common::cleanArray($values);
+
+ // Check if we are updating an existing contact or not
+ // question: is this the best approach? what if someone else
+ // sends a form through w/ different data but the same emil addy
+ // the old users data can be completely wiped out.
+ $existingContact = $this->contactExists($values['email']);
+ // setup newInterest aray with the interest values
+ // because their grouped can't be found with getElement('interest')
+ $this->newInterest = $values['interest'];
+ // update create_date for this contact
+ $values['create_date'] = date('m/d/Y');
+
+ // set up interest field values
+ if (is_array($values['interest']) && !empty($values['interest'])) {
+ foreach ($values['interest'] as $iGroup => $interests) {
+ $newInterest[] = implode(':', array_keys($interests));
+ }
+ if (is_array($newInterest)) {
+ $values['interest'] = ':' . implode(':', $newInterest) . ':';
+ }
+ }
+
+ $values['password'] = md5($values['password']);
+ unset($values['catid']);
+ unset($values['cPage']);
+
+ $authContainer = new Toolkit_Members_TripPlanner_AuthContainer(
+ Toolkit_Database::getInstance(),
+ array(
+ 'table' => 'contact',
+ 'usernamecol' => 'email',
+ 'passwordcol' => 'password',
+ 'db_fields' => array('id', 'fname', 'lname'),
+ 'cryptType' => 'md5',
+ )
+ );
+
+ $tripPlannerAuth = new Toolkit_Members_TripPlanner_TripAuth(
+ $authContainer,
+ '',
+ false
+ );
+ $tripPlannerAuth->setIdle();
+ $tripPlannerAuth->start();
+ $sessionList = new Toolkit_Members_TripPlanner_Sessions(
+ Toolkit_Database::getInstance(),
+ $tripPlannerAuth
+ );
+ if (is_array($existingContact)) {
+ // if there already in the database then give a message that
+ // they're already in and need to login
+ // this is true only if they already have a password set
+ if (!$existingContact['password']) {
+ $contactId = $existingContact['contactId'];
+ $cType = $this->_getExistingContactTypes($contactId);
+ $existingTypes
+ = (is_array($cType))
+ ? explode(':', $cType)
+ : array();
+ if (!in_array($this->contactType, $existingTypes)) {
+ $values['contact_type'] = "$cType{$this->contactType}:";
+ } else {
+ $values['contact_type'] = ":".implode(
+ ':', array_filter($existingTypes)
+ ).":";
+ }
+ // build a contact or customer class object with the values from
+ // the Contact form
+ if ($this->tableName == 'contact') {
+ $contact = Toolkit_LeadManager_Contact::createByValues($values);
+ } else {
+ $contact = Toolkit_LeadManager_Customer::createByValues($values);
+ }
+ if ( defined('STREAMSEND_FORMS_API')
+ && STREAMSEND_FORMS_API
+ && $values['mail_ok']) {
+ $contact->attach(new Toolkit_LeadManager_StreamSend());
+ }
+ $contact->save($this->dbh);
+ $tripPlannerAuth->setAuth($values['email']);
+ $tripPlannerAuth->setAuthData('id', $contactId);
+ $tripPlannerAuth->setAuthData('username', $values['email']);
+ $sessionList->saveList($contactId);
+ return true;
+ } else {
+ $seoUrl = Toolkit_Template_Page::getSeoUrl(
+ $this->_pageGateway, $this->plannerListPageId
+ );
+ $this->errorMsg = "<p>Your Email address already exist. Please "
+ . "<a href=\"$seoUrl\">sign-in</a>.</p>";
+ return false;
+ }
+ } else {
+ $values['contact_type'] = ":{$this->contactType}:";
+ // build a contact or customer class object with the values from
+ // the Contact form
+ if ($this->tableName == 'contact') {
+ $contact = Toolkit_LeadManager_Contact::createByValues($values);
+ } else {
+ $contact = Toolkit_LeadManager_Customer::createByValues($values);
+ }
+ if ( defined('STREAMSEND_FORMS_API')
+ && STREAMSEND_FORMS_API
+ && $values['mail_ok']) {
+ $contact->attach(new Toolkit_LeadManager_StreamSend());
+ }
+ $contact->save($this->dbh);
+ $contactId = $contact->getId();
+ // put in the creation of the contact record here
+ // and set contactId
+ $contactData = $this->contactExists($values['email']);
+ $contactId = $contactData['contactId'];
+ $tripPlannerAuth->setAuth($values['email']);
+ $tripPlannerAuth->setAuthData('id', $contactId);
+ $tripPlannerAuth->setAuthData('username', $values['email']);
+ $sessionList->saveList($contactId);
+ return true;
+ }
+ }
+
+ // }}}
+
+ public function setGateway(Toolkit_Toolbox_PageGatewayAbstract $gateway)
+ {
+ $this->_pageGateway = $gateway;
+ }
+
+ // {{{ toHTML()
+
+ /**
+ * Handles how to display the current step the user is at in the form
+ *
+ * destroying and resetting the captcha value dis-allows someone from
+ * re-sending a form on a previous captcha.
+ *
+ * @return string form HTML state
+ * @access public
+ */
+ public function toHTML()
+ {
+ $this->setupRenderers();
+ if ($this->validate()) {
+ $this->captchaQuestion->destroy();
+ $this->cleanForm();
+
+ if ($this->process(array(&$this, 'processData'), $this->mergeFiles)) {
+ $this->freeze();
+ $output = $this->successMsg;
+ } else {
+ $output = $this->errorMsg;
+ //$output .= parent::toHTML();
+ }
+ $this->sent = true;
+ } elseif ($this->isSubmitted()) {
+ $this->captchaQuestion->destroy();
+ $this->captchaAnswer->setValue('');
+ //$output = $this->errorMsg;
+ $output .= parent::toHTML();
+ } else {
+ $this->captchaQuestion->destroy();
+ $this->captchaAnswer->setValue('');
+ $output .= parent::toHTML();
+ }
+ return $output;
+ }
+
+ // }}}
+
+}
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * File Doc Comment
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+
+/**
+ * Ask the concierge form
+ *
+ * This form handles rendering and processing the contact form.
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id:
+ * @link <>
+ * @see Toolkit_FormBuilder
+ */
+class Toolkit_Contacts_SendTripPlanner extends Toolkit_Contacts_ContactUs
+{
+ // {{{ properties
+
+ /**
+ * Contact type to be inserted into the DB as when the form is submitted
+ *
+ * This property is only valid when the [hasContactDB] property is set
+ * to true.
+ *
+ * N.B.
+ * If you subclass this class out to other forms that are
+ * inserted into the contact db, be sure to make each one of their
+ * contactType properties unique. We don't check for duplicates.
+ *
+ * @var string
+ * @access public
+ */
+ public $contactType = '3';
+
+ /**
+ * Who to send the email to when the contact form is submitted
+ *
+ * If you leave this blank, its value will get set to the OWNER_EMAIL
+ * in the constructor.
+ *
+ * If you ***DO NOT*** want any emails to go out when the form is submitted
+ * then set the value to false. Do not set it to 0 for false, because the
+ * check uses a strict type check to determine if the value is actually
+ * false. This is what allows for the empty value as an option, which sets
+ * the value to OWNER_EMAIL and won't override the $email property if
+ * this class gets subclassed and the value for this property gets set in
+ * the properties of the subclass and not in the constructor after this
+ * constructor function is called.
+ *
+ * tongue twister...I know.
+ * <code>
+ * public $email = false;
+ * </code>
+ *
+ * @var unknown
+ * @access public
+ */
+ public $email = false;
+
+ /**
+ * Message to display if the form is successfully submitted
+ *
+ * @var string
+ * @access public
+ */
+ public $successMsg = '
+ <style type="text/css">
+ #category {display:none;}
+ .listing {display:none;}
+ </style>
+ <div id="form-success-top">
+ <p>Thank you for adding these businesses to your Trip Planner.
+ Your information is currently being sent to each business so they
+ may contact you regarding your visit.</p>
+ </div>';
+
+ /**
+ * Email subject and <h1> header in email
+ *
+ * It gets set in the constructor if you leave empty here, but you
+ * can set it to something different here to override that if you desire.
+ *
+ * @var string
+ * @access public
+ */
+ public $subject;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param string $pdo Passed in PDO object
+ * @param string $formName Form's name.
+ * @param string $method (optional)Form's method defaults to 'POST'
+ * @param string $action (optional)Form's action
+ * @param string $target (optional)Form's target defaults to '_self'
+ * @param mixed $attributes (optional)Extra attributes for <form> tag
+ * @param bool $trackSubmit (optional)Whether to track if the form was
+ * submitted by adding a special hidden field
+ *
+ * @access public
+ */
+ public function __construct(
+ PDO $pdo,
+ $formName,
+ $method = 'post',
+ $action = '',
+ $target = '',
+ $attributes = null,
+ $trackSubmit = false
+ ) {
+ parent::__construct(
+ $pdo,
+ $formName,
+ $method,
+ $action,
+ $target,
+ $attributes,
+ $trackSubmit
+ );
+ $this->subject = 'Travel List from website ' . SITENAME;
+ $successMsg = '
+ <style type="text/css">
+ #category {display:none;}
+ .listing {display:none;}
+ </style>
+ <div id="form-success-top">
+ <p>Thank you for adding these businesses to your Trip Planner.
+ Your information is currently being sent to each business so they
+ may contact you regarding your visit to '.SITENAME.'.</p>
+ </div>';
+ }
+
+ // }}}
+ // {{{ configureDefaults()
+
+ /**
+ * Initializes default form values
+ *
+ * @return void
+ * @access public
+ */
+ public function configureDefaults()
+ {
+ $defaults = array(
+ 'state' => '',
+ 'mail_ok' => 1,
+ 'catid' => $_REQUEST['catid'],
+ 'cPage' => $_REQUEST['cPage']
+ );
+
+ $this->setupDefaults($defaults);
+ }
+
+ // }}}
+ // {{{ configureElements()
+
+ /**
+ * Form element definitions
+ *
+ * @return void
+ * @access public
+ */
+ public function configureElements()
+ {
+ $e = array();
+ $this->setInterestFields();
+ // Grouped Elements are defined here.
+ $this->interestsGroups =& $this->getInterestFields();
+
+ // All Elements are created here. This includes group element definitions.
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'catid'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'cPage'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'user_agent'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'remote_addr'
+ );
+ $e[] = array(
+ 'type' => 'header',
+ 'name' => 'infoHdr_rmv',
+ 'display' => ''
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'fname',
+ 'display' => 'First Name'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'lname',
+ 'display' => 'Last Name'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'address',
+ 'display' => 'Address 1'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'address2',
+ 'display' => 'Address 2'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'city',
+ 'display' => 'City'
+ );
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => false,
+ 'name' => 'state',
+ 'display' => 'State/Province',
+ 'opts' => $GLOBALS['states']
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'zip',
+ 'display' => 'ZIP/Postal Code'
+ );
+ $e[] = array(
+ 'type' => 'email',
+ 'req' => true,
+ 'name' => 'email',
+ 'display' => 'Email'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'email_rmv',
+ 'display' => 'Verify Email'
+ );
+ $e[] = array(
+ 'type' => 'tel',
+ 'req' => false,
+ 'name' => 'phone',
+ 'display' => 'Phone'
+ );
+ $e[] = array(
+ 'type' => 'tel',
+ 'req' => false,
+ 'name' => 'fax',
+ 'display' => 'Fax'
+ );
+ $e[] = array(
+ 'type' => 'textarea',
+ 'req' => false,
+ 'name' => 'comments',
+ 'display' => 'Comments'
+ );
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'mail_ok',
+ 'display' => 'I would like to receive Email Newsletters',
+ 'opts' => 'Yes',
+ 'val' => array(0, 1)
+ );
+// if (is_array($this->interestsGroups)) {
+// foreach ($this->interestsGroups as $group => $gData) {
+// $this->myGroups[] = $gData;
+// $e[] = array(
+// 'type' => 'group',
+// 'req' => false,
+// 'name' => 'interest['.$group.']',
+// 'group' => $gData,
+// 'label' => $group,
+// 'seperator' => ' ',
+// 'appendName' => true
+// );
+// }
+// }
+ $e[] = array(
+ 'type' => 'CAPTCHA_Image',
+ 'req' => false,
+ 'name' => 'captcha_question',
+ 'display' => 'Verification code',
+ 'opts' => $this->captchaOptions
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'captcha_rmv',
+ 'display' => 'Enter verification code'
+ );
+ $e[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'submit_rmv',
+ 'display' => 'Submit Form'
+ );
+
+ $this->setupElements($e);
+ }
+
+ // }}}
+ // {{{ configureRules()
+
+ /**
+ * Form rule definitions
+ *
+ * Adds validation rules for the given fields
+ *
+ * @return void
+ * @access public
+ */
+ public function configureRules()
+ {
+ $r = array();
+ // Form Rules
+ $r[] = array(
+ 'element' => array('email', 'email_rmv'),
+ 'message' => 'ERROR: Your Email Addresses Do Not Match!',
+ 'type' => 'compare',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'email',
+ 'message' => 'ERROR: Invalid Email Format!',
+ 'type' => 'checkEmail',
+ 'format' => array('use_rfc822' => true),
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ /*
+ $r[] = array(
+ 'element' => 'state',
+ 'message' => 'ERROR: Invalid State!',
+ 'type' => 'numeric',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ */
+ $r[] = array(
+ 'element' => 'phone',
+ 'message' => 'ERROR: Invalid number (xxx) xxx-xxxx!',
+ 'type' => 'phone',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'fax',
+ 'message' => 'ERROR: Invalid number (xxx) xxx-xxxx!',
+ 'type' => 'phone',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'zip',
+ 'message' => 'ERROR: Invalid Zip!',
+ 'type' => 'zip',
+ 'format' => array('requireDBCheck' => false),
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'mail_ok',
+ 'message' => 'ERROR: Invalid Value!',
+ 'type' => 'numeric',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+ $r[] = array(
+ 'element' => 'captcha_rmv',
+ 'message' => 'ERROR: Incorrect verification code!',
+ 'type' => 'CAPTCHA',
+ 'format' => $this->captchaQuestion,
+ 'validation' => $this->validationType,
+ 'reset' => true,
+ 'force' => false
+ );
+
+ $this->setupRules($r);
+ }
+
+ // }}}
+
+ // {{{ sendEmails()
+
+ /**
+ * sendEmails
+ *
+ * From the list of emails contained in $_SESSIEN['wish_list']
+ * send out emails to each email address
+ * only if we're on the production server
+ * if on the development server send to OWNER_EMAIL
+ *
+ * @return void
+ * @access public
+ */
+ function sendEmails()
+ {
+ $hasInterestField = $this->elementExists('interest');
+
+ $template = new HTML_Template_Flexy($this->flexyOptions);
+ $page = new stdClass();
+ // for comments textarea need to replace newlines with br
+ $this->formData['comments']['element'] = nl2br($this->getSubmitValue('comments'));
+
+ $page->email_from = OWNER_EMAIL;
+ $page->subject = $this->subject;
+ $page->client_info = $this->clientInfo;
+ $page->fname = $this->getSubmitValue('fname');
+ $page->lname = $this->getSubmitValue('lname');
+ $page->formData = $this->formData;
+
+ // unset some extra fields
+ unset(
+ $page->formData['catid'],
+ $page->formData['cPage']
+ );
+
+ if ($hasInterestField) {
+ // Clean up the interests so they will look nice in the email
+ $page->formData['interest']['nowrap'] = 'nowrap';
+ $page->formData['interest']['element'] = null;
+ $g =& $this->getElement('interest');
+ $ge =& $g->getElements();
+ $interests = array();
+ foreach ($ge as $e) {
+ if ($e->getChecked()) {
+ $interests[] = $e->getText();
+ }
+ }
+ $page->formData['interest']['element'] = implode('<br>', $interests);
+ }
+
+ if ($this->elementExists('mail_ok')) {
+ // Clean up the mail_ok flag so its human readable
+ $page->formData['mail_ok']['element']
+ = ($page->formData['mail_ok']['element']) ? 'Yes' : 'No';
+ }
+
+ $template->compile('emailOwner.tpl');
+ $htmlMsg = $template->bufferedOutputObject($page);
+
+ if ($hasInterestField) {
+ // Text version can't have HTML in it
+ // so reset the interests to use commas
+ $page->formData['interest']['element'] = implode(", ", $interests);
+ }
+ $msg = "{$page->subject}\n\n";
+ $msg .= "From {$page->fname} {$page->lname}\n\n";
+ $msg .= "Information\n\n";
+ foreach ($page->formData as $i) {
+ $msg .= "{$i['label']}: {$i['element']}\n";
+ }
+
+ $crlf = "\n";
+ $mimeMail = new Mail_mime($crlf);
+ $mimeMail->setFrom("Online Form <{$page->email_from}>");
+ $mimeMail->setSubject($this->subject);
+ $mimeMail->setHTMLBody($htmlMsg);
+ $mimeMail->setTXTBody($msg);
+
+ $mail =& Mail::factory('mail');
+ $body = $mimeMail->get();
+ $headerFormat = "%s %s <%s>";
+ $setHeader['Reply-To'] = sprintf(
+ $headerFormat,
+ $this->getSubmitValue('fname'),
+ $this->getSubmitValue('lname'),
+ $this->getSubmitValue('email')
+ );
+ $headers = $mimeMail->headers($setHeader);
+ $sql = "
+ SELECT member_contact_email
+ FROM member
+ WHERE member_id = :member_id";
+ $getMemberEmail = $this->dbh->prepare($sql);
+
+ if (defined('DEVELOPMENT') && DEVELOPMENT) {
+ // no emails sent
+ } else {
+ if (is_array($_SESSION['wish_list'])
+ && !empty($_SESSION['wish_list'])
+ ) {
+ foreach ($_SESSION['wish_list'] as $memberId => $row) {
+ try {
+ $getMemberEmail->bindParam(
+ ':member_id',
+ $memberId,
+ PDO::PARAM_INT
+ );
+ $getMemberEmail->execute();
+ $memberEmail = $getMemberEmail->fetchColumn();
+ } catch(PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ // code for sending emails
+ if (GLM_TOOLBOX::valid_email($memberEmail)) {
+ $res = $mail->send($memberEmail, $headers, $body);
+ if (PEAR::isError($res)) {
+ return Toolkit_Common::handleError($res);
+ }
+ }
+ }
+ }
+ }
+ $authContainer = new Toolkit_Members_TripPlanner_AuthContainer(
+ Toolkit_Database::getInstance(),
+ array(
+ 'table' => 'contact',
+ 'usernamecol' => 'email',
+ 'passwordcol' => 'password',
+ 'db_fields' => array('id', 'fname', 'lname'),
+ 'cryptType' => 'md5',
+ )
+ );
+ $tripPlannerAuth = new Toolkit_Members_TripPlanner_TripAuth(
+ $authContainer,
+ '',
+ false
+ );
+ $tripPlannerAuth->setIdle();
+ $tripPlannerAuth->start();
+ $sessionList = new Toolkit_Members_TripPlanner_Sessions(
+ $this->dbh,
+ $tripPlannerAuth
+ );
+ $sessionList->dumpList();
+ return $res;
+ }
+
+ // }}}
+ // {{{ showDirectList()
+
+ /**
+ * showDirectList
+ *
+ * Display the list of members in $_SESSION['wish_list']
+ *
+ * @return void
+ * @access public
+ */
+ function showDirectList()
+ {
+ // Initiate HTML_Template_Flexy.
+ $template = new HTML_Template_Flexy($this->flexyOptions);
+ $page = new stdClass();
+ $page->memberDirect = $page->memberDirectNoEmail = array();
+ if (is_array($_SESSION['wish_list']) && !empty($_SESSION['wish_list'])) {
+ $sql = "
+ SELECT member_name,member_contact_email,phone,toll_free
+ FROM member
+ WHERE member_id = :member_id";
+ $getMemberData = $this->dbh->prepare($sql);
+ $mACount = $mBCount = 0;
+ foreach ($_SESSION['wish_list'] as $memberId => $row) {
+ try {
+ $getMemberData->bindParam(
+ ':member_id',
+ $memberId,
+ PDO::PARAM_INT
+ );
+ $getMemberData->execute();
+ $memberData = $getMemberData->fetch();
+ $memberName = $memberData['member_name'];
+ $memberPhone = $memberData['phone'];
+ $memberTollFree = $memberData['toll_free'];
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ $name = preg_replace(
+ '/[\/#&?\'"]|amp;/',
+ '',
+ strip_tags(
+ strtolower(
+ trim(
+ str_replace(
+ ' ',
+ '-',
+ $memberData['member_name']
+ )
+ )
+ )
+ )
+ );
+ $memberUrl = MEDIA_BASE_URL
+ . "member-{$row['catid']}/" . htmlspecialchars($name)
+ . "-{$memberId}.html";
+ if ($memberData['member_contact_email']) {
+ $page->memberDirect[] = array(
+ 'memberName' => $memberName,
+ 'memberPhone' => $memberPhone,
+ 'memberTollFree' => $memberTollFree,
+ 'memberLink' => $memberUrl,
+ 'deleteLink' => MEDIA_BASE_URL
+ .'Toolkit/Members/TripPlanner/'
+ .'wish-list.php?catid='
+ .$_REQUEST['catid'].'&member_id=' . $memberId
+ . '&cPage=' . urlencode($_REQUEST['cPage']),
+ 'trclass' => (($mACount % 2 == 0) ? 'tr1': 'tr2')
+ );
+ $mACount++;
+ } else {
+ $page->memberDirectNoEmail[] = array(
+ 'memberName' => $memberName,
+ 'memberPhone' => $memberPhone,
+ 'memberTollFree' => $memberTollFree,
+ 'memberLink' => $memberUrl,
+ 'deleteLink' => MEDIA_BASE_URL
+ .'Toolkit/Members/TripPlanner/'
+ . 'wish-list.php?catid='
+ . $_REQUEST['catid'].'&member_id=' . $memberId
+ . '&cPage=' . urlencode($_REQUEST['cPage']),
+ 'trclass' => (($mBCount % 2 == 0) ? 'tr1': 'tr2')
+ );
+ $mBCount++;
+ }
+ }
+ }
+ $this->totalMembersEmails = $mACount;
+ $this->totalMembersNoEmails = $mBCount;
+ // Compile the direct-list.html from the templates directory.
+ $template->compile('direct-list.html');
+
+ // Merge compiled template with the $page object.
+ $out = $template->bufferedOutputObject($page);
+ return $out;
+ }
+ // }}}
+ // {{{ showNoList()
+
+ /**
+ * showNoList
+ *
+ * What to display If nothing is in $_SESSION['wish_list']
+ *
+ * @return void
+ * @access public
+ */
+ function showNoList()
+ {
+ // Initiate HTML_Template_Flexy.
+ $template = new HTML_Template_Flexy($this->flexyOptions);
+ $page = new stdClass();
+ $page->baseUrl = MEDIA_BASE_URL;
+ // Compile the direct-nolist.html from the templates directory.
+ $template->compile('direct-nolist.html');
+
+ // Merge compiled template with the $page object.
+ $out = $template->bufferedOutputObject($page);
+ return $out;
+ }
+ // }}}
+ // {{{ toHTML()
+
+ /**
+ * Handles how to display the current step the user is at in the form
+ *
+ * destroying and resetting the captcha value dis-allows someone from
+ * re-sending a form on a previous captcha.
+ *
+ * @return string form HTML state
+ * @access public
+ */
+ public function toHTML()
+ {
+ $this->setupRenderers();
+ if ($this->validate()) {
+ $this->captchaQuestion->destroy();
+ $this->cleanForm();
+
+ if ($this->process(array(&$this, 'processData'), $this->mergeFiles)) {
+ $this->freeze();
+ $this->sendEmails();
+ $output = $this->successMsg;
+ }
+ $this->sent = true;
+ } elseif ($this->isSubmitted()) {
+ $this->captchaQuestion->destroy();
+ $this->captchaAnswer->setValue('');
+ $output .= parent::toHTML();
+ } else {
+ $this->captchaQuestion->destroy();
+ $this->captchaAnswer->setValue('');
+ $output = $this->showDirectList();
+ if ($this->totalMembersEmails > 0) {
+ $output .= parent::toHTML();
+ }
+ }
+ return $output;
+ }
+
+ // }}}
+}
+
--- /dev/null
+<?php
+/**
+ * StreamSend.php
+ *
+ * PHP version 5
+ *
+ * All Right Reserved
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: StreamSend.php,v 1.5 2010/04/30 19:02:10 matrix Exp $
+ * @link <>
+ */
+
+/**
+ * Default parameters for contact create operations.
+ * Note that these are strings for use in XML data not true/false values.
+ * If false, the person will be created with a status of pending
+ */
+define('STREAMSEND_DEFAULT_ACTIVATE', 'false');
+/**
+ * If activate is false, setting this to true will trigger the sending of the built-in
+ * activation notification; if activate is true, this setting has no effect
+ */
+define('STREAMSEND_DEFAULT_DELIVER_ACTIVATION', 'true');
+/**
+ * If activate is true, setting this to true will trigger the sending of the built-in
+ * welcome notification; if activate is false, this setting has no effect
+ */
+define('STREAMSEND_DEFAULT_DELIVER_WELCOME', 'false');
+/**
+ * URI for streamsend API
+ */
+define('STREAMSEND_BASE_URL', "https://app.streamsend.com");
+
+/**
+ * Toolkit_Contacts_StreamSend
+ *
+ * Contact support class for inergration with StreamSend API
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @link <>
+ */
+class Toolkit_Contacts_StreamSend
+{
+ // {{{ Class Properties
+
+
+ /**
+ * Description for public
+ * @var boolean
+ * @access public
+ */
+ public $debug = false;
+
+ /**
+ * streamSendFields
+ *
+ * array with key values matching the gaslight contact tabel to the
+ * StreamSend field (normal fields)
+ *
+ * @var array
+ * @access protected
+ */
+ protected $streamSendFields = array(
+ 'email' => 'email-address',
+ 'fname' => 'first-name',
+ 'lname' => 'last-name',
+ 'address' => 'address1',
+ 'address2' => 'address2',
+ 'city' => 'city',
+ 'state' => 'stateprovince',
+ 'zip' => 'postal-code',
+ 'phone' => 'phone-number',
+ 'interest' => 'interests',
+ 'contact_type' => 'contact-type'
+ );
+
+ /**
+ * contactInqTypes
+ *
+ * array with key values matching the gaslight contact_inq tabel to the
+ * StreamSend field (Radio fields)
+ * key = id from contact_inq table
+ * value = name from contact_inq_table
+ * value is same name as the StreamSend fieldname
+ *
+ * @var array
+ * @access protected
+ */
+ protected $contactInqTypes = array();
+
+ /**
+ * booleanTypes
+ *
+ * StreamSend fields (boolean fields) an array of field names for the
+ * boolean field types
+ *
+ * @var array
+ * @access protected
+ */
+ protected $booleanTypes = array();
+ // }}}
+ // {{{ __construct()
+
+
+ /**
+ * __construct(
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct()
+ {
+ }
+
+
+ // }}}
+ // {{{ addContact()
+
+
+ /**
+ * addContact
+ *
+ * Given $values from a Toolkit_Contacts Form add Contact
+ *
+ * @param array $values Parameter description (if any) ...
+ *
+ * @return boolean Return true if successfull
+ * @access public
+ */
+ public function addContact($values)
+ {
+ // check the array $values to make sure it is correct
+ if (is_array($values) && !empty($values)) {
+ include_once GLM_APP_BASE.'StreamSend/class_streamsend_api.inc';
+ // initialize the streamsend object
+ $ss = new streamSend (STREAMSEND_BASE_URL, STREAMSEND_LOGIN_ID,
+ STREAMSEND_KEY);
+ $ss->debug = $this->debug;
+ $ret = $ss->contactSearch($values['email']);
+
+ $contactData = array();
+ $values[$type] = 1;
+ foreach ($this->streamSendFields as $glmName => $ssName) {
+ switch ($glmName) {
+ case "state":
+ $contactData[$ssName] = ($values[$glmName]) ? $GLOBALS['states'][$values[$glmName]]: '';
+ break;
+ default:
+ $contactData[$ssName] = $values[$glmName];
+ break;
+ }
+ }
+ foreach ($this->contactInqTypes as $contactInqId => $name) {
+ $slug = str_replace(" ", "-", strtolower($this->contactInqTypes[$contactInqId]));
+ if ($values['interest'][$contactInqId]) {
+ $contactData[$slug] = 'Yes';
+ } else {
+ $contactData[$slug] = 'No';
+ }
+ }
+ foreach ($this->booleanTypes as $name) {
+ if ($values[$name]) {
+ $contactData[$name] = 'Yes';
+ } else {
+ $contactData[$name] = 'No';
+ }
+ }
+ if ($ret->contact) {
+ $contacts = $ss->contactUpdate(
+ $ret->contact->id,
+ $contactData
+ );
+ } else {
+ $contacts = $ss->contactCreate(
+ $contactData,
+ STREAMSEND_DEFAULT_ACTIVATE,
+ STREAMSEND_DEFAULT_DELIVER_ACTIVATION,
+ STREAMSEND_DEFAULT_DELIVER_WELCOME
+ );
+ }
+ if (!$contacts) {
+
+ // show errors if on development server
+ switch (GLM_HOST_ID) {
+ case "DEVELOPMENT":
+ echo "<p>A total and complete failure occured.";
+ break;
+ case "PRODUCTION":
+ break;
+ }
+ }
+ if ($ss->debug == true) {
+ echo '<p><h3>Debug Results</h3>'.$ss->debugBuffer.'</p>';
+ }
+ return true;
+ }
+ return false;
+ }
+
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * File Doc Comment
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: ContactUs.php,v 1.36 2010/07/14 23:33:15 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Error codes for Toolkit_Contacts_ContactUs
+ *
+ * Codes are mapped to textual messaged by errorMessage() method,
+ * if you add a new code be sure to add a new message for it to errorMessage()
+ *
+ * @see Toolkit_Contacts_ContactUs::errorMessage()
+ */
+
+/**
+ * GLM Contact Us form
+ *
+ * This form handles rendering and processing the contact us form.
+ * Controls the email functionality of the form, whether the client
+ * has a contact DB to store contact records and how to insert/update
+ * submitted form values.
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ * @see Toolkit_FormBuilder
+ */
+class Toolkit_Contacts_VisitorGuide
+ extends Toolkit_Contacts_ContactUs
+{
+ /**
+ * Contact type to be inserted into the DB as when the form is submitted
+ *
+ * This property is only valid when the [hasContactDB] property is set
+ * to true.
+ *
+ * N.B.
+ * If you subclass this class out to other forms that are
+ * inserted into the contact db, be sure to make each one of their
+ * contactType properties unique. We don't check for duplicates.
+ *
+ * @var string
+ * @access protected
+ */
+ protected $contactType = '4';
+ /**
+ * Message to display if the form is successfully submitted
+ *
+ * @var string
+ * @access protected
+ */
+ protected $successMsg = '
+ <style type="text/css">
+ #category {display:none;}
+ .listing {display:none;}
+ </style>
+ <div id="form-success-top">
+ Thank you for requesting the Visitors guide.
+ </div>';
+ /**
+ * Email subject and <h1> header in email
+ *
+ * It gets set in the constructor if you leave empty here, but you
+ * can set it to something different here to override that if you desire.
+ *
+ * @var string
+ * @access protected
+ */
+ public $subject = "Visitor Guide Form from website";
+
+ /**
+ * Class constructor
+ *
+ * @param object $pdo PHP Data Object
+ * @param string $formName Form's name.
+ * @param string $method (optional)Form's method defaults to 'POST'
+ * @param string $action (optional)Form's action
+ * @param string $target (optional)Form's target defaults to '_self'
+ * @param mixed $attributes (optional)Extra attributes for <form> tag
+ * @param bool $trackSubmit (optional)Whether to track if the form was
+ * submitted by adding a special hidden field
+ *
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @access public
+ * @link http://pear.php.net/package/HTML_QuickForm/docs/latest/HTML_QuickForm/HTML_QuickForm.html
+ * @see HTML_QuickForm
+ */
+ public function __construct(
+ PDO $pdo,
+ $formName,
+ $method = 'post',
+ $action = '',
+ $target = '',
+ $attributes = null,
+ $trackSubmit = false
+ ) {
+ parent::__construct(
+ $pdo,
+ $formName,
+ $method,
+ $action,
+ $target,
+ $attributes,
+ $trackSubmit
+ );
+ $this->email = VISITOR_GUIDE_EMAIL;
+ }
+ // {{{ configureConstants()
+
+ /**
+ * Constant variables for the form
+ *
+ * These values won't get overridden by POST or GET vars
+ *
+ * @return void
+ * @access public
+ */
+ public function configureConstants()
+ {
+ $constants = array(
+ 'user_agent' => $_SERVER['HTTP_USER_AGENT'],
+ 'remote_addr' => $_SERVER['REMOTE_ADDR']
+ );
+ $this->setupConstants($constants);
+ }
+
+ // }}}
+ // {{{ configureElements()
+
+ /**
+ * Form element definitions
+ *
+ * @return void
+ * @access public
+ */
+ public function configureElements()
+ {
+ $e = array();
+ if ($this->hasContactDB) {
+ $this->setInterestFields();
+ // Grouped Elements are defined here.
+ $this->interestsGroups =& $this->getInterestFields();
+ }
+
+ // All Elements are created here. This includes group element definitions.
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'user_agent'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'remote_addr'
+ );
+ $e[] = array(
+ 'type' => 'header',
+ 'name' => 'firstHdr_rmv',
+ 'display' => ''
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'fname',
+ 'display' => 'First Name'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'lname',
+ 'display' => 'Last Name'
+ );
+ if ($this->tableName == 'customer') {
+ $add1 = 'add1';
+ $add2 = 'add2';
+ } else {
+ $add1 = 'address';
+ $add2 = 'address2';
+ }
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => $add1,
+ 'display' => 'Address 1'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => $add2,
+ 'display' => 'Address 2'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'city',
+ 'display' => 'City'
+ );
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => true,
+ 'name' => 'state',
+ 'display' => 'State/Province',
+ 'opts' => $GLOBALS['states']
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'zip',
+ 'display' => 'ZIP/Postal Code'
+ );
+ $e[] = array(
+ 'type' => 'email',
+ 'req' => true,
+ 'name' => 'email',
+ 'display' => 'Email'
+ );
+ $e[] = array(
+ 'type' => 'email',
+ 'req' => true,
+ 'name' => 'email_rmv',
+ 'display' => 'Verify Email'
+ );
+ $e[] = array(
+ 'type' => 'tel',
+ 'req' => false,
+ 'name' => 'phone',
+ 'display' => 'Phone'
+ );
+ $e[] = array(
+ 'type' => 'tel',
+ 'req' => false,
+ 'name' => 'fax',
+ 'display' => 'Fax'
+ );
+ $e[] = array(
+ 'type' => 'textarea',
+ 'req' => false,
+ 'name' => 'comments',
+ 'display' => 'Comments'
+ );
+ if ($this->hasContactDB) {
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'mail_ok',
+ 'display' => 'I would like to receive Email Newsletters',
+ 'opts' => 'Yes, ',
+ 'val' => array(0, 1)
+ );
+ if (defined("MEMBERS_DB") && MEMBERS_DB) {
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'members',
+ 'display' => 'I would like to receive information via e-mail from '.SITENAME.' Members',
+ 'opts' => 'Yes, ',
+ 'val' => array(0, 1)
+ );
+ }
+ }
+ if (is_array($this->interestsGroups)) {
+ foreach ($this->interestsGroups as $group => $gData) {
+ $this->myGroups[] = $gData;
+ $e[] = array(
+ 'type' => 'group',
+ 'req' => false,
+ 'name' => 'interest['.$group.']',
+ 'group' => $gData,
+ 'label' => $group,
+ 'seperator' => ' ',
+ 'appendName' => true
+ );
+ }
+ }
+ $e[] = array(
+ 'type' => 'CAPTCHA_Image',
+ 'req' => false,
+ 'name' => 'captcha_question',
+ 'display' => 'Verification code',
+ 'opts' => $this->captchaOptions
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'captcha_rmv',
+ 'display' => 'Enter verification code'
+ );
+ $e[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'submit_rmv',
+ 'display' => 'Submit Form'
+ );
+
+ $this->setupElements($e);
+ }
+
+ // }}}
+}
--- /dev/null
+; Production server configuration data
+[production]
+previousYearSince = 2010
+
+; flexyOptions
+flexyOptions.templateDir = BASE "Toolkit/Contacts/templates"
+flexyOptions.compileDir = BASE "Toolkit/Contacts/templates/compiled"
+flexyOptions.forceCompile = Off
+flexyOptions.url_rewrite = "baseurl/::" BASE_URL ",glmappbaseurl/::" MEDIA_APP_BASE_URL
+flexyOptions.allowPHP = On
+
+; development server configuration data inherits from production and
+; overrides values as necessary
+[development : production]
+
+; chuck's server configuration data inherits from development
+; and overrides values as necessary
+[chuck : development]
+
+; steve's server configuration data inherits from development
+; and overrides values as necessary
+[steve : development]
--- /dev/null
+; Contact Database configuration file
+[conf]
+; Table Name for records
+table = "contact"
+; Primary Key
+primarykey = "id"
+; Sequence
+sequence = "contact_id_seq"
+
+[contact_types]
+1 = "Web Contact"
+2 = "E-News"
+3 = "Travel Planner"
+4 = "Visitor Guide"
--- /dev/null
+CREATE SEQUENCE contact_id_seq
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+ALTER TABLE contact ALTER COLUMN id SET DEFAULT nextval('contact_id_seq'::regclass);
+
+ALTER TABLE ONLY contact
+ ADD CONSTRAINT contact_pkey PRIMARY KEY (id);
+
+CREATE INDEX contact_create_date_indx ON contact USING btree (create_date);
+
+CREATE INDEX contact_email_indx ON contact USING btree (email);
+
+CREATE INDEX contact_fname_indx ON contact USING btree (fname);
+
+CREATE UNIQUE INDEX contact_id_indx ON contact USING btree (id);
+
+CREATE INDEX contact_lname_indx ON contact USING btree (lname);
+
+CREATE UNIQUE INDEX news_response_id_indx ON contact USING btree (id);
+
+CREATE UNIQUE INDEX query_db_id_indx ON contact USING btree (id);
+
+CREATE SEQUENCE contact_inq_id_seq
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+ALTER TABLE contact_inq ALTER COLUMN id SET DEFAULT nextval('contact_inq_id_seq'::regclass);
+
+ALTER TABLE ONLY inq_group
+ ADD CONSTRAINT inq_group_pkey PRIMARY KEY (id);
+
+CREATE SEQUENCE inq_group_id_seq
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+ALTER TABLE inq_group ALTER COLUMN id SET DEFAULT nextval('inq_group_id_seq'::regclass);
+
+ALTER TABLE ONLY inq_group
+ ADD CONSTRAINT inq_group_pkey PRIMARY KEY (id);
--- /dev/null
+CREATE TABLE contact (
+ id integer NOT NULL,
+ create_date date DEFAULT CURRENT_DATE,
+ fname text,
+ lname text,
+ company text,
+ address text,
+ address2 text,
+ city text,
+ state text,
+ zip text,
+ country text,
+ phone text,
+ fax text,
+ email text,
+ user_agent text,
+ remote_addr text,
+ interest text,
+ mail_ok boolean DEFAULT false,
+ visitorguide boolean DEFAULT false,
+ uidpdf text,
+ visitorguide_download boolean DEFAULT false,
+ email_verified boolean DEFAULT true,
+ contact_type text,
+ discover text,
+ member_ok boolean DEFAULT false,
+ staff boolean DEFAULT false,
+ comments text,
+ password text,
+ verify_password text
+);
+
+CREATE TABLE inq_group (
+ id integer NOT NULL,
+ name text
+);
+
+CREATE TABLE contact_inq (
+ id integer NOT NULL,
+ header text,
+ pos integer,
+ description text,
+ image text,
+ groupid integer
+);
--- /dev/null
+<link type="text/css" rel="stylesheet" href="<?php echo MEDIA_BASE_URL;?>css/contactform.css">
+<div flexy:if="pdfForm"><strong>DOWNLOAD:</strong>
+ <p>We will email you a link to the PDF version of the {brochure}.</p>
+</div>
+<div>
+ {pdfForm:h}
+</div>
+<p style="clear: both;" flexy:if="contactForm"><strong>ORDER BY MAIL:</strong></p>
+{contactForm:h}
--- /dev/null
+<div id="contact">
+ {form.javascript:h}
+ {form.outputHeader():h}
+ {form.hidden:h}
+ {hidden}
+ <table>
+ {foreach:form.sections,sec}
+ <tr>
+ <td class="header" colspan="2">
+ <b>{sec.header:h}</b></td>
+ </tr>
+ {foreach:sec.elements,elem}
+ {if:elem.style}
+ {elem.outputStyle():h}
+ {else:}
+ {if:elem.isButton()}
+ {if:elem.notFrozen()}
+ <tr>
+ <td class="labelcell"> </td>
+ <td class="fieldcell">{elem.html:h}</td>
+ </tr>
+ {end:}
+ {else:}
+ <tr>
+ {if:elem.isType(#textarea#)}
+ <td colspan="2">
+ {if:elem.required}<span class="req">*</span>{end:}
+ {if:elem.error}<div class="req">{end:}
+ {elem.label:h}<br>
+ {if:elem.error}</div>{end:}
+ {else:}
+ {if:elem.isType(#CAPTCHA_Image#)}
+ <td class="labelcell captcha">
+ {if:elem.required}<span class="req">*</span>{end:}
+ {if:elem.error}<div class="req">{end:}
+ {elem.label:h}
+ {if:elem.error}</div>{end:}
+ </td>
+ <td class="fieldcell">
+ {else:}
+ {if:elem.isType(#group#)}
+ <td colspan="2">
+ {if:elem.required}<span class="req">*</span>{end:}
+ {if:elem.error}<div class="req">{end:}
+ {elem.label:h}<br>
+ {if:elem.error}</div>{end:}
+ {else:}
+ <td class="labelcell">
+ {if:elem.required}<span class="req">*</span>{end:}
+ {if:elem.error}<div class="req">{end:}
+ {elem.label:h}
+ {if:elem.error}</div>{end:}
+ </td>
+ {if:elem.isName(#interest#)}
+ <td class="fieldcell checkbox">
+ {else:}
+ <td class="fieldcell">
+ {end:}
+ {end:}
+ {end:}
+ {end:}
+ {if:elem.error}<div class="error">{elem.error}</div>{end:}
+ {if:elem.isType(#group#)}
+ {foreach:elem.elements,gitem}
+ {gitem.label:h}
+ {gitem.html:h}{if:gitem.required}<div class="req">*</div>{end:}
+ {if:elem.separator}{elem.separator:h}{end:}
+ {end:}
+ {else:}
+ {elem.html:h}
+ {if:elem.isName(#captcha_rmv#)}
+ <span
+ class="tooltip"
+ title="Verification Code|To help us distinguish between
+ information submitted by individuals and those automatically
+ entered by software robots, please type the letters shown.">What is this?
+ </span>
+ {end:}
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ {end:}
+ {end:} <!-- end for foreach:sec.element,elem -->
+ {end:} <!-- end for foreach:form.section,sec -->
+
+ </table>
+ </form>
+ {if:form.requirednote}
+ <div>{form.requirednote:h}</div>
+ {end:}
+</div>
--- /dev/null
+<tr>
+ <td class="labelcell">
+ <!-- BEGIN required -->
+ <span class="req">*</span>
+ <!-- END required -->
+ <label>{label}</label>
+ </td>
+ <td class="fieldcell">
+ <!-- BEGIN error -->
+ <div class="req"> {error} </div>
+ <!-- END error -->
+ {element}
+ </td>
+</tr>
--- /dev/null
+<div id="contact">
+ <form{attributes}>
+ {hidden}
+ <table>
+ {content}
+ </table>
+ </form>
+</div>
\ No newline at end of file
--- /dev/null
+<table class="group">
+ <tbody>
+ {content}
+ </tbody>
+</table>
--- /dev/null
+<tr>
+ <td>
+ {element}
+ <!-- BEGIN required -->
+ <span class="req">*</span>
+ <!-- END required -->
+ {label}
+ </td>
+</tr>
--- /dev/null
+<tr class="hdr">
+ <td colspan="2">
+ {header}
+ </td>
+</tr>
--- /dev/null
+<span class="req">* = Required Fields</span>
--- /dev/null
+<h1>Your Trip Planner List</h1>
+<p>Below is the list of businesses you have added to your Trip Planner. The form below will be sent to each individual business listing that has an email address listed with their business listing. For those businesses with no email address, we have included their phone numbers for you to call directly and request additional information.</p>
+<h2 flexy:if="memberDirectNoEmail">Request Information by Phone from:</h2>
+<p>These business listings have no current email address on file. To receive additional information please call the phone numbers listed next to each business name.</p>
+<table flexy:if="memberDirectNoEmail">
+ <tr>
+ <th>Name</td>
+ <th>Phone</td>
+ <th> </td>
+ </tr>
+ {foreach:memberDirectNoEmail,member}
+ <tr class="{member[trclass]}">
+ <td><a href="{member[memberLink]}">{member[memberName]}</a></td>
+ <td>{member[memberPhone]}</td>
+ <td class="rowDelete"><a href="{member[deleteLink]}" style="text-decoration: underline;">Remove</a></td>
+ </tr>
+ {end:}
+</table>
+<h2 flexy:if="memberDirect">Request Information by Email from:</h2>
+<p flexy:if="memberDirect">This list of businesses will receive the following information form directly to their email account.</p>
+<table flexy:if="memberDirect">
+ {foreach:memberDirect,member}
+ <tr class="{member[trclass]}">
+ <td><a href="{member[memberLink]}">{member[memberName]}</a></td>
+ <td class="rowDelete"><a href="{member[deleteLink]}" style="text-decoration: underline;">Remove</a></td>
+ </tr>
+ {end:}
+</table>
+<h2 flexy:if="memberDirect">Plan Your Trip Information Request Form</h2>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <title>{title:h}</title>
+</head>
+<body>
+ <!-- {{{ body -->
+ <p>
+ <font size="4" face="arial, sans-serif">
+ <b>{subject:h}</b>
+ </font>
+ </p>
+ <p>
+ <font size="3" face="arial, sans-serif">
+ <b>From {fname:h} {lname:h}</b>
+ </font>
+ </p>
+ <table cellspacing="0" cellpadding="0" bgcolor="#c0c0c0" border="0">
+ <tr>
+ <td>
+ <table cellspacing="1" cellpadding="5" border="0" bgcolor="#c0c0c0" width="400">
+ {foreach:formData,v}
+ <tr flexy:if="v[element]" bgcolor="#c0c0c0">
+ <td align="right" bgcolor="#ffffff">
+ <font size="2" face="arial, sans-serif">
+ <b>{v[label]:h}</b>
+ </font>
+ </td>
+ {if:v[nowrap]}
+ <td nowrap bgcolor="#ffffff">
+ <font size="2" face="arial, sans-serif">{v[element]:h}</font>
+ </td>
+ {else:}
+ <td bgcolor="#ffffff">
+ <font size="2" face="arial, sans-serif">{v[element]:h}</font>
+ </td>
+ {end:}
+ </tr>
+ {end:}
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table cellspacing="0" cellpadding="10" border="0" width="400">
+ <tr>
+ <td bgcolor="#eeeeee">
+ <font size="1" face="arial, sans-serif">
+ To ensure the delivery of these e-mails to your inbox, please add {email_from:h} to your e-mail Address Book or Safe List.
+ </font>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ </table>
+ <!-- }}} -->
+</body>
+</html>
--- /dev/null
+<html>
+ <style type="text/css">
+ <!--
+ body { background-color: #fff;
+ color: black;
+ font-family: verdana, arial, helvetica, sans-serif;
+ }
+ h1, h2 {font-family: arial, helvetica, sans-serif;}
+ h1 {font-size: 18px; }
+ h2 {font-size: 16px; margin-bottom: 5px;}
+ p {font-size: 12px;}
+ .label {
+ font-weight: bold;
+ background-color: transparent;
+ text-align: right;
+ width: 200px;
+ padding: 5px;
+ }
+ .field {
+ //background-color: #F2F7FB;
+ background-color: #fff;
+ padding: 3px;
+ }
+ table.data {
+ //background-color: #F9FBFD;
+ background-color: #fff;
+ color: #000;
+ width: 500px;
+ //border: 1px solid #D7E5F2;
+ border: 1px solid #ccc;
+ border-collapse: collapse;
+ margin-left: 20px;
+ }
+ table.data td {
+ //border: 1px solid #D7E5F2;
+ border: 1px solid #ccc;
+ padding-left: 4px;
+ font-size: 12px;
+ }
+ -->
+</style>
+<body>
+
+ <p>Dear {fname}</p>
+ <p>Your friend {yname} has been to <a href="baseurl">demo.gaslightmedia.com</a>, and thought you might be interested in it. </p>
+ <p>Message here.</p>
+ <div> </div><br clear="all">
+</body>
+</html>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <title>{title:h}</title>
+</head>
+<body>
+ <!-- {{{ body -->
+ <b>{subject:h}</b>
+ <p>Thank you for requesting the {pdfName} Link. Here is the link to the Adobe PDF version:
+ </p>
+ <p><a href="{pdfLinkURL}">Brochure</a> ({pdfFileSize})</p>
+ <p>Thank you for your interest in {client_info[name]:h}'!</p>
+ <p>Sincerely,</p>
+ <p>{client_info[name]:h}</p>
+ <p>{client_info[url]:h}</p>
+ <!-- }}} -->
+</body>
+</html>
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * Create Datagrids for displaying data
+ *
+ * PHP version 5
+ *
+ * @category Structures
+ * @package Toolkit_DataGridBuilder
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Create Datagrids for displaying data
+ *
+ * This abstract class handles all the base functionality of creating
+ * handeling all the details associated w/ a regular dataGrid.
+ * 1. Creation
+ * 2. Sorting (via column headers or sortform)
+ * 3. Pagenation
+ *
+ * @category Structures
+ * @package Toolkit_DataGridBuilder
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2008 Gaslight Media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @Release CVS: $Id: DataGridBuilder.php,v 1.13 2009/09/16 00:07:44 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ * @see Toolkit_SortForm, Structures_DataGrid
+ */
+abstract class Toolkit_DataGridBuilder extends Structures_DataGrid
+{
+ // {{{ properties
+
+ /**
+ * Options to pass to DataGrid
+ *
+ * @var array
+ * @access protected
+ */
+ protected $options;
+
+ /**
+ * Rendering options for DataGrid
+ *
+ * @var array
+ * @access protected
+ */
+ protected $rendererOptions = array(
+ 'sortIconASC' => '⇑',
+ 'sortIconDESC' => '⇓',
+ 'evenRowAttributes' => 'class="even"',
+ 'oddRowAttributes' => 'class="odd"',
+ 'sortingResetsPaging' => false,
+ );
+
+ /**
+ * Rendering options for DataGrid paging element
+ *
+ * @var array
+ * @access protected
+ */
+ protected $pagerOptions = array(
+ 'nextImg' => 'Next',
+ 'prevImg' => 'Previous',
+ 'separator' => '',
+ 'spacesBeforeSeparator' => 0,
+ 'spacesAfterSeparator' => 0,
+ 'containerClass' => 'paging',
+ );
+
+ /**
+ * SQL query used to obtain the DataGrid
+ *
+ * @var unknown
+ * @access protected
+ */
+ protected $sql;
+
+ /**
+ * How many records must exist in the Datagrid before the sort form shows up
+ *
+ * @var integer
+ * @access protected
+ */
+ protected $sortableAfter = 10;
+
+ /**
+ * The HTML table id of the DataGrid
+ *
+ * @var string
+ * @access protected
+ */
+ protected $tableId = 'dataGrid';
+
+ /**
+ * The HTML class name of the DataGrid
+ *
+ * @var string
+ * @access protected
+ */
+ protected $tableClass = 'dataGrid';
+
+ /**
+ * The HTML id of the DataGrid sorting form (when present)
+ *
+ * @var string
+ * @access protected
+ */
+ protected $sortFormId = 'gridSorter';
+
+ /**
+ * Message to display to users if no records were found
+ *
+ * @var String
+ * @access Protected
+ * @see Toolkit_DataGridBuilder::setNoRecordMessage()
+ */
+ protected $noRecMessage = 'No Records';
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * DataGrid constructor
+ *
+ * Instantiates a DataGrid and sets up when to make the grid sortable
+ *
+ * @param PDO $pdo PDO object used in the datagrid
+ * @param integer $limit The number of records to display per page.
+ * @param integer $page The current page view. In most cases,
+ * this is useless. Note: if you specify
+ * this, the "page"GET variable will be ignored.
+ * @param string $rendererType The type of renderer to use. You may
+ * prefer to use the $type argument of
+ * render, fill or getOutput.
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(
+ PDO $pdo,
+ $limit = null,
+ $page = null,
+ $rendererType = null
+ ) {
+ parent::__construct($limit, $page, $rendererType);
+
+ $this->options = array('dbc' => $pdo);
+ if (!is_null($limit)) {
+ $this->sortableAfter = $limit;
+ }
+ if ($_GET['page_id']) {
+ $this->pagerOptions['path'] = MEDIA_BASE_URL . 'members-only-area/';
+ }
+ }
+
+ // }}}
+
+ // {{{ configureColumns()
+
+ /**
+ * configure retrieved columns
+ *
+ * Tells the DataGrid how to render the retrieved columns
+ *
+ * @return void
+ * @access protected
+ */
+ abstract protected function configureColumns();
+
+ // }}}
+
+ // {{{ setNoRecordMessage()
+
+ /**
+ * The message to display if no results were found from the sql query
+ *
+ * @param string $msg No result message.
+ *
+ * @return void
+ * @access public
+ */
+ public function setNoRecordMessage($msg)
+ {
+ $this->noRecMessage = $msg;
+ }
+
+ // }}}
+ // {{{ setQuery()
+
+ /**
+ * Sets the sql query to use in the DataGrid to get the results
+ *
+ * @param string $sql The SQL query
+ *
+ * @return void
+ * @access public
+ */
+ public function setQuery($sql)
+ {
+ $this->sql = $sql;
+ }
+
+ // }}}
+ // {{{ show()
+
+ /**
+ * Displays the DataGrid results
+ *
+ * @return void
+ * @access public
+ */
+ public function show()
+ {
+ echo $this->toHTML();
+ }
+
+ // }}}
+
+ // {{{ toHTML()
+
+ /**
+ * returns a HTML table of the datagrid
+ *
+ * @return string
+ * @access public
+ */
+ public function toHTML()
+ {
+ $this->configureColumns();
+
+ try {
+ $bind = $this->bind($this->sql, $this->options, 'PDO');
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+
+ if (PEAR::isError($bind)) {
+ return Toolkit_Common::handleError($bind);
+ } elseif (($recCount = $this->getRecordCount()) > 0) {
+ $this->setRendererOptions($this->rendererOptions);
+ $renderer =& $this->getRenderer();
+ // Allows us to turn off the id name for the table,
+ // when we subclass this class out.
+ if ($this->tableId) {
+ $renderer->setTableAttribute('id', $this->tableId);
+ }
+ // Allows us to turn off the class name for the table,
+ // when we subclass this class out.
+ if ($this->tableClass) {
+ $renderer->setTableAttribute('class', $this->tableClass);
+ }
+ $gridBody = $this->getOutput();
+
+ if (PEAR::isError($gridBody)) {
+ return Toolkit_Common::handleError($gridBody);
+ }
+
+ $gridPager = $this->getOutput(
+ DATAGRID_RENDER_PAGER,
+ array('pagerOptions' => $this->pagerOptions)
+ );
+ if (PEAR::isError($gridPager)) {
+ return Toolkit_Common::handleError($gridPager);
+ }
+
+ if ($recCount > $this->sortableAfter) {
+ $form = new Toolkit_SortForm($this->sortFormId);
+ $options = array('directionStyle' => 'radio');
+ $this->fill($form, $options, DATAGRID_RENDER_SORTFORM);
+ // Datagrid never ads a submit button.
+ $form->addElement('submit', null, 'Submit');
+ $gridSorter = $form->toHTML();
+ }
+
+ return $gridPager . $gridSorter . $gridBody . $gridPager;
+ } else {
+ return "<h2>{$this->noRecMessage}</h2>";
+ }
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * Database Singleton
+ *
+ * PHP version 5
+ *
+ * @category Database
+ * @package Database
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: Database.php,v 1.8 2010/05/25 14:09:12 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Database Singleton class
+ *
+ * Used to create a one and only one instance of a databsae PDO object.
+ * Only uses the PHP PDO. Later additions may be worked on the
+ * use master/slave database setups. Hopefully!
+ *
+ * @category Database
+ * @package Database
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2008 Gaslight Media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_Database
+{
+ // {{{ properties
+
+ /**
+ * Master database handler object
+ *
+ * Handles insert/update/delete requests
+ *
+ * @var PDO
+ * @access private
+ */
+ private $_masterDbh;
+
+ /**
+ * Slave database handler object
+ *
+ * Handles read requests
+ *
+ * @var PDO
+ * @access private
+ */
+ private $_slaveDbh;
+
+ /**
+ * Class instance
+ *
+ * @var Toolkit_Database
+ * @access private
+ */
+ private static $_instance;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * Make the database handler connection for the class
+ *
+ * @param boolean $master Whether Use connection for master of slave
+ *
+ * @access private
+ */
+ private function __construct($master)
+ {
+ try {
+ $dsn = 'pgsql:' . CONN_STR;
+ // Keep the fetch mode set to FETCH_BOTH, we use
+ // associative arrays throughout our apps, but some PEAR lib
+ // apps require numerical indicies to work correctly.
+ // i.e. (DataGrids working w/ PDO's)
+ $driverOptions = array(
+ PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_BOTH,
+ );
+ $this->_masterDbh = new PDO($dsn, null, null, $driverOptions);
+ $this->_masterDbh->setAttribute(
+ PDO::ATTR_ERRMODE,
+ PDO::ERRMODE_EXCEPTION
+ );
+ $this->_setDateStyle($this->_masterDbh);
+ $this->_setSearchPath($this->_masterDbh);
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+ // {{{ __clone()
+
+ /**
+ * Clone magic method
+ *
+ * Don't allow cloning of instances of this class
+ * which could potentially duplicate system resources
+ * and make extra DB connections
+ *
+ * @return void
+ * @access private
+ */
+ private function __clone()
+ {
+ // Do nothing so we don't create duplicate resources
+ }
+
+ // {{{ _setDateStyle()
+
+ /**
+ * Set the default date style
+ * @param PDO $dbh
+ */
+ private function _setDateStyle(PDO &$dbh)
+ {
+ $dbh->query("SET DATESTYLE TO 'SQL, US'");
+ }
+
+ // }}}
+ // {{{ _setSearchPath()
+
+ /**
+ * Set the search path for schemas
+ * @param PDO $dbh
+ */
+ private function _setSearchPath(PDO &$dbh)
+ {
+ // Add schemas to search path.
+ $sql = "
+ SELECT set_config(
+ 'search_path',
+ current_setting('search_path') || ', ' || :schema,
+ false
+ )";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindValue(':schema', 'toolbox', PDO::PARAM_STR);
+ $stmt->execute();
+
+ $stmt->bindValue(':schema', 'ckimages', PDO::PARAM_STR);
+ $stmt->execute();
+
+ if (defined('RETAIL_SHOP') && RETAIL_SHOP) {
+ $stmt->bindValue(':schema', 'retail_shop', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+
+ if (defined('GLM_BLOCKS') && GLM_BLOCKS) {
+ // define seasonator search path
+ $stmt->bindValue(':schema', 'blocks', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+
+ if (defined('CONTACT_DB') && CONTACT_DB) {
+ // define banner search path
+ $stmt->bindValue(':schema', 'contacts', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+
+ if (defined('BANNERS') && BANNERS) {
+ // define banner search path
+ $stmt->bindValue(':schema', 'banners', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+
+ if (defined('ROTATING_IMAGES') && ROTATING_IMAGES) {
+ // define rotating images search path
+ $stmt->bindValue(':schema', 'rotatingImages', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+
+ if (defined('PHOTO_GALLERY') && PHOTO_GALLERY) {
+ // define phot gallery search path
+ $stmt->bindValue(':schema', 'photos', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+
+ if (defined('POSTCARD_DB') && POSTCARD_DB) {
+ // define phot gallery search path
+ $stmt->bindValue(':schema', 'postcards', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+
+ if (defined('EVENT_DB') && EVENT_DB) {
+ // define members search path
+ $stmt->bindValue(':schema', 'events', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ // define members search path
+ $stmt->bindValue(':schema', 'members', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+
+ if (defined('COUPONS') && COUPONS) {
+ // define coupon search path
+ $stmt->bindValue(':schema', 'coupons', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+
+ if (defined('PRESS_DB') && PRESS_DB) {
+ // define press/archive search path
+ $stmt->bindValue(':schema', 'press', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+ if (defined('EMPLOYMENT') && EMPLOYMENT) {
+ // define press/archive search path
+ $stmt->bindValue(':schema', 'employment', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+ if (defined('VIDEOS') && VIDEOS) {
+ // define videos search path
+ $stmt->bindValue(':schema', 'videos', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+ if (defined('EVENT_MANAGEMENT') && EVENT_MANAGEMENT) {
+ // define event management search path
+ $stmt->bindValue(':schema', 'reservations', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+
+ if (defined('SEASONS') && SEASONS) {
+ // define seasonator search path
+ $stmt->bindValue(':schema', 'seasons', PDO::PARAM_STR);
+ $stmt->execute();
+ }
+ }
+
+ // }}}
+
+ // {{{ getInstance()
+
+ /**
+ * Get an instance of this class
+ *
+ * If this object hasn't been instantiated once already
+ * then create the object and return the dbh.
+ * Otherwise just return the already instantiated dbh.
+ *
+ * @param boolean $master Whether Use connection for master or slave
+ *
+ * @return PDO $_instance database handler instance
+ * @access public
+ * @static
+ */
+ public static function getInstance($master = true)
+ {
+ settype($master, 'bool');
+
+ if (!(self::$_instance instanceof self)) {
+ self::$_instance = new self($master);
+ }
+
+ return $master
+ ? self::$_instance->_masterDbh
+ : self::$_instance->_slaveDbh;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * Adapter class for linking to the file server
+ *
+ * Base abstract class used to connect and talk with file server
+ * can be subclassed for Files, Images, Video, Audio, etc...
+ *
+ * PHP version 5
+ *
+ * The license text...
+ *
+ * @category Toolkit
+ * @package FileServer
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: AdapterAbstract.php,v 1.6 2010/06/04 11:33:54 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+
+/**
+ * Validation Secret
+ */
+define('IS_VALIDATE_SECRET', 'Glm0IS1secreT');
+
+/**
+ * URL to file server, this is dynamic based on the server
+ * so can be setup for any sandbox
+ */
+define('IS_SUBMIT_URL', FILE_SERVER_URL . 'submit.phtml');
+
+/**
+ * Adapter class for linking to the file server
+ *
+ * @category Toolkit
+ * @package FileServer
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+abstract class Toolkit_FileServer_AdapterAbstract
+{
+ // {{{ properties
+
+ /**
+ * ID of owner that was setup in the file server
+ *
+ * This is defined via the file server web interface
+ * @var string
+ * @access protected
+ */
+ protected $ownerID;
+
+ /**
+ * Owners password that was setup for them
+ *
+ * This is defined via the file server web interface
+ * @var string
+ * @access protected
+ */
+ protected $ownerPW;
+
+ /**
+ * XML to send to the file server
+ * @var unknown
+ * @access protected
+ */
+ protected $xml;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Constructor
+ *
+ * @param string $owner File Server owner
+ * @param string $pword File Server owner password
+ */
+ public function __construct($owner = IS_OWNER_ID, $pword = IS_OWNER_PW)
+ {
+ $this->ownerID = $owner;
+ $this->ownerPW = $pword;
+ }
+
+ // }}}
+
+ // {{{ buildFileServerXML()
+
+ /**
+ * buildFileServerXML
+ *
+ * Create the xml for the FileServerRequest
+ *
+ * @param string $fName File name to upload or delete
+ * @param string $type Upload, Delete or URL
+ *
+ * @return string xml content
+ * @access protected
+ */
+ protected function buildFileServerXML($fName, $type)
+ {
+ $xml = new DOMDocument('1.0');
+ $xml->formatOutput = true;
+
+ $fileServerRequest = $xml->createElement('FileServerRequest');
+ $fileServerRequest->setAttribute('version', '1.0');
+
+ // access request
+ $accessRequest = $xml->createElement('AccessRequest');
+ $owner = $xml->createElement('Owner');
+ $ownerID = $xml->createElement('OwnerID', $this->ownerID);
+ $ownerPW = $xml->createElement('OwnerPW', $this->ownerPW);
+
+ $owner->appendChild($ownerID);
+ $owner->appendChild($ownerPW);
+
+ $accessRequest->appendChild($owner);
+
+ $fileServerRequest->appendChild($accessRequest);
+
+ $file = $this->getFileElement($xml, $type, $fName);
+
+ $fileServerRequest->appendChild($file);
+ $validStr = md5($this->ownerID . $this->ownerPW . IS_VALIDATE_SECRET);
+
+ $validation = $xml->createElement('Validation', $validStr);
+ $fileServerRequest->appendChild($validation);
+ $xml->appendChild($fileServerRequest);
+
+ return $xml->saveXML($xml);
+ }
+
+ // }}}
+
+ // {{{ delete()
+
+ /**
+ * Delete a file from the file server
+ *
+ * @param string $name File name
+ *
+ * @return string file name
+ * @access public
+ * @throws Toolkit_FileServer_Exception
+ */
+ public function delete($name)
+ {
+ // don't do anything if on development server
+ if (defined('DEVELOPMENT') && DEVELOPMENT == true) {
+ return true;
+ }
+ $ch = curl_init();
+
+ $fileData = array(
+ 'request' => $this->buildFileServerXML($name, 'Delete')
+ );
+ $curlOptions = array(
+ CURLOPT_URL => IS_SUBMIT_URL,
+ CURLOPT_HEADER => 0,
+ CURLOPT_RETURNTRANSFER => 1,
+ CURLOPT_POSTFIELDS => $fileData
+ );
+ curl_setopt_array($ch, $curlOptions);
+
+ $response = curl_exec($ch);
+ curl_close($ch);
+
+ try {
+ $xmlDoc = new DOMDocument;
+ $response = str_replace('<?xml version="1.0"?' . '>', '', $response);
+ $xmlDoc->loadXML($response);
+ $successCode = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/ReplyStatus/SuccessCode'
+ );
+ $message = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/ReplyStatus/Message'
+ );
+
+ if ($successCode != 0) {
+ throw new RangeException(
+ "Invalid response `$response` - `$message`"
+ );
+ }
+
+ return $message;
+ } catch (RangeException $e) {
+ Toolkit_Logger::logException('Image Server', $e);
+ throw new Toolkit_FileServer_Exception(
+ 'Invalid File Server Response'
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ getFileElement()
+
+
+ /**
+ * Gets the file element used in the XML sent to the file server
+ *
+ * @param DOMDocument $xml DOM object used to build the xml string
+ * @param string $type Type of manipulation (Upload, URL, Delete)
+ * @param string $fName File name
+ *
+ * @return DOMElement $file File xml element
+ * @access protected
+ */
+ abstract protected function getFileElement(
+ DOMDocument $xml,
+ $type,
+ $fName
+ );
+
+ // }}}
+ // {{{ getErrorMessage()
+
+ /**
+ * Gets an appropriate error message for file upload errors
+ *
+ * @param integer Error code
+ *
+ * @return string Error message
+ * @access protected
+ */
+ protected function getErrorMessage($code)
+ {
+ switch ($code) {
+ case UPLOAD_ERR_INI_SIZE :
+ $message = 'The Uploaded file exceeds the upload max filesize directive in php.ini';
+ break;
+
+ case UPLOAD_ERR_FORM_SIZE :
+ $message = 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form';
+ break;
+
+ case UPLOAD_ERR_PARTIAL :
+ $message = 'The uploaded file was only partially uploaded';
+ break;
+
+ case UPLOAD_ERR_NO_FILE :
+ $message = 'No file was uploaded';
+ break;
+
+ case UPLOAD_ERR_NO_TMP_DIR :
+ $message = 'Missing a temporary folder';
+ break;
+
+ case UPLOAD_ERR_CANT_WRITE :
+ $message = 'Failed to write file to disk';
+ break;
+
+ case UPLOAD_ERR_EXTENSION :
+ $message = 'A PHP extension stopped the file upload';
+ break;
+
+ default :
+ $message = 'Unknown error uploading file';
+ break;
+ }
+
+ return $message;
+ }
+
+ // }}}
+
+ // {{{ upload()
+
+ /**
+ * Upload a file to the File Server
+ *
+ * @param string $name $_FILES index key that holds the file data
+ *
+ * @return array Uploaded file data
+ * @access public
+ * @throws Toolkit_FileServer_Exception
+ */
+ public function upload($name)
+ {
+ $fileType = null;
+ if (preg_match('/^http/', $name)) {
+ $fileType = 'URL';
+ } elseif (isset($_FILES[$name]) && is_array($_FILES[$name])) {
+ $fileType = 'Upload';
+ }
+
+ if ($_FILES[$name]['error'] != 0) {
+ $message = $this->getErrorMessage($_FILES[$name]['error']);
+ throw new Toolkit_FileServer_Exception(
+ $message,
+ $_FILES[$name]['error']
+ );
+ }
+
+ if (is_null($fileType)) {
+ return false;
+ } else {
+ $request = $this->buildFileServerXML($name, $fileType);
+ $ch = curl_init();
+ if ($fileType == 'URL') {
+ $fileData = array(
+ 'request' => $request
+ );
+ } else {
+ if (version_compare(PHP_VERSION, '5.5.0', '>=')) {
+ $fileData = array(
+ 'request' => $request,
+ 'file_upload' => new CurlFile(
+ $_FILES[$name]['tmp_name'],
+ $_FILES[$name]['type'],
+ $_FILES[$name]['name']),
+ 'file_upload_name' => $_FILES[$name]['name']
+ );
+ } else {
+ $fileData = array(
+ 'request' => $request,
+ 'file_upload' => "@{$_FILES[$name]['tmp_name']}",
+ 'file_upload_name' => $_FILES[$name]['name']
+ );
+ }
+ }
+
+ $curlOptions = array(
+ CURLOPT_URL => IS_SUBMIT_URL,
+ CURLOPT_HEADER => 0,
+ CURLOPT_RETURNTRANSFER => 1,
+ CURLOPT_POST => 1,
+ CURLOPT_POSTFIELDS => $fileData
+ );
+ curl_setopt_array($ch, $curlOptions);
+
+ $response = curl_exec($ch);
+ curl_close($ch);
+
+ try {
+ $xmlDoc = new DOMDocument();
+ $response = str_replace('<?xml version="1.0"?' . '>', '', $response);
+ $xmlDoc->loadXML($response);
+ $successCode = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/ReplyStatus/SuccessCode'
+ );
+ $message = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/ReplyStatus/Message'
+ );
+ $storedName = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/StoredName'
+ );
+ $storedSize = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/StoredSize'
+ );
+ $mediaType = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/MediaType'
+ );
+
+ if ($successCode != 0) {
+ throw new RangeException(
+ "Invalid response `$response` - `$message`"
+ );
+ }
+
+ $extension = end(explode('.', $storedName));
+ return array(
+ 'name' => $storedName,
+ 'size' => $storedSize,
+ 'type' => $mediaType,
+ 'extension' => $extension,
+ );
+ } catch (RangeException $e) {
+ Toolkit_Logger::logException('Image Server', $e);
+ throw new Toolkit_FileServer_Exception(
+ 'Invalid File Server Response'
+ );
+ }
+ }
+ }
+
+ // }}}
+
+ // {{{ xmlPathContent()
+
+ /**
+ * Extract a XML node value
+ *
+ * @param DOMDocument $dom DOM object holding the XML
+ * @param string $content Node name to extract content from
+ *
+ * @return mixed Node value on success, false if can't find the value
+ * @access protected
+ */
+ protected function xmlPathContent(DOMDocument $dom, $content)
+ {
+ $xPath = new DOMXPath($dom);
+ $nodeList = $xPath->query($content);
+ if ($nodeList->length > 0) {
+ $node = $nodeList->item(0);
+ return $node->nodeValue;
+ }
+
+ return false;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+class Toolkit_FileServer_Exception extends RuntimeException
+{
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * File Adapter
+ *
+ * Link to the file server and allow file storage and deletion
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package FileServer
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: FileAdapter.php,v 1.4 2010/05/25 14:02:28 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * File Adapter
+ *
+ * Used for linking to the file server for file uploading, storage and deletion
+ *
+ * @category Toolkit
+ * @package FileServer
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_FileServer_FileAdapter extends Toolkit_FileServer_AdapterAbstract
+{
+ // {{{ getFileElement()
+
+ /**
+ * Creates the file element for the XML string
+ *
+ * @param DOMDocument $xml XML object used to build the string
+ * @param string $type Type of action to take on the file (Upload, Delete)
+ * @param string $fName file name to delete
+ *
+ * @return DOMElement $file File xml element
+ * @access protected
+ * @throws RuntimeException
+ */
+ protected function getFileElement(DOMDocument $xml, $type, $fName)
+ {
+ $file = $xml->createElement('File');
+
+ switch ($type) {
+ case 'Upload' :
+ $action = $xml->createElement('FileAction', 'Submit');
+ $delivery = $xml->createElement('DeliveryMethod', 'Submit');
+ $fieldName = $xml->createElement('FieldName', 'file_upload');
+
+ $fileName = filter_var($_FILES[$fName]['name'], FILTER_SANITIZE_STRING);
+ $nameParts = explode('.', $fileName);
+ $extension = end($nameParts);
+ $fieldName = $xml->createElement('Extension', end($nameParts));
+
+ $file->appendChild($action);
+ $file->appendChild($delivery);
+ $file->appendChild($fieldName);
+ break;
+
+ case 'URL':
+ $action = $xml->createElement('FileAction', 'Submit');
+ $delivery = $xml->createElement('DeliveryMethod', 'URL');
+ $src = $xml->createElement('Src', $fName);
+
+ $nameParts = explode('.', $fName);
+ $extension = end($nameParts);
+ $fieldName = $xml->createElement('Extension', end($nameParts));
+
+ $file->appendChild($action);
+ $file->appendChild($delivery);
+ $file->appendChild($src);
+ $file->appendChild($fieldName);
+ break;
+
+ case 'Delete' :
+ $action = $xml->createElement('FileAction', 'Delete');
+ $file->appendChild($action);
+
+ $fileName = $xml->createElement('FileName', $fName);
+ $file->appendChild($fileName);
+ break;
+
+ default :
+ throw new RuntimeException("Invalid XML type - `$type`.");
+ break;
+ }
+
+ return $file;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * Image Adapter
+ *
+ * Link to the file server and allow image storage and deletion
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package FileServer
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: ImageAdapter.php,v 1.5 2010/06/04 11:34:31 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Image Adapter
+ *
+ * Used for linking to the file server for image uploading, storage and deletion
+ *
+ * @category Toolkit
+ * @package FileServer
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_FileServer_ImageAdapter extends Toolkit_FileServer_AdapterAbstract
+{
+ // {{{ getAllowedMimeTypes()
+
+ /**
+ * Get the mime types that are allowed to be uploaded
+ *
+ * @return array allowed mime types
+ */
+ public function getAllowedMimeTypes()
+ {
+ return array(
+ 'image/jpe',
+ 'image/jpeg',
+ 'image/jpg',
+ 'image/jfif',
+ 'image/pjpeg',
+ 'image/pjp',
+ 'image/gif',
+ 'image/gif',
+ 'image/png',
+ );
+ }
+
+ // }}}
+ // {{{ getFileElement()
+
+ /**
+ * Creates the file element for the XML string
+ *
+ * @param DOMDocument $xml XML object used to build the string
+ * @param string $type Type of action to take on the file (Upload, Delete)
+ * @param string $fName file name to delete
+ *
+ * @return DOMElement $file File xml element
+ * @access protected
+ * @throws RuntimeException
+ */
+ protected function getFileElement(DOMDocument $xml, $type, $fName)
+ {
+ $file = $xml->createElement('File');
+
+ switch ($type) {
+ case 'Upload' :
+ $action = $xml->createElement('FileAction', 'Submit');
+ $delivery = $xml->createElement('DeliveryMethod', 'Submit');
+ $fieldName = $xml->createElement('FieldName', 'file_upload');
+
+ $file->appendChild($action);
+ $file->appendChild($delivery);
+ $file->appendChild($fieldName);
+ break;
+
+ case 'URL':
+ $action = $xml->createElement('FileAction', 'Submit');
+ $delivery = $xml->createElement('DeliveryMethod', 'URL');
+ $src = $xml->createElement('Src', $fName);
+
+ $file->appendChild($action);
+ $file->appendChild($delivery);
+ $file->appendChild($src);
+ break;
+
+ case 'Delete':
+ $action = $xml->createElement('FileAction', 'Delete');
+ $file->appendChild($action);
+
+ $fileName = $xml->createElement('FileName', $fName);
+ $file->appendChild($fileName);
+ break;
+
+ default :
+ throw new RuntimeException("Invalid XML type - `$type`.");
+ break;
+ }
+
+ return $file;
+ }
+
+ // }}}
+ // {{{ getImageSize()
+
+ /**
+ * getImageSize
+ *
+ * Return image data on an image from image server
+ *
+ * @param string $image Full URI to image
+ * http://is0/userId/imageStyle/imageName
+ * Must be a full URI including an authority.
+ * No relative URIs, the // are mandatory
+ *
+ * @return array Image data 0 => width, 1 => height, 2 => html
+ * @access public
+ * @throws Exception
+ */
+ public function getImageSize($image)
+ {
+ $options = array('allowed_schemes' => array('http','https'));
+ if (!Validate::uri($image, $options)) {
+ throw new Exception('Invalid URI for the image');
+ }
+
+ $ch = curl_init();
+ $curlOptions = array(
+ CURLOPT_URL => "{$image}/info",
+ CURLOPT_HEADER => 0,
+ CURLOPT_RETURNTRANSFER => 1,
+ CURLOPT_POSTFIELDS => $fileData
+ );
+ curl_setopt_array($ch, $curlOptions);
+
+ $response = curl_exec($ch);
+ curl_close($ch);
+
+ if (!@simplexml_load_string($response)) {
+ $logger = Toolkit_Logger::getLogger();
+ $logger->warning("$response - $image");
+ }
+
+ $wPattern = '/<width>(.*)<\/width>/';
+ preg_match($wPattern, $response, $matches);
+ $width = $matches[1];
+ $hPattern = '/<height>(.*)<\/height>/';
+ preg_match($hPattern, $response, $matches);
+ $height = $matches[1];
+ $html = "width=\"{$width}\" height=\"{$height}\"";
+ return array($width, $height, $html);
+ }
+
+ // }}}
+ // {{{ uploadImageFile()
+
+ /**
+ * Upload a file to the File Server
+ *
+ * @param string $fname full path to image file
+ *
+ * @return array Uploaded file data
+ * @access public
+ * @throws Toolkit_FileServer_Exception
+ */
+ public function uploadImageFile($fname)
+ {
+ if (!file_exists($fname)) {
+ throw new RuntimeException("could not find file `$fname`");
+ }
+
+ $request = $this->buildFileServerXML(basename($fname), 'Upload');
+
+ $ch = curl_init();
+ if (version_compare(PHP_VERSION, '5.5.0', '>=')) {
+ $fileData = array(
+ 'request' => $request,
+ 'file_upload' => new CurlFile(
+ $_FILES[$fname]['tmp_name'],
+ $_FILES[$fname]['type'],
+ $_FILES[$fname]['name']),
+ 'file_upload_name' => basename($fname)
+ );
+ } else {
+ $fileData = array(
+ 'request' => $request,
+ 'file_upload' => "@$fname",
+ 'file_upload_name' => basename($fname)
+ );
+ }
+
+ $curlOptions = array(
+ CURLOPT_URL => IS_SUBMIT_URL,
+ CURLOPT_HEADER => 0,
+ CURLOPT_RETURNTRANSFER => 1,
+ CURLOPT_POSTFIELDS => $fileData
+ );
+ curl_setopt_array($ch, $curlOptions);
+
+ $response = curl_exec($ch);
+ curl_close($ch);
+
+ try {
+ $xmlDoc = new DOMDocument();
+ $response = str_replace('<?xml version="1.0"?'. '>', '', $response);
+ $xmlDoc->loadXML($response);
+ $successCode = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/ReplyStatus/SuccessCode'
+ );
+ $message = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/ReplyStatus/Message'
+ );
+ $storedName = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/StoredName'
+ );
+ $storedSize = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/StoredSize'
+ );
+ $mediaType = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/MediaType'
+ );
+
+ if ($successCode != 0) {
+ throw new RangeException(
+ "Invalid response `$response` - `$message`"
+ );
+ }
+
+ return array(
+ 'name' => $storedName,
+ 'size' => $storedSize,
+ 'type' => $mediaType,
+ );
+ } catch (RangeException $e) {
+ Toolkit_Logger::logException('Image Server', $e);
+ throw new Toolkit_FileServer_Exception(
+ 'Invalid File Server Response'
+ );
+ }
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * Mock Image Adapter
+ *
+ * Mocks uploading and deleting images from the image server
+ * This script prevents unneeded resources from being uploaded
+ * or deleted from the file server
+ *
+ * PHP version 5
+ *
+ * @category FileServer
+ * @package Toolkit_FileServer
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: ImageAdapter.php,v 1.1 2010/07/29 16:30:02 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Mock Image Adapter
+ *
+ * Mocks uploading and deleting images from the image server
+ * This script prevents unneeded resources from being uploaded
+ * or deleted from the file server
+ *
+ * @category FileServer
+ * @package Toolkit_FileServer
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_FileServer_Mock_ImageAdapter
+ extends Toolkit_FileServer_ImageAdapter
+{
+ // {{{ getImageSize()
+
+ /**
+ * getImageSize
+ *
+ * Return image data on an image from image server
+ *
+ * @param string $image Full URI to image
+ * http://is0/userId/imageStyle/imageName
+ * Must be a full URI including an authority.
+ * No relative URIs, the // are mandatory
+ *
+ * @return array Image data 0 => width, 1 => height, 2 => html
+ * @access public
+ * @throws Exception
+ */
+ public function getImageSize($image)
+ {
+ $width = $height = 1;
+ $html = "width=\"{$width}\" height=\"{$height}\"";
+ return array($width, $height, $html);
+ }
+
+ // }}}
+ // {{{ uploadImageFile()
+
+ /**
+ * Upload a file to the File Server
+ *
+ * @param string $fname full path to image file
+ *
+ * @return array Uploaded file data
+ * @access public
+ * @throws Toolkit_FileServer_Exception
+ */
+ public function uploadImageFile($fname)
+ {
+ return array(
+ 'name' => 'is00-mock-image.jpg',
+ 'size' => 100,
+ 'type' => 'image/jpeg',
+ );
+ }
+
+ // }}}
+ // {{{ upload()
+
+ /**
+ * Upload a file to the File Server
+ *
+ * @param string $name $_FILES index key that holds the file data
+ *
+ * @return array Uploaded file data
+ * @access public
+ * @throws Toolkit_FileServer_Exception
+ */
+ public function upload($name)
+ {
+ return array(
+ 'name' => 'is00-mock-image.jpg',
+ 'size' => 100,
+ 'type' => 'image/jpeg',
+ );
+ }
+
+ // }}}
+ // {{{ delete()
+
+ /**
+ * Delete a file from the file server
+ *
+ * @param string $name File name
+ *
+ * @return string file name
+ * @access public
+ * @throws Toolkit_FileServer_Exception
+ */
+ public function delete($name)
+ {
+ return true;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * Create Flexy templating Datagrids for displaying data
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package FlexyDataGridBuilder
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: FlexyDataGridBuilder.php,v 1.14 2010/07/25 17:08:39 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Create Flexy templating Datagrids for displaying data
+ *
+ * This abstract class handles all the base functionality of creating
+ * handeling all the details associated w/ a Flexy template datagrid
+ * 1. Creation
+ * 2. Sorting (via column headers or sortform)
+ * 3. Pagenation
+ *
+ * @category Toolkit
+ * @package FlexyDataGridBuilder
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2008 Gaslight Media
+ * @license http://www.gaslightmedia.com/Gaslightmedia Gaslightmedia
+ * @link http://pear.php.net/package/Structures_DataGrid/docs
+ * @see Structures_DataGrid_Renderer_Flexy, HTML_Template_Flexy
+ */
+abstract class Toolkit_FlexyDataGridBuilder extends Toolkit_DataGridBuilder
+{
+ // {{{ properties
+
+ /**
+ * Name of the table which we will be dealing with
+ *
+ * @var string
+ * @access protected
+ */
+ protected $tableName;
+
+ /**
+ * The name of the template that renders this datagrid
+ *
+ * @var string
+ * @access protected
+ */
+ protected $template;
+
+ /**
+ * Output an object as $t to the template
+ *
+ * converts array keys to objects usable in a template form.
+ *
+ * <code>
+ * $this->ctrlObj['url'] = MEDIA_BASE_URL;
+ * </code>
+ *
+ * <example>
+ * <img alt="{row[img]} src="{url}images/member_thumb/{row[img]}">
+ * </example>
+ *
+ * @var array
+ * @access protected
+ */
+ protected $ctrlObj = array();
+
+ /**
+ * Rendering options for DataGrid
+ *
+ * @var array
+ * @access protected
+ */
+ protected $rendererOptions = array(
+ 'sortIconASC' => '⇑',
+ 'sortIconDESC' => '⇓',
+ 'sortingResetsPaging' => false,
+ );
+
+ /**
+ * The HTML id of the DataGrid
+ *
+ * @var string
+ * @access protected
+ */
+ protected $gridId = 'dataGrid';
+
+ /**
+ * The HTML class of the DataGrid
+ *
+ * @var string
+ * @access protected
+ */
+ protected $gridClass = 'dataGrid';
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Constructor
+ *
+ * Builds the DataGrid class.
+ *
+ * @param PDO $pdo PDO object used in the datagrid
+ * @param integer $limit The number of records to display per page.
+ * @param integer $page The current page view. In most cases,
+ * this is useless. Note: if you specify
+ * this, the "page"GET variable will be ignored.
+ * @param string $rendererType The type of renderer to use. You may
+ * prefer to use the $type argument of
+ * render, fill or getOutput.
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(
+ PDO $pdo,
+ $limit = null,
+ $page = null,
+ $rendererType = null
+ ) {
+ $this->dbh = $pdo;
+ if (ctype_digit($_GET['setPerPage'])) {
+ $limit = $_GET['setPerPage'];
+ }
+
+ parent::__construct($pdo, $limit, $page, $rendererType);
+
+ // If all records show on one page, then hide sort form.
+ if (!is_null($limit)) {
+ $this->sortableAfter = $limit;
+ }
+ }
+
+ // }}}
+
+ // {{{ show()
+
+ /**
+ * Displays the DataGrid results
+ *
+ * @param Structures_DataGrid_Renderer_Flexy $renderer Rendering engine used to render DG
+ *
+ * @return void
+ * @access public
+ */
+ public function show(Structures_DataGrid_Renderer_Flexy $renderer)
+ {
+ echo $this->toHtml($renderer);
+ }
+
+ // }}}
+
+ // {{{ toHtml()
+
+ /**
+ * Returns the DataGrid
+ *
+ * @param Structures_DataGrid_Renderer_Flexy $renderer Rendering engine used to render DG
+ * @param string $template Template to use
+ *
+ * @return string html templated datagrid results
+ * @access public
+ */
+ public function toHtml(
+ Structures_DataGrid_Renderer_Flexy $renderer,
+ $template = null
+ ) {
+ $this->configureColumns();
+
+ try {
+ $bind = $this->bind($this->sql, $this->options, 'PDO');
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+
+ if (PEAR::isError($bind)) {
+ return Toolkit_Common::handleError($bind);
+ }
+
+ if (method_exists($this, 'setControlObject')) {
+ $this->setControlObject();
+ foreach ($this->ctrlObj as $k => $v) {
+ $renderer->$k = $v;
+ }
+ }
+
+ $renderer->setOptions($this->rendererOptions);
+ $renderer->setOptions(array('pagerOptions' => $this->pagerOptions));
+
+ $this->attachRenderer($renderer);
+ $tEngine = $renderer->getContainer();
+
+ $pathToTemplate = $tEngine->options['templateDir'][0];
+
+ if ( !is_null($template)
+ && file_exists("$pathToTemplate/$template")
+ ) {
+ $tEngine->compile($template);
+ } elseif (isset($this->template)
+ && file_exists($pathToTemplate . $this->template)
+ ) {
+ $tEngine->compile($this->template);
+ } else {
+ throw new RuntimeException('Template not available');
+ }
+
+ // Get the entire datagrid body.
+ $gridBody = $this->getOutput();
+ if (PEAR::isError($gridBody)) {
+ return Tolkit_Common::handleError($gridBody);
+ }
+
+ return $gridSorter . $gridBody;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * Define how form objects should be built
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Form
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: Form.php,v 1.6 2009/08/31 17:43:48 jamie Exp $
+ * @link http://demo.gaslightmedia.com/
+ */
+
+/**
+ * Minimum form object method definitions
+ *
+ * Each form must at least define some elements and setup the rules for
+ * that form. They must also create a method which handless extracting
+ * the form object into an html string suitable to be displayed onto a
+ * page.
+ *
+ * @category Toolkit
+ * @package Form
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com/
+ */
+interface Toolkit_Form
+{
+ // {{{ configureElements()
+
+ /**
+ * Defines all elements to be used in a form
+ *
+ * Creates an array of elements and passes them off to the setupElements
+ * function wich adds each element to the form object.
+ *
+ * <code>
+ * public function configureElements()
+ * {
+ * $e = array();
+ *
+ * $e[] = array(
+ * 'type' => 'text',
+ * 'req' => false
+ * 'name' => 'text_field',
+ * 'display' => 'Text Label',
+ * );
+ * $e[] = array(
+ * 'type' => 'checkbox',
+ * 'req' => false
+ * 'name' => 'checkbox_field',
+ * 'display' => 'Checkbox Label',
+ * );
+ *
+ * // ... More Element Definitions
+ *
+ * $this->setupElements($e);
+ * }
+ * </code>
+ *
+ * @access public
+ * @return void
+ */
+ //public function configureElements();
+
+ // }}}
+ // {{{ configureForm()
+
+ /**
+ * Calls all the configuration methods to configure a form for use
+ *
+ * @access public
+ * @return void
+ */
+ //public function configureForm();
+
+ // }}}
+ // {{{ configureRules()
+
+ /**
+ * Defines all element rules to be used for validation in the form
+ *
+ * At the bare minimum, this function needs to be called to setup the
+ * form rules, even if no extra rules are defined. Because it still
+ * creates all the required rules that are defined w/ each element.
+ *
+ * <code>
+ * public function configureRules()
+ * {
+ * $r = array();
+ *
+ * $r[] = array(
+ * 'element' => 'text_field',
+ * 'message' => 'ERROR: 10 characters max!',
+ * 'type' => 'maxlength',
+ * 'format' => 10,
+ * 'validation' => $this->validationType,
+ * 'reset' => true,
+ * 'force' => false,
+ * );
+ * $r[] = array(
+ * 'element' => 'text_field',
+ * 'message' => 'ERROR: Numric characters only!',
+ * 'type' => 'numeric',
+ * 'format' => null,
+ * 'validation' => $this->validationType,
+ * 'reset' => true,
+ * 'force' => false,
+ * );
+ *
+ * // ... More Rule Definitions
+ *
+ * $this->setupRules($r);
+ * }
+ * </code>
+ *
+ * @access public
+ * @return void
+ */
+ public function configureRules();
+
+ // }}}
+ // {{{ toHtml()
+
+ /**
+ * Get an html string that contains the form
+ *
+ * Check if the form needs to be validated (ie. it was submitted)
+ * Check if submitted data needs to be processed
+ *
+ * @access public
+ * @return string an html string that contains the entire form
+ */
+ public function toHtml();
+
+ // }}}
+}
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * File Doc Comment
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package FormBuilder
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: FormBuilder.php,v 1.48 2010/08/05 14:19:47 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Allow the inclusion of the Element Grid plugin for QuickForms
+ */
+require_once 'HTML/QuickForm/ElementGrid.php';
+
+/**
+ * Handle QuickForm CAPTCHA's
+ */
+require_once 'HTML/QuickForm/CAPTCHA/Image.php';
+
+/**
+ * Require PEAR QuickForm class
+ */
+require_once 'HTML/QuickForm.php';
+
+require_once 'HTML/QuickForm/Rule/Zip.php';
+require_once 'HTML/QuickForm/Rule/Phone.php';
+require_once 'HTML/QuickForm/Rule/Banwords.php';
+require_once 'HTML/QuickForm/Rule/State.php';
+
+/**
+ * Base functionality for creating HTML_Quickforms
+ *
+ * @category Toolkit
+ * @package FormBuilder
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2008 Gaslight Media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+abstract class Toolkit_FormBuilder extends HTML_QuickForm
+{
+ // {{{ properties
+
+ /**
+ * Holds if the form has been validated
+ *
+ * once the form is validated, store the result of the validation
+ * in this variable. That way, if multiple validations are attempted
+ * we don't have to reprocess all the data
+ *
+ * @var boolean
+ * @access protected
+ */
+ protected $validated = false;
+
+ /**
+ * Global form captcha question element
+ *
+ * @var object
+ * @access protected
+ */
+ protected $captchaQuestion;
+
+ /**
+ * Global form captcha answer from user
+ *
+ * @var object
+ * @access protected
+ */
+ protected $captchaAnswer;
+
+ /**
+ * Form submitted data used when emailing form results
+ *
+ * @var array
+ * @access protected
+ */
+ protected $formData = array();
+
+ /**
+ * Automatically create validation rules for any date elements
+ *
+ * This will only work if the date element is in m-d-Y format
+ *
+ * @var boolean
+ * @access protected
+ */
+ protected $autoValidateDateElements = true;
+
+ /**
+ * How do we want to validate the form
+ *
+ * Possible options are [server, client]
+ *
+ * @var string
+ * @access protected
+ */
+ protected $validationType = 'server';
+
+ /**
+ * Some special forms dont utlize this stylesheet
+ * Allow classes to override this setting so it doesn't
+ * get included
+ *
+ * @var boolean
+ * @access protected
+ */
+ protected $includeContactStyleSheet = true;
+
+ /**
+ * What do you want the error msg to be if the form doesn't validate
+ *
+ * @var string
+ * @access protected
+ */
+ protected $errorMsg
+ = '<div id="form-warning-top">
+ Warning: The form was not sent, please review the errors below.
+ </div>';
+
+ /**
+ * What do you want the success msg to be if the form validates successfully
+ *
+ * @var string
+ * @access protected
+ */
+ protected $successMsg
+ = '<div id="form-success-top">
+ The information below has been successfully submitted.
+ </div>';
+
+ /**
+ * Whether uploaded files should be processed too (if present)
+ *
+ * @var string
+ * @access protected
+ */
+ protected $mergeFiles = true;
+
+ /**
+ * Include a captcha on the form or not
+ *
+ * @var boolean
+ * @access protected
+ */
+ protected $useCaptcha;
+
+ /**
+ * The default templates to inject into the form renderer
+ *
+ * @var string
+ * @access protected
+ */
+ protected $template;
+
+ /**
+ * The default rules to register for validating
+ *
+ * We have to register these rules, or any others we want, before
+ * we are able to use them in our forms.
+ *
+ * These rules can be removed in subclasses before the rules are configured
+ * if you want to omit any of them from validating input - just remember
+ * to not call them in your configured rules!
+ *
+ * Phone: validates input against US and CA style phone #'s
+ * <code>
+ * $rules[] = array('element' => 'phone',
+ * 'message' => 'ERROR: Invalid Phone Format!',
+ * 'type' => 'phone',
+ * 'format' => null,
+ * 'validation' => $this->validationType,
+ * 'reset' => true,
+ * 'force' => false);
+ * </code>
+ *
+ * Zip: Validates input against US and CA zip codes, if DB check is
+ * set to true, validate zip codes against all the zip codes in the
+ * DB.
+ * <code>
+ * $rules[] = array('element' => 'zip',
+ * 'message' => 'ERROR: Invalid Zip!',
+ * 'type' => 'zip',
+ * 'format' => array('requireDBCheck' => true),
+ * 'validation' => $this->validationType,
+ * 'reset' => true,
+ * 'force' => false);
+ * </code>
+ *
+ * Banwords: Make sure each each doesn't contain a banned word. Checking
+ * against a DB of banned words.
+ *
+ * State: Validate input against US and CA region / province codes. If DB
+ * check is set to true, validate region / province against all the
+ * regions / provinces in the DB.
+ * <code>
+ * $rules[] = array('element' => 'state_id',
+ * 'message' => 'ERROR: Invalid State / Province!',
+ * 'type' => 'state',
+ * 'format' => array('requireDBCheck' => true),
+ * 'validation' => $this->validationType,
+ * 'reset' => true,
+ * 'force' => false);
+ * </code>
+ *
+ * @var array
+ * @access protected
+ * @see app.gaslightmedia.com/glmPEAR/HTML/QuickForm/Rule/Zip.php
+ * @see app.gaslightmedia.com/glmPEAR/HTML/QuickForm/Rule/Phone.php
+ * @see app.gaslightmedia.com/glmPEAR/HTML/QuickForm/Rule/Banwords.php
+ * @see app.gaslightmedia.com/glmPEAR/HTML/QuickForm/Rule/State.php
+ */
+ protected $registeredRules = array('phone', 'zip', 'state');
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param string $formName Form's name.
+ * @param string $method (optional)Form's method defaults to 'POST'
+ * @param string $action (optional)Form's action
+ * @param string $target (optional)Form's target defaults to '_self'
+ * @param mixed $attributes (optional)Extra attributes for <form> tag
+ * @param bool $trackSubmit (optional)Whether to track if the form was
+ * submitted by adding a special hidden field
+ *
+ * @access public
+ * @link http://pear.php.net/package/HTML_QuickForm/docs/latest/HTML_QuickForm/HTML_QuickForm.html
+ * @see HTML_QuickForm
+ * @todo Remove assigning the dbh the global dbh and setup a PDO
+ * to be passed in from a parameter - this will allow for easier
+ * PHPUnit testing
+ */
+ public function __construct(
+ $formName,
+ $method = 'post',
+ $action = '',
+ $target = '',
+ $attributes = null,
+ $trackSubmit = false
+ ) {
+ // T_VARIABLE error when passing this server
+ // var in on the constructors params.
+ $action = empty($action) ? $_SERVER['REQUEST_URI'] : $action;
+ parent::__construct(
+ $formName,
+ $method,
+ $action,
+ $target,
+ $attributes,
+ $trackSubmit
+ );
+ $this->template = BASE . 'Toolkit/Forms/templates/tables/';
+ $this->dbh = Toolkit_Database::getInstance();
+
+ if ($this->includeContactStyleSheet) {
+ $baseURL = MEDIA_BASE_URL;
+ $GLOBALS['styleSheets'][] = $baseURL . 'css/contactform.css';
+ }
+ }
+
+ // }}}
+
+ // {{{ addCharLimit()
+
+ /**
+ * adds a maxlength character limitation to an element
+ *
+ * @param string $element The name of the element to add
+ * the char limit to
+ * @param integer $limit The number of characters allowed
+ *
+ * @return void
+ * @access public
+ */
+ public function addCharLimit($element, $limit)
+ {
+ $this->addRule(
+ $element,
+ "ERROR: $limit characters max!",
+ 'maxlength',
+ $limit,
+ 'server'
+ );
+ // Add a maxlength attribute to the field on the form
+ // which will help prevent users from sending over 100 chars
+ // to the server in the first place.
+ if ($this->getElementType($element) == 'text') {
+ $e =& $this->getElement($element);
+ $e->setMaxLength($limit);
+ }
+ }
+
+ // }}}
+ // {{{ apiVersion()
+
+ /**
+ * Returns the current FormBuilder API version
+ *
+ * @since 1.10
+ * @access public
+ * @return float
+ */
+ public function version()
+ {
+ return 1.1;
+ }
+
+ // }}}
+
+ // {{{ checkDateInput()
+
+ /**
+ * Checks the validation of a m-d-Y date
+ *
+ * This function will only be called if the autoValidateDateElements
+ * property is set to true.
+ *
+ * @param array $value Date element from form.
+ *
+ * @return boolean
+ * @access public
+ * @see Toolkit_FormBuilder->autoValidateDateElements
+ */
+ public function checkDateInput($value)
+ {
+ if ( empty($value['m'])
+ || empty($value['d'])
+ || empty($value['Y'])
+ ) {
+ return false;
+ }
+ return checkdate($value['m'], $value['d'], $value['Y']);
+ }
+
+ // }}}
+ // {{{ cleanElements()
+
+ /**
+ * Removes elements from form
+ *
+ * Loops through elements and if any names end in '_rmv' they are removed
+ * from the form object.
+ *
+ * Dynamically finds all elements on a form and removes any that
+ * end in '_rmv'. This can be really usefull if you want to display
+ * from results after the form was successfully submitted and validated,
+ * but don't need to display any extra form elements initially displayed
+ * on the form (like email confirmation fields, or static instruction
+ * elements).
+ *
+ * @param array $elements Form elements.
+ *
+ * @return void
+ * @access protected
+ */
+ protected function cleanElements($elements)
+ {
+ if (is_array($elements)) {
+ foreach ($elements as $e) {
+ if ($e['type'] == 'group') {
+ $this->cleanGroup($e['name']);
+ } elseif (preg_match('/^.+_rmv$/', $e['name'])) {
+ $this->removeElement($e['name']);
+ }
+ }
+ }
+ }
+
+ // }}}
+ // {{{ cleanForm()
+
+ /**
+ * Removes elements from form
+ *
+ * Dynamically finds all elements on a form and removes any that
+ * end in '_rmv'. This can be really usefull if you want to display
+ * from results after the form was successfully submitted and validated,
+ * but don't need to display any extra form elements initially displayed
+ * on the form (like email confirmation fields, or static instruction
+ * elements).
+ *
+ * @return void
+ * @access protected
+ */
+ protected function cleanForm()
+ {
+ $formArray = $this->toArray();
+ if (array_key_exists('sections', $formArray)) {
+ foreach ($formArray['sections'] as $k) {
+ if (preg_match('/^.+_rmv$/', $k['name'])) {
+ $this->removeElement($k['name']);
+ }
+ $this->cleanElements($k['elements']);
+ }
+ } else {
+ $this->cleanElements($formArray['elements']);
+ }
+ }
+
+ // }}}
+ // {{{ cleanGroup()
+
+ /**
+ * Removes any elements from a group that have names that end in '_rmv'
+ *
+ * @param string $name The name of the group element
+ *
+ * @return void
+ * @access protected
+ */
+ protected function cleanGroup($name)
+ {
+ $e =& $this->getElement($name);
+ $g =& $e->getElements();
+ $i = 0;
+ while ($name = $e->getElementName($i++)) {
+ if (preg_match('/^.+_rmv/', $name)) {
+ unset($g[($i - 1)]);
+ }
+ }
+ }
+
+ // }}}
+ // {{{ createGridElement()
+
+ /**
+ * Creates a grid element for the form
+ *
+ * Written so this can be overridden easily in subclasses later if needed!
+ *
+ * @param string $elementType QuickForm ElementGrid element definition
+ *
+ * @return mixed ElementGrid element.
+ * @access protected
+ */
+ protected function &createGridElement($elementType)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array($this, 'createElement'), $args);
+
+ }
+
+ // }}}
+
+ // {{{ getErrorMessage()
+
+ public function getErrorMessage()
+ {
+ return $this->errorMsg;
+ }
+
+ // }}}
+ // {{{ prepElement()
+
+ /**
+ * Make sure all the element array indexes are set
+ *
+ * @param array &$e Element to prep
+ *
+ * @return void
+ * @access protected
+ */
+ protected function prepElement(&$e)
+ {
+ if (!isset($e['opts'])) {
+ $e['opts'] = '';
+ }
+ if (!isset($e['att'])) {
+ $e['att'] = '';
+ }
+ if (!isset($e['val'])) {
+ $e['val'] = '';
+ }
+ if (!isset($e['display'])) {
+ $e['display'] = '';
+ }
+ if (!isset($e['label'])) {
+ $e['label'] = '';
+ }
+ if (!isset($e['noCharLimit'])) {
+ $e['noCharLimit'] = false;
+ }
+ }
+
+ // }}}
+
+ // {{{ registerRules()
+
+ /**
+ * Registers custom form rules you can use when validating
+ *
+ * If the registeredRule token is an array, any QF rule can be
+ * registered. This is useful if you want to register rules
+ * from outside classes
+ * e.g. (Validate, Validate_US, Validate_CA, etc...).
+ *
+ * This will set up a rule called 'checkEmail' which uses the
+ * Validate::email() function.
+ * you can still pass in parameters to this rule if you pass them in
+ * via the 'format' option when you are defining your rules.
+ * <code>
+ * class exampleClass
+ * {
+ * $registeredRules = array(
+ * array(
+ * 'checkEmail',
+ * 'callback',
+ * 'email',
+ * 'Validate'
+ * )
+ * );
+ *
+ * // ... Rest of your class code
+ *
+ * public function configureRules()
+ * {
+ * $r = array();
+ *
+ * $r[] = array(
+ * 'element' => 'process_email',
+ * 'message' => 'ERROR: Invalid email format!',
+ * 'type' => 'checkEmail',
+ * 'format' => array('use_rfc822' => true),
+ * 'validation' => $this->validationType,
+ * 'reset' => false,
+ * 'force' => false
+ * );
+ *
+ * $this->setupRules($r);
+ * }
+ *
+ * // ... Rest of your class code
+ * }
+ * </code>
+ *
+ * If the registeredRule is a string, the corresponding rule in the
+ * glmPEAR/HTML/QuickForm/Rule/ directory will be registered with
+ * the form.
+ *
+ * This will set up the 'phone' rule already defined in the
+ * glmPEAR/HTML/QuickForm/Rule directory which validates both
+ * US and Canadian phone numbers
+ * <code>
+ * class exampleClass
+ * {
+ * $registeredRules = array('phone');
+ *
+ * // ... Rest of your class code
+ *
+ * public function configureRules()
+ * {
+ * $r = array();
+ *
+ * $r[] = array(
+ * 'element' => 'phone',
+ * 'message' => 'ERROR: Invalid number (xxx) xxx-xxxx!',
+ * 'type' => 'phone',
+ * 'format' => null,
+ * 'validation' => $this->validationType,
+ * 'reset' => false,
+ * 'force' => false
+ * );
+ *
+ * $this->setupRules($r);
+ * }
+ *
+ * // ... Rest of your class code
+ * }
+ * </code>
+ *
+ * @return void
+ * @access protected
+ */
+ protected function registerRules()
+ {
+ if (is_array($this->registeredRules)) {
+ foreach ($this->registeredRules as $r) {
+ if (is_array($r)) {
+ call_user_func_array(array(&$this, 'registerRule'), $r);
+ } else {
+ // Don't nedd to register rules more than once
+ if (!$this->isRuleRegistered($r)) {
+ $this->registerRule($r, null, "HTML_QuickForm_Rule_$r");
+ }
+ }
+ }
+ }
+ }
+
+ // }}}
+
+ // {{{ setAutoValidateDateElements()
+
+ /**
+ * Set if we need to auto validate the Date Elements
+ *
+ * @param boolean $validate true/false to auto validate date elements
+ *
+ * @return void
+ * @access public
+ */
+ public function setAutoValidateDateElements($validate)
+ {
+ $this->autoValidateDateElements = $validate;
+ }
+
+ // }}}
+ // {{{ setFormData()
+
+ /**
+ * Sets the submitted values from the form
+ *
+ * Set these values into an internal variable so they will be accessible
+ * anywhere we need them in the form.
+ *
+ * @param array $exclude (optional) Any element names you don't want
+ * included. Since this is primarily used in
+ * emailing, this is helpful to exclude any data
+ * we don't want before the array is generated.
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setFormData(array $exclude = array())
+ {
+ $values = $this->getSubmitValues();
+ foreach ($values as $k => $v) {
+ if ($this->elementExists($k)) {
+ $e =& $this->getElement($k);
+ if (!in_array($e->getName(), $exclude)) {
+ switch ($e->getType()) {
+ case 'date' :
+ list($m, $d, $y) = array_values($e->getValue());
+ // If all the date fields are empty, then don't add
+ // the output to the formData.
+ if (!(empty($m[0]) && empty($d[0]) && empty($y[0]))) {
+ $this->formData[$e->getName()]['label']
+ = $e->getLabel();
+
+ $oldDate = $e->getValue();
+ $newDate = Toolkit_Common::arrayFlatten(
+ $oldDate,
+ 0,
+ $newDate
+ );
+
+ $this->formData[$e->getName()]['element']
+ = implode(' / ', $newDate);
+ unset($oldDate, $newDate);
+ }
+ break;
+
+ case 'group':
+ $e->freeze();
+ $this->formData[$e->getName()]['label'] = $e->getLabel();
+ $this->formData[$e->getName()]['element'] = $e->toHtml();
+ break;
+
+ case 'select' :
+ $this->formData[$e->getName()]['label'] = $e->getLabel();
+
+ $values = $e->getValue();
+ foreach ($values as $v) {
+ $this->formData[$e->getName()]['element'] .= $v;
+ }
+ break;
+
+ default :
+ $this->formData[$e->getName()]['label'] = $e->getLabel();
+ $this->formData[$e->getName()]['element'] = $e->getValue();
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // }}}
+ // {{{ setupConstants()
+
+ /**
+ * Sets the form constant values
+ *
+ * @param array $constants Associative array of form constant values.
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupConstants($constants)
+ {
+ $this->setConstants($constants);
+ }
+
+ // }}}
+ // {{{ setupDefaults()
+
+ /**
+ * Sets the form default values
+ *
+ * @param array $defaults Associative array of form default values.
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupDefaults($defaults)
+ {
+ $this->setDefaults($defaults);
+ }
+
+ // }}}
+ // {{{ setupElements()
+
+ /**
+ * Sets up all the elements to the form
+ *
+ * Takes a multi-dimensional array of form elements and uses them
+ * to set up the form objects elements
+ *
+ * @param array $elements Multi-Dimensional array of form elements.
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupElements($elements)
+ {
+ if (!is_array($elements)) {
+ return;
+ }
+ foreach ($elements as &$e) {
+ $this->prepElement($e);
+ switch ($e['type']) {
+ case 'group' :
+ if (is_array($e['group']) && !empty($e['group'])) {
+ // Special rendering for grouped elements.
+ unset($field);
+ foreach ($e['group'] as $g) {
+ $this->prepElement($g);
+ $field[] =& HTML_QuickForm::createElement(
+ $g['type'],
+ $g['name'],
+ $g['display'],
+ $g['opts'],
+ $g['att'],
+ $g['val']
+ );
+ }
+ $source =& $this->addGroup(
+ $field,
+ $e['name'],
+ $e['label'],
+ $e['seperator'],
+ $e['appendName']
+ );
+ }
+ break;
+
+ case 'elementGrid' :
+ $source =& $this->addElement(
+ $e['type'],
+ $e['name'],
+ $e['display'],
+ $e['opts'],
+ $e['att'],
+ $e['val']
+ );
+ unset($columnNames);
+
+ // Loop through the rows (r) and columns (c)
+ // to add each of the elements to our grid.
+ foreach ($e['group'] as $k => $r) {
+ unset($set, $rowTitle);
+ foreach ($r as $c) {
+ $columnNames[$c['display']] = $c['display'];
+
+ $set[] =& $this->createGridElement(
+ $c['type'],
+ $c['name'],
+ null,
+ $c['opts'],
+ $c['att']
+ );
+ }
+ $rowTitle = is_int($k) ? ' ' : $k;
+ $source->addRow($set, $rowTitle);
+ }
+
+ $source->setColumnNames($columnNames);
+ break;
+
+ default :
+ // Render all elements except groups
+ try {
+ $source =& $this->addElement(
+ $e['type'],
+ $e['name'],
+ $e['display'],
+ $e['opts'],
+ $e['att'],
+ $e['val']
+ );
+
+ if (PEAR::isError($source)) {
+ var_dump($source);
+ throw new Exception ('PEAR QuickForm Element Error');
+ }
+ } catch (HTML_QuickForm_Error $e) {
+ Toolkit_Common::dieGracefully(null, $e);
+ } catch (Exception $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ if ($e['type'] == 'advmultiselect') {
+ $source->setLabel($e['labels']);
+ }
+ if ($e['name'] == 'categories') {
+ $res = $source->loadArray($this->categories);
+ if (PEAR::isError($res)) {
+ Toolkit_Common::dieGracefully(null, $res);
+ }
+ }
+ if ($e['type'] == 'header') {
+ $this->formHeaders[$e['display']] = $e;
+ }
+
+ if ($e['name'] == 'captcha_rmv') {
+ $this->captchaAnswer =& $source;
+ }
+
+ if ($e['name'] == 'captcha_question') {
+ $this->captchaQuestion =& $source;
+ }
+ break;
+ }
+ }
+ $this->formElements = $elements;
+ }
+
+ // }}}
+ // {{{ setupFilters()
+
+ /**
+ * Sets any filters needed for the form elements when submitting
+ *
+ * @param array $filters Element filters.
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupFilters($filters)
+ {
+ foreach ($filters as $f) {
+ $res = $this->applyFilter($f['element'], $f['filter']);
+
+ if (PEAR::isError($res)) {
+ Toolkit_Common::handleError($res);
+ }
+ }
+ }
+
+ // }}}
+ // {{{ setupRules()
+
+ /**
+ * Apply rules to the form
+ *
+ * 100 & 1000 char length limitations are automatically assigned to
+ * text/textarea elements to help reduce load limitations on the server.
+ * -request per Chuck in a conference call on (5/22/2009 @ 12:15pm)
+ *
+ * Applies rules that are defined in child classes to the form elements
+ * group rules can be kind of tricky, since you can't apply a rule
+ * directly to an element inside of a rule you have to define
+ * the rule inside a nest of array's and then add a group rule.
+ * the array will contain all the elements inside the group you wish
+ * to apply rules to.
+ *
+ * You can assign as many rules as you would like to individual elements,
+ * and you aren't required to make the array associative, although it is
+ * easier to see whats going on.
+ *
+ * see: http://pear.activeventure.com/package/package.html.html-quickform.html-quickform.addgrouprule.html
+ * for another example.
+ * <code>
+ * // Define the rules for each element in the group.
+ * $num_rule = array(
+ * 'ERROR: Must contain a valid decimal number!',
+ * 'numeric'
+ * );
+ * // Collect together the rules for each element.
+ * $lat_rules = array('lat' => array($num_rule));
+ * $lon_rules = array('lon' => array($num_rule));
+ * $r[] = array(
+ * 'element' => 'latitude',
+ * 'message' => 'ERROR:',
+ * 'type' => 'group',
+ * 'format' => $lat_rules,
+ * 'validation' => $this->validationType,
+ * 'reset' => false,
+ * 'force' => false
+ * );
+ * </code>
+ *
+ * To make a group required but not require every element in the group
+ * you can use the addGroupRule function again
+ * for example: say you have a group of checkboxes and you only only
+ * require 1 be checked. a simple group rule such as the following
+ * will handle this.
+ * N.B. notice the extra "howMany" index.
+ * <code>
+ * $r[] = array(
+ * 'element' => 'element_name',
+ * 'message' => 'ERROR: Error to display!',
+ * 'type' => 'required',
+ * 'format' => null,
+ * 'howMany' => 1,
+ * 'validation'=> $this->validationType,
+ * 'reset' => true,
+ * 'force' => false,
+ * );
+ * </code>
+ *
+ * @param array $rules Multi-Dimensional array of rules for form elements.
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupRules(array $rules = null)
+ {
+ $this->registerRules();
+ $preRegisteredRules = $this->getRegisteredRules();
+ if (is_array($this->formElements)) {
+ foreach ($this->formElements as $e) {
+ // Put length limitations on text and textarea fields
+ if ($e['type'] == 'text' && !$e['noCharLimit']) {
+ $this->addCharLimit($e['name'], 100);
+ } elseif ($e['type'] == 'textarea' && !$e['noCharLimit']) {
+ $this->addCharLimit($e['name'], 1000);
+ } elseif ($e['type'] == 'group') {
+ // We need to apply these same limitations to the
+ // text and textarea fields inside of groups
+ $r = array();
+ if (is_array($e['group'])) {
+ foreach ($e['group'] as $i) {
+ // Loop through group elements and if they are
+ // text/textarea fields then put the field into
+ // a rule array that we will assign to the group
+ if ($i['type'] == 'text' && !$i['noCharLimit']) {
+ $r[$i['name']][] = array(
+ 'ERROR: 100 characters max!',
+ 'maxlength'
+ );
+ } elseif ($i['type'] == 'textarea' && !$i['noCharLimit']) {
+ $r[$i['name']][] = array(
+ 'ERROR: 1000 characters max!',
+ 'maxlength'
+ );
+ }
+ }
+ }
+ if (!empty($r)) {
+ $this->addGroupRule($e['name'], $r);
+ }
+ }
+ if ($this->validationType == 'client') {
+ $label = $e['display'];
+ }
+ if ($e['req']) {
+ if ($e['type'] == 'group') {
+ foreach ($e['group'] as $ge) {
+ if ($ge['req']) {
+ $rule[$ge['name']][] = array(
+ 'ERROR: You must complete this field!',
+ 'required',
+ null,
+ $this->validationType);
+ }
+ }
+ $this->addGroupRule($e['name'], $rule);
+ unset($rule);
+ } elseif ($e['type'] == 'date') {
+ if (!empty($e['error'])) {
+ // Custom error message for the date element.
+ $error = $e['error'];
+ } else {
+ // Default error message for the date element.
+ $error = 'ERROR: You must enter a date!';
+ }
+ $this->addGroupRule(
+ $e['name'],
+ $error,
+ 'required',
+ 3,
+ $this->validationType
+ );
+ if ($this->autoValidateDateElements) {
+ $this->addRule(
+ $e['name'],
+ 'ERROR: Date is invalid!',
+ 'callback',
+ array(&$this, 'checkDateInput')
+ );
+ }
+ } else {
+ $this->addRule(
+ $e['name'],
+ "$label ERROR: You must complete this field!",
+ 'required',
+ null,
+ $this->validationType
+ );
+ }
+ }
+ }
+ }
+ if (is_array($rules)) {
+ foreach ($rules as $r) {
+ if (!is_array($r['element'])) {
+ $group = ($this->getElementType($r['element']) == 'group');
+ }
+ if ($group) {
+ $this->addGroupRule(
+ $r['element'],
+ $r['message'],
+ $r['type'],
+ $r['format'],
+ $r['howMany'],
+ $r['validation'],
+ $r['reset']
+ );
+ } elseif (in_array($r['type'], $preRegisteredRules)) {
+ $this->addRule(
+ $r['element'],
+ $r['message'],
+ $r['type'],
+ $r['format'],
+ $r['validation'],
+ $r['reset'],
+ $r['force']
+ );
+ }
+ }
+ }
+ }
+
+ // }}}
+ // {{{ setupRenderers()
+
+ /**
+ * Sets up renderers for form objects
+ *
+ * Uses the default form renderer to allow templates to be injected
+ * into the form object before displaying on a page. This allows
+ * changing the face of the form w/ out any backend adjustment.
+ *
+ * Files that can be created for templates are
+ *
+ * Examples:
+ * # Element.tpl
+ * <code>
+ * <tr>
+ * <td class="labelcell">
+ * <!-- BEGIN required -->
+ * <span class="required">*</span>
+ * <!-- END required -->
+ * <label> {label} </label>
+ * </td>
+ * <td class="fieldcell">
+ * <!-- BEGIN error -->
+ * <div class="req"> {error} </div>
+ * <!-- END error -->
+ * {element}
+ * </td>
+ *</tr>
+ * </code>
+ *
+ * # Form.tpl
+ * <code>
+ * <div id="contact">
+ * <form{attributes}>
+ * <table>
+ * {content}
+ * </table>
+ * </form>
+ * </div>
+ * </code>
+ *
+ * # GroupElement.tpl
+ * <code>
+ * <tr>
+ * <td>
+ * {element}
+ * <!-- BEGIN required -->
+ * <span class="req">*</span>
+ * <!-- END required -->
+ * {label}
+ * </td>
+ * </tr>
+ * </code>
+ *
+ * # Group.tpl
+ * <code>
+ * <table class="group">
+ * <tbody>
+ * {content}
+ * </tbody>
+ * </table>
+ * </code>
+ *
+ * # Header.tpl
+ * <code>
+ * <tr class="hdr">
+ * <td colspan="2">
+ * {header}
+ * </td>
+ * </tr>
+ * </code>
+ *
+ * # RequiredNote.tpl
+ * <code>
+ * <span class="req">*</span> Denotes required field
+ * </code>
+ *
+ * @param array $groups any groups that need to be rendered
+ * via the groupElementTemplate and groupTemplate
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupRenderers(array $groups = array())
+ {
+ $renderer =& $this->defaultRenderer();
+ if (is_dir($this->template)) {
+ if ($dh = opendir($this->template)) {
+ while (($file = readdir($dh)) !== false) {
+ // Ignore current dir and parent dir.
+ if ($file != '..' && $file != '.' && $file != 'CVS') {
+ $baseName = reset(explode('.', $file));
+ // Ignores swp files.
+ if (!empty($baseName)) {
+ $method = "set{$baseName}Template";
+ $template = file_get_contents($this->template . $file);
+ if ( $method != 'setGroupTemplate'
+ && $method != 'setGroupElementTemplate'
+ ) {
+ if (method_exists($renderer, $method)) {
+ $renderer->$method($template);
+ }
+ } else {
+ // apply the templates to any defined groups
+ foreach ($groups as $k) {
+ $renderer->$method($template, $k);
+ }
+ }
+ }
+ }
+ }
+ closedir($dh);
+ }
+ }
+
+ // Set the default how the captcha's should look
+ // can be overridden in subclasses
+ if ($this->useCaptcha) {
+ $required = '<!-- BEGIN required --><span class="req">*</span><!-- END required -->';
+ $error = '<!-- BEGIN error --><div class="req">{error}</div><!-- END error -->';
+ $renderer->setElementTemplate(
+ '<tr>
+ <td class="labelcell"><label>{label}</label></td>
+ <td class="fieldcell captcha">{element}</td>
+ </tr>',
+ 'captcha_question'
+ );
+ $renderer->setElementTemplate(
+ '<tr>
+ <td class="labelcell">'.$required.'<label>{label}</label></td>
+ <td class="fieldcell">'.$error.'{element}
+ <span class="tooltip" title="Verification Code|To help us distinguish between information submitted by individuals and those automatically entered by software robots, please type the letters shown.">What is this?</span>
+ </td>
+ </tr>',
+ 'captcha_rmv'
+ );
+ }
+ }
+
+ // }}}
+ // {{{ useCaptcha()
+
+ /**
+ * Set if we need to use a captcha in this form or not
+ *
+ * @param boolean $useCaptcha true/false to use a captcha with the form
+ *
+ * @return void
+ * @access public
+ */
+ public function useCaptcha($useCaptcha)
+ {
+ $this->useClueTip();
+ $this->useCaptcha = $useCaptcha;
+ }
+
+ // }}}
+ // {{{ useClueTip()
+
+ /**
+ * Set if we need to use the JS cluetip
+ *
+ * @param boolean $useCaptcha include cluetip resources or not
+ *
+ * @return void
+ * @access public
+ */
+ public function useClueTip()
+ {
+ $GLOBALS['styleSheets'][]
+ = MEDIA_APP_BASE_URL . 'libjs/cluetip/jquery.cluetip.css';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/cluetip/jquery.cluetip.js';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/cluetip/lib/jquery.hoverIntent.js';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/cluetip/lib/jquery.bgiframe.min.js';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/contactform.js';
+ }
+
+ // }}}
+ // {{{ show()
+
+ /**
+ * Shows the form
+ *
+ * @return void
+ * @access public
+ */
+ public function show()
+ {
+ Toolkit_Common::show();
+ }
+
+ // }}}
+ // {{{ validate()
+
+ public function validate()
+ {
+ if (!$this->validated) {
+ $this->validated = parent::validate();
+ }
+
+ return $this->validated;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+/**
+ * Date.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package Forms/Rules
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_Forms_Rules_Date
+ *
+ * Description of Toolkit_Forms_Rules_Date
+ *
+ * @category Toolkit
+ * @package Forms/Rules
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Forms_Rules_Date extends HTML_QuickForm_Rule
+{
+ /**
+ * Validate if a string is a valid date
+ *
+ * If element is part of a group, then you can pass in the group name
+ * under the options parameter, that way you can find the date values
+ *
+ * You must pass in at least the format of the date in an array.
+ * array('format' => '%m-%d-%Y') is the default
+ *
+ * @param string $value the date array to validate
+ * @param array $options options used to dictate validation of the date
+ *
+ * @return bool if the string could correctly be validated as a date.
+ * @access public
+ * @see Validate::date()
+ */
+ function validate($value, array $options)
+ {
+ $month = !isset($options['group'])
+ ? $value['m']
+ : $value[$options['group']]['m'];
+ $day = !isset($options['group'])
+ ? $value['d']
+ : $value[$options['group']]['d'];
+ $year = !isset($options['group'])
+ ? $value['Y']
+ : $value[$options['group']]['Y'];
+
+ if (isset($options['allowEmpty'])
+ && $options['allowEmpty']
+ && empty($month)
+ && empty($day)
+ && empty($year)
+ ) {
+ return true;
+ }
+
+ unset($options['group'], $options['allowEmpty']);
+
+ $day = str_pad($day, 2, '0', STR_PAD_LEFT);
+ $month = str_pad($month, 2, '0', STR_PAD_LEFT);
+
+ return Validate::date("$month-$day-$year", $options);
+ }
+
+ /**
+ * gets validation script
+ *
+ * @return array
+ */
+ function getValidationScript()
+ {
+ return array('', true);
+ }
+}
+
+HTML_QuickForm::registerRule(
+ 'Date',
+ 'rule',
+ 'Toolkit_Forms_Rules_Date',
+ BASE . 'Toolkit/Forms/Rules/Date.php'
+);
+?>
--- /dev/null
+<?php
+/**
+ * Image.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package Forms/Rules
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_Forms_Rules_Image
+ *
+ * Description of Toolkit_Forms_Rules_Image
+ *
+ * @category Toolkit
+ * @package Forms/Rules
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Forms_Rules_Image extends HTML_QuickForm_Rule
+{
+ // {{{ validate()
+
+ /**
+ * Handle image uploading rules
+ *
+ * The options array is required and has specific key values
+ * that must be present.
+ *
+ * form : (HTML_Quickform) form object - so we can insert
+ * the new image name back back into the forms
+ * submit values.
+ * fieldName : (string) name of the upload field - this is
+ * generally the same name as the field we're
+ * calling the rule on.
+ * imageField : (string) name of the field that stores the
+ * filename of the image that was uploaded
+ * is : (Toolkit_FileServer_ImageAdapter)
+ * image server instance
+ * deleteExistingImage : (boolean) Whether to delete any old image from
+ * the image server before uploading the new image
+ * injectImage : (array)
+ * tgtElement : (string) Name of the field that will hold the preview
+ * of the image - This is usually a static element
+ * path : (optional) Path to the image - defaults to FORM_THUMB
+ * imgTag : (optional) Format of the image tag - defaults to
+ * <img src="%s"> where %s is the path + image
+ *
+ *
+ * Full Example:
+ *
+ * $r[] = array(
+ * 'element' => 'file_rmv',
+ * 'message' => 'ERROR: Error uploading image!',
+ * 'type' => 'Image',
+ * 'format' => array(
+ * 'form' => $this,
+ * 'fieldName' => 'file_rmv',
+ * 'imageField' => 'image',
+ * 'is' => new Toolkit_FileServer_ImageAdapter(),
+ * 'deleteExistingImage' => true,
+ * 'injectImage' => array(
+ * 'tgtElement' => 'current_image_rmv',
+ * 'imgTag' => '<img src="%s">',
+ * 'path' => FORM_THUMB
+ * )
+ * ),
+ * 'validation' => $this->validationType,
+ * 'reset' => false,
+ * 'force' => false
+ * );
+ *
+ * @param string $value the $_FILES['xxxx'] array
+ * @param array $options upload options
+ *
+ * @return bool if the image was successfully uploaded or not
+ * @access public
+ */
+ function validate($value, array $options)
+ {
+ // No image uploaded - return true
+ // this can be a valid state, if the field is required - then a
+ // required rule should be used and will catch before this rule
+ // is even applied.
+ if (empty($value['tmp_name'])) {
+ return true;
+ }
+
+ if (!isset($options['fieldName'])) {
+ throw new RuntimeException(
+ 'Missing `fieldName` key in options'
+ );
+ }
+ if ( isset($options['is'])
+ && ($options['is'] instanceof Toolkit_FileServer_ImageAdapter)
+ ) {
+ $is = $options['is'];
+ } else {
+ throw new RuntimeException(
+ 'Missing `is` key in options for Image Server instance'
+ );
+ }
+
+ if ( isset($options['form'])
+ && ($options['form'] instanceof HTML_QuickForm)
+ ) {
+ $form =& $options['form'];
+ } else {
+ throw new RuntimeException(
+ 'Missing `form` key in options'
+ );
+ }
+
+ if (isset($options['imageField'])) {
+ $imageField = $options['imageField'];
+ } else {
+ throw new RuntimeException(
+ 'Missing `imageField` key in options'
+ );
+ }
+
+ if ( isset($options['injectImage'])
+ && !is_array($options['injectImage'])
+ ) {
+ if (!is_array($options['injectImage'])) {
+ throw new RuntimeException(
+ '`injectImage` must be an array of options'
+ );
+ }
+ } elseif ( isset($options['injectImage'])
+ && is_array($options['injectImage'])
+ && !isset($options['injectImage']['tgtElement'])
+ ) {
+ throw new RuntimeException(
+ 'The `injectImage` array needs a `tgtElement` index to inject the new image into'
+ );
+ }
+
+ if ( isset($options['deleteExistingImage'])
+ && $options['deleteExistingImage']
+ ) {
+ $existingImage =& $form->getSubmitValue($imageField);
+ if (!empty($existingImage)) {
+ $is->delete($existingImage);
+ }
+ }
+
+ try {
+ $uploadedImage = $is->upload($options['fieldName']);
+ } catch (RangeException $e) {
+ Toolkit_Logger::logException('Image Server', $e);
+ return false;
+ }
+
+ if (isset($options['injectImage'])) {
+ $imgTag = isset($options['injectImage']['imgTag'])
+ ? $options['injectImage']['imgTag']
+ : '<img src="%s">';
+
+ $path = isset($options['injectImage']['path'])
+ ? $options['injectImage']['path']
+ : FORM_THUMB;
+
+ $htmlImg = sprintf($imgTag, $path . $uploadedImage['name']);
+ $tgt = $options['injectImage']['tgtElement'];
+ $currImg =& $form->getElement($tgt);
+ $currImg->setValue($htmlImg);
+ }
+
+ $fileName =& $form->getElement($imageField);
+ $fileName->setValue($uploadedImage['name']);
+ $form->_submitValues[$imageField] = $uploadedImage['name'];
+
+ return true;
+ }
+
+ // }}}
+
+ // {{{ getValidationScript()
+
+ /**
+ * gets validation script
+ *
+ * @return array
+ */
+ function getValidationScript()
+ {
+ return array('', true);
+ }
+
+ // }}}
+}
+
+HTML_QuickForm::registerRule(
+ 'Image',
+ 'rule',
+ 'Toolkit_Forms_Rules_Image',
+ BASE . 'Toolkit/Forms/Rules/Image.php'
+);
+?>
--- /dev/null
+<?php
+/**
+ * ShortUrl.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package Forms/Rules
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_Forms_Rules_ShortUrl
+ *
+ * Description of Toolkit_Forms_Rules_ShortUrl
+ *
+ * @category Toolkit
+ * @package Forms/Rules
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Forms_Rules_ShortUrl extends HTML_QuickForm_Rule
+{
+ // {{{ validate()
+
+ /**
+ * Validate if a string is a valid short url
+ *
+ * Short URLs can only contain alpha numeric characters plus
+ * dash and underscore. They must also not be the same name as a file
+ * on the server.
+ *
+ * @param string $value short url to validate
+ *
+ * @return bool if the string could correctly be validated as a short url
+ * @access public
+ */
+ public function validate($value)
+ {
+ $hasValidCharacters = !preg_match('/[^-a-zA-Z0-9_]/', $value);
+ // Short URLs that are the same as an existing file ie: (index.php)
+ // cause .htaccess to throw errors
+ $fileDoesNotExist = !file_exists(BASE . $value);
+ // Short URLs that are the same as an existing file basename
+ // ie: (index) cause .htaccess to throw errors
+ list($path, $suffix) = explode('.', $value);
+ $files = array_filter(glob(BASE . "$path*"), 'is_file');
+ $baseNameDoesNotExist = ($files !== false && empty($files));
+ return $hasValidCharacters && $fileDoesNotExist && $baseNameDoesNotExist;
+ }
+
+ // }}}
+ // {{{ getValidationScript()
+
+ /**
+ * gets validation script
+ *
+ * @return array
+ */
+ public function getValidationScript()
+ {
+ return array('', true);
+ }
+
+ // }}}
+}
+
+HTML_QuickForm::registerRule(
+ 'ShortUrl',
+ 'rule',
+ 'Toolkit_Forms_Rules_ShortUrl',
+ BASE . 'Toolkit/Forms/Rules/ShortUrl.php'
+);
+?>
--- /dev/null
+<?php
+
+/**
+ * Url.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package Forms/Rules
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_Forms_Rules_Url
+ *
+ * Description of Toolkit_Forms_Rules_Url
+ *
+ * @category Toolkit
+ * @package Forms/Rules
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Forms_Rules_Url extends HTML_QuickForm_Rule
+{
+ // {{{ validate()
+
+ /**
+ * Validate if a string is a valid url
+ *
+ * @param string $value url to validate
+ * @param array $options set to null
+ *
+ * @return bool if the string could correctly be validated as a url
+ * @access public
+ */
+ public function validate($value, array $options = null)
+ {
+ $validateFilter = FILTER_VALIDATE_URL;
+
+ if (is_null($options)) {
+ return (bool) filter_var($value, $validateFilter);
+ }
+
+ $lambdaFunction = create_function('$a, $b', 'return $a | $b;');
+ $flags = array_reduce($options, $lambdaFunction, 0);
+
+ return (bool) filter_var($value, $validateFilter, $flags);
+
+ }
+
+ // }}}
+ // {{{ getValidationScript()
+
+ /**
+ * gets validation script
+ *
+ * @return array
+ */
+ public function getValidationScript()
+ {
+ return array('', true);
+ }
+
+ // }}}
+}
+
+HTML_QuickForm::registerRule(
+ 'Url',
+ 'rule',
+ 'Toolkit_Forms_Rules_Url',
+ BASE . 'Toolkit/Forms/Rules/Url.php'
+);
+?>
--- /dev/null
+<tr>
+ <td class="labelcell">
+ <!-- BEGIN required -->
+ <span class="req">*</span>
+ <!-- END required -->
+ <label>{label}</label>
+ </td>
+ <td class="fieldcell">
+ <!-- BEGIN error -->
+ <div class="req"> {error} </div>
+ <!-- END error -->
+ {element}
+ </td>
+</tr>
--- /dev/null
+<div class="webform">
+ <form{attributes}>
+ <div class="hiddenElements">
+ {hidden}
+ </div>
+ {requiredNote}
+ <table>
+ {content}
+ </table>
+ </form>
+</div>
\ No newline at end of file
--- /dev/null
+<table class="group">
+ <tbody>
+ {content}
+ </tbody>
+</table>
--- /dev/null
+<tr>
+ <td>
+ {element}
+ <!-- BEGIN required -->
+ <span class="req">*</span>
+ <!-- END required -->
+ {label}
+ </td>
+</tr>
--- /dev/null
+<tr class="hdr">
+ <td colspan="2">
+ {header}
+ </td>
+</tr>
--- /dev/null
+<div><span class="req">*</span> Denotes required field</div>
--- /dev/null
+<?php
+
+/**
+ * IController.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Controller
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Toolkit_IController
+ *
+ * Object Mapper pattern class for the Video PDO Table. Creates
+ * Toolkit_Video_Video objects by values or by id
+ *
+ * @category Toolkit
+ * @package Controller
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+interface Toolkit_IController
+{
+ /**
+ * default action for the controller
+ *
+ * @return string
+ */
+ public function indexAction();
+}
--- /dev/null
+<?php
+/**
+ * IMapper.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Mapper
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+
+/**
+ * Toolkit_IMapper
+ *
+ * Interface for creation of mapper classes
+ *
+ * @category Toolkit
+ * @package Mapper
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+interface Toolkit_IMapper
+{
+ /**
+ * createByValues
+ *
+ * @param Array $values array of values to set for the new object
+ *
+ * @return object
+ */
+ public function createByValues($values);
+}
+?>
--- /dev/null
+<?php
+/**
+ * INavigation.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Toolkit_INavigation
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_INavigation
+ *
+ * Interface
+ *
+ * @category Toolkit
+ * @package Toolkit_INavigation
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+interface Toolkit_INavigation
+{
+ /**
+ * Class constructor
+ *
+ * @param HTML_Menu $menu Menu
+ * @param HTML_Menu_Renderer $rEngine Menu Renderer
+ */
+ public function __construct(
+ HTML_Menu $menu,
+ HTML_Menu_Renderer $rEngine
+ );
+
+ /**
+ * Render page navigation
+ *
+ * @param array $navigation Navigation
+ * @param unknown $type Type
+ *
+ * @return void
+ */
+ public function renderPageNav(array $navigation, $type);
+}
+?>
--- /dev/null
+<?php
+/**
+ * iTable.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Table
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+
+/**
+ * Interface for Table objects
+ *
+ * @category Toolkit
+ * @package Table
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+interface Toolkit_ITable
+{
+ /**
+ * setId
+ *
+ * @param Int $id Table primary key
+ *
+ * @return Object
+ */
+ public function setId($id);
+ /**
+ * save
+ *
+ * @param PDO $dbh Database Connection
+ *
+ * @return void
+ */
+ public function save(PDO $dbh);
+ /**
+ * insert
+ *
+ * @param PDO $dbh Database Connection
+ *
+ * @return Object
+ */
+ public function insert(PDO $dbh);
+ /**
+ * update
+ *
+ * @param PDO $dbh Database Connection
+ *
+ * @return Object
+ */
+ public function update(PDO $dbh);
+}
--- /dev/null
+<?php
+
+/**
+ * Converter.php
+ *
+ * Long description (if any) ...
+ *
+ * PHP version 5
+ *
+ * The license text...
+ *
+ * @category Toolkit
+ * @package Image
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2010 Steve Sutton
+ * @license Gaslight Media
+ * @version CVS: $Id: Converter.php,v 1.2 2010/07/29 14:56:50 matrix Exp $
+ * @link http://pear.php.net/package/Toolkit_Image
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Toolkit_Image_Converter
+ *
+ * Long description (if any) ...
+ *
+ * @category Toolkit
+ * @package Image
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2010 Steve Sutton
+ * @license Gaslight Media
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/Toolkit_Image
+ * @see References to other sections (if any)...
+ */
+class Toolkit_Image_Converter extends Toolkit_FormBuilder
+{
+
+ /**
+ * Description for $is
+ * @var object
+ * @access protected
+ */
+ protected $is;
+
+ /**
+ * Description for $dbh
+ * @var object
+ * @access protected
+ */
+ protected $dbh;
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param PDO $pdo Databse Handler
+ * @param Toolkit_Image_Server $is Parameter description (if any) ...
+ * @param string $formName Parameter description (if any) ...
+ * @param string $method Parameter description (if any) ...
+ * @param string $action Parameter description (if any) ...
+ * @param string $target Parameter description (if any) ...
+ * @param unknown $attributes Parameter description (if any) ...
+ * @param boolean $trackSubmit Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function __construct(
+ PDO $pdo,
+ Toolkit_Image_Server $is,
+ $formName,
+ $method = 'post',
+ $action = '',
+ $target = '',
+ $attributes = null,
+ $trackSubmit = false
+ ) {
+ $this->dbh = $pdo;
+ $this->is = $is;
+ $action = empty($action) ? $_SERVER['REQUEST_URI'] : $action;
+ parent::__construct(
+ $formName,
+ $method,
+ $action,
+ $target,
+ $attributes,
+ $trackSubmit
+ );
+ }
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function configureForm()
+ {
+ $this->setupElements();
+ $this->setupRules();
+ $this->setupDefaults();
+ $this->setupConstants();
+ }
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param array $values Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function processData($values)
+ {
+ echo '<pre>'.print_r($values, true).'</pre>';
+ $sql = "
+ UPDATE {$values['table_name']}
+ SET {$values['img_field_name']} = :new_img
+ WHERE {$values['primary_key']} = :id";
+ $updateImg = $this->dbh->prepare($sql);
+ try {
+ $sql = "
+ SELECT *
+ FROM {$values['table_name']}
+ WHERE {$values['img_field_name']} != ''
+ AND {$values['img_field_name']} IS NOT NULL
+ AND {$values['img_field_name']} != 'ERROR'
+ AND {$values['img_field_name']} !~ '^is'
+ AND {$values['img_field_name']} !~ '^fs'
+ ";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ if ($row[$values['primary_key']]) {
+ echo '<pre>'
+ . print_r(
+ $values['original_url']
+ . '/' . $row[$values['img_field_name']],
+ true
+ ) . '</pre>';
+ $newImage = $this->is->imageUpload($values['original_url']. '/' . $row[$values['img_field_name']]);
+ $updateImg->bindParam(":new_img", $newImage, PDO::PARAM_STR);
+ $updateImg->bindParam(":id", $row[$values['primary_key']], PDO::PARAM_STR);
+ $updateImg->execute();
+ }
+ }
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function setupElements()
+ {
+ $e[] = array(
+ 'type' => 'header',
+ 'name' => 'header_rmv',
+ 'display' => 'Converter'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'name' => 'original_url',
+ 'display' => 'Original Path URL without ending /'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'name' => 'table_name',
+ 'display' => 'Table Name'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'name' => 'img_field_name',
+ 'display' => 'Image Field Name'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'name' => 'primary_key',
+ 'display' => 'Primary Key'
+ );
+ $e[] = array(
+ 'type' => 'submit',
+ 'name' => 'submit',
+ 'display' => 'Submit'
+ );
+ parent::setupElements($e);
+ }
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function setupConstants()
+ {
+ }
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function setupDefaults()
+ {
+ }
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function setupRules()
+ {
+ }
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @return string Return description (if any) ...
+ * @access public
+ */
+ function toHtml()
+ {
+ if ($this->validate()) {
+ if ($this->process(array(&$this, 'processData'), $this->mergeFiles)) {
+ $this->freeze();
+ //$output = $this->successMsg;
+ //$output .= parent::toHTML();
+ }
+ } else if ($this->isSubmitted()) {
+ $output = $this->errorMsg;
+ $output .= parent::toHtml();
+ } else {
+ $output = parent::toHtml();
+ }
+ return $output;
+ }
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * Server.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Image
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2008 Steve Sutton
+ * @license Gaslight Media
+ * @version CVS: $Id: Server.php,v 1.19 2010/05/25 14:02:45 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Description for define
+ */
+define('IS_VALIDATE_SECRET', 'Glm0IS1secreT');
+
+/**
+ * Description for define
+ */
+define('IS_SUBMIT_URL', FILE_SERVER_URL . 'submit.phtml');
+
+/**
+ * Toolkit_Image_Server
+ *
+ * Class for implementation of the image server process Chuck has
+ * setup for is0.gaslightmedia.com
+ * Uses Curl PHP Library to upload images to the server
+ *
+ * @category Toolkit
+ * @package Image
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2008 Steve Sutton
+ * @license Gaslight Media
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_Image_Server
+{
+ // {{{ properties
+
+ /**
+ * OwnerID for the Image Server User
+ * @var string
+ * @access protected
+ */
+ protected $OwnerID;
+
+ /**
+ * Owner Password
+ * @var string
+ * @access protected
+ */
+ protected $OwnerPW;
+
+ /**
+ * DOMDocument Object
+ * @var unknown
+ * @access protected
+ */
+ protected $xml;
+
+ // }}}
+
+ // {{{ __construct()
+
+ /**
+ * __construct
+ *
+ * @return void
+ * @access public
+ */
+ function __construct()
+ {
+ $this->OwnerID = IS_OWNER_ID;
+ $this->OwnerPW = IS_OWNER_PW;
+ }
+
+ // }}}
+
+ // {{{ buildImageServerXML()
+
+ /**
+ * buildImageServerXML
+ *
+ * Create the xml for the FileServerRequest
+ *
+ * @param string $fileName File to upload or delete
+ * @param unknown $type Upload or Delete
+ *
+ * @return string xml content
+ * @access public
+ */
+ function buildImageServerXML($fileName, $type)
+ {
+ $xml = new DOMDocument('1.0');
+ $xml->formatOutput = true;
+ $FileServerRequest = $xml->createElement('FileServerRequest');
+ $FileServerRequest->setAttribute('version', '1.0');
+ // AccessRequest part
+ $AccessRequest = $xml->createElement('AccessRequest');
+ $Owner = $xml->createElement('Owner');
+ $OwnerID = $xml->createElement('OwnerID', $this->OwnerID);
+ $OwnerPW = $xml->createElement('OwnerPW', $this->OwnerPW);
+ $Owner->appendChild($OwnerID);
+ $Owner->appendChild($OwnerPW);
+ $AccessRequest->appendChild($Owner);
+ $FileServerRequest->appendChild($AccessRequest);
+ // file part
+ $File = $xml->createElement('File');
+ switch ($type) {
+ case "Upload":
+ $FileAction = $xml->createElement('FileAction', 'Submit');
+ $DeliveryMethod = $xml->createElement('DeliveryMethod', 'Submit');
+ $FieldName = $xml->createElement('FieldName', 'file_upload');
+ $File->appendChild($FileAction);
+ $File->appendChild($DeliveryMethod);
+ $File->appendChild($FieldName);
+ $FileServerRequest->appendChild($File);
+ $size = filesize($_FILES[$fileName]['tmp_name']);
+ $validStr = md5($this->OwnerID.$this->OwnerPW.IS_VALIDATE_SECRET);
+ break;
+ case "URL":
+ $FileAction = $xml->createElement('FileAction', 'Submit');
+ $DeliveryMethod = $xml->createElement('DeliveryMethod', 'URL');
+ $Src = $xml->createElement('Src', $fileName);
+ $File->appendChild($FileAction);
+ $File->appendChild($DeliveryMethod);
+ $File->appendChild($Src);
+ $FileServerRequest->appendChild($File);
+ $size = strlen($fileName);
+ $validStr = md5($this->OwnerID.$this->OwnerPW.IS_VALIDATE_SECRET);
+ break;
+ case "Delete":
+ $FileAction = $xml->createElement('FileAction', 'Delete');
+ $File->appendChild($FileAction);
+ $FileName = $xml->createElement('FileName', $fileName);
+ $File->appendChild($FileName);
+ $FileServerRequest->appendChild($File);
+ $validStr = md5($this->OwnerID.$this->OwnerPW.IS_VALIDATE_SECRET);
+ break;
+ }
+ // validation part
+ $Validation = $xml->createElement('Validation', $validStr);
+ $FileServerRequest->appendChild($Validation);
+ $xml->appendChild($FileServerRequest);
+ return $xml->saveXML($xml);
+ }
+
+ // }}}
+
+ // {{{ imageDelete()
+
+ /**
+ * imageDelete
+ *
+ * Delete an image from the image server
+ *
+ * @param unknown $name Image name
+ *
+ * @return unknown image name
+ * @access public
+ */
+ function imageDelete($name)
+ {
+ // don't do anything if on development server
+ if (defined('DEVELOPMENT') && DEVELOPMENT == true) {
+ return "File deleted. File: " . $name;
+ }
+ if ($name) {
+ $request = $this->buildImageServerXML($name, 'Delete');
+ $ch = curl_init();
+ $fileData = array(
+ 'request' => $request
+ );
+ $curlOptions = array(
+ CURLOPT_URL => IS_SUBMIT_URL,
+ CURLOPT_HEADER => 0,
+ CURLOPT_RETURNTRANSFER => 1,
+ CURLOPT_POSTFIELDS => $fileData
+ );
+ curl_setopt_array($ch, $curlOptions);
+
+ $response = curl_exec($ch);
+ curl_close($ch);
+ $xmlDoc = new DOMDocument;
+ $response = str_replace('<?xml version="1.0"?' . '>', '', $response);
+ $xmlDoc->loadXML($response);
+ $SuccessCode = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/ReplyStatus/SuccessCode'
+ );
+ $Message = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/ReplyStatus/Message'
+ );
+ $Owner = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/Owner'
+ );
+ $StoredName = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/StoredName'
+ );
+ $StoredSize = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/StoredSize'
+ );
+ $MediaType = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/MediaType'
+ );
+ return $Message;
+ }
+ }
+
+ // }}}
+ // {{{ imageUpload()
+
+ /**
+ * imageUpload
+ *
+ * Upload image to server
+ *
+ * @param string $name Form field name of image
+ *
+ * @return string Image name
+ * @access public
+ */
+ function imageUpload($name)
+ {
+ $fileType = null;
+ if (preg_match("/^http/", $name)) {
+ $fileType = 'URL';
+ } elseif (is_array($_FILES[$name])) {
+ $fileType = 'Upload';
+ }
+ if ($fileType) {
+ $request = $this->buildImageServerXML($name, $fileType);
+ $ch = curl_init();
+ if ($fileType == "URL") {
+ $fileData = array(
+ 'request' => $request
+ );
+ } else {
+ if (version_compare(PHP_VERSION, '5.5.0', '>=')) {
+ $fileData = array(
+ 'request' => $request,
+ 'file_upload' => new CurlFile(
+ $_FILES[$name]['tmp_name'],
+ $_FILES[$name]['type'],
+ $_FILES[$name]['name']
+ ),
+ 'file_upload_name' => $_FILES[$name]['name']
+ );
+ } else {
+ $fileData = array(
+ 'request' => $request,
+ 'file_upload' => '@'.$_FILES[$name]['tmp_name'],
+ 'file_upload_name' => $_FILES[$name]['name']
+ );
+ }
+ }
+ $curlOptions = array(
+ CURLOPT_URL => IS_SUBMIT_URL,
+ CURLOPT_HEADER => 0,
+ CURLOPT_RETURNTRANSFER => 1,
+ CURLOPT_POSTFIELDS => $fileData
+ );
+ curl_setopt_array($ch, $curlOptions);
+
+ $response = curl_exec($ch);
+ curl_close($ch);
+ $xmlDoc = new DOMDocument;
+ $response = str_replace('<?xml version="1.0"?' . '>', '', $response);
+ $xmlDoc->loadXML($response);
+ $SuccessCode = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/ReplyStatus/SuccessCode'
+ );
+ $Message = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/ReplyStatus/Message'
+ );
+ $Owner = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/Owner'
+ );
+ $StoredName = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/StoredName'
+ );
+ $StoredSize = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/StoredSize'
+ );
+ $MediaType = $this->xmlPathContent(
+ $xmlDoc,
+ '/FileServerResponse/File/MediaType'
+ );
+ if ($SuccessCode != 0) {
+ //throw new Exception('Image Server Error said:'.$response);
+ throw new PEAR_Exception('Image Server Error said:'.$response);
+ exit;
+ }
+ return $StoredName;
+ }
+ }
+
+ // }}}
+
+ // {{{ getImageSize()
+
+ /**
+ * getImageSize
+ *
+ * Return image data on an image from image server
+ *
+ * @param string $image Full URI to image
+ * http://is0/userId/imageStyle/imageName
+ * Must be a full URI including an authority.
+ * No relative URIs, the // are mandatory
+ *
+ * @return array Image data 0 => width, 1 => height, 2 => html
+ * @access public
+ * @throws PEAR Error
+ */
+ function getImageSize($image)
+ {
+ $options = array('allowed_schemes' => array('http','https'));
+ if (!Validate::uri($image, $options)) {
+ throw new PEAR_Exception('Invalid URI for the image');
+ exit;
+ }
+
+ $ch = curl_init();
+ $curlOptions = array(
+ CURLOPT_URL => "{$image}/info",
+ CURLOPT_HEADER => 0,
+ CURLOPT_RETURNTRANSFER => 1,
+// CURLOPT_POSTFIELDS => $fileData
+ );
+ curl_setopt_array($ch, $curlOptions);
+
+ $response = curl_exec($ch);
+ curl_close($ch);
+ $wPattern = "/<width>(.*)<\/width>/";
+ preg_match($wPattern, $response, $matches);
+ $width = $matches[1];
+ $hPattern = "/<height>(.*)<\/height>/";
+ preg_match($hPattern, $response, $matches);
+ $height = $matches[1];
+ $html = "width=\"{$width}\" height=\"{$height}\"";
+ return array($width, $height, $html);
+ }
+
+ // }}}
+
+ // {{{ xmlPathContent()
+
+ /**
+ * xmlPathContent
+ *
+ * Grab the content given XPath Query
+ *
+ * @param unknown $dom DOMDocument nodelist
+ * @param unknown $content query for XPath
+ *
+ * @return object string of node
+ * @access public
+ */
+ function xmlPathContent($dom, $content)
+ {
+ $xPath = new DOMXPath($dom);
+ $nodelist = $xPath->query($content);
+ foreach ($nodelist as $entry) {
+ return $entry->nodeValue;
+ }
+ }
+
+ // }}}
+}
--- /dev/null
+<?php\r
+date_default_timezone_set('America/New_York');\r
+\r
+/**\r
+ * Class that is using REST to communicate with ConstantContact server\r
+ * This class currently supports actions performed using the contacts, lists, and campaigns APIs\r
+ * @author ConstantContact Dev Team\r
+ * @version 2.0.0\r
+ * @since 30.03.2010\r
+ */\r
+class CC_Utility\r
+{\r
+\r
+ // FROM HERE YOU MAY MODIFY YOUR CREDENTIALS\r
+ var $login = CONSTANT_CONTACT_LOGIN; //Username for your account\r
+ var $password = CONSTANT_CONTACT_PASSWORD; //Password for your account\r
+ var $apikey = CONSTANT_CONTACT_APIKEY; // API Key for your account.\r
+ // CONTACT LIST OPTIONS\r
+ var $contact_lists = array(); // Define which lists will be available for sign-up.\r
+ var $force_lists = false; // Set this to true to take away the ability for users to select and de-select lists\r
+ var $show_contact_lists = true; // Set this to false to hide the list name(s) on the sign-up form.\r
+ // NOTE - Contact Lists will only be hidden if force_lists is set to true. This is to prevent available checkboxes form being hidden.\r
+ // FORM OPT IN SOURCE - (Who is performing these actions?)\r
+ var $actionBy = 'ACTION_BY_CONTACT'; // Values: ACTION_BY_CUSTOMER or ACTION_BY_CONTACT\r
+ // ACTION_BY_CUSTOMER - Constant Contact Account holder. Used in internal applications.\r
+ // ACTION_BY_CONTACT - Action by Site visitor. Used in web site sign-up forms.\r
+ // DEBUGGING\r
+ var $curl_debug = true; // Set this to true to see the response code returned by cURL\r
+ // YOUR BASIC CHANGES SHOULD END HERE\r
+ var $requestLogin; //this contains full authentication string.\r
+ var $lastError = ''; // this variable will contain last error message (if any)\r
+ var $apiPath = 'https://api.constantcontact.com/ws/customers/'; //is used for server calls.\r
+ var $doNotIncludeLists = array('Removed', 'Do Not Mail', 'Active'); //define which lists shouldn't be returned.\r
+\r
+ public function __construct()\r
+ {\r
+ //when the object is getting initialized, the login string must be created as API_KEY%LOGIN:PASSWORD\r
+ $this->requestLogin = $this->apikey . "%" . $this->login . ":" . $this->password;\r
+ $this->apiPath = $this->apiPath . $this->login;\r
+\r
+ try {\r
+ if ($this->login == "username" || $this->password == "password"\r
+ || $this->apikey == "apikey") {\r
+ throw new Exception("You need to update your credentials in your cc_class.php");\r
+ }\r
+ } catch (Exception $e) {\r
+ echo "<strong>" . $e . "</strong>";\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Method that returns a list with all states found in states.txt file\r
+ * @return array with state codes and state names\r
+ */\r
+ public function getStates()\r
+ {\r
+ $returnArr = array();\r
+ $lines = file("states.txt");\r
+ foreach ($lines as $line) {\r
+ $tmp = explode(" - ", $line);\r
+ if (sizeof($tmp) == 2) {\r
+ $returnArr[trim($tmp[1])] = trim($tmp[0]);\r
+ }\r
+ }\r
+ return $returnArr;\r
+ }\r
+\r
+ /**\r
+ * Returns a list with all countries found in countries.txt file\r
+ * @return array with country codes and country names\r
+ */\r
+ public function getCountries()\r
+ {\r
+ $returnArr = array();\r
+ $lines = file("countries.txt");\r
+ foreach ($lines as $line) {\r
+ $tmp = explode(" - ", $line);\r
+ if (sizeof($tmp) == 2) {\r
+ $returnArr[trim($tmp[1])] = trim($tmp[0]);\r
+ }\r
+ }\r
+ return $returnArr;\r
+ }\r
+\r
+ /**\r
+ * Validate an email address\r
+ * @return TRUE if address is valid and FALSE if not.\r
+ */\r
+ protected function isValidEmail($email)\r
+ {\r
+ return preg_match('/^[_a-z0-9-][^()<>@,;:"[] ]*@([a-z0-9-]+.)+[a-z]{2,4}$/i', $email);\r
+ }\r
+\r
+ /**\r
+ * Private function used to send requests to ConstantContact server\r
+ * @param string $request - is the URL where the request will be made\r
+ * @param string $parameter - if it is not empty then this parameter will be sent using POST method\r
+ * @param string $type - GET/POST/PUT/DELETE\r
+ * @return a string containing server output/response\r
+ */\r
+ protected function doServerCall($request, $parameter = '', $type = "GET")\r
+ {\r
+ $ch = curl_init();\r
+ $request = str_replace('http://', 'https://', $request);\r
+ // Convert id URI to BASIC compliant\r
+ curl_setopt($ch, CURLOPT_URL, $request);\r
+ curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");\r
+ curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\r
+ curl_setopt($ch, CURLOPT_USERPWD, $this->requestLogin);\r
+ # curl_setopt ($ch, CURLOPT_FOLLOWLOCATION ,1);\r
+ curl_setopt($ch, CURLOPT_HEADER, 0);\r
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r
+ curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type:application/atom+xml", 'Content-Length: ' . strlen($parameter)));\r
+ curl_setopt($ch, CURLOPT_FAILONERROR, 1);\r
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\r
+ switch ($type) {\r
+ case 'POST':\r
+ curl_setopt($ch, CURLOPT_POST, 1);\r
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $parameter);\r
+ break;\r
+ case 'PUT':\r
+ curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");\r
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $parameter);\r
+ break;\r
+ case 'DELETE':\r
+ curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");\r
+ break;\r
+ default:\r
+ curl_setopt($ch, CURLOPT_HTTPGET, 1);\r
+ break;\r
+ }\r
+\r
+ $emessage = curl_exec($ch);\r
+ if ($this->curl_debug) {\r
+ echo $error = curl_error($ch);\r
+ }\r
+ curl_close($ch);\r
+\r
+ return $emessage;\r
+ }\r
+\r
+}\r
+\r
+/**\r
+ * Class that is used for retrieving\r
+ * all the Email Lists from Constant Contact and\r
+ * all Registered Email Addresses\r
+ */\r
+class CC_List\r
+ extends CC_Utility\r
+{\r
+\r
+ /**\r
+ * Recursive Method that retrieves all the Email Lists from ConstantContact.\r
+ * @param string $path [default is empty]\r
+ * @return array of lists\r
+ */\r
+ public function getLists($path = '')\r
+ {\r
+ $mailLists = array();\r
+\r
+ if (empty($path)) {\r
+ $call = $this->apiPath . '/lists';\r
+ } else {\r
+ $call = $path;\r
+ }\r
+\r
+ $return = $this->doServerCall($call);\r
+ $parsedReturn = simplexml_load_string($return);\r
+ $call2 = '';\r
+\r
+ foreach ($parsedReturn->link as $item) {\r
+ $tmp = $item->Attributes();\r
+ $nextUrl = '';\r
+ if ((string) $tmp->rel == 'next') {\r
+ $nextUrl = (string) $tmp->href;\r
+ $arrTmp = explode($this->login, $nextUrl);\r
+ $nextUrl = $arrTmp[1];\r
+ $call2 = $this->apiPath . $nextUrl;\r
+ break;\r
+ }\r
+ }\r
+\r
+ foreach ($parsedReturn->entry as $item) {\r
+ if ($this->contact_lists) {\r
+ if (in_array((string) $item->title, $this->contact_lists)) {\r
+ $tmp = array();\r
+ $tmp['id'] = (string) $item->id;\r
+ $tmp['title'] = (string) $item->title;\r
+ $mailLists[] = $tmp;\r
+ }\r
+ } else if (!in_array((string) $item->title, $this->doNotIncludeLists)) {\r
+ $tmp = array();\r
+ $tmp['id'] = (string) $item->id;\r
+ $tmp['title'] = (string) $item->title;\r
+ $mailLists[] = $tmp;\r
+ }\r
+ }\r
+\r
+ if (empty($call2)) {\r
+ return $mailLists;\r
+ } else {\r
+ return array_merge($mailLists, $this->getLists($call2));\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Method that retrieves all Registered Email Addresses.\r
+ * @param string $email_id [default is empty]\r
+ * @return array of lists\r
+ */\r
+ public function getAccountLists($email_id = '')\r
+ {\r
+ $mailAccountList = array();\r
+\r
+ if (empty($email_id)) {\r
+ $call = $this->apiPath . '/settings/emailaddresses';\r
+ } else {\r
+ $call = $this->apiPath . '/settings/emailaddresses/' . $email_id;\r
+ }\r
+\r
+ $return = $this->doServerCall($call);\r
+ $parsedReturn = simplexml_load_string($return);\r
+\r
+ foreach ($parsedReturn->entry as $item) {\r
+ $nextStatus = $item->content->Email->Status;\r
+ $nextEmail = (string) $item->title;\r
+ $nextId = $item->id;\r
+ $nextAccountList = array('Email' => $nextEmail, 'Id' => $nextId);\r
+ if ($nextStatus == 'Verified') {\r
+ $mailAccountList[] = $nextAccountList;\r
+ }\r
+ }\r
+ return $mailAccountList;\r
+ }\r
+\r
+}\r
+\r
+/**\r
+ * Class that is used for ConstantConact CRUD management\r
+ */\r
+class CC_Contact\r
+ extends CC_Utility\r
+{\r
+\r
+ /**\r
+ * Method that checks if a subscriber already exist\r
+ * @param string $email\r
+ * @return subscriber`s id if it exists or false if it doesn't\r
+ */\r
+ public function subscriberExists($email = '')\r
+ {\r
+ $call = $this->apiPath . '/contacts?email=' . $email;\r
+ $return = $this->doServerCall($call);\r
+ $xml = simplexml_load_string($return);\r
+ $id = $xml->entry->id;\r
+ if ($id) {\r
+ return $id;\r
+ } else {\r
+ return false;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Method that retrieves from Constant Contact a collection with all the Subscribers\r
+ * If email parameter is mentioned then only mentioned contact is retrieved.\r
+ * @param string $email\r
+ * @return Bi-Dimenstional array with information about contacts.\r
+ */\r
+ public function getSubscribers($email = '', $page = '')\r
+ {\r
+ $contacts = array();\r
+ $contacts['items'] = array();\r
+\r
+ if (!empty($email)) {\r
+ $call = $this->apiPath . '/contacts?email=' . $email;\r
+ } else {\r
+ if (!empty($page)) {\r
+ $call = $this->apiPath . $page;\r
+ } else {\r
+ $call = $this->apiPath . '/contacts';\r
+ }\r
+ }\r
+\r
+ $return = $this->doServerCall($call);\r
+ $parsedReturn = simplexml_load_string($return);\r
+ // We parse here the link array to establish which are the next page and previous page\r
+ foreach ($parsedReturn->link as $item) {\r
+ $attributes = $item->Attributes();\r
+\r
+ if (!empty($attributes['rel']) && $attributes['rel'] == 'next') {\r
+ $tmp = explode($this->login, $attributes['href']);\r
+ $contacts['next'] = $tmp[1];\r
+ }\r
+ if (!empty($attributes['rel']) && $attributes['rel'] == 'first') {\r
+ $tmp = explode($this->login, $attributes['href']);\r
+ $contacts['first'] = $tmp[1];\r
+ }\r
+ if (!empty($attributes['rel']) && $attributes['rel'] == 'current') {\r
+ $tmp = explode($this->login, $attributes['href']);\r
+ $contacts['current'] = $tmp[1];\r
+ }\r
+ }\r
+\r
+ foreach ($parsedReturn->entry as $item) {\r
+ $tmp = array();\r
+ $tmp['id'] = (string) $item->id;\r
+ $tmp['title'] = (string) $item->title;\r
+ $tmp['status'] = (string) $item->content->Contact->Status;\r
+ $tmp['EmailAddress'] = (string) $item->content->Contact->EmailAddress;\r
+ $tmp['EmailType'] = (string) $item->content->Contact->EmailType;\r
+ $tmp['Name'] = (string) $item->content->Contact->Name;\r
+ $contacts['items'][] = $tmp;\r
+ }\r
+\r
+ return $contacts;\r
+ }\r
+\r
+ /**\r
+ * Retrieves all the details for a specific contact identified by $email.\r
+ * @param string $email\r
+ * @return array with all information about the contact.\r
+ */\r
+ public function getSubscriberDetails($email)\r
+ {\r
+ $contact = $this->getSubscribers($email);\r
+ $fullContact = array();\r
+ $call = str_replace('http://', 'https://', $contact['items'][0]['id']);\r
+ // Convert id URI to BASIC compliant\r
+ $return = $this->doServerCall($call);\r
+ $parsedReturn = simplexml_load_string($return);\r
+ $fullContact['id'] = $parsedReturn->id;\r
+ $fullContact['email_address'] = $parsedReturn->content->Contact->EmailAddress;\r
+ $fullContact['first_name'] = $parsedReturn->content->Contact->FirstName;\r
+ $fullContact['last_name'] = $parsedReturn->content->Contact->LastName;\r
+ $fullContact['middle_name'] = $parsedReturn->content->Contact->MiddleName;\r
+ $fullContact['company_name'] = $parsedReturn->content->Contact->CompanyName;\r
+ $fullContact['job_title'] = $parsedReturn->content->Contact->JobTitle;\r
+ $fullContact['home_number'] = $parsedReturn->content->Contact->HomePhone;\r
+ $fullContact['work_number'] = $parsedReturn->content->Contact->WorkPhone;\r
+ $fullContact['address_line_1'] = $parsedReturn->content->Contact->Addr1;\r
+ $fullContact['address_line_2'] = $parsedReturn->content->Contact->Addr2;\r
+ $fullContact['address_line_3'] = $parsedReturn->content->Contact->Addr3;\r
+ $fullContact['city_name'] = (string) $parsedReturn->content->Contact->City;\r
+ $fullContact['state_code'] = (string) $parsedReturn->content->Contact->StateCode;\r
+ $fullContact['state_name'] = (string) $parsedReturn->content->Contact->StateName;\r
+ $fullContact['country_code'] = $parsedReturn->content->Contact->CountryCode;\r
+ $fullContact['zip_code'] = $parsedReturn->content->Contact->PostalCode;\r
+ $fullContact['sub_zip_code'] = $parsedReturn->content->Contact->SubPostalCode;\r
+ $fullContact['custom_field_1'] = $parsedReturn->content->Contact->CustomField1;\r
+ $fullContact['custom_field_2'] = $parsedReturn->content->Contact->CustomField2;\r
+ $fullContact['custom_field_3'] = $parsedReturn->content->Contact->CustomField3;\r
+ $fullContact['custom_field_4'] = $parsedReturn->content->Contact->CustomField4;\r
+ $fullContact['custom_field_5'] = $parsedReturn->content->Contact->CustomField5;\r
+ $fullContact['custom_field_6'] = $parsedReturn->content->Contact->CustomField6;\r
+ $fullContact['custom_field_7'] = $parsedReturn->content->Contact->CustomField7;\r
+ $fullContact['custom_field_8'] = $parsedReturn->content->Contact->CustomField8;\r
+ $fullContact['custom_field_9'] = $parsedReturn->content->Contact->CustomField9;\r
+ $fullContact['custom_field_10'] = $parsedReturn->content->Contact->CustomField10;\r
+ $fullContact['custom_field_11'] = $parsedReturn->content->Contact->CustomField11;\r
+ $fullContact['custom_field_12'] = $parsedReturn->content->Contact->CustomField12;\r
+ $fullContact['custom_field_13'] = $parsedReturn->content->Contact->CustomField13;\r
+ $fullContact['custom_field_14'] = $parsedReturn->content->Contact->CustomField14;\r
+ $fullContact['custom_field_15'] = $parsedReturn->content->Contact->CustomField15;\r
+ $fullContact['notes'] = $parsedReturn->content->Contact->Note;\r
+ $fullContact['mail_type'] = $parsedReturn->content->Contact->EmailType;\r
+ $fullContact['status'] = $parsedReturn->content->Contact->Status;\r
+ $fullContact['lists'] = array();\r
+\r
+ if ($parsedReturn->content->Contact->ContactLists->ContactList) {\r
+ foreach ($parsedReturn->content->Contact->ContactLists->ContactList as $item) {\r
+ $fullContact['lists'][] = trim((string) $item->Attributes());\r
+ }\r
+ }\r
+\r
+ return $fullContact;\r
+ }\r
+\r
+ /**\r
+ * Method that modifies a contact State to DO NOT MAIL\r
+ * @param string $email - contact email address\r
+ * @return TRUE in case of success or FALSE otherwise\r
+ */\r
+ public function deleteSubscriber($email)\r
+ {\r
+ if (empty($email)) {\r
+ return false;\r
+ }\r
+ $contact = $this->getSubscribers($email);\r
+ $id = $contact['items'][0]['id'];\r
+ $return = $this->doServerCall($id, '', 'DELETE');\r
+ if (!empty($return)) {\r
+ return false;\r
+ }\r
+ return true;\r
+ }\r
+\r
+ /**\r
+ * Method that modifies a contact State to REMOVED\r
+ * @param string $email - contact email address\r
+ * @return TRUE in case of success or FALSE otherwise\r
+ */\r
+ public function removeSubscriber($email)\r
+ {\r
+ $contact = $this->getSubscriberDetails($email);\r
+ $contact['lists'] = array();\r
+ $xml = $this->createContactXML($contact['id'], $contact);\r
+\r
+ if ($this->editSubscriber($contact['id'], $xml)) {\r
+ return true;\r
+ } else {\r
+ return false;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Upload a new contact to Constant Contact server\r
+ * @param strong $contactXML - formatted XML with contact information\r
+ * @return TRUE in case of success or FALSE otherwise\r
+ */\r
+ public function addSubscriber($contactXML)\r
+ {\r
+ $call = $this->apiPath . '/contacts';\r
+ $return = $this->doServerCall($call, $contactXML, 'POST');\r
+ $parsedReturn = simplexml_load_string($return);\r
+\r
+ if ($return) {\r
+ return true;\r
+ } else {\r
+ $xml = simplexml_load_string($contactXML);\r
+ $emailAddress = $xml->content->Contact->EmailAddress;\r
+ if ($this->subscriberExists($emailAddress)) {\r
+ $this->lastError = 'This contact already exists. <a href="edit_contact.php?email=' . $emailAddress . '">Click here</a> to edit the contact details.';\r
+ } else {\r
+ $this->lastError = 'An Error Occurred';\r
+ }\r
+ return false;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Modifies a contact\r
+ * @param string $contactUrl - identifies the url for the modified contact\r
+ * @param string $contactXML - formed XML with contact information\r
+ * @return TRUE in case of success or FALSE otherwise\r
+ */\r
+ public function editSubscriber($contactUrl, $contactXML)\r
+ {\r
+ $return = $this->doServerCall($contactUrl, $contactXML, 'PUT');\r
+\r
+ if (!empty($return)) {\r
+ if (strpos($return, '<') !== false) {\r
+ $parsedReturn = simplexml_load_string($return);\r
+ if (!empty($parsedReturn->message)) {\r
+ $this->lastError = $parsedReturn->message;\r
+ }\r
+ } else {\r
+ $this->lastError = $parsedReturn->message;\r
+ }\r
+ return false;\r
+ }\r
+ return true;\r
+ }\r
+\r
+ /**\r
+ * Method that compose the needed XML format for a contact\r
+ * @param string $id\r
+ * @param array $params\r
+ * @return Formed XML\r
+ */\r
+ public function createContactXML($id, $params = array())\r
+ {\r
+ if (empty($id)) {\r
+ $id = "urn:uuid:E8553C09F4xcvxCCC53F481214230867087";\r
+ }\r
+\r
+ $update_date = date("Y-m-d") . 'T' . date("H:i:s") . '+01:00';\r
+ $xml_string = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><entry xmlns='http://www.w3.org/2005/Atom'></entry>";\r
+ $xml_object = simplexml_load_string($xml_string);\r
+ $title_node = $xml_object->addChild("title", htmlspecialchars(("TitleNode"), ENT_QUOTES, 'UTF-8'));\r
+ $updated_node = $xml_object->addChild("updated", htmlspecialchars(($update_date), ENT_QUOTES, 'UTF-8'));\r
+ $author_node = $xml_object->addChild("author");\r
+ $author_name = $author_node->addChild("name", ("CTCT Samples"));\r
+ $id_node = $xml_object->addChild("id", htmlspecialchars(($id), ENT_QUOTES, 'UTF-8'));\r
+ $summary_node = $xml_object->addChild("summary", htmlspecialchars(("Customer document"), ENT_QUOTES, 'UTF-8'));\r
+ $summary_node->addAttribute("type", "text");\r
+ $content_node = $xml_object->addChild("content");\r
+ $content_node->addAttribute("type", "application/vnd.ctct+xml");\r
+ $contact_node = $content_node->addChild("Contact", htmlspecialchars(("Customer document"), ENT_QUOTES, 'UTF-8'));\r
+ $contact_node->addAttribute("xmlns", "http://ws.constantcontact.com/ns/1.0/");\r
+ $email_node = $contact_node->addChild("EmailAddress", htmlspecialchars(($params['email_address']), ENT_QUOTES, 'UTF-8'));\r
+ $fname_node = $contact_node->addChild("FirstName", urldecode(htmlspecialchars(($params['first_name']), ENT_QUOTES, 'UTF-8')));\r
+ $lname_node = $contact_node->addChild("LastName", urldecode(htmlspecialchars(($params['last_name']), ENT_QUOTES, 'UTF-8')));\r
+ $lname_node = $contact_node->addChild("MiddleName", urldecode(htmlspecialchars(($params['middle_name']), ENT_QUOTES, 'UTF-8')));\r
+ if (isset($params['company_name'])) {\r
+ $lname_node = $contact_node->addChild("CompanyName", urldecode(htmlspecialchars(($params['company_name']), ENT_QUOTES, 'UTF-8')));\r
+ }\r
+ if (isset($params['JobTitle'])) {\r
+ $lname_node = $contact_node->addChild("job_title", urldecode(htmlspecialchars(($params['job_title']), ENT_QUOTES, 'UTF-8')));\r
+ }\r
+ if (isset($params['status'])) {\r
+ if ($params['status'] == 'Do Not Mail') {\r
+ $this->actionBy = 'ACTION_BY_CONTACT';\r
+ }\r
+ }\r
+\r
+ $optin_node = $contact_node->addChild("OptInSource", htmlspecialchars($this->actionBy));\r
+ $hn_node = $contact_node->addChild("HomePhone", htmlspecialchars($params['home_number'], ENT_QUOTES, 'UTF-8'));\r
+ if (isset($params['work_number'])) {\r
+ $wn_node = $contact_node->addChild("WorkPhone", htmlspecialchars($params['work_number'], ENT_QUOTES, 'UTF-8'));\r
+ }\r
+ $ad1_node = $contact_node->addChild("Addr1", htmlspecialchars($params['address_line_1'], ENT_QUOTES, 'UTF-8'));\r
+ $ad2_node = $contact_node->addChild("Addr2", htmlspecialchars($params['address_line_2'], ENT_QUOTES, 'UTF-8'));\r
+ $ad3_node = $contact_node->addChild("Addr3", htmlspecialchars($params['address_line_3'], ENT_QUOTES, 'UTF-8'));\r
+ $city_node = $contact_node->addChild("City", htmlspecialchars($params['city_name'], ENT_QUOTES, 'UTF-8'));\r
+ $state_node = $contact_node->addChild("StateCode", htmlspecialchars($params['state_code'], ENT_QUOTES, 'UTF-8'));\r
+ $state_name = $contact_node->addChild("StateName", htmlspecialchars($params['state_name'], ENT_QUOTES, 'UTF-8'));\r
+ $ctry_node = $contact_node->addChild("CountryCode", htmlspecialchars($params['country_code'], ENT_QUOTES, 'UTF-8'));\r
+ $zip_node = $contact_node->addChild("PostalCode", htmlspecialchars($params['zip_code'], ENT_QUOTES, 'UTF-8'));\r
+ $subzip_node = $contact_node->addChild("SubPostalCode", htmlspecialchars($params['sub_zip_code'], ENT_QUOTES, 'UTF-8'));\r
+ if (isset($params['notes'])) {\r
+ $note_node = $contact_node->addChild("Note", htmlspecialchars($params['notes'], ENT_QUOTES, 'UTF-8'));\r
+ }\r
+ $emailtype_node = $contact_node->addChild("EmailType", htmlspecialchars($params['mail_type'], ENT_QUOTES, 'UTF-8'));\r
+\r
+ if (!empty($params['custom_fields'])) {\r
+ foreach ($params['custom_fields'] as $k => $v) {\r
+ $contact_node->addChild("CustomField" . $k, htmlspecialchars(($v), ENT_QUOTES, 'UTF-8'));\r
+ }\r
+ }\r
+\r
+ $contactlists_node = $contact_node->addChild("ContactLists");\r
+ if ($params['lists']) {\r
+ foreach ($params['lists'] as $tmp) {\r
+ $contactlist_node = $contactlists_node->addChild("ContactList");\r
+ $contactlist_node->addAttribute("id", $tmp);\r
+ }\r
+ }\r
+\r
+ $entry = $xml_object->asXML();\r
+ return $entry;\r
+ }\r
+\r
+}\r
+\r
+/**\r
+ * Class that is used for ConstantCampaign CRUD management\r
+ */\r
+class CC_Campaign\r
+ extends CC_Utility\r
+{\r
+\r
+ // set this to true to see the xml sent and the output received\r
+ var $sent_recived_debug = false;\r
+ var $usStates = array("AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY");\r
+ var $caStates = array("AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT");\r
+ var $armedForces = array("AA", "AE", "AP");\r
+\r
+ /**\r
+ * Method that returns a html sample for email campaign\r
+ * @param string $sample [default is EmailContent]: EmailContent, EmailTextContent or\r
+ * PermissionReminder\r
+ * @param string $type [default is html]: html or text\r
+ * @return a default content for email content or permission reminder\r
+ */\r
+ public function getEmailIntro($sample = 'EmailContent', $type = 'html')\r
+ {\r
+ switch ($sample) {\r
+ case 'EmailContent':\r
+ $file = 'EmailContent.txt';\r
+ break;\r
+ case 'EmailTextContent':\r
+ $file = 'EmailContent.txt';\r
+ $type = 'text';\r
+ break;\r
+ case 'PermissionReminder':\r
+ $file = 'PermissionReminder.txt';\r
+ break;\r
+ default:\r
+ $file = 'EmailContent.txt';\r
+ }\r
+\r
+ $handle = fopen("txt/$file", "rb");\r
+ $contents = '';\r
+ while (!feof($handle)) {\r
+ $contents .= fread($handle, 8192);\r
+ }\r
+ $contents = ($type == 'html')\r
+ ? ($contents)\r
+ : (trim(strip_tags($contents)));\r
+ fclose($handle);\r
+ return $contents;\r
+ }\r
+\r
+ /**\r
+ * Method that retrieves campaingn collections from ConstantCampaign\r
+ * If campaign_id is mentioned then only mentioned campaign is retrieved.\r
+ * If campaign_id represents a status [SENT, DRAFT, RUNNING, SCHEDULED]\r
+ * only the campaigns with that status will be retrieved\r
+ * @param string $campaign_id [default is empty]\r
+ * @return Bi-Dimenstional array with information about campaigns.\r
+ */\r
+ public function getCampaigns($campaign_id = '', $page = '')\r
+ {\r
+ $campaigns = array();\r
+ $campaigns['items'] = array();\r
+\r
+ switch ($campaign_id) {\r
+ case 'SENT':\r
+ case 'DRAFT':\r
+ case 'RUNNING':\r
+ case 'SCHEDULED':\r
+ $call = $this->apiPath . '/campaigns?status=' . $campaign_id;\r
+ break;\r
+ case 'ALL':\r
+ $call = (!empty($page))\r
+ ? ($this->apiPath . $page)\r
+ : ($this->apiPath . '/campaigns');\r
+ break;\r
+ default:\r
+ $call = $this->apiPath . '/campaigns/' . $campaign_id;\r
+ }\r
+\r
+ $return = $this->doServerCall($call);\r
+ $parsedReturn = simplexml_load_string($return);\r
+ //we parse here the link array to establish which are the next page and previous page\r
+ if ($parsedReturn != false) {\r
+\r
+ foreach ($parsedReturn->link as $item) {\r
+ $attributes = $item->Attributes();\r
+ if (!empty($attributes['rel']) && $attributes['rel'] == 'next') {\r
+ $tmp = explode($this->login, $attributes['href']);\r
+ $campaigns['next'] = $tmp[1];\r
+ }\r
+ if (!empty($attributes['rel']) && $attributes['rel'] == 'first') {\r
+ $tmp = explode($this->login, $attributes['href']);\r
+ $campaigns['first'] = $tmp[1];\r
+ }\r
+ if (!empty($attributes['rel']) && $attributes['rel'] == 'current') {\r
+ $tmp = explode($this->login, $attributes['href']);\r
+ $campaigns['current'] = $tmp[1];\r
+ }\r
+ }\r
+\r
+ foreach ($parsedReturn->entry as $item) {\r
+ $tmp = array();\r
+ $tmp['id'] = (string) $item->id;\r
+ $tmp['title'] = (string) $item->title;\r
+ $tmp['name'] = (string) $item->content->Campaign->Name;\r
+ $tmp['status'] = (string) $item->content->Campaign->Status;\r
+ $timestamp = strtotime($item->content->Campaign->Date);\r
+ $campaig_date = date("F j, Y, g:i a", $timestamp);\r
+ $tmp['date'] = (string) $campaig_date;\r
+ $campaigns['items'][] = $tmp;\r
+ }\r
+ }\r
+ return $campaigns;\r
+ }\r
+\r
+ /**\r
+ * Retrieves all the details for a specific campaign identified by $id.\r
+ * @param string $id\r
+ * @return array with all information about the campaign.\r
+ */\r
+ public function getCampaignDetails($id)\r
+ {\r
+ if (!empty($id)) {\r
+ $fullContact = array();\r
+ $call = str_replace('http://', 'https://', $id);\r
+ // Convert id URI to BASIC compliant\r
+ $return = $this->doServerCall($call);\r
+ $parsedReturn = simplexml_load_string($return);\r
+ $fullCampaign['campaignId'] = $parsedReturn->id;\r
+ $cmp_vars = get_object_vars($parsedReturn->content->Campaign);\r
+\r
+ foreach ($cmp_vars as $var_name => $cmp_item) {\r
+ $fullCampaign[$var_name] = $cmp_item;\r
+ }\r
+\r
+ $cmp_from_email = $parsedReturn->content->Campaign->FromEmail->EmailAddress;\r
+ $fullCampaign['FromEmail'] = (string) $cmp_from_email;\r
+ $cmp_reply_email = $parsedReturn->content->Campaign->ReplyToEmail->EmailAddress;\r
+ $fullCampaign['ReplyToEmail'] = (string) $cmp_reply_email;\r
+ $fullCampaign['lists'] = array();\r
+\r
+ if ($parsedReturn->content->Campaign->ContactLists->ContactList) {\r
+ foreach ($parsedReturn->content->Campaign->ContactLists->ContactList as $item) {\r
+ $fullCampaign['lists'][] = trim((string) $item->Attributes());\r
+ }\r
+ }\r
+ return $fullCampaign;\r
+ } else {\r
+ return false;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Check if a specific campaign exist already\r
+ * @param string $id\r
+ * @param string $new_name\r
+ * @return a boolean value.\r
+ */\r
+ public function campaignExists($id = '', $new_name)\r
+ {\r
+ if (!empty($id)) {\r
+ $call = $this->apiPath . '/campaigns/' . $id;\r
+ $return = $this->doServerCall($call);\r
+ $xml = simplexml_load_string($return);\r
+ if ($xml !== false) {\r
+ $id = $xml->content->Campaign->Attributes();\r
+ $id = $id['id'];\r
+ $name = $xml->content->Campaign->Name;\r
+ } else {\r
+ $id = null;\r
+ $name = null;\r
+ }\r
+ $all_campaigns = $this->getCampaigns('ALL');\r
+ $all_campaigns = $all_campaigns['items'];\r
+ foreach ($all_campaigns as $key => $item) {\r
+ if ($item['name'] == $new_name) {\r
+ return 1; // 1 - the new campaign has a similar name with an old one\r
+ break;\r
+ }\r
+ }\r
+ /**\r
+ * 2 - this campaign already exist\r
+ * 0 - this is a new campaign\r
+ */\r
+ return ($id != null)\r
+ ? (2)\r
+ : (0);\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Method that delete a camaign; this will exclude\r
+ * the removed campaign from overall statistics\r
+ * @param string $id - campaign id\r
+ * @return TRUE in case of success or FALSE otherwise\r
+ */\r
+ public function deleteCampaign($id)\r
+ {\r
+ if (empty($id)) {\r
+ return false;\r
+ }\r
+ $return = $this->doServerCall($id, '', 'DELETE');\r
+ if (!empty($return) || $return === false) {\r
+ return false;\r
+ }\r
+ return true;\r
+ }\r
+\r
+ /**\r
+ * Upload a new campaign to ConstantContact server\r
+ * @param string $campaignXML - formatted XML with campaign information\r
+ * @return TRUE in case of success or FALSE otherwise\r
+ */\r
+ public function addCampaign($campaignXML)\r
+ {\r
+ $call = $this->apiPath . '/campaigns';\r
+ $return = $this->doServerCall($call, $campaignXML, 'POST');\r
+ $parsedReturn = simplexml_load_string($return);\r
+ if ($return) {\r
+ return true;\r
+ } else {\r
+ $xml = simplexml_load_string($campaignXML);\r
+ $cmp_id = $xml->content->Campaign->Attributes();\r
+ $cmp_id = $cmp_id['id'];\r
+ $cmp_name = $xml->content->Campaign->Name;\r
+ if (!empty($cmp_id)) {\r
+ $search_status = $this->campaignExists($cmp_id, $cmp_name);\r
+ switch ($search_status) {\r
+ case 0:\r
+ $error = 'An Error Occurred. The campaign could not be added.';\r
+ break;\r
+ case 1:\r
+ $error = 'The name of the campaign already exist. Each campaign must have a distinct name.';\r
+ break;\r
+ case 2:\r
+ $error = 'This campaign already exists.';\r
+ break;\r
+ default:\r
+ $error = 'An Error Occurred. The campaign could not be added.';\r
+ }\r
+ $this->lastError = $error;\r
+ } else {\r
+ $this->lastError = 'An Error Occurred. The campaign could not be added.';\r
+ }\r
+ return false;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Modifies a campaign\r
+ * @param string $campaignId - identifies the id for the modified campaign\r
+ * @param string $campaignXML - formed XML with campaign information\r
+ * @return TRUE in case of success or FALSE otherwise\r
+ */\r
+ public function editCampaign($campaignId, $campaignXML)\r
+ {\r
+ $return = $this->doServerCall($campaignId, $campaignXML, 'PUT');\r
+ if ($return === false) {\r
+ $this->lastError = 'An Error Occurred. The campaign could not be edited.';\r
+ return false;\r
+ } else {\r
+ if (!empty($return)) {\r
+ if (strpos($return, '<') !== false) {\r
+ $parsedReturn = simplexml_load_string($return);\r
+ if (!empty($parsedReturn->message)) {\r
+ $this->lastError = $parsedReturn->message;\r
+ }\r
+ } else {\r
+ $this->lastError = $parsedReturn->message;\r
+ }\r
+ return false;\r
+ }\r
+ return true;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Method that validate the current campaign before sending it to server\r
+ * @param string $id\r
+ * @param array $params\r
+ * @return an error message or true\r
+ */\r
+ public function validateCampaign($id, $params = array())\r
+ {\r
+ if (trim($params['cmp_name']) == '') {\r
+ $this->lastError = '<i>Campaign Name</i> is mandatory.';\r
+ return true;\r
+ } elseif (trim($params['cmp_subject']) == '') {\r
+ $this->lastError = '<i>Subject</i> is mandatory.';\r
+ return true;\r
+ } elseif (trim($params['cmp_from_name']) == '') {\r
+ $this->lastError = '<i>From Name</i> is mandatory.';\r
+ return true;\r
+ } elseif (trim($params['cmp_from_email']) == '') {\r
+ $this->lastError = '<i>From Email Address</i> is mandatory.';\r
+ return true;\r
+ } elseif (trim($params['cmp_reply_email']) == '') {\r
+ $this->lastError = '<i>Reply Email Address</i> is mandatory.';\r
+ return true;\r
+ } elseif (trim($params['cmp_grt_name']) == '') {\r
+ $this->lastError = '<i>Greeting Name</i> is mandatory.';\r
+ return true;\r
+ } elseif (trim($params['cmp_org_name']) == '') {\r
+ $this->lastError = '<i>Organization Name</i> is mandatory.';\r
+ return true;\r
+ } elseif (trim($params['cmp_org_addr1']) == '') {\r
+ $this->lastError = '<i>Address 1</i> is mandatory.';\r
+ return true;\r
+ } elseif (trim($params['cmp_org_city']) == '') {\r
+ $this->lastError = '<i>City</i> is mandatory.';\r
+ return true;\r
+ } elseif (trim($params['org_zip']) == '') {\r
+ $this->lastError = '<i>Zip/Postal Code</i> is mandatory.';\r
+ return true;\r
+ } elseif (trim($params['org_country']) == '') {\r
+ $this->lastError = '<i>Country</i> is mandatory.';\r
+ return true;\r
+ } elseif (trim($params['cmp_html_body']) == '') {\r
+ $this->lastError = '<i>HTML Body</i> is mandatory.';\r
+ return true;\r
+ } elseif ($params["lists"] == NULL) {\r
+ $this->lastError = 'Choose at least <i>one Campaign</i> from the list.';\r
+ return true;\r
+ } else {\r
+ if (trim($params['cmp_perm_reminder']) == 'YES') {\r
+ $reminder_text = $params['cmp_txt_reminder'];\r
+ if (trim($reminder_text) == '') {\r
+ $this->lastError = '<i>Permission Reminder</i> is required.';\r
+ return true;\r
+ }\r
+ }\r
+ if (trim($params['org_country']) != '') {\r
+ if (trim($params['org_country']) == 'us') {\r
+ if (trim($params['org_state_us']) == '') {\r
+ $this->lastError = '<i>State</i> is mandatory.';\r
+ return true;\r
+ }\r
+ if (in_array($params['org_state_us'], $this->caStates)) {\r
+ $this->lastError = '<i>US State</i> is required.';\r
+ return true;\r
+ }\r
+ } elseif (trim($params['org_country']) == 'ca') {\r
+ if (trim($params['org_state_us']) == '') {\r
+ $this->lastError = '<i>State</i> is mandatory.';\r
+ return true;\r
+ }\r
+ if (in_array($params['org_state_us'], $this->usStates)) {\r
+ $this->lastError = '<i>CA State</i> is required.';\r
+ return true;\r
+ }\r
+ }\r
+ }\r
+ if (trim($params['cmp_as_webpage']) == 'YES') {\r
+ if (trim($params['cmp_as_webtxt']) == '') {\r
+ $this->lastError = '<i>Webpage Text</i> is required.';\r
+ return true;\r
+ }\r
+ if (trim($params['cmp_as_weblink']) == '') {\r
+ $this->lastError = '<i>Webpage Link Text</i> is required.';\r
+ return true;\r
+ }\r
+ }\r
+ if (trim($params['cmp_forward']) == 'YES') {\r
+ $fwd_email = $params['cmp_fwd_email'];\r
+ if (trim($params['cmp_fwd_email']) == '') {\r
+ $this->lastError = '<i>Forward email</i> is required.';\r
+ return true;\r
+ }\r
+ }\r
+ if (trim($params['cmp_subscribe']) == 'YES') {\r
+ if (trim($params['cmp_sub_link']) == '') {\r
+ $this->lastError = '<i>Subscribe me</i> is required.';\r
+ return true;\r
+ }\r
+ } else {\r
+ return false;\r
+ }\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Method that compose the needed XML format for a campaign\r
+ * @param string $id\r
+ * @param array $params\r
+ * @return Formed XML\r
+ */\r
+ public function createCampaignXML($id, $params = array())\r
+ {\r
+ if (empty($id)) { // Add a new Campaign\r
+ $id = str_replace('https://', 'http://', $this->apiPath . "/campaigns/1100546096289");\r
+ $standard_id = str_replace('https://', 'http://', $this->apiPath . "/campaigns");\r
+ } else {\r
+ $standard_id = $id;\r
+ }\r
+ $href = str_replace("http://api.constantcontact.com", "", $id);\r
+ $standard_href = str_replace("https://api.constantcontact.com", "", $this->apiPath . "/campaigns");\r
+ $update_date = date("Y-m-d") . 'T' . date("H:i:s") . '+01:00';\r
+ $xml_string = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><entry xmlns='http://www.w3.org/2005/Atom'></entry>";\r
+ $xml_object = simplexml_load_string($xml_string);\r
+ $link_node = $xml_object->addChild("link");\r
+ $link_node->addAttribute("href", $standard_href); //[1st *href]\r
+ $link_node->addAttribute("rel", "edit");\r
+ $id_node = $xml_object->addChild("id", $standard_id); //[1st *id]\r
+ $title_node = $xml_object->addChild("title", htmlspecialchars($params['cmp_name'], ENT_QUOTES, 'UTF-8'));\r
+ $title_node->addAttribute("type", "text");\r
+ $updated_node = $xml_object->addChild("updated", htmlentities($update_date));\r
+ $author_node = $xml_object->addChild("author");\r
+ $author_name = $author_node->addChild("name", htmlentities("Constant Contact"));\r
+ $content_node = $xml_object->addChild("content");\r
+ $content_node->addAttribute("type", "application/vnd.ctct+xml");\r
+ $campaign_node = $content_node->addChild("Campaign");\r
+ $campaign_node->addAttribute("xmlns", "http://ws.constantcontact.com/ns/1.0/");\r
+ $campaign_node->addAttribute("id", $id); //[2nd *id]\r
+ $name_node = $campaign_node->addChild("Name", urldecode(htmlspecialchars($params['cmp_name'], ENT_QUOTES, 'UTF-8')));\r
+ $campaign_status = !empty($params['cmp_status'])\r
+ ? ($params['cmp_status'])\r
+ : ('Draft');\r
+ $status_node = $campaign_node->addChild("Status", urldecode(htmlentities($campaign_status)));\r
+ $campaign_date = !empty($params['cmp_date'])\r
+ ? ($params['cmp_date'])\r
+ : ($update_date);\r
+ $date_node = $campaign_node->addChild("Date", urldecode(htmlentities($campaign_date)));\r
+ $subj_node = $campaign_node->addChild("Subject", urldecode(htmlspecialchars($params['cmp_subject'], ENT_QUOTES, 'UTF-8')));\r
+ $from_name_node = $campaign_node->addChild("FromName", urldecode(htmlspecialchars($params['cmp_from_name'], ENT_QUOTES, 'UTF-8')));\r
+ $view_as_webpage = (!empty($params['cmp_as_webpage']) && $params['cmp_as_webpage'] == 'YES')\r
+ ? ('YES')\r
+ : ('NO');\r
+ $as_webpage_node = $campaign_node->addChild("ViewAsWebpage", urldecode(htmlentities($view_as_webpage)));\r
+ #$as_web_lnk_txt = ($view_as_webpage == 'YES') ? ($params['cmp_as_weblink']) : ('');\r
+ $as_web_lnk_txt = $params['cmp_as_weblink'];\r
+ $as_weblink_node = $campaign_node->addChild("ViewAsWebpageLinkText", urldecode(htmlspecialchars(($as_web_lnk_txt), ENT_QUOTES, 'UTF-8')));\r
+ #$as_web_txt = ($view_as_webpage == 'YES') ? ($params['cmp_as_webtxt']) : ('');\r
+ $as_web_txt = $params['cmp_as_webtxt'];\r
+ $as_webtxt_node = $campaign_node->addChild("ViewAsWebpageText", urldecode(htmlspecialchars(($as_web_txt), ENT_QUOTES, 'UTF-8')));\r
+ $perm_reminder_node = $campaign_node->addChild("PermissionReminder", urldecode(htmlentities($params['cmp_perm_reminder'])));\r
+ $permission_reminder_text = ($params['cmp_perm_reminder'] == 'YES')\r
+ ? ($params['cmp_txt_reminder'])\r
+ : ('');\r
+ $text_reminder_node = $campaign_node->addChild("PermissionReminderText", urldecode(htmlspecialchars(($permission_reminder_text), ENT_QUOTES, 'UTF-8')));\r
+ $grt_sal_node = $campaign_node->addChild("GreetingSalutation", htmlspecialchars(($params['cmp_grt_sal']), ENT_QUOTES, 'UTF-8'));\r
+ $grt_name_node = $campaign_node->addChild("GreetingName", htmlentities($params['cmp_grt_name']));\r
+ $grt_str_node = $campaign_node->addChild("GreetingString", htmlspecialchars($params['cmp_grt_str'], ENT_QUOTES, 'UTF-8'));\r
+ $org_name_node = $campaign_node->addChild("OrganizationName", htmlspecialchars($params['cmp_org_name'], ENT_QUOTES, 'UTF-8'));\r
+ $org_addr1_node = $campaign_node->addChild("OrganizationAddress1", htmlspecialchars($params['cmp_org_addr1'], ENT_QUOTES, 'UTF-8'));\r
+ $org_addr2_node = $campaign_node->addChild("OrganizationAddress2", htmlspecialchars($params['cmp_org_addr2'], ENT_QUOTES, 'UTF-8'));\r
+ $org_addr3_node = $campaign_node->addChild("OrganizationAddress3", htmlspecialchars($params['cmp_org_addr3'], ENT_QUOTES, 'UTF-8'));\r
+ $org_city_node = $campaign_node->addChild("OrganizationCity", htmlspecialchars($params['cmp_org_city'], ENT_QUOTES, 'UTF-8'));\r
+ switch ($params['org_country']) {\r
+ case 'us':\r
+ $us_state = $params['org_state_us'];\r
+ break;\r
+ case 'ca':\r
+ $us_state = $params['org_state_us'];\r
+ break;\r
+ default:\r
+ $us_state = '';\r
+ }\r
+ $org_state_us_node = $campaign_node->addChild("OrganizationState", htmlentities($us_state));\r
+ switch ($params['org_country']) {\r
+ case 'us':\r
+ $international_state = '';\r
+ break;\r
+ case 'ca':\r
+ $international_state = '';\r
+ break;\r
+ default:\r
+ $international_state = htmlspecialchars($params['org_state'], ENT_QUOTES, 'UTF-8');\r
+ }\r
+ $org_state_name = $campaign_node->addChild("OrganizationInternationalState", htmlentities($international_state));\r
+ $org_country_node = $campaign_node->addChild("OrganizationCountry", htmlentities($params['org_country']));\r
+ $org_zip_node = $campaign_node->addChild("OrganizationPostalCode", htmlspecialchars($params['org_zip'], ENT_QUOTES, 'UTF-8'));\r
+ $include_fwd_email = (!empty($params['cmp_forward']) && $params['cmp_forward'] == 'YES')\r
+ ? ('YES')\r
+ : ('NO');\r
+ #$fwd_txt = ($include_fwd_email == 'YES') ? ($params['cmp_fwd_email']) :('');\r
+ $fwd_txt = $params['cmp_fwd_email'];\r
+ $fwd_node = $campaign_node->addChild("IncludeForwardEmail", htmlentities($include_fwd_email));\r
+ $fwd_email_node = $campaign_node->addChild("ForwardEmailLinkText", htmlspecialchars(($fwd_txt), ENT_QUOTES, 'UTF-8'));\r
+ $include_sub_link = (!empty($params['cmp_subscribe']) && $params['cmp_subscribe'] == 'YES')\r
+ ? ('YES')\r
+ : ('NO');\r
+ $sub_node = $campaign_node->addChild("IncludeSubscribeLink", htmlentities($include_sub_link));\r
+ #$sub_txt = ($include_sub_link == 'YES') ? ($params['cmp_sub_link']) : ('');\r
+ $sub_txt = $params['cmp_sub_link'];\r
+ $sub_link_node = $campaign_node->addChild("SubscribeLinkText", htmlspecialchars(($sub_txt), ENT_QUOTES, 'UTF-8'));\r
+ $email_format_node = $campaign_node->addChild("EmailContentFormat", $params['cmp_mail_type']);\r
+ if ($params['cmp_type'] != 'STOCK') {\r
+ $html_body_node = $campaign_node->addChild("EmailContent", htmlspecialchars($params['cmp_html_body'], ENT_QUOTES, 'UTF-8'));\r
+ $text_body_node = $campaign_node->addChild("EmailTextContent", "<Text>" . htmlspecialchars(strip_tags($params['cmp_text_body']), ENT_QUOTES, 'UTF-8') . "</Text>");\r
+ $campaign_style_sheet = ($params['cmp_mail_type'] == 'XHTML')\r
+ ? ($params['cmp_style_sheet'])\r
+ : ('');\r
+ $style_sheet_node = $campaign_node->addChild("StyleSheet", htmlspecialchars($campaign_style_sheet, ENT_QUOTES, 'UTF-8'));\r
+ }\r
+ $campaignlists_node = $campaign_node->addChild("ContactLists");\r
+\r
+ if ($params['lists']) {\r
+ foreach ($params['lists'] as $list) {\r
+ $campaignlist_node = $campaignlists_node->addChild("ContactList");\r
+ $campaignlist_node->addAttribute("id", $list);\r
+ $campaignlink_node = $campaignlist_node->addChild("link");\r
+ $campaignlink_node->addAttribute("xmlns", "http://www.w3.org/2005/Atom");\r
+ $campaignlink_node->addAttribute("href", str_replace("http://api.constantcontact.com", "", $list));\r
+ $campaignlink_node->addAttribute("rel", "self");\r
+ }\r
+ }\r
+\r
+ $cmp_from_email = explode('|', $params['cmp_from_email']);\r
+ $fromemail_node = $campaign_node->addChild("FromEmail");\r
+ $femail_node = $fromemail_node->addChild("Email");\r
+ $femail_node->addAttribute("id", $cmp_from_email[1]);\r
+ $femail_node_link = $femail_node->addChild("link");\r
+ $femail_node_link->addAttribute("xmlns", "http://www.w3.org/2005/Atom");\r
+ $femail_node_link->addAttribute("href", str_replace("http://api.constantcontact.com", "", $cmp_from_email[1]));\r
+ $femail_node_link->addAttribute("rel", "self");\r
+ $femail_addrs_node = $fromemail_node->addChild("EmailAddress", htmlentities($cmp_from_email[0]));\r
+ $cmp_reply_email = explode('|', $params['cmp_reply_email']);\r
+ $replyemail_node = $campaign_node->addChild("ReplyToEmail");\r
+ $remail_node = $replyemail_node->addChild("Email");\r
+ $remail_node->addAttribute("id", $cmp_reply_email[1]);\r
+ $remail_node_link = $remail_node->addChild("link");\r
+ $remail_node_link->addAttribute("xmlns", "http://www.w3.org/2005/Atom");\r
+ $remail_node_link->addAttribute("href", str_replace("http://api.constantcontact.com", "", $cmp_reply_email[1]));\r
+ $remail_node_link->addAttribute("rel", "self");\r
+ $remail_addrs_node = $replyemail_node->addChild("EmailAddress", htmlentities($cmp_reply_email[0]));\r
+ $source_node = $xml_object->addChild("source");\r
+ $sourceid_node = $source_node->addChild("id", $standard_id); //[3th *id]\r
+ $sourcetitle_node = $source_node->addChild("title", "Campaigns for customer: " . $this->login);\r
+ $sourcetitle_node->addAttribute("type", "text");\r
+ $sourcelink1_node = $source_node->addChild("link");\r
+ $sourcelink1_node->addAttribute("href", "campaigns"); //[2nd *href]\r
+ $sourcelink2_node = $source_node->addChild("link");\r
+ $sourcelink2_node->addAttribute("href", "campaigns"); //[3th *href]\r
+ $sourcelink2_node->addAttribute("rel", "self");\r
+ $sourceauthor_node = $source_node->addChild("author");\r
+ $sauthor_name = $sourceauthor_node->addChild("name", $this->login);\r
+ $sourceupdate_node = $source_node->addChild("updated", htmlentities($update_date));\r
+\r
+ $entry = $xml_object->asXML();\r
+ // $search = array('>', '\"', ' ', ' ', '"/>', '&', '&lt;', '�', '�');\r
+ // $replace = array('>', '"', '', '', '" />', '&', '<', '&Yuml;', '&yuml;');\r
+ // $entry = str_replace($search, $replace, $entry);\r
+\r
+ if ($this->sent_recived_debug) {\r
+ echo "<div><p style=\"color: blue\">We sent the following XML:</p> $entry </div><hr/>";\r
+ }\r
+\r
+ return $entry;\r
+ }\r
+\r
+}\r
--- /dev/null
+<?php
+/**
+ * StreamSend.php
+ *
+ * PHP version 5
+ *
+ * All Right Reserved
+ *
+ * @category Contacts
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: StreamSend.php,v 1.5 2010/04/30 19:02:10 matrix Exp $
+ * @link <>
+ */
+
+/**
+ * Default parameters for contact create operations.
+ * Note that these are strings for use in XML data not true/false values.
+ * If false, the person will be created with a status of pending
+ */
+define('STREAMSEND_DEFAULT_ACTIVATE', 'false');
+/**
+ * If activate is false, setting this to true will trigger the sending of the built-in
+ * activation notification; if activate is true, this setting has no effect
+ */
+define('STREAMSEND_DEFAULT_DELIVER_ACTIVATION', 'true');
+/**
+ * If activate is true, setting this to true will trigger the sending of the built-in
+ * welcome notification; if activate is false, this setting has no effect
+ */
+define('STREAMSEND_DEFAULT_DELIVER_WELCOME', 'false');
+/**
+ * URI for streamsend API
+ */
+define('STREAMSEND_BASE_URL', "https://app.streamsend.com");
+
+/**
+ * Toolkit_Contacts_StreamSend
+ *
+ * Contact support class for inergration with StreamSend API
+ *
+ * @category Contacts
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @link <>
+ */
+class Toolkit_LeadManager_Affiliates_StreamSend
+{
+ // {{{ Class Properties
+
+
+ /**
+ * Description for public
+ * @var boolean
+ * @access public
+ */
+ public $debug = false;
+
+ /**
+ * streamSendFields
+ *
+ * array with key values matching the gaslight contact tabel to the
+ * StreamSend field (normal fields)
+ *
+ * @var array
+ * @access protected
+ */
+ protected $streamSendFields = array(
+ 'email' => 'email-address',
+ 'fname' => 'first-name',
+ 'lname' => 'last-name',
+ 'address' => 'address1',
+ 'address2' => 'address2',
+ 'city' => 'city',
+ 'state' => 'stateprovince',
+ 'zip' => 'postal-code',
+ 'phone' => 'phone-number',
+ 'interest' => 'interests',
+ 'contact_type' => 'contact-type'
+ );
+
+ /**
+ * contactInqTypes
+ *
+ * array with key values matching the gaslight contact_inq tabel to the
+ * StreamSend field (Radio fields)
+ * key = id from contact_inq table
+ * value = name from contact_inq_table
+ * value is same name as the StreamSend fieldname
+ *
+ * @var array
+ * @access protected
+ */
+ protected $contactInqTypes = array();
+
+ /**
+ * booleanTypes
+ *
+ * StreamSend fields (boolean fields) an array of field names for the
+ * boolean field types
+ *
+ * @var array
+ * @access protected
+ */
+ protected $booleanTypes = array();
+ // }}}
+ // {{{ __construct()
+
+
+ /**
+ * __construct(
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct()
+ {
+ }
+
+
+ // }}}
+ // {{{ addContact()
+
+
+ /**
+ * addContact
+ *
+ * Given $values from a Toolkit_Contacts Form add Contact
+ *
+ * @param array $values Parameter description (if any) ...
+ *
+ * @return boolean Return true if successfull
+ * @access public
+ */
+ public function addContact($values)
+ {
+ // check the array $values to make sure it is correct
+ if (is_array($values) && !empty($values)) {
+ include_once GLM_APP_BASE.'StreamSend/class_streamsend_api.inc';
+ // initialize the streamsend object
+ $ss = new streamSend (STREAMSEND_BASE_URL, STREAMSEND_LOGIN_ID,
+ STREAMSEND_KEY);
+ $ss->debug = $this->debug;
+ $ret = $ss->contactSearch($values['email']);
+
+ $contactData = array();
+ $values[$type] = 1;
+ foreach ($this->streamSendFields as $glmName => $ssName) {
+ switch ($glmName) {
+ case "state":
+ $contactData[$ssName] = ($values[$glmName]) ? $GLOBALS['states'][$values[$glmName]]: '';
+ break;
+ default:
+ $contactData[$ssName] = $values[$glmName];
+ break;
+ }
+ }
+ foreach ($this->contactInqTypes as $contactInqId => $name) {
+ $slug = str_replace(" ", "-", strtolower($this->contactInqTypes[$contactInqId]));
+ if ($values['interest'][$contactInqId]) {
+ $contactData[$slug] = 'Yes';
+ } else {
+ $contactData[$slug] = 'No';
+ }
+ }
+ foreach ($this->booleanTypes as $name) {
+ if ($values[$name]) {
+ $contactData[$name] = 'Yes';
+ } else {
+ $contactData[$name] = 'No';
+ }
+ }
+ if ($ret->contact) {
+ $contacts = $ss->contactUpdate(
+ $ret->contact->id,
+ $contactData
+ );
+ } else {
+ $contacts = $ss->contactCreate(
+ $contactData,
+ STREAMSEND_DEFAULT_ACTIVATE,
+ STREAMSEND_DEFAULT_DELIVER_ACTIVATION,
+ STREAMSEND_DEFAULT_DELIVER_WELCOME
+ );
+ }
+ if (!$contacts) {
+
+ // show errors if on development server
+ switch (GLM_HOST_ID) {
+ case "DEVELOPMENT":
+ echo "<p>A total and complete failure occured.";
+ break;
+ case "PRODUCTION":
+ break;
+ }
+ }
+ if ($ss->debug == true) {
+ echo '<p><h3>Debug Results</h3>'.$ss->debugBuffer.'</p>';
+ }
+ return true;
+ }
+ return false;
+ }
+
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * ConstantContact.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $Id$
+ * @link <>
+ */
+
+require_once BASE . 'Toolkit/LeadManager/Affiliates/ConstantContact.php';
+/**
+ * Require the Constant Contact Classes
+ */
+/**
+ * Toolkit_Package_ConstantContact
+ *
+ * Description of ConstantContact
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release SVN: $Id$
+ * @link <>
+ */
+class Toolkit_LeadManager_ConstantContact
+ extends Toolkit_LeadManager_Observer
+{
+ /**
+ * Send LeadManager_Lead object (contact or customer) to ConstantContact
+ *
+ * @param type $subject Object Reference for LeadManager_Lead type
+ *
+ * @return void
+ */
+ public function send(Toolkit_LeadManager_Lead $subject)
+ {
+ // have to convert the $subject Object to an array to be used
+ // in the streamsend call to addContact
+ $values = array(
+ 'email_address' => $subject->getEmail(),
+ 'first_name' => $subject->getFname(),
+ 'last_name' => $subject->getLname(),
+ 'city_name' => $subject->getCity(),
+ 'state_code' => $subject->getState(),
+ 'state_name' => $GLOBALS['states'][$subject->getState()],
+ 'zip_code' => $subject->getZip(),
+ 'home_number' => $subject->getPhone()
+ );
+ if ($subject instanceof Toolkit_LeadManager_Contact) {
+ $values['address_line_1'] = $subject->getAddress();
+ $values['address_line_2'] = $subject->getAddress2();
+ } else if ($subject instanceof Toolkit_LeadManager_Customer) {
+ $values['address_line_1'] = $subject->getAdd1();
+ $values['address_line_2'] = $subject->getAdd2();
+ }
+ if (defined('CONSTANT_CONTACT_LIST') && CONSTANT_CONTACT_LIST) {
+ $lists = unserialize(CONSTANT_CONTACT_LIST);
+ }
+ $values["lists"] = $lists;
+ $ccContactOBJ = new CC_Contact();
+ $constantContact = $ccContactOBJ->getSubscribers(
+ urlencode($values['email_address'])
+ );
+ try {
+ if (!empty($constantContact['items'])) {
+ // update contact
+ $contactXML = $ccContactOBJ->createContactXML(
+ $constantContact['id'],
+ $values
+ );
+ } else {
+ // add new contact to constant contact
+ $contactXML = $ccContactOBJ->createContactXML(
+ null,
+ $values
+ );
+ $ccContactOBJ->addSubscriber($contactXML);
+ }
+ } catch(Exception $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+}
--- /dev/null
+<?php
+
+/**
+ * Contact.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $Id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_Contact
+ *
+ * Class Contact used for contact integration with Stream Send
+ * Contant Contact and Mail Chimp programs.
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release SVN: $Id$
+ * @link <>
+ */
+class Toolkit_LeadManager_Contact
+ extends Toolkit_LeadManager_Lead
+{
+ public static $tableName = 'contact';
+ public static $primaryKey = 'id';
+ private $_id;
+ private $_address;
+ private $_address2;
+ private $_member_ok;
+ private $_members;
+ private $_gift_cer;
+ private $_comments;
+ private $_discover;
+ private $_password;
+ private $_verify_password;
+
+ /**
+ * Contructor for class Contact Objects
+ *
+ * @param type $values Array of Values to create object with
+ */
+ public function __construct(Array $values)
+ {
+ parent::__construct($values);
+ extract($values);
+ $this->setAddress($address)
+ ->setAddress2($address2)
+ ->setComments($comments)
+ ->setDiscover($discover)
+ ->setGiftCert($gift_cert)
+ ->setMembers($members)
+ ->setMemberOk($member_ok)
+ ->setPassword($password)
+ ->setVerifyPassword($verify_password);
+ if ($id) {
+ $this->setId($id);
+ }
+ }
+
+ /**
+ * Creates a Contact class object with values given
+ *
+ * @param type $values Array of values for the contact
+ *
+ * @return Toolkit_Contacts_Admin_Contact
+ */
+ public static function createByValues($values)
+ {
+ return new Toolkit_LeadManager_Contact($values);
+ }
+
+ /**
+ * Returns the Contact Id
+ *
+ * @return type
+ */
+ public function getId()
+ {
+ return $this->_id;
+ }
+
+ /**
+ * sets the id of object
+ *
+ * @param Int $id set the id of object if not numeric throw Exception
+ *
+ * @return Toolkit_Table
+ */
+ public function setId($id)
+ {
+ if (!is_numeric($id)) {
+ throw new Exception('id must be an integer');
+ }
+ if (!$this->_id) {
+ $this->_id = $id;
+ }
+ return $this;
+ }
+
+ /**
+ * Returns the Contact Address
+ *
+ * @return type
+ */
+ public function getAddress()
+ {
+ return $this->_address;
+ }
+
+ /**
+ * Sets the Contact Address
+ *
+ * @param type $address Cotnact Address
+ *
+ * @return Toolkit_Contacts_Admin_Contact
+ */
+ public function setAddress($address)
+ {
+ $this->_address = $address;
+ return $this;
+ }
+
+ /**
+ * Returns the Contact Address2
+ *
+ * @return type
+ */
+ public function getAddress2()
+ {
+ return $this->_address2;
+ }
+
+ /**
+ * Sets the Contact Address2
+ *
+ * @param type $address2 Contact Address2
+ *
+ * @return Toolkit_Contacts_Admin_Contact
+ */
+ public function setAddress2($address2)
+ {
+ $this->_address2 = $address2;
+ return $this;
+ }
+
+ /**
+ * Returns the Contact Member OK
+ *
+ * @return type
+ */
+ public function getMemberOk()
+ {
+ return $this->_member_ok;
+ }
+
+ /**
+ * Sets the Contact Member OK
+ *
+ * @param type $member_ok Contacts Member Ok
+ *
+ * @return Toolkit_Contacts_Admin_Contact
+ */
+ public function setMemberOk($member_ok)
+ {
+ $this->_member_ok = $member_ok;
+ return $this;
+ }
+
+ /**
+ * Returns the Contact Member
+ *
+ * @return type
+ */
+ public function getMembers()
+ {
+ return $this->_members;
+ }
+
+ /**
+ * Sets the Contact Member
+ *
+ * @param type $members Contact Member
+ *
+ * @return Toolkit_Contacts_Admin_Contact
+ */
+ public function setMembers($members)
+ {
+ $this->_members = $members;
+ return $this;
+ }
+
+ /**
+ * Returns the Contact Gift Cert
+ *
+ * @return type
+ */
+ public function getGiftCert()
+ {
+ return $this->_gift_cer;
+ }
+
+ /**
+ * Sets the Contacts gift Cert
+ *
+ * @param type $gift_cert Contact gift_cert
+ *
+ * @return Toolkit_Contacts_Admin_Contact
+ */
+ public function setGiftCert($gift_cert)
+ {
+ $this->_gift_cer = $gift_cert;
+ return $this;
+ }
+
+ /**
+ * Returns the Contacts Comments
+ *
+ * @return type
+ */
+ public function getComments()
+ {
+ return $this->_comments;
+ }
+
+ /**
+ * Sets the Contacts Comments
+ *
+ * @param type $comments Contact Comments
+ *
+ * @return Toolkit_Contacts_Admin_Contact
+ */
+ public function setComments($comments)
+ {
+ $this->_comments = $comments;
+ return $this;
+ }
+
+ /**
+ * Returns Contacts Discover Field
+ *
+ * @return type
+ */
+ public function getDiscover()
+ {
+ return $this->_discover;
+ }
+
+ /**
+ * Sets the Contacts Discover field
+ *
+ * @param type $discover Contacts Discover field
+ *
+ * @return Toolkit_Contacts_Admin_Contact
+ */
+ public function setDiscover($discover)
+ {
+ $this->_discover = $discover;
+ return $this;
+ }
+
+ /**
+ * Returns the leads password
+ *
+ * @return type
+ */
+ public function getPassword()
+ {
+ return $this->_password;
+ }
+
+ /**
+ * Sets the leads password
+ *
+ * @param type $password led password
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setPassword($password)
+ {
+ $this->_password = $password;
+ return $this;
+ }
+
+ /**
+ * Returns the Verify Password
+ *
+ * @return string
+ */
+ public function getVerifyPassword()
+ {
+ return $this->_verify_password;
+ }
+
+ /**
+ * Sets the verify_password
+ *
+ * @param string $verifyPassword
+ */
+ public function setVerifyPassword($verifyPassword)
+ {
+ $this->_verify_password = $verifyPassword;
+ }
+
+
+}
--- /dev/null
+<?php
+
+/**
+ * Customer.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $Id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_Customer
+ *
+ * Description of Customer
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release SVN: $Id$
+ * @link <>
+ */
+class Toolkit_LeadManager_Customer
+ extends Toolkit_LeadManager_Lead
+{
+ public static $tableName = 'customer';
+ public static $primaryKey = 'cust_id';
+ private $_cust_id;
+ private $_userid;
+ private $_usernum;
+ private $_usergroup;
+ private $_add1;
+ private $_add2;
+ private $_org;
+ private $_access_date;
+ private $_purch_date;
+ private $_referred_by;
+ private $_promo;
+ private $_ship_type;
+ private $_club;
+ private $_wherefrom;
+ private $_addr_ext;
+ private $_salutation;
+
+ /**
+ * Constructor for class Customer objects
+ *
+ * @param array $values Array of values
+ */
+ public function __construct(array $values)
+ {
+ parent::__construct($values);
+ extract($values);
+ $this->setUserid($user_id)
+ ->setUsernum($usernum)
+ ->setUsergroup($usergroup)
+ ->setAdd1($add1)
+ ->setAdd2($add2)
+ ->setOrg($org)
+ ->setAccessDate($access_date)
+ ->setPurchDate($purch_date)
+ ->setReferredBy($referred_by)
+ ->setPromo($promo)
+ ->setShipType($ship_type)
+ ->setClub($club)
+ ->setWherefrom($wherefrom)
+ ->setAddrExt($addr_ext)
+ ->setSalutation($salutation);
+ if ($cust_id) {
+ $this->setCustId($cust_id);
+ }
+ }
+
+ /**
+ * Creates a Contact class object with values given
+ *
+ * @param type $values Array of values for the contact
+ *
+ * @return Toolkit_Contacts_Admin_Contact
+ */
+ public static function createByValues($values)
+ {
+ return new Toolkit_LeadManager_Customer($values);
+ }
+
+ /**
+ * Returns cust_id
+ *
+ * @return type
+ */
+ public function getCustId()
+ {
+ return $this->_cust_id;
+ }
+
+ /**
+ * Sets the customer cust_id
+ *
+ * @param type $_cust_id Customer cust_id
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setCustId($_cust_id)
+ {
+ $this->_cust_id = $_cust_id;
+ return $this;
+ }
+
+ /**
+ * Returns Customer userid
+ *
+ * @return type
+ */
+ public function getUserid()
+ {
+ return $this->_userid;
+ }
+
+ /**
+ * Sets Customer userid
+ *
+ * @param type $_userid Customer Userid
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setUserid($_userid)
+ {
+ $this->_userid = $_userid;
+ return $this;
+ }
+
+ /**
+ * Returns Customer usernum
+ *
+ * @return type
+ */
+ public function getUsernum()
+ {
+ return $this->_usernum;
+ }
+
+ /**
+ * Sets Customer usernum
+ *
+ * @param type $_usernum Customer usernum
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setUsernum($_usernum)
+ {
+ $this->_usernum = $_usernum;
+ return $this;
+ }
+
+ /**
+ * Returns Customer Usergroup
+ *
+ * @return type
+ */
+ public function getUsergroup()
+ {
+ return $this->_usergroup;
+ }
+
+ /**
+ * Sets Customer usergroup
+ *
+ * @param type $_usergroup Customer usergroup
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setUsergroup($_usergroup)
+ {
+ $this->_usergroup = $_usergroup;
+ return $this;
+ }
+
+ /**
+ * Returns Customer add1
+ *
+ * @return type
+ */
+ public function getAdd1()
+ {
+ return $this->_add1;
+ }
+
+ /**
+ * Sets Customer add1
+ *
+ * @param type $_add1 Customer add1
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setAdd1($_add1)
+ {
+ $this->_add1 = $_add1;
+ return $this;
+ }
+
+ /**
+ * Returns Customer add2
+ *
+ * @return type
+ */
+ public function getAdd2()
+ {
+ return $this->_add2;
+ }
+
+ /**
+ * Sets Customer addr2
+ *
+ * @param type $_add2 Customer add2
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setAdd2($_add2)
+ {
+ $this->_add2 = $_add2;
+ return $this;
+ }
+
+ /**
+ * Returns Customer org
+ *
+ * @return type
+ */
+ public function getOrg()
+ {
+ return $this->_org;
+ }
+
+ /**
+ * Sets Customer org
+ *
+ * @param type $_org Customer org
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setOrg($_org)
+ {
+ $this->_org = $_org;
+ return $this;
+ }
+
+ /**
+ * Returns Customer access_date
+ *
+ * @return type
+ */
+ public function getAccessDate()
+ {
+ return $this->_access_date;
+ }
+
+ /**
+ * Sets Customer acces_date
+ *
+ * @param type $_access_date Customer access_date
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setAccessDate($_access_date)
+ {
+ $this->_access_date = $_access_date;
+ return $this;
+ }
+
+ /**
+ * Returns Customer purch_date
+ *
+ * @return type
+ */
+ public function getPurchDate()
+ {
+ return $this->_purch_date;
+ }
+
+ /**
+ * Sets Customer purch_date
+ *
+ * @param type $_purch_date Customer purch_date
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setPurchDate($_purch_date)
+ {
+ $this->_purch_date = $_purch_date;
+ return $this;
+ }
+
+ /**
+ * Returns Customer Referred_by
+ *
+ * @return type
+ */
+ public function getReferredBy()
+ {
+ return $this->_referred_by;
+ }
+
+ /**
+ * Sets Customer referred_by
+ *
+ * @param type $_referred_by Customer referred_by
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setReferredBy($_referred_by)
+ {
+ $this->_referred_by = $_referred_by;
+ return $this;
+ }
+
+ /**
+ * Returns Customer promo
+ *
+ * @return type
+ */
+ public function getPromo()
+ {
+ return $this->_promo;
+ }
+
+ /**
+ * Sets Customer promo
+ *
+ * @param type $_promo Customer promo
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setPromo($_promo)
+ {
+ $this->_promo = $_promo;
+ return $this;
+ }
+
+ /**
+ * Returns Customer ship_type
+ *
+ * @return type
+ */
+ public function getShipType()
+ {
+ return $this->_ship_type;
+ }
+
+ /**
+ * Sets Customer ship_type
+ *
+ * @param type $_ship_type Customer ship_type
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setShipType($_ship_type)
+ {
+ $this->_ship_type = $_ship_type;
+ return $this;
+ }
+
+ /**
+ * Returns Customer club
+ *
+ * @return type
+ */
+ public function getClub()
+ {
+ return $this->_club;
+ }
+
+ /**
+ * Sets Customer club
+ *
+ * @param type $_club Customer club
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setClub($_club)
+ {
+ $this->_club = $_club;
+ return $this;
+ }
+
+ /**
+ * Returns Customer wherefrom
+ *
+ * @return type
+ */
+ public function getWherefrom()
+ {
+ return $this->_wherefrom;
+ }
+
+ /**
+ * Sets Customer wherefrom
+ *
+ * @param type $_wherefrom Customer wherefrom
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setWherefrom($_wherefrom)
+ {
+ $this->_wherefrom = $_wherefrom;
+ return $this;
+ }
+
+ /**
+ * Returns Customer Addr_ext
+ *
+ * @return type
+ */
+ public function getAddrExt()
+ {
+ return $this->_addr_ext;
+ }
+
+ /**
+ * Sets Customer addr_ext
+ *
+ * @param type $_addr_ext Customer addr_ext
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setAddrExt($_addr_ext)
+ {
+ $this->_addr_ext = $_addr_ext;
+ return $this;
+ }
+
+ /**
+ * Returns Customer Salutation
+ *
+ * @return type
+ */
+ public function getSalutation()
+ {
+ return $this->_salutation;
+ }
+
+ /**
+ * Sets Customer salutation
+ *
+ * @param type $_salutation Customer Salutation
+ *
+ * @return Toolkit_LeadManager_Customer
+ */
+ public function setSalutation($_salutation)
+ {
+ $this->_salutation = $_salutation;
+ return $this;
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * Lead.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $Id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_Lead
+ *
+ * Abstract class Lead used for contact integration with Stream Send
+ * Contant Contact and Mail Chimp programs.
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release SVN: $Id$
+ * @link <>
+ */
+abstract class Toolkit_LeadManager_Lead
+ extends Toolkit_LeadManager_Subject
+{
+ private $_create_date;
+ private $_email;
+ private $_fname;
+ private $_lname;
+ private $_city;
+ private $_state;
+ private $_zip;
+ private $_country;
+ private $_phone;
+ private $_fax;
+ private $_user_agent;
+ private $_remote_addr;
+ private $_mail_ok;
+ private $_interest;
+ private $_contact_type;
+
+ /**
+ * Constructor for Lead class objects
+ *
+ * @param type $values Array of Values for Lead
+ */
+ public function __construct(Array $values)
+ {
+ extract($values);
+ $this->setCreateDate($create_date)
+ ->setEmail($email)
+ ->setFname($fname)
+ ->setLname($lname)
+ ->setCity($city)
+ ->setState($state)
+ ->setZip($zip)
+ ->setCountry($country)
+ ->setPhone($phone)
+ ->setFax($fax)
+ ->setUserAgent($user_agent)
+ ->setRemoteAddr($remote_addr)
+ ->setMailOk($mail_ok)
+ ->setInterest($interest)
+ ->setContactType($contact_type);
+ }
+
+ /**
+ * Creates a Lead class object by passing in $values array
+ * into the Leads constructor method. Is static method
+ *
+ * @param type $values Array of values to create Lead with
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ abstract static public function createByValues($values);
+
+ /**
+ * Returns the Leads Create Date
+ *
+ * @return type
+ */
+ public function getCreateDate()
+ {
+ return $this->_create_date;
+ }
+
+ /**
+ * Sets the Leads Create Date
+ *
+ * @param type $create_date Leads Create Date
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setCreateDate($create_date)
+ {
+ $this->_create_date = $create_date;
+ return $this;
+ }
+
+ /**
+ * Returs the Leads Email Address
+ *
+ * @return type
+ */
+ public function getEmail()
+ {
+ return $this->_email;
+ }
+
+ /**
+ * Sets the Leads Email Address
+ *
+ * @param type $email Leads email address
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setEmail($email)
+ {
+ $this->_email = $email;
+ return $this;
+ }
+
+ /**
+ * Returns the Leads First Name
+ *
+ * @return type
+ */
+ public function getFname()
+ {
+ return $this->_fname;
+ }
+
+ /**
+ * Sets the Leads First Name
+ *
+ * @param type $fname Leads First Name
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setFname($fname)
+ {
+ $this->_fname = $fname;
+ return $this;
+ }
+
+ /**
+ * Returns the Leads Last Name
+ *
+ * @return type
+ */
+ public function getLname()
+ {
+ return $this->_lname;
+ }
+
+ /**
+ * Sets the Leads Last Name
+ *
+ * @param type $lname Leads Last Name
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setLname($lname)
+ {
+ $this->_lname = $lname;
+ return $this;
+ }
+
+ /**
+ * Returns the Leads city
+ *
+ * @return type
+ */
+ public function getCity()
+ {
+ return $this->_city;
+ }
+
+ /**
+ * Sets the Leads city
+ *
+ * @param type $city Leads city
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setCity($city)
+ {
+ $this->_city = $city;
+ return $this;
+ }
+
+ /**
+ * Returns the Leads state
+ *
+ * @return type
+ */
+ public function getState()
+ {
+ return $this->_state;
+ }
+
+ /**
+ * Sets the Leads state
+ *
+ * @param type $state Leads state
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setState($state)
+ {
+ $this->_state = $state;
+ return $this;
+ }
+
+ /**
+ * Returns the Leads zip code
+ *
+ * @return type
+ */
+ public function getZip()
+ {
+ return $this->_zip;
+ }
+
+ /**
+ * Sets the Leads zip code
+ *
+ * @param type $zip Leads Zip code
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setZip($zip)
+ {
+ $this->_zip = $zip;
+ return $this;
+ }
+
+ /**
+ * Returns the Leads country
+ *
+ * @return type
+ */
+ public function getCountry()
+ {
+ return $this->_country;
+ }
+
+ /**
+ * Sets the Leads country
+ *
+ * @param type $country Leads country
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setCountry($country)
+ {
+ $this->_country = $country;
+ return $this;
+ }
+
+ /**
+ * Returns the Leads phone number
+ *
+ * @return type
+ */
+ public function getPhone()
+ {
+ return $this->_phone;
+ }
+
+ /**
+ * Sets the Leads phone number
+ *
+ * @param type $phone Leads phone number
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setPhone($phone)
+ {
+ $this->_phone = $phone;
+ return $this;
+ }
+
+ /**
+ * Returns the Leads fax number
+ *
+ * @return type
+ */
+ public function getFax()
+ {
+ return $this->_fax;
+ }
+
+ /**
+ * Sets the Leads fax number
+ *
+ * @param type $fax Leads fax number
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setFax($fax)
+ {
+ $this->_fax = $fax;
+ return $this;
+ }
+
+ /**
+ * Returns the Leads user agent
+ *
+ * @return type
+ */
+ public function getUserAgent()
+ {
+ return $this->_user_agent;
+ }
+
+ /**
+ * Sets the Leads user agent
+ *
+ * @param type $user_agent Leads user agent
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setUserAgent($user_agent)
+ {
+ $this->_user_agent = $user_agent;
+ return $this;
+ }
+
+ /**
+ * Returns the Leads remote address
+ *
+ * @return type
+ */
+ public function getRemoteAddr()
+ {
+ return $this->_remote_addr;
+ }
+
+ /**
+ * Sets the Leads remote address
+ *
+ * @param type $remote_addr Leads remote address
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setRemoteAddr($remote_addr)
+ {
+ $this->_remote_addr = $remote_addr;
+ return $this;
+ }
+
+ /**
+ * Returns the Leads mail_ok
+ *
+ * @return type
+ */
+ public function getMailOk()
+ {
+ return $this->_mail_ok;
+ }
+
+ /**
+ * Sets the Leads mail_ok
+ *
+ * @param type $mail_ok Leads mail ok
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setMailOk($mail_ok)
+ {
+ $this->_mail_ok = $mail_ok;
+ return $this;
+ }
+
+ /**
+ * Returns the Leads interests
+ *
+ * @return type
+ */
+ public function getInterest()
+ {
+ return $this->_interest;
+ }
+
+ /**
+ * Sets the leads interests
+ *
+ * @param type $interest Leads interest
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setInterest($interest)
+ {
+ $this->_interest = $interest;
+ return $this;
+ }
+
+ /**
+ * Returns the leads contact type
+ *
+ * @return type
+ */
+ public function getContactType()
+ {
+ return $this->_contact_type;
+ }
+
+ /**
+ * Sets the leads contact type
+ *
+ * @param type $contact_type Leads contact type
+ *
+ * @return Toolkit_Contacts_Admin_Lead
+ */
+ public function setContactType($contact_type)
+ {
+ $this->_contact_type = $contact_type;
+ return $this;
+ }
+
+ /**
+ * Return primary key field value of table
+ *
+ * @return type
+ */
+ public function getPrimaryKey()
+ {
+ $defaultVars = get_class_vars(get_class($this));
+ $primaryKey
+ = ($defaultVars['primaryKey'] == 'cust_id')
+ ? 'CustId'
+ : ucfirst($defaultVars['primaryKey']);
+ $getPrimaryKey = "get$primaryKey";
+ return $this->$getPrimaryKey();
+ }
+
+ /**
+ * Parse out the integer references for the interest into their
+ * string names
+ *
+ * @param PDO $dbh Database connection
+ *
+ * @return type
+ */
+ public function getInterestsAsArray(PDO $dbh)
+ {
+ $interestArray = array();
+ $interest = preg_replace('/^:|:$/', '', $this->_interest);
+ $intArray
+ = (is_array($interest))
+ ? explode(':', $interest)
+ : array();
+ if (is_array($intArray)) {
+ array_filter($intArray);
+ }
+ if ($this->_interest && !empty($intArray)) {
+ try {
+ $sql = "
+ SELECT id,header
+ FROM contact_inq
+ WHERE id IN (".implode(',', $intArray).")
+ ORDER BY header";
+ $stmt = $dbh->query($sql);
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $interestArray[$row['id']] = $row['header'];
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+ return $interestArray;
+ }
+
+ /**
+ * Parse out the contact types and return array with their names
+ *
+ * @return type
+ */
+ public function getContactTypesAsArray()
+ {
+ $contactTypesArray = array();
+ $types = preg_replace('/^:|:$/', '', $this->_contact_type);
+ $typeArray = explode(':', $types);
+ if ($this->_contact_type && !empty($typeArray)) {
+ $conf = new Config();
+ $root =& $conf->parseConfig(
+ BASE . 'Toolkit/Contacts/config.ini',
+ 'IniFile'
+ );
+ // check for PEAR error
+ if (PEAR::isError($root)) {
+ Toolkit_Common::handleError($root);
+ }
+ $cTypes
+ = $root->getItem('section', 'contact_types')
+ ->toArray();
+ foreach ($typeArray as $type) {
+ $contactTypesArray[$type] = $cTypes['contact_types'][$type];
+ }
+ }
+ return $contactTypesArray;
+ }
+
+ /**
+ * Checks the id of the object if it is set then calls update othervise
+ * calls insert function
+ *
+ * @param PDO $dbh Database connection
+ * @param boolean $saveNullFields To save nul fields or not
+ *
+ * @return viod
+ */
+ public function save(PDO $dbh, $saveNullFields = true)
+ {
+ $id = $this->getPrimaryKey();
+ if ($id) {
+ $this->update($dbh, $saveNullFields);
+ } else {
+ $this->insert($dbh);
+ }
+ $this->notify();
+ }
+
+ /**
+ * insert the object
+ *
+ * @param PDO $dbh Database Connection
+ *
+ * @return Toolkit_Table
+ */
+ public function insert(PDO $dbh)
+ {
+ try {
+ $methods = get_class_methods(get_class($this));
+ $values = array();
+ if ($methods) {
+ $pattern = '/get(.*)/';
+ foreach ($methods as $mName) {
+ if ( preg_match($pattern, $mName, $matches)
+ && !in_array(
+ $mName,
+ array(
+ 'getInterestsAsArray',
+ 'getContactTypesAsArray',
+ 'getPrimaryKey'
+ )
+ )
+ ) {
+ $func = create_function(
+ '$c',
+ 'return "_" . strtolower($c[1]);'
+ );
+ $fieldName = preg_replace_callback(
+ '/([A-Z])/',
+ $func,
+ $matches[1]
+ );
+ $fieldName = preg_replace('/^_/', '', $fieldName);
+ $values[$fieldName] = $this->$matches[0]();
+ }
+ }
+ }
+ $defaultVars = get_class_vars(get_class($this));
+ $primaryKey = $defaultVars['primaryKey'];
+ $tableName = $defaultVars['tableName'];
+ unset($values[$primaryKey]);
+ $sql = Toolkit_Common::createSQLInsert(
+ $tableName,
+ array_keys($values)
+ );
+ $sql .= " RETURNING $primaryKey";
+ $stmt = Toolkit_Common::prepareQuery(
+ $dbh,
+ $tableName,
+ $sql,
+ $values
+ );
+ $stmt->execute();
+ $primaryKey
+ = ($primaryKey == 'cust_id')
+ ? 'custId'
+ : $primaryKey;
+ $setter = 'set'.ucfirst($primaryKey);
+ $this->$setter($stmt->fetchColumn());
+ return $this;
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ /**
+ * update the object
+ *
+ * @param PDO $dbh Database connection
+ * @param boolean $saveNullFields To save null fields or not
+ *
+ * @return Toolkit_Table
+ */
+ public function update(PDO $dbh, $saveNullFields = true)
+ {
+ try {
+ $methods = get_class_methods(get_class($this));
+ $values = array();
+ if ($methods) {
+ $pattern = '/get(.*)/';
+ foreach ($methods as $mName) {
+ if ( preg_match($pattern, $mName, $matches)
+ && !in_array(
+ $mName,
+ array(
+ 'getInterestsAsArray',
+ 'getContactTypesAsArray',
+ 'getPrimaryKey'
+ )
+ )
+ ) {
+ $func = create_function(
+ '$c',
+ 'return "_" . strtolower($c[1]);'
+ );
+ $fieldName = preg_replace_callback(
+ '/([A-Z])/',
+ $func,
+ $matches[1]
+ );
+ $fieldName = preg_replace('/^_/', '', $fieldName);
+ $fieldValue = $this->$matches[0]();
+ if (( $fieldValue === null && $saveNullFields)
+ || $fieldValue !== null
+ ) {
+ $values[$fieldName] = $fieldValue;
+ }
+ }
+ }
+ }
+ $defaultVars = get_class_vars(get_class($this));
+ $primaryKey = $defaultVars['primaryKey'];
+ $tableName = $defaultVars['tableName'];
+ $sql = Toolkit_Common::createSQLUpdate(
+ $tableName,
+ array_keys($values),
+ array("$primaryKey = :$primaryKey")
+ );
+ $stmt = Toolkit_Common::prepareQuery(
+ $dbh,
+ $tableName,
+ $sql,
+ $values
+ );
+ $stmt->execute();
+ return $this;
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+}
--- /dev/null
+<?php
+
+/**
+ * Observer.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $Id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_Observer
+ *
+ * Description of Observer
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release SVN: $Id$
+ * @link <>
+ */
+abstract class Toolkit_LeadManager_Observer
+{
+ /**
+ * abstract method send to be used to send the contact
+ * which is a Toolkit_LeadManager_Lead to appropiate wrapper
+ *
+ * @param Toolkit_LeadManager_Lead $subject Object Lead
+ *
+ * @return void
+ */
+ abstract public function send(Toolkit_LeadManager_Lead $subject);
+
+ /**
+ * Update method for the Observer Calls the send method.
+ *
+ * @param type $subject Observer Object Reference
+ *
+ * @return void
+ */
+ public function update($subject)
+ {
+ // looks for an observer method with the send name
+ if (method_exists($this, 'send')) {
+ call_user_func_array(array($this, 'send'), array($subject));
+ }
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * StreamSend.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $Id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_StreamSend
+ *
+ * StreamSend Observer pattern for LeadManager Contact class
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release SVN: $Id$
+ * @link <>
+ */
+class Toolkit_LeadManager_StreamSend
+ extends Toolkit_LeadManager_Observer
+{
+ /**
+ * Send LeadManager_Lead object (contact or customer) to StreamSend
+ *
+ * @param type $subject Object Reference for LeadManager_Lead type
+ *
+ * @return void
+ */
+ public function send(Toolkit_LeadManager_Lead $subject)
+ {
+ // have to convert the $subject Object to an array to be used
+ // in the streamsend call to addContact
+ $values = array(
+ 'email' => $subject->getEmail(),
+ 'fname' => $subject->getFname(),
+ 'lname' => $subject->getLname(),
+ 'city' => $subject->getCity(),
+ 'state' => $subject->getState(),
+ 'zip' => $subject->getZip(),
+ 'phone' => $subject->getPhone()
+ );
+ if ($subject instanceof Toolkit_LeadManager_Contact) {
+ $values['address'] = $subject->getAddress();
+ $values['address2'] = $subject->getAddress2();
+ } else if ($subject instanceof Toolkit_LeadManager_Customer) {
+ $values['address'] = $subject->getAdd1();
+ $values['address2'] = $subject->getAdd2();
+ }
+
+ $contactTypes = $subject->getContactTypesAsArray();
+ if ($contactTypes) {
+ $values['contact_type'] = implode('|', $contactTypes);
+ }
+ $interests
+ = $subject->getInterestsAsArray(Toolkit_Database::getInstance());
+ if ($interests) {
+ $values['interest'] = implode('|', $interests);
+ }
+ // call the streamsends API to send contact to stream send
+ $streamSend = new Toolkit_LeadManager_Affiliates_StreamSend();
+ $streamSend->addContact($values);
+ }
+}
--- /dev/null
+<?php
+
+/**
+ * Subject.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $Id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_Subject
+ *
+ * Description of Subject
+ *
+ * @category Toolkit
+ * @package LeadManager
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release SVN: $Id$
+ * @link <>
+ */
+abstract class Toolkit_LeadManager_Subject
+{
+ protected $observers = array();
+
+ /**
+ * Sets the Observer into the observers array
+ *
+ * @param Toolkit_LeadManager_Observer $observer Observer object to add
+ *
+ * @return void
+ */
+ public function attach(Toolkit_LeadManager_Observer $observer)
+ {
+ $i = array_search($observer, $this->observers);
+ if ($i === false) {
+ $this->observers[] = $observer;
+ }
+ }
+
+ /**
+ * Unsets the Observer from the observers array
+ *
+ * @param Toolkit_LeadManager_Observer $observer Observer to delete
+ *
+ * @return void
+ */
+ public function detach(Toolkit_LeadManager_Observer $observer)
+ {
+ if (!empty($this->observers)) {
+ $i = array_search($observer, $this->observers);
+ if ($i !== false) {
+ unset($this->observers[$i]);
+ }
+ }
+ }
+
+ /**
+ * Call each Observers update method
+ *
+ * @return void
+ */
+ public function notify()
+ {
+ if (!empty($this->observers)) {
+ foreach ($this->observers as $observer) {
+ $observer->update($this);
+ }
+ }
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * Error handling logger for system
+ *
+ * PHP version 5
+ *
+ * @category Logger
+ * @package Toolkit_Logger
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: Logger.php,v 1.6 2010/05/25 14:09:12 jamie Exp $
+ * @link <>
+ * @see Log
+ */
+
+/**
+ * Logging class used to handle system logs
+ */
+require_once 'Log.php';
+
+/**
+ * Error handling logger for system
+ *
+ * @category Logger
+ * @package Toolkit_Logger
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see Log
+ */
+class Toolkit_Logger
+{
+ // {{{ &getLogger()
+
+ /**
+ * Gets a concrete log subclass based on constant parameters set for server
+ *
+ * Define parameters in server setup block of bootstrap file
+ *
+ * @return Log concrete Log subclass
+ * @access public
+ * @static
+ */
+ public static function &getLogger()
+ {
+ if (defined('ERROR_LOG_NAME') && constant('ERROR_LOG_NAME') != '') {
+ $errorLogName = constant('ERROR_LOG_NAME');
+ } else {
+ $errorLogName = '';
+ }
+
+ $logger =& Log::singleton(
+ ERROR_LOG_TYPE,
+ $errorLogName,
+ constant('ERROR_LOG_IDENT'),
+ $GLOBALS['ERROR_LOG_CONF'],
+ constant('ERROR_LOG_LEVEL')
+ );
+
+ return $logger;
+ }
+
+ // }}}
+ // {{{ errorHandler()
+
+ /**
+ * User-defined error handler function
+ *
+ * handles errors in script. E_ERROR, E_WARNING, E_NOTICE are automatically
+ * logged when they occur. Fatal errors (E_ERROR) have a 404 page shown to
+ * user so script doesn't halt.
+ *
+ * @param int $errno Level of the error rasied
+ * @param string $errstr Error message
+ * @param string $errfile Filename that the error was raised in
+ * @param int $errline Line number the error was raised at
+ * @param Log $logger Logger to user for error loggin
+ *
+ * @return boolean false, allows the normal error handler to continue
+ * @access public
+ * @static
+ */
+ public static function errorHandler(
+ $errno,
+ $errstr,
+ $errfile,
+ $errline,
+ $logger = null
+ ) {
+ if (!($logger instanceof Log)) {
+ $logger =& self::getLogger();
+ }
+
+ $msg = "$errstr in $errfile at line $errline";
+ switch ($errno) {
+ case E_ERROR :
+ case E_USER_ERROR :
+ $logger->emerg($msg, PEAR_LOG_EMERG);
+ header("HTTP/1.0 404 Not Found");
+ exit(1);
+ break;
+
+ case E_WARNING :
+ CASE E_USER_WARNING :
+ $logger->warning($msg, PEAR_LOG_WARNING);
+ break;
+
+ case E_NOTICE :
+ case E_USER_NOTICE :
+ $logger->notice($msg, PEAR_LOG_NOTICE);
+ break;
+
+ default :
+ $logger->info($msg, PEAR_LOG_INFO);
+ break;
+ }
+
+ return false; // let the normal error handler continue
+ }
+
+ // }}}
+ // {{{ logException()
+
+ /**
+ * Create a log for an exception
+ *
+ * @param string $type Type of error encountered that caused exception
+ * @param Exception $e Exception that was thrown
+ *
+ * @return void
+ * @static
+ */
+ public static function logException($type, Exception $e)
+ {
+ $msg = $e->getMessage();
+ $file = $e->getFile();
+ $line = $e->getLine();
+
+ $lcType = strtolower($type); // uniformity in type when looking at log
+ $log = "[$lcType] $msg in $file at line $line";
+
+ $logger =& self::getLogger();
+
+ switch ($lcType) {
+ case 'db error' :
+ case 'invalid arg' :
+ case 'runtime error' :
+ $logger->emerg($log);
+ break;
+
+ case 'image server' :
+ case 'file server' :
+ $logger->warning($log);
+ break;
+
+ default :
+ $logger->err($log);
+ break;
+ }
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * NavigationAbstract.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package None
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_NavigationAbstract
+ *
+ * Description of NavigationAbstract
+ *
+ * @category Toolkit
+ * @package None
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+abstract class Toolkit_NavigationAbstract
+{
+ // {{{ properties
+
+ /**
+ * Default nav index
+ * @param integer
+ * @access protected
+ */
+ protected $currIndex;
+
+ /**
+ * page menu
+ * @param HTML_Menu
+ * @access protected
+ */
+ protected $menu;
+
+ /**
+ * menu rendering engine
+ * @param HTML_Menu_DirectRenderer
+ * @access protected
+ */
+ protected $rEngine;
+
+ // }}}
+ // {{{ renderPageNav()
+
+ /**
+ * Render the page navigation that is defined in the navStructure
+ *
+ * @param array $navStructure Page navigation structure
+ * @param string $type Type of menu to render
+ *
+ * @return string Page navigation structure
+ * @access public
+ */
+ public function renderPageNav(array $navStructure, $type)
+ {
+ $this->menu->setMenu($navStructure);
+ $this->menu->setMenuType($type);
+
+ $this->setCurrentIndex();
+ $this->setNavTemplates();
+
+ $this->menu->render($this->rEngine);
+ return $this->rEngine->toHtml();
+ }
+
+ // }}}
+ // {{{ setNavTemplates()
+ /**
+ * set nav templates
+ *
+ * @return void
+ */
+ abstract protected function setNavTemplates();
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * NavigationFactoryAbstract.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Toolkit_NavigationFactoryAbstract
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_BaseControllerAbstract
+ *
+ * Generate a sitemap for the site
+ * need to remove members only pages and other pages you
+ * don't want viewed by public
+ *
+ * @category Toolkit
+ * @package Toolkit_NavigationFactoryAbstract
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+
+abstract class Toolkit_NavigationFactoryAbstract
+{
+ /**
+ * create side nav
+ *
+ * @return void
+ */
+ abstract public function createSideNav();
+
+ /**
+ * create side nav
+ *
+ * @return void
+ */
+ abstract public function createMainNav();
+}
+?>
--- /dev/null
+<?php\r
+ /**\r
+ * phpimageeditor.php\r
+ * \r
+ * PHP version 5.2\r
+ * \r
+ * @category Toolkit\r
+ * @package PHPImageEditor/Classes\r
+ * @author Jamie Kahgee <steve@gaslightmedia.com>\r
+ * @copyright 2012 Gaslight Media\r
+ * @license Gaslight Media\r
+ * @version SVN: $id$\r
+ * @link <>\r
+ */\r
+\r
+\r
+ /*\r
+ Copyright 2008, 2009, 2010 Patrik Hultgren\r
+\r
+ YOUR PROJECT MUST ALSO BE OPEN SOURCE IN ORDER TO USE PHP IMAGE EDITOR.\r
+ OR ELSE YOU NEED TO BUY THE COMMERCIAL VERSION AT:\r
+ http://www.shareit.com/product.html?productid=300296445&backlink=http%3A%2F%2Fwww.phpimageeditor.se%2F\r
+\r
+ This file is part of PHP Image Editor.\r
+\r
+ PHP Image Editor is free software: you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation, either version 3 of the License, or\r
+ (at your option) any later version.\r
+\r
+ PHP Image Editor is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with PHP Image Editor. If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+\r
+\r
+ //Requires\r
+ //PHP: 4.3\r
+ //GD: 2.0.28\r
+\r
+ /*PHP FUNCTIONS REQUIRES THESE VERSIONS\r
+ getimagesize PHP 4\r
+ image_type_to_mime_type PHP 4.3\r
+ imagecopyresized PHP 4\r
+ file_exists PHP 4\r
+ copy PHP 4\r
+ imagecreatetruecolor PHP 4.0.6, GD 2.0.1\r
+ imagecopyresized PHP 4\r
+ imagecopy PHP 4\r
+ imagecreatefromjpeg PHP 4, GD 1.8\r
+ imagecreatefromgif PHP 4, GD 2.0.28\r
+ imagecreatefrompng PHP 4\r
+ imagefilter PHP 5, GD\r
+ imagejpeg PHP 4, GD-1.8\r
+ imagepng PHP 4\r
+ imagegif PHP 4\r
+ imagerotate PHP 4.3 GD\r
+ imagesx PHP 4\r
+ imagesy PHP 4\r
+ */\r
+\r
+ \r
+ /**\r
+ * Description of PHPImageEditor\r
+ * \r
+ * @category Toolkit\r
+ * @package PHPImageEditor/Classes\r
+ * @author Jamie Kahgee <steve@gaslightmedia.com>\r
+ * @copyright 2012 Gaslight Media\r
+ * @license Gaslight Media\r
+ * @release Release: $id$\r
+ * @link <>\r
+ */\r
+class PHPImageEditor\r
+{\r
+ public $srcEdit = "";\r
+ public $srcOriginal = "";\r
+ public $srcPng = "";\r
+ public $srcWorkWith = "";\r
+ public $resourceWorkWith = false;\r
+ public $mimeType = "";\r
+ public $actionSaveAndClose = "save";\r
+ public $actionRotateLeft = "rotate:90";\r
+ public $actionRotateRight = "rotate:-90";\r
+ public $actionGrayscale = "grayscale";\r
+ public $actionContrast = "contrast";\r
+ public $actionBrightness = "brightness";\r
+ public $actionUndo = "undo";\r
+ public $actionUpdate = "update";\r
+ public $actionRotateIsSelected = false;\r
+ public $actionRotate = "";\r
+ public $actionSeparatorSign = "#";\r
+ public $fieldNameKeepProportions = "keepproportions";\r
+ public $errorMessages = array();\r
+ public $formName = "phpimageeditor";\r
+ public $inputImageName = '';\r
+ public $inputWidth = -1;\r
+ public $inputHeight = -1;\r
+ public $inputCropLeft = 0;\r
+ public $inputCropRight = 0;\r
+ public $inputCropTop = 0;\r
+ public $inputCropBottom = 0;\r
+ public $inputKeepProportions = true;\r
+ public $inputCropKeepProportions = false;\r
+ public $inputCropKeepProportionsRatio = 1;\r
+ public $inputPanel = MENU_RESIZE;\r
+ public $inputLanguage = DEFUALT_LANGUAGE;\r
+ public $inputContrast = 0;\r
+ public $inputBrightness = 0;\r
+ public $inputContrastLast = 0;\r
+ public $inputBrightnessLast = 0;\r
+ public $inputGrayscale = false;\r
+ public $httpImageKey = "imagesrc";\r
+ public $texts = array();\r
+ public $actions = "";\r
+ public $isPostBack = false;\r
+ public $isAjaxPost = false;\r
+ public $finalWidth = -1;\r
+ public $finalHeight = -1;\r
+ public $widthKeepProportions = -1;\r
+ public $heightKeepProportions = -1;\r
+ public $userId = "";\r
+\r
+ public $contrastMax = 100;\r
+ public $brightnessMax = 255;\r
+\r
+\r
+ function PHPImageEditor()\r
+ {\r
+ $this->LoadLanguage();\r
+\r
+ if (version_compare(phpversion(), PHP_VERSION_MINIMUM, "<"))\r
+ {\r
+ $this->errorMessages[] = phpversion()." ".$this->texts["OLD PHP VERSION"]." ".PHP_VERSION_MINIMUM;\r
+ return;\r
+ }\r
+\r
+ $this->isPostBack = isset($_POST["actiontype"]);\r
+\r
+ $srcEdit = "";\r
+\r
+ if ($_GET[$this->httpImageKey] != NULL)\r
+ {\r
+ $srcEdit = $_GET[$this->httpImageKey];\r
+ }\r
+\r
+ if ($srcEdit == "")\r
+ {\r
+ $this->errorMessages[] = $this->texts["NO PROVIDED IMAGE"];\r
+ return;\r
+ }\r
+\r
+ $this->srcEdit = urldecode($srcEdit);\r
+ $this->inputImageName = urlencode($_GET['image_name']);\r
+\r
+ if (isset($_POST["userid"]))\r
+ $this->userId = $_POST["userid"];\r
+ else\r
+ $this->userId = "_".time()."_".str_replace(".", "_", $_SERVER['REMOTE_ADDR']);\r
+\r
+ $this->SetSrcOriginal();\r
+ $this->SetSrcPng();\r
+ $this->SetSrcWorkWith();\r
+\r
+ if (!file_exists($this->srcEdit))\r
+ {\r
+ $this->errorMessages[] = $this->texts["IMAGE DOES NOT EXIST"];\r
+ return;\r
+ }\r
+\r
+ $info = getimagesize($this->srcEdit);\r
+\r
+ if (!$info)\r
+ {\r
+ $this->errorMessages[] = $this->texts["INVALID IMAGE TYPE"];\r
+ return;\r
+ }\r
+\r
+ $this->mimeType = image_type_to_mime_type($info[2]);\r
+\r
+ if ($this->mimeType == image_type_to_mime_type(IMAGETYPE_JPEG) || $this->mimeType == image_type_to_mime_type(IMAGETYPE_GIF) || $this->mimeType == image_type_to_mime_type(IMAGETYPE_PNG))\r
+ {\r
+ if (!$this->isPostBack)\r
+ $this->SaveOriginal();\r
+\r
+ $this->resourceWorkWith = $this->CreateImage($this->srcOriginal);\r
+ $this->SavePng();\r
+ copy($this->srcPng, $this->srcWorkWith);\r
+\r
+ $this->resourceWorkWith = $this->CreateImage($this->srcPng);\r
+ }\r
+ else\r
+ {\r
+ $this->errorMessages[] = $this->texts["INVALID IMAGE TYPE"];\r
+ return;\r
+ }\r
+\r
+ $this->finalWidth = $this->GetWidth();\r
+ $this->finalHeight = $this->GetHeight();\r
+ $this->widthKeepProportions = $this->GetWidth();\r
+ $this->heightKeepProportions = $this->GetHeight();\r
+\r
+ $this->GrantAllAccess($this->srcOriginal);\r
+ $this->GrantAllAccess($this->srcPng);\r
+ $this->GrantAllAccess($this->srcWorkWith);\r
+\r
+ if ($this->isPostBack)\r
+ {\r
+ $this->actionRotateIsSelected = ($_POST["rotate"] != "-1");\r
+ $this->actionRotate = $_POST["rotate"];\r
+ $this->actions = $_POST["actions"];\r
+ $this->isAjaxPost = ($_POST["isajaxpost"] == "true");\r
+\r
+// $this->inputImageName = $_POST['image_name'];\r
+ $this->inputWidth = (int)$_POST["width"];\r
+ $this->inputHeight = (int)$_POST["height"];\r
+ $this->inputCropLeft = (int)$_POST["cropleft"];\r
+ $this->inputCropRight = (int)$_POST["cropright"];\r
+ $this->inputCropTop = (int)$_POST["croptop"];\r
+ $this->inputCropBottom = (int)$_POST["cropbottom"];\r
+ $this->inputPanel = (int)$_POST["panel"];\r
+ $this->inputLanguage = $_POST["language"];\r
+ $this->inputKeepProportions = ($_POST["keepproportionsval"] == "1");\r
+ $this->inputCropKeepProportions = ($_POST["cropkeepproportionsval"] == "1");\r
+ $this->inputCropKeepProportionsRatio = (float)$_POST["cropkeepproportionsratio"];\r
+ $this->inputGrayscale = ($_POST["grayscaleval"] == "1");\r
+ $this->inputBrightness = (int)$_POST["brightness"];\r
+ $this->inputContrast = (int)$_POST["contrast"];\r
+ $this->inputBrightnessLast = (int)$_POST["brightnesslast"];\r
+ $this->inputContrastLast = (int)$_POST["contrastlast"];\r
+\r
+ $this->Action($_POST["actiontype"]);\r
+ }\r
+ }\r
+\r
+ function LoadLanguage()\r
+ {\r
+ $language = "";\r
+\r
+ if (isset($_POST["language"]))\r
+ {\r
+ $this->inputLanguage = $_POST["language"];\r
+ $language = $this->inputLanguage;\r
+ }\r
+ else if (isset($_GET["language"]))\r
+ {\r
+ $this->inputLanguage = $_GET["language"];\r
+ $language = $this->inputLanguage;\r
+ }\r
+ else\r
+ $language = DEFUALT_LANGUAGE;\r
+\r
+ $tryLanguage = "language/".$language."/".$language.".com_admin.ini";\r
+ if (file_exists($tryLanguage))\r
+ $this->texts = PIE_GetTexts("language/".$language."/".$language.".com_admin.ini");\r
+ else\r
+ $this->texts = PIE_GetTexts("language/".DEFUALT_LANGUAGE."/".DEFUALT_LANGUAGE.".com_admin.ini");\r
+ }\r
+\r
+ function SetSrcOriginal()\r
+ {\r
+ $arr = explode("/", $this->srcEdit);\r
+ $this->srcOriginal = IMAGE_ORIGINAL_PATH.$this->AddUserIdToImageSrc($arr[count($arr)-1]);\r
+ }\r
+\r
+ function SetSrcWorkWith()\r
+ {\r
+ $arr = explode("/", $this->srcEdit);\r
+ $srcWorkWith = IMAGE_WORK_WITH_PATH.$this->AddUserIdToImageSrc($arr[count($arr)-1]);\r
+ $srcWorkWith = substr($srcWorkWith, 0, strripos($srcWorkWith, ".")).".png";\r
+ $this->srcWorkWith = $srcWorkWith;\r
+ }\r
+\r
+ function SetSrcPng()\r
+ {\r
+ $arr = explode("/", $this->srcEdit);\r
+ $srcPng = IMAGE_PNG_PATH.$this->AddUserIdToImageSrc($arr[count($arr)-1]);\r
+ $srcPng = substr($srcPng, 0, strripos($srcPng, ".")).".png";\r
+ $this->srcPng = $srcPng;\r
+ }\r
+\r
+ function SaveOriginal()\r
+ {\r
+ copy($this->srcEdit, $this->srcOriginal);\r
+\r
+ //Resize to fit in max width/height.\r
+ $imageTmp = $this->CreateImage($this->srcOriginal);\r
+ $finalWidth = $this->GetWidthFromImage($imageTmp);\r
+ $finalHeight = $this->GetHeightFromImage($imageTmp);\r
+\r
+ $doSave = false;\r
+\r
+ if ($finalWidth > IMAGE_MAX_WIDTH)\r
+ {\r
+ $widthProp = IMAGE_MAX_WIDTH/$finalWidth;\r
+ $finalWidth = IMAGE_MAX_WIDTH;\r
+ $finalHeight = round($finalHeight*$widthProp);\r
+ $doSave = true;\r
+ }\r
+\r
+ if ($finalHeight > IMAGE_MAX_HEIGHT)\r
+ {\r
+ $heightProp = IMAGE_MAX_HEIGHT/$finalHeight;\r
+ $finalHeight = IMAGE_MAX_HEIGHT;\r
+ $finalWidth = round($finalWidth*$heightProp);\r
+ $doSave = true;\r
+ }\r
+\r
+ if ($doSave)\r
+ {\r
+ $imageTmp = $this->ActionResize($finalWidth, $finalHeight, $imageTmp);\r
+ $this->SaveImage($imageTmp, $this->srcOriginal);\r
+ }\r
+ }\r
+\r
+ function SavePng()\r
+ {\r
+ $this->SaveImage($this->resourceWorkWith, $this->srcPng, image_type_to_mime_type(IMAGETYPE_PNG));\r
+ }\r
+\r
+ function ErrorHasOccurred()\r
+ {\r
+ return (count($this->errorMessages) > 0);\r
+ }\r
+\r
+ function GetWidthFinal()\r
+ {\r
+ return $this->finalWidth;\r
+ }\r
+\r
+ function GetHeightFinal()\r
+ {\r
+ return $this->finalHeight;\r
+ }\r
+\r
+ function GetWidth()\r
+ {\r
+ return $this->GetWidthFromImage($this->resourceWorkWith);\r
+ }\r
+\r
+ function GetWidthLast()\r
+ {\r
+ if ($this->isPostBack)\r
+ return (int)$_POST["widthlast"];\r
+\r
+ return $this->GetWidth();\r
+ }\r
+\r
+ function GetHeight()\r
+ {\r
+ return $this->GetHeightFromImage($this->resourceWorkWith);\r
+ }\r
+\r
+ function GetHeightLast()\r
+ {\r
+ if ($this->isPostBack)\r
+ return (int)$_POST["heightlast"];\r
+\r
+ return $this->GetWidth();\r
+ }\r
+\r
+ function GetImageNameFinal()\r
+ {\r
+ if ($this->isPostBack)\r
+ return $_POST["image_name"];\r
+\r
+ return $this->inputImageName;\r
+ }\r
+\r
+ function getImageName()\r
+ {\r
+ return $this->inputImageName;\r
+ }\r
+\r
+ function GetWidthFromImage($image)\r
+ {\r
+ return imagesx($image);\r
+ }\r
+\r
+ function GetHeightFromImage($image)\r
+ {\r
+ return imagesy($image);\r
+ }\r
+\r
+ function Action($actionType)\r
+ {\r
+ $doSave = false;\r
+\r
+ if ($actionType == $this->actionUndo) {\r
+ $this->ActionUndo();\r
+ $doSave = true;\r
+ }\r
+\r
+ if ( $actionType == $this->actionUpdate\r
+ || $actionType == $this->actionSaveAndClose) {\r
+ if ( $this->inputWidth != $this->GetWidthLast()\r
+ || $this->inputHeight != $this->GetHeightLast()) {\r
+ $this->actions .= $this->GetActionSeparator()."resize:".$this->inputWidth.",".$this->inputHeight;\r
+ }\r
+\r
+ if ( $this->inputCropLeft != 0 || $this->inputCropRight != 0\r
+ || $this->inputCropTop != 0 || $this->inputCropBottom != 0) {\r
+ $this->actions\r
+ .= $this->GetActionSeparator()\r
+ ."crop:".$this->inputCropLeft.","\r
+ .$this->inputCropRight.","\r
+ .$this->inputCropTop.","\r
+ .$this->inputCropBottom;\r
+ }\r
+// var_dump($this->inputImageName);\r
+// var_dump($this->getImageNameFinal());\r
+// var_dump($_POST);\r
+// var_dump($_GET);\r
+// exit;\r
+ if (urldecode($this->inputImageName) != $this->GetImageNameFinal()) {\r
+ $this->actions .= $this->GetActionSeparator ()."imageName:".$this->GetImageNameFinal();\r
+ }\r
+ $doSave = true;\r
+ }\r
+\r
+ if ($actionType == $this->actionUpdate && $this->inputGrayscale) {\r
+ if (strpos($this->actions, $this->actionGrayscale) === false) {\r
+ $this->actions .= $this->GetActionSeparator().$this->actionGrayscale.":0";\r
+ $doSave = true;\r
+ }\r
+ } else if ($actionType == $this->actionUpdate && !$this->inputGrayscale) {\r
+ if (!(strpos($this->actions, $this->actionGrayscale) === false)) {\r
+ $this->actions = str_replace($this->actionGrayscale.":0".$this->GetActionSeparator(), "", $this->actions);\r
+ $this->actions = str_replace($this->GetActionSeparator().$this->actionGrayscale.":0", "", $this->actions);\r
+ $this->actions = str_replace($this->actionGrayscale.":0", "", $this->actions);\r
+ $doSave = true;\r
+ }\r
+ }\r
+\r
+ if ($this->inputContrast != $this->inputContrastLast) {\r
+ $this->actions .= $this->GetActionSeparator().$this->actionContrast.":".$this->inputContrast;\r
+ $doSave = true;\r
+ }\r
+\r
+ if ($this->inputBrightness != $this->inputBrightnessLast) {\r
+ $this->actions .= $this->GetActionSeparator().$this->actionBrightness.":".$this->inputBrightness;\r
+ $doSave = true;\r
+ }\r
+\r
+ if ($this->actionRotateIsSelected) {\r
+ if ($this->actionRotate == $this->actionRotateLeft) {\r
+ $this->actions .= $this->GetActionSeparator().$this->actionRotateLeft;\r
+ $doSave = true;\r
+ } else if ($this->actionRotate == $this->actionRotateRight) {\r
+ $this->actions .= $this->GetActionSeparator().$this->actionRotateRight;\r
+ $doSave = true;\r
+ }\r
+ }\r
+\r
+ $finalContrast = 0;\r
+ $finalBrightness = 0;\r
+ $finalContrastFound = false;\r
+ $finalBrightnessFound = false;\r
+ $finalGrayscale = false;\r
+\r
+ if ($doSave && $this->actions != "") {\r
+ $allActions = explode($this->actionSeparatorSign, $this->actions);\r
+\r
+ $finalRotate = 0;\r
+ $finalCropLeft = 0;\r
+ $finalCropRight = 0;\r
+ $finalCropTop = 0;\r
+ $finalCropBottom = 0;\r
+\r
+ $doSwitch = false;\r
+\r
+ foreach ($allActions as $loopAction) {\r
+ $actionDetail = explode(":", $loopAction);\r
+ $actionValues = explode(",", $actionDetail[1]);\r
+\r
+ if ($actionDetail[0] == "resize") {\r
+ $this->finalWidth = (int)$actionValues[0];\r
+ $this->finalHeight = (int)$actionValues[1];\r
+ } else if ($actionDetail[0] == "crop") {\r
+ $actionValueLeft = (int)$actionValues[0];\r
+ $actionValueRight = (int)$actionValues[1];\r
+ $actionValueTop = (int)$actionValues[2];\r
+ $actionValueBottom = (int)$actionValues[3];\r
+\r
+ $widthProp = 1;\r
+ $heightProp = 1;\r
+\r
+ if ($doSwitch) {\r
+ $widthProp = (($this->GetHeight()-($finalCropTop + $finalCropBottom)) / $this->finalWidth);\r
+ $heightProp = (($this->GetWidth()-($finalCropLeft + $finalCropRight)) / $this->finalHeight);\r
+ } else {\r
+ $widthProp = (($this->GetWidth()-($finalCropLeft + $finalCropRight)) / $this->finalWidth);\r
+ $heightProp = (($this->GetHeight()-($finalCropTop + $finalCropBottom)) / $this->finalHeight);\r
+ }\r
+\r
+ $cropLeft = $actionValueLeft * $widthProp;\r
+ $cropRight = $actionValueRight * $widthProp;\r
+ $cropTop = $actionValueTop * $heightProp;\r
+ $cropBottom = $actionValueBottom * $heightProp;\r
+\r
+ $cropValues = array();\r
+ $cropValues[] = $cropRight;\r
+ $cropValues[] = $cropBottom;\r
+ $cropValues[] = $cropLeft;\r
+ $cropValues[] = $cropTop;\r
+\r
+ if ($finalRotate != 0)\r
+ $cropValues = $this->RotateArray(($finalRotate/-90), $cropValues);\r
+\r
+ $finalCropRight += $cropValues[0];\r
+ $finalCropBottom += $cropValues[1];\r
+ $finalCropLeft += $cropValues[2];\r
+ $finalCropTop += $cropValues[3];\r
+\r
+ $this->finalWidth -= ($actionValueLeft + $actionValueRight);\r
+ $this->finalHeight -= ($actionValueTop + $actionValueBottom);\r
+ } else if ($actionDetail[0] == $this->actionGrayscale && $this->inputGrayscale) {\r
+ $finalGrayscale = true;\r
+ } else if ($actionDetail[0] == "contrast") {\r
+ $finalContrastFound = true;\r
+ $finalContrast = $actionValues[0];\r
+ } else if ($actionDetail[0] == "brightness") {\r
+ $finalBrightnessFound = true;\r
+ $finalBrightness = $actionValues[0];\r
+ } else if ($actionDetail[0] == "rotate") {\r
+ $finalRotate += (int)$actionValues[0];\r
+ $finalWidthTmp = $this->finalWidth;\r
+ $this->finalWidth = $this->finalHeight;\r
+ $this->finalHeight = $finalWidthTmp;\r
+ }\r
+\r
+ if ($finalRotate == -360 || $finalRotate == 360) {\r
+ $finalRotate = 0;\r
+ }\r
+\r
+ $doSwitch = ($finalRotate != 0 && ($finalRotate == 90 || $finalRotate == 270 || $finalRotate == -90 || $finalRotate == -270));\r
+ }\r
+\r
+ //1. All effects.\r
+ if ($finalGrayscale) {\r
+ $this->ActionGrayscale();\r
+ }\r
+\r
+ if ($finalBrightnessFound) {\r
+ $this->ActionBrightness($finalBrightness);\r
+ }\r
+\r
+ if ($finalContrastFound) {\r
+ $this->ActionContrast($finalContrast*-1);\r
+ }\r
+\r
+ //2. Do cropping.\r
+ $finalCropLeft = round($finalCropLeft);\r
+ $finalCropRight = round($finalCropRight);\r
+ $finalCropTop = round($finalCropTop);\r
+ $finalCropBottom = round($finalCropBottom);\r
+ if ($finalCropLeft != 0 || $finalCropRight != 0 || $finalCropTop != 0 || $finalCropBottom != 0) {\r
+ $this->ActionCrop($finalCropLeft, $finalCropRight, $finalCropTop, $finalCropBottom);\r
+ }\r
+\r
+ //3. Rotate\r
+ if ($finalRotate != 0) {\r
+ $this->ActionRotate($finalRotate);\r
+ }\r
+\r
+ //Calculate keep proportions values.\r
+ if (round($this->finalWidth/$this->finalHeight,1) == round($this->GetWidth()/$this->GetHeight(),1)) {\r
+ //It seems to have the same proportions as the original. Use the original proportions value.\r
+ $this->widthKeepProportions = $this->GetWidth();\r
+ $this->heightKeepProportions = $this->GetHeight();\r
+ } else {\r
+ //The proportions has been changed. Use the new width and height instead.\r
+ $this->widthKeepProportions = $this->finalWidth;\r
+ $this->heightKeepProportions = $this->finalHeight;\r
+ }\r
+\r
+ //4. Resize\r
+ if ($this->finalWidth > 0 && $this->finalHeight > 0)\r
+ $this->resourceWorkWith = $this->ActionResize($this->finalWidth, $this->finalHeight, $this->resourceWorkWith);\r
+\r
+ $this->SaveImage($this->resourceWorkWith, $this->srcWorkWith, image_type_to_mime_type(IMAGETYPE_PNG));\r
+ }\r
+\r
+ $this->inputBrightness = $finalBrightness;\r
+ $this->inputContrast = $finalContrast;\r
+ $this->inputGrayscale = $finalGrayscale;\r
+\r
+ if ($actionType == $this->actionSaveAndClose) {\r
+ $this->SaveImage($this->resourceWorkWith, $this->srcEdit, $this->mimeType);\r
+\r
+ /*** GLM stuff ***/\r
+ require_once '../../setup.phtml';\r
+ $CKUpdater = new Toolkit_CKImages_ImageUpdater(Toolkit_Database::getInstance());\r
+ $CKUpdater->load(basename($_GET['imagesrc']));\r
+ $CKUpdater->update(new Toolkit_FileServer_ImageAdapter());\r
+ /*****************/\r
+\r
+ unlink($this->srcOriginal);\r
+ unlink($this->srcPng);\r
+ unlink($this->srcWorkWith);\r
+ $this->DeleteOldImages(IMAGE_ORIGINAL_PATH);\r
+ $this->DeleteOldImages(IMAGE_PNG_PATH);\r
+ $this->DeleteOldImages(IMAGE_WORK_WITH_PATH);\r
+ $reloadParentBrowser = RELOAD_PARENT_BROWSER_ON_SAVE ? 'window.opener.location.reload();' : '';\r
+ PIE_Echo('<script language="javascript" type="text/javascript">'.$reloadParentBrowser.'window.open(\'\',\'_parent\',\'\');window.close();</script>');\r
+ }\r
+ }\r
+\r
+ function ActionResize($width, $height, $image)\r
+ {\r
+ $newImage = @imagecreatetruecolor($width, $height);\r
+ imagecopyresampled($newImage, $image, 0, 0, 0, 0, $width, $height, $this->GetWidthFromImage($image), $this->GetHeightFromImage($image));\r
+ return $newImage;\r
+ }\r
+\r
+ function ActionCrop($cropLeft, $cropRight, $cropTop, $cropBottom)\r
+ {\r
+ $cropWidth = $this->GetWidth() - $cropLeft - $cropRight;\r
+ $cropHeight = $this->GetHeight() - $cropTop - $cropBottom;\r
+\r
+ $newImageCropped = @imagecreatetruecolor($cropWidth, $cropHeight);\r
+ imagecopy($newImageCropped, $this->resourceWorkWith, 0, 0, $cropLeft, $cropTop, $cropWidth, $cropHeight);\r
+\r
+ $this->resourceWorkWith = $newImageCropped;\r
+ }\r
+\r
+ function ActionUndo()\r
+ {\r
+ $separatorPos = strrpos($this->actions, $this->actionSeparatorSign);\r
+ if (!($separatorPos === false))\r
+ {\r
+ $this->actions = substr($this->actions, 0, $separatorPos);\r
+ }\r
+ else\r
+ {\r
+ $this->actions = "";\r
+ }\r
+ }\r
+\r
+ function CreateImage($srcEdit)\r
+ {\r
+ $info = getimagesize($srcEdit);\r
+\r
+ if (!$info)\r
+ return NULL;\r
+\r
+ $mimeType = image_type_to_mime_type($info[2]);\r
+\r
+ if ($mimeType == image_type_to_mime_type(IMAGETYPE_JPEG))\r
+ {\r
+ return imagecreatefromjpeg($srcEdit);\r
+ }\r
+ else if ($mimeType == image_type_to_mime_type(IMAGETYPE_GIF))\r
+ {\r
+ return imagecreatefromgif($srcEdit);\r
+ }\r
+ else if ($mimeType == image_type_to_mime_type(IMAGETYPE_PNG))\r
+ {\r
+ return imagecreatefrompng($srcEdit);\r
+ }\r
+\r
+ return NULL;\r
+ }\r
+\r
+ function ActionRotate($Degrees)\r
+ {\r
+ $this->resourceWorkWith = imagerotate($this->resourceWorkWith, $Degrees, 0);\r
+ }\r
+\r
+ function ActionGrayscale()\r
+ {\r
+ imagefilter($this->resourceWorkWith, IMG_FILTER_GRAYSCALE);\r
+ }\r
+\r
+ function ActionContrast($contrast)\r
+ {\r
+ //-100 = max contrast, 0 = no change, +100 = min contrast\r
+ imagefilter($this->resourceWorkWith, IMG_FILTER_CONTRAST, $contrast);\r
+ }\r
+\r
+ function ActionBrightness($light)\r
+ {\r
+ //-255 = min brightness, 0 = no change, +255 = max brightness\r
+ imagefilter($this->resourceWorkWith, IMG_FILTER_BRIGHTNESS, $light);\r
+ }\r
+\r
+ function GetErrorMessages()\r
+ {\r
+ if (count($this->errorMessages))\r
+ {\r
+ PIE_Echo('<div class="error">');\r
+ PIE_Echo('<ul>');\r
+\r
+ foreach ($this->errorMessages as $errorMessage)\r
+ PIE_Echo ('<li>'.$errorMessage.'</li>');\r
+\r
+ PIE_Echo("</ul>");\r
+ PIE_Echo('</div>');\r
+ }\r
+ }\r
+\r
+ function GetActions()\r
+ {\r
+ PIE_Echo($this->actions);\r
+ }\r
+\r
+ function GetActionSeparator()\r
+ {\r
+ if ($this->actions != "")\r
+ return $this->actionSeparatorSign;\r
+\r
+ return "";\r
+ }\r
+\r
+ function SaveImage($image, $toSrc, $mimeType = -1)\r
+ {\r
+ if ($mimeType == -1)\r
+ $mimeType = $this->mimeType;\r
+\r
+ if ($mimeType == image_type_to_mime_type(IMAGETYPE_JPEG))\r
+ {\r
+ imagejpeg($image, $toSrc);\r
+ }\r
+ else if ($mimeType == image_type_to_mime_type(IMAGETYPE_GIF))\r
+ {\r
+ imagegif($image, $toSrc);\r
+ }\r
+ else if ($mimeType == image_type_to_mime_type(IMAGETYPE_PNG))\r
+ {\r
+ imagepng($image, $toSrc);\r
+ }\r
+ }\r
+\r
+ function CleanUp()\r
+ {\r
+ if ($this->resourceWorkWith)\r
+ imagedestroy($this->resourceWorkWith);\r
+ }\r
+\r
+ function RotateArray($numberOfSteps, $arr)\r
+ {\r
+ $finalArray = array();\r
+\r
+ //-3 to 3\r
+ $finalArray[] = $arr[$this->NumberOfStepsCalculator($numberOfSteps + 0)];\r
+ $finalArray[] = $arr[$this->NumberOfStepsCalculator($numberOfSteps + 1)];\r
+ $finalArray[] = $arr[$this->NumberOfStepsCalculator($numberOfSteps + 2)];\r
+ $finalArray[] = $arr[$this->NumberOfStepsCalculator($numberOfSteps + 3)];\r
+\r
+ return $finalArray;\r
+ }\r
+\r
+ function NumberOfStepsCalculator($sum)\r
+ {\r
+ $maxIndex = 3;\r
+ if ($sum > $maxIndex)\r
+ return ($sum-$maxIndex)-1;\r
+ else if ($sum < 0)\r
+ {\r
+ return ($sum+$maxIndex)+1;\r
+ }\r
+\r
+ return $sum;\r
+ }\r
+\r
+ function AddUserIdToImageSrc($imageSrc)\r
+ {\r
+ return str_replace(".", $this->userId.".", $imageSrc);\r
+ }\r
+\r
+ function IsPHP5OrHigher()\r
+ {\r
+ return version_compare(phpversion(), "5", ">=");\r
+ }\r
+\r
+ function GetFormAction()\r
+ {\r
+ return "index.php?"\r
+ . $this->httpImageKey . "=" . $this->srcEdit\r
+ . '&image_name=' . $this->inputImageName;\r
+ }\r
+\r
+ function GetWidthKeepProportions()\r
+ {\r
+ return $this->widthKeepProportions;\r
+ }\r
+\r
+ function GetHeightKeepProportions()\r
+ {\r
+ return $this->heightKeepProportions;\r
+ }\r
+\r
+ function DeleteOldImages($srcdir)\r
+ {\r
+ if($curdir = opendir($srcdir))\r
+ {\r
+ while($file = readdir($curdir))\r
+ {\r
+ if($file != '.' && $file != '..')\r
+ {\r
+ //$srcfile = $srcdir . '\\' . $file;\r
+ //$srcfile = $srcdir.'/'.$file;\r
+ $srcfile = $srcdir.$file;\r
+ $srcfileLower = strtolower($srcfile);\r
+\r
+ if (stripos($srcfile, ".svn") === false)\r
+ {\r
+ if(is_file($srcfile))\r
+ {\r
+ $doDelete = true;\r
+\r
+ if (substr_count($srcfile, "sample.jpg") > 0 || substr_count($srcfile, "sample.png") > 0 || (substr_count($srcfileLower, ".jpg") == 0 && substr_count($srcfileLower, ".gif") == 0 && substr_count($srcfileLower, ".png") == 0))\r
+ $doDelete = false;\r
+\r
+ if ($doDelete)\r
+ {\r
+\r
+ $deleteTime = mktime(0, 0, 0, date("m"), date("d")-2, date("Y"));\r
+ if (fileatime($srcfile) < $deleteTime)\r
+ {\r
+ //Image is old and will be deleted. Or else the server space will be filled up with not needed images.\r
+ //echo "<h2>DELETE $srcfile".date("F d Y H:i:s.", fileatime($srcfile))."</h2>";\r
+ unlink($srcfile);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ closedir($curdir);\r
+ }\r
+ }\r
+\r
+ function GrantAllAccess($fileName)\r
+ {\r
+ chmod($fileName, 0777);\r
+ }\r
+ }\r
+?>\r
--- /dev/null
+<?php\r
+\r
+\r
+ /*\r
+ Copyright 2008, 2009, 2010 Patrik Hultgren\r
+\r
+ YOUR PROJECT MUST ALSO BE OPEN SOURCE IN ORDER TO USE PHP IMAGE EDITOR.\r
+ OR ELSE YOU NEED TO BUY THE COMMERCIAL VERSION AT:\r
+ http://www.shareit.com/product.html?productid=300296445&backlink=http%3A%2F%2Fwww.phpimageeditor.se%2F\r
+\r
+ This file is part of PHP Image Editor.\r
+\r
+ PHP Image Editor is free software: you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation, either version 3 of the License, or\r
+ (at your option) any later version.\r
+\r
+ PHP Image Editor is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with PHP Image Editor. If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+\r
+\r
+ define("IMAGE_MAX_WIDTH", 700);\r
+ define("IMAGE_MAX_HEIGHT", 500);\r
+ define("DEFUALT_LANGUAGE", "en-GB");\r
+ define("RELOAD_PARENT_BROWSER_ON_SAVE", true);\r
+ define("AJAX_POST_TIMEOUT_MS", 20000);\r
+?>\r
--- /dev/null
+/* Fixes issue here http://code.google.com/p/jcrop/issues/detail?id=1 */
+.jcrop-holder
+{
+ text-align: left;
+}
+
+.jcrop-vline, .jcrop-hline
+{
+ font-size: 0;
+ position: absolute;
+ background: white url('../images/jcrop.gif') top left repeat;
+ /*
+ opacity: .5;
+ *filter:alpha(opacity=50);
+ */
+}
+.jcrop-vline { height: 100%; width: 1px !important; }
+.jcrop-hline { width: 100%; height: 1px !important; }
+.jcrop-handle {
+ font-size: 1px;
+ width: 7px !important;
+ height: 7px !important;
+ border: 1px #eee solid;
+ background-color: #333;
+ *width: 9px;
+ *height: 9px;
+}
+
+.jcrop-tracker {
+ *background-color: gray;
+ width: 100%; height: 100%;
+}
+
+.custom .jcrop-vline,
+.custom .jcrop-hline
+{
+ background: yellow;
+}
+.custom .jcrop-handle
+{
+ border-color: black;
+ background-color: #C7BB00;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
\ No newline at end of file
--- /dev/null
+body\r
+{\r
+ margin: 0;\r
+ padding: 0;\r
+ font-family: Arial;\r
+ font-size: 80%;\r
+}\r
+\r
+form\r
+{\r
+ margin: 0;\r
+ padding: 0;\r
+ background-color: #ffffff;\r
+}\r
+\r
+label\r
+{\r
+ display: block;\r
+}\r
+\r
+label.checkbox\r
+{\r
+ display: inline;\r
+}\r
+\r
+div.field\r
+{\r
+ clear: both;\r
+ padding: 17px;\r
+}\r
+\r
+div.col-1,\r
+div.col-2\r
+{\r
+ float: left;\r
+}\r
+\r
+div.col-1\r
+{\r
+ margin-right: 10px;\r
+}\r
+\r
+input.checkbox\r
+{\r
+}\r
+\r
+input.input-number\r
+{\r
+ width: 70px;\r
+ margin-bottom: 10px;\r
+ border: 1px solid #cbcbcb;\r
+ background-color: #ffffff;\r
+}\r
+\r
+.main-actions\r
+{\r
+ background-color: #eaeaea;\r
+ border-top: 1px solid white;\r
+ border-bottom: 1px solid #d6d6d6;\r
+ padding: 0 10px 0 10px;\r
+ padding: 12px 10px 12px 10px;\r
+}\r
+\r
+#editimage\r
+{\r
+ margin: 0 10px 10px 10px;\r
+ position: relative;\r
+ top: 0px;\r
+ left: 0px;\r
+}\r
+\r
+div.error,\r
+div.info\r
+{\r
+ background-color: #ffc1c1;\r
+ padding: 5px;\r
+ margin: 0 10px 10px 10px;\r
+}\r
+\r
+div.error ul,\r
+div.info ul\r
+{\r
+ list-style-type: square;\r
+}\r
+\r
+div.error li,\r
+div.info li\r
+{\r
+ font-weight: bold;\r
+ margin-bottom: 5px;\r
+}\r
+\r
+div.croparea\r
+{\r
+ background-color: #ffffff;\r
+ filter:alpha(opacity=80);\r
+ -moz-opacity:.80;\r
+ opacity:.80;\r
+ overflow: hidden; \r
+}\r
+\r
+div#actionContainer\r
+{\r
+ background-color: #e1f3ff;\r
+ background-image: url('../images/tab_body.png');\r
+ background-repeat: repeat-x;\r
+}\r
+\r
+div#menu\r
+{\r
+ height: 30px;\r
+ overflow: hidden;\r
+ font-weight: bold;\r
+}\r
+\r
+.selected\r
+{\r
+ float: left;\r
+ color: #000000;\r
+ border-right: 1px solid #ffffff;\r
+ line-height: 30px;\r
+ padding: 0 20px 0 20px;\r
+ cursor: pointer;\r
+ height: 30px;\r
+ background-image: url('../images/tab_selected.png');\r
+ background-repeat: repeat-x;\r
+}\r
+\r
+.not-selected\r
+{\r
+ float: left;\r
+ color: #ffffff;\r
+ border-right: 1px solid #ffffff;\r
+ border-bottom: 1px solid #ffffff;\r
+ line-height: 30px;\r
+ padding: 0 20px 0 20px;\r
+ cursor: pointer;\r
+ height: 29px;\r
+ background-image: url('../images/tab_not_selected.png');\r
+ background-repeat: repeat-x;\r
+}\r
+\r
+.panel\r
+{\r
+ filter:alpha(opacity=0);\r
+ -moz-opacity:0;\r
+ opacity:0;\r
+ display: none; \r
+}\r
+\r
+.tabs\r
+{\r
+ margin: 10px;\r
+}\r
+\r
+.widthAndHeight\r
+{\r
+ height: 23px; \r
+ overflow: hidden;\r
+}\r
+\r
+#image\r
+{\r
+ position: absolute;\r
+ top: 0;\r
+ left: 0;\r
+}\r
+\r
+#loading\r
+{\r
+ border-top: 1px solid white;\r
+ background-color: #c7e7fc;\r
+ padding: 15px;\r
+ font-weight: bold;\r
+}\r
+\r
+#loading_bar\r
+{\r
+ margin-top: 3px;\r
+ background-color: #3d7ab0;\r
+ height: 3px;\r
+}\r
+\r
+#imageResizerKeepProportions,\r
+#imageResizerNoProportions\r
+{\r
+ background-color: #d6d6d6;\r
+ position: absolute; \r
+ left: 0px; \r
+ top: 0px;\r
+ filter:alpha(opacity=0);\r
+ -moz-opacity:.0;\r
+ opacity:.0; \r
+}\r
+\r
+.help\r
+{\r
+ background-color: #fffcd1;\r
+ line-height: 1.5em;\r
+ padding: 10px;\r
+ border: 1px solid #d8d8d8;\r
+}\r
+\r
+.help-header\r
+{\r
+ font-weight: bold;\r
+ text-transform: uppercase;\r
+}\r
+\r
+.help-content\r
+{\r
+}\r
+\r
+#crophelp\r
+{\r
+}\r
+\r
+.crop-settings\r
+{\r
+ background-color: #cde3f2;\r
+}\r
+\r
+.crop-top\r
+{\r
+ border-bottom: 1px solid #a8c6da;\r
+ padding-bottom: 8px;\r
+ margin-bottom: 8px;\r
+}
\ No newline at end of file
--- /dev/null
+/* Resizable
+----------------------------------*/
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}
\ No newline at end of file
--- /dev/null
+/* Slider
+----------------------------------*/
+.ui-slider { position: relative; text-align: left; top: 15px; }
+.ui-slider .ui-slider-handle { background: url(../images/slider_pointer.gif) 0 0 no-repeat; position: absolute; z-index: 2; width: 11px; height: 17px; cursor: default; background-color: none; border: 0; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: 1%; display: block; border: 0; }
+\r
+ \r
+
+.ui-slider-horizontal { background: url(../images/slider_track.gif) 0 0 repeat-x; height: 7px; background-color: none; border: 0; width: 401px;}
+.ui-slider-horizontal .ui-slider-handle { top: -.6em; margin-left: -5px; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }
\ No newline at end of file
--- /dev/null
+<?php\r
+ \r
+ /**\r
+ * constants.php\r
+ * \r
+ * PHP version 5.2\r
+ * \r
+ * @category Toolkit\r
+ * @package PHPImageEditor/includes\r
+ * @author Jamie Kahgee <steve@gaslightmedia.com>\r
+ * @copyright 2012 Gaslight Media\r
+ * @license Gaslight Media\r
+ * @version SVN: $id$\r
+ * @link <>\r
+ */\r
+ /*\r
+ Copyright 2008, 2009, 2010 Patrik Hultgren\r
+ \r
+ YOUR PROJECT MUST ALSO BE OPEN SOURCE IN ORDER TO USE PHP IMAGE EDITOR.\r
+ OR ELSE YOU NEED TO BUY THE COMMERCIAL VERSION AT:\r
+ http://www.shareit.com/product.html?productid=300296445&backlink=http%3A%2F%2Fwww.phpimageeditor.se%2F\r
+ \r
+ This file is part of PHP Image Editor.\r
+\r
+ PHP Image Editor is free software: you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation, either version 3 of the License, or\r
+ (at your option) any later version.\r
+\r
+ PHP Image Editor is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with PHP Image Editor. If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+\r
+\r
+ define("PHP_VERSION_MINIMUM", "5");\r
+ define("GD_VERSION_MINIMUM", "2.0.28");\r
+ define("IMAGE_ORIGINAL_PATH", "editimagesoriginal/");\r
+ define("IMAGE_WORK_WITH_PATH", "editimagesworkwith/");\r
+ define("IMAGE_PNG_PATH", "editimagespng/");\r
+ define("MENU_RESIZE", "0");\r
+ define("MENU_ROTATE", "1");\r
+ define("MENU_CROP", "2");\r
+ define("MENU_EFFECTS", "3");\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+ \r
+ \r
+ /*\r
+ Copyright 2008, 2009, 2010 Patrik Hultgren\r
+ \r
+ YOUR PROJECT MUST ALSO BE OPEN SOURCE IN ORDER TO USE PHP IMAGE EDITOR.\r
+ OR ELSE YOU NEED TO BUY THE COMMERCIAL VERSION AT:\r
+ http://www.shareit.com/product.html?productid=300296445&backlink=http%3A%2F%2Fwww.phpimageeditor.se%2F\r
+ \r
+ This file is part of PHP Image Editor.\r
+\r
+ PHP Image Editor is free software: you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation, either version 3 of the License, or\r
+ (at your option) any later version.\r
+\r
+ PHP Image Editor is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with PHP Image Editor. If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+\r
+\r
+ function PIE_GetTexts($filePath)\r
+ {\r
+ $texts = array();\r
+ $lines = file($filePath);\r
+ \r
+ foreach($lines as $line_num => $line)\r
+ {\r
+ if (substr_count($line, "#") == 0)\r
+ {\r
+ $keyAndText = explode("=", trim($line));\r
+ $texts[$keyAndText[0]] = $keyAndText[1];\r
+ }\r
+ }\r
+ \r
+ return $texts;\r
+ }\r
+ \r
+ function PIE_Echo($text)\r
+ {\r
+ echo $text;\r
+ //echo utf8_encode($text);\r
+ } \r
+?>
\ No newline at end of file
--- /dev/null
+<?php \r
+ \r
+ \r
+ /*\r
+ Copyright 2008, 2009, 2010 Patrik Hultgren\r
+ \r
+ YOUR PROJECT MUST ALSO BE OPEN SOURCE IN ORDER TO USE PHP IMAGE EDITOR.\r
+ OR ELSE YOU NEED TO BUY THE COMMERCIAL VERSION AT:\r
+ http://www.shareit.com/product.html?productid=300296445&backlink=http%3A%2F%2Fwww.phpimageeditor.se%2F\r
+ \r
+ This file is part of PHP Image Editor.\r
+\r
+ PHP Image Editor is free software: you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation, either version 3 of the License, or\r
+ (at your option) any later version.\r
+\r
+ PHP Image Editor is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+\r
+ You should have received a copy of the GNU General Public License\r
+ along with PHP Image Editor. If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+\r
+ \r
+ \r
+ header("Cache-Control: no-store"); \r
+ header('content-type: text/html; charset: utf-8');\r
+ include 'includes/constants.php';\r
+ include 'config.php';\r
+ include 'includes/functions.php';\r
+ include 'classes/phpimageeditor.php';\r
+ global $objPHPImageEditor;\r
+ $objPHPImageEditor = new PHPImageEditor();\r
+?>\r
+<?php if (!$objPHPImageEditor->isAjaxPost) { ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+ <head>\r
+ <title>PHP Image Editor</title>\r
+ <script type="text/javascript" src="javascript/jquery-1.3.2.min.js"></script>\r
+ <script type="text/javascript" src="javascript/jquery.jcrop.js"></script>\r
+ <script type="text/javascript" src="javascript/jquery.numeric.js"></script>\r
+ <script type="text/javascript" src="javascript/ui.core.js"></script>\r
+ <script type="text/javascript" src="javascript/ui.slider.js"></script>\r
+ <script type="text/javascript" src="javascript/ui.resizable.js"></script>\r
+ <script type="text/javascript" src="javascript/effects.core.js"></script>\r
+ <script type="text/javascript" src="javascript/phpimageeditor.js"></script>\r
+ \r
+ <link rel="stylesheet" type="text/css" href="css/style.css"/>\r
+ <link rel="stylesheet" type="text/css" href="css/ui.resizable.css"/>\r
+ <link rel="stylesheet" type="text/css" href="css/ui.slider.css"/>\r
+ <link rel="stylesheet" type="text/css" href="css/jquery.jcrop.css"/>\r
+ \r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+ \r
+ <script type="text/javascript">\r
+ var ImageMaxWidth = <?php PIE_Echo(IMAGE_MAX_WIDTH); ?>;\r
+ var ImageMaxHeight = <?php PIE_Echo(IMAGE_MAX_HEIGHT); ?>;\r
+ var ImageWidth = <?php PIE_Echo($objPHPImageEditor->GetWidthFinal()); ?>;\r
+ var ImageHeight = <?php PIE_Echo($objPHPImageEditor->GetHeightFinal()); ?>;\r
+ var TextIsRequired = "<?php PIE_Echo($objPHPImageEditor->texts["IS REQUIRED"]); ?>";\r
+ var TextMustBeNumeric = "<?php PIE_Echo($objPHPImageEditor->texts["MUST BE NUMERIC"]); ?>";\r
+ var TextWidth = "<?php PIE_Echo($objPHPImageEditor->texts["WIDTH"]); ?>";\r
+ var TextHeight = "<?php PIE_Echo($objPHPImageEditor->texts["HEIGHT"]); ?>";\r
+ var TextNotNegative = "<?php PIE_Echo($objPHPImageEditor->texts["NOT NEGATIVE"]); ?>";\r
+ var TextNotInRange = "<?php PIE_Echo($objPHPImageEditor->texts["NOT IN RANGE"]); ?>";\r
+ var TextCantBeLargerThen = "<?php PIE_Echo($objPHPImageEditor->texts["CANT BE LARGER THEN"]); ?>";\r
+ var TextAnUnexpectedError = "<?php PIE_Echo($objPHPImageEditor->texts["AN UNEXPECTED ERROR"]); ?>";\r
+ var Brightness = <?php PIE_Echo($objPHPImageEditor->inputBrightness); ?>;\r
+ var Contrast = <?php PIE_Echo($objPHPImageEditor->inputContrast); ?>;\r
+ var BrightnessMax = <?php PIE_Echo($objPHPImageEditor->brightnessMax); ?>;\r
+ var ContrastMax = <?php PIE_Echo($objPHPImageEditor->contrastMax); ?>;\r
+ var FormAction = "<?php PIE_Echo($objPHPImageEditor->GetFormAction()); ?>";\r
+ var FormId = "<?php PIE_Echo($objPHPImageEditor->formName); ?>";\r
+ var ActionUpdate = "<?php PIE_Echo($objPHPImageEditor->actionUpdate); ?>";\r
+ var ActionUndo = "<?php PIE_Echo($objPHPImageEditor->actionUndo); ?>";\r
+ var ActionSaveAndClose = "<?php PIE_Echo($objPHPImageEditor->actionSaveAndClose); ?>";\r
+ var ActionRotateLeft = "<?php PIE_Echo($objPHPImageEditor->actionRotateLeft); ?>";\r
+ var ActionRotateRight = "<?php PIE_Echo($objPHPImageEditor->actionRotateRight); ?>";\r
+ var ActionSaveAndClose = "<?php PIE_Echo($objPHPImageEditor->actionSaveAndClose); ?>";\r
+ var MenuResize = "<?php PIE_Echo(MENU_RESIZE); ?>";\r
+ var MenuRotate = "<?php PIE_Echo(MENU_ROTATE); ?>";\r
+ var MenuCrop = "<?php PIE_Echo(MENU_CROP); ?>";\r
+ var MenuEffects = "<?php PIE_Echo(MENU_EFFECTS); ?>";\r
+ var AjaxPostTimeoutMs = <?php PIE_Echo(AJAX_POST_TIMEOUT_MS); ?>; \r
+ </script>\r
+ </head>\r
+ <body>\r
+ <div id="phpImageEditor">\r
+<?php } ?>\r
+\r
+ <form id="<?php PIE_Echo($objPHPImageEditor->formName); ?>" name="<?php PIE_Echo($objPHPImageEditor->formName); ?>" method="post" action="<?php PIE_Echo($objPHPImageEditor->GetFormAction()); ?>">\r
+ <?php if (!$objPHPImageEditor->ErrorHasOccurred()) { ?>\r
+ \r
+ <div class="tabs">\r
+ \r
+ <div id="menu">\r
+ <div class="<?php PIE_Echo($objPHPImageEditor->inputPanel == MENU_RESIZE ? 'selected' : 'not-selected'); ?>" id="menuitem_<?php PIE_Echo(MENU_RESIZE); ?>">\r
+ <?php PIE_Echo($objPHPImageEditor->texts["RESIZE IMAGE"]); ?>\r
+ </div>\r
+ <!--\r
+ <div class="<?php PIE_Echo($objPHPImageEditor->inputPanel == MENU_ROTATE ? 'selected' : 'not-selected'); ?>" id="menuitem_<?php PIE_Echo(MENU_ROTATE); ?>">\r
+ <?php PIE_Echo($objPHPImageEditor->texts["ROTATE IMAGE"]); ?>\r
+ </div>\r
+ -->\r
+ <div class="<?php PIE_Echo($objPHPImageEditor->inputPanel == MENU_CROP ? 'selected' : 'not-selected'); ?>" id="menuitem_<?php PIE_Echo(MENU_CROP); ?>">\r
+ <?php PIE_Echo($objPHPImageEditor->texts["CROP IMAGE"]); ?>\r
+ </div>\r
+ <!--\r
+ <?php if ($objPHPImageEditor->IsPHP5OrHigher()) { ?>\r
+ <div class="<?php PIE_Echo($objPHPImageEditor->inputPanel == MENU_EFFECTS ? 'selected' : 'not-selected'); ?>" id="menuitem_<?php PIE_Echo(MENU_EFFECTS); ?>">\r
+ <?php PIE_Echo($objPHPImageEditor->texts["EFFECTS"]); ?>\r
+ </div>\r
+ <?php } ?>\r
+ -->\r
+ </div>\r
+ \r
+ <div id="actionContainer">\r
+ \r
+ <div id="panel_<?php PIE_Echo(MENU_RESIZE); ?>" class="panel">\r
+ <table cellpadding="0" cellspacing="0" border="0">\r
+ <tr>\r
+ <td>\r
+ <div class="field widthAndHeight">\r
+ <div class="col-1">\r
+ <label for="width"><?php PIE_Echo($objPHPImageEditor->texts["WIDTH"]); ?></label>\r
+ <input class="input-number" type="text" name="width" id="width" value="<?php PIE_Echo($objPHPImageEditor->GetWidthFinal()); ?>"/>\r
+ <input type="hidden" name="widthoriginal" id="widthoriginal" value="<?php PIE_Echo($objPHPImageEditor->GetWidth()); ?>"/>\r
+ </div>\r
+ <div class="col-2">\r
+ <label for="height"><?php PIE_Echo($objPHPImageEditor->texts["HEIGHT"]); ?></label>\r
+ <input class="input-number" type="text" name="height" id="height" value="<?php PIE_Echo($objPHPImageEditor->GetHeightFinal()); ?>"/>\r
+ <input type="hidden" name="heightoriginal" id="heightoriginal" value="<?php PIE_Echo($objPHPImageEditor->GetHeight()); ?>"/>\r
+ </div>\r
+ </div>\r
+ <div class="field">\r
+ <input class="checkbox" type="checkbox" name="<?php PIE_Echo($objPHPImageEditor->fieldNameKeepProportions); ?>" id="<?php PIE_Echo($objPHPImageEditor->fieldNameKeepProportions); ?>" <?php PIE_Echo($objPHPImageEditor->inputKeepProportions ? 'checked="checked"' : ''); ?>/>\r
+ <input type="hidden" name="keepproportionsval" id="keepproportionsval" value="<?php PIE_Echo($objPHPImageEditor->inputKeepProportions ? '1' : '0'); ?>"/>\r
+ <label for="<?php PIE_Echo($objPHPImageEditor->fieldNameKeepProportions); ?>" class="checkbox"><?php PIE_Echo($objPHPImageEditor->texts["KEEP PROPORTIONS"]); ?></label>\r
+ </div>\r
+ </td>\r
+ <td>\r
+ <div class="help" id="resizehelp">\r
+ <div class="help-header" id="resizehelpheader"><?php PIE_Echo($objPHPImageEditor->texts["INSTRUCTIONS"]); ?></div>\r
+ <div class="help-content" id="resizehelpcontent"><?php PIE_Echo($objPHPImageEditor->texts["RESIZE HELP"]); ?></div>\r
+ </div>\r
+ </td>\r
+ </tr>\r
+ </table>\r
+ </div>\r
+ \r
+ <div id="panel_<?php PIE_Echo(MENU_ROTATE); ?>" class="panel">\r
+ <div class="field">\r
+ <input id="btnRotateLeft" type="button" value="<?php PIE_Echo($objPHPImageEditor->texts["LEFT 90 DEGREES"]); ?>"/>\r
+ <input id="btnRotateRight" type="button" value="<?php PIE_Echo($objPHPImageEditor->texts["RIGHT 90 DEGREES"]); ?>"/>\r
+ <input type="hidden" name="rotate" id="rotate" value="-1"/>\r
+ </div>\r
+ </div>\r
+ \r
+ <div id="panel_<?php PIE_Echo(MENU_CROP); ?>" class="panel">\r
+ <div class="field">\r
+ <input class="input-number" type="hidden" name="croptop" id="croptop" value="0"/>\r
+ <input class="input-number" type="hidden" name="cropleft" id="cropleft" value="0"/>\r
+ <input class="input-number" type="hidden" name="cropright" id="cropright" value="0"/>\r
+ <input class="input-number" type="hidden" name="cropbottom" id="cropbottom" value="0"/>\r
+ <div class="help" id="crophelp">\r
+ <div class="help-header" id="crophelpheader"><?php PIE_Echo($objPHPImageEditor->texts["INSTRUCTIONS"]); ?></div>\r
+ <div class="help-content" id="crophelpcontent"><?php PIE_Echo($objPHPImageEditor->texts["CROP HELP"]); ?></div>\r
+ </div>\r
+ </div>\r
+ <div class="field crop-settings">\r
+ <div class="crop-top">\r
+ <?php PIE_Echo($objPHPImageEditor->texts["CROP WIDTH"]); ?>: <span id="cropwidth">0</span>\r
+ <?php PIE_Echo($objPHPImageEditor->texts["CROP HEIGHT"]); ?>: <span id="cropheight">0</span>\r
+ </div>\r
+ <input id="cropkeepproportions" class="checkbox" type="checkbox" name="cropkeepproportions" <?php PIE_Echo($objPHPImageEditor->inputCropKeepProportions ? 'checked="checked"' : ''); ?>/>\r
+ <label class="checkbox" for="cropkeepproportions"><?php PIE_Echo($objPHPImageEditor->texts["CROP KEEP PROPORTIONS"]); ?></label>\r
+ <input id="cropkeepproportionsval" type="hidden" name="cropkeepproportionsval" value="<?php PIE_Echo($objPHPImageEditor->inputCropKeepProportions ? '1' : '0'); ?>"/> \r
+ <input id="cropkeepproportionsratio" type="hidden" name="cropkeepproportionsratio" value="<?php PIE_Echo($objPHPImageEditor->inputCropKeepProportionsRatio); ?>"/> \r
+ </div>\r
+ </div>\r
+ <div id="panel_<?php PIE_Echo(MENU_EFFECTS); ?>" class="panel" style="display: <?php PIE_Echo($objPHPImageEditor->IsPHP5OrHigher() ? 'block' : 'none'); ?>;">\r
+ <div class="field">\r
+ <label for="brightness"><?php PIE_Echo($objPHPImageEditor->texts["BRIGHTNESS"]); ?></label>\r
+ <div id="brightness_slider_track"></div>\r
+ </div>\r
+ <input type="hidden" name="brightness" id="brightness" value="<?php PIE_Echo($objPHPImageEditor->inputBrightness); ?>"/>\r
+ <div class="field">\r
+ <label for="contrast"><?php PIE_Echo($objPHPImageEditor->texts["CONTRAST"]); ?></label>\r
+ <div id="contrast_slider_track"></div>\r
+ </div>\r
+ <input type="hidden" name="contrast" id="contrast" value="<?php PIE_Echo($objPHPImageEditor->inputContrast); ?>"/>\r
+ <div class="field">\r
+ <input class="checkbox" type="checkbox" name="<?php PIE_Echo($objPHPImageEditor->actionGrayscale); ?>" id="<?php PIE_Echo($objPHPImageEditor->actionGrayscale); ?>" <?php PIE_Echo($objPHPImageEditor->inputGrayscale ? 'checked="checked"' : ''); ?>/>\r
+ <label for="<?php PIE_Echo($objPHPImageEditor->actionGrayscale); ?>" class="checkbox"><?php PIE_Echo($objPHPImageEditor->texts["GRAYSCALE"]); ?></label>\r
+ <input type="hidden" name="grayscaleval" id="grayscaleval" value="<?php PIE_Echo($objPHPImageEditor->inputGrayscale ? '1' : '0'); ?>"/>\r
+ </div>\r
+ </div>\r
+ <div id="loading" style="display: none;"><?php PIE_Echo($objPHPImageEditor->texts["LOADING"]); ?>...<div id="loading_bar" style="width: 0px;"></div></div>\r
+ \r
+ </div>\r
+ \r
+ <div class="main-actions">\r
+ <input type="button" id="btnupdate" name="btnupdate" value="<?php PIE_Echo($objPHPImageEditor->texts["UPDATE"]); ?>"/>\r
+ <input type="button" <?php PIE_Echo($objPHPImageEditor->actions == "" ? 'disabled="disabled"' : ''); ?> id="btnsave" name="btnsave" value="<?php PIE_Echo($objPHPImageEditor->texts["SAVE AND CLOSE"]); ?>"/>\r
+ <input type="button" <?php PIE_Echo($objPHPImageEditor->actions == "" ? 'disabled="disabled"' : ''); ?> id="btnundo" name="btnundo" value="<?php PIE_Echo($objPHPImageEditor->texts["UNDO"]); ?>"/>\r
+ </div>\r
+ <div class="field">\r
+ <label><input type="text" id="image_name" name="image_name" value="<?php PIE_Echo(urldecode($objPHPImageEditor->GetImageNameFinal())); ?>" /></label>\r
+ </div>\r
+ \r
+ </div>\r
+ <input type="hidden" name="actiontype" id="actiontype" value="<?php PIE_Echo($objPHPImageEditor->actionUpdate); ?>"/>\r
+ <input type="hidden" name="panel" id="panel" value="<?php PIE_Echo($objPHPImageEditor->inputPanel); ?>"/>\r
+ <input type="hidden" name="language" id="language" value="<?php PIE_Echo($objPHPImageEditor->inputLanguage); ?>"/>\r
+ <input type="hidden" name="actions" id="actions" style="width: 1000px;" value="<?php $objPHPImageEditor->GetActions(); ?>"/>\r
+ <input type="hidden" name="imageNameLast" id="imageNameLast" value="<?php PIE_Echo($objPHPImageEditor->GetImageNameFinal()); ?>" />\r
+ <input type="hidden" name="widthlast" id="widthlast" value="<?php PIE_Echo($objPHPImageEditor->GetWidthFinal()); ?>"/>\r
+ <input type="hidden" name="heightlast" id="heightlast" value="<?php PIE_Echo($objPHPImageEditor->GetHeightFinal()); ?>"/>\r
+ <input type="hidden" name="widthlastbeforeresize" id="widthlastbeforeresize" value="<?php PIE_Echo($objPHPImageEditor->GetWidthKeepProportions()); ?>"/>\r
+ <input type="hidden" name="heightlastbeforeresize" id="heightlastbeforeresize" value="<?php PIE_Echo($objPHPImageEditor->GetHeightKeepProportions()); ?>"/>\r
+ <input type="hidden" name="userid" id="userid" value="<?php PIE_Echo($objPHPImageEditor->userId); ?>"/>\r
+ <input type="hidden" name="contrastlast" id="contrastlast" value="<?php PIE_Echo($objPHPImageEditor->inputContrast); ?>"/>\r
+ <input type="hidden" name="brightnesslast" id="brightnesslast" value="<?php PIE_Echo($objPHPImageEditor->inputBrightness); ?>"/>\r
+ <input type="hidden" name="isajaxpost" id="isajaxpost" value="false"/>\r
+ <?php } ?>\r
+ </form>\r
+ <?php $objPHPImageEditor->GetErrorMessages(); ?>\r
+ <div id="divJsErrors" class="error" style="display: none;">\r
+ <ul id="ulJsErrors" style="display: none;"><li></li></ul>\r
+ </div>\r
+ <div><img src="images/empty.gif" alt=""/></div>\r
+ <?php if (!$objPHPImageEditor->ErrorHasOccurred()) { ?>\r
+ <div id="editimage">\r
+ <img id="image" style="position: absolute; left: 0px; top: 0px; width: <?php PIE_Echo($objPHPImageEditor->GetWidthFinal()); ?>px; height: <?php PIE_Echo($objPHPImageEditor->GetHeightFinal()); ?>px;" alt="" src="<?php PIE_Echo($objPHPImageEditor->srcWorkWith); ?>?timestamp=<?php PIE_Echo(time()); ?>"/>\r
+ <div id="imageResizerKeepProportions" style="diplay: <?php PIE_Echo(($objPHPImageEditor->inputKeepProportions && $objPHPImageEditor->inputPanel == MENU_RESIZE) ? 'block' : 'none'); ?>; width: <?php PIE_Echo($objPHPImageEditor->GetWidthFinal()); ?>px; height: <?php PIE_Echo($objPHPImageEditor->GetHeightFinal()); ?>px;"></div>\r
+ <div id="imageResizerNoProportions" style="diplay: <?php PIE_Echo((!$objPHPImageEditor->inputKeepProportions && $objPHPImageEditor->inputPanel == MENU_RESIZE) ? 'block' : 'none'); ?>; width: <?php PIE_Echo($objPHPImageEditor->GetWidthFinal()); ?>px; height: <?php PIE_Echo($objPHPImageEditor->GetHeightFinal()); ?>px;"></div>\r
+ </div> \r
+ <?php } ?>\r
+\r
+<?php if (!$objPHPImageEditor->isAjaxPost) { ?>\r
+ </div>\r
+ </body>\r
+ </html>\r
+<?php } ?>\r
+\r
+<?php $objPHPImageEditor->CleanUp(); ?>
\ No newline at end of file
--- /dev/null
+/*
+ * jQuery UI Effects 1.7
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/
+ */
+;jQuery.effects || (function($) {
+
+$.effects = {
+ version: "1.7",
+
+ // Saves a set of properties in a data storage
+ save: function(element, set) {
+ for(var i=0; i < set.length; i++) {
+ if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]);
+ }
+ },
+
+ // Restores a set of previously saved properties from a data storage
+ restore: function(element, set) {
+ for(var i=0; i < set.length; i++) {
+ if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));
+ }
+ },
+
+ setMode: function(el, mode) {
+ if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
+ return mode;
+ },
+
+ getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value
+ // this should be a little more flexible in the future to handle a string & hash
+ var y, x;
+ switch (origin[0]) {
+ case 'top': y = 0; break;
+ case 'middle': y = 0.5; break;
+ case 'bottom': y = 1; break;
+ default: y = origin[0] / original.height;
+ };
+ switch (origin[1]) {
+ case 'left': x = 0; break;
+ case 'center': x = 0.5; break;
+ case 'right': x = 1; break;
+ default: x = origin[1] / original.width;
+ };
+ return {x: x, y: y};
+ },
+
+ // Wraps the element around a wrapper that copies position properties
+ createWrapper: function(element) {
+
+ //if the element is already wrapped, return it
+ if (element.parent().is('.ui-effects-wrapper'))
+ return element.parent();
+
+ //Cache width,height and float properties of the element, and create a wrapper around it
+ var props = { width: element.outerWidth(true), height: element.outerHeight(true), 'float': element.css('float') };
+ element.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');
+ var wrapper = element.parent();
+
+ //Transfer the positioning of the element to the wrapper
+ if (element.css('position') == 'static') {
+ wrapper.css({ position: 'relative' });
+ element.css({ position: 'relative'} );
+ } else {
+ var top = element.css('top'); if(isNaN(parseInt(top,10))) top = 'auto';
+ var left = element.css('left'); if(isNaN(parseInt(left,10))) left = 'auto';
+ wrapper.css({ position: element.css('position'), top: top, left: left, zIndex: element.css('z-index') }).show();
+ element.css({position: 'relative', top: 0, left: 0 });
+ }
+
+ wrapper.css(props);
+ return wrapper;
+ },
+
+ removeWrapper: function(element) {
+ if (element.parent().is('.ui-effects-wrapper'))
+ return element.parent().replaceWith(element);
+ return element;
+ },
+
+ setTransition: function(element, list, factor, value) {
+ value = value || {};
+ $.each(list, function(i, x){
+ unit = element.cssUnit(x);
+ if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];
+ });
+ return value;
+ },
+
+ //Base function to animate from one class to another in a seamless transition
+ animateClass: function(value, duration, easing, callback) {
+
+ var cb = (typeof easing == "function" ? easing : (callback ? callback : null));
+ var ea = (typeof easing == "string" ? easing : null);
+
+ return this.each(function() {
+
+ var offset = {}; var that = $(this); var oldStyleAttr = that.attr("style") || '';
+ if(typeof oldStyleAttr == 'object') oldStyleAttr = oldStyleAttr["cssText"]; /* Stupidly in IE, style is a object.. */
+ if(value.toggle) { that.hasClass(value.toggle) ? value.remove = value.toggle : value.add = value.toggle; }
+
+ //Let's get a style offset
+ var oldStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle));
+ if(value.add) that.addClass(value.add); if(value.remove) that.removeClass(value.remove);
+ var newStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle));
+ if(value.add) that.removeClass(value.add); if(value.remove) that.addClass(value.remove);
+
+ // The main function to form the object for animation
+ for(var n in newStyle) {
+ if( typeof newStyle[n] != "function" && newStyle[n] /* No functions and null properties */
+ && n.indexOf("Moz") == -1 && n.indexOf("length") == -1 /* No mozilla spezific render properties. */
+ && newStyle[n] != oldStyle[n] /* Only values that have changed are used for the animation */
+ && (n.match(/color/i) || (!n.match(/color/i) && !isNaN(parseInt(newStyle[n],10)))) /* Only things that can be parsed to integers or colors */
+ && (oldStyle.position != "static" || (oldStyle.position == "static" && !n.match(/left|top|bottom|right/))) /* No need for positions when dealing with static positions */
+ ) offset[n] = newStyle[n];
+ }
+
+ that.animate(offset, duration, ea, function() { // Animate the newly constructed offset object
+ // Change style attribute back to original. For stupid IE, we need to clear the damn object.
+ if(typeof $(this).attr("style") == 'object') { $(this).attr("style")["cssText"] = ""; $(this).attr("style")["cssText"] = oldStyleAttr; } else $(this).attr("style", oldStyleAttr);
+ if(value.add) $(this).addClass(value.add); if(value.remove) $(this).removeClass(value.remove);
+ if(cb) cb.apply(this, arguments);
+ });
+
+ });
+ }
+};
+
+
+function _normalizeArguments(a, m) {
+
+ var o = a[1] && a[1].constructor == Object ? a[1] : {}; if(m) o.mode = m;
+ var speed = a[1] && a[1].constructor != Object ? a[1] : (o.duration ? o.duration : a[2]); //either comes from options.duration or the secon/third argument
+ speed = $.fx.off ? 0 : typeof speed === "number" ? speed : $.fx.speeds[speed] || $.fx.speeds._default;
+ var callback = o.callback || ( $.isFunction(a[1]) && a[1] ) || ( $.isFunction(a[2]) && a[2] ) || ( $.isFunction(a[3]) && a[3] );
+
+ return [a[0], o, speed, callback];
+
+}
+
+//Extend the methods of jQuery
+$.fn.extend({
+
+ //Save old methods
+ _show: $.fn.show,
+ _hide: $.fn.hide,
+ __toggle: $.fn.toggle,
+ _addClass: $.fn.addClass,
+ _removeClass: $.fn.removeClass,
+ _toggleClass: $.fn.toggleClass,
+
+ // New effect methods
+ effect: function(fx, options, speed, callback) {
+ return $.effects[fx] ? $.effects[fx].call(this, {method: fx, options: options || {}, duration: speed, callback: callback }) : null;
+ },
+
+ show: function() {
+ if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])))
+ return this._show.apply(this, arguments);
+ else {
+ return this.effect.apply(this, _normalizeArguments(arguments, 'show'));
+ }
+ },
+
+ hide: function() {
+ if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])))
+ return this._hide.apply(this, arguments);
+ else {
+ return this.effect.apply(this, _normalizeArguments(arguments, 'hide'));
+ }
+ },
+
+ toggle: function(){
+ if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) || (arguments[0].constructor == Function))
+ return this.__toggle.apply(this, arguments);
+ else {
+ return this.effect.apply(this, _normalizeArguments(arguments, 'toggle'));
+ }
+ },
+
+ addClass: function(classNames, speed, easing, callback) {
+ return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
+ },
+ removeClass: function(classNames,speed,easing,callback) {
+ return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
+ },
+ toggleClass: function(classNames,speed,easing,callback) {
+ return ( (typeof speed !== "boolean") && speed ) ? $.effects.animateClass.apply(this, [{ toggle: classNames },speed,easing,callback]) : this._toggleClass(classNames, speed);
+ },
+ morph: function(remove,add,speed,easing,callback) {
+ return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);
+ },
+ switchClass: function() {
+ return this.morph.apply(this, arguments);
+ },
+
+ // helper functions
+ cssUnit: function(key) {
+ var style = this.css(key), val = [];
+ $.each( ['em','px','%','pt'], function(i, unit){
+ if(style.indexOf(unit) > 0)
+ val = [parseFloat(style), unit];
+ });
+ return val;
+ }
+});
+
+/*
+ * jQuery Color Animations
+ * Copyright 2007 John Resig
+ * Released under the MIT and GPL licenses.
+ */
+
+// We override the animation for all of these color styles
+$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
+ $.fx.step[attr] = function(fx) {
+ if ( fx.state == 0 ) {
+ fx.start = getColor( fx.elem, attr );
+ fx.end = getRGB( fx.end );
+ }
+
+ fx.elem.style[attr] = "rgb(" + [
+ Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0],10), 255), 0),
+ Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1],10), 255), 0),
+ Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2],10), 255), 0)
+ ].join(",") + ")";
+ };
+});
+
+// Color Conversion functions from highlightFade
+// By Blair Mitchelmore
+// http://jquery.offput.ca/highlightFade/
+
+// Parse strings looking for color tuples [255,255,255]
+function getRGB(color) {
+ var result;
+
+ // Check if we're already dealing with an array of colors
+ if ( color && color.constructor == Array && color.length == 3 )
+ return color;
+
+ // Look for rgb(num,num,num)
+ if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
+ return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];
+
+ // Look for rgb(num%,num%,num%)
+ if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
+ return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
+
+ // Look for #a0b1c2
+ if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
+ return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
+
+ // Look for #fff
+ if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
+ return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
+
+ // Look for rgba(0, 0, 0, 0) == transparent in Safari 3
+ if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
+ return colors['transparent'];
+
+ // Otherwise, we're most likely dealing with a named color
+ return colors[$.trim(color).toLowerCase()];
+}
+
+function getColor(elem, attr) {
+ var color;
+
+ do {
+ color = $.curCSS(elem, attr);
+
+ // Keep going until we find an element that has color, or we hit the body
+ if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )
+ break;
+
+ attr = "backgroundColor";
+ } while ( elem = elem.parentNode );
+
+ return getRGB(color);
+};
+
+// Some named colors to work with
+// From Interface by Stefan Petre
+// http://interface.eyecon.ro/
+
+var colors = {
+ aqua:[0,255,255],
+ azure:[240,255,255],
+ beige:[245,245,220],
+ black:[0,0,0],
+ blue:[0,0,255],
+ brown:[165,42,42],
+ cyan:[0,255,255],
+ darkblue:[0,0,139],
+ darkcyan:[0,139,139],
+ darkgrey:[169,169,169],
+ darkgreen:[0,100,0],
+ darkkhaki:[189,183,107],
+ darkmagenta:[139,0,139],
+ darkolivegreen:[85,107,47],
+ darkorange:[255,140,0],
+ darkorchid:[153,50,204],
+ darkred:[139,0,0],
+ darksalmon:[233,150,122],
+ darkviolet:[148,0,211],
+ fuchsia:[255,0,255],
+ gold:[255,215,0],
+ green:[0,128,0],
+ indigo:[75,0,130],
+ khaki:[240,230,140],
+ lightblue:[173,216,230],
+ lightcyan:[224,255,255],
+ lightgreen:[144,238,144],
+ lightgrey:[211,211,211],
+ lightpink:[255,182,193],
+ lightyellow:[255,255,224],
+ lime:[0,255,0],
+ magenta:[255,0,255],
+ maroon:[128,0,0],
+ navy:[0,0,128],
+ olive:[128,128,0],
+ orange:[255,165,0],
+ pink:[255,192,203],
+ purple:[128,0,128],
+ violet:[128,0,128],
+ red:[255,0,0],
+ silver:[192,192,192],
+ white:[255,255,255],
+ yellow:[255,255,0],
+ transparent: [255,255,255]
+};
+
+/*
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
+ *
+ * Uses the built in easing capabilities added In jQuery 1.1
+ * to offer multiple easing options
+ *
+ * TERMS OF USE - jQuery Easing
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright 2008 George McGinley Smith
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
+ * or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+*/
+
+// t: current time, b: begInnIng value, c: change In value, d: duration
+$.easing.jswing = $.easing.swing;
+
+$.extend($.easing,
+{
+ def: 'easeOutQuad',
+ swing: function (x, t, b, c, d) {
+ //alert($.easing.default);
+ return $.easing[$.easing.def](x, t, b, c, d);
+ },
+ easeInQuad: function (x, t, b, c, d) {
+ return c*(t/=d)*t + b;
+ },
+ easeOutQuad: function (x, t, b, c, d) {
+ return -c *(t/=d)*(t-2) + b;
+ },
+ easeInOutQuad: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t + b;
+ return -c/2 * ((--t)*(t-2) - 1) + b;
+ },
+ easeInCubic: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t + b;
+ },
+ easeOutCubic: function (x, t, b, c, d) {
+ return c*((t=t/d-1)*t*t + 1) + b;
+ },
+ easeInOutCubic: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
+ return c/2*((t-=2)*t*t + 2) + b;
+ },
+ easeInQuart: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t*t + b;
+ },
+ easeOutQuart: function (x, t, b, c, d) {
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
+ },
+ easeInOutQuart: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
+ },
+ easeInQuint: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t*t*t + b;
+ },
+ easeOutQuint: function (x, t, b, c, d) {
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
+ },
+ easeInOutQuint: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
+ },
+ easeInSine: function (x, t, b, c, d) {
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
+ },
+ easeOutSine: function (x, t, b, c, d) {
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
+ },
+ easeInOutSine: function (x, t, b, c, d) {
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
+ },
+ easeInExpo: function (x, t, b, c, d) {
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
+ },
+ easeOutExpo: function (x, t, b, c, d) {
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
+ },
+ easeInOutExpo: function (x, t, b, c, d) {
+ if (t==0) return b;
+ if (t==d) return b+c;
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
+ },
+ easeInCirc: function (x, t, b, c, d) {
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
+ },
+ easeOutCirc: function (x, t, b, c, d) {
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
+ },
+ easeInOutCirc: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
+ },
+ easeInElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+ },
+ easeOutElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
+ },
+ easeInOutElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
+ },
+ easeInBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ return c*(t/=d)*t*((s+1)*t - s) + b;
+ },
+ easeOutBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
+ },
+ easeInOutBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
+ },
+ easeInBounce: function (x, t, b, c, d) {
+ return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b;
+ },
+ easeOutBounce: function (x, t, b, c, d) {
+ if ((t/=d) < (1/2.75)) {
+ return c*(7.5625*t*t) + b;
+ } else if (t < (2/2.75)) {
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
+ } else if (t < (2.5/2.75)) {
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
+ } else {
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
+ }
+ },
+ easeInOutBounce: function (x, t, b, c, d) {
+ if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
+ return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
+ }
+});
+
+/*
+ *
+ * TERMS OF USE - EASING EQUATIONS
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright 2001 Robert Penner
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
+ * or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+})(jQuery);
--- /dev/null
+String.prototype.phpimageeditor_add_editlink_endswith = function(str) \r
+{\r
+ return (this.match(str+"$")==str);\r
+}\r
+\r
+function phpimageeditor_add_editlink(pathToEditor, pathToPlugin, hostPath, editImageText, language)\r
+{\r
+ var mediamanagerForm = document.getElementById("mediamanager-form");\r
+ if (mediamanagerForm != null)\r
+ {\r
+ var trs = mediamanagerForm.getElementsByTagName("tr");\r
+ var modeDetailed = (trs.length > 0);\r
+ \r
+ if (modeDetailed)\r
+ {\r
+ var isTableHeader = true;\r
+ \r
+ for(var i=0;i<trs.length;i++)\r
+ {\r
+ if (isTableHeader)\r
+ {\r
+ var th = document.createElement("th");\r
+ th.appendChild(document.createTextNode(editImageText));\r
+ trs[i].appendChild(th);\r
+ }\r
+ else \r
+ {\r
+ var td = document.createElement("td");\r
+ \r
+ var imageSrcDetailed = "";\r
+ var links = trs[i].getElementsByTagName("a");\r
+ var foundDetailedImage = false;\r
+\r
+ for(var c=0;c<links.length;c++)\r
+ {\r
+ if (links[c].className == 'img-preview')\r
+ {\r
+ imageSrcDetailed = phpimageeditor_urlencode(links[c].href.replace(hostPath,'../../../')); \r
+ \r
+ if (phpimageeditor_file_is_image(imageSrcDetailed))\r
+ {\r
+ if (trs[i].innerHTML.indexOf('folderup_16.png') == -1 && trs[i].innerHTML.indexOf('folder_sm.png') == -1)\r
+ {\r
+ td.innerHTML = '<div><a style="background-position: 5px 0; background-image: url('+pathToPlugin+'images/edit.gif); background-repeat: no-repeat; padding-bottom: 4px; padding-left: 22px;" href="'+pathToEditor+imageSrcDetailed+'&language='+language+'" target="_blank">'+editImageText+'</a></div>';\r
+ foundDetailedImage = true;\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ \r
+ if (!foundDetailedImage)\r
+ td.innerHTML = " ";\r
+\r
+ trs[i].appendChild(td);\r
+ }\r
+ \r
+ isTableHeader = false; \r
+ }\r
+ }\r
+ else\r
+ {\r
+ var e = mediamanagerForm.getElementsByTagName("div");\r
+ \r
+ for(var i=0;i<e.length;i++)\r
+ {\r
+ if (e[i].className == 'imgOutline' && e[i].innerHTML.indexOf('folderup_32.png') == -1 && e[i].innerHTML.indexOf('folder.png') == -1)\r
+ {\r
+ var images = e[i].getElementsByTagName("img");\r
+ var imageSrc = "";\r
+ \r
+ if (images.length > 0)\r
+ {\r
+ imageSrc = phpimageeditor_urlencode(images[0].src.replace(hostPath,'../../../'));\r
+ \r
+ if (phpimageeditor_file_is_image(imageSrc))\r
+ e[i].innerHTML += '<a style="background-position: 5px 0; background-image: url('+pathToPlugin+'images/edit.gif); background-repeat: no-repeat; padding-bottom: 4px; padding-left: 22px; display: block;" href="'+pathToEditor+imageSrc+'&language='+language+'" target="_blank">'+editImageText+'</a>';\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ else\r
+ {\r
+ var articledivs = document.getElementsByTagName("div");\r
+ var foundManager = false;\r
+ var foundItem = false;\r
+ for(var i=0;i<articledivs.length;i++)\r
+ {\r
+ if (articledivs[i].className == 'manager')\r
+ foundManager = true;\r
+ else if (articledivs[i].className == 'item')\r
+ foundItem = true;\r
+ \r
+ if (foundManager && foundItem)\r
+ break;\r
+ } \r
+ \r
+ if (foundManager && foundItem)\r
+ {\r
+ for(var i=0;i<articledivs.length;i++)\r
+ {\r
+ if (articledivs[i].className == 'item')\r
+ {\r
+ var imagesArticle = articledivs[i].getElementsByTagName("img");\r
+ var imageSrcArticle = "";\r
+ \r
+ if (imagesArticle.length > 0 && imagesArticle[0].src.indexOf('folder.gif') == -1 && phpimageeditor_file_is_image(imagesArticle[0].src))\r
+ {\r
+ imageSrcArticle = phpimageeditor_urlencode(imagesArticle[0].src.replace(hostPath,'../../../'));\r
+ articledivs[i].innerHTML = '<a style="position: absolute; top: 0; left: 0; background-color: #eeeeee; display: block; line-height: 15px; height: auto;" href="'+pathToEditor+imageSrcArticle+'&language='+language+'" target="_blank">'+editImageText+'</a>' + articledivs[i].innerHTML;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
+function phpimageeditor_urlencode(str) \r
+{\r
+ // http://kevin.vanzonneveld.net\r
+ // + original by: Philip Peterson\r
+ // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\r
+ // + input by: AJ\r
+ // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\r
+ // % note: info on what encoding functions to use from: http://xkr.us/articles/javascript/encode-compare/\r
+ // * example 1: urlencode('Kevin van Zonneveld!');\r
+ // * returns 1: 'Kevin+van+Zonneveld%21'\r
+ // * example 2: urlencode('http://kevin.vanzonneveld.net/');\r
+ // * returns 2: 'http%3A%2F%2Fkevin.vanzonneveld.net%2F'\r
+ // * example 3: urlencode('http://www.google.nl/search?q=php.js&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a');\r
+ // * returns 3: 'http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3Dphp.js%26ie%3Dutf-8%26oe%3Dutf-8%26aq%3Dt%26rls%3Dcom.ubuntu%3Aen-US%3Aunofficial%26client%3Dfirefox-a'\r
+ \r
+ var histogram = {}, histogram_r = {}, code = 0, tmp_arr = [];\r
+ var ret = str.toString();\r
+ \r
+ var replacer = function(search, replace, str) {\r
+ var tmp_arr = [];\r
+ tmp_arr = str.split(search);\r
+ return tmp_arr.join(replace);\r
+ };\r
+ \r
+ // The histogram is identical to the one in urldecode.\r
+ histogram['!'] = '%21';\r
+ histogram['%20'] = '+';\r
+ \r
+ // Begin with encodeURIComponent, which most resembles PHP's encoding functions\r
+ ret = encodeURIComponent(ret);\r
+ \r
+ for (search in histogram) {\r
+ replace = histogram[search];\r
+ ret = replacer(search, replace, ret) // Custom replace. No regexing\r
+ }\r
+ \r
+ // Uppercase for full PHP compatibility\r
+ return ret.replace('/(\%([a-z0-9]{2}))/g', function(full, m1, m2) {\r
+ return "%"+m2.toUpperCase();\r
+ });\r
+ \r
+ return ret;\r
+}\r
+\r
+function phpimageeditor_file_is_image(filePath)\r
+{\r
+ filePath = filePath.toLowerCase();\r
+ return (filePath.indexOf('com_media') == -1 && (filePath.phpimageeditor_add_editlink_endswith("jpg") || filePath.phpimageeditor_add_editlink_endswith("gif") || filePath.phpimageeditor_add_editlink_endswith("png")));\r
+}
\ No newline at end of file
--- /dev/null
+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ * Copyright 2009, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
\ No newline at end of file
--- /dev/null
+/**
+ * jquery.Jcrop.js v0.9.8
+ * jQuery Image Cropping Plugin
+ * @author Kelly Hallman <khallman@gmail.com>
+ * Copyright (c) 2008-2009 Kelly Hallman - released under MIT License {{{
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+
+ * }}}
+ */
+
+(function($) {
+
+$.Jcrop = function(obj,opt)
+{
+ // Initialization {{{
+
+ // Sanitize some options {{{
+ var obj = obj, opt = opt;
+
+ if (typeof(obj) !== 'object') obj = $(obj)[0];
+ if (typeof(opt) !== 'object') opt = { };
+
+ // Some on-the-fly fixes for MSIE...sigh
+ if (!('trackDocument' in opt))
+ {
+ opt.trackDocument = $.browser.msie ? false : true;
+ if ($.browser.msie && $.browser.version.split('.')[0] == '8')
+ opt.trackDocument = true;
+ }
+
+ if (!('keySupport' in opt))
+ opt.keySupport = $.browser.msie ? false : true;
+
+ // }}}
+ // Extend the default options {{{
+ var defaults = {
+
+ // Basic Settings
+ trackDocument: false,
+ baseClass: 'jcrop',
+ addClass: null,
+
+ // Styling Options
+ bgColor: 'black',
+ bgOpacity: .6,
+ borderOpacity: .4,
+ handleOpacity: .5,
+
+ handlePad: 5,
+ handleSize: 9,
+ handleOffset: 5,
+ edgeMargin: 14,
+
+ aspectRatio: 0,
+ keySupport: true,
+ cornerHandles: true,
+ sideHandles: true,
+ drawBorders: true,
+ dragEdges: true,
+
+ boxWidth: 0,
+ boxHeight: 0,
+
+ boundary: 8,
+ animationDelay: 20,
+ swingSpeed: 3,
+
+ allowSelect: true,
+ allowMove: true,
+ allowResize: true,
+
+ minSelect: [ 0, 0 ],
+ maxSize: [ 0, 0 ],
+ minSize: [ 0, 0 ],
+
+ // Callbacks / Event Handlers
+ onChange: function() { },
+ onSelect: function() { }
+
+ };
+ var options = defaults;
+ setOptions(opt);
+
+ // }}}
+ // Initialize some jQuery objects {{{
+
+ var $origimg = $(obj);
+ var $img = $origimg.clone().removeAttr('id').css({ position: 'absolute' });
+
+ $img.width($origimg.width());
+ $img.height($origimg.height());
+ $origimg.after($img).hide();
+
+ presize($img,options.boxWidth,options.boxHeight);
+
+ var boundx = $img.width(),
+ boundy = $img.height(),
+
+ $div = $('<div />')
+ .width(boundx).height(boundy)
+ .addClass(cssClass('holder'))
+ .css({
+ position: 'relative',
+ backgroundColor: options.bgColor
+ }).insertAfter($origimg).append($img);
+ ;
+
+ if (options.addClass) $div.addClass(options.addClass);
+ //$img.wrap($div);
+
+ var $img2 = $('<img />')/*{{{*/
+ .attr('src',$img.attr('src'))
+ .css('position','absolute')
+ .width(boundx).height(boundy)
+ ;/*}}}*/
+ var $img_holder = $('<div />')/*{{{*/
+ .width(pct(100)).height(pct(100))
+ .css({
+ zIndex: 310,
+ position: 'absolute',
+ overflow: 'hidden'
+ })
+ .append($img2)
+ ;/*}}}*/
+ var $hdl_holder = $('<div />')/*{{{*/
+ .width(pct(100)).height(pct(100))
+ .css('zIndex',320);
+ /*}}}*/
+ var $sel = $('<div />')/*{{{*/
+ .css({
+ position: 'absolute',
+ zIndex: 300
+ })
+ .insertBefore($img)
+ .append($img_holder,$hdl_holder)
+ ;/*}}}*/
+
+ var bound = options.boundary;
+ var $trk = newTracker().width(boundx+(bound*2)).height(boundy+(bound*2))
+ .css({ position: 'absolute', top: px(-bound), left: px(-bound), zIndex: 290 })
+ .mousedown(newSelection);
+
+ /* }}} */
+ // Set more variables {{{
+
+ var xlimit, ylimit, xmin, ymin;
+ var xscale, yscale, enabled = true;
+ var docOffset = getPos($img),
+ // Internal states
+ btndown, lastcurs, dimmed, animating,
+ shift_down;
+
+ // }}}
+
+
+ // }}}
+ // Internal Modules {{{
+
+ var Coords = function()/*{{{*/
+ {
+ var x1 = 0, y1 = 0, x2 = 0, y2 = 0, ox, oy;
+
+ function setPressed(pos)/*{{{*/
+ {
+ var pos = rebound(pos);
+ x2 = x1 = pos[0];
+ y2 = y1 = pos[1];
+ };
+ /*}}}*/
+ function setCurrent(pos)/*{{{*/
+ {
+ var pos = rebound(pos);
+ ox = pos[0] - x2;
+ oy = pos[1] - y2;
+ x2 = pos[0];
+ y2 = pos[1];
+ };
+ /*}}}*/
+ function getOffset()/*{{{*/
+ {
+ return [ ox, oy ];
+ };
+ /*}}}*/
+ function moveOffset(offset)/*{{{*/
+ {
+ var ox = offset[0], oy = offset[1];
+
+ if (0 > x1 + ox) ox -= ox + x1;
+ if (0 > y1 + oy) oy -= oy + y1;
+
+ if (boundy < y2 + oy) oy += boundy - (y2 + oy);
+ if (boundx < x2 + ox) ox += boundx - (x2 + ox);
+
+ x1 += ox;
+ x2 += ox;
+ y1 += oy;
+ y2 += oy;
+ };
+ /*}}}*/
+ function getCorner(ord)/*{{{*/
+ {
+ var c = getFixed();
+ switch(ord)
+ {
+ case 'ne': return [ c.x2, c.y ];
+ case 'nw': return [ c.x, c.y ];
+ case 'se': return [ c.x2, c.y2 ];
+ case 'sw': return [ c.x, c.y2 ];
+ }
+ };
+ /*}}}*/
+ function getFixed()/*{{{*/
+ {
+ if (!options.aspectRatio) return getRect();
+ // This function could use some optimization I think...
+ var aspect = options.aspectRatio,
+ min_x = options.minSize[0]/xscale,
+ min_y = options.minSize[1]/yscale,
+ max_x = options.maxSize[0]/xscale,
+ max_y = options.maxSize[1]/yscale,
+ rw = x2 - x1,
+ rh = y2 - y1,
+ rwa = Math.abs(rw),
+ rha = Math.abs(rh),
+ real_ratio = rwa / rha,
+ xx, yy
+ ;
+ if (max_x == 0) { max_x = boundx * 10 }
+ if (max_y == 0) { max_y = boundy * 10 }
+ if (real_ratio < aspect)
+ {
+ yy = y2;
+ w = rha * aspect;
+ xx = rw < 0 ? x1 - w : w + x1;
+
+ if (xx < 0)
+ {
+ xx = 0;
+ h = Math.abs((xx - x1) / aspect);
+ yy = rh < 0 ? y1 - h: h + y1;
+ }
+ else if (xx > boundx)
+ {
+ xx = boundx;
+ h = Math.abs((xx - x1) / aspect);
+ yy = rh < 0 ? y1 - h : h + y1;
+ }
+ }
+ else
+ {
+ xx = x2;
+ h = rwa / aspect;
+ yy = rh < 0 ? y1 - h : y1 + h;
+ if (yy < 0)
+ {
+ yy = 0;
+ w = Math.abs((yy - y1) * aspect);
+ xx = rw < 0 ? x1 - w : w + x1;
+ }
+ else if (yy > boundy)
+ {
+ yy = boundy;
+ w = Math.abs(yy - y1) * aspect;
+ xx = rw < 0 ? x1 - w : w + x1;
+ }
+ }
+
+ // Magic %-)
+ if(xx > x1) { // right side
+ if(xx - x1 < min_x) {
+ xx = x1 + min_x;
+ } else if (xx - x1 > max_x) {
+ xx = x1 + max_x;
+ }
+ if(yy > y1) {
+ yy = y1 + (xx - x1)/aspect;
+ } else {
+ yy = y1 - (xx - x1)/aspect;
+ }
+ } else if (xx < x1) { // left side
+ if(x1 - xx < min_x) {
+ xx = x1 - min_x
+ } else if (x1 - xx > max_x) {
+ xx = x1 - max_x;
+ }
+ if(yy > y1) {
+ yy = y1 + (x1 - xx)/aspect;
+ } else {
+ yy = y1 - (x1 - xx)/aspect;
+ }
+ }
+
+ if(xx < 0) {
+ x1 -= xx;
+ xx = 0;
+ } else if (xx > boundx) {
+ x1 -= xx - boundx;
+ xx = boundx;
+ }
+
+ if(yy < 0) {
+ y1 -= yy;
+ yy = 0;
+ } else if (yy > boundy) {
+ y1 -= yy - boundy;
+ yy = boundy;
+ }
+
+ return last = makeObj(flipCoords(x1,y1,xx,yy));
+ };
+ /*}}}*/
+ function rebound(p)/*{{{*/
+ {
+ if (p[0] < 0) p[0] = 0;
+ if (p[1] < 0) p[1] = 0;
+
+ if (p[0] > boundx) p[0] = boundx;
+ if (p[1] > boundy) p[1] = boundy;
+
+ return [ p[0], p[1] ];
+ };
+ /*}}}*/
+ function flipCoords(x1,y1,x2,y2)/*{{{*/
+ {
+ var xa = x1, xb = x2, ya = y1, yb = y2;
+ if (x2 < x1)
+ {
+ xa = x2;
+ xb = x1;
+ }
+ if (y2 < y1)
+ {
+ ya = y2;
+ yb = y1;
+ }
+ return [ Math.round(xa), Math.round(ya), Math.round(xb), Math.round(yb) ];
+ };
+ /*}}}*/
+ function getRect()/*{{{*/
+ {
+ var xsize = x2 - x1;
+ var ysize = y2 - y1;
+
+ if (xlimit && (Math.abs(xsize) > xlimit))
+ x2 = (xsize > 0) ? (x1 + xlimit) : (x1 - xlimit);
+ if (ylimit && (Math.abs(ysize) > ylimit))
+ y2 = (ysize > 0) ? (y1 + ylimit) : (y1 - ylimit);
+
+ if (ymin && (Math.abs(ysize) < ymin))
+ y2 = (ysize > 0) ? (y1 + ymin) : (y1 - ymin);
+ if (xmin && (Math.abs(xsize) < xmin))
+ x2 = (xsize > 0) ? (x1 + xmin) : (x1 - xmin);
+
+ if (x1 < 0) { x2 -= x1; x1 -= x1; }
+ if (y1 < 0) { y2 -= y1; y1 -= y1; }
+ if (x2 < 0) { x1 -= x2; x2 -= x2; }
+ if (y2 < 0) { y1 -= y2; y2 -= y2; }
+ if (x2 > boundx) { var delta = x2 - boundx; x1 -= delta; x2 -= delta; }
+ if (y2 > boundy) { var delta = y2 - boundy; y1 -= delta; y2 -= delta; }
+ if (x1 > boundx) { var delta = x1 - boundy; y2 -= delta; y1 -= delta; }
+ if (y1 > boundy) { var delta = y1 - boundy; y2 -= delta; y1 -= delta; }
+
+ return makeObj(flipCoords(x1,y1,x2,y2));
+ };
+ /*}}}*/
+ function makeObj(a)/*{{{*/
+ {
+ return { x: a[0], y: a[1], x2: a[2], y2: a[3],
+ w: a[2] - a[0], h: a[3] - a[1] };
+ };
+ /*}}}*/
+
+ return {
+ flipCoords: flipCoords,
+ setPressed: setPressed,
+ setCurrent: setCurrent,
+ getOffset: getOffset,
+ moveOffset: moveOffset,
+ getCorner: getCorner,
+ getFixed: getFixed
+ };
+ }();
+
+ /*}}}*/
+ var Selection = function()/*{{{*/
+ {
+ var start, end, dragmode, awake, hdep = 370;
+ var borders = { };
+ var handle = { };
+ var seehandles = false;
+ var hhs = options.handleOffset;
+
+ /* Insert draggable elements {{{*/
+
+ // Insert border divs for outline
+ if (options.drawBorders) {
+ borders = {
+ top: insertBorder('hline')
+ .css('top',$.browser.msie?px(-1):px(0)),
+ bottom: insertBorder('hline'),
+ left: insertBorder('vline'),
+ right: insertBorder('vline')
+ };
+ }
+
+ // Insert handles on edges
+ if (options.dragEdges) {
+ handle.t = insertDragbar('n');
+ handle.b = insertDragbar('s');
+ handle.r = insertDragbar('e');
+ handle.l = insertDragbar('w');
+ }
+
+ // Insert side handles
+ options.sideHandles &&
+ createHandles(['n','s','e','w']);
+
+ // Insert corner handles
+ options.cornerHandles &&
+ createHandles(['sw','nw','ne','se']);
+
+ /*}}}*/
+ // Private Methods
+ function insertBorder(type)/*{{{*/
+ {
+ var jq = $('<div />')
+ .css({position: 'absolute', opacity: options.borderOpacity })
+ .addClass(cssClass(type));
+ $img_holder.append(jq);
+ return jq;
+ };
+ /*}}}*/
+ function dragDiv(ord,zi)/*{{{*/
+ {
+ var jq = $('<div />')
+ .mousedown(createDragger(ord))
+ .css({
+ cursor: ord+'-resize',
+ position: 'absolute',
+ zIndex: zi
+ })
+ ;
+ $hdl_holder.append(jq);
+ return jq;
+ };
+ /*}}}*/
+ function insertHandle(ord)/*{{{*/
+ {
+ return dragDiv(ord,hdep++)
+ .css({ top: px(-hhs+1), left: px(-hhs+1), opacity: options.handleOpacity })
+ .addClass(cssClass('handle'));
+ };
+ /*}}}*/
+ function insertDragbar(ord)/*{{{*/
+ {
+ var s = options.handleSize,
+ o = hhs,
+ h = s, w = s,
+ t = o, l = o;
+
+ switch(ord)
+ {
+ case 'n': case 's': w = pct(100); break;
+ case 'e': case 'w': h = pct(100); break;
+ }
+
+ return dragDiv(ord,hdep++).width(w).height(h)
+ .css({ top: px(-t+1), left: px(-l+1)});
+ };
+ /*}}}*/
+ function createHandles(li)/*{{{*/
+ {
+ for(i in li) handle[li[i]] = insertHandle(li[i]);
+ };
+ /*}}}*/
+ function moveHandles(c)/*{{{*/
+ {
+ var midvert = Math.round((c.h / 2) - hhs),
+ midhoriz = Math.round((c.w / 2) - hhs),
+ north = west = -hhs+1,
+ east = c.w - hhs,
+ south = c.h - hhs,
+ x, y;
+
+ 'e' in handle &&
+ handle.e.css({ top: px(midvert), left: px(east) }) &&
+ handle.w.css({ top: px(midvert) }) &&
+ handle.s.css({ top: px(south), left: px(midhoriz) }) &&
+ handle.n.css({ left: px(midhoriz) });
+
+ 'ne' in handle &&
+ handle.ne.css({ left: px(east) }) &&
+ handle.se.css({ top: px(south), left: px(east) }) &&
+ handle.sw.css({ top: px(south) });
+
+ 'b' in handle &&
+ handle.b.css({ top: px(south) }) &&
+ handle.r.css({ left: px(east) });
+ };
+ /*}}}*/
+ function moveto(x,y)/*{{{*/
+ {
+ $img2.css({ top: px(-y), left: px(-x) });
+ $sel.css({ top: px(y), left: px(x) });
+ };
+ /*}}}*/
+ function resize(w,h)/*{{{*/
+ {
+ $sel.width(w).height(h);
+ };
+ /*}}}*/
+ function refresh()/*{{{*/
+ {
+ var c = Coords.getFixed();
+
+ Coords.setPressed([c.x,c.y]);
+ Coords.setCurrent([c.x2,c.y2]);
+
+ updateVisible();
+ };
+ /*}}}*/
+
+ // Internal Methods
+ function updateVisible()/*{{{*/
+ { if (awake) return update(); };
+ /*}}}*/
+ function update()/*{{{*/
+ {
+ var c = Coords.getFixed();
+
+ resize(c.w,c.h);
+ moveto(c.x,c.y);
+
+ options.drawBorders &&
+ borders['right'].css({ left: px(c.w-1) }) &&
+ borders['bottom'].css({ top: px(c.h-1) });
+
+ seehandles && moveHandles(c);
+ awake || show();
+
+ options.onChange(unscale(c));
+ };
+ /*}}}*/
+ function show()/*{{{*/
+ {
+ $sel.show();
+ $img.css('opacity',options.bgOpacity);
+ awake = true;
+ };
+ /*}}}*/
+ function release()/*{{{*/
+ {
+ disableHandles();
+ $sel.hide();
+ $img.css('opacity',1);
+ awake = false;
+ };
+ /*}}}*/
+ function showHandles()//{{{
+ {
+ if (seehandles)
+ {
+ moveHandles(Coords.getFixed());
+ $hdl_holder.show();
+ }
+ };
+ //}}}
+ function enableHandles()/*{{{*/
+ {
+ seehandles = true;
+ if (options.allowResize)
+ {
+ moveHandles(Coords.getFixed());
+ $hdl_holder.show();
+ return true;
+ }
+ };
+ /*}}}*/
+ function disableHandles()/*{{{*/
+ {
+ seehandles = false;
+ $hdl_holder.hide();
+ };
+ /*}}}*/
+ function animMode(v)/*{{{*/
+ {
+ (animating = v) ? disableHandles(): enableHandles();
+ };
+ /*}}}*/
+ function done()/*{{{*/
+ {
+ animMode(false);
+ refresh();
+ };
+ /*}}}*/
+
+ var $track = newTracker().mousedown(createDragger('move'))
+ .css({ cursor: 'move', position: 'absolute', zIndex: 360 })
+
+ $img_holder.append($track);
+ disableHandles();
+
+ return {
+ updateVisible: updateVisible,
+ update: update,
+ release: release,
+ refresh: refresh,
+ setCursor: function (cursor) { $track.css('cursor',cursor); },
+ enableHandles: enableHandles,
+ enableOnly: function() { seehandles = true; },
+ showHandles: showHandles,
+ disableHandles: disableHandles,
+ animMode: animMode,
+ done: done
+ };
+ }();
+ /*}}}*/
+ var Tracker = function()/*{{{*/
+ {
+ var onMove = function() { },
+ onDone = function() { },
+ trackDoc = options.trackDocument;
+
+ if (!trackDoc)
+ {
+ $trk
+ .mousemove(trackMove)
+ .mouseup(trackUp)
+ .mouseout(trackUp)
+ ;
+ }
+
+ function toFront()/*{{{*/
+ {
+ $trk.css({zIndex:450});
+ if (trackDoc)
+ {
+ $(document)
+ .mousemove(trackMove)
+ .mouseup(trackUp)
+ ;
+ }
+ }
+ /*}}}*/
+ function toBack()/*{{{*/
+ {
+ $trk.css({zIndex:290});
+ if (trackDoc)
+ {
+ $(document)
+ .unbind('mousemove',trackMove)
+ .unbind('mouseup',trackUp)
+ ;
+ }
+ }
+ /*}}}*/
+ function trackMove(e)/*{{{*/
+ {
+ onMove(mouseAbs(e));
+ };
+ /*}}}*/
+ function trackUp(e)/*{{{*/
+ {
+ e.preventDefault();
+ e.stopPropagation();
+
+ if (btndown)
+ {
+ btndown = false;
+
+ onDone(mouseAbs(e));
+ options.onSelect(unscale(Coords.getFixed()));
+ toBack();
+ onMove = function() { };
+ onDone = function() { };
+ }
+
+ return false;
+ };
+ /*}}}*/
+
+ function activateHandlers(move,done)/* {{{ */
+ {
+ btndown = true;
+ onMove = move;
+ onDone = done;
+ toFront();
+ return false;
+ };
+ /* }}} */
+
+ function setCursor(t) { $trk.css('cursor',t); };
+
+ $img.before($trk);
+ return {
+ activateHandlers: activateHandlers,
+ setCursor: setCursor
+ };
+ }();
+ /*}}}*/
+ var KeyManager = function()/*{{{*/
+ {
+ var $keymgr = $('<input type="radio" />')
+ .css({ position: 'absolute', left: '-30px' })
+ .keypress(parseKey)
+ .blur(onBlur),
+
+ $keywrap = $('<div />')
+ .css({
+ position: 'absolute',
+ overflow: 'hidden'
+ })
+ .append($keymgr)
+ ;
+
+ function watchKeys()/*{{{*/
+ {
+ if (options.keySupport)
+ {
+ $keymgr.show();
+ $keymgr.focus();
+ }
+ };
+ /*}}}*/
+ function onBlur(e)/*{{{*/
+ {
+ $keymgr.hide();
+ };
+ /*}}}*/
+ function doNudge(e,x,y)/*{{{*/
+ {
+ if (options.allowMove) {
+ Coords.moveOffset([x,y]);
+ Selection.updateVisible();
+ };
+ e.preventDefault();
+ e.stopPropagation();
+ };
+ /*}}}*/
+ function parseKey(e)/*{{{*/
+ {
+ if (e.ctrlKey) return true;
+ shift_down = e.shiftKey ? true : false;
+ var nudge = shift_down ? 10 : 1;
+ switch(e.keyCode)
+ {
+ case 37: doNudge(e,-nudge,0); break;
+ case 39: doNudge(e,nudge,0); break;
+ case 38: doNudge(e,0,-nudge); break;
+ case 40: doNudge(e,0,nudge); break;
+
+ case 27: Selection.release(); break;
+
+ case 9: return true;
+ }
+
+ return nothing(e);
+ };
+ /*}}}*/
+
+ if (options.keySupport) $keywrap.insertBefore($img);
+ return {
+ watchKeys: watchKeys
+ };
+ }();
+ /*}}}*/
+
+ // }}}
+ // Internal Methods {{{
+
+ function px(n) { return '' + parseInt(n) + 'px'; };
+ function pct(n) { return '' + parseInt(n) + '%'; };
+ function cssClass(cl) { return options.baseClass + '-' + cl; };
+ function getPos(obj)/*{{{*/
+ {
+ // Updated in v0.9.4 to use built-in dimensions plugin
+ var pos = $(obj).offset();
+ return [ pos.left, pos.top ];
+ };
+ /*}}}*/
+ function mouseAbs(e)/*{{{*/
+ {
+ return [ (e.pageX - docOffset[0]), (e.pageY - docOffset[1]) ];
+ };
+ /*}}}*/
+ function myCursor(type)/*{{{*/
+ {
+ if (type != lastcurs)
+ {
+ Tracker.setCursor(type);
+ //Handles.xsetCursor(type);
+ lastcurs = type;
+ }
+ };
+ /*}}}*/
+ function startDragMode(mode,pos)/*{{{*/
+ {
+ docOffset = getPos($img);
+ Tracker.setCursor(mode=='move'?mode:mode+'-resize');
+
+ if (mode == 'move')
+ return Tracker.activateHandlers(createMover(pos), doneSelect);
+
+ var fc = Coords.getFixed();
+ var opp = oppLockCorner(mode);
+ var opc = Coords.getCorner(oppLockCorner(opp));
+
+ Coords.setPressed(Coords.getCorner(opp));
+ Coords.setCurrent(opc);
+
+ Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect);
+ };
+ /*}}}*/
+ function dragmodeHandler(mode,f)/*{{{*/
+ {
+ return function(pos) {
+ if (!options.aspectRatio) switch(mode)
+ {
+ case 'e': pos[1] = f.y2; break;
+ case 'w': pos[1] = f.y2; break;
+ case 'n': pos[0] = f.x2; break;
+ case 's': pos[0] = f.x2; break;
+ }
+ else switch(mode)
+ {
+ case 'e': pos[1] = f.y+1; break;
+ case 'w': pos[1] = f.y+1; break;
+ case 'n': pos[0] = f.x+1; break;
+ case 's': pos[0] = f.x+1; break;
+ }
+ Coords.setCurrent(pos);
+ Selection.update();
+ };
+ };
+ /*}}}*/
+ function createMover(pos)/*{{{*/
+ {
+ var lloc = pos;
+ KeyManager.watchKeys();
+
+ return function(pos)
+ {
+ Coords.moveOffset([pos[0] - lloc[0], pos[1] - lloc[1]]);
+ lloc = pos;
+
+ Selection.update();
+ };
+ };
+ /*}}}*/
+ function oppLockCorner(ord)/*{{{*/
+ {
+ switch(ord)
+ {
+ case 'n': return 'sw';
+ case 's': return 'nw';
+ case 'e': return 'nw';
+ case 'w': return 'ne';
+ case 'ne': return 'sw';
+ case 'nw': return 'se';
+ case 'se': return 'nw';
+ case 'sw': return 'ne';
+ };
+ };
+ /*}}}*/
+ function createDragger(ord)/*{{{*/
+ {
+ return function(e) {
+ if (options.disabled) return false;
+ if ((ord == 'move') && !options.allowMove) return false;
+ btndown = true;
+ startDragMode(ord,mouseAbs(e));
+ e.stopPropagation();
+ e.preventDefault();
+ return false;
+ };
+ };
+ /*}}}*/
+ function presize($obj,w,h)/*{{{*/
+ {
+ var nw = $obj.width(), nh = $obj.height();
+ if ((nw > w) && w > 0)
+ {
+ nw = w;
+ nh = (w/$obj.width()) * $obj.height();
+ }
+ if ((nh > h) && h > 0)
+ {
+ nh = h;
+ nw = (h/$obj.height()) * $obj.width();
+ }
+ xscale = $obj.width() / nw;
+ yscale = $obj.height() / nh;
+ $obj.width(nw).height(nh);
+ };
+ /*}}}*/
+ function unscale(c)/*{{{*/
+ {
+ return {
+ x: parseInt(c.x * xscale), y: parseInt(c.y * yscale),
+ x2: parseInt(c.x2 * xscale), y2: parseInt(c.y2 * yscale),
+ w: parseInt(c.w * xscale), h: parseInt(c.h * yscale)
+ };
+ };
+ /*}}}*/
+ function doneSelect(pos)/*{{{*/
+ {
+ var c = Coords.getFixed();
+ if (c.w > options.minSelect[0] && c.h > options.minSelect[1])
+ {
+ Selection.enableHandles();
+ Selection.done();
+ }
+ else
+ {
+ Selection.release();
+ }
+ Tracker.setCursor( options.allowSelect?'crosshair':'default' );
+ };
+ /*}}}*/
+ function newSelection(e)/*{{{*/
+ {
+ if (options.disabled) return false;
+ if (!options.allowSelect) return false;
+ btndown = true;
+ docOffset = getPos($img);
+ Selection.disableHandles();
+ myCursor('crosshair');
+ var pos = mouseAbs(e);
+ Coords.setPressed(pos);
+ Tracker.activateHandlers(selectDrag,doneSelect);
+ KeyManager.watchKeys();
+ Selection.update();
+
+ e.stopPropagation();
+ e.preventDefault();
+ return false;
+ };
+ /*}}}*/
+ function selectDrag(pos)/*{{{*/
+ {
+ Coords.setCurrent(pos);
+ Selection.update();
+ };
+ /*}}}*/
+ function newTracker()
+ {
+ var trk = $('<div></div>').addClass(cssClass('tracker'));
+ $.browser.msie && trk.css({ opacity: 0, backgroundColor: 'white' });
+ return trk;
+ };
+
+ // }}}
+ // API methods {{{
+
+ function animateTo(a)/*{{{*/
+ {
+ var x1 = a[0] / xscale,
+ y1 = a[1] / yscale,
+ x2 = a[2] / xscale,
+ y2 = a[3] / yscale;
+
+ if (animating) return;
+
+ var animto = Coords.flipCoords(x1,y1,x2,y2);
+ var c = Coords.getFixed();
+ var animat = initcr = [ c.x, c.y, c.x2, c.y2 ];
+ var interv = options.animationDelay;
+
+ var x = animat[0];
+ var y = animat[1];
+ var x2 = animat[2];
+ var y2 = animat[3];
+ var ix1 = animto[0] - initcr[0];
+ var iy1 = animto[1] - initcr[1];
+ var ix2 = animto[2] - initcr[2];
+ var iy2 = animto[3] - initcr[3];
+ var pcent = 0;
+ var velocity = options.swingSpeed;
+
+ Selection.animMode(true);
+
+ var animator = function()
+ {
+ return function()
+ {
+ pcent += (100 - pcent) / velocity;
+
+ animat[0] = x + ((pcent / 100) * ix1);
+ animat[1] = y + ((pcent / 100) * iy1);
+ animat[2] = x2 + ((pcent / 100) * ix2);
+ animat[3] = y2 + ((pcent / 100) * iy2);
+
+ if (pcent < 100) animateStart();
+ else Selection.done();
+
+ if (pcent >= 99.8) pcent = 100;
+
+ setSelectRaw(animat);
+ };
+ }();
+
+ function animateStart()
+ { window.setTimeout(animator,interv); };
+
+ animateStart();
+ };
+ /*}}}*/
+ function setSelect(rect)//{{{
+ {
+ setSelectRaw([rect[0]/xscale,rect[1]/yscale,rect[2]/xscale,rect[3]/yscale]);
+ };
+ //}}}
+ function setSelectRaw(l) /*{{{*/
+ {
+ Coords.setPressed([l[0],l[1]]);
+ Coords.setCurrent([l[2],l[3]]);
+ Selection.update();
+ };
+ /*}}}*/
+ function setOptions(opt)/*{{{*/
+ {
+ if (typeof(opt) != 'object') opt = { };
+ options = $.extend(options,opt);
+
+ if (typeof(options.onChange)!=='function')
+ options.onChange = function() { };
+
+ if (typeof(options.onSelect)!=='function')
+ options.onSelect = function() { };
+
+ };
+ /*}}}*/
+ function tellSelect()/*{{{*/
+ {
+ return unscale(Coords.getFixed());
+ };
+ /*}}}*/
+ function tellScaled()/*{{{*/
+ {
+ return Coords.getFixed();
+ };
+ /*}}}*/
+ function setOptionsNew(opt)/*{{{*/
+ {
+ setOptions(opt);
+ interfaceUpdate();
+ };
+ /*}}}*/
+ function disableCrop()//{{{
+ {
+ options.disabled = true;
+ Selection.disableHandles();
+ Selection.setCursor('default');
+ Tracker.setCursor('default');
+ };
+ //}}}
+ function enableCrop()//{{{
+ {
+ options.disabled = false;
+ interfaceUpdate();
+ };
+ //}}}
+ function cancelCrop()//{{{
+ {
+ Selection.done();
+ Tracker.activateHandlers(null,null);
+ };
+ //}}}
+ function destroy()//{{{
+ {
+ $div.remove();
+ $origimg.show();
+ };
+ //}}}
+
+ function interfaceUpdate(alt)//{{{
+ // This method tweaks the interface based on options object.
+ // Called when options are changed and at end of initialization.
+ {
+ options.allowResize ?
+ alt?Selection.enableOnly():Selection.enableHandles():
+ Selection.disableHandles();
+
+ Tracker.setCursor( options.allowSelect? 'crosshair': 'default' );
+ Selection.setCursor( options.allowMove? 'move': 'default' );
+
+ $div.css('backgroundColor',options.bgColor);
+
+ if ('setSelect' in options) {
+ setSelect(opt.setSelect);
+ Selection.done();
+ delete(options.setSelect);
+ }
+
+ if ('trueSize' in options) {
+ xscale = options.trueSize[0] / boundx;
+ yscale = options.trueSize[1] / boundy;
+ }
+
+ xlimit = options.maxSize[0] || 0;
+ ylimit = options.maxSize[1] || 0;
+ xmin = options.minSize[0] || 0;
+ ymin = options.minSize[1] || 0;
+
+ if ('outerImage' in options)
+ {
+ $img.attr('src',options.outerImage);
+ delete(options.outerImage);
+ }
+
+ Selection.refresh();
+ };
+ //}}}
+
+ // }}}
+
+ $hdl_holder.hide();
+ interfaceUpdate(true);
+
+ var api = {
+ animateTo: animateTo,
+ setSelect: setSelect,
+ setOptions: setOptionsNew,
+ tellSelect: tellSelect,
+ tellScaled: tellScaled,
+
+ disable: disableCrop,
+ enable: enableCrop,
+ cancel: cancelCrop,
+
+ focus: KeyManager.watchKeys,
+
+ getBounds: function() { return [ boundx * xscale, boundy * yscale ]; },
+ getWidgetSize: function() { return [ boundx, boundy ]; },
+
+ release: Selection.release,
+ destroy: destroy
+
+ };
+
+ $origimg.data('Jcrop',api);
+ return api;
+};
+
+$.fn.Jcrop = function(options)/*{{{*/
+{
+ function attachWhenDone(from)/*{{{*/
+ {
+ var loadsrc = options.useImg || from.src;
+ var img = new Image();
+ img.onload = function() { $.Jcrop(from,options); };
+ img.src = loadsrc;
+ };
+ /*}}}*/
+ if (typeof(options) !== 'object') options = { };
+
+ // Iterate over each object, attach Jcrop
+ this.each(function()
+ {
+ // If we've already attached to this object
+ if ($(this).data('Jcrop'))
+ {
+ // The API can be requested this way (undocumented)
+ if (options == 'api') return $(this).data('Jcrop');
+ // Otherwise, we just reset the options...
+ else $(this).data('Jcrop').setOptions(options);
+ }
+ // If we haven't been attached, preload and attach
+ else attachWhenDone(this);
+ });
+
+ // Return "this" so we're chainable a la jQuery plugin-style!
+ return this;
+};
+/*}}}*/
+
+})(jQuery);
--- /dev/null
+/*\r
+ *\r
+ * Copyright (c) 2006/2007 Sam Collett (http://www.texotela.co.uk)\r
+ * Licensed under the MIT License:\r
+ * http://www.opensource.org/licenses/mit-license.php\r
+ * \r
+ * Version 1.0
+ * Demo: http://www.texotela.co.uk/code/jquery/numeric/
+ *
+ * $LastChangedDate: 2007-05-29 11:31:36 +0100 (Tue, 29 May 2007) $
+ * $Rev: 2005 $\r
+ */\r
+ \r
+/*\r
+ * Allows only valid characters to be entered into input boxes.\r
+ * Note: does not validate that the final text is a valid number\r
+ * (that could be done by another script, or server-side)\r
+ *\r
+ * @name numeric\r
+ * @param decimal Decimal separator (e.g. '.' or ',' - default is '.')\r
+ * @param callback A function that runs if the number is not valid (fires onblur)\r
+ * @author Sam Collett (http://www.texotela.co.uk)\r
+ * @example $(".numeric").numeric();\r
+ * @example $(".numeric").numeric(",");\r
+ * @example $(".numeric").numeric(null, callback);\r
+ *\r
+ */\r
+jQuery.fn.numeric = function(decimal, callback)\r
+{\r
+ decimal = decimal || ".";\r
+ callback = typeof callback == "function" ? callback : function(){};\r
+ this.keypress(\r
+ function(e)\r
+ {\r
+ var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;\r
+ // allow enter/return key (only when in an input box)\r
+ if(key == 13 && this.nodeName.toLowerCase() == "input")\r
+ {\r
+ return true;\r
+ }\r
+ else if(key == 13)\r
+ {\r
+ return false;\r
+ }\r
+ var allow = false;\r
+ // allow Ctrl+A\r
+ if((e.ctrlKey && key == 97 /* firefox */) || (e.ctrlKey && key == 65) /* opera */) return true;\r
+ // allow Ctrl+X (cut)\r
+ if((e.ctrlKey && key == 120 /* firefox */) || (e.ctrlKey && key == 88) /* opera */) return true;\r
+ // allow Ctrl+C (copy)\r
+ if((e.ctrlKey && key == 99 /* firefox */) || (e.ctrlKey && key == 67) /* opera */) return true;\r
+ // allow Ctrl+Z (undo)\r
+ if((e.ctrlKey && key == 122 /* firefox */) || (e.ctrlKey && key == 90) /* opera */) return true;\r
+ // allow or deny Ctrl+V (paste), Shift+Ins\r
+ if((e.ctrlKey && key == 118 /* firefox */) || (e.ctrlKey && key == 86) /* opera */\r
+ || (e.shiftKey && key == 45)) return true;\r
+ // if a number was not pressed\r
+ if(key < 48 || key > 57)\r
+ {\r
+ /* '-' only allowed at start */\r
+ if(key == 45 && this.value.length == 0) return true;\r
+ /* only one decimal separator allowed */\r
+ if(key == decimal.charCodeAt(0) && this.value.indexOf(decimal) != -1)\r
+ {\r
+ allow = false;\r
+ }\r
+ // check for other keys that have special purposes\r
+ if(\r
+ key != 8 /* backspace */ &&\r
+ key != 9 /* tab */ &&\r
+ key != 13 /* enter */ &&\r
+ key != 35 /* end */ &&\r
+ key != 36 /* home */ &&\r
+ key != 37 /* left */ &&\r
+ key != 39 /* right */ &&\r
+ key != 46 /* del */\r
+ )\r
+ {\r
+ allow = false;\r
+ }\r
+ else\r
+ {\r
+ // for detecting special keys (listed above)\r
+ // IE does not support 'charCode' and ignores them in keypress anyway\r
+ if(typeof e.charCode != "undefined")\r
+ {\r
+ // special keys have 'keyCode' and 'which' the same (e.g. backspace)\r
+ if(e.keyCode == e.which && e.which != 0)\r
+ {\r
+ allow = true;\r
+ }\r
+ // or keyCode != 0 and 'charCode'/'which' = 0\r
+ else if(e.keyCode != 0 && e.charCode == 0 && e.which == 0)\r
+ {\r
+ allow = true;\r
+ }\r
+ }\r
+ }\r
+ // if key pressed is the decimal and it is not already in the field\r
+ if(key == decimal.charCodeAt(0) && this.value.indexOf(decimal) == -1)\r
+ {\r
+ allow = true;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ allow = true;\r
+ }\r
+ return allow;\r
+ }\r
+ )\r
+ .blur(\r
+ function()\r
+ {\r
+ var val = jQuery(this).val();\r
+ if(val != "")\r
+ {\r
+ var re = new RegExp("^\\d+$|\\d*" + decimal + "\\d+");\r
+ if(!re.exec(val))\r
+ {\r
+ callback.apply(this);\r
+ }\r
+ }\r
+ }\r
+ );\r
+ return this;\r
+}
\ No newline at end of file
--- /dev/null
+var objCrop = null;\r
+\r
+function ajax_post()\r
+{\r
+ if ($('#loading').css('display') == 'none') {\r
+ $('#width').attr('disabled','disabled');\r
+ $('#height').attr('disabled','disabled');\r
+ $('#keepproportions').attr('disabled','disabled');\r
+ $('#btnRotateLeft').attr('disabled','disabled');\r
+ $('#btnRotateRight').attr('disabled','disabled');\r
+ $('#croptop').attr('disabled','disabled');\r
+ $('#cropbottom').attr('disabled','disabled');\r
+ $('#cropleft').attr('disabled','disabled');\r
+ $('#cropright').attr('disabled','disabled');\r
+ $('#grayscale').attr('disabled','disabled');\r
+ $('#btnupdate').attr('disabled','disabled');\r
+ $('#btnsave').attr('disabled','disabled');\r
+ $('#btnundo').attr('disabled','disabled');\r
+ $('#brightness_slider_track').slider('disable');\r
+ $('#contrast_slider_track').slider('disable');\r
+ \r
+ $('#loading').css('display','block');\r
+ $('#loading_bar').width(0);\r
+ $('#loading_bar').animate({width: document.getElementById('loading').offsetWidth-30}, document.getElementById('loading').offsetWidth*10);\r
+ \r
+ $.ajax({\r
+ timeout: AjaxPostTimeoutMs,\r
+ type: "POST",\r
+ url: FormAction,\r
+ data: "grayscaleval="+$('#grayscaleval').val()+\r
+ "&keepproportionsval="+$('#keepproportionsval').val()+\r
+ "&image_name="+$('#image_name').val()+\r
+ "&width="+$('#width').val()+\r
+ "&widthoriginal="+$('#widthoriginal').val()+\r
+ "&height="+$('#height').val()+\r
+ "&heightoriginal="+$('#heightoriginal').val()+\r
+ "&rotate="+$('#rotate').val()+\r
+ "&croptop="+$('#croptop').val()+\r
+ "&cropleft="+$('#cropleft').val()+\r
+ "&cropright="+$('#cropright').val()+\r
+ "&cropbottom="+$('#cropbottom').val()+\r
+ "&contrast="+$('#contrast').val()+\r
+ "&brightness="+$('#brightness').val()+\r
+ "&actiontype="+$('#actiontype').val()+\r
+ "&panel="+$('#panel').val()+\r
+ "&language="+$('#language').val()+\r
+ "&actions="+$('#actions').val()+\r
+ "&widthlast="+$('#widthlast').val()+\r
+ "&heightlast="+$('#heightlast').val()+\r
+ "&userid="+$('#userid').val()+\r
+ "&contrastlast="+$('#contrastlast').val()+\r
+ "&brightnesslast="+$('#brightnesslast').val()+\r
+ "&widthlastbeforeresize="+$('#widthlastbeforeresize').val()+\r
+ "&heightlastbeforeresize="+$('#heightlastbeforeresize').val()+\r
+ "&cropkeepproportionsval="+$('#cropkeepproportionsval').val()+\r
+ "&cropkeepproportionsratio="+$('#cropkeepproportionsratio').val()+\r
+ "&isajaxpost=true",\r
+ success: function(data)\r
+ { \r
+ $('#phpImageEditor').html(data);\r
+ activate_form();\r
+ phpimageeditor_crop_activator(parseInt($('#panel').val()));\r
+ phpimageeditor_init();\r
+ $('#loading_bar').stop();\r
+ $('#loading').css('display','none');\r
+ },\r
+ error: function(XMLHttpRequest, textStatus, errorThrown)\r
+ {\r
+ activate_form();\r
+ $('#ulJsErrors').html("");\r
+ adderror(TextAnUnexpectedError);\r
+ $('#divJsErrors').css('display','block');\r
+ $('#ulJsErrors').css('display','block');\r
+ phpimageeditor_crop_activator(parseInt($('#panel').val()));\r
+ $('#loading_bar').stop();\r
+ $('#loading').css('display','none');\r
+ }\r
+ });\r
+ \r
+ }\r
+}\r
+\r
+function isinteger(s)\r
+{\r
+ var i;\r
+\r
+ if (isempty(s))\r
+ if (isinteger.arguments.length == 1) return 0;\r
+ else return (isinteger.arguments[1] == true);\r
+\r
+ for (i = 0; i < s.length; i++)\r
+ {\r
+ var c = s.charAt(i);\r
+\r
+ if (!isdigit(c)) return false;\r
+ }\r
+\r
+ return true;\r
+}\r
+\r
+function focus_on_enter(element, event)\r
+{\r
+ if(event.keyCode == 13)\r
+ element.focus();\r
+}\r
+\r
+function reload_mouse_crop()\r
+{\r
+ objCrop.destroy();\r
+ objCrop = $.Jcrop('#image',{onChange: set_crop_values,onSelect: set_crop_values, aspectRatio: $("input#cropkeepproportions").attr('checked') ? $("#cropkeepproportionsratio").val() : 0}); \r
+ $(".jcrop-holder").css("display", "none");\r
+ $("#image").css("display", "block"); \r
+}\r
+\r
+function update_width(InputWidth, EditForm)\r
+{\r
+ if (isinteger(InputWidth.val()))\r
+ {\r
+ var Width = parseInt($('#width').val());\r
+ var Height = parseInt($('#height').val());\r
+ \r
+ $('#image').css('width',Width+'px');\r
+ \r
+ if ($("input#keepproportions").attr('checked'))\r
+ {\r
+ $('#image').css('height', get_proportional_height(Width, EditForm) + "px");\r
+ $('#height').val(get_proportional_height(Width, EditForm));\r
+ }\r
+ \r
+ update_mouse_resizer();\r
+ reload_mouse_crop();\r
+ }\r
+}\r
+\r
+function update_mouse_resizer()\r
+{\r
+ $('#imageResizerKeepProportions').css('width',$('#width').val()+'px'); \r
+ $('#imageResizerKeepProportions').css('height',$('#height').val()+'px');\r
+ $('#imageResizerNoProportions').css('width',$('#width').val()+'px'); \r
+ $('#imageResizerNoProportions').css('height',$('#height').val()+'px');\r
+}\r
+\r
+function update_height(InputHeight, EditForm)\r
+{\r
+ if (isinteger(InputHeight.val()))\r
+ {\r
+ var Height = parseInt($('#height').val());\r
+ var Width = parseInt($('#width').val());\r
+ \r
+ $('#image').css('height',$('#height').val()+'px');\r
+ \r
+ if ($("input#keepproportions").attr('checked'))\r
+ {\r
+ $('#image').css('width',get_proportional_width(Height, EditForm)+'px');\r
+ $('#width').val(get_proportional_width(Height, EditForm));\r
+ }\r
+ \r
+ update_mouse_resizer();\r
+ reload_mouse_crop();\r
+ }\r
+}\r
+\r
+function isempty(s)\r
+{\r
+ return ((s == null) || (s.length == 0))\r
+}\r
+\r
+function isdigit (c)\r
+{\r
+ return ((c >= "0") && (c <= "9"))\r
+}\r
+\r
+function isintegerinrange(s, a, b)\r
+{ \r
+ if (isempty(s))\r
+ if (isintegerinrange.arguments.length == 1) return false;\r
+ else return (isintegerinrange.arguments[1] == true);\r
+\r
+ // Catch non-integer strings to avoid creating a NaN below,\r
+ // which isn't available on JavaScript 1.0 for Windows.\r
+ if (!isinteger(s, false)) return false;\r
+\r
+ // Now, explicitly change the type to integer via parseInt\r
+ // so that the comparison code below will work both on\r
+ // JavaScript 1.2 (which typechecks in equality comparisons)\r
+ // and JavaScript 1.1 and before (which doesn't).\r
+ var num = parseInt (s);\r
+ return ((num >= a) && (num <= b));\r
+}\r
+\r
+function validate_form()\r
+{\r
+ var sendForm = true;\r
+ \r
+ var width = $('#width').val();\r
+ var height = $('#height').val();\r
+ var cropleft = $('#cropleft').val();\r
+ var cropright = $('#cropright').val();\r
+ var croptop = $('#croptop').val();\r
+ var cropbottom = $('#cropbottom').val();\r
+ var imageName = $('#image_name').val();\r
+ \r
+ $('#divJsErrors').css('display','none');\r
+ $('#ulJsErrors').css('display','none');\r
+ \r
+ $('#ulJsErrors').html("");\r
+\r
+ if (imageName == "") {\r
+ adderror("\"Image Name\" is Required!" );\r
+ sendForm = false;\r
+ }\r
+\r
+ if (width == "")\r
+ {\r
+ adderror("\"" + TextWidth + "\" " + TextIsRequired)\r
+ sendForm = false;\r
+ }\r
+ \r
+ if (height == "")\r
+ {\r
+ adderror("\"" + TextHeight + "\" " + TextIsRequired)\r
+ sendForm = false;\r
+ }\r
+ \r
+ if (!sendForm)\r
+ {\r
+ $('#divJsErrors').css('display','block');\r
+ $('#ulJsErrors').css('display','block');\r
+\r
+ return sendForm;\r
+ }\r
+ \r
+ if (!isinteger(width))\r
+ {\r
+ adderror("\"" + TextWidth + "\" " + TextMustBeNumeric)\r
+ sendForm = false;\r
+ }\r
+ \r
+ if (!isinteger(height))\r
+ {\r
+ adderror("\"" + TextHeight + "\" " + TextMustBeNumeric)\r
+ sendForm = false;\r
+ }\r
+ \r
+ if (!sendForm)\r
+ {\r
+ $('#divJsErrors').css('display','block');\r
+ $('#ulJsErrors').css('display','block');\r
+ return sendForm;\r
+ }\r
+\r
+ width = parseInt(width);\r
+ height = parseInt(height);\r
+\r
+ if (!isintegerinrange(width, 1, ImageMaxWidth))\r
+ {\r
+ adderror("\"" + TextWidth + "\" " + TextNotInRange + ": 1 - " + ImageMaxWidth)\r
+ sendForm = false;\r
+ }\r
+ \r
+ if (!isintegerinrange(height, 1, ImageMaxHeight))\r
+ {\r
+ adderror("\"" + TextHeight + "\" " + TextNotInRange + ": 1 - " + ImageMaxHeight)\r
+ sendForm = false;\r
+ }\r
+ \r
+ if (!sendForm)\r
+ {\r
+ $('#divJsErrors').css('display','block');\r
+ $('#ulJsErrors').css('display','block');\r
+ }\r
+\r
+ return sendForm;\r
+}\r
+\r
+function adderror(ErrorText)\r
+{\r
+ $('#ulJsErrors').html($('#ulJsErrors').html()+'<li>'+ErrorText+'</li>');\r
+}\r
+\r
+function get_proportional_width(Height, EditForm)\r
+{\r
+ var HeightOriginal = parseInt($("#heightlastbeforeresize").val());\r
+ var WidthOriginal = parseInt($("#widthlastbeforeresize").val());\r
+ \r
+ return Math.round((WidthOriginal/HeightOriginal)*Height);\r
+}\r
+\r
+function get_proportional_height(Width, EditForm)\r
+{\r
+ var HeightOriginal = parseInt($("#heightlastbeforeresize").val());\r
+ var WidthOriginal = parseInt($("#widthlastbeforeresize").val());\r
+ \r
+ return Math.round((HeightOriginal/WidthOriginal)*Width);\r
+}\r
+\r
+function remove_px(Value)\r
+{\r
+ return Value.replace("px","");\r
+}\r
+\r
+function activate_form()\r
+{\r
+ $('#width').removeAttr('disabled');\r
+ $('#height').removeAttr('disabled');\r
+ $('#keepproportions').removeAttr('disabled');\r
+ $('#btnRotateLeft').removeAttr('disabled');\r
+ $('#btnRotateRight').removeAttr('disabled');\r
+ $('#croptop').removeAttr('disabled');\r
+ $('#cropbottom').removeAttr('disabled');\r
+ $('#cropleft').removeAttr('disabled');\r
+ $('#cropright').removeAttr('disabled');\r
+ $('#grayscale').removeAttr('disabled');\r
+ $('#btnupdate').removeAttr('disabled');\r
+ $('#btnsave').removeAttr('disabled');\r
+ $('#btnundo').removeAttr('disabled');\r
+ $('#brightness_slider_track').slider('enable');\r
+ $('#contrast_slider_track').slider('enable');\r
+ \r
+ if ($('#actions').val() == '')\r
+ {\r
+ $('#btnundo').attr('disabled','disabled');\r
+ $('#btnsave').attr('disabled','disabled');\r
+ }\r
+ else\r
+ {\r
+ $('#btnundo').removeAttr('disabled');\r
+ $('#btnsave').removeAttr('disabled');\r
+ } \r
+}\r
+\r
+\r
+function set_crop_values(c)\r
+{\r
+ if (isinteger($("#height").val()) && isinteger($("#width").val()))\r
+ {\r
+ $("#croptop").val(c.y);\r
+ $("#cropbottom").val(parseInt($("#height").val()) - (c.y + c.h));\r
+ $("#cropleft").val(c.x);\r
+ $("#cropright").val(parseInt($("#width").val()) - (c.x + c.w));\r
+ $("#cropwidth").html(c.w);\r
+ $("#cropheight").html(c.h);\r
+ }\r
+}\r
+\r
+function phpimageeditor_resize_activator(selectedIndex)\r
+{\r
+ if (selectedIndex == MenuResize)\r
+ {\r
+ if ($('#keepproportionsval').val() == "1")\r
+ {\r
+ $("#imageResizerKeepProportions").css("display", "block");\r
+ $("#imageResizerNoProportions").css("display", "none");\r
+ }\r
+ else\r
+ {\r
+ $("#imageResizerKeepProportions").css("display", "none");\r
+ $("#imageResizerNoProportions").css("display", "block");\r
+ }\r
+ }\r
+ else\r
+ {\r
+ $("#imageResizerKeepProportions").css("display", "none");\r
+ $("#imageResizerNoProportions").css("display", "none");\r
+ }\r
+}\r
+\r
+function phpimageeditor_panelfade(selectedIndex)\r
+{\r
+ for (i = 0; i < 4; i++)\r
+ {\r
+ if ($('#panel_'+i) != null)\r
+ {\r
+ $("#panel_"+i).css('opacity','0.0');\r
+ \r
+ if (i == selectedIndex)\r
+ {\r
+ $("#menuitem_"+i).removeClass("not-selected"); \r
+ $("#menuitem_"+i).addClass("selected");\r
+ $("#panel_"+i).css('display','block');\r
+ $("#panel_"+i).fadeTo("normal", 1.0);\r
+ }\r
+ else\r
+ {\r
+ $("#menuitem_"+i).removeClass("selected");\r
+ $("#menuitem_"+i).addClass("not-selected"); \r
+ $("#panel_"+i).css('display','none');\r
+ }\r
+ }\r
+ }\r
+ \r
+ if (selectedIndex != MenuCrop)\r
+ {\r
+ $("#cropleft").val("0");\r
+ $("#cropright").val("0");\r
+ $("#croptop").val("0");\r
+ $("#cropbottom").val("0");\r
+ $("#cropwidth").html("0");\r
+ $("#cropheight").html("0");\r
+ }\r
+ \r
+ phpimageeditor_resize_activator(selectedIndex);\r
+ phpimageeditor_crop_activator(selectedIndex);\r
+ \r
+ $("#panel").val(selectedIndex);\r
+}\r
+\r
+function phpimageeditor_crop_activator(selectedIndex)\r
+{\r
+ if (objCrop != null)\r
+ { \r
+ if (selectedIndex != MenuCrop)\r
+ {\r
+ objCrop.release();\r
+ objCrop.disable();\r
+ $(".jcrop-holder").css("display", "none");\r
+ $("#image").css("display", "block");\r
+ }\r
+ else\r
+ {\r
+ objCrop.release();\r
+ objCrop.enable();\r
+ $(".jcrop-holder").css("display", "block");\r
+ $("#image").css("display", "block");\r
+ }\r
+ }\r
+}\r
+\r
+function phpimageeditor_init()\r
+{\r
+ objCrop = $.Jcrop('#image',{onChange: set_crop_values,onSelect: set_crop_values, aspectRatio: $("input#cropkeepproportions").attr('checked') ? $("input#cropkeepproportionsratio").val() : 0});\r
+\r
+ $("#imageResizerKeepProportions").resizable(\r
+ {\r
+ aspectRatio: parseFloat($("input#widthlastbeforeresize").val()) / parseFloat($("input#heightlastbeforeresize").val()),\r
+ stop: function(event,ui)\r
+ { \r
+ var resize_width = parseInt(remove_px($("#imageResizerKeepProportions").css("width")));\r
+ var resize_height = parseInt(remove_px($("#imageResizerKeepProportions").css("height")));\r
+ \r
+ $("#image").css("width", resize_width+"px");\r
+ $("#image").css("height", resize_height+"px");\r
+ $("#width").val(resize_width);\r
+ $("#height").val(resize_height);\r
+\r
+ update_mouse_resizer();\r
+\r
+ $("#imageResizerKeepProportions").css("opacity", "0.0");\r
+ \r
+ reload_mouse_crop();\r
+ },\r
+ start: function(event,ui)\r
+ { \r
+ $("#imageResizerKeepProportions").css("opacity", "0.5");\r
+ }\r
+ });\r
+ \r
+ $("#imageResizerNoProportions").resizable(\r
+ {\r
+ aspectRatio: false,\r
+ stop: function(event,ui)\r
+ { \r
+ var resize_width = parseInt(remove_px($("#imageResizerNoProportions").css("width")));\r
+ var resize_height = parseInt(remove_px($("#imageResizerNoProportions").css("height")));\r
+ \r
+ $("#image").css("width", resize_width+"px");\r
+ $("#image").css("height", resize_height+"px");\r
+ $("#width").val(resize_width);\r
+ $("#height").val(resize_height);\r
+ \r
+ update_mouse_resizer();\r
+\r
+ $("#widthlastbeforeresize").val(resize_width);\r
+ $("#heightlastbeforeresize").val(resize_height);\r
+ $("#imageResizerKeepProportions").resizable('option','aspectRatio',parseFloat($('#widthlastbeforeresize').val())/parseFloat($('#heightlastbeforeresize').val()));\r
+\r
+ $("#imageResizerNoProportions").css("opacity", "0.0");\r
+\r
+ reload_mouse_crop();\r
+ },\r
+ start: function(event,ui)\r
+ { \r
+ $("#imageResizerNoProportions").css("opacity", "0.5");\r
+ }\r
+ });\r
+ \r
+ $("#contrast_slider_track").slider({value: parseInt($("#contrast").val()) + ContrastMax, min: 1, max: ((ContrastMax*2)+1), step: 1,\r
+ stop: function(event,ui)\r
+ { \r
+ if (validate_form())\r
+ ajax_post();\r
+ },\r
+ slide: function(event, ui) \r
+ {\r
+ $("#contrast").val(parseInt(ui.value)-((ContrastMax)+1));\r
+ }\r
+ });\r
+ \r
+ $("#brightness_slider_track").slider({value: (parseInt($("input#brightness").val())+BrightnessMax),min: 1,max: ((BrightnessMax*2)+1),step: 1,\r
+ stop: function(event,ui)\r
+ { \r
+ if (validate_form())\r
+ ajax_post();\r
+ },\r
+ slide: function(event, ui) \r
+ {\r
+ $("#brightness").val(parseInt(ui.value)-(BrightnessMax+1));\r
+ }\r
+ });\r
+ \r
+ $("#grayscale").click(function()\r
+ {\r
+ if (validate_form())\r
+ {\r
+ $("#grayscale").attr('checked') ? $('#grayscaleval').val('1') : $('#grayscaleval').val('0');\r
+ ajax_post();\r
+ }\r
+ });\r
+ \r
+ $("#btnupdate").click(function()\r
+ {\r
+ if (validate_form())\r
+ {\r
+ $("#actiontype").val(ActionUpdate); \r
+ ajax_post();\r
+ }\r
+ });\r
+ \r
+ $("#btnundo").click(function()\r
+ {\r
+ if (validate_form())\r
+ {\r
+ $("#actiontype").val(ActionUndo); \r
+ ajax_post();\r
+ }\r
+ });\r
+\r
+ $("#btnsave").click(function()\r
+ {\r
+ if (validate_form())\r
+ {\r
+ $("#actiontype").val(ActionSaveAndClose); \r
+ ajax_post();\r
+ }\r
+ });\r
+\r
+ $("#btnRotateLeft").click(function()\r
+ {\r
+ if (validate_form())\r
+ {\r
+ $("#rotate").val(ActionRotateLeft);\r
+ ajax_post();\r
+ }\r
+ });\r
+\r
+ $("#btnRotateRight").click(function()\r
+ {\r
+ if (validate_form())\r
+ {\r
+ $("#rotate").val(ActionRotateRight);\r
+ ajax_post();\r
+ }\r
+ });\r
+ \r
+ $("form#" + FormId).submit(function()\r
+ {\r
+ if (validate_form())\r
+ {\r
+ $("#actiontype").val(ActionSaveAndClose);\r
+ return true;\r
+ }\r
+ return false;\r
+ });\r
+ \r
+ $("#width").keydown(function(event)\r
+ {\r
+ focus_on_enter($("input#btnupdate"), event);\r
+ });\r
+ \r
+ $("#width").keyup(function()\r
+ {\r
+ update_width($(this),$("form#" + FormId));\r
+ });\r
+ \r
+ $("#height").keydown(function(event)\r
+ {\r
+ focus_on_enter($("input#btnupdate"), event);\r
+ });\r
+ \r
+ $("#height").keyup(function()\r
+ {\r
+ update_height($(this),$("form#" + FormId));\r
+ });\r
+ \r
+ $("#keepproportions").click(function()\r
+ {\r
+ if ($(this).attr('checked'))\r
+ {\r
+ $('#keepproportionsval').val('1');\r
+ $('#imageResizerKeepProportions').css('display','block');\r
+ $('#imageResizerNoProportions').css('display','none'); \r
+ }\r
+ else\r
+ {\r
+ $('#keepproportionsval').val('0'); \r
+ $('#imageResizerKeepProportions').css('display','none');\r
+ $('#imageResizerNoProportions').css('display','block'); \r
+ }\r
+ });\r
+ \r
+\r
+ $("#cropkeepproportions").click(function()\r
+ {\r
+ if ($(this).attr('checked'))\r
+ {\r
+ $('#cropkeepproportionsval').val('1');\r
+ }\r
+ else\r
+ {\r
+ $('#cropkeepproportionsval').val('0'); \r
+ }\r
+ });\r
+ \r
+ $("#menuitem_" + MenuResize).click(function()\r
+ {\r
+ if ($('#panel').val() != MenuResize)\r
+ {\r
+ phpimageeditor_panelfade(MenuResize);\r
+ }\r
+ });\r
+ \r
+ $("#menuitem_" + MenuRotate).click(function()\r
+ {\r
+ if ($('#panel').val() != MenuRotate)\r
+ {\r
+ phpimageeditor_panelfade(MenuRotate);\r
+ }\r
+ });\r
+ \r
+ $("#menuitem_" + MenuCrop).click(function()\r
+ {\r
+ if ($('#panel').val() != MenuCrop)\r
+ {\r
+ phpimageeditor_panelfade(MenuCrop);\r
+ }\r
+ });\r
+ \r
+ if ($("#menuitem_" + MenuEffects) != null)\r
+ {\r
+ $("#menuitem_" + MenuEffects).click(function()\r
+ {\r
+ if ($('#panel').val() != MenuEffects)\r
+ {\r
+ phpimageeditor_panelfade(MenuEffects);\r
+ }\r
+ });\r
+ }\r
+\r
+ $('#cropkeepproportions').change(function(e) \r
+ {\r
+ if (objCrop != null)\r
+ {\r
+ if (this.checked && parseFloat($("#cropwidth").html()) != 0 && parseFloat($("#cropheight").html()) != 0)\r
+ { \r
+ var aspectRatio = parseFloat($("#cropwidth").html()) / parseFloat($("#cropheight").html());\r
+ objCrop.setOptions({ aspectRatio: aspectRatio });\r
+ $("#cropkeepproportionsratio").val(aspectRatio);\r
+ }\r
+ else if (this.checked && parseFloat($("#cropwidth").html()) == 0 && parseFloat($("#cropheight").html()) == 0)\r
+ {\r
+ objCrop.setOptions({ aspectRatio: $("#cropkeepproportionsratio").val() });\r
+ } \r
+ else\r
+ { \r
+ objCrop.setOptions({ aspectRatio: 0 });\r
+ }\r
+ }\r
+ });\r
+\r
+ $("input#width").numeric();\r
+ $("input#height").numeric();\r
+ \r
+ var selectedIndex = parseInt($('#panel').val());\r
+ for (i = 0; i < 4; i++)\r
+ {\r
+ if ($('#panel_'+i) != null)\r
+ {\r
+ if (i == selectedIndex)\r
+ {\r
+ $("#panel_"+i).css('opacity','1.0');\r
+ $("#panel_"+i).css('display','block');\r
+ }\r
+ else\r
+ {\r
+ $("#panel_"+i).css('opacity','0.0');\r
+ $("#panel_"+i).css('display','none');\r
+ }\r
+ }\r
+ } \r
+ \r
+ phpimageeditor_crop_activator(selectedIndex);\r
+ phpimageeditor_resize_activator(selectedIndex);\r
+}\r
+\r
+$(document).ready(function()\r
+{\r
+ phpimageeditor_init();\r
+});define('CKIMAGE_ORIGINAL', TOOLBOX_ORIGINAL);\r
+define('CKIMAGE_RESIZED', TOOLBOX_RESIZED);\r
+define('CKIMAGE_MIDSIZED', TOOLBOX_MIDSIZED);\r
+define('CKIMAGE_THUMB', TOOLBOX_THUMB);
\ No newline at end of file
--- /dev/null
+/*
+ * jQuery UI 1.7
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ */
+;jQuery.ui || (function($) {
+
+var _remove = $.fn.remove,
+ isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9);
+
+//Helper functions and ui object
+$.ui = {
+ version: "1.7",
+
+ // $.ui.plugin is deprecated. Use the proxy pattern instead.
+ plugin: {
+ add: function(module, option, set) {
+ var proto = $.ui[module].prototype;
+ for(var i in set) {
+ proto.plugins[i] = proto.plugins[i] || [];
+ proto.plugins[i].push([option, set[i]]);
+ }
+ },
+ call: function(instance, name, args) {
+ var set = instance.plugins[name];
+ if(!set || !instance.element[0].parentNode) { return; }
+
+ for (var i = 0; i < set.length; i++) {
+ if (instance.options[set[i][0]]) {
+ set[i][1].apply(instance.element, args);
+ }
+ }
+ }
+ },
+
+ contains: function(a, b) {
+ return document.compareDocumentPosition
+ ? a.compareDocumentPosition(b) & 16
+ : a !== b && a.contains(b);
+ },
+
+ hasScroll: function(el, a) {
+
+ //If overflow is hidden, the element might have extra content, but the user wants to hide it
+ if ($(el).css('overflow') == 'hidden') { return false; }
+
+ var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
+ has = false;
+
+ if (el[scroll] > 0) { return true; }
+
+ // TODO: determine which cases actually cause this to happen
+ // if the element doesn't have the scroll set, see if it's possible to
+ // set the scroll
+ el[scroll] = 1;
+ has = (el[scroll] > 0);
+ el[scroll] = 0;
+ return has;
+ },
+
+ isOverAxis: function(x, reference, size) {
+ //Determines when x coordinate is over "b" element axis
+ return (x > reference) && (x < (reference + size));
+ },
+
+ isOver: function(y, x, top, left, height, width) {
+ //Determines when x, y coordinates is over "b" element
+ return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width);
+ },
+
+ keyCode: {
+ BACKSPACE: 8,
+ CAPS_LOCK: 20,
+ COMMA: 188,
+ CONTROL: 17,
+ DELETE: 46,
+ DOWN: 40,
+ END: 35,
+ ENTER: 13,
+ ESCAPE: 27,
+ HOME: 36,
+ INSERT: 45,
+ LEFT: 37,
+ NUMPAD_ADD: 107,
+ NUMPAD_DECIMAL: 110,
+ NUMPAD_DIVIDE: 111,
+ NUMPAD_ENTER: 108,
+ NUMPAD_MULTIPLY: 106,
+ NUMPAD_SUBTRACT: 109,
+ PAGE_DOWN: 34,
+ PAGE_UP: 33,
+ PERIOD: 190,
+ RIGHT: 39,
+ SHIFT: 16,
+ SPACE: 32,
+ TAB: 9,
+ UP: 38
+ }
+};
+
+// WAI-ARIA normalization
+if (isFF2) {
+ var attr = $.attr,
+ removeAttr = $.fn.removeAttr,
+ ariaNS = "http://www.w3.org/2005/07/aaa",
+ ariaState = /^aria-/,
+ ariaRole = /^wairole:/;
+
+ $.attr = function(elem, name, value) {
+ var set = value !== undefined;
+
+ return (name == 'role'
+ ? (set
+ ? attr.call(this, elem, name, "wairole:" + value)
+ : (attr.apply(this, arguments) || "").replace(ariaRole, ""))
+ : (ariaState.test(name)
+ ? (set
+ ? elem.setAttributeNS(ariaNS,
+ name.replace(ariaState, "aaa:"), value)
+ : attr.call(this, elem, name.replace(ariaState, "aaa:")))
+ : attr.apply(this, arguments)));
+ };
+
+ $.fn.removeAttr = function(name) {
+ return (ariaState.test(name)
+ ? this.each(function() {
+ this.removeAttributeNS(ariaNS, name.replace(ariaState, ""));
+ }) : removeAttr.call(this, name));
+ };
+}
+
+//jQuery plugins
+$.fn.extend({
+ remove: function() {
+ // Safari has a native remove event which actually removes DOM elements,
+ // so we have to use triggerHandler instead of trigger (#3037).
+ $("*", this).add(this).each(function() {
+ $(this).triggerHandler("remove");
+ });
+ return _remove.apply(this, arguments );
+ },
+
+ enableSelection: function() {
+ return this
+ .attr('unselectable', 'off')
+ .css('MozUserSelect', '')
+ .unbind('selectstart.ui');
+ },
+
+ disableSelection: function() {
+ return this
+ .attr('unselectable', 'on')
+ .css('MozUserSelect', 'none')
+ .bind('selectstart.ui', function() { return false; });
+ },
+
+ scrollParent: function() {
+ var scrollParent;
+ if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
+ scrollParent = this.parents().filter(function() {
+ return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ }).eq(0);
+ } else {
+ scrollParent = this.parents().filter(function() {
+ return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ }).eq(0);
+ }
+
+ return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
+ }
+});
+
+
+//Additional selectors
+$.extend($.expr[':'], {
+ data: function(elem, i, match) {
+ return !!$.data(elem, match[3]);
+ },
+
+ focusable: function(element) {
+ var nodeName = element.nodeName.toLowerCase(),
+ tabIndex = $.attr(element, 'tabindex');
+ return (/input|select|textarea|button|object/.test(nodeName)
+ ? !element.disabled
+ : 'a' == nodeName || 'area' == nodeName
+ ? element.href || !isNaN(tabIndex)
+ : !isNaN(tabIndex))
+ // the element and all of its ancestors must be visible
+ // the browser may report that the area is hidden
+ && !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length;
+ },
+
+ tabbable: function(element) {
+ var tabIndex = $.attr(element, 'tabindex');
+ return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable');
+ }
+});
+
+
+// $.widget is a factory to create jQuery plugins
+// taking some boilerplate code out of the plugin code
+function getter(namespace, plugin, method, args) {
+ function getMethods(type) {
+ var methods = $[namespace][plugin][type] || [];
+ return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods);
+ }
+
+ var methods = getMethods('getter');
+ if (args.length == 1 && typeof args[0] == 'string') {
+ methods = methods.concat(getMethods('getterSetter'));
+ }
+ return ($.inArray(method, methods) != -1);
+}
+
+$.widget = function(name, prototype) {
+ var namespace = name.split(".")[0];
+ name = name.split(".")[1];
+
+ // create plugin method
+ $.fn[name] = function(options) {
+ var isMethodCall = (typeof options == 'string'),
+ args = Array.prototype.slice.call(arguments, 1);
+
+ // prevent calls to internal methods
+ if (isMethodCall && options.substring(0, 1) == '_') {
+ return this;
+ }
+
+ // handle getter methods
+ if (isMethodCall && getter(namespace, name, options, args)) {
+ var instance = $.data(this[0], name);
+ return (instance ? instance[options].apply(instance, args)
+ : undefined);
+ }
+
+ // handle initialization and non-getter methods
+ return this.each(function() {
+ var instance = $.data(this, name);
+
+ // constructor
+ (!instance && !isMethodCall &&
+ $.data(this, name, new $[namespace][name](this, options))._init());
+
+ // method call
+ (instance && isMethodCall && $.isFunction(instance[options]) &&
+ instance[options].apply(instance, args));
+ });
+ };
+
+ // create widget constructor
+ $[namespace] = $[namespace] || {};
+ $[namespace][name] = function(element, options) {
+ var self = this;
+
+ this.namespace = namespace;
+ this.widgetName = name;
+ this.widgetEventPrefix = $[namespace][name].eventPrefix || name;
+ this.widgetBaseClass = namespace + '-' + name;
+
+ this.options = $.extend({},
+ $.widget.defaults,
+ $[namespace][name].defaults,
+ $.metadata && $.metadata.get(element)[name],
+ options);
+
+ this.element = $(element)
+ .bind('setData.' + name, function(event, key, value) {
+ if (event.target == element) {
+ return self._setData(key, value);
+ }
+ })
+ .bind('getData.' + name, function(event, key) {
+ if (event.target == element) {
+ return self._getData(key);
+ }
+ })
+ .bind('remove', function() {
+ return self.destroy();
+ });
+ };
+
+ // add widget prototype
+ $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
+
+ // TODO: merge getter and getterSetter properties from widget prototype
+ // and plugin prototype
+ $[namespace][name].getterSetter = 'option';
+};
+
+$.widget.prototype = {
+ _init: function() {},
+ destroy: function() {
+ this.element.removeData(this.widgetName)
+ .removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled')
+ .removeAttr('aria-disabled');
+ },
+
+ option: function(key, value) {
+ var options = key,
+ self = this;
+
+ if (typeof key == "string") {
+ if (value === undefined) {
+ return this._getData(key);
+ }
+ options = {};
+ options[key] = value;
+ }
+
+ $.each(options, function(key, value) {
+ self._setData(key, value);
+ });
+ },
+ _getData: function(key) {
+ return this.options[key];
+ },
+ _setData: function(key, value) {
+ this.options[key] = value;
+
+ if (key == 'disabled') {
+ this.element
+ [value ? 'addClass' : 'removeClass'](
+ this.widgetBaseClass + '-disabled' + ' ' +
+ this.namespace + '-state-disabled')
+ .attr("aria-disabled", value);
+ }
+ },
+
+ enable: function() {
+ this._setData('disabled', false);
+ },
+ disable: function() {
+ this._setData('disabled', true);
+ },
+
+ _trigger: function(type, event, data) {
+ var callback = this.options[type],
+ eventName = (type == this.widgetEventPrefix
+ ? type : this.widgetEventPrefix + type);
+
+ event = $.Event(event);
+ event.type = eventName;
+
+ // copy original event properties over to the new event
+ // this would happen if we could call $.event.fix instead of $.Event
+ // but we don't have a way to force an event to be fixed multiple times
+ if (event.originalEvent) {
+ for (var i = $.event.props.length, prop; i;) {
+ prop = $.event.props[--i];
+ event[prop] = event.originalEvent[prop];
+ }
+ }
+
+ this.element.trigger(event, data);
+
+ return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false
+ || event.isDefaultPrevented());
+ }
+};
+
+$.widget.defaults = {
+ disabled: false
+};
+
+
+/** Mouse Interaction Plugin **/
+
+$.ui.mouse = {
+ _mouseInit: function() {
+ var self = this;
+
+ this.element
+ .bind('mousedown.'+this.widgetName, function(event) {
+ return self._mouseDown(event);
+ })
+ .bind('click.'+this.widgetName, function(event) {
+ if(self._preventClickEvent) {
+ self._preventClickEvent = false;
+ event.stopImmediatePropagation();
+ return false;
+ }
+ });
+
+ // Prevent text selection in IE
+ if ($.browser.msie) {
+ this._mouseUnselectable = this.element.attr('unselectable');
+ this.element.attr('unselectable', 'on');
+ }
+
+ this.started = false;
+ },
+
+ // TODO: make sure destroying one instance of mouse doesn't mess with
+ // other instances of mouse
+ _mouseDestroy: function() {
+ this.element.unbind('.'+this.widgetName);
+
+ // Restore text selection in IE
+ ($.browser.msie
+ && this.element.attr('unselectable', this._mouseUnselectable));
+ },
+
+ _mouseDown: function(event) {
+ // don't let more than one widget handle mouseStart
+ // TODO: figure out why we have to use originalEvent
+ event.originalEvent = event.originalEvent || {};
+ if (event.originalEvent.mouseHandled) { return; }
+
+ // we may have missed mouseup (out of window)
+ (this._mouseStarted && this._mouseUp(event));
+
+ this._mouseDownEvent = event;
+
+ var self = this,
+ btnIsLeft = (event.which == 1),
+ elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
+ if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
+ return true;
+ }
+
+ this.mouseDelayMet = !this.options.delay;
+ if (!this.mouseDelayMet) {
+ this._mouseDelayTimer = setTimeout(function() {
+ self.mouseDelayMet = true;
+ }, this.options.delay);
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted = (this._mouseStart(event) !== false);
+ if (!this._mouseStarted) {
+ event.preventDefault();
+ return true;
+ }
+ }
+
+ // these delegates are required to keep context
+ this._mouseMoveDelegate = function(event) {
+ return self._mouseMove(event);
+ };
+ this._mouseUpDelegate = function(event) {
+ return self._mouseUp(event);
+ };
+ $(document)
+ .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ // preventDefault() is used to prevent the selection of text here -
+ // however, in Safari, this causes select boxes not to be selectable
+ // anymore, so this fix is needed
+ ($.browser.safari || event.preventDefault());
+
+ event.originalEvent.mouseHandled = true;
+ return true;
+ },
+
+ _mouseMove: function(event) {
+ // IE mouseup check - mouseup happened when mouse was out of window
+ if ($.browser.msie && !event.button) {
+ return this._mouseUp(event);
+ }
+
+ if (this._mouseStarted) {
+ this._mouseDrag(event);
+ return event.preventDefault();
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted =
+ (this._mouseStart(this._mouseDownEvent, event) !== false);
+ (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
+ }
+
+ return !this._mouseStarted;
+ },
+
+ _mouseUp: function(event) {
+ $(document)
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ if (this._mouseStarted) {
+ this._mouseStarted = false;
+ this._preventClickEvent = (event.target == this._mouseDownEvent.target);
+ this._mouseStop(event);
+ }
+
+ return false;
+ },
+
+ _mouseDistanceMet: function(event) {
+ return (Math.max(
+ Math.abs(this._mouseDownEvent.pageX - event.pageX),
+ Math.abs(this._mouseDownEvent.pageY - event.pageY)
+ ) >= this.options.distance
+ );
+ },
+
+ _mouseDelayMet: function(event) {
+ return this.mouseDelayMet;
+ },
+
+ // These are placeholder methods, to be overriden by extending plugin
+ _mouseStart: function(event) {},
+ _mouseDrag: function(event) {},
+ _mouseStop: function(event) {},
+ _mouseCapture: function(event) { return true; }
+};
+
+$.ui.mouse.defaults = {
+ cancel: null,
+ distance: 1,
+ delay: 0
+};
+
+})(jQuery);
--- /dev/null
+/*
+ * jQuery UI Resizable 1.7
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.resizable", $.extend({}, $.ui.mouse, {
+
+ _init: function() {
+
+ var self = this, o = this.options;
+ this.element.addClass("ui-resizable");
+
+ $.extend(this, {
+ _aspectRatio: !!(o.aspectRatio),
+ aspectRatio: o.aspectRatio,
+ originalElement: this.element,
+ _proportionallyResizeElements: [],
+ _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null
+ });
+
+ //Wrap the element if it cannot hold child nodes
+ if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
+
+ //Opera fix for relative positioning
+ if (/relative/.test(this.element.css('position')) && $.browser.opera)
+ this.element.css({ position: 'relative', top: 'auto', left: 'auto' });
+
+ //Create a wrapper element and set the wrapper to the new current internal element
+ this.element.wrap(
+ $('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
+ position: this.element.css('position'),
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight(),
+ top: this.element.css('top'),
+ left: this.element.css('left')
+ })
+ );
+
+ //Overwrite the original this.element
+ this.element = this.element.parent().data(
+ "resizable", this.element.data('resizable')
+ );
+
+ this.elementIsWrapper = true;
+
+ //Move margins to the wrapper
+ this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
+ this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
+
+ //Prevent Safari textarea resize
+ this.originalResizeStyle = this.originalElement.css('resize');
+ this.originalElement.css('resize', 'none');
+
+ //Push the actual element to our proportionallyResize internal array
+ this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' }));
+
+ // avoid IE jump (hard set the margin)
+ this.originalElement.css({ margin: this.originalElement.css('margin') });
+
+ // fix handlers offset
+ this._proportionallyResize();
+
+ }
+
+ this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' });
+ if(this.handles.constructor == String) {
+
+ if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw';
+ var n = this.handles.split(","); this.handles = {};
+
+ for(var i = 0; i < n.length; i++) {
+
+ var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
+ var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');
+
+ // increase zIndex of sw, se, ne, nw axis
+ //TODO : this modifies original option
+ if(/sw|se|ne|nw/.test(handle)) axis.css({ zIndex: ++o.zIndex });
+
+ //TODO : What's going on here?
+ if ('se' == handle) {
+ axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se');
+ };
+
+ //Insert into internal handles object and append to element
+ this.handles[handle] = '.ui-resizable-'+handle;
+ this.element.append(axis);
+ }
+
+ }
+
+ this._renderAxis = function(target) {
+
+ target = target || this.element;
+
+ for(var i in this.handles) {
+
+ if(this.handles[i].constructor == String)
+ this.handles[i] = $(this.handles[i], this.element).show();
+
+ //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
+ if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
+
+ var axis = $(this.handles[i], this.element), padWrapper = 0;
+
+ //Checking the correct pad and border
+ padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
+
+ //The padding type i have to apply...
+ var padPos = [ 'padding',
+ /ne|nw|n/.test(i) ? 'Top' :
+ /se|sw|s/.test(i) ? 'Bottom' :
+ /^e$/.test(i) ? 'Right' : 'Left' ].join("");
+
+ target.css(padPos, padWrapper);
+
+ this._proportionallyResize();
+
+ }
+
+ //TODO: What's that good for? There's not anything to be executed left
+ if(!$(this.handles[i]).length)
+ continue;
+
+ }
+ };
+
+ //TODO: make renderAxis a prototype function
+ this._renderAxis(this.element);
+
+ this._handles = $('.ui-resizable-handle', this.element)
+ .disableSelection();
+
+ //Matching axis name
+ this._handles.mouseover(function() {
+ if (!self.resizing) {
+ if (this.className)
+ var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
+ //Axis, default = se
+ self.axis = axis && axis[1] ? axis[1] : 'se';
+ }
+ });
+
+ //If we want to auto hide the elements
+ if (o.autoHide) {
+ this._handles.hide();
+ $(this.element)
+ .addClass("ui-resizable-autohide")
+ .hover(function() {
+ $(this).removeClass("ui-resizable-autohide");
+ self._handles.show();
+ },
+ function(){
+ if (!self.resizing) {
+ $(this).addClass("ui-resizable-autohide");
+ self._handles.hide();
+ }
+ });
+ }
+
+ //Initialize the mouse interaction
+ this._mouseInit();
+
+ },
+
+ destroy: function() {
+
+ this._mouseDestroy();
+
+ var _destroy = function(exp) {
+ $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
+ .removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
+ };
+
+ //TODO: Unwrap at same DOM position
+ if (this.elementIsWrapper) {
+ _destroy(this.element);
+ var wrapper = this.element;
+ wrapper.parent().append(
+ this.originalElement.css({
+ position: wrapper.css('position'),
+ width: wrapper.outerWidth(),
+ height: wrapper.outerHeight(),
+ top: wrapper.css('top'),
+ left: wrapper.css('left')
+ })
+ ).end().remove();
+ }
+
+ this.originalElement.css('resize', this.originalResizeStyle);
+ _destroy(this.originalElement);
+
+ },
+
+ _mouseCapture: function(event) {
+
+ var handle = false;
+ for(var i in this.handles) {
+ if($(this.handles[i])[0] == event.target) handle = true;
+ }
+
+ return this.options.disabled || !!handle;
+
+ },
+
+ _mouseStart: function(event) {
+
+ var o = this.options, iniPos = this.element.position(), el = this.element;
+
+ this.resizing = true;
+ this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
+
+ // bugfix for http://dev.jquery.com/ticket/1749
+ if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
+ el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });
+ }
+
+ //Opera fixing relative position
+ if ($.browser.opera && (/relative/).test(el.css('position')))
+ el.css({ position: 'relative', top: 'auto', left: 'auto' });
+
+ this._renderProxy();
+
+ var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
+
+ if (o.containment) {
+ curleft += $(o.containment).scrollLeft() || 0;
+ curtop += $(o.containment).scrollTop() || 0;
+ }
+
+ //Store needed variables
+ this.offset = this.helper.offset();
+ this.position = { left: curleft, top: curtop };
+ this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.originalPosition = { left: curleft, top: curtop };
+ this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
+ this.originalMousePosition = { left: event.pageX, top: event.pageY };
+
+ //Aspect Ratio
+ this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
+
+ var cursor = $('.ui-resizable-' + this.axis).css('cursor');
+ $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);
+
+ el.addClass("ui-resizable-resizing");
+ this._propagate("start", event);
+ return true;
+ },
+
+ _mouseDrag: function(event) {
+
+ //Increase performance, avoid regex
+ var el = this.helper, o = this.options, props = {},
+ self = this, smp = this.originalMousePosition, a = this.axis;
+
+ var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
+ var trigger = this._change[a];
+ if (!trigger) return false;
+
+ // Calculate the attrs that will be change
+ var data = trigger.apply(this, [event, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;
+
+ if (this._aspectRatio || event.shiftKey)
+ data = this._updateRatio(data, event);
+
+ data = this._respectSize(data, event);
+
+ // plugins callbacks need to be called first
+ this._propagate("resize", event);
+
+ el.css({
+ top: this.position.top + "px", left: this.position.left + "px",
+ width: this.size.width + "px", height: this.size.height + "px"
+ });
+
+ if (!this._helper && this._proportionallyResizeElements.length)
+ this._proportionallyResize();
+
+ this._updateCache(data);
+
+ // calling the user callback at the end
+ this._trigger('resize', event, this.ui());
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+
+ this.resizing = false;
+ var o = this.options, self = this;
+
+ if(this._helper) {
+ var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+ soffsetw = ista ? 0 : self.sizeDiff.width;
+
+ var s = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+ left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
+ top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
+
+ if (!o.animate)
+ this.element.css($.extend(s, { top: top, left: left }));
+
+ self.helper.height(self.size.height);
+ self.helper.width(self.size.width);
+
+ if (this._helper && !o.animate) this._proportionallyResize();
+ }
+
+ $('body').css('cursor', 'auto');
+
+ this.element.removeClass("ui-resizable-resizing");
+
+ this._propagate("stop", event);
+
+ if (this._helper) this.helper.remove();
+ return false;
+
+ },
+
+ _updateCache: function(data) {
+ var o = this.options;
+ this.offset = this.helper.offset();
+ if (isNumber(data.left)) this.position.left = data.left;
+ if (isNumber(data.top)) this.position.top = data.top;
+ if (isNumber(data.height)) this.size.height = data.height;
+ if (isNumber(data.width)) this.size.width = data.width;
+ },
+
+ _updateRatio: function(data, event) {
+
+ var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
+
+ if (data.height) data.width = (csize.height * this.aspectRatio);
+ else if (data.width) data.height = (csize.width / this.aspectRatio);
+
+ if (a == 'sw') {
+ data.left = cpos.left + (csize.width - data.width);
+ data.top = null;
+ }
+ if (a == 'nw') {
+ data.top = cpos.top + (csize.height - data.height);
+ data.left = cpos.left + (csize.width - data.width);
+ }
+
+ return data;
+ },
+
+ _respectSize: function(data, event) {
+
+ var el = this.helper, o = this.options, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,
+ ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
+ isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height);
+
+ if (isminw) data.width = o.minWidth;
+ if (isminh) data.height = o.minHeight;
+ if (ismaxw) data.width = o.maxWidth;
+ if (ismaxh) data.height = o.maxHeight;
+
+ var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
+ var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
+
+ if (isminw && cw) data.left = dw - o.minWidth;
+ if (ismaxw && cw) data.left = dw - o.maxWidth;
+ if (isminh && ch) data.top = dh - o.minHeight;
+ if (ismaxh && ch) data.top = dh - o.maxHeight;
+
+ // fixing jump error on top/left - bug #2330
+ var isNotwh = !data.width && !data.height;
+ if (isNotwh && !data.left && data.top) data.top = null;
+ else if (isNotwh && !data.top && data.left) data.left = null;
+
+ return data;
+ },
+
+ _proportionallyResize: function() {
+
+ var o = this.options;
+ if (!this._proportionallyResizeElements.length) return;
+ var element = this.helper || this.element;
+
+ for (var i=0; i < this._proportionallyResizeElements.length; i++) {
+
+ var prel = this._proportionallyResizeElements[i];
+
+ if (!this.borderDif) {
+ var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
+ p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
+
+ this.borderDif = $.map(b, function(v, i) {
+ var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
+ return border + padding;
+ });
+ }
+
+ if ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length)))
+ continue;
+
+ prel.css({
+ height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
+ width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
+ });
+
+ };
+
+ },
+
+ _renderProxy: function() {
+
+ var el = this.element, o = this.options;
+ this.elementOffset = el.offset();
+
+ if(this._helper) {
+
+ this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
+
+ // fix ie6 offset TODO: This seems broken
+ var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0),
+ pxyoffset = ( ie6 ? 2 : -1 );
+
+ this.helper.addClass(this._helper).css({
+ width: this.element.outerWidth() + pxyoffset,
+ height: this.element.outerHeight() + pxyoffset,
+ position: 'absolute',
+ left: this.elementOffset.left - ie6offset +'px',
+ top: this.elementOffset.top - ie6offset +'px',
+ zIndex: ++o.zIndex //TODO: Don't modify option
+ });
+
+ this.helper
+ .appendTo("body")
+ .disableSelection();
+
+ } else {
+ this.helper = this.element;
+ }
+
+ },
+
+ _change: {
+ e: function(event, dx, dy) {
+ return { width: this.originalSize.width + dx };
+ },
+ w: function(event, dx, dy) {
+ var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+ return { left: sp.left + dx, width: cs.width - dx };
+ },
+ n: function(event, dx, dy) {
+ var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+ return { top: sp.top + dy, height: cs.height - dy };
+ },
+ s: function(event, dx, dy) {
+ return { height: this.originalSize.height + dy };
+ },
+ se: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+ },
+ sw: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+ },
+ ne: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+ },
+ nw: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+ }
+ },
+
+ _propagate: function(n, event) {
+ $.ui.plugin.call(this, n, [event, this.ui()]);
+ (n != "resize" && this._trigger(n, event, this.ui()));
+ },
+
+ plugins: {},
+
+ ui: function() {
+ return {
+ originalElement: this.originalElement,
+ element: this.element,
+ helper: this.helper,
+ position: this.position,
+ size: this.size,
+ originalSize: this.originalSize,
+ originalPosition: this.originalPosition
+ };
+ }
+
+}));
+
+$.extend($.ui.resizable, {
+ version: "1.7",
+ eventPrefix: "resize",
+ defaults: {
+ alsoResize: false,
+ animate: false,
+ animateDuration: "slow",
+ animateEasing: "swing",
+ aspectRatio: false,
+ autoHide: false,
+ cancel: ":input,option",
+ containment: false,
+ delay: 0,
+ distance: 1,
+ ghost: false,
+ grid: false,
+ handles: "e,s,se",
+ helper: false,
+ maxHeight: null,
+ maxWidth: null,
+ minHeight: 10,
+ minWidth: 10,
+ zIndex: 1000
+ }
+});
+
+/*
+ * Resizable Extensions
+ */
+
+$.ui.plugin.add("resizable", "alsoResize", {
+
+ start: function(event, ui) {
+
+ var self = $(this).data("resizable"), o = self.options;
+
+ _store = function(exp) {
+ $(exp).each(function() {
+ $(this).data("resizable-alsoresize", {
+ width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10),
+ left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10)
+ });
+ });
+ };
+
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) {
+ if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
+ else { $.each(o.alsoResize, function(exp, c) { _store(exp); }); }
+ }else{
+ _store(o.alsoResize);
+ }
+ },
+
+ resize: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options, os = self.originalSize, op = self.originalPosition;
+
+ var delta = {
+ height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
+ top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
+ },
+
+ _alsoResize = function(exp, c) {
+ $(exp).each(function() {
+ var el = $(this), start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];
+
+ $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) {
+ var sum = (start[prop]||0) + (delta[prop]||0);
+ if (sum && sum >= 0)
+ style[prop] = sum || null;
+ });
+
+ //Opera fixing relative position
+ if (/relative/.test(el.css('position')) && $.browser.opera) {
+ self._revertToRelativePosition = true;
+ el.css({ position: 'absolute', top: 'auto', left: 'auto' });
+ }
+
+ el.css(style);
+ });
+ };
+
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
+ $.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); });
+ }else{
+ _alsoResize(o.alsoResize);
+ }
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable");
+
+ //Opera fixing relative position
+ if (self._revertToRelativePosition && $.browser.opera) {
+ self._revertToRelativePosition = false;
+ el.css({ position: 'relative' });
+ }
+
+ $(this).removeData("resizable-alsoresize-start");
+ }
+});
+
+$.ui.plugin.add("resizable", "animate", {
+
+ stop: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options;
+
+ var pr = self._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+ soffsetw = ista ? 0 : self.sizeDiff.width;
+
+ var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+ left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
+ top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
+
+ self.element.animate(
+ $.extend(style, top && left ? { top: top, left: left } : {}), {
+ duration: o.animateDuration,
+ easing: o.animateEasing,
+ step: function() {
+
+ var data = {
+ width: parseInt(self.element.css('width'), 10),
+ height: parseInt(self.element.css('height'), 10),
+ top: parseInt(self.element.css('top'), 10),
+ left: parseInt(self.element.css('left'), 10)
+ };
+
+ if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });
+
+ // propagating resize, and updating values for each animation step
+ self._updateCache(data);
+ self._propagate("resize", event);
+
+ }
+ }
+ );
+ }
+
+});
+
+$.ui.plugin.add("resizable", "containment", {
+
+ start: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options, el = self.element;
+ var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
+ if (!ce) return;
+
+ self.containerElement = $(ce);
+
+ if (/document/.test(oc) || oc == document) {
+ self.containerOffset = { left: 0, top: 0 };
+ self.containerPosition = { left: 0, top: 0 };
+
+ self.parentData = {
+ element: $(document), left: 0, top: 0,
+ width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
+ };
+ }
+
+ // i'm a node, so compute top, left, right, bottom
+ else {
+ var element = $(ce), p = [];
+ $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
+
+ self.containerOffset = element.offset();
+ self.containerPosition = element.position();
+ self.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
+
+ var co = self.containerOffset, ch = self.containerSize.height, cw = self.containerSize.width,
+ width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
+
+ self.parentData = {
+ element: ce, left: co.left, top: co.top, width: width, height: height
+ };
+ }
+ },
+
+ resize: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options,
+ ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
+ pRatio = o._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
+
+ if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
+
+ if (cp.left < (self._helper ? co.left : 0)) {
+ self.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left));
+ if (pRatio) self.size.height = self.size.width / o.aspectRatio;
+ self.position.left = o.helper ? co.left : 0;
+ }
+
+ if (cp.top < (self._helper ? co.top : 0)) {
+ self.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top);
+ if (pRatio) self.size.width = self.size.height * o.aspectRatio;
+ self.position.top = self._helper ? co.top : 0;
+ }
+
+ self.offset.left = self.parentData.left+self.position.left;
+ self.offset.top = self.parentData.top+self.position.top;
+
+ var woset = Math.abs( (self._helper ? self.offset.left - cop.left : (self.offset.left - cop.left)) + self.sizeDiff.width ),
+ hoset = Math.abs( (self._helper ? self.offset.top - cop.top : (self.offset.top - co.top)) + self.sizeDiff.height );
+
+ var isParent = self.containerElement.get(0) == self.element.parent().get(0),
+ isOffsetRelative = /relative|absolute/.test(self.containerElement.css('position'));
+
+ if(isParent && isOffsetRelative) woset -= self.parentData.left;
+
+ if (woset + self.size.width >= self.parentData.width) {
+ self.size.width = self.parentData.width - woset;
+ if (pRatio) self.size.height = self.size.width / o.aspectRatio;
+ }
+
+ if (hoset + self.size.height >= self.parentData.height) {
+ self.size.height = self.parentData.height - hoset;
+ if (pRatio) self.size.width = self.size.height * o.aspectRatio;
+ }
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options, cp = self.position,
+ co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;
+
+ var helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height;
+
+ if (self._helper && !o.animate && (/relative/).test(ce.css('position')))
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+ if (self._helper && !o.animate && (/static/).test(ce.css('position')))
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+ }
+});
+
+$.ui.plugin.add("resizable", "ghost", {
+
+ start: function(event, ui) {
+
+ var self = $(this).data("resizable"), o = self.options, cs = self.size;
+
+ self.ghost = self.originalElement.clone();
+ self.ghost
+ .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
+ .addClass('ui-resizable-ghost')
+ .addClass(typeof o.ghost == 'string' ? o.ghost : '');
+
+ self.ghost.appendTo(self.helper);
+
+ },
+
+ resize: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options;
+ if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options;
+ if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
+ }
+
+});
+
+$.ui.plugin.add("resizable", "grid", {
+
+ resize: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options, cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey;
+ o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
+ var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
+
+ if (/^(se|s|e)$/.test(a)) {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ }
+ else if (/^(ne)$/.test(a)) {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ self.position.top = op.top - oy;
+ }
+ else if (/^(sw)$/.test(a)) {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ self.position.left = op.left - ox;
+ }
+ else {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ self.position.top = op.top - oy;
+ self.position.left = op.left - ox;
+ }
+ }
+
+});
+
+var num = function(v) {
+ return parseInt(v, 10) || 0;
+};
+
+var isNumber = function(value) {
+ return !isNaN(parseInt(value, 10));
+};
+
+})(jQuery);
--- /dev/null
+/*
+ * jQuery UI Slider 1.7
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Slider
+ *
+ * Depends:
+ * ui.core.js
+ */
+
+(function($) {
+
+$.widget("ui.slider", $.extend({}, $.ui.mouse, {
+
+ _init: function() {
+
+ var self = this, o = this.options;
+ this._keySliding = false;
+ this._handleIndex = null;
+ this._detectOrientation();
+ this._mouseInit();
+
+ this.element
+ .addClass("ui-slider"
+ + " ui-slider-" + this.orientation
+ + " ui-widget"
+ + " ui-widget-content"
+ + " ui-corner-all");
+
+ this.range = $([]);
+
+ if (o.range) {
+
+ if (o.range === true) {
+ this.range = $('<div></div>');
+ if (!o.values) o.values = [this._valueMin(), this._valueMin()];
+ if (o.values.length && o.values.length != 2) {
+ o.values = [o.values[0], o.values[0]];
+ }
+ } else {
+ this.range = $('<div></div>');
+ }
+
+ this.range
+ .appendTo(this.element)
+ .addClass("ui-slider-range");
+
+ if (o.range == "min" || o.range == "max") {
+ this.range.addClass("ui-slider-range-" + o.range);
+ }
+
+ // note: this isn't the most fittingly semantic framework class for this element,
+ // but worked best visually with a variety of themes
+ this.range.addClass("ui-widget-header");
+
+ }
+
+ if ($(".ui-slider-handle", this.element).length == 0)
+ $('<a href="#"></a>')
+ .appendTo(this.element)
+ .addClass("ui-slider-handle");
+
+ if (o.values && o.values.length) {
+ while ($(".ui-slider-handle", this.element).length < o.values.length)
+ $('<a href="#"></a>')
+ .appendTo(this.element)
+ .addClass("ui-slider-handle");
+ }
+
+ this.handles = $(".ui-slider-handle", this.element)
+ .addClass("ui-state-default"
+ + " ui-corner-all");
+
+ this.handle = this.handles.eq(0);
+
+ this.handles.add(this.range).filter("a")
+ .click(function(event) { event.preventDefault(); })
+ .hover(function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); })
+ .focus(function() { $(".ui-slider .ui-state-focus").removeClass('ui-state-focus'); $(this).addClass('ui-state-focus'); })
+ .blur(function() { $(this).removeClass('ui-state-focus'); });
+
+ this.handles.each(function(i) {
+ $(this).data("index.ui-slider-handle", i);
+ });
+
+ this.handles.keydown(function(event) {
+
+ var ret = true;
+
+ var index = $(this).data("index.ui-slider-handle");
+
+ if (self.options.disabled)
+ return;
+
+ switch (event.keyCode) {
+ case $.ui.keyCode.HOME:
+ case $.ui.keyCode.END:
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ ret = false;
+ if (!self._keySliding) {
+ self._keySliding = true;
+ $(this).addClass("ui-state-active");
+ self._start(event, index);
+ }
+ break;
+ }
+
+ var curVal, newVal, step = self._step();
+ if (self.options.values && self.options.values.length) {
+ curVal = newVal = self.values(index);
+ } else {
+ curVal = newVal = self.value();
+ }
+
+ switch (event.keyCode) {
+ case $.ui.keyCode.HOME:
+ newVal = self._valueMin();
+ break;
+ case $.ui.keyCode.END:
+ newVal = self._valueMax();
+ break;
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ if(curVal == self._valueMax()) return;
+ newVal = curVal + step;
+ break;
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ if(curVal == self._valueMin()) return;
+ newVal = curVal - step;
+ break;
+ }
+
+ self._slide(event, index, newVal);
+
+ return ret;
+
+ }).keyup(function(event) {
+
+ var index = $(this).data("index.ui-slider-handle");
+
+ if (self._keySliding) {
+ self._stop(event, index);
+ self._change(event, index);
+ self._keySliding = false;
+ $(this).removeClass("ui-state-active");
+ }
+
+ });
+
+ this._refreshValue();
+
+ },
+
+ destroy: function() {
+
+ this.handles.remove();
+
+ this.element
+ .removeClass("ui-slider"
+ + " ui-slider-horizontal"
+ + " ui-slider-vertical"
+ + " ui-slider-disabled"
+ + " ui-widget"
+ + " ui-widget-content"
+ + " ui-corner-all")
+ .removeData("slider")
+ .unbind(".slider");
+
+ this._mouseDestroy();
+
+ },
+
+ _mouseCapture: function(event) {
+
+ var o = this.options;
+
+ if (o.disabled)
+ return false;
+
+ this.elementSize = {
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight()
+ };
+ this.elementOffset = this.element.offset();
+
+ var position = { x: event.pageX, y: event.pageY };
+ var normValue = this._normValueFromMouse(position);
+
+ var distance = this._valueMax() + 1, closestHandle;
+ var self = this, index;
+ this.handles.each(function(i) {
+ var thisDistance = Math.abs(normValue - self.values(i));
+ if (distance > thisDistance) {
+ distance = thisDistance;
+ closestHandle = $(this);
+ index = i;
+ }
+ });
+
+ // workaround for bug #3736 (if both handles of a range are at 0,
+ // the first is always used as the one with least distance,
+ // and moving it is obviously prevented by preventing negative ranges)
+ if(o.range == true && this.values(1) == o.min) {
+ closestHandle = $(this.handles[++index]);
+ }
+
+ this._start(event, index);
+
+ self._handleIndex = index;
+
+ closestHandle
+ .addClass("ui-state-active")
+ .focus();
+
+ var offset = closestHandle.offset();
+ var mouseOverHandle = !$(event.target).parents().andSelf().is('.ui-slider-handle');
+ this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
+ left: event.pageX - offset.left - (closestHandle.width() / 2),
+ top: event.pageY - offset.top
+ - (closestHandle.height() / 2)
+ - (parseInt(closestHandle.css('borderTopWidth'),10) || 0)
+ - (parseInt(closestHandle.css('borderBottomWidth'),10) || 0)
+ + (parseInt(closestHandle.css('marginTop'),10) || 0)
+ };
+
+ normValue = this._normValueFromMouse(position);
+ this._slide(event, index, normValue);
+ return true;
+
+ },
+
+ _mouseStart: function(event) {
+ return true;
+ },
+
+ _mouseDrag: function(event) {
+
+ var position = { x: event.pageX, y: event.pageY };
+ var normValue = this._normValueFromMouse(position);
+
+ this._slide(event, this._handleIndex, normValue);
+
+ return false;
+
+ },
+
+ _mouseStop: function(event) {
+
+ this.handles.removeClass("ui-state-active");
+ this._stop(event, this._handleIndex);
+ this._change(event, this._handleIndex);
+ this._handleIndex = null;
+ this._clickOffset = null;
+
+ return false;
+
+ },
+
+ _detectOrientation: function() {
+ this.orientation = this.options.orientation == 'vertical' ? 'vertical' : 'horizontal';
+ },
+
+ _normValueFromMouse: function(position) {
+
+ var pixelTotal, pixelMouse;
+ if ('horizontal' == this.orientation) {
+ pixelTotal = this.elementSize.width;
+ pixelMouse = position.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0);
+ } else {
+ pixelTotal = this.elementSize.height;
+ pixelMouse = position.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0);
+ }
+
+ var percentMouse = (pixelMouse / pixelTotal);
+ if (percentMouse > 1) percentMouse = 1;
+ if (percentMouse < 0) percentMouse = 0;
+ if ('vertical' == this.orientation)
+ percentMouse = 1 - percentMouse;
+
+ var valueTotal = this._valueMax() - this._valueMin(),
+ valueMouse = percentMouse * valueTotal,
+ valueMouseModStep = valueMouse % this.options.step,
+ normValue = this._valueMin() + valueMouse - valueMouseModStep;
+
+ if (valueMouseModStep > (this.options.step / 2))
+ normValue += this.options.step;
+
+ // Since JavaScript has problems with large floats, round
+ // the final value to 5 digits after the decimal point (see #4124)
+ return parseFloat(normValue.toFixed(5));
+
+ },
+
+ _start: function(event, index) {
+ this._trigger("start", event, this._uiHash(index));
+ },
+
+ _slide: function(event, index, newVal) {
+
+ var handle = this.handles[index];
+
+ if (this.options.values && this.options.values.length) {
+
+ var otherVal = this.values(index ? 0 : 1);
+
+ if ((index == 0 && newVal >= otherVal) || (index == 1 && newVal <= otherVal))
+ newVal = otherVal;
+
+ if (newVal != this.values(index)) {
+ var newValues = this.values();
+ newValues[index] = newVal;
+ // A slide can be canceled by returning false from the slide callback
+ var allowed = this._trigger("slide", event, this._uiHash(index, newVal, newValues));
+ var otherVal = this.values(index ? 0 : 1);
+ if (allowed !== false) {
+ this.values(index, newVal, ( event.type == 'mousedown' && this.options.animate ), true);
+ }
+ }
+
+ } else {
+
+ if (newVal != this.value()) {
+ // A slide can be canceled by returning false from the slide callback
+ var allowed = this._trigger("slide", event, this._uiHash(index, newVal));
+ if (allowed !== false) {
+ this._setData('value', newVal, ( event.type == 'mousedown' && this.options.animate ));
+ }
+
+ }
+
+ }
+
+ },
+
+ _stop: function(event, index) {
+ this._trigger("stop", event, this._uiHash(index));
+ },
+
+ _change: function(event, index) {
+ this._trigger("change", event, this._uiHash(index));
+ },
+
+ value: function(newValue) {
+
+ if (arguments.length) {
+ this._setData("value", newValue);
+ this._change(null, 0);
+ }
+
+ return this._value();
+
+ },
+
+ values: function(index, newValue, animated, noPropagation) {
+
+ if (arguments.length > 1) {
+ this.options.values[index] = newValue;
+ this._refreshValue(animated);
+ if(!noPropagation) this._change(null, index);
+ }
+
+ if (arguments.length) {
+ if (this.options.values && this.options.values.length) {
+ return this._values(index);
+ } else {
+ return this.value();
+ }
+ } else {
+ return this._values();
+ }
+
+ },
+
+ _setData: function(key, value, animated) {
+
+ $.widget.prototype._setData.apply(this, arguments);
+
+ switch (key) {
+ case 'orientation':
+
+ this._detectOrientation();
+
+ this.element
+ .removeClass("ui-slider-horizontal ui-slider-vertical")
+ .addClass("ui-slider-" + this.orientation);
+ this._refreshValue(animated);
+ break;
+ case 'value':
+ this._refreshValue(animated);
+ break;
+ }
+
+ },
+
+ _step: function() {
+ var step = this.options.step;
+ return step;
+ },
+
+ _value: function() {
+
+ var val = this.options.value;
+ if (val < this._valueMin()) val = this._valueMin();
+ if (val > this._valueMax()) val = this._valueMax();
+
+ return val;
+
+ },
+
+ _values: function(index) {
+
+ if (arguments.length) {
+ var val = this.options.values[index];
+ if (val < this._valueMin()) val = this._valueMin();
+ if (val > this._valueMax()) val = this._valueMax();
+
+ return val;
+ } else {
+ return this.options.values;
+ }
+
+ },
+
+ _valueMin: function() {
+ var valueMin = this.options.min;
+ return valueMin;
+ },
+
+ _valueMax: function() {
+ var valueMax = this.options.max;
+ return valueMax;
+ },
+
+ _refreshValue: function(animate) {
+
+ var oRange = this.options.range, o = this.options, self = this;
+
+ if (this.options.values && this.options.values.length) {
+ var vp0, vp1;
+ this.handles.each(function(i, j) {
+ var valPercent = (self.values(i) - self._valueMin()) / (self._valueMax() - self._valueMin()) * 100;
+ var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%';
+ $(this).stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate);
+ if (self.options.range === true) {
+ if (self.orientation == 'horizontal') {
+ (i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ left: valPercent + '%' }, o.animate);
+ (i == 1) && self.range[animate ? 'animate' : 'css']({ width: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate });
+ } else {
+ (i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ bottom: (valPercent) + '%' }, o.animate);
+ (i == 1) && self.range[animate ? 'animate' : 'css']({ height: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate });
+ }
+ }
+ lastValPercent = valPercent;
+ });
+ } else {
+ var value = this.value(),
+ valueMin = this._valueMin(),
+ valueMax = this._valueMax(),
+ valPercent = valueMax != valueMin
+ ? (value - valueMin) / (valueMax - valueMin) * 100
+ : 0;
+ var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%';
+ this.handle.stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate);
+
+ (oRange == "min") && (this.orientation == "horizontal") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ width: valPercent + '%' }, o.animate);
+ (oRange == "max") && (this.orientation == "horizontal") && this.range[animate ? 'animate' : 'css']({ width: (100 - valPercent) + '%' }, { queue: false, duration: o.animate });
+ (oRange == "min") && (this.orientation == "vertical") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ height: valPercent + '%' }, o.animate);
+ (oRange == "max") && (this.orientation == "vertical") && this.range[animate ? 'animate' : 'css']({ height: (100 - valPercent) + '%' }, { queue: false, duration: o.animate });
+ }
+
+ },
+
+ _uiHash: function(index, value, values) {
+
+ var multiple = this.options.values && this.options.values.length;
+ return {
+ handle: this.handles[index],
+ value: value || (multiple ? this.values(index) : this.value()),
+ values: values || (multiple && this.values())
+ };
+
+ }
+
+}));
+
+$.extend($.ui.slider, {
+ getter: "value values",
+ version: "1.7",
+ eventPrefix: "slide",
+ defaults: {
+ animate: false,
+ delay: 0,
+ distance: 0,
+ max: 100,
+ min: 0,
+ orientation: 'horizontal',
+ range: false,
+ step: 1,
+ value: 0,
+ values: null
+ }
+});
+
+})(jQuery);
--- /dev/null
+#PHP IMAGE EDITOR TEXTS\r
+EDIT IMAGE=Edit Image\r
+RESIZE IMAGE=Resize Image\r
+WIDTH=Width\r
+HEIGHT=Height\r
+KEEP PROPORTIONS=Keep Proportions\r
+ROTATE IMAGE=Rotate Image\r
+LEFT 90 DEGREES=Left 90 Degrees\r
+RIGHT 90 DEGREES=Right 90 Degrees\r
+CROP IMAGE=Crop Image\r
+EFFECTS=Effects\r
+SELECT EFFECT=Select Effect\r
+SAVE AND CLOSE=Save and Close\r
+GRAYSCALE=Grayscale\r
+CONTRAST=Contrast\r
+BRIGHTNESS=Brightness \r
+DARKER=Darker\r
+IS REQUIRED=is required\r
+MUST BE NUMERIC=must be numeric\r
+NOT NEGATIVE=must be a positive number\r
+NOT IN RANGE=is not in valid range\r
+CANT BE LARGER THEN=can´t be larger then\r
+NO PROVIDED IMAGE=No image has been provided.\r
+IMAGE DOES NOT EXIST=The image doesn´t exist.\r
+INVALID IMAGE TYPE=Image must be of type jpeg, png or gif.\r
+OLD PHP VERSION=is too old php version. Minimum is:\r
+OLD GD VERSION=is too old GD version. Minimum is:\r
+UNDO=Undo\r
+UPDATE=Update\r
+LOADING=Loading\r
+AN UNEXPECTED ERROR=An unexpected error has occured, please try again...\r
+RESIZE HELP=Update Width and Height fields.<br/>Or drag and drop in the right or bottom side of the image.\r
+CROP HELP=Drag and drop to create a crop area on the image.\r
+CROP WIDTH=Crop Width\r
+CROP HEIGHT=Crop Height\r
+CROP KEEP PROPORTIONS=Keep Crop Proportions\r
+INSTRUCTIONS=Instructions
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+ * Page.php
+ *
+ * PHP version 5
+ *
+ * All rights reserved.
+ *
+ * @category Toolkit
+ * @package Page
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license http://demo.gaslightmedia.com Gaslight Media
+ * @version CVS: $Id: Page.php,v 1.80 2010/08/16 17:39:58 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+/**
+ * Page for Error Doc
+ */
+define("ERROR_DOCUMENT", "404.html");
+
+/**
+ * The home page template
+ */
+define("HOME_TEMPLATE", "template.html");
+
+/**
+ * inside page template
+ */
+define("INSIDE_TEMPLATE", "template.html");
+
+/**
+ * Template for the error doc
+ */
+define("ERROR_DOCUMENT_TEMPLATE", "404-template.html");
+
+/**
+ * page title default
+ */
+define("PAGE_TITLE", SITENAME);
+
+/**
+ * Toolkit_Page
+ *
+ * A class Object for use with merging into the flexy template for output.
+ * Sets up the $page object used for merging with the flexy template
+ * to output the toolbox and members admin content
+ *
+ * @category Toolkit
+ * @package Page
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license http://demo.gaslightmedia.com Gaslight Media
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_Page
+{
+
+ /**
+ * used on img src and style href tags
+ * @var $baseURL
+ * @access public
+ */
+ public $mediaBaseURL;
+
+ /**
+ * used in href's
+ * @var $baseURL
+ * @access public
+ */
+ public $baseURLDefined;
+
+ /**
+ * meta tag description element
+ * @var $metaTags
+ * @access public
+ */
+ public $metaTags;
+
+ /**
+ * title tag node
+ * @var string
+ * @access public
+ */
+ public $pageTitle;
+
+ /**
+ * The main content of website
+ * @var $toolboxContent
+ * @access public
+ */
+ public $toolboxContent;
+ private $_breadCrumbs;
+ private $_toolboxPage;
+ private $_pageGateway;
+ private $_paragraphGateway;
+ private $_navigationFactory;
+ private $_keywordReplacement;
+ private $_catid;
+
+ /**
+ * Creates objects for class Page
+ *
+ * @param Toolkit_Template_Page $toolboxPage Toolbox Page
+ * @param Toolkit_BreadCrumbsFactory $breadCrumbsFactory BreadCrumbes
+ * @param Toolkit_Toolbox_GatewayFactoryAbstract $pageGatewayFactory Page Gateway
+ * @param Toolkit_Toolbox_GatewayFactoryAbstract $paragraphGatewayFactory Paragraph
+ * @param Toolkit_NavigationFactoryAbstract $navFactory Navigation
+ * @param Toolkit_Template_KeywordReplacement $keywordReplacement Keyword replacements
+ * @param type $catid catid
+ *
+ * @return void
+ */
+ public function __construct(
+ Toolkit_Template_Page $toolboxPage,
+ Toolkit_BreadCrumbsFactory $breadCrumbsFactory,
+ Toolkit_Toolbox_GatewayFactoryAbstract $pageGatewayFactory,
+ Toolkit_Toolbox_GatewayFactoryAbstract $paragraphGatewayFactory,
+ Toolkit_NavigationFactoryAbstract $navFactory,
+ Toolkit_Template_KeywordReplacement $keywordReplacement, $catid
+ ) {
+ $this->_toolboxPage = $toolboxPage;
+ $this->_breadCrumbs = $breadCrumbsFactory;
+ $this->_pageGateway = $pageGatewayFactory->createGateway();
+ $this->_paragraphGateway = $paragraphGatewayFactory->createGateway();
+ $this->_navigationFactory = $navFactory;
+ $this->_keywordReplacement = $keywordReplacement;
+ $this->_catid = $catid;
+
+ // determine the base url to use (for images and stylesheet urls)
+ $this->mediaBaseURL = MEDIA_BASE_URL;
+
+ $this->baseURLDefined = BASE_URL;
+
+ // determine the base url to use (for MEDIA_APP_BASE_URL)
+ $this->glmAppBaseURL = MEDIA_APP_BASE_URL;
+
+ $this->sitemapURL = $this->BaseURLDefined . 'site-map';
+
+ $this->homePageUrl
+ = ($_ENV['GLM_HOST_ID'] == 'PRODUCTION')
+ ? BASE_URL
+ : BASE_URL . 'index.php';
+
+ // Resources needed for every page.
+ $GLOBALS['styleSheets'] = array();
+ // Resources needed for every page.
+ $GLOBALS['topScripts'][] = JQUERY_CDN_JS;
+ }
+
+ private function _video()
+ {
+ //$GLOBALS['styleSheets'][]
+ // = GLM_APP_BASE_URL . 'gallery/colorbox/colorbox.css';
+ //$GLOBALS['bottomScripts'][]
+ // = GLM_APP_BASE_URL . 'libjs/plugins/colorbox/1.3.15/jquery.colorbox-min.js';
+ //$GLOBALS['bottomScripts'][]
+ // = BASE_URL . 'Toolkit/Videos/libjs/thickbox.js';
+ $GLOBALS['bottomScripts'][]
+ = BASE_URL . 'Toolkit/Videos/libjs/videos.js';
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ SELECT id
+ FROM videos
+ WHERE featured = true
+ AND active = true
+ ORDER BY pos
+ LIMIT 1
+ OFFSET 0";
+ $row = $dbh->query($sql)->fetch(PDO::FETCH_ASSOC);
+ if ($row) {
+ $video = new Toolkit_Videos_WebDecorator();
+ $this->video = $video->toHtml(
+ Toolkit_Database::getInstance(),
+ $this->_pageGateway
+ );
+ }
+ }
+
+ /**
+ * Add Banner module
+ *
+ * @param array $page toolbox page
+ *
+ * @return void
+ * @access public
+ */
+ public function banners(array $page)
+ {
+ $bannerConf = new Config;
+ $bannerRoot = & $bannerConf->parseConfig(
+ BASE . 'Toolkit/Banners/config.ini', 'IniFile'
+ );
+ $dbh = Toolkit_Database::getInstance();
+
+ // top banners
+ $banners = & Toolkit_Banners_BannersIterator::create('Bottom');
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ $categoriesIterator = Toolkit_Members_CategoriesIterator::create();
+ $banners->fetchAllAvailable(
+ $dbh, $bannerRoot, $categoriesIterator, $page['id']
+ );
+ } else {
+ $banners->fetchAllAssignedToPage($dbh, $bannerRoot, $page['id']);
+ }
+
+ $availableBanners = $banners->getAvailable();
+
+ // Are there any banners even available
+ if (count($availableBanners)) {
+ $GLOBALS['bottomScripts'][]
+ = $this->glmAppBaseURL . 'libjs/banner-link.js';
+ $decoratorsTop = Toolkit_Banners_StaticBannersDecorator::create();
+ foreach ($availableBanners as $i) {
+ $decorator = Toolkit_Banners_HorizontalDecorator::create($i);
+ $decoratorsTop->add($decorator);
+ }
+
+ // application configuration
+ $conf = new Config;
+ $bannersRoot = & $conf->parseConfig(
+ BASE . 'Toolkit/Banners/config.ini', 'IniFile'
+ );
+
+ $this->hasBanner = count($decoratorsTop->getIterator());
+
+ if ($this->hasBanner) {
+
+ $mailerFactory = new Toolkit_Banners_MailerFactory(
+ $bannersRoot,
+ $GLOBALS['flexyOptions']
+ );
+
+ $notifier = new Toolkit_Banners_Notifier($mailerFactory, $dbh);
+
+ $this->bannerAds = $decoratorsTop->toHtml(
+ $dbh,
+ new Toolkit_Image_Server(),
+ $notifier,
+ $page['id'],
+ 'top'
+ );
+ }
+ }
+ // side banners
+ $banners = & Toolkit_Banners_BannersIterator::create('Side');
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ $categoriesIterator = Toolkit_Members_CategoriesIterator::create();
+ $banners->fetchAllAvailable(
+ $dbh, $bannerRoot, $categoriesIterator, $page['id']
+ );
+ } else {
+ $banners->fetchAllAssignedToPage($dbh, $bannerRoot, $page['id']);
+ }
+
+ $availableSideBanners = $banners->getAvailable();
+
+ // Are there any banners even available
+ if (count($availableSideBanners)) {
+ $GLOBALS['bottomScripts'][]
+ = $this->glmAppBaseURL . 'libjs/banner-link.js';
+ $decoratorsSide = Toolkit_Banners_StaticBannersDecorator::create();
+ foreach ($availableSideBanners as $i) {
+ $decorator = Toolkit_Banners_VerticalDecorator::create($i);
+ $decoratorsSide->add($decorator);
+ }
+
+ // application configuration
+ $conf = new Config;
+ $bannersRoot = & $conf->parseConfig(
+ BASE . 'Toolkit/Banners/config.ini', 'IniFile'
+ );
+
+ $this->hasSideBanner = count($decoratorsSide->getIterator());
+ if ($this->hasSideBanner) {
+
+ $mailerFactory = new Toolkit_Banners_MailerFactory(
+ $bannersRoot,
+ $GLOBALS['flexyOptions']
+ );
+
+ $notifier = new Toolkit_Banners_Notifier($mailerFactory, $dbh);
+
+ $this->sideBannerAds = $decoratorsSide->toHtml(
+ $dbh,
+ new Toolkit_Image_Server(),
+ $notifier,
+ $page['id'],
+ 'side'
+ );
+ }
+ }
+ }
+
+ /**
+ * Create the error document page
+ *
+ * @return void
+ * @access public
+ */
+ function createErrorDocument()
+ {
+ $this->baseURL = MEDIA_BASE_URL;
+ $this->homeURL = $this->toolbox->get_seo_url(HOME_ID);
+ ;
+ // Initiate HTML_Template_Flexy.
+ $template = new HTML_Template_Flexy($GLOBALS['flexyOptions']);
+
+ // Create a template object for the 404 content part
+ $errorDocumentTemplate = new HTML_Template_Flexy($GLOBALS['flexyOptions']);
+ $errorDocumentTemplate->compile(ERROR_DOCUMENT_TEMPLATE);
+ $errorDocumentContents = $errorDocumentTemplate->bufferedOutputObject($this);
+
+ // set defaults
+ $this->toolboxContent = $errorDocumentContents;
+ $this->pageTitle = '404 Not Found - ' . PAGE_TITLE;
+ $this->hasHeadlines = false;
+ $this->hasAreaEvents = false;
+ $this->hasNews = false;
+ $this->sideNav = null;
+ $this->mainNav = $this->toolbox->get_main_nav();
+ $this->hasWeather = false;
+ $this->isHomePage = false;
+ $this->sitemapURL = false;
+
+ // compile the flexy template
+ $template->compile(INSIDE_TEMPLATE);
+
+ // Merge compiled template with the object.
+ $fileContents = $template->bufferedOutputObject($this);
+ file_put_contents(BASE . ERROR_DOCUMENT, $fileContents);
+ }
+
+ /**
+ * Add Event module
+ *
+ * @param Toolkit_Template_Page $toolboxPage page template
+ * @param Toolkit_Toolbox_GatewayAbstract $pageGateway page gateway
+ *
+ * @return void
+ * @access private
+ */
+ private function _events(
+ Toolkit_Template_Page $toolboxPage,
+ Toolkit_Toolbox_GatewayAbstract $pageGateway
+ ) {
+ if (defined('COMMON_EVENTS') && COMMON_EVENTS) {
+ if (!defined('COMMON_APP_BASE')) {
+ define('COMMON_APP_BASE', '/var/www/server/CommonApps/');
+ }
+ $this->events = array();
+ define('COMMON_EVENTS_SCHEMA', 'events');
+ require_once COMMON_APP_BASE . 'EventCalendar/V1/models/EventMapper.php';
+ $eventMapper = new EventMapper(Toolkit_Database::getInstance());
+
+ $events = $eventMapper->fetchFilteredEvents(
+ "slideshow is true"
+ );
+ if (is_array($events)) {
+ foreach ($events as $event) {
+ $this->events[] = array(
+ 'id' => $event->getId(),
+ 'href' => $event->getHref(),
+ 'bdate' => $event->getDates(),
+ 'header' => strip_tags($event->getHeader()),
+ 'descr' => substr(strip_tags($event->getDescription()), 0, 150),
+ 's-img' => (($event->getImage())
+ ? FILE_SERVER_URL . IS_OWNER_ID
+ . '/eventSlider/' . $event->getImage()
+ :''),
+ 't-img' => (($event->getImage())
+ ? FILE_SERVER_URL . IS_OWNER_ID
+ . '/eventFeaturedThumb/' . $event->getImage()
+ :''),
+ 'f-img' => (($event->getImage())
+ ? FILE_SERVER_URL . IS_OWNER_ID
+ . '/eventSlider/' . $event->getImage()
+ :''),
+ );
+ }
+ }
+ } else {
+ $events = new Toolkit_Events_HomeEvents(
+ Toolkit_Database::getInstance()
+ );
+ $this->events = $events->getHomeEvents();
+ }
+ $this->hasEvents = !empty($this->events);
+ $this->eventsUrl = Toolkit_Template_Page::getSeoUrl(
+ $pageGateway, EVENT_PAGE
+ );
+ }
+
+ /**
+ * Setup the page with all applications (banners home events navigation)
+ *
+ * @return void
+ */
+ public function fetchPage()
+ {
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ // check to see if this page is a member only page
+ $memberOnlyPage = Toolkit_Template_Page::isMemberOnly(
+ $this->_pageGateway, $this->_catid
+ );
+ if ($memberOnlyPage
+ && !strpos($_SERVER['REQUEST_URI'], 'members-only-area')
+ ) {
+ header('Location: ' . $this->getToolboxUrl(MEMBERS_CATEGORY));
+ }
+ }
+ $this->pageTitle = $this->_getPageTitle($this->_catid);
+
+ $bodyFactory = new Toolkit_Template_Page_BodyFactory(
+ $this->_breadCrumbs,
+ $this->_pageGateway,
+ $this->_paragraphGateway,
+ $this->_keywordReplacement,
+ new Cache_Lite($GLOBALS['cacheOptions'])
+ );
+
+ $this->toolboxContent = $this->_toolboxPage->getBody(
+ $this->_catid, $bodyFactory
+ );
+ $page = $this->_pageGateway->find($this->_catid);
+ $this->topParentId = $this->_pageGateway->findTopParent($this->_catid);
+
+ // set the metaTags
+ if ($page['meta_description']) {
+ $this->metaTags
+ = htmlentities(
+ strip_tags($page['meta_description']), ENT_QUOTES, 'UTF-8'
+ );
+ } else {
+ $this->metaTags
+ = htmlentities(
+ substr(
+ trim(strip_tags($page['description'])), 0, 250
+ ), ENT_QUOTES, 'UTF-8'
+ );
+ }
+
+ if (filter_var($_REQUEST['sitemap'], FILTER_VALIDATE_INT)) {
+ $this->isHomePage = false;
+ } elseif (HOME_ID == $page['id']) {
+ $this->isHomePage = true;
+ } else {
+ $this->isHomePage = false;
+ }
+ if ($this->_catid != HOME_ID) {
+ $this->parentPageId = $this->_pageGateway->findTopParent($this->_catid);
+ $this->pageId = $this->_catid;
+ }
+ $this->_navigationFactory->setGateway($this->_pageGateway);
+ $this->mainNav = $this->_getMainNav($this->_catid);
+ $this->sideNav = $this->_getSideNav($this->_catid);
+
+ $this->newsletterAction = Toolkit_Template_Page::getSeoUrl(
+ $this->_pageGateway, 10
+ );
+
+ $this->tripPlannerCount = isset($_SESSION['wish_list'])
+ ? count($_SESSION['wish_list'])
+ : 0;
+ $this->tripPlannerUrl = Toolkit_Template_Page::getSeoUrl(
+ $this->_pageGateway, MEMBER_SESSION_PAGE
+ );
+
+ // check if define for GOOGLE_SEARCH is set
+ if (defined("GOOGLE_SEARCH")
+ && GOOGLE_SEARCH
+ && isset($_REQUEST['query'])
+ ) {
+ $this->_googleSearch();
+ }
+
+ if ( defined("VIDEOS")
+ && VIDEOS
+ && $this->_catid == HOME_ID
+ ) {
+ $this->_video();
+ }
+
+ // check if define for GLM_SEARCH is set
+ if (defined("GLM_SEARCH")
+ && GLM_SEARCH
+ ) {
+ $this->glmSearch = GLM_SEARCH;
+ $this->glmSearchSite = GLM_SEARCH_SITE;
+ $this->glmSearchLogin = GLM_SEARCH_LOGIN;
+ $this->glmSearchKey = GLM_SEARCH_KEY;
+
+ // Check if GLMSearch page called
+ if ($_REQUEST['GLMSearch'] == 'true') {
+ $this->isHomePage = false;
+ }
+ }
+
+ // check if define for HOME_EVENTS is set
+ if (defined("HOME_EVENTS")
+ && HOME_EVENTS
+ && !filter_var($_REQUEST[ 'sitemap'], FILTER_VALIDATE_INT)
+ && !isset($_REQUEST['query'])
+ && $this->isHomePage
+ ) {
+ $this->_events($this->_toolboxPage, $this->_pageGateway);
+ }
+
+ if ( defined("GLM_BLOCKS")
+ && GLM_BLOCKS
+ && !filter_var($_REQUEST[ 'sitemap'], FILTER_VALIDATE_INT)
+ && !isset($_REQUEST['query'])
+ ) {
+ $this->_getBlocks();
+ }
+
+ if ( defined("PRESS_DB")
+ && PRESS_DB
+ && $page['id'] == PRESS_PAGE_ID
+ ) {
+ $this->_getNewsPage();
+ }
+ // check if define for WEATHER is set
+ if (defined("WEATHER") && WEATHER) {
+ $this->hasWeather = true;
+ $this->_weather();
+ }
+
+ // check if define for BANNERS is set
+ if (defined("BANNERS") && BANNERS && is_array($page)) {
+ $this->banners($page);
+ }
+
+ if (defined("ROTATING_IMAGES")
+ && ROTATING_IMAGES
+ && !filter_var($_REQUEST['sitemap'], FILTER_VALIDATE_INT)
+ && !isset($_REQUEST['query'])
+ && in_array($page['id'], array(HOME_ID))
+ ) {
+ $this->_rotatingImages();
+ }
+
+ if (defined('SEASONS') && SEASONS) {
+ $this->_seasons();
+ }
+
+ if (defined("VIDEOS")
+ && VIDEOS
+ && !filter_var($_REQUEST[ 'sitemap'], FILTER_VALIDATE_INT)
+ && !isset($_GET['query'])
+ && in_array($page['id'], array(HOME_ID))
+ ) {
+ $this->_getFeaturedVideo();
+ }
+
+ }
+
+ /**
+ * Returns page main navigation
+ *
+ * @param type $catid page catid
+ *
+ * @return type
+ */
+ private function _getMainNav($catid)
+ {
+ $nav = $this->_navigationFactory->createMainNav();
+ $mainNavArray = $nav->getNavStructure($this->_pageGateway, $catid);
+
+ return $nav->renderPageNav($mainNavArray, 'tree');
+ }
+
+ /**
+ * Returns page title
+ *
+ * @param type $id page id
+ *
+ * @return string
+ */
+ private function _getPageTitle($id)
+ {
+ if (filter_input(INPUT_GET, 'member_id', FILTER_VALIDATE_INT)) {
+ // Member profile pages can't have search page title tags
+ return SITENAME;
+ }
+
+ $page = $this->_pageGateway->find($id);
+
+ if (!empty($page['meta_title'])) {
+ $title = $page['meta_title'];
+ } elseif (!empty($page['title'])) {
+ $title = $page['title'];
+ } elseif (!empty($page['navigation_name'])) {
+ $title = $page['navigation_name'];
+ }
+
+ $title = strip_tags($title);
+
+ $title = isset($title)
+ ? htmlentities("$title - ", ENT_QUOTES, 'UTF-8') . SITENAME
+ : SITENAME;
+
+ return $title;
+ }
+
+ /**
+ * Returns side navigation
+ *
+ * @param type $catid page catid
+ *
+ * @return type
+ */
+ private function _getSideNav($catid)
+ {
+ if ($catid == HOME_ID) {
+ return;
+ } else {
+ // side nav
+ $nav
+ = $this->_navigationFactory->createSideNav($this->_pageGateway);
+ $sideNavArray = $nav->getNavStructure(
+ $this->_pageGateway, $catid
+ );
+ return (!empty($sideNavArray))
+ ? $nav->renderPageNav($sideNavArray, 'tree')
+ : '';
+ }
+ }
+
+ /**
+ * Add Google Search module
+ *
+ * @return void
+ * @access private
+ */
+ private function _googleSearch()
+ {
+ $this->gSearchOn = false;
+ $this->isHomePage = false;
+ if (isset($_REQUEST['query']) && $_REQUEST['query']) {
+ $this->gSearchOn = true;
+ $query = urlencode($_REQUEST['query']);
+ $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'css/gsearch.css';
+ $GLOBALS['bottomScripts'][]
+ = 'http://www.google.com/uds/api?file=uds.js&v=1.0&key=' .
+ GSEARCH_API;
+ $GLOBALS['bottomScripts'][]
+ = $this->mediaBaseURL . 'js/gsearch.php?query=' . $query;
+ }
+ }
+
+ /**
+ * create code for conditional styles
+ *
+ * @return type
+ */
+ public function getConditionalStyles()
+ {
+ return '
+ <!--[if lte IE 7]>
+ <link rel="stylesheet" type="text/css" href="' . MEDIA_BASE_URL . 'css/ie7.css">
+ <![endif]-->';
+ }
+
+ /**
+ * grab the navigation name for the id
+ *
+ * @param integer $id id for pages table
+ *
+ * @return string page nav name
+ * @access public
+ */
+ function getToolboxName($id)
+ {
+ $page = $this->_pageGateway->find($id);
+ return $page['navigation_name'];
+ }
+
+ /**
+ * grab the navigation url for the id
+ *
+ * @param integer $id id for pages table
+ *
+ * @return string url
+ * @access public
+ */
+ public function getToolboxUrl($id)
+ {
+ return Toolkit_Template_Page::getSeoUrl($this->_pageGateway, $id);
+ }
+
+ /**
+ * grab the home page headlines
+ *
+ * @return void
+ * @access private
+ */
+ private function _headlines()
+ {
+ // get headlines aka 'Quick Links'
+ $this->headlines = $this->_pageGateway->getHomePageHeadlines();
+ // boolean for if toolbox has headlines
+ $this->hasHeadlines = !empty($this->headlines);
+ }
+
+ /**
+ * grab the GLM Blocks
+ *
+ * @return void
+ * @access private
+ */
+ private function _getBlocks()
+ {
+ $cache = new Cache_Lite($GLOBALS['cacheOptions']);
+ if ($blockContent = $cache->get($this->_catid, 'Block')) {
+ $this->headlines = unserialize($blockContent);
+ } else {
+ $blocks = new Toolkit_Blocks_Display(
+ Toolkit_Database::getInstance()
+ );
+ $this->headlines
+ = $blocks->getPageBlocksAsArray((int)$this->_catid);
+ $cache->save(serialize($this->headlines), $this->_catid, 'Block');
+ }
+ $this->hasHeadlines = !empty($this->headlines);
+ }
+
+ /**
+ * Check if this page has photo gallery in it
+ *
+ * @return boolean If this page has a photo gallery assigned to it
+ * @access public
+ */
+ function isPhotoGalleryPage()
+ {
+ $sql = "
+ SELECT photocat_id
+ FROM photo_category_bus
+ WHERE buscat_id = {$this->toolbox->catid}";
+ if ($pData = $this->toolbox->DB->select($sql)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * grab the home page newsletter/press info
+ *
+ * @param object $toolbox Toolbox object
+ *
+ * @return void
+ * @access public
+ */
+ public function news($toolbox)
+ {
+ if (HOME_ID == $toolbox->catid) {
+ $this->news = $toolbox->get_news();
+ $this->hasNews = (!empty($this->news));
+ } else {
+ $this->hasNews = false;
+ }
+ }
+
+ /**
+ * Sets toolboxContent with news
+ *
+ * @return void
+ */
+ private function _getNewsPage()
+ {
+ $dbh = Toolkit_Database::getInstance();
+ $press = new Toolkit_Press_Newsletter();
+ $this->toolboxContent = $press->toHtml($dbh);
+ }
+
+ /**
+ * Sets rotatingImages
+ *
+ * @return void
+ */
+ private function _rotatingImages()
+ {
+ $gateway = new Toolkit_RotatingImages_Gateway(
+ Toolkit_Database::getInstance()
+ );
+ $nodesIterator = new Toolkit_RotatingImages_NodesIterator();
+ $images = $gateway->findAll();
+ foreach ($images as $image) {
+ $nodesIterator->addImage($image);
+ }
+ $is = new Toolkit_FileServer_ImageAdapter();
+ $decorator = new Toolkit_RotatingImages_Decorator_User();
+ foreach ($nodesIterator as $v) {
+ if ($v->getActive()) {
+ $imgDecorator = new Toolkit_RotatingImages_Decorator_Image($v);
+ if ($v->isAnchor()) {
+ $imgDecorator = new Toolkit_RotatingImages_Decorator_Anchor(
+ $imgDecorator,
+ $v
+ );
+ }
+ $decorator->add($imgDecorator);
+ }
+ }
+ $this->rotatingImages = $decorator->toHtml($is);
+ }
+
+ /**
+ * Add Weather module
+ *
+ * @return void
+ * @access private
+ */
+ private function _weather()
+ {
+ $weather = new Toolkit_Weather();
+ if (PEAR::isError($weather->currentCond)) {
+ return false;
+ }
+
+ $this->weather = $weather->currentCond['weather'];
+ $this->tempF = $weather->currentCond['temp_f'];
+ $this->location = $weather->currentCond['location'];
+ $this->iconUrlName
+ = ($weather->currentCond['icon_url_name'])
+ ? $weather->currentCond['icon_url_name']
+ : 'na.png';
+
+ $iconUrl
+ = ($_SERVER['HTTPS'] == 'on')
+ ? 'https://app.gaslightmedia.com/weather/'
+ : 'http://app.gaslightmedia.com/weather/';
+ $this->fullIconUrl = $iconUrl . $this->iconUrlName;
+ }
+
+ private function _seasons()
+ {
+ $seasonMapper = new Toolkit_Seasons_Season();
+ $season = $seasonMapper->fetchById(
+ Toolkit_Database::getInstance(),
+ 1
+ );
+ $GLOBALS['styleSheets'][] = $this->mediaBaseURL . 'css/' .
+ $season->getName() . '.css?_=' . strtotime($season->getLast_update());
+ }
+
+ /**
+ * Sets the video url for the embed video if not found then set as empty
+ *
+ * @return void
+ */
+ private function _getFeaturedVideo()
+ {
+ try {
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ SELECT id
+ FROM videos
+ WHERE featured = true
+ ORDER BY pos
+ LIMIT 1
+ OFFSET 0";
+ $row = $dbh->query($sql)->fetch(PDO::FETCH_ASSOC);
+ if ($row) {
+ $videoMapper = new Toolkit_Videos_VideoMapper($dbh);
+ $video = $videoMapper->getVideoById($row['id'], false);
+ $this->featuredVideoCode
+ = ($video)
+ ? $video->getVideoCode()
+ : '';
+ }
+ } catch(PDOException $e) {
+ Toolkit_Common::handle_error($e);
+ }
+ }
+}
--- /dev/null
+<?php
+/**
+ * FileUploader.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Photos/Admin
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+define('YAHOO_YUI_BASE', MEDIA_APP_BASE_URL . 'yui/build/');
+define('PHOTOS_UPLOAD_PATH', BASE . 'admin/Photos/uploads/');
+
+/**
+ * Toolkit_Photos_Admin_FileUploader
+ *
+ * Description of Toolkit_Photos_Admin_FileUploader
+ *
+ * @category Toolkit
+ * @package Photos/Admin
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2014 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Photos_Admin_FileUploader
+ extends Toolkit_FormBuilder
+{
+ // {{{ Class Properties
+ /**
+ * Description of $debug
+ * @var boolean
+ */
+ public $debug = false;
+
+ /**
+ * Message for successful upload
+ * @var string
+ */
+ protected $successMsg
+ = '<div id="form-success-top">
+ You have successfully uploaded the files to your photo album.
+ </div>';
+ // }}}
+
+ // {{{ configureDefaults()
+
+ /**
+ * Initializes default form values
+ *
+ * @return void
+ * @access public
+ */
+ public function configureDefaults()
+ {
+ $defaults = array('catid' => $_REQUEST['catid']);
+
+ $this->setupDefaults($defaults);
+ }
+
+ // }}}
+ // {{{ configureElements()
+
+ /**
+ * Form element definitions
+ *
+ * @return void
+ * @access public
+ */
+ public function configureElements()
+ {
+ $e = array();
+ $categories = $this->getPhotoCategories();
+
+ // All Elements are created here. This includes group element definitions.
+ $e[] = array(
+ 'type' => 'header',
+ 'name' => 'albumHdr_rmv',
+ 'display' => '
+ <p style="width: 700px; padding-left: 5px;">
+ <strong>USE:</strong>
+ Hold down the Ctrl key to select or unselect more than one photo
+ at a time. Hold down the Shift key to select a range.</p>
+ <div style="position: absolute; top: 320px;width: 700px; border: 1px dashed #9FD8EF;padding: 20px; margin: 0 0 20px 0;">
+ This feature (Multiple Uploads) is only supported in certain modern browsers:
+ <ul>
+ <li>Internet Explorer 10</li>
+ <li>FireFox 8 and up</li>
+ <li>Safari 5 and up</li>
+ <li>Google Chrome 17 and up</li>
+ </ul>
+ </div>'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'catid'
+ );
+ $e[] = array(
+ 'type' => 'file',
+ 'name' => 'files[]',
+ 'display' => 'Files to Upload',
+ 'opts' => array(
+ 'id' => 'myuploader',
+ 'multiple' => 'multiple',
+ 'accept' => 'image/*'
+ )
+ );
+
+ $e[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'submit_rmv',
+ 'display' => 'Submit Form'
+ );
+
+ $this->setupElements($e);
+ }
+
+ // }}}
+ // {{{ configureFilters()
+
+ /**
+ * Form filter definitions
+ *
+ * Applies a data filter for the given fields when the form is submitted
+ *
+ * @return void
+ * @access public
+ */
+ public function configureFilters()
+ {
+ $f = array();
+
+ $f[] = array(
+ 'element' => '__ALL__',
+ 'filter' => 'trim'
+ );
+
+ $this->setupFilters($f);
+ }
+
+ // }}}
+ // {{{ configureForm()
+
+ /**
+ * Helper function, configures the entire form
+ *
+ * @return void
+ * @access public
+ */
+ public function configureForm()
+ {
+ $this->configureElements();
+ $this->configureFilters();
+ $this->configureRules();
+ $this->configureDefaults();
+ }
+
+ // }}}
+ // {{{ configureRules()
+
+ /**
+ * Form rule definitions
+ *
+ * Adds validation rules for the given fields
+ *
+ * @return void
+ * @access public
+ */
+ public function configureRules()
+ {
+ $r = array();
+ $this->setupRules($r);
+ }
+
+ // }}}
+
+ // {{{ getFileData()
+ /**
+ * Get file data
+ *
+ * @param string $fileName Filename
+ * @param string $path File path
+ *
+ * @return array|boolean
+ * @access public
+ */
+ function getFileData($fileName, $path)
+ {
+ $filename = $path . '/' . $fileName;
+ if (is_file($filename) && is_readable($filename)) {
+ return array(
+ 'name' => $fileName,
+ 'tmp_name' => $filename,
+ 'size' => filesize($filename),
+ 'type' => mime_content_type($filename)
+ );
+ } else {
+ return false;
+ }
+ }
+ // }}}
+ // {{{ getPhotoCategorieso()
+
+ /**
+ * Get photo categories
+ *
+ * @return array
+ * @access public
+ */
+ function getPhotoCategories()
+ {
+ try {
+ $sql = "
+ SELECT id, category
+ FROM photo_category
+ ORDER BY category";
+ $stmt = $this->dbh->query($sql);
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $categories[$row['id']] = $row['category'];
+ }
+ return $categories;
+ } catch(PDOExecption $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }// }}}
+ // {{{ getCategoryMaxPos()
+ /**
+ * get max pos plus one
+ *
+ * @param mixed $id photo category id
+ *
+ * @access public
+ * @return string
+ */
+ function getCategoryMaxPos($id)
+ {
+ try {
+ $sql = "
+ SELECT COALESCE(max(pos) + 1, 1)
+ FROM photo2category
+ WHERE category = :catid";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(":catid", $id, PDO::PARAM_INT);
+ $stmt->execute();
+ return $stmt->fetchColumn();
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }// }}}
+
+ // {{{ processData()
+
+ /**
+ * Handles how to process the form when submitted
+ *
+ * @param array $values Form submitted values
+ *
+ * @return array Result of Insert / Update function
+ * @access public
+ */
+ public function processData($values)
+ {
+ if ( is_array($values['files'])
+ && !empty($values['files'])) {
+ $this->processFilesArray($values);
+ } else {
+ $this->processFolder($values);
+ }
+ return true;
+ }
+
+ // }}}
+
+ /**
+ * Process files array
+ *
+ * @param array $values Values array
+ *
+ * @return void
+ * @access public
+ */
+ public function processFilesArray($values)
+ {
+ $images = array();
+ $photos = array();
+ $acceptedFiles = array(
+ 'image/jpeg',
+ 'image/gif',
+ 'image/png'
+ );
+ $is = new Toolkit_FileServer_ImageAdapter(IS_OWNER_ID, IS_OWNER_PW);
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ Toolkit_Database::getInstance()
+ );
+ $pos = $this->getCategoryMaxPos($values['catid']);
+ if (is_array($values['files']['name'])) {
+ for ($i = 0; $i < count($values['files']['name']); ++$i) {
+ // check that it's an image
+ // jpg jpeg gif or png
+ if ( !$values['files']['error'][$i]
+ && in_array($values['files']['type'][$i], $acceptedFiles)
+ ) {
+ $images[] = array(
+ 'name' => $values['files']['name'][$i],
+ 'tmp_name' => $values['files']['tmp_name'][$i],
+ 'size' => $values['files']['size'][$i]
+ );
+ }
+ }
+ }
+ if (!empty($images)) {
+ foreach ($images as $img) {
+ $imgData = $is->uploadImageFile($img['tmp_name']);
+ $photo = Toolkit_Photos_Models_Photo::createByValues(
+ array(
+ 'image' => $imgData['name'],
+ 'catid' => $values['catid']
+ )
+ );
+ $photoId = $mediaMapper->savePhoto($photo);
+ $photo2Category
+ = Toolkit_Photos_Models_Photo2Category::createByValues(
+ array(
+ 'photo' => $photoId,
+ 'category' => $values['catid'],
+ 'pos' => $pos
+ )
+ );
+ $mediaMapper->savePhoto2Category($photo2Category);
+ ++$pos;
+ }
+ }
+ }
+
+ /**
+ * Process folder
+ *
+ * @param array $values Values array
+ *
+ * @throws Exception
+ * @return void
+ * @access public
+ */
+ public function processFolder($values)
+ {
+ $is = new Toolkit_Image_Server();
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ Toolkit_Database::getInstance()
+ );
+ try {
+ if (!is_dir($_SESSION['uploadFolder'])) {
+ throw new Exception('No Folder exists');
+ }
+ } catch (Exception $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ $d = dir($_SESSION['uploadFolder']);
+ $pos = $this->getCategoryMaxPos($_REQUEST['catid']);
+ $i = 0;
+ while (false !== ($entry = $d->read())) {
+ if (!in_array($entry, array('.','..','.svn','CVS'))) {
+ // before we can send the image to the image class we need
+ // to inject the data for the images into the $_FILES array
+ $_FILES['img' . $i] = $this->getFileData($entry, $_SESSION['uploadFolder']);
+ // send to image server and insert values
+ $image_name = $is->imageUpload('img' . $i, $_SESSION['uploadFolder']);
+ $photo = Toolkit_Photos_Models_Photo::createByValues(
+ array(
+ 'image' => $image_name,
+ 'catid' => $_REQUEST['catid']
+ )
+ );
+ $photoId = $mediaMapper->savePhoto($photo);
+ $photo2Category
+ = Toolkit_Photos_Models_Photo2Category::createByValues(
+ array(
+ 'photo' => $photoId,
+ 'category' => $_REQUEST['catid'],
+ 'pos' => $pos
+ )
+ );
+ $mediaMapper->savePhoto2Category($photo2Category);
+ ++$pos;
+ unlink($_SESSION['uploadFolder'] . '/'. $entry);
+ ++$i;
+ }
+ }
+ $d->close();
+ if (is_dir($_SESSION['uploadFolder'])) {
+ rmdir($_SESSION['uploadFolder']);
+ }
+ }
+
+ // {{{ setupRenderers()
+ // @codeCoverageIgnoreStart
+
+ /**
+ * Custom rendering templates for special fields on the form
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupRenderers()
+ {
+ parent::setupRenderers();
+ $renderer =& $this->defaultRenderer();
+ $required = '<!-- BEGIN required --><span class="req"> * </span><!-- END required -->';
+ $error = '<!-- BEGIN error --><div class="req"> {error} </div><!-- END error -->';
+ }
+
+ // @codeCoverageIgnoreEnd
+ // }}}
+
+ // {{{ toHtml()
+
+ /**
+ * Handles how to display the current step the user is at in the form
+ *
+ * destroying and resetting the captcha value dis-allows someone from
+ * re-sending a form on a previous captcha.
+ *
+ * @return string form HTML state
+ * @access public
+ */
+ public function toHtml()
+ {
+ $this->setupRenderers();
+ if ($this->validate()) {
+ $this->cleanForm();
+ if ($this->process(array(&$this, 'processData'), $this->mergeFiles)) {
+ $this->freeze();
+ HTTP_Session2::unregister('uploadFolder');
+ header("Location: photos.php?ac=editCategory&id=" . $_REQUEST['catid']);
+ exit;
+ }
+
+ } elseif ($this->isSubmitted()) {
+ $output = $this->errorMsg;
+ $output .= parent::toHTML();
+ $output = '<pre>'.print_r($this, true).'</pre>';
+ } else {
+ $output = parent::toHTML();
+ }
+ return $output;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * PageTree.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package Blocks
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_PageTree
+ *
+ * Display the toolbox page as ul lil list for jQuery-Column viewer
+ *
+ * @category Toolkit
+ * @package Blocks
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class Toolkit_Photos_Admin_PageTree
+{
+ private $_dbh;
+ private $_rootNodeStart = "<ul class=\"menu\" id=\"demo1\">\n";
+ private $_leafStartExpanded = "\n\t<li class=\"expanded\" %s>\n";
+ private $_leafStartLeaf = "\n\t<li class=\"leaf\" %s>\n";
+ private $_subTreeStart = "\n<ul class=\"menu\">\n";
+ private $_treeEnd = "\n</ul>\n";
+ private $_leafEnd = "\n\t</li>\n";
+ private $_tree;
+
+ public function __construct(PDO $dbh)
+ {
+ $this->_dbh = $dbh;
+ }
+
+ /**
+ * creates and executes the sql query for getting the pages
+ *
+ * @return array | null
+ */
+ private function _findAll()
+ {
+ try {
+ $members
+ = (filter_var(MEMBERS_CATEGORY, FILTER_VALIDATE_INT))
+ ? "WHERE id NOT IN (" . MEMBERS_CATEGORY . ")
+ AND parent NOT IN (" . MEMBERS_CATEGORY . ")"
+ : '';
+ $sql = "
+ SELECT id,parent,navigation_name
+ FROM pages
+ $members
+ ORDER by parent, pos";
+
+ return $this->_dbh
+ ->query($sql)
+ ->fetchAll(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ /**
+ * Get all pages for the tree
+ *
+ * @return array
+ */
+ private function _fetchPages()
+ {
+ $pages = $this->_findAll();
+ if (is_array($pages)) {
+ $threads = array();
+ foreach ($pages as $page) {
+ $page['children'] = array();
+ $threads[] = $page;
+ }
+
+ $children = array();
+ while (list($key, $value) = each ($threads)) {
+ $children[$value['parent']][$value['id']] = $value;
+ }
+
+ $this->_tree = $children;
+ } else {
+ $this->_tree = array();
+ }
+ }
+
+ /**
+ * Create html of the pages tree for jqueyr.columnview
+ *
+ * @return string
+ */
+ public function toHtml()
+ {
+ $this->_fetchPages();
+ if (is_array($this->_tree)) {
+ $html = $this->createTree($this->_tree, reset($this->_tree));
+ }
+ return $html;
+ }
+
+ /**
+ * Creates the tree structure for the pages jquery column view
+ *
+ * @param array $tree Array for tree
+ * @param type $leaf Array for leaf
+ * @param type $level tree level
+ *
+ * @return string
+ */
+ protected function createTree(array $tree, $leaf, $level = 0)
+ {
+ $html = !$level ? $this->_rootNodeStart : $this->_subTreeStart;
+ if (is_array($leaf) && !empty($leaf)) {
+ while (list($parent, $branch) = each($leaf)) {
+ $pageName = htmlspecialchars($branch['navigation_name']);
+ if ($tree[$parent]) {
+ $html .= sprintf($this->_leafStartExpanded, null);
+ $html .= "<a href=\"#\" data-page=\"{$branch['id']}\" data-name=\"{$pageName}\">{$branch['navigation_name']} </a> ";
+ $html .= $this->createTree($tree, $tree[$parent], $level + 1);
+ } else {
+ $html .= sprintf($this->_leafStartLeaf, null);
+ $html .= "<a href=\"#\" data-page=\"{$branch['id']}\" data-name=\"{$pageName}\">{$branch['navigation_name']} </a> ";
+ $html .= $this->_leafEnd;
+ }
+ }
+ }
+ $html .= $this->_treeEnd;
+ if ($level) {
+ $html .= $this->_leafEnd;
+ }
+ return $html;
+ }
+}
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * Member Authentication
+ *
+ * PHP version 5
+ *
+ * @category MembersDB
+ * @package Toolkit_Members
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: Auth.php,v 1.22 2010/08/10 18:08:44 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ * @see Toolkit_Members_Auth-LoginForm, Toolkit_Members_Auth-PasswordForm
+ */
+
+require_once 'Auth.php';
+
+/**
+ * Methods for the memberdb authentication system
+ *
+ * Handles Cookie and session generation, id challenges and security for
+ * the memberdb application
+ *
+ * @category MembersDB
+ * @package Toolkit_Members
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ * @see Toolkit_Members_Auth-LoginForm, Toolkit_Members_Auth-PasswordForm
+ */
+class Toolkit_Photos_Auth extends Auth
+{
+ // {{{ properties
+
+ /**
+ * Maximum idle time
+ *
+ * If more seconds pass before a new page request, then the user
+ * will have to re-authenticate back into the application.
+ * 1800 = 30 min
+ * 3600 = 1 hr
+ *
+ * @var integer
+ * @access protected
+ */
+ protected $idleTime = 3600;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Constructor
+ *
+ * Sets up the storage driver
+ *
+ * @param Config_Container $c Configuration object
+ * @param Toolkit_Members_AuthContainer $storageDriver storage driver
+ * @param string $loginFunction (optional)Name of the function
+ * that creates the login form
+ * @param boolean $showLogin (optional)Should the login form
+ * be displayed if neccessary?
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(
+ Auth_Container $storageDriver,
+ $loginFunction = '',
+ $showLogin = false
+ ) {
+ parent::Auth($storageDriver, '', $loginFunction, $showLogin);
+ }
+
+ // }}}
+
+ // {{{ setIdle()
+
+ /**
+ * Set the maximum idle time
+ *
+ * @param integer $time time in seconds
+ * @param boolean $add (optional)add time to current maximum idle time or not
+ *
+ * @return void
+ * @access public
+ */
+ public function setIdle($time = null, $add = false)
+ {
+ $time = is_null($time) ? $this->idleTime : $time;
+ parent::setIdle($time, $add);
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * AuthContainer.php
+ *
+ * PHP version 5.3
+ *
+ * @category Toolkit
+ * @package Photos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_AuthContainer
+ *
+ * Description of AuthContainer
+ *
+ * @category Toolkit
+ * @package Photos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class Toolkit_Photos_AuthContainer
+ extends Auth_Container
+{
+ // {{{ properties
+
+ /**
+ * Database handler
+ * @var PDO
+ * @access private
+ */
+ private $_dbh;
+
+ /**
+ * Addition options for the storage container
+ * @var array
+ * @access private
+ */
+ private $_options = array();
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Constructor
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(PDO $dbh, array $options = null)
+ {
+ $this->_dbh = $dbh;
+ $this->_setDefaults();
+ if (is_array($options)) {
+ $this->_parseOptions($options);
+ }
+ }
+
+ // }}}
+ // {{{ _setDefaults()
+
+ /**
+ * Set some default options
+ *
+ * @access private
+ * @return void
+ */
+ private function _setDefaults()
+ {
+ $this->_options['sessionName'] = 'glmMedia';
+ $this->_options['table'] = 'contact';
+ $this->_options['usernamecol'] = 'email';
+ $this->_options['passwordcol'] = 'media_pass';
+ $this->_options['db_fields'] = array('id', 'fname', 'lname');
+ $this->_options['cryptType'] = 'none';
+ $this->_options['db_where'] = ' AND media = true AND approved = true'
+ . ' AND (expire IS NULL OR expire > current_date)';
+ }
+
+ // }}}
+ // {{{ _parseOptions()
+
+ /**
+ * Parse options passed to the container class
+ *
+ * @param array $array options for class
+ *
+ * @access private
+ * @return void
+ */
+ private function _parseOptions($array)
+ {
+ foreach ($array as $key => $value) {
+ if (isset($this->_options[$key])) {
+ $this->_options[$key] = $value;
+ }
+ }
+ }
+
+ // }}}
+ // {{{ fetchData()
+
+ /**
+ * Get the user information from the database
+ *
+ * @param string $username username to authenticate
+ * @param string $password password to authenticate against username
+ *
+ * @return boolean If the user was authenticated or not
+ * @access public
+ * @throws Toolkit_Members_Exception upon error querying DB for user
+ */
+ public function fetchData($username, $password)
+ {
+ if ( is_string($this->_options['db_fields'])
+ && strstr($this->_options['db_fields'], '*')
+ ) {
+ $sqlFrom = '*';
+ } else {
+ $sqlFrom = $this->_options['usernamecol'];
+
+ if (strlen($fields = $this->_getDBFields()) > 0) {
+ $sqlFrom .= ", $fields";
+ }
+
+ }
+
+ $pword = ($this->_options['cryptType'] == 'md5') ? 'MD5(:pword)' : ':pword';
+
+ $sql = "
+ SELECT $sqlFrom
+ FROM {$this->_options['table']}
+ WHERE {$this->_options['usernamecol']} = :uname
+ AND {$this->_options['passwordcol']} = $pword";
+
+ if ($this->_options['db_where']) {
+ $sql .= $this->_options['db_where'];
+ }
+
+ try {
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':uname', $username, PDO::PARAM_STR);
+ $stmt->bindParam(':pword', $password, PDO::PARAM_STR);
+ $stmt->execute();
+ $row = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if ($row !== FALSE) {
+ foreach ($row as $key => $value) {
+ $this->_auth_obj->setAuthData($key, $value);
+ }
+ return true;
+ }
+
+ return false;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Members_Exception(
+ "Error validating user `$username` - `$password`"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ _getDBFields()
+
+ /**
+ * Get extra db fields to fetch and set in the auth data
+ *
+ * @return array comma separated string of extra db fields for a SQL query
+ * @access private
+ */
+ private function _getDBFields()
+ {
+ if (isset($this->_options['db_fields'])) {
+ if (is_array($this->_options['db_fields'])) {
+ return implode(', ', $this->_options['db_fields']);
+ }
+ }
+ }
+
+ // }}}
+}
+
--- /dev/null
+<?php
+
+/**
+ * IndexController.php
+ *
+ * PHP version 5.3
+ *
+ * @category Toolkit
+ * @package Media
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_IndexController
+ *
+ * Description of IndexController
+ *
+ * @category Toolkit
+ * @package Media
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class Toolkit_Photos_Controllers_IndexController
+ extends Toolkit_BaseControllerAbstract
+ implements Toolkit_IController
+{
+
+ const LIST_CATEGORY_TPL = 'Admin/listCategories.html';
+ const LIST_PHOTOS_TPL = 'Admin/listPhotos.html';
+ const LIST_USERS_TPL = 'Admin/listUsers.html';
+ const EDIT_CATEGORY_TPL = 'Admin/editCategory.html';
+ const EDIT_PHOTO_TPL = 'Admin/editPhoto.html';
+ const EDIT_USER_TPL = 'Admin/editUser.html';
+ const ADMIN_PAGE_TPL = 'Admin/index.html';
+
+ public function indexAction()
+ {
+ $pageUrl = $this->registry->page;
+ $flexyOptions = $this->registry->config->flexyOptions->toArray();
+ $tpl = new HTML_Template_Flexy($flexyOptions);
+ $tpl->compile(self::LIST_CATEGORY_TPL);
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->registry->dbh
+ );
+ $page = new stdClass();
+ $page->imgPath = PHOTO_SMALL_URL;
+
+ // list template
+ $page->editUrl = $pageUrl . '?ac=editCategory&id=';
+ $page->deleteUrl = $pageUrl . '?ac=deleteCategory&id=';
+ $page->categories = $mediaMapper->fetchAllCategories();
+ return $this->_createPage($tpl->bufferedOutputObject($page));
+ }
+
+ public function ajaxPhotoSearchAction()
+ {
+ $jsonData = array();
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->registry->dbh
+ );
+ $photoSearch = filter_var($_REQUEST['photoName'], FILTER_SANITIZE_STRING);
+ $photos = $mediaMapper->fetchPhotosByName(true);
+ if ($photos) {
+ foreach ($photos as $photo) {
+ $jsonData[] = $photo->getTitle();
+ }
+ }
+ return json_encode($jsonData);
+ }
+
+ public function multipleUploadAction()
+ {
+ define('PHOTOS_UPLOAD_PATH', BASE . 'uploads/photos/');
+
+ HTTP_Session2::useCookies(false);
+ HTTP_Session2::start('photoUploader');
+ $form = new Toolkit_Photos_Admin_FileUploader('file_upload_form');
+ $form->debug = YUI_UPLOADER_DEBUG;
+ $form->configureForm();
+ $formOut = $form->toHtml();
+ return $this->_createPage($formOut);
+ }
+
+ private function _createPage($html)
+ {
+ $GLOBALS['topScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/jquery/jquery-1.7.2.min.js';
+ $GLOBALS['topScripts'][]
+ = MEDIA_BASE_URL . 'admin/Photos/checkBrowserSupport.js';
+ $GLOBALS['styleSheets'][]
+ = MEDIA_APP_BASE_URL . 'libjs/jqueryui/1.8.13/development-bundle/themes/base/jquery.ui.all.css';
+ $GLOBALS['styleSheets'][]
+ = MEDIA_BASE_URL . 'Toolkit/Photos/css/style.css';
+ $GLOBALS['styleSheets'][]
+ = MEDIA_BASE_URL . 'css/contactform.css';
+ $GLOBALS['topScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/jqueryui/1.8.13/js/jquery-ui-1.8.13.custom.min.js';
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->registry->dbh
+ );
+ $tpl = new HTML_Template_Flexy(
+ $this->registry->config->flexyOptions->toArray()
+ );
+ $page = new stdClass();
+ $ac = filter_var($_REQUEST['ac'], FILTER_SANITIZE_STRING);
+ $catId = filter_var($_REQUEST['id'], FILTER_VALIDATE_INT);
+ if ($ac && ($ac == 'editCategory') && $catId) {
+ $page->categoryId = $catId;
+ }
+
+ $page->categorySearchUrl
+ = MEDIA_BASE_URL . 'admin/photos.php';
+ $this->_setNav($page);
+ $page->topScripts = $this->_getTopScripts();
+ $page->bottomScripts = $this->_getBottomScripts();
+ $page->styles = $this->_getCss();
+ $page->categories = $mediaMapper->fetchAllCategories();
+ $page->AppName = $this->registry->config->application->name;
+ $page->content = $html;
+ $tpl->compile(self::ADMIN_PAGE_TPL);
+ return $tpl->bufferedOutputObject($page);
+ }
+
+ private function _setNav(&$page)
+ {
+ $page->userAdminUrl = MEDIA_BASE_URL . 'admin/photos.php';
+ $pageUrl = $this->registry->page;
+ $ac = filter_var($_REQUEST['ac'], FILTER_SANITIZE_STRING);
+
+ // navigation urls
+ if ($ac == 'editCategory') {
+ $catId = filter_var($_REQUEST['id'], FILTER_VALIDATE_INT);
+ if ($catId) {
+ $page->addPhotoUrl
+ = $pageUrl . '?ac=editPhoto&catid=' . $catId;
+ $page->addMultipleUrl
+ = $pageUrl . '?ac=multipleUpload&catid=' . $catId;
+ }
+ }
+ if ($ac == 'multipleUpload') {
+ $catId = filter_var($_REQUEST['catid'], FILTER_VALIDATE_INT);
+ if ($catId) {
+ $page->addPhotoUrl
+ = $pageUrl . '?ac=editPhoto&catid=' . $catId;
+ $page->addMultipleUrl
+ = $pageUrl . '?ac=multipleUpload&catid=' . $catId;
+ }
+ }
+ $page->addCategoryUrl = $pageUrl . '?ac=editCategory';
+ $page->listCategoryUrl = $pageUrl;
+ if ($this->registry->config->settings->mediaExclusive) {
+ $page->listUsersUrl = $pageUrl . '?ac=listUsers';
+ }
+ }
+
+ public function searchPhotosAction()
+ {
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->registry->dbh
+ );
+ $flexyOptions
+ = $this->registry->config->flexyOptions->toArray();
+ $tpl
+ = new HTML_Template_Flexy($flexyOptions);
+ $page
+ = new stdClass();
+ $page->imgPath = PHOTO_SMALL_URL;
+ $page->photos = $mediaMapper->fetchPhotosByName();
+ $page->editUrl = $this->registry->page
+ . '?ac=editPhoto';
+ $this->_setNav($page);
+ $tpl->compile(self::LIST_PHOTOS_TPL);
+ return $this->_createPage($tpl->bufferedOutputObject($page));
+ }
+
+ public function listUsersAction()
+ {
+ $flexyOptions = $this->registry->config->flexyOptions->toArray();
+ $tpl = new HTML_Template_Flexy($flexyOptions);
+ $tpl->compile(self::LIST_USERS_TPL);
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->registry->dbh
+ );
+ $page = new stdClass();
+ $this->_setNav($page);
+ $page->editUrl = $this->registry->page
+ . '?ac=editUser&catid=' . $catId
+ . '&id=';
+ $status = filter_var($_REQUEST['userStatus'], FILTER_SANITIZE_STRING);
+ $filters = array();
+ switch ($status) {
+ case 'approved':
+ $page->statusText = 'Approved';
+ $filters[] = "approved = true";
+ $filters[] = "(expire > current_date OR expire IS NULL)";
+ break;
+ case 'denied':
+ $page->statusText = 'Denied';
+ $filters[] = "denied = true";
+ break;
+ case 'expired':
+ $page->statusText = 'Expired';
+ $filters[] = "expire is not null";
+ $filters[] = "expire < current_date";
+ break;
+ default:
+ $page->statusText = 'Pending';
+ $filters[] = "((approved is null
+ AND denied IS NULL)
+ OR (denied = false AND approved = false))";
+ break;
+ }
+ $page->users = $mediaMapper->fetchUsers($filters);
+ return $this->_createPage($tpl->bufferedOutputObject($page));
+ }
+
+ public function showPagesAction()
+ {
+ $pageTree = new Toolkit_Photos_Admin_PageTree($this->registry->dbh);
+ return $pageTree->toHtml();
+ }
+
+ public function editCategoryAction()
+ {
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->registry->dbh
+ );
+ if ($_POST) {
+ $saved = $mediaMapper->saveCategoryWithPost();
+ if ($saved) {
+ header('Location: ' . $this->registry->page);
+ exit;
+ }
+ }
+ $categoryId = filter_var($_REQUEST['id'], FILTER_VALIDATE_INT);
+
+ $GLOBALS['styleSheets'][]
+ = MEDIA_BASE_URL . 'css/contactform.css';
+ $GLOBALS['styleSheets'][]
+ = MEDIA_APP_BASE_URL
+ . 'libjs/jqueryui/1.8.13/development-bundle/themes/base/jquery.ui.all.css';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_BASE_URL . 'Toolkit/Photos/js/jquery.columnview.js';
+ $flexyOptions
+ = $this->registry->config->flexyOptions->toArray();
+ $tpl
+ = new HTML_Template_Flexy($flexyOptions);
+ $page
+ = new stdClass();
+ $page->mediaExclusive
+ = $this->registry->config->settings->mediaExclusive;
+ $page->slideShow
+ = $this->registry->config->settings->slideShowOption;
+ $page->pages2Categories
+ = ($categoryId)
+ ? $mediaMapper->fetchCategoryPages($categoryId)
+ : null;
+ $page->imgPath = PHOTO_SMALL_URL;
+ $page->photos
+ = ($categoryId)
+ ? $mediaMapper->fetchAllPhotosByCatid($categoryId)
+ : null;
+ $page->categoryId = $categoryId;
+ $page->editUrl = $this->registry->page
+ . '?ac=editPhoto&catid=' . $categoryId
+ . '&id=';
+ $this->_setNav($page);
+ if ($categoryId) {
+ $page->category = $mediaMapper->fetchCategoryById($categoryId);
+ }
+ $page->formAction = $this->registry->page . '?ac=editCategory';
+ $tpl->compile(self::EDIT_CATEGORY_TPL);
+ return $this->_createPage($tpl->bufferedOutputObject($page));
+ }
+
+ public function editPhotoAction()
+ {
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->registry->dbh
+ );
+ $catId = filter_var($_REQUEST['catid'], FILTER_VALIDATE_INT);
+ // grab the category
+ if ($catId) {
+ $photoCategory = $mediaMapper->fetchCategoryById($catId);
+ }
+ $pageUrl = $this->registry->page;
+
+ if ($_POST) {
+ $saved = $mediaMapper->savePhotoWithPost();
+ if ($saved) {
+ header('Location: '
+ . $this->registry->page.'?ac=editCategory&id='
+ . $catId);
+ exit;
+ }
+ exit;
+ }
+ $photoId = filter_var($_REQUEST['id'], FILTER_VALIDATE_INT);
+
+ $GLOBALS['styleSheets'][]
+ = MEDIA_BASE_URL . 'css/contactform.css';
+ $GLOBALS['styleSheets'][]
+ = MEDIA_APP_BASE_URL . 'libjs/plugins/asmselect/1.0.4a/jquery.asmselect.css';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/plugins/asmselect/1.0.4a/jquery.asmselect.js';
+ $flexyOptions = $this->registry->config->flexyOptions->toArray();
+ $tpl = new HTML_Template_Flexy($flexyOptions);
+ $page = new stdClass();
+ $page->mediaExclusive
+ = $this->registry->config->settings->mediaExclusive;
+ $page->catid = $catId;
+ $page->photo2Categories
+ = ($photoId)
+ ? $mediaMapper->fetchPhoto2CategoryByPhotoId($photoId)
+ : new ArrayObject();
+ $page->imgPath = PHOTO_SMALL_URL;
+ $page->categoryName= $photoCategory->getCategory();
+ $this->_setNav($page);
+ if ($photoId) {
+ $page->photo = $mediaMapper->fetchPhotoById($photoId);
+ }
+ $page->categories = $mediaMapper->fetchAllCategories();
+ $page->formAction = $this->registry->page
+ . '?ac=editPhoto&catid=' . $catId;
+ $tpl->compile(self::EDIT_PHOTO_TPL);
+ return $this->_createPage($tpl->bufferedOutputObject($page));
+ }
+
+ public function editUserAction()
+ {
+ $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'css/contactform.css';
+ $pageUrl = $this->registry->page;
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->registry->dbh
+ );
+ if ($_POST) {
+ // if the user is beign approved
+ if ($_REQUEST['status'] == 'approved') {
+ // expire date needs to be greater or equal to current date
+ $expire = filter_var(
+ $_REQUEST['expire'],
+ FILTER_VALIDATE_REGEXP,
+ array(
+ 'options' => array(
+ 'regexp' => '%[0-9]{2}/[0-9]{2}/[0-9]{4}%'
+ )
+ )
+ );
+ $isActiveDate
+ = (!$expire || strtotime($expire) >= mktime());
+ if ($isActiveDate) {
+ $this->emailUser('approved');
+ }
+ }
+ // if the user is being denied
+ if ($_REQUEST['status'] == 'denied') {
+ $this->emailUser('denied');
+ }
+
+ $saved = $mediaMapper->saveUserWithPost();
+ if ($saved) {
+ $status = filter_var(
+ $_REQUEST['userStatus'], FILTER_SANITIZE_STRING
+ );
+ header(
+ 'Location: ' . $this->registry->page.'?ac=listUsers'
+ . '&userStatus=' . $status
+ );
+ exit;
+ }
+ exit;
+ }
+ $userId
+ = filter_var($_REQUEST['id'], FILTER_VALIDATE_INT);
+ $flexyOptions
+ = $this->registry->config->flexyOptions->toArray();
+ $tpl = new HTML_Template_Flexy($flexyOptions);
+ $page = new stdClass();
+ $this->_setNav($page);
+ if ($userId) {
+ $page->user = $mediaMapper->fetchUserById($userId);
+ }
+ $page->formAction = $this->registry->page . '?ac=editUser';
+ $tpl->compile(self::EDIT_USER_TPL);
+ return $this->_createPage($tpl->bufferedOutputObject($page));
+ }
+
+ public function emailUser($status)
+ {
+ $userId
+ = filter_var($_REQUEST['id'], FILTER_VALIDATE_INT);
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->registry->dbh
+ );
+ $page = new stdClass();
+ $page->user = $mediaMapper->fetchUserById($userId);
+ if (!$page->user instanceof Toolkit_Photos_Models_User) {
+ return false;
+ }
+ if (!$page->user->getEmail()) {
+ return false;
+ }
+ $page->title = SITENAME . ' Media Gallery';
+ $page->subject = 'Your Media Request for Photos - Traverse City';
+ $page->email_from = MEDIA_REQUEST_FORM_EMAIL;
+ switch ($status) {
+ case 'approved' :
+ $page->approved = true;
+ break;
+ case 'denied' :
+ $page->denied = true;
+ break;
+ default :
+ return false;
+ }
+ $flexyOptions = $GLOBALS['flexyOptions'];
+ $flexyOptions['templateDir'] = BASE . 'Toolkit/Photos/templates/Admin';
+ $flexyOptions['compileDir'] = BASE . 'Toolkit/Photos/templates/compiled';
+ $tpl = new HTML_Template_Flexy($flexyOptions);
+ $tpl->compile('emailUser.tpl');
+ $htmlMsg = $tpl->bufferedOutputObject($page);
+ $msg = strip_tags($htmlMsg);
+ $mimeMail = new Mail_mime("\n");
+ $mimeMail->setFrom("Traverse City Media Gallery <".MEDIA_REQUEST_FORM_EMAIL.">");
+ $mimeMail->setSubject($page->subject);
+ $mimeMail->setHTMLBody($htmlMsg);
+ $mimeMail->setTXTBody($msg);
+
+ $mail =& Mail::factory('mail');
+ $body = $mimeMail->get();
+ $setHeader['Reply-To'] = "Traverse City Media Gallery <".MEDIA_REQUEST_FORM_EMAIL.">";
+
+ $headers = $mimeMail->headers($setHeader);
+
+ $res = $mail->send($page->user->getEmail(), $headers, $body);
+ if (PEAR::isError($res)) {
+ return Toolkit_Common::handleError($res);
+ } else {
+ return $res;
+ }
+ exit;
+ }
+
+ public function moveCategoriesAction()
+ {
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->registry->dbh
+ );
+ $values = filter_var_array(
+ $_REQUEST,
+ array(
+ 'catPhotos' => array(
+ 'filter' => FILTER_VALIDATE_INT,
+ 'flags' => FILTER_FORCE_ARRAY
+ )
+ )
+ );
+ if ($values['catPhotos']) {
+ $mediaMapper->saveCategoryPositionsByArray($values['catPhotos']);
+ }
+ return true;
+ }
+
+ public function movePhotosAction()
+ {
+ $categoryId = filter_var($_REQUEST['categoryId'], FILTER_VALIDATE_INT);
+ if (!$categoryId) {
+ return false;
+ }
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->registry->dbh
+ );
+ $values = filter_var_array(
+ $_REQUEST,
+ array(
+ 'categoryId' => FILTER_VALIDATE_INT,
+ 'photos' => array(
+ 'filter' => FILTER_VALIDATE_INT,
+ 'flags' => FILTER_FORCE_ARRAY
+ )
+ )
+ );
+ if ($values['photos']) {
+ $mediaMapper->savePhotoPositionsByCategory(
+ $values['photos'],
+ $values['categoryId']
+ );
+ }
+ return '<pre>'.print_r($photo2categories, true).'</pre>';
+ }
+
+ private function _getCss()
+ {
+ return Toolkit_Common::getStyleSheets();
+ }
+
+ private function _getTopScripts()
+ {
+ return Toolkit_Common::getScripts($GLOBALS['topScripts']);
+ }
+
+ private function _getBottomScripts()
+ {
+ return Toolkit_Common::getScripts($GLOBALS['bottomScripts']);
+ }
+
+}
--- /dev/null
+--
+-- adding slideshow
+--
+
+ALTER TABLE photos.photo_category ADD slideshow BOOLEAN;
+ALTER TABLE photos.photo_category ALTER slideshow SET DEFAULT false;
+UPDATE photos.photo_category SET slideshow = false;
--- /dev/null
+CREATE SCHEMA photos;
+GRANT ALL ON SCHEMA photos TO nobody;
+--
+-- Tables
+--
+\i ./tables/photo_category.sql
+\i ./tables/photo.sql
+\i ./tables/photo_category_bus.sql
+\i ./tables/photo_default.sql
+\i ./tables/photo2category.sql
--- /dev/null
+--
+-- This will drop everything in the photos schema.
+-- Nothing better be in here except photos related objects
+-- or it will be dropped
+--
+-- The force is strong w/ this one, use it wisely.
+--
+DROP SCHEMA IF EXISTS photos CASCADE;
--- /dev/null
+--
+-- Need to reset sequences for photos tables
+-- try running this file
+--
+SET search_path TO photos;
+SELECT setval('photo_id_seq', (SELECT max(id) FROM photos.photo));
+SELECT setval('photo_category_id_seq', (SELECT max(id) FROM photos.photo_category));
\ No newline at end of file
--- /dev/null
+DROP TABLE IF EXISTS photos.photo CASCADE;
+
+CREATE TABLE photos.photo
+(id SERIAL,
+ title TEXT,
+ description TEXT,
+ image TEXT,
+ catid INTEGER NOT NULL
+ REFERENCES photos.photo_category (id)
+ ON UPDATE CASCADE
+ ON DELETE CASCADE,
+ pos INTEGER,
+ exclusive BOOLEAN DEFAULT false,
+ download BOOLEAN DEFAULT false,
+ PRIMARY KEY (id));
+
+GRANT ALL on photos.photo_id_seq to nobody;
+GRANT ALL on photos.photo to nobody;
--- /dev/null
+DROP TABLE IF EXISTS photos.photo2category CASCADE;
+
+CREATE TABLE photos.photo2category
+(
+ id SERIAL,
+ photo INTEGER,
+ category INTEGER,
+ pos INTEGER,
+ PRIMARY KEY (id)
+);
+
+GRANT ALL ON photos.photo2category TO nobody;
+GRANT ALL ON photos.photo2category_id_seq TO nobody;
\ No newline at end of file
--- /dev/null
+DROP TABLE IF EXISTS photos.photo_category CASCADE;
+
+CREATE TABLE photos.photo_category
+(id SERIAL,
+ category TEXT,
+ image TEXT,
+ pos INTEGER,
+ exclusive BOOLEAN DEFAULT false,
+ slideshow BOOLEAN DEFAULT false,
+ PRIMARY KEY (id));
+
+GRANT ALL ON photos.photo_category_id_seq TO nobody;
+GRANT ALL ON photos.photo_category TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS photos.photo_category_bus CASCADE;
+
+CREATE TABLE photos.photo_category_bus
+(id SERIAL,
+ photocat_id INTEGER
+ REFERENCES photos.photo_category (id)
+ ON UPDATE CASCADE
+ ON DELETE CASCADE,
+ buscat_id INTEGER
+ REFERENCES toolbox.pages (id)
+ ON UPDATE CASCADE
+ ON DELETE CASCADE,
+ pos INTEGER,
+ PRIMARY KEY (id)
+);
+
+GRANT ALL ON photos.photo_category_bus_id_seq TO nobody;
+GRANT ALL ON photos.photo_category_bus TO nobody;
+
+CREATE UNIQUE INDEX photo_category_bus_bus_phot_indx on photos.photo_category_bus (buscat_id ,photocat_id);
--- /dev/null
+DROP TABLE IF EXISTS photos.photo_default CASCADE;
+
+CREATE TABLE photos.photo_default
+(id SERIAL,
+ header TEXT,
+ description TEXT,
+ PRIMARY KEY (id));
+
+GRANT ALL ON photos.photo_default_id_seq TO nobody;
+GRANT ALL ON photos.photo_default TO nobody;
--- /dev/null
+--
+-- Update photo tables
+--
+
+\i ./tables/photo2category.sql
+
+ALTER TABLE photos.photo_category ALTER pos SET DEFAULT 1;
+ALTER TABLE photos.photo_category ADD exclusive bool;
+ALTER TABLE photos.photo_category ALTER exclusive set default false;
+UPDATE photos.photo_category SET exclusive = false;
+
+ALTER TABLE photos.photo add exclusive bool;
+ALTER TABLE photos.photo ALTER exclusive set default false;
+UPDATE photos.photo SET exclusive = false;
+
+ALTER TABLE photos.photo add download bool;
+ALTER TABLE photos.photo ALTER download set default false;
+UPDATE photos.photo SET download = false;
+
+ALTER TABLE contacts.contact ADD title TEXT;
\ No newline at end of file
--- /dev/null
+--
+-- Upgrade (movie schemas)
+--
+
+CREATE SCHEMA oldphotos;
+GRANT ALL ON oldphotos TO nobody;
+
+ALTER TABLE public.photo SET SCHEMA oldphotos;
+ALTER TABLE public.photo_category SET SCHEMA oldphotos;
+ALTER TABLE public.photo_category_bus SET SCHEMA oldphotos;
+ALTER TABLE public.photo_default SET SCHEMA oldphotos;
+
+INSERT INTO photos.photo_category (SELECT * FROM oldphotos.photo_category);
+INSERT INTO photos.photo (SELECT * FROM oldphotos.photo);
+INSERT INTO photos.photo_category_bus (SELECT * FROM oldphotos.photo_category_bus);
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+ * Display.php
+ *
+ * PHP version 5
+ *
+ * @category Photos
+ * @package Toolkit_Photos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: Display.php,v 1.10 2010/07/04 23:55:12 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Photos_Display
+ *
+ * Display the Photo Gallery assoc to a toolbox page
+ *
+ * @category Photos
+ * @package Toolkit_Photos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @link <>
+ */
+class Toolkit_Photos_Display
+{
+ // {{{ Properties
+
+ private $_dbh;
+
+ /**
+ * Options for Flexy Templates
+ * @var array
+ * @access protected
+ */
+ protected $flexyOptions;
+
+ /**
+ * page name for form action and links
+ * @var unknown
+ * @access protected
+ */
+ protected $pageName;
+
+ /**
+ * Photo Table Name
+ * @var string
+ * @access protected
+ */
+ protected $photoTable = 'photo';
+
+ /**
+ * Photo Category Table Name
+ * @var string
+ * @access protected
+ */
+ protected $categoryTable = 'photo_category';
+
+ /**
+ * rowCount
+ *
+ * @var float
+ * @access protected
+ */
+ protected $rowCount = 4;
+ protected $baseURL;
+ protected $glmAppBaseURL;
+ protected $pageId;
+ protected $config;
+
+ const PHOTO_GALLERY_WRAPPER_TPL = 'photoGalleryWrapper.html';
+ const PHOTO_SLIDER = 'photoSlider.html';
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * __construct()
+ *
+ * @return void
+ * @access public
+ */
+ function __construct(PDO $dbh)
+ {
+ $this->pageId = filter_var($_REQUEST['catid'], FILTER_VALIDATE_INT);
+ $this->_dbh = $dbh;
+ // create a Zend Config Object and store into Registry
+ $config = new Zend_Config_Ini(
+ BASE . 'Toolkit/Photos/application.ini',
+ strtolower($_ENV['GLM_HOST_ID'])
+ );
+ $this->config = $config;
+ $this->flexyOptions = $config->flexyOptions->toArray();
+
+ // the main display page for events to link to
+ $this->pageName = BASE_URL . 'index.php?catid=' . $_REQUEST['catid'];
+ $this->baseURL = ($_SERVER['HTTPS'] == 'on')
+ ? BASE_SECURE_URL
+ : BASE_URL;
+ $this->glmAppBaseURL = ($_SERVER['HTTPS'] == 'on')
+ ? GLM_APP_BASE_SECURE_URL
+ : GLM_APP_BASE_URL;
+ }
+
+ // }}}
+ public function getSlideShow(array $photoCatIds, $galleries)
+ {
+ $GLOBALS['styleSheets'][] = $this->glmAppBaseURL
+ . 'libjs/plugins/nivoslider/3.2/prod/nivo-slider.css';
+ $GLOBALS['styleSheets'][] = $this->glmAppBaseURL
+ . 'libjs/plugins/nivoslider/themes/default/default.css';
+ $GLOBALS['bottomScripts'][] = $this->glmAppBaseURL
+ . 'libjs/plugins/nivoslider/3.2/prod/jquery.nivo.slider.js';
+ $tpl = new HTML_Template_Flexy($this->flexyOptions);
+ $tpl->compile(self::PHOTO_SLIDER);
+
+ $page = new stdClass();
+
+ // Filter the categories so only slideshow ones are in $categories
+ $categories = $this->getCategories($photoCatIds);
+ $iterator = new Toolkit_Photos_SlideShowCategoryFilter(
+ $categories->getIterator()
+ );
+ $slideShowCategories = new ArrayObject();
+ $photoCatIds = array();
+ foreach ($iterator as $index) {
+ $slideShowCategories->append($index);
+ $photoCatIds[] = $index['id'];
+ }
+ if (empty($photoCatIds)) {
+ return false;
+ }
+
+ $page->categories = $slideShowCategories;
+ $page->searchFormUrl = $this->pageName;
+ $page->pageId = $this->pageId;
+ $page->base_url = BASE_URL;
+ $page->webUrl = BASE_URL . 'download-photo-web/';
+ $page->printUrl = BASE_URL . 'download-photo-print/';
+ $page->photoUrlLarge = FILE_SERVER_URL . IS_OWNER_ID
+ . '/rotatingImagesResized/';
+ $page->photoUrlSmall = FILE_SERVER_URL . IS_OWNER_ID
+ . '/mediaGallery/';
+ $catid = filter_var($_REQUEST['photoCategoryId']);
+
+ if (count($page->categories) == 1) {
+ $catid = $photoCatIds[0];
+ }
+ $photoCatSelected = ($catid)
+ ? $catid
+ : $photoCatIds[0];
+ $page->photos = $this->getPhotosByCatid(
+ $photoCatSelected,
+ $this->getLoginStatus()
+ );
+
+
+ return $tpl->bufferedOutputObject($page);
+ }
+ // {{{ toHTML()
+
+ /**
+ * toHTML()
+ *
+ * call to listPhotos function for display of Photos
+ *
+ * @return void
+ * @access public
+ */
+ public function toHTML(array $photoCatIds, $galleries)
+ {
+ $GLOBALS['styleSheets'][]
+ = $this->baseURL . 'photoswipe/photoswipe.css';
+ $GLOBALS['styleSheets'][]
+ = $this->baseURL . 'Toolkit/Photos/css/gallery.css';
+ $GLOBALS['bottomScripts'][]
+ = $this->baseURL . 'photoswipe/lib/klass.min.js';
+ $GLOBALS['bottomScripts'][]
+ = $this->baseURL . 'photoswipe/code.photoswipe.jquery-3.0.5.js';
+ $GLOBALS['bottomScripts'][]
+ = $this->baseURL . 'Toolkit/Photos/js/photoGallery.js';
+
+ $GLOBALS['styleSheets'][] = $this->glmAppBaseURL
+ . 'libjs/jqueryui/1.8.13/development-bundle/themes/base/jquery.ui.all.css';
+ $GLOBALS['styleSheets'][] = $this->baseURL
+ . 'Toolkit/Photos/css/style.css';
+ $GLOBALS['styleSheets'][] = $this->baseURL
+ . 'css/contactform.css';
+ $GLOBALS['topScripts'][] = $this->glmAppBaseURL
+ . 'libjs/jqueryui/1.8.13/js/jquery-ui-1.8.13.custom.min.js';
+
+ $tpl = new HTML_Template_Flexy($this->flexyOptions);
+ $tpl->compile(self::PHOTO_GALLERY_WRAPPER_TPL);
+
+ $page = new stdClass();
+ $page->mediaExclusive = $this->config->settings->mediaExclusive;
+ $page->photoNameSearch = $this->config->settings->photoNameSearch;
+ $page->galleries = $galleries;
+ $page->pageId = $this->pageId;
+ $page->base_url = BASE_URL;
+ $page->mediaGalleryRequestFormUrl = BASE_URL . 'media-gallery-request-form-'
+ . MEDIA_GALLERY_REQUEST_FORM . '/';
+ $page->isLoggedIn = $this->getLoginStatus();
+ $page->loginUrl = BASE_URL . 'Toolkit/Photos/login.php';
+ $page->logoutUrl = BASE_URL . 'Toolkit/Photos/login.php?catid='
+ . $_REQUEST['catid'] . '&logout=1';
+ $page->photoSearchFormUrl = $this->pageName;
+ $page->photoUrlLarge = PHOTO_LARGE_URL;
+ $page->photoUrlSmall = FILE_SERVER_URL . IS_OWNER_ID . '/mediaGallery/';
+ $page->photoDownWeb = BASE_URL . "download-photo-web/";
+ $page->photoDownPrint = BASE_URL . "download-photo-print/";
+
+ // Filter out the slideshow categories
+ $categories = $this->getCategories($photoCatIds);
+ $iterator = new Toolkit_Photos_GalleryCategoryFilter(
+ $categories->getIterator()
+ );
+ $galleryCategories = new ArrayObject();
+ $photoCatIds = array();
+ foreach ($iterator as $index) {
+ $galleryCategories->append($index);
+ $photoCatIds[] = $index['id'];
+ }
+ if (empty($photoCatIds)) {
+ return false;
+ }
+ $page->categories = $galleryCategories;
+
+ $failedStatus = $this->_getFailedLoginStatus();
+ $page->expired = false;
+ if ($failedStatus == -4) {
+ $page->failedStatus = '';
+ $page->expired = true;
+ } else {
+ $page->failedStatus = $failedStatus;
+ }
+
+ $catid = filter_var($_REQUEST['photoCategoryId'], FILTER_VALIDATE_INT);
+ $photoName = filter_var($_REQUEST['photo_name'], FILTER_SANITIZE_STRING);
+
+ if (count($page->categories) == 1) {
+ $catid = $photoCatIds[0];
+ }
+ if ($photoName) {
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->_dbh
+ );
+ $gallery = new Toolkit_Photos_Gallery(
+ Toolkit_Database::getInstance(),
+ new Toolkit_Photos_Display(
+ Toolkit_Database::getInstance()
+ )
+ );
+ $page->photos = $mediaMapper->fetchPhotosByNameAndCats(
+ $photoName, $gallery->getPageGalleries($this->pageId)
+ );
+ } else if ($catid) {
+ $photoCatSelected = ($catid)
+ ? $catid
+ : $photoCatIds[0];
+ $photoCategory = $this->getPhotoCategory($photoCatSelected);
+ $page->photoCategoryName = $photoCategory['category'];
+ $page->photos = $this->getPhotosByCatid(
+ $photoCatSelected, $page->isLoggedIn
+ );
+ } else {
+ $page->photoUrl = $this->pageName . '&photoCategoryId=';
+ $page->catPhotos = $this->getCategoriesForPage($photoCatIds);
+ }
+
+ return $tpl->bufferedOutputObject($page);
+ }
+
+ // }}}
+
+ public function getLoginStatus()
+ {
+ $authContainer = new Toolkit_Photos_AuthContainer(
+ Toolkit_Database::getInstance()
+ );
+
+ $photoAuth = new Toolkit_Photos_Auth(
+ $authContainer, '', false
+ );
+ $photoAuth->start();
+ return $photoAuth->checkAuth();
+ }
+
+ private function _getFailedLoginStatus()
+ {
+ $failStatus = filter_var($_REQUEST['status'], FILTER_VALIDATE_INT);
+ switch ($failStatus) {
+ case -1:
+ $status = 'Idled';
+ break;
+ case -2:
+ $status = 'Expired';
+ break;
+ case -3:
+ $status = 'Incorrect Username/Password supplied';
+ break;
+ case -4:
+ return -4;
+ $url = BASE_URL . 'media-gallery-request-form-'
+ . MEDIA_GALLERY_REQUEST_FORM . '/';
+ $status = 'Your login has expired';
+ $status .= ' <a href="' . $url . '">Ask for more time</a>';
+ break;
+ default:
+ $status = '';
+ break;
+ }
+ return $status;
+ }
+
+ public function getPhotosByCatid($catid, $isLogedIn)
+ {
+ $filter = (!$isLogedIn)
+ ? array("exclusive <> true")
+ : '';
+
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->_dbh
+ );
+ $photos = $mediaMapper->fetchAllPhotosByCatid(
+ $catid, $filter
+ );
+ return $photos;
+ }
+
+ public function getCategoriesForPage($photoCats)
+ {
+ $categories = new ArrayObject();
+ $mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ $this->_dbh
+ );
+ if (is_array($photoCats) && !empty($photoCats)) {
+ $index = 0;
+ foreach ($photoCats as $cat) {
+ $categories->offsetSet(
+ $index, $mediaMapper->fetchCategoryById($cat)
+ );
+ ++$index;
+ }
+ }
+ return $categories;
+ }
+
+ public function getCategories($photoCats)
+ {
+ $categories = new ArrayObject();
+ if (is_array($photoCats) && !empty($photoCats)) {
+ $index = 0;
+ foreach ($photoCats as $cat) {
+ $categories->offsetSet(
+ $index, $this->getPhotoCategory($cat)
+ );
+ ++$index;
+ }
+ }
+ return $categories;
+ }
+
+ public function getPhotoCategory($categoryId)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM photos.photo_category
+ WHERE id = :id
+ ORDER BY pos";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':id', $categoryId, PDO::PARAM_INT);
+ $stmt->execute();
+ return $stmt->fetch(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+}
--- /dev/null
+<?php
+class Toolkit_Photos_Exception extends Exception {}
+?>
--- /dev/null
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of Factory
+ *
+ * @author steve
+ */
+class Toolkit_Photos_Factory
+{
+ static public function createPhotoFromValues($values)
+ {
+ $newPhoto = new Toolkit_Photos_Photo();
+ $photo = $newPhoto->createByValues($values);
+ return $photo;
+ }
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * Fetches photo galleries assigned to pages
+ *
+ * PHP version 5
+ *
+ * The license text...
+ *
+ * @category Toolkit_Photos
+ * @package Photos
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: Gallery.php,v 1.1 2010/06/09 19:52:24 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Fetches photo galleries assigned to pages
+ *
+ * @category Toolkit_Photos
+ * @package Photos
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_Photos_Gallery
+{
+ // {{{ properties
+
+ /**
+ * Database handler
+ * @var object
+ * @access private
+ */
+ private $_dbh;
+
+ /**
+ * Toolkit_Photos_Display object
+ * @var object
+ * @access private
+ */
+ private $_photoApp;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Constructor
+ *
+ * @param PDO $dbh Database handler
+ * @param Toolkit_Photos_Display $photoApp Photo Gallery Display object
+ * @return void
+ * @access public
+ */
+ public function __construct(PDO $dbh, Toolkit_Photos_Display $photoApp)
+ {
+ $this->_dbh = $dbh;
+ $this->_photoApp = $photoApp;
+ }
+
+ // }}}
+ // {{{ _getGalleriesAssignedToPage()
+
+ /**
+ * Gets an array of photo galleries assigned to page
+ *
+ * If we were on a page that contained multiple galleries
+ * and we move into a single gallery page - this function
+ * returns that single gallery, so we can view all its photos
+ *
+ * @param integer $pageId Id of page we're on
+ *
+ * @return array multi-dimensional array of photo galleries assigned to page
+ * @access private
+ * @throws Toolkit_Photos_Exception If can't query for galleries on page
+ */
+ private function _getGalleriesAssignedToPage($pageId)
+ {
+ if (isset($_GET['photo_catid']) && ctype_digit($_GET['photo_catid'])) {
+ return array(
+ array('photocat_id' => $_GET['photo_catid'])
+ );
+ }
+
+ try {
+ $where
+ = (!$this->_photoApp->getLoginStatus())
+ ? " AND exclusive <> true"
+ : '';
+ $sql = "
+ SELECT pcb.photocat_id
+ FROM photo_category_bus pcb, photo_category pc
+ WHERE buscat_id = :pageId
+ AND pc.id = pcb.photocat_id
+ AND pc.id IN (
+ SELECT distinct category
+ FROM photo2category
+ )
+ $where
+ ORDER BY pc.pos";
+
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':pageId', $pageId, PDO::PARAM_INT);
+ $stmt->execute();
+ return $stmt->fetchAll(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Photos_Exception(
+ "Unable to check if page has a gallery `$pageId`"
+ );
+ }
+ }
+
+ // }}}
+ public function getPageGalleries($pageId)
+ {
+ $cats = array();
+ $galleries = $this->_getGalleriesAssignedToPage($pageId);
+ foreach ($galleries as $galley) {
+ $cats[] = $galley['photocat_id'];
+ }
+ return $cats;
+ }
+ // {{{ getPageGallery()
+
+ /**
+ * Gets the page galleries / gallery
+ *
+ * @param integer $pageId Id of page we're on
+ *
+ * @return string photo gallery output
+ * @access public
+ */
+ public function getPageGallery($pageId)
+ {
+ $galleries = $this->_getGalleriesAssignedToPage($pageId);
+
+ $photoCatIds = array();
+ foreach ($galleries as $gallery) {
+ $photoCatIds[] = $gallery['photocat_id'];
+ }
+
+ return !empty($photoCatIds)
+ ? $this->_photoApp->toHTML($photoCatIds, $galleries)
+ : '';
+ }
+
+ // }}}
+
+ public function getPageSlideShow($pageId)
+ {
+ $galleries = $this->_getGalleriesAssignedToPage($pageId);
+
+ $photoCatIds = array();
+ foreach ($galleries as $gallery) {
+ $photoCatIds[] = $gallery['photocat_id'];
+ }
+
+ return !empty($photoCatIds)
+ ? $this->_photoApp->getSlideShow($photoCatIds, $galleries)
+ : '';
+ }
+}
--- /dev/null
+<?php
+
+/**
+ * GalleryCategoryFilter.php
+ *
+ * PHP version 5.3
+ *
+ * @category Toolkit
+ * @package Photos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Photos_GalleryCategoryFilter
+ *
+ * Description of SlideShowFilter
+ *
+ * @category Toolkit
+ * @package Photos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class Toolkit_Photos_GalleryCategoryFilter
+ extends FilterIterator
+{
+ public function __construct(Iterator $iterator)
+ {
+ parent::__construct($iterator);
+ }
+
+ public function accept()
+ {
+ $category = $this->getInnerIterator()->current();
+ if (!$category['slideshow']) {
+ return true;
+ }
+ return false;
+ }
+}
--- /dev/null
+<?php
+
+/**
+ * Category.php
+ *
+ * PHP version 5.3
+ *
+ * @category Toolkit
+ * @package Media
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Photos_Models_Category
+ *
+ * Represents the Category for Media Gallery
+ *
+ * @category Toolkit
+ * @package Media
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class Toolkit_Photos_Models_Category
+{
+ private $_id;
+ private $_category;
+ private $_exclusive;
+ private $_slideshow;
+ private $_pos;
+
+ const TABLE_NAME = 'photos.photo_category';
+ const PRI_KEY = 'id';
+ const SORT = 'pos';
+
+ private function __construct($values)
+ {
+ extract($values);
+ $this->setCategory($category)
+ ->setExclusive($exclusive)
+ ->setSlideShow($slideshow)
+ ->setPos($pos);
+ if ($id) {
+ $this->setId($id);
+ }
+ }
+
+ static public function createByValues($values)
+ {
+ return new Toolkit_Photos_Models_Category($values);
+ }
+
+ public function getFirstPhoto()
+ {
+ $dbh = Toolkit_Database::getInstance();
+ try {
+ $sql = "
+ SELECT p.image
+ FROM photos.photo p, photos.photo2category p2c
+ WHERE p2c.pos = 1
+ AND p2c.photo = p.id
+ AND p2c.category = :catid";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':catid', $this->getId(), PDO::PARAM_INT);
+ $stmt->execute();
+ return $stmt->fetchColumn();
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ public function getTotalNumberOfPhotos()
+ {
+ $dbh = Toolkit_Database::getInstance();
+ try {
+ $sql = "
+ SELECT count(p.id)
+ FROM photos.photo p, photos.photo2category p2c
+ WHERE p2c.photo = p.id
+ AND p2c.category = :catid";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':catid', $this->getId(), PDO::PARAM_INT);
+ $stmt->execute();
+ return $stmt->fetchColumn();
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ public function getId()
+ {
+ return (int)$this->_id;
+ }
+
+ public function setId($id)
+ {
+ $this->_id
+ = (filter_var($id, FILTER_VALIDATE_INT))
+ ? $id
+ : null;
+ return $this;
+ }
+
+ public function getPos()
+ {
+ return (int)$this->_pos;
+ }
+
+ public function setPos($pos)
+ {
+ $this->_pos = (int)$pos;
+ return $this;
+ }
+
+
+ public function getCategory()
+ {
+ return $this->_category;
+ }
+
+ public function setCategory($category)
+ {
+ $this->_category = $category;
+ return $this;
+ }
+
+ public function getExclusive()
+ {
+ return (bool)$this->_exclusive;
+ }
+
+ public function setExclusive($exclusive)
+ {
+ $this->_exclusive = (bool)$exclusive;
+ return $this;
+ }
+
+ public function getSlideShow()
+ {
+ return (bool)$this->_slideshow;
+ }
+
+ public function setSlideShow($slideshow)
+ {
+ $this->_slideshow = (bool)$slideshow;
+ return $this;
+ }
+
+
+}
--- /dev/null
+<?php
+
+/**
+ * MediaMapper.php
+ *
+ * PHP version 5.3
+ *
+ * @category Toolkit
+ * @package Media
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Photos_Models_MediaMapper
+ *
+ * Maps the Media Objects to methods to create and generate list of
+ * categories and photos.
+ *
+ * @category Toolkit
+ * @package Media
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class Toolkit_Photos_Models_MediaMapper
+{
+ private $_dbh;
+
+ public function __construct(PDO $dbh)
+ {
+ $this->_dbh = $dbh;
+ }
+
+ public function fetchAllCategories()
+ {
+ $categories = new ArrayObject();
+ try {
+ $sql = "
+ SELECT *
+ FROM " . Toolkit_Photos_Models_Category::TABLE_NAME . "
+ ORDER BY " . Toolkit_Photos_Models_Category::SORT;
+ $stmt = $this->_dbh->query($sql);
+ while ($category = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $categories->append(
+ Toolkit_Photos_Models_Category::createByValues($category)
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return $categories;
+ }
+
+ public function fetchAllPhotos($catId)
+ {
+ $photos = new ArrayObject();
+ try {
+ $sql = "
+ SELECT *
+ FROM " . Toolkit_Photos_Models_Photo::TABLE_NAME . "
+ WHERE catid = :catid
+ ORDER BY " . Toolkit_Photos_Models_Photo::SORT;
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':catid', $catId, PDO::PARAM_INT);
+ $stmt->execute();
+ while ($photo = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $photos->append(
+ Toolkit_Photos_Models_Photo::createByValues($photo)
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return $photos;
+ }
+
+ public function fetchPhotosByName($distinct = false)
+ {
+ $nameSearch = filter_var($_REQUEST['photoName'], FILTER_SANITIZE_STRING);
+ if (!$nameSearch) {
+ return false;
+ }
+ $photos = new ArrayObject();
+ try {
+ $nameSearch = $this->_dbh->quote('%' . $nameSearch . '%');
+ $select
+ = (!$distinct)
+ ? '*'
+ : 'DISTINCT ON (title) title';
+ $orderBy
+ = (!$distinct)
+ ? Toolkit_Photos_Models_Photo::SORT
+ : 'title';
+ $sql = "
+ SELECT $select
+ FROM " . Toolkit_Photos_Models_Photo::TABLE_NAME . "
+ WHERE title ilike $nameSearch
+ ORDER BY $orderBy";
+ $stmt = $this->_dbh->query($sql);
+ while ($photo = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $photos->append(
+ Toolkit_Photos_Models_Photo::createByValues($photo)
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return $photos;
+ }
+
+ public function fetchPhotosByNameAndCats(
+ $nameSearch,
+ $galleries,
+ $distinct = false
+ ) {
+ if (!$nameSearch) {
+ die('here');
+ return false;
+ }
+ $photos = new ArrayObject();
+ try {
+ $nameSearch = $this->_dbh->quote('%' . $nameSearch . '%');
+ $select
+ = (!$distinct)
+ ? '*'
+ : 'DISTINCT ON (title) title';
+ $where
+ = (!empty($galleries))
+ ? " AND id IN (SELECT photo FROM photo2category WHERE category IN ("
+ . implode(",", $galleries) . "))"
+ : '';
+ $orderBy
+ = (!$distinct)
+ ? Toolkit_Photos_Models_Photo::SORT
+ : 'title';
+ $sql = "
+ SELECT $select
+ FROM " . Toolkit_Photos_Models_Photo::TABLE_NAME . "
+ WHERE title ilike $nameSearch
+ $where
+ ORDER BY $orderBy";
+ $stmt = $this->_dbh->query($sql);
+ while ($photo = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $photos->append(
+ Toolkit_Photos_Models_Photo::createByValues($photo)
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return $photos;
+ }
+
+ public function fetchAllPhotosByCatid($catId, $filter = null)
+ {
+ $photos = new ArrayObject();
+ try {
+ $where
+ = ($filter)
+ ? "AND " . implode(" AND ", $filter)
+ : '';
+ $sql = "
+ SELECT p.*
+ FROM " . Toolkit_Photos_Models_Photo::TABLE_NAME . " p,
+ " . Toolkit_Photos_Models_Photo2Category::TABLE_NAME . " p2c
+ WHERE p2c.category = :catid
+ AND p2c.photo = p.id
+ $where
+ ORDER BY p2c.pos";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':catid', $catId, PDO::PARAM_INT);
+ $stmt->execute();
+ while ($photo = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $photos->append(
+ Toolkit_Photos_Models_Photo::createByValues($photo)
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return $photos;
+ }
+
+ public function fetchPhoto2CategoryByPhotoId($photoId)
+ {
+ $photo2Categories = new ArrayObject();
+ try {
+ $sql = "
+ SELECT *
+ FROM " . Toolkit_Photos_Models_Photo2Category::TABLE_NAME . "
+ WHERE photo = :photo
+ ORDER BY " . Toolkit_Photos_Models_Photo2Category::SORT;
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':photo', $photoId, PDO::PARAM_INT);
+ $stmt->execute();
+ while ($photo = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $photo2Categories->offsetSet(
+ $photo['category'],
+ Toolkit_Photos_Models_Photo2Category::createByValues($photo)
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return $photo2Categories;
+ }
+
+ public function fetchPhoto2Category($catId)
+ {
+ $photo2Categories = new ArrayObject();
+ try {
+ $sql = "
+ SELECT *
+ FROM " . Toolkit_Photos_Models_Photo2Category::TABLE_NAME . "
+ WHERE category = :catid
+ ORDER BY " . Toolkit_Photos_Models_Photo2Category::SORT;
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':catid', $catId, PDO::PARAM_INT);
+ $stmt->execute();
+ while ($photo = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $photo2Categories->append(
+ Toolkit_Photos_Models_Photo2Category::createByValues($photo)
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return $photo2Categories;
+ }
+
+ public function fetchCategoryPages($catId)
+ {
+ $pages2Categories = new ArrayObject();
+ try {
+ $sql = "
+ SELECT pcb.buscat_id as page, p.navigation_name as page_name, pcb.pos as pos
+ FROM photo_category_bus pcb, photo_category pc, pages p
+ WHERE pc.id IN (
+ SELECT photocat_id
+ FROM photo_category_bus
+ WHERE photocat_id = :catid)
+ AND pcb.photocat_id = pc.id
+ AND p.id = pcb.buscat_id
+ ORDER BY pcb.pos";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':catid', $catId, PDO::PARAM_INT);
+ $stmt->execute();
+ while ($photo = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $pages2Categories->append(
+ $photo
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return $pages2Categories;
+ }
+
+ public function fixAllPhoto2Cats()
+ {
+ $sql = "
+ DELETE FROM photos.photo2category";
+ $this->_dbh->query($sql);
+ // first grab all categories
+ $categories = $this->fetchAllCategories();
+ foreach ($categories as $category) {
+ var_dump($category);
+ $photos = $this->fetchAllPhotos($category->getId());
+ var_dump($photos);
+ if ($photos) {
+ foreach ($photos as $photo) {
+ $photo2Category
+ = Toolkit_Photos_Models_Photo2Category::createByValues(
+ array(
+ 'category' => $category->getId(),
+ 'photo' => $photo->getId(),
+ 'pos' => $photo->getPos()
+ )
+ );
+ $this->savePhoto2Category($photo2Category);
+ }
+ }
+ }
+ exit;
+ }
+
+ public function fetchPhotoById($photoId)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM " . Toolkit_Photos_Models_Photo::TABLE_NAME . "
+ WHERE " . Toolkit_Photos_Models_Photo::PRI_KEY . " = :id";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':id', $photoId, PDO::PARAM_INT);
+ $stmt->execute();
+ return Toolkit_Photos_Models_Photo::createByValues(
+ $stmt->fetch(PDO::FETCH_ASSOC)
+ );
+
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ }
+
+ public function saveCategoryWithPost()
+ {
+ if ($_REQUEST['Cancel']) {
+ return true;
+ }
+ if ($_REQUEST['Delete']) {
+ // delete the category
+ $category = $this->fetchCategoryById($_REQUEST['id']);
+ $this->removeCategory($category);
+ return true;
+ }
+ $postedData = filter_var_array(
+ $_POST,
+ array(
+ 'id' => FILTER_VALIDATE_INT,
+ 'pos' => FILTER_VALIDATE_INT,
+ 'pages' => array(
+ 'filter' => FILTER_VALIDATE_INT,
+ 'flags' => FILTER_FORCE_ARRAY
+ ),
+ 'category' => array(
+ 'filter' => FILTER_SANITIZE_STRIPPED,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'exclusive' => FILTER_VALIDATE_BOOLEAN,
+ 'slideshow' => FILTER_VALIDATE_BOOLEAN
+ )
+ );
+ if (get_magic_quotes_gpc()) {
+ $postedData['category'] = stripslashes($postedData['category']);
+ }
+
+ $category = Toolkit_Photos_Models_Category::createByValues(
+ $postedData
+ );
+ //var_dump($category);exit;
+ $id = $this->saveCategory($category);
+
+ try {
+ $this->_dbh->beginTransaction();
+ if ($postedData['id']) {
+ $sql = "
+ DELETE
+ FROM " . Toolkit_Photos_Models_Page2Category::TABLE_NAME . "
+ WHERE photocat_id = :category";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':category', $postedData['id'], PDO::PARAM_INT);
+ $stmt->execute();
+ }
+ if ( is_array($postedData['pages'])
+ && !empty($postedData['pages'])
+ ) {
+ foreach ($postedData['pages'] as $pageId) {
+ $page2Category
+ = Toolkit_Photos_Models_Page2Category::createByValues(
+ array(
+ 'buscat_id' => $pageId,
+ 'photocat_id' => $category->getId()
+ )
+ );
+ $this->savePage2Category($page2Category);
+ }
+ }
+
+ $this->_dbh->commit();
+ } catch (PDOException $e) {
+ $this->_dbh->rollBack();
+ Toolkit_Common::handleError($e);
+ }
+
+ return true;
+ }
+
+ public function saveCategory(
+ Toolkit_Photos_Models_Category $category
+ ) {
+ if ($category->getId()) {
+ $sql = "
+ UPDATE " . Toolkit_Photos_Models_Category::TABLE_NAME . "
+ SET category = :category,
+ exclusive = :exclusive,
+ slideshow = :slideshow,
+ pos = :pos
+ WHERE " . Toolkit_Photos_Models_Category::PRI_KEY . " = :id";
+
+ } else {
+ $sql = "
+ INSERT INTO " . Toolkit_Photos_Models_Category::TABLE_NAME . "
+ (category, exclusive, slideshow, pos)
+ VALUES
+ (:category, :exclusive, :slideshow, :pos)
+ RETURNING " . Toolkit_Photos_Models_Category::PRI_KEY;
+ }
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':category', $category->getCategory());
+ $stmt->bindParam(':pos', $category->getPos(), PDO::PARAM_INT);
+ $stmt->bindParam(':exclusive', $category->getExclusive(), PDO::PARAM_BOOL);
+ $stmt->bindParam(':slideshow', $category->getSlideShow(), PDO::PARAM_BOOL);
+ if ($category->getId()) {
+ $stmt->bindParam(':id', $category->getId(), PDO::PARAM_INT);
+ }
+ $stmt->execute();
+ if (!$category->getId()) {
+ $category->setId($stmt->fetchColumn());
+ }
+ return $category->getId();
+ }
+
+ public function savePage2Category(
+ Toolkit_Photos_Models_Page2Category $page2Category
+ ) {
+ if ($page2Category->getId()) {
+ $sql = "
+ UPDATE " . Toolkit_Photos_Models_Page2Category::TABLE_NAME . "
+ SET photocat_id = :category,
+ buscat_id = :page
+ WHERE " . Toolkit_Photos_Models_Page2Category::PRI_KEY . " = :id";
+
+ } else {
+ $sql = "
+ INSERT INTO " . Toolkit_Photos_Models_Page2Category::TABLE_NAME . "
+ (photocat_id, buscat_id)
+ VALUES
+ (:category, :page)
+ RETURNING " . Toolkit_Photos_Models_Page2Category::PRI_KEY;
+ }
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':page', $page2Category->getBuscatId(), PDO::PARAM_INT);
+ $stmt->bindParam(':category', $page2Category->getPhotocatId(), PDO::PARAM_INT);
+ if ($page2Category->getId()) {
+ $stmt->bindParam(':id', $page2Category->getId(), PDO::PARAM_INT);
+ }
+ $stmt->execute();
+ return ($page2Category->getId())
+ ? $page2Category->getId()
+ : $stmt->fetchColumn();
+ }
+
+ public function savePhoto2Category(
+ Toolkit_Photos_Models_Photo2Category $photo2Category
+ ) {
+ if ($photo2Category->getId()) {
+ $sql = "
+ UPDATE " . Toolkit_Photos_Models_Photo2Category::TABLE_NAME . "
+ SET photo = :photo,
+ category = :category,
+ pos = :pos
+ WHERE " . Toolkit_Photos_Models_Photo2Category::PRI_KEY . " = :id";
+
+ } else {
+ $sql = "
+ INSERT INTO " . Toolkit_Photos_Models_Photo2Category::TABLE_NAME . "
+ (photo, category, pos)
+ VALUES
+ (:photo, :category, :pos)
+ RETURNING " . Toolkit_Photos_Models_Photo2Category::PRI_KEY;
+ }
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':photo', $photo2Category->getPhoto(), PDO::PARAM_INT);
+ $stmt->bindParam(':category', $photo2Category->getCategory(), PDO::PARAM_INT);
+ $stmt->bindParam(':pos', $photo2Category->getPos(), PDO::PARAM_INT);
+ if ($photo2Category->getId()) {
+ $stmt->bindParam(':id', $photo2Category->getId(), PDO::PARAM_INT);
+ }
+ $stmt->execute();
+ return ($photo2Category->getId())
+ ? $photo2Category->getId()
+ : $stmt->fetchColumn();
+ }
+
+ public function fetchCategoryById($categoryId)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM " . Toolkit_Photos_Models_Category::TABLE_NAME . "
+ WHERE " . Toolkit_Photos_Models_Category::PRI_KEY . " = :id";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':id', $categoryId, PDO::PARAM_INT);
+ $stmt->execute();
+ return Toolkit_Photos_Models_Category::createByValues(
+ $stmt->fetch(PDO::FETCH_ASSOC)
+ );
+
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ }
+
+ public function savePhotoPositionsByCategory($photos, $categoryId)
+ {
+ if (!is_array($photos) || empty($photos)) {
+ return false;
+ }
+ var_dump($photos);
+ var_dump($categoryId);
+ try {
+ $this->_dbh->beginTransaction();
+ $sql = "
+ DELETE
+ FROM " . Toolkit_Photos_Models_Photo2Category::TABLE_NAME . "
+ WHERE category = :category";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':category', $categoryId, PDO::PARAM_INT);
+ $stmt->execute();
+
+ foreach ($photos as $position => $photoId) {
+ $photo2Category
+ = Toolkit_Photos_Models_Photo2Category::createByValues(
+ array(
+ 'photo' => $photoId,
+ 'category' => $categoryId,
+ 'pos' => $position + 1
+ )
+ );
+ $this->savePhoto2Category($photo2Category);
+ var_dump($photo2Category);
+ }
+
+ $this->_dbh->commit();
+ } catch (PDOException $e) {
+ $this->_dbh->rollBack();
+ Toolkit_Common::handleError($e);
+ }
+
+ }
+
+ public function saveCategoryPositionsByArray($cats)
+ {
+ if (!is_array($cats) || empty($cats)) {
+ return false;
+ }
+// var_dump($cats);exit;
+ foreach ($cats as $position => $catId) {
+ $category = $this->fetchCategoryById($catId);
+ $category->setPos((int)$position + 1);
+ $this->saveCategory($category);
+ }
+ }
+
+ public function savePhotoWithPost()
+ {
+ if ($_REQUEST['Cancel']) {
+ return true;
+ }
+ if ($_REQUEST['Delete']) {
+ // delete the photo
+ $photo = $this->fetchPhotoById($_REQUEST['id']);
+ $this->removePhoto($photo);
+ return true;
+ }
+
+ if ( $_FILES['image']['name']
+ && !$_FILES['image']['error']
+ ) {
+ $fs = new Toolkit_FileServer_ImageAdapter();
+ $image = $fs->upload('image');
+ }
+ $postedData = filter_var_array(
+ $_POST,
+ array(
+ 'id' => FILTER_VALIDATE_INT,
+ 'catid' => FILTER_VALIDATE_INT,
+ 'title' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'image' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'description' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'photo2Categories' => array(
+ 'filter' => FILTER_VALIDATE_INT,
+ 'flags' => FILTER_FORCE_ARRAY
+ ),
+ 'pos' => FILTER_VALIDATE_INT,
+ 'del_img' => FILTER_VALIDATE_BOOLEAN,
+ 'download' => FILTER_VALIDATE_BOOLEAN,
+ 'exclusive' => FILTER_VALIDATE_BOOLEAN,
+ )
+ );
+
+ if (!$image && $postedData['del_img']) {
+ $postedData['image'] = '';
+ } else if ($image) {
+ $postedData['image'] = $image['name'];
+ }
+ $photo = Toolkit_Photos_Models_Photo::createByValues(
+ $postedData
+ );
+ $photoId = $this->savePhoto($photo);
+ $postedData['id'] = $photoId;
+ $this->savePhoto2CategoryData($postedData);
+ return $photoId;
+ }
+
+ public function savePhoto2CategoryData($data)
+ {
+ if (!is_array($data) || empty($data)) {
+ return false;
+ }
+// var_dump($data);
+ // need to get the current photo2category records for this photo
+ $currentCategories = $this->fetchPhoto2CategoryByPhotoId($data['id']);
+// var_dump($currentCategories);
+ foreach ($data['photo2Categories'] as $catId) {
+ // if the offest does not exists then the photo need to be
+ // added to the category
+ if (!$currentCategories->offsetExists($catId)) {
+ $photoCatsNew = $this->fetchPhoto2Category($catId);
+ $newPosition = $photoCatsNew->count() + 1;
+ // need to add photo to the photo2category record as last pos
+ $newPhoto2Cat
+ = Toolkit_Photos_Models_Photo2Category::createByValues(
+ array(
+ 'photo' => $data['id'],
+ 'category' => $catId,
+ 'pos' => $newPosition
+ )
+ );
+// var_dump($newPhoto2Cat);
+ $this->savePhoto2Category($newPhoto2Cat);
+// var_dump('adding record for category ' . $catId);
+ }
+ // for each step through remove the iteration in the ArrayObject
+ // that way we know if we have to remove any records and reorder
+ $currentCategories->offsetUnset($catId);
+ }
+ foreach ($currentCategories as $photo2Category) {
+// var_dump($photo2Category);
+ $this->removePhoto2Category($photo2Category);
+ }
+ }
+
+ public function removeCategory(
+ Toolkit_Photos_Models_Category $category
+ ) {
+ // if there's any photos in the category that are only in that
+ // category then it will need to delete them.
+ try {
+ // 1. delete this category
+ $sql = "
+ DELETE
+ FROM photos.photo_category
+ WHERE id = :id";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':id', $category->getId(), PDO::PARAM_INT);
+ $stmt->execute();
+ // 2. delete all references in photo2category table for this category
+ $sql = "
+ DELETE
+ FROM photos.photo2category
+ WHERE category = :id";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':id', $category->getId(), PDO::PARAM_INT);
+ $stmt->execute();
+ // 3. remove photos if they are orphaned from this delete
+ $sql = "
+ DELETE
+ FROM photos.photo
+ WHERE id NOT IN (
+ SELECT distinct photo
+ FROM photos.photo2category
+ )";
+ $this->_dbh->query($sql);
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ }
+
+ public function removePhoto(
+ Toolkit_Photos_Models_Photo $photo
+ ) {
+ $photo2Categories = $this->fetchPhoto2CategoryByPhotoId(
+ $photo->getId()
+ );
+
+ foreach ($photo2Categories as $photoCat) {
+ $this->removePhoto2Category($photoCat);
+ }
+ try {
+ $sql = "
+ DELETE
+ FROM photos.photo
+ WHERE id = :id";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':id', $photo->getId(), PDO::PARAM_INT);
+ $stmt->execute();
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ }
+
+ public function removePhoto2Category(
+ Toolkit_Photos_Models_Photo2Category $photo2Category
+ ) {
+ try {
+ $sql = "
+ DELETE
+ FROM " . Toolkit_Photos_Models_Photo2Category::TABLE_NAME . "
+ WHERE id = :id";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':id', $photo2Category->getId(), PDO::PARAM_INT);
+ $stmt->execute();
+ $sql = "
+ UPDATE " . Toolkit_Photos_Models_Photo2Category::TABLE_NAME . "
+ SET pos = pos - 1
+ WHERE pos >= :pos
+ AND category = :category";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':pos', $photo2Category->getPos(), PDO::PARAM_INT);
+ $stmt->bindParam(':category', $photo2Category->getCategory(), PDO::PARAM_INT);
+ $stmt->execute();
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ }
+
+ public function savePhoto(
+ Toolkit_Photos_Models_Photo $photo
+ ) {
+ try {
+ if ($photo->getId()) {
+ $sql = "
+ UPDATE " . Toolkit_Photos_Models_Photo::TABLE_NAME . "
+ SET title = :title,
+ catid = :catid,
+ description = :description,
+ image = :image,
+ pos = :pos,
+ download = :download,
+ exclusive = :exclusive
+ WHERE " . Toolkit_Photos_Models_Photo::PRI_KEY . " = :id";
+
+ } else {
+ $sql = "
+ INSERT INTO " . Toolkit_Photos_Models_Photo::TABLE_NAME . "
+ (title, catid, description, image, pos, download, exclusive)
+ VALUES
+ (:title, :catid, :description, :image, :pos, :download, :exclusive)
+ RETURNING " . Toolkit_Photos_Models_Photo::PRI_KEY;
+ }
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':title', $photo->getTitle());
+ $stmt->bindParam(':catid', $photo->getCatid(), PDO::PARAM_INT);
+ $stmt->bindParam(':description', $photo->getDescription());
+ $stmt->bindParam(':image', $photo->getImage());
+ $stmt->bindParam(':pos', $photo->getPos(), PDO::PARAM_INT);
+ $stmt->bindParam(':download', $photo->getDownload(), PDO::PARAM_BOOL);
+ $stmt->bindParam(':exclusive', $photo->getExclusive(), PDO::PARAM_BOOL);
+ if ($photo->getId()) {
+ $stmt->bindParam(':id', $photo->getId(), PDO::PARAM_INT);
+ }
+ $stmt->execute();
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ return ($photo->getId())
+ ? $photo->getId()
+ : $stmt->fetchColumn();
+ }
+
+ public function saveUserWithPost()
+ {
+ $postedData = filter_var_array(
+ $_POST,
+ array(
+ 'id' => FILTER_VALIDATE_INT,
+ 'status' => FILTER_SANITIZE_STRING,
+ 'expire' => array(
+ 'filter' => FILTER_VALIDATE_REGEXP,
+ 'options' => array(
+ 'regexp' => '%[0-9]{2}/[0-9]{2}/[0-9]{4}%'
+ )
+ ),
+ 'phone' => FILTER_SANITIZE_STRING,
+ 'email' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'media_pass' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'company' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'title' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'fname' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'lname' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'address' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'address2' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'city' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'state' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ ),
+ 'zip' => array(
+ 'filter' => FILTER_SANITIZE_STRING,
+ 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES
+ )
+ )
+ );
+ if ($postedData['status'] == 'approved') {
+ $postedData['approved'] = true;
+ $postedData['denied'] = false;
+ } else {
+ $postedData['approved'] = false;
+ $postedData['denied'] = true;
+ }
+ if (!$postedData['expire']) {
+ $postedData['expire'] = null;
+ }
+
+ $user = Toolkit_Photos_Models_User::createByValues(
+ $postedData
+ );
+ return $this->saveUser($user);
+ }
+
+ public function saveUser(
+ Toolkit_Photos_Models_User $user
+ ) {
+ if ($user->getId()) {
+ $sql = "
+ UPDATE " . Toolkit_Photos_Models_User::TABLE_NAME . "
+ SET company = :company,
+ title = :title,
+ fname = :fname,
+ lname = :lname,
+ email = :email,
+ phone = :phone,
+ address = :address,
+ address2 = :address2,
+ city = :city,
+ state = :state,
+ zip = :zip,
+ media = true,
+ approved = :approved,
+ denied = :denied,
+ expire = :expire
+ WHERE " . Toolkit_Photos_Models_User::PRI_KEY . " = :id";
+
+ } else {
+ $sql = "
+ INSERT INTO " . Toolkit_Photos_Models_User::TABLE_NAME . "
+ (fname, lname, email, phone,
+ address, address2, city, state, zip,
+ approved, denied, expire, media)
+ VALUES
+ (:fname, :lname, :email, :phone,
+ :address, :address2, :city, :state, :zip,
+ :approved, :denied, :expire, true)
+ RETURNING " . Toolkit_Photos_Models_User::PRI_KEY;
+ }
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':expire', $user->getExpire());
+ $stmt->bindParam(':company', $user->getCompany());
+ $stmt->bindParam(':title', $user->getTitle());
+ $stmt->bindParam(':fname', $user->getFname());
+ $stmt->bindParam(':lname', $user->getLname());
+ $stmt->bindParam(':email', $user->getEmail());
+ $stmt->bindParam(':phone', $user->getPhone());
+ $stmt->bindParam(':address', $user->getAddress());
+ $stmt->bindParam(':address2', $user->getAddress2());
+ $stmt->bindParam(':city', $user->getCity());
+ $stmt->bindParam(':state', $user->getState());
+ $stmt->bindParam(':zip', $user->getZip());
+ $stmt->bindParam(':approved', $user->getApproved(), PDO::PARAM_BOOL);
+ $stmt->bindParam(':denied', $user->getDenied(), PDO::PARAM_BOOL);
+ if ($user->getId()) {
+ $stmt->bindParam(':id', $user->getId(), PDO::PARAM_INT);
+ }
+ $stmt->execute();
+ return ($user->getId())
+ ? $user->getId()
+ : $stmt->fetchColumn();
+ }
+
+ public function fetchUserById($userId)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM " . Toolkit_Photos_Models_User::TABLE_NAME . "
+ WHERE " . Toolkit_Photos_Models_User::PRI_KEY . " = :id
+ AND " . Toolkit_Photos_Models_User::WHERE;
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':id', $userId, PDO::PARAM_INT);
+ $stmt->execute();
+ return Toolkit_Photos_Models_User::createByValues(
+ $stmt->fetch(PDO::FETCH_ASSOC)
+ );
+
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ }
+
+ public function fetchUserByEmail($email)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM " . Toolkit_Photos_Models_User::TABLE_NAME . "
+ WHERE " . Toolkit_Photos_Models_User::EMAIL . " = :email
+ AND " . Toolkit_Photos_Models_User::WHERE;
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':email', $email, PDO::PARAM_INT);
+ $stmt->execute();
+ return Toolkit_Photos_Models_User::createByValues(
+ $stmt->fetch(PDO::FETCH_ASSOC)
+ );
+
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ }
+
+ public function fetchAllUsers()
+ {
+ $users = new ArrayObject();
+ try {
+ $sql = "
+ SELECT *
+ FROM " . Toolkit_Media_Models_User::TABLE_NAME . "
+ WHERE media = true
+ ORDER BY " . Toolkit_Media_Models_User::SORT;
+ $sql .= " LIMIT 10 OFFSET 0";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->execute();
+ while ($photo = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $users->append(
+ Toolkit_Media_Models_User::createByValues($photo)
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return $users;
+ }
+
+ public function fetchUsers(array $filters = null)
+ {
+ $users = new ArrayObject();
+ try{
+ $where = (is_array($filters) && !empty($filters))
+ ? "AND " . implode(" AND ", $filters)
+ : '';
+ $sql = "
+ SELECT *
+ FROM " . Toolkit_Photos_Models_User::TABLE_NAME . "
+ WHERE media = true
+ $where
+ ORDER BY " . Toolkit_Photos_Models_User::SORT;
+ $sql .= " LIMIT 10 OFFSET 0";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->execute();
+ while ($photo = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $users->append(
+ Toolkit_Photos_Models_User::createByValues($photo)
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return $users;
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * Photo2Category.php
+ *
+ * PHP version 5.3
+ *
+ * @category Toolkit
+ * @package Photos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_Photo2Category
+ *
+ * Description of Photo2Category
+ *
+ * @category Toolkit
+ * @package Photos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class Toolkit_Photos_Models_Page2Category
+{
+ private $_id;
+ private $_photocatId;
+ private $_buscatId;
+
+ const TABLE_NAME = 'photos.photo_category_bus';
+ const PRI_KEY = 'id';
+ const SORT = 'pos';
+
+ private function __construct($values)
+ {
+ extract($values);
+ $this->setBuscatId($buscat_id)
+ ->setPhotocatId($photocat_id);
+ if ($id) {
+ $this->setId($id);
+ }
+ }
+
+ static public function createByValues($values)
+ {
+ return new Toolkit_Photos_Models_Page2Category($values);
+ }
+
+ public function getId()
+ {
+ return (int)$this->_id;
+ }
+
+ public function setId($id)
+ {
+ $this->_id
+ = (filter_var($id, FILTER_VALIDATE_INT))
+ ? $id
+ : null;
+ return $this;
+ }
+
+ public function getPhotocatId()
+ {
+ return $this->_photocatId;
+ }
+
+ public function setPhotocatId($photocatId)
+ {
+ $this->_photocatId = $photocatId;
+ return $this;
+ }
+
+ public function getBuscatId()
+ {
+ return $this->_buscatId;
+ }
+
+ public function setBuscatId($buscatId)
+ {
+ $this->_buscatId = $buscatId;
+ return $this;
+ }
+
+
+}
--- /dev/null
+<?php
+
+/**
+ * Photo.php
+ *
+ * PHP version 5.3
+ *
+ * @category Toolkit
+ * @package Media
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Photos_Models_Photo
+ *
+ * Represents the Photo for Media Gallery
+ *
+ * @category Toolkit
+ * @package Media
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class Toolkit_Photos_Models_Photo
+{
+ private $_id;
+ private $_title;
+ private $_description;
+ private $_image;
+ private $_catid;
+ private $_pos;
+ private $_download;
+ private $_exclusive;
+
+ const TABLE_NAME = 'photos.photo';
+ const PRI_KEY = 'id';
+ const SORT = 'pos';
+
+ private function __construct($values)
+ {
+ extract($values);
+ $this->setTitle($title)
+ ->setDescription($description)
+ ->setImage($image)
+ ->setCatid($catid)
+ ->setPos($pos)
+ ->setDownload($download)
+ ->setExclusive($exclusive);
+ if ($id) {
+ $this->setId($id);
+ }
+ }
+
+ static public function createByValues($values)
+ {
+ return new Toolkit_Photos_Models_Photo($values);
+ }
+
+ public function getId()
+ {
+ return (int)$this->_id;
+ }
+
+ public function setId($id)
+ {
+ $this->_id
+ = (filter_var($id, FILTER_VALIDATE_INT))
+ ? $id
+ : null;
+ return $this;
+ }
+
+ public function getTitle()
+ {
+ return $this->_title;
+ }
+
+ public function setTitle($title)
+ {
+ $this->_title = $title;
+ return $this;
+ }
+
+ public function getDescription()
+ {
+ return $this->_description;
+ }
+
+ public function setDescription($description)
+ {
+ $this->_description = $description;
+ return $this;
+ }
+
+ public function getImage()
+ {
+ return $this->_image;
+ }
+
+ public function setImage($image)
+ {
+ $this->_image = $image;
+ return $this;
+ }
+
+ public function getCatid()
+ {
+ return (int)$this->_catid;
+ }
+
+ public function setCatid($catid)
+ {
+ $this->_catid = (int)$catid;
+ return $this;
+ }
+
+ public function getPos()
+ {
+ return (int)$this->_pos;
+ }
+
+ public function setPos($pos)
+ {
+ $this->_pos = (int)$pos;
+ return $this;
+ }
+
+ public function getDownload()
+ {
+ return (bool)$this->_download;
+ }
+
+ public function setDownload($download)
+ {
+ $this->_download = (bool)$download;
+ return $this;
+ }
+
+ public function getExclusive()
+ {
+ return (bool)$this->_exclusive;
+ }
+
+ public function setExclusive($exclusive)
+ {
+ $this->_exclusive = (bool)$exclusive;
+ return $this;
+ }
+
+
+}
--- /dev/null
+<?php
+
+/**
+ * Photo2Category.php
+ *
+ * PHP version 5.3
+ *
+ * @category Toolkit
+ * @package Photos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_Photo2Category
+ *
+ * Description of Photo2Category
+ *
+ * @category Toolkit
+ * @package Photos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class Toolkit_Photos_Models_Photo2Category
+{
+ private $_id;
+ private $_photo;
+ private $_category;
+ private $_pos;
+
+ const TABLE_NAME = 'photos.photo2category';
+ const PRI_KEY = 'id';
+ const SORT = 'pos';
+
+ private function __construct($values)
+ {
+ extract($values);
+ $this->setCategory($category)
+ ->setPhoto($photo)
+ ->setPos($pos);
+ if ($id) {
+ $this->setId($id);
+ }
+ }
+
+ static public function createByValues($values)
+ {
+ return new Toolkit_Photos_Models_Photo2Category($values);
+ }
+
+ public function getId()
+ {
+ return (int)$this->_id;
+ }
+
+ public function setId($id)
+ {
+ $this->_id
+ = (filter_var($id, FILTER_VALIDATE_INT))
+ ? $id
+ : null;
+ return $this;
+ }
+
+ public function getPhoto()
+ {
+ return (int)$this->_photo;
+ }
+
+ public function setPhoto($photo)
+ {
+ $this->_photo = (int)$photo;
+ return $this;
+ }
+
+ public function getCategory()
+ {
+ return (int)$this->_category;
+ }
+
+ public function setCategory($category)
+ {
+ $this->_category = (int)$category;
+ return $this;
+ }
+
+ public function getPos()
+ {
+ return (int)$this->_pos;
+ }
+
+ public function setPos($pos)
+ {
+ $this->_pos = (int)$pos;
+ return $this;
+ }
+
+
+}
--- /dev/null
+<?php
+
+/**
+ * User.php
+ *
+ * PHP version 5.3
+ *
+ * @category Toolkit
+ * @package Media
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Photos_Model_User
+ *
+ * Class representation of the User
+ *
+ * @category Toolkit
+ * @package Media
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class Toolkit_Photos_Models_User
+{
+ private $_id;
+ private $_company;
+ private $_title;
+ private $_fname;
+ private $_lname;
+ private $_email;
+ private $_address;
+ private $_address2;
+ private $_city;
+ private $_state;
+ private $_zip;
+ private $_phone;
+ private $_media;
+ private $_expire;
+ private $_mediaPass;
+ private $_approved;
+ private $_denied;
+
+ const TABLE_NAME = 'contacts.contact';
+ const PRI_KEY = 'id';
+ const SORT = 'lname,fname';
+ const EMAIL = 'email';
+ const WHERE = 'media = true';
+
+ private function __construct($values)
+ {
+ extract($values);
+ $this->setCompany($company)
+ ->setTitle($title)
+ ->setAddress($address)
+ ->setAddress2($address2)
+ ->setApproved($approved)
+ ->setMediaPass($media_pass)
+ ->setCity($city)
+ ->setDenied($denied)
+ ->setEmail($email)
+ ->setExpire($expire)
+ ->setFname($fname)
+ ->setLname($lname)
+ ->setMedia($media)
+ ->setPhone($phone)
+ ->setState($state)
+ ->setZip($zip);
+ if ($id) {
+ $this->setId($id);
+ }
+ }
+
+ public function createByValues($values)
+ {
+ if (is_array($values) && !empty($values)) {
+ return new Toolkit_Photos_Models_User($values);
+ } else {
+ return false;
+ }
+ }
+
+ public function getMediaPass()
+ {
+ return $this->_mediaPass;
+ }
+
+ public function setMediaPass($mediaPass)
+ {
+ $this->_mediaPass = $mediaPass;
+ return $this;
+ }
+
+
+ public function getId()
+ {
+ return (int)$this->_id;
+ }
+
+ public function setId($id)
+ {
+ $this->_id = (int)$id;
+ return $this;
+ }
+
+ public function getCompany()
+ {
+ return $this->_company;
+ }
+
+ public function setCompany($company)
+ {
+ $this->_company = $company;
+ return $this;
+ }
+
+ public function getTitle()
+ {
+ return $this->_title;
+ }
+
+ public function setTitle($title)
+ {
+ $this->_title = $title;
+ return $this;
+ }
+
+
+ public function getFname()
+ {
+ return $this->_fname;
+ }
+
+ public function setFname($fname)
+ {
+ $this->_fname = $fname;
+ return $this;
+ }
+
+ public function getLname()
+ {
+ return $this->_lname;
+ }
+
+ public function setLname($lname)
+ {
+ $this->_lname = $lname;
+ return $this;
+ }
+
+ public function getEmail()
+ {
+ return $this->_email;
+ }
+
+ public function setEmail($email)
+ {
+ $this->_email = $email;
+ return $this;
+ }
+
+ public function getAddress()
+ {
+ return $this->_address;
+ }
+
+ public function setAddress($address)
+ {
+ $this->_address = $address;
+ return $this;
+ }
+
+ public function getAddress2()
+ {
+ return $this->_address2;
+ }
+
+ public function setAddress2($address2)
+ {
+ $this->_address2 = $address2;
+ return $this;
+ }
+
+ public function getCity()
+ {
+ return $this->_city;
+ }
+
+ public function setCity($city)
+ {
+ $this->_city = $city;
+ return $this;
+ }
+
+ public function getState()
+ {
+ return $this->_state;
+ }
+
+ public function setState($state)
+ {
+ $this->_state = $state;
+ return $this;
+ }
+
+ public function getZip()
+ {
+ return $this->_zip;
+ }
+
+ public function setZip($zip)
+ {
+ $this->_zip = $zip;
+ return $this;
+ }
+
+ public function getPhone()
+ {
+ return $this->_phone;
+ }
+
+ public function setPhone($phone)
+ {
+ $this->_phone = $phone;
+ return $this;
+ }
+
+ public function getMedia()
+ {
+ return $this->_media;
+ }
+
+ public function setMedia($media)
+ {
+ $this->_media = (bool)$media;
+ return $this;
+ }
+
+ public function getExpire()
+ {
+ return $this->_expire;
+ }
+
+ public function setExpire($expire)
+ {
+ $this->_expire = $expire;
+ return $this;
+ }
+
+ public function getApproved()
+ {
+ return (bool)$this->_approved;
+ }
+
+ public function setApproved($approved)
+ {
+ $this->_approved = (bool)$approved;
+ return $this;
+ }
+
+ public function getDenied()
+ {
+ return (bool)$this->_denied;
+ }
+
+ public function setDenied($denied)
+ {
+ $this->_denied = (bool)$denied;
+ return $this;
+ }
+
+
+}
--- /dev/null
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of Photo
+ *
+ * @author steve
+ */
+class Toolkit_Photos_Photo
+ extends Toolkit_Table
+{
+ public $tableName = 'photo';
+ protected $id;
+ protected $title;
+ protected $description;
+ protected $image;
+ protected $catid;
+ protected $pos;
+}
+
--- /dev/null
+<?php
+
+/**
+ * SlideShowCategoryFilter.php
+ *
+ * PHP version 5.3
+ *
+ * @category Toolkit
+ * @package Photos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Photos_SlideShowCategoryFilter
+ *
+ * Description of SlideShowFilter
+ *
+ * @category Toolkit
+ * @package Photos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class Toolkit_Photos_SlideShowCategoryFilter
+ extends FilterIterator
+{
+ public function __construct(Iterator $iterator)
+ {
+ parent::__construct($iterator);
+ }
+
+ public function accept()
+ {
+ $category = $this->getInnerIterator()->current();
+ if ($category['slideshow']) {
+ return true;
+ }
+ return false;
+ }
+}
--- /dev/null
+; Production server configuration data
+[production]
+; Application settings
+application.name = "Image Library"
+application.path = BASE "Toolkit/Photos/Controllers"
+application.application = "Photos/Controllers"
+
+; turn on media exclusive flag for categories and photos
+; This option also may need other new fields not added yet to the contact table
+settings.mediaExclusive = Off
+settings.photoNameSearch = Off
+settings.slideShowOption = Off
+
+; default Flexy Options for this application
+flexyOptions.templateDir = BASE "Toolkit/Photos/templates"
+flexyOptions.compileDir = BASE "Toolkit/Photos/templates/compiled"
+flexyOptions.url_rewrite = "baseurl/::" BASE_URL ",basesecureurl/::" BASE_SECURE_URL ",glmappbaseurl/::" GLM_APP_BASE_URL
+flexyOptions.forceCompile = Off
+flexyOptions.locale = "en"
+flexyOptions.debug = Off
+flexyOptions.allowPHP = On
+flexyOptions.flexyIgnore = On
+flexyOptions.globals = On
+flexyOptions.globalfunctions = On
+flexyOptions.privates = On
+flexyOptions.compiler = "Flexy"
+
+; development server configuration data inherits from production and
+; overrides values as necessary
+[development : production]
+
+; chuck's server configuration data inherits from development
+; and overrides values as necessary
+[chuck : development]
+
+; john's server configuration data inherits from development
+; and overrides values as necessary
+[john : development]
+
+; steve's server configuration data inherits from development
+; and overrides values as necessary
+[steve : development]
--- /dev/null
+.header {
+ margin: 10px 20px;
+ }
+#photo-gallery {
+ margin: 10px 20px;
+}
+#glmMediaGallery {
+ background: #F5F3E5;
+ border-width: 0 1px 1px;
+ border: 1px solid #A6C9E2;
+ padding: 15px;
+}
+div.thumb {
+ margin: 3px 9px;
+ border: 0px solid #A0ACC0;
+ height: auto;
+ float: left;
+ text-align: center;
+}
+.thumb img{
+ display: inline;
+ margin: 3px;
+ border: 1px solid #A0ACC0;
+ }
+.thumb a:hover img {border: 1px solid black;}
+.photocattitle {text-align: center; font-weight: bold;}
+.phototitle {text-align: center; font-weight: normal; width: 110px;}
+.galleryRow {clear: left;}
--- /dev/null
+.containerobj .widget {
+ background-color: white;
+}
+.containerobj .active .widget {
+ color: white;
+ background-color: #3671cf;
+}
+.containerobj .inpath .widget {
+ background-color: #d0d0d0;
+}
+#demo1 {
+ height: 200px;
+}
+#demo1 a {
+ padding: 0 3px;
+}
+.ui-dialog-buttonpane {
+ padding: 0 10px 0 20px !important;
+}
+#dialog-modal {
+ height: auto !important;
+}
+
+#addPageTo {
+ /*display: inline;
+ width: 82px;
+ height: 28px;
+ border: none;
+ text-align: left;
+ padding: 0 0 0 24px;*/
+ margin: 6px 0 0 0;
+ float: right;
+}
+#deleteBtn2 {
+ display: block;
+ position:absolute;
+ bottom: 36px;
+ right: 5px;
+ width: 55px;
+ height: 28px;
+ background: url(../assets/btn_delete.gif) no-repeat;
+ border: none;
+ padding: 0 0 0 27px;
+ font-size: 14px;
+ font-size: 1.4rem;
+ line-height: 28px;
+ text-decoration: none;
+ margin: 0px;
+}
+.ui-state-highlight {
+ color: #09F;
+ border-color: #09F;
+ background: #09F;
+}
+.ui-widget-content {
+ margin: 0;
+ padding: 0;
+}
+#photoGalleryFooter {
+ display: none;
+ padding: 10px;
+ text-align: center;
+ width: 100%;
+ float: bottom;
+}
+
+/* Search Form styles */
+#photoAdminSearch input[type="search"],
+ #categoryAdminSearch select {
+ height: 26px;
+ font-size: 18px;
+ width: 300px;
+ border: 1px solid #CCCCCC;
+ background-color: #EFEFEF !important;
+ }
+ #mediaGallerySearchForm {
+ padding: 0;
+ margin: 20px 0 20px;
+ }
+ #categorySearchWrapper {
+ width: 800px;
+ height: 34px;
+ position: relative;
+ border-bottom: 1px solid #CCC;
+ }
+ #categoryAdminSearch select {
+ display: block;
+ position: relative;
+ float: left;
+ z-index: 99;
+ left: 0;
+ top: 0;
+ width: 37.75%;
+ margin: 0 .5% 0 0;
+ font-size: 14px;
+ font-weight: normal;
+ color: #666;
+ height: 27px;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* Opera/IE 8+ */
+ padding:.2em;/.3em;
+ }
+ #categoryAdminSearch input[type="submit"], #photoAdminSearch input[type="submit"] {
+ display: block;
+ position: relative;
+ float: left;
+ z-index: 99;
+ right: 0;
+ top: 0;
+ width: 10%;
+ margin: 0;
+ font-size: 14px;
+ font-weight: normal;
+ color: #666;
+ margin: 0;
+ height: 28px;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* Opera/IE 8+ */
+ }
+ #photoAdminSearch input[type="search"] {
+ display: block;
+ position: relative;
+ float: left;
+ z-index: 99;
+ left: 0;
+ top: 0;
+ width: 37.75%;
+ margin: 0 .5% 0 3%;
+ font-size: 14px;
+ font-weight: normal;
+ color: #333;
+ height: 27px;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* Opera/IE 8+ */
+ padding:.2em;/.3em;
+ padding-left: 6px;
+ }
+ div.photo-category-list {
+ background: #EFEFEF;
+ border-radius: 5px;
+ display: block;
+ float: left;
+ height: 148px;
+ margin: 0 20px 20px 0;
+ padding: 10px;
+ position: relative;
+ width: 120px;
+ border: 1px solid #CCC;
+ -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
+ box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
+ }
+ div.pCount {
+ background-color: #333;
+ border-radius: 30px 30px 30px 30px;
+ -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
+ box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
+ color: white;
+ display: inline;
+ float: right;
+ font-weight: bold;
+ padding: 1px 5px;
+ position: absolute;
+ right: -8px;
+ text-shadow: 1px 1px grey;
+ top: 0;
+ }
+ div.photo-category-list h1 {
+ bottom: 10px;
+ left: 10px;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 123px;
+ }
+ div.photo-category-list img {
+ border: medium none;
+ border-radius: 5px;
+ -webkit-box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.2);
+ box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.2);
+ border: 1px solid #CCC;
+ }
+
+/* edit category form styles */
+#editCategoryForm .webform {
+ margin: 10px 0;
+ width: 400px;
+ border: 1px solid #CCC;
+ border-radius: 5px;
+ padding: 10px 2%;
+ }
+ #editCategoryForm .webform td {
+ width: 100%;
+ float: left;
+ border: 0;
+ text-align: left;
+ }
+ #editCategoryForm .webform td input[type="text"] {
+ display: block;
+ position: relative;
+ z-index: 99;
+ left: 0;
+ top: 0;
+ width: 100%;
+ margin: 0;
+ font-size: 14px;
+ font-weight: normal;
+ color: #333;
+ height: 27px;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* Opera/IE 8+ */
+ padding:.2em;/.3em;
+ padding-left: 6px;
+ background: #EFEFEF !important;
+ border: 1px solid #CCC;
+ }
+ .category-category-list {
+ position: relative;
+ box-shadow: 1px 2px 2px grey;
+ border-radius: 10px;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ display:block;
+ width: 120px;
+ float: left;
+ background: #D6DFC3;
+ margin: 5px;
+ padding: 10px;
+ height: 130px;
+ }
+ .category-category-list h1 {
+ position: absolute;
+ bottom: 0;
+ left: 5px;
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
+ width: 123px;;
+ }
+ .category-category-list h1 a {
+ color: #006BB4;
+ font-size: 12px;
+ text-decoration: none;
+ padding: 0;
+ margin: 0;
+ overflow: hidden;
+ white-space: nowrap;
+ }
+ .category-category-list img {
+ box-shadow: 1px 2px 2px grey;
+ border-radius: 10px;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ border: none;
+ }
+ #addPageTo, form#editCategoryForm input[type="submit"] {
+ /*box-shadow: 1px 2px 2px grey;
+ background-color: #D6DFC3;
+ font-size: 16px;
+ font-weight: normal;
+ text-align: center;
+ margin: 0;
+ padding: 1px 5px 1px 5px;
+ width: auto;*/
+ }
+ .pageLink {
+ /*border-radius: 10px;*/
+ /*box-shadow: 1px 2px 2px grey;
+ width: 280px;
+ background-color: #D6DFC3;
+ padding: 5px;
+ margin: 5px 0;
+ float: left;*/
+ width: 96%;
+ padding: 5px 2%;
+ border-bottom: 1px solid #CCC;
+ }
+ .btnDelete {
+ float: right;
+ }
+ #displayWrapper {
+ margin: 3px 0;
+ border-left: 1px solid #CCC;
+ border-right: 1px solid #CCC;
+ border-top: 1px solid #CCC;
+ background: #EFEFEF;
+ }
+ #categorySave {
+ width: 31.333333%;
+ margin: 0 2% 0 0;
+ }
+ #categoryCancel {
+ width: 31.333333%;
+ margin: 0 2% 0 0;
+ }
+ #categoryDelete {
+ width: 31.333333%;
+ margin: 0;
+ }
+ #pagesLabel {
+ padding-top: 5px;
+ }
+ div.category-category-list {
+ background: #EFEFEF;
+ border-radius: 5px;
+ display: block;
+ float: left;
+ height: 148px;
+ margin: 0 20px 20px 0;
+ padding: 10px;
+ position: relative;
+ width: 120px;
+ border: 1px solid #CCC;
+ -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
+ box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
+ }
+ div.category-category-list h1 {
+ bottom: 10px;
+ left: 10px;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 123px;
+ }
+ div.category-category-list img {
+ border: medium none;
+ border-radius: 5px;
+ -webkit-box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.2);
+ box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.2);
+ border: 1px solid #CCC;
+ }
+ div#categoryPhotos {
+ margin-top: 20px;
+ }
--- /dev/null
+/* ----------------------------------------------------------------------------------------------------------------*/
+/* ---------->>> global settings needed for thickbox <<<-----------------------------------------------------------*/
+/* ----------------------------------------------------------------------------------------------------------------*/
+/* *{padding: 0; margin: 0;} */
+
+/* ----------------------------------------------------------------------------------------------------------------*/
+/* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/
+/* ----------------------------------------------------------------------------------------------------------------*/
+#TB_window {
+ font: 12px Arial, Helvetica, sans-serif;
+ color: #333333;
+}
+
+#TB_secondLine {
+ font: 10px Arial, Helvetica, sans-serif;
+ color:#666666;
+}
+
+#TB_window a:link {color: #666666;}
+#TB_window a:visited {color: #666666;}
+#TB_window a:hover {color: #000;}
+#TB_window a:active {color: #666666;}
+#TB_window a:focus{color: #666666;}
+
+/* ----------------------------------------------------------------------------------------------------------------*/
+/* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/
+/* ----------------------------------------------------------------------------------------------------------------*/
+#TB_overlay {
+ position: fixed;
+ z-index:100;
+ top: 0px;
+ left: 0px;
+ height:100%;
+ width:100%;
+}
+
+.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;}
+.TB_overlayBG {
+ background-color:#000;
+ filter:alpha(opacity=75);
+ -moz-opacity: 0.75;
+ opacity: 0.75;
+}
+
+* html #TB_overlay { /* ie6 hack */
+ position: absolute;
+ height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
+}
+
+#TB_window {
+ position: fixed;
+ background: #ffffff;
+ z-index: 102;
+ color:#000000;
+ display:none;
+ border: 4px solid #525252;
+ text-align:left;
+ top:50%;
+ left:50%;
+}
+
+* html #TB_window { /* ie6 hack */
+position: absolute;
+margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
+}
+
+#TB_window img#TB_Image {
+ display:block;
+ margin: 15px 0 0 15px;
+ border-right: 1px solid #ccc;
+ border-bottom: 1px solid #ccc;
+ border-top: 1px solid #666;
+ border-left: 1px solid #666;
+}
+
+#TB_caption{
+/* height:25px; */
+ padding:7px 30px 10px 25px;
+ float:left;
+}
+
+#TB_DownloadLinks {
+ padding:7px 30px 10px 25px;
+ float:left;
+}
+
+#TB_closeWindow{
+ height:25px;
+ padding:11px 25px 10px 0;
+ float:right;
+}
+
+#TB_closeAjaxWindow{
+ padding:7px 10px 5px 0;
+ margin-bottom:1px;
+ text-align:right;
+ float:right;
+}
+
+#TB_ajaxWindowTitle{
+ float:left;
+ padding:7px 0 5px 10px;
+ margin-bottom:1px;
+}
+
+#TB_title{
+ background-color:#e8e8e8;
+ height:27px;
+}
+
+#TB_ajaxContent{
+ clear:both;
+ padding:2px 15px 15px 15px;
+ overflow:auto;
+ text-align:left;
+ line-height:1.4em;
+}
+
+#TB_ajaxContent.TB_modal{
+ padding:15px;
+}
+
+#TB_ajaxContent p{
+ padding:5px 0px 5px 0px;
+}
+
+#TB_load{
+ position: fixed;
+ display:none;
+ height:13px;
+ width:208px;
+ z-index:103;
+ top: 50%;
+ left: 50%;
+ margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */
+}
+
+* html #TB_load { /* ie6 hack */
+position: absolute;
+margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
+}
+
+#TB_HideSelect{
+ z-index:99;
+ position:fixed;
+ top: 0;
+ left: 0;
+ background-color:#fff;
+ border:none;
+ filter:alpha(opacity=0);
+ -moz-opacity: 0;
+ opacity: 0;
+ height:100%;
+ width:100%;
+}
+
+* html #TB_HideSelect { /* ie6 hack */
+ position: absolute;
+ height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
+}
+
+#TB_iframeContent{
+ clear:both;
+ border:none;
+ margin-bottom:-1px;
+ margin-top:1px;
+ _margin-bottom:1px;
+}
--- /dev/null
+/**
+ * jquery.columnview-1.2.js
+ *
+ * Created by Chris Yates on 2009-02-26.
+ * http://christianyates.com
+ * Copyright 2009 Christian Yates and ASU Mars Space Flight Facility. All rights reserved.
+ *
+ * Supported under jQuery 1.2.x or later
+ * Keyboard navigation supported under 1.3.x or later
+ *
+ * Dual licensed under MIT and GPL.
+ */
+
+(function($){
+ $.fn.columnview = function(options){
+
+ var settings = $.extend({}, $.fn.columnview.defaults, options);
+
+ // Add stylesheet, but only once
+ if(!$('.containerobj').get(0)){
+ $('head').prepend('\
+ <style type="text/css" media="screen">\
+ .containerobj {\
+ border: 1px solid #ccc;\
+ height:5em;\
+ overflow-x:auto;\
+ overflow-y:hidden;\
+ white-space:nowrap;\
+ position:relative;\
+ }\
+ .containerobj div {\
+ height:100%;\
+ overflow-y:scroll;\
+ overflow-x:hidden;\
+ position:absolute;\
+ }\
+ .containerobj a {\
+ display:block;\
+ white-space:nowrap;\
+ clear:both;\
+ padding-right:15px;\
+ overflow:hidden;\
+ text-decoration:none;\
+ }\
+ .containerobj a:focus {\
+ outline:none;\
+ }\
+ .containerobj a canvas {\
+ }\
+ .containerobj .feature {\
+ min-width:200px;\
+ overflow-y:auto;\
+ }\
+ .containerobj .feature a {\
+ white-space:normal;\
+ }\
+ .containerobj .hasChildMenu {\
+ }\
+ .containerobj .active {\
+ background-color:#3671cf;\
+ color:#fff;\
+ }\
+ .containerobj .inpath {\
+ background-color:#d0d0d0;\
+ color:#000;\
+ }\
+ .containerobj .hasChildMenu .widget {\
+ color:black;\
+ position:absolute;\
+ right:0;\
+ text-decoration:none;\
+ font-size:0.7em;\
+ }\
+ </style>');
+ }
+
+ // Hide original list
+ $(this).hide();
+ // Reset the original list's id
+ var origid = $(this).attr('id');
+ if (origid) {
+ $(this).attr('id', origid + "-processed");
+ }
+
+ // Create new top container from top-level LI tags
+ var top = $(this).children('li');
+ var container = $('<div/>').addClass('containerobj').attr('id', origid).insertAfter(this);
+ var topdiv = $('<div class="top"></div>').appendTo(container);
+ // Set column width
+ if (settings.fixedwidth || $.browser.msie) { // MSIE doesn't support auto-width
+ var width = typeof settings.fixedwidth == "string" ? settings.fixedwidth : '200px';
+ $('.top').width(width);
+ }
+ $.each(top,function(i,item){
+ var topitem = $(':eq(0)',item).clone(true).wrapInner("<span/>").data('sub',$(item).children('ul')).appendTo(topdiv);
+ if (settings.fixedwidth || $.browser.msie)
+ $(topitem).css({'text-overflow':'ellipsis', '-o-text-overflow':'ellipsis','-ms-text-overflow':'ellipsis'});
+ if($(topitem).data('sub').length) {
+ $(topitem).addClass('hasChildMenu');
+ addWidget(container, topitem);
+ }
+ });
+
+ // Firefox doesn't repeat keydown events when the key is held, so we use
+ // keypress with FF/Gecko/Mozilla to enable continuous keyboard scrolling.
+ var key_event = $.browser.mozilla ? 'keypress' : 'keydown';
+
+ // Event handling functions
+ $(container).bind("click " + key_event, function(event){
+ if ($(event.target).is("a,span")) {
+ if ($(event.target).is("span")){
+ var self = $(event.target).parent();
+ }
+ else {
+ var self = event.target;
+ }
+ if (!settings.multi) {
+ delete event.shiftKey;
+ delete event.metaKey;
+ }
+ self.focus();
+ var container = $(self).parents('.containerobj');
+ // Handle clicks
+ if (event.type == "click"){
+ var level = $('div',container).index($(self).parents('div'));
+ var isleafnode = false;
+ // Remove blocks to the right in the tree, and 'deactivate' other
+ // links within the same level, if metakey is not being used
+ $('div:gt('+level+')',container).remove();
+ if (!event.metaKey && !event.shiftKey) {
+ $('div:eq('+level+') a',container).removeClass('active').removeClass('inpath');
+ $('.active',container).addClass('inpath');
+ $('div:lt('+level+') a',container).removeClass('active');
+ }
+ // Select intermediate items when shift clicking
+ // Sorry, only works with jQuery 1.4 due to changes in the .index() function
+ if (event.shiftKey) {
+ var first = $('a.active:first', $(self).parent()).index();
+ var cur = $(self).index();
+ var range = [first,cur].sort(function(a,b){return a - b;});
+ $('div:eq('+level+') a', container).slice(range[0], range[1]).addClass('active');
+ }
+ $(self).addClass('active');
+ if ($(self).data('sub').children('li').length && !event.metaKey) {
+ // Menu has children, so add another submenu
+ var w = false;
+ if (settings.fixedwidth || $.browser.msie)
+ w = typeof settings.fixedwidth == "string" ? settings.fixedwidth : '200px';
+ submenu(container,self,w);
+ }
+ else if (!event.metaKey && !event.shiftKey) {
+ // No children, show title instead (if it exists, or a link)
+ isleafnode = true;
+ var previewcontainer = $('<div/>').addClass('feature').appendTo(container);
+ // Fire preview handler function
+ if ($.isFunction(settings.preview)) {
+ // We're passing the element back to the callback
+ var preview = settings.preview($(self));
+ }
+ // If preview is specifically disabled, do nothing with the previewbox
+ else if (!settings.preview) {
+ }
+ // If no preview function is specificied, use a default behavior
+ else {
+ var title = $('<a/>').attr({href:$(self).attr('href')}).text($(self).attr('title') ? $(self).attr('title') : $(self).text());
+ $(previewcontainer).html(title);
+ }
+ // Set the width
+ var remainingspace = 0;
+ $.each($(container).children('div').slice(0,-1),function(i,item){
+ remainingspace += $(item).width();
+ });
+ var fillwidth = $(container).width() - remainingspace;
+ $(previewcontainer).css({'top':0,'left':remainingspace}).width(fillwidth).show();
+ }
+ // Fire onchange handler function, but only if multi-select is off.
+ // FIXME Need to deal multiple selections.
+ if ($.isFunction(settings.onchange) && !settings.multi) {
+ // We're passing the element back to the callback
+ var onchange = settings.onchange($(self), isleafnode);
+ }
+ }
+ // Handle Keyboard navigation
+ if(event.type == key_event){
+ switch(event.keyCode){
+ case(37): //left
+ $(self).parent().prev().children('.inpath').focus().trigger("click");
+ break;
+ case(38): //up
+ $(self).prev().focus().trigger("click");
+ break;
+ case(39): //right
+ if($(self).hasClass('hasChildMenu')){
+ $(self).parent().next().children('a:first').focus().trigger("click");
+ }
+ break;
+ case(40): //down
+ $(self).next().focus().trigger("click");
+ break;
+ case(13): //enter
+ $(self).trigger("dblclick");
+ break;
+ }
+ }
+ event.preventDefault();
+ }
+ });
+
+ };
+
+ $.fn.columnview.defaults = {
+ multi: false, // Allow multiple selections
+ preview: true, // Handler for preview pane
+ fixedwidth: false,// Use fixed width columns
+ onchange: false // Handler for selection change
+ };
+
+ // Generate deeper level menus
+ function submenu(container,item,width){
+ var leftPos = 0;
+ $.each($(container).children('div'),function(i,mydiv){
+ leftPos += $(mydiv).width();
+ });
+ var submenu = $('<div/>').css({'top':0,'left':leftPos}).appendTo(container);
+ // Set column width
+ if (width)
+ $(submenu).width(width);
+ var subitems = $(item).data('sub').children('li');
+ $.each(subitems,function(i,subitem){
+ var subsubitem = $(':eq(0)',subitem).clone(true).wrapInner("<span/>").data('sub',$(subitem).children('ul')).appendTo(submenu);
+ if (width)
+ $(subsubitem).css({'text-overflow':'ellipsis', '-o-text-overflow':'ellipsis','-ms-text-overflow':'ellipsis'});
+ if($(subsubitem).data('sub').length) {
+ $(subsubitem).addClass('hasChildMenu');
+ addWidget(container, subsubitem);
+ }
+ });
+ }
+
+ // Uses canvas, if available, to draw a triangle to denote that item is a parent
+ function addWidget(container, item, color){
+ var triheight = $(item).height();
+ var canvas = $("<canvas></canvas>").attr({height:triheight,width:10}).addClass('widget').appendTo(item); if(!color){ color = $(canvas).css('color'); }
+ canvas = $(canvas).get(0);
+ if(canvas.getContext){
+ var context = canvas.getContext('2d');
+ context.fillStyle = color;
+ context.beginPath();
+ context.moveTo(3,(triheight/2 - 3));
+ context.lineTo(10,(triheight/2));
+ context.lineTo(3,(triheight/2 + 3));
+ context.fill();
+ } else {
+ /**
+ * Canvas not supported - put something in there anyway that can be
+ * suppressed later if desired. We're using a decimal character here
+ * representing a "black right-pointing pointer" in Windows since IE
+ * is the likely case that doesn't support canvas.
+ */
+ $("<span>►</span>").addClass('widget').css({'height':triheight,'width':10}).prependTo(item);
+ }
+ $(container).find('.widget').bind('click', function(event){
+ event.preventDefault();
+ });
+
+ }
+})(jQuery);
\ No newline at end of file
--- /dev/null
+$(function(){
+ $("#photoCategoryId").change(function(){
+ $(this).parent().submit();
+ });
+});
+
+(function(window, PhotoSwipe){
+ //if ($(".photoimg").length > 0) {
+ if(document.addEventListener) {
+ document.addEventListener('DOMContentLoaded', function(){
+ var
+ options = {
+ getImageCaption: function(el){
+ var captionText, captionDesc, captionId, captionEl;
+
+ if (el.nodeName === "A") {
+ captionText = el.getAttribute('title');
+ captionDesc = el.getAttribute('rel');
+ captionId = el.getAttribute('data-photoid');
+ captionDownload = el.getAttribute('data-download');
+ }
+
+ // Return a DOM element with custom styling
+ if((captionText != null && captionText != "") || (captionDesc != null && captionDesc != "")) {
+ captionEl = document.createElement('div');
+ captionEl.className = 'captionWrapper';
+ // Add Caption Title.
+ if(captionText != null && captionText != "") {
+ captionTitleOutput = document.createElement('h2');
+ captionTitleOutput.className = "captionTitleWrapper";
+ captionTitleOutput.appendChild(document.createTextNode(captionText));
+ captionEl.appendChild(captionTitleOutput);
+ }
+ // Add Caption Description.
+ if(captionDesc != null && captionDesc != "") {
+ captionDescOutput = document.createElement('p');
+ captionDescOutput.className = "captionDescWrapper";
+ captionDescOutput.appendChild(document.createTextNode(captionDesc));
+ captionEl.appendChild(captionDescOutput);
+ }
+ } else {
+ //captionEl = document.createElement('div');
+ //captionEl.style.cssText = 'display:none; width:0; height:0;';
+ captionEl = "";
+ }
+ // Add Download links.
+ if(captionId != null && captionId != "" && captionDownload == "1") {
+ captionIdOutput = document.createElement('div');
+ captionIdOutput.className = 'download_wrapper';
+ captionEl.appendChild(captionIdOutput);
+ // Add Link Text.
+ captionLinkText = document.createElement('span');
+ captionText = document.createTextNode("Download for ");
+ captionLinkText.appendChild(captionText);
+ captionIdOutput.appendChild(captionLinkText);
+ // Add Web Link.
+ captionWebLink = base_url + "download-photo-web/" + captionId + "/";
+ downloadWebLink = document.createElement('a');
+ linkText = document.createTextNode("Web");
+ downloadWebLink.appendChild(linkText);
+ downloadWebLink.title = "Download for Web";
+ downloadWebLink.href = captionWebLink;
+ captionIdOutput.appendChild(downloadWebLink);
+ // Add Spacer Text.
+ captionSpacerText = document.createElement('span');
+ captionText = document.createTextNode(" - ");
+ captionSpacerText.appendChild(captionText);
+ captionIdOutput.appendChild(captionSpacerText);
+ // Add Print Link.
+ captionPrintLink = base_url + "download-photo-print/" + captionId + "/";
+ downloadPrintLink = document.createElement('a');
+ linkPrintText = document.createTextNode("Print");
+ downloadPrintLink.appendChild(linkPrintText);
+ downloadPrintLink.title = "Download for Print";
+ downloadPrintLink.href = captionPrintLink;
+ captionIdOutput.appendChild(downloadPrintLink);
+ }
+
+ return captionEl;
+
+ // Alternatively you can just pass back a string. However, any HTML
+ // markup will be escaped
+
+ }, captionAndToolbarAutoHideDelay:0, imageScaleMethod: "fitNoUpscale", captionAndToolbarFlipPosition: true, backButtonHideEnabled: true
+ },
+ instance = PhotoSwipe.attach( window.document.querySelectorAll('a.photoimg'), options );
+ }, false);
+ } else { // You are using IE8- and you should feel bad.
+ document.attachEvent('onreadystatechange', function(){
+ var
+ options = {
+ getImageCaption: function(el){
+ var captionText, captionDesc, captionId, captionEl;
+
+ if (el.nodeName === "A") {
+ captionText = el.getAttribute('title');
+ captionDesc = el.getAttribute('rel');
+ captionId = el.getAttribute('data-photoid');
+ captionDownload = el.getAttribute('data-download');
+ }
+
+ // Return a DOM element with custom styling
+ if((captionText != null && captionText != "") || (captionDesc != null && captionDesc != "")) {
+ //captionEl = document.createElement('div');
+ captionEl = $('<div style="display: block;width: 100%;overflow: hidden;"></div>');
+ captionEl.addClass = 'captionWrapper';
+ // Add Caption Title.
+ if(captionText != null && captionText != "") {
+ //captionTitleOutput = document.createElement('h2');
+ captionTitleOutput = $('<h2 style="display: block;width: 50%;float: left;font-size: 18px;font-weight: bold;color: #FFF;text-align: left;padding: 10px 20px;margin: 0;"></h2>');
+ captionTitleOutput.addClass = "captionTitleWrapper";
+ captionTitleOutput.append(captionText);
+ captionEl.append(captionTitleOutput);
+ }
+ // Add Caption Description.
+ if(captionDesc != null && captionDesc != "") {
+ //captionDescOutput = document.createElement('p');
+ captionDescOutput = $('<p style="display: block;width: 50%;float: left;clear: left;font-size: 14px;color: #FFF;text-align: left;padding: 0 20px 10px 20px;margin: 0;"></p>');
+ captionDescOutput.addClass = "captionDescWrapper";
+ captionDescOutput.append(document.createTextNode(captionDesc));
+ captionEl.append(captionDescOutput);
+ }
+ } else {
+ //captionEl = document.createElement('div');
+ //captionEl.style.cssText = 'display:none; width:0; height:0;';
+ captionEl = "";
+ }
+ // Add Download links.
+ if(captionId != null && captionId != "" && captionDownload == "1") {
+ captionIdOutput = $('<div style="display: block;position: absolute;z-index: 99;top: 10px;right: 20px;width: 30%;font-size: 14px;color: #FFF;text-align: left;padding: 6px 0 10px 20px;margin: 0;text-align: right;"></div>');
+ captionIdOutput.addClass = 'download_wrapper';
+ captionEl.append(captionIdOutput);
+ // Add Link Text.
+ captionLinkText = $('<span></span>');
+ captionText = document.createTextNode("Download for ");
+ captionLinkText.append(captionText);
+ captionIdOutput.append(captionLinkText);
+ // Add Web Link.
+ captionWebLink = base_url + "download-photo-web/" + captionId + "/";
+ downloadWebLink = $('<a style="color: #CCC;"></a>');
+ linkText = document.createTextNode("Web");
+ downloadWebLink.append(linkText);
+ downloadWebLink.title = "Download for Web";
+ downloadWebLink.attr('href', captionWebLink);
+ captionIdOutput.append(downloadWebLink);
+ // Add Spacer Text.
+ captionSpacerText = $('<span></span>');
+ captionText = document.createTextNode(" - ");
+ captionSpacerText.append(captionText);
+ captionIdOutput.append(captionSpacerText);
+ // Add Print Link.
+ captionPrintLink = base_url + "download-photo-print/" + captionId + "/";
+ downloadPrintLink = $('<a style="color: #CCC;"></a>');
+ linkPrintText = document.createTextNode("Print");
+ downloadPrintLink.append(linkPrintText);
+ downloadPrintLink.title = "Download for Print";
+ downloadPrintLink.attr('href', captionPrintLink);
+ captionIdOutput.append(downloadPrintLink);
+ }
+
+ return captionEl;
+
+ // Alternatively you can just pass back a string. However, any HTML
+ // markup will be escaped
+
+ }, captionAndToolbarAutoHideDelay:0, imageScaleMethod: "fitNoUpscale", captionAndToolbarFlipPosition: true, backButtonHideEnabled: true
+ },
+ instance = PhotoSwipe.attach( window.document.querySelectorAll('a.photoimg'), options );
+ }, false);
+ }
+ //}
+}(window, window.Code.PhotoSwipe));
+
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+
+HTTP_Session2::useCookies(false);
+HTTP_Session2::start();
+
+$catid = filter_var($_REQUEST['catid'], FILTER_VALIDATE_INT);
+$dbh = Toolkit_Database::getInstance();
+$authContainer = new Toolkit_Photos_AuthContainer($dbh);
+$photoAuth = new Toolkit_Photos_Auth(
+ $authContainer,
+ '',
+ false
+);
+$photoAuth->start();
+
+if (isset($_REQUEST['logout'])) {
+ $photoAuth->logout();
+ header('Location: ' . BASE_URL . 'index.php?catid=' . $catid);
+ exit;
+}
+
+if (!$photoAuth->checkAuth()) {
+ // see if the user exists but has expired
+ $userName = filter_var($_REQUEST['username'], FILTER_SANITIZE_STRING);
+ $passWord = filter_var($_REQUEST['password'], FILTER_SANITIZE_STRING);
+ $status = $photoAuth->getStatus();
+ if ($passWord && $userName) {
+ try {
+ $sql = "
+ SELECT id
+ FROM contacts.contact
+ WHERE email = :uname
+ AND media_pass = :pword
+ AND media = true
+ AND approved = true
+ AND expire < current_date";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':uname', $userName, PDO::PARAM_STR);
+ $stmt->bindParam(':pword', $passWord, PDO::PARAM_STR);
+ $stmt->execute();
+ $row = $stmt->fetch(PDO::FETCH_ASSOC);
+ if ($row !== FALSE) {
+ $status = -4;
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+ // Manually adjust the authentication status for empty credentials
+ if (empty($_POST['username']) || empty($_POST['password'])) {
+ $status = -3;
+ }
+ header('Location: '
+ . BASE_URL . 'index.php?catid=' . $catid . '&status=' . $status);
+ exit;
+} else {
+ header('Location: ' . BASE_URL . 'index.php?catid=' . $catid);
+}
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+
+HTTP_Session2::useCookies(false);
+HTTP_Session2::start();
+$dbh = Toolkit_Database::getInstance();
+$catid = filter_var($_REQUEST['catid'], FILTER_VALIDATE_INT);
+$authContainer = new Toolkit_Photos_AuthContainer($dbh);
+
+$photoAuth = new Auth(
+ $authContainer,
+ array(
+ 'sessionName' => 'glmMedia',
+ 'allowLogin' => true,
+ 'dbFields' => array('id', 'fname', 'lname')
+ ),
+ '',
+ false
+);
+$photoAuth->setIdle(86400, true);
+$photoAuth->start();
+//var_dump($_REQUEST);
+
+// get image name from db
+$photoId = filter_var($_REQUEST['photo_id'], FILTER_VALIDATE_INT);
+if (!$photoId) {
+ die('Sorry no image found');
+}
+$isAuthorized = $photoAuth->checkAuth();
+try {
+ // here we'll need to also check to make sure that if they're not
+ // logged in they cannot get the exclusive photos.
+ $where
+ = (!$isAuthorized)
+ ? "AND exclusive <> true"
+ : '';
+ $sql = "
+ SELECT image
+ FROM photo
+ WHERE id = :id
+ $where";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $photoId, PDO::PARAM_INT);
+ $stmt->execute();
+ $imageName = $stmt->fetchColumn();
+ if (!$imageName) {
+ return false;
+ }
+} catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+}
+//var_dump($imageName);
+//exit;
+if (!$isAuthorized) {
+ // use watermarked image style
+ $style = ($_REQUEST['type'] == 'print') ? 'downPrint': 'downWeb';
+ $fileUrlPath = FILE_SERVER_URL . IS_OWNER_ID . "/{$style}/{$imageName}";
+
+ $ch = curl_init($fileUrlPath);
+ curl_setopt($ch, CURLOPT_TIMEOUT, 50);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ $imageResponse = curl_exec($ch);
+ if (!curl_errno($ch)) {
+ $bytes = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
+ header("Pragma: public");
+ header("Expires: 0");
+ header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
+ header("Content-Type: application/force-download");
+ header("Content-Type: application/octet-stream");
+ header("Content-Type: application/download");
+ header("Content-Disposition: attachment;filename=photo-" . $photoId.".jpeg");
+ header("Content-Transfer-Encoding: binary ");
+ curl_close($ch);
+ echo $imageResponse;
+ }
+
+ exit;
+} else {
+ // use style without watermarks
+ $style = ($_REQUEST['type'] == 'print') ? 'downPrintMedia': 'downWebMedia';
+ $fileUrlPath = FILE_SERVER_URL . IS_OWNER_ID . "/{$style}/{$imageName}";
+ $ch = curl_init($fileUrlPath);
+ curl_setopt($ch, CURLOPT_TIMEOUT, 50);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ $imageResponse = curl_exec($ch);
+ header("Pragma: public");
+ header("Expires: 0");
+ header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
+ header("Content-Type: application/force-download");
+ header("Content-Type: application/octet-stream");
+ header("Content-Type: application/download");
+ header("Content-Disposition: attachment;filename=photo-" . $photoId.".jpeg");
+ header("Content-Transfer-Encoding: binary ");
+ curl_close($ch);
+ echo $imageResponse;
+ exit;
+}
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+$jsonData = array();
+$mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ Toolkit_Database::getInstance()
+);
+$photoSearch = filter_var($_REQUEST['photoName'], FILTER_SANITIZE_STRING);
+$pageId = filter_var($_REQUEST['pageId'], FILTER_VALIDATE_INT);
+$gallery = new Toolkit_Photos_Gallery(
+ Toolkit_Database::getInstance(),
+ new Toolkit_Photos_Display(
+ Toolkit_Database::getInstance()
+ )
+);
+$galleries = $gallery->getPageGalleries($pageId);
+
+$photos = $mediaMapper->fetchPhotosByNameAndCats(
+ $photoSearch,
+ $galleries,
+ true
+);
+if ($photos) {
+ foreach ($photos as $photo) {
+ $jsonData[] = $photo->getTitle();
+ }
+}
+echo json_encode($jsonData);
--- /dev/null
+<?php
+
+require_once '../../setup.phtml';
+
+$mediaMapper = new Toolkit_Photos_Models_MediaMapper(
+ Toolkit_Database::getInstance()
+);
+
+$mediaMapper->fixAllPhoto2Cats();
--- /dev/null
+<div id="editCategorySection">
+ <header>
+ <hgroup>
+ <h1>
+ Edit Category
+ </h1>
+ </hgroup>
+ </header>
+ <form
+ id="editCategoryForm"
+ name="editCategoryForm"
+ action="{formAction:h}"
+ flexy:ignore="yes"
+ method="post">
+ {if:category}
+ <input type="hidden" name="id" value="{category.getId()}">
+ <input type="hidden" name="pos" value="{category.getPos()}">
+ {if:!mediaExclusive}
+ <input type="hidden" name="exclusive" value="0">
+ {end:}
+ {end:}
+ <table class="webform">
+ <tr>
+ <td class="labelcell">
+ Name
+ </td>
+ <td class="fieldcell">
+ {if:category}
+ <input type="text" name="category" value="{category.getCategory()}">
+ {else:}
+ <input type="text" name="category">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell" id="pagesLabel">
+ Pages for Display
+ </td>
+ <td class="fieldcell">
+ <div id="displayWrapper">
+ <div id="pages2PhotosDiv">
+ {if:pages2Categories}
+ <div class="pageLink" flexy:foreach="pages2Categories,page">
+ <input type="hidden" name="pages[]" value="{page[page]}">
+ {page[page_name]}
+ <a href="#" class="ui-icon ui-icon-trash btnDelete">Delete</a>
+ </div>
+ {end:}
+ </div>
+ <div id="dialog-modal" title="Page Selector" style="display:none;">
+ <div id="pages"></div>
+ </div>
+ <input type="submit" id="addPageTo" value="Add Pages">
+ </div><!--/#displayWrapper-->
+ </td>
+ </tr>
+ <tr flexy:if="slideShow">
+ <td class="labelcell">
+ SlideShow Option?
+ </td>
+ <td class="fieldcell">
+ <input type="hidden" name="slideshow" value="0"><label>
+ {if:category}
+ {if:category.getSlideShow()}
+ <input type="checkbox" name="slideshow" value="1" checked>
+ {else:}
+ <input type="checkbox" name="slideshow" value="1">
+ {end:}
+ {else:}
+ <input type="checkbox" name="slideshow" value="1">
+ {end:}Yes</label>
+ </td>
+ </tr>
+ <tr flexy:if="mediaExclusive">
+ <td class="labelcell">
+ Media Exclusive?
+ </td>
+ <td class="fieldcell">
+ <input type="hidden" name="exclusive" value="0"><label>
+ {if:category}
+ {if:category.getExclusive()}
+ <input type="checkbox" name="exclusive" value="1" checked>
+ {else:}
+ <input type="checkbox" name="exclusive" value="1">
+ {end:}
+ {else:}
+ <input type="checkbox" name="exclusive" value="1">
+ {end:}Yes</label>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center">
+ <input id="categorySave" type="submit" value="Save">
+ {if:category}
+ <input id="categoryCancel" type="submit" value="Cancel" name="Cancel">
+ <input id="categoryDelete" type="submit" value="Delete Category" name="Delete">
+ {end:}
+ </td>
+ </tr>
+ </table>
+ </form>
+</div>
+<div id="categoryPhotos">
+ <form id="sortable">
+ <input type="hidden" name="ac" value="movePhotos">
+ <input type="hidden" name="categoryId" value="{category.getId()}">
+ <div
+ class="category-category-list"
+ flexy:foreach="photos,photo">
+ <input type="hidden" name="photos[]" value="{photo.getId()}">
+ {if:photo.getImage()}
+ <a href="{editUrl:h}{photo.getId()}">
+ <img width="120" height="120" src="{imgPath:h}{photo.getImage():h}">
+ </a>
+ {end:}
+ <header>
+ <hgroup>
+ <h1>
+ <a href="{editUrl:h}{photo.getId()}">
+ {photo.getTitle()}
+ </a>
+ </h1>
+ </hgroup>
+ </header>
+ </div>
+ </form>
+</div>
+<script>
+ $(function(){
+ if ($("#categoryDelete").length) {
+ $("#categoryDelete").click(function(){
+ return confirm("This will Delete this Category.\nAre you sure?");
+ });
+ }
+ $('body').delegate('.btnDelete', 'click', function(){
+ $(this).parent().remove();
+ });
+ $("#sortable").sortable({
+ update: function() {
+ var inputs = $("#sortable").serialize();
+ $.get('./photos.php', inputs, console.log('positions saved'));
+ }
+ });
+ $("#addPageTo").click(function(){
+ var selectedPageId = null;
+ var selectedPageName = null;
+ $("#dialog-modal").dialog({
+ height: 240,
+ width: 800,
+ modal: true,
+ buttons: {
+ "Select Page": function() {
+ if (selectedPageId != '') {
+ // here is where it adds the page
+
+ console.log('Selected PageId: ' + selectedPageId);
+ console.log('Selected Pagename: ' + selectedPageName);
+ $("#pages2PhotosDiv").append('<div class="pageLink">'
+ + '<input type="hidden" name="pages[]" value="'
+ + selectedPageId + '">'
+ + selectedPageName
+ + '<a href="#" class="ui-icon ui-icon-trash btnDelete">Delete</a>'
+ + '</div>');
+ $(this).dialog("close");
+ } else {
+ alert("Select a Page");
+ }
+ },
+ Cancel: function() {
+ $(this).dialog("close");
+ }
+ }
+ });
+ $("#pages").load('photos.php?ac=showPages', function(){
+ $('#demo1').columnview({
+ preview:false,
+ onchange: function(element) {
+ selectedPageId = $(element).attr('data-page');
+ selectedPageName = $(element).attr('data-name');
+ }
+ });
+ });
+ return false;
+ });
+ });
+
+</script>
--- /dev/null
+<style>
+ #editPhotoForm .webform {
+ margin: 10px 0;
+ width: 400px;
+ border: 1px solid #CCC;
+ border-radius: 5px;
+ padding: 10px 2%;
+ }
+ #editPhotoForm .webform td {
+ width: 100%;
+ float: left;
+ border: 0;
+ text-align: left;
+ }
+ #editPhotoForm .webform td input[type="text"], #editPhotoForm .webform td select {
+ display: block;
+ position: relative;
+ z-index: 99;
+ left: 0;
+ top: 0;
+ width: 100%;
+ margin: 0;
+ font-size: 14px;
+ font-weight: normal;
+ color: #333;
+ height: 27px;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* Opera/IE 8+ */
+ padding:.2em;/.3em;
+ padding-left: 6px;
+ background: #EFEFEF !important;
+ border: 1px solid #CCC;
+ }
+ ol.asmList {
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* Opera/IE 8+ */
+ width: 100%;
+ border: 0;
+ background: #EFEFEF;
+ margin: 0;
+ padding: 0;
+ }
+ ol.asmList .asmListItem {
+ border: none;
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
+ box-sizing: border-box; /* Opera/IE 8+ */
+ border-bottom: 1px solid #CCC;
+ border-right: 1px solid #CCC;
+ border-left: 1px solid #CCC;
+ padding-bottom: 5px;
+ padding-left: 6px;
+ display: block;
+ min-height: 26px;
+ background: #FFFFFF;
+ }
+ #editPhotoForm .webform textarea {
+ resize: vertical;
+ width: 98.2%;
+ max-width: 98.2%;
+ min-width: 98.2%;
+ }
+ #photoSave {
+ width: 31.333333%;
+ margin: 0 2% 0 0;
+ }
+ #photoCancel {
+ width: 31.333333%;
+ margin: 0 2% 0 0;
+ }
+ #photoDelete {
+ width: 31.333333%;
+ margin: 0;
+ }
+</style>
+<div id="editPhotoSection">
+ <header>
+ <hgroup>
+ <h1>
+ Edit Photo in {categoryName}
+ </h1>
+ </hgroup>
+ </header>
+ <form
+ id="editPhotoForm"
+ name="editPhotoForm"
+ action="{formAction:h}"
+ flexy:ignore="yes"
+ method="post"
+ enctype="multipart/form-data">
+ {if:photo}
+ <input type="hidden" name="id" value="{photo.getId()}">
+ {if:!mediaExclusive}
+ <input type="hidden" name="exclusive" value="0">
+ {end:}
+ {end:}
+ <input type="hidden" name="catid" value="{_REQUEST[catid]}">
+ <table class="webform">
+ <tr>
+ <td class="labelcell">
+ Name
+ </td>
+ <td class="fieldcell">
+ {if:photo}
+ <input type="text" name="title" value="{photo.getTitle()}">
+ {else:}
+ <input type="text" name="title">
+ {end:}
+ </td>
+ </tr>
+ <tr flexy:if="mediaExclusive">
+ <td class="labelcell">
+ Media Exclusive?
+ </td>
+ <td class="fieldcell">
+ <input type="hidden" name="exclusive" value="0"><label>
+ {if:photo}
+ {if:photo.getExclusive()}
+ <input type="checkbox" name="exclusive" value="1" checked>
+ {else:}
+ <input type="checkbox" name="exclusive" value="1">
+ {end:}
+ {else:}
+ <input type="checkbox" name="exclusive" value="1">
+ {end:}Yes</label>
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ Download?
+ </td>
+ <td class="fieldcell">
+ <input type="hidden" name="download" value="0"><label>
+ {if:photo}
+ {if:photo.getDownload()}
+ <input type="checkbox" name="download" value="1" checked>
+ {else:}
+ <input type="checkbox" name="download" value="1">
+ {end:}
+ {else:}
+ <input type="checkbox" name="download" value="1">
+ {end:}Yes</label>
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ Category
+ </td>
+ <td class="fieldcell">
+ <select
+ id="P2CSelect"
+ name="photo2Categories[]"
+ title="Select Categories"
+ multiple>
+ <?php
+ foreach ($t->categories as $category) {
+ echo '<option value="'.$category->getId().'"';
+ if ($t->photo2Categories->offsetExists($category->getId())
+ || $category->getId() == $_REQUEST['catid']
+ ) {
+ echo ' selected';
+ }
+ echo '>'.$category->getCategory().'</option>';
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ Description
+ </td>
+ <td class="fieldcell">
+ {if:photo}
+ <textarea name="description">{photo.getDescription()}</textarea>
+ {else:}
+ <textarea name="description"></textarea>
+ {end:}
+ </td>
+ </tr>
+ {if:photo}
+ <tr>
+ <td class="labelcell">
+ Current Photo
+ </td>
+ <td class="fieldcell">
+ <input type="hidden" name="image" value="{photo.getImage()}">
+ <img src="{imgPath:h}{photo.getImage()}">
+ </td>
+ </tr>
+ {end:}
+ <tr>
+ <td class="labelcell">
+ New Photo
+ </td>
+ <td class="fieldcell">
+ {if:photo}
+ <input
+ id="imageUpload"
+ accept="image/*"
+ type="file"
+ name="image">
+ {else:}
+ <input
+ id="imageUpload"
+ accept="image/*"
+ type="file"
+ name="image"
+ required>
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <input id="photoSave" type="submit" value="Save Photo">
+ {if:photo}
+ <input id="photoCancel" type="submit" value="Cancel" name="Cancel">
+ <input id="photoDelete" type="submit" value="Delete Photo" name="Delete">
+ {end:}
+ </td>
+ </tr>
+ </table>
+ </form>
+</div>
+<script>
+ $(function() {
+ $('INPUT[type="file"]').change(function() {
+ var ext = this.value.match(/\.(.+)$/)[1];
+ switch (ext.toLowerCase()) {
+ case 'jpg':
+ case 'jpeg':
+ case 'png':
+ case 'gif':
+ $('#uploadButton').attr('disabled', false);
+ break;
+ default:
+ alert('This is not an allowed file type.');
+ this.value = '';
+ }
+ });
+ $("#editPhotoForm").submit(function() {
+ var atLeastOneSeleted = false;
+ $("#P2CSelect option:selected").each(function() {
+ atLeastOneSeleted = true;
+ });
+ if (!atLeastOneSeleted) {
+ alert('You must select at least one Category');
+ }
+ return atLeastOneSeleted;
+ });
+ $("select[multiple]").asmSelect({
+ animate: true,
+ sortable: false,
+ highlight: true
+ });
+ if ($("#photoDelete").length) {
+ $("#photoDelete").click(function() {
+ return confirm("This will Delete this photo.\nAre you sure?");
+ });
+ }
+ });
+</script>
--- /dev/null
+<style>
+ form#editUserForm input[type="submit"] {
+ box-shadow: 1px 2px 2px grey;
+ border-radius: 10px;
+ background-color: #D6DFC3;
+ font-size: 16px;
+ font-weight: normal;
+ text-align: center;
+ margin: 0;
+ padding: 1px 5px 1px 5px;
+ width: auto;
+ }
+</style>
+<div>
+ <form
+ id="editUserForm"
+ name="editUserForm"
+ action="{formAction:h}"
+ flexy:ignore="yes"
+ method="post"
+ enctype="multipart/form-data">
+ <input type="hidden" name="userStatus" value="{_REQUEST[userStatus]}">
+ {if:user}
+ <input type="hidden" name="id" value="{user.getId()}">
+ {end:}
+ <table class="webform">
+ <tr>
+ <td class="labelcell">
+ Status
+ </td>
+ <td class="fieldcell">
+
+ {if:user}
+ <label>
+ {if:user.getApproved()}
+ <input type="radio" name="status" value="approved" checked>
+ {else:}
+ <input type="radio" name="status" value="approved">
+ {end:}
+ Approved
+ </label>
+ <label>
+ {if:user.getDenied()}
+ <input type="radio" name="status" value="denied" checked>
+ {else:}
+ <input type="radio" name="status" value="denied">
+ {end:}
+ Denied
+ </label>
+ {else:}
+ <label>
+ <input type="radio" name="status" value="approved">
+ Approved
+ </label>
+ <label>
+ <input type="radio" name="status" value="denied">
+ Denied
+ </label>
+
+ {end:}
+
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ Company Name
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input name="company" value="{user.getCompany()}">
+ {else:}
+ <input name="company">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ Title
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input name="title" value="{user.gettitle()}">
+ {else:}
+ <input name="title">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ Expire Date
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input id="expire" name="expire" value="{user.getExpire()}">
+ {else:}
+ <input id="expire" name="expire">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ Email Address
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input name="email" value="{user.getEmail()}" type="email" required>
+ {else:}
+ <input name="email" type="email" required>
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ Password
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input name="media_pass" value="{user.getMediaPass()}" required>
+ {else:}
+ <input name="media_pass" required>
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ First Name
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input name="fname" value="{user.getFname()}" required>
+ {else:}
+ <input name="fname">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ Last Name
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input name="lname" value="{user.getLname()}" required>
+ {else:}
+ <input name="lname" required>
+ {end:}
+ </td>
+ </tr>
+
+ <tr>
+ <td class="labelcell">
+ Phone
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input name="phone" value="{user.getPhone()}">
+ {else:}
+ <input name="phone">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ Address 1
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input name="address" value="{user.getAddress()}">
+ {else:}
+ <input name="address">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ Address2
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input name="address2" value="{user.getAddress2()}">
+ {else:}
+ <input name="address2">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ City
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input name="city" value="{user.getCity()}">
+ {else:}
+ <input name="city">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ State
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input name="state" value="{user.getState()}">
+ {else:}
+ <input name="state">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td class="labelcell">
+ Zip
+ </td>
+ <td class="fieldcell">
+ {if:user}
+ <input name="zip" value="{user.getZip()}">
+ {else:}
+ <input name="zip">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center">
+ <input type="submit" value="Save">
+ </td>
+ </tr>
+ </table>
+ </form>
+</div>
+<script>
+ $(function(){
+ $('#expire').datepicker();
+ });
+</script>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <title>{title:h}</title>
+ </head>
+ <body>
+ <p>
+ <font size="4" face="arial, sans-serif">
+ <b>{subject:h}</b>
+ </font>
+ </p>
+ <table
+ cellspacing="0"
+ cellpadding="0"
+ bgcolor="#ffffff"
+ border="0"
+ width="400">
+ <tr>
+ <td>
+ {if:approved}
+ <p>Thank you for submitting your request for photos to the Traverse
+ City Convention & Visitors Bureau. Your request has been approved
+ and your login information is below. Please note that your access
+ to this site will be active for 2 weeks, beginning today. Should
+ you require additional time once your access period has expired, we
+ ask that you fill out a new request form.</p>
+ <br>
+ <p>Login: {user.getEmail()}</p>
+ <p>Password: {user.getMediaPass()}</p>
+ <br>
+ <p>Sincerely,</p>
+ <br>
+ <p>The Traverse City Tourism Marketing Team</p>
+ {end:}
+ {if:denied}
+ <p>We're sorry, but your request for media-quality photos did not meet
+ our criteria. However, we encourage you to choose from the wide range
+ of photos available on our general photo library. You do not require
+ a special login to view and download those photos.</p>
+ <br>
+ <p>Thanks for your interest in Traverse City!</p>
+ <p>The Traverse City Tourism Marketing Team</p>
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table
+ cellspacing="0"
+ cellpadding="10"
+ border="0"
+ width="400">
+ <tr>
+ <td bgcolor="#eeeeee">
+ <font size="1" face="arial, sans-serif">
+ To ensure the delivery of these e-mails to your inbox, please
+ add {email_from:h} to your e-mail Address Book or Safe List.
+ </font>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ </table>
+ </body>
+ </html>
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>{AppName}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <link rel="stylesheet" href="main.css">
+ {styles:h}
+ <script>
+ function showMyError(e) {
+ console.log('Error: ' + e.message);
+ console.log('Line: ' + e.lineno);
+ console.log('URL: ' + e.filename);
+ }
+ addEventListener('error', showMyError);
+ </script>
+ {topScripts:h}
+ </head>
+ <body>
+ <header>
+ <hgroup>
+ <h1>{AppName}</h1>
+ </hgroup>
+ <flexy:include src="Admin/nav.html">
+ <flexy:include src="Admin/searchForm.html">
+ </header>
+ {content:h}
+ {bottomScripts:h}
+ </body>
+</html>
--- /dev/null
+<style>
+ .photo-category-list {
+ position: relative;
+ box-shadow: 1px 2px 2px grey;
+ border-radius: 10px;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ display:block;
+ width: 120px;
+ float: left;
+ background: #D6DFC3;
+ margin: 5px;
+ padding: 10px;
+ height: 140px;
+ }
+ .photo-category-list h1 {
+ position: absolute;
+ bottom: 0;
+ left: 5px;
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
+ width: 123px;
+ }
+ .photo-category-list h1 a {
+ color: #006BB4;
+ font-size: 12px;
+ text-decoration: none;
+ padding: 0;
+ margin: 0;
+ overflow: hidden;
+ white-space: nowrap;
+ }
+ .pCount {
+ text-shadow: 1px 1px grey;
+ position: absolute;
+ top: 0;
+ right: -10px;
+ padding: 1px 5px 1px 5px;
+ background-color: #250;
+ border-radius: 30px;
+ -moz-border-radius: 30px;
+ -webkit-border-radius: 30px;
+ box-shadow: 1px 2px 2px grey;
+ display:inline;
+ float: right;
+ color: white;
+ text-size: 18px;
+ font-weight: bold;
+ }
+ .photo-category-list img {
+ box-shadow: 1px 2px 2px grey;
+ border-radius: 10px;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ border: none;
+ }
+</style>
+<section>
+ <form id="sortable" method="get">
+ <input type="hidden" name="ac" value="moveCategories">
+ <div
+ class="photo-category-list"
+ flexy:foreach="categories,category">
+ <input type="hidden" name="catPhotos[]" value="{category.getId()}">
+ {if:category.getFirstPhoto()}
+ <a href="{editUrl:h}{category.getId()}">
+ <img width="120" height="120" src="{imgPath:h}{category.getFirstPhoto():h}">
+ </a>
+ {end:}
+ <div class="pCount">
+ {category.getTotalNumberOfPhotos():h}
+ </div>
+ <header>
+ <hgroup>
+ <h1>
+ <a href="{editUrl:h}{category.getId()}">
+ {category.getCategory()}
+ </a>
+ </h1>
+ </hgroup>
+ </header>
+ </div>
+ </form>
+</section>
+<script>
+ $("#sortable").sortable({
+ update: function() {
+ var inputs = $("#sortable").serialize();
+ $.get('./photos.php', inputs, console.log('positions saved'));
+ }
+ });
+</script>
--- /dev/null
+<style>
+ .category-category-list {
+ background: #EFEFEF;
+ border-radius: 5px;
+ display: block;
+ float: left;
+ height: 148px;
+ margin: 0 20px 20px 0;
+ padding: 10px;
+ position: relative;
+ width: 120px;
+ border: 1px solid #CCC;
+ -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
+ box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
+ }
+ .category-category-list h1 {
+ bottom: 10px;
+ left: 10px;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 123px;
+ }
+ .category-category-list h1 a {
+ color: #006BB4;
+ font-size: 12px;
+ text-decoration: none;
+ padding: 0;
+ margin: 0;
+ overflow: hidden;
+ white-space: nowrap;
+ }
+ .category-category-list img {
+ border: medium none;
+ border-radius: 5px;
+ -webkit-box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.2);
+ box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.2);
+ border: 1px solid #CCC;
+ }
+</style>
+<div id="categoryPhotos">
+ <div
+ class="category-category-list"
+ flexy:foreach="photos,photo">
+ {if:photo.getImage()}
+ <a href="{editUrl:h}&catid={photo.getCatid()}&id={photo.getId()}">
+ <img width="120" height="120" src="{imgPath:h}{photo.getImage():h}">
+ </a>
+ {end:}
+ <header>
+ <hgroup>
+ <h1>
+ <a href="{editUrl:h}&catid={photo.getCatid()}&id={photo.getId()}">
+ {photo.getTitle()}
+ </a>
+ </h1>
+ </hgroup>
+ </header>
+ </div>
+</div>
--- /dev/null
+<flexy:include src="Admin/userNav.html">
+<div>
+ <h2>{statusText}</h2>
+ <table id="admin-list-table">
+ <tr>
+ <th width="15">Function</th>
+ <th>Name</th>
+ <th width="50">Expires</th>
+ <th width="10">Approved</th>
+ </tr>
+ <tr flexy:foreach="users,user">
+ <td nowrap="nowrap" align="left">
+ <a href="{editUrl:h}{user.getId()}&userStatus={_REQUEST[userStatus]}">[Edit]</a>
+ </td>
+ <td align="left">{user.getFname()} {user.getLname()}</td>
+ <td align="right">{user.getExpire()}</td>
+ <td align="right">
+ {if:user.getApproved()}
+ Yes
+ {else:}
+ No
+ {end:}
+ </td>
+ </tr>
+ </table>
+</div>
--- /dev/null
+<ul class="admin_nav">
+ <li flexy:if="addCategoryUrl">
+ <a href="{addCategoryUrl}">Add New Category</a>
+ </li>
+ <li flexy:if="addPhotoUrl">
+ <a href="{addPhotoUrl:h}">Add Photo</a>
+ </li>
+ <li flexy:if="addMultipleUrl" id="multiple-link">
+ <a href="{addMultipleUrl:h}">Add Multiple Photos</a>
+ </li>
+ <li flexy:if="listCategoryUrl">
+ <a href="{listCategoryUrl:h}">List Categories</a>
+ </li>
+ <li flexy:if="listUsersUrl">
+ <a href="{listUsersUrl:h}">List Users</a>
+ </li>
+</ul>
--- /dev/null
+<script>
+ $(function() {
+ $("#photoSearch").autocomplete({
+ source: function(request, response) {
+ $.ajax({
+ url: "photos.php?ac=ajaxPhotoSearch",
+ dataType: "json",
+ data: {
+ photoName: request.term
+ },
+ success: function(data) {
+ response(data);
+ }
+ });
+ },
+ minLength: 2
+ });
+ });
+</script>
+<section id="mediaGallerySearchForm">
+ <div id="categorySearchWrapper">
+ <form
+ method="get"
+ action="{categorySearchUrl:h}"
+ id="categoryAdminSearch"
+ name="photoAdminSearch"
+ flexy:ignore="yes">
+ <input type="hidden" name="ac" value="editCategory">
+ <select id="categorySearch" name="id">
+ <option value="">Search By Category</option>
+ <?php
+ if (!empty($t->categories)) {
+ foreach ($t->categories as $category) {
+ echo '<option value="' . $category->getId() . '"';
+ if ($category->getId() == $t->categoryId) {
+ echo ' selected';
+ }
+ echo '>'.$category->getCategory().'</option>';
+ }
+ }
+ ?>
+ </select>
+ <input
+ type="submit"
+ value="Search">
+ </form>
+ <form
+ method="get"
+ action="{photoSearchUrl:h}"
+ id="photoAdminSearch"
+ name="photoAdminSearch"
+ flexy:ignore="yes">
+ <input
+ type="hidden"
+ name="ac"
+ value="searchPhotos">
+ {if:_REQUEST[photoName]}
+ <input
+ type="search"
+ id="photoSearch"
+ name="photoName"
+ value="{_REQUEST[photoName]}"
+ placeholder="Find Photo By Title">
+ {else:}
+ <input
+ type="search"
+ id="photoSearch"
+ name="photoName"
+ placeholder="Find Photo By Title">
+ {end:}
+ <input
+ type="submit"
+ value="Search">
+ </form>
+ </div><!--/#categorySearchWrapper-->
+</section>
--- /dev/null
+<ul class="admin_nav">
+ <li>
+ <a href="{userAdminUrl:h}?ac=listUsers">Pending</a>
+ </li>
+ <li>
+ <a href="{userAdminUrl:h}?ac=listUsers&userStatus=approved">Approved</a>
+ </li>
+ <li>
+ <a href="{userAdminUrl:h}?ac=listUsers&userStatus=denied">Denied</a>
+ </li>
+ <li>
+ <a href="{userAdminUrl:h}?ac=listUsers&userStatus=expired">Expired</a>
+ </li>
+</ul>
--- /dev/null
+<?php
+if ($t->catPhotos) {
+ foreach ($t->catPhotos as $category) {
+ ?>
+ <li>
+ <a
+ href="<?php echo $t->photoUrl;?><?php echo $category->getId();?>">
+ <img
+ title="<?php echo $category->getCategory()?>"
+ src="<?php echo $t->photoUrlSmall.$category->getFirstPhoto()?>">
+ </a>
+ <span class="photoHead"><?php echo $category->getCategory();?></span>
+ </li>
+ <?php
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<style>
+#media-photo-gallery {
+ font-size:12px;
+}
+#gallery {
+ clear:both;
+}
+.gallery {
+ text-align: center;
+ list-style: none outside none;
+ padding: 10px 0 0 0;
+}
+.gallery:after {
+ clear: both;
+ content: ".";
+ display: block;
+ height: 0;
+ visibility: hidden;
+}
+.gallery li {
+ background: none repeat scroll 0 0 #F5F3E5;
+ float: left;
+ margin: 0 2% 26px 0;
+ overflow: hidden;
+ position: relative;
+ width: 23%
+}
+/*.gallery li:nth-child(4n+1) {
+ clear: both;
+ margin: 0 16px 26px 0;
+}
+.gallery li:nth-child(4n+2) {
+ margin: 0 16px 26px 0;
+}
+.gallery li:nth-child(4n+3) {
+ margin: 0 16px 26px 0;
+}
+.gallery li:nth-child(4n+4) {
+ margin: 0 0 26px 0;
+}*/
+.gallery li img {
+ width: 100%;
+ border: 1px solid #2797AB;
+ display: block;
+ height: auto;/*width: 143px;*/
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.gallery li:hover img {
+ border: 1px solid #B8C728;
+}
+.gallery .ui-content {
+ overflow: hidden;
+}
+/*#inside #main {
+ width: 720px;
+}*/
+#staticBanners {
+ /*display:none;*/
+}
+.media-gallery-download {
+ font-size: 10px;
+ min-height: 22px;
+}
+#media-photo-gallery div {
+ clear:none;
+ font-size: 1em;
+ height: auto;
+ margin: 0;
+ padding: 0;
+}
+#media-photo-gallery div p {
+ display: block;
+ color: black;
+ padding: 5px;
+ text-shadow: none;
+ font-weight: normal;
+}
+#media-photo-gallery div a {
+}
+#filter_wrapper {
+ overflow: hidden;
+}
+#cat_filter_wrapper {
+ float: left;
+ height: 56px;
+}
+#photoCategoryLabel {
+ float: left;
+}
+#photoCategoryId {
+ float: left;
+ clear: left;
+ width: 180px;
+ height: 24px;
+ border: 1px solid #ABADB3;
+ box-sizing: border-box;
+ padding:.2em;/.3em;
+}
+#photoCategoryId option {
+ padding: 3px;
+}
+#media-login #username {
+ float: left;
+ width: 100px;
+ height: 10px;
+ padding: 5px;
+ margin: 0 5px 0 0;
+ border: 1px solid #ABADB3;
+}
+#media-login #password {
+ float: left;
+ width: 100px;
+ height: 10px;
+ padding: 5px;
+ margin: 0 5px 0 0;
+ border: 1px solid #ABADB3;
+}
+#media-login #submit {
+ display: block;
+ float: left;
+ width: 24px;
+ height: 22px;
+ cursor: pointer;
+ background: url(<?php echo $t->base_url;?>assets/play.gif) 50% 50% no-repeat;
+ border: 1px solid #ABADB3;
+ -bracket-:hack(;
+ height: 22px;
+ );
+}
+.photoHead {
+ display: block;
+ text-align: center;
+ min-height: 38px;
+ margin: 0 !important;
+ padding: 5px;
+ background: none;
+}
+.captionWrapper {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+}
+.captionTitleWrapper {
+ display: block;
+ width: 50%;
+ float: left;
+ font-size: 18px;
+ font-size: 1.8rem;
+ font-weight: bold;
+ color: #FFF;
+ text-align: left;
+ padding: 10px 20px;
+ margin: 0;
+}
+.captionDescWrapper {
+ display: block;
+ width: 50%;
+ float: left;
+ clear: left;
+ font-size: 14px;
+ font-size: 1.4rem;
+ color: #FFF;
+ text-align: left;
+ padding: 0 20px 10px 20px;
+ margin: 0;
+}
+.download_wrapper {
+ display: block;
+ position: absolute;
+ z-index: 99;
+ top: 10px;
+ right: 20px;
+ width: 30%;
+ font-size: 14px;
+ font-size: 1.4rem;
+ color: #FFF;
+ text-align: left;
+ padding: 6px 0 10px 20px;
+ margin: 0;
+ text-align: right;
+}
+.download_wrapper a {
+ color: #CCC;
+}
+.download_wrapper a:hover {
+ color: #FFF;
+}
+.ps-caption-content {
+ width: 100%;
+ overflow: hidden;
+ position: relative;
+}
+</style>
+<flexy:toJavascript flexy:prefix="" base_url="base_url" ></flexy:toJavascript>
+<flexy:toJavascript flexy:prefix="" pageId="pageId" ></flexy:toJavascript>
+<div id="media-photo-gallery">
+ <div id="filter_wrapper">
+ <div id="cat_filter_wrapper">
+ <div class="name_wrapper" flexy:if="photoNameSearch">
+ <h2>Filter By Name</h2>
+ <form
+ method="get"
+ id="photoGallery"
+ action="{photoSearchFormUrl:h}"
+ flexy:ignore="yes">
+ <input type="hidden" name="catid" value="{_REQUEST[catid]}">
+ <label id="photoNameLabel"></label>
+ <input
+ type="search"
+ name="photo_name"
+ id="photoSearch"
+ value="{_REQUEST[photo_name]}"
+ placeholder="Name">
+ <input type="submit" value="Search">
+ </form>
+ </div>
+ <?php if (count($t->categories) > 1) {?>
+ <div class="cat_wrapper">
+ <h2>Filter By Category</h2>
+ <form
+ method="get"
+ id="photoGallery"
+ action="{photoSearchFormUrl:h}"
+ flexy:ignore="yes">
+ <input type="hidden" name="catid" value="{_REQUEST[catid]}">
+ <label id="photoCategoryLabel"></label><!--/Filter By Category-->
+ <select id="photoCategoryId" name="photoCategoryId">
+ <option value="">Show Categories</option>
+ <?php foreach ($t->categories as $category) {
+ echo '<option value="'.$category['id'].'"';
+ if ($_REQUEST['photoCategoryId'] == $category['id']) {
+ echo ' selected';
+ }
+ echo '>'.$category['category'].'</option>';
+ }?>
+ </select>
+ </form>
+ </div>
+ <?php }?>
+
+ </div><!--/#cat_filter_wrapper-->
+ <div style="float:right;" flexy:if="mediaExclusive">
+ {if:isLoggedIn}
+ You're logged in! <a href="{logoutUrl:h}">Logout</a>
+ {else:}
+ <label>Media Login</label>
+ <form
+ id="media-login"
+ method="post"
+ action="{loginUrl:h}"
+ flexy:ignore="yes">
+ <input
+ type="hidden"
+ name="catid"
+ value="{_REQUEST[catid]}">
+ <input
+ id="username"
+ name="username"
+ placeholder="Username"
+ size="10"
+ required>
+ <input
+ id="password"
+ type="password"
+ name="password"
+ placeholder="Password"
+ size="10"
+ required>
+ <input
+ id="submit"
+ type="submit"
+ value="">
+ </form>
+ {if:failedStatus}
+ <div style="clear:both;width:250px;color:red;text-wrap: normal;">
+ {failedStatus:h}
+ </div>
+ {end:}
+ {end:}
+ </div>
+ </div>
+ <div class="gallery_wrapper">
+ <div flexy:if="expired">
+ <p>We’re sorry, but your access to this page has expired. If you
+ require additional time to select photos, please fill out and
+ submit a new
+ <a href="{mediaGalleryRequestFormUrl:h}">photo request form</a>.
+ If approved, you will receive your new login information by email
+ within 1 to 2 days.</p>
+
+ <p>Sincerely,</p>
+
+ <p>The Traverse City Tourism Marketing Team</p>
+ </div>
+ <h2 flexy:if="photoCategoryName">{photoCategoryName}</h2>
+ <ul id="Gallery" class="gallery">
+ {if:photos}
+ <flexy:include src="photos.html">
+ {end:}
+ {if:catPhotos}
+ <flexy:include src="photoCats.html">
+ {end:}
+ </ul>
+ {if:mediaExclusive}
+ <div flexy:if="!isLoggedIn">
+ <p>Are you a member of the media and looking for additional or
+ specific photos?
+ <a href="{mediaGalleryRequestFormUrl:h}">Click Here</a>.</p>
+ </div>
+ {end:}
+ </div>
+</div>
+{if:photoNameSearch}
+<script>
+ $(function() {
+ $("#photoSearch").autocomplete({
+ source: function(request, response) {
+ $.ajax({
+ url: "photoSearch",
+ dataType: "json",
+ data: {
+ photoName: request.term,
+ pageId: pageId
+ },
+ success: function(data) {
+ response(data);
+ }
+ });
+ },
+ minLength: 2
+ });
+ });
+</script>
+{end:}
\ No newline at end of file
--- /dev/null
+<?php
+if ($t->photos) {
+ foreach ($t->photos as $photo) {
+ ?>
+ <li>
+ <a data-download="<?php if($photo->getDownload()){echo '1';}else{echo '0';}?>" data-photoid="<?php echo $photo->getId()?>" data-download="<?php echo $photo->getDownload()?>" rel="<?php echo htmlspecialchars($photo->getDescription())?>" title="<?php echo htmlspecialchars($photo->getTitle())?>" class="photoimg" href="<?php echo $t->photoUrlLarge.$photo->getImage()?>">
+ <img title="<?php echo htmlspecialchars($photo->getTitle())?>" alt="<?php echo htmlspecialchars($photo->getDescription())?>" src="<?php echo $t->photoUrlSmall.$photo->getImage()?>">
+ <?php if ($photo->getTitle()) {?>
+ <span class="photoHead">
+ <?php
+ $tempTitle = $photo->getTitle();
+ if(strlen($tempTitle) > 50) {
+ $tempTitle = substr($tempTitle, 0, 47);
+ $tempTitle .= "...";
+ }
+ echo $tempTitle;
+ //echo $photo->getTitle();
+ ?>
+ </span>
+ <?php } ?>
+ </a>
+ <?php if ($photo->getDownload()) {?>
+ <span class="media-gallery-download">
+ Download for
+ <a href="<?php echo $t->photoDownWeb.$photo->getId()?>/">Web</a> - <a href="<?php echo $t->photoDownPrint.$photo->getId()?>/">Print</a>
+ </span>
+ <?php } ?>
+ </li>
+ <?php }
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * Variable Registry
+ *
+ * PHP version 5
+ *
+ * The license text...
+ *
+ * @category Toolkit
+ * @package Registry
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: Registry.php,v 1.2 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Variable Registry
+ *
+ * The registry is an object where site wide variables can be stored
+ * without the use of globals. By passing the registry object to
+ * the controllers that need them, we avoid pollution of the global
+ * namespace and render our variables safe.
+ *
+ * @category Toolkit
+ * @package Registry
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_Registry
+{
+ // {{{ properties
+
+ /**
+ * variables
+ * @access private
+ */
+ private $_vars = array();
+
+ // }}}
+
+ // {{{ __set()
+
+ /**
+ * Sets undefined variables
+ *
+ * @param string $index key index in variables array
+ * @param mixed $value variable value
+ *
+ * @return void
+ * @access public
+ */
+ public function __set($index, $value)
+ {
+ $this->_vars[$index] = $value;
+ }
+
+ // }}}
+ // {{{ __get()
+
+ /**
+ * Gets defined variables
+ *
+ * @param mixed $index variable to retrieve
+ *
+ * @return mixed
+ */
+ public function __get($index)
+ {
+ return $this->_vars[$index];
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * ActiveImagesDataGrid.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_RotatingImages_ActiveImagesDataGrid
+ *
+ * Description of newPHPClass
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_RotatingImages_ActiveImagesDataGrid
+ extends Toolkit_RotatingImages_ImagesDataGridAbstract
+ implements Toolkit_RotatingImages_IImagesDataGrid
+{
+ // {{{ setControlObject()
+
+ /**
+ * Description of setControlObject
+ *
+ * @return void
+ */
+ protected function setControlObject()
+ {
+ $this->ctrlObj['tableId'] = 'active';
+ $this->ctrlObj['gridName'] = 'Active Images';
+ }
+
+ // }}}
+ // {{{ setQuery()
+
+ /**
+ * Sets query to all active rotating images
+ *
+ * @return void
+ */
+ public function setQuery()
+ {
+ $sql = "
+ SELECT *
+ FROM rotating_images
+ WHERE active = true";
+
+ parent::setQuery($sql);
+ }
+
+ // }}}
+}
--- /dev/null
+CREATE SCHEMA rotatingImages;
+GRANT ALL ON SCHEMA rotatingImages TO nobody;
+--
+-- Tables
+--
+\i ./tables/rotating_images.sql
+\i ./tables/rotating_images_transitions.sql
+
+--
+-- Procedures
+--
+
+--
+-- Modules
+--
--- /dev/null
+--
+-- This will drop everything in the rotatingImages schema.
+-- Nothing better be in here except rotatingImages related objects
+-- or it will be dropped
+--
+-- the forece is strong w/ this one, use it wisely.
+--
+DROP SCHEMA IF EXISTS rotatingImages CASCADE;
--- /dev/null
+DROP TABLE IF EXISTS rotatingImages.rotating_images CASCADE;
+
+CREATE TABLE rotatingImages.rotating_images
+(id SERIAL,
+ image TEXT NOT NULL UNIQUE,
+ title TEXT,
+ descr TEXT,
+ url TEXT,
+ external BOOLEAN NOT NULL DEFAULT FALSE,
+ active BOOLEAN NOT NULL DEFAULT FALSE,
+ pos INTEGER,
+ thumb_width INTEGER NOT NULL,
+ thumb_height INTEGER NOT NULL,
+ width INTEGER NOT NULL,
+ height INTEGER NOT NULL,
+ UNIQUE (active, pos),
+ PRIMARY KEY (id));
+
+GRANT ALL ON rotatingImages.rotating_images_id_seq TO nobody;
+GRANT ALL ON rotatingImages.rotating_images TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS rotatingImages.rotating_images_transitions CASCADE;
+
+CREATE TABLE rotatingImages.rotating_images_transitions
+(timeout INTEGER NOT NULL DEFAULT 10,
+ transition TEXT NOT NULL DEFAULT 'fade');
+
+INSERT INTO rotatingImages.rotating_images_transitions VALUES (10, 'fade');
+
+GRANT ALL ON rotatingImages.rotating_images_transitions TO nobody;
--- /dev/null
+<?php
+
+/**
+ * Collection of banner decorators to rotate
+ *
+ * PHP version 5
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: Admin.php,v 1.1 2010/07/25 17:05:58 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Collection of banner decorators to rotate
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @link <>
+ */
+class Toolkit_RotatingImages_Decorator_Admin
+ implements IteratorAggregate,
+ Toolkit_RotatingImages_Decorator_IDecoratorsIterator
+{
+ // {{{ properties
+
+ /**
+ * Banner decorators
+ * @var array
+ * @access private
+ */
+ private $_decorators;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * constructor
+ *
+ * @return void
+ * @access protected
+ */
+ public function __construct()
+ {
+ $this->_decorators = array();
+ }
+
+ // }}}
+ // {{{ getIterator()
+
+ /**
+ * Set the external iterator
+ *
+ * @return object An instance of an object implementing Iterator or Traversable
+ * @access public
+ */
+ public function getIterator()
+ {
+ return new ArrayIterator($this->_decorators);
+ }
+
+ // }}}
+ // {{{ getTotal()
+
+ /**
+ * Gets the total number of decorators we have added
+ *
+ * @return array number of decorators in collection
+ * @access public
+ */
+ public function getTotal()
+ {
+ return count($this->_decorators);
+ }
+
+ // }}}
+ // {{{ add()
+
+ /**
+ * Adds a decorator to the collection
+ *
+ * @param Toolkit_RotatingImages_Decorator_DecoratorAbstract $d Decorator object
+ *
+ * @return void
+ * @access public
+ */
+ public function add(Toolkit_RotatingImages_Decorator_DecoratorAbstract $d)
+ {
+ $this->_decorators[] = $d;
+ }
+
+ // }}}
+ // {{{ toHtml()
+
+ /**
+ * Converts all decorator objects collection into an HTML string
+ *
+ * Adds the appropriate scripts to the page so we can use JS to
+ * rotate through the banners
+ *
+ * @return string HTML version of the static banners available
+ * @access public
+ */
+ public function toHtml()
+ {
+ $GLOBALS['bottomScripts'][] = MEDIA_APP_BASE_URL . 'libjs/plugins/nivoslider/2.0/' . LIBJS_ENV . '/jquery.nivo.slider.js';
+ $GLOBALS['styleSheets'][] = MEDIA_APP_BASE_URL . 'libjs/plugins/nivoslider/2.0/' . LIBJS_ENV . '/nivo-slider.css';
+ $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'Toolkit/RotatingImages/styles.css';
+
+ foreach ($this->_decorators as $i) {
+ switch (get_class($i)) {
+ case 'Toolkit_RotatingImages_Decorator_Thumbnail' :
+ case 'Toolkit_RotatingImages_Decorator_Image' :
+ $images .= $i->toHtml();
+ break;
+
+ case 'Toolkit_RotatingImages_Decorator_Anchor' :
+ $images .= $i->toHtml();
+ break;
+
+ default :
+ break;
+ }
+ }
+
+ return "<div id=\"rotatingImagesPreview\">$images</div>";
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * Decorator for links
+ *
+ * PHP version 5
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages_
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: Anchor.php,v 1.3 2010/08/15 16:02:21 jamie Exp $
+ * @link <>
+ */
+
+
+/**
+ * Decorator for links
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @link <>
+ */
+class Toolkit_RotatingImages_Decorator_Anchor
+ extends Toolkit_RotatingImages_Decorator_DecoratorAbstract
+{
+ // {{{ properties
+
+ /**
+ * The image decorator object
+ * @var Toolkit_RotatingImages_Decorator_Image
+ * @access private
+ */
+ private $_imageDecorator;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * constructor
+ *
+ * create a shallow copy of the image passed in so we can manipulate
+ * it all we want and not worry about affecting the original object
+ *
+ * @param Toolkit_RotatingImages_Decorator_Image $imageDecorator Object to decorate image markup
+ * @param Toolkit_RotatingImages_Image $image Node to be decorated
+ *
+ * @return void
+ * @access protected
+ */
+ public function __construct(
+ Toolkit_RotatingImages_Decorator_Image $imageDecorator,
+ Toolkit_RotatingImages_Image $image
+ ) {
+ $this->_imageDecorator = $imageDecorator;
+ // Clone the node object so we keep original properties the same
+ $this->image = clone $image;
+ }
+
+ // }}}
+ // {{{ toHtml()
+
+ /**
+ * Convert the anchor to a HTML string
+ *
+ * @return string HTML output of the anchor
+ * @access public
+ */
+ public function toHtml()
+ {
+ $anchorFormat = '<a href="%s" %s>%s</a>';
+ return sprintf(
+ $anchorFormat,
+ $this->image->getUrl(),
+ $this->image->getExternal() ? 'class="external"' : '',
+ $this->_imageDecorator->toHtml()
+ );
+ }
+
+ // }}}
+ public function getTitle()
+ {
+ return $this->image->getTitle();
+ }
+
+ public function getDescr()
+ {
+ return $this->image->getDescr();
+ }
+
+ public function getId()
+ {
+ return $this->image->getId();
+ }
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * Base class for decorators
+ *
+ * PHP version 5
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: DecoratorAbstract.php,v 1.1 2010/07/25 17:05:58 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Base class for decorators
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @link <>
+ */
+abstract class Toolkit_RotatingImages_Decorator_DecoratorAbstract
+{
+ // {{{ properties
+
+ /**
+ * Image object that will be decorated
+ * @var Toolkit_RotatingImages_Image
+ * @access protected
+ */
+ protected $image;
+
+ // }}}
+ // {{{ getImage()
+
+ /**
+ * Get the image we are decorating
+ *
+ * @return Toolkit_RotatingImages_Image object
+ * @access public
+ */
+ public function getImage()
+ {
+ return $this->image;
+ }
+
+ // }}}
+}
+
+?>
--- /dev/null
+<?php
+
+/**
+ * Decorators collection
+ *
+ * PHP version 5
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: IDecoratorsIterator.php,v 1.1 2010/07/25 17:05:58 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Decorators collection
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @link <>
+ */
+interface Toolkit_RotatingImages_Decorator_IDecoratorsIterator
+{
+
+ /**
+ * Add a new decorator to the collection
+ *
+ * @param Toolkit_RotatingImages_Decorator_DecoratorAbstract $d decorator
+ *
+ * @return void
+ * @access public
+ */
+ public function add(Toolkit_RotatingImages_Decorator_DecoratorAbstract $d);
+
+ /**
+ * Return an HTML version of the decorator
+ *
+ * @return html version of banners
+ * @access public
+ */
+ public function toHtml();
+}
+
+?>
--- /dev/null
+<?php
+
+/**
+ * Decorator for images
+ *
+ * PHP version 5
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages_
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: Image.php,v 1.2 2010/08/15 15:57:30 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Decorator for images
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @link <>
+ */
+class Toolkit_RotatingImages_Decorator_Image
+ extends Toolkit_RotatingImages_Decorator_DecoratorAbstract
+{
+ // {{{ __construct()
+
+ /**
+ * constructor
+ *
+ * create a shallow copy of the node passed in so we can manipulate
+ * it all we want and not worry about affecting the original object
+ *
+ * @param Toolkit_RotatingImages_Image $image node to be decorated
+ *
+ * @return void
+ * @access protected
+ */
+ public function __construct(Toolkit_RotatingImages_Image $image)
+ {
+ // Clone the node object so we keep original properties the same
+ $this->image = clone $image;
+ }
+
+ // }}}
+ // {{{ toHtml()
+
+ /**
+ * Convert the image to a HTML string
+ *
+ * @return string HTML output of the image
+ * @access public
+ */
+ public function toHtml()
+ {
+ $format = '<img '
+ . 'width="%s" '
+ . 'height="%s" '
+ . 'src="%s" '
+ . 'alt="" '
+ . 'title="#event-%d">';
+ return sprintf(
+ $format,
+ $this->image->getWidth(),
+ $this->image->getHeight(),
+ ROTATING_IMAGE_RESIZED . $this->image->getImage(),
+ $this->image->getId()
+ );
+ }
+
+ // }}}
+
+ public function getTitle()
+ {
+ return $this->image->getTitle();
+ }
+
+ public function getDescr()
+ {
+ return $this->image->getDescr();
+ }
+
+ public function getId()
+ {
+ return $this->image->getId();
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * Decorator for thumbnail images
+ *
+ * PHP version 5
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages_
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: Thumbnail.php,v 1.1 2010/07/25 17:05:58 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Decorator for thumbnail images
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @link <>
+ */
+class Toolkit_RotatingImages_Decorator_Thumbnail
+ extends Toolkit_RotatingImages_Decorator_DecoratorAbstract
+{
+ // {{{ __construct()
+
+ /**
+ * constructor
+ *
+ * create a shallow copy of the node passed in so we can manipulate
+ * it all we want and not worry about affecting the original object
+ *
+ * @param Toolkit_RotatingImages_Image $image image to be decorated
+ *
+ * @return void
+ * @access protected
+ */
+ public function __construct(Toolkit_RotatingImages_Image $image)
+ {
+ // Clone the image object so we keep original properties the same
+ $this->image = clone $image;
+ }
+
+ // }}}
+ // {{{ toHtml()
+
+ /**
+ * Convert the image to a HTML string
+ *
+ * @return string HTML output of the image
+ * @access public
+ */
+ public function toHtml()
+ {
+ $format = '<img width="%s" height="%s" src="%s">';
+ return sprintf(
+ $format, $this->image->getThumbWidth(),
+ $this->image->getThumbHeight(),
+ ROTATING_IMAGE_THUMB . $this->image->getImage()
+ );
+ }
+
+ // }}}
+}
+
+?>
--- /dev/null
+<?php
+
+/**
+ * Collection of banner decorators to rotate
+ *
+ * PHP version 5
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: User.php,v 1.2 2010/08/15 15:59:26 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Collection of banner decorators to rotate
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @link <>
+ */
+class Toolkit_RotatingImages_Decorator_User
+ implements IteratorAggregate,
+ Toolkit_RotatingImages_Decorator_IDecoratorsIterator
+{
+ /**
+ * Banner decorators
+ * @var array
+ * @access private
+ */
+ private $_decorators;
+
+ /**
+ * constructor
+ *
+ * @return void
+ * @access protected
+ */
+ public function __construct()
+ {
+ $this->_decorators = array();
+ }
+
+ /**
+ * Set the external iterator
+ *
+ * @return object An instance of an object implementing Iterator or Traversable
+ * @access public
+ */
+ public function getIterator()
+ {
+ return new ArrayIterator($this->_decorators);
+ }
+
+ /**
+ * Gets the total number of decorators we have added
+ *
+ * @return array number of decorators in collection
+ * @access public
+ */
+ public function getTotal()
+ {
+ return count($this->_decorators);
+ }
+
+ /**
+ * Adds a decorator to the collection
+ *
+ * @param Toolkit_RotatingImages_Decorator_DecoratorAbstract $d Decorator object
+ *
+ * @return void
+ * @access public
+ */
+ public function add(Toolkit_RotatingImages_Decorator_DecoratorAbstract $d)
+ {
+ $this->_decorators[] = $d;
+ }
+
+ /**
+ * Converts all decorator objects collection into an HTML string
+ *
+ * Adds the appropriate scripts to the page so we can use JS to
+ * rotate through the banners
+ *
+ * @return string HTML version of the static banners available
+ * @access public
+ */
+ public function toHtml()
+ {
+ $glmAppBaseUrl = MEDIA_APP_BASE_URL;
+ $baseUrl = MEDIA_BASE_URL;
+
+ $GLOBALS['styleSheets'][]
+ = $glmAppBaseUrl . 'libjs/plugins/nivoslider/3.2/prod/nivo-slider.css';
+ $GLOBALS['styleSheets'][]
+ = $glmAppBaseUrl . 'libjs/plugins/nivoslider/themes/default/default.css';
+ $GLOBALS['bottomScripts'][]
+ = $glmAppBaseUrl . 'libjs/plugins/nivoslider/3.2/prod/jquery.nivo.slider.js';
+ $GLOBALS['bottomScripts'][]
+ = $baseUrl . 'Toolkit/RotatingImages/libjs/user.php';
+
+ $options = $GLOBALS['flexyOptions'];
+ $options['templateDir'] = BASE . 'Toolkit/RotatingImages/templates';
+ $options['compileDir'] = BASE . 'Toolkit/RotatingImages/templates/compiled';
+ $tpl = new HTML_Template_Flexy($options);
+ $tpl->compile('rotatingImages.html');
+ $page = new stdClass();
+ $page->images = array();
+ $images = '';
+ foreach ($this->_decorators as $i) {
+ $images .= $i->toHtml();
+ $page->images[] = $i;
+ }
+
+ return !empty($images)
+ ? $tpl->bufferedOutputObject($page)
+ : '';
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * EditImageController.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_RotatingImages_EditImageController
+ *
+ * Description of Toolkit_RotatingImages_EditImageController
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_RotatingImages_EditImageController
+ extends Toolkit_BaseControllerAbstract
+ implements Toolkit_IController
+{
+ // {{{ indexAction()
+
+ /**
+ * indexAction
+ *
+ * @return string
+ */
+ public function indexAction()
+ {
+ $imageAdapter = new Toolkit_FileServer_ImageAdapter();
+ $form = new Toolkit_RotatingImages_Forms_EditImage(
+ 'GLM_RotatingImages'
+ );
+ $form->setConfig($this->registry->config);
+ $form->configureForm($this->registry->dbh, $imageAdapter);
+ $html = $form->toHtml($this->registry->dbh);
+
+ if ($form->isSubmitted() && $form->validate()) {
+ if ($form->getSubmitValue('delete')) {
+ $this->deleteAction();
+ }
+ $ia = new Toolkit_FileServer_ImageAdapter();
+ $values = $form->getSubmitValues();
+ list($values['thumb_width'], $values['thumb_height'], )
+ = $ia->getImageSize(ROTATING_IMAGE_THUMB . $values['image']);
+ list($values['width'], $values['height'], )
+ = $ia->getImageSize(ROTATING_IMAGE_RESIZED . $values['image']);
+ $gateway = new Toolkit_RotatingImages_Gateway($this->registry->dbh);
+ if ($imageId = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT)) {
+ $image = new Toolkit_RotatingImages_Image($values, $imageId);
+ $gateway->update($image);
+ } else {
+ $image = new Toolkit_RotatingImages_Image($values);
+ $gateway->insert($image);
+ }
+ header('Location: ' . MEDIA_BASE_URL . 'admin/rotatingImages.php');
+ exit();
+ }
+
+ return $html;
+ }
+
+ // }}}
+ // {{{ deleteAction()
+
+ /**
+ * deleteAction
+ *
+ * @return void
+ */
+ public function deleteAction()
+ {
+ if ($imageId = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT)) {
+ $gateway = new Toolkit_RotatingImages_Gateway($this->registry->dbh);
+ $image = $gateway->find($imageId);
+ $gateway->delete($image, new Toolkit_FileServer_ImageAdapter());
+ }
+ header('Location: ' . MEDIA_BASE_URL . 'admin/rotatingImages.php');
+ exit();
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * File Doc Comment
+ *
+ * PHP version 5
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: EditImage.php,v 1.2 2010/08/15 18:40:57 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+require_once BASE . 'Toolkit/Forms/Rules/Image.php';
+require_once BASE . 'Toolkit/Forms/Rules/Url.php';
+
+/**
+ * Rotating Images Application
+ *
+ * Manages the creation and editing form for manipulating images in the db.
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2008 Gaslight Media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_RotatingImages_Forms_EditImage
+ extends Toolkit_FormBuilder
+{
+ // {{{ properties
+
+ private $_config;
+
+ /**
+ * What do you want the success msg to be if the form validates successfully
+ *
+ * @var string
+ * @access protected
+ */
+ protected $successMsg = '<div id="form-success-top">Image successfully updated.</div>';
+
+ /**
+ * The default rules to register for validating
+ *
+ * We have to register these rules, or any others we want, before
+ * we are able to use them in our forms.
+ *
+ * @var string
+ * @access protected
+ */
+ protected $registeredRules = array(
+ array(
+ 'checkURI',
+ 'callback',
+ 'uri',
+ 'Validate'
+ )
+ );
+
+ // }}}
+ public function setConfig(Config_Container $config)
+ {
+ $this->_config = $config;
+ }
+ // {{{ configureConstants()
+
+ /**
+ * Configure form constants
+ *
+ * @return void
+ * @access public
+ */
+ public function configureConstants()
+ {
+ $c = array();
+
+ // If we are adding a new banner
+ if (!filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT)) {
+ $c['current_image_thumb'] = 'Image not yet uploaded';
+ }
+
+ // If the form has been submitted and a new image was uploaded
+ $currImg = $this->getSubmitValue('image');
+ if ($this->isSubmitted() && !empty($currImg)) {
+ $img = '<img src="%s%s">';
+ $c['current_image_thumb'] = sprintf(
+ $img, ROTATING_IMAGE_THUMB, $currImg
+ );
+ }
+
+ $this->setupConstants($c);
+ }
+
+ // }}}
+ // {{{ configureDefaults()
+
+ /**
+ * Configure the initial default values for the form
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return void
+ * @access public
+ */
+ public function configureDefaults(PDO $dbh)
+ {
+ if ($imageId = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT)) {
+ $gateway = new Toolkit_RotatingImages_Gateway($dbh);
+ if ($node = $gateway->find($imageId)) {
+ $img = '<img src="%s%s" alt="Rotating Image" width="%s" height="%s">';
+ $d = array(
+ 'active' => (int) $node->getActive(),
+ 'image' => $node->getImage(),
+ 'current_image_thumb' => sprintf(
+ $img, ROTATING_IMAGE_THUMB, $node->getImage(),
+ $node->getThumbWidth(), $node->getThumbHeight()
+ ),
+ 'external' => (int) $node->getExternal(),
+ 'url' => $node->getUrl(),
+ 'title' => $node->getTitle(),
+ 'descr' => $node->getDescr()
+ );
+ }
+ } else {
+ $d = array(
+ 'external' => false,
+ );
+ }
+
+ $this->setupDefaults($d);
+ }
+
+ // }}}
+ // {{{ configureElements()
+
+ /**
+ * Configure how the form elements should look
+ *
+ * @return void
+ * @access public
+ */
+ public function configureElements()
+ {
+ $e = array();
+
+ $useTitles = $this->_config
+ ->getItem('section','conf')
+ ->getItem('directive', 'useTitles')
+ ->getContent();
+
+ // All Grouped Elements are created here.
+ // All Elements are created here. This includes group element definitions.
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'active',
+ 'display' => 'Active',
+ 'val' => array(0, 1)
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'image'
+ );
+ if ($useTitles) {
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'title',
+ 'display' => 'Title',
+ 'opts' => array('class' => 'text')
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'descr',
+ 'display' => 'Description',
+ 'opts' => array('class' => 'text')
+ );
+ }
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'url',
+ 'display' => 'URL',
+ 'opts' => array('class' => 'text')
+ );
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'external',
+ 'display' => 'External Link',
+ 'val' => array(0, 1)
+ );
+ $e[] = array(
+ 'type' => 'file',
+ 'req' => false,
+ 'name' => 'file',
+ 'display' => 'Image'
+ );
+ $e[] = array(
+ 'type' => 'static',
+ 'req' => false,
+ 'name' => 'current_image_thumb',
+ 'display' => 'Current Image'
+ );
+ $e[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'submit',
+ 'display' => 'Submit Image',
+ );
+ if (filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT)) {
+ $e[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'delete',
+ 'display' => 'Delete Image',
+ );
+ }
+
+ $this->setupElements($e);
+ }
+
+ // }}}
+ // {{{ configureFilters()
+
+ /**
+ * Configure how the form elements should act when being submitted
+ *
+ * @return void
+ * @access protected
+ */
+ public function configureFilters()
+ {
+ $f = array();
+ $f[] = array(
+ 'element' => '__ALL__',
+ 'filter' => 'trim'
+ );
+ $f[] = array(
+ 'element' => 'url',
+ 'filter' => array('Toolkit_Common', 'filterURI')
+ );
+
+ $this->setupFilters($f);
+ }
+
+ // }}}
+ // {{{ configureForm()
+
+ /**
+ * Configure a form so we can use it
+ *
+ * @param PDO $dbh PDO
+ * @param Toolkit_FileServer_ImageAdapter $ia File server image adapter
+ *
+ * @return void
+ * @access public
+ */
+ public function configureForm(PDO $dbh, Toolkit_FileServer_ImageAdapter $ia)
+ {
+ $this->configureElements();
+ $this->configureFilters();
+ $this->configureRules($ia);
+ $this->configureDefaults($dbh);
+ $this->configureConstants();
+ }
+
+ // }}}
+ // {{{ configureRules()
+
+ /**
+ * Configure how the form elements should act
+ *
+ * @param Toolkit_FileServer_ImageAdapter $ia File server image adapter
+ *
+ * @return void
+ * @access public
+ */
+ public function configureRules(Toolkit_FileServer_ImageAdapter $ia)
+ {
+ $r = array();
+
+ $r[] = array(
+ 'element' => 'url',
+ 'message' => 'ERROR: Invalid URL',
+ 'type' => 'Url',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => false,
+ 'force' => false
+ );
+ $uploadedImage = $this->getSubmitValue('image');
+ if (empty($uploadedImage)) {
+ $r[] = array(
+ 'element' => 'file',
+ 'message' => 'ERROR: Must upload an image!',
+ 'type' => 'uploadedfile',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => false,
+ 'force' => false
+ );
+ }
+ if (is_uploaded_file($_FILES['file']['tmp_name'])) {
+ $r[] = array(
+ 'element' => 'file',
+ 'message' => 'ERROR: Incorrect File Type (.gif, .png, .jpg) only!',
+ 'type' => 'mimetype',
+ 'format' => $ia->getAllowedMimeTypes(),
+ 'validation' => $this->validationType,
+ 'reset' => false,
+ 'force' => false
+ );
+ }
+ $r[] = array(
+ 'element' => 'file',
+ 'message' => 'ERROR: Error uploading image!',
+ 'type' => 'Image',
+ 'format' => array(
+ 'form' => $this,
+ 'fieldName' => 'file',
+ 'imageField' => 'image',
+ 'is' => $ia,
+ 'deleteExistingImage' => true,
+ 'injectImage' => array('tgtElement' => 'current_image_thumb'),
+ ),
+ 'validation' => 'server',
+ 'reset' => false,
+ 'force' => false
+ );
+
+ $this->setupRules($r);
+ }
+
+ // }}}
+ // {{{ setupRenderers()
+
+ /**
+ * Custom rendering templates for special fields on the form
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupRenderers()
+ {
+ parent::setupRenderers();
+ $renderer = & $this->defaultRenderer();
+ $required = '<!-- BEGIN required --><span class="req"> * </span><!-- END required -->';
+ $error = '<!-- BEGIN error --><div class="req"> {error} </div><!-- END error -->';
+ $renderer->setElementTemplate(
+ '<tr align="center">
+ <td colspan="2">' . $required . '{label}' . $error . '{element}</td>
+ </tr>', 'submit'
+ );
+ $renderer->setElementTemplate(
+ '<tr align="center">
+ <td colspan="2">' . $required . '{label}' . $error . '{element}</td>
+ </tr>', 'delete'
+ );
+ }
+
+ // }}}
+ // {{{ toHtml()
+
+ /**
+ * Call the rendering function to get the form in a string
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return string $output The Form to be rendered or success msg.
+ * @access protected
+ */
+ public function toHtml(PDO $dbh)
+ {
+ $this->setupRenderers();
+ if ($this->isSubmitted()) {
+ if ($this->validate()) {
+ $output = $this->successMsg;
+ } else {
+ $output = $this->errorMsg;
+ $output .= parent::toHTML();
+ }
+ } else {
+ $output = parent::toHTML();
+ }
+ return $output;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * File Doc Comment
+ *
+ * PHP version 5
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: TransitionSettings.php,v 1.2 2010/08/15 18:41:14 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Rotating Images Application
+ *
+ * Manages the creation and editing form for manipulating banners in the db.
+ *
+ * @category RotatingImages
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2008 Gaslight Media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_RotatingImages_Forms_TransitionSettings
+ extends Toolkit_FormBuilder
+{
+ // {{{ properties
+
+ /**
+ * What do you want the success msg to be if the form validates successfully
+ *
+ * @var string
+ * @access protected
+ */
+ protected $successMsg
+ = '<div id="form-success-top">Settings successfully updated.</div>';
+
+ /**
+ * The default rules to register for validating
+ *
+ * We have to register these rules, or any others we want, before
+ * we are able to use them in our forms.
+ *
+ * @var string
+ * @access protected
+ */
+ protected $registeredRules = array();
+
+ // }}}
+
+ // {{{ configureConstants()
+
+ /**
+ * Configure the constant values for the form
+ *
+ * @return void
+ * @access protected
+ */
+ public function configureConstants()
+ {
+ $c = array(
+ 'ac' => 'preview'
+ );
+ $this->setupConstants($c);
+ }
+
+ // }}}
+ // {{{ configureDefaults()
+
+ /**
+ * Configure the initial default values for the form
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return void
+ * @access protected
+ */
+ public function configureDefaults(PDO $dbh)
+ {
+ $sql = "
+ SELECT *
+ FROM rotating_images_transitions";
+
+ $d = $dbh->query($sql, PDO::FETCH_ASSOC)->fetch();
+
+ $this->setupDefaults($d);
+ }
+
+ // }}}
+ // {{{ configureElements()
+
+ /**
+ * Configure how the form elements should look
+ *
+ * @param PDO $dbh Database handler
+ * @param Config_Container $c Configuration object
+ *
+ * @return void
+ * @access public
+ */
+ public function configureElements(PDO $dbh, Config_Container $c)
+ {
+ $e = array();
+
+ $rotationTime =& $c->getItem('section', 'rotation time')
+ ->getItem('directive', 'timeout')
+ ->getContent();
+ $timeout = array_combine(
+ array_values($rotationTime),
+ array_values($rotationTime)
+ );
+ $timeout = array_change_key_case($timeout);
+
+ $animationType =& $c->getItem('section', 'animation type')
+ ->getItem('directive', 'transition')
+ ->getContent();
+ $transition = array_combine(
+ array_values($animationType),
+ array_values($animationType)
+ );
+
+ // All Grouped Elements are created here.
+ $submitButtons = array();
+ $submitButtons[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'apply',
+ 'display' => 'Apply Transition',
+ );
+ $submitButtons[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'preview',
+ 'display' => 'Preview Transition',
+ );
+
+ // All Elements are created here. This includes group element definitions.
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'ac',
+ );
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => false,
+ 'name' => 'timeout',
+ 'display' => 'Seconds between transition',
+ 'opts' => array('' => '-- Select --') + $timeout,
+ );
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => false,
+ 'name' => 'transition',
+ 'display' => 'Transition effect',
+ 'opts' => array('' => '-- Select --') + $transition,
+ 'att' => array('id' => 'transition')
+ );
+ $e[] = array(
+ 'type' => 'group',
+ 'group' => $submitButtons,
+ 'req' => false,
+ 'name' => 'submitButtons',
+ 'appendName' => false,
+ 'seperator' => ' - '
+ );
+
+ $this->setupElements($e);
+ }
+
+ // }}}
+ // {{{ configureForm()
+
+ /**
+ * Configure a form so we can use it
+ *
+ * @param PDO $pdo Database handler
+ * @param Config_Container $c Application configuration settings
+ *
+ * @return void
+ * @access public
+ */
+ public function configureForm(PDO $pdo, Config_Container $c)
+ {
+ $this->configureConstants();
+ $this->configureDefaults($pdo);
+ $this->configureElements($pdo, $c);
+ }
+
+ // }}}
+
+ // {{{ processData()
+
+ /**
+ * Update transition values
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return boolean Result of update
+ * @access protected
+ */
+ private function _processData(PDO $dbh)
+ {
+ try {
+ $sql = "
+ UPDATE rotating_images_transitions
+ SET timeout = :timeout,
+ transition = :transition";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(
+ ':timeout',
+ $this->_submitValues['timeout'],
+ PDO::PARAM_INT
+ );
+ $stmt->bindParam(
+ ':transition',
+ $this->_submitValues['transition'],
+ PDO::PARAM_INT
+ );
+
+ return $stmt->execute();
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+
+ // {{{ setupRenderers()
+ // @codeCoverageIgnoreStart
+
+ /**
+ * Custom rendering templates for special fields on the form
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupRenderers()
+ {
+ parent::setupRenderers();
+ $renderer =& $this->defaultRenderer();
+ $renderer->setFormTemplate(
+ '<div class="webform">
+ <form{attributes}>
+ <div class="hiddenElements">
+ {hidden}
+ </div>
+ {requiredNote}
+ <table id="transition-settings">{content}</table>
+ </form>
+ </div>'
+ );
+ $renderer->setElementTemplate(
+ '<tr align="center">
+ <td colspan="2">'.$required.'{label}'.$error.'{element}</td>
+ </tr>',
+ 'submitButtons'
+ );
+ }
+
+ // @codeCoverageIgnoreEnd
+ // }}}
+
+ // {{{ toHtml()
+
+ /**
+ * Call the rendering function to get the form in a string
+ *
+ * @param PDO $pdo PDO
+ *
+ * @return string $output The Form to be rendered or success msg.
+ * @access protected
+ */
+ public function toHtml(PDO $pdo)
+ {
+ $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'css/contactform.css';
+
+ $this->setupRenderers();
+ $output = '';
+ if ($this->validate()) {
+ if ($this->_processData($pdo)) {
+ $output = $this->successMsg;
+ }
+ }
+ $output .= parent::toHTML();
+
+ return $output;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * Gateway.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_RotatingImages_Gateway
+ *
+ * Description of Toolkit_RotatingImages_Gateway
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_RotatingImages_Gateway
+{
+
+ // {{{ properties
+ /**
+ * PDO
+ *
+ * @var PDO
+ * @access protected
+ */
+ protected $dbh;
+
+ // }}}
+ // {{{ __construct()
+ /**
+ * Class construct
+ *
+ * @param PDO $dbh PDO
+ *
+ * @return void
+ */
+ public function __construct(PDO $dbh)
+ {
+ $this->dbh = $dbh;
+ }
+
+ // }}}
+ // {{{ delete()
+ /**
+ * Deleting the image
+ *
+ * @param Toolkit_RotatingImages_Image $image Image
+ * @param Toolkit_FileServer_ImageAdapter $ia ImageAdapter
+ *
+ * @return \Toolkit_RotatingImages_Image|boolean
+ * @throws InvalidArgumentException
+ */
+ public function delete(
+ Toolkit_RotatingImages_Image $image,
+ Toolkit_FileServer_ImageAdapter $ia
+ ) {
+ $id = $image->getId();
+ if (!filter_var($id, FILTER_VALIDATE_INT)) {
+ throw new InvalidArgumentException("Invalid image id `$id`");
+ }
+
+ try {
+ $ia->delete($image->getImage());
+ $sql = "
+ DELETE FROM rotating_images
+ WHERE id = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+
+ return $image;
+ } catch (RangeException $e) {
+ Toolkit_Logger::logException('File Server Error', $e);
+ } catch (Toolkit_FileServer_Exception $e) {
+ Toolkit_Logger::logException('File Server Error', $e);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ }
+
+ return false;
+ }
+
+ // }}}
+ // {{{ find()
+ /**
+ * Finding the image by id
+ *
+ * @param int $id Description for id
+ *
+ * @return \Toolkit_RotatingImages_Image|boolean
+ * @throws InvalidArgumentException
+ */
+ public function find($id)
+ {
+ if (!filter_var($id, FILTER_VALIDATE_INT)) {
+ throw new InvalidArgumentException("Invalid image id `$id`");
+ }
+
+ $sql = "
+ SELECT *
+ FROM rotating_images
+ WHERE id = :id";
+
+ try {
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+
+ if ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ return new Toolkit_RotatingImages_Image($row, $row['id']);
+ } else {
+ return false;
+ }
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ }
+
+ return false;
+ }
+
+ // }}}
+ // {{{ insert()
+ /**
+ * Inserting the image
+ *
+ * @param Toolkit_RotatingImages_Image $image Description for $image
+ *
+ * @return boolean
+ */
+ public function insert(Toolkit_RotatingImages_Image $image)
+ {
+ try {
+ $this->dbh->beginTransaction();
+ $maxPosSql = "
+ SELECT COALESCE(MAX(pos) + 1, 1) AS pos
+ FROM rotating_images
+ WHERE active = cast(1 AS BOOLEAN)";
+ $row = $this->dbh->query($maxPosSql)->fetch(PDO::FETCH_ASSOC);
+
+ $insertSql = "
+ INSERT INTO rotating_images
+ (image, active, url, external, pos, thumb_width, thumb_height,
+ width, height, title, descr)
+ VALUES
+ (:image, :active, :url, :external, :pos, :thumb_width, :thumb_height,
+ :width, :height, :title, :descr)";
+ $stmt = $this->dbh->prepare($insertSql);
+ $stmt->bindParam(':image', $image->getImage(), PDO::PARAM_STR);
+ $stmt->bindParam(':active', $image->getActive(), PDO::PARAM_BOOL);
+ $stmt->bindParam(':external', $image->getExternal(), PDO::PARAM_BOOL);
+ $stmt->bindParam(
+ ':thumb_width', $image->getThumbWidth(), PDO::PARAM_INT
+ );
+ $stmt->bindParam(
+ ':thumb_height', $image->getThumbHeight(), PDO::PARAM_INT
+ );
+ $stmt->bindParam(
+ ':width', $image->getWidth(), PDO::PARAM_INT
+ );
+ $stmt->bindParam(
+ ':height', $image->getHeight(), PDO::PARAM_INT
+ );
+ if ($image->getActive()) {
+ $stmt->bindParam(':pos', $row['pos'], PDO::PARAM_INT);
+ } else {
+ $stmt->bindValue(':pos', null, PDO::PARAM_NULL);
+ }
+ if ($image->getUrl()) {
+ $stmt->bindParam(':url', $image->getUrl(), PDO::PARAM_STR);
+ } else {
+ $stmt->bindValue(':url', null, PDO::PARAM_NULL);
+ }
+ if ($image->getTitle()) {
+ $stmt->bindParam(':title', $image->getTitle(), PDO::PARAM_STR);
+ } else {
+ $stmt->bindValue(':title', null, PDO::PARAM_NULL);
+ }
+
+ if ($image->getDescr()) {
+ $stmt->bindParam(':descr', $image->getDescr(), PDO::PARAM_STR);
+ } else {
+ $stmt->bindValue(':descr', null, PDO::PARAM_NULL);
+ }
+ $stmt->execute();
+
+ return $this->dbh->commit();
+ } catch (PDOException $e) {
+ $this->dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+ }
+
+ return false;
+ }
+
+ // }}}
+ // {{{ update()
+ /**
+ * Updating the image
+ *
+ * @param Toolkit_RotatingImages_Image $image Image
+ *
+ * @return boolean
+ * @throws RuntimeException
+ */
+ public function update(Toolkit_RotatingImages_Image $image)
+ {
+ if (!filter_var($image->getId(), FILTER_VALIDATE_INT)) {
+ throw new RuntimeException(
+ 'Image has not been inserted into the database yet'
+ );
+ }
+
+ try {
+ $updateSql = "
+ UPDATE rotating_images
+ SET image = :image,
+ active = :active,
+ external = :external,
+ thumb_width = :thumb_width,
+ thumb_height = :thumb_height,
+ width = :width,
+ height = :height,
+ url = :url,
+ title = :title,
+ descr = :descr
+ WHERE id = :id";
+ $stmt = $this->dbh->prepare($updateSql);
+ $stmt->bindParam(':image', $image->getImage(), PDO::PARAM_STR);
+ $stmt->bindParam(':active', $image->getActive(), PDO::PARAM_BOOL);
+ $stmt->bindParam(':external', $image->getExternal(), PDO::PARAM_BOOL);
+ $stmt->bindParam(':id', $image->getId(), PDO::PARAM_INT);
+ $stmt->bindParam(
+ ':thumb_width', $image->getThumbWidth(), PDO::PARAM_INT
+ );
+ $stmt->bindParam(
+ ':thumb_height', $image->getThumbHeight(), PDO::PARAM_INT
+ );
+ $stmt->bindParam(
+ ':width', $image->getWidth(), PDO::PARAM_INT
+ );
+ $stmt->bindParam(
+ ':height', $image->getHeight(), PDO::PARAM_INT
+ );
+
+ if ($image->getUrl()) {
+ $stmt->bindParam(':url', $image->getUrl(), PDO::PARAM_STR);
+ } else {
+ $stmt->bindValue(':url', null, PDO::PARAM_NULL);
+ }
+
+ if ($image->getTitle()) {
+ $stmt->bindParam(':title', $image->getTitle(), PDO::PARAM_STR);
+ } else {
+ $stmt->bindValue(':title', null, PDO::PARAM_NULL);
+ }
+
+ if ($image->getDescr()) {
+ $stmt->bindParam(':descr', $image->getDescr(), PDO::PARAM_STR);
+ } else {
+ $stmt->bindValue(':descr', null, PDO::PARAM_NULL);
+ }
+
+ return $stmt->execute();
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ }
+
+ return false;
+ }
+
+ // }}}
+ // {{{ find()
+ /**
+ * Find all images
+ *
+ * @return \Toolkit_RotatingImages_Image
+ */
+ public function findAll()
+ {
+ $sql = "
+ SELECT *
+ FROM rotating_images
+ ORDER BY active DESC, pos, id";
+
+ try {
+ $images = array();
+ foreach ($this->dbh->query($sql) as $row) {
+ $images[] = new Toolkit_RotatingImages_Image($row, $row['id']);
+ }
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ }
+
+ return $images;
+ }
+
+ // }}}
+}
+
+?>
--- /dev/null
+<?php
+
+/**
+ * IImagesDataGrid.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_RotatingImages_IImagesDataGrid
+ *
+ * Images Datagrid Interface
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+interface Toolkit_RotatingImages_IImagesDataGrid
+{
+
+ /**
+ * Set the query the datagrid will use.
+ *
+ * @return string HTML output
+ * @access public
+ */
+ public function setQuery();
+}
--- /dev/null
+<?php
+
+/**
+ * Image.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_RotatingImages_Image
+ *
+ * Class representation of the image database
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_RotatingImages_Image
+{
+ // {{{ properties
+
+ /**
+ * Database id of node tuple
+ * @var integer
+ * @access protected
+ */
+ protected $id;
+
+ /**
+ * If the node is active or not
+ * @var boolean
+ * @access protected
+ */
+ protected $active;
+
+ /**
+ * Image
+ * @var string
+ * @access protected
+ */
+ protected $image;
+
+ /**
+ * url
+ * @var string
+ * @access protected
+ */
+ protected $url;
+
+ /**
+ * external
+ * @var string
+ * @access protected
+ */
+ protected $external;
+
+ /**
+ * width of thumbnail
+ * @var integer
+ * @access protected
+ */
+ protected $thumbWidth;
+
+ /**
+ * height of thumb
+ * @var integer
+ * @access protected
+ */
+ protected $thumbHeight;
+
+ /**
+ * width of image
+ * @var integer
+ * @access protected
+ */
+ protected $width;
+
+ /**
+ * height of image
+ * @var integer
+ * @access protected
+ */
+ protected $height;
+
+ /**
+ * Title of the Image
+ * @var string
+ * @access protected
+ */
+ protected $title;
+
+ /**
+ * Description of Image
+ * @var type
+ * @access protected
+ */
+ protected $descr;
+
+ // }}}
+ // {{{ __construct()
+ /**
+ * Class constructor
+ *
+ * @param array $attributes Description of attributes
+ * @param integer $id Database ID of node tuple
+ *
+ * @throws InvalidArgumentException
+ * @return void
+ */
+ public function __construct(array $attributes, $id = null)
+ {
+ if (!array_key_exists('active', $attributes)) {
+ throw new InvalidArgumentException(
+ 'Missing `active` key for attributes'
+ );
+ } elseif (!array_key_exists('image', $attributes)) {
+ throw new InvalidArgumentException(
+ 'Missing `image` key for attributes'
+ );
+ }
+
+ if (filter_var($attributes['url'], FILTER_VALIDATE_URL)) {
+ $this->url = $attributes['url'];
+ }
+
+ $this->active = (bool) $attributes['active'];
+ $this->external = (bool) $attributes['external'];
+ $this->image = $attributes['image'];
+ $this->thumbWidth = $attributes['thumb_width'];
+ $this->thumbHeight = $attributes['thumb_height'];
+ $this->width = $attributes['width'];
+ $this->height = $attributes['height'];
+ $this->id = $id;
+ $this->title = $attributes['title'];
+ $this->descr = $attributes['descr'];
+ }
+
+ // }}}
+ // {{{ getActive()
+
+ /**
+ * Gets the active flag
+ *
+ * @return boolean node active flag
+ * @access public
+ */
+ public function getActive()
+ {
+ return $this->active;
+ }
+
+ // }}}
+ // {{{ getExternal()
+
+ /**
+ * Checks whether it is external url
+ *
+ * @return boolean
+ * @access public
+ */
+ public function getExternal()
+ {
+ return $this->external;
+ }
+
+ // }}}
+ // {{{ getHeight()
+
+ /**
+ * Get image height
+ *
+ * @return integer image height
+ * @access public
+ */
+ public function getHeight()
+ {
+ return $this->height;
+ }
+
+ // }}}
+ // {{{ getId()
+
+ /**
+ * Gets the node id in the database
+ *
+ * @return integer database id
+ * @access public
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ // }}}
+ // {{{ getImage()
+
+ /**
+ * Get image
+ *
+ * @return string image
+ * @access public
+ */
+ public function getImage()
+ {
+ return $this->image;
+ }
+
+ // }}}
+ // {{{ getThumbHeight()
+
+ /**
+ * Get Thumbnail height
+ *
+ * @return integer thumbnail height
+ * @access public
+ */
+ public function getThumbHeight()
+ {
+ return $this->thumbHeight;
+ }
+
+ // }}}
+ // {{{ getThumbWidth()
+
+ /**
+ * Get thumbnail width
+ *
+ * @return integer thumbnail width
+ * @access public
+ */
+ public function getThumbWidth()
+ {
+ return $this->thumbWidth;
+ }
+
+ // }}}
+ // {{{ getWidth()
+
+ /**
+ * Get image width
+ *
+ * @return integer image width
+ * @access public
+ */
+ public function getWidth()
+ {
+ return $this->width;
+ }
+
+ // }}}
+ // {{{ getUrl()
+
+ /**
+ * Get image url
+ *
+ * @return string image url
+ * @access public
+ */
+ public function getUrl()
+ {
+ return $this->url;
+ }
+
+ // }}}
+ // {{{ isAnchor()
+
+ /**
+ * Checks whether the image is an anchor
+ *
+ * @return boolean
+ * @access public
+ */
+ public function isAnchor()
+ {
+ return !empty($this->url);
+ }
+
+ // }}}
+ // {{{ setActive()
+
+ /**
+ * set the active flag to true for the node
+ *
+ * @param boolean $active new active flag to set
+ *
+ * @return void
+ * @access public
+ */
+ public function setActive($active)
+ {
+ if (!is_bool($active)) {
+ throw InvalidArgumentException(
+ '$active must be a boolean.'
+ );
+ }
+
+ $this->active = $active;
+ }
+
+ // }}}
+ // {{{ setExternal()
+
+ /**
+ * Sets external
+ *
+ * @param boolean $external External
+ *
+ * @return void
+ * @access public
+ */
+ public function setExternal($external)
+ {
+ $this->external = (bool) $external;
+ }
+
+ // }}}
+ // {{{ setImage()
+ /**
+ * Sets image
+ *
+ * @param string $image Image
+ *
+ * @return void
+ * @access public
+ *
+ */
+ public function setImage($image)
+ {
+ $this->image = $image;
+ }
+
+ // }}}
+ // {{{ setUrl()
+
+ /**
+ * Sets url
+ *
+ * @param string $url url
+ *
+ * @throws InvalidArgumentException
+ * @return void
+ * @access public
+ */
+ public function setUrl($url)
+ {
+ if (!filter_var($url, FILTER_VALIDATE_URL)) {
+ throw new InvalidArgumentException(
+ '$url parameter must be a valid url'
+ );
+ }
+ $this->url = $url;
+ }
+
+ // }}}
+ // {{{ setThumbHeight()
+
+ /**
+ * Set the thumbnail image height value
+ *
+ * @param integer $thumbHeight thumbnail image height
+ *
+ * @return void
+ * @access public
+ */
+ public function setThumbHeight($thumbHeight)
+ {
+ if (!filter_var($thumbHeight, FILTER_VALIDATE_INT)) {
+ throw new InvalidArgumentException(
+ "`$thumbHeight` is not an integer"
+ );
+ }
+ $this->thumbHeight = $thumbHeight;
+ }
+
+ // }}}
+ // {{{ setThumbWidth()
+
+ /**
+ * Set the thumbnail image width value
+ *
+ * @param integer $thumbWidth thumbnail image width
+ *
+ * @return void
+ * @access public
+ */
+ public function setThumbWidth($thumbWidth)
+ {
+ if (!filter_var($thumbWidth, FILTER_VALIDATE_INT)) {
+ throw new InvalidArgumentException(
+ "`$thumbWidth` is not an integer"
+ );
+ }
+ $this->thumbWidth = $thumbWidth;
+ }
+
+ // }}}
+
+ public function getTitle()
+ {
+ return $this->title;
+ }
+
+ public function getDescr()
+ {
+ return $this->descr;
+ }
+
+ public function setTitle($title)
+ {
+ $this->title = $title;
+ return $this;
+ }
+
+ public function setDescr($descr)
+ {
+ $this->descr = $descr;
+ return $this;
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * ImagesDataGridAbstract.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_RotatingImages_ImagesDataGridAbstract
+ *
+ * Description of Toolkit_RotatingImages_ImagesDataGridAbstract
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+abstract class Toolkit_RotatingImages_ImagesDataGridAbstract
+ extends Toolkit_FlexyDataGridBuilder
+{
+ // {{{ properties
+
+ /**
+ * Description of $noRecMessage
+ * @var string
+ * @access protected
+ */
+ protected $noRecMessage = 'No Images';
+
+ // }}}
+ // {{{ configureColumns()
+
+ /**
+ * Description for configureColumns
+ *
+ * @return void
+ */
+ protected function configureColumns()
+ {
+ $id = new Structures_DataGrid_Column(
+ 'ID', 'id', 'id'
+ );
+ $this->addColumn($id);
+
+ $delete = new Structures_DataGrid_Column(
+ 'Delete', null, null, array('class' => 'delLink'), null,
+ array(&$this, 'renderDeleteLink')
+ );
+ $this->addColumn($delete);
+
+ $edit = new Structures_DataGrid_Column(
+ 'Edit', null, null, array('class' => 'editLink'), null,
+ array(&$this, 'renderEditLink')
+ );
+ $this->addColumn($edit);
+
+ $url = new Structures_DataGrid_Column(
+ 'URL', 'url', 'url'
+ );
+ $this->addColumn($url);
+
+ $image = new Structures_DataGrid_Column(
+ 'Image', null, null, array('class' => 'image'), null,
+ array(&$this, 'renderImage')
+ );
+ $this->addColumn($image);
+ }
+
+ // }}}
+ // {{{ renderEditLink()
+
+ /**
+ * Render the edit link for an image
+ *
+ * @param array $data DB record
+ *
+ * @return mixed Link to edit a banner
+ * @access public
+ */
+ public function renderEditLink($data)
+ {
+ extract($data['record']);
+ $imgFormat = '<img src="%s" alt="Edit Image Icon" style="float: left; margin-right: 5px;"> Edit Image';
+ $img = sprintf(
+ $imgFormat, MEDIA_APP_BASE_URL . 'assets/icons/image_edit.png'
+ );
+
+ $linkFormat = '<a href="%s?%s">%s</a>';
+ return sprintf(
+ $linkFormat, MEDIA_BASE_URL . 'admin/rotatingImages.php',
+ "rt=EditImage&id=$id", $img
+ );
+ }
+
+ // }}}
+ // {{{ renderDeleteLink()
+
+ /**
+ * Render the delete link for an image
+ *
+ * @param array $data DB record
+ *
+ * @return mixed Link to edit a banner
+ * @access public
+ */
+ public function renderDeleteLink($data)
+ {
+ extract($data['record']);
+ $imgFormat = '<img src="%s" alt="Delete Image Icon" style="float: left; margin-right: 5px;"> Delete Image';
+ $img = sprintf(
+ $imgFormat, MEDIA_APP_BASE_URL . 'assets/icons/image_delete.png'
+ );
+
+ $linkFormat = '<a href="%s?%s">%s</a>';
+ return sprintf(
+ $linkFormat, MEDIA_BASE_URL . 'admin/rotatingImages.php',
+ "rt=EditImage&ac=delete&id=$id", $img);
+ }
+
+ // }}}
+ // {{{ renderImage()
+
+ /**
+ * Render the delete link for an image
+ *
+ * @param array $data DB record
+ *
+ * @return mixed Link to edit a banner
+ * @access public
+ */
+ public function renderImage($data)
+ {
+ extract($data['record']);
+ $imgFormat = '<img class="thumbnail" witdh="%s" height="%s" src="%s" alt="Image thumbnail">';
+ return sprintf(
+ $imgFormat, $thumb_width, $thumb_height,
+ ROTATING_IMAGE_THUMB . $image
+ );
+ }
+
+ // }}}
+ // {{{ toHtml()
+
+ /**
+ * Returns the DataGrid
+ *
+ * @param Structures_DataGrid_Renderer_Flexy $renderer Rendering engine used to render DG
+ * @param string $template Template to use
+ *
+ * @return string html templated datagrid results
+ * @access public
+ */
+ public function toHtml(
+ Structures_DataGrid_Renderer_Flexy $renderer, $template = null
+ )
+ {
+ $GLOBALS['styleSheets'][] = MEDIA_APP_BASE_URL . 'libjs/jqueryui/1.8/development-bundle/themes/smoothness/jquery.ui.core.css';
+ $GLOBALS['styleSheets'][] = MEDIA_APP_BASE_URL . 'libjs/jqueryui/1.8/development-bundle/themes/smoothness/jquery.ui.theme.css';
+
+ $GLOBALS['bottomScripts'][] = JQUERY_UI_CDN_JS;
+ $GLOBALS['bottomScripts'][] = MEDIA_BASE_URL . 'Toolkit/RotatingImages/libjs/sortable.js';
+
+ return parent::toHtml($renderer, $template);
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * InactiveImagesDataGrid.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_RotatingImages_InactiveImagesDataGrid
+ *
+ * Description of Toolkit_RotatingImages_InactiveImagesDataGrid
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_RotatingImages_InactiveImagesDataGrid
+ extends Toolkit_RotatingImages_ImagesDataGridAbstract
+ implements Toolkit_RotatingImages_IImagesDataGrid
+{
+ // {{{ setControlObject()
+
+ /**
+ * setControlObject
+ *
+ * @return void
+ */
+ protected function setControlObject()
+ {
+ $this->ctrlObj['tableId'] = 'disabled';
+ //$this->ctrlObj['noRecMessage'] = 'No Disabled Images';
+ $this->ctrlObj['gridName'] = 'Disabled Images';
+ }
+
+ // }}}
+ // {{{ setQuery()
+
+ /**
+ * Sets query to get inactive rotating images
+ *
+ * @return void
+ */
+ public function setQuery()
+ {
+ $sql = "
+ SELECT *
+ FROM rotating_images
+ WHERE active = false";
+
+ parent::setQuery($sql);
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * IndexController.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_RotatingImages_IndexController
+ *
+ * Description of Toolkit_RotatingImages_IndexController
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_RotatingImages_IndexController
+ extends Toolkit_BaseControllerAbstract
+ implements Toolkit_IController
+{
+ // {{{ indexAction()
+
+ /**
+ * Description of indexAction()
+ *
+ * @return string
+ */
+ public function indexAction()
+ {
+ $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'Toolkit/RotatingImages/styles.css';
+
+ $flexyOptions = $GLOBALS['flexyOptions'];
+ $flexyOptions['templateDir'] = BASE . 'Toolkit/RotatingImages/templates/';
+ $flexyOptions['compileDir'] = $flexyOptions['templateDir'] . 'compiled/';
+ $tEngine = new HTML_Template_Flexy($flexyOptions);
+
+ $controllerObject = new stdClass();
+
+ $controllerObject->width = $this->registry->config->getItem('section',
+ 'conf')
+ ->getItem('directive', 'width')
+ ->getContent();
+ $controllerObject->height = $this->registry->config->getItem('section',
+ 'conf')
+ ->getItem('directive', 'height')
+ ->getContent();
+
+
+ $tEngine->compile('instructions.html');
+ $ret = $tEngine->bufferedOutputObject($controllerObject);
+
+ //
+ // Settings Form
+ //
+ $settings = new Toolkit_RotatingImages_Forms_TransitionSettings(
+ 'settings', 'get', 'rotatingImages.php?ac=preview', 'preview'
+ );
+ $settings->configureForm($this->registry->dbh, $this->registry->config);
+ $ret .= $settings->toHtml($this->registry->dbh);
+
+ $previewIframe = new Toolkit_RotatingImages_PreviewIframe(
+ 'rotatingImages.php?ac=preview', 'preview'
+ );
+ $ret .= $previewIframe->toHtml();
+
+ $activeREngine = new Structures_DataGrid_Renderer_Flexy();
+ $activeREngine->setContainer($tEngine);
+ //
+ // Active images datagrid
+ //
+ $activeDG = new Toolkit_RotatingImages_ActiveImagesDataGrid(
+ $this->registry->dbh
+ );
+ $activeDG->setQuery();
+ $activeDG->setDefaultSort(array('pos' => 'ASC'));
+ $ret .= $activeDG->toHtml($activeREngine, 'imagesDataGrid.html');
+
+ $inactiveREngine = new Structures_DataGrid_Renderer_Flexy();
+ $inactiveREngine->setContainer($tEngine);
+ //
+ // In-active images datagrid
+ //
+ $disabledDG = new Toolkit_RotatingImages_InactiveImagesDataGrid(
+ $this->registry->dbh
+ );
+ $disabledDG->setQuery();
+ $disabledDG->setDefaultSort(array('pos' => 'ASC'));
+ $ret .=$disabledDG->toHtml($inactiveREngine, 'imagesDataGrid.html');
+
+ return $ret;
+ }
+
+ // }}}
+ // {{{ previewAction()
+
+ /**
+ * Description of previewAction
+ *
+ * @return string
+ */
+ public function previewAction()
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM rotating_images
+ WHERE active = true";
+
+ $images = $this->registry->dbh->query($sql, PDO::FETCH_ASSOC)->fetchAll();
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ $gateway = new Toolkit_RotatingImages_TransitionGateway($this->registry->dbh);
+ $previewJavascript = new Toolkit_RotatingImages_PreviewJavascript($gateway);
+ $javascript = $previewJavascript->toHtml();
+ $fadingDecorator = new Toolkit_RotatingImages_Decorator_Admin();
+ foreach ($images as $v) {
+ $image = new Toolkit_RotatingImages_Image($v);
+ $thumbnailDecorator = new Toolkit_RotatingImages_Decorator_Thumbnail($image);
+
+ $fadingDecorator->add($thumbnailDecorator);
+ }
+
+ return $fadingDecorator->toHtml() . $javascript;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * Navigation.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_RotatingImages_Navigation
+ *
+ * Sets up navigation bars
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_RotatingImages_Navigation
+ extends Toolkit_NavigationAbstract
+ implements Toolkit_INavigation
+{
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param HTML_Menu $menu
+ * @param HTML_Menu_Renderer $rEngine
+ */
+ public function __construct(
+ HTML_Menu $menu, HTML_Menu_Renderer $rEngine
+ )
+ {
+ $this->menu = $menu;
+ $this->rEngine = $rEngine;
+ $this->currIndex = 'listToolbox';
+ }
+
+ // }}}
+ // {{{ setNavTemplates()
+
+ /**
+ * Set navigation templates
+ *
+ * @return void
+ */
+ protected function setNavTemplates()
+ {
+ $tpl = '<li><a href="%s" title="%s">{Title}</a></li>';
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_INACTIVE,
+ sprintf($tpl, '{url}', '{desc}', '{Title}')
+ );
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_ACTIVE, sprintf($tpl, '{url}', '{desc}', '{Title}')
+ );
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_ACTIVEPATH,
+ sprintf($tpl, '{url}', '{desc}', '{Title}')
+ );
+ $this->rEngine->setMenuTemplate('', '');
+ $this->rEngine->setRowTemplate('<ul class="admin_nav">', '</ul>');
+ }
+
+ // }}}
+ // {{{ setCurrentIndex()
+
+ /**
+ * Sets current menu index
+ *
+ * @return void
+ */
+ protected function setCurrentIndex()
+ {
+ $this->menu->forceCurrentIndex($_GET['rt']);
+ }
+
+ // }}}
+ // {{{ getNavSructure()
+
+ /**
+ * Sets up a multi dimensional array used for the nav structure
+ *
+ * @param Config_Container $c Application configuration
+ *
+ * @return array navigational array hash
+ * @access public
+ */
+ public function getNavStructure(Config_Container $c)
+ {
+ // get reference to [listing type] section of config file
+ $appName = $c->getItem('section', 'conf')
+ ->getItem('directive', 'applicationName')
+ ->getContent();
+
+ $nav = array(
+ 'listImages' => array(
+ 'Title' => "List Images",
+ 'url' => MEDIA_BASE_URL . 'admin/rotatingImages.php',
+ 'desc' => "Display all the Images",
+ ),
+ 'addImage' => array(
+ 'Title' => 'Add Image',
+ 'url' => MEDIA_BASE_URL . 'admin/rotatingImages.php?rt=EditImage',
+ 'desc' => 'Display all the page drafts'
+ ),
+ );
+
+ return $nav;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * class to iterator over available rotating image nodes
+ *
+ * PHP version 5
+ *
+ * The license text...
+ *
+ * @category Toolkit
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: NodesIterator.php,v 1.2 2010/07/25 17:07:24 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * class to iterator over available rotating image nodes
+ *
+ * @category Toolkit
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_RotatingImages_NodesIterator
+ implements IteratorAggregate
+{
+ // {{{ properties
+
+ /**
+ * Node objects to iterator over
+ * @var array
+ * @access private
+ */
+ private $_nodes;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Constructor
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct()
+ {
+ $this->_nodes = array();
+ }
+
+ // }}}
+ // {{{ getIterator()
+
+ /**
+ * Get the iterator
+ *
+ * @return ArrayIterator iterator for arrays
+ * @access public
+ */
+ public function getIterator()
+ {
+ return new ArrayIterator($this->_nodes);
+ }
+
+ // }}}
+ // {{{ addImage()
+
+ /**
+ * Add image node object to iterator
+ *
+ * @param Toolkit_RotatingImages_Image $node node object to add to iterator
+ *
+ * @return void
+ * @access public
+ */
+ public function addImage(Toolkit_RotatingImages_Image $node)
+ {
+ $this->_nodes[] = $node;
+ }
+
+ // }}}
+ // {{{ getNode()
+
+ /**
+ * Get a node from the iterator
+ *
+ * @param integer $key offset to get node at
+ *
+ * @return mixed false if no nodes available, else Toolkit_RotatingImages_Image object
+ * @access public
+ * @throws InvalidArgumentException if $key is not an integer
+ */
+ public function getNode($key)
+ {
+ if (!count($this->_nodes)) {
+ return false;
+ }
+
+ if (!filter_var($key, FILTER_VALIDATE_INT)) {
+ throw new InvalidArgumentException(
+ "\$key must be an integer, `$key` given"
+ );
+ }
+
+ return $this->_nodes[$key];
+ }
+
+ // }}}
+ // {{{ getTotal()
+
+ /**
+ * Gets the total number of nodes in the iterator
+ *
+ * @return integer number of nodes in interator
+ *
+ * @access public
+ */
+ public function getTotal()
+ {
+ return count($this->_nodes);
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * Short description for file
+ *
+ * Long description (if any) ...
+ *
+ * PHP version 5
+ *
+ * The license text...
+ *
+ * @category Toolkit
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: PreviewIframe.php,v 1.1 2010/07/25 17:07:24 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Short description for class
+ *
+ * Long description (if any) ...
+ *
+ * @category Toolkit
+ * @package Toolkit_RotatingImages
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_RotatingImages_PreviewIframe
+{
+ // {{{ properties
+
+ /**
+ * url of the document to show in iframe
+ * @var string
+ * @access private
+ */
+ private $_src;
+
+ /**
+ * name of the iframe
+ * @var string
+ * @access private
+ */
+ private $_name;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Constructor
+ *
+ * @param string $src URL of the document to show in ifram
+ * @param string $name name of the iframe
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct($src, $name)
+ {
+ $this->_src = $src;
+ $this->_name = $name;
+ }
+
+ // }}}
+ // {{{ toHtml()
+
+ /**
+ * Creates an iframe
+ *
+ * @return string html iframe tag
+ * @access public
+ */
+ public function toHtml()
+ {
+ $nonSupport = 'Your browser does not support iframes.';
+ $format = '<iframe src="%s" name="%s" frameborder="0" marginheight="0" marginwidth="0"><p>%s</p></iframe>';
+ return sprintf($format, $this->_src, $this->_name, $nonSupport);
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * PreviewJavascript.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_RotatingImages_PreviewJavascript
+ *
+ * Description of Toolkit_RotatingImages_PreviewJavascript
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_RotatingImages_PreviewJavascript
+{
+
+ /**
+ * Transition gateway
+ *
+ * @var Toolkit_RotatingImages_TransitionGateway
+ * @access private
+ */
+ private $_gateway;
+
+ /**
+ * Class construct
+ *
+ * @param Toolkit_RotatingImages_TransitionGateway $gateway Construct gateway
+ */
+ public function __construct(
+ Toolkit_RotatingImages_TransitionGateway $gateway
+ )
+ {
+ $this->_gateway = $gateway;
+ }
+
+ /**
+ * Description for toHtml
+ *
+ * @return string
+ */
+ public function toHtml()
+ {
+ if (filter_input(INPUT_GET, 'preview')) {
+ $transitionEffect = filter_input(INPUT_GET, 'transition',
+ FILTER_SANITIZE_STRING);
+ $pauseTime = filter_input(INPUT_GET, 'timeout',
+ FILTER_SANITIZE_NUMBER_INT);
+ } elseif (filter_input(INPUT_GET, 'apply')) {
+ $transitionEffect = filter_input(INPUT_GET, 'transition',
+ FILTER_SANITIZE_STRING);
+ $pauseTime = filter_input(INPUT_GET, 'timeout',
+ FILTER_SANITIZE_NUMBER_INT);
+ $this->_gateway->set($transitionEffect, $pauseTime);
+ } else {
+ $effect = $this->_gateway->get();
+ $transitionEffect = $effect['transition'];
+ $pauseTime = $effect['timeout'];
+ }
+ $js = "$(window).load(function() {\n";
+ $js .= " $('#rotatingImagesPreview').nivoSlider({\n";
+ $js .= " effect: '$transitionEffect',\n";
+ $js .= " pauseTime: $pauseTime * 1000,\n";
+ $js .= " directionNav: false,\n";
+ $js .= " controlNav: false\n";
+ $js .= " });\n";
+ $js .= "});\n";
+
+ return "<script type=\"text/javascript\">$js</script>";
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * TransitionGateway.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_RotatingImages_TransitionGateway
+ *
+ * Gateway for transition of rotating images
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_RotatingImages_TransitionGateway
+{
+
+ /**
+ * PDO
+ *
+ * @var PDO
+ * @access private
+ */
+ private $_dbh;
+
+ /**
+ * Class construct
+ *
+ * @param PDO $dbh PDO
+ */
+ public function __construcT(PDO $dbh)
+ {
+ $this->_dbh = $dbh;
+ }
+
+ /**
+ * Getting the transitions for the slideshow
+ *
+ * @return array|null
+ */
+ public function get()
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM rotating_images_transitions";
+
+ return $this->_dbh->query($sql)->fetch(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ }
+ }
+
+ /**
+ * Set transition type and time
+ *
+ * @param string $transition Description for transition
+ * @param int $timeout Description for timeout
+ *
+ * @throws RuntimeException
+ * @return void
+ */
+ public function set($transition, $timeout)
+ {
+ if (!filter_var($transition)) {
+ throw new RuntimeException("Invalid transition type `$transition`");
+ } elseif (!filter_var($timeout, FILTER_VALIDATE_INT)) {
+ throw new RuntimeException("Invalid transition timeout `$transition`");
+ }
+
+ try {
+ $sql = "
+ UPDATE rotating_images_transitions
+ SET timeout = :timeout, transition = :transition";
+
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(':transition', $transition, PDO::PARAM_STR);
+ $stmt->bindParam(':timeout', $timeout, PDO::PARAM_INT);
+
+ $stmt->execute();
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ }
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * ajax.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+if (!isset($_POST['action']) || $_POST['action'] != 'updateOrder'
+) {
+ return false;
+}
+
+require_once '../../setup.phtml';
+
+$dbh = Toolkit_Database::getInstance();
+
+try {
+ $dbh->beginTransaction();
+ $sql = "
+ UPDATE rotating_images
+ SET active = false, pos = null";
+
+ $dbh->query($sql);
+
+ $sql = "
+ UPDATE rotating_images
+ SET active = true, pos = :pos
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $i = 1;
+ foreach ($_POST['image'] as $v) {
+ $stmt->bindParam(':pos', $i, PDO::PARAM_INT);
+ $stmt->bindParam(':id', $v, PDO::PARAM_INT);
+ $stmt->execute();
+ ++$i;
+ }
+ return $dbh->commit();
+} catch (PDOException $e) {
+ $dbh->rollback();
+ return Toolkit_Common::handleError($e);
+}
--- /dev/null
+[conf]
+; Application Name
+applicationName = "Homepage Slideshow"
+useTitles = On
+hasPrevNextLinks = Off
+width = 505
+height = 303
+
+; time between the fades in milliseconds
+[rotation time]
+timeout[] = 5
+timeout[] = 10
+timeout[] = 15
+timeout[] = 20
+timeout[] = 25
+timeout[] = 30
+
+; type of animation 'fade' or 'slide'
+[animation type]
+transition[] = "sliceDown"
+transition[] = "sliceDownLeft"
+transition[] = "sliceUp"
+transition[] = "sliceUpLeft"
+transition[] = "sliceUpDown"
+transition[] = "sliceUpDownLeft"
+transition[] = "fold"
+transition[] = "fade"
+transition[] = "random"
--- /dev/null
+var RISortable =
+{
+ init: function()
+ {
+ $('#active, #disabled').sortable({
+ connectWith: 'ul',
+ revert: true,
+ cancel: '.ui-state-disabled',
+ distance: 15,
+ forcePlaceholderSize: true,
+ placeholder: 'ui-state-highlight',
+ cursor: 'move',
+ receive: RISortable.receive,
+ remove: RISortable.remove,
+ stop: RISortable.stop,
+ opacity: 0.6
+ });
+ $('.dataGrid').disableSelection();
+ },
+
+ receive: function(event, ui)
+ {
+ var $disabled = $(this).children('.ui-state-disabled');
+ if ($disabled.is('li')) {
+ $disabled.remove();
+ }
+ },
+
+ remove: function(event, ui)
+ {
+ var $myself = $(this);
+ if ($myself.children().length == 0) {
+ $myself.html('<li class="ui-state-disabled ui-state-default">Drag image here to add</li>');
+ }
+ },
+
+ stop: function(event, ui)
+ {
+ var order = $('#active').sortable('serialize');
+
+ $.post('../Toolkit/RotatingImages/ajax.php', order+'&action=updateOrder');
+
+/*
+ $(fade.container).empty();
+ $('#active img.thumbnail').each(function() {
+ var copy = $(this).clone();
+ copy.removeAttr('class')
+ .removeAttr('alt');
+ copy.appendTo(fade.container);
+ });
+ fade.update();
+*/
+ }
+};
+
+$(document).ready(RISortable.init);
--- /dev/null
+<?php
+/**
+ * user.php
+ *
+ * PHP version 5.2
+ *
+ * @category Toolkit
+ * @package RotatingImages_libjs
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+require_once '../../../setup.phtml';
+$dbh = Toolkit_Database::getInstance();
+$sql = "select * from rotating_images_transitions";
+$row = $dbh->query($sql)->fetch(PDO::FETCH_ASSOC);
+?>
+$(window).load(function() {
+ $('#slider').nivoSlider({
+ effect: '<?php echo $row['transition'];?>',
+ animSpeed: 1000,
+ pauseTime: <?php echo $row['timeout'] * 1000;?>
+ });
+ if ($('#slider').children('a').size() <= 1 ) {
+ $('.nivo-prevNav').css('display', 'none');
+ $('.nivo-nextNav').css('display', 'none');
+ }
+
+ $('#slideshow a.external').each(function() {
+ $(this).click(function() {
+ var $newWindow = window.open($(this).attr('href'));
+ $newWindow.focus();
+ return false;
+ });
+ });
+});
--- /dev/null
+ul.dataGrid {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+ul.dataGrid li {
+ margin: 0 5px 5px 5px;
+ padding: 5px;
+}
+.ui-state-default {
+ width: 500px;
+ height: 120px;
+ clear: left;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ border-radius: 10px;
+ padding: 10px !important;
+ border: 1px solid #999 !important }
+h2 {
+ clear: left;
+}
+.thumbnail {
+ float: left;
+ -webkit-box-shadow: 2px 2px 5px #ccc;
+ -moz-box-shadow: 2px 2px 5px #ccc;
+}
+.ui-state-default { }
+.info {
+ border: 1px solid #ccc;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ border-radius: 10px;
+ -moz-box-shadow: 2px 2px 5px #ccc;
+ -webkit-box-shadow: 2px 2px 5px #ccc;
+ background: #eee;
+ margin: 0 10px;
+ float: right;
+ width: 250px;
+ padding: 10px;
+ height: 80px;
+}
+.info img {
+ border: 0;
+}
+.info a {
+ text-decoration: underline !important;
+}
+.info a:hover {
+ color: black;
+ font-weight: bold;
+ text-decoration: none !important;
+}
+.dataGrid .delete {
+ line-height: 16px;
+ vertical-align: center;
+ float: right;
+ margin-top: 10px;
+}
+.dataGrid .edit {
+ line-height: 16px;
+ vertical-align: center;
+ clear: left;
+ margin-top: 10px;
+}
+.webform {
+ width: 250px;
+}
+h2 {
+ margin-top: 0;
+ padding-top: 1em;
+}
+#instructions {
+ width: 500px;
+ clear: left;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ border-radius: 10px;
+ padding: 10px !important;
+ border: 1px solid #D5DFC3;
+ background: #F3FFDF;
+ margin-top: 6px;
+}
+
+/* Slideshow */
+#transition-settings {
+ float: left;
+ margin: 0 10px 0 0;
+ display: block;
+ width: 300px;
+}
+#rotatingImagesPreview {
+ height: 100px;
+ width: 200px;
+ float: left;
+ overflow: hidden;
+}
+#rotatingImagesLive {
+ color: orange;
+ font-weight: bold;
+ height: 1%;
+ overflow: hidden;
+}
+#rotatingImagesLive #images {
+ overflow: hidden;
+}
+#rotatingImagesLive #images img {
+ border-bottom: 5px solid #f7941d;
+}
+#if-prev,
+#if-next {
+ text-decoration: underline;
+ cursor: hand;
+ cursor: pointer;
+ color: orange;
+}
+#if-prev:hover,
+#if-next:hover {
+ color: black;
+}
--- /dev/null
+<tr>
+ <td class="labelcell">
+ <!-- BEGIN required -->
+ <span class="req">*</span>
+ <!-- END required -->
+ <label>{label}</label>
+ </td>
+ <td class="fieldcell">
+ <!-- BEGIN error -->
+ <div class="req"> {error} </div>
+ <!-- END error -->
+ {element}
+ </td>
+</tr>
--- /dev/null
+<div id="contact">
+ <form{attributes}>
+ <table>
+ {content}
+ </table>
+ </form>
+</div>
--- /dev/null
+<table class="group">
+ <tbody>
+ {content}
+ </tbody>
+</table>
--- /dev/null
+<tr>
+ <td>
+ {element}
+ <!-- BEGIN required -->
+ <span class="req">*</span>
+ <!-- END required -->
+ {label}
+ </td>
+</tr>
--- /dev/null
+<tr class="hdr">
+ <td colspan="2">
+ {header}
+ </td>
+</tr>
--- /dev/null
+<span class="req">* = Required Fields</span>
--- /dev/null
+<h2>{gridName:h}</h2>
+<ul id="{tableId:h}" class="dataGrid">
+ {if:numberedSet}
+ {foreach:recordSet,row}
+ <li id="image_{row[id]}" class="ui-state-default">
+ <span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
+ {row[Image]:h}
+ <div class="info">
+ <div class="delete">{row[Delete]:h}</div>
+ <div class="edit">{row[Edit]:h}</div>
+ {if:row[url]}
+ <br>Link: <a href="{row[url]:h}">{row[url]:h}</a>
+ {end:}
+ </div>
+ </li>
+ {end:}
+ {else:}
+ <li class="ui-state-disabled ui-state-default">
+ Drag image here to add
+ </li>
+ {end:}
+</ul>
--- /dev/null
+<div id="instructions">
+<b>Instructions</b>
+<p>All images will be resized to correct size.</p>
+<p>If you want to resize the images yourself before uploading, use these dimensions:</p>
+<ul>
+<li>Width: {width} pixels</li>
+<li>Height: {height} pixels</li>
+</ul>
+</div>
+<h2>Slideshow Settings</h2>
--- /dev/null
+<style>
+.nivo-caption {
+ background: #369 !important;
+ background: rgba(51,102,153,0.8) !important;
+ }
+.nivo-caption span {
+ float: right;
+ }
+.nivo-controlNav {
+ display: block;
+ position: absolute;
+ z-index: 999;
+ top: -10px;
+ right: 10px;
+ }
+#slider-wrapper {
+ width: 100%;
+ height: auto;
+ position: relative;
+ }
+</style>
+{if:images}
+<div id="slider-wrapper" class="slider-wrapper theme-default">
+ <div class="ribbon"></div>
+ <div id="slider" class="nivoSlider">
+ {foreach:images,image}
+ {image.toHtml():h}
+ {end:}
+ </div>
+</div>
+<div flexy:foreach="images,image" id="event-{image.getId():h}" class="nivo-html-caption">
+ {if:image.getTitle()}<strong>{image.getTitle()}</strong>{end:}
+ {if:image.getDescr()}<span>{image.getDescr()}</span>{end:}
+</div>
+{end:}
--- /dev/null
+<?php
+
+/**
+ * Router.php
+ *
+ * PHP version 5
+ *
+ * The license text...
+ *
+ * @category Toolkit
+ * @package Router
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: Registry.php,v 1.2 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Toolkit_Router
+ *
+ * The registry is an object where site wide variables can be stored
+ * without the use of globals. By passing the registry object to
+ * the controllers that need them, we avoid pollution of the global
+ * namespace and render our variables safe.
+ *
+ * @category Toolkit
+ * @package Router
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_Router
+{
+ // {{{ properties
+
+
+ /**
+ * Description for $_registry
+ * @var string
+ * @access protected
+ */
+ private $_registry;
+
+ /**
+ * Description for $_path
+ * @var string
+ * @access protected
+ */
+ private $_path;
+
+ /**
+ * Description for $_application
+ * @var string
+ * @access protected
+ */
+ private $_application;
+
+ /**
+ * Will hold location of controller
+ * @var string
+ * @access protected
+ */
+ public $file;
+
+ /**
+ * Holds intended controller
+ * @var string
+ * @access protected
+ */
+ public $controller;
+
+ /**
+ * Holds intended action
+ * @var string
+ * @access protected
+ */
+ public $action;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * class constructor
+ *
+ * @param Toolkit_Registry $registry Registry
+ *
+ * @access public
+ */
+ public function __construct(Toolkit_Registry $registry)
+ {
+ $this->_registry = $registry;
+ }
+
+ // }}}
+
+ // {{{ _getController()
+
+ /**
+ * Gets controller and action.
+ *
+ * @access private
+ * @return void
+ */
+ private function _getController()
+ {
+ $this->controller = empty($_GET['rt']) ? 'Index' : $_GET['rt'];
+ $this->action = empty($_GET['ac']) ? 'index' : $_GET['ac'];
+
+ // all action methods must end in the word [Action] so we
+ // can easily spot them.
+ $this->action .= 'Action';
+
+ $this->file = $this->_path . '/' . $this->controller . 'Controller.php';
+ }
+
+ // }}}
+
+ // {{{ loader()
+
+ /**
+ * Loads toolkit application
+ *
+ * @return string
+ */
+ public function loader()
+ {
+ // Check the route
+ $this->_getController();
+
+ // If the file is not there, log error
+ if (is_readable($this->file) == false) {
+ $this->_registry
+ ->logger
+ ->emerg("File is not readable: `{$this->file}`");
+ }
+
+ $class = "Toolkit_{$this->_application}_{$this->controller}Controller";
+ $controller = new $class($this->_registry);
+
+ if (is_callable(array($controller, $this->action)) == false) {
+ $action = 'indexAction';
+ } else {
+ $action = $this->action;
+ }
+
+ return $controller->$action();
+ }
+
+ // }}}
+
+ // {{{ setApplication()
+
+ /**
+ * Set application
+ *
+ * @param string $application Application
+ *
+ * @return void
+ */
+ public function setApplication($application)
+ {
+ $this->_application = str_replace('/', '_', $application);
+ }
+
+ // }}}
+ // {{{ setPath()
+
+ /**
+ * Sets path
+ *
+ * @param string $path Path
+ *
+ * @throws RuntimeException
+ *
+ * @return void
+ */
+ public function setPath($path)
+ {
+ if (is_dir($path) == false) {
+ throw new RuntimeException(
+ "Invalid controller path: `$path`"
+ );
+ }
+
+ $this->_path = $path;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * ShortURL.php
+ *
+ * Integration of Toolbox with creation of ShortURL
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Toolkit_ShortURL
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_ShortURL
+ *
+ * Integration of Toolbox with creation of ShortURL
+ * the url rewrite happens with one line of code in .htaccess
+ * RewriteRule ^([A-Za-z0-9_-]*)$ index.php?page=$1 [L]
+ * index page checks for $_GET['page'] and then calls
+ * getShortUrlId to get the page's catid. If not found it
+ * defaults to HOME_ID
+ *
+ * @category Toolkit
+ * @package Toolkit_ShortURL
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version Release: @package_version@
+ * @link <>
+ */
+class Toolkit_ShortURL
+{
+ // {{{ Class Properties
+
+ /**
+ * Database handler
+ * @var PDO
+ * @access private
+ */
+ private $_dbh;
+
+ // }}}
+
+ // {{{ __construct()
+
+ /**
+ * __construct()
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return void
+ * @access public
+ */
+ function __construct(PDO $dbh)
+ {
+ $this->_dbh = $dbh;
+ }
+
+ // }}}
+ // {{{ getShortUrl()
+
+ /**
+ * getShortUrl()
+ *
+ * grab the shorturl from bus_category table
+ * else return false
+ *
+ * @param string $id bus_category id
+ *
+ * @return mixed ShortURL from bus_category
+ * @access public
+ */
+ function getShortUrl($id)
+ {
+ $sql = "
+ SELECT short_url
+ FROM pages
+ WHERE id = :id";
+ try {
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(":id", $id, PDO::PARAM_INT);
+ $stmt->execute();
+ return $stmt->fetchColumn();
+ } catch(PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+ // {{{ getShortUrlId()
+
+ /**
+ * getShortUrlId()
+ *
+ * grab the id from bus_category table
+ * else return false
+ *
+ * @param string $short_url bus_category short_url
+ *
+ * @return mixed catid for page or HOME_ID if not found
+ * @access public
+ */
+ function getShortUrlId($short_url)
+ {
+ $sql = "
+ SELECT id
+ FROM pages
+ WHERE short_url = :short_url";
+ try {
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(":short_url", $short_url, PDO::PARAM_STR);
+ $stmt->execute();
+ return $stmt->fetchColumn();
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return HOME_ID;
+ }
+
+ // }}}
+ // {{{ isValidUrlName()
+
+ /**
+ * check the short url nam eto make sure it doesn't match any file names in the root
+ *
+ * @param mixed $url requested short url name
+ *
+ * @access public
+ * @return string
+ */
+ public function isValidUrlName($url)
+ {
+ if (is_dir(BASE)) {
+ if (file_exists(BASE . $url)) {
+ return false;
+ }
+ if (file_exists(BASE . $url.'.php')) {
+ return false;
+ }
+ if (file_exists(BASE . $url.'.css')) {
+ return false;
+ }
+ if (file_exists(BASE . $url.'.html')) {
+ return false;
+ }
+ if (file_exists(BASE . $url.'.js')) {
+ return false;
+ }
+ return true;
+ } else {
+ throw new Exception('Main Web root dir define BASE not set');
+ }
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * SiteMap.php
+ *
+ * PHP versions 4 and 5
+ *
+ * @category Toolkit
+ * @package Toolkit_SiteMap
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: SiteMap.php,v 1.10 2010/06/08 20:39:20 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_SiteMap
+ *
+ * Generate a sitemap for the site
+ * need to remove members only pages and other pages you
+ * don't want viewed by public
+ *
+ * @category Toolkit
+ * @package Toolkit_SiteMap
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @link <>
+ */
+class Toolkit_SiteMap
+{
+ // {{{ Properties
+ /**
+ * Description of $beginLevel
+ * @var string
+ * @access public
+ */
+ var $beginLevel = "<ul>";
+
+ /**
+ * Description of $endLevel
+ * @var string
+ * @access public
+ */
+ var $endLevel = "</ul>";
+
+ /**
+ * Description of $beginItem
+ * @var string
+ * @access public
+ */
+ var $beginItem = "<li>";
+
+ /**
+ * Description of $endItem
+ * @var string
+ * @access public
+ */
+ var $endItem = "</li>";
+
+ /**
+ * Description of $wholeThread
+ * @var string
+ * @access public
+ */
+ var $wholeThread;
+
+ /**
+ * Description of $search
+ * @var string
+ * @access public
+ */
+ var $search = "";
+
+ /**
+ * Description of $pageGateway
+ * @var string
+ * @access public
+ */
+ var $pageGateway;
+
+ // }}}
+
+ /**
+ * Class constructor
+ *
+ * Creates object of siteMap
+ *
+ * @param string $pageGateway page gateway
+ */
+ public function __construct($pageGateway)
+ {
+ $this->pageGateway = $pageGateway;
+ }
+ // {{{ sortChilds()
+
+ /**
+ * sortChilds
+ *
+ * Sort by Parent
+ *
+ * @param array $threads Array
+ *
+ * @return array Return array
+ * @access public
+ */
+ function sortChilds($threads)
+ {
+ $childs = array();
+ while (list($var, $value) = each($threads)) {
+ $childs[$value['parent']][$value['id']] = $value;
+ }
+ return $childs;
+ }
+
+ // }}}
+
+ // {{{ convertToThread()
+
+ /**
+ * convertToThread
+ *
+ * outputs the array with the correct styles and code applied
+ *
+ * @param array $threads Thread array
+ * @param array $thread Start with thread[0] will work it way down
+ *
+ * @return wholeThread
+ * @access public
+ */
+ function convertToThread($threads, $thread)
+ {
+ static $level_counter = 1;
+
+ $this->wholeThread .= $this->beginLevel;
+ while (list($parent, $value) = each($thread)) {
+ $this->wholeThread .= $this->beginItem;
+ $page = Toolkit_Template_Page::getSeoUrl(
+ $this->pageGateway,
+ $value['id']
+ );
+ $this->wholeThread .= '<a href="'.$page.'">';
+ $this->wholeThread .= $value["category"]
+ . "</a>";
+ if ($threads[$parent]) {
+ ++$level_counter;
+ $this->convertToThread($threads, $threads[$parent]);
+ --$level_counter;
+ }
+ $this->wholeThread .= $this->endItem ."\n";
+ }
+ $this->wholeThread .= $this->endLevel;
+ return $this->wholeThread;
+ }
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * SiteMapXml.php
+ *
+ * PHP Version 5.2
+ *
+ * @category Toolkit
+ * @package Toolkit
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: $id$
+ * @link <>
+ */
+
+/**
+ * Toolkit_SiteMapXml
+ *
+ * Description of Toolkit_SiteMapXml
+ *
+ * @category Toolkit
+ * @package Toolkit
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+
+class Toolkit_SiteMapXml
+{
+ /**
+ * Database Connection
+ *
+ * @var PDO
+ * @access private
+ */
+ private $_dbh;
+
+ /**
+ * Class Constructor
+ *
+ * @param PDO $pdo Database Connection
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(PDO $pdo)
+ {
+ $this->_dbh = $pdo;
+ }
+
+ /**
+ * getMobileSitemap
+ *
+ * Call this function with no $sid.
+ *
+ * This function will recurse down the menu structure and
+ * return a full list of all menu data at all levels
+ *
+ * This is helpful for generating a sitemap or index
+ *
+ * @static var array $mids Member array
+ * @static var string $xml XML string
+ *
+ * @param int $sid Catid of the page
+ *
+ * @return string xml
+ * @access public
+ */
+ public function getXmlSitemap($sid = 0)
+ {
+
+ // Characters to be replaced in link text
+ $transdata = array('/' => '', ' ' => '-', '&' => '');
+
+ // Array to keep track of member's for whom we produced links
+ // This is used to prevent duplicate links to the same member
+ // records from different catids. It's static so that it is
+ // common to all instances of recursion.
+ static $mids = array();
+
+ // This is where the XML site map goes. It's also static so
+ // we don't have to pass map segments back from recursive calls.
+ static $xml = '';
+
+ // If this is the top level, add the beginning of the xml file
+ if ($sid == 0) {
+ $xml = '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n"
+ . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"'
+ . "\r\n"
+ . ' >' . "\r\n";
+ }
+
+ $qs = "
+ SELECT id, navigation_name as category, include_members
+ FROM pages
+ WHERE parent = :id";
+ if (defined('MEMBERS_CATEGORY') && MEMBERS_CATEGORY) {
+ $qs .= " AND parent != ".MEMBERS_CATEGORY."
+ AND id != ".MEMBERS_CATEGORY;
+ }
+ $qs .= " AND active = 't'
+ ORDER BY pos";
+ $stmt = $this->_dbh->prepare($qs);
+ $stmt->bindParam(
+ ':id',
+ $sid,
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+
+ while ($v = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $catid = $v['id'];
+ if ($catid > 0) {
+ // Add this menu item to the site map
+ $url
+ = ($catid == HOME_ID)
+ ? MEDIA_BASE_URL
+ : MEDIA_BASE_URL . strtr($v['category'], $transdata) . '-'
+ . $catid . '/';
+ $xml .= '<url><loc>' . $url . "</loc></url>\r\n";
+ // Get members for this catid
+ if (MEMBERS_DB == 1 && $v['include_members']) {
+ // now check to see if the page has member
+ // categories assigned to it
+ $qs = "
+ SELECT *
+ FROM member_categories2toolbox_pages
+ WHERE page = {$catid}";
+ $mc2tpData
+ = $this->_dbh->query($qs)
+ ->fetchAll(PDO::FETCH_ASSOC);
+ if ($mc2tpData) {
+ foreach ($mc2tpData as $mc2tp) {
+ $mc2tpCat[] = $mc2tp['category'];
+ }
+ if (is_array($mc2tpCat) && !empty($mc2tpCat)) {
+ $where = " WHERE member_id IN (
+ SELECT member_id
+ FROM member_category
+ WHERE category_id IN ("
+ . implode(",", $mc2tpCat) . ")) ";
+ }
+ }
+ $qs = "
+ SELECT member_id,member_name
+ FROM member
+ $where";
+ $members = $this->_dbh
+ ->query($qs)
+ ->fetchAll(PDO::FETCH_ASSOC);
+ } //IF MEMBERS_DB
+ // If there are any
+ if ($members && count($members) > 0) {
+ // Include an entry for each member on this page
+ foreach ($members as $memb) {
+
+ // Check to make sure we have a member # and
+ // that we haven't already provided some
+ // link to this member
+ $member = ($memb['member_id'] - 0);
+ if ($member > 0 && !isset($mids[$member])) {
+
+ // Add this member to the site map
+ $murl = MEDIA_BASE_URL . 'member-profile/'.$catid
+ . '/' . $member . '/';
+ $xml .= '<url><loc>' . $murl
+ . "</loc></url>\r\n";
+ // Add this member to the member id array so we
+ // don't display them again.
+ $mids[$member] = true;
+ }
+ }
+ } // if members
+ $this->getXmlSitemap($catid);
+ } // if catid
+ } // if menu results
+ // If this is the top level, add the end of the XML file and be done
+ if ($sid == 0) {
+ $xml .= "</urlset>\r\n";
+ return $xml;
+ }
+ }
+
+}
\ No newline at end of file
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * Creates a sortform to be used w/ datagrid DataGrids
+ *
+ * PHP version 5
+ *
+ * @category HTML
+ * @package Toolkit_SortForm
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: SortForm.php,v 1.6 2010/01/18 02:09:05 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Creates a sortform to be used w/ datagrid DataGrids
+ *
+ * @category HTML
+ * @package Toolkit_SortForm
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2008 Gaslight Media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_SortForm extends Toolkit_FormBuilder
+{
+ // {{{ properties
+
+ /**
+ * The default rules to register for validating
+ *
+ * @var string
+ * @access protected
+ */
+ protected $registeredRules = array();
+
+ // }}}
+ // {{{ toHTML()
+
+ /**
+ * Render the form to a string
+ *
+ * Handle the rendering and validation of the form when displayed
+ * and submitted.
+ *
+ * @return string html form
+ * @access public
+ */
+ public function toHTML()
+ {
+ $this->setupRenderers();
+ if ($this->validate()) {
+ $output = parent::toHTML();
+ } else if ($this->isSubmitted()) {
+ $output = $this->errorMsg;
+ $output .= parent::toHTML();
+ } else {
+ $output = parent::toHTML();
+ }
+ return $output;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * Table.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Table
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+
+/**
+ * Abstract class for aiding creation of class objects which relate to
+ * Database tables
+ *
+ * @category Toolkit
+ * @package Table
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+abstract class Toolkit_Table
+ implements Toolkit_ITable, Toolkit_IMapper
+{
+ /**
+ * Description for $tableName
+ * @var string
+ * @access protected
+ */
+ protected $tableName;
+
+ /**
+ * Helps to create functions for any class variable if the variable does
+ * exists
+ *
+ * @param String $name Name of variable
+ * @param mixed $args Argument for the varable (if set)
+ *
+ * @return Toolkit_Table
+ */
+ public function __call($name, $args)
+ {
+ if ( preg_match('/^(get|set)(\w+)/', strtolower($name), $match)
+ && $attribute = $this->validateAttribute($match[2])
+ ) {
+ if ('get' == $match[1]) {
+ return $this->$attribute;
+ } else {
+ $this->$attribute = trim($args[0]);
+ return $this;
+ }
+ } else {
+ throw new Exception(
+ 'Call to undefined method '. get_class($this).'::' . $name
+ );
+ }
+ }
+
+ /**
+ * Create a class object that has the given values from an array
+ *
+ * @param Array $values Array of values to set the class properties to
+ *
+ * @return Object
+ * @access public
+ */
+ public function createByValues($values)
+ {
+ $classVars = get_object_vars($this);
+ unset($classVars['tableName']);
+ foreach ($classVars as $fieldName => $var) {
+ if ($fieldName == 'id' && $values[$fieldName] == '') {
+ continue;
+ }
+ $setter = 'set' . ucfirst($fieldName);
+ $this->$setter($values[$fieldName]);
+ }
+ return $this;
+ }
+
+ /**
+ * Removes a object from the database by the id
+ * if id is not set then it throws an error
+ *
+ * @param PDO $dbh Database Connection
+ *
+ * @return void
+ * @throws Exception
+ * @access public
+ */
+ public function delete(PDO $dbh)
+ {
+ if (!$this->id) {
+ throw new Exception('id is not set');
+ }
+ try {
+ $sql = "
+ DELETE
+ FROM {$this->tableName}
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $this->getId(), PDO::PARAM_INT);
+ $stmt->execute();
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ /**
+ * fetch from $this->tableName by id
+ *
+ * @param PDO $dbh Database Connection
+ * @param integer $id id to fetch with
+ *
+ * @return null|object
+ * @access public
+ */
+ public function fetchById(PDO $dbh, $id)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM {$this->tableName}
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+ $values = $stmt->fetch(PDO::FETCH_ASSOC);
+ if ($values) {
+ return $this->createByValues($values);
+ } else {
+ return null;
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ /**
+ * Return the object as an array
+ *
+ * @return Array
+ * @access public
+ */
+ public function getPropertiesAsArray()
+ {
+ $classVars = get_object_vars($this);
+ unset($classVars['tableName']);
+ return $classVars;
+ }
+
+ /**
+ * Return the table metadata
+ *
+ * @param PDO $dbh Database Connection
+ * @param string $tableName Table name
+ *
+ * @return array
+ * @access public
+ */
+ public function getTableMetaData(PDO $dbh, $tableName = null)
+ {
+ try {
+ $sql = "
+ SELECT column_name, data_type
+ FROM information_schema.columns
+ WHERE table_name = :tname";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':tname', $tableName, PDO::PARAM_STR);
+ $stmt->execute();
+
+ $metaData = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $metaData[$row['column_name']] = $row['data_type'];
+ }
+
+ return $metaData;
+ } catch (PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ /**
+ * insert the object
+ *
+ * @param PDO $dbh Database Connection
+ *
+ * @return Toolkit_Table
+ * @access public
+ */
+ public function insert(PDO $dbh)
+ {
+
+ try {
+ $values = get_object_vars($this);
+ unset($values['id'], $values['tableName']);
+ $sql = Toolkit_Common::createSQLInsert(
+ $this->tableName,
+ array_keys($values)
+ );
+ $sql .= ' RETURNING id';
+ $stmt = Toolkit_Common::prepareQuery(
+ $dbh,
+ $this->tableName,
+ $sql,
+ $values
+ );
+ $stmt->execute();
+ $this->setId($stmt->fetchColumn());
+ return $this;
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ /**
+ * Checks the id of the object if it is set then calls update othervise
+ * calls insert function
+ *
+ * @param PDO $dbh Database connection
+ *
+ * @return void
+ * @access public
+ */
+ public function save(PDO $dbh)
+ {
+ if ($this->id) {
+ $this->update($dbh);
+ } else {
+ $this->insert($dbh);
+ }
+ }
+
+ /**
+ * sets the id of object
+ *
+ * @param Int $id set the id of object if not numeric throw Exception
+ *
+ * @return Toolkit_Table
+ * @access public
+ */
+ public function setId($id)
+ {
+ if (!is_numeric($id)) {
+ throw new Exception('id must be an integer');
+ }
+ if (!$this->id) {
+ $this->id = $id;
+ }
+ return $this;
+ }
+
+ /**
+ * update the object
+ *
+ * @param PDO $dbh Database connection
+ *
+ * @return Toolkit_Table
+ * @access public
+ */
+ public function update(PDO $dbh)
+ {
+ try {
+ $values = get_object_vars($this);
+ unset($values['tableName']);
+ $sql = Toolkit_Common::createSQLUpdate(
+ $this->tableName,
+ array_keys($values),
+ array('id = :id')
+ );
+ $stmt = Toolkit_Common::prepareQuery(
+ $dbh,
+ $this->tableName,
+ $sql,
+ $values
+ );
+ $stmt->execute();
+ return $this;
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ /**
+ * Validates the property
+ *
+ * @param String $name property name
+ *
+ * @return String
+ * @access public
+ */
+ protected function validateAttribute($name)
+ {
+ if (property_exists(get_class($this), $name)) {
+ return strtolower($name);
+ }
+ }
+}
--- /dev/null
+<?php
+/**
+ * BreadCrumbs.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+
+/**
+ * Toolkit_Template_BreadCrumbs
+ *
+ * Description of Toolkit_Template_BreadCrumbs
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_BreadCrumbs
+{
+ // {{{ properties
+
+ /**
+ * Description for $pageGateway
+ * @var Toolkit_Toolbox_PageGatewayAbstract $gateway
+ * @access protected
+ */
+ protected $pageGateway;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param Toolkit_Toolbox_PageGatewayAbstract $gateway Gateway
+ * @access public
+ */
+ public function __construct(Toolkit_Toolbox_PageGatewayAbstract $gateway)
+ {
+ $this->pageGateway = $gateway;
+ }
+
+ // }}}
+ // {{{ getBreadCrumbsArray()
+
+ /**
+ * Gets bread crumbs array
+ *
+ * @param int $id ID
+ *
+ * @return array
+ * @throws RuntimeException
+ * @access protected
+ */
+ protected function getBreadCrumbsArray($id)
+ {
+ $stack = array();
+
+ $hasPhotoGalleriesOnThisPage
+ = ( defined('PHOTO_GALLERY')
+ && PHOTO_GALLERY
+ && filter_var($_GET['photo_catid'], FILTER_VALIDATE_INT)
+ );
+
+ if ($hasPhotoGalleriesOnThisPage) {
+ if (!$catid = filter_var($_GET['catid'], FILTER_VALIDATE_INT)) {
+ throw new RuntimeException('Invalid catid');
+ }
+ if (!$photoCatid = filter_var($_GET['photo_catid'], FILTER_VALIDATE_INT)) {
+ throw new RuntimeException('Invalid photo_catid');
+ }
+ $page = $this->pageGateway->findNavItem($catid);
+ array_unshift($stack, $page['photo_galleries'][$_GET['photo_catid']]);
+ $seoUrl = Toolkit_Template_Page::getSeoUrl(
+ $this->pageGateway,
+ $_GET['catid']
+ );
+ $anchor = '<a href="'.$seoUrl.'">'.$page['navigation_name'].'</a>';
+ array_unshift($stack, $anchor);
+ }
+ $hasCommonEvents = (defined('COMMON_EVENTS') && COMMON_EVENTS);
+
+ if ($id != HOME_ID) {
+ if ( defined('EVENT_DB')
+ && EVENT_DB && !$hasCommonEvents
+ && $eventId = filter_var($_REQUEST['eventid'], FILTER_VALIDATE_INT)
+ ) {
+ try {
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ SELECT header
+ FROM event
+ WHERE id = :eventid";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(
+ ':eventid',
+ $eventId,
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+ $eventHeader = $stmt->fetchColumn();
+ if ($eventHeader) {
+ array_unshift($stack, $eventHeader);
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+ if ( defined('EVENT_DB')
+ && EVENT_DB && !$hasCommonEvents
+ && $categoryId = filter_var($_REQUEST['category'], FILTER_VALIDATE_INT)
+ ) {
+ try {
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ SELECT descr
+ FROM topic
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(
+ ':id',
+ $categoryId,
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+ $topicHeader = $stmt->fetchColumn();
+ if ($topicHeader) {
+ array_unshift($stack, $topicHeader);
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+ $page = $this->pageGateway->findNavItem($id);
+ $isSearch = filter_var($_REQUEST['search'], FILTER_VALIDATE_INT);
+ if ($isSearch && !$eventHeader && !$topicHeader && !$hasCommonEvents) {
+ array_unshift($stack, 'Events Search');
+ }
+ $isShortcut = filter_var($_REQUEST['t'], FILTER_SANITIZE_STRING);
+ if ($isShortcut && !$eventHeader && !$topicHeader && !$hasCommonEvents) {
+ if ($isShortcut == "today") {
+ array_unshift($stack, 'Today');
+ } else if ($isShortcut == "tomorrow") {
+ array_unshift($stack, 'Tomorrow');
+ } else if ($isShortcut == "next") {
+ array_unshift($stack, 'Next 7 Days');
+ }
+ }
+ if ($hasPhotoGalleriesOnThisPage) {
+ // Do Nothing
+ } else if (($eventHeader || $topicHeader || $isSearch || $isShortcut)
+ && !$hasCommonEvents
+ ) {
+ $seoUrl = Toolkit_Template_Page::getSeoUrl(
+ $this->pageGateway,
+ $id
+ );
+ $anchor = '<a href="'.$seoUrl.'">'.$page['navigation_name'].'</a>';
+ array_unshift($stack, $anchor);
+ } else {
+ array_unshift($stack, $page['navigation_name']);
+ }
+ $parent = $page['parent'];
+ while ($parent != 0) {
+ $page = $this->pageGateway->findNavItem($parent);
+ $seoUrl = Toolkit_Template_Page::getSeoUrl(
+ $this->pageGateway,
+ $parent
+ );
+ $anchor = '<a href="'.$seoUrl.'">'.$page['navigation_name'].'</a>';
+ array_unshift($stack, $anchor);
+ $parent = $page['parent'];
+ }
+
+ $anchor = '<a href="' . BASE_URL . 'index.php">Home</a>';
+ array_unshift($stack, $anchor);
+ }
+
+ return $stack;
+ }
+
+ // }}}
+ // {{{ toHtml()
+
+ /**
+ * to html
+ *
+ * @param int $id ID
+ *
+ * @return string
+ * @access public
+ */
+ public function toHtml($id)
+ {
+ $breadCrumbsArray = $this->getBreadCrumbsArray($id);
+ $breadCrumbs = implode(' > ', $breadCrumbsArray);
+
+ return !empty($breadCrumbsArray)
+ ? '<div id="breadcrumbs" class="opensearchserver.ignore">' . $breadCrumbs . '</div>'
+ : '';
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * Exception.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+
+/**
+ * Toolkit_Template_DraftBreadCrumbs
+ *
+ * Description of Toolkit_Template_DraftBreadCrumbs
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_DraftBreadCrumbs
+ extends Toolkit_Template_BreadCrumbs
+{
+ // {{{ properties
+
+ /**
+ * Description for $pageGatewayPublish
+ * @var Toolkit_Toolbox_PageGatewayAbstract
+ * @access protected
+ */
+ protected $pageGatewayPublish;
+
+ /**
+ * Description for $pageGatewayDraft
+ * @var Toolkit_Toolbox_PageGatewayAbstract
+ * @access protected
+ */
+ protected $pageGatewayDraft;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param Toolkit_Toolbox_PageGatewayAbstract $publishGateway
+ * @param Toolkit_Toolbox_PageGatewayAbstract $draftGateway
+ *
+ * @access public
+ */
+ public function __construct(
+ Toolkit_Toolbox_PageGatewayAbstract $publishGateway,
+ Toolkit_Toolbox_PageGatewayAbstract $draftGateway
+ ) {
+ $this->pageGatewayPublish = $publishGateway;
+ $this->pageGatewayDraft = $draftGateway;
+ }
+
+ // }}}
+ // {{{ getBreadCrumbsArray()
+
+ /**
+ * Gets BreadCrumbs Array
+ *
+ * @param int $id
+ *
+ * @return array
+ * @access protected
+ */
+ protected function getBreadCrumbsArray($id)
+ {
+ if ($id == HOME_ID) {
+ return array();
+ }
+
+ $stack = array();
+ $draftPage = $this->pageGatewayDraft->find($id);
+ array_unshift($stack, $draftPage['navigation_name']);
+
+ $publishPage = $this->pageGatewayPublish->find($draftPage['published_page']);
+ $parent = $publishPage['parent'];
+ while ($parent != 0) {
+ $page = $this->pageGatewayPublish->find($parent);
+ $seoUrl = Toolkit_Template_Page::getSeoUrl(
+ $this->pageGatewayPublish,
+ $parent
+ );
+ $anchor = '<a href="'.$seoUrl.'">'.$page['navigation_name'].'</a>';
+ array_unshift($stack, $anchor);
+ $parent = $page['parent'];
+ }
+
+ $anchor = '<a href="' . BASE_URL . 'index.php">Home</a>';
+ array_unshift($stack, $anchor);
+
+ return $stack;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * DraftController.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_DraftController
+ *
+ * Description of Toolkit_Template_DraftController
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_DraftController
+ extends Toolkit_Template_PageControllerAbstract
+{
+ /**
+ * Description of $_pageGatewayFactory
+ *
+ * @var Toolkit_Toolbox_PageGatewayDraftFactory
+ * @access private
+ */
+ private $_pageGatewayFactory;
+
+ /**
+ * Description of $_paragraphGatewayFactory
+ *
+ * @var Toolkit_Toolbox_ParagraphGatewayDraftFactory
+ * @access private
+ */
+ private $_paragraphGatewayFactory;
+
+ /**
+ * Description of getPageGatewayFactory
+ *
+ * @return Toolkit_Toolbox_PageGatewayDraftFactory
+ * @access protected
+ */
+ protected function getPageGatewayFactory()
+ {
+ if (!($this->_pageGatewayFactory instanceof Toolkit_Toolbox_PageGatewayDraftFactory)) {
+ $this->_pageGatewayFactory = new Toolkit_Toolbox_PageGatewayDraftFactory(
+ $this->registry->dbh
+ );
+ }
+
+ return $this->_pageGatewayFactory;
+ }
+
+ /**
+ * Description of getParagraphGatewayFactory
+ *
+ * @return Toolkit_Toolbox_ParagraphGatewayDraftFactory
+ * @access protected
+ */
+ protected function getParagraphGatewayFactory()
+ {
+ if (!($this->_paragraphGatewayFactory instanceof Toolkit_Toolbox_ParagraphGatewayDraftFactory)) {
+ $this->_paragraphGatewayFactory = new Toolkit_Toolbox_ParagraphGatewayDraftFactory(
+ $this->registry->dbh
+ );
+ }
+
+ return $this->_paragraphGatewayFactory;
+ }
+}
+?>
--- /dev/null
+<?php
+/**
+ * Exception.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+
+/**
+ * Toolkit_Template_Exception
+ *
+ * Description of Toolkit_Template_Exception
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Exception extends Exception {}
+?>
--- /dev/null
+<?php
+/**
+ * Factory.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Image
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Image_Factory
+ *
+ * Description of Toolkit_Template_Image_Factory
+ *
+ * @category Toolkit
+ * @package Template/Image
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Image_Factory
+{
+ // {{{ properties
+
+ /**
+ * Description of $_imageServerAdapter
+ *
+ * @var string
+ * @access private
+ */
+ private $_imageServerAdapter;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param Toolkit_FileServer_ImageAdapter $adapter Adapter
+ *
+ * @access public
+ */
+ public function __construct(Toolkit_FileServer_ImageAdapter $adapter)
+ {
+ $this->_imageServerAdapter = $adapter;
+ }
+
+ // }}}
+ // {{{ getImageBuilder()
+
+ /**
+ * Get image builder
+ *
+ * @param array $data data
+ * @param string $side Side image is on
+ *
+ * @access public
+ * @return \Toolkit_Template_Image_Left|\Toolkit_Template_Image_Right|\Toolkit_Template_Image_Null
+ */
+ public function getImageBuilder(array $data, $side)
+ {
+ if (isset($data['image']) && !empty($data['image'])) {
+ if ($side == 'left') {
+ return new Toolkit_Template_Image_Left(
+ $this->_imageServerAdapter,
+ $data['image'],
+ $data['caption']
+ );
+ } else {
+ return new Toolkit_Template_Image_Right(
+ $this->_imageServerAdapter,
+ $data['image'],
+ $data['caption']
+ );
+ }
+ } else {
+ return new Toolkit_Template_Image_Null();
+ }
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * Page Image Element
+ *
+ * PHP version 5
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: ImageAbstract.php,v 1.1 2010/07/22 19:59:01 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Page Image Element
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+abstract class Toolkit_Template_Image_ImageAbstract
+{
+ // {{{ properties
+
+ /**
+ * Description for $_adapter
+ *
+ * @var string
+ * @access protected
+ */
+ protected $_adapter;
+
+ /**
+ * Description for $_caption
+ *
+ * @var string
+ * @access protected
+ */
+ protected $_caption;
+
+ /**
+ * Description for $_src
+ *
+ * @var string
+ * @access protected
+ */
+ protected $_src;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Constructor
+ *
+ * Sets elements attributes
+ *
+ * @param Toolkit_FileServer_ImageAdapter $adapter File server adapter
+ * @param string $src src attribute value
+ * @param string $caption caption
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(
+ Toolkit_FileServer_ImageAdapter $adapter,
+ $src,
+ $caption
+ ) {
+ if (empty($src)) {
+ throw new InvalidArgumentException('$src cannot be empty');
+ }
+
+ $this->_adapter = $adapter;
+ $this->_caption = $caption;
+ $this->_src = $src;
+ }
+
+ // }}}
+
+ // {{{ getImage()
+
+ /**
+ * Get image
+ *
+ * @param int $size Size
+ *
+ * @return string
+ * @access public
+ */
+ public function getImage($size)
+ {
+ $format = '<img src="%s" title="%s" alt="%s">';
+ $img = sprintf(
+ $format,
+ $size . $this->_src,
+ $this->_caption,
+ $this->_src
+ );
+
+ return $img;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * Page Image
+ *
+ * PHP version 5
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: Left.php,v 1.1 2010/07/22 19:59:02 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Page Image
+ *
+ * Returns a left side image
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_Template_Image_Left extends Toolkit_Template_Image_ImageAbstract
+{
+ // {{{ getImage()
+
+ /**
+ * Gets the image markup
+ *
+ * @param string $size constant path to image size
+ *
+ * @return string Html image element
+ * @access public
+ */
+ public function getImage($size)
+ {
+ $imageData = $this->_adapter->getImageSize($size . $this->_src);
+
+ $html = '<div class="imageleft" style="width: ' . $imageData[0] . 'px;">';
+ $html .= parent::getImage($size);
+ if (!empty($this->_caption)) {
+ $html .= '<div class="imagecaption">';
+ $html .= $this->_caption;
+ $html .= '</div>';
+ }
+ $html .= '</div>';
+
+ return $html;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * Coupon Image Element
+ *
+ * PHP version 5
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: Null.php,v 1.1 2010/07/22 19:59:02 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Coupon Image Element
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_Template_Image_Null
+{
+ /**
+ * Class construct
+ */
+ public function __construct()
+ {
+
+ }
+
+ // {{{ getImage()
+
+ /**
+ * Get nothing for the image
+ *
+ * @param int $size Size of image
+ *
+ * @return string empty html string;
+ * @access public
+ */
+ public function getImage($size)
+ {
+ return;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * Page Image
+ *
+ * PHP version 5
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: Right.php,v 1.1 2010/07/22 19:59:02 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Page Image
+ *
+ * Returns a right side image
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_Template_Image_Right extends Toolkit_Template_Image_ImageAbstract
+{
+ // {{{ getImage()
+
+ /**
+ * Gets the image markup
+ *
+ * @param string $size constant path to image size
+ *
+ * @return string Html image element
+ * @access public
+ */
+ public function getImage($size)
+ {
+ $imageData = $this->_adapter->getImageSize($size . $this->_src);
+
+ $html = '<div class="imageright" style="width: ' . $imageData[0] . 'px;">';
+ $html .= parent::getImage($size);
+ if (!empty($this->_caption)) {
+ $html .= '<div class="imagecaption">';
+ $html .= $this->_caption;
+ $html .= '</div>';
+ }
+ $html .= '</div>';
+
+ return $html;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * IndexController.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_IndexController
+ *
+ * Description of Toolkit_Template_IndexController
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_IndexController
+ extends Toolkit_Template_PageControllerAbstract
+{
+ /**
+ * Description for $_pageGatewayFactory
+ *
+ * @var Toolkit_Toolbox_PageGatewayPublishFactory
+ * @access private
+ */
+ private $_pageGatewayFactory;
+
+ /**
+ * Description for $_paragraphGatewayFactory
+ *
+ * @var Toolkit_Toolbox_PageGatewayPublishFactory
+ * @access private
+ */
+ private $_paragraphGatewayFactory;
+
+ /**
+ * description of paragraphGatewayFactory
+ *
+ * @return Toolkit_Toolbox_ParagraphGatewayPublishFactory
+ * @access protected
+ */
+ protected function getPageGatewayFactory()
+ {
+ if (!($this->_pageGatewayFactory instanceof Toolkit_Toolbox_PageGatewayPublishFactory)) {
+ $this->_pageGatewayFactory = new Toolkit_Toolbox_PageGatewayPublishFactory(
+ $this->registry->dbh
+ );
+ }
+
+ return $this->_pageGatewayFactory;
+ }
+
+ /**
+ * description of getParagraphGatewayFactory
+ *
+ * @return Toolkit_Toolbox_ParagraphGatewayPublishFactory
+ * @access protected
+ */
+ protected function getParagraphGatewayFactory()
+ {
+ if (!($this->_paragraphGatewayFactory instanceof Toolkit_Toolbox_ParagraphGatewayPublishFactory)) {
+ $this->_paragraphGatewayFactory = new Toolkit_Toolbox_ParagraphGatewayPublishFactory(
+ $this->registry->dbh
+ );
+ }
+
+ return $this->_paragraphGatewayFactory;
+ }
+}
+?>
--- /dev/null
+<?php
+/**
+ * KeywordReplacement.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_KeywordReplacement
+ *
+ * Description of Toolkit_Template_KeywordReplacement
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_KeywordReplacement
+{
+ /**
+ * Description for $_pageGateway
+ * @var Toolkit_Toolbox_GatewayAbstract
+ * @access private
+ */
+ private $_pageGateway;
+
+ /**
+ * Class constructor
+ *
+ * @param Toolkit_Toolbox_GatewayAbstract $gateway Gateway
+ *
+ * @access public
+ */
+ public function __construct(Toolkit_Toolbox_GatewayAbstract $gateway)
+ {
+ $this->_pageGateway = $gateway;
+ }
+
+ /**
+ * Description for findAndReplace()
+ *
+ * @param string $haystack Haystack
+ *
+ * @return string
+ * @access public
+ */
+ public function findAndReplace($haystack)
+ {
+ if (strstr($haystack, '{') !== false) {
+ $pattern = '/\{([A-Z0-9\&\-\,\'\" ]*)\}/i';
+ if (preg_match($pattern, $haystack, $needle) != 0) {
+ $page = $this->_pageGateway->findByKeyword($needle[1]);
+ if ($page == false) {
+ return $haystack;
+ } else {
+ $seoUrl = Toolkit_Template_Page::getSeoUrl(
+ $this->_pageGateway,
+ $page['id']
+ );
+ $anchor = '<a href="'.$seoUrl.'">'.$page['navigation_name'].'</a>';
+ $haystack = str_replace($needle[0], $anchor, $haystack);
+ }
+ } else {
+ return $haystack;
+ }
+
+ if (strstr($haystack, '{') !== false) {
+ return $this->findAndReplace($haystack);
+ }
+ }
+
+ return $haystack;
+ }
+}
+?>
--- /dev/null
+<?php
+
+/**
+ * AllInOneSideNav.php
+ *
+ * PHP version 5.3
+ *
+ * @category Toolkit
+ * @package Package
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version SVN: (0.1)
+ * @link <>
+ */
+
+/**
+ * Toolkit_Package_AllInOneSideNav
+ *
+ * Description of AllInOneSideNav
+ *
+ * @category Toolkit
+ * @package Package
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: (0.1)
+ * @link <>
+ */
+class Toolkit_Template_Navigation_AllInOneSideNav
+{
+ private $_parents = array();
+ private $_navArray = array();
+ private $_gateway;
+ private $_pageId;
+
+ public function __construct(
+ Toolkit_Toolbox_GatewayAbstract $gateway
+ ) {
+ $this->_gateway = $gateway;
+ $id = filter_var($_REQUEST['catid'], FILTER_VALIDATE_INT);
+ $this->_pageId = $id;
+ if (!$id) {
+ $id = HOME_ID;
+ }
+ $this->_parents = $this->_getParentIds($id);
+ }
+
+ public function getNavigation()
+ {
+ return $this->setNavArray(0);
+ }
+
+ public function setNavArray($id)
+ {
+ try {
+ $navArray = array();
+ $dbh = Toolkit_Database::getInstance();
+ $pages = (defined('ALL_IN_ONE_INCLUDED')
+ && ALL_IN_ONE_INCLUDED)
+ ? unserialize(ALL_IN_ONE_INCLUDED)
+ : null;
+ $includedPages = (!empty($pages))
+ ? "AND (parent != 0 OR id IN (".implode(',', $pages)."))"
+ : '';
+ $memberPages = (defined('MEMBERS_DB') && MEMBERS_DB)
+ ? "AND id NOT IN (".MEMBERS_CATEGORY.")"
+ : '';
+ $sql = "
+ SELECT id,parent,navigation_name
+ FROM pages
+ WHERE parent = :id
+ AND active = true
+ $includedPages
+ $memberPages
+ ORDER BY parent,pos"; // AND id != ".MEMBERS_CATEGORY."
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+ while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ if ($row['id'] == $this->_pageId) {
+ $class = 'current';
+ } else if (in_array($row['id'], $this->_parents)) {
+ $class = 'parent';
+ } else {
+ $class = '';
+ }
+ $navArray[] = array(
+ 'id' => $row['id'],
+ 'parent' => $row['parent'],
+ 'label' => $row['navigation_name'],
+ 'uri' => Toolkit_Template_Page::getSeoUrl(
+ $this->_gateway, $row['id']
+ ),
+ 'class' => $class,
+ 'pages' => $this->setNavArray($row['id'])
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return $navArray;
+ }
+
+ private function _getParentIds($id)
+ {
+ try {
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ SELECT parent
+ FROM pages
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+ $parent = $stmt->fetchColumn();
+ $this->_parents[] = $parent;
+ if ($parent == 0) {
+ return $this->_parents;
+ } else {
+ return $this->_getParentIds($parent);
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+}
+
--- /dev/null
+<?php
+/**
+ * Factory.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Navigation
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Navigation_Factory
+ *
+ * Description of Toolkit_Template_Navigation_Factory
+ *
+ * @category Toolkit
+ * @package Template/Navigation
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Navigation_Factory
+ extends Toolkit_NavigationFactoryAbstract
+{
+ /**
+ * Description for $_gateway
+ *
+ * @var Toolkit_Toolbox_PageGatewayAbstract
+ * @access private
+ */
+ private $_gateway;
+
+ /**
+ * Sets gateway
+ *
+ * @param Toolkit_Toolbox_PageGatewayAbstract $gateway Gateway
+ *
+ * @access public
+ * @return void
+ */
+ public function setGateway(Toolkit_Toolbox_PageGatewayAbstract $gateway)
+ {
+ $this->_gateway = $gateway;
+ }
+
+ /**
+ * NOTE: You have different renderers that you can choose for the main
+ * navigation.
+ * Toolkit/Template/Navigation/SideNavigation.php
+ *
+ * Renderers: all renderers use HTML_Menu which renders ul li
+ * DirectTreeLastLi = with id in the last li element
+ * DirectTreeUlId = with id in the main ul element
+ * DirectTreeLiId = with id on the current li element
+ * DirectTreeSideNavTitle = adds the page title above sidenav
+ *
+ * @param Toolkit_Toolbox_PageGatewayAbstract $gateway Gateway
+ *
+ * @access public
+ * @return Toolkit_Template_Navigation_SideNavigation
+ */
+ public function createSideNav(
+ Toolkit_Toolbox_PageGatewayAbstract $gateway = null
+ ) {
+ return new Toolkit_Template_Navigation_SideNavigation(
+ new HTML_Menu(),
+ new Toolkit_Template_Navigation_Renderer_DirectTreeSideNavTitle($this->_gateway)
+ );
+ }
+
+ /**
+ * New main nav added can use
+ * Toolkit_Template_Navigation_MainNavigationAllInOne
+ * Which will create a side nav that includes all main level pages
+ *
+ * NOTE: You have different renderers that you can choose for the main
+ * navigation. And you can choose from a static or dynamic setup.
+ * 1) for Dynamic setup use
+ * Toolkit_Template_Navigation_MainNavigationDynamic
+ * 2) to edit the static one edit the file
+ * Toolkit/Template/Navigation/MainNavigationStatic.php
+ * 3) with either of these navigation objects you can use a different
+ * renderer.
+ *
+ * Renderers: all renderers use HTML_Menu which renders ul li
+ * DirectTreeLastLi = with id in the last li element
+ * DirectTreeUlId = with id in the main ul element
+ * DirectTreeLiId = with id on the current li element
+ *
+ * @access public
+ * @return Toolkit_Template_Navigation_MainNavigationDynamic
+ */
+ public function createMainNav()
+ {
+ return new Toolkit_Template_Navigation_MainNavigationDynamic(
+ new HTML_Menu(),
+ /**
+ * new Toolkit_Template_Navigation_Renderer_DirectTreeLiId(
+ * $this->_gateway,
+ * 'current'
+ * )
+ */
+ new Toolkit_Template_Navigation_Renderer_DirectTreeLastLi(
+ 'lastli'
+ )
+ );
+ }
+}
+?>
--- /dev/null
+<?php
+/**
+ * MainNavigationAbstract.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Navigation
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Navigation_MainNavigationAbstract
+ *
+ * Description of Toolkit_Template_Navigation_MainNavigationAbstract
+ *
+ * @category Toolkit
+ * @package Template/Navigation
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+abstract class Toolkit_Template_Navigation_MainNavigationAbstract
+ extends Toolkit_NavigationAbstract implements Toolkit_INavigation
+{
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param HTML_Menu $menu
+ * @param HTML_Menu_Renderer $rEngine
+ *
+ * @access public
+ */
+ public function __construct(
+ HTML_Menu $menu,
+ HTML_Menu_Renderer $rEngine
+ ) {
+ $this->menu = $menu;
+ $this->rEngine = $rEngine;
+ }
+
+ // }}}
+ // {{{ setNavTemplates()
+
+ /**
+ * Set nav templates
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setNavTemplates()
+ {
+ $tpl = '<a href="%s" %s>{Title}</a>';
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_INACTIVE,
+ sprintf($tpl, '{url}', '', '{Title}')
+ );
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_ACTIVE,
+ sprintf($tpl, '{url}', 'id="current"', '{Title}')
+ );
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_ACTIVEPATH,
+ sprintf($tpl, '{url}', '', '{Title}')
+ );
+ }
+
+ // }}}
+ // {{{ setCurrentIndex()
+
+ /**
+ * Set current index
+ *
+ * @access protected
+ * @return void
+ */
+ protected function setCurrentIndex()
+ {
+ $this->menu->forceCurrentIndex($_GET['catid']);
+ }
+
+ // }}}
+ // {{{ getNavSructure()
+
+ /**
+ * Create a static array of nav items to use
+ *
+ * @return array navigational array hash
+ * @access public
+ */
+ public function getNavStructure() {}
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * MainNavigationAllInOne.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Navigation
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Navigation_MainNavigationAllInOne
+ *
+ * Description of Toolkit_Template_Navigation_MainNavigationDynamic
+ *
+ * @category Toolkit
+ * @package Template/Navigation
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Navigation_MainNavigationAllInOne
+ extends Toolkit_Template_Navigation_MainNavigationAbstract
+{
+
+ /**
+ * Recursive function to create a multi dimensional array for sub nav
+ *
+ * create tree (A) at the starting page level, pass the tree up to
+ * parent page, where tree (B) is created for that level. append
+ * tree A to tree B as a sub under the correct parent
+ *
+ * @param Toolkit_Toolbox_GatewayAbstract $gateway Toolbox gateway
+ * @param integer $id id to get subtree for
+ * @param array $tree subtree created to be
+ * passed up to the parent
+ * level
+ * @param integer $appendTo pageId to append the
+ * passed up subtree to
+ *
+ * @return array navigational array hash
+ * @access public
+ */
+ public function getNavStructure(
+ Toolkit_Toolbox_GatewayAbstract $gateway,
+ $id
+ ) {
+ static $currentPage;
+ if (!$currentPage) {
+ $currentPage = $gateway->findNavItem($id);
+ $this->_currentPage = $currentPage['navigation_name'];
+ $subPages = $gateway->findAllByParent(0);
+ } else {
+ $subPages = $gateway->findAllByParent($id);
+ }
+ $nav = array();
+ foreach ($subPages as $subPage) {
+ // no home page in sub nav
+ if (defined('MEMBERS_CATEGORY') && MEMBERS_CATEGORY) {
+ if ( ($subPage['parent'] != MEMBERS_CATEGORY)
+ && $subPage['active']
+ ) {
+ $nav[$subPage['id']] = array(
+ 'Title' => htmlspecialchars($subPage['navigation_name']),
+ 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id'])
+ );
+ }
+ } else {
+ if ($subPage['active']) {
+ $nav[$subPage['id']] = array(
+ 'Title' => htmlspecialchars($subPage['navigation_name']),
+ 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id'])
+ );
+ }
+ }
+ $isSubPage = $this->isSubOfPage($currentPage['id'], $subPage['id']);
+ if ($isSubPage) {
+ $nav[$subPage['id']]['sub']
+ = $this->getNavStructure($gateway, $subPage['id']);
+ }
+ }
+ return $nav;
+ }
+
+ /**
+ * Checks to see if the given $id is a sub page of the $parent
+ *
+ * @param type $id id of page to check
+ * @param type $parent Parent id to check
+ *
+ * @return boolean
+ */
+ private function isSubOfPage($id, $parent)
+ {
+ if ($id == $parent) {
+ return true;
+ }
+ if ($id == 0 || $parent == 0) {
+ return false;
+ }
+ try {
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ SELECT parent
+ FROM pages
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+ $id = $stmt->fetchColumn();
+ return $this->isSubOfPage($id, $parent);
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+}
--- /dev/null
+<?php
+/**
+ * MainNavigationDynamic.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Navigation
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Navigation_MainNavigationDynamic
+ *
+ * Description of Toolkit_Template_Navigation_MainNavigationDynamic
+ *
+ * @category Toolkit
+ * @package Template/Navigation
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Navigation_MainNavigationDynamic
+ extends Toolkit_Template_Navigation_MainNavigationAbstract
+{
+ // {{{ getNavSructure()
+
+ /**
+ * Recursive function to create a multi dimensional array for sub nav
+ *
+ * create tree (A) at the starting page level, pass the tree up to
+ * parent page, where tree (B) is created for that level. append
+ * tree A to tree B as a sub under the correct parent
+ *
+ * @param Toolkit_Toolbox_GatewayAbstract $gateway Toolbox gateway
+ * @param integer $id id to get subtree for
+ * @param array $tree subtree created to be
+ * passed up to the parent
+ * level
+ * @param integer $appendTo pageId to append the
+ * passed up subtree to
+ *
+ * @return array navigational array hash
+ * @access public
+ */
+ public function getNavStructure(
+ Toolkit_Toolbox_GatewayAbstract $gateway,
+ $id,
+ array $tree = null,
+ $appendTo = null
+ ) {
+ $id = 0;
+ $currentPage = $gateway->findNavItem($id);
+ $this->_currentPage = $currentPage['navigation_name'];
+
+ $subPages = $gateway->findAllByParent($id);
+
+ $nav = array();
+ foreach ($subPages as $subPage) {
+ // no home page in sub nav
+ if (defined('MEMBERS_CATEGORY') && MEMBERS_CATEGORY) {
+ if ( ($subPage['parent'] != MEMBERS_CATEGORY)
+ && $subPage['active']
+ ) {
+ $nav[$subPage['id']] = array(
+ 'Title' => htmlspecialchars($subPage['navigation_name']),
+ 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id'])
+ );
+ }
+ } else {
+ if ($subPage['active']) {
+ $nav[$subPage['id']] = array(
+ 'Title' => htmlspecialchars($subPage['navigation_name']),
+ 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id'])
+ );
+ }
+ }
+ }
+
+ if (is_array($tree) && array_key_exists($appendTo, $nav)) {
+ $nav[$appendTo]['sub'] = $tree;
+ }
+
+ if ($currentPage['parent'] != 0) {
+ return $this->getNavStructure(
+ $gateway,
+ $currentPage['parent'],
+ $nav,
+ $id
+ );
+ } else {
+ return $nav;
+ }
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * MainNavigationStatic.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Navigation
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+
+/**
+ * Toolkit_Template_Navigation_MainNavigationStatic
+ *
+ * Description of Toolkit_Template_Navigation_MainNavigationStatic
+ *
+ * @category Toolkit
+ * @package Template/Navigation
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Navigation_MainNavigationStatic
+ extends Toolkit_Template_Navigation_MainNavigationAbstract
+{
+ // {{{ getNavSructure()
+
+ /**
+ * Create a static array of nav items to use
+ *
+ * @param Toolkit_Toolbox_GatewayAbstract $gateway Toolbox gateway
+ * @param integer $id Not used for static nav
+ *
+ * @return array navigational array hash
+ * @access public
+ */
+ public function getNavStructure(
+ Toolkit_Toolbox_GatewayAbstract $gateway,
+ $id = null
+ ) {
+ $staticPages = array(
+ HOME_ID, // Home Page
+ 2, // The GLM Associate
+ 10, // Contact Gaslight Media
+ 81, // Services Offered
+ 86, // About Gaslight Media
+ );
+
+ $nav = array();
+
+ foreach ($staticPages as $pageId) {
+ // Home Page
+ $page = $gateway->findNavItem($pageId);
+ $nav[$pageId] = array(
+ 'Title' => htmlspecialchars($page['navigation_name']),
+ 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $pageId)
+ );
+ }
+
+ return $nav;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * Renderer to create a LI list that has an id on the last element
+ *
+ * PHP version 5
+ *
+ * The license text...
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: DirectTreeRendererLastLi.php,v 1.2 2010/07/27 19:14:02 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Renderer to create a LI list that has an id on the last element
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_Template_Navigation_Renderer_DirectTreeLastLi
+ extends HTML_Menu_DirectTreeRenderer
+{
+ // {{{ properties
+
+ /**
+ * Id to be assigned to last LI
+ * @var string
+ * @access private
+ */
+ private $_id = null;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * constructor
+ *
+ * @param string $id id to be assigned to last li
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct($id = null)
+ {
+ if (!is_null($id)) {
+ $this->_id = $id;
+ }
+ }
+
+ // }}}
+ // {{{ finishMenu()
+
+ /**
+ * Rendering before finishing
+ *
+ * if an id must be assigned to the last li element, then extract that
+ * element from the string and adjust the opening template
+ *
+ * @param integer $level Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function finishMenu($level)
+ {
+ parent::finishMenu($level);
+ if (!is_null($this->_id)) {
+ $dom = new DOMDocument();
+ $htmlUTF8 = mb_convert_encoding($this->_html, 'HTML-ENTITIES', 'UTF-8');
+ @$dom->loadHTML($htmlUTF8);
+
+ $uls = $dom->getElementsByTagName('ul');
+ $ul = $uls->item(0);
+ $ul->lastChild->setAttribute('id', $this->_id);
+
+ // Prevent auto tags and doctype from being added to the HTML
+ $this->_html = substr(
+ $dom->saveXML($dom->getElementsByTagName('ul')->item(0)),
+ 0
+ );
+ }
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * Renderer to create a LI list that has an id on the last element
+ *
+ * PHP version 5
+ *
+ * The license text...
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: DirectTreeRendererLastLi.php,v 1.2 2010/07/27 19:14:02 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Renderer to create a LI list that has an id on the last element
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_Template_Navigation_Renderer_DirectTreeLiId
+ extends HTML_Menu_DirectTreeRenderer
+{
+ // {{{ properties
+
+ /**
+ * Id to be assigned to last LI
+ * @var string
+ * @access private
+ */
+ private $_id = null;
+
+ /**
+ * Database gateway for toolbox
+ * @var string
+ * @access private
+ */
+ private $_gateway;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * constructor
+ *
+ * @param Toolkit_Toolbox_PageGatewayAbstract $gateway Gateway
+ * @param string $id id to be assigned to last li
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(
+ Toolkit_Toolbox_PageGatewayAbstract $gateway,
+ $id = null
+ ) {
+ $this->_gateway = $gateway;
+
+ if (!is_null($id)) {
+ $this->_id = $id;
+ }
+ }
+
+ // }}}
+ // {{{ finishMenu()
+
+ /**
+ * Rendering before finishing
+ *
+ * if an id must be assigned to the last li element, then extract that
+ * element from the string and adjust the opening template
+ *
+ * @param integer $level Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function finishMenu($level)
+ {
+ parent::finishMenu($level);
+ if (!is_null($this->_id)) {
+ $dom = new DOMDocument();
+ $htmlUTF8 = mb_convert_encoding($this->_html, 'HTML-ENTITIES', 'UTF-8');
+ @$dom->loadHTML($htmlUTF8);
+
+ $xpath = new DOMXPath($dom);
+ $element = $xpath->query("//*[@id='{$this->_id}']")->item(0);
+
+ if ($pageId = filter_input(INPUT_GET, 'catid', FILTER_VALIDATE_INT)) {
+ $topParent = $this->_gateway->findTopParent($pageId);
+ $page = $this->_gateway->find($topParent);
+ $nodes = $dom->getElementsByTagName('a');
+ foreach ($nodes as $node) {
+ if ($node->nodeValue == $page['navigation_name']) {
+ // uncomment to put id on parent node
+ // $node = $node->parentNode;
+ $node->setAttribute('id', $this->_id);
+ }
+ }
+ }
+
+ // Prevent auto tags and doctype from being added to the HTML
+ $this->_html = substr(
+ $dom->saveXML($dom->getElementsByTagName('ul')->item(0)),
+ 0
+ );
+ }
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * Render the side nav w/ the top parent as a header above the nav
+ *
+ * PHP version 5
+ *
+ * The license text...
+ *
+ * @category Toolkit
+ * @package Toolkit_Template
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: DirectTreeRendererSideNavTitle.php,v 1.1 2010/07/22 19:59:02 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Render the side nav w/ the top parent as a header above the nav
+ *
+ * @category Toolkit
+ * @package Toolkit_Template
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_Template_Navigation_Renderer_DirectTreeSideNavTitle
+ extends HTML_Menu_DirectTreeRenderer
+{
+ // {{{ properties
+
+ /**
+ * Page gateway to use
+ * @var Toolkit_Toolbox_PageGatewayAbstract
+ * @access private
+ */
+ private $_gateway;
+ private $_useTitleAsLink = false;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Constructor
+ *
+ * @param Toolkit_Toolbox_PageGatewayAbstract $gateway Page gateway to use
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(
+ Toolkit_Toolbox_PageGatewayAbstract $gateway,
+ $useTitleAsLink = false
+ ) {
+ $this->_gateway = $gateway;
+ $this->_useTitleAsLink = $useTitleAsLink;
+ }
+
+ // }}}
+
+ // {{{ finishMenu()
+
+ /**
+ * Render nav with header before it
+ *
+ * Render the entire nav, then prepend the top level parent pages
+ * navigation name as a head above the nav
+ *
+ * @param integer $level Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ public function finishMenu($level)
+ {
+ parent::finishMenu($level);
+ $topParentId = $this->_gateway->findTopParent($_GET['catid']);
+ $page = $this->_gateway->find($topParentId);
+ if ($this->_useTitleAsLink) {
+ $link = Toolkit_Template_Page::getSeoUrl(
+ $this->_gateway, $topParentId
+ );
+ }
+ $title
+ = ($this->_useTitleAsLink)
+ ? "<a href=\"{$link}\">{$page['navigation_name']}</a>"
+ : "{$page['navigation_name']}";
+ $this->_html = "<h2>{$title}</h2>" . $this->_html;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * Renderer to create a LI list that has an id on the last element
+ *
+ * PHP version 5
+ *
+ * The license text...
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id: DirectTreeRendererLastLi.php,v 1.2 2010/07/27 19:14:02 jamie Exp $
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Renderer to create a LI list that has an id on the last element
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+class Toolkit_Template_Navigation_Renderer_DirectTreeUlId
+ extends HTML_Menu_DirectTreeRenderer
+{
+ // {{{ properties
+
+ /**
+ * Id to be assigned to first ul as id
+ * @var string
+ * @access private
+ */
+ private $_id = null;
+ /**
+ * Id to be assigned to first ul as class
+ * @var string
+ * @access private
+ */
+ private $_class = null;
+
+ /**
+ * Database gateway for toolbox
+ * @var string
+ * @access private
+ */
+ private $_gateway;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param Toolkit_Toolbox_PageGatewayAbstract $gateway database gateway
+ * @param string $id id to be assigned to last li
+ * @param string $class id to be assigned to first ul as class
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(
+ Toolkit_Toolbox_PageGatewayAbstract $gateway,
+ $id = null,
+ $class = null
+ ) {
+ $this->_gateway = $gateway;
+
+ if (!is_null($id)) {
+ $this->_id = $id;
+ }
+ if (!is_null($class)) {
+ $this->_class = $class;
+ }
+ }
+
+ // }}}
+ // {{{ finishMenu()
+
+ /**
+ * Rendering before finishing
+ *
+ * if an id must be assigned to the last li element, then extract that
+ * element from the string and adjust the opening template
+ *
+ * @param integer $level Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function finishMenu($level)
+ {
+ parent::finishMenu($level);
+ if (!is_null($this->_id)) {
+ $dom = new DOMDocument();
+ $htmlUTF8 = mb_convert_encoding($this->_html, 'HTML-ENTITIES', 'UTF-8');
+ @$dom->loadHTML($htmlUTF8);
+
+ $xpath = new DOMXPath($dom);
+ $element = $xpath->query("//*[@id='{$this->_id}']")->item(0);
+
+ $node = $dom->getElementsByTagName('ul')->item(0);
+ $node->setAttribute('id', $this->_id);
+ if (!is_null($this->_class)) {
+ $node->setAttribute('class', $this->_class);
+ }
+
+ // Prevent auto tags and doctype from being added to the HTML
+ $this->_html = substr(
+ $dom->saveXML($dom->getElementsByTagName('ul')->item(0)),
+ 0
+ );
+ }
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+/**
+ * SideNavigation.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Navigation
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+
+/**
+ * Toolkit_Template_Navigation_SideNavigation
+ *
+ * Description of Toolkit_Template_Navigation_SideNavigation
+ *
+ * @category Toolkit
+ * @package Template/Navigation
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Navigation_SideNavigation
+ extends Toolkit_NavigationAbstract implements Toolkit_INavigation
+{
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param HTML_Menu $menu
+ * @param HTML_Menu_Renderer $rEngine
+ *
+ * @access public
+ */
+ public function __construct(
+ HTML_Menu $menu,
+ HTML_Menu_Renderer $rEngine
+ ) {
+ $this->menu = $menu;
+ $this->rEngine = $rEngine;
+ }
+
+ // }}}
+ // {{{ setNavTemplates()
+
+ /**
+ * Set nav templates
+ *
+ * @access protected
+ * @return void
+ */
+ protected function setNavTemplates()
+ {
+ $tpl = '<a href="%s" %s>{Title}</a>';
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_INACTIVE,
+ sprintf($tpl, '{url}', '', '{Title}')
+ );
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_ACTIVE,
+ sprintf($tpl, '{url}', 'id="current"', '{Title}')
+ );
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_ACTIVEPATH,
+ sprintf($tpl, '{url}', '', '{Title}')
+ );
+ }
+
+ // }}}
+ // {{{ setCurrentIndex()
+
+ /**
+ * Set current index
+ *
+ * @access protected
+ * @return void
+ */
+ protected function setCurrentIndex()
+ {
+ $this->menu->forceCurrentIndex(filter_var($_GET['catid'], FILTER_SANITIZE_NUMBER_INT));
+ }
+
+ // }}}
+ // {{{ getNavSructure()
+
+ /**
+ * Recursive function to create a multi dimensional array for sub nav
+ *
+ * create tree (A) at the starting page level, pass the tree up to
+ * parent page, where tree (B) is created for that level. append
+ * tree A to tree B as a sub under the correct parent
+ *
+ * @param Toolkit_Toolbox_GatewayAbstract $gateway Toolbox gateway
+ * @param integer $id id to get subtree for
+ * @param array $tree subtree created to be
+ * passed up to the parent
+ * level
+ * @param integer $appendTo pageId to append the
+ * passed up subtree to
+ * @return array navigational array hash
+ * @access public
+ */
+ public function getNavStructure(
+ Toolkit_Toolbox_GatewayAbstract $gateway,
+ $id,
+ array $tree = null,
+ $appendTo = null
+ ) {
+ $currentPage = $gateway->findNavItem($id);
+ $this->_currentPage = $currentPage['navigation_name'];
+
+ $subPages = $gateway->findAllByParent($id);
+
+ $nav = array();
+ foreach ($subPages as $subPage) {
+ // no home page in sub nav
+ if ( ($subPage['id'] != HOME_ID)
+ && ($subPage['parent'] != MEMBERS_CATEGORY)
+ && $subPage['active']
+ ) {
+ $nav[$subPage['id']] = array(
+ 'Title' => htmlspecialchars($subPage['navigation_name']),
+ 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id'])
+ );
+ }
+ }
+
+ if ( is_array($tree)
+ && !empty($tree)
+ && array_key_exists($appendTo, $nav)
+ ) {
+ $nav[$appendTo]['sub'] = $tree;
+ }
+
+ if ($currentPage['parent'] != 0) {
+ return $this->getNavStructure(
+ $gateway,
+ $currentPage['parent'],
+ $nav,
+ $id
+ );
+ } else {
+ return $nav;
+ }
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+/**
+ * Page.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Page
+ *
+ * Description of Toolkit_Template_Page
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Page
+{
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @access public
+ */
+ public function __construct()
+ {
+
+ }
+
+ // }}}
+
+ // {{{ getSeoUrl()
+
+ /**
+ * Description for getSeoUrl
+ *
+ * @param Toolkit_Toolbox_GatewayAbstract $gateway Gateway
+ * @param string $id ID
+ *
+ * @return boolean|string
+ * @access public
+ */
+
+
+ public static function getSeoUrl(
+ Toolkit_Toolbox_GatewayAbstract $gateway,
+ $id
+ ) {
+ if (!ctype_digit((string)$id)) {
+ return false;
+ }
+
+ if ($id == HOME_ID) {
+ return ($_ENV['GLM_HOST_ID'] != 'PRODUCTION')
+ ? BASE_URL . 'index.php'
+ : BASE_URL;
+ }
+
+ $page = $gateway->findNavItem($id);
+ $shortUrlsOn
+ = (SHORT_URLS)
+ ? true
+ : false;
+
+ if (empty($page['short_url']) || !$shortUrlsOn) {
+ $name = str_replace(' ', '-', $page['navigation_name']);
+ $pattern = '/[\/#&?\'"]|amp;/';
+ $name = preg_replace(
+ $pattern,
+ '',
+ strip_tags(strtolower(trim($name)))
+ );
+ $baseUrl
+ = in_array($id, unserialize(SECURE_PAGES))
+ ? BASE_SECURE_URL
+ : BASE_URL;
+ return $baseUrl . htmlspecialchars($name) . "-$id/";
+ } else {
+ return BASE_URL . "{$page['short_url']}/";
+ }
+ }
+
+ // }}}
+
+ // {{{ getBody()
+
+ /**
+ * Get body
+ *
+ * @param string $id id
+ * @param Toolkit_Template_Page_BodyFactory $bodyFactory body factory
+ *
+ * @return string
+ * @access public
+ */
+ public function getBody(
+ $id,
+ Toolkit_Template_Page_BodyFactory $bodyFactory
+ ) {
+ $body = $bodyFactory->getPageBodyBuilder($id);
+ return $body->getContent($id);
+ }
+
+ // }}}
+
+ /**
+ * is member only
+ *
+ * @param Toolkit_Toolbox_GatewayAbstract $gateway gateway
+ * @param string $id id
+ *
+ * @return boolean
+ * @access public
+ */
+ public static function isMemberOnly(/*{{{*/
+ Toolkit_Toolbox_GatewayAbstract $gateway,
+ $id
+ ) {
+ $page = $gateway->find($id);
+
+ if ($page['parent'] == MEMBERS_CATEGORY) {
+ return true;
+ } else {
+ return false;
+ }
+ }/*}}}*/
+}
--- /dev/null
+<?php
+/**
+ * Bad.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Page_Bad
+ *
+ * Description of Toolkit_Template_Page_Bad
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Page_Bad
+{
+ /**
+ * Description of getContent
+ *
+ * @access public
+ * @return string
+ */
+ public function getContent()
+ {
+ return '<h1>Sorry this page is down!</h1>';
+ }
+}
+?>
--- /dev/null
+<?php
+/**
+ * BodyFactory.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Page_BodyFactory
+ *
+ * Description of Toolkit_Template_Page_BodyFactory
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Page_BodyFactory
+{
+ // {{{ properties
+
+ /**
+ * description of $_breadCrumbsFactory
+ *
+ * @var string
+ * @access private
+ */
+ private $_breadCrumbsFactory;
+
+ /**
+ * description of $_pageGateway
+ *
+ * @var string
+ * @access private
+ */
+ private $_pageGateway;
+
+ /**
+ * description of $_paragraphGateway
+ *
+ * @var string
+ * @access private
+ */
+ private $_paragraphGateway;
+
+ /**
+ * description of $_cache
+ *
+ * @var string
+ * @access private
+ */
+ private $_cache;
+
+ /**
+ * description of $_keywordReplacement
+ *
+ * @var string
+ * @access private
+ */
+ private $_keywordReplacement;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param Toolkit_BreadCrumbsFactory $breadCrumbsFactory breadCrumbsFactory
+ * @param Toolkit_Toolbox_PageGatewayAbstract $pageGateway pageGateway
+ * @param Toolkit_Toolbox_ParagraphGatewayAbstract $paragraphGateway paragraphGateway
+ * @param Toolkit_Template_KeywordReplacement $keywordReplacement keywordReplacement
+ * @param Cache_Lite $cache cache
+ *
+ * @access public
+ */
+ public function __construct(
+ Toolkit_BreadCrumbsFactory $breadCrumbsFactory,
+ Toolkit_Toolbox_PageGatewayAbstract $pageGateway,
+ Toolkit_Toolbox_ParagraphGatewayAbstract $paragraphGateway,
+ Toolkit_Template_KeywordReplacement $keywordReplacement,
+ Cache_Lite $cache
+ ) {
+ $this->_breadCrumbsFactory = $breadCrumbsFactory;
+ $this->_pageGateway = $pageGateway;
+ $this->_paragraphGateway = $paragraphGateway;
+ $this->_keywordReplacement = $keywordReplacement;
+ $this->_cache = $cache;
+
+ }
+
+ // }}}
+ // {{{ getPageBodyBuilder()
+
+ /**
+ * description of getPageBodyBuilder
+ *
+ * @param string $id ID
+ *
+ * @return \Toolkit_Members_SiteMapPage|\Toolkit_Template_Page_SiteMap
+ * |\Toolkit_Template_Page_Bad|\Toolkit_Template_Page_GoogleSearch
+ * |\Toolkit_Template_Page_Member|\Toolkit_Template_Page_Toolbox
+ * @access public
+ */
+ public function getPageBodyBuilder($id)
+ {
+ $page = $this->_pageGateway->find($id);
+
+ $forgotPassword = (isset($_GET['forgot']) && $_GET['forgot'] == 1);
+ $siteMap = (isset($_GET['sitemap']) && $_GET['sitemap'] == 1);
+ $memberDbSiteMap = ( isset($_GET['memberDbSiteMap'])
+ && $_GET['memberDbSiteMap'] == 1);
+ $pageDoesNotExist = ($page === false);
+ $pageIsTurnedOff = ( is_array($page)
+ && !$page['active']
+ && !strstr($_SERVER['HTTP_REFERER'], 'admin/')
+ && !$_REQUEST['preview']);
+ $googleSearch = ( defined('GOOGLE_SEARCH')
+ && GOOGLE_SEARCH
+ && isset($_GET['query'])
+ && !empty($_GET['query']));
+ $glmSearch = ( defined('GLM_SEARCH')
+ && GLM_SEARCH
+ && isset($_REQUEST['GLMSearch'])
+ && $_REQUEST['GLMSearch'] == 'true');
+ $memberPage = ( defined('MEMBERS_DB')
+ && MEMBERS_DB
+ && $page['include_members']);
+
+ if ($forgotPassword) {
+ die('Toolkit_Template_Page_BodyFactory::getPageBodyBuilder');
+ } elseif ($memberDbSiteMap) {
+ return new Toolkit_Members_SiteMapPage(
+ Toolkit_Database::getInstance(),
+ $this->_pageGateway
+ );
+ } elseif ($siteMap) {
+ return new Toolkit_Template_Page_SiteMap(
+ Toolkit_Database::getInstance(),
+ $this->_pageGateway
+ );
+ } elseif ($pageDoesNotExist) {
+ // page does not exist
+ // give 301 redirect and go back to index page
+ header($_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently');
+ header('Location: ' . BASE_URL . 'index.php');
+ exit();
+ } elseif ($pageIsTurnedOff) {
+ // page exists, but is turned off
+ // give 404 redirect and go back to index page
+ header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
+ return new Toolkit_Template_Page_Bad();
+ } elseif ($googleSearch) {
+ return new Toolkit_Template_Page_GoogleSearch();
+ } elseif ($glmSearch) {
+ return new Toolkit_Template_Page_GLMSearch();
+ } elseif ($memberPage) {
+ $conf = new Config;
+ $root =& $conf->parseConfig(
+ BASE . 'Toolkit/Members/config.ini',
+ 'IniFile'
+ );
+
+ $imageAdapter = new Toolkit_FileServer_ImageAdapter();
+
+ return new Toolkit_Template_Page_Member(
+ $id,
+ new Toolkit_Template_Image_Factory($imageAdapter),
+ $this->_breadCrumbsFactory,
+ $this->_pageGateway,
+ $this->_paragraphGateway,
+ $this->_keywordReplacement,
+ $this->_cache,
+ $root
+ );
+ } else { // regular toolbox page
+ $imageAdapter = new Toolkit_FileServer_ImageAdapter();
+
+ $photoGallery = null;
+ if (defined('PHOTO_GALLERY') && PHOTO_GALLERY) {
+ $dbh = Toolkit_Database::getInstance();
+ $photoGallery = new Toolkit_Photos_Gallery(
+ $dbh,
+ new Toolkit_Photos_Display($dbh)
+ );
+ }
+
+ return new Toolkit_Template_Page_Toolbox(
+ $id,
+ new Toolkit_Template_Image_Factory($imageAdapter),
+ $this->_breadCrumbsFactory,
+ $this->_pageGateway,
+ $this->_paragraphGateway,
+ $this->_keywordReplacement,
+ $this->_cache,
+ $photoGallery
+ );
+ }
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+/**
+ * Abstract base class for file links
+ *
+ * PHP version 5
+ *
+ * The license text...
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version CVS: $Id:$
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * Abstract base class for file links
+ *
+ * Long description (if any) ...
+ *
+ * @category Toolkit_Template
+ * @package Template
+ * @author Jamie Kahgee <jamie@gaslightmedia.com>
+ * @copyright 2010 Jamie Kahgee
+ * @license http://www.gaslightmedia.com/ Gaslightmedia
+ * @version Release: @package_version@
+ * @link <>
+ * @see References to other sections (if any)...
+ */
+abstract class Toolkit_Template_Page_FileLink_Abstract
+{
+ // {{{ properties
+
+
+ /**
+ * Database Id
+ * @var integer
+ * @access protected
+ */
+ protected $id;
+
+ /**
+ * Filename
+ * @var string
+ * @access protected
+ */
+ protected $filename;
+
+ /**
+ * Size in bytes of file
+ * @var integer
+ * @access protected
+ */
+ protected $bytes;
+
+ /**
+ * Type of file
+ * @var string
+ * @access protected
+ */
+ protected $type;
+
+ /**
+ * Text to display for link
+ * @var string
+ * @access protected
+ */
+ protected $urltext;
+
+ /**
+ * Paragraph id file belongs to
+ * @var integer
+ * @access protected
+ */
+ protected $paragraph;
+
+ /**
+ * Position of file
+ * @var integer
+ * @access protected
+ */
+ protected $pos;
+
+ /**
+ * File link
+ * @var string
+ * @access protected
+ */
+ protected $format = '<div><a class="file-download %s" href="%s">%s</a></div>';
+
+ /**
+ * File extension
+ * @var string
+ * @access protected
+ */
+ protected $fileExtension;
+
+ // }}}
+ // {{{ __construct()
+
+
+ /**
+ * Constructor
+ *
+ * @param Toolkit_Toolbox_FileExtension $fileExtension file extension helper
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(Toolkit_Toolbox_FileExtension $fileExtension)
+ {
+ $this->fileExtension = $fileExtension;
+ }
+
+ // }}}
+ // {{{ readFileArray()
+
+
+ /**
+ * Reads the file array of info and populates the object
+ *
+ * @param array $file file data
+ *
+ * @return void
+ * @access public
+ */
+ public function readFileArray (array $file)
+ {
+ foreach ($file as $key => $value) {
+ $this->$key = $value;
+ }
+ }
+
+ // }}}
+ // {{{ getLink()
+
+ /**
+ * Abstract method to subclass
+ *
+ * generates the appropriate link for the type of file
+ *
+ * @access public
+ */
+ abstract public function getLink();
+
+ // }}}
+}
--- /dev/null
+<?php
+/**
+ * Factory.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Page/FileLink
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Page_FileLink_Factory
+ *
+ * Description of Toolkit_Template_Page_FileLink_Factory
+ *
+ * @category Toolkit
+ * @package Template/Page/FileLink
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Page_FileLink_Factory
+{
+ /**
+ * Create Link Renderer
+ *
+ * @param array $file File array
+ *
+ * @return object Either Image or File object
+ * @access public
+ */
+ static public function createLinkRenderer(array $file)
+ {
+ $fileType = substr($file['filename'], 0, 2);
+ $fileExt = new Toolkit_Toolbox_FileExtension;
+ $renderer = ($fileType == 'is')
+ ? new Toolkit_Template_Page_FileLink_Image($fileExt)
+ : new Toolkit_Template_Page_FileLink_File($fileExt);
+
+ $renderer->readFileArray($file);
+ return $renderer;
+ }
+}
--- /dev/null
+<?php
+/**
+ * File.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Page/FileLink
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+
+/**
+ * Toolkit_Template_Page_FileLink_File
+ *
+ * Description of Toolkit_Template_Page_FileLink_File
+ *
+ * @category Toolkit
+ * @package Template/Page/FileLink
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Page_FileLink_File
+ extends Toolkit_Template_Page_FileLink_Abstract
+{
+ // {{{ getLink()
+
+ /**
+ * Gets the link of a file
+ *
+ * @return string $link Formatted string
+ * @access public
+ */
+ public function getLink()
+ {
+ $folder = substr($this->filename, 2, 2);
+ $urltext = urlencode($this->urltext);
+ $url = UPLOADED_FILES . "_ORIGINAL_/{$this->filename}";
+
+ $link = sprintf(
+ $this->format,
+ $this->fileExtension->getClassForType($this->filename),
+ $url,
+ $this->urltext
+ );
+ return $link;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+/**
+ * Image.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Page/FileLink
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Page_FileLink_Image
+ *
+ * Description of Toolkit_Template_Page_FileLink_Image
+ *
+ * @category Toolkit
+ * @package Template/Page/FileLink
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Page_FileLink_Image
+ extends Toolkit_Template_Page_FileLink_Abstract
+{
+ // {{{ getLink()
+
+ /**
+ * Gets link of an image
+ *
+ * @return string $link Formatted string
+ * @access public
+ */
+ public function getLink()
+ {
+ $GLOBALS['bottomScripts'][] = MEDIA_APP_BASE_URL . 'libjs/glm.js';
+
+ $folder = substr($this->filename, 2, 2);
+ $urltext = urlencode($this->urltext);
+ $url = ORIGINAL . $this->filename;
+
+ $link = sprintf(
+ $this->format,
+ $this->fileExtension->getClassForType($this->filename),
+ $url,
+ $this->urltext
+ );
+ return $link;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+/**
+ * GLMSearch.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: GLMSearch.php,v 1.5 2010/05/25 14:07:22 cscott Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Page_GLMSearch
+ *
+ * Description of Toolkit_Template_Page_GLMSearch
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @copyright 2013 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Page_GLMSearch
+{
+ /**
+ * Description for getContent()
+ *
+ * @return string
+ * @access public
+ */
+ public function getContent()
+ {
+ require('/var/www/server/CommonApps/GLMSearch/V1/glmSearch.inc');
+ $glmSearch = new glmSearch(GLM_SEARCH_SITE, GLM_SEARCH_LOGIN, GLM_SEARCH_KEY);
+ $page = $glmSearch->doSearch();
+ return $page;
+ }
+}
+?>
--- /dev/null
+<?php
+/**
+ * GoogleSearch.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Page_GoogleSearch
+ *
+ * Description of Toolkit_Template_Page_GoogleSearch
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Page_GoogleSearch
+{
+ /**
+ * Description for getContent()
+ *
+ * @return string
+ * @access public
+ */
+ public function getContent()
+ {
+ return '<div id="searchcontrol"></div>';
+ }
+}
+?>
--- /dev/null
+<?php
+/**
+ * IBody.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Page_IBody
+ *
+ * Description of Toolkit_Template_Page_IBody
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+interface Toolkit_Template_Page_IBody
+{
+ /**
+ * Description of getContent
+ *
+ * @access public
+ * @return unknown
+ */
+ public function getContent();
+}
+?>
--- /dev/null
+<?php
+/**
+ * Member.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Page_Member
+ *
+ * Description of Toolkit_Template_Page_Member
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Page_Member extends Toolkit_Template_Page_Toolbox
+{
+ // {{{ properties
+
+ /**
+ * Description of $_configContainer
+ *
+ * @var Config_Container
+ * @access private
+ */
+ private $_configContainer;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param int $id ID
+ * @param Toolkit_Template_Image_Factory $imageFactory Image Factory
+ * @param Toolkit_BreadCrumbsFactory $breadCrumbsFactory Breadcrumbs Factory
+ * @param Toolkit_Toolbox_PageGatewayAbstract $pageGateway Page Gateway
+ * @param Toolkit_Toolbox_ParagraphGatewayAbstract $paragraphGateway Paragraph Gateway
+ * @param Toolkit_Template_KeywordReplacement $keywordReplacement Keyword Replacement
+ * @param Cache_Lite $cache Cache
+ * @param Config_Container $config Config Container
+ *
+ * @access public
+ */
+ public function __construct(
+ $id,
+ Toolkit_Template_Image_Factory $imageFactory,
+ Toolkit_BreadCrumbsFactory $breadCrumbsFactory,
+ Toolkit_Toolbox_PageGatewayAbstract $pageGateway,
+ Toolkit_Toolbox_ParagraphGatewayAbstract $paragraphGateway,
+ Toolkit_Template_KeywordReplacement $keywordReplacement,
+ Cache_Lite $cache,
+ Config_Container $config
+ ) {
+ $this->id = $id;
+ $this->imageFactory = $imageFactory;
+ $this->breadCrumbsFactory = $breadCrumbsFactory;
+ $this->pageGateway = $pageGateway;
+ $this->paragraphGateway = $paragraphGateway;
+ $this->keywordReplacement = $keywordReplacement;
+ $this->cache = $cache;
+ $this->_configContainer = $config;
+ }
+
+ // }}}
+
+ // {{{ getBreadCrumbs()
+
+ /**
+ * Gets breadcrumbs html array
+ *
+ * @param int $id ID
+ *
+ * @return array
+ * @access public
+ */
+ protected function getBreadCrumbs($id)
+ {
+ $stack = parent::getbreadCrumbsArray($id);
+
+ $lastNode = array_pop($stack);
+ $anchor = '<a href="#">' . $lastNode . '</a>';
+ array_push($stack, $anchor);
+
+ array_push($stack, 'Member Name');
+
+ return parent::getBreadCrumbsHtml($stack);
+ }
+
+ // }}}
+ // {{{ _getMemberSearchResults()
+
+ /**
+ * Get member search results
+ *
+ * @param int $id ID
+ *
+ * @return string $html
+ * @access private
+ */
+ private function _getMemberSearchResults($id)
+ {
+ $memberMap = false;
+ $page = $this->pageGateway->find($id);
+ $html = '';
+ if ($page['include_member_map']) {
+ $memberMap = true;
+ $googleMap = new Toolkit_Members_Map();
+ $html = $googleMap->toHtml();
+ }
+
+ $dbh = Toolkit_Database::getInstance();
+
+ $searchQuery = new Toolkit_Members_SearchQueryGenerator(
+ true,
+ $this->_configContainer
+ );
+
+ $sql = $searchQuery->getQuery($dbh);
+ $searchList = new Toolkit_Members_SearchList(
+ $dbh,
+ 50,
+ null,
+ null,
+ true
+ );
+
+ $searchList->setConfig($this->_configContainer);
+ $searchList->setMemberMap($memberMap);
+ $searchList->setPageGateway($this->pageGateway);
+ $searchList->setQuery($sql);
+ // if you add any boolean field to this sort
+ // you'll need to make sure you have a case if the boolean field is null
+ // in the SearchGenerator or it will have inconsitant results
+ $nonMembers = $this->_configContainer->getItem('section', 'conf')
+ ->getItem('directive', 'nonMembers')
+ ->getContent();
+ if ($nonMembers) {
+ $defaultSort = array(
+ 'nonmember' => 'ASC',
+ 'member_name' => 'ASC'
+ );
+ } else {
+ $defaultSort = array(
+ 'member_name' => 'ASC'
+ );
+ }
+ $searchList->setDefaultSort($defaultSort);
+ // Rendering Engine to use
+ $rEngine = new Structures_DataGrid_Renderer_Flexy();
+ // Templating Engine to use
+ $tEngine = new HTML_Template_Flexy(
+ Toolkit_Members::getFlexyOptions()
+ );
+ $rEngine->setContainer($tEngine);
+
+ $html .= $searchList->toHtml($rEngine);
+
+ return $html;
+ }
+
+ // }}}
+ // {{{ _getMemberSearchForm()
+
+ /**
+ * Gets member search form
+ *
+ * @param int $id ID
+ *
+ * @return mixed $html or mixed from Common.php
+ * @access private
+ */
+ private function _getMemberSearchForm($id)
+ {
+ $page = $this->pageGateway->find($id);
+ $html = '';
+ if ($page['include_member_map']) {
+ $googleMap = new Toolkit_Members_Map();
+ $html = $googleMap->toHtml();
+ }
+ $pageUrl
+ = ($_REQUEST['page_id'])
+ ? MEDIA_BASE_URL . "members-only-area/?page_id={$_REQUEST['page_id']}"
+ : MEDIA_BASE_URL . "index.php?catid={$_GET['catid']}";
+ $form = new Toolkit_Members_UserSearchForm(
+ 'SearchForm',
+ 'get',
+ $pageUrl,
+ null,
+ null,
+ true
+ );
+
+ $res = $form->setCatid($_GET['catid']);
+ if (!PEAR::isError($res)) {
+ $dbh = Toolkit_Database::getInstance();
+ $form->setPageMemberCategories($this->pageGateway);
+ $form->setPageMemberRegions($this->pageGateway);
+ $form->configureForm($dbh, $this->_configContainer);
+ $html .= $form->toHtml(
+ Toolkit_Members::getFlexyOptions(),
+ $this->pageGateway
+ );
+ } else {
+ return Toolkit_Common::handleError($res);
+ }
+
+ return $html;
+ }
+
+ // }}}
+ // {{{ _getMemberProfilePage()
+
+ /**
+ * Gets member profile page
+ *
+ * @param int $id ID
+ *
+ * @return mixed
+ * @access private
+ */
+ private function _getMemberProfilePage($id)
+ {
+ try {
+ $profileCreator = new Toolkit_Members_ProfilePage(
+ Toolkit_Database::getInstance(),
+ $this->pageGateway,
+ $_GET['member_id']
+ );
+
+ $tEngine = new HTML_Template_Flexy(
+ Toolkit_Members::getFlexyOptions()
+ );
+
+ $profileWriter = new Toolkit_Members_ProfileWriter(
+ new Cache_Lite(Toolkit_Members::getCacheOptions()),
+ $tEngine
+ );
+
+ $profileWriter->setTemplate('memberDetail.tpl');
+ $profileWriter->attach(
+ new Toolkit_Members_Exposure(
+ $profileCreator->getMemberId(),
+ 'detail'
+ )
+ );
+
+ $profileCreator->setCatid($id);
+ $profileCreator->setConfig($this->_configContainer);
+ $profileCreator->setImagePath(MEMBER_RESIZED);
+
+ return $profileWriter->toHtml($profileCreator);
+ } catch (PEAR_Exception $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ }
+
+ // }}}
+ /**
+ * Description for _getPageCoupons
+ *
+ * @param int $id ID
+ *
+ * @return string|void
+ * @access private
+ */
+ private function _getPageCoupons($id)
+ {
+ $page = $this->pageGateway->find($id);
+ if (!$page['include_coupons']) {
+ return;
+ }
+
+ $widget = new Toolkit_Coupons_PageWidget(
+ new Toolkit_Coupons_WebCouponFactory(),
+ new Toolkit_Coupons_Coupons()
+ );
+
+ $flexyOpts = Toolkit_Coupons_Controller::getFlexyOptions();
+ $tEngine = new HTML_Template_Flexy($flexyOpts);
+
+ $widget->addPageCategories(
+ Toolkit_Database::getInstance(),
+ $id
+ );
+
+ $searchForm = new Toolkit_Coupons_UserSearch(
+ 'coupon_search',
+ 'get',
+ MEDIA_BASE_URL . 'index.php'
+ );
+ $searchForm->configureForm(
+ Toolkit_Database::getInstance(),
+ $id
+ );
+
+ $widget->setSearchForm($searchForm);
+
+ $couponForm = new HTML_QuickForm(
+ 'coupon_form',
+ 'post',
+ MEDIA_BASE_URL . 'Toolkit/Coupons/print.php'
+ );
+ $renderer =& $couponForm->defaultRenderer();
+ $renderer->clearAllTemplates();
+ return $widget->toHtml($couponForm, $tEngine, 'coupons.html');
+ }
+
+ private function _isMemberActive($memberId)
+ {
+ try {
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ SELECT active
+ FROM member
+ WHERE member_id = :member_id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':member_id', $memberId, PDO::PARAM_INT);
+ $stmt->execute();
+ return $stmt->fetchColumn();
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ }
+ // {{{ getContent()
+
+ /**
+ * Description of getContent()
+ *
+ * @return string
+ * @access public
+ */
+ public function getContent()
+ {
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/member-link.js';
+ $breadCrumbsBuilder = $this->breadCrumbsFactory->createBreadCrumbsHelper();
+ $page = $this->pageGateway->find($this->id);
+
+ $coupons = null;
+ if (defined('COUPONS') && COUPONS) {
+ $coupons = $this->_getPageCoupons($this->id);
+ }
+
+ if ($memberId = filter_input(INPUT_GET, 'member_id', FILTER_VALIDATE_INT)) {
+ // check and see if the member is inactive
+ // if they are then don't show bread crumb and give out 404 header
+ if (!$this->_isMemberActive($memberId)) {
+ header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
+ $badPage = new Toolkit_Template_Page_Bad();
+ return $badPage->getContent();
+ } else {
+ $breadCrumbs = $breadCrumbsBuilder->toHtml($this->id);
+ $profile = $this->_getMemberProfilePage($this->id);
+ return $breadCrumbs .
+ $profile;
+ }
+ } elseif (!$page['search_form']) {
+ $breadCrumbs = $breadCrumbsBuilder->toHtml($this->id);
+ $searchResults = $this->_getMemberSearchResults($this->id);
+ $secondaryParagraphs = $this->getSecondaryParagraphs($this->id);
+ $primaryParagraph = $this->getPrimaryParagraph($this->id);
+
+ return $breadCrumbs .
+ $primaryParagraph .
+ $searchResults .
+ $coupons .
+ $secondaryParagraphs;
+ } elseif (isset($_GET['search'])) {
+ $breadCrumbs = $breadCrumbsBuilder->toHtml($this->id);
+ $searchResults = $this->_getMemberSearchResults($this->id);
+
+ return $breadCrumbs .
+ $searchResults;
+ } else {
+ $breadCrumbs = $breadCrumbsBuilder->toHtml($this->id);
+ $searchForm = $this->_getMemberSearchForm($this->id);
+ $secondaryParagraphs = $this->getSecondaryParagraphs($this->id);
+ $primaryParagraph = $this->getPrimaryParagraph($this->id);
+
+ return $breadCrumbs .
+ $primaryParagraph .
+ $searchForm .
+ $coupons .
+ $secondaryParagraphs;
+ }
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+/**
+ * SiteMap.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Page_SiteMap
+ *
+ * Description of Toolkit_Template_Page_SiteMap
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Page_SiteMap
+{
+ // {{{ properties
+
+ /**
+ * PDO
+ *
+ * @var PDO
+ * @access private
+ */
+ private $_dbh;
+
+ /**
+ * description of $_pageGateway
+ *
+ * @var string
+ * @access private
+ */
+ private $_pageGateway;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param PDO $dbh PDO
+ * @param string $pageGatweway Page Gateway
+ *
+ * @access public
+ */
+ public function __construct(PDO $dbh, $pageGatweway)
+ {
+ $this->_dbh = $dbh;
+ $this->_pageGateway = $pageGatweway;
+ }
+
+ // }}}
+
+ // {{{ getContent()
+
+ /**
+ * Description of getContent()
+ *
+ * @return HTML_Template_Flexy
+ * @access public
+ */
+ public function getContent()
+ {
+ $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'css/siteMap.css';
+ $navArray = $this->getNavArray(0);
+ $page = new stdClass();
+ $tpl = new HTML_Template_Flexy(
+ $GLOBALS['flexyOptions']
+ );
+ $page->nav = $navArray;
+ $tpl->compile('siteMap.html');
+ return $tpl->bufferedOutputObject($page);
+ }
+
+ // }}}
+
+ /**
+ * Description of getNavArray
+ *
+ * @param string $parent Parent
+ *
+ * @return array
+ * @throws Toolkit_Template_Exception
+ * @access public
+ */
+ public function getNavArray($parent)
+ {
+ if ( defined('MEMBERS_CATEGORY')
+ && defined('MEMBERS_DB')
+ && MEMBERS_DB
+ ) {
+ $sql = "
+ SELECT id, navigation_name, parent, include_members
+ FROM pages
+ WHERE parent = :parent
+ AND active = true
+ AND id != " . MEMBERS_CATEGORY . "
+ ORDER BY parent, pos";
+ } else {
+ $sql = "
+ SELECT id, navigation_name, parent
+ FROM pages
+ WHERE parent = :parent
+ AND active = true
+ ORDER BY parent, pos";
+ }
+
+ try {
+
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(
+ ':parent',
+ $parent,
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $nav[$row['id']] = array(
+ 'label' => $row['navigation_name'],
+ 'url' => Toolkit_Template_Page::getSeoUrl(
+ $this->_pageGateway,
+ $row['id']
+ )
+ );
+ $subs = array();
+ if ($row['include_members']) {
+ $subs = $this->_getMembersForPage($row['id']);
+ }
+ $subs2 = $this->getNavArray($row['id']);
+ if ($subs2) {
+ foreach ($subs2 as $subsub) {
+ $subs[] = $subsub;
+ }
+ }
+ if ($subs) {
+ $nav[$row['id']]['subs'] = $subs;
+ }
+ }
+ return $nav;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Template_Exception(
+ 'Unable to fetch pages for sitemap'
+ );
+ }
+ }
+
+ private function _getMembersForPage($pageId)
+ {
+ $members = array();
+ $memberCats = array();
+ $memberRegs = array();
+ try {
+ // get member categories for the page
+ $sql = "
+ SELECT *
+ FROM toolbox.member_categories2toolbox_pages
+ WHERE page = :page";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(":page", $pageId, PDO::PARAM_INT);
+ $stmt->execute();
+ while ($memberCategory = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $memberCats[] = $memberCategory['category'];
+ }
+ // get member regions for the page
+ $sql = "
+ SELECT *
+ FROM toolbox.member_regions2toolbox_pages
+ WHERE page = :page";
+ $stmt = $this->_dbh->prepare($sql);
+ $stmt->bindParam(":page", $pageId, PDO::PARAM_INT);
+ $stmt->execute();
+ while ($memberRegions = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $memberRegs[] = $memberRegions['region'];
+ }
+ // if they're both empty then get list of all members
+ $where = array("active");
+ if (!empty($memberCats)) {
+ $where[] = "member_id IN (
+ SELECT member_id
+ FROM member_category
+ WHERE category_id IN (" . implode(',', $memberCats) . "))";
+ }
+ if (!empty($memberRegs)) {
+ $where[] = "(
+ region IN (" . implode(',', $memberRegs) . ")
+ OR
+ region IS NULL)";
+
+ }
+ $sql = "
+ SELECT member_id,member_name
+ FROM member";
+ if (!empty($where)) {
+ $sql .= " WHERE " . implode(' AND ', $where);
+ }
+ $sql .= " ORDER BY member_name";
+ $stmt = $this->_dbh->query($sql);
+ while ($member = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $memberName = str_replace(' ', '-', $member['member_name']);
+ $pattern = '/[\/#&?\'"]|amp;/';
+ $name = preg_replace(
+ $pattern,
+ '',
+ strip_tags(strtolower(trim($memberName)))
+ );
+ $url = MEDIA_BASE_URL . "member-{$pageId}/"
+ . htmlspecialchars($name) . "-{$member['member_id']}.html";
+ $members[$member['member_id']] = array(
+ 'label' => $member['member_name'],
+ 'url' => $url
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Template_Exception(
+ 'Unable to fetch members for sitemap page'
+ );
+ }
+ return $members;
+ }
+}
+?>
--- /dev/null
+<?php
+/**
+ * Toolbox.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_Page_Toolbox
+ *
+ * Description of Toolkit_Template_Page_Toolbox
+ *
+ * @category Toolkit
+ * @package Template/Page
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+class Toolkit_Template_Page_Toolbox implements Toolkit_Template_Page_IBody
+{
+ // {{{ properties
+
+
+ /**
+ * Description of $id
+ *
+ * @var int
+ * @access protected
+ */
+ protected $id;
+
+ /**
+ * Description of $imageFactory
+ *
+ * @var Toolkit_Template_Image_Factory
+ * @access protected
+ */
+ protected $imageFactory;
+
+ /**
+ * Description of $breadCrumbsFactory
+ *
+ * @var Toolkit_BreadCrumbsFactory
+ * @access protected
+ */
+ protected $breadCrumbsFactory;
+
+ /**
+ * Description of $pageGateway
+ *
+ * @var Toolkit_Toolbox_PageGatewayAbstract
+ * @access protected
+ */
+ protected $pageGateway;
+
+ /**
+ * Description of $paragraphGateway
+ *
+ * @var Toolkit_Toolbox_ParagraphGatewayAbstract
+ * @access protected
+ */
+ protected $paragraphGateway;
+
+ /**
+ * Description of $keywordReplacement
+ *
+ * @var Toolkit_Template_KeywordReplacement
+ * @access protected
+ */
+ protected $keywordReplacement;
+
+ /**
+ * Description of $cache
+ *
+ * @var Cache_Lite
+ * @access protected
+ */
+ protected $cache;
+
+ /**
+ * Description of $photoGallery
+ *
+ * @var Toolkit_Photos_Gallery
+ * @access protected
+ */
+ protected $photoGallery;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param int $id ID
+ * @param Toolkit_Template_Image_Factory $imageFactory imageFactory
+ * @param Toolkit_BreadCrumbsFactory $breadCrumbsFactory breadCrumbsFactory
+ * @param Toolkit_Toolbox_PageGatewayAbstract $pageGateway Page Gateway
+ * @param Toolkit_Toolbox_ParagraphGatewayAbstract $paragraphGateway Paragraph Gateway
+ * @param Toolkit_Template_KeywordReplacement $keywordReplacement Keyword Replacement
+ * @param Cache_Lite $cache Cache
+ * @param Toolkit_Photos_Gallery $photoGallery Photo Gallery
+ *
+ * @throws RuntimeException
+ * @access public
+ */
+ public function __construct(
+ $id,
+ Toolkit_Template_Image_Factory $imageFactory,
+ Toolkit_BreadCrumbsFactory $breadCrumbsFactory,
+ Toolkit_Toolbox_PageGatewayAbstract $pageGateway,
+ Toolkit_Toolbox_ParagraphGatewayAbstract $paragraphGateway,
+ Toolkit_Template_KeywordReplacement $keywordReplacement,
+ Cache_Lite $cache,
+ Toolkit_Photos_Gallery $photoGallery = null
+ ) {
+ if (!filter_var($id, FILTER_VALIDATE_INT)) {
+ throw new RuntimeException(
+ "`$id` is not a valid page id - integer required"
+ );
+ }
+ $this->id = $id;
+ $this->imageFactory = $imageFactory;
+ $this->breadCrumbsFactory = $breadCrumbsFactory;
+ $this->pageGateway = $pageGateway;
+ $this->paragraphGateway = $paragraphGateway;
+ $this->keywordReplacement = $keywordReplacement;
+ $this->cache = $cache;
+ $this->photoGallery = $photoGallery;
+ }
+
+ // }}}
+
+ // {{{ getContent()
+
+ /**
+ * Get content
+ *
+ * @return string
+ * @access public
+ */
+ public function getContent()
+ {
+ $breadCrumbsBuilder = $this->breadCrumbsFactory->createBreadCrumbsHelper();
+ $breadCrumbs = $breadCrumbsBuilder->toHtml($this->id);
+ $secondaryParagraphs = $this->getSecondaryParagraphs($this->id);
+ $primaryParagraph = $this->getPrimaryParagraph($this->id);
+ $coupons = null;
+ if (defined('COUPONS') && COUPONS) {
+ $coupons = $this->_getPageCoupons($this->id);
+ }
+ $staticPageContent = $this->getStaticPageContent($this->id);
+
+ $photoGalleryContent = null;
+ if (defined('PHOTO_GALLERY') && PHOTO_GALLERY) {
+ $photoGalleryContent = $this->photoGallery->getPageGallery($this->id);
+ }
+
+ return $breadCrumbs .
+ $primaryParagraph .
+ $staticPageContent .
+ $secondaryParagraphs .
+ $coupons .
+ $photoGalleryContent;
+ }
+
+ // }}}
+
+ // {{{ _getPageCoupons()
+
+ /**
+ * Description for _getPageCoupons
+ *
+ * @param int $id ID
+ *
+ * @return string|void
+ * @access private
+ */
+ private function _getPageCoupons($id)
+ {
+ $page = $this->pageGateway->find($id);
+ if (!$page['include_coupons']) {
+ return;
+ }
+
+ $widget = new Toolkit_Coupons_PageWidget(
+ new Toolkit_Coupons_WebCouponFactory(),
+ new Toolkit_Coupons_Coupons()
+ );
+
+ $flexyOpts = Toolkit_Coupons_Controller::getFlexyOptions();
+ $tEngine = new HTML_Template_Flexy($flexyOpts);
+
+ $widget->addPageCategories(
+ Toolkit_Database::getInstance(),
+ $id
+ );
+
+ $searchForm = new Toolkit_Coupons_UserSearch(
+ 'coupon_search',
+ 'get',
+ MEDIA_BASE_URL . 'index.php'
+ );
+ $searchForm->configureForm(
+ Toolkit_Database::getInstance(),
+ $id
+ );
+
+ $widget->setSearchForm($searchForm);
+
+ $couponForm = new HTML_QuickForm(
+ 'coupon_form',
+ 'post',
+ MEDIA_BASE_URL . 'Toolkit/Coupons/print.php'
+ );
+ $renderer =& $couponForm->defaultRenderer();
+ $renderer->clearAllTemplates();
+ return $widget->toHtml($couponForm, $tEngine, 'coupons.html');
+ }
+
+ // }}}
+ // {{{ getParagraphFiles()
+
+ /**
+ * Description for getParagraphFiles()
+ *
+ * @param array $files Files array
+ *
+ * @return void|string
+ * @access protected
+ */
+ protected function getParagraphFiles($files)
+ {
+ if (!is_array($files)) {
+ return;
+ }
+
+ $filesList = '';
+ foreach ($files as $file) {
+ $linkRenderer = Toolkit_Template_Page_FileLink_Factory::createLinkRenderer($file);
+ $filesList .= $linkRenderer->getLink();
+ }
+
+ return $filesList;
+ }
+
+ // }}}
+ // {{{ getParagraphImage()
+
+ /**
+ * Description for getParagraphImage()
+ *
+ * @param array $data Image data
+ * @param string $side Side image is on
+ *
+ * @return string Through Toolkit/Template/Image /Left or /Right or /Null
+ * @access protected
+ */
+ protected function getParagraphImage(array $data, $side)
+ {
+ $imageBuilder = $this->imageFactory->getImageBuilder($data, $side);
+ return $imageBuilder->getImage(TOOLBOX_RESIZED);
+ }
+
+ // }}}
+ // {{{ getParagraphLinks()
+
+ /**
+ * Description for getParagraphLinks()
+ *
+ * @return boolean|string
+ * @access protected
+ */
+ protected function getParagraphLinks()
+ {
+ if (!is_array($this->paragraphLinks)) {
+ return false;
+ }
+
+ $links = '<ul id="paragraphLinks">';
+ foreach ($this->paragraphLinks as $anchor) {
+ $links .= "<li>$anchor</li>";
+ }
+ $links .= '</ul>';
+
+ return $links;
+ }
+
+ // }}}
+ // {{{ getPrimaryParagraph()
+
+ /**
+ * Description for getPrimaryParagraph()
+ *
+ * @param int $id ID
+ *
+ * @return string
+ * @access protected
+ */
+ protected function getPrimaryParagraph($id)
+ {
+ $cache = $this->cache->get("page-$id", 'Toolbox');
+
+ if ($cache) {
+ return $cache;
+ } else {
+ $page = $this->pageGateway->find($id);
+
+ switch ($page['template']) {
+ case '2' :
+ case '4' :
+ case '5' :
+ $side = 'left';
+ break;
+
+ default :
+ $side = 'right';
+ break;
+ }
+
+ $html = '<div id="category">';
+ $html .= "<h1>{$page['title']}</h1>";
+ if ($page['paragraph_links']) {
+ $html .= $this->getParagraphLinks();
+ }
+ $html .= $this->getParagraphImage($page, $side);
+ $html .= $this->keywordReplacement->findAndReplace($page['description']);
+ $html .= '</div>';
+
+ $this->cache->save($html, "page-$id", 'Toolbox');
+ }
+
+ return $html;
+ }
+
+ // }}}
+ // {{{ getSecondaryParagraphs()
+
+ /**
+ * Description for getSecondaryParagraphs()
+ *
+ * @param int $id ID
+ *
+ * @return string
+ * @throws Toolkit_Template_Exception
+ * @access protected
+ */
+ protected function getSecondaryParagraphs($id)
+ {
+ $cache = $this->cache->get("paragraphs-$id", 'Toolbox');
+
+ if ($cache) {
+ return $cache;
+ } else {
+ $page = $this->pageGateway->find($id);
+ $paragraphs = $this->paragraphGateway->findAll($id);
+
+ $side = array('left', 'right');
+ switch ($page['template']) {
+ case '2' :
+ case '3' :
+ case '6' :
+ $key = 0;
+ $flip = ($page['template'] == 3);
+ if ($page['templte'] == '3') {
+ $flip = true;
+ }
+ break;
+
+ case '1' :
+ case '4' :
+ case '5' :
+ $key = 1;
+ $flip = ($page['template'] == 4);
+ break;
+
+ default :
+ throw new Toolkit_Template_Exception(
+ "Invalid page template for page `$id`"
+ );
+ break;
+ }
+
+ $html = '';
+ $linksFormat = '<a href="#sect-%s">%s</a>';
+ foreach ($paragraphs as $paragraph) {
+ if ($paragraph['active']) {
+ $html .= '<div class="listing" id="sect-'.$paragraph['id'].'">';
+ $html .= "<h2>{$paragraph['title']}</h2>";
+ $html .= $this->getParagraphImage($paragraph, $side[$key]);
+ $html .= $this->keywordReplacement->findAndReplace($paragraph['description']);
+
+ $html .= $this->getParagraphFiles($paragraph['files']);
+
+ if ($paragraph['back_to_top']) {
+ $html .= '<a href="#toolbox">Back to Top</a>';
+ }
+
+ $html .= '</div>';
+
+ $this->paragraphLinks[] = sprintf(
+ $linksFormat,
+ $paragraph['id'],
+ $paragraph['title']
+ );
+ $key = $flip ? !$key : $key;
+ }
+ }
+
+ $this->cache->save($html, "paragraphs-$id", 'Toolbox');
+ return $html;
+ }
+ }
+
+ // }}}
+
+ // {{{ getStaticPageContent()
+
+ /**
+ * Description for getStaticPageCOntent()
+ *
+ * @param unknown $pageId PageID
+ *
+ * @return string
+ * @access protected
+ */
+ protected function getStaticPageContent($pageId)
+ {
+ $html = '';
+
+ if (file_exists(BASE . "static/$pageId.phtml")) {
+ ob_start();
+ include BASE . "static/$pageId.phtml";
+ $html = ob_get_contents();
+ ob_end_clean();
+ }
+
+ return $html;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * PageControllerAbstract.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: ShortURL.php,v 1.5 2010/05/25 14:07:22 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Toolkit_Template_PageControllerAbstract
+ *
+ * Description of Toolkit_Template_PageControllerAbstract
+ *
+ * @category Toolkit
+ * @package Template
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @copyright 2012 Gaslight Media
+ * @license Gaslight Media
+ * @release Release: $id$
+ * @link <>
+ */
+abstract class Toolkit_Template_PageControllerAbstract
+ extends Toolkit_BaseControllerAbstract implements Toolkit_IController
+{
+ /**
+ * Description for getPageGatewayFactory()
+ *
+ * @access protected
+ * @return unknown
+ */
+ abstract protected function getPageGatewayFactory();
+
+ /**
+ * Description for getParagraphGatewayFactory()
+ *
+ * @access protected
+ * @return unknown
+ */
+ abstract protected function getParagraphGatewayFactory();
+
+ /**
+ * Description for indexAction()
+ *
+ * @return void
+ * @access public
+ */
+ public function indexAction()
+ {
+ // Initiate HTML_Template_Flexy.
+ $template = new HTML_Template_Flexy($this->registry->flexyOptions);
+ $keywordReplacement = new Toolkit_Template_KeywordReplacement(
+ new Toolkit_Toolbox_PageGatewayPublish(
+ $this->registry->dbh
+ )
+ );
+ $breadCrumbsFactory = new Toolkit_BreadCrumbsFactory(
+ $this->getPageGatewayFactory()
+ );
+ // Page object used for merging with the flexy template object.
+ // now using the page class from toolkit
+ $glmPage = new Toolkit_Page(
+ new Toolkit_Template_Page(),
+ $breadCrumbsFactory,
+ $this->getPageGatewayFactory(),
+ $this->getParagraphGatewayFactory(),
+ new Toolkit_Template_Navigation_Factory(),
+ $keywordReplacement,
+ $this->registry->catid
+ );
+ $glmPage->fetchPage();
+ if ($memberId = filter_var($_REQUEST['member_id'], FILTER_VALIDATE_INT)) {
+ // get member name and put in title
+ $sql = "
+ SELECT member_name,description
+ FROM member
+ WHERE member_id = {$memberId}";
+ if ($member = $this->registry->dbh->query($sql)->fetch(PDO::FETCH_ASSOC)) {
+ $memberName = htmlentities(strip_tags($member['member_name']));
+ $glmPage->pageTitle = $memberName.' - '.$glmPage->pageTitle;
+ $glmPage->metaTags
+ = htmlentities(
+ substr(
+ trim(strip_tags($member['description'])), 0, 250
+ ), ENT_QUOTES, 'UTF-8'
+ );
+ }
+ }
+
+ $glmPage->topScripts = Toolkit_Common::getScripts($GLOBALS['topScripts']);
+ $glmPage->bottomScripts = Toolkit_Common::getScripts($GLOBALS['bottomScripts']);
+ $glmPage->styles = Toolkit_Common::getStyleSheets();
+
+ // Compile the template.html from the templates directory.
+ $template->compile('template.html');
+ // Merge compiled template with the $glmPage object.
+ $template->outputObject($glmPage);
+ }
+}
+?>
--- /dev/null
+<?php
+
+abstract class Toolkit_Toolbox_BreadCrumbsAbstract
+{
+ // {{{ properties
+
+ protected $dbh;
+ protected $id;
+ protected $path;
+
+ // }}}
+ // {{{ __construct()
+
+ public function __construct(PDO $dbh, $id)
+ {
+ $this->dbh = $dbh;
+
+ if (!ctype_digit((string)$id)) {
+ throw new InvalidArgumentException(
+ "\$id must be an integer `$id` given"
+ );
+ }
+
+ $this->id = $id;
+ }
+
+ // }}}
+ // {{{ getPage()
+
+ protected function getPage($id)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM pages
+ WHERE id = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+
+ return $stmt->fetch(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Could not fetch parent for page `$id`"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ __toString()
+
+ public function __toString()
+ {
+ return '<div id="breadcrumbs">' . $this->getPath() . '</div>';
+ }
+
+ // }}}
+ // {{{ getId()
+
+ /**
+ * @return the $id
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ // }}}
+ // {{{ getPageUri()
+
+ abstract protected function getPageUri(array $page);
+
+ // }}}
+ // {{{ getPath()
+
+ /**
+ * @return the $path
+ */
+ public function getPath()
+ {
+ if ($this->id == HOME_ID) {
+ return;
+ }
+
+ $id = $this->id;
+ $stack = array();
+ do {
+ $page = $this->getPage($id);
+
+ $navigationName = $this->id == $id
+ ? $page['navigation_name']
+ : $this->getPageUri($page);
+
+ $stack[] = $navigationName;
+ $id = $page['parent'];
+ } while ($id != 0);
+
+ $reverse = array_reverse($stack);
+ $this->path = implode(' > ', $reverse);
+
+ return $this->path;
+ }
+
+ // }}}
+ // {{{ setId()
+
+ /**
+ * @param $id the $id to set
+ */
+ public function setId($id)
+ {
+ $this->id = $id;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+--
+-- update the pages tables with new field for include_coupons
+-- and update the rule for history
+--
+
+ALTER TABLE toolbox.pages ADD include_coupons BOOLEAN;
+ALTER TABLE toolbox.pages ALTER include_coupons SET DEFAULT false;
+UPDATE toolbox.pages SET include_coupons = false;
+
+ALTER TABLE toolbox.pages_draft ADD include_coupons BOOLEAN;
+ALTER TABLE toolbox.pages_draft ALTER include_coupons SET DEFAULT false;
+UPDATE toolbox.pages_draft SET include_coupons = false;
+
+ALTER TABLE toolbox.pages_history ADD include_coupons BOOLEAN;
+ALTER TABLE toolbox.pages_history ALTER include_coupons SET DEFAULT false;
+UPDATE toolbox.pages_history SET include_coupons = false;
+
+
+\i ./procedures/pages_update.sql
--- /dev/null
+--
+-- update the pages tables with new field for include_members
+-- and update the rule for history
+--
+
+ALTER TABLE toolbox.pages ADD include_members BOOLEAN;
+ALTER TABLE toolbox.pages ALTER include_members SET DEFAULT false;
+UPDATE toolbox.pages SET include_members = false;
+
+ALTER TABLE toolbox.pages_draft ADD include_members BOOLEAN;
+ALTER TABLE toolbox.pages_draft ALTER include_members SET DEFAULT false;
+UPDATE toolbox.pages_draft SET include_members = false;
+
+ALTER TABLE toolbox.pages_history ADD include_members BOOLEAN;
+ALTER TABLE toolbox.pages_history ALTER include_members SET DEFAULT false;
+UPDATE toolbox.pages_history SET include_member = false;
+
+
+\i ./procedures/pages_update.sql
--- /dev/null
+CREATE SCHEMA toolbox;
+GRANT ALL ON SCHEMA toolbox TO nobody;
+
+--
+-- Tables
+--
+\i ./tables/pages.sql
+\i ./tables/pages_history.sql
+\i ./tables/pages_draft.sql
+\i ./tables/paragraphs.sql
+\i ./tables/paragraphs_history.sql
+\i ./tables/paragraphs_draft.sql
+\i ./tables/files.sql
+\i ./tables/files_history.sql
+\i ./tables/files_draft.sql
+
+--
+-- Procedures
+--
+\i ./procedures/pages_update.sql
+\i ./procedures/pages_pos.sql
+\i ./procedures/paragraphs_update.sql
+\i ./procedures/paragraphs_pos.sql
+\i ./procedures/paragraphs_draft_pos.sql
+\i ./procedures/check_paragraph_pos_consistency.sql
+-- \i ./procedures/check_pages_pos_consistency.sql
+\i ./procedures/files_update.sql
+\i ./procedures/files_pos.sql
+\i ./procedures/delete_subtree.sql
+
+--
+-- Modules
+--
--- /dev/null
+INSERT INTO toolbox.pages(active, template, keyword, navigation_name, paragraph_links) VALUES (TRUE, 1, 'home', 'Home', TRUE);
+INSERT INTO toolbox.pages(active, template, parent, pos, navigation_name) VALUES(TRUE, 1, 0, 2, 'Parent');
+INSERT INTO toolbox.pages(active, template, parent, pos, navigation_name) VALUES(TRUE, 1, 2, 1, 'Child');
+INSERT INTO toolbox.pages(active, template, parent, pos, navigation_name) VALUES(TRUE, 1, 2, 2, 'Child Sibling');
+INSERT INTO toolbox.pages(active, template, parent, pos, navigation_name) VALUES(TRUE, 1, 3, 1, 'Grand Child');
+INSERT INTO toolbox.pages(active, template, parent, pos, navigation_name) VALUES(TRUE, 1, 3, 2, 'Grand Child Sibling');
+INSERT INTO toolbox.pages(active, template, parent, pos, navigation_name) VALUES(TRUE, 1, 0, 3, 'Sibling');
+
+INSERT INTO toolbox.paragraphs(active, title, description, image, caption, page, pos) VALUES(TRUE, 'Lorem Ipsum Delor', '<p>Dictumst quis adipiscing etiam odio et augue, ut, cum cras adipiscing dolor cursus eros in integer in enim, aliquet in, amet tempor porta scelerisque, a eros sociis nec, porta in, lacus lacus, integer phasellus vut sit? Massa turpis porttitor. In, enim pulvinar? Ac et, ac nascetur porttitor magnis natoque duis! Nisi, ac et, aliquet? Cras tempor dignissim! Adipiscing cursus vel, integer dis penatibus vut! Et? Nec lundium lacus nunc nunc tempor a pid cum turpis magnis urna est eu rhoncus porttitor mauris ridiculus eu! Dolor pid porta ac dis lorem phasellus, tincidunt eros montes auctor adipiscing? Sed adipiscing risus scelerisque scelerisque ridiculus tortor, ut aliquam. Aenean enim et. Lectus enim dapibus scelerisque eros elementum nec, sagittis arcu. Purus augue ac.</p>
+<p> Enim tincidunt pid, augue est magna velit lacus in tincidunt cras sed tempor! Sed. Dis adipiscing odio, urna mus! Natoque arcu elit. Dapibus natoque a ridiculus scelerisque nisi cras. Phasellus ultricies natoque augue sagittis mauris adipiscing porta pulvinar integer! Lacus adipiscing sit porta ultricies mus natoque amet porta etiam, mauris. Egestas! Et urna! Platea risus magnis porta magnis in! Integer turpis cursus enim ac, ac? Phasellus enim. Cras enim! Lectus pulvinar, ac porta elementum nec, vut elementum pulvinar dignissim elementum porta placerat porttitor a lundium, turpis velit et mattis augue hac tempor adipiscing, magnis, lectus, pulvinar diam. Scelerisque scelerisque. Nunc sagittis ut proin, tincidunt ultrices velit parturient, sit vel enim. Porta? Ac non! Magna tincidunt arcu augue aenean eros. </p>
+<p> Placerat et placerat massa aliquam aliquet scelerisque, urna lorem! Adipiscing rhoncus, pid natoque turpis, auctor. Placerat sit, non sed, mattis augue dis placerat amet elementum vel habitasse, placerat. Etiam cum magnis arcu nisi a proin mus sit tortor montes! Integer aliquam, pellentesque sed sit. Dis mattis magnis! Enim non tincidunt cursus urna urna magna etiam? Facilisis ultricies dapibus porttitor, turpis ac et placerat urna, urna turpis vel, porta purus ac non! Nunc lorem? Tincidunt quis sagittis ridiculus sit, turpis? A ut ac rhoncus. Aenean tristique a tincidunt. Ac in odio dis et nascetur, est proin. Nisi, aliquam elementum, sed. Nunc sociis. Ut enim, ultricies nascetur a magna porta duis ut tincidunt! Aenean, augue cursus tristique ridiculus, integer eros dolor.</p>', '', '', 1, 1);
+INSERT INTO toolbox.paragraphs(active, title, description, image, caption, back_to_top, page, pos) VALUES(TRUE, 'Paragraph A', '<p>Sit, et odio, risus proin adipiscing mattis! Est! Non lorem, et scelerisque sociis! Ac? Porttitor in, pid auctor, etiam hac sagittis dignissim scelerisque elementum? Nisi. Auctor in, lacus, enim vut, ac eros magna cursus nisi et! Vut tortor natoque rhoncus augue est tincidunt tortor in sed elementum, tristique purus. Nec nascetur porta adipiscing cum. Diam porttitor lorem hac parturient cras, pulvinar integer! Vel ac, rhoncus ridiculus ac magna est integer, ut ultrices! Pulvinar hac lundium pid pulvinar dapibus et rhoncus! Montes et pulvinar vut. Sit porta arcu turpis! Dictumst, proin pulvinar et turpis tristique odio aliquam, est odio hac dis? Elit elementum integer adipiscing turpis tincidunt massa? Habitasse dignissim lectus porta, nunc, aliquam est? Integer enim? Lectus, dignissim natoque, turpis.</p>', '', '', TRUE, 1, 1);
+INSERT INTO toolbox.paragraphs(active, title, description, image, caption, back_to_top, page, pos) VALUES(TRUE, 'Paragraph B', '<p>Tortor adipiscing ut magna cras elit elit elit, dis! Eros pid scelerisque, aenean sagittis odio tristique elementum sed sit, porta ridiculus! Eros lundium integer? Integer, pulvinar sociis mid! Enim, magna velit mattis et ultrices egestas sed egestas non pulvinar etiam! Urna porta et pulvinar lorem sed aliquam, ridiculus. Dolor aenean integer enim, amet porta enim penatibus, proin a ut tincidunt, turpis magnis lectus quis enim aliquet, mauris in vel quis! Facilisis dolor. Urna eu, amet quis, mattis sed! Phasellus lorem! Non platea. Sit elit sed proin mus, mauris mauris dignissim, tincidunt et augue placerat tristique elementum purus lundium a cursus platea pid, ultricies platea? Elit sed eu diam, elementum sit rhoncus massa, lorem hac, urna natoque sit a tincidunt vel.</p>', '', '', TRUE, 1, 1);
+INSERT INTO toolbox.paragraphs(active, title, description, image, caption, back_to_top, page, pos) VALUES(TRUE, 'Paragraph C', '<p>Porta, augue facilisis, arcu massa enim massa phasellus nisi elementum, aliquet sit phasellus sed nunc turpis, augue cum, cum lundium, ridiculus, vut sociis auctor! Tincidunt pulvinar, tempor eu mid amet? Odio, lacus ultrices, nunc purus, cursus in diam mattis et penatibus. Dolor. Elementum pid tincidunt magna penatibus risus, odio aliquet. Dapibus amet eros enim diam? Elit, urna elit porttitor platea. Nascetur proin odio habitasse aenean magnis? Facilisis nascetur? A elementum, lorem diam, phasellus phasellus montes magna proin? Habitasse risus, vel porta mauris tortor velit, egestas tortor augue. Vut sed placerat aliquet enim diam porttitor dignissim, montes, mattis enim! Egestas ultrices? Nec porta lundium dapibus! Dictumst turpis augue integer, proin nec lectus dictumst! Platea urna, rhoncus hac ac adipiscing a augue.</p>', '', '', TRUE, 1, 1);
+INSERT INTO toolbox.paragraphs(active, title, description, image, caption, page, pos) VALUES(TRUE, 'Parent Title', '<p>Dictumst quis adipiscing etiam odio et augue, ut, cum cras adipiscing dolor cursus eros in integer in enim, aliquet in, amet tempor porta scelerisque, a eros sociis nec, porta in, lacus lacus, integer phasellus vut sit? Massa turpis porttitor. In, enim pulvinar? Ac et, ac nascetur porttitor magnis natoque duis! Nisi, ac et, aliquet? Cras tempor dignissim! Adipiscing cursus vel, integer dis penatibus vut! Et? Nec lundium lacus nunc nunc tempor a pid cum turpis magnis urna est eu rhoncus porttitor mauris ridiculus eu! Dolor pid porta ac dis lorem phasellus, tincidunt eros montes auctor adipiscing? Sed adipiscing risus scelerisque scelerisque ridiculus tortor, ut aliquam. Aenean enim et. Lectus enim dapibus scelerisque eros elementum nec, sagittis arcu. Purus augue ac.</p>', '', '', 2, 1);
+INSERT INTO toolbox.paragraphs(active, title, description, image, caption, back_to_top, page, pos) VALUES(TRUE, 'Parent Paragraph A', '<p>Sit, et odio, risus proin adipiscing mattis! Est! Non lorem, et scelerisque sociis! Ac? Porttitor in, pid auctor, etiam hac sagittis dignissim scelerisque elementum? Nisi. Auctor in, lacus, enim vut, ac eros magna cursus nisi et! Vut tortor natoque rhoncus augue est tincidunt tortor in sed elementum, tristique purus. Nec nascetur porta adipiscing cum. Diam porttitor lorem hac parturient cras, pulvinar integer! Vel ac, rhoncus ridiculus ac magna est integer, ut ultrices! Pulvinar hac lundium pid pulvinar dapibus et rhoncus! Montes et pulvinar vut. Sit porta arcu turpis! Dictumst, proin pulvinar et turpis tristique odio aliquam, est odio hac dis? Elit elementum integer adipiscing turpis tincidunt massa? Habitasse dignissim lectus porta, nunc, aliquam est? Integer enim? Lectus, dignissim natoque, turpis.</p>', '', '', TRUE, 2, 1);
+INSERT INTO toolbox.paragraphs(active, title, description, image, caption, back_to_top, page, pos) VALUES(TRUE, 'Parent Paragraph B', '<p>Tortor adipiscing ut magna cras elit elit elit, dis! Eros pid scelerisque, aenean sagittis odio tristique elementum sed sit, porta ridiculus! Eros lundium integer? Integer, pulvinar sociis mid! Enim, magna velit mattis et ultrices egestas sed egestas non pulvinar etiam! Urna porta et pulvinar lorem sed aliquam, ridiculus. Dolor aenean integer enim, amet porta enim penatibus, proin a ut tincidunt, turpis magnis lectus quis enim aliquet, mauris in vel quis! Facilisis dolor. Urna eu, amet quis, mattis sed! Phasellus lorem! Non platea. Sit elit sed proin mus, mauris mauris dignissim, tincidunt et augue placerat tristique elementum purus lundium a cursus platea pid, ultricies platea? Elit sed eu diam, elementum sit rhoncus massa, lorem hac, urna natoque sit a tincidunt vel.</p>', '', '', TRUE, 2, 1);
+INSERT INTO toolbox.paragraphs(active, title, description, page, pos) VALUES(TRUE, 'Child Title', 'Child Description', 3, 1);
+INSERT INTO toolbox.paragraphs(active, title, description, page, pos) VALUES(TRUE, 'Sibling Title', 'Sibling Description', 7, 1);
+INSERT INTO toolbox.paragraphs(active, title, page, pos) VALUES(TRUE, 'Sibling Paragraph A', 7, 1);
+INSERT INTO toolbox.paragraphs(active, title, page, pos) VALUES(TRUE, 'Sibling Paragraph B', 7, 1);
+INSERT INTO toolbox.paragraphs(active, title, page, pos) VALUES(TRUE, 'p Paragraph', 4, 1);
+INSERT INTO toolbox.paragraphs(active, title, page, pos) VALUES(TRUE, 'p Paragraph', 5, 1);
+INSERT INTO toolbox.paragraphs(active, title, page, pos) VALUES(TRUE, 'p Paragraph', 6, 1);
+
+
+INSERT INTO members.city(state_id, city_name) VALUES (34, 'Cary');
+INSERT INTO members.city(state_id, city_name) VALUES (23, 'Petoskey');
+
+INSERT INTO members.member(member_name, member_login, member_passwd, street, lat, lon, phone, process_email, url, city_id, state_id, zip, member_contact_email, mailing_address, primary_contact_fname, primary_contact_lname, active, mailing_city, mailing_state_id, mailing_zip, new_member) values('1111 AAA Test', 'uname', 'pword', '120 E. Lake St.', 45.374893, -84.958404, '(231) 487-0692', 'jamie@gaslightmedia.com', 'http://www.gaslightmedia.com', 3, 23, 49770, 'jamie@gaslightmedia.com', '139 Dove Cottage Ln.', 'Jamie', 'Kahgee', true, 'Cary', 34, 27519, false);
+
+INSERT INTO coupons.coupons(title, url, sdate, edate, expiration, category, active, member) VALUES ('Coupon Test', 'http://www.google.com', '2010-04-22', '2010-10-22', '2010-10-22', 'Accommodations', true, 1);
--- /dev/null
+--DROP LANGUAGE IF EXISTS plpgsql RESTRICT;
+CREATE LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS check_pages_pos_consistency ON toolbox.pages;
+
+--
+-- Function and trigger checking for duplicate positions when a paragraph
+-- has been inserted or updated.
+--
+-- This trigger only happens after an insert or update and is initially
+-- deferred which allows us to wrap our movements in a transaction and
+-- examine the results when we are done
+--
+-- This is a final check to help ensure data integrity
+--
+CREATE OR REPLACE FUNCTION toolbox.check_pages_pos_consistency() RETURNS TRIGGER AS $check_pages_pos_consistency$
+ DECLARE
+ duplicates INTEGER;
+ BEGIN
+
+ SELECT
+ INTO duplicates count(*)
+ FROM toolbox.pages
+ WHERE parent = NEW.parent
+ AND pos = NEW.pos;
+
+ IF (duplicates > 1) THEN
+ RAISE EXCEPTION 'Duplicate page positions!';
+ END IF;
+
+ RETURN NULL;
+ END;
+$check_pages_pos_consistency$ LANGUAGE plpgsql;
+
+CREATE CONSTRAINT TRIGGER trigger_pages_pos_check_consistency
+AFTER INSERT OR UPDATE ON toolbox.pages
+ DEFERRABLE INITIALLY DEFERRED
+ FOR EACH ROW EXECUTE PROCEDURE toolbox.check_pages_pos_consistency();
--- /dev/null
+--DROP LANGUAGE IF EXISTS plpgsql RESTRICT;
+CREATE LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS check_paragraphs_pos_consistency ON toolbox.paragraphs;
+
+--
+-- Function and trigger checking for duplicate positions when a paragraph
+-- has been inserted or updated.
+--
+-- This trigger only happens after an insert or update and is initially
+-- deferred which allows us to wrap our movements in a transaction and
+-- examine the results when we are done
+--
+-- This is a final check to help ensure data integrity
+--
+CREATE OR REPLACE FUNCTION toolbox.check_paragraphs_pos_consistency() RETURNS TRIGGER AS $check_paragraphs_pos_consistency$
+ DECLARE
+ duplicates INTEGER;
+ BEGIN
+
+ SELECT
+ INTO duplicates count(*)
+ FROM toolbox.paragraphs
+ WHERE page = NEW.page
+ AND pos = NEW.pos;
+
+ IF (duplicates > 1) THEN
+ RAISE EXCEPTION 'Duplicate page positions!';
+ END IF;
+
+ RETURN NULL;
+ END;
+$check_paragraphs_pos_consistency$ LANGUAGE plpgsql;
+
+CREATE CONSTRAINT TRIGGER trigger_paragraphs_pos_check_consistency
+AFTER INSERT OR UPDATE ON toolbox.paragraphs
+ DEFERRABLE INITIALLY DEFERRED
+ FOR EACH ROW EXECUTE PROCEDURE toolbox.check_paragraphs_pos_consistency();
--- /dev/null
+DROP TABLE IF EXISTS WorkingTable;
+CREATE LOCAL TEMPORARY TABLE WorkingTable
+(id INTEGER NOT NULL)
+ON COMMIT DELETE ROWS;
+
+CREATE OR REPLACE FUNCTION toolbox.delete_subtree (IN dead_guy INTEGER) RETURNS void AS $$
+ DECLARE
+ old_pos INTEGER; -- current position of the target node
+ old_par INTEGER; -- current parent of the target node
+ BEGIN
+ -- defer consraint that forbids (parent = id)
+ SET CONSTRAINTS ALL DEFERRED;
+
+ -- set the old_pos and old_par variable
+ SELECT pos
+ INTO old_pos
+ FROM toolbox.pages
+ WHERE id = dead_guy;
+
+ SELECT parent
+ INTO old_par
+ FROM toolbox.pages
+ WHERE id = dead_guy;
+
+ -- mark root of subtree and immediate subordinates
+ UPDATE toolbox.pages
+ SET id = CASE WHEN id = dead_guy
+ THEN -99999 ELSE id END,
+ parent = CASE WHEN parent = dead_guy
+ THEN -99999 ELSE parent END
+ WHERE dead_guy IN (id, parent);
+
+ WHILE EXISTS -- mark leaf nodes
+ (SELECT *
+ FROM toolbox.pages
+ WHERE parent = -99999
+ AND id > -99999)
+ LOOP -- get list of next level subordinates
+
+ DELETE FROM WorkingTable;
+ INSERT INTO WorkingTable
+ SELECT id FROM toolbox.pages WHERE parent = -99999;
+
+ -- delete old markers so we don't keep an infinite loop
+ DELETE FROM toolbox.pages
+ WHERE parent = -99999;
+
+ -- mark next level of subordinates
+ UPDATE toolbox.pages
+ SET parent = -99999
+ WHERE parent IN (SELECT id FROM WorkingTable);
+
+ END LOOP;
+
+ -- delete all marked nodes
+ DELETE FROM toolbox.pages
+ WHERE id = -99999;
+
+ -- reset all the positions at the target nodes level
+ UPDATE toolbox.pages
+ SET pos = pos - 1
+ WHERE parent = old_par
+ AND pos > old_pos;
+
+ SET CONSTRAINTS ALL IMMEDIATE;
+ END;
+$$ LANGUAGE plpgsql;
--- /dev/null
+--DROP LANGUAGE IF EXISTS plpgsql RESTRICT;
+CREATE LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS files_pos ON toolbox.files;
+
+--
+-- Function and trigger setting a page pos when inserted
+--
+CREATE OR REPLACE FUNCTION toolbox.files_pos() RETURNS TRIGGER AS $files_pos$
+ DECLARE
+ new_pos INTEGER;
+ BEGIN
+
+ SELECT
+ INTO new_pos COALESCE(MAX(pos) + 1, 1)
+ FROM toolbox.files
+ WHERE paragraph = NEW.paragraph;
+
+ NEW.pos := new_pos;
+
+ RETURN NEW;
+
+ END;
+$files_pos$ LANGUAGE plpgsql;
+
+CREATE TRIGGER files_pos
+BEFORE INSERT ON toolbox.files
+ FOR EACH ROW EXECUTE PROCEDURE toolbox.files_pos();
--- /dev/null
+--DROP LANGUAGE IF EXISTS plpgsql RESTRICT;
+CREATE LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS files_update ON toolbox.files;
+
+--
+-- Function and trigger copying a file revision
+-- everytime it is updated.
+--
+CREATE OR REPLACE FUNCTION toolbox.files_update() RETURNS TRIGGER AS $files_update$
+ BEGIN
+
+ INSERT INTO toolbox.files_history SELECT NEW.*;
+ RETURN NEW;
+ END;
+$files_update$ LANGUAGE plpgsql;
+
+CREATE TRIGGER files_update
+AFTER INSERT OR UPDATE ON toolbox.files
+ FOR EACH ROW EXECUTE PROCEDURE toolbox.files_update();
--- /dev/null
+--DROP LANGUAGE IF EXISTS plpgsql RESTRICT;
+CREATE LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS pages_pos ON toolbox.pages;
+
+--
+-- Function and trigger setting a page pos when inserted
+--
+CREATE OR REPLACE FUNCTION toolbox.pages_pos() RETURNS TRIGGER AS $pages_pos$
+ DECLARE
+ new_pos INTEGER;
+ BEGIN
+
+ SELECT
+ INTO new_pos COALESCE(MAX(pos) + 1, 1)
+ FROM toolbox.pages
+ WHERE parent = NEW.parent;
+
+ NEW.pos := new_pos;
+
+ RETURN NEW;
+
+ END;
+$pages_pos$ LANGUAGE plpgsql;
+
+CREATE TRIGGER pages_pos
+BEFORE INSERT ON toolbox.pages
+ FOR EACH ROW EXECUTE PROCEDURE toolbox.pages_pos();
--- /dev/null
+--DROP LANGUAGE IF EXISTS plpgsql RESTRICT;
+CREATE LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS pages_update ON toolbox.pages;
+
+--
+-- Function and trigger copying a page revision
+-- everytime it is updated.
+--
+CREATE OR REPLACE FUNCTION toolbox.pages_update() RETURNS TRIGGER AS $pages_update$
+ BEGIN
+
+ INSERT INTO toolbox.pages_history
+ (id,active,mobile_active,headline,headline_intro,include_member_map,
+ keyword,meta_description,meta_title,navigation_name,
+ paragraph_links,parent,pos,search_form,region,short_url,
+ template,include_members,include_coupons)
+ SELECT
+ NEW.id,NEW.active,NEW.mobile_active,NEW.headline,NEW.headline_intro,NEW.include_member_map,
+ NEW.keyword,NEW.meta_description,NEW.meta_title,NEW.navigation_name,
+ NEW.paragraph_links,NEW.parent,NEW.pos,NEW.search_form,NEW.region,
+ NEW.short_url,NEW.template,NEW.include_members,NEW.include_coupons;
+ RETURN NEW;
+
+ END;
+$pages_update$ LANGUAGE plpgsql;
+
+CREATE TRIGGER pages_update
+AFTER INSERT OR UPDATE ON toolbox.pages
+ FOR EACH ROW EXECUTE PROCEDURE toolbox.pages_update();
--- /dev/null
+--DROP LANGUAGE IF EXISTS plpgsql RESTRICT;
+CREATE LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS paragraphs_draft_pos ON toolbox.paragraphs_draft;
+
+--
+-- Function and trigger setting a page pos when inserted
+--
+CREATE OR REPLACE FUNCTION toolbox.paragraphs_draft_pos() RETURNS TRIGGER AS $paragraphs_draft_pos$
+ DECLARE
+ new_pos INTEGER;
+ BEGIN
+
+ SELECT
+ INTO new_pos COALESCE(MAX(pos) + 1, 1)
+ FROM toolbox.paragraphs_draft
+ WHERE page = NEW.page;
+
+ NEW.pos := new_pos;
+
+ RETURN NEW;
+
+ END;
+$paragraphs_draft_pos$ LANGUAGE plpgsql;
+
+CREATE TRIGGER paragraphs_draft_pos
+BEFORE INSERT ON toolbox.paragraphs_draft
+ FOR EACH ROW EXECUTE PROCEDURE toolbox.paragraphs_draft_pos();
--- /dev/null
+--DROP LANGUAGE IF EXISTS plpgsql RESTRICT;
+CREATE LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS paragraphs_pos ON toolbox.paragraphs;
+
+--
+-- Function and trigger setting a page pos when inserted
+--
+CREATE OR REPLACE FUNCTION toolbox.paragraphs_pos() RETURNS TRIGGER AS $paragraphs_pos$
+ DECLARE
+ new_pos INTEGER;
+ BEGIN
+
+ SELECT
+ INTO new_pos COALESCE(MAX(pos) + 1, 1)
+ FROM toolbox.paragraphs
+ WHERE page = NEW.page;
+
+ -- Always use the new position when doing an insert
+ IF (TG_OP = 'INSERT') THEN
+ NEW.pos := new_pos;
+ ELSIF (TG_OP = 'UPDATE') THEN
+ -- Only update the paragraph position
+ -- on an update if we are changing the
+ -- page the paragraph is assigned to
+ IF (OLD.page != NEW.page) THEN
+ NEW.pos := new_pos;
+
+ -- update the old page paragraph positions so
+ -- we aren't left with any gaps in the sequence
+ UPDATE toolbox.paragraphs
+ SET pos = pos - 1
+ WHERE pos > OLD.pos
+ AND page = OLD.page
+ AND EXISTS (SELECT * -- ensure the old page still exists
+ FROM toolbox.pages
+ WHERE id = OLD.page);
+ END IF;
+ END IF;
+
+ RETURN NEW;
+
+ END;
+$paragraphs_pos$ LANGUAGE plpgsql;
+
+CREATE TRIGGER paragraphs_pos
+BEFORE INSERT OR UPDATE ON toolbox.paragraphs
+ FOR EACH ROW EXECUTE PROCEDURE toolbox.paragraphs_pos();
--- /dev/null
+--DROP LANGUAGE IF EXISTS plpgsql RESTRICT;
+CREATE LANGUAGE plpgsql;
+
+DROP TRIGGER IF EXISTS paragraphs_update ON toolbox.paragraphs;
+
+--
+-- Function and trigger copying a paragraph revision
+-- everytime it is updated.
+--
+CREATE OR REPLACE FUNCTION toolbox.paragraphs_update() RETURNS TRIGGER AS $paragraphs_update$
+ BEGIN
+
+ INSERT INTO toolbox.paragraphs_history SELECT NEW.*;
+ RETURN NEW;
+
+ END;
+$paragraphs_update$ LANGUAGE plpgsql;
+
+CREATE TRIGGER paragraphs_update
+AFTER INSERT OR UPDATE ON toolbox.paragraphs
+ FOR EACH ROW EXECUTE PROCEDURE toolbox.paragraphs_update();
--- /dev/null
+--
+-- This will drop everything in the toolbox schema.
+-- Nothing better be in here except toolbox related objects
+-- or it will be dropped
+--
+-- The force is strong w/ this one, use it wisely.
+--
+DROP SCHEMA IF EXISTS toolbox CASCADE;
--- /dev/null
+DROP TABLE IF EXISTS toolbox.files CASCADE;
+
+CREATE TABLE toolbox.files
+(id SERIAL,
+ filename TEXT,
+ bytes INTEGER NOT NULL DEFAULT 0,
+ "type" TEXT NOT NULL,
+ urltext TEXT,
+ paragraph INTEGER NOT NULL
+ REFERENCES toolbox.paragraphs(id)
+ ON UPDATE CASCADE
+ ON DELETE CASCADE,
+ pos INTEGER NOT NULL DEFAULT 1,
+ PRIMARY KEY (id));
+
+GRANT ALL ON toolbox.files_id_seq TO nobody;
+GRANT ALL ON toolbox.files TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS toolbox.files_draft CASCADE;
+
+CREATE TABLE toolbox.files_draft
+(LIKE toolbox.files
+ INCLUDING DEFAULTS,
+ FOREIGN KEY (paragraph) REFERENCES toolbox.paragraphs_draft(id)
+ ON UPDATE CASCADE
+ ON DELETE CASCADE,
+ PRIMARY KEY (id)
+);
+
+GRANT ALL ON toolbox.files_draft TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS toolbox.files_history CASCADE;
+
+CREATE TABLE toolbox.files_history
+(LIKE toolbox.files
+ INCLUDING DEFAULTS,
+ revision SERIAL NOT NULL
+);
+
+GRANT ALL ON toolbox.files_history_revision_seq TO nobody;
+GRANT ALL ON toolbox.files_history TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS toolbox.pages CASCADE;
+
+CREATE TABLE toolbox.pages
+(id SERIAL,
+ active BOOLEAN NOT NULL
+ DEFAULT FALSE,
+ mobile_active BOOLEAN NOT NULL
+ DEFAULT FALSE,
+ headline BOOLEAN NOT NULL
+ DEFAULT FALSE,
+ headline_intro TEXT,
+ include_member_map BOOLEAN NOT NULL
+ DEFAULT FALSE,
+ keyword TEXT,
+ meta_description TEXT,
+ meta_title TEXT,
+ navigation_name TEXT,
+ paragraph_links BOOLEAN NOT NULL
+ DEFAULT FALSE,
+ parent INTEGER NOT NULL -- 0 is top level
+ DEFAULT 0,
+ pos INTEGER NOT NULL
+ DEFAULT 1,
+ search_form BOOLEAN NOT NULL
+ DEFAULT FALSE,
+ region INTEGER,
+ short_url TEXT,
+ template INTEGER NOT NULL,
+ include_members BOOLEAN DEFAULT FALSE,
+ include_coupons BOOLEAN DEFAULT FALSE,
+ PRIMARY KEY (id),
+ CHECK (id <> parent), -- Page cannot be own parent,
+ CHECK (pos > 0)); -- Page position cannot fall below zero
+
+GRANT ALL ON toolbox.pages_id_seq TO nobody;
+GRANT ALL ON toolbox.pages TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS toolbox.pages_draft CASCADE;
+
+CREATE TABLE toolbox.pages_draft
+(LIKE toolbox.pages
+ INCLUDING DEFAULTS,
+ published_page INTEGER
+ DEFAULT NULL
+ REFERENCES toolbox.pages (id)
+ ON UPDATE CASCADE
+ ON DELETE CASCADE,
+ PRIMARY KEY (id)
+);
+
+GRANT ALL ON toolbox.pages_draft TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS toolbox.pages_history CASCADE;
+
+CREATE TABLE toolbox.pages_history
+(LIKE toolbox.pages
+ INCLUDING DEFAULTS,
+ revision_timestamp TIMESTAMP NOT NULL
+ DEFAULT CURRENT_TIMESTAMP,
+ revision SERIAL NOT NULL
+);
+
+GRANT ALL ON toolbox.pages_history_revision_seq TO nobody;
+GRANT ALL ON toolbox.pages_history TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS toolbox.pages_mobile CASCADE;
+
+CREATE TABLE toolbox.pages_mobile
+(id SERIAL,
+ page INTEGER NOT NULL
+ REFERENCES toolbox.pages(id)
+ ON DELETE CASCADE,
+ mobile_active BOOLEAN NET NULL
+ DEFAULT FALSE,
+PRIMARY KEY (id));
+
+GRANT ALL ON toolbox.pages_mobile TO nobody;
+GRANT ALL ON toolbox.pages_mobile_id_seq TO nobody;
+
+CREATE UNIQUE INDEX page_mobile_page_indx ON toolbox.pages_mobile(page);
--- /dev/null
+CREATE TEMPORARY TABLE toolbox.pages_preview
+(LIKE toolbox.pages
+ INCLUDING DEFAULTS,
+ PRIMARY KEY (id)
+);
+
+GRANT ALL ON toolbox.pages_preview TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS toolbox.paragraphs CASCADE;
+
+CREATE TABLE toolbox.paragraphs
+(id SERIAL,
+ active BOOLEAN NOT NULL
+ DEFAULT TRUE,
+ back_to_top BOOLEAN NOT NULL
+ DEFAULT FALSE,
+ caption TEXT,
+ description TEXT,
+ image TEXT,
+ page INTEGER NOT NULL
+ REFERENCES toolbox.pages (id)
+ ON UPDATE CASCADE
+ ON DELETE CASCADE,
+ pos INTEGER NOT NULL
+ DEFAULT 1,
+ title TEXT,
+ PRIMARY KEY (id),
+ CHECK (pos > 0)); -- paragraph position cannot fall below zero
+
+GRANT ALL ON toolbox.paragraphs_id_seq TO nobody;
+GRANT ALL ON toolbox.paragraphs TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS toolbox.paragraphs_draft CASCADE;
+
+CREATE TABLE toolbox.paragraphs_draft
+(LIKE toolbox.paragraphs
+ INCLUDING DEFAULTS,
+ FOREIGN KEY (page) REFERENCES toolbox.pages_draft(id)
+ ON UPDATE CASCADE
+ ON DELETE CASCADE,
+ PRIMARY KEY (id)
+);
+
+GRANT ALL ON toolbox.paragraphs_draft TO nobody;
--- /dev/null
+DROP TABLE IF EXISTS toolbox.paragraphs_history CASCADE;
+
+CREATE TABLE toolbox.paragraphs_history
+(LIKE toolbox.paragraphs
+ INCLUDING DEFAULTS,
+ revision SERIAL NOT NULL
+);
+
+GRANT ALL ON toolbox.paragraphs_history_revision_seq TO nobody;
+GRANT ALL ON toolbox.paragraphs_history TO nobody;
--- /dev/null
+CREATE TEMPORARY TABLE toolbox.paragraphs_preview
+(LIKE toolbox.paragraphs
+ INCLUDING DEFAULTS
+);
+
+GRANT ALL ON toolbox.paragraphs_preview TO nobody;
--- /dev/null
+<?php
+class Toolkit_Toolbox_DraftPagesTree extends Toolkit_Toolbox_PagesTree
+{
+ // {{{ createTree()
+
+ protected function createTree(array $tree, $leaf, $level = 0)
+ {
+ $html = !$level ? $this->rootNodeStart : $this->subTreeStart;
+
+ if (is_array($leaf) && !empty($leaf)) {
+ foreach ($tree as $parent => $children) {
+ foreach ($children as $branch) {
+ $html .= sprintf($this->leafStart, $branch['id'], null);
+ $previewUrl = BASE_URL . "index.php?rt=Draft&catid={$branch['id']}";
+
+ $html .= "<strong>{$branch['navigation_name']}</strong>";
+
+ $html .= '<div class="right-element">';
+
+ $html .= '<a href="'.MEDIA_BASE_URL.'admin/toolbox.php?rt=EditDraft&id='.$branch['id'].'" class="editPage">[Edit]</a> ';
+ $html .= '<a href="'.MEDIA_BASE_URL.'admin/toolbox.php?rt=ParagraphsDraft&pageid='.$branch['id'].'" class="editParagraphs">[Paragraphs]</a> ';
+ $html .= '<a href="'.$previewUrl.'" class="pagePreview">[Preview]</a> ';
+ $html .= $this->getActiveBall($branch);
+
+ $html .= '</div>';
+
+ $html .= $this->leafEnd;
+ }
+ }
+ }
+
+ $html .= $this->treeEnd;
+ if ($level) {
+ $html .= $this->leafEnd;
+ }
+
+ return $html;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+class Toolkit_Toolbox_EditDraftController
+ extends Toolkit_Toolbox_FormControllerAbstract
+{
+ // {{{ cancel()
+
+ protected function cancel()
+ {
+ header('Location: ' . MEDIA_BASE_URL . 'admin/toolbox.php?rt=EditDraft');
+ exit();
+ }
+
+ // }}}
+
+ // {{{ delete()
+
+ protected function delete($id)
+ {
+ $gateway = new Toolkit_Toolbox_PageGatewayDraft($this->registry->dbh);
+ $gateway->delete($id);
+ }
+
+ // }}}
+
+ // {{{ indexAction()
+
+ public function indexAction()
+ {
+ if (ctype_digit($_GET['id'])) {
+ $breadCrumbs = new Toolkit_Toolbox_PageDraftBreadCrumbs(
+ $this->registry->dbh,
+ $_GET['id']
+ );
+ $html = (string) $breadCrumbs;
+ }
+
+ $form = $this->getForm(
+ 'EditDraft',
+ new Toolkit_Toolbox_PageGatewayDraftFactory($this->registry->dbh)
+ );
+ $html .= $form->toHtml($this->registry->dbh);
+
+ return $html;
+ }
+
+ // }}}
+
+ protected function preview($form)
+ {
+ die('preview');
+ }
+
+ // {{{ processAction()
+
+ public function processAction()
+ {
+ return $this->processForm(
+ 'EditDraft',
+ new Toolkit_Toolbox_PageGatewayDraftFactory($this->registry->dbh),
+ new Cache_Lite($GLOBALS['cacheOptions'])
+ );
+ }
+
+ // }}}
+ // {{{ publishPage()
+
+ protected function publishPage(HTML_QuickForm $form, Cache_Lite $cache)
+ {
+ $pageGatewayDraft = new Toolkit_Toolbox_PageGatewayDraft(
+ $this->registry->dbh
+ );
+ $pageGatewayPublish = new Toolkit_Toolbox_PageGatewayPublish(
+ $this->registry->dbh
+ );
+ $paragraphGatewayDraft = new Toolkit_Toolbox_ParagraphGatewayDraft(
+ $this->registry->dbh
+ );
+ $paragraphGatewayPublish = new Toolkit_Toolbox_ParagraphGatewayPublish(
+ $this->registry->dbh
+ );
+
+ if ($form->validate()) {
+ $draftPageId = $form->getSubmitValue('id');
+ $existingDraft = $pageGatewayDraft->find($draftPageId);
+ if (is_null($existingDraft['published_page'])) {
+ $publishId = $pageGatewayPublish->insert(
+ $form->getSubmitValues()
+ );
+
+ $paragraphs = $paragraphGatewayDraft->findAll(
+ $form->getSubmitValue('id')
+ );
+
+ $this->_convertOldFilesToUploadedFiles(
+ $paragraphGatewayPublish,
+ $paragraphs,
+ $publishId
+ );
+ } else {
+ $pageGatewayPublish->update(
+ $form->getSubmitValues(),
+ $existingDraft['published_page']
+ );
+
+ $existingParagraphs = $paragraphGatewayPublish->findAll(
+ $existingDraft['published_page']
+ );
+
+ foreach ($existingParagraphs as $paragraph) {
+ $paragraphGatewayPublish->delete($paragraph['id']);
+ }
+
+ $updatedParagraphs = $paragraphGatewayDraft->findAll(
+ $form->getSubmitValue('id')
+ );
+
+ $this->_convertOldFilesToUploadedFiles(
+ $paragraphGatewayPublish,
+ $updatedParagraphs,
+ $existingDraft['published_page']
+ );
+ }
+
+ $pageGatewayDraft->delete($draftPageId);
+ $cache->clean('Nav');
+ if ($existingDraft['published_page']) {
+ $cache->remove("page-{$existingDraft['published_page']}", 'Toolbox');
+ $cache->remove("paragraphs-{$existingDraft['published_page']}", 'Toolbox');
+ $cache->remove("sectionLinks-{$existingDraft['published_page']}", 'Toolbox');
+ }
+
+ header('Location: ' . MEDIA_BASE_URL . 'admin/toolbox.php');
+ exit();
+ } else {
+ $return = $form->getErrorMessage();
+ $return .= $form->toHtml();
+
+ return $return;
+ }
+ }
+
+ // }}}
+
+ // {{{ _convertOldFilesToUploadedFiles()
+
+ private function _convertOldFilesToUploadedFiles(
+ Toolkit_Toolbox_ParagraphGatewayAbstract $paragraphGateway,
+ &$paragraphs,
+ $newPageId
+ ) {
+ if (is_array($paragraphs)) {
+ foreach ($paragraphs as &$paragraph) {
+ if (is_array($paragraph['files'])) {
+ $paragraph['uploaded_files'] = array(
+ 'urltext' => array(),
+ 'filename' => array(),
+ 'bytes' => array(),
+ 'type' => array()
+ );
+ foreach ($paragraph['files'] as $file) {
+ $paragraph['uploaded_files']['urltext'][] = $file['urltext'];
+ $paragraph['uploaded_files']['filename'][] = $file['filename'];
+ $paragraph['uploaded_files']['bytes'][] = $file['bytes'];
+ $paragraph['uploaded_files']['type'][] = $file['type'];
+ }
+ }
+ $paragraph['page'] = $newPageId;
+ $paragraphGateway->insert($paragraph);
+ }
+ }
+ }
+
+ // }}}
+
+ // {{{ saveDraft()
+
+ protected function saveDraft(HTML_QuickForm $form)
+ {
+ $gateway = new Toolkit_Toolbox_PageGatewayDraft($this->registry->dbh);
+ if ($form->validate()) {
+ $pageId = $form->getSubmitValue('id');
+ if ($pageId) {
+ $gateway->update($form->getSubmitValues(), $pageId);
+ } else {
+ $gateway->insert($form->getSubmitValues());
+ }
+ header('Location: ' . MEDIA_BASE_URL . 'admin/toolbox.php');
+ exit();
+ } else {
+ $return = $form->getErrorMessage();
+ $return .= $form->toHtml();
+
+ return $return;
+ }
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+class Toolkit_Toolbox_EditPageController
+ extends Toolkit_Toolbox_FormControllerAbstract
+{
+ // {{{ cancel()
+
+ protected function cancel()
+ {
+ header('Location: ' . MEDIA_BASE_URL . 'admin/toolbox.php');
+ exit();
+ }
+
+ // }}}
+
+ // {{{ delete ()
+
+ protected function delete($id)
+ {
+ $gateway = new Toolkit_Toolbox_PageGatewayPublish($this->registry->dbh);
+ $gateway->delete($id);
+ }
+
+ // }}}
+
+ // {{{ indexAction()
+
+ public function indexAction()
+ {
+ if ($pageId = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT)) {
+ $breadCrumbs = new Toolkit_Toolbox_PageBreadCrumbs(
+ $this->registry->dbh,
+ $pageId
+ );
+ $html = (string) $breadCrumbs;
+ }
+
+ $form = $this->getForm(
+ 'EditPage',
+ new Toolkit_Toolbox_PageGatewayPublishFactory($this->registry->dbh)
+ );
+ $html .= $form->toHtml($this->registry->dbh);
+
+ return $html;
+ }
+
+ // }}}
+
+ // {{{ processAction()
+
+ public function processAction()
+ {
+ return $this->processForm(
+ 'EditPage',
+ new Toolkit_Toolbox_PageGatewayPublishFactory($this->registry->dbh),
+ new Cache_Lite($GLOBALS['cacheOptions'])
+ );
+ }
+
+ // }}}
+ // {{{ publishPage()
+
+ protected function publishPage(HTML_QuickForm $form, Cache_Lite $cache)
+ {
+ $gateway = new Toolkit_Toolbox_PageGatewayPublish($this->registry->dbh);
+ if ($form->validate()) {
+ $pageId = $form->getSubmitValue('id');
+ if ($pageId) {
+ $gateway->update($form->getSubmitValues(), $pageId);
+ } else {
+ $gateway->insert($form->getSubmitValues());
+ }
+
+ $cache->clean('Nav');
+ $cache->remove("page-$pageId", 'Toolbox');
+ $cache->remove("paragraphs-$pageId", 'Toolbox');
+ $cache->remove("sectionLinks-$pageId", 'Toolbox');
+
+ header('Location: ' . MEDIA_BASE_URL . 'admin/toolbox.php');
+ exit();
+ } else {
+ $return = $form->getErrorMessage();
+ $return .= $form->toHtml();
+
+ return $return;
+ }
+ }
+
+ // }}}
+
+ // {{{ saveDraft()
+
+ protected function saveDraft(HTML_QuickForm $form)
+ {
+ $pageGatewayDraft = new Toolkit_Toolbox_PageGatewayDraft(
+ $this->registry->dbh
+ );
+ $paragraphGatewayPublish = new Toolkit_Toolbox_ParagraphGatewayPublish(
+ $this->registry->dbh
+ );
+ $paragraphGatewayDraft = new Toolkit_Toolbox_ParagraphGatewayDraft(
+ $this->registry->dbh
+ );
+
+ if ($form->validate()) {
+ $draftId = $pageGatewayDraft->insert($form->getSubmitValues());
+
+ // drafting an already published page,
+ // need to bring over the paragraphs
+ if (ctype_digit($form->getSubmitValue('id'))) {
+ $paragraphs = $paragraphGatewayPublish->findAll(
+ $form->getSubmitValue('id')
+ );
+
+ if (is_array($paragraphs)) {
+ foreach ($paragraphs as &$paragraph) {
+ if (is_array($paragraph['files'])) {
+ $paragraph['uploaded_files'] = array(
+ 'urltext' => array(),
+ 'filename' => array(),
+ 'bytes' => array(),
+ 'type' => array()
+ );
+ foreach ($paragraph['files'] as $file) {
+ $paragraph['uploaded_files']['urltext'][] = $file['urltext'];
+ $paragraph['uploaded_files']['filename'][] = $file['filename'];
+ $paragraph['uploaded_files']['bytes'][] = $file['bytes'];
+ $paragraph['uploaded_files']['type'][] = $file['type'];
+ }
+ }
+ $paragraph['page'] = $draftId;
+ $paragraphGatewayDraft->insert($paragraph);
+ }
+ }
+ }
+
+ header('Location: ' . MEDIA_BASE_URL . 'admin/toolbox.php?rt=ListDrafts');
+ exit();
+ } else {
+ $return = $form->getErrorMessage();
+ $return .= $form->toHtml();
+
+ return $return;
+ }
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+class Toolkit_Toolbox_Exception extends Exception {}
+?>
--- /dev/null
+<?php
+/**
+ * FileExtension.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Toolbox
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+
+/**
+ * Toolkit_Toolbox_FileExtension
+ *
+ * Description for Toolkit_Toolbox_FileExtension
+ *
+ * @category Toolkit
+ * @package Toolbox
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+class Toolkit_Toolbox_FileExtension
+{
+ // {{{ getImage()
+
+ /**
+ * Description for getImage()
+ *
+ * @param string $filename File name
+ *
+ * @return string
+ * @access public
+ */
+ public function getImage($filename)
+ {
+ switch (pathinfo($filename, PATHINFO_EXTENSION)) {
+ case 'avi' :
+ $img = 'avi.gif';
+ break;
+
+ case 'mp3' :
+ $img = 'mp3.gif';
+ break;
+
+ case 'pdf' :
+ $img = 'pdf.png';
+ break;
+
+ case 'xls' :
+ case 'xlsx' :
+ $img = 'xls.gif';
+ break;
+
+ case 'ppt' :
+ $img = 'ppt.gif';
+ break;
+
+ case 'mov' :
+ $img = 'mov.gif';
+ break;
+
+ case 'cad' :
+ $img = 'cad.gif';
+ break;
+
+ case 'html' :
+ $img = 'html.gif';
+ break;
+
+ case 'doc' :
+ case 'docx' :
+ case 'msword' :
+ $img = 'doc.gif';
+ break;
+
+ case 'txt' :
+ $img = 'txt.png';
+ break;
+
+ case 'zip' :
+ $img = 'zip.png';
+ break;
+
+ case 'rar' :
+ $img = 'rar.gif';
+ break;
+
+ case 'png' : // image does not exist yet.
+ case 'jpeg' :
+ case 'jpg' :
+ $img = 'jpg.gif';
+ break;
+
+ case 'gif' :
+ $img = 'gif.gif';
+ break;
+
+ case 'wmv' :
+ $img = 'wmv.gif';
+ break;
+
+ default :
+ $img = 'download.gif';
+ break;
+ }
+
+ return $img;
+ }
+
+ // }}}
+ // {{{ getClassForType()
+
+ /**
+ * Description for getClassForType()
+ *
+ * @param string $filename File name
+ *
+ * @return string
+ * @access public
+ */
+ public function getClassForType($filename)
+ {
+ $image = $this->getImage($filename);
+ $pieces = explode('.', $image);
+ reset($pieces);
+ return current($pieces);
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+abstract class Toolkit_Toolbox_FormControllerAbstract
+ extends Toolkit_BaseControllerAbstract implements Toolkit_IController
+{
+ // {{{ getForm()
+
+ protected function getForm(
+ $controller,
+ Toolkit_Toolbox_GatewayFactoryAbstract $factory
+ ) {
+ // Need three separate objects otherwise,
+ // new parses overwrite existing root variable data.
+
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ $memConf = new Config;
+ $memRoot =& $memConf->parseConfig(
+ BASE . 'Toolkit/Members/config.ini',
+ 'IniFile'
+ );
+ }
+
+ if (defined('COUPONS') && COUPONS) {
+ $cpnConf = new Config;
+ $cpnRoot =& $cpnConf->parseConfig(
+ BASE . 'Toolkit/Coupons/config.ini',
+ 'IniFile'
+ );
+ }
+ $tlbConf = new Config;
+ $tbxRoot =& $tlbConf->parseConfig(
+ BASE . 'Toolkit/Toolbox/config.ini',
+ 'IniFile'
+ );
+
+ $form = new Toolkit_Toolbox_Forms_EditPage(
+ 'edit_page',
+ 'post',
+ MEDIA_BASE_URL . "admin/toolbox.php?rt=$controller&ac=process"
+ );
+
+ $form->configureForm(
+ $this->registry->dbh,
+ $factory,
+ new Toolkit_FileServer_ImageAdapter(),
+ $memRoot,
+ $cpnRoot
+ );
+
+ return $form;
+ }
+
+ // }}}
+
+ // {{{ savePage()
+
+ protected function savePage(
+ Toolkit_Toolbox_PageGatewayAbstract $gateway,
+ HTML_QuickForm $form
+ ) {
+ if ($form->validate()) {
+ $pageId = $form->getSubmitValue('id');
+ if ($pageId) {
+ $gateway->update($form->getSubmitValues(), $pageId);
+ } else {
+ $gateway->insert($form->getSubmitValues());
+ }
+ header('Location: ' . MEDIA_BASE_URL . 'admin/toolbox.php');
+ exit();
+ } else {
+ $return = $form->getErrorMessage();
+ $return .= $form->toHtml();
+
+ return $return;
+ }
+ }
+
+ // }}}
+
+ // {{{ processForm()
+
+ protected function processForm(
+ $controller,
+ Toolkit_Toolbox_GatewayFactoryAbstract $factory,
+ Cache_Lite $cache
+ ) {
+ $form = $this->getForm($controller, $factory);
+
+ if ($form->isSubmitted()) {
+ if ($form->getSubmitValue('cancel')) {
+ // do nothing
+ $this->cancel();
+ } elseif ($form->getSubmitValue('previewPage')) {
+ $this->preview();
+ } elseif ($form->getSubmitValue('saveDraft')) {
+ // save draft
+ $return = $this->saveDraft($form);
+ } elseif ($form->getSubmitValue('publishPage')) {
+ // publish page
+ $return = $this->publishPage($form, $cache);
+ } elseif ($form->getSubmitValue('deletePage')) {
+ // delete page
+ $this->delete($form->getSubmitValue('id'));
+ $navTitle = $form->getSubmitValue('navigation_name');
+ $return = "[<b>$navTitle</b>] successfully deleted.";
+ } else {
+ $return = $form->getErrorMessage();
+ $return .= $form->toHtml();
+ }
+ } else {
+ $return = $form->toHtml();
+ }
+
+ return $return;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * Toolbox page edit form
+ *
+ * PHP version 5
+ *
+ * @category Toolbox
+ * @package Toolkit_Toolbox
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @release CVS: $Id: EditPage.php,v 1.10 2010/08/15 19:29:57 jamie Exp $:
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+
+require_once BASE . 'Toolkit/Forms/Rules/Image.php';
+require_once BASE . 'Toolkit/Forms/Rules/ShortUrl.php';
+
+/**
+ * Edit Toolbox page
+ *
+ * Handles form to insert/edit a toolbox page
+ *
+ * @category Toolbox
+ * @package Toolkit_Toolbox
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_Toolbox_Forms_EditPage
+ extends Toolkit_FormBuilder
+{
+ // {{{ properties
+
+ /**
+ * How many levels deep do you want to show in the parent select list
+ *
+ * 0 = Show All Levels
+ *
+ * @var integer
+ * @access protected
+ */
+ protected $maxDepth = 0;
+
+ /**
+ * Don't need to register any rules for this form.
+ * @var array
+ * @access protected
+ */
+ protected $registeredRules = array();
+
+ // }}}
+
+ // {{{ configureConstants()
+
+ /**
+ * Configure form constants
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return void
+ * @access public
+ */
+ public function configureConstants(PDO $dbh)
+ {
+ $c = array(
+ 'id' => $_GET['id']
+ );
+
+ $this->setupConstants($c);
+ }
+
+ // }}}
+ // {{{ configureDefaults()
+
+ /**
+ * Initializes default form values
+ *
+ * @param Toolkit_Toolbox_GatewayFactoryAbstract $factory Gateway factory
+ * @param integer $id page id (optional)
+ *
+ * @return void
+ * @access public
+ */
+ public function configureDefaults(
+ Toolkit_Toolbox_GatewayFactoryAbstract $factory,
+ $id = null
+ ) {
+ if (!is_null($id)) {
+ $gateway = $factory->createGateway();
+ $page = $gateway->find($id);
+ } else {
+ $page = array(
+ 'template' => 1,
+ 'current_image_thumb' => 'Image not yet uploaded',
+ 'search_form' => 1
+ );
+ }
+ $this->setupDefaults($page);
+ }
+
+ // }}}
+ // {{{ configureElements()
+
+ /**
+ * Form element definitions
+ *
+ * @param PDO $dbh Database handler
+ * @param Config_Container $memRoot Configuration object
+ * @param Config_Container $cpnRoot Configuration object
+ *
+ * @return void
+ * @access public
+ */
+ public function configureElements(
+ PDO $dbh,
+ Config_Container $memRoot = null,
+ Config_Container $cpnRoot = null,
+ $id = null
+ ) {
+ $e = array();
+
+ if (!is_null($memRoot)) {
+ $pluralMem = $memRoot->getItem('section', 'listing type')
+ ->getItem('directive', 'plural')
+ ->getContent();
+ $singularMem = $memRoot->getItem('section', 'listing type')
+ ->getItem('directive', 'singular')
+ ->getContent();
+ $hasRegions = $memRoot->getItem('section', 'conf')
+ ->getItem('directive', 'regions')
+ ->getContent();
+ }
+
+ if (!is_null($cpnRoot)) {
+ $pluralCpn = $cpnRoot->getItem('section', 'listing type')
+ ->getItem('directive', 'plural')
+ ->getContent();
+ $singularCpn = $cpnRoot->getItem('section', 'listing type')
+ ->getItem('directive', 'singular')
+ ->getContent();
+ }
+
+ $hideDelete = (!is_null($id) && $id == HOME_ID);
+ $dir = dir(BASE . 'static');
+ $staticPages = array();
+ while (false !== ($page = $dir->read())) {
+ $pieces = explode('.', $page);
+ if ($pageId = filter_var($pieces[0], FILTER_VALIDATE_INT)) {
+ $staticPages[] = $pageId;
+ }
+ }
+ $hideDelete = ($hideDelete || in_array($id, $staticPages) || is_null($id));
+
+ $showParentPage = ($id != HOME_ID);
+
+ // Grouped Elements are defined here.
+ $submitBtns = array();
+
+ $submitBtns[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'publishPage',
+ 'display' => 'Publish Page'
+ );
+ $submitBtns[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'saveDraft',
+ 'display' => 'Save as draft'
+ );
+/*
+ $submitBtns[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'previewPage',
+ 'display' => 'Preview Changes'
+ );
+*/
+ $submitBtns[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'cancel',
+ 'display' => 'Cancel'
+ );
+ if (!$hideDelete) {
+ $submitBtns[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'deletePage',
+ 'display' => 'Delete Page'
+ );
+ }
+
+ $templates = array();
+
+ $options = range(1, 6);
+ foreach ($options as $i) {
+ $img = "<img src=\"".MEDIA_BASE_URL.'Toolkit/Toolbox/assets/'."template$i.gif\" alt=\"page template $i\">";
+
+ $templates[] = array(
+ 'type' => 'radio',
+ 'req' => false,
+ 'name' => 'template',
+ 'att' => $i,
+ 'opts' => "Template $i<br>$img",
+ );
+ }
+
+ // All Elements are created here.
+ // This includes group element definitions.
+ $e[] = array(
+ 'type' => 'header',
+ 'req' => false,
+ 'name' => 'pageContentHdr',
+ 'display' => 'Page Content'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'id'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'published_page'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'navigation_name',
+ 'display' => 'Navigation Name',
+ 'opts' => array('size' => 35)
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'title',
+ 'display' => 'Page Title',
+ 'opts' => array('size' => 35)
+ );
+ if ($_GET['rt'] == 'EditPage' && $showParentPage) {
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => false,
+ 'name' => 'parent',
+ 'display' => 'Parent Page',
+ 'opts' => array('0' => '-- No Parent --'),
+ );
+ } else {
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'parent'
+ );
+ }
+ $e[] = array(
+ 'type' => 'textarea',
+ 'req' => false,
+ 'name' => 'description',
+ 'opts' => array(
+ 'cols' => 60,
+ 'rows' => 60,
+ 'id' => 'description'
+ ),
+ 'noCharLimit' => true
+ );
+ $e[] = array(
+ 'type' => 'file',
+ 'req' => false,
+ 'name' => 'file',
+ 'display' => 'New Image'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'caption',
+ 'display' => 'Image Caption',
+ 'opts' => array('size' => 35)
+ );
+ $e[] = array(
+ 'type' => 'static',
+ 'req' => false,
+ 'name' => 'current_image_thumb',
+ 'display' => 'Current Image'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'image',
+ );
+ if (!empty($this->_defaultValues['image'])
+ || ($this->isSubmitted() && $this->getSubmitValue('remove_image'))
+ ) {
+ $e[] = array(
+ 'type' => 'checkbox',
+ 'req' => false,
+ 'name' => 'remove_image',
+ 'display' => 'Remove Current Image'
+ );
+ }
+
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '</tbody>',
+ );
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '<tbody id="attributes" class="section">',
+ );
+ $e[] = array(
+ 'type' => 'header',
+ 'req' => false,
+ 'name' => 'pageAttributesHdr',
+ 'display' => 'Page Attributes'
+ );
+ if (defined('SHORT_URLS') && SHORT_URLS) {
+ $e[] = array(
+ 'type' => 'static',
+ 'req' => false,
+ 'name' => 'short_url_instructions',
+ 'display' => '',
+ 'opts' => "Short URL's Must not contain any spaces or non alpha characters.<br>Only A-Z, a-z, 0-9, _(underscore), -(dash) allowed"
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'short_url',
+ 'display' => 'Short URL',
+ );
+ }
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'keyword',
+ 'display' => 'Keyword',
+ 'opts' => array('size' => 35)
+ );
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'paragraph_links',
+ 'display' => 'Paragraph Links',
+ 'opts' => 'Show links to the paragraph headlines at the top of the page',
+ 'val' => array(0, 1)
+ );
+
+ if (!is_null($memRoot)) {
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '</tbody>',
+ );
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '<tbody id="members" class="section">',
+ );
+ $e[] = array(
+ 'type' => 'header',
+ 'req' => false,
+ 'name' => 'memberDbHdr',
+ 'display' => $pluralMem,
+ );
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'include_members',
+ 'display' => "Members",
+ 'opts' => "Include Members On Page",
+ 'val' => array(0, 1)
+ );
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '<tr>
+ <td class="labelcell"></td>
+ <td class="fieldcell">
+ To include all members, turn this feature on and
+ don\'t select categories or regions below.<br>
+ To restrict to specific categories, select desired
+ categories under Category Filter.<br>
+ To restrict to specific regions, select desired
+ regions under Region Filter.
+ </td>
+ </tr>'
+ );
+ // Note that we call to populate this select list at the
+ // bottom of this function after the element is made
+ // so we load attributes (classes) into each option as needed.
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => false,
+ 'name' => 'member_categories',
+ 'display' => 'Category Filter<br>(none = all)',
+ 'opts' => array(),
+ 'att' => array(
+ 'multiple' => 'multiple',
+ 'size' => 7,
+ 'title' => '-- Select to Add --',
+ 'id' => 'MemberCategories'
+ )
+ );
+ if ($hasRegions) {
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => false,
+ 'name' => 'member_regions',
+ 'display' => 'Region Filter<br>(none = all)',
+ 'opts' => array(),
+ 'att' => array(
+ 'multiple' => 'multiple',
+ 'size' => 7,
+ 'title' => '-- Select to Add --',
+ 'id' => 'MemberRegions'
+ )
+ );
+ }
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'include_member_map',
+ 'display' => "Google Map",
+ 'opts' => "Include Map On Page",
+ 'val' => array(0, 1)
+ );
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'search_form',
+ 'display' => "Search Box",
+ 'opts' => 'Include Search Box',
+ 'val' => array(0, 1)
+ );
+ }
+
+ if (!is_null($cpnRoot)) {
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '</tbody>',
+ );
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '<tbody id="coupons" class="section">',
+ );
+ $e[] = array(
+ 'type' => 'header',
+ 'req' => false,
+ 'name' => 'couponsHdr',
+ 'display' => $pluralCpn
+ );
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'include_coupons',
+ 'display' => "Coupons",
+ 'opts' => "Include Coupons On Page",
+ 'val' => array(0, 1)
+ );
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '<tr>
+ <td class="labelcell"></td>
+ <td class="fieldcell">
+ To include all coupons, turn this feature on and
+ don\'t select categories below.<br>
+ To restrict to specific categories, select desired
+ categories under Categories Filter.
+ </td>
+ </tr>'
+ );
+ // Note that we call to populate this select list at the
+ // bottom of this function after the element is made
+ // so we load attributes (classes) into each option as needed.
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => false,
+ 'name' => 'coupon_categories',
+ 'display' => 'Category Filter<br>(none = all)',
+ 'opts' => $this->_getCouponCategories($dbh),
+ 'att' => array(
+ 'multiple' => 'multiple',
+ 'size' => 4,
+ 'title' => '-- Select to Add --',
+ 'id' => 'CouponCategories'
+ )
+ );
+ }
+
+ if (defined('HOME_HEADLINES') && HOME_HEADLINES) {
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '</tbody>',
+ );
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '<tbody id="headlines" class="section">',
+ );
+ $e[] = array(
+ 'type' => 'header',
+ 'req' => false,
+ 'name' => 'homePageHeadlinesHdr',
+ 'display' => 'Home Page Headlines'
+ );
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'headline',
+ 'display' => 'Headline',
+ 'opts' => 'Include this page in the Home Page Headlines',
+ 'val' => array(0, 1)
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'headline_intro',
+ 'display' => 'Intro',
+ 'opts' => array('size' => 55),
+ 'noCharLimit' => true
+ );
+ }
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '</tbody>',
+ );
+ if ($_SERVER['PHP_AUTH_USER'] == 'MediaAdmin' || DEVELOPMENT) {
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '<tbody id="metadata" class="section">',
+ );
+ $e[] = array(
+ 'type' => 'header',
+ 'req' => false,
+ 'name' => 'metaHdr',
+ 'display' => 'Metadata Information'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'meta_title',
+ 'display' => 'Title Tag',
+ 'opts' => array('size' => 35)
+ );
+ $e[] = array(
+ 'type' => 'textarea',
+ 'req' => false,
+ 'name' => 'meta_description',
+ 'display' => 'Description',
+ 'opts' => array(
+ 'cols' => 40,
+ 'rows' => 5
+ ),
+ );
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '</tbody>',
+ );
+ } else {
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'meta_title'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'meta_description'
+ );
+ }
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '<tbody id="template" class="section">',
+ );
+ $e[] = array(
+ 'type' => 'header',
+ 'req' => false,
+ 'name' => 'templatesHdr',
+ 'display' => 'Page Layout'
+ );
+ $e[] = array(
+ 'type' => 'group',
+ 'req' => false,
+ 'name' => 'page_layout',
+ 'group' => $templates,
+ 'seperator' => '',
+ 'appendName' => false
+ );
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '</tbody>',
+ );
+ if (isset($_GET['id']) && ctype_digit($_GET['id'])) {
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '<tbody id="data" class="section">',
+ );
+ $e[] = array(
+ 'type' => 'header',
+ 'req' => false,
+ 'name' => 'templatesHdr',
+ 'display' => 'Page Information'
+ );
+ $e[] = array(
+ 'type' => 'static',
+ 'req' => false,
+ 'name' => 'page_id',
+ 'display' => 'Page ID',
+ );
+ $e[] = array(
+ 'type' => 'static',
+ 'req' => false,
+ 'name' => 'active_alt',
+ 'display' => 'State',
+ );
+ $e[] = array(
+ 'type' => 'static',
+ 'req' => false,
+ 'name' => 'revised',
+ 'display' => 'Revised',
+ );
+ $e[] = array(
+ 'type' => 'static',
+ 'req' => false,
+ 'name' => 'created',
+ 'display' => 'Created Date',
+ );
+ $e[] = array(
+ 'type' => 'static',
+ 'req' => false,
+ 'name' => 'last_modified',
+ 'display' => 'Last Modified Date',
+ );
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '</tbody>',
+ );
+ }
+ $e[] = array(
+ 'type' => 'html',
+ 'req' => false,
+ 'name' => '<tbody>',
+ );
+
+ // If we are editing a page, show three submit buttons
+ // otherwise, just show one insert button.
+ $e[] = array(
+ 'type' => 'group',
+ 'req' => false,
+ 'name' => 'submit_buttons',
+ 'group' => $submitBtns,
+ 'label' => '',
+ 'seperator' => '',
+ 'appendName' => false,
+ );
+
+ $this->setupElements($e);
+
+ // Do the same for the pages
+ if ($_GET['rt'] == 'EditPage' && $showParentPage) {
+ $this->loadParentPages($dbh);
+ }
+
+ // Load the member categories after the elements have been created
+ // so we can get more control how the options are rendered
+ // ie (adding classes to them)
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ $this->loadMemberCategories($dbh);
+ if ($hasRegions) {
+ $this->loadMemberRegions($dbh);
+ }
+ }
+ }
+
+ // }}}
+ // {{{ configureFilters()
+
+ /**
+ * Form filter definitions
+ *
+ * Applies a data filter for the given fields when the form is submitted
+ *
+ * @return void
+ * @access public
+ */
+ public function configureFilters()
+ {
+ $f = array();
+
+ $f[] = array(
+ 'element' => '__ALL__',
+ 'filter' => 'trim'
+ );
+
+ $this->setupFilters($f);
+ }
+
+ // }}}
+ // {{{ configureForm()
+
+ /**
+ * Bundle all form configuration calls into one function call
+ *
+ * @param PDO $dbh Database handler
+ * @param Toolkit_Toolbox_GatewayFactoryAbstract $factory Gateway factory
+ * @param Toolkit_FileServer_ImageApater $is Image Server
+ * @param Config_Container $memRoot (optional) Configuration object
+ * @param Config_Container $cpnRoot (optional) Configuration object
+ *
+ * @return void
+ * @access public
+ */
+ public function configureForm(
+ PDO $dbh,
+ Toolkit_Toolbox_GatewayFactoryAbstract $factory,
+ Toolkit_FileServer_ImageAdapter $is,
+ Config_Container $memRoot = null,
+ Config_Container $cpnRoot = null
+ ) {
+ $this->configureDefaults($factory, $_GET['id']);
+ $this->configureElements($dbh, $memRoot, $cpnRoot, $_GET['id']);
+ $this->configureRules($is);
+ $this->configureFilters();
+ $this->configureConstants($dbh);
+ }
+
+ // }}}
+ // {{{ configureRules()
+
+ /**
+ * Form rule definitions
+ *
+ * Adds validation rules for the given fields
+ *
+ * @param Toolkit_FileServer_ImageAdapter $is Image Server
+ *
+ * @return void
+ * @access public
+ */
+ public function configureRules(Toolkit_FileServer_ImageAdapter $is)
+ {
+ $r = array();
+
+ // Form Rules
+ $r[] = array(
+ 'element' => 'short_url',
+ 'message' => 'ERROR: Short URLs may only contain alpha numeric characters plus - (dash) or _ (underscore)!',
+ 'type' => 'ShortUrl',
+ 'format' => null,
+ 'validation' => $this->validationType,
+ 'reset' => false,
+ 'force' => false
+ );
+ if (!empty($_FILES['file']['tmp_name'])) {
+ $r[] = array(
+ 'element' => 'file',
+ 'message' => 'ERROR: Incorrect File Type (.gif, .png, .jpg) only!',
+ 'type' => 'mimetype',
+ 'format' => $is->getAllowedMimeTypes(),
+ 'validation' => 'server',
+ 'reset' => false,
+ 'force' => false
+ );
+ }
+ $r[] = array(
+ 'element' => 'file',
+ 'message' => 'ERROR: Error uploading image!',
+ 'type' => 'Image',
+ 'format' => array(
+ 'form' => $this,
+ 'fieldName' => 'file',
+ 'imageField' => 'image',
+ 'is' => $is,
+ 'deleteExistingImage' => false,
+ 'injectImage' => array('tgtElement' => 'current_image_thumb')
+ ),
+ 'validation' => 'server',
+ 'reset' => false,
+ 'force' => false
+ );
+
+ $this->setupRules($r);
+ }
+
+ // }}}
+
+ // {{{ getCouponCategories()
+
+ /**
+ * Fetches all coupon categories
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return array coupon categories
+ */
+ private function _getCouponCategories(PDO $dbh)
+ {
+ $sql = "
+ SELECT *
+ FROM coupon_category
+ ORDER BY name";
+ $couponCats = array();
+ foreach ($dbh->query($sql) as $row) {
+ $couponCats[$row['id']] = $row['name'];
+ }
+ return $couponCats;
+ }
+
+ // }}}
+
+ // {{{ loadParentPages()
+
+ /**
+ * Load option elements into the parent select list
+ *
+ * These options are loaded via this seperate function vs inline w/ the
+ * element definition b/c we need a little more control defining
+ * the class names for each option so they will render nice when a user
+ * is looking at the list.
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return void
+ * @throws PDOException throws exception on sql error
+ * @access public
+ */
+ public function loadParentPages(PDO $dbh)
+ {
+ try {
+ // Get a tree list of categories in linear order with
+ // category keys in the values and their level in the tree
+ // in the value
+ $c = Toolkit_Common::getHierarchicalTreeStructure(
+ $dbh,
+ 'pages',
+ 'id',
+ 'parent',
+ 'pos',
+ 0,
+ $this->maxDepth
+ );
+
+ // unset the home page, this is never an option to have children
+ // underneath it.
+ unset($c[HOME_ID]);
+
+ // If we are editing a page, then we don't want that page
+ // to show up as an option in the select list.
+ if (is_numeric($_GET['id'])) {
+ reset($c);
+ // Get us to the point in the array were this page is located
+ while (key($c) != $_GET['id'] && current($c) !== false) {
+ next($c);
+ }
+ // Make sure we didn't traverse off the end of the array
+ if (current($c) !== false) {
+ // get the starting level we are currently at
+ $sl = current($c);
+ // remove this page (the one we're editing) from the
+ // array and advance the internal array pointer
+ unset($c[key($c)]);
+ // now we need to make sure all sub pages beneath this
+ // page are also not being shown
+
+ // while we don't traverse off the end of the array
+ while (current($c) !== false) {
+ // get the current sub level we are at
+ $csl = current($c);
+ // if the current sub-level is the same as the
+ // starting level, that means we have traversed through
+ // all the sub-pages and can break out of the loop
+ if ($csl <= $sl) {
+ break;
+ } else {
+ // we are still in a sub-level page, so unset
+ // this page so it doesn't show, and advance
+ // the internal array pointer
+ unset($c[key($c)]);
+ }
+ }
+ }
+ }
+
+ // Get all the data about each category
+ $sql = "
+ SELECT *
+ FROM pages
+ WHERE id = ?";
+
+ $stmt = $dbh->prepare($sql);
+ // Get the member categories select list element
+ $e =& $this->getElement('parent');
+ foreach ($c as $i => $j) {
+ $stmt->execute(array($i));
+ $row = $stmt->fetch();
+ // the class level is always 1 less than what is reported
+ // from our $c array
+ $x = $j - 1;
+ // Add the option data to the select list.
+ $e->addOption(
+ $row['navigation_name'],
+ $i,
+ array('class' => "level-$x")
+ );
+ }
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Error loading parent pages"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ loadMemberCategories()
+
+ /**
+ * Loads member categories into the select list
+ *
+ * Gets an array structure of the member categories in a linear tree order
+ * Then walk through the array and load each category into the select list
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return void
+ * @access public
+ */
+ public function loadMemberCategories(PDO $dbh)
+ {
+ try {
+ // Get a tree list of categories in linear order with
+ // category keys in the values and their level in the tree
+ // in the value
+ $c = Toolkit_Common::getHierarchicalTreeStructure(
+ $dbh,
+ 'category',
+ 'category_id',
+ 'parent_id',
+ 'name'
+ );
+
+ // Get all the data about each category
+ $sql = "
+ SELECT *
+ FROM category
+ WHERE category_id = ?";
+
+ $stmt = $dbh->prepare($sql);
+ // Get the member categories select list element
+ $e =& $this->getElement('member_categories');
+ if (is_array($c)) {
+ foreach ($c as $i => $j) {
+ $stmt->execute(array($i));
+ $row = $stmt->fetch();
+ // the class level is always 1 less than what is reported
+ // from our $c array
+ $x = $j - 1;
+ // Add the option data to the select list.
+ $e->addOption($row['name'], $i, array('class' => "level-$x"));
+ }
+ }
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Error loading member categories"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ loadMemberRegions()
+
+ /**
+ * Loads member Cities into the select list
+ *
+ * Gets an array structure of the member Cities in a sorted order by name
+ * Then walk through the array and load each category into the select list
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return void
+ * @access public
+ */
+ public function loadMemberRegions(PDO $dbh)
+ {
+ try {
+ // Get all the data about each category
+ $sql = "
+ SELECT *
+ FROM region
+ ORDER BY region_name";
+
+ $stmt = $dbh->query($sql);
+ // Get the member categories select list element
+ $e =& $this->getElement('member_regions');
+ while ($row = $stmt->fetch()) {
+ // Add the option data to the select list.
+ $e->addOption($row['region_name'], $row['region_id']);
+ }
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Error loading member regions"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ setMaxDepth()
+
+ /**
+ * Sets the max depth level that the parent page select list will show
+ *
+ * @param integer $md New max depth
+ *
+ * @return void
+ * @access public
+ */
+ public function setMaxDepth($md)
+ {
+ $this->maxDepth = $md;
+ }
+
+ // }}}
+ // {{{ setupRenderers()
+
+ /**
+ * Custom rendering templates for special fields on the form
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupRenderers()
+ {
+ parent::setupRenderers();
+ $renderer =& $this->defaultRenderer();
+
+ $required = '<!-- BEGIN required -->';
+ $required .= '<span class="req"> * </span>';
+ $required .= '<!-- END required -->';
+
+ $error = '<!-- BEGIN error -->';
+ $error .= '<div class="req">{error}</div>';
+ $error .= '<!-- END error -->';
+
+ $baseUrl = MEDIA_BASE_URL;
+
+ $renderer->setFormTemplate(
+ "<div class=\"webform\">\n
+ <form{attributes}>\n
+ <div class=\"hiddenElements\">
+ {hidden}
+ </div>
+ {requiredNote}
+ <table>\n
+ <tbody id=\"pageContent\" class=\"section\"> {content} </tbody>\n
+ </table>\n
+ </form>\n
+ </div>"
+ );
+
+ $renderer->setElementTemplate(
+ "<tr>\n
+ <td class=\"labelcell\">$required{label}</td>\n
+ <td class=\"fieldcell\">{$error}{$baseUrl}{element}/</td>\n
+ </tr>\n",
+ 'short_url'
+ );
+ $renderer->setElementTemplate(
+ "<tr align=\"center\">\n
+ <td colspan=\"2\">$required{label}$error{element}</td>
+ </tr>",
+ 'description'
+ );
+ $renderer->setElementTemplate(
+ "<tr align=\"center\">\n
+ <td colspan=\"2\">$required{label}$error{element}</td>
+ </tr>",
+ 'submit_buttons'
+ );
+ $renderer->setElementTemplate(
+ "<tr align=\"center\">\n
+ <td colspan=\"2\">$required{label}$error{element}</td>\n
+ </tr>",
+ 'edit'
+ );
+
+ $renderer->setElementTemplate(
+ "<tr align=\"center\">\n
+ <td colspan=\"2\">$required{label}$error{element}</td>\n
+ </tr>\n",
+ 'page_layout'
+ );
+ $renderer->setGroupTemplate(
+ "<table id=\"templates\">\n
+ <tr>{content}</tr>\n
+ </table>\n",
+ 'page_layout'
+ );
+ $renderer->setGroupElementTemplate(
+ "<td>\n
+ {element}<br>{label}\n
+ </td>\n",
+ 'page_layout'
+ );
+ }
+
+ // }}}
+
+ // {{{ toHtml()
+
+ /**
+ * Handles how to display the current step the user is at in the form
+ *
+ * @return string rendered html form
+ * @access public
+ */
+ public function toHtml()
+ {
+ $GLOBALS['topScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/jquery/jquery-1.4.2.min.js';
+ $GLOBALS['bottomScripts'][]
+ = CKEDITOR_JS . '';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/plugins/asmselect/1.0.4a/jquery.asmselect.js';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_BASE_URL . 'Toolkit/Toolbox/libjs/edit-page.js';
+
+ $GLOBALS['styleSheets'][]
+ = MEDIA_APP_BASE_URL . 'libjs/plugins/asmselect/1.0.4a/jquery.asmselect.css';
+ $GLOBALS['styleSheets'][]
+ = MEDIA_BASE_URL . 'css/contactform.css';
+ $GLOBALS['styleSheets'][]
+ = MEDIA_BASE_URL . 'Toolkit/Toolbox/styles.css';
+
+ $this->setupRenderers();
+
+ return parent::toHtml();
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+// vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker syntax=php:
+
+/**
+ * Edit a page paragraph form
+ *
+ * PHP version 5
+ *
+ * @category Toolbox
+ * @package Toolkit_Toolbox
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version CVS: $Id: EditParagraph.php,v 1.4 2010/07/20 18:39:40 jamie Exp $
+ * @link http://demo.gaslightmedia.com
+ */
+
+require_once BASE . 'Toolkit/Forms/Rules/Image.php';
+
+/**
+ * Edit a page paragraph form
+ *
+ * @category Toolbox
+ * @package Toolkit_Toolbox
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @copyright 2009 Jamie Kahgee
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_Toolbox_Forms_EditParagraph extends Toolkit_FormBuilder
+{
+ // {{{ configureDefaults()
+
+ /**
+ * Initializes default form values
+ *
+ * @param Toolkit_Toolbox_GatewayFactoryAbstract $factory Gateway factory
+ * @param integer $id pargraph id (optional)
+ * @return void
+ * @access public
+ */
+ public function configureDefaults(
+ Toolkit_Toolbox_GatewayFactoryAbstract $factory,
+ Toolkit_Toolbox_FileExtension $fileExtension,
+ $id = null
+ ) {
+ if (!is_null($id)) {
+ $gateway = $factory->createGateway();
+ $paragraph = $gateway->find($id);
+ if ( isset($paragraph['files'])
+ && is_array($paragraph['files'])
+ ) {
+ $files = array();
+ foreach ($paragraph['files'] as $file) {
+ $linkRenderer
+ = Toolkit_Template_Page_FileLink_Factory::createLinkRenderer(
+ $file
+ );
+ $fileLink = $linkRenderer->getLink();
+ $extImg = $fileExtension->getImage($file['filename']);
+ $id = preg_replace('/[^A-Za-z0-9]/', '', $file['urltext']);
+ $files[] = '
+ <li id="pFile-'.$file['id'].'" class="ui-state-default">
+ <span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
+ '.$fileLink.'
+ File Name:
+ <input type="text" size="35" name="uploaded_files[urltext][]" value="'.htmlspecialchars($file['urltext']).'"><br>
+ <label>
+ <input type="checkbox" name="deleteFile[]" value="'.htmlspecialchars($file['filename']).'">
+ Remove File
+ </label>
+ <input type="hidden" value="'.htmlspecialchars($file['filename']).'" name="uploaded_files[filename][]">
+ <input type="hidden" value="'.htmlspecialchars($file['bytes']).'" name="uploaded_files[bytes][]">
+ <input type="hidden" value="'.htmlspecialchars($file['type']).'" name="uploaded_files[type][]">
+ </li>';
+ }
+ $paragraph['uploaded_files'] = '<ul class="files">' . implode('', $files) . '</ul>';
+ }
+ } else {
+ $paragraph = array(
+ 'current_image_thumb' => 'Image not yet uploaded',
+ 'page' => $_GET['pageid'],
+ 'active' => true,
+ );
+ }
+
+ $this->setupDefaults($paragraph);
+ }
+
+ // }}}
+ // {{{ configureElements()
+
+ /**
+ * Form element definitions
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return void
+ * @access public
+ */
+ public function configureElements(PDO $dbh)
+ {
+ $e = array();
+ // Grouped Elements are defined here.
+ $submitBtns = array();
+
+ $submitBtns[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'saveParagraph',
+ 'display' => 'Save Paragraph'
+ );
+ $submitBtns[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'cancel',
+ 'display' => 'Cancel'
+ );
+ $submitBtns[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'deleteParagraph',
+ 'display' => 'Delete Paragraph'
+ );
+
+ // All Elements are created here.
+ // This includes group element definitions.
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'id'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'active'
+ );
+ if ($_GET['rt'] == 'Paragraphs') {
+ $e[] = array(
+ 'type' => 'select',
+ 'req' => false,
+ 'name' => 'page',
+ 'display' => 'Page',
+ 'opts' => array(),
+ );
+ } else {
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'page'
+ );
+ }
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'title',
+ 'display' => 'Title',
+ 'opts' => array('size' => 40)
+ );
+ $e[] = array(
+ 'type' => 'textarea',
+ 'req' => false,
+ 'name' => 'description',
+ 'opts' => array(
+ 'cols' => 60,
+ 'rows' => 60,
+ 'id' => 'description'
+ ),
+ 'noCharLimit' => true
+ );
+ $e[] = array(
+ 'type' => 'file',
+ 'req' => false,
+ 'name' => 'file',
+ 'display' => 'New Image'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'caption',
+ 'display' => 'Image Caption',
+ 'opts' => array('size' => 35)
+ );
+ $e[] = array(
+ 'type' => 'static',
+ 'req' => false,
+ 'name' => 'current_image_thumb',
+ 'display' => 'Current Image'
+ );
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'image',
+ );
+ if (!empty($this->_defaultValues['image'])) {
+ $e[] = array(
+ 'type' => 'checkbox',
+ 'req' => false,
+ 'name' => 'remove_image',
+ 'display' => 'Remove Current Image'
+ );
+ }
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'back_to_top',
+ 'display' => "Insert 'Back to Top' link",
+ 'opts' => 'Yes',
+ 'val' => array(0, 1)
+ );
+
+ $e[] = array(
+ 'type' => 'header',
+ 'req' => false,
+ 'name' => 'templatesHdr',
+ 'display' => 'Files'
+ );
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'fileurltext',
+ 'display' => 'New File Name',
+ 'opts' => array('size' => 35)
+ );
+ $e[] = array(
+ 'type' => 'file',
+ 'req' => false,
+ 'name' => 'filename',
+ 'display' => 'New File',
+ 'opts' => array('id' => 'filename')
+ );
+ $e[] = array(
+ 'type' => 'static',
+ 'req' => false,
+ 'name' => 'uploaded_files',
+ 'display' => 'Uploaded Files',
+ 'opts' => '<ul class="files"></ul>'
+ );
+
+ // If we are editing a page, show three submit buttons
+ // otherwise, just show one insert button.
+ $e[] = array(
+ 'type' => 'group',
+ 'req' => false,
+ 'name' => 'submit_buttons',
+ 'group' => $submitBtns,
+ 'label' => '',
+ 'seperator' => '',
+ 'appendName' => false,
+ );
+
+ $this->setupElements($e);
+ // Do the same for the pages
+ if ($_GET['rt'] == 'Paragraphs') {
+ $this->loadParagraphPages($dbh);
+ }
+ }
+
+ // }}}
+ // {{{ configureFilters()
+
+ /**
+ * Form filter definitions
+ *
+ * Applies a data filter for the given fields when the form is submitted
+ *
+ * @return void
+ * @access public
+ */
+ public function configureFilters()
+ {
+ $f = array();
+
+ $f[] = array(
+ 'element' => '__ALL__',
+ 'filter' => 'trim'
+ );
+
+ $this->setupFilters($f);
+ }
+
+ // }}}
+ // {{{ configureForm()
+
+ /**
+ * Bundle all form configuration calls into one function call
+ *
+ * @param PDO $dbh Database handler $dbh Database handler
+ * @param Toolkit_Toolbox_GatewayFactoryAbstract $factory Gateway factory
+ * @param Toolkit_FileServer_ImageAdapter $is Image adapter for file server
+ * @param Toolkit_FileServer_FileAdapter $fs File adapter for file server
+ *
+ * @return void
+ * @access public
+ */
+ public function configureForm(
+ PDO $dbh,
+ Toolkit_Toolbox_GatewayFactoryAbstract $factory,
+ Toolkit_FileServer_ImageAdapter $is,
+ Toolkit_FileServer_FileAdapter $fs,
+ Toolkit_Toolbox_FileExtension $fileExtension
+ ) {
+ $this->configureDefaults($factory, $fileExtension, $_GET['id']);
+ $this->configureElements($dbh);
+ $this->configureRules($is, $fs);
+ $this->configureFilters();
+ }
+
+ // }}}
+ // {{{ configureRules()
+
+ /**
+ * Form rule definitions
+ *
+ * Adds validation rules for the given fields
+ *
+ * @param Toolkit_FileServer_ImageAdapter $is Image adapter for file server
+ * @param Toolkit_FileServer_FileAdapter $fs File adapter for file server
+ *
+ * @return void
+ * @access public
+ */
+ public function configureRules(
+ Toolkit_FileServer_ImageAdapter $is,
+ Toolkit_FileServer_FileAdapter $fs
+ ) {
+ $r = array();
+ // Form Rules
+ if (!empty($_FILES['file']['tmp_name'])) {
+ $r[] = array(
+ 'element' => 'file',
+ 'message' => 'ERROR: Incorrect File Type (.gif, .png, .jpg) only!',
+ 'type' => 'mimetype',
+ 'format' => $is->getAllowedMimeTypes(),
+ 'validation' => 'server',
+ 'reset' => false,
+ 'force' => false
+ );
+ }
+ $r[] = array(
+ 'element' => 'file',
+ 'message' => 'ERROR: Error uploading image!',
+ 'type' => 'Image',
+ 'format' => array(
+ 'form' => $this,
+ 'fieldName' => 'file',
+ 'imageField' => 'image',
+ 'is' => $is,
+ 'deleteExistingImage' => false,
+ 'injectImage' => array('tgtElement' => 'current_image_thumb')
+ ),
+ 'validation' => 'server',
+ 'reset' => false,
+ 'force' => false
+ );
+
+ $this->setupRules($r);
+ }
+
+ // }}}
+
+ // {{{ loadParagraphPages()
+
+ /**
+ * Load option elements into the parent select list
+ *
+ * These options are loaded via this seperate function vs inline w/ the
+ * element definition b/c we need a little more control defining
+ * the class names for each option so they will render nice when a user
+ * is looking at the list.
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return void
+ * @throws PDOException throws exception on sql error
+ * @access public
+ */
+ public function loadParagraphPages(PDO $dbh)
+ {
+ try {
+ // Get a tree list of categories in linear order with
+ // category keys in the values and their level in the tree
+ // in the value
+ $c = Toolkit_Common::getHierarchicalTreeStructure(
+ $dbh,
+ 'pages',
+ 'id',
+ 'parent',
+ 'pos'
+ );
+
+ // Get all the data about each category
+ $sql = "
+ SELECT *
+ FROM pages
+ WHERE id = ?";
+
+ $stmt = $dbh->prepare($sql);
+ // Get the member categories select list element
+ $e =& $this->getElement('page');
+ foreach ($c as $i => $j) {
+ $stmt->execute(array($i));
+ $row = $stmt->fetch(PDO::FETCH_ASSOC);
+ // the class level is always 1 less than what is reported
+ // from our $c array
+ $x = $j - 1;
+ // Add the option data to the select list.
+ $e->addOption($row['navigation_name'], $i, array('class' => "level-$x"));
+ }
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Error loading parent pages for paragraph"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ setupRenderers()
+
+ /**
+ * Custom rendering templates for special fields on the form
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupRenderers()
+ {
+ parent::setupRenderers();
+ $renderer =& $this->defaultRenderer();
+
+ $required = '<!-- BEGIN required -->';
+ $required .= '<span class="req"> * </span>';
+ $required .= '<!-- END required -->';
+
+ $error = '<!-- BEGIN error -->';
+ $error .= '<div class="req">{error}</div>';
+ $error .= '<!-- END error -->';
+
+ $renderer->setElementTemplate(
+ "<tr align=\"center\">\n
+ <td colspan=\"2\">$required{label}$error{element}</td>
+ </tr>",
+ 'submit_buttons'
+ );
+ $renderer->setElementTemplate(
+ "<tr align=\"center\">\n
+ <td colspan=\"2\">$required{label}$error{element}</td>\n
+ </tr>",
+ 'insert'
+ );
+
+ $renderer->setElementTemplate(
+ "<tr align=\"center\">\n
+ <td colspan=\"2\">$required{label}$error{element}</td>
+ </tr>",
+ 'description'
+ );
+ }
+
+ // }}}
+
+ // {{{ toHtml()
+
+ /**
+ * Handles how to display the current step the user is at in the form
+ *
+ * @param PDO $dbh Database handler
+ *
+ * @return string rendered html form
+ * @access public
+ */
+ public function toHtml(PDO $dbh)
+ {
+ $GLOBALS['topScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/jquery/jquery-1.4.2.min.js';
+ $GLOBALS['bottomScripts'][]
+ = CKEDITOR_JS . '';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/plugins/ajaxUpload/3.9/ajaxupload.js';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/jqueryui/1.8.13/js/jquery-ui-1.8.13.custom.min.js';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/jqueryui/1.8.13/development-bundle/ui/minified/jquery.ui.sortable.min.js';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_BASE_URL . 'Toolkit/Toolbox/libjs/edit-paragraph.js';
+
+ $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'css/contactform.css';
+ $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'Toolkit/Toolbox/styles.css';
+ $GLOBALS['styleSheets'][]
+ = MEDIA_APP_BASE_URL . 'libjs/jqueryui/1.8.13/css/smoothness/jquery-ui-1.8.13.custom.css';
+
+ $this->setupRenderers();
+ $out
+ = ($_REQUEST['g'] == '1')
+ ? '<div class="form-success">Form Submit Successfull!</div>'
+ : '';
+
+ return $out . parent::toHtml();
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+class Toolkit_Toolbox_Forms_SearchForm
+ extends Toolkit_FormBuilder
+{
+ // {{{ properties
+
+ /**
+ * Don't need to register any rules for this form.
+ * @var array
+ * @access protected
+ */
+ protected $registeredRules = array();
+
+ // }}}
+
+ // {{{ configureConstants()
+
+ /**
+ * Form constant definitions
+ *
+ * @return void
+ * @access public
+ */
+ public function configureConstants()
+ {
+ $c = array('rt' => 'Search');
+
+ $this->setupConstants($c);
+ }
+
+ // }}}
+ // {{{ configureElements()
+
+ /**
+ * Form element definitions
+ *
+ * @return void
+ * @access public
+ */
+ public function configureElements()
+ {
+ $e = array();
+
+ // All Elements are created here.
+ // This includes group element definitions.
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'rt'
+ );
+
+ $elements = array();
+
+ $elements[] = array(
+ 'type' => 'text',
+ 'req' => false,
+ 'name' => 'q',
+ 'opts' => array(
+ 'size' => 75,
+ 'id' => 'q'
+ )
+ );
+ $elements[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'submit',
+ 'display' => 'Search Page Titles'
+ );
+
+ $e[] = array(
+ 'type' => 'group',
+ 'req' => false,
+ 'name' => 'fields',
+ 'group' => $elements,
+ 'seperator' => '',
+ 'appendName' => false
+ );
+ $this->setupElements($e);
+ }
+
+ // }}}
+ // {{{ configureFilters()
+
+ /**
+ * Form filter definitions
+ *
+ * Applies a data filter for the given fields when the form is submitted
+ *
+ * @return void
+ * @access public
+ */
+ public function configureFilters()
+ {
+ $f = array();
+
+ $f[] = array(
+ 'element' => '__ALL__',
+ 'filter' => 'trim'
+ );
+
+ $this->setupFilters($f);
+ }
+
+ // }}}
+ // {{{ configureForm()
+
+ /**
+ * Bundle all form configuration calls into one function call
+ *
+ * @return void
+ * @access public
+ */
+ public function configureForm()
+ {
+ $this->configureConstants();
+ $this->configureElements();
+ $this->configureFilters();
+ }
+
+ // }}}
+
+ // {{{ setupRenderers()
+
+ /**
+ * Custom rendering templates for special fields on the form
+ *
+ * @return void
+ * @access protected
+ */
+ protected function setupRenderers()
+ {
+ parent::setupRenderers();
+ $renderer =& $this->defaultRenderer();
+
+ $required = '<!-- BEGIN required -->';
+ $required .= '<span class="req"> * </span>';
+ $required .= '<!-- END required -->';
+
+ $error = '<!-- BEGIN error -->';
+ $error .= '<div class="req">{error}</div>';
+ $error .= '<!-- END error -->';
+
+ $renderer->setElementTemplate(
+ "<tr>\n
+ <td colspan=\"2\">$required{label}$error{element}</td>\n
+ </tr>\n",
+ 'fields'
+ );
+ }
+
+ // }}}
+
+ // {{{ toHtml()
+
+ /**
+ * Handles how to display the current step the user is at in the form
+ *
+ * @return string rendered html form
+ * @access public
+ */
+ public function toHtml()
+ {
+ $GLOBALS['styleSheets'][]
+ = MEDIA_BASE_URL . 'css/contactform.css';
+ $GLOBALS['styleSheets'][]
+ = MEDIA_BASE_URL . 'Toolkit/Toolbox/styles.css';
+
+ $this->setupRenderers();
+
+ return parent::toHtml();
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+abstract class Toolkit_Toolbox_GatewayAbstract
+{
+ // {{{ properties
+
+ protected $dbh;
+
+ // }}}
+ // {{{ __construct()
+
+ public function __construct(PDO $dbh)
+ {
+ $this->dbh = $dbh;
+ }
+
+ // }}}
+ // {{{ find()
+
+ abstract public function find($id);
+
+ // }}}
+ // {{{ update()
+
+ abstract public function update(array $data, $id);
+
+ // }}}
+ // {{{ insert()
+
+ abstract public function insert(array $data);
+
+ // }}}
+}
--- /dev/null
+<?php
+abstract class Toolkit_Toolbox_GatewayFactoryAbstract
+{
+ protected $dbh;
+
+ public function __construct(PDO $dbh)
+ {
+ $this->dbh = $dbh;
+ }
+
+ abstract public function createGateway();
+}
--- /dev/null
+<?php
+
+class Toolkit_Toolbox_IndexController extends Toolkit_BaseControllerAbstract
+ implements Toolkit_IController
+{
+ // {{{ indexAction()
+
+ public function indexAction()
+ {
+ $searchForm = new Toolkit_Toolbox_Forms_SearchForm(
+ 'search_form',
+ 'get',
+ MEDIA_BASE_URL . 'admin/toolbox.php?rt=search',
+ null,
+ null,
+ true
+ );
+ $searchForm->configureForm();
+
+ $html = $searchForm->toHtml();
+
+ $toolboxConfig = new Config;
+ $toolboxConfigRoot =& $toolboxConfig->parseConfig(
+ BASE . 'Toolkit/Toolbox/config.ini',
+ 'IniFile'
+ );
+ $tree = new Toolkit_Toolbox_PagesTree($toolboxConfigRoot);
+ $html .= $tree->toHtml(
+ new Toolkit_Toolbox_PageGatewayPublish($this->registry->dbh)
+ );
+
+ return $html;
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+class Toolkit_Toolbox_ListDraftsController
+ extends Toolkit_Toolbox_IndexController implements Toolkit_IController
+{
+ // {{{ indexAction()
+
+ public function indexAction()
+ {
+
+ $toolboxConfig = new Config;
+ $toolboxConfigRoot =& $toolboxConfig->parseConfig(
+ BASE . 'Toolkit/Toolbox/config.ini',
+ 'IniFile'
+ );
+ $tree = new Toolkit_Toolbox_DraftPagesTree($toolboxConfigRoot);
+ $html .= $tree->toHtml(
+ new Toolkit_Toolbox_PageGatewayDraft($this->registry->dbh)
+ );
+
+ return $html;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+class Toolkit_Toolbox_Navigation extends Toolkit_NavigationAbstract
+ implements Toolkit_INavigation
+{
+ // {{{ __construct()
+
+ public function __construct(
+ HTML_Menu $menu,
+ HTML_Menu_Renderer $rEngine
+ ) {
+ $this->menu = $menu;
+ $this->rEngine = $rEngine;
+ $this->currIndex = 'listToolbox';
+ }
+
+ // }}}
+ // {{{ setNavTemplates()
+
+ protected function setNavTemplates()
+ {
+ $tpl = '<li><a href="%s" title="%s">{Title}</a></li>';
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_INACTIVE,
+ sprintf($tpl, '{url}', '{desc}', '{Title}')
+ );
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_ACTIVE,
+ sprintf($tpl, '{url}', '{desc}', '{Title}')
+ );
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_ACTIVEPATH,
+ sprintf($tpl, '{url}', '{desc}', '{Title}')
+ );
+ $this->rEngine->setMenuTemplate('', '');
+ $this->rEngine->setRowTemplate('<ul class="admin_nav">', '</ul>');
+ }
+
+ // }}}
+ // {{{ setCurrentIndex()
+
+ protected function setCurrentIndex()
+ {
+ $this->menu->forceCurrentIndex($_GET['rt']);
+ }
+
+ // }}}
+ // {{{ getNavSructure()
+ // @codeCoverageIgnoreStart
+
+ /**
+ * Sets up a multi dimensional array used for the nav structure
+ *
+ * @param Config_Container $c Application configuration
+ *
+ * @return array navigational array hash
+ * @access public
+ */
+ public function getNavStructure(Config_Container $c)
+ {
+ // get reference to [listing type] section of config file
+ $appName = $c->getItem('section', 'conf')
+ ->getItem('directive', 'applicationName')
+ ->getContent();
+
+ $nav = array(
+ 'publishedPages' => array(
+ 'Title' => "Published Pages",
+ 'url' => MEDIA_BASE_URL . 'admin/toolbox.php',
+ 'desc' => "Display all the published pages",
+ ),
+ 'draftPages' => array(
+ 'Title' => 'Page Drafts',
+ 'url' => MEDIA_BASE_URL . 'admin/toolbox.php?rt=ListDrafts',
+ 'desc' => 'Display all the page drafts'
+
+ ),
+ 'editPage' => array(
+ 'Title' => "Create New Page",
+ 'url' => MEDIA_BASE_URL . 'admin/toolbox.php?rt=EditPage',
+ 'desc' => "Create a new {$appName} Page"
+ ),
+ );
+
+ if (isset($_GET['rt']) && $_GET['rt'] == 'Paragraphs') {
+ $nav['editParagraph'] = array(
+ 'Title' => "Create Page Paragraph",
+ 'url' => MEDIA_BASE_URL . "admin/toolbox.php?rt=Paragraphs&ac=edit&pageid={$_GET['pageid']}",
+ 'desc' => "Edit a Page Paragraph"
+ );
+ } elseif (isset($_GET['rt']) && $_GET['rt'] == 'ParagraphsDraft') {
+ $nav['editParagraph'] = array(
+ 'Title' => "Create Page Paragraph",
+ 'url' => MEDIA_BASE_URL . "admin/toolbox.php?rt=ParagraphsDraft&ac=edit&pageid={$_GET['pageid']}",
+ 'desc' => "Edit a Page Paragraph"
+ );
+ }
+
+ return $nav;
+ }
+
+ // @codeCoverageIgnoreEnd
+ // }}}
+}
+?>
--- /dev/null
+<?php
+class Toolkit_Toolbox_Page
+{
+ // {{{ properties
+ public $content;
+ public $members;
+ public $coupons;
+ public $attributes;
+ public $headlines;
+ public $metaData;
+
+ private $_createDate;
+ private $_lastModifiedDate;
+ private $_revisions;
+ private $_active;
+
+ // }}}
+
+ // {{{ __construct()
+ public function __construct(
+ Toolkit_Toolbox_ComponentFactory $cf,
+ array $data,
+ $id = null
+ ) {
+ if (!empty($id)) {
+ if (ctype_digit($id)) {
+ $this->_id = (int) $id;
+ } else {
+ throw new Toolkit_Toolbox_Exception("Invalid page id `$id`");
+ }
+ }
+
+ $this->content = $cf->getComponent('content', $data);
+ $this->members = $cf->getComponent('members', $data);
+ $this->coupons = $cf->getComponent('coupons', $data);
+ $this->attributes = $cf->getComponent('attributes', $data);
+ $this->headlines = $cf->getComponent('headlines', $data);
+ $this->metaData = $cf->getComponent('metadata', $data);
+ $this->_createDate = $data['createDate'];
+ $this->_lastModifiedDate = $data['lastModifiedDate'];
+ $this->_revisions = $data['revisions'];
+ }
+
+ // }}}
+
+ // {{{ delete()
+
+ /**
+ * Delete a toolbox page
+ *
+ * @param PDO $dbh Database handler
+ * @param integer $id Toolbox page id to delete
+ *
+ * @return boolean Result of delete query
+ * @access public
+ * @throws Toolkit_Toolbox_Exception
+ */
+ public static function delete(PDO $dbh, $id)
+ {
+ try {
+ $sql = "
+ DELETE FROM bus_category
+ WHERE id = :id";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ return $stmt->execute();
+ } catch(PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Error deleting the toolbox page `$id`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ fetch()
+
+ public static function fetch(PDO $dbh, $id)
+ {
+ if (!ctype_digit((string)$id)) {
+ throw new Toolkit_Toolbox_Exception("Invalid page id `$id`");
+ }
+ try {
+ $sql = "
+ SELECT *
+ FROM bus_category
+ WHERE id = :id";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+ $d = $stmt->fetch();
+
+ $sql = "
+ SELECT *
+ FROM bus_cat_member
+ WHERE catid = :id";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+
+ $d['memberCat'] = array();
+ while ($row = $stmt->fetch()) {
+ $d['memberCat'][] = $row['memb_type'];
+ }
+
+ $sql = "
+ SELECT *
+ FROM coupon_categories2toolbox_pages
+ WHERE toolbox_catid = :id";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+
+ $d['couponCat'] = array();
+ while ($row = $stmt->fetch()) {
+ $d['couponCat'][] = $row['category_id'];
+ }
+
+ $sql = "
+ SELECT CASE
+ WHEN active THEN 'Active'
+ ELSE 'In-Active'
+ END AS active
+ FROM bus_category
+ WHERE id = :id";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+ $row = $stmt->fetch();
+ $d['active'] = $row['active'];
+
+ $sql = "
+ SELECT to_char(min(revision_timestamp), 'FMDay, DD Month FMHH12:MIpm') AS created,
+ to_char(max(revision_timestamp), 'FMDay, DD Month FMHH12:MIpm') AS last_modified,
+ count(*) AS total
+ FROM bus_category_history
+ WHERE id = :id";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+ $row = $stmt->fetch();
+ $d['revisions'] = $row['total'];
+ $d['createDate'] = $row['created'];
+ $d['lastModifiedDate'] = $row['last_modified'];
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Error retrieving defaults for page `$id`"
+ );
+ }
+
+ return new self(new Toolkit_Toolbox_ComponentFactory(), $d, $id);
+ }
+
+ // }}}
+ // {{{ getBusCategoryData()
+ public function getBusCategoryData()
+ {
+ if ($this->content->getRemoveImage()) {
+ $this->content->setImage(Toolkit_Toolbox_ImageFactory::getImage());
+ $this->content->setImageName(null);
+ }
+ return array(
+ 'intro' => $this->content->getIntro(),
+ 'description' => $this->content->getDescription(),
+ 'image' => $this->content->getImage()->getSrc(),
+ 'imagename' => $this->content->getImageName(),
+ 'parent' => $this->attributes->getParent(),
+ 'category' => $this->attributes->getCategory(),
+ 'keyword' => $this->attributes->getKeyword(),
+ 'template' => $this->attributes->getTemplate(),
+ 'section_links' => $this->attributes->getSectionLinks(),
+ 'short_url' => $this->attributes->getShortUrl(),
+ 'featured' => $this->headlines->getFeatured(),
+ 'feature_intro' => $this->headlines->getFeatureIntro(),
+ 'no_search_form' => $this->members->getSearch(),
+ 'include_member_map' => $this->members->getMap(),
+ 'meta_descr' => $this->metaData->getDescription(),
+ 'title' => $this->metaData->getTitle(),
+ );
+ }
+
+ // }}}
+
+ // {{{ save()
+ public function save(PDO $dbh)
+ {
+ try {
+ $dbh->beginTransaction();
+
+ $busCategoryData = $this->getBusCategoryData();
+
+ $busCategorySql = Toolkit_Common::createSQLInsert(
+ 'bus_category',
+ array_keys($busCategoryData)
+ );
+
+ $stmt = Toolkit_Common::prepareQuery(
+ $dbh,
+ 'bus_category',
+ $busCategorySql,
+ $busCategoryData
+ );
+
+ $stmt->execute();
+ $catidSql = "
+ SELECT *
+ FROM bus_category
+ ORDER BY id DESC LIMIT 1";
+
+ $row = $dbh->query($catidSql)->fetch(PDO::FETCH_ASSOC);
+ $this->_id = (int) $row['id'];
+
+ $this->coupons->saveCategories($dbh, $this->_id);
+ $this->members->saveCategories($dbh, $this->_id);
+
+ return $dbh->commit();
+ } catch (PDOException $e) {
+ $dbh->rollback();
+ Toolkit_Logger::logException('db error', $e);
+ throw new Toolkit_Toolbox_Exception('Error saving page in Database');
+ }
+ }
+
+ // }}}
+
+ // {{{ update()
+ public function update(PDO $dbh)
+ {
+ try {
+ if (!isset($this->_id)) {
+ throw new RuntimeException('Page does not exist yet');
+ }
+ $dbh->beginTransaction();
+
+ $busCategoryData = $this->getBusCategoryData();
+
+ $busCategorySql = Toolkit_Common::createSQLUpdate(
+ 'bus_category',
+ array_keys($busCategoryData),
+ array("id = {$this->_id}")
+ );
+
+ $stmt = Toolkit_Common::prepareQuery(
+ $dbh,
+ 'bus_category',
+ $busCategorySql,
+ $busCategoryData
+ );
+
+ $stmt->execute();
+
+ $this->coupons->updateCategories($dbh, $this->_id);
+ $this->members->updateCategories($dbh, $this->_id);
+
+ return $dbh->commit();
+
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('db error', $e);
+ throw new Toolkit_Toolbox_Exception('Error updating page in Database');
+ } catch (RuntimeException $e) {
+ Toolkit_Logger::logException('Runtime Error', $e);
+ throw new Toolkit_Toolbox_Exception($e->getMessage());
+ }
+ }
+
+ // }}}
+
+ // {{{ getCreateDate()
+
+ public function getCreateDate()
+ {
+ return $this->_createDate;
+ }
+
+ // }}}
+ // {{{ getLastModificationDate()
+
+ public function getLastModificationDate()
+ {
+ return $this->_lastModifiedDate;
+ }
+
+ // }}}
+ // {{{ getNumberOfRevisions()
+
+ public function getNumberOfRevisions()
+ {
+ return $this->_revisions;
+ }
+
+ // }}}
+ // {{{ getActive()
+
+ public function getActive()
+ {
+ return $this->_active;
+ }
+
+ // }}}
+ // {{{ getActiveText()
+
+ public function getActiveText()
+ {
+ return $this->_active ? 'Active' : 'In-Active';
+ }
+
+ // }}}
+
+ public function getId()
+ {
+ return $this->_id;
+ }
+}
+?>
--- /dev/null
+<?php
+
+class Toolkit_Toolbox_PageBreadCrumbs
+ extends Toolkit_Toolbox_BreadCrumbsAbstract
+{
+ protected function getPageUri(array $page)
+ {
+ $uri = MEDIA_BASE_URL . "admin/toolbox.php?rt=EditPage&id={$page['id']}";
+ return "<a href=\"{$uri}\">{$page['navigation_name']}</a>";
+ }
+}
+?>
--- /dev/null
+<?php
+
+class Toolkit_Toolbox_PageDraftBreadCrumbs
+ extends Toolkit_Toolbox_BreadCrumbsAbstract
+{
+ // {{{ getPageUri()
+
+ protected function getPageUri(array $page)
+ {
+ $uri = MEDIA_BASE_URL . "admin/toolbox.php?rt=EditPage&id={$page['id']}";
+ return "<a href=\"{$uri}\">{$page['navigation_name']}</a>";
+ }
+
+ // }}}
+ // {{{ getDraft()
+
+ protected function getDraft($id)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM pages_draft
+ WHERE id = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+
+ return $stmt->fetch(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Could not fetch parent for page `$id`"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ getPath()
+
+ /**
+ * @return the $path
+ */
+ public function getPath()
+ {
+ if ($this->id == HOME_ID) {
+ return;
+ }
+
+ $draft = $this->getDraft($this->id);
+ $stack = array($draft['navigation_name']);
+
+ $publishedPage = $this->getPage($draft['published_page']);
+ $id = $publishedPage['parent'];
+ while ($id != 0) {
+ $page = $this->getPage($id);
+
+ $navigationName = $this->getPageUri($page);
+
+ $stack[] = $navigationName;
+ $id = $page['parent'];
+ }
+
+ $reverse = array_reverse($stack);
+ $this->path = implode(' > ', $reverse);
+
+ return $this->path;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+abstract class Toolkit_Toolbox_PageGatewayAbstract
+ extends Toolkit_Toolbox_GatewayAbstract
+{
+ protected $page;
+
+ // {{{ hasMemberDb()
+
+ protected function hasMemberDb()
+ {
+ return (defined('MEMBERS_DB') && MEMBERS_DB);
+ }
+
+ // }}}
+ // {{{ hasCouponDb()
+
+ protected function hasCouponDb()
+ {
+ return (defined('COUPONS') && COUPONS);
+ }
+
+ // }}}
+ // {{{ hasHeadlines()
+
+ protected function hasHeadlines()
+ {
+ return (defined('HOME_HEADLINES') && HOME_HEADLINES);
+ }
+
+ // }}}
+ // {{{ hasPhotoGallery()
+
+ protected function hasPhotoGallery()
+ {
+ return (defined('PHOTO_GALLERY') && PHOTO_GALLERY);
+ }
+
+ // }}}
+
+ // {{{ findAll()
+
+ abstract public function findAll();
+
+ // }}}
+ // {{{ findAllByParent()
+
+ public function findAllByParent($parent)
+ {
+ try {
+ $sql = "
+ SELECT id,navigation_name,parent,active
+ FROM pages
+ WHERE parent = :parent
+ ORDER by parent, pos";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':parent', $parent, PDO::PARAM_INT);
+ $stmt->execute();
+ return $stmt->fetchAll(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Error fetching all pages by parent `$parent`"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ findByKeyword()
+
+ abstract public function findByKeyword($keyword);
+
+ // }}}
+ // {{{ findTopParent()
+
+ abstract public function findTopParent($pageId);
+
+ // }}}
+ // {{{ findPage()
+
+ protected function findPage($id, $pageSql)
+ {
+ // if the page has already been fetched, just return it.
+ if (is_array($this->page) && $this->page['id'] == $id) {
+ return $this->page;
+ }
+
+ $pageStatsSql = "
+ SELECT count(*) AS revised,
+ MIN(revision_timestamp) AS created,
+ MAX(revision_timestamp) AS last_modified
+ FROM pages_history
+ WHERE id = :id";
+
+ $pageStmt = $this->dbh->prepare($pageSql);
+ $pageStmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $pageStmt->execute();
+
+ $page = $pageStmt->fetch(PDO::FETCH_ASSOC);
+
+ if ($page === false) { // Page doesn't exist
+ return false;
+ }
+
+ if ($this->hasMemberDb()) {
+ $page['member_categories']
+ = $this->getMemberCategoriesForPage($id);
+ $page['member_regions']
+ = $this->getMemberRegionsForPage($id);
+ }
+
+ if ($this->hasCouponDb()) {
+ $page['coupon_categories']
+ = $this->getCouponCategoriesForPage($id);
+ }
+
+ if ($this->hasPhotoGallery()) {
+ $page['photo_galleries']
+ = $this->getPhotoGalleriesForPage($id);
+ }
+
+ $pageStatsStmt = $this->dbh->prepare($pageStatsSql);
+ $pageStatsStmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $pageStatsStmt->execute();
+
+ $pageStats = $pageStatsStmt->fetch(PDO::FETCH_ASSOC);
+
+ $date = new Date();
+ $date->setDate(strtotime($pageStats['created']), DATE_FORMAT_UNIXTIME);
+ $pageStats['created'] = $date->format('%D %r');
+ $date->setDate(strtotime($pageStats['last_modified']), DATE_FORMAT_UNIXTIME);
+ $pageStats['last_modified'] = $date->format('%D %r');
+ $page = array_merge($page, $pageStats);
+
+ if (!empty($page['image'])) {
+ $imgFormat = "<img alt=\"%s\" src=\"%s\">";
+ $page['current_image_original'] = sprintf(
+ $imgFormat,
+ $page['image'],
+ TOOLBOX_ORIGINAL . $page['image']
+ );
+ $page['current_image_resized'] = sprintf(
+ $imgFormat,
+ $page['image'],
+ TOOLBOX_RESIZED . $page['image']
+ );
+ $page['current_image_midsized'] = sprintf(
+ $imgFormat,
+ $page['image'],
+ TOOLBOX_MIDSIZED . $page['image']
+ );
+ $page['current_image_thumb'] = sprintf(
+ $imgFormat,
+ $page['image'],
+ TOOLBOX_THUMB . $page['image']
+ );
+ } else {
+ $page['current_image_original'] = 'Image not yet uploaded';
+ $page['current_image_resized'] = 'Image not yet uploaded';
+ $page['current_image_midsized'] = 'Image not yet uploaded';
+ $page['current_image_thumb'] = 'Image not yet uploaded';
+ }
+
+ $this->page = $page;
+ return $this->page;
+ }
+
+ // }}}
+
+ // {{{ getCurrentPage()
+
+ /**
+ * Gets the current page for the template if it exists
+ *
+ * @return mixed array of current page or false if no current page is set
+ * @access public
+ */
+ public function getCurrentPage()
+ {
+ return is_array($this->page) ? $this->page : false;
+ }
+
+ // }}}
+ // {{{ getHomePageHeadlines()
+
+ public function getHomePageHeadlines()
+ {
+ $wordCounter = array(
+ 1 => 'one',
+ 2 => 'two',
+ 3 => 'three',
+ 4 => 'four'
+ );
+ $headlines = array();
+ $sql = "
+ SELECT p1.id, p1.navigation_name, p1.headline_intro, p2.image
+ FROM pages p1 join paragraphs p2 on (p1.id = p2.page)
+ WHERE p1.headline = true
+ AND p1.active = true
+ AND p2.pos = 1
+ ORDER BY p1.parent, p1.pos";
+
+ $count = 1;
+ foreach ($this->dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC) as $row) {
+ $headlines[] = array(
+ 'count' => $wordCounter[$count],
+ 'href' => Toolkit_Template_Page::getSeoUrl($this, $row['id']),
+ 'img' => ($row['image'])
+ ? HOMEPAGE_HEADLINE_THUMB . $row['image']
+ : '',
+ 'header' => $row['navigation_name'],
+ 'descr' => nl2br($row['headline_intro']),
+ );
+ if (++$count > 4) {
+ $count = 1;
+ }
+ }
+
+ return $headlines;
+ }
+
+ // }}}
+
+ // {{{ setPageVars()
+
+ protected function setPageVars(PDOStatement &$stmt, $data)
+ {
+ if ($this->hasHeadlines()) {
+ $data['headline'] = (bool)$data['headline'];
+ $stmt->bindParam(
+ ':headline',
+ $data['headline'],
+ PDO::PARAM_BOOL
+ );
+ $stmt->bindParam(':headline_intro', $data['headline_intro']);
+ }
+
+ if ($this->hasMemberDb()) {
+ $data['include_member_map'] = (bool)$data['include_member_map'];
+ $data['search_form'] = (bool)$data['search_form'];
+ $stmt->bindParam(
+ ':include_member_map',
+ $data['include_member_map'],
+ PDO::PARAM_BOOL
+ );
+ $stmt->bindParam(
+ ':search_form',
+ $data['search_form'],
+ PDO::PARAM_BOOL
+ );
+ }
+
+ $stmt->bindParam(':keyword', $data['keyword']);
+ $stmt->bindParam(':meta_title', $data['meta_title']);
+ $stmt->bindParam(':meta_description', $data['meta_description']);
+ $stmt->bindParam(':navigation_name', $data['navigation_name']);
+ $stmt->bindParam(':parent', $data['parent']);
+ $stmt->bindParam(':paragraph_links', $data['paragraph_links']);
+ $stmt->bindParam(':short_url', $data['short_url']);
+ $stmt->bindParam(':template', $data['template']);
+ $stmt->bindParam(':include_members', $data['include_members']);
+ $stmt->bindParam(':include_coupons', $data['include_coupons']);
+ }
+
+ // }}}
+ // {{{ setParagraphVars()
+
+ protected function setParagraphVars(PDOStatement &$stmt, $data)
+ {
+ if ($data['remove_image']) {
+ $data['image'] = '';
+ }
+ $stmt->bindParam(':title', $data['title']);
+ $stmt->bindParam(':description', $data['description']);
+ $stmt->bindParam(':image', $data['image']);
+ $stmt->bindParam(':caption', $data['caption']);
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+class Toolkit_Toolbox_PageGatewayDraft
+ extends Toolkit_Toolbox_PageGatewayAbstract
+{
+ // {{{ delete()
+
+ public function delete($id)
+ {
+ $pageSql = "
+ DELETE
+ FROM pages_draft
+ WHERE id = :id";
+
+ try {
+ $stmt = $this->dbh->prepare($pageSql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ return $stmt->execute();
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to delete page draft `$id`"
+ );
+ }
+ }
+
+ // }}}
+ public function findNavItem($id)
+ {
+ $sql = "
+ SELECT id,navigation_name,parent,short_url
+ FROM pages
+ WHERE id = :id";
+
+ try {
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(
+ ':id',
+ $id,
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+ return $stmt->fetch(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception("Unable to find page `$id`");
+ }
+ }
+ // {{{ find()
+
+ public function find($id)
+ {
+ $pageSql = "
+ SELECT p1.*, p1.id AS page_id,
+ CASE p1.active
+ WHEN true THEN 'active'
+ ELSE 'In-Active'
+ END AS active, p2.title, p2.description, p2.image, p2.caption
+ FROM pages_draft p1
+ LEFT JOIN paragraphs_draft p2
+ ON p1.id = p2.page
+ WHERE p1.id = :id
+ AND (p2.pos = 1 OR p2.pos IS NULL)";
+
+ try {
+ return $this->findPage($id, $pageSql);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to find page draft `$id`"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ findAll()
+
+ public function findAll()
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM pages_draft
+ ORDER by parent, pos";
+
+ return $this->dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ 'Error fetching all draft pages'
+ );
+ }
+ }
+
+ // }}}
+ // {{{ findByKeyword()
+
+ public function findByKeyword($keyword)
+ {
+ try {
+ $pageSql = "
+ SELECT id
+ FROM pages_draft
+ WHERE keyword = :keyword";
+
+ $stmt = $this->dbh->prepare($pageSql);
+ $stmt->bindParam(':keyword', $keyword);
+ $stmt->execute();
+
+ // Bind by column number
+ $stmt->bindColumn(1, $id);
+
+ $stmt->fetch(PDO::FETCH_ASSOC);
+
+ return $this->find($id);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to find page draft `$id`"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ findTopParent()
+
+ public function findTopParent($pageId, $useDraftTable = true)
+ {
+ if (!ctype_digit((string)$pageId)) {
+ throw new runtimeException("Invalid pageId `$pageId` to fetch");
+ }
+
+ try {
+ if ($useDraftTable) {
+ $sql = "
+ SELECT *
+ FROM pages_draft
+ WHERE id = :id";
+ } else {
+ $sql = "
+ SELECT *
+ FROM pages
+ WHERE id = :id";
+ }
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $pageId, PDO::PARAM_INT);
+ $stmt->execute();
+
+ $row = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if ($row['parent'] == '0') {
+ return $row['id'];
+ } else {
+ return $this->findTopParent($row['parent'], false);
+ }
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to find parent for page `$pageId`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ insert()
+
+ public function insert(array $data)
+ {
+ if (empty($data['published_page'])) {
+ settype($data['published_page'], 'null');
+ }
+
+ if ($this->hasHeadlines()) {
+ $headlineColumns = 'headline, headline_intro,';
+ $headlineParams = ':headline, :headline_intro,';
+ }
+
+ if ($this->hasMemberDb()) {
+ $memberColumns = 'include_member_map, search_form, ';
+ $memberParams = ':include_member_map, :search_form, ';
+ }
+
+ $pageSql = "
+ INSERT INTO pages_draft (
+ $headlineColumns $memberColumns keyword, meta_title,
+ meta_description, navigation_name, parent, paragraph_links,
+ short_url, template, published_page, include_members, include_coupons)
+ VALUES (
+ $headlineParams $memberParams :keyword, :meta_title,
+ :meta_description, :navigation_name, :parent,
+ :paragraph_links, :short_url, :template, :published_page, :include_members, :include_coupons)";
+
+ $paragraphSql = "
+ INSERT INTO paragraphs_draft (
+ active, title, description, image, caption, page)
+ VALUES (
+ true, :title, :description, :image, :caption, :page)";
+
+ try {
+ $this->dbh->beginTransaction();
+
+ $pageStmt = $this->dbh->prepare($pageSql);
+ $this->setPageVars($pageStmt, $data);
+ $pageStmt->bindParam(':published_page', $data['published_page']);
+ $pageStmt->execute();
+
+ $row = $this->dbh
+ ->query('select id from pages_draft order by id desc limit 1')
+ ->fetch(PDO::FETCH_ASSOC);
+
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ $this->_updateMemberCategories(
+ $data['member_categories'],
+ $row['id']
+ );
+ }
+
+ if (defined('COUPONS') && COUPONS) {
+ $this->_updateCouponCategories(
+ $data['coupon_categories'],
+ $row['id']
+ );
+ $this->_updateMemberCities(
+ $data['member_regions'],
+ $row['id']
+ );
+ }
+
+ $paragraphStmt = $this->dbh->prepare($paragraphSql);
+ $this->setParagraphVars($paragraphStmt, $data);
+ $paragraphStmt->bindParam(':page', $row['id']);
+ $paragraphStmt->execute();
+
+ $this->dbh->commit();
+
+ return $row['id'];
+ } catch (PDOException $e) {
+ $this->dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+ $content = serialize($data);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to insert page draft [$content]"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ update()
+
+ public function update(array $data, $id)
+ {
+ if ($this->hasHeadlines()) {
+ $headlineColumns = '
+ headline = :headline,
+ headline_intro = :headline_intro, ';
+ }
+
+ if ($this->hasMemberDb()) {
+ $memberColumns = '
+ include_member_map = :include_member_map,
+ search_form = :search_form, ';
+ }
+
+ $pageSql = "
+ UPDATE pages_draft
+ SET $headlineColumns
+ $memberColumns
+ keyword = :keyword,
+ meta_title = :meta_title,
+ meta_description = :meta_description,
+ navigation_name = :navigation_name,
+ parent = :parent,
+ paragraph_links = :paragraph_links,
+ short_url = :short_url,
+ template = :template,
+ include_members = :include_members,
+ include_coupons = :include_coupons
+ WHERE id = :id";
+
+ $paragraphSql = "
+ UPDATE paragraphs_draft
+ SET title = :title,
+ description = :description,
+ image = :image,
+ caption = :caption
+ WHERE page = :page
+ AND pos = 1";
+
+ try {
+ $this->dbh->beginTransaction();
+
+ $pageStmt = $this->dbh->prepare($pageSql);
+ $this->setPageVars($pageStmt, $data);
+ $pageStmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $pageStmt->execute();
+
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ $this->_updateMemberCategories($data['member_categories'], $id);
+ $this->_updateMemberCities($data['member_regions'], $id);
+ }
+ if (defined('COUPONS') && COUPONS) {
+ $this->_updateCouponCategories($data['coupon_categories'], $id);
+ }
+
+ $paragraphStmt = $this->dbh->prepare($paragraphSql);
+ $this->setParagraphVars($paragraphStmt, $data);
+ $paragraphStmt->bindParam(':page', $id);
+ $paragraphStmt->execute();
+
+ return $this->dbh->commit();
+ } catch (PDOException $e) {
+ $this->dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+ $content = serialize($data);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to update page draft [$content]"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ _updateMemberCategories()
+
+ private function _updateMemberCategories(array $data = null, $id)
+ {
+ $deleteCatsSql = "
+ DELETE FROM member_categories2toolbox_pages_draft
+ WHERE page = :id";
+ $delStmt = $this->dbh->prepare($deleteCatsSql);
+ $delStmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $delStmt->execute();
+
+ if (is_array($data)) {
+ $insertCatsSql = "
+ INSERT INTO member_categories2toolbox_pages_draft (page, category)
+ VALUES (:page, :category)";
+ $insStmt = $this->dbh->prepare($insertCatsSql);
+ $insStmt->bindParam(':page', $id, PDO::PARAM_INT);
+ foreach ($data as $category) {
+ $insStmt->bindParam(':category', $category, PDO::PARAM_INT);
+ $insStmt->execute();
+ }
+ }
+ }
+
+ // }}}
+ // {{{ getMemberCategoriesForPage()
+
+ protected function getMemberCategoriesForPage($id)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM member_categories2toolbox_pages_draft
+ WHERE page = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id);
+ $stmt->execute();
+
+ $categories = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $categories[] = $row['category'];
+ }
+
+ return $categories;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to fetch member categories for page draft `$id`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ _updateMemberCities()
+
+ private function _updateMemberCities(array $data = null, $id)
+ {
+ $deleteCitiesSql = "
+ DELETE FROM member_regions2toolbox_pages_draft
+ WHERE page = :id";
+ $delStmt = $this->dbh->prepare($deleteCitiesSql);
+ $delStmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $delStmt->execute();
+
+ if (is_array($data)) {
+ $insertCitiesSql = "
+ INSERT INTO member_regions2toolbox_pages_draft (page, region)
+ VALUES (:page, :region)";
+ $insStmt = $this->dbh->prepare($insertCitiesSql);
+ $insStmt->bindParam(':page', $id, PDO::PARAM_INT);
+ foreach ($data as $region) {
+ $insStmt->bindParam(':region', $region, PDO::PARAM_INT);
+ $insStmt->execute();
+ }
+ }
+ }
+
+ // }}}
+ // // {{{ getMemberRegionsForPage()
+
+ protected function getMemberRegionsForPage($id)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM member_regions2toolbox_pages_draft
+ WHERE page = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id);
+ $stmt->execute();
+
+ $regions = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $regions[] = $row['region'];
+ }
+
+ return $regions;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to fetch member regions for page `$id`"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ getMemberCitiesForPage()
+
+ protected function getMemberCitiesForPage($id)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM member_regions2toolbox_pages_draft
+ WHERE page = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id);
+ $stmt->execute();
+
+ $regions = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $regions[] = $row['region'];
+ }
+
+ return $regions;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to fetch member regions for page `$id`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ _updateCouponCategories()
+
+ private function _updateCouponCategories(array $data = null, $id)
+ {
+ $deleteCatsSql = "
+ DELETE FROM coupon_categories2toolbox_pages_draft
+ WHERE page = :id";
+ $delStmt = $this->dbh->prepare($deleteCatsSql);
+ $delStmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $delStmt->execute();
+
+ if (is_array($data)) {
+ $insertCatsSql = "
+ INSERT INTO coupon_categories2toolbox_pages_draft (page, category)
+ VALUES (:page, :category)";
+ $insStmt = $this->dbh->prepare($insertCatsSql);
+ $insStmt->bindParam(':page', $id, PDO::PARAM_INT);
+ foreach ($data as $category) {
+ $insStmt->bindParam(':category', $category, PDO::PARAM_INT);
+ $insStmt->execute();
+ }
+ }
+ }
+
+ // }}}
+ // {{{ getCouponCategoriesForPage()
+
+ protected function getCouponCategoriesForPage($id)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM coupon_categories2toolbox_pages_draft
+ WHERE page = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id);
+ $stmt->execute();
+
+ $categories = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $categories[] = $row['category'];
+ }
+
+ return $categories;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to fetch coupon categories for page draft `$id`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ getPhotoGalleriesForPage()
+
+ protected function getPhotoGalleriesForPage($id)
+ {
+ try {
+ $sql = "
+ SELECT pc.*
+ FROM photo_category pc
+ JOIN photo_category_bus pcb
+ ON (pc.id = pcb.photocat_id)
+ JOIN pages_draft pd
+ ON (pd.published_page = pcb.buscat_id)
+ WHERE pcb.buscat_id = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id);
+ $stmt->execute();
+
+ $photoGalleries = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $photoGalleries[$row['id']] = $row['category'];
+ }
+
+ return $photoGalleries;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to fetch member categories for page `$id`"
+ );
+ }
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+class Toolkit_Toolbox_PageGatewayDraftFactory
+ extends Toolkit_Toolbox_GatewayFactoryAbstract
+{
+ public function createGateway()
+ {
+ return new Toolkit_Toolbox_PageGatewayDraft($this->dbh);
+ }
+}
+?>
--- /dev/null
+<?php
+class Toolkit_Toolbox_PageGatewayPublish
+ extends Toolkit_Toolbox_PageGatewayAbstract
+{
+ // {{{ delete()
+
+ public function delete($id)
+ {
+ $pageSql = "SELECT delete_subtree(:id)";
+
+ $createTableSql = "
+ CREATE LOCAL TEMPORARY TABLE WorkingTable
+ (id INTEGER NOT NULL)
+ ON COMMIT DELETE ROWS";
+
+ try {
+
+ $this->dbh->beginTransaction();
+
+ $this->dbh->query($createTableSql);
+
+ $stmt = $this->dbh->prepare($pageSql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+
+ return $this->dbh->commit();
+ } catch (PDOException $e) {
+ $this->dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to delete subtree `$id`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ find()
+
+ public function find($id)
+ {
+ $pageSql = "
+ SELECT p1.*, p1.id AS page_id, p1.id AS published_page,
+ CASE p1.active
+ WHEN CAST(1 AS BOOLEAN) THEN 'active'
+ ELSE 'In-Active'
+ END AS active_alt, p2.title, p2.description, p2.image, p2.caption
+ FROM pages p1
+ LEFT JOIN paragraphs p2
+ ON p1.id = p2.page
+ WHERE p1.id = :id
+ AND (p2.pos = 1 OR p2.pos IS NULL)";
+
+ try {
+ return $this->findPage($id, $pageSql);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception("Unable to find page `$id`");
+ }
+ }
+
+ // }}}
+ public function findNavItem($id)
+ {
+ $sql = "
+ SELECT id,navigation_name,parent,short_url
+ FROM pages
+ WHERE id = :id";
+
+ try {
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(
+ ':id',
+ $id,
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+ return $stmt->fetch(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception("Unable to find page `$id`");
+ }
+ }
+ // {{{ findAll()
+
+ public function findAll()
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM pages
+ ORDER by parent, pos";
+
+ return $this->dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ 'Error fetching all published pages'
+ );
+ }
+ }
+
+ // }}}
+ // {{{ findByKeyword()
+
+ public function findByKeyword($keyword)
+ {
+ $keyword = strtolower(trim($keyword));
+ try {
+ $pageSql = "
+ SELECT id
+ FROM pages
+ WHERE lower(trim(keyword)) = :keyword";
+
+ $stmt = $this->dbh->prepare($pageSql);
+ $stmt->bindParam(':keyword', $keyword);
+ $stmt->execute();
+
+ // Bind by column number
+ $stmt->bindColumn(1, $id);
+
+ $stmt->fetch(PDO::FETCH_ASSOC);
+
+ return $this->findNavItem($id);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to find keyword `$keyword`"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ findTopParent()
+
+ public function findTopParent($pageId)
+ {
+ if (!filter_var($pageId, FILTER_VALIDATE_INT)) {
+ throw new runtimeException("Invalid pageId `$pageId` to fetch");
+ }
+
+ try {
+ $sql = "
+ SELECT parent,id
+ FROM pages
+ WHERE id = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $pageId, PDO::PARAM_INT);
+ $stmt->execute();
+
+ $row = $stmt->fetch(PDO::FETCH_ASSOC);
+ if (!$stmt->rowCount()) {
+ return false;
+ }
+
+ if ($row['parent'] == '0') {
+ return $row['id'];
+ } else {
+ return $this->findTopParent($row['parent']);
+ }
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to find parent for page `$pageId`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ insert()
+
+ public function insert(array $data)
+ {
+ if ($this->hasHeadlines()) {
+ $headlineColumns = 'headline, headline_intro,';
+ $headlineParams = ':headline, :headline_intro,';
+ }
+
+ if ($this->hasMemberDb()) {
+ $memberColumns = 'include_member_map, search_form, ';
+ $memberParams = ':include_member_map, :search_form, ';
+ }
+
+ $pageSql = "
+ INSERT INTO pages (
+ $headlineColumns $memberColumns keyword, meta_title,
+ meta_description, navigation_name, parent, paragraph_links,
+ short_url, template, include_members, include_coupons)
+ VALUES (
+ $headlineParams $memberParams :keyword, :meta_title,
+ :meta_description, :navigation_name, :parent,
+ :paragraph_links, :short_url, :template, :include_members, :include_coupons)
+ RETURNING id";
+
+ $paragraphSql = "
+ INSERT INTO paragraphs (
+ active, title, description, image, caption, page)
+ VALUES (
+ true, :title, :description, :image, :caption, :page)";
+
+ try {
+ $this->dbh->beginTransaction();
+
+ $pageStmt = $this->dbh->prepare($pageSql);
+ $this->setPageVars($pageStmt, $data);
+ $pageStmt->execute();
+
+ $pageId = $pageStmt->fetchColumn();
+
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ $this->_updateMemberCategories(
+ $data['member_categories'],
+ $pageId
+ );
+ $this->_updateMemberRegions(
+ $data['member_regions'],
+ $pageId
+ );
+ }
+
+ if (defined('COUPONS') && COUPONS) {
+ $this->_updateCouponCategories(
+ $data['coupon_categories'],
+ $pageId
+ );
+ }
+
+ $paragraphStmt = $this->dbh->prepare($paragraphSql);
+ $this->setParagraphVars($paragraphStmt, $data);
+ $paragraphStmt->bindParam(':page', $pageId);
+ $paragraphStmt->execute();
+
+ // for some reason when Jodie is adding new pages the page position
+ // get messed up maybe more than one person it adding or updating
+ // pages I don't know either way when adding in new pages
+ // we'll have to go through all pages that have the same
+ // parent and redo the page positions so they don't get off order
+ $sql = "
+ SELECT id,pos
+ FROM pages
+ WHERE parent = :parent
+ ORDER BY pos";
+ $stmt = $this->dbh->prepare($sql);
+ $sql = "
+ UPDATE pages
+ SET pos = :pos
+ WHERE id = :id";
+ $updatePositionOfPage = $this->dbh->prepare($sql);
+ $stmt->bindParam(':parent', $data['parent'], PDO::PARAM_INT);
+ $stmt->execute();
+ $pos = 1;
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $updatePositionOfPage->bindParam(
+ ':id',
+ $row['id'],
+ PDO::PARAM_INT
+ );
+ $updatePositionOfPage->bindParam(
+ ':pos',
+ $pos,
+ PDO::PARAM_INT
+ );
+ $updatePositionOfPage->execute();
+ ++$pos;
+ }
+
+ $this->dbh->commit();
+ return $pageId;
+ } catch (PDOException $e) {
+ $this->dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+ $content = serialize($data);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to insert page [$content]"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ update()
+
+ public function update(array $data, $id)
+ {
+ if ($this->hasHeadlines()) {
+ $headlineColumns = '
+ headline = :headline,
+ headline_intro = :headline_intro, ';
+ }
+
+ if ($this->hasMemberDb()) {
+ $memberColumns = '
+ include_member_map = :include_member_map,
+ search_form = :search_form, ';
+ }
+
+ try {
+ $this->dbh->beginTransaction();
+ // need to know if we're moving this to another parent
+ $sql = "
+ SELECT parent, pos
+ FROM pages
+ WHERE id = :id";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(
+ ":id",
+ $id,
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+
+ // the old parent of the page
+ $oldData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $oldParent = $oldData['parent'];
+ $oldPos = $oldData['pos'];
+ if ($data['parent'] != $oldParent) {
+ // adjust the old level to normal
+ $sql = "
+ UPDATE pages
+ SET pos = pos - 1
+ WHERE pos > :pos
+ AND parent = :parent
+ ";
+ $preStmt = $this->dbh->prepare($sql);
+ $preStmt->bindParam(
+ ":parent",
+ $oldParent,
+ PDO::PARAM_INT
+ );
+ $preStmt->bindParam(
+ ":pos",
+ $oldPos,
+ PDO::PARAM_INT
+ );
+ $preStmt->execute();
+ // if it is then get next position number for new parent
+ $sql = "
+ SELECT max(pos) + 1
+ FROM pages
+ WHERE parent = :parent";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(
+ ":parent",
+ $data['parent'],
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+ $pos = $stmt->fetchColumn();
+ }
+
+ $pageSql = "
+ UPDATE pages
+ SET $headlineColumns
+ $memberColumns
+ keyword = :keyword,
+ meta_title = :meta_title,
+ meta_description = :meta_description,
+ navigation_name = :navigation_name,
+ parent = :parent,
+ paragraph_links = :paragraph_links,
+ short_url = :short_url,
+ template = :template ,
+ include_members = :include_members,
+ include_coupons = :include_coupons";
+ if ($pos) {
+ $pageSql .= ", pos = $pos ";
+ }
+
+ $pageSql .= "
+ WHERE id = :id";
+
+ $paragraphSql = "
+ UPDATE paragraphs
+ SET title = :title,
+ description = :description,
+ image = :image,
+ caption = :caption
+ WHERE page = :page
+ AND pos = 1";
+
+ $pageStmt = $this->dbh->prepare($pageSql);
+ $this->setPageVars($pageStmt, $data);
+ $pageStmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $pageStmt->execute();
+
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ $this->_updateMemberCategories($data['member_categories'], $id);
+ $this->_updateMemberRegions($data['member_regions'], $id);
+ }
+ if (defined('COUPONS') && COUPONS) {
+ $this->_updateCouponCategories($data['coupon_categories'], $id);
+ }
+
+ $paragraphStmt = $this->dbh->prepare($paragraphSql);
+ $this->setParagraphVars($paragraphStmt, $data);
+ $paragraphStmt->bindParam(':page', $id);
+ $paragraphStmt->execute();
+
+ return $this->dbh->commit();
+ } catch (PDOException $e) {
+ $this->dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+ $content = serialize($data);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to update page [$content]"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ _updateMemberCategories()
+
+ private function _updateMemberCategories(array $data = null, $id)
+ {
+ $deleteCatsSql = "
+ DELETE FROM member_categories2toolbox_pages
+ WHERE page = :id";
+ $delStmt = $this->dbh->prepare($deleteCatsSql);
+ $delStmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $delStmt->execute();
+
+ if (is_array($data)) {
+ $insertCatsSql = "
+ INSERT INTO member_categories2toolbox_pages (page, category)
+ VALUES (:page, :category)";
+ $insStmt = $this->dbh->prepare($insertCatsSql);
+ $insStmt->bindParam(':page', $id, PDO::PARAM_INT);
+ foreach ($data as $category) {
+ $insStmt->bindParam(':category', $category, PDO::PARAM_INT);
+ $insStmt->execute();
+ }
+ }
+ }
+
+ // }}}
+ // {{{ getMemberCategoriesForPage()
+
+ protected function getMemberCategoriesForPage($id)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM member_categories2toolbox_pages
+ WHERE page = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id);
+ $stmt->execute();
+
+ $categories = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $categories[] = $row['category'];
+ }
+
+ return $categories;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to fetch member categories for page `$id`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ _updateMemberRegions()
+
+ private function _updateMemberRegions(array $data = null, $id)
+ {
+ $deleteRegionsSql = "
+ DELETE FROM member_regions2toolbox_pages
+ WHERE page = :id";
+ $delStmt = $this->dbh->prepare($deleteRegionsSql);
+ $delStmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $delStmt->execute();
+
+ if (is_array($data)) {
+ $insertRegionsSql = "
+ INSERT INTO member_regions2toolbox_pages (page, region)
+ VALUES (:page, :region)";
+ $insStmt = $this->dbh->prepare($insertRegionsSql);
+ $insStmt->bindParam(':page', $id, PDO::PARAM_INT);
+ foreach ($data as $region) {
+ $insStmt->bindParam(':region', $region, PDO::PARAM_INT);
+ $insStmt->execute();
+ }
+ }
+ }
+
+ // }}}
+ // {{{ getMemberRegionsForPage()
+
+ protected function getMemberRegionsForPage($id)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM member_regions2toolbox_pages
+ WHERE page = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id);
+ $stmt->execute();
+
+ $regions = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $regions[] = $row['region'];
+ }
+
+ return $regions;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to fetch member regions for page `$id`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ _updateCouponCategories()
+
+ private function _updateCouponCategories(array $data = null, $id)
+ {
+ $deleteCatsSql = "
+ DELETE FROM coupon_categories2toolbox_pages
+ WHERE page = :id";
+ $delStmt = $this->dbh->prepare($deleteCatsSql);
+ $delStmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $delStmt->execute();
+
+ if (is_array($data)) {
+ $insertCatsSql = "
+ INSERT INTO coupon_categories2toolbox_pages (page, category)
+ VALUES (:page, :category)";
+ $insStmt = $this->dbh->prepare($insertCatsSql);
+ $insStmt->bindParam(':page', $id, PDO::PARAM_INT);
+ foreach ($data as $category) {
+ $insStmt->bindParam(':category', $category, PDO::PARAM_INT);
+ $insStmt->execute();
+ }
+ }
+ }
+
+ // }}}
+ // {{{ getCouponCategoriesForPage()
+
+ protected function getCouponCategoriesForPage($id)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM coupon_categories2toolbox_pages
+ WHERE page = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id);
+ $stmt->execute();
+
+ $categories = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $categories[] = $row['category'];
+ }
+
+ return $categories;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to fetch coupon categories for page `$id`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ getPhotoGalleriesForPage()
+
+ protected function getPhotoGalleriesForPage($id)
+ {
+ try {
+ $sql = "
+ SELECT pc.*
+ FROM photo_category pc
+ JOIN photo_category_bus pcb
+ ON (pc.id = pcb.photocat_id)
+ WHERE pcb.buscat_id = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id);
+ $stmt->execute();
+
+ $photoGalleries = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $photoGalleries[$row['id']] = $row['category'];
+ }
+
+ return $photoGalleries;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to fetch member categories for page `$id`"
+ );
+ }
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+class Toolkit_Toolbox_PageGatewayPublishFactory
+ extends Toolkit_Toolbox_GatewayFactoryAbstract
+{
+ public function createGateway()
+ {
+ return new Toolkit_Toolbox_PageGatewayPublish($this->dbh);
+ }
+}
--- /dev/null
+<?php
+class Toolkit_Toolbox_PagesTree extends Toolkit_Toolbox_TreeAbstract
+{
+ // {{{ properties
+
+ protected $rootNodeStart = "<ul id=\"toolbox\">\n";
+ protected $leafStart = "\n\t<li id=\"cat_%s\" %s>\n";
+
+ protected $toolbox;
+
+ // }}}
+ // {{{ getActiveBall()
+
+ protected function getActiveBall(array $branch)
+ {
+ $key = array_key_exists('published_page', $branch)
+ ? 'published_page'
+ : 'id';
+ $homePage = ($branch[$key] == HOME_ID);
+ $memberDbHomePage = (defined('MEMBERS_DB')
+ && MEMBERS_DB
+ && $branch[$key] == MEMBERS_ONLY_HOME_PAGE);
+
+ if ($homePage || $memberDbHomePage) {
+ return '<a class="tOff"><img src="'.MEDIA_BASE_URL . 'Toolkit/Toolbox/assets/grnball.gif" alt="Active Ball"></a>';
+ }
+
+ $activeFormat = '<a class="active-ball" rel="%s" href="%s" title="%s">';
+ $activeFormat .= $this->getActiveBallImage($branch);
+ $activeFormat .= '</a>';
+
+ return sprintf(
+ $activeFormat,
+ $branch['id'],
+ MEDIA_BASE_URL . "admin/toolbox.php?id={$branch['id']}",
+ $branch['active_alt']
+ );
+ }
+
+ // }}}
+ // {{{ getActiveMobileBall()
+
+ protected function getActiveMobileBall(array $branch)
+ {
+ $key = array_key_exists('published_page', $branch)
+ ? 'published_page'
+ : 'id';
+ $nonMobilePages
+ = (defined('NON_MOBILE_PAGES'))
+ ? unserialize(NON_MOBILE_PAGES)
+ : array();
+ $nonMobilePages[] = HOME_ID;
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ $nonMobilePages[] = MEMBERS_ONLY_HOME_PAGE;
+ $nonMobilePages[] = MEMBERS_CATEGORY;
+ }
+
+ if (in_array($branch[$key], $nonMobilePages)) {
+ return '<a class="tOff"><img src="'.MEDIA_BASE_URL . 'Toolkit/Toolbox/assets/grnball.gif" alt="Active Ball"></a>';
+ }
+
+ $activeFormat = '<a class="mobile-active-ball" rel="%s" href="%s" title="%s">';
+ $activeFormat .= $this->getActiveMobileBallImage($branch);
+ $activeFormat .= '</a>';
+
+ return sprintf(
+ $activeFormat,
+ $branch['id'],
+ MEDIA_BASE_URL . "admin/toolbox.php?id={$branch['id']}",
+ $branch['active_alt']
+ );
+ }
+
+ // }}}
+ // {{{ _getMoveArrows()
+
+ private function _getMoveArrows($branch)
+ {
+ $homePage = ($branch['id'] == HOME_ID);
+ $memberDbHomePage = (defined('MEMBERS_DB')
+ && MEMBERS_DB
+ && $branch['id'] == MEMBERS_ONLY_HOME_PAGE);
+
+ if ($homePage || $memberDbHomePage) {
+ $format = '<img src="%s" class="tOff" alt="%s">';
+
+ $up = sprintf(
+ $format,
+ MEDIA_APP_BASE_URL . "assets/icons/arrow_up.png",
+ 'Move Up Arrow'
+ );
+
+ $down = sprintf(
+ $format,
+ MEDIA_APP_BASE_URL . "assets/icons/arrow_down.png",
+ 'Move Down Arrow'
+ );
+ } else {
+ $format = '<img src="%s" alt="Move %s Arrow" class="move%s">';
+
+ $up = sprintf(
+ $format,
+ MEDIA_APP_BASE_URL . "assets/icons/arrow_up.png",
+ 'Up',
+ 'Up'
+ );
+
+ $down = sprintf(
+ $format,
+ MEDIA_APP_BASE_URL . "assets/icons/arrow_down.png",
+ 'Down',
+ 'Down'
+ );
+ }
+
+
+ return $up . $down;
+ }
+
+ // }}}
+
+ private function _getPositionSelect($branch)/*{{{*/
+ {
+ $homePage = ($branch['id'] == HOME_ID);
+ $memberDbHomePage = (defined('MEMBERS_DB')
+ && MEMBERS_DB
+ && $branch['id'] == MEMBERS_ONLY_HOME_PAGE);
+ if ($homePage || $memberDbHomePage) {
+ return '';
+ } else {
+ $addClass
+ = ($branch['parent'] == 0 || $branch['parent'] == MEMBERS_CATEGORY)
+ ? 'pos-select parent-level-sel'
+ : 'pos-select';
+ $showOn
+ = ($_GET['showpos'])
+ ? 'display:'
+ : 'display:none;';
+ return '<select style="'.$showOn.'" class="'.$addClass.'" name="pos'.$branch['id'].'" rel="'.$branch['pos'].'"></select>';
+ }
+ }/*}}}*/
+
+ // {{{ createTree()
+
+ protected function createTree(array $tree, $leaf, $level = 0)
+ {
+ $html = !$level ? $this->rootNodeStart : $this->subTreeStart;
+
+ if ($level == 0) {
+ $lockMainNavPages = $this->config
+ ->getItem('section', 'conf')
+ ->getItem('directive', 'lockMainNavPages')
+ ->getContent();
+ } else {
+ $lockMainNavPages = false;
+ }
+
+ if (is_array($leaf) && !empty($leaf)) {
+ while (list($parent, $branch) = each($leaf)) {
+ if ($branch['id'] == HOME_ID) {
+ $html .= sprintf($this->leafStart, $branch['id'], 'rel="root"');
+ } else {
+ $html .= sprintf($this->leafStart, $branch['id'], null);
+ }
+ if ( defined('MEMBERS_CATEGORY')
+ && MEMBERS_CATEGORY
+ && $branch['parent'] == MEMBERS_CATEGORY
+ ) {
+ $memberOnlyBase = MEDIA_BASE_URL . "members-only-area/";
+ switch ($branch['id']) {
+ case MEMBERS_PROFILE_FORM_PAGE :
+ $previewUrl = $memberOnlyBase
+ . "?rt=EditProfile&tab=info";
+ break;
+ case MEMBERS_COUPONS_PAGE :
+ $previewUrl = $memberOnlyBase
+ . "?rt=Coupons&page_id={$branch['id']}";
+ break;
+ case MEMBERS_EVENTS_PAGE :
+ $previewUrl = $memberOnlyBase
+ . "?rt=Events&page_id={$branch['id']}";
+ break;
+ case MEMBERS_LEADS_PAGE :
+ $previewUrl = $memberOnlyBase
+ . "?rt=Leads&page_id={$branch['id']}";
+ break;
+ case MEMBERS_REPORTS_PAGE :
+ $previewUrl = $memberOnlyBase
+ . "?rt=Reports&page_id={$branch['id']}";
+ break;
+ case MEMBERS_ADD_JOB_PAGE :
+ $previewUrl = $memberOnlyBase
+ . "?rt=Jobs&ac=addJob&page_id={$branch['id']}";
+ break;
+ case MEMBERS_SHOW_JOBS_PAGE :
+ $previewUrl = $memberOnlyBase
+ . "?rt=Jobs&page_id={$branch['id']}";
+ break;
+ default:
+ $previewUrl = $memberOnlyBase
+ . "?page_id={$branch['id']}";
+ break;
+ }
+
+ } else {
+ $previewUrl = BASE_URL . "index.php?catid={$branch['id']}&preview=1";
+ }
+
+ $html .= '<div class="right-element">';
+
+ $html .= '<a href="'.MEDIA_BASE_URL.'admin/toolbox.php?rt=EditPage&id='.$branch['id'].'" class="editPage" title="Edit Page">Top
+Section </a> ';
+ $html .= '<a href="'.MEDIA_BASE_URL.'admin/toolbox.php?rt=Paragraphs&pageid='.$branch['id'].'" class="editParagraphs" title="Page
+Paragraphs">Paragraphs</a> ';
+ $html .= '<a href="'.$previewUrl.'" class="pagePreview" title="Preview Page">[Preview]</a> ';
+ if (!$lockMainNavPages) {
+ $html .= $this->getActiveBall($branch);
+ if (defined("MOBILE_SITE") && MOBILE_SITE) {
+ $html .= $this->getActiveMobileBall($branch);
+ }
+ $html .= $this->_getPositionSelect($branch);
+ }
+
+ $html .= '</div>';
+ $html .= "<strong>{$branch['navigation_name']}</strong>";
+
+ if ($tree[$parent]) {
+ $html .= $this->createTree($tree, $tree[$parent], $level + 1);
+ } else {
+ $html .= $this->leafEnd;
+ }
+ }
+ }
+
+ $html .= $this->treeEnd;
+ if ($level) {
+ $html .= $this->leafEnd;
+ }
+ return $html;
+ }
+
+ // }}}
+
+ // {{{ fetchContent()
+
+ protected function fetchContent(Toolkit_Toolbox_GatewayAbstract $gateway)
+ {
+ $pages = $gateway->findAll();
+ if (is_array($pages)) {
+ $threads = array();
+ foreach ($pages as $page) {
+ if (!empty($page['keyword'])) {
+ $page['navigation_name'] .= ' {' . $page['keyword'] . '}';
+ }
+ $page['active_alt'] = $page['active'] ? 'On' : 'Off';
+ $page['children'] = array();
+ $threads[] = $page;
+ }
+
+ $children = array();
+ while (list($key, $value) = each ($threads)) {
+ $children[$value['parent']][$value['id']] = $value;
+ }
+
+ $this->tree = $children;
+ } else {
+ $this->tree = array();
+ }
+ }
+
+ // }}}
+
+ // {{{ toHtml()
+
+ public function toHtml(Toolkit_Toolbox_GatewayAbstract $gateway)
+ {
+ $GLOBALS['bottomScripts'][] = MEDIA_BASE_URL . 'Toolkit/Toolbox/libjs/pagesTree.js';
+ $GLOBALS['bottomScripts'][] = MEDIA_APP_BASE_URL . 'libjs/plugins/jsTree/0.9.9a2/jquery.tree.js';
+ $GLOBALS['bottomScripts'][] = MEDIA_APP_BASE_URL . 'libjs/plugins/jsTree/0.9.9a2/lib/jquery.cookie.js';
+ $GLOBALS['bottomScripts'][] = MEDIA_APP_BASE_URL . 'libjs/plugins/jsTree/0.9.9a2/plugins/jquery.tree.cookie.js';
+
+ $this->fetchContent($gateway);
+ $html = parent::toHtml();
+
+ return "<div id=\"tree\">$html</div>";
+ }
+
+ // }}}
+}
--- /dev/null
+<?php
+
+class Toolkit_Toolbox_ParagraphBreadCrumbs
+ extends Toolkit_Toolbox_BreadCrumbsAbstract
+{
+ // {{{ getPageUri()
+
+ protected function getPageUri(array $page)
+ {
+ // go to parent edit page form
+ $uri = MEDIA_BASE_URL . "admin/toolbox.php?rt=EditPage&id={$page['id']}";
+ return "<a href=\"{$uri}\">{$page['navigation_name']}</a>";
+ }
+
+ // }}}
+ // {{{ getPath()
+
+ /**
+ * @return the $path
+ */
+ public function getPath()
+ {
+ $id = $this->id;
+ $stack = array();
+ do {
+ $page = $this->getPage($id);
+
+ $stack[] = $this->getPageUri($page);
+ $id = $page['parent'];
+ } while ($id != 0);
+
+ $reverse = array_reverse($stack);
+
+ if (filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT)) {
+ $uri = MEDIA_BASE_URL . "admin/toolbox.php?rt=Paragraphs&pageid={$this->id}";
+ $reverse[] = "<a href=\"{$uri}\">Paragraphs</a>";
+ }
+
+ $this->path = implode(' > ', $reverse);
+
+ return $this->path;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+class Toolkit_Toolbox_ParagraphDraftBreadCrumbs
+ extends Toolkit_Toolbox_BreadCrumbsAbstract
+{
+ // {{{ getPageUri()
+
+ protected function getPageUri(array $page)
+ {
+ // go to parent paragraphs
+ $uri = MEDIA_BASE_URL . "admin/toolbox.php?rt=Paragraphs&pageid={$page['id']}";
+ // go to parent edit page form
+ $uri = MEDIA_BASE_URL . "admin/toolbox.php?rt=EditPage&id={$page['id']}";
+ return "<a href=\"{$uri}\">{$page['navigation_name']}</a>";
+ }
+
+ // }}}
+ // {{{ getDraft()
+
+ protected function getDraft($id)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM pages_draft
+ WHERE id = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+
+ return $stmt->fetch(PDO::FETCH_ASSOC);
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Could not fetch parent for page `$id`"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ getPath()
+
+ /**
+ * @return the $path
+ */
+ public function getPath()
+ {
+ $draft = $this->getDraft($this->id);
+
+ if (filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT)) {
+ $uri = MEDIA_BASE_URL . "admin/toolbox.php?rt=ParagraphsDraft&pageid={$this->id}";
+ $stack = array("<a href=\"{$uri}\">Paragraphs</a>");
+ }
+
+ if (is_array($stack)) {
+ $stack[] = $this->getPageUri($draft);
+ } else {
+ $stack = array($draft['navigation_name']);
+ }
+
+ $publishedPage = $this->getPage($draft['published_page']);
+ $id = $publishedPage['parent'];
+ while ($id != 0) {
+ $page = $this->getPage($id);
+
+ $stack[] = $this->getPageUri($page);
+ $id = $page['parent'];
+ }
+
+ $reverse = array_reverse($stack);
+
+ $this->path = implode(' > ', $reverse);
+
+ return $this->path;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+abstract class Toolkit_Toolbox_ParagraphGatewayAbstract
+ extends Toolkit_Toolbox_GatewayAbstract
+{
+ // {{{ findAll()
+
+ abstract public function findAll($page);
+
+ // }}}
+
+ // {{{ setParagraphVars()
+
+ protected function setParagraphVars(PDOStatement &$stmt, $data)
+ {
+ $data['active'] = (bool) $data['active'];
+ $data['back_to_top'] = (bool) $data['back_to_top'];
+ if ($data['remove_image']) {
+ $data['image'] = '';
+ }
+
+ $stmt->bindParam(':active', $data['active'], PDO::PARAM_BOOL);
+ $stmt->bindParam(':title', $data['title']);
+ $stmt->bindParam(':description', $data['description']);
+ $stmt->bindParam(':image', $data['image']);
+ $stmt->bindParam(':caption', $data['caption']);
+ $stmt->bindParam(':page', $data['page']);
+ $stmt->bindParam(':back_to_top', $data['back_to_top'], PDO::PARAM_BOOL);
+ }
+
+ // }}}
+ // {{{ setFileVars()
+
+ protected function setFileVars(PDOStatement &$stmt, $data, $key)
+ {
+ $stmt->bindParam(':filename', $data['filename'][$key]);
+ $stmt->bindParam(':bytes', $data['bytes'][$key]);
+ $stmt->bindParam(':urltext', $data['urltext'][$key]);
+ if ($data['type'][$key] != DIRECTORY_SEPARATOR) {
+ $stmt->bindParam(':type', $data['type'][$key]);
+ } else {
+ $pieces = explode('.', $data['filename'][$key]);
+ $extension = end($pieces);
+ $stmt->bindParam(':type', $extension);
+ }
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+class Toolkit_Toolbox_ParagraphGatewayDraft
+ extends Toolkit_Toolbox_ParagraphGatewayAbstract
+{
+ // {{{ delete()
+
+ public function delete($id)
+ {
+ $pageSql = "
+ DELETE
+ FROM paragraphs_draft
+ WHERE id = :id";
+
+ try {
+ $stmt = $this->dbh->prepare($pageSql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ return $stmt->execute();
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to delete paragraph draft `$id`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ find()
+
+ public function find($id)
+ {
+ $paragraphSql = "
+ SELECT *
+ FROM paragraphs_draft
+ WHERE id = :id ";
+
+ $fileSql = "
+ SELECT *
+ FROM files_draft
+ WHERE paragraph = :paragraph
+ ORDER BY pos";
+
+ try {
+ $paragraphStmt = $this->dbh->prepare($paragraphSql);
+ $paragraphStmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $paragraphStmt->execute();
+
+ $paragraph = $paragraphStmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!empty($paragraph['image'])) {
+ $imgFormat = "<img src=\"%s{$paragraph['image']}\">";
+ $paragraph['current_image_original']
+ = sprintf($imgFormat, TOOLBOX_ORIGINAL);
+ $paragraph['current_image_resized']
+ = sprintf($imgFormat, TOOLBOX_RESIZED);
+ $paragraph['current_image_midsized']
+ = sprintf($imgFormat, TOOLBOX_MIDSIZED);
+ $paragraph['current_image_thumb']
+ = sprintf($imgFormat, TOOLBOX_THUMB);
+ } else {
+ $paragraph['current_image_original'] = 'Image not yet uploaded';
+ $paragraph['current_image_resized'] = 'Image not yet uploaded';
+ $paragraph['current_image_midsized'] = 'Image not yet uploaded';
+ $paragraph['current_image_thumb'] = 'Image not yet uploaded';
+ }
+
+ $fileStmt = $this->dbh->prepare($fileSql);
+ $fileStmt->bindParam(':paragraph', $id, PDO::PARAM_INT);
+ $fileStmt->execute();
+
+ $paragraph['files'] = $fileStmt->fetchAll(PDO::FETCH_ASSOC);
+
+ return $paragraph;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to find paragraph draft `$id`"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ findAll()
+
+ public function findAll($page)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM paragraphs_draft
+ WHERE page = :page
+ AND pos > 1
+ ORDER BY pos";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':page', $page);
+ $stmt->execute();
+
+ $paragraphs = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $paragraphs[] = $this->find($row['id']);
+ }
+
+ return $paragraphs;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Error fetching all paragraph drafts for page `$page`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ insert()
+
+ public function insert(array $data)
+ {
+ $paragraphSql = "
+ INSERT INTO paragraphs_draft (active, back_to_top, title,
+ description, image, caption, page)
+ VALUES (:active, :back_to_top, :title, :description, :image,
+ :caption, :page)";
+
+ $filesInsertSql = "
+ INSERT INTO files_draft (filename, bytes, type, urltext, paragraph)
+ VALUES (:filename, :bytes, :type, :urltext, :paragraph)";
+
+ try {
+ $this->dbh->beginTransaction();
+
+ $paragraphStmt = $this->dbh->prepare($paragraphSql);
+ $this->setParagraphVars($paragraphStmt, $data);
+ $paragraphStmt->execute();
+
+ $row = $this->dbh
+ ->query('select id from paragraphs_draft order by id desc limit 1')
+ ->fetch(PDO::FETCH_ASSOC);
+
+ if ( isset($data['uploaded_files'])
+ && is_array($data['uploaded_files'])
+ ) {
+ $fileInsertStmt = $this->dbh->prepare($filesInsertSql);
+ $fileInsertStmt->bindParam(':paragraph', $row['id']);
+ $length = count($data['uploaded_files']['type']);
+ for ($i = 0; $i < $length; ++$i) {
+ $this->setFileVars($fileInsertStmt, $data['uploaded_files'], $i);
+ $fileInsertStmt->execute();
+ }
+ }
+
+ return $this->dbh->commit();
+ } catch (PDOException $e) {
+ $this->dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+ $content = serialize($data);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to insert paragraph draft [$content]"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ update()
+
+ public function update(array $data, $id)
+ {
+ $paragraphSql = "
+ UPDATE paragraphs_draft
+ SET back_to_top = :back_to_top,
+ active = :active,
+ title = :title,
+ description = :description,
+ image = :image,
+ caption = :caption,
+ page = :page
+ WHERE id = :id";
+
+ $filesDeleteSql = "
+ DELETE FROM files_draft
+ WHERE paragraph = :id";
+
+ $filesInsertSql = "
+ INSERT INTO files_draft (filename, bytes, type, urltext, paragraph)
+ VALUES (:filename, :bytes, :type, :urltext, :paragraph)";
+
+ try {
+ $this->dbh->beginTransaction();
+
+ $paragraphStmt = $this->dbh->prepare($paragraphSql);
+ $this->setParagraphVars($paragraphStmt, $data);
+ $paragraphStmt->bindParam(':id', $id);
+ $paragraphStmt->execute();
+
+ $filesDeleteStmt = $this->dbh->prepare($filesDeleteSql);
+ $filesDeleteStmt->bindParam(':id', $id);
+ $filesDeleteStmt->execute();
+
+ if ( isset($data['uploaded_files'])
+ && is_array($data['uploaded_files'])
+ ) {
+ $fileInsertStmt = $this->dbh->prepare($filesInsertSql);
+ $fileInsertStmt->bindParam(':paragraph', $id);
+ $length = count($data['uploaded_files']['type']);
+ for ($i = 0; $i < $length; ++$i) {
+ $this->setFileVars($fileInsertStmt, $data['uploaded_files'], $i);
+ $fileInsertStmt->execute();
+ }
+ }
+
+ return $this->dbh->commit();
+ } catch (PDOException $e) {
+ $this->dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+ $content = serialize($data);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to update paragraph draft [$content]"
+ );
+ }
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+class Toolkit_Toolbox_ParagraphGatewayDraftFactory
+ extends Toolkit_Toolbox_GatewayFactoryAbstract
+{
+ public function createGateway()
+ {
+ return new Toolkit_Toolbox_ParagraphGatewayDraft($this->dbh);
+ }
+}
+?>
--- /dev/null
+<?php
+class Toolkit_Toolbox_ParagraphGatewayPublish
+ extends Toolkit_Toolbox_ParagraphGatewayAbstract
+{
+ // {{{ delete()
+
+ public function delete($id)
+ {
+ $pageSql = "
+ DELETE
+ FROM paragraphs
+ WHERE id = :id";
+
+ try {
+ $stmt = $this->dbh->prepare($pageSql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ return $stmt->execute();
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to delete paragraph `$id`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ find()
+
+ public function find($id)
+ {
+ $paragraphSql = "
+ SELECT *
+ FROM paragraphs
+ WHERE id = :id ";
+
+ $fileSql = "
+ SELECT id,filename,bytes,type,
+ coalesce(urltext,filename,'empty') as urltext,
+ paragraph,pos
+ FROM files
+ WHERE paragraph = :paragraph
+ ORDER BY pos";
+
+ try {
+ $paragraphStmt = $this->dbh->prepare($paragraphSql);
+ $paragraphStmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $paragraphStmt->execute();
+
+ $paragraph = $paragraphStmt->fetch(PDO::FETCH_ASSOC);
+
+ if (!empty($paragraph['image'])) {
+ $imgFormat = "<img src=\"%s{$paragraph['image']}\">";
+ $paragraph['current_image_original']
+ = sprintf($imgFormat, TOOLBOX_ORIGINAL);
+ $paragraph['current_image_resized']
+ = sprintf($imgFormat, TOOLBOX_RESIZED);
+ $paragraph['current_image_midsized']
+ = sprintf($imgFormat, TOOLBOX_MIDSIZED);
+ $paragraph['current_image_thumb']
+ = sprintf($imgFormat, TOOLBOX_THUMB);
+ } else {
+ $paragraph['current_image_original'] = 'Image not yet uploaded';
+ $paragraph['current_image_resized'] = 'Image not yet uploaded';
+ $paragraph['current_image_midsized'] = 'Image not yet uploaded';
+ $paragraph['current_image_thumb'] = 'Image not yet uploaded';
+ }
+
+ $fileStmt = $this->dbh->prepare($fileSql);
+ $fileStmt->bindParam(':paragraph', $id, PDO::PARAM_INT);
+ $fileStmt->execute();
+
+ $paragraph['files'] = $fileStmt->fetchAll(PDO::FETCH_ASSOC);
+
+ return $paragraph;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to find paragraph `$id`"
+ );
+ }
+ }
+
+ // }}}
+ // {{{ findAll()
+
+ public function findAll($page)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM paragraphs
+ WHERE page = :page
+ AND pos > 1
+ ORDER BY pos";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':page', $page);
+ $stmt->execute();
+
+ $paragraphs = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $paragraphs[] = $this->find($row['id']);
+ }
+
+ return $paragraphs;
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "Error fetching all paragraphs for page `$page`"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ insert()
+
+ public function insert(array $data)
+ {
+ // add the part where it throw the file to the server
+ // and returns the data for it
+ if (is_array($_FILES['filename']) && $_FILES['filename']['error'] == 0) {
+ $fs = new Toolkit_FileServer_FileAdapter();
+ try {
+ if ($res = $fs->upload('filename')) {
+ $data['uploaded_files']['filename'][] = $res['name'];
+ $data['uploaded_files']['urltext'][]
+ = ($data['fileurltext'])
+ ? $data['fileurltext']
+ : $_FILES['filename']['name'];
+ $data['uploaded_files']['bytes'][] = $res['size'];
+ $data['uploaded_files']['type'][] = $res['type'];
+ }
+
+ } catch (Toolkit_FileServer_Exception $e) {
+ Toolkit_Logger::logException('File Server', $e);
+ echo -1; // Don't return "false", it will mess up the JS plugin.
+ return;
+ }
+ }
+ $paragraphSql = "
+ INSERT INTO paragraphs (active, back_to_top, title, description,
+ image, caption, page)
+ VALUES (:active, :back_to_top, :title, :description, :image,
+ :caption, :page)";
+
+ $filesInsertSql = "
+ INSERT INTO files (filename, bytes, type, urltext, paragraph)
+ VALUES (:filename, :bytes, :type, :urltext, :paragraph)";
+
+ try {
+ $this->dbh->beginTransaction();
+
+ $paragraphStmt = $this->dbh->prepare($paragraphSql);
+ $this->setParagraphVars($paragraphStmt, $data);
+ $paragraphStmt->execute();
+
+ $row = $this->dbh
+ ->query('select id from paragraphs order by id desc limit 1')
+ ->fetch(PDO::FETCH_ASSOC);
+
+ if ( isset($data['uploaded_files'])
+ && is_array($data['uploaded_files'])
+ ) {
+ $fileInsertStmt = $this->dbh->prepare($filesInsertSql);
+ $fileInsertStmt->bindParam(':paragraph', $row['id']);
+ $length = count($data['uploaded_files']['type']);
+ for ($i = 0; $i < $length; ++$i) {
+ $this->setFileVars($fileInsertStmt, $data['uploaded_files'], $i);
+ $fileInsertStmt->execute();
+ }
+ }
+
+ $this->dbh->commit();
+ return $row['id'];
+ } catch (PDOException $e) {
+ $this->dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+ $content = serialize($data);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to insert paragraph [$content]"
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ update()
+
+ public function update(array $data, $id)
+ {
+ if (is_array($data['deleteFile'])) {
+ foreach ($data['deleteFile'] as $fileNameToDelete) {
+ $delKey = array_search(
+ $fileNameToDelete,
+ $data['uploaded_files']['filename']
+ );
+ unset(
+ $data['uploaded_files']['urltext'][$delKey],
+ $data['uploaded_files']['filename'][$delKey],
+ $data['uploaded_files']['bytes'][$delKey],
+ $data['uploaded_files']['type'][$delKey]
+ );
+ }
+ }
+
+ // add the part where it throw the file to the server
+ // and returns the data for it
+ if (is_array($_FILES['filename']) && $_FILES['filename']['error'] == 0) {
+ $fs = new Toolkit_FileServer_FileAdapter();
+ try {
+ if ($res = $fs->upload('filename')) {
+ $data['uploaded_files']['filename'][] = $res['name'];
+ $data['uploaded_files']['urltext'][]
+ = ($data['fileurltext'])
+ ? $data['fileurltext']
+ : $_FILES['filename']['name'];
+ $data['uploaded_files']['bytes'][] = $res['size'];
+ $data['uploaded_files']['type'][] = $res['type'];
+ }
+
+ } catch (Toolkit_FileServer_Exception $e) {
+ Toolkit_Logger::logException('File Server', $e);
+ echo -1; // Don't return "false", it will mess up the JS plugin.
+ return;
+ }
+ }
+ //echo '<pre>'.print_r($data, true).'</pre>';
+ //exit;
+ unset(
+ $data['deleteFile'],
+ $data['fileurltext']
+ );
+
+ $paragraphSql = "
+ UPDATE paragraphs
+ SET back_to_top = :back_to_top,
+ active = :active,
+ title = :title,
+ description = :description,
+ image = :image,
+ caption = :caption,
+ page = :page
+ WHERE id = :id";
+
+ $filesDeleteSql = "
+ DELETE FROM files
+ WHERE paragraph = :id";
+
+ $filesInsertSql = "
+ INSERT INTO files (filename, bytes, type, urltext, paragraph)
+ VALUES (:filename, :bytes, :type, :urltext, :paragraph)";
+
+ try {
+ $this->dbh->beginTransaction();
+
+ $paragraphStmt = $this->dbh->prepare($paragraphSql);
+ $this->setParagraphVars($paragraphStmt, $data);
+ $paragraphStmt->bindParam(':id', $id);
+ $paragraphStmt->execute();
+
+ $filesDeleteStmt = $this->dbh->prepare($filesDeleteSql);
+ $filesDeleteStmt->bindParam(':id', $id);
+ $filesDeleteStmt->execute();
+
+ if ( isset($data['uploaded_files'])
+ && is_array($data['uploaded_files'])
+ ) {
+ $fileInsertStmt = $this->dbh->prepare($filesInsertSql);
+ $fileInsertStmt->bindParam(':paragraph', $id);
+ $length = count($data['uploaded_files']['type']);
+ $fileArrayKeys = array_keys($data['uploaded_files']['type']);
+ foreach ($fileArrayKeys as $i) {
+ $this->setFileVars($fileInsertStmt, $data['uploaded_files'], $i);
+ $fileInsertStmt->execute();
+ }
+ }
+
+ return $this->dbh->commit();
+ } catch (PDOException $e) {
+ $this->dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+ $content = serialize($data);
+ throw new Toolkit_Toolbox_Exception(
+ "Unable to update paragraph [$content]"
+ );
+ }
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+class Toolkit_Toolbox_ParagraphGatewayPublishFactory
+ extends Toolkit_Toolbox_GatewayFactoryAbstract
+{
+ public function createGateway()
+ {
+ return new Toolkit_Toolbox_ParagraphGatewayPublish($this->dbh);
+ }
+}
+?>
--- /dev/null
+<?php
+/**
+ * ParagraphsController.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Toolbox
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+
+/**
+ * Toolkit_Toolbox_ParagraphsController
+ *
+ * Description for Toolkit_Toolbox_ParagraphsController
+ *
+ * @category Toolkit
+ * @package Toolbox
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+class Toolkit_Toolbox_ParagraphsController
+ extends Toolkit_BaseControllerAbstract implements Toolkit_IController
+{
+ // {{{ _getForm()
+
+ /**
+ * Description for _getForm()
+ *
+ * @return \Toolkit_Toolbox_Forms_EditParagraph
+ * @access private
+ */
+ private function _getForm()
+ {
+ // Need three separate objects otherwise, new parses overwrite existing
+ // root variable data.
+ $tlbConf = new Config;
+ $memConf = new Config;
+ $cpnConf = new Config;
+
+ $memRoot =& $memConf->parseConfig(
+ BASE . 'Toolkit/Members/config.ini',
+ 'IniFile'
+ );
+ $cpnRoot =& $cpnConf->parseConfig(
+ BASE . 'Toolkit/Coupons/config.ini',
+ 'IniFile'
+ );
+ $tbxRoot =& $tlbConf->parseConfig(
+ BASE . 'Toolkit/Toolbox/config.ini',
+ 'IniFile'
+ );
+
+ $form = new Toolkit_Toolbox_Forms_EditParagraph(
+ 'edit_paragraph',
+ 'post',
+ MEDIA_BASE_URL . 'admin/toolbox.php?rt=Paragraphs&ac=process'
+ );
+ $form->configureForm(
+ $this->registry->dbh,
+ new Toolkit_Toolbox_ParagraphGatewayPublishFactory($this->registry->dbh),
+ new Toolkit_FileServer_ImageAdapter(),
+ new Toolkit_FileServer_FileAdapter(),
+ new Toolkit_Toolbox_FileExtension
+ );
+
+ return $form;
+ }
+
+ // }}}
+
+ // {{{ editAction()
+
+ /**
+ * Description for editAction()
+ *
+ * @return string
+ * @access public
+ */
+ public function editAction()
+ {
+ if (ctype_digit($_GET['pageid'])) {
+ $breadCrumbs = new Toolkit_Toolbox_ParagraphBreadCrumbs(
+ $this->registry->dbh,
+ $_GET['pageid']
+ );
+ $html = (string) $breadCrumbs;
+ }
+
+ $form = $this->_getForm();
+ $html .= $form->toHtml($this->registry->dbh);
+
+ return $html;
+ }
+
+ // }}}
+
+ // {{{ indexAction()
+
+ /**
+ * Description for indexAction()
+ *
+ * @return string
+ * @throws Toolkit_Toolbox_Exception
+ * @throws RuntimeException
+ * @access public
+ */
+ public function indexAction()
+ {
+ if (ctype_digit($_GET['pageid'])) {
+ $breadCrumbs = new Toolkit_Toolbox_ParagraphBreadCrumbs(
+ $this->registry->dbh,
+ $_GET['pageid']
+ );
+ $html = (string) $breadCrumbs;
+ }
+
+ try {
+ if (!ctype_digit($_GET['pageid'])) {
+ throw new RuntimeException(
+ "Category id `{$_GET['pageid']}` is not an integer"
+ );
+ }
+
+ $toolboxConfig = new Config;
+ $toolboxConfigRoot =& $toolboxConfig->parseConfig(
+ BASE . 'Toolkit/Toolbox/config.ini',
+ 'IniFile'
+ );
+ $tree = new Toolkit_Toolbox_ParagraphsTree($toolboxConfigRoot);
+ $html .= $tree->toHtml(
+ new Toolkit_Toolbox_ParagraphGatewayPublish($this->registry->dbh)
+ );
+
+ return $html;
+ } catch (RuntimeException $e) {
+ Toolkit_Logger::logException('Runtime Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ 'Category id must be an integer'
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ processAction()
+
+ /**
+ * Description for processAction()
+ *
+ * @return string
+ * @access public
+ */
+ public function processAction()
+ {
+ $form = $this->_getForm();
+
+ if ($form->isSubmitted()) {
+ if ($form->getSubmitValue('cancel')) {
+ // do nothing
+ $pageid = $form->getSubmitValue('page');
+ header('Location: ' . MEDIA_BASE_URL . "admin/toolbox.php?rt=Paragraphs&pageid=$pageid");
+ exit();
+ } elseif ($form->getSubmitValue('previewParagraph')) {
+ } elseif ($form->getSubmitValue('saveParagraph')) {
+ // save paragraph
+ $gateway = new Toolkit_Toolbox_ParagraphGatewayPublish($this->registry->dbh);
+
+ if ($form->validate()) {
+ $paragraphId = $form->getSubmitValue('id');
+ if ($paragraphId) {
+ // before we update this paragraph need to remove the cache
+ try {
+ $sql = "
+ SELECT page
+ FROM paragraphs
+ WHERE id = :id";
+ $paraStmt = $this->registry
+ ->dbh
+ ->prepare($sql);
+ $paraStmt->bindParam(':id', $paragraphId, PDO::PARAM_INT);
+ $paraStmt->execute();
+ $oldPageId = $paraStmt->fetchColumn();
+ if ($oldPageId) {
+ $cache = new Cache_Lite($GLOBALS['cacheOptions']);
+ $cache->remove("page-$oldPageId", 'Toolbox');
+ $cache->remove("paragraphs-$oldPageId", 'Toolbox');
+ $cache->remove("sectionLinks-$oldPageId", 'Toolbox');
+ }
+ } catch (PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+
+ $gateway->update($form->getSubmitValues(), $paragraphId);
+ } else {
+ $paragraphId = $gateway->insert($form->getSubmitValues());
+ }
+ $pageid = $form->getSubmitValue('page');
+ try {
+ $deleteFile = $form->getSubmitValue('deleteFile');
+ if (is_array($deleteFile) && !empty($deleteFile)) {
+ $fs = new Toolkit_FileServer_FileAdapter();
+ foreach ($deleteFile as $delFile) {
+ $fs->delete($delFile);
+ }
+ }
+ $image = $form->getSubmitValue('image');
+ if ($form->getSubmitValue('remove_image') == '1'
+ && $image
+ ) {
+ $is = new Toolkit_FileServer_ImageAdapter();
+ $is->delete($image);
+ }
+ } catch(Toolkit_FileServer_Exception $fileError) {
+ Toolkit_Common::handleError($fileError);
+ }
+
+ $cache = new Cache_Lite($GLOBALS['cacheOptions']);
+ $cache->remove("page-$pageid", 'Toolbox');
+ $cache->remove("paragraphs-$pageid", 'Toolbox');
+ $cache->remove("sectionLinks-$pageid", 'Toolbox');
+
+ header(
+ 'Location: '
+ . MEDIA_BASE_URL
+ . "admin/toolbox.php?rt=Paragraphs"
+ . "&ac=edit&id={$paragraphId}&pageid={$pageid}&g=1"
+ );
+ exit();
+ } else {
+ $return = $form->getErrorMessage();
+ $return .= $form->toHtml($this->registry->dbh);
+ }
+ } elseif ($form->getSubmitValue('deleteParagraph')) {
+ try {
+ $files = $form->getSubmitValue('uploaded_files');
+ $deleteFile = $files['filename'];
+ if (is_array($deleteFile) && !empty($deleteFile)) {
+ $fs = new Toolkit_FileServer_FileAdapter();
+ foreach ($deleteFile as $delFile) {
+ $fs->delete($delFile);
+ }
+ }
+ $image = $form->getSubmitValue('image');
+ if ($image) {
+ $is = new Toolkit_FileServer_ImageAdapter();
+ $is->delete($image);
+ }
+ } catch(Toolkit_FileServer_Exception $fileError) {
+ Toolkit_Common::handleError($fileError);
+ }
+ // delete paragraph
+ $gateway = new Toolkit_Toolbox_ParagraphGatewayPublish($this->registry->dbh);
+ $gateway->delete($form->getSubmitValue('id'));
+
+ $pageid = $form->getSubmitValue('page');
+
+ $cache = new Cache_Lite($GLOBALS['cacheOptions']);
+ $cache->remove("page-$pageid", 'Toolbox');
+ $cache->remove("paragraphs-$pageid", 'Toolbox');
+ $cache->remove("sectionLinks-$pageid", 'Toolbox');
+
+ $paragraphTitle = $form->getSubmitValue('title');
+ $return = "[<b>$paragraphTitle</b>] successfully deleted.";
+ try {
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ UPDATE paragraphs
+ SET pos = :pos
+ WHERE id = :id";
+ $updateParagraphPos = $dbh->prepare($sql);
+ $sql = "
+ SELECT id,page,pos
+ FROM paragraphs
+ WHERE page = :page
+ ORDER BY page,pos";
+ $res = $dbh->prepare($sql);
+ $res->bindParam(':page', $pageid, PDO::PARAM_INT);
+ $res->execute();
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ $paragraphData[$row['page']][] = $row['id'];
+ }
+ if (is_array($paragraphData)) {
+ $curPage = 0;
+ $pos = 1;
+ foreach ($paragraphData as $page => $paragraphs) {
+ if ($curPage != $page) {
+ $curPage = $page;
+ $pos = 1;
+ }
+ foreach ($paragraphs as $paragraphId) {
+ $updateParagraphPos->bindParam(":pos", $pos, PDO::PARAM_INT);
+ $updateParagraphPos->bindParam(":id", $paragraphId, PDO::PARAM_INT);
+ $updateParagraphPos->execute();
+ ++$pos;
+ }
+ }
+ }
+ } catch(PDOException $e) {
+ die($e->getMessage());
+ }
+ }
+ } else {
+ $return = $form->toHtml($this->registry->dbh);
+ }
+
+ return $return;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+class Toolkit_Toolbox_ParagraphsDraftController
+ extends Toolkit_BaseControllerAbstract implements Toolkit_IController
+{
+ // {{{ _getForm()
+
+ private function _getForm()
+ {
+ // Need three separate objects otherwise, new parses overwrite existing
+ // root variable data.
+ $tlbConf = new Config;
+ $memConf = new Config;
+ $cpnConf = new Config;
+
+ $memRoot =& $memConf->parseConfig(
+ BASE . 'Toolkit/Members/config.ini',
+ 'IniFile'
+ );
+ $cpnRoot =& $cpnConf->parseConfig(
+ BASE . 'Toolkit/Coupons/config.ini',
+ 'IniFile'
+ );
+ $tbxRoot =& $tlbConf->parseConfig(
+ BASE . 'Toolkit/Toolbox/config.ini',
+ 'IniFile'
+ );
+
+ $form = new Toolkit_Toolbox_Forms_EditParagraph(
+ 'edit_paragraph',
+ 'post',
+ MEDIA_BASE_URL . 'admin/toolbox.php?rt=ParagraphsDraft&ac=process'
+ );
+ $form->configureForm(
+ $this->registry->dbh,
+ new Toolkit_Toolbox_ParagraphGatewayDraftFactory($this->registry->dbh),
+ new Toolkit_FileServer_ImageAdapter(),
+ new Toolkit_FileServer_FileAdapter(),
+ new Toolkit_Toolbox_FileExtension
+ );
+
+ return $form;
+ }
+
+ // }}}
+
+ // {{{ editAction()
+
+ public function editAction()
+ {
+ if (ctype_digit($_GET['pageid'])) {
+ $breadCrumbs = new Toolkit_Toolbox_ParagraphDraftBreadCrumbs(
+ $this->registry->dbh,
+ $_GET['pageid']
+ );
+ $html = (string) $breadCrumbs;
+ }
+
+ $form = $this->_getForm();
+ $html .= $form->toHtml($this->registry->dbh);
+
+ return $html;
+ }
+
+ // }}}
+
+ // {{{ indexAction()
+
+ public function indexAction()
+ {
+ if (ctype_digit($_GET['pageid'])) {
+ $breadCrumbs = new Toolkit_Toolbox_ParagraphDraftBreadCrumbs(
+ $this->registry->dbh,
+ $_GET['pageid']
+ );
+ $html = (string) $breadCrumbs;
+ }
+
+ try {
+ if (!ctype_digit($_GET['pageid'])) {
+ throw new RuntimeException(
+ "Category id `{$_GET['pageid']}` is not an integer"
+ );
+ }
+
+ $toolboxConfig = new Config;
+ $toolboxConfigRoot =& $toolboxConfig->parseConfig(
+ BASE . 'Toolkit/Toolbox/config.ini',
+ 'IniFile'
+ );
+ $tree = new Toolkit_Toolbox_ParagraphsDraftTree($toolboxConfigRoot);
+ $html .= $tree->toHtml(
+ new Toolkit_Toolbox_ParagraphGatewayDraft($this->registry->dbh)
+ );
+
+ return $html;
+ } catch (RuntimeException $e) {
+ Toolkit_Logger::logException('Runtime Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ 'Category id must be an integer'
+ );
+ }
+ }
+
+ // }}}
+
+ // {{{ processAction()
+
+ public function processAction()
+ {
+ $form = $this->_getForm();
+
+ if ($form->isSubmitted()) {
+ if ($form->getSubmitValue('cancel')) {
+ // do nothing
+ $pageid = $form->getSubmitValue('page');
+ header('Location: ' . MEDIA_BASE_URL . "admin/toolbox.php?rt=ParagraphsDraft&pageid=$pageid");
+ exit();
+ } elseif ($form->getSubmitValue('previewParagraph')) {
+ } elseif ($form->getSubmitValue('saveParagraph')) {
+ // save paragraph
+ $gateway = new Toolkit_Toolbox_ParagraphGatewayDraft($this->registry->dbh);
+ if ($form->validate()) {
+ $paragraphId = $form->getSubmitValue('id');
+ if ($paragraphId) {
+ $gateway->update($form->getSubmitValues(), $paragraphId);
+ } else {
+ $gateway->insert($form->getSubmitValues());
+ }
+ $pageid = $form->getSubmitValue('page');
+ header('Location: ' . MEDIA_BASE_URL . "admin/toolbox.php?rt=ParagraphsDraft&pageid=$pageid");
+ exit();
+ } else {
+ $return = $form->getErrorMessage();
+ $return .= $form->toHtml();
+ }
+ } elseif ($form->getSubmitValue('deleteParagraph')) {
+ // delete paragraph
+ $gateway = new Toolkit_Toolbox_ParagraphGatewayDraft($this->registry->dbh);
+ $gateway->delete($form->getSubmitValue('id'));
+
+ $paragraphTitle = $form->getSubmitValue('title');
+ $return = "[<b>$paragraphTitle</b>] successfully deleted.";
+ }
+ } else {
+ $return = $form->toHtml();
+ }
+
+ return $return;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+class Toolkit_Toolbox_ParagraphsDraftTree extends Toolkit_Toolbox_TreeAbstract
+{
+ // {{{ getActiveBall()
+
+ protected function getActiveBall(array $branch)
+ {
+ $activeFormat = '<a href="%s" title="%s">';
+ $activeFormat .= $this->getActiveBallImage($branch);
+ $activeFormat .= '</a>';
+
+ return sprintf(
+ $activeFormat,
+ MEDIA_BASE_URL . "admin/toolbox.php?rt=ParagraphsDraft&id={$_GET['id']}",
+ $branch['active_alt']
+ );
+ }
+
+ // }}}
+
+ // {{{ createTree()
+
+ protected function createTree(array $tree, $leaf, $level = 0)
+ {
+ if (empty($leaf)) {
+ return '<h2>No paragraph drafts created for this page yet</h2>'; // page has no paragraphs
+ }
+
+ $html = $this->rootNodeStart;
+
+ while (list($parent, $branch) = each($leaf)) {
+ $html .= sprintf($this->leafStart, $branch['id'], null);
+
+ $html .= "<strong>{$branch['title']}</strong>";
+ $html .= '<div class="right-element">';
+ $html .= '<a href="'.MEDIA_BASE_URL.'admin/toolbox.php?rt=ParagraphsDraft&ac=edit&id='.$branch['id'].'&pageid='.$_GET['pageid'].'">[Edit]</a> ';
+ $html .= $this->getActiveBall($branch);
+ $html .= '</div>';
+ $html .= $this->leafEnd;
+ }
+
+ $html .= $this->treeEnd;
+ return $html;
+ }
+
+ // }}}
+
+ // {{{ fetchContent()
+
+ protected function fetchContent(Toolkit_Toolbox_GatewayAbstract $gateway)
+ {
+ $paragraphs = $gateway->findAll($_GET['pageid']);
+ if (is_array($paragraphs)) {
+ $threads = array();
+ foreach ($paragraphs as $paragraph) {
+ $threads[] = $paragraph;
+ }
+
+ $children = array();
+ while (list($key, $value) = each ($threads)) {
+ $children[0][$value['id']] = $value;
+ }
+
+ $this->tree = $children;
+ } else {
+ $this->tree = array();
+ }
+ }
+
+ // }}}
+ // {{{ toHtml()
+
+ public function toHtml(Toolkit_Toolbox_GatewayAbstract $gateway)
+ {
+ $GLOBALS['bottomScripts'][] = MEDIA_BASE_URL . 'Toolkit/Toolbox/libjs/paragraph-tree.js';
+ $GLOBALS['bottomScripts'][] = MEDIA_APP_BASE_URL . 'libjs/plugins/jsTree/0.9.9a2/jquery.tree.js';
+
+ $this->fetchContent($gateway);
+ $html = parent::toHtml();
+
+ return "<div id=\"tree\">$html</div>";
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+class Toolkit_Toolbox_ParagraphsTree extends Toolkit_Toolbox_TreeAbstract
+{
+ protected $leafStart = "\n\t<li id=\"cat_%s\" %s>\n";
+ // {{{ getActiveBall()
+
+ protected function getActiveBall(array $branch)
+ {
+ $activeFormat = '<a class="active-ball" rel="%s" href="%s" title="%s">';
+ $activeFormat .= $this->getActiveBallImage($branch);
+ $activeFormat .= '</a>';
+
+ return sprintf(
+ $activeFormat,
+ $branch['id'],
+ MEDIA_BASE_URL . "admin/toolbox.php?rt=Paragraphs&id={$branch['id']}",
+ $branch['active_alt']
+ );
+ }
+
+ // }}}
+ // {{{ _getMoveArrows()
+
+ private function _getMoveArrows()
+ {
+ $format = '<img src="%s" alt="Move %s Arrow" class="move%s">';
+
+ $up = sprintf(
+ $format,
+ MEDIA_APP_BASE_URL . "assets/icons/arrow_up.png",
+ 'Up',
+ 'Up'
+ );
+
+ $down = sprintf(
+ $format,
+ MEDIA_APP_BASE_URL . "assets/icons/arrow_down.png",
+ 'Down',
+ 'Down'
+ );
+
+ return $up . $down;
+ }
+
+ // }}}
+
+ private function _getPositionSelect($branch)/*{{{*/
+ {
+ return '<select class="pos-select" name="pos'.$branch['id'].'" rel="'.$branch['pos'].'"></select>';
+ }/*}}}*/
+ // {{{ createTree()
+
+ protected function createTree(array $tree, $leaf, $level = 0)
+ {
+ if (empty($leaf)) {
+ return '<h2>No paragraphs created for this page yet</h2>'; // page has no paragraphs
+ }
+
+ $html = $this->rootNodeStart;
+
+ while (list($parent, $branch) = each($leaf)) {
+ $html .= sprintf($this->leafStart, $branch['id'], null);
+
+ $html .= '<div class="right-element paragraph-line">';
+ $html .= '<a class="editPage" href="'.MEDIA_BASE_URL.'admin/toolbox.php?rt=Paragraphs&ac=edit&id='.$branch['id'].'&pageid='.$_GET['pageid'].'">[Edit]</a> ';
+ $html .= $this->getActiveBall($branch);
+ if (count($leaf) > 1) {
+ $html .= $this->_getPositionSelect($branch);
+ }
+ $html .= "<strong>{$branch['title']}</strong>";
+ $html .= '</div>';
+
+ $html .= $this->leafEnd;
+ }
+
+ $html .= $this->treeEnd;
+ return $html;
+ }
+
+ // }}}
+
+ // {{{ fetchContent()
+
+ protected function fetchContent(Toolkit_Toolbox_GatewayAbstract $gateway)
+ {
+ $paragraphs = $gateway->findAll($_GET['pageid']);
+ if (is_array($paragraphs)) {
+ $threads = array();
+ foreach ($paragraphs as $paragraph) {
+ $threads[] = $paragraph;
+ }
+
+ $children = array();
+ while (list($key, $value) = each ($threads)) {
+ $children[0][$value['id']] = $value;
+ }
+
+ $this->tree = $children;
+ } else {
+ $this->tree = array();
+ }
+ }
+
+ // }}}
+ // {{{ toHtml()
+
+ public function toHtml(Toolkit_Toolbox_GatewayAbstract $gateway)
+ {
+ $GLOBALS['bottomScripts'][] = MEDIA_BASE_URL . 'Toolkit/Toolbox/libjs/paragraph-tree.js';
+ $GLOBALS['bottomScripts'][] = MEDIA_APP_BASE_URL . 'libjs/plugins/jsTree/0.9.9a2/jquery.tree.js';
+
+ $this->fetchContent($gateway);
+ $html = parent::toHtml();
+
+ return "<div id=\"tree\">$html</div>";
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+
+class Toolkit_Toolbox_SearchController extends Toolkit_BaseControllerAbstract
+ implements Toolkit_IController
+{
+ // {{{ index()
+
+ public function indexAction()
+ {
+ $searchForm = new Toolkit_Toolbox_PageSearchForm(
+ 'search_form',
+ 'get',
+ MEDIA_BASE_URL . 'admin/toolbox.php?rt=search',
+ null,
+ null,
+ true
+ );
+ $searchForm->configureForm();
+
+ $html = $searchForm->toHtml();
+
+ $toolbox = new GLM_TEMPLATE( NULL );
+ $sql = "
+ SELECT id, parent, pos, active,
+ CASE WHEN keyword IS NOT NULL AND keyword <> ''
+ THEN category || ' {' || keyword || '}'
+ ELSE category
+ END AS category,
+ CASE WHEN active THEN 'Display'
+ ELSE 'Don\'t Display'
+ END AS active_alt
+ FROM bus_category
+ WHERE lower(category) LIKE :search";
+
+ $stmt = $this->registry->dbh->prepare($sql);
+ $stmt->bindParam(':search', strtolower("%{$_GET['q']}%"), PDO::PARAM_STR);
+ $stmt->execute();
+
+ $threads = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ $tree = new Toolkit_Toolbox_SearchTree(new GLM_TEMPLATE(null));
+ $sortedLeafs = $tree->sortChildren($threads, true);
+ $html .= $tree->toHtml($sortedLeafs, $sortedLeafs[0]);
+
+ return $html;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+class Toolkit_Toolbox_SearchTree extends Toolkit_Toolbox_PagesTree
+{
+ // {{{ getActiveBall()
+
+ protected function getActiveBall(array $branch)
+ {
+ $activeFormat = '<a href="%s" title="%s"><img src="%s" alt="%s"></a>';
+ $img = $branch['active'] ? 'grnball.gif' : 'redball.gif';
+ $q = urlencode(stripslashes($_GET['q']));
+ return sprintf(
+ $activeFormat,
+ MEDIA_BASE_URL . "admin/toolbox.php?id={$branch['id']}&_qf__search_form=&rt=Search&q=$q",
+ $branch['active_alt'],
+ MEDIA_BASE_URL . "Toolkit/Toolbox/assets/$img",
+ $branch['active_alt']
+ );
+ }
+
+ // }}}
+ // {{{ sortChildren()
+
+ public function sortChildren(array $threads)
+ {
+ $children = array();
+ while (list($key, $value) = each ($threads)) {
+ $children[0][$value['id']] = $value;
+ }
+
+ return $children;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * TreeAbstract.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Toolbox
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+
+/**
+ * Toolkit_Toolbox_TreeAbstract
+ *
+ * Description for Toolkit_Toolbox_TreeAbstract
+ *
+ * @category Toolkit
+ * @package Toolbox
+ * @author Jamie Kahgee <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link <>
+ */
+abstract class Toolkit_Toolbox_TreeAbstract
+{
+ // {{{ properties
+
+
+ /**
+ * Description for $rootNodeStart
+ * @var string
+ * @access protected
+ */
+ protected $rootNodeStart = "<ul>\n";
+
+ /**
+ * Description for $subTreeStart
+ * @var string
+ * @access protected
+ */
+ protected $subTreeStart = "\n<ul>\n";
+
+ /**
+ * Description for $treeEnd
+ * @var string
+ * @access protected
+ */
+ protected $treeEnd = "\n</ul>\n";
+
+ /**
+ * Description for $leafStart
+ * @var string
+ * @access protected
+ */
+ protected $leafStart = "\n\t<li>\n";
+
+ /**
+ * Description for $leafEnd
+ * @var string
+ * @access protected
+ */
+ protected $leafEnd = "\n\t</li>\n";
+
+ /**
+ * Description for $config
+ * @var Config_Container
+ * @access protected
+ */
+ protected $config;
+
+ /**
+ * Description for $tree
+ * @var array
+ * @access protected
+ */
+ protected $tree;
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * Class constructor
+ *
+ * @param Config_Container $config Config container
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct(Config_Container $config)
+ {
+ $this->config = $config;
+ }
+
+ // }}}
+
+ // {{{ getActiveBallImage()
+
+ /**
+ * Description for getActiveBallImage()
+ *
+ * @param array $branch Branch array
+ *
+ * @return string
+ * @access protected
+ */
+ protected function getActiveBallImage(array $branch)
+ {
+ $imgFormat = '<img %s src="%s" alt="%s" border="0">';
+
+ $show = sprintf(
+ $imgFormat,
+ ($branch['active']) ? '' : 'style="display: none;"',
+ MEDIA_BASE_URL . "Toolkit/Toolbox/assets/grnball.gif",
+ 'Active Ball'
+ );
+
+ $hide = sprintf(
+ $imgFormat,
+ ($branch['active']) ? 'style="display: none;"' : '',
+ MEDIA_BASE_URL . "Toolkit/Toolbox/assets/redball.gif",
+ "In-active Ball"
+ );
+
+ return $show . $hide;
+ }
+
+ // }}}
+ // {{{ getActiveMobileBallImage()
+
+ /**
+ * Description for getActiveMobileBallImage()
+ *
+ * @param array $branch Branch array
+ *
+ * @return string
+ * @access protected
+ */
+ protected function getActiveMobileBallImage(array $branch)
+ {
+ $imgFormat = '<img %s src="%s" alt="%s" border="0">';
+
+ $show = sprintf(
+ $imgFormat,
+ ($branch['mobile_active']) ? '' : 'style="display: none;"',
+ MEDIA_BASE_URL . "Toolkit/Toolbox/assets/mobilemgreen.jpg",
+ 'Active Ball'
+ );
+
+ $hide = sprintf(
+ $imgFormat,
+ ($branch['mobile_active']) ? 'style="display: none;"' : '',
+ MEDIA_BASE_URL . "Toolkit/Toolbox/assets/mobilemred.jpg",
+ "In-active Ball"
+ );
+
+ return $show . $hide;
+ }
+
+ // }}}
+ // {{{ getActiveBall()
+
+ /**
+ * Description for getActiveBall()
+ *
+ * @param array $branch Branch array
+ *
+ * @access protected
+ * @return void
+ */
+ abstract protected function getActiveBall(array $branch);
+
+ // }}}
+
+ // {{{ createTree()
+
+ /**
+ * Description for createTree
+ *
+ * @param array $tree Description for $tree ...
+ * @param unknown $leaf Description for $leaf ...
+ * @param int $level Description for $level ...
+ *
+ * @return void
+ * @access protected
+ */
+ abstract protected function createTree(array $tree, $leaf, $level = 0);
+
+ // }}}
+ // {{{ fetchContent()
+
+ /**
+ * Description for fetchContent
+ *
+ * @param Toolkit_Toolbox_GatewayAbstract $gateway Toolbox Gateway
+ *
+ * @return void
+ * @access protected
+ */
+ abstract protected function fetchContent(
+ Toolkit_Toolbox_GatewayAbstract $gateway
+ );
+
+ // }}}
+
+ // {{{ toHtml()
+
+ /**
+ * Description of toHtml()
+ *
+ * @return string
+ * @access public
+ */
+ public function toHtml()
+ {
+ $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'admin/main.css';
+ $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'Toolkit/Toolbox/styles.css';
+ $GLOBALS['topScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/jquery/jquery-1.4.2.min.js';
+
+ if (is_array($this->tree)) {
+ $html = $this->createTree($this->tree, reset($this->tree));
+ }
+
+ return $html;
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+[conf]
+applicationName = "Toolbox"
+lockMainNavPages = Off
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+$dbh = Toolkit_Database::getInstance();
+$dbh->beginTransaction();
+try {
+ $checkSql =
+ "SELECT id
+ FROM paragraphs
+ WHERE page = :page
+ AND pos = 1";
+ $checkStmt = $dbh->prepare($checkSql);
+ $addSql = "
+ INSERT INTO paragraphs
+ (active,page,pos)
+ VALUES
+ (true,:page,1)";
+ $addStmt = $dbh->prepare($addSql);
+ $sql = "
+ SELECT id
+ FROM pages
+ ORDER BY parent,pos";
+ $stmt = $dbh->query($sql);
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $checkStmt->bindParam(
+ ':page',
+ $row['id'],
+ PDO::PARAM_INT
+ );
+ $checkStmt->execute();
+ if ($checkStmt->rowCount() == 0) {
+ // nothing set yet need to add one
+ $addStmt->bindParam(
+ ':page',
+ $row['id'],
+ PDO::PARAM_INT
+ );
+ $addStmt->execute();
+ echo '<p style="color:white;background-color:red;">
+ Adding paragraph! PageId:'.$row['id'].'</p>';
+ } else {
+ echo '<p style="color:white;background-color:green;">
+ Good Page PageId:'.$row['id'].'</p>';
+ }
+ }
+ $dbh->commit();
+} catch(PDOException $e) {
+ die($e->getMessage());
+}
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+$dbh = Toolkit_Database::getInstance();
+$dbh->beginTransaction();
+$pageData = array();
+try {
+ $sql = "
+ UPDATE pages
+ SET pos = :pos
+ WHERE id = :id";
+ $updatePagePos = $dbh->prepare($sql);
+ $sql = "
+ SELECT id,parent,pos
+ FROM pages
+ ORDER BY parent,pos";
+ $res = $dbh->query($sql);
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ $pageData[$row['parent']][] = $row['id'];
+ }
+ echo '<p>fixing page positions</p>';
+ if (is_array($pageData)) {
+ $curParent = 0;
+ $pos = 1;
+ foreach ($pageData as $parent => $pages) {
+ if ($curParent != $parent) {
+ $curParent = $parent;
+ $pos = 1;
+ }
+ foreach ($pages as $pageId) {
+ $updatePagePos->bindParam(":pos", $pos, PDO::PARAM_INT);
+ $updatePagePos->bindParam(":id", $pageId, PDO::PARAM_INT);
+ $updatePagePos->execute();
+ ++$pos;
+ }
+ }
+ }
+ $sql = "
+ UPDATE paragraphs
+ SET pos = :pos
+ WHERE id = :id";
+ $updateParagraphPos = $dbh->prepare($sql);
+ $sql = "
+ SELECT id,page,pos
+ FROM paragraphs
+ ORDER BY page,pos";
+ $res = $dbh->query($sql);
+ while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ $paragraphData[$row['page']][] = $row['id'];
+ }
+ echo '<p>fixing paragraphs positions</p>';
+ if (is_array($paragraphData)) {
+ $curPage = 0;
+ $pos = 1;
+ foreach ($paragraphData as $page => $paragraphs) {
+ if ($curPage != $page) {
+ $curPage = $page;
+ $pos = 1;
+ }
+ foreach ($paragraphs as $paragraphId) {
+ $updateParagraphPos->bindParam(":pos", $pos, PDO::PARAM_INT);
+ $updateParagraphPos->bindParam(":id", $paragraphId, PDO::PARAM_INT);
+ $updateParagraphPos->execute();
+ ++$pos;
+ }
+ }
+ }
+} catch(PDOException $e) {
+ die($e->getMessage());
+}
+$dbh->commit();
--- /dev/null
+var EditPage =
+{
+ openSection: '#pageContent',
+ sectionHeaders: null,
+ sectionAttributes: null,
+
+ init: function()// {{{
+ {
+ $('input[name=deletePage]:submit').click(EditPage.confirmPageDelete);
+ $('#MemberCategories').change(function() {
+ $('input[name=include_members]').attr('checked', 'checked');
+ });
+ $('#MemberRegions').change(function() {
+ $('input[name=include_members]').attr('checked', 'checked');
+ });
+ $('#CouponCategories').change(function() {
+ $('input[name=include_coupons]').attr('checked', 'checked');
+ });
+ EditPage.pageAttributes();
+ EditPage.memberAttributes();
+ EditPage.couponAttributes();
+ EditPage.headlineAttributes();
+
+ EditPage.sectionHeaders = $('tbody tr.hdr td');
+ EditPage.sectionAttributes = $('span.attributes');
+
+
+ // If there was an error with validation, then
+ // find the first error and open that section.
+ var $firstFormValidationError = $('div.req:first');
+ if ($firstFormValidationError.length > 0) {
+ // Hide all sections first
+ $("tbody.section > tr:not(.hdr)").toggle();
+
+ // Then open the target section
+ $firstFormValidationError
+ .parents("tbody.section")
+ .children("tr:not(.hdr)")
+ .toggle();
+ $firstFormValidationError
+ .parents("tbody.section")
+ .children('tr.hdr')
+ .children()
+ .toggleClass('open');
+ } else {
+ // Initially hide all sections EXCEPT the first section
+ // which has an id #pageContent
+ $("tbody.section > tr:not(.hdr)")
+ .not("tbody#pageContent > tr")
+ .toggle();
+ }
+
+ $("tbody.section tr.hdr").click(function() {
+ var $currId = $(this).parents('tbody').attr('id');
+ if ($currId == EditPage.openSection) {
+ return false;
+ }
+
+ // Set this section to the current section open
+ EditPage.openSection = $currId
+
+ // Remove the class open from all the section headers.
+ // This will reset the arrow in the header back to closed (>)
+ EditPage.sectionHeaders.each(function() {
+ $(this).removeClass('open');
+ });
+
+ // default shows all the section "quick at a glance" attributes
+ EditPage.sectionAttributes.show();
+ // hide current sections "quick at a glance" attributes
+ $(this).find('.attributes').hide();
+
+ // hide all the sections
+ $('tbody.section > tr:not(.hdr)').hide();
+ // unhide the section that was clicked
+ $(this).siblings().toggle();
+ // make this section open, w/ a down arrow (v)
+ $(this).children().toggleClass('open');
+ });
+
+ $("select[multiple]").asmSelect({
+ animate: true
+ });
+
+ if ($("#description").is("textarea")) {
+ // Only try to replace the textarea if the
+ // CKEditor is compatible w/ the browser.
+ if (CKEDITOR.env.isCompatible) {
+ CKEDITOR.replace('description',
+ {
+ toolbar : 'Default',
+// width : 570,
+// height : 400,
+ filebrowserImageBrowseUrl : '../Toolkit/CKImages/browser.php?folder=1',
+ filebrowserImageUploadUrl : '../Toolkit/CKImages/controller.php?command=Upload',
+ filebrowserImageWindowWidth : '760',
+ filebrowserImageWindowHeight : '500'
+ });
+// config.scayt_autoStartup = true;
+// config.scayt_uiTabs = '0,0,0';
+ }
+ }
+ },// }}}
+
+ confirmPageDelete: function(event)// {{{
+ {
+ if (!confirm("Are you sure you wish to delete this page and its paragraphs?\n\n" +
+ "All sub pages along with existing page drafts will also be deleted!")) {
+ event.preventDefault();
+ }
+ },// }}}
+ createCategoryShortcutView: function(element, section, container)// {{{
+ {
+ var target = section.find('select[name="'+element+'[]"]');
+ if (target.length) {
+ container.append('<span class="'+element+'"></span>');
+ var $holder = container.find('.'+element),
+ $numSelected = target.find(':selected').length;
+ if ($numSelected) {
+ EditPage.updateText($holder, '<tt>['+$numSelected+']</tt>Categories');
+ }
+ target.change(function() {
+ var $numSelected = target.find(':selected').length;
+ EditPage.updateText($holder, '<tt>['+$numSelected+']</tt>Categories');
+ });
+ }
+ },// }}}
+ createRegionShortcutView: function(element, section, container)// {{{
+ {
+ var target = section.find('select[name="'+element+'[]"]');
+ if (target.length) {
+ container.append('<span class="'+element+'"></span>');
+ var $holder = container.find('.'+element),
+ $numSelected = target.find(':selected').length;
+ if ($numSelected) {
+ EditPage.updateText($holder, '<tt>['+$numSelected+']</tt>Regions');
+ }
+ target.change(function() {
+ var $numSelected = target.find(':selected').length;
+ EditPage.updateText($holder, '<tt>['+$numSelected+']</tt>Regions');
+ });
+ }
+ },// }}}
+ createCheckboxShortcutView: function(element, section, container, text)// {{{
+ {
+ var target = section.find('input[name='+element+']:checkbox');
+ if (target.length) {
+ container.append('<span class="'+element+'"></span>');
+ var $holder = container.find('.'+element),
+ $checked = target.is(':checked')
+ ? '<tt>[X]</tt>'
+ : '<tt>[ ]</tt>';
+ EditPage.updateText($holder, $checked + text);
+
+ target.change(function() {
+ var $checked = target.is(':checked')
+ ? '<tt>[X]</tt>'
+ : '<tt>[ ]</tt>';
+ EditPage.updateText($holder, $checked + text);
+ });
+ }
+ },// }}}
+ createTextShortcutView: function(element, section, container)// {{{
+ {
+ var target = section.find('input[name='+element+']');
+ if (target.length) {
+ container.append('<span class="'+element+'"></span>');
+ var $holder = container.find('.'+element);
+ if (target.val() != '') {
+ EditPage.updateText($holder, '{' + target.val() + '}');
+ }
+ target.change(function() {
+ if ($(this).val() != '') {
+ EditPage.updateText($holder, '{' + $(this).val() + '}');
+ } else {
+ EditPage.updateText($holder, '');
+ }
+ });
+ }
+ },// }}}
+
+ couponAttributes: function()// {{{
+ {
+ var $section = $('#coupons');
+ $section.find('tr.hdr td')
+ .append('<span class="attributes"></span>');
+
+ $attributes = $section.find('tr.hdr .attributes');
+
+ EditPage.createCheckboxShortcutView('include_coupons', $section, $attributes, 'Display Coupons');
+ EditPage.createCategoryShortcutView('coupon_categories', $section, $attributes);
+ },// }}}
+
+ headlineAttributes: function()// {{{
+ {
+ var $section = $('#headlines');
+ $section.find('tr.hdr td')
+ .append('<span class="attributes"></span>');
+
+ $attributes = $section.find('tr.hdr .attributes');
+
+ EditPage.createCheckboxShortcutView('headline', $section, $attributes, 'Headline');
+ },// }}}
+
+ pageAttributes: function()// {{{
+ {
+ var $section = $('#attributes');
+ $section.find('tr.hdr td')
+ .append('<span class="attributes"></span>');
+
+ $attributes = $section.find('tr.hdr .attributes');
+
+ EditPage.createTextShortcutView('keyword', $section, $attributes);
+ EditPage.createTextShortcutView('short_url', $section, $attributes);
+ EditPage.createCheckboxShortcutView('paragraph_links', $section, $attributes, 'Links');
+ },// }}}
+
+ memberAttributes: function()// {{{
+ {
+ var $section = $('#members');
+ $section.find('tr.hdr td')
+ .append('<span class="attributes"></span>');
+
+ $attributes = $section.find('tr.hdr .attributes');
+
+ EditPage.createCheckboxShortcutView('include_members', $section, $attributes, 'Display Members');
+ EditPage.createCategoryShortcutView('member_categories', $section, $attributes);
+ EditPage.createRegionShortcutView('member_regions', $section, $attributes);
+ EditPage.createCheckboxShortcutView('include_member_map', $section, $attributes, 'Map');
+ EditPage.createCheckboxShortcutView('search_form', $section, $attributes, 'Search');
+ },// }}}
+
+ updateText: function(holder, content)// {{{
+ {
+ holder.html(content);
+ }// }}}
+};
+
+$(document).ready(EditPage.init);
--- /dev/null
+var EditParagraph =
+{
+ init: function()// {{{
+ {
+ $('.files').sortable({
+ placeholder: 'ui-state-highlight'
+ });
+
+ $('input[name="deleteParagraph"]').click(EditParagraph.confirmParagraphDelete);
+
+ // Bind click events to the remove buttons for uploaded files
+ // everytime a button is clicked, an entire li element is removed
+ // so we can get rid of all the info stored in hidden fields
+ // about the file (bytes, filename, etc...).
+ $('.remove').live('click', function(event) {
+ event.preventDefault();
+ $(this).parent('li').remove();
+ });
+
+ $('#filename').after('<span id="upload_notification" style="display: none;">Uploading</span>');
+ $('#filename').after('<span id="success_notification" style="display: none;"><span></span> Successfully uploaded</span>');
+ var $uploadNotification = $('#upload_notification');
+
+ $("tbody.section tr:not(.hdr)").toggle();
+ var $hdr = $('tbody.section tr.hdr');
+
+ $hdr.click(function() {
+ $(this).siblings()
+ .toggle();
+ $(this).children()
+ .toggleClass('open');
+ });
+
+ $("div.req").each(function() {
+ $(this).parents("tbody.section")
+ .children("tr:not(.hdr)")
+ .toggle();
+ $(this).parents("tbody.section")
+ .children("tr.hdr")
+ .children()
+ .toggleClass('open');
+ });
+
+ if ($("#description").is("textarea")) {
+ // Only try to replace the textarea if the
+ // CKEditor is compatible w/ the browser.
+ if (CKEDITOR.env.isCompatible) {
+ CKEDITOR.replace('description',
+ {
+ toolbar : 'Default',
+// width : 570,
+// height : 400,
+ filebrowserImageBrowseUrl : '../Toolkit/CKImages/browser.php?folder=1',
+ filebrowserImageUploadUrl : '../Toolkit/CKImages/controller.php?command=Upload',
+ filebrowserImageWindowWidth : '760',
+ filebrowserImageWindowHeight : '500'
+ });
+ }
+ }
+ },// }}}
+
+ cleanName: function(filename)// {{{
+ {
+ var $alphaNumeric = filename.replace(/[^A-Za-z0-9]/g, '');
+
+ return $alphaNumeric;
+ },// }}}
+ confirmParagraphDelete: function(event)// {{{
+ {
+ if (!confirm("Are you sure you wish to delete this paragraph and its files?")) {
+ event.preventDefault();
+ }
+ },// }}}
+
+ getExtensionImage: function(ext)// {{{
+ {
+ var img;
+ switch (ext) {
+ case 'mp3' :
+ img = 'mp3.gif';
+ break;
+
+ case 'avi' :
+ img = 'avi.gif';
+ break;
+
+ case 'html' :
+ img = 'html.gif';
+ break;
+
+ case 'mov' :
+ img = 'mov.gif'
+ break;
+
+ case 'wmv' :
+ img = 'wmv.gif';
+ break;
+
+ case 'ppt' :
+ img = 'ppt.gif';
+ break;
+
+ case 'zip' :
+ img = 'zip.png';
+ break;
+
+ case 'rar' :
+ case 'tar' :
+ img = 'rar.gif';
+ break;
+
+ case 'txt' :
+ img = 'txt.png';
+ break;
+
+ case 'xlsx' :
+ case 'xls' :
+ img = 'xls.gif';
+ break;
+
+ case 'pdf' :
+ img = 'pdf.png';
+ break;
+
+ case 'doc' :
+ case 'docx' :
+ img = 'doc.gif';
+ break;
+
+ case 'png' : // image does not exist yet.
+ case 'jpeg' :
+ case 'jpg' :
+ img = 'jpg.gif';
+ break;
+
+ case 'gif' :
+ img = 'gif.gif';
+ break;
+
+ default :
+ img = 'download.gif';
+ break;
+ }
+
+ return img;
+ }// }}}
+};
+
+$(document).ready(EditParagraph.init);
--- /dev/null
+var PagesTree =
+{
+ init: function()
+ {
+ PagesTree.updateMoveArrowVisibility();
+ $('.admin_nav')
+ .append('<li><a id="expand_all" href="#">Expand All</a></li>')
+ .append('<li><a id="collapse_all" href="#">Collapse All</a></li>')
+ .append('<li><a id="show_pos" href="#">Show Positions</a></li>')
+ .append('<li><a id="hide_pos" href="#">Hide Positions</a></li>')
+ ;
+
+ var $myTree = $('#tree');
+
+ if ($myTree.children('ul').size() > 0) {
+ $myTree.tree({
+ callback : {
+ onsearch : function (NODES, TREE_OBJ) {
+ TREE_OBJ.container.find('strong.search').removeClass('search');
+ NODES.addClass('search');
+
+ if (NODES.length == 0) {
+ alert('No matches found - Please refine your search.');
+ }
+ }
+ },
+ plugins : {
+ cookie : {
+ prefix : "jstree_toolbox_",
+ types : {
+ selected : false
+ }
+ }
+ }
+ });
+ $('#show_pos').click(function(event) {
+ event.preventDefault();
+ $('select').show();
+ });
+ $('#hide_pos').click(function(event) {
+ event.preventDefault();
+ $('select').hide();
+ });
+ $('#expand_all').click(function(event) {
+ event.preventDefault();
+ $.tree.focused().open_all();
+ });
+ $('#collapse_all').click(function(event) {
+ event.preventDefault();
+ $.tree.focused().close_all();
+ });
+
+ $("#search_form").submit(function(event) {
+ var $search = $("#q").val().toUpperCase();
+ event.preventDefault();
+ jQuery.expr[':'].Contains = function(a, i, m) {
+ return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0;
+ };
+ $.tree.focused().search($search, "contains('"+$search+"'),strong:Contains");
+ });
+
+ $('a.pagePreview').click(function(event) {
+ var newWindow = window.open($(this).attr('href'));
+ newWindow.focus();
+ return false;
+ });
+
+ $('img.moveDown').click(function() {
+ var $li = $(this).closest('li'),
+ $sibling = $li.next();
+ if ($sibling.length == 1) {
+ var $id = $li.attr('id');
+ $li.detach();
+ $li.insertAfter($sibling);
+ PagesTree.updateMoveArrowVisibility();
+ $.ajax({
+ url : '../toolbox-page-move/'+$id+'/down/',
+ cache: false,
+ async: false,
+ success: function(html) {
+ if (html == 0) {
+ PagesTree.moveBack($li, $sibling);
+ } else if ($sibling.hasClass('last')) {
+ $sibling.removeClass('last');
+ $li.addClass('last');
+ }
+ },
+ error: function() {
+ PagesTree.moveBack($li, $sibling);
+ }
+ });
+ }
+ });
+
+ $('img.moveUp').click(function() {
+ var $li = $(this).closest('li'),
+ $sibling = $li.prev();
+ if ($sibling.length == 1) {
+ var $id = $li.attr('id');
+ $li.detach();
+ $li.insertBefore($sibling);
+ PagesTree.updateMoveArrowVisibility();
+ $.ajax({
+ url : '../toolbox-page-move/'+$id+'/up/',
+ cache: false,
+ async: false,
+ success: function(html) {
+ if (html == 0) {
+ PagesTree.moveBack($li, $sibling);
+ } else if ($li.hasClass('last')) {
+ $li.removeClass('last');
+ $sibling.addClass('last');
+ }
+ },
+ error: function() {
+ PagesTree.moveBack($li, $sibling);
+ }
+ });
+ }
+ });
+
+ $('.active-ball').click(function(event) {
+ event.preventDefault();
+ var id = $(this).attr('rel'),
+ _this = $(this);
+ $.get('../toolbox-change-state/'+id+'/?t=' + event.timeStamp, function(data) {
+ if (data) {
+ _this.children().toggle();
+ var newTitle = _this.attr('title') == 'Display'
+ ? "Don't Display"
+ : 'Display';
+ _this.attr('title', newTitle);
+ }
+ });
+ });
+ $('.mobile-active-ball').click(function(event) {
+ event.preventDefault();
+ var id = $(this).attr('rel'),
+ _this = $(this);
+ $.get('../toolbox-change-state-mobile/'+id+'/?t=' + event.timeStamp, function(data) {
+ if (data) {
+ _this.children().toggle();
+ var newTitle = _this.attr('title') == 'Display'
+ ? "Don't Display"
+ : 'Display';
+ _this.attr('title', newTitle);
+ }
+ });
+ });
+ }
+ $('.closed').hover(function(){
+ $(this).css('background', 'lightgrey');
+ //$(this).children('.right-element').show();
+ },function(){
+ $(this).css('background', 'none');
+ //$(this).children('.right-element').hide();
+ });
+ $('.leaf').hover(function(){
+ $(this).css('background', 'lightgrey');
+ //$(this).children('.right-element').show();
+ },function(){
+ $(this).css('background', 'none');
+ //$(this).children('.right-element').hide();
+ });
+ $('li.open').each(function(){
+ var count = $(this).children('ul').children('li').size();
+ PagesTree.loadSelectOptions(
+ $(this).children('ul').children('li').children('div.right-element'),
+ count
+ );
+ });
+ $('li.closed').each(function(){
+ var count = $(this).children('ul').children('li').size();
+ PagesTree.loadSelectOptions(
+ $(this).children('ul').children('li').children('div.right-element'),
+ count
+ );
+ });
+ $('select.pos-select').each(function(){
+ $(this).change(function(){
+ var id = $(this).attr('name');
+ var oldpos = $(this).attr('rel');
+ var newpos = $(this).attr('value');
+ window.location.href = '../toolbox-page-move-sel/' + id + '/' + oldpos + '/' + newpos + '/';
+ });
+ });
+ $('ul.ltr').each(function(){
+ var count = $(this).children('li').size();
+ PagesTree.loadSelectOptions(
+ $(this).children('li').children('div.right-element'),
+ count
+ );
+ });
+ },
+
+ loadSelectOptions: function(ul, count)
+ {
+ ul.each(function(){
+ var selCount = $(this).children('select').attr('rel');
+ if ($(this).children('select').hasClass('parent-level-sel')) {
+ var begin = 2;
+ } else {
+ var begin = 1;
+ }
+ for (i = begin; i <= count; ++i) {
+ var html = '<option value="'+i+'"';
+ if (selCount == i) {
+ html += ' selected="selected"';
+ }
+ html += '>'+i+'</option>';
+ $(this).children('select').append(html);
+ }
+ });
+ },
+
+ moveBack: function($li, $sibling)
+ {
+ alert('There was an error moving your page');
+ $li.detach();
+ $li.insertBefore($sibling);
+ PagesTree.updateMoveArrowVisibility();
+ },
+
+ updateMoveArrowVisibility: function()
+ {
+ $('img.moveUp, img.moveDown').show().removeClass('tOff');
+
+ var $tree = $('#tree');
+ $tree.find('ul').each(function() {
+ var $firstUpArrow = $(this).find('img.moveUp:first'),
+ $lis = $(this).children().last();
+ $firstUpArrow.addClass('tOff');
+
+ $lis.each(function() {
+ var $lastDownArrow = $(this).find('.right-element:first img.moveDown:last');
+ $lastDownArrow.addClass('tOff');
+ });
+ });
+ }
+};
+
+$(document).ready(PagesTree.init);
--- /dev/null
+var ParagraphTree =
+{
+ init: function()
+ {
+ ParagraphTree.updateMoveArrowVisibility();
+ var $myTree = $('#tree');
+ if ($myTree.children('ul').size() > 0) {
+ $myTree.tree();
+ }
+
+ $('img.moveDown').click(function() {
+ var $li = $(this).closest('li'),
+ $sibling = $li.next();
+ if ($sibling.length == 1) {
+ var $id = $li.attr('id');
+ $li.detach();
+ $li.insertAfter($sibling);
+ ParagraphTree.updateMoveArrowVisibility();
+ $.ajax({
+ url : '../toolbox-paragraph-move/'+$id+'/down/',
+ async: false,
+ cache: false,
+ success: function(html) {
+ if (html == 0) {
+ ParagraphTree.moveBack($li, $sibling);
+ } else if ($sibling.hasClass('last')) {
+ $sibling.removeClass('last');
+ $li.addClass('last');
+ }
+ },
+ error: function() {
+ ParagraphTree.moveBack($li, $sibling);
+ }
+ });
+ }
+ });
+
+ $('img.moveUp').click(function() {
+ var $li = $(this).closest('li'),
+ $sibling = $li.prev();
+ if ($sibling.length == 1) {
+ var $id = $li.attr('id');
+ $li.detach();
+ $li.insertBefore($sibling);
+ if ($li.hasClass('last')) {
+ $li.removeClass('last');
+ $sibling.addClass('last');
+ }
+ ParagraphTree.updateMoveArrowVisibility();
+ $.ajax({
+ url : '../toolbox-paragraph-move/'+$id+'/up/',
+ async: false,
+ cache: false,
+ success: function(html) {
+ if (html == 0) {
+ ParagraphTree.moveBack($li, $sibling);
+ } else if ($li.hasClass('last')) {
+ $li.removeClass('last');
+ $sibling.addClass('last');
+ }
+ },
+ error: function() {
+ ParagraphTree.moveBack($li, $sibling);
+ }
+ });
+ }
+ });
+
+ $('.active-ball').click(function(event) {
+ event.preventDefault();
+ var id = $(this).attr('rel');
+ var _this = $(this);
+ $.get('../toolbox-paragraph-change-state/'+id+'/?t=' + event.timeStamp, function(data) {
+ if (data) {
+ _this.children().toggle();
+ var newTitle = _this.attr('title') == 'Display'
+ ? "Don't Display"
+ : 'Display';
+ _this.attr('title', newTitle);
+ }
+ });
+ });
+ $('ul.ltr').each(function(){
+ var count = $(this).children('li').size();
+ ParagraphTree.loadSelectOptions(
+ $(this).children('li').children('div.right-element'),
+ count
+ );
+ });
+ $('select.pos-select').each(function(){
+ $(this).change(function(){
+ var id = $(this).attr('name');
+ var oldpos = $(this).attr('rel');
+ var newpos = $(this).attr('value');
+ window.location.href = '../toolbox-paragraph-move-sel/' + id + '/' + oldpos + '/' + newpos + '/';
+ });
+ });
+ },
+
+ loadSelectOptions: function(ul, count)
+ {
+ ul.each(function(){
+ var selCount = $(this).children('select').attr('rel');
+ var begin = 1;
+ for (i = begin; i <= count; ++i) {
+ var realNum = i + 1;
+ var html = '<option value="'+realNum+'"';
+ if (selCount == realNum) {
+ html += ' selected="selected"';
+ }
+ html += '>'+ i +'</option>';
+ $(this).children('select').append(html);
+ }
+ });
+ },
+
+ moveBack: function($li, $sibling)
+ {
+ alert('There was an error moving your page');
+ $li.detach();
+ $li.insertBefore($sibling);
+ ParagraphTree.updateMoveArrowVisibility();
+ },
+
+ updateMoveArrowVisibility: function()
+ {
+ $('img.moveUp, img.moveDown').show().removeClass('tOff');
+
+ var $tree = $('#tree');
+ $tree.find('ul').each(function() {
+ var $firstUpArrow = $(this).find('img.moveUp:first');
+ $firstUpArrow.addClass('tOff');
+
+ var $lis = $(this).children().last();
+ $lis.each(function() {
+ var $lastDownArrow = $(this).find('.right-element:first img.moveDown:last');
+ $lastDownArrow.addClass('tOff');
+ });
+ });
+ }
+};
+
+$(document).ready(ParagraphTree.init);
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+$dbh = Toolkit_Database::getInstance();
+//echo '<pre>'.print_r($_REQUEST, true).'</pre>';
+$someNewPos = 999;
+try {
+ // start transaction
+ $dbh->beginTransaction();
+ $sql = "
+ SELECT parent
+ FROM pages
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(
+ ":id",
+ $_REQUEST['id'],
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+ $parent = $stmt->fetchColumn();
+ //var_dump($parent);
+ $updateSql = "
+ UPDATE pages
+ SET pos = :pos
+ WHERE id = :id";
+ $updateStmt = $dbh->prepare($updateSql);
+ $moveDownSql = "
+ SELECT id
+ FROM pages
+ WHERE parent = :parent
+ AND pos >= :oldpos
+ AND pos <= :newpos
+ ORDER BY pos";
+ $moveDownStmt = $dbh->prepare($moveDownSql);
+ $moveUpSql = "
+ UPDATE pages
+ SET pos = pos + 1
+ WHERE parent = :parent
+ AND pos BETWEEN :newpos AND :oldpos";
+ $moveUpStmt = $dbh->prepare($moveUpSql);
+
+ $updateStmt->bindParam(
+ ':pos',
+ $someNewPos,
+ PDO::PARAM_INT
+ );
+ $updateStmt->bindParam(
+ ':id',
+ $_REQUEST['id'],
+ PDO::PARAM_INT
+ );
+ $updateStmt->execute();
+ // going to a higher pos (moving down)
+ if ($_REQUEST['newpos'] > $_REQUEST['oldpos']) {
+ //echo '<pre>'.print_r($_REQUEST, true).'</pre>';
+ //var_dump($parent);
+ $moveDownStmt->bindParam(
+ ':parent',
+ $parent,
+ PDO::PARAM_INT
+ );
+ $moveDownStmt->bindParam(
+ ':oldpos',
+ $_REQUEST['oldpos'],
+ PDO::PARAM_INT
+ );
+ $moveDownStmt->bindParam(
+ ':newpos',
+ $_REQUEST['newpos'],
+ PDO::PARAM_INT
+ );
+ $moveDownStmt->execute();
+ $pos = $_REQUEST['oldpos'];
+ while ($row = $moveDownStmt->fetch(PDO::FETCH_ASSOC)) {
+ //var_dump($row);
+ $updateStmt->bindParam(
+ ':pos',
+ $pos,
+ PDO::PARAM_INT
+ );
+ $updateStmt->bindParam(
+ ':id',
+ $row['id']
+ );
+ $updateStmt->execute();
+ ++$pos;
+ }
+ // moving up
+ } else {
+ $moveUpStmt->bindParam(
+ ':parent',
+ $parent,
+ PDO::PARAM_INT
+ );
+ $moveUpStmt->bindParam(
+ ':oldpos',
+ $_REQUEST['oldpos'],
+ PDO::PARAM_INT
+ );
+ $moveUpStmt->bindParam(
+ ':newpos',
+ $_REQUEST['newpos'],
+ PDO::PARAM_INT
+ );
+ $moveUpStmt->execute();
+ }
+
+ $updateStmt->bindParam(
+ ':pos',
+ $_REQUEST['newpos'],
+ PDO::PARAM_INT
+ );
+ $updateStmt->bindParam(
+ ':id',
+ $_REQUEST['id'],
+ PDO::PARAM_INT
+ );
+ $updateStmt->execute();
+ $dbh->commit();
+} catch (PDOException $e) {
+ $dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+}
+$cache = new Cache_Lite($GLOBALS['cacheOptions']);
+$cache->clean('Toolbox');
+header('Location: '.MEDIA_BASE_URL.'admin/toolbox.php?showpos=1');
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+$dbh = Toolkit_Database::getInstance();
+$someNewPos = 999;
+try {
+ $dbh->beginTransaction();
+ $sql = "
+ SELECT page
+ FROM paragraphs
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(
+ ":id",
+ $_REQUEST['id'],
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+ $page = $stmt->fetchColumn();
+ $updateSql = "
+ UPDATE paragraphs
+ SET pos = :pos
+ WHERE id = :id";
+ $updateStmt = $dbh->prepare($updateSql);
+ $moveDownSql = "
+ SELECT id
+ FROM paragraphs
+ WHERE page = :page
+ AND pos >= :oldpos
+ AND pos <= :newpos
+ ORDER BY pos";
+ $moveDownStmt = $dbh->prepare($moveDownSql);
+ $moveUpSql = "
+ UPDATE paragraphs
+ SET pos = pos + 1
+ WHERE page = :page
+ AND pos BETWEEN :newpos AND :oldpos";
+ $moveUpStmt = $dbh->prepare($moveUpSql);
+
+ $updateStmt->bindParam(
+ ':pos',
+ $someNewPos,
+ PDO::PARAM_INT
+ );
+ $updateStmt->bindParam(
+ ':id',
+ $_REQUEST['id'],
+ PDO::PARAM_INT
+ );
+ $updateStmt->execute();
+ if ($_REQUEST['newpos'] > $_REQUEST['oldpos']) {
+ $moveDownStmt->bindParam(
+ ':page',
+ $page,
+ PDO::PARAM_INT
+ );
+ $moveDownStmt->bindParam(
+ ':oldpos',
+ $_REQUEST['oldpos'],
+ PDO::PARAM_INT
+ );
+ $moveDownStmt->bindParam(
+ ':newpos',
+ $_REQUEST['newpos'],
+ PDO::PARAM_INT
+ );
+ $moveDownStmt->execute();
+ $pos = $_REQUEST['oldpos'];
+ while ($row = $moveDownStmt->fetch(PDO::FETCH_ASSOC)) {
+ //var_dump($row);
+ $updateStmt->bindParam(
+ ':pos',
+ $pos,
+ PDO::PARAM_INT
+ );
+ $updateStmt->bindParam(
+ ':id',
+ $row['id']
+ );
+ $updateStmt->execute();
+ ++$pos;
+ }
+ } else {
+ $moveUpStmt->bindParam(
+ ':page',
+ $page,
+ PDO::PARAM_INT
+ );
+ $moveUpStmt->bindParam(
+ ':oldpos',
+ $_REQUEST['oldpos'],
+ PDO::PARAM_INT
+ );
+ $moveUpStmt->bindParam(
+ ':newpos',
+ $_REQUEST['newpos'],
+ PDO::PARAM_INT
+ );
+ $moveUpStmt->execute();
+ }
+
+ $updateStmt->bindParam(
+ ':pos',
+ $_REQUEST['newpos'],
+ PDO::PARAM_INT
+ );
+ $updateStmt->bindParam(
+ ':id',
+ $_REQUEST['id'],
+ PDO::PARAM_INT
+ );
+ $updateStmt->execute();
+ $dbh->commit();
+} catch (PDOException $e) {
+ $dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+}
+$cache = new Cache_Lite($GLOBALS['cacheOptions']);
+$cache->clean('Toolbox');
+header('Location: '.MEDIA_BASE_URL.'admin/toolbox.php?rt=Paragraphs&pageid='.$page);
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+
+if (!isset($_GET['kpass'])) {
+ return false;
+}
+if (!ctype_digit($_GET['catid'])) {
+ return false;
+}
+
+$dbh = Toolkit_Database::getInstance();
+
+try {
+ $sql = "
+ UPDATE pages
+ SET active = not active
+ WHERE id = :id";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $_GET['catid'], PDO::PARAM_INT);
+ $res = $stmt->execute();
+
+ $cache = new Cache_Lite($GLOBALS['cacheOptions']);
+ $cache->clean('Toolbox');
+
+ echo (int) $res;
+ return $res;
+} catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ return false;
+}
+?>
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+
+if (!isset($_GET['kpass'])) {
+ return false;
+}
+if (!ctype_digit($_GET['catid'])) {
+ return false;
+}
+
+$dbh = Toolkit_Database::getInstance();
+try {
+ $sql = "
+ UPDATE pages
+ SET mobile_active = not mobile_active
+ WHERE id = :id";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $_GET['catid'], PDO::PARAM_INT);
+ $res = $stmt->execute();
+
+ $cache = new Cache_Lite($GLOBALS['cacheOptions']);
+ $cache->clean('Toolbox');
+
+ echo (int) $res;
+ return $res;
+} catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ return false;
+}
+?>
--- /dev/null
+<?php
+if (!isset($_GET['kpass'])) {
+ die();
+}
+
+require_once '../../setup.phtml';
+
+$writer = new Zend_Log_Writer_Firebug();
+$logger = new Zend_Log($writer);
+
+$request = new Zend_Controller_Request_Http();
+$response = new Zend_Controller_Response_Http();
+$channel = Zend_Wildfire_Channel_HttpHeaders::getInstance();
+$channel->setRequest($request);
+$channel->setResponse($response);
+
+// start output buffering
+ob_start();
+
+// Now you can make calls to the logger
+
+$dbh = Toolkit_Database::getInstance();
+
+extract($_GET);
+
+try {
+ $dbh->beginTransaction();
+ if ($direction == 'down') {
+ $sql = "
+ UPDATE pages
+ SET pos = pos - 1
+ WHERE id <> :id
+ AND id <> :home_id
+ AND pos = (
+ SELECT pos + 1
+ FROM pages
+ WHERE id = :id)
+ AND parent = (
+ SELECT parent
+ FROM pages
+ WHERE id = :id)";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->bindValue(':home_id', HOME_ID, PDO::PARAM_INT);
+ $stmt->execute();
+
+ $sql = "
+ UPDATE pages
+ SET pos = pos + 1
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+ } elseif ($direction == 'up') {
+ $sql = "
+ UPDATE pages
+ SET pos = pos + 1
+ WHERE id <> :id
+ AND id <> :home_id
+ AND pos = (
+ SELECT pos - 1
+ FROM pages
+ WHERE id = :id)
+ AND parent = (
+ SELECT parent
+ FROM pages
+ WHERE id = :id)";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->bindValue(':home_id', HOME_ID, PDO::PARAM_INT);
+ $stmt->execute();
+
+ $sql = "
+ UPDATE pages
+ SET pos = pos - 1
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+ }
+
+ $dbh->commit();
+ echo 1;
+} catch (PDOException $e) {
+ $dbh->rollback();
+ if ('production' == strtolower($_SERVER['GLM_HOST_ID'])) {
+ $logger->crit($e->getMessage());
+ } else {
+ Toolkit_Logger::logException('DB Error', $e);
+ }
+ echo 0;
+}
+// Flush log data to browser
+$channel->flush();
+$response->sendHeaders();
+die();
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+
+if (!isset($_GET['kpass'])) {
+ return false;
+}
+if (!ctype_digit($_GET['paragraphId'])) {
+ return false;
+}
+
+$dbh = Toolkit_Database::getInstance();
+
+try {
+ $sql = "
+ UPDATE paragraphs
+ SET active = not active
+ WHERE id = :id";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $_GET['paragraphId'], PDO::PARAM_INT);
+ $res = $stmt->execute();
+
+
+ $sql = "
+ SELECT page
+ FROM paragraphs
+ WHERE id = :id";
+
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $_GET['paragraphId'], PDO::PARAM_INT);
+ $stmt->execute();
+ $stmt->bindColumn('page', $pageId);
+ $stmt->fetch(PDO::FETCH_ASSOC);
+
+ $cache = new Cache_Lite($GLOBALS['cacheOptions']);
+ $cache->clean('Toolbox');
+
+ echo (int) $res;
+ return $res;
+} catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ return false;
+}
+?>
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+
+$fs = new Toolkit_FileServer_FileAdapter();
+try {
+ $res = $fs->upload('userfile');
+} catch (Toolkit_FileServer_Exception $e) {
+ Toolkit_Logger::logException('File Server', $e);
+ echo -1; // Don't return "false", it will mess up the JS plugin.
+ return;
+}
+
+echo json_encode($res);
+?>
--- /dev/null
+<?php
+if (!isset($_GET['kpass'])) {
+ die();
+}
+
+require_once '../../setup.phtml';
+
+$dbh = Toolkit_Database::getInstance();
+
+extract($_GET);
+
+try {
+ $dbh->beginTransaction();
+ if ($direction == 'down') {
+ // Update paragraph nodes on this page who lie at the target node
+ // position and the position just after it.
+ $sql = "
+ UPDATE paragraphs
+ SET pos = CASE WHEN id = :id
+ THEN pos + 1 ELSE pos - 1 END
+ WHERE page = (SELECT page FROM paragraphs WHERE id = :id)
+ AND pos BETWEEN (SELECT pos FROM paragraphs WHERE id = :id)
+ AND (SELECT pos + 1 FROM paragraphs WHERE id = :id)";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+ } elseif ($direction == 'up') {
+ // Update paragraph nodes on this page who lie at the target node
+ // position and the position just before it.
+ $sql = "
+ UPDATE paragraphs
+ SET pos = CASE WHEN id = :id
+ THEN pos - 1 ELSE pos + 1 END
+ WHERE page = (SELECT page FROM paragraphs WHERE id = :id)
+ AND pos BETWEEN (SELECT pos - 1 FROM paragraphs WHERE id = :id)
+ AND (SELECT pos FROM paragraphs WHERE id = :id)";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
+ $stmt->execute();
+ }
+
+ $dbh->commit();
+ die();
+} catch (PDOException $e) {
+ $dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+ throw new Toolkit_Toolbox_Exception(
+ "unable to move paragraph `$id` `$direction`"
+ );
+}
+?>
--- /dev/null
+.webform table { width: 742px; }
+.fieldcell { width: auto; }
+
+/* form section arrows */
+tr.hdr td {
+ background: #DDD url("//app.gaslightmedia.com/assets/icons/bullet_arrow_right.png") no-repeat;
+ padding-left: 15px;
+ cursor: pointer;
+ cursor: hand;
+}
+tr.hdr td:hover {
+ background-color: #e5e5e5;
+}
+tr.hdr td.open{
+ background-image: url("//app.gaslightmedia.com/assets/icons/bullet_arrow_down.png");
+}
+
+/* paragraph files */
+.files {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ width: 60%;
+}
+.files li {
+ margin: 0 3px 3px 3px;
+ padding: 0.4em;
+ padding-left: 1.5em;
+}
+.files li span {
+ position: absolute;
+ margin-left: -1.3em;
+}
+.files .ui-state-highlight {
+ height: 1.5em;
+ line-height: 1.2em;
+}
+#success_notification {
+ font-weight: bold;
+ color: #11a52f;
+}
+
+/* right tree element */
+.right-element {
+ float: left;
+ }
+.paragraph-line {
+ float: none !important;
+}
+.paragraph-line strong {
+ margin-left: 10px;
+ }
+/* highlight search matches in tree */
+.search {
+ color: orange;
+}
+
+/* Ove */
+#q {
+ border: 2px inset black;
+ height: 20px;
+ padding: 2px;
+ font-size: 16px;
+ width: 200px;
+ margin-right: 10px;
+ font-weight: bold}
+
+#tree li {
+ display: block;
+ line-height: 24px !important;
+}
+li.closed { background: url(assets/arrowClosed.png) no-repeat !important;}
+li.open { background: url(assets/arrowOpen.png) no-repeat !important;}
+/*.ltr>li {
+ border-bottom: 1px dashed #ccc;
+}*/
+#tree li.last {
+ float: none;
+}
+#tree {
+ width: 630px;
+}
+
+/*
+ * #tree ul {
+ * background: #ece;
+ * }
+ * #tree ul ul {
+ * background: #cee;
+ * }
+ * #tree ul ul ul {
+ * background: #eec;
+ * }
+ * #tree ul ul ul ul {
+ * background: #ede;
+ * }
+ */
+.right-element a {
+ text-decoration: underline !important;
+}
+
+#tree .editPage, .editPage:hover,
+#tree .editParagraphs, .editParagraphs:hover,
+#tree .pagePreview, .pagePreview:hover {
+ height: 16px;
+ padding: 0 5px 0 0px !important;
+ border: 0;
+}
+
+/*
+#tree .editPage, .editPage:hover { background: url(//app.gaslightmedia.com/assets/icons/page_edit.png) no-repeat; }
+#tree .editParagraphs, .editParagraphs:hover { background: url(//app.gaslightmedia.com/assets/icons/page_add.png) no-repeat; }
+#tree .pagePreview, .pagePreview:hover { background: url(//app.gaslightmedia.com/assets/icons/page_go.png) no-repeat; }
+
+#tree a:hover { color: green;}
+*/
+/* Lines */
+#tree li {
+ /* border-bottom: 1px dotted #666;
+ * padding-bottom: 1px;
+ */
+}
+
+/* Mousetip */
+.moveUp, .moveDown {
+ cursor: hand;
+ cursor: pointer;
+}
+.tOff {
+ visibility: hidden;
+}
+.form-success {border:1px solid green;color:green;padding:10px;margin:5px;}
--- /dev/null
+<?php
+
+/**
+ * AdminEditVideoForm.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Toolkit_Videos_AdminEditVideoForm
+ *
+ * Handles the form generation and processing of the Video Edit Page
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2008 Gaslight media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_Videos_AdminEditVideoForm
+ extends Toolkit_FormBuilder
+{
+ /**
+ * What do you want the success msg to be if the form validates successfully
+ *
+ * @var string
+ * @access protected
+ */
+ protected $successMsg
+ = '<div id="form-success-top">Coupon successfully updated.</div>';
+
+ /**
+ * The default rules to register for validating
+ *
+ * We have to register these rules, or any others we want, before
+ * we are able to use them in our forms.
+ *
+ * @var string
+ * @access protected
+ */
+ protected $registeredRules = array(
+ array(
+ 'checkURI',
+ 'callback',
+ 'uri',
+ 'Validate'
+ )
+ );
+ public $errorMsg = '
+ <div id="form-warning-top">There was a Problem with your form!</div>';
+
+ /**
+ * Setup Form Constants
+ *
+ * Constants are form values (hidden) fields most likely that cannot be
+ * changed by user input
+ *
+ * @return void
+ */
+ public function configureConstants()
+ {
+ $c = array();
+ $this->setConstants($c);
+ }
+
+ /**
+ * Setup Form Defaults
+ *
+ * if $_GET['id'] is numeric then it creates a Toolkit_Videos_Video
+ * class object and gets set as form element defaults
+ *
+ * @param PDO $dbh Database Connection
+ *
+ * @return void
+ */
+ public function configureDefaults(PDO $dbh)
+ {
+ $d = array();
+ if (is_numeric($_GET['id'])) {
+ $video = new Toolkit_Videos_VideoMapper($dbh);
+ $d = $video->getVideoById($_GET['id']);
+ }
+ $this->setDefaults($d);
+ }
+
+ /**
+ * Setup the Form elements
+ *
+ * @param PDO $dbh Database Connection
+ * @param Config_Container $c PEAR::Config_Container object
+ *
+ * @return void
+ */
+ public function configureElements(PDO $dbh, Config_Container $c)
+ {
+ $e = array();
+
+ // get reference to [conf] section of config file
+ $appHasFeaturedVideos
+ = $c->getItem('section', 'conf')
+ ->getItem('directive', 'featuredVideos')
+ ->getContent();
+ // All Elements are created here.
+ // This includes group element definitions.
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'active',
+ 'display' => 'Active',
+ 'val' => array(0, 1)
+ );
+ if ($appHasFeaturedVideos) {
+ $e[] = array(
+ 'type' => 'advcheckbox',
+ 'req' => false,
+ 'name' => 'featured',
+ 'display' => 'Featured',
+ 'val' => array(0, 1)
+ );
+ } else {
+ $e[] = array(
+ 'type' => 'hidden',
+ 'req' => false,
+ 'name' => 'featured'
+ );
+ }
+ $e[] = array(
+ 'type' => 'text',
+ 'req' => true,
+ 'name' => 'video_url',
+ 'display' => 'Video Link<br>
+ <span style="color:blue">
+ Click on the \'Share\' function on the YouTube video
+ <br>to get your link. If you\'re having problems click on "show options"
+ and select "long link"</span>',
+ 'opts' => array('class' => 'text','size'=>50)
+ );
+ $e[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'submit_rmv',
+ 'display' => 'Submit Video',
+ 'opts' => array('id' => 'submit')
+ );
+ if (ctype_digit($_GET['id'])) {
+ $e[] = array(
+ 'type' => 'submit',
+ 'req' => false,
+ 'name' => 'delete_rmv',
+ 'display' => 'Delete Video',
+ 'opts' => array('id' => 'delete')
+ );
+ }
+
+ $this->setupElements($e);
+ }
+
+ /**
+ * Setup Form filters
+ *
+ * @return void
+ */
+ public function configureFilters()
+ {
+ $f = array();
+ $f[] = array(
+ 'element' => '__ALL__',
+ 'filter' => 'trim'
+ );
+ $f[] = array(
+ 'element' => 'url',
+ 'filter' => array('Toolkit_Common', 'filterURI')
+ );
+
+ $this->setupFilters($f);
+ }
+
+ /**
+ * Runs all function to setup the Form
+ *
+ * @param PDO $dbh Database Connection
+ * @param Config_Container $c PEAR::Config_Container object
+ *
+ * @return void
+ */
+ public function configureForm(
+ PDO $dbh,
+ Config_Container $c
+ ) {
+ $this->configureElements($dbh, $c);
+ $this->configureFilters();
+ $this->configureRules();
+ $this->configureDefaults($dbh);
+ $this->configureConstants();
+ }
+
+ /**
+ * Setup the Form's rules
+ *
+ * @return void
+ */
+ public function configureRules()
+ {
+ $r = array();
+
+ $r[] = array(
+ 'element' => 'video_url',
+ 'message' => 'ERROR: Invalid URL format (http)',
+ 'type' => 'checkURI',
+ 'format' => array(
+ 'allowed_schemes' => array('http'),
+ 'strict' => false
+ ),
+ 'validation' => $this->validationType,
+ 'reset' => false,
+ 'force' => false
+ );
+
+
+ $this->setupRules($r);
+ }
+
+ /**
+ * _processData function creates an video object Toolkit_Videos_Video
+ * if id exists it creates the object by id
+ * else it creates a new object
+ * saved is called and the object is either created or updated
+ *
+ * If the $values['id'] is given it creates a Toolkit_Videos_VideoMapper
+ * object and get the video object using the getVideoById method
+ * If not it then just creates an empty video object
+ * The object is then updated using it's accessor method and saved
+ *
+ * @param type $dbh Database Connection
+ * @param type $values Form $values
+ *
+ * @return void
+ */
+ private function _processData($dbh, $values)
+ {
+ $videoMapper = new Toolkit_Videos_VideoMapper($dbh);
+ if ($_GET['id']) {
+ $video = $videoMapper->getVideoById($_GET['id'], false);
+ } else {
+ $video = new Toolkit_Videos_Video();
+ }
+ $video->setVideo_url($values['video_url'])
+ ->setFeatured($values['featured'])
+ ->setActive($values['active']);
+
+ $video->save($dbh);
+ }
+
+ /**
+ * Output HTML for the form
+ *
+ * @param PDO $dbh Database Connection
+ *
+ * @return string|boolean
+ */
+ public function toHtml(PDO $dbh)
+ {
+ // Handle Deleting banner.
+ if ( $this->isSubmitted()
+ && ctype_digit($_GET['id'])
+ ) {
+ if ($this->getSubmitValue('delete_rmv')) {
+ $videoMapper = new Toolkit_Videos_VideoMapper($dbh);
+ $video = $videoMapper->getVideoById($_GET['id'], false);
+ if ($video instanceof Toolkit_Videos_Video) {
+ if ($video->delete($dbh, $is)) {
+ return 'Video successfully deleted.';
+ }
+ } else {
+ // the coupon has already been deleted or doesn't exist.
+ return "The video has already been deleted or doesn't exists.";
+ }
+ header ('Location: videos.php');
+ return false;
+ }
+ }
+
+ $this->setupRenderers();
+ if ($this->validate()) {
+ $this->cleanForm();
+
+ $submitValues = $this->getSubmitValues();
+ if ($this->_processData($dbh, $submitValues)) {
+ $this->freeze();
+ $output = $this->successMsg;
+ }
+ header('Location: videos.php');
+ } elseif ($this->isSubmitted()) {
+ $output = $this->errorMsg;
+ $output .= parent::toHTML();
+ } else {
+ $output = parent::toHTML();
+ }
+ return $output;
+ }
+
+}
--- /dev/null
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of Controller
+ *
+ * @author steve
+ */
+class Toolkit_Videos_Controller {
+
+ protected $flexyOptions;
+
+ public function getFlexyOptions()
+ {
+ return $this->flexyOptions;
+ }
+
+ public function setFlexyOptions($flexyOptions)
+ {
+ $this->flexyOptions = $flexyOptions;
+ }
+
+ function __construct()
+ {
+ $options = $GLOBALS['flexyOptions'];
+ $options['templateDir']
+ = dirname(__FILE__) . '/templates';
+ $options['compileDir']
+ = dirname(__FILE__) . '/templates/compiled';
+ $this->flexyOptions = $options;
+ }
+
+ public function toHtml(PDO $dbh, Config_Container $appConf)
+ {
+ switch ($_GET['module']) {
+ case 'editVideo':
+ $form = new Toolkit_Videos_AdminEditVideoForm(
+ 'edit-video'
+ );
+ $form->configureForm($dbh, $appConf);
+ $ret = $form->toHtml($dbh);
+ break;
+ case 'listVideo':
+ default:
+ $videos = new Toolkit_Videos_VideosDataGrid($dbh);
+ $videos->setConfig($appConf);
+ $videos->setQuery();
+ $videos->setDefaultSort(array('pos' => 'ASC'));
+ $ret .= $videos->toHtml($appConf);
+ break;
+ }
+ return $ret;
+ }
+}
+?>
--- /dev/null
+--
+-- setup schema
+--
+
+CREATE SCHEMA videos;
+GRANT ALL ON SCHEMA videos TO nobody;
+
+--
+-- Tables
+--
+
+\i ./table/videos.sql
--- /dev/null
+--
+-- Drops schema
+-- WARNING: CANNOT BE UNDONE
+--
+
+DROP SCHEMA IF EXISTS videos CASCADE;
\ No newline at end of file
--- /dev/null
+CREATE TABLE videos.videos (
+ id SERIAL,
+ create_date DATE DEFAULT current_date,
+ video_url TEXT,
+ active BOOLEAN,
+ featured BOOLEAN,
+ pos INT DEFAULT 1,
+ PRIMARY KEY (id)
+);
+
+GRANT ALL ON videos.videos TO nobody;
+GRANT ALL ON videos.videos_id_seq TO nobody;
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+ * IDecorator.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Toolkit_Videos_IDecorator
+ *
+ * Inteface class for the Toolkit_Videos_Decorators
+ * In future there may be more decorators here we're insurring that they have
+ * simular API's
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2008 Gaslight media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+interface Toolkit_Videos_IDecorator
+{
+ /**
+ * Class Constructor
+ *
+ * @return void
+ */
+ public function __construct();
+
+ /**
+ * Handles setting up the PEAR::HTML_Template_Flexy options
+ *
+ * @return void
+ */
+ public function setFlexyOptions();
+ /**
+ * Handles creating HTML output
+ *
+ * @param PDO $dbh Database Connection
+ * @param object $gateway Gateway Object
+ *
+ * @return string
+ */
+ public function toHtml(
+ PDO $dbh,
+ $gateway = null
+ );
+}
--- /dev/null
+<?php
+
+/**
+ * Navigation.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Toolkit_Videos_Navigation
+ *
+ * Handles the navigation for the Video admin side
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2008 Gaslight media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_Videos_Navigation
+ extends Toolkit_NavigationAbstract
+ implements Toolkit_INavigation
+{
+ // {{{ __construct()
+
+ /**
+ * Class Constructor
+ *
+ * @param HTML_Menu $menu Menu to use
+ * @param HTML_Menu_Renderer $rEngine Render to use
+ *
+ * @return void
+ */
+ public function __construct(
+ HTML_Menu $menu,
+ HTML_Menu_Renderer $rEngine
+ ) {
+ $this->menu = $menu;
+ $this->rEngine = $rEngine;
+ $this->currIndex = 'listCoupons';
+ }
+
+ /**
+ * Create templates for the navigation
+ *
+ * @return void
+ */
+ protected function setNavTemplates()
+ {
+ $tpl = '<li><a href="%s" title="%s">{Title}</a></li>';
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_INACTIVE,
+ sprintf($tpl, '{url}', '{desc}', '{Title}')
+ );
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_ACTIVE,
+ sprintf($tpl, '{url}', '{desc}', '{Title}')
+ );
+ $this->rEngine->setEntryTemplate(
+ HTML_MENU_ENTRY_ACTIVEPATH,
+ sprintf($tpl, '{url}', '{desc}', '{Title}')
+ );
+ $this->rEngine->setMenuTemplate('', '');
+ $this->rEngine->setRowTemplate('<ul class="admin_nav">', '</ul>');
+ }
+
+ /**
+ * force the current index to $_GET['page']
+ *
+ * @return void
+ */
+ protected function setCurrentIndex()
+ {
+ $this->menu->forceCurrentIndex($_GET['page']);
+ }
+
+ // }}}
+ // {{{ getNavSructure()
+ // @codeCoverageIgnoreStart
+
+ /**
+ * Sets up a multi dimensional array used for the nav structure
+ *
+ * @param Config_Container $c Application configuration
+ *
+ * @return array navigational array hash
+ * @access public
+ */
+ public function getNavStructure(Config_Container $c)
+ {
+ // get reference to [listing type] section of config file
+ $singularType = $c->getItem('section', 'listing type')
+ ->getItem('directive', 'singular')
+ ->getContent();
+ $pluralType = $c->getItem('section', 'listing type')
+ ->getItem('directive', 'plural')
+ ->getContent();
+
+ $nav = array(
+ 'listVideos' => array(
+ 'Title' => "List {$pluralType}",
+ 'url' => MEDIA_BASE_URL . 'admin/videos.php?page=listVideos&module=listVideos',
+ 'desc' => "Display all the {$pluralType}",
+ ),
+ 'editVideo' => array(
+ 'Title' => "Add {$singularType}",
+ 'url' => MEDIA_BASE_URL . 'admin/videos.php?page=editVideo&module=editVideo',
+ 'desc' => "Edit a {$singularType}"
+ ),
+ );
+
+ return $nav;
+ }
+
+ // @codeCoverageIgnoreEnd
+}
--- /dev/null
+<?php
+
+/**
+ * Video.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Toolkit_Videos_Video
+ *
+ * Object Data pattern class for the Video PDO Table
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2008 Gaslight media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_Videos_Video
+{
+
+ protected $id;
+ protected $video_url;
+ protected $pos;
+ protected $featured;
+ protected $active;
+
+ /**
+ * Handles the work of Inserting a video record into the database
+ * returns the id for the new record
+ *
+ * @param PDO $dbh Database Connection
+ *
+ * @return int
+ */
+ private function _insert(PDO $dbh)
+ {
+ $classData = $this->getClassAsArray();
+ unset($classData['id']);
+ $pos = $this->getMaxPos();
+ $classData['pos'] = ++$pos;
+ $sql = Toolkit_Common::createSQLInsert(
+ 'videos',
+ array_keys($classData)
+ );
+ $sql .= " RETURNING id";
+ $stmt = Toolkit_Common::prepareQuery(
+ $dbh,
+ 'videos',
+ $sql,
+ $classData
+ );
+ $stmt->execute();
+ return $stmt->fetchColumn();
+ }
+
+ /**
+ * Handles the update of the record on the database record
+ *
+ * @param PDO $dbh Database Connection
+ *
+ * @return int
+ */
+ private function _update(PDO $dbh)
+ {
+ $classData = $this->getClassAsArray();
+ $sql = Toolkit_Common::createSQLUpdate(
+ 'videos',
+ array_keys($classData),
+ array('id = :id')
+ );
+ return Toolkit_Common::processQuery(
+ $dbh,
+ 'videos',
+ $sql,
+ $classData
+ );
+ }
+
+ /**
+ * Handles the deletion of the record in the database and reordering
+ * any other videos in the table
+ *
+ * @param PDO $dbh Database Connection
+ *
+ * @return void
+ */
+ public function delete(PDO $dbh)
+ {
+ try {
+ $dbh->beginTransaction();
+ $sql = "
+ DELETE
+ FROM videos
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(
+ ':id',
+ $this->getId(),
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+ // we have to reorder the positions for the rest of the videos
+ $sql = "
+ UPDATE videos
+ SET pos = pos - 1
+ WHERE pos >= :oldpos";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(':oldpos', $this->getPos(), PDO::PARAM_INT);
+ $stmt->execute();
+ $dbh->commit();
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+ /**
+ * active getter
+ *
+ * @return boolean
+ */
+ public function getActive()
+ {
+ return $this->active;
+ }
+
+ /**
+ * active setter the given values is cast to a boolean value
+ * so if you send in a string 'true' or 'false' both will be cast to true
+ *
+ * @param boolean $active Active flag
+ *
+ * @return Toolkit_Videos_Video
+ */
+ public function setActive($active)
+ {
+ $this->active = (bool)$active;
+ return $this;
+ }
+
+ /**
+ * id getter
+ *
+ * @return int
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * id setter
+ *
+ * @param int $id integer for the record id
+ *
+ * @return Toolkit_Videos_Video
+ */
+ public function setId($id)
+ {
+ if (!$this->id) {
+ $this->id = $id;
+ }
+ return $this;
+ }
+
+ /**
+ * video_url getter
+ *
+ * @return string
+ */
+ public function getVideo_url()
+ {
+ return $this->video_url;
+ }
+
+ /**
+ * video_url settur
+ *
+ * @param string $video_url the youtube video url
+ *
+ * @return Toolkit_Videos_Video
+ */
+ public function setVideo_url($video_url)
+ {
+ $this->video_url = $video_url;
+ return $this;
+ }
+
+ /**
+ * pos getter
+ *
+ * @return int
+ */
+ public function getPos()
+ {
+ return $this->pos;
+ }
+
+ /**
+ * pos setter
+ *
+ * @param type $pos Position number for the video
+ *
+ * @return Toolkit_Videos_Video
+ */
+ public function setPos($pos)
+ {
+ $this->pos = $pos;
+ return $this;
+ }
+
+ /**
+ * featured getter
+ *
+ * @return boolean
+ */
+ public function getFeatured()
+ {
+ return $this->featured;
+ }
+
+ /**
+ * featured setter needs to be boolean not a string
+ *
+ * @param boolean $featured Featured flag
+ *
+ * @return Toolkit_Videos_Video
+ */
+ public function setFeatured($featured)
+ {
+ $this->featured = (bool)$featured;
+ return $this;
+ }
+
+ /**
+ * Handles the saving of the object to the database
+ *
+ * If the object has an id field set then update the record or else
+ * create a new one
+ *
+ * @param PDO $dbh Database Connection
+ *
+ * @return void
+ */
+ public function save(PDO $dbh)
+ {
+ if ($this->getId()) {
+ $this->_update($dbh);
+ } else {
+ $this->_insert($dbh);
+ }
+ }
+
+ /**
+ * Create an array of the class fields
+ *
+ * @return array
+ */
+ public function getClassAsArray()
+ {
+ $data = array();
+ $classData = get_class_vars(get_class($this));
+ foreach ($classData as $fieldName => $element) {
+ $getFunc = 'get' . ucfirst($fieldName);
+ $data[$fieldName] = $this->$getFunc();
+ }
+ return $data;
+ }
+
+ /**
+ * Get the max position for the videos
+ *
+ * @staticvar int $maxPos position of the video
+ * @return int
+ */
+ public function getMaxPos()
+ {
+ static $maxPos;
+ if (!$maxPos) {
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ SELECT count(id) as maxpos
+ FROM videos";
+ $ret = $dbh->query($sql);
+ $maxPos = $ret->fetchColumn();
+ }
+ return (int)$maxPos;
+ }
+
+ /**
+ * Create the youtube url
+ *
+ * Using preg_match on two pattern to return the video url portion
+ * first is /v=(.*)$/ older style
+ * second is /youtu.be\/(.*)/
+ * These may need to be updated if youtube creates newer embed codes
+ *
+ * @return boolean
+ */
+ public function getVideoCode()
+ {
+ $pattern = '/v=(.*)$/';
+ $pattern2 = '/youtu.be\/(.*)/';
+ $vidUrl = $this->getVideo_url();
+ if (preg_match($pattern, $vidUrl, $match)) {
+ return $match[1];
+ } else if (preg_match($pattern2, $vidUrl, $match)) {
+ return $match[1];
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Using the youtube API get the video title for the embed url
+ *
+ * @return string
+ */
+ public function getVideoTitle()
+ {
+ $url = "http://gdata.youtube.com/feeds/api/videos/". $this->getVideoCode();
+ $ch = curl_init();
+ $curlOptions = array(
+ CURLOPT_URL => $url,
+ CURLOPT_HEADER => 0,
+ CURLOPT_RETURNTRANSFER => 1
+ );
+ curl_setopt_array($ch, $curlOptions);
+
+ $response = curl_exec($ch);
+ curl_close($ch);
+ $doc = new DOMDocument;
+ $doc->loadXML($response);
+ $title = $doc->getElementsByTagName("title")->item(0)->nodeValue;
+ return $title;
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * Video.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Toolkit_Videos_Video
+ *
+ * Object Mapper pattern class for the Video PDO Table. Creates
+ * Toolkit_Video_Video objects by values or by id
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2008 Gaslight media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_Videos_VideoMapper
+{
+
+ /**
+ * Class Constructor
+ *
+ * @param PDO $pdo Database Connection
+ */
+ function __construct(PDO $pdo)
+ {
+ $this->dbh = $pdo;
+ }
+
+ /**
+ * Creates Video object by a given array of values
+ * values must be set with the Videos fields as keys
+ *
+ * @param array $values array of values
+ *
+ * @return Toolkit_Videos_Video
+ */
+ public function createByValues($values)
+ {
+ $video = new Toolkit_Videos_Video();
+ $video->setId($values['id'])
+ ->setVideo_url($values['video_url'])
+ ->setActive($values['active'])
+ ->setfeatured($values['featured'])
+ ->setPos($this->getMaxPos());
+ return $video;
+ }
+
+ public function getMaxPos()
+ {
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ SELECT count(id) as maxpos
+ FROM videos";
+ $ret = $dbh->query($sql);
+ $maxPos = $ret->fetchColumn();
+ if ((int) $maxPos == 0) {
+ $maxPos = 1;
+ }
+ return $maxPos;
+ }
+ /**
+ * Create Video object by a given id
+ * if the id is not found then it does not return
+ *
+ * @param int $id id for the video record
+ * @param array $returnArray Can return the array instead of object
+ *
+ * @return mixed
+ */
+ public function getVideoById($id, $returnArray = true)
+ {
+ try {
+ $sql = "
+ SELECT *
+ FROM videos
+ WHERE id = :id";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(
+ ':id', $id, PDO::PARAM_INT
+ );
+ $stmt->execute();
+ $res = $stmt->fetch(PDO::FETCH_ASSOC);
+ if ($res) {
+ $video = new Toolkit_Videos_Video();
+ $video->setId($res['id'])
+ ->setVideo_url($res['video_url'])
+ ->setActive($res['active'])
+ ->setfeatured($res['featured'])
+ ->setPos($res['pos']);
+ return ($returnArray)
+ ? $video->getClassAsArray()
+ : $video;
+ }
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * VideosDataGrid.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Toolkit_Videos_VideosDataGrid
+ *
+ * Handles the listing of the videos using the PEAR::Structures_DataGrid
+ * extended from our class Toolkit_DataGridBuilder
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2008 Gaslight media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_Videos_VideosDataGrid
+ extends Toolkit_DataGridBuilder
+{
+
+ /**
+ * Description for protected
+ * @var string
+ * @access protected
+ */
+ protected $noRecMessage = 'No Videos Found.';
+
+ protected $config;
+
+ /**
+ * Set the config
+ *
+ * @param Config_Container $config
+ */
+ public function setConfig(Config_Container $config)
+ {
+ $this->config = $config;
+ }
+
+ /**
+ * Configure the columns for the datagrid
+ *
+ * @param Config_Container $c PEAR::Config_Container object
+ *
+ * @return void
+ * @access protected
+ */
+ protected function configureColumns()
+ {
+ // get reference to [conf] section of config file
+ $appHasFeaturedVideos
+ = $this->config->getItem('section', 'conf')
+ ->getItem('directive', 'featuredVideos')
+ ->getContent();
+
+ $this->addColumn(
+ new Structures_DataGrid_Column(
+ 'Function',
+ null,
+ null,
+ array('class' => 'editLink'),
+ null,
+ array(&$this, 'renderEditLink')
+ )
+ );
+
+ $this->addColumn(
+ new Structures_DataGrid_Column(
+ 'Active',
+ null,
+ null,
+ null,
+ null,
+ array($this, 'renderActive')
+ )
+ );
+
+ if ($appHasFeaturedVideos) {
+ $this->addColumn(
+ new Structures_DataGrid_Column(
+ 'Featured',
+ null,
+ null,
+ null,
+ null,
+ array($this, 'renderFeatured')
+ )
+ );
+ }
+
+ $this->addColumn(
+ new Structures_DataGrid_Column(
+ 'Position',
+ null,
+ null,
+ null,
+ null,
+ array($this, 'renderPos')
+ )
+ );
+
+ $this->addColumn(
+ new Structures_DataGrid_Column(
+ 'Video Url',
+ 'video_url',
+ null
+ )
+ );
+
+ $this->addColumn(
+ new Structures_DataGrid_Column(
+ 'Thumbnail',
+ null,
+ null,
+ null,
+ null,
+ array($this, 'renderThumbNail')
+ )
+ );
+ }
+
+ /**
+ * Get the max position for the videos for generating a drop down for
+ * reordering them in the datagrid
+ *
+ * @staticvar type $maxPos
+ * @return int
+ */
+ public function getMaxPos()
+ {
+ static $maxPos;
+ if (!$maxPos) {
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ SELECT count(id) as maxpos
+ FROM videos";
+ $ret = $dbh->query($sql);
+ $row = $ret->fetch(PDO::FETCH_ASSOC);
+ if ((int)$row['maxpos'] == 0) {
+ $maxPos = 1;
+ } else {
+ $maxPos = $row['maxpos'];
+ }
+ }
+ return (int)$maxPos;
+ }
+
+ /**
+ * Render the edit link for a category
+ *
+ * @param array $data DB record
+ *
+ * @return mixed Link to edit a category
+ * @access public
+ */
+ public function renderEditLink($data)
+ {
+ extract($data['record']);
+ $link = '<a href="%sadmin/videos.php?page=editVideo&module=editVideo&id=%s">Edit</a>';
+ return sprintf($link, MEDIA_BASE_URL, $id);
+ }
+
+ /**
+ * Handles rendering the pos column
+ *
+ * @param type $data Data array
+ *
+ * @return string
+ */
+ public function renderPos($data)
+ {
+ extract($data['record']);
+ $html = '<select name="position" rel="'.$id.'" class="posSelect">';
+ $maxPos = $this->getMaxPos();
+ for ($i = 1; $i <= $maxPos; ++$i) {
+ $html .= '<option value="'.$i.'"';
+ if ($pos == $i) {
+ $html .= ' selected="selected"';
+ }
+ $html .= '>'.$i.'</option>';
+ }
+ $html .= '</select>';
+ return $html;
+ }
+
+ /**
+ * Handles rendering the thumbnail column
+ *
+ * @param type $data Data array
+ *
+ * @return string
+ */
+ public function renderThumbNail($data)
+ {
+ extract($data['record']);
+ $pattern = '/v=(.*)/';
+ $pattern2 = '/youtu.be\/(.*)/';
+ if (preg_match($pattern, $video_url, $match)) {
+ $vidCode = $match[1];
+ } else if (preg_match($pattern2, $video_url, $match)) {
+ $vidCode = $match[1];
+ }
+ $thumb = ($vidCode)
+ ? '<a href="http://www.youtube.com/embed/'.$vidCode.'?rel=0" class="colorbox"><img src="http://img.youtube.com/vi/'.$vidCode.'/default.jpg"></a>'
+ : '';
+ return $thumb;
+ }
+
+ /**
+ * Handles rendering the active column
+ *
+ * @param type $data Data array
+ *
+ * @return string
+ */
+ public function renderActive($data)
+ {
+ $active = $data['record']['active'];
+ $link = MEDIA_BASE_URL . 'video-active-toggle/'.$data['record']['id'].'/';
+ $ball
+ = ($active)
+ ? 'grnball.gif'
+ : 'redball.gif';
+ $html = sprintf(
+ '<a href="%s"><img border="0" src="%sToolkit/Toolbox/assets/%s"></a>',
+ $link,
+ MEDIA_BASE_URL,
+ $ball
+ );
+ return $html;
+ }
+
+ /**
+ * Handles rendering the featured column
+ *
+ * @param type $data Data array
+ *
+ * @return type
+ */
+ public function renderFeatured($data)
+ {
+ $featured = $data['record']['featured'];
+ $link = MEDIA_BASE_URL . 'video-featured-toggle/'.$data['record']['id'].'/';
+ $ball
+ = ($featured)
+ ? 'grnball.gif'
+ : 'redball.gif';
+ $html = sprintf(
+ '<a href="%s"><img border="0" src="%sToolkit/Toolbox/assets/%s"></a>',
+ $link,
+ MEDIA_BASE_URL,
+ $ball
+ );
+ return $html;
+ }
+
+ /**
+ * Handles setting the query for the datagrid
+ *
+ * @return void
+ */
+ public function setQuery()
+ {
+ $sql = "
+ SELECT *
+ FROM videos";
+
+ parent::setQuery($sql);
+ }
+
+ /**
+ * Handles creation of the HTML for the datagrid
+ *
+ * @return string
+ */
+ public function toHtml()
+ {
+ $GLOBALS['styleSheets'][]
+ = MEDIA_BASE_URL . 'Toolkit/Videos/styles.css';
+ $GLOBALS['styleSheets'][]
+ = MEDIA_APP_BASE_URL . 'gallery/colorbox/colorbox.css';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/plugins/colorbox/1.3.15/jquery.colorbox-min.js';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_BASE_URL . 'Toolkit/Videos/libjs/videos.js';
+ return parent::toHTML();
+ }
+
+}
--- /dev/null
+<?php
+
+/**
+ * WebDecorator.php
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+
+/**
+ * Toolkit_Videos_WebDecorator
+ *
+ * Handles the listing of the videos using the PEAR::Structures_DataGrid
+ * extended from our class Toolkit_DataGridBuilder
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2008 Gaslight media
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+class Toolkit_Videos_WebDecorator
+ implements Toolkit_Videos_IDecorator
+{
+
+ private $_flexyOptions = array();
+ private $_template = 'webDecorator.html';
+
+ /**
+ * Class Constructor
+ *
+ * @return void
+ */
+ public function __construct()
+ {
+ $this->setFlexyOptions();
+ }
+
+ /**
+ * Handles setting the flexyOptions
+ *
+ * @return void
+ */
+ public function setFlexyOptions()
+ {
+ $this->_flexyOptions = $GLOBALS['flexyOptions'];
+ $this->_flexyOptions['templateDir']
+ = BASE . 'Toolkit/Videos/templates';
+ $this->_flexyOptions['compileDir']
+ = BASE . 'Toolkit/Videos/templates/compiled';
+ }
+
+ /**
+ * Handles HTML output
+ *
+ * @param PDO $dbh Database Connection
+ * @param type $gateway Gateway object
+ *
+ * @return boolean
+ */
+ public function toHtml(
+ PDO $dbh,
+ $gateway = null
+ ) {
+ try {
+ $sql = "
+ SELECT id
+ FROM videos
+ WHERE featured = true
+ ORDER BY pos
+ LIMIT 1
+ OFFSET 0";
+ $row = $dbh->query($sql)->fetch(PDO::FETCH_ASSOC);
+ if ($row) {
+ $tpl = new HTML_Template_Flexy($this->_flexyOptions);
+ $page = new stdClass;
+ $page->videoUrl = Toolkit_Template_Page::getSeoUrl($gateway, 189);
+ $videoMapper
+ = new Toolkit_Videos_VideoMapper($dbh);
+ $video = $videoMapper->getVideoById($row['id'], false);
+ if ($video) {
+ $page->vCode = $video->getVideoCode();
+ $page->title = $video->getVideoTitle();
+ }
+
+ $tpl->compile($this->_template);
+ return $tpl->bufferedOutputObject($page);
+ } else {
+ return false;
+ }
+ } catch(PDOException $e) {
+ Toolkit_Common::handle_error($e);
+ }
+ }
+
+}
--- /dev/null
+<?php
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+/**
+ * WebPageDecorator
+ *
+ * PHP version 5
+ *
+ * @category Category
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: Display.php,v 1.10 2010/07/04 23:55:12 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * WebPageDecorator
+ *
+ * Description of class
+ *
+ * @category Category
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @link <>
+ */
+class Toolkit_Videos_WebPageDecorator implements Toolkit_Videos_IDecorator
+{
+ private $_flexyOptions = array();
+ private $_template = 'webPageDecorator.html';
+ private $_perRow = 5;
+
+ public function __construct()
+ {
+ $this->setFlexyOptions();
+ }
+
+ public function setFlexyOptions()
+ {
+ $this->_flexyOptions = $GLOBALS['flexyOptions'];
+ $this->_flexyOptions['templateDir']
+ = BASE . 'Toolkit/Videos/templates';
+ $this->_flexyOptions['compileDir']
+ = BASE . 'Toolkit/Videos/templates/compiled';
+ }
+
+ public function toHtml(
+ PDO $dbh,
+ $gateway = null
+ ) {
+ $GLOBALS['styleSheets'][]
+ = MEDIA_APP_BASE_URL . 'gallery/colorbox/colorbox.css';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_APP_BASE_URL . 'libjs/plugins/colorbox/1.3.15/jquery.colorbox-min.js';
+ $GLOBALS['bottomScripts'][]
+ = MEDIA_BASE_URL . 'Toolkit/Videos/libjs/videos.js';
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ SELECT id
+ FROM videos
+ WHERE active = true
+ ORDER BY pos";
+ $stmt = $dbh->query($sql);
+ $page = new stdClass;
+ $page->videos = array();
+ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+ $videoMapper
+ = new Toolkit_Videos_VideoMapper($dbh);
+ $video = $videoMapper->getVideoById($row['id'], false);
+ if ($video) {
+ $page->videos[] = array(
+ 'title' => $video->getVideoTitle(),
+ 'code' => $video->getVideoCode()
+ );
+ }
+ }
+ $count = 1;
+ $trueCount = 1;
+ $num = count($page->videos);
+ foreach ($page->videos as &$row) {
+ $row['firstInRow'] = ($count == 1);
+ if ($count == $this->_perRow || $trueCount == $num) {
+ $row['lastInRow'] = true;
+ $count = 0;
+ } else {
+ $row['lastInRow'] = false;
+ }
+ ++$count;
+ ++$trueCount;
+ }
+ $tpl = new HTML_Template_Flexy($this->_flexyOptions);
+ $tpl->compile($this->_template);
+ return $out . $tpl->bufferedOutputObject($page);
+ }
+}
--- /dev/null
+[conf]
+applicationName = "Videos"
+featuredVideos = Off
+
+[listing type]
+singular = "Video"
+plural = "Videos"
--- /dev/null
+var GLMColorBox = {
+ init: function() {
+ $('a.colorbox').colorbox({iframe: true, innerWidth:425, innerHeight:344});
+ $('select.posSelect').each(function () {
+ $(this).change(function(){
+ var id = $(this).attr('rel');
+ var newpos = $(this).attr('value');
+ window.location.href = '../video-move/' + id + '/' + newpos + '/';
+ });
+ });
+ }
+};
+
+$(document).ready(GLMColorBox.init);
--- /dev/null
+<?php
+
+/**
+ * VideosDataGrid.php
+ *
+ * Handles moving the video positions
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+if (!isset($_GET['kpass'])) {
+ die();
+}
+require_once '../../setup.phtml';
+
+$dbh = Toolkit_Database::getInstance();
+$newpos = $_REQUEST['newpos'];
+$id = $_REQUEST['id'];
+$error = false;
+try {
+ $dbh->beginTransaction();
+ $sql = "
+ SELECT pos
+ FROM videos
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(
+ ":id", $_REQUEST['id'], PDO::PARAM_INT
+ );
+ $stmt->execute();
+ $oldpos = $stmt->fetchColumn();
+ if ($oldpos < $newpos) {
+ $sql = "
+ UPDATE videos
+ SET pos = pos - 1
+ WHERE pos BETWEEN :oldpos AND :newpos";
+ $updateStmt = $dbh->prepare($sql);
+ } else if ($oldpos > $newpos) {
+ $sql = "
+ UPDATE videos
+ SET pos = pos + 1
+ WHERE pos BETWEEN :newpos AND :oldpos";
+ $updateStmt = $dbh->prepare($sql);
+ } else {
+ $error = true;
+ }
+
+ if (!$error) {
+ $updateStmt->bindParam(
+ ':newpos', $newpos, PDO::PARAM_INT
+ );
+ $updateStmt->bindParam(
+ ':oldpos', $oldpos, PDO::PARAM_INT
+ );
+ $updateStmt->execute();
+ // now change the real video to its position
+ $sql = "
+ UPDATE videos
+ SET pos = :pos
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(
+ ':pos', $newpos, PDO::PARAM_INT
+ );
+ $stmt->bindParam(
+ ':id', $id, PDO::PARAM_INT
+ );
+ $stmt->execute();
+ }
+ $dbh->commit();
+} catch (PDOException $e) {
+ $dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+}
+
+header('Location: '.MEDIA_BASE_URL.'admin/videos.php');
--- /dev/null
+#form-warning-top {
+ color: #FF0000;
+ font-size: 14px;
+ font-weight: bold;
+ margin-bottom: 0.5em;
+ margin-top: 1em;
+}
+.required, .req {
+ color: #FF0000;
+}
+.group {
+ display: -moz-inline-box;
+ width: 100%;
+}
+.group td {
+ width: 324px;
+}
+.requiredNote {
+ text-align: center;
+}
+#contact {
+ margin: 10px;
+}
+#contact table {
+ background-color: #FFFFFF;
+ border: 1px solid #EEEEEE;
+ border-collapse: collapse;
+}
+#contact td {
+ border: 1px solid #EEEEEE;
+ border-collapse: collapse;
+ color: #000000;
+ font-family: arial, helvetica, sans-serif;
+ padding: 3px;
+ font-size: 12px;
+}
+.labelcell {
+ background-color: transparent;
+ padding-right: 10px;
+ padding-top: 3px;
+ text-align: right;
+ white-space: nowrap;
+ width: 140px;
+}
+.fieldcell {
+ padding-left: 4px;
+ width: 320px;
+}
+.fieldcell .text {
+ width: 90%;
+}
+#contact table.group {
+ font-size: 10px;
+ border: none;
+ padding-top: 4px;
+}
+#contact table.group td {
+ border: none;
+}
+#contact .hdr {
+ background-color: #999999;
+ border: 1px solid #666666;
+ font-weight: bold;
+}
+.paging {
+ text-align: center;
+ background-color: #F6F6F6;
+ border-color: #E86a10;
+ border-color: #296DC0;
+ border-style: solid;
+ border-width: 1px 0;
+ margin: 1.0em 0;
+ padding: 8px 0;
+ text-align: center;
+ width: 100%;
+ font-size: 12px;
+
+}
+.paging b {
+ border: 1px solid #b22c2c;
+ border: 1px solid #E86A10;
+ background: #FFF;
+ padding: 5px 7px;
+ margin: 0 5px;
+}
+.paging a {
+ background: #FFF;
+ border: 1px solid #CCC;
+ padding: 5px 7px;
+ text-decoration: none;
+ font-family: helvetica, times;
+ color: #000;
+ margin: 0 5px;
+}
+.paging a:hover {
+ border: 1px solid #999;
+ border: 1px solid #b22c2c;
+ border: 1px solid #E86A10;
+}
+#dataGrid {
+ margin: 10px auto;
+ border: 1px solid #296DC0;
+ width: 100%;
+ border-collapse: collapse;
+}
+#dataGrid thead th {
+ background: #296DC0;
+ border: 1px solid #1b4880;
+ color: #000;
+ font-weight: normal;
+}
+#dataGrid th a {
+ font-weight: bolder;
+ color: #000;
+ text-decoration: none;
+}
+#dataGrid th a:hover {
+ color: #E86A10;
+ text-decoration: underline;
+}
+#dataGrid tr {
+ border: 1px solid #296DC0;
+ border-collapse: collapse;
+}
+#dataGrid tbody tr td {
+ padding: 5px;
+}
+#dataGrid .editLink, #dataGrid .delLink,
+#dataGrid .mailLink, #dataGrid .dateLink,
+#dataGrid .posLink {
+ text-align: center;
+}
+img.status {
+ border: none;
+}
+.even {
+ background-color: #D9D9D9;
+}
+#gridSorter {
+ margin: 0 auto;
+ padding: 10px;
+ text-align: center;
+ border: 1px solid #296DC0;
+}
+#gridSorter table {
+ border: none;
+}
+#gridSorter td {
+ border: none;
+}
+.fieldcell textarea {
+ width: 90%;
+ height: 70px;
+}
--- /dev/null
+<div id="v" class="hBox">
+ <h2>Check out our Video Spotlight</h2>
+ <h3>{title:h}</h3>
+ <a href="http://www.youtube.com/embed/{vCode}?rel=0&hd=1" class="colorbox">
+ <img src="http://img.youtube.com/vi/{vCode}/0.jpg" width="400">
+ <img src="assets/videoOverlay.png" width="400" id="videoOverlay">
+ </a>
+ <p>
+ <a href="{videoUrl}">See All Our Videos</a>
+ </p>
+</div>
--- /dev/null
+<div id="videoGallery">
+ {foreach:videos,v}
+ {if:v[firstInRow]}<div class="vRow">{end:}
+ <div class="vThumb">
+ <a href="http://www.youtube.com/embed/{v[code]}?rel=0&hd=1" class="colorbox">
+ <img src="http://img.youtube.com/vi/{v[code]}/default.jpg">
+ </a>
+ <div class="vTitle">
+ {v[title]:h}
+ </div>
+ </div>
+ {if:v[lastInRow]}</div><!-- /.galleryRow --> {end:}
+ {end:}
+</div>
--- /dev/null
+<?php
+
+/**
+ * VideosDataGrid.php
+ *
+ * Handles switching the active flag for the video
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+if (!isset($_GET['kpass'])) {
+ die();
+}
+require_once '../../setup.phtml';
+
+$dbh = Toolkit_Database::getInstance();
+$id = $_REQUEST['id'];
+
+try {
+ $dbh->beginTransaction();
+ $sql = "
+ SELECT active
+ FROM videos
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(
+ ":id",
+ $_REQUEST['id'],
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+ $activeState = $stmt->fetchColumn();
+
+ if ($activeState) {
+ $sql = "
+ UPDATE videos
+ SET active = false
+ WHERE id = :id";
+ $updateStmt = $dbh->prepare($sql);
+ } else {
+ $sql = "
+ UPDATE videos
+ SET active = true
+ WHERE id = :id";
+ $updateStmt = $dbh->prepare($sql);
+ }
+
+ $updateStmt->bindParam(
+ ':id',
+ $id,
+ PDO::PARAM_INT
+ );
+ $updateStmt->execute();
+ $dbh->commit();
+} catch (PDOException $e) {
+ $dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+}
+
+header('Location: '.MEDIA_BASE_URL.'admin/videos.php');
--- /dev/null
+<?php
+
+/**
+ * VideosDataGrid.php
+ *
+ * Handles switching the featured flag for the video
+ *
+ * PHP version 5
+ *
+ * @category Toolkit
+ * @package Videos
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @link http://demo.gaslightmedia.com
+ */
+if (!isset($_GET['kpass'])) {
+ die();
+}
+require_once '../../setup.phtml';
+
+$dbh = Toolkit_Database::getInstance();
+$id = $_REQUEST['id'];
+
+try {
+ $dbh->beginTransaction();
+ $sql = "
+ SELECT featured
+ FROM videos
+ WHERE id = :id";
+ $stmt = $dbh->prepare($sql);
+ $stmt->bindParam(
+ ":id",
+ $_REQUEST['id'],
+ PDO::PARAM_INT
+ );
+ $stmt->execute();
+ $featuredState = $stmt->fetchColumn();
+
+ if ($featuredState) {
+ $sql = "
+ UPDATE videos
+ SET featured = false
+ WHERE id = :id";
+ $updateStmt = $dbh->prepare($sql);
+ } else {
+ $sql = "
+ UPDATE videos
+ SET featured = true
+ WHERE id = :id";
+ $updateStmt = $dbh->prepare($sql);
+ }
+
+ $updateStmt->bindParam(
+ ':id',
+ $id,
+ PDO::PARAM_INT
+ );
+ $updateStmt->execute();
+ $dbh->commit();
+} catch (PDOException $e) {
+ $dbh->rollback();
+ Toolkit_Logger::logException('DB Error', $e);
+}
+
+header('Location: '.MEDIA_BASE_URL.'admin/videos.php');
--- /dev/null
+<?php
+/**
+ * HTML_QuickForm_CAPTCHA example - Image generator
+ *
+ * PHP versions 4 and 5
+ *
+ * @category HTML
+ * @package HTML_QuickForm_CAPTCHA
+ * @subpackage Examples
+ * @author Philippe Jausions <Philippe.Jausions@11abacus.com>
+ * @copyright 2006-2008 by Philippe Jausions / 11abacus
+ * @license http://www.opensource.org/licenses/bsd-license.php New BSD
+ * @version CVS: $Id: qfcaptcha.php,v 1.2 2009/10/01 16:00:02 jamie Exp $
+ * @filesource
+ * @link http://pear.php.net/package/HTML_QuickForm_CAPTCHA
+ * @see qfcaptcha_form_image.php
+ * @see qfcaptcha_form_random.php
+ */
+
+// Require the class before opening the session
+// so the instance unserialize properly
+require_once '../setup.phtml';
+require_once 'Text/CAPTCHA.php';
+require_once 'Text/CAPTCHA/Driver/Image.php';
+
+HTTP_Session2::useCookies(false);
+HTTP_Session2::start();
+
+header('Content-Type: image/jpeg');
+
+$sessionVar = (empty($_REQUEST['var']))
+ ? '_HTML_QuickForm_CAPTCHA'
+ : $_REQUEST['var'];
+
+// Force a new CAPTCHA for each one displayed
+$_SESSION[$sessionVar]->setPhrase();
+
+echo $_SESSION[$sessionVar]->getCAPTCHAAsJPEG();
+?>
--- /dev/null
+RewriteEngine Off
--- /dev/null
+<?php
+
+/**
+ * contact_inquiry.phtml
+ *
+ * Groups are now added to the contact inquiry types. Groups is a
+ * required field.
+ *
+ * PHP versions 4 and 5
+ *
+ * @category Toolkit
+ * @package Contacts
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: contact_inquiry.phtml,v 1.3 2009/07/24 14:27:45 matrix Exp $
+ * @link http://pear.php.net/package/Contacts
+ * @see References to other sections (if any)...
+ */
+
+/**
+ * base setup file for all apps
+ */
+require_once '../../setup.phtml';
+
+/**
+ * base setup for contact admin section
+ */
+require_once "contact_setup.inc";
+GLM_TOOLBOX::top('Contact Inquiries', '');
+// Adjust the nav for this page, add the Edit Groups page.
+if (is_array($nav) && array_key_exists('Contact Inquiry Fields', $nav)) {
+ $tmp = array('Inquiry Groups' => 'list_groups.php');
+ array_insert($nav, 'Contact Inquiry Fields', $tmp);
+}
+GLM_TOOLBOX::html_nav_table($nav, $navWidth);
+$qs = "
+ SELECT id, header, groupid, pos
+ FROM contact_inq
+ ORDER BY groupid, pos;";
+$result = $DB->db_exec($qs);
+$query = "
+ SELECT id, name
+ FROM inq_group
+ ORDER BY name;";
+if ($groupData = $DB->db_auto_get_data($query)) {
+ foreach ($groupData as $groupRow) {
+ $gRow[$groupRow['id']] = $groupRow['name'];
+ }
+}
+?>
+<table id="admin-list-table">
+ <tr>
+ <th colspan="4">
+ <form action="edit_inquiry.phtml" method="POST" name="edit_inquiry">
+ <input type="submit" name="Command" value="Add Item" />
+ </form>
+ </th>
+ </tr>
+ <tr>
+ <th>Options:</th>
+ <th>Pos:</th>
+ <th>Group:</th>
+ <th>Inquiry Name:</th>
+ </tr>
+<?php
+$num = $DB->db_numrows($result);
+if ($num > 0) {
+ for ($i = 0; $i < $num; $i++) {
+ $data = $DB->db_fetch_array($result, $i, PGSQL_ASSOC);
+ if ($data['groupid'] != $oldgroup && isset($oldgroup)) {
+ echo '<tr><td colspan="4"> </td></tr>';
+ }
+ ?>
+ <tr>
+ <td nowrap>
+ <a href="edit_inquiry.phtml?id=<?php echo $data['id'];?>&Command=Edit">[Edit / Delete]</a>
+ </td>
+ <td>
+ <?php
+ $qs = "
+ SELECT COUNT(id) AS maxpos
+ FROM contact_inq
+ WHERE groupid = ".$data['groupid'];
+
+ $maxresult = $DB->db_exec($qs);
+ $max_data = $DB->db_fetch_array($maxresult, 0, PGSQL_ASSOC);
+ $maxpos = $max_data['maxpos'];
+ $pos = '<select style="font-size: 10pt;" name="pos"
+ onChange="location.href=this[this.selectedIndex].value;"
+ size="1">';
+ for ($newpos = 1; $newpos <= $maxpos; $newpos++) {
+ $string = 'Command=Move&groupid='.$data['groupid'].'&id='.$data['id']."&newpos=$newpos";
+ $pos .= "<option value=\"update_inquiry.phtml?$string\"";
+ if ($newpos == $data['pos']) {
+ $pos .= ' selected';
+ }
+ $pos .= ">$newpos</option>";
+ }
+ $pos .= '</select>';
+ echo $pos;
+ ?>
+ </td>
+ <td nowrap>
+ <?php echo $gRow[$data['groupid']];?>
+ </td>
+ <td align="left">
+ <?php echo $data['header'];?>
+ </td>
+ </tr>
+ <?php
+ $oldgroup = $data['groupid'];
+ }
+} else {
+ ?>
+ <tr>
+ <th colspan="2">Nothing in the database yet</th>
+ </tr>
+ <?php
+}
+?>
+</table>
+<?php
+GLM_TOOLBOX::footer();
+?>
--- /dev/null
+<?php
+
+/**
+* contact_setup.phtml
+*
+* Config setting for the admin contact application
+*
+* PHP versions 4 and 5
+*
+* @category Toolkit
+* @package Contacts
+* @author Steve Sutton <steve@gaslightmedia.com>
+* @copyright 2009 Steve Sutton
+* @license Gaslight Media
+* @version CVS: $Id: contact_setup.inc,v 1.7 2010/05/13 17:05:53 matrix Exp $
+* @link <>
+*/
+extract($_REQUEST);
+// The Contact Type array is now is one location and is used by the
+// Toolkit_Contacts_Admin_EditContact class
+$conf = new Config;
+$contactRoot =& $conf->parseConfig(
+ BASE . 'Toolkit/Contacts/config.ini',
+ 'IniFile'
+);
+if (!defined("ENTRIES_PER_PAGE")) {
+
+ /**
+ * how many per page on list contacts
+ */
+ define("ENTRIES_PER_PAGE", 10); // Entries per Page in list_contact.phtml
+}
+
+/**
+* define for customer table
+*/
+define("CUSTOMER_TABLE", "customer"); // name of customer table
+
+/**
+* define for contact table
+*/
+define("CONTACT_TABLE", "contact"); // name of contact table
+
+$table = $contactRoot->getItem('section', 'conf')
+ ->getItem('directive', 'table')
+ ->getContent();
+/**
+* Table to user in db
+*/
+define("TABLE", $table); // which table to use
+
+/**
+* postgres date formate
+*/
+define("DATEFORMAT", "US"); // date format (for edit_contact.phmtl)
+
+/**
+* template for the newsletter
+*/
+define("NEWSLETTER_PROTOTYPE", "newsletter_template.html"); // date format (for edit_contact.phmtl)
+
+/**
+* class_template needed for GLM_TEMPLATE::get_seo_url()
+*/
+require_once BASE.'classes/class_template.inc';
+$DB = new GLM_DB();
+if (!defined("HTML_EMAIL")) {
+
+ /**
+ * HTML_EMAIL = ON or OFF
+ */
+ define("HTML_EMAIL", "ON");
+}
+if (!defined("PRODUCTION_MODE")) {
+
+ /**
+ * PRODUCTION_MODE off/on mail sent
+ */
+ define("PRODUCTION_MODE", "ON");
+}
+if (!defined("NEWSLETTER")) {
+
+ /**
+ * NEWSLETTER 1 or true will allow newsletters
+ */
+ define("NEWSLETTER", 1); //bool- does the contact database mail out a newsletter?
+}
+
+if (!function_exists("template_read")) {
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $template Parameter description (if any) ...
+ *
+ * @return string Return description (if any) ...
+ */
+ function template_read($template)
+ {
+ $fp = fopen($template, "r");
+ $contents = fread($fp, filesize($template));
+ fclose($fp);
+ if ($contents) {
+ return $contents;
+ } else {
+ return "";
+ }
+ }
+}
+// {{{ array_insert()
+
+
+/**
+* insert an array into another array after position.
+* You can specify an associative array key or index key
+* to dictact the positioning of the new array
+*
+* @param array &$array array to be used
+* @param unknown $position position to add array
+* @param unknown $insert_array array to be inserted
+*
+* @return void
+*/
+function array_insert(&$array, $position, $insert_array)
+{
+ if (!is_int($position)) {
+ $i = 0;
+ foreach ($array as $key => $value) {
+ if ($key == $position) {
+ $position = ++$i;
+ break;
+ }
+ ++$i;
+ }
+ }
+ $first_array = array_splice($array, 0, $position);
+ $array = array_merge($first_array, $insert_array, $array);
+}
+// }}}
+// {{{ explode_template()
+if (!function_exists("explode_template")) {
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $template Parameter description (if any) ...
+ * @param unknown $data Parameter description (if any) ...
+ *
+ * @return unknown Return description (if any) ...
+ */
+ function explode_template($template, $data)
+ {
+ $template = template_read($template);
+ $output = template_replacement($template, $data);
+ $output = wordwrap($output, 72);
+ return $output;
+
+ }
+}
+// }}}
+// {{{ template_replacement($template, $fieldarr)
+if (!function_exists("template_replacement")) {
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $template Parameter description (if any) ...
+ * @param array $fieldarr Parameter description (if any) ...
+ *
+ * @return unknown Return description (if any) ...
+ */
+ function template_replacement($template, $fieldarr)
+ {
+ if (is_array($fieldarr)) {
+ foreach ($fieldarr as $key => $value) {
+ $template = str_replace("<!-- ".$key." -->", $value, $template);
+ }
+ }
+ return $template;
+ }
+}
+// }}}
+// {{{ add_image($image, $align)
+if (!function_exists("add_image")) {
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param string $image Parameter description (if any) ...
+ * @param string $align Parameter description (if any) ...
+ *
+ * @return string Return description (if any) ...
+ */
+ function add_image($image, $align)
+ {
+ if ($image != "") {
+ return '<div style="margin:5px;float:'.$align.';"><img src="'.MIDSIZED.$image.'"></div>';
+ }
+ }
+}
+// }}}
+// {{{ Navigation array
+$nav = array(
+ "Report Builder" => "index.phtml",
+ "Add Contact" => "edit_contact.php",
+ "List Contacts" => "list_contact.phtml",
+ "Contact Inquiry Fields" => "contact_inquiry.phtml",
+ "HTML Emails" => "emails.php",
+ "Saved Reports" => "list_query.phtml",
+);
+// }}}
+$navWidth = 7;
+$query = "select * from contact_inq order by pos;";
+$cData = $DB->db_auto_get_data($query);
+if (is_array($cData)) {
+ foreach ($cData as $key => $value) {
+ $int_array[$value['id']] = $value['header'];
+ }
+}
+$contactTypesSetup =
+ $contactRoot->getItem('section', 'contact_types')
+ ->toArray();
+$cType = $contactTypesSetup['contact_types'];
+// {{{ search_where($name, $search_where)
+
+/**
+* Short description for function
+*
+* Long description (if any) ...
+*
+* @param string $name Parameter description (if any) ...
+* @param string $search_where Parameter description (if any) ...
+*
+* @return string Return description (if any) ...
+*/
+function search_where($name, $search_where)
+{
+ $out = '
+ <select name="'.$name.'">
+ <option value="1" '.( ( !isset( $search_type ) || $search_type == "0" ) ? 'selected' : '' ).'>Anywhere
+ <option value="2" '.( ( $search_where == '1' ) ? 'selected' : '' ).'>Begining
+ <option value="3" '.( ( $search_where == '2' ) ? 'selected' : '' ).'>Ending
+ </select>';
+ return $out;
+}
+// }}}
+// {{{ search_type($name, $search_type)
+
+/**
+* Short description for function
+*
+* Long description (if any) ...
+*
+* @param string $name Parameter description (if any) ...
+* @param string $search_type Parameter description (if any) ...
+*
+* @return string Return description (if any) ...
+*/
+function search_type($name, $search_type)
+{
+ $out = '
+ <select name="'.$name.'">
+ <option value="2" '.( ( !isset( $search_type ) || $search_type == '2' ) ? 'selected' : '' ).'>And
+ <option value="3" '.( ( $search_type == '3' ) ? 'selected' : '' ).'>Or
+ <option value="4" '.( ( $search_type == '4' ) ? 'selected' : '' ).'>Not
+ </select>';
+ return $out;
+}
+// }}}
+// {{{ search_bool($name, $search_type)
+
+/**
+* Short description for function
+*
+* Long description (if any) ...
+*
+* @param string $name Parameter description (if any) ...
+* @param string $search_type Parameter description (if any) ...
+*
+* @return string Return description (if any) ...
+*/
+function search_bool($name, $search_type)
+{
+ $out = '
+ <select name="'.$name.'">
+ <option value="n" '.( !isset( $search_type ) ? 'selected' : '' ).'>Don\'t Care
+ <option value="1" '.( ( $search_type == '1' ) ? 'selected' : '' ).'>Yes
+ <option value="0" '.( ( $search_type == '0' ) ? 'selected' : '' ).'>No
+ </select>';
+ return( $out );
+}
+// }}}
+// {{{ interest($field)
+
+/**
+* Short description for function
+*
+* Long description (if any) ...
+*
+* @param unknown $field Parameter description (if any) ...
+*
+* @return boolean Return description (if any) ...
+*/
+function interest($field)
+{
+ if (!is_array($GLOBALS['int_array'])) {
+ return false;
+ }
+ echo "<table><tr>";
+ $count = 0;
+ foreach ($GLOBALS['int_array'] as $key => $value) {
+ if ($count==0) {
+ echo "<td>";
+ }
+ echo "<input type=\"checkbox\" name=\"interest[]\" value=\"$key\"";
+ if (strstr($field, ":".$key.":")) {
+ echo " checked";
+ }
+ echo ">$value<br>";
+ if ($count==5) {
+ echo "</td><td>";
+ }
+ if ($count==11) {
+ echo "</td>";
+ }
+ $count++;
+ }
+ echo "</tr></table>";
+}
+/**
+* Get a group of select elements to represent a date
+*
+* @param string $M Name attribute of the month select list
+* @param string $D Name attribute of the day select list
+* @param string $Y Name attribute of the year select list
+* @param string $m Selected value of the month select list
+* @param string $d Selected value of the day select list
+* @param string $y Selected value of the year select list
+*
+* @return string Html string of group select lists
+* @access public
+*/
+function dateSelector($M, $D, $Y, array $m = null, array $d = null, array $y = null)
+{
+ // Get a Select element
+ $month = new HTML_Select($M);
+ // Get a Range of months jan-dec
+ $monthArray = array_flip(range(1, 12));
+ // Make the keys and values the same
+ foreach ($monthArray as $i => &$j) {
+ $j = $i;
+ }
+ $month->loadArray($monthArray);
+ if (is_null($m)) {
+ $month->setSelectedValues(array(date('m')));
+ } else {
+ $month->setSelectedValues($m);
+ }
+
+ // Get a Select element
+ $day = new HTML_Select($D);
+ // Get a Range of months jan-dec
+ $dayArray = array_flip(range(1, 31));
+ // Make the keys and values the same
+ foreach ($dayArray as $i => &$j) {
+ $j = $i;
+ }
+ $day->loadArray($dayArray);
+ if (is_null($d)) {
+ $day->setSelectedValues(array(date('d')));
+ } else {
+ $day->setSelectedValues($d);
+ }
+
+ // Get a Select element
+ $year = new HTML_Select($Y);
+ // Get a Range of months jan-dec
+ $yearArray = array_flip(range(CONTACTS_FIRST_YEAR, date('Y')));
+ // Make the keys and values the same
+ foreach ($yearArray as $i => &$j) {
+ $j = $i;
+ }
+ $year->loadArray($yearArray);
+ if (is_null($y)) {
+ $year->setSelectedValues(array(date('Y')));
+ } else {
+ $year->setSelectedValues($y);
+ }
+
+ return $month->toHtml() . $day->toHtml() . $year->toHtml();
+}
+
+// }}}
+// default query on create_date
+$c_date_from = GLM_TOOLBOX::contact_date_entry("", "", "", "fc_month", "fc_day", "fc_year");
+$c_date_to = GLM_TOOLBOX::contact_date_entry("", "", "", "tc_month", "tc_day", "tc_year");
+
+// The Following $DB_fields array is no longer used for the edit contact page
+// You must alter the class Toolkit_Contacts_Admin_EditContact
+// The following is only used for the search form and the listing pages
+
+$primaryKey = $contactRoot->getItem('section', 'conf')
+ ->getItem('directive', 'primarykey')
+ ->getContent();
+/**
+* Description for define
+*/
+define("ID", $primaryKey);
+
+/**
+* Description for define
+*/
+define("MAILOK", "mail_ok");
+
+$sequence = $contactRoot->getItem('section', 'conf')
+ ->getItem('directive', 'sequence')
+ ->getContent();
+/**
+* Description for define
+*/
+define("SEQUENCE", $sequence);
+
+/**
+* Description for define
+*/
+define("WHERE", ID." IS NOT NULL");
+// $DB_fields are used for edit and updating contacts
+$DB_fields[] = array("name" => "id", "title" => "id", "type" => "hide");
+$DB_fields[] = array("name" => "create_date", "title" => "Create Date", "type" => "static");
+$DB_fields[] = array("name" => "fname", "title" => "First Name", "type" => "text");
+$DB_fields[] = array("name" => "lname", "title" => "Last Name", "type" => "text");
+if (TABLE == 'customer') {
+ $DB_fields[] = array("name" => "add1", "title" => "Address", "type" => "text");
+ $DB_fields[] = array("name" => "add2", "title" => "Address 2", "type" => "text");
+} else {
+ $DB_fields[] = array("name" => "company", "title" => "Company Name", "type" => "text");
+ $DB_fields[] = array("name" => "address", "title" => "Address", "type" => "text");
+ $DB_fields[] = array("name" => "address2", "title" => "Address 2", "type" => "text");
+}
+$DB_fields[] = array("name" => "city", "title" => "City", "type" => "text");
+$DB_fields[] = array("name" => "state", "title" => "State", "type" => "state");
+$DB_fields[] = array("name" => "zip", "title" => "Zip", "type" => "text");
+$DB_fields[] = array("name" => "phone", "title" => "Phone", "type" => "text");
+$DB_fields[] = array("name" => "fax", "title" => "Fax", "type" => "text");
+$DB_fields[] = array("name" => "email", "title" => "Email", "type" => "text");
+$DB_fields[] = array("name" => "mail_ok", "title" => "Mail Ok?", "type" => "radio");
+$DB_fields[] = array("name" => "interest", "title" => "Interest", "type" => "interest");
+$DB_fields[] = array("name" => "contact_type", "title" => "Contact Type", "type" => "drop", "drop" => $cType);
+
+// $fields are used for building the query page
+foreach ($DB_fields as $key=>$value) {
+ if ($value['type'] == "text" || $value['type'] == "state") {
+ $fields[$value['name']] = $value['title'];
+ } elseif ( $value['type'] == "radio") {
+ $boolean[$value['name']] = $value['title'];
+ } elseif ( $value['type'] == "drop") {
+ $dropdowns[$value['name']] = array('title' => $value['title'], 'drop' => $value['drop']);
+ }
+}
+
+$data['bailout'] .= "You are receiving this message because you have expressed an interest in ";
+$data['bailout'] .= "receiving specials and information from ".SITENAME.". If you do not ";
+$data['bailout'] .= "wish to receive future items of this nature, please reply to this e-mail ";
+$data['bailout'] .= "with the word \"CANCEL\" on the subject line. You will then be removed ";
+$data['bailout'] .= "from future mailings.<br>";
+$data['bailout'] .= "<a href=\"mailto:".OWNER_EMAIL."?subject=CANCEL\">".OWNER_EMAIL."</a><br>";
+?>
--- /dev/null
+<?php
+//$Id: del_query.phtml,v 1.2 2009/05/20 20:27:27 matrix Exp $
+include "../../setup.phtml";
+include "contact_setup.inc";
+
+$qs = "DELETE
+ FROM query_db
+ WHERE id = $id";
+
+if(!$DB->db_auto_exec($qs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.$qs,1);
+}
+GLM_TOOLBOX::html_header("Admin","Deleted","");
+?>
+<script lang="javascript">
+document.onload=window.opener.location.reload(1);
+</script>
+Query <?php echo $id?> is Deleted
+<center><a href="" onClick="window.close();return(false);">Close This
+Window</a></center>
--- /dev/null
+<?php
+
+/**
+ * download.phtml
+ *
+ * gives admin user ability to download a csv file for import into
+ * another source. Forces the save as dialog box.
+ * tested on ie6 ie7 and firefox. $query_string is passed through to
+ * this page by a form.
+ *
+ * PHP versions 4 and 5
+ *
+ * @category Toolkit
+ * @package PackageName
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: download.phtml,v 1.3 2009/08/05 15:15:00 matrix Exp $
+ * @link <>
+ */
+
+/**
+ * main site setup config file
+ */
+require_once "../../setup.phtml";
+
+/**
+ * main contact setup file
+ */
+require_once "contact_setup.inc";
+
+// check that the site sending this request is the same
+// as the base_url
+$base = str_replace("admin/Contact/list_contact.phtml",
+ "",
+ $_SERVER['HTTP_REFERER']
+);
+if ($base != MEDIA_BASE_URL) {
+ // redirect them
+ header("Location: index.phtml");
+}
+
+$delimiter = str_replace("comma", ",", $delimiter);
+$delimiter = str_replace("tab", "\t", $delimiter);
+$delimiter = str_replace("csv", ",", $delimiter);
+$delimiter = str_replace("pipe", "|", $delimiter);
+
+if ($_REQUEST['query_string']) {
+ /* Remove the old reports if they exsists */
+ if (is_file("report.csv")) {
+ unlink("report.csv");
+ }
+ if (is_file("report.tar.gz")) {
+ unlink("report.tar.gz");
+ }
+ if (is_file("report.zip")) {
+ unlink("report.zip");
+ }
+
+ if (!$fp = fopen("report.csv", "w")) {
+ html_error("Cant open report", 0);
+ }
+ $query_string = stripslashes($_REQUEST['query_string']);
+ $query_string = str_replace("SELECT " . ID . ",", "SELECT ", $query_string);
+ $query_string = str_replace(" FROM ",
+ ",contact_type,interest FROM ",
+ $query_string);
+
+ $dbh = Toolkit_Database::getInstance();
+
+ $res = $dbh->prepare($query_string);
+ $res->execute();
+ $total = $res->rowCount();
+ $headers =array();
+ $headerString = '';
+ if ($total > 0) {
+ for ($i = 0; $i < $total; ++$i) {
+ $result_string = "";
+ $row = $res->fetch(PDO::FETCH_ASSOC);
+ $cConTypes = array();
+ foreach ($row as $fieldName => $value) {
+ if ($i == 0) {
+ if (in_array($fieldName, array('contact_type', 'interest'))) {
+ switch ($fieldName) {
+ case 'contact_type' :
+ foreach ($cType as $contactTypeName) {
+ $headers[] = $contactTypeName;
+ }
+ break;
+ case 'interest' :
+ if ( is_array($int_array)
+ && !empty($int_array)
+ ) {
+ foreach ($int_array as $interesName) {
+ $headers[] = $interesName;
+ }
+ }
+ break;
+ }
+ } else {
+ $headers[] = $fieldName;
+ }
+ }
+ // this section creates the contact_type part of the rows
+ // need to make this one a set number of fields for the contact
+ // types needed for all contacts
+ // so create count($cType) number of columns for this one field
+ if ($fieldName == 'contact_type') {
+ $cConTypes = array();
+ $st = array();
+ if (strstr($value, ":")) {
+ $cConTypesStr = preg_replace("/^:|:$/",
+ "",
+ $value
+ );
+ $cConTypes = explode(":", $cConTypesStr);
+ }
+ if (is_array($cType) && !empty($cType)) {
+ foreach ($cType as $contactTypeId => $contactTypeName) {
+ $st[]
+ = ( is_array($cConTypes)
+ && in_array($contactTypeId, $cConTypes))
+ ? $contactTypeName
+ : '';
+ }
+ $result_string .= implode("|", $st);
+ }
+ $result_string .= '|';
+ }
+ // this section creates the interest part of the rows
+ // need to make this one a set number of fields for the contact
+ // types needed for all contacts
+ // so create count($int_array) number of columns for this one field
+ else if ($fieldName == 'interest') {
+ $iIntTypes = array();
+ $st = array();
+ if (strstr($value, ":")) {
+ $iIntTypesStr = preg_replace("/^:|:$/",
+ "",
+ $value);
+ $iIntTypes = explode(":", $iIntTypesStr);
+ }
+ if ( is_array($int_array)
+ && !empty($int_array)
+ ) {
+ foreach ($int_array as $interestId => $interestName) {
+ $st[]
+ = ( is_array($iIntTypes)
+ && in_array($interestId, $iIntTypes))
+ ? $interestName
+ : '';
+ }
+ $result_string .= implode("|", $st);
+ }
+ $result_string .= '|';
+ }
+ // this one deals with al the other fields
+ else if (!in_array($fieldName, array('contact_type', 'interest'))) {
+ $result_string .= $value.'|';
+ }
+ }
+ $result_string = substr($result_string, 0, strlen($result_string)-1);
+ if ($i == 0) {
+ if ($csv) {
+ $headerString = '"'.implode('","', $headers)."\"\n";
+ } else {
+ $headerString = implode($delimiter, $headers)."\n";
+ }
+ fputs($fp, $headerString, strlen($headerString));
+ }
+ if ($csv) {
+ $result_string = str_replace("|", "\",\"", $result_string);
+ $result_string = "\"".$result_string."\"\n";
+ } else {
+ $result_string = str_replace("|", $delimiter, $result_string);
+ $result_string = $result_string."\n";
+ }
+ fputs($fp, $result_string, strlen($result_string));
+ }
+ }
+ if (!fclose($fp)) {
+ html_error("Cant close filepointer", 0);
+ }
+ chmod("report.csv", 0660);
+ $output = "report.csv";
+
+ if ($file == "gz") {
+ $output = "report.tar.gz";
+ exec("tar -czvf report.tar.gz report.csv 2>&1", $result_array, $result);
+ if ($result != 0) {
+ echo $result_array[0];
+ exit;
+ }
+ chmod("report.tar.gz", 0660);
+ }
+
+ if ($file == "zip") {
+ $output = "report.zip";
+ exec("zip report report.csv 2>&1", $result_array, $result);
+ if ($result != 0) {
+ echo $result_array[0];
+ exit;
+ }
+ chmod("report.zip", 0660);
+ }
+ if ($file == "rpt") {
+ $output = "report.csv";
+ chmod("report.csv", 0660);
+ }
+ if (ini_get('zlib.output_compression')) {
+ ini_set('zlib.output_compression', 'Off');
+ }
+ header("Content-Type: application/force-download\n");
+ /* Correction for the stupid MSIE thing */
+ if (strstr(getenv('HTTP_USER_AGENT'), 'MSIE')) {
+ header("Content-Disposition: inline; filename=\"$output\"");
+ } else {
+ header("Content-Disposition: attachment; filename=\"$output\"");
+ }
+ //header("Location: $output");
+ $fn = fopen($output, "r");
+ fpassthru($fn);
+ @fclose($fn);
+ exit();
+} else {
+ header("Location: list_contact.phtml");
+}
+?>
--- /dev/null
+<?php
+//$Id: edit_autoresponse.phtml,v 1.12 2010/08/11 18:16:41 matrix Exp $
+include "../../setup.phtml";
+include "contact_setup.inc";
+GLM_TOOLBOX::top("AutoReponse for Newsletter", HELP_BASE."response.phtml?key=edit+section");
+
+GLM_TOOLBOX::html_nav_table($nav, $navWidth);
+
+if ($id) {
+ $qs = "SELECT id,subject,response
+ FROM news_response
+ WHERE id = $id";
+
+ if (!$res = $DB->db_exec($qs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.__LINE__, 1);
+ }
+ $row = $DB->db_fetch_array($res,0, PGSQL_ASSOC);
+} else {
+ $row['subject'] = '';
+ $row['response'] = '';
+}
+?>
+<script src=<?php echo MEDIA_BASE_URL."admin/verify.js";?>></script>
+<script type="text/javascript" src="<?php echo CKEDITOR_JS;?>"></script>
+<script language="javascript">
+<!--// closed source
+function mySubmit(o){
+ o.response.optional = true;
+ o.response.r = 'Description';
+ o.subject.optional = false;
+ o.subject.r = 'Subject';
+ return(verify(o))
+}
+var Newsletter =
+{
+ init: function()
+ {
+ if ($('#response').length) {
+ // Only try to replace the textarea if the
+ // CKEditor is compatible w/ the browser.
+ if (CKEDITOR.env.isCompatible) {
+ CKEDITOR.replace('response',
+ {
+ toolbar : 'Default',
+ width : 570,
+ height : 400,
+ filebrowserImageBrowseUrl : '../../Toolkit/CKImages/browser.php?folder=1',
+ filebrowserImageUploadUrl : '../../Toolkit/CKImages/controller.php?command=Upload',
+ filebrowserImageWindowWidth : '760',
+ filebrowserImageWindowHeight : '500'
+ });
+ }
+ }
+ }
+};
+
+$(document).ready(Newsletter.init);
+
+//-->
+</script>
+<form id="form1" name="form1" enctype="multipart/form-data" action="update_autoresponse.phtml" method="POST">
+<table id="admin-edit-table">
+<?
+foreach ($row as $key => $value) {
+ switch ($key) {
+
+ case "id":
+ echo "<input type=\"hidden\" name=\"id\" value=\"$value\">";
+ break;
+
+ case "subject":
+ echo "<tr><td class=\"navtd\" align=\"right\">Subject:</td>";
+ GLM_TOOLBOX::text_box("subject", $value);
+ echo "</tr>";
+ break;
+
+ case "response":
+ echo "<tr><td class=\"navtd\" align=\"right\">Response:</td>";
+ echo '<td><textarea name="response" id="response" cols="60" rows="60">'.$value.'</textarea></td>';
+ echo "</tr>";
+ break;
+
+ default:
+ break;
+ }
+}
+echo '<tr><td></td><td nowrap="nowrap">';
+if ($id) {
+ ?>
+ <input type="submit" name="Command" value="Update">
+ <?php
+} else {
+ ?>
+ <input type="submit" name="Command" value="Insert">
+ <?php
+}
+echo '
+</td></tr>
+</table>
+</form>';
+GLM_TOOLBOX::footer();
+?>
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+include "contact_setup.inc";
+$form = new Toolkit_Contacts_Admin_EditContact(
+ Toolkit_Database::getInstance(),
+ 'edit_contact'
+);
+$form->setConfig($contactRoot);
+$form->setTableName(
+ $contactRoot->getItem('section', 'conf')
+ ->getItem('directive', 'table')
+ ->getContent()
+);
+$form->setPrimaryKey(
+ $contactRoot->getItem('section', 'conf')
+ ->getItem('directive', 'primarykey')
+ ->getContent()
+);
+
+$form->configureForm($contactRoot);
+$formOutput = $form->toHtml();
+GLM_TOOLBOX::top("Updatable Listings (Add/Edit)", "help/contact.phtml?key=Edit");
+GLM_TOOLBOX::html_nav_table($nav, $navWidth);
+echo $formOutput;
+GLM_TOOLBOX::footer();
--- /dev/null
+<?php
+include "../../setup.phtml";
+include "contact_setup.inc";
+if ($_POST) {
+ $sub_oktogo = true;
+ if (empty($_POST['group'])) {
+ $sub_oktogo = false;
+ }
+ switch ($_POST['Command']) {
+ case 'Add' :
+ $qs = "INSERT INTO inq_group(name) VALUES('".$_POST['group']."')";
+ break;
+
+ case 'Edit' :
+ $qs = "UPDATE inq_group SET name = '".$_POST['group']."' WHERE id = ".$_POST['id'];
+ break;
+
+ case 'Delete' :
+ $qs = "DELETE FROM inq_group WHERE id = ".$_POST['id'];
+ break;
+
+ default :
+ unset($qs);
+ break;
+ }
+ if ($_POST['Command'] == 'Delete') {
+ $DB->db_exec($qs);
+ header('Location: list_groups.php');
+ } else if ($sub_oktogo && isset($qs)) {
+ $DB->db_exec($qs);
+ header('Location: list_groups.php');
+ }
+}
+?>
+<script type="text/javascript">
+function form_sub_check() {
+ var sub_oktogo = true;
+ var group = document.getElementById('group').value;
+ var groupBox = document.getElementById('group_box');
+
+ if (group == '') {
+ groupBox.className = "problem";
+ sub_oktogo = false;
+ problems = '-- Name\n';
+ } else {
+ groupBox.className = '';
+ }
+
+ if (!sub_oktogo)
+ alert('Please give your new group a name before continuing');
+ // Return whether the form will submit or not!
+ return sub_oktogo ? true : false;
+}
+</script>
+<style type="text/css">
+.problem {
+ background-color: #FCA9A4 !important;
+}
+</style>
+<?php
+GLM_TOOLBOX::top('Edit/Add Inquiry','');
+// Adjust the nav for this page, add the Edit Groups page.
+if (is_array($nav) && array_key_exists('Contact Inquiry Fields', $nav)) {
+ $tmp = array('Inquiry Groups' => 'list_groups.php');
+ array_insert($nav, 'Contact Inquiry Fields', $tmp);
+}
+GLM_TOOLBOX::html_nav_table($nav,$navWidth);
+if (is_numeric($_GET['id'])) {
+ $query = 'SELECT * FROM inq_group WHERE id = '.$_GET['id'];
+ if ($data = $DB->db_auto_get_data($query)) {
+ $name = $data[0]['name'];
+ $id = $data[0]['id'];
+ }
+} else {
+ $name = '';
+}
+?>
+<form action="edit_group.php" method="POST" onSubmit="return form_sub_check();">
+ <table id="admin-edit-table">
+ <tr>
+ <th>Group Name:</th>
+ <td id="group_box" <?php echo ($_POST && !$sub_oktogo) ? 'class="problem"' : '';?>>
+ <input type="text" name="group" id="group" value="<?php echo $name;?>">
+ <input type="hidden" name="id" id="id" value="<?php echo $id;?>">
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center">
+ <?php if ($_GET['Command'] == "Edit") :?>
+ <input type="submit" name="Command" value="Edit">
+ <input type="submit" name="Command" value="Delete">
+ <?php else :?>
+ <input type="submit" name="Command" value="Add">
+ <?php endif;?>
+ </td>
+ </tr>
+ </table>
+</form>
+<?php GLM_TOOLBOX::footer();?>
--- /dev/null
+<?php
+require_once "../../setup.phtml";
+require_once "contact_setup.inc";
+GLM_TOOLBOX::top('Edit/Add Inquiry','');
+?>
+<script type="text/javascript">
+ $(document).ready(function(){
+ $('#deleteButton').click(function(){
+ $('input[name="xCommand"]').val('Delete');
+ });
+ });
+function form_sub_check()
+{
+ var submitButton = $('input[name="xCommand"]').val();
+ if (submitButton == 'Delete') {
+ return true;
+ }
+ var sub_oktogo = true;
+ var problems = '';
+ var header = $("#header").val();
+ var headerBox = $("#header_box");
+ var group = $("#groupid").val();
+ var groupBox = $("#group_box");
+ var newGroup = $("#new_group").val();
+
+ if (header == '') {
+ headerBox.addClass("problem");
+ sub_oktogo = false;
+ problems = '-- Name\n';
+ } else {
+ headerBox.removeClass("problem");
+ }
+ if ((group == undefined || group == 0) && newGroup == '') {
+ groupBox.addClass("problem");
+ sub_oktogo = false;
+ problems += '-- Group\n';
+ } else {
+ groupBox.removeClass("problem");
+ }
+ if (!sub_oktogo) {
+ alert('You have problems on your form!\nPlease carefully review the following and re-submit your form.\n\n' + problems);
+ }
+ // Return whether the form will submit or not!
+ return sub_oktogo ? true : false;
+}
+</script>
+<style type="text/css">
+.problem {
+ background-color: #FCA9A4 !important;
+}
+</style>
+<?php
+// Adjust the nav for this page, add the Edit Groups page.
+if (is_array($nav) && array_key_exists('Contact Inquiry Fields', $nav)) {
+ $tmp = array('Inquiry Groups' => 'list_groups.php');
+ array_insert($nav, 'Contact Inquiry Fields', $tmp);
+}
+GLM_TOOLBOX::html_nav_table($nav,$navWidth);
+if (is_numeric($_GET['id'])) {
+ $query = "SELECT * FROM contact_inq WHERE id = $id";
+ if ($data = $DB->db_auto_get_data($query)) {
+ $header = $data[0]['header'];
+ $description = $data[0]['description'];
+ $pos = $data[0]['pos'];
+ $groupid = $data[0]['groupid'];
+ }
+} else {
+ $header = '';
+ $description = '';
+ $groupid = '';
+}
+$query = "SELECT * FROM inq_group ORDER BY name;";
+if ($gData = $DB->db_auto_get_data($query)) {
+ $group_sel = '<select id="groupid" name="groupid">';
+ $group_sel .= '<option value="">New Group - >></option>';
+ foreach ($gData as $gRow) {
+ $group_sel .= '<option value="'.$gRow['id'].'"';
+ if( $groupid && $gRow['id'] == $groupid )
+ {
+ $group_sel .= ' selected';
+ }
+ $group_sel .= '>'.$gRow['name'];
+ $group_sel .= '</option>';
+ }
+ $group_sel .= '</select>';
+}
+?>
+<form action="update_inquiry.phtml" method="POST" onSubmit="return form_sub_check();">
+ <input type="hidden" name="old_groupid" value="<?php echo $groupid;?>" />
+ <table id="admin-edit-table">
+ <tr>
+ <th>Name:</th>
+ <td id="header_box">
+ <input type="text" name="header" id="header" size="50" value="<?php echo $header?>">
+ <input type="hidden" name="id" value="<?php echo $id?>">
+ </td>
+ </tr>
+ <?
+ echo '<input type="hidden" name="oldpos" value="'.$pos.'">';
+ ?>
+ <tr>
+ <th>Group:</th>
+ <td id="group_box">
+ <?php echo $group_sel;?>
+ <input type="text" id="new_group" name="new_group" value="" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan=2 align=center>
+ <input type="hidden" name="xCommand" value="" />
+<?php
+if ($Command == "Edit") {
+ ?>
+ <input type="submit" name="Command" value="Edit">
+ <input type="submit" id="deleteButton" name="Command" value="Delete">
+ <?php
+} else {
+?>
+ <input type="submit" name="Command" value="Add">
+<?php
+}
+?>
+ </td>
+ </tr>
+ </table>
+</form>
+<?php
+GLM_TOOLBOX::footer();
+?>
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+require_once BASE . 'classes/class_db.inc';
+require_once 'contact_setup.inc';
+$DB = new GLM_DB();
+$query = "select * from news_response order by id;";
+$data = $DB->db_auto_get_data( $query );
+GLM_TOOLBOX::top( "Email HTML Newsletters", "");
+GLM_TOOLBOX::html_nav_table($nav,$navWidth);
+$out = '<table id="admin-list-table">
+ <tr><td colspan="2" align="center">
+ <form name="add" action="edit_autoresponse.phtml" method="post">
+ <button name="command" onClick="add.submit()">Add HTML EMAIL</button>
+ </td></tr>
+ <tr>
+ <th>Function:</th>
+ <th>Subject:</th>
+ <th>Last Update:</th>
+ <th> </th>
+ </tr>';
+
+if (is_array($data)) {
+ foreach ($data as $key => $val) {
+ $out .= '<tr>
+ <td><a href="edit_autoresponse.phtml?id='.$val["id"].'">[Edit]</a>
+ <a href="view_newsletter.phtml?id='.$val["id"].'">[View]</a></td>
+ <td>'.$val["subject"].'</td>
+ <td>'.$val["last_update"].'</td>
+ <td><a href="update_autoresponse.phtml?Command=Delete&id='.$val["id"].'" onClick="return(confirm(\'This will delete the Email Newsletter!\n\nAre you sure?\'))">[Delete]</a></td>
+ </tr>';
+ }
+}
+$out .= '</table>';
+echo $out;
+GLM_TOOLBOX::footer();
+?>
--- /dev/null
+function reshow(object) {
+ artist = object.options[object.selectedIndex].text;
+ for (var i = document.track.names.length;i > 0;i--)
+ document.track.names.options[0] = null;
+ reloading = true;
+ showlinks();
+ document.track.names.options[0].selected = true;
+ return false;
+}
+
+function load(object) {
+ alert('Just testing: ' + object.options[object.selectedIndex].value);
+ //window.location.href = object.options[object.selectedIndex].value;
+ return false;
+}
+
+function showlinks() {
+ if (artist == 'Chris Rea') {
+ opt('cr/one.zip','The Road To Hell');
+ opt('cr/two.zip','Let\'s Dance');
+ }
+
+ if (artist == 'Annie Lennox') {
+ opt('al/why.zip','Why');
+ opt('al/wobg.zip','Walking on Broken Glass');
+ }
+
+ if (artist == 'Dina Carrol') {
+ opt('dc/track1.zip','Escaping');
+ opt('dc/track2.zip','Only Human');
+ }
+}
+
+function opt(href,text) {
+ if (reloading) {
+ var optionName = new Option(text, href, false, false)
+ var length = document.track.names.length;
+ document.track.names.options[length] = optionName;
+ }
+ else
+ document.write('<OPTION VALUE="',href,'">',text,'<\/OPTION>');
+}
--- /dev/null
+<HTML>
+<HEAD>
+<TITLE>Help</TITLE>
+</HEAD>
+<BODY BGCOLOR="#FFFFFF" BACKGROUND="../../help/helpbg.gif" TEXT="#000000" LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?">
+<FONT FACE="ms sans serif,arial,helvetica" SIZE=2 COLOR="#444444">
+<H4 align="center">Contact Help</H4>
+<hr>
+<?
+switch ($key) {
+ case "search":
+ ?>
+<h4 align="center">Contact Database Search</h4>
+
+<P>
+In this page you will start to build your query to the contact database.
+</p>
+<p>
+<big><b>Search:</b></big>
+</p>
+<p>
+<b>Search records for:</b>
+</p>
+<p>Here is where you will enter any keywords to use in the search. You must
+enter in something in the "Search records for" box. You may use more than one
+word (ie.) Sam Field.</p>
+<p><font color=red>HINT:</font>To help search use wildcards!</p>
+<p>? optional space<br>
+* optional spaces<br>
++ at least one space
+. will match anything<br>
+</p>
+<p><font color=green>NOTE:</font>Leaving this fields blank will select all
+contacts. You can leave this blank and choose "Mail OK" true to get all
+contacts that allow emails.</p>
+<p><b>Search Where in fields:</b></p>
+<p>Tells the database to Search "Anywhere", "Beginning", or "Ending" of the
+fields to be searched.</p>
+<p><b>In Fields:</b></p>
+<p>Select from "In Fields" box. This determines what fields to look in for
+this search.</p>
+<p><font color=red>HINT</font>
+If you want to select more than one field to search in hold down the 'Ctrl' key while clicking on the selection to select or
+deselect it from the list.</p>
+<p><font color=red>HINT</font>
+You can use the "All" and "None" buttons to help you save time. This will
+select all or none of the fields in the boxes.</p>
+<p><b>Search Type:</b></p>
+<p>Select the type of search you want (ie.) an "Exact string" search will return
+only those fields which match the "Search records" for string exactly as compared
+to "Or" which will return any field that match any words you place into "Search
+records for"</p>
+<p><b>Case Sensitivity:</b></p>
+<p>This will turn "On" and "Off" the case sensitivity.
+(ie.)If you leave it "Off" and enter "bob" it will return anything like
+"bob","BOB","Bob","BOb","boB",or "BoB" turned "On" will match only "bob".</p>
+
+<p>
+<big><b>Output of records</b></big>
+</p>
+<p><b>Output Fields:</b></p>
+<p>Select from "Output Fields" box. This determines what fields will be in the
+output of this search.</p>
+<p><font color=red>HINT</font>
+You can use the "All" and "None" buttons to help you save time. This will
+select all or none of the fields in the boxes.</p>
+<p><font color=red>HINT</font>
+If you want to select more than
+one Output field hold down the 'Ctrl' key while clicking on the selection to select or
+deselect it from the list.</p>
+<p><b>File Output:</b></p>
+<p>Select from here if you wish to download a file with the results of this
+search. The file will built "On the Fly" so you can download it.</p>
+<p><font color=green>NOTE:</font>The text file is output as report.doc. This
+is only a text file.
+</p>
+<p><b>Delimiter:</b></p>
+<p>This determines what separates the fields in your file.</p>
+
+<?
+ break;
+
+ case "List":
+ ?>
+<h4 align="center">List Contacts</h4>
+<P>
+This page is for listing the results of your query. You can download files if
+you have selected a file type or edit and delete the contact found.
+</p>
+<p><b>[Edit]</b></p>
+<p>Link to contact edit page.</p>
+
+<p><b>[Delete]</b></p>
+<p>Link to Delete Contact.</p>
+
+<p><big><b>Download Files</b></big></p>
+<p>If you see this then there is a file you can download.
+Click on the file and you can download it.</p>
+<?
+ break;
+
+ case "Edit":
+ ?>
+<h4 align="center">Edit a Contact</h4>
+<P>
+This page is for editing and modifying an existing Contact in the database.
+When editing is complete, click on the "Submit Query" button. The database will
+be updated, and you will be directed back to the "List Contacts" page.
+</p>
+<p>
+
+<p>
+<b>Submit Query</b>
+</p>
+<p>When you have made the changes you want to the Contact,
+you can click "Submit Query." This will update the information about the
+Contact in the database.
+</p>
+<?
+ break;
+
+ case "Add":
+ ?>
+<h4 align="center">Add an Contact</h4>
+<P>
+This page is for Adding Contacts in the database.
+When form is complete, click on the "Submit Query" button. The database will
+be updated, and you will be directed back to the "List Contacts" page.
+</p>
+
+<p>
+<b>Submit Query</b>
+</p>
+<p>When you have made the changes you want to the Contact,
+you can click "Submit Query." This will update the information about the
+Contact in the database.
+</p>
+<?
+ break;
+
+}
+?>
+<BR CLEAR=ALL>
+<CENTER><A HREF="" onClick = "window.close('self');"><IMG SRC="../../help/closewindow.gif" border=0></A></CENTER>
+</BODY>
+</HTML>
--- /dev/null
+.htmlarea { background: #fff; }
+
+.htmlarea .toolbar {
+ cursor: default;
+ background: ButtonFace;
+ padding: 1px 1px 2px 1px;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+.htmlarea .toolbar table { font-family: tahoma,verdana,sans-serif; font-size: 11px; }
+.htmlarea .toolbar img { border: none; }
+.htmlarea .toolbar .label { padding: 0px 3px; }
+
+.htmlarea .toolbar .button {
+ background: ButtonFace;
+ color: ButtonText;
+ border: 1px solid ButtonFace;
+ padding: 1px;
+ margin: 0px;
+}
+.htmlarea .toolbar .buttonHover {
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+.htmlarea .toolbar .buttonActive, .htmlarea .toolbar .buttonPressed {
+ padding: 2px 0px 0px 2px;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+.htmlarea .toolbar .buttonPressed {
+ background: ButtonHighlight;
+}
+.htmlarea .toolbar .indicator {
+ padding: 0px 3px;
+ overflow: hidden;
+ width: 20px;
+ text-align: center;
+ cursor: default;
+ border: 1px solid ButtonShadow;
+}
+
+.htmlarea .toolbar .buttonDisabled { background-color: #aaa; }
+
+.htmlarea .toolbar .buttonDisabled img {
+ filter: alpha(opacity = 25);
+ -moz-opacity: 25%;
+}
+
+.htmlarea .toolbar .separator {
+ position: relative;
+ margin: 3px;
+ border-left: 1px solid ButtonShadow;
+ border-right: 1px solid ButtonHighlight;
+ width: 0px;
+ height: 16px;
+ padding: 0px;
+}
+
+.htmlarea .toolbar .space { width: 5px; }
+
+.htmlarea .toolbar select { font: 11px Tahoma,Verdana,sans-serif; }
+
+.htmlarea .toolbar select,
+.htmlarea .toolbar select:hover,
+.htmlarea .toolbar select:active { background: FieldFace; color: ButtonText; }
+
+.htmlarea .statusBar {
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+ padding: 2px 4px;
+ background-color: ButtonFace;
+ color: ButtonText;
+ font: 11px Tahoma,Verdana,sans-serif;
+}
+
+.htmlarea .statusBar .statusBarTree a {
+ padding: 2px 5px;
+ color: #00f;
+}
+
+.htmlarea .statusBar .statusBarTree a:visited { color: #00f; }
+.htmlarea .statusBar .statusBarTree a:hover {
+ background-color: Highlight;
+ color: HighlightText;
+ padding: 1px 4px;
+ border: 1px solid HighlightText;
+}
+
+
+/* Hidden DIV popup dialogs (PopupDiv) */
+
+.dialog {
+ color: ButtonText;
+ background: ButtonFace;
+}
+
+.dialog .content { padding: 2px; }
+
+.dialog, .dialog button, .dialog input, .dialog select, .dialog textarea, .dialog table {
+ font: 11px Tahoma,Verdana,sans-serif;
+}
+
+.dialog table { border-collapse: collapse; }
+
+.dialog .title {
+ background: #008;
+ color: #ff8;
+ border-bottom: 1px solid #000;
+ padding: 1px 0px 2px 5px;
+ font-size: 12px;
+ font-weight: bold;
+ cursor: default;
+}
+
+.dialog .title .button {
+ float: right;
+ border: 1px solid #66a;
+ padding: 0px 1px 0px 2px;
+ margin-right: 1px;
+ color: #fff;
+ text-align: center;
+}
+
+.dialog .title .button-hilite { border-color: #88f; background: #44c; }
+
+.dialog button {
+ width: 5em;
+ padding: 0px;
+}
+
+.dialog .buttonColor {
+ padding: 1px;
+ cursor: default;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+
+.dialog .buttonColor-hilite {
+ border-color: #000;
+}
+
+.dialog .buttonColor .chooser, .dialog .buttonColor .nocolor {
+ height: 0.6em;
+ border: 1px solid;
+ padding: 0px 1em;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+.dialog .buttonColor .nocolor { padding: 0px; }
+.dialog .buttonColor .nocolor-hilite { background-color: #fff; color: #f00; }
+
+.dialog .label { text-align: right; width: 6em; }
+.dialog .value input { width: 100%; }
+.dialog .buttons { text-align: right; padding: 2px 4px 0px 4px; }
+
+.dialog legend { font-weight: bold; }
+.dialog fieldset table { margin: 2px 0px; }
+
+.popupdiv {
+ border: 2px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+
+.popupwin {
+ padding: 0px;
+ margin: 0px;
+}
+
+.popupwin .title {
+ background: #fff;
+ color: #000;
+ font-weight: bold;
+ font-size: 120%;
+ padding: 3px 10px;
+ margin-bottom: 10px;
+ border-bottom: 1px solid black;
+ letter-spacing: 2px;
+}
+
+form { margin: 0px; border: none; }
--- /dev/null
+<?php
+session_start();
+require_once "../../setup.phtml";
+require_once "contact_setup.inc";
+error_reporting();
+if (isset($mailout)) {
+ unset($_SESSION['mailout']);
+ //session_unregister("mailout");
+}
+if (isset($_SESSION['sess_vars'])) {
+ extract($_SESSION['sess_vars']);
+ unset($_SESSION['sess_vars']);
+ //session_unregister("sess_vars");
+}
+$qs = "SELECT count(*) as total
+ FROM ".TABLE;
+if (TABLE == CUSTOMER_TABLE) {
+ $qs .= " WHERE (fname != '-Guest-' OR fname is null)";
+}
+$res = $DB->db_auto_get_data($qs);
+$total = $res[0]['total'];
+GLM_TOOLBOX::top("Contact Database","help/contact.phtml?key=search","SteveContactsDatabase_1.0");
+GLM_TOOLBOX::html_nav_table($nav,$navWidth);
+?>
+<table id="admin-list-table">
+ <tr>
+ <td colspan=4>
+ There
+ <?php
+ if ($total < 1 ) {
+ echo " No records";
+ } elseif ($total > 1) {
+ echo "are $total contacts";
+ } else {
+ echo "is $total contact";
+ }
+ ?> in the database.
+ </td>
+ </tr>
+ <tr>
+ <th colspan=4 class="theader">
+ Search:
+ </th>
+ </tr>
+ <tr>
+ <td colspan=4>
+ <b>Search records for:</b><br>
+ </td>
+ </tr>
+ <tr>
+ <td colspan=4>
+ <form name="search" action="query_contact.phtml" method="POST" onSubmit="
+ var msg = '';
+ var errors = '';
+ var ping = 0;
+ var all = 0;
+ this.fvalue.value = '';
+ this.rfvalue.value = '';
+ this.rdvalue.value = '';
+
+ if(this.search.value == '') {
+ all++;
+ }
+
+ for(var i = 0;i<4;i++) {
+ if(this.search_type.options[i].selected){
+ ping++;
+ }
+ }
+
+ if(all == 0) {
+ if(ping == 0) {
+ errors += '-You must select a search type\n';
+ }
+ }
+
+ for(var i=0;i<<?php echo count($fields)?>;i++) {
+ if(this.ifields.options[i].selected) {
+ this.fvalue.value += ':' + this.ifields.options[i].value;
+ }
+ }
+
+ for(var i=0;i<<?php echo count($fields)?>;i++) {
+ if(this.return_fields.options[i].selected) {
+ this.rfvalue.value += ':' + this.return_fields.options[i].value;
+ }
+ }
+
+ for(var i=0;i<1;i++) {
+ if(this.dates.options[i].selected) {
+ this.rdvalue.value += ':' + this.dates.options[i].value;
+ }
+ }
+
+ if(all == 0) {
+ if(this.fvalue.value == '') {
+ errors += '-You must select at least one field to search in\n';
+ }
+ }
+
+ if(this.rfvalue.value == '') {
+ errors += '-You must select at least one field for output\n';
+ }
+
+ if(all == 1) {
+ if(errors == '') {
+ return(true);
+ }
+ }
+
+ if(errors == '') {
+ return(true);
+ } else {
+ msg += '_______________________________________\n\n';
+ msg += 'The form was not submitted please check\n';
+ msg += 'the following and resubmit\n\n';
+ msg += errors + '\n\n';
+ msg += '_______________________________________\n\n';
+
+ alert(msg);
+ return(false);
+ }
+ ">
+ <input name="search" value="<?php echo stripslashes($search)?>" size=40>
+ <input type="submit" name="Submit Query">
+ </td>
+ </tr>
+ <tr>
+ <th colspan=4 class="theader">
+ Search Dates Ranges
+ </th>
+ </tr>
+ <tr>
+ <td align="left" colspan=4 nowrap>
+ <div style="float:left;width:240px;height:35px;">Created From:<br> <?php echo $c_date_from?></div>
+ <div style="float:left;width:240px;height:35px;">Created To:<br> <?php echo $c_date_to?></div>
+ </td>
+ </tr>
+ <tr>
+ <td class="small" valign=top>
+ <b>In Fields:</b><br>
+ <select name="ifields" multiple size=8>
+ <?php foreach($fields as $key2=>$value2) {?>
+ <option value="<?php echo $key2?>" <?php echo (strstr($fvalue,$key2))?"selected":""?>><?php echo $value2?>
+ <?php }?>
+ </select>
+ <br>
+ <label for="in-all"><input type="radio" id="in-all" name="a" onClick="
+ for(var i=0;i<<?php echo count($fields)?>;i++) {
+ this.form.ifields.options[i].selected=1;
+ }
+ ">All</label>
+ <label for="in-none"><input type="radio" id="in-none" name="a" onClick="
+ for(var i=0;i<<?php echo count($fields)?>;i++) {
+ this.form.ifields.options[i].selected=0;
+ }
+ ">None</label>
+ </td>
+ <td valign=top class="small" nowrap>
+ <b>Search Where:</b><br>
+ <select name="alter">
+ <option value="0" <?php echo ($alter=="0")?"selected":""?>>Anywhere
+ <option value="1" <?php echo ($alter=="1")?"selected":""?>>Begining
+ <option value="2" <?php echo ($alter=="2")?"selected":""?>>Ending
+ </select><br>
+ <input type="hidden" name="fvalue">
+ <?php
+ if (is_array($boolean)) {
+ foreach ($boolean as $bool_key => $bool_val) {
+ echo '<br>
+ <b>'.$bool_val.'</b><br>';
+ echo search_bool($bool_key, ${$bool_key});
+ }
+ }
+ if (is_array($dropdowns)) {
+ foreach ($dropdowns as $drop_key => $drop_row) {
+ echo '<br>
+ <b>'.$drop_row['title'].'</b>';
+ echo '<br>';
+ if( is_array( $drop_row['drop'] ) ) {
+ echo GLM_TOOLBOX::build_picklist( $drop_key.'[]', $drop_row['drop'], ${$drop_key}, 'multiple', 0, null, 5 );
+ }
+ }
+ }
+ echo '</td><td valign=top width=25%>';
+?>
+ <br><b>Search Type:</b><br>
+ <select name="search_type" size=4>
+ <option value="1" <?php echo (!isset($search_type) || $search_type=="1")?"selected":""?>>Exact string
+ <option value="2" <?php echo ($search_type=="2")?"selected":""?>>And
+ <option value="3" <?php echo ($search_type=="3")?"selected":""?>>Or
+ <option value="4" <?php echo ($search_type=="4")?"selected":""?>>Not
+ </select>
+ </td>
+ <td valign=top class=small width=25%>
+ <b>Case Sensitivity:</b><br>
+ <select name="case">
+ <option value="ON" <?php echo ($case == "ON")?"selected":""?>>On
+ <option value="OFF" <?php echo (!isset($case) || $case == "OFF")?"selected":""?>>Off
+ </select><br>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4">
+<?php
+ $sql = "
+ SELECT contact_inq.*, inq_group.name as group
+ FROM contact_inq
+ LEFT OUTER JOIN inq_group
+ ON (contact_inq.groupid = inq_group.id)
+ WHERE inq_group.id != 6
+ ORDER BY groupid, pos";
+
+ $interests = array();
+ $intData = $DB->db_auto_get_data($sql);
+ foreach ($intData as $row) {
+ $interests[$row['group']][$row['id']] = $row['header'];
+ }
+
+ foreach ($interests as $i => $j) {
+ echo '<fieldset>';
+ echo '<legend>';
+ echo $i;
+ echo '</legend>';
+ foreach ($j as $k => $v) {
+ echo '<label class="glmCheckBox">';
+ echo '<input type="checkbox" name="cols[]" value="'.$k.'" ';
+ if ( is_array($cols)
+ && in_array($data['id'], $cols)) {
+ echo " checked";
+ }
+ echo '>';
+ echo $v;
+ echo '</label>';
+ }
+ echo '</fieldset>';
+ }
+?>
+ </td>
+ </tr>
+ <tr>
+ <th colspan=4>
+ Output of records:
+ </th>
+ </tr>
+ <tr>
+ <td class="small" valign=top>
+ <b>Output Fields:</b><br>
+ <select name="return_fields" multiple size=8>
+ <?php foreach($fields as $key2=>$value2) {?>
+ <option value="<?php echo $key2?>" <?php echo (strstr($rfvalue,$key2))?"selected":""?>><?php echo $value2?>
+ <?php }?>
+ </select>
+ <br>
+ <input type="hidden" name="rfvalue">
+ <label for="out-all"><input type="radio" id="out-all" name="a" onClick="
+ for(var i=0;i<<?php echo count($fields)?>;i++) {
+ this.form.return_fields.options[i].selected=1;
+ }
+ for(var i=0;i<<?php echo ($p_date_from)?"3":"1";?>;i++) {
+ this.form.dates.options[i].selected=1;
+ }
+ ">All</label>
+ <label for="out-none"><input id="out-none" type="radio" name="a" onClick="
+ for(var i=0;i<<?php echo count($fields)?>;i++) {
+ this.form.return_fields.options[i].selected=0;
+ }
+ for(var i=0;i<<?php echo ($p_date_from)?"3":"1";?>;i++) {
+ this.form.dates.options[i].selected=0;
+ }
+ ">None</label>
+ </td>
+ <td class="small" valign=top>
+ <input type="hidden" name="rdvalue" value="">
+ <b>Output fields (Dates):</b>
+ <select name="dates" multiple size=3>
+ <option value="create_date" <?php echo (strstr($dates,"create_date"))?"selected":""?>>Created Date
+ <?php if($p_date_from)
+ {?>
+ <option value="purch_date" <?php echo (strstr($dates,"purch_date"))?"selected":""?>>Last Purchase Date
+ <?php }
+ if($a_date_from)
+ {?>
+ <option value="access_date" <?php echo (strstr($dates,"access_date"))?"selected":""?>>Last Access Date
+ <?php }?>
+ </select>
+ </td>
+ <td class="small" valign=top width=25%>
+ <b>File output:</b><br>
+ <select name="file" size=4>
+ <option value="" <?php echo (!isset($file) || $file == "")?"selected":""?>>No File
+ <option value="zip" <?php echo ($file=="zip")?"selected":""?>>zip file
+ <option value="gz" <?php echo ($file=="gz")?"selected":""?>>tar.gz(tar ball)
+ <option value="rpt" <?php echo ($file=="rpt")?"selected":""?>>text file
+ </select>
+ </td>
+ <td valign=top class=small width=25%>
+ <b>Delimiter:</b><br>
+ <select name="delimiter" size=4>
+ <option value="tab" <?php echo ($delimiter=="tab")?"selected":""?>>TAB
+ <option value="comma" <?php echo ($delimiter=="comma")?"selected":""?>>Comma
+ <option value="csv" <?php echo ($delimiter=="csv")?"selected":""?>>CSV
+ <option value="pipe" <?php echo ($delimiter=="pipe")?"selected":""?>>Pipe
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4" align="center">
+ <input type="submit" name="Submit Query">
+ </td>
+ </tr>
+ </table>
+<?php
+GLM_TOOLBOX::footer();
+?>
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+require_once 'contact_setup.inc';
+if (!$start) {
+ $start = 0;
+}
+
+if ($postquery) {
+ $query_string = $postquery;
+}
+$checkqs = "SELECT count(*) as contacts
+ FROM ".TABLE;
+
+if (!$checkres = $DB->db_auto_get_data($checkqs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.__LINE__.$checkqs,1);
+}
+
+$numcontacts = $checkres[0]['contacts'];
+if ($numcontacts == 0) {
+ GLM_TOOLBOX::html_error("There are no contacts in the database",1);
+}
+//var_dump($query_string);
+//var_dump($_REQUEST);
+//exit;
+if(!isset($back) && !isset($query_string) && !isset($query_no)) {
+ $query = "SELECT ".ID.",*
+ FROM ".TABLE."
+ WHERE ".WHERE."
+ ORDER BY lname,fname";
+
+ $query = addslashes($query);
+ $qs = "SELECT id
+ FROM query_db
+ WHERE query_name = '(current)'";
+
+ if (!$res = $DB->db_exec($qs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.__LINE__.$qs,1);
+ }
+
+ if ($DB->db_numrows($res)==0) {
+ $qs = "INSERT
+ INTO query_db
+ (query,query_name)
+ VALUES ('$query','(current)')";
+ } else {
+ $id = $res->fetchColumn();
+ $qs = "UPDATE query_db
+ SET query = '$query',
+ file = '',
+ delimiter = ''
+ WHERE id = $id";
+ }
+ if (!$res = $DB->db_exec($qs)) {
+ html_error(DB_ERROR_MSG.__LINE__.$qs,1);
+ }
+ unset($qs);
+}
+
+if ($delimiter == "csv") {
+ $csv = TRUE;
+}
+
+if (isset($query_string) && $query_string) {
+ $query_string = strtr($query_string,"\n"," ");
+ $query_string = strtr($query_string,"\t"," ");
+ $query_string = stripslashes($query_string);
+ $qs = $query_string;
+} elseif ($query_no) {
+ $qs = "select query from query_db where id = $query_no";
+ $queryres = $DB->db_exec($qs);
+ if ($queryres->rowCount() == 0) {
+ $qs = "SELECT ".ID.",*
+ FROM ".TABLE."
+ WHERE ".WHERE."
+ ORDER BY lname,fname";
+ } else {
+ $qs = $queryres->fetchColumn();
+ }
+} else {
+ $queryqs = "SELECT query
+ FROM query_db
+ WHERE query_name LIKE '(current)'";
+ $queryres = $DB->db_exec($queryqs);
+ if ($queryres->rowCount() == 0) {
+ $qs = "SELECT ".ID.",*
+ FROM ".TABLE."
+ WHERE ".WHERE."
+ ORDER BY lname,fname";
+ } else {
+ $qs = $queryres->fetchColumn();
+ }
+}
+
+GLM_TOOLBOX::top("List Contacts","help/contact.phtml?key=List");
+?>
+<script src="wm.js"></script>
+<script src="msg.js"></script>
+<table id="admin-list-table">
+<?php
+GLM_TOOLBOX::html_nav_table($nav,$navWidth);
+if (NEWSLETTER) {
+$mquery = "select id,subject,last_update from news_response order by last_update desc;";
+ $mres = $DB->db_exec($mquery);
+ $mailout = array();
+ while ($mrow = $mres->fetch())
+ {
+ $mailout[] = $mrow;
+ }
+?>
+<script type="text/javascript">
+ var remind;
+ remind = 'This will mailout the Newsletter\n';
+</script>
+<table id="admin-edit-table" style="width:500px;">
+ <tr>
+ <th colspan=2>
+ <form action="mailout.phtml" method="POST" onSubmit="return(confirm(remind));">
+ <select name="mail_id" style="width:100%;"><?php
+ unset($mrow);
+ foreach ($mailout as $mrow) {
+ echo '<option value="'.$mrow["id"].'">';
+ echo ' '.htmlspecialchars(strip_tags($mrow["subject"]));
+ echo ' (Updated: '.$mrow["last_update"].')';
+ echo '</option>';
+ }
+ ?>
+ </select>
+ <input type="hidden" name="postmail" value="<?php echo $qs?>">
+ <input type="submit" value="Mail Out the Newsletter">
+ </form>
+ </th>
+</tr>
+<?php }
+$totalqs = substr_replace($qs," count(*) as total FROM ",strpos($qs,"SELECT")+7,strpos($qs,"FROM")-3);
+if (strpos($totalqs,"ORDER BY")!=0) {
+ $totalqs = substr_replace($totalqs,"",strpos($totalqs,"ORDER"));
+}
+if (!$totalres = $DB->db_exec($totalqs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.__LINE__.$totalqs,1);
+}
+if ($totalres->rowCount() == 0) {
+ $totalnum = 0;
+} else {
+ $totalnum = $totalres->fetchColumn();
+}
+$qs .= " LIMIT ".ENTRIES_PER_PAGE." OFFSET ".$start;
+$res = $DB->db_exec($qs);
+?>
+<tr>
+ <td colspan="2"><?php echo $totalnum?>Result(s)
+<?php
+if ($_REQUEST['Action']) {
+ echo '<div style="background-color:green;color:white;padding:5px;">'.$_REQUEST['Action'].' Successfully!</div>';
+}
+?></td>
+</tr>
+<?php
+if(!$res) GLM_TOOLBOX::html_error(DB_ERROR_MSG.__LINE__.$qs,1);
+// What page are you on?
+if ($start==0) {
+ $page == 1;
+} else {
+ $page = ($start / ENTRIES_PER_PAGE) + 1;
+}
+$totalpages = floor($totalnum / ENTRIES_PER_PAGE);
+$totalpages++;
+
+$result_string = "";
+$num = $DB->db_numrows($res);
+if (!$start) {
+ $start = 0;
+}
+$begin = 0;
+$ending = $num;
+
+$stuff = "query_string=".urlencode($query_string)."&file=".$file."&delimiter=".$delimiter."&csv=".$csv;
+// for paging results get a first page and last page link also
+// first page is easy use 0
+$first = "<a href=\"list_contact.phtml?".$stuff."&start=0\">FIRST</a> - ";
+// last page use total pages
+$lastpage = " - <a href=\"list_contact.phtml?".$stuff."&start=".( ( $totalpages - 1 ) * ENTRIES_PER_PAGE )."\">Last</a>";
+if ($totalnum > ENTRIES_PER_PAGE && ( $page != $totalpages ) ) {
+ $end = ENTRIES_PER_PAGE + $start;
+} else {
+ $end = $totalnum;
+}
+$last = $start - ENTRIES_PER_PAGE;
+if (!$query_string) {
+ $query_string = $qs;
+ $query_string = str_replace(" LIMIT ".ENTRIES_PER_PAGE." OFFSET ".$start,"",$query_string);
+}
+
+if (($start - ENTRIES_PER_PAGE) < 0) {
+ $prev = "PREV";
+} else {
+ $prev = "<a href=\"list_contact.phtml?".$stuff."&start=".$last."\">PREV</a>";
+}
+if ($end < $totalnum) {
+ $next = "<a href=\"list_contact.phtml?".$stuff."&start=".$end."\">NEXT</a>";
+} else {
+ $next = "NEXT";
+}
+?>
+<tr>
+ <td colspan="2">
+ <?php
+ if($num!=0)
+ echo $first.$prev."-".($start+1)."-to-".$end."-".$next.$lastpage;
+ ?>
+ </td>
+</tr>
+<tr>
+ <td colspan="2">
+<?php
+if (count($res)>0) {
+ for ($i=$begin;$i<$ending;$i++) {
+ if (!$row = $DB->db_fetch_array($res,$i,PGSQL_ASSOC)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.__LINE__,1);;
+ }
+ $col = 0;
+ foreach ($row as $fieldName => $fieldVal) {
+ $fields[$col] = $fieldName;
+ if ($i == $begin) {
+ $head_ar[] = $fieldName;
+ }
+ $body_ar[] = $fieldVal;
+ ++$col;
+ }
+ if ($i == $begin) {
+ $head_array = array_values($head_ar);
+ }
+ $contact_data[] = array_values($body_ar);
+ ?>
+ <tr <?php echo $background;
+ $id = ID;
+ ?>>
+ <td nowrap><a href="edit_contact.php?<?php echo ID . '=' . $row[$id]?>&start=<?php echo $start;?>">
+ [Edit]</a>
+ <a href="update_contact.phtml?Command=Delete&id=<?php echo $row[$id]?>&start=<?php echo $start;?>" onClick="
+ if(confirm('This will delete this record Are you sure?')) {
+ return(true);
+ }else {
+ return(false);
+ }
+ ">
+ [Delete]</a>
+ </td>
+ <td align=left>
+ <?php
+ foreach($fields as $key) {
+ if($key != "id" && $key != "cust_id"
+ && $key != "userid" && $key != "usernum"
+ && $key != "usergroup" && $key != "passwd")
+ echo $row[$key]." ";
+ }
+ ?>
+ </td>
+ </tr>
+ <?php
+ }
+}
+ ?>
+ </td>
+</tr>
+ </table>
+ <?php
+if(isset($file) && $file != "" && $DB->db_numrows($res) > 0) {
+?>
+<table>
+<tr>
+ <th colspan=2>Download files</th>
+</tr>
+<tr>
+ <td><form action="download.phtml">
+ <input type="hidden" name="query_string" value="<?php echo $query_string?>">
+ <input type="hidden" name="file" value="<?php echo $file?>">
+ <input type="hidden" name="delimiter" value="<?php echo $delimiter?>">
+ <input type="hidden" name="csv" value="<?php echo $csv?>">
+ <input type="submit" value="Download Report">
+ </form></td>
+</tr>
+</table>
+<?php
+}
+GLM_TOOLBOX::html_nav_table($nav,5);
+GLM_TOOLBOX::footer();
+?>
--- /dev/null
+<?php
+include_once '../../setup.phtml';
+include "contact_setup.inc";
+GLM_TOOLBOX::top('Contact Inquiries', '');
+// Adjust the nav for this page, add the Edit Groups page.
+if (is_array($nav) && array_key_exists('Contact Inquiry Fields', $nav))
+{
+ $tmp = array('Inquiry Groups' => 'list_groups.php');
+ array_insert($nav, 'Contact Inquiry Fields', $tmp);
+}
+GLM_TOOLBOX::html_nav_table($nav, $navWidth);
+$qs = "
+ SELECT id, name
+ FROM inq_group
+ ORDER BY name;";
+$result = $DB->db_exec( $qs );
+?>
+<table id="admin-list-table">
+ <tr>
+ <th colspan="2">
+ <form action="edit_group.php" method="POST" name="edit_group">
+ <input type="submit" name="Command" value="Add Group" />
+ </form>
+ </th>
+ <tr>
+ <tr>
+ <th>Options:</th>
+ <th>Group:</th>
+ <tr>
+ <?php
+ if($DB->db_numrows($result) > 0)
+ {
+ for($i=0 ;$i < $DB->db_numrows($result); $i++)
+ {
+ $data = $DB->db_fetch_array($result, $i, PGSQL_ASSOC);
+ ?>
+ <tr>
+ <td width="10" nowrap><a href="edit_group.php?id=<?php echo $data['id'];?>&Command=Edit">[Edit / Delete]</a></td>
+ <td width="80%" align="left"><?php echo $data['name'];?>
+ </tr>
+ <?php
+ }
+ }
+ else
+ {
+ ?>
+ <tr>
+ <th colspan="2">Nothing in the database yet</th>
+ </tr>
+ <?php
+ }
+ ?>
+</table>
+<?php
+GLM_TOOLBOX::footer();
+?>
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+require_once 'contact_setup.inc';
+
+GLM_TOOLBOX::top("Query DB","");
+
+GLM_TOOLBOX::html_nav_table($nav,$navWidth);
+?>
+<script src="<?php echo MEDIA_BASE_URL."admin/wm.js"?>"></script>
+<script src="<?php echo MEDIA_BASE_URL."admin/msg.js"?>"></script>
+<table id="admin-list-table">
+<tr bgcolor="#2f4f4f">
+ <th class="theader">
+ Functions:
+ </th>
+ <th class="theader">
+ Queries in database
+ </th>
+</tr>
+<?php
+//if(!$dbd = db_connect()) html_error(DB_ERROR_MSG,0);
+
+$qs = "SELECT id,query_name
+ FROM query_db";
+
+if(!$res = $DB->db_exec($qs)) GLM_TOOLBOX::html_error(DB_ERROR_MSG.$qs,0);
+
+for($i=0;$i<$DB->db_numrows($res);$i++) {
+ $row = $DB->db_fetch_array($res,$i,PGSQL_ASSOC);
+
+?>
+ <script lang="javascript">
+ var o<?php echo $i?> = new Object();
+ o<?php echo $i?>.msg = 'You are about to Permanently Delete this Query';
+ o<?php echo $i?>.url = 'del_query.phtml?id=<?php echo $row[id]?>';
+ o<?php echo $i?>.popup = '1';
+ o<?php echo $i?>.popup.name = "delwin";
+ o<?php echo $i?>.width = 630;
+ o<?php echo $i?>.height = 300;
+ </script>
+<tr>
+ <td>
+ <a href="query_contact.phtml?query_no=<?php echo $row[id]?>">[Recall]</a>
+ <?php if($row[query_name] != "(current)") {?>
+ <a href="del_query.phtml?id=<?php echo $row[id]?>" onClick="
+ glm_confirm(o<?php echo $i?>);
+ return(false);
+ ">[Delete]</a>
+ <?php }?>
+ </td>
+ <td><b><?php echo $row[query_name]?></b></td>
+</tr>
+<?php }?>
+</table>
+<?php
+GLM_TOOLBOX::footer();
+?>
--- /dev/null
+<html>
+<head>
+<title>Mailing out The Newsletter</title>
+</head>
+<body bgcolor="white">
+<?php
+require_once '../../setup.phtml';
+require_once 'contact_setup.inc';
+
+// File names for SPAMerizer
+$Filename = tempnam( "/var/spool/SPAMerizer", "MOUNP" );
+unlink($Filename);
+
+$HeadFilename = $Filename.".head";
+$BodyFilename = $Filename.".body";
+$ToFilename = $Filename.".to";
+$ReadyFilename = $Filename.".ready";
+
+$postmail = stripslashes($postmail);
+
+$pattern = '/SELECT.*FROM/is';
+$replace = "SELECT email INTO TEMPORARY temp_table FROM";
+$postmail = preg_replace($pattern, $replace, $postmail);
+$postmail = preg_replace("/ORDER BY.*/is","", $postmail);
+$postmail .= " AND ".MAILOK;
+
+if (!$mailres = $DB->db_exec($postmail)) {
+ html_error(DB_ERROR_MSG.__LINE__.$postmail, 1);
+}
+
+$mailqs = "SELECT
+ DISTINCT ON (email) email
+ FROM temp_table
+ GROUP BY email;";
+flush();
+if (!$mailres = $DB->db_exec($mailqs)) {
+ html_error(DB_ERROR_MSG.__LINE__.$mailqs, 1);
+}
+
+if ($DB->db_numrows($mailres)>0) {
+ for($a=0;$a<$DB->db_numrows($mailres);$a++) {
+ $mvdata = $DB->db_fetch_array($mailres, $a, PGSQL_ASSOC);
+ $email = trim($mvdata["email"]);
+ if ($email) {
+ $mail[] = $email;
+ }
+ }
+}
+if (is_array($mail) && count($mail)>0) {
+ // write the temp.to file
+ $mail = implode("\n", $mail);
+ $fp = fopen($ToFilename, "w");
+ fputs($fp, $mail, strlen($mail));
+ fclose($fp);
+} else {
+ $mail = "";
+}
+
+
+if ($mail != "") {
+ // I am changing this to a two part mime type email
+ // html and text
+ // using class_html
+ $responseqs = "SELECT *
+ FROM news_response
+ WHERE id = $mail_id";
+ if (!$resres = $DB->db_exec($responseqs)) {
+ html_error(DB_ERROR_MSG.$responseqs, 0);
+ }
+
+ $responserow = $DB->db_fetch_array($resres, 0, PGSQL_ASSOC);
+
+ $subject = trim($responserow['subject']);
+ $data['subject'] = &$subject;
+ $message = $responserow['response'];
+ // html part of email
+ //$data['response'] = stripslashes(nl2br($message));
+ $data['response'] = $message;
+ $data['url'] = MEDIA_BASE_URL;
+
+ $html = explode_template(NEWSLETTER_PROTOTYPE,$data);
+
+ // text part of email
+ $text = strip_tags($message);
+ $text .= "\n\n-------------------------------------------------------------------\n";
+ $text .= "You are receiving this message because you have expressed an interest in\n";
+ $text .= "receiving specials and information from ".SITENAME.". If you do not\n";
+ $text .= "wish to receive future items of this nature, please reply to this e-mail\n";
+ $text .= "with the word \"CANCEL\" on the subject line. You will then be removed \n";
+ $text .= "from future mailings.\n";
+ $text .= "-------------------------------------------------------------------\n";
+
+ // Write the temp.header file
+ $glm_headers = "NotifyAddr: ".OWNER_EMAIL."\n"
+ . "ProcessName: ".SITENAME."\n"
+ . "From: ".FROM_NEWS_EMAIL."\n"
+ . "ReportInterval: 2\n"
+ . "BlockSize: 1\n"
+ . "ProductionMode: ".PRODUCTION_MODE."\n";
+
+ $fp = fopen($HeadFilename, "w");
+ fputs($fp, $glm_headers, strlen($glm_headers));
+ fclose($fp);
+
+ $headers = "From: ".FROM_NEWS_EMAIL."\n".
+ "To: ".OWNER_EMAIL."\n".
+ "Subject: $subject\n".
+ "Reply-to: ".REPLY_TO."\n".
+ "Mime-Version: 1.0\n".
+ "Content-Type: multipart/alternative; boundary=ContentBoundry\n\n";
+ $fp = fopen($BodyFilename,"w");
+ if(HTML_EMAIL=="ON"){
+ $body_html = '--ContentBoundry
+Content-Type: text/plain; charset="UTF-8"
+'.$text.'
+--ContentBoundry
+Content-Type: text/html; charset="UTF-8"
+
+'.$html.'
+
+--ContentBoundry--';
+ fputs($fp, $headers, strlen($headers));
+ fputs($fp, $body_html, strlen($body_html));
+ } else {
+ fputs($fp, $headers, strlen($headers));
+ fputs($fp, $text, strlen($text));
+ }
+ fclose($fp);
+ // write the temp.ready file and your done!
+ $fp = fopen($ReadyFilename, "w");
+ fclose($fp);
+?>
+<table>
+<tr>
+ <td>Mail the current <?php echo $subject?></td>
+</tr>
+<tr>
+ <td><?php echo (PRODUCTION_MODE == "ON")?"ProductionMode is ON, Mail is sent.":"ProductionMode is OFF, Mail is not sent."?></td>
+</tr>
+<tr>
+ <td><?php echo (HTML_EMAIL == "ON")?"HTML Email is ON, Mail is html encoded.":"HTML Email is OFF, Mail is plain text."?></td>
+</tr>
+<tr>
+ <td>You will recieve notification on the mailing task by email at <?php echo OWNER_EMAIL?>.</td>
+</tr>
+</table>
+<?php
+} else {
+?>
+<table width=500 bgcolor="#e0e0e0">
+<tr bgcolor="#2f4f4f">
+ <th><font color=white>Newsletter Not Sent!</th>
+ </tr>
+</table>
+<?php
+}
+
+?>
+</body>
+</html>
--- /dev/null
+body {
+ background-color: #FFFFFF;
+}
+
+.navlink {
+ font-size: 80%;
+ font-family: arial;
+}
+
+td {
+ font-size: 80%;
+ font-family: arial,helvetica;
+}
+
+.theader {
+ font-size: 120%;
+ font-family: arial,helvetica;
+ color: #FFFFFF;
+}
+
+.theadertd {
+ background-color: #000080;
+}
--- /dev/null
+function glm_confirm(o) {
+ var p = o.msg.split("\n");
+ var k = 0;
+ for(i = 0;i < p.length;i++) {
+ if(k > p[i].length)
+ continue;
+ else
+ k = p[i].length;
+ }
+
+ var bound = "";
+ for(i = 0; i < k; i++) {
+ bound = bound+'_';
+ }
+ var str = bound+"\n\n"+o.msg+"\n\n"+bound+"\n\nAre You Sure?";
+ if(confirm(str)) {
+ if(o.popup == '1') {
+ var nw = new Object();
+ nw.url = o.url;
+ nw.name = o.popup.name;
+ nw.width = o.width;
+ nw.height = o.height;
+ glm_open(nw);
+ }
+ else {
+ location.replace(o.url);
+ }
+ }
+}
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+</head>
+<body>
+<table cellspacing="0" cellpadding="0" border="0" width="100%">
+ <tr>
+ <td align="center">
+ <table cellspacing="0" cellpadding="0" border="0" width="550" bgcolor="#ffffff">
+ <tr>
+ <td>
+ <a href="<!-- url -->"><img src="<!-- url -->assets/nHeader.jpg" width="550" height="114" alt="" style="border: 0; display: block;"></a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table cellspacing="15" cellpadding="0" border="0">
+ <tr>
+ <td>
+ <font face="arial, helvetica, sans-serif" size="2">
+ <!-- response -->
+ </font>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <font face="arial, helvetica, sans-serif" size="1">
+ <hr>
+ <!-- bailout -->
+ </font>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
--- /dev/null
+2002-05-07 13:47 matrix
+
+ * contact_setup.inc, del_query.phtml, download.phtml,
+ edit_contact.phtml, form.js, index.phtml, list_contact.phtml,
+ list_query.phtml, mailout.phtml, main.css, msg.js,
+ query_contact.phtml, query_db.phtml, query_save.phtml,
+ update_contact.phtml, verify.js, wm.js, help/contact.phtml,
+ notes/ChangeLog, notes/Contact, notes/adm2.sql, notes/contact.sql,
+ notes/guest.sql: "version 2.4"
+
+2002-05-07 13:45 matrix
+
+ * contact.sql, contact_setup.inc, edit_contact.phtml,
+ list_contact.phtml, update_contact.phtml, notes/ChangeLog,
+ notes/contact.sql, notes/Contact: adding ChangeLog file and moving
+ sql file into notes. I have also set the insert part of
+ update_contact.phtml to use nextval to generate the PRIMEKEY so
+ this will work with previous version of th shop which don't have
+ the default set on cust_id
+
+2002-05-07 11:14 matrix
+
+ * contact.sql, contact_setup.inc, del_query.phtml, download.phtml,
+ edit_contact.phtml, form.js, index.phtml, list_contact.phtml,
+ list_query.phtml, mailout.phtml, main.css, msg.js,
+ query_contact.phtml, query_db.phtml, query_save.phtml,
+ update_contact.phtml, verify.js, wm.js, help/contact.phtml,
+ notes/adm2.sql, notes/guest.sql: testing out both contact and
+ customer table use
+
+2002-05-07 10:08 matrix
+
+ * form.js, msg.js, verify.js, wm.js: "putting javascript files in
+ dir"
+
+2002-05-07 09:57 matrix
+
+ * index.phtml: "all versions now 2.0"
+
+2002-05-07 09:57 matrix
+
+ * index.phtml: new file
+
+2002-05-07 09:44 matrix
+
+ * admin_constants.inc, contact.phtml, contact.sql,
+ contact_setup.inc, contact_test.sql, del_query.phtml,
+ download.phtml, edit_contact.phtml, index.html, list_contact.phtml,
+ list_cust_form.phtml, list_customers.phtml, list_query.phtml,
+ mailout.phtml, main.css, path.phtml, query_contact.phtml,
+ query_db.phtml, query_save.phtml, shopping_cart_setup.inc,
+ update_contact.phtml, help/contact.phtml, notes/adm2.sql,
+ notes/guest.sql: "merging final changes into one app"
+
+2002-03-14 11:23 matrix
+
+ * download.phtml: removed offending dot
+
+2002-03-12 10:32 matrix
+
+ * contact_setup.inc: file contact_setup.inc was initially added on
+ branch glm-Contact-2-0.
+
+2002-03-12 10:32 matrix
+
+ * download.phtml: file download.phtml was initially added on branch
+ glm-Contact-2-0.
+
+2002-03-12 10:32 matrix
+
+ * contact.phtml, contact_setup.inc, del_query.phtml,
+ download.phtml, edit_contact.phtml, list_contact.phtml,
+ list_query.phtml, mailout.phtml, query_contact.phtml,
+ query_db.phtml, update_contact.phtml: make it customer and ocntact
+
+2002-03-12 09:36 matrix
+
+ * list_cust_form.phtml, list_customers.phtml, path.phtml,
+ shopping_cart_setup.inc: updates
+
+2002-03-12 09:34 matrix
+
+ * contact.phtml, del_query.phtml, edit_contact.phtml,
+ list_contact.phtml, list_query.phtml, query_contact.phtml,
+ query_db.phtml, update_contact.phtml: prepare for merging
+
+2001-12-17 10:13 matrix
+
+ * list_contact.phtml, mailout.phtml: added ID
+
+2001-12-17 10:02 matrix
+
+ * list_contact.phtml, mailout.phtml: mail can't be sent by url
+
+2001-11-27 16:50 matrix
+
+ * contact.phtml, del_query.phtml, edit_contact.phtml,
+ list_contact.phtml, list_query.phtml, query_contact.phtml,
+ query_db.phtml, query_save.phtml, update_contact.phtml: needed to
+ update adding contacts to customer table as there is no default
+ value for cust_id
+
+2001-11-21 14:07 matrix
+
+ * contact.phtml, del_query.phtml, edit_contact.phtml,
+ list_contact.phtml, list_query.phtml, path.phtml,
+ query_contact.phtml, query_db.phtml, update_contact.phtml: using
+ setup.phtml not path.phtml
+
+2001-11-07 14:30 matrix
+
+ * list_contact.phtml: removed echo
+
+2001-11-07 14:27 matrix
+
+ * contact.phtml, del_query.phtml, edit_contact.phtml,
+ list_query.phtml, mailout.phtml, path.phtml, query_contact.phtml,
+ query_db.phtml, update_contact.phtml: updatng now using setup.phtml
+
+2001-11-07 14:24 matrix
+
+ * list_contact.phtml: correcting email out code
+
+2001-10-15 15:19 matrix
+
+ * contact.phtml, query_contact.phtml: adding date search
+
+2001-10-11 14:44 matrix
+
+ * list_contact.phtml: updating
+
+2001-10-11 14:34 matrix
+
+ * mailout.phtml: file mailout.phtml was initially added on branch
+ glm-Contact-2-0.
+
+2001-10-11 14:32 matrix
+
+ * list_contact.phtml, mailout.phtml: added autoresponder
+
+2001-09-25 10:14 matrix
+
+ * path.phtml: changed the path so we use one file
+
+2001-09-25 10:13 matrix
+
+ * contact.phtml: tr tag
+
+2001-07-02 14:29 matrix
+
+ * path.phtml: symplified the path files now this referes to the
+ main one in admin
+
+2001-06-22 08:55 matrix
+
+ * contact.phtml, contact.sql, edit_contact.phtml,
+ update_contact.phtml: adding field referred_by
+
+2001-06-19 08:50 matrix
+
+ * list_contact.phtml: no real change
+
+2001-06-19 08:49 matrix
+
+ * update_contact.phtml, edit_contact.phtml: modified for mailok
+
+2001-06-19 08:45 matrix
+
+ * list_contact.phtml: modified for errors on recalls
+
+2001-06-19 08:45 matrix
+
+ * edit_contact.phtml, update_contact.phtml: modified for mailok
+
+2001-06-18 10:08 matrix
+
+ * query_db.phtml: shop_query_db
+
+2001-06-18 10:08 matrix
+
+ * help/helpbg.gif: file helpbg.gif was initially added on branch
+ glm-Contact-shop-1-0.
+
+2001-06-18 10:08 matrix
+
+ * help/: closewindow.gif, contact.phtml, helpbg.gif: added images
+ to help folder
+
+2001-06-18 10:08 matrix
+
+ * help/closewindow.gif: file closewindow.gif was initially added on
+ branch glm-Contact-shop-1-0.
+
+2001-06-18 10:05 matrix
+
+ * query_contact.phtml: shop_query_db
+
+2001-06-18 10:04 matrix
+
+ * list_query.phtml: added nav links
+
+2001-06-18 10:03 matrix
+
+ * list_query.phtml: new shop query db
+
+2001-06-11 13:14 matrix
+
+ * list_contact.phtml: error correction
+
+2001-06-11 10:51 matrix
+
+ * list_contact.phtml: if there are no queries insert current
+
+2001-06-11 10:31 matrix
+
+ * list_contact.phtml: if there are no contacts html_error
+
+2001-06-11 10:18 matrix
+
+ * list_query.phtml: added nav to top of page
+
+2001-06-11 10:15 matrix
+
+ * help/contact.phtml: corrected paths to help images
+
+2001-06-08 09:17 matrix
+
+ * contact.sql: changing query table name to keep from messing up
+ other application
+
+2001-06-08 09:16 matrix
+
+ * help/contact.phtml: updateing help file
+
+2001-06-08 09:12 matrix
+
+ * contact.phtml: changed radio buttons on mail_ok to drop down
+
+2001-06-08 08:50 matrix
+
+ * list_contact.phtml: modified
+
+2001-06-08 08:46 matrix
+
+ * contact.phtml: made the mail_ok a drop down
+
+2001-06-07 14:54 matrix
+
+ * contact.phtml, list_contact.phtml, query_contact.phtml: updated
+ per gloriebe contactdb
+
+2001-06-07 14:06 matrix
+
+ * query_contact.phtml, help/contact.phtml: made changes for ereg
+ wildcards
+
+2001-06-06 15:51 matrix
+
+ * contact.phtml, contact.sql, edit_contact.phtml,
+ list_contact.phtml, query_contact.phtml, query_save.phtml,
+ update_contact.phtml: shop version
+
+2001-06-06 15:42 matrix
+
+ * main.css: added file
+
+2001-06-06 15:40 matrix
+
+ * report.rpt: "removed"
+
+2001-06-06 15:00 matrix
+
+ * contact.phtml, list_contact.phtml, query_contact.phtml,
+ update_contact.phtml, help/contact.phtml: worked out some bugs
+
+2001-06-06 13:41 matrix
+
+ * help/contact.phtml: changed path on images
+
+2001-06-06 13:38 matrix
+
+ * main.css: adding needed files
+
+2001-06-06 13:38 matrix
+
+ * main.css: file main.css was initially added on branch
+ glm-Contact-2-0.
+
+2001-06-05 11:17 matrix
+
+ * path.phtml: changed path to help
+
+2001-06-05 11:13 matrix
+
+ * path.phtml: changed path to help
+
+2001-06-05 10:45 matrix
+
+ * path.phtml: added path file
+
+2001-06-05 10:38 matrix
+
+ * contact.phtml, list_contact.phtml, query_contact.phtml: added
+ pipe and csv delimiter
+
+2001-05-31 12:43 matrix
+
+ * contact.phtml, contact.sql, contact_test.sql, del_query.phtml,
+ edit_contact.phtml, list_contact.phtml, list_query.phtml,
+ query_contact.phtml, query_db.phtml, query_save.phtml,
+ update_contact.phtml, help/contact.phtml: combining the contact
+ databases
+
+2001-04-04 13:42 matrix
+
+ * admin_constants.inc, index.html, list_cust_form.phtml,
+ list_customers.phtml, path.phtml, report.rpt,
+ shopping_cart_setup.inc, notes/adm2.sql, notes/guest.sql: Initial
+ revision
+
+2001-04-04 13:42 matrix
+
+ * admin_constants.inc, index.html, list_cust_form.phtml,
+ list_customers.phtml, path.phtml, report.rpt,
+ shopping_cart_setup.inc, notes/adm2.sql, notes/guest.sql: imported
+ sources
+
--- /dev/null
+All application setup stuff will be in contact_setup.phtml
+1) right now if you add to the $fields array you'll still have to change
+ edit_contact.phtml and update_contact.phtml
+2) contact.sql - contains the query to build the contact table and query_db table
--- /dev/null
+\connect - postgres
+
+CREATE TABLE "contact" (
+ "id" SERIAL PRIMARY KEY,
+ "create_date" date default current_date,
+ "fname" text,
+ "lname" text,
+ "company" text,
+ "address" text,
+ "address2" text,
+ "city" text,
+ "state" text,
+ "zip" text,
+ "country" text,
+ "phone" text,
+ "fax" text,
+ "email" text,
+ "user_agent" text,
+ "remote_addr" text,
+ "interest" text,
+ "mail_ok" boolean default 'f',
+ "contact_type" text
+);
+
+REVOKE ALL on "contact" from PUBLIC;
+GRANT ALL on "contact" to "nobody";
+GRANT ALL on "contact" to "postgres";
+
+REVOKE ALL on "contact_id_seq" from PUBLIC;
+GRANT ALL on "contact_id_seq" to "nobody";
+GRANT ALL on "contact_id_seq" to "postgres";
+
+CREATE TABLE "query_db" (
+ "id" SERIAL PRIMARY KEY,
+ "query_name" text,
+ "query" text,
+ "file" text,
+ "delimiter" text
+);
+
+REVOKE ALL on "query_db" from PUBLIC;
+GRANT ALL on "query_db" to "nobody";
+GRANT ALL on "query_db" to "postgres";
+
+REVOKE ALL on "query_db_id_seq" from PUBLIC;
+GRANT ALL on "query_db_id_seq" to "nobody";
+GRANT ALL on "query_db_id_seq" to "postgres";
+
+CREATE TABLE "news_response" (
+ "id" SERIAL PRIMARY KEY,
+ "subject" text,
+ "response" text,
+ "image" text,
+ "image2" text,
+ "image3" text,
+ "image_align" text,
+ "image2_align" text,
+ "image3_align" text,
+ "mailout" date default current_date,
+ "last_update" date default current_date
+);
+
+REVOKE ALL on "news_response" from PUBLIC;
+GRANT ALL on "news_response" to "postgres";
+GRANT ALL on "news_response" to "nobody";
+GRANT ALL on "news_response_id_seq" to "nobody";
+
+INSERT INTO news_response (subject,response) values ('subject','response');
+
+CREATE UNIQUE INDEX contact_id_indx ON contact(id);
+CREATE INDEX contact_email_indx ON contact(email);
+CREATE INDEX contact_fname_indx ON contact(fname);
+CREATE INDEX contact_lname_indx ON contact(lname);
+CREATE INDEX contact_create_date_indx ON contact(create_date);
+CREATE UNIQUE INDEX news_response_id_indx ON contact(id);
+CREATE UNIQUE INDEX query_db_id_indx ON contact(id);
+
+CREATE TABLE contact_inq (
+ id serial NOT NULL,
+ header text,
+ pos integer,
+ description text,
+ image text,
+ groupid integer
+);
+REVOKE ALL ON TABLE contact_inq FROM PUBLIC;
+GRANT ALL ON TABLE contact_inq TO nobody;
+REVOKE ALL ON TABLE contact_inq_id_seq FROM PUBLIC;
+GRANT ALL ON TABLE contact_inq_id_seq TO nobody;
+ALTER TABLE ONLY contact_inq
+ ADD CONSTRAINT contact_inq_pkey PRIMARY KEY (id);
+
+CREATE TABLE inq_group (
+ id SERIAL PRIMARY KEY,
+ name text
+);
+GRANT ALL ON inq_group TO nobody;
+GRANT ALL ON inq_group_id_seq TO nobody;
+
+INSERT INTO inq_group (name) VALUES ('Areas of Interest');
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+require_once 'contact_setup.inc';
+
+$query = "SELECT * FROM news_response WHERE id = {$_REQUEST['id']}";
+$res = $DB->db_auto_get_data($query);
+$data['url'] = MEDIA_BASE_URL;
+$data['subject'] = $res[0]["subject"];
+$response = $res[0]["response"];
+$data['response'] = $response;
+
+$page = GLM_TOOLBOX::explode_template(NEWSLETTER_PROTOTYPE,$data);
+echo $page;
+?>
--- /dev/null
+<?php
+session_start();
+require_once '../../setup.phtml';
+require_once 'contact_setup.inc';
+/* Includes */
+extract($_REQUEST);
+function clean_array(&$array){
+ if (is_array($array)){
+ $counter = 0;
+ foreach ($array as $key=>$value){
+ if ($value == ""){
+ unset($array[$counter]);
+ }
+ $counter++;
+ }
+ }
+}
+$sess_vars = $_POST;
+$_SESSION['sess_vars'] = $sess_vars;
+$query_no = filter_var($_REQUEST['query_no'], FILTER_VALIDATE_INT);
+if (!$query_no) {
+ /* The fields array is sent as a string
+ explode it out using : as delimiter */
+ $fvalue = preg_replace("/^:/","",$fvalue);
+ $fields = explode(":",$fvalue);
+ $rfvalue = preg_replace("/^:/","",$rfvalue);
+ $return_fields = explode(":",$rfvalue);
+ $dates = preg_replace("/^:/","",$rdvalue);
+ $dates = explode(":",$dates);
+
+ clean_array($return_fields);
+ clean_array($dates);
+ if (!isset($search)) {
+ header("Location: index.phtml");
+ }
+ /* Chop off whitespaces spaces */
+ $search = chop(trim($search));
+ $search = preg_replace("/\\\|\"/", "", $search);
+ if (!$search && (count ($fields) == 1 && $fields[0] == '')) {
+ $ALL = TRUE;
+ }
+
+ function getKeywords($keywords) {
+ /* Replace the whitespace with a , */
+ $keywords = str_replace(" ",",",$keywords);
+ $keywords = str_replace(",,",",",$keywords);
+ $seperated = explode(",",$keywords);
+ /* Return exploded string */
+ return $seperated;
+ }
+
+ switch($search_type) {
+ case "1":
+ $keywords = $search;
+ $compare = "OR";
+ break;
+
+ case "2":
+ $keywords = getKeywords($search);
+ $compare = "AND";
+ break;
+
+ case "3":
+ $keywords = getKeywords($search);
+ $compare = "OR";
+ break;
+
+ case "4":
+ $keywords = getKeywords($search);
+ $compare = "AND";
+ $NOT = TRUE;
+ break;
+
+ default:
+ echo "not valid";
+ break;
+ }
+
+ if (is_array($keywords)) {
+ for ($rip=0;$rip<count($keywords);$rip++) {
+ $keywords[$rip] = trim($keywords[$rip]);
+ /* if * is at the begging the replace with .* */
+ $keywords[$rip] = preg_replace("/[\x2a]/",".*",$keywords[$rip]);
+ $keywords[$rip] = preg_replace("/[\x3f]/",".?",$keywords[$rip]);
+ $keywords[$rip] = preg_replace("/[\x2b]/",".+",$keywords[$rip]);
+ }
+ } else {
+ $keywords = trim($keywords);
+ /* if * is at the begging the replace with .* */
+ $keywords = preg_replace("/[\x2a]/",".*",$keywords);
+ $keywords = preg_replace("/[\x3f]/",".?",$keywords);
+ $keywords = preg_replace("/[\x2b]/",".+",$keywords);
+ }
+
+ switch($alter) {
+ /* $alter defines where to look in fields */
+ case "1":
+ $begin = "^";
+ $end = "";
+ break;
+
+ case "2":
+ $begin = "";
+ $end = " *$";
+ break;
+
+ default:
+ $begin = "";
+ $end = "";
+ break;
+ }
+
+ $operator = " ";
+ if ($NOT) {
+ $operator .= "!~";
+ } else {
+ $operator .= "~";
+ }
+ if ($case == "OFF") {
+ $operator .= "*";
+ }
+ if ($search == "" && ! (count ($fields) == 1 && $fields[0] == '') ) {
+ $operator = "=";
+ }
+ $operator .= " ";
+
+ /* finally, build the query string from string or array $keywords */
+ $query_string = "SELECT ".ID.",";
+ $totali = count($return_fields)-1;
+ for ($i=0;$i<count($return_fields);$i++) {
+ $query_string .= $return_fields[$i];
+ if ($i != $totali) {
+ $query_string .= ",";
+ }
+ if ($i == 8) {
+ $query_string .= "\n";
+ }
+ }
+ $totald = count($dates)-1;
+ for ($i=0;$i<count($dates);$i++) {
+ if ($dates[$i] != " " && $dates[$i] != "") {
+ if ($i == 0) {
+ $query_string .= ",";
+ }
+ }
+ $query_string .= $dates[$i];
+ if ($i != $totald) {
+ $query_string .= ",";
+ }
+ }
+ if (!$ALL) {
+ $query_string .= "\nFROM\t".TABLE." \nWHERE\t".WHERE."\nAND\t";
+ $query_string .= "(";
+ for ($b=0;$b<count($fields);$b++) {
+ $totalb = count($fields)-1;
+ if (is_array($keywords)) {
+ for ($c=0;$c<count($keywords);$c++) {
+ $totalc = count($keywords)-1;
+ $query_string .= $fields[$b].$operator."'".
+ $begin.$keywords[$c].$end."'";
+ if ($c != $totalc) {
+ $query_string .= " \n$compare\t";
+ }
+ }
+ } else {
+ $query_string .= $fields[$b].$operator."'".
+ $begin.$keywords.$end."'";
+ }
+ if ($b != $totalb) {
+ $query_string .= " \n$compare\t";
+ }
+ }
+ $query_string .= ")";
+ } else {
+ $query_string .= "\nFROM\t".TABLE." \nWHERE\t".WHERE."\n";
+ }
+ if (is_array ($boolean) ) {
+ foreach ($boolean as $bool_key => $bool_val) {
+ if ($_POST[$bool_key] == "1") {
+ $bstring[] = " $bool_key = 't'";
+ } elseif ($_POST[$bool_key] == "0") {
+ $bstring[] = " $bool_key = 'f'";
+ }
+ }
+ if (is_array($bstring)) {
+ $query_string .= ' and ('.implode(" $compare ",$bstring) .') ';
+ }
+ }
+ if( is_array( $dropdowns ) ) {
+ foreach( $dropdowns as $drop_key => $drop_val ) {
+ if( is_array( $_POST[$drop_key] ) ) {
+ foreach( $_POST[$drop_key] as $mdrop_key => $mdrop_val ){
+ if( $mdrop_val != '' ){
+ $dstring[] = " $drop_key $operator ':".$mdrop_val.":'";
+ }
+ }
+ }elseif( !is_array( $_POST[$drop_key] ) ) {
+ if( $_POST[$drop_key] != '' ){
+ $dstring[] = " $drop_key = '".$_POST[$drop_key]."'";
+ }
+ }
+ }
+ if( is_array($dstring) ) {
+ $query_string .= ' and ('.implode(" $compare ",$dstring).' ) ';
+ }
+ }
+ if (is_array ($cols) ) {
+ foreach ($cols as $ikey => $ival) {
+ $cstring[] = " interest $operator ':$ival:'";
+ }
+ if (is_array($cstring)) {
+ $query_string .= ' and ('.implode(" $compare ",$cstring).') ';
+ }
+ }
+ if (isset($fp_month)) {
+ $fp_str = mktime(0,0,0,$fp_month,$fp_day,$fp_year);
+ $tp_str = mktime(0,0,0,$tp_month,$tp_day,$tp_year);
+ $fa_str = mktime(0,0,0,$fa_month,$fa_day,$fa_year);
+ $ta_str = mktime(0,0,0,$ta_month,$ta_day,$ta_year);
+
+ if ($fp_str<$tp_str) {
+ $fp_date = $fp_month."/".$fp_day."/".$fp_year;
+ $tp_date = $tp_month."/".$tp_day."/".$tp_year;
+ $query_string .= " AND purch_date >= '$fp_date'
+ AND purch_date <= '$tp_date'";
+ }
+ if ($fa_str<$ta_str) {
+ $fa_date = $fa_month."/".$fa_day."/".$fa_year;
+ $ta_date = $ta_month."/".$ta_day."/".$ta_year;
+ $query_string .= " AND access_date >= '$fa_date'
+ AND access_date <= '$ta_date'";
+ }
+ if ($fp_str>$tp_str) {
+ $fp_date = $fp_month."/".$fp_day."/".$fp_year;
+ $tp_date = $tp_month."/".$tp_day."/".$tp_year;
+ $query_string .= " AND purch_date <= '$tp_date'";
+ }
+ if ($fa_str>$ta_str) {
+ $fa_date = $fa_month."/".$fa_day."/".$fa_year;
+ $ta_date = $ta_month."/".$ta_day."/".$ta_year;
+ $query_string .= " AND access_date <= '$ta_date'";
+ }
+ }
+ if (isset($fc_month)) {
+ $fc_str = mktime(0,0,0,$fc_month,$fc_day,$fc_year);
+ $tc_str = mktime(0,0,0,$tc_month,$tc_day,$tc_year);
+
+ if ($fc_str<$tc_str) {
+ $fc_date = $fc_month."/".$fc_day."/".$fc_year;
+ $tc_date = $tc_month."/".$tc_day."/".$tc_year;
+ $query_string .= " AND create_date >= '$fc_date'
+ AND create_date <= '$tc_date'";
+ }
+ if ($fc_str>$tc_str) {
+ $fc_date = $fc_month."/".$fc_day."/".$fc_year;
+ $tc_date = $tc_month."/".$tc_day."/".$tc_year;
+ $query_string .= " AND create_date <= '$tc_date'";
+ }
+ }
+} else {
+ $sql = "
+ SELECT query_name,query,delimiter,file
+ FROM query_db
+ WHERE id = $query_no";
+ $stmt = $DB->dbh->query($sql);
+ $row = $stmt->fetch(PDO::FETCH_ASSOC);
+ $query_name = $row['query_name'];
+ $file = $row['file'];
+ $delimiter = $row['delimiter'];
+ $query_string = $row['query'];
+ //var_dump($query_string);
+ //exit;
+}
+/* Thought the customer would like to see what's in the query */
+$showq = str_replace("SELECT","Return\n",$query_string);
+$showq = str_replace ("\nFROM\t".TABLE." \nWHERE\t".WHERE."\nAND\t",
+" \nfrom the contact database \nwhere ",$showq);
+$showq = str_replace ("\nFROM\t".TABLE." \nWHERE\t".WHERE."\n",
+" \nfrom the contact database",$showq);
+$showq = str_replace("fname","first name",$showq);
+$showq = str_replace("cust_id,","",$showq);
+$showq = str_replace("lname","last name",$showq);
+$showq = str_replace("!~*","does not contain",$showq);
+$showq = str_replace("!~","does not contain",$showq);
+$showq = str_replace("~*","contains",$showq);
+$showq = str_replace("~","is in",$showq);
+$showq = str_replace("does not contain '^"," does not start with ",$showq);
+$showq = str_replace("contains '^"," starts with ",$showq);
+$showq = str_replace("is in '^"," starts with ",$showq);
+$showq = str_replace("$"," in the ending ",$showq);
+$showq = str_replace("OR","or",$showq);
+$showq = str_replace("AND","and",$showq);
+$showq = str_replace("'","",$showq);
+if (!$ALL) {
+ if ($case == "OFF") {
+ $showq .= "\n(case insensitive match)";
+ } else {
+ $showq .= "\n(case sensitive match)";
+ }
+}
+if (isset($file) && $file != "") {
+ $showq .= "\noutput 1 file in ";
+ if ($file == "rpt") {
+ $showq .= "text";
+ }elseif ($file == "gz") {
+ $showq .= "tar ball";
+ }else {
+ $showq .= "zip";
+ }
+ if ($delimiter == "csv") {
+ $showq .= " format using ".$delimiter;
+ } else {
+ $showq .= " format using ".$delimiter." as delimiter";
+ }
+}
+$showq .= ".";
+$query = $query_string;
+
+GLM_TOOLBOX::top("QUERY BUILDER PAGE","");
+GLM_TOOLBOX::html_nav_table($nav,$navWidth);
+?>
+<script src="<?php echo MEDIA_BASE_URL."admin/wm.js"?>"></script>
+<script src="<?php echo MEDIA_BASE_URL."admin/msg.js"?>"></script>
+
+<table id="admin-list-table">
+<tr>
+ <th bgcolor="#2f4f4f" class="theader">
+ Submit Query
+ </th>
+ </tr>
+ <tr>
+ <td><a href="index.phtml">Go Back to Query page</a></td>
+ </tr>
+ <tr>
+ <td>
+ <?php echo nl2br($showq)?>
+ <br>
+ <?php if (isset($query_name)) {
+ echo "Query ".$query_name." Recalled";
+ }?>
+
+ <form action="list_contact.phtml" method="POST">
+ <input type="hidden" name="delimiter" value="<?php echo $delimiter?>">
+ <input type="hidden" name="file" value="<?php echo $file?>">
+ <?php
+ if (!$_GET['query_no']) {
+ ?>
+ <input type="hidden" name="query_string" value="<?php echo $query_string?>">
+ <?php
+ } else {
+ ?>
+ <input type="hidden" name="query_no" value="<?php echo $query_no;?>">
+ <?php
+ }
+ ?>
+ <input type="hidden" name="Submit" value="Submit Query">
+ <center>
+ <input type="submit" value="Send Query">
+ </form>
+ </center>
+ </td>
+ </tr>
+</table>
+<script lang="javascript">
+ var o_save = new Object();
+ o_save.url = 'query_save.phtml';
+ o_save.name = 'savewin';
+ o_save.width = 510;
+ o_save.height = 150;
+</script>
+<table>
+ <tr>
+ <th bgcolor="#2f4f4f" class="theader">
+ Do you wish to save this query for future use?
+ </th>
+ </tr>
+ <tr>
+ <td>
+ <a href="#" onClick="
+ glm_open(o_save);
+ return(false);
+ ">Save This Report</a>
+ </td>
+</tr>
+</table>
+
+<?php
+/* Save the query with (current) as query_name */
+$qs = "SELECT id
+ FROM query_db
+ WHERE query_name = '(current)'";
+
+if (!$res = $DB->db_exec($qs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.$qs,0);
+}
+
+if (!$row = $DB->db_fetch_array($res,0,PGSQL_ASSOC)) {
+ $sql = "
+ INSERT INTO query_db
+ (query_name, query, file, delimiter)
+ VALUES
+ (:query_name, :query, :file, :delimiter)";
+} else {
+ $rowId = $row['id'];
+ $sql = "
+ UPDATE query_db
+ SET query = :query,
+ file = :file,
+ delimiter = :delimiter
+ WHERE id = :id";
+}
+// save query
+$stmt = $DB->dbh->prepare($sql);
+$stmt->bindParam(':query', $query);
+$stmt->bindParam(':file', $file);
+$stmt->bindParam(':delimiter', $delimiter);
+if ($rowId) {
+ $stmt->bindParam(':id', $rowId);
+}
+$stmt->execute();
+if (!$DB->db_auto_exec($qs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.$qs,0);
+}
+GLM_TOOLBOX::footer();
+?>
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+require_once 'contact_setup.inc';
+
+if(!isset($file)) $file = "";
+if(!isset($delimiter)) $delimiter = "";
+
+$qs = "INSERT
+ INTO query_db (query_name,query,file,delimiter)
+ (select '$query_name',query,file,delimiter from query_db where query_name = '(current)' limit 1 offset 0)";
+if(!$DB->db_auto_exec($qs))
+ {
+ html_error(DB_ERROR_MSG.$qs,1);
+ }
+GLM_TOOLBOX::html_header("Saving Query","Saved","");
+?>
+Query is saved as <?php echo $query_name?>
+<center><a href="#" onClick="window.close();return(false);">Close This
+Window</a></center>
--- /dev/null
+<html>
+<body bgcolor=white>
+<table bgcolor="#e0e0e0" width=500 cellpadding=4 cellspacing=0 border=0>
+ <tr>
+ <td>Name of Report
+
+ <form name="form2" action="query_db.phtml" method="POST">
+ <input type="hidden" name="query" value="<?php echo $query_string?>">
+ <input type="hidden" name="delimiter" value="<?php echo $delimiter?>">
+ <input type="hidden" name="file" value="<?php echo $file?>">
+ <input name="query_name">
+ <input type="submit" name="Submit" value="Save">
+ </form>
+ </td>
+</tr>
+</table>
+</body>
+</html>
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+require_once 'contact_setup.inc';
+
+
+switch ($Command) {
+
+case "Update":// {{{
+ $location = "emails.php";
+ $dbh = Toolkit_Database::getInstance();
+ $id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT);
+ if (!$id) {
+ break;
+ }
+
+ $sql = "
+ UPDATE news_response
+ SET subject = :subject,
+ response = :response,
+ last_update = current_date
+ WHERE id = :id";
+ $update = $dbh->prepare($sql);
+ $update->bindParam(
+ ':subject',
+ stripslashes($subject),
+ PDO::PARAM_STR
+ );
+ $update->bindParam(
+ ':response',
+ stripslashes($response),
+ PDO::PARAM_STR
+ );
+ $update->bindParam(
+ ':id',
+ $id,
+ PDO::PARAM_INT
+ );
+ $update->execute();
+ break;// }}}
+
+case "Insert":// {{{
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "
+ INSERT INTO news_response
+ (last_update,subject,response)
+ VALUES
+ (current_date,:subject,:response)";
+ $insert = $dbh->prepare($sql);
+ $insert->bindParam(
+ ':subject',
+ stripslashes($subject),
+ PDO::PARAM_STR
+ );
+ $insert->bindParam(
+ ':response',
+ stripslashes($response),
+ PDO::PARAM_STR
+ );
+ $insert->execute();
+ $location = "emails.php";
+
+ break;// }}}
+
+case "Cancel":// {{{
+ $location = "emails.php";
+ break;// }}}
+
+case "Delete":// {{{
+ $query = "
+ DELETE FROM news_response
+ WHERE id = $id;";
+ $DB->db_exec( $query );
+ $location = "emails.php";
+ break;// }}}
+
+default:// {{{
+ GLM_TOOLBOX::html_error("incorrect value for Command",1);
+ break;// }}}
+}
+
+header("Location: $location");
+?>
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+require_once 'contact_setup.inc';
+$location = "list_contact.phtml?back=1&start=" . $start;
+
+if (is_array($contact_type)) {
+ $contact_type = ":".implode(":",$contact_type).":";
+}
+if (is_array($interest)) {
+ $interest = ":".implode(":",$interest).":";
+}
+GLM_TOOLBOX::http_strip($url);
+
+$LAST = count($DB_fields)-1;
+if ($REQUEST_METHOD == "POST" || $Command == "Delete") {
+ switch ($Command) {
+ case "Delete":
+ $qs = "DELETE FROM ".TABLE."
+ WHERE ".ID." = $id";
+
+ if (!$DB->db_auto_exec($qs)) {
+ $ERRORS .= pg_errormessage($dbd).$qs;
+ }
+ $location .= '&Action=Contact+Deleted';
+
+ break;
+
+ case "Cancel":
+ break;
+
+ default:
+ $ERRORS .= "incorrect value for Command";
+ break;
+
+ }
+
+ header("Location: $location");
+}
+?>
--- /dev/null
+<?php
+include "../../setup.phtml";
+include "contact_setup.inc";
+switch ($Command) {
+case "Move":
+ $qs = "select pos,id from contact_inq where id = $id";
+ if (!$result = $DB->db_exec($qs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.$qs, 0);
+ }
+ $data = $DB->db_fetch_array($result, 0, PGSQL_ASSOC);
+ $pos = $data['pos'];
+ if ($newpos < $pos) {
+ $qs = "select id,pos from contact_inq where pos < $pos and pos >= $newpos and groupid = $groupid order by pos";
+ if(!$res = $DB->db_exec($qs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.$qs, 0);
+ }
+ $counter = ($newpos + 1);
+ $totalNum = $DB->db_numrows($res);
+ for ($i = 0;$i < $totalNum; $i++) {
+ $res_data = $DB->db_fetch_array($res, $i, PGSQL_ASSOC);
+ $res_id = $res_data['id'];
+ $res_pos = $res_data['pos'];
+ $qs = "update contact_inq set pos = $counter where id = $res_id";
+ if (!$DB->db_exec($qs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.$qs, 0);
+ }
+ $counter++;
+ }
+ } else {
+ $qs = "select pos,id from contact_inq where pos > $pos and pos <= $newpos and groupid = $groupid order by pos";
+ if (!$res = $DB->db_exec($qs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.$qs, 0);
+ }
+ $counter = ($pos);
+ $totalNum = $DB->db_numrows($res);
+ for ( $i = 0; $i < $totalNum; $i++) {
+ $res_data = $DB->db_fetch_array($res, $i, PGSQL_ASSOC);
+ $res_id = $res_data['id'];
+ $res_pos = $res_data['pos'];
+ $qs = "update contact_inq set pos = $counter where id = $res_id";
+ if (!$DB->db_exec($qs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.$qs, 0);
+ }
+ $counter++;
+ }
+ }
+ $qs = "update contact_inq set pos = $newpos where id = $id";
+ if (!$DB->db_exec($qs)) {
+ GLM_TOOLBOX::html_error(DB_ERROR_MSG.$qs, 0);
+ }
+ break;
+
+case "Edit":
+ if ($_POST['new_group']) {
+ $query = "select id from inq_group where name = '".$_POST['new_group']."'";
+ if ($newData = $DB->db_auto_get_data($query)) {
+ // already exists use the id returned
+ $groupid = $newData[0]['id'];
+ } else {
+ $query = "
+ INSERT INTO inq_group
+ (name)
+ VALUES
+ ('{$_POST['new_group']}')
+ RETURNING id";
+ if ($newData = $DB->db_auto_get_data($query)) {
+ $groupid = $newData[0]['id'];
+ }
+ }
+ }
+ $qs = "update contact_inq set header = '$header',image = '$image_name',description = '$description',groupid = $groupid where id = $id;";
+ $DB->db_exec($qs);
+ break;
+
+case "Add":
+ if ($_POST['new_group']) {
+ $query = "select id from inq_group where name = '".$_POST['new_group']."'";
+ if ($newData = $DB->db_auto_get_data($query)) {
+ // already exists use the id returned
+ $groupid = $newData[0]['id'];
+ } else {
+ $query = "
+ INSERT INTO inq_group
+ (name)
+ VALUES
+ ('{$_POST['new_group']}')
+ RETURNING id";
+ if ($newData = $DB->db_auto_get_data($query)) {
+ $groupid = $newData[0]['id'];
+ }
+ }
+ }
+ $qs = "select MAX(pos) as maxpos from contact_inq where groupid = $groupid";
+ $res = $DB->db_exec($qs);
+ $row = $DB->db_fetch_array($res,0,PGSQL_ASSOC);
+ $nextpos = $row[maxpos];
+ $nextpos++;
+ $qs = "insert into contact_inq (header,description,image,pos,groupid) values ('$header','$description','$image_name',$nextpos,$groupid);";
+ $DB->db_exec($qs);
+ break;
+
+case "Delete":
+ $qs = "delete from contact_inq where id = $id";
+ $DB->db_exec($qs);
+ if ($_REQUEST['old_groupid']) {
+ $qs = "select pos,id from contact_inq where pos > $oldpos and groupid = $old_groupid order by pos";
+ $res = $DB->db_exec($qs);
+ $oldcatid_counter = $oldpos;
+ $totalNum = $DB->db_numrows($res);
+ for ($i = 0; $i < $totalNum; $i++) {
+ $row = $DB->db_fetch_array($res, $i, PGSQL_ASSOC);
+ $qs = "update contact_inq set pos = $oldcatid_counter where id = $row[id]";
+ }
+ $DB->db_exec($qs);
+ }
+ break;
+}
+header("Location: contact_inquiry.phtml");
--- /dev/null
+function isblank(s) {
+ for(var i = 0; i < s.length; i++) {
+ var c = s.charAt(i);
+ if((c != ' ') && (c != '\n') && (c != '\t'))
+ return(false);
+ }
+ return(true);
+}
+
+function verify(f) {
+ var msg;
+ var empty_fields = "";
+ var errors = "";
+
+ for(var i = 0; i < f.length; i++) {
+ var e = f.elements[i];
+ if(((e.type == "text") || (e.type == "textarea")) && !e.optional) {
+ if((e.value == null) || (e.value == "") || isblank(e.value)) {
+ empty_fields += "\n " + e.r;
+ continue;
+ }
+
+ if(e.d) {
+ if(isNaN(Date.parse(e.value)))
+ errors += "- The field " +e.r+" must be formated like 01/17/2001\n";
+ }
+ if(e.numeric || (e.min != null) || (e.max != null)) {
+ if(e.i) {
+ var v = parseInt(e.value);
+ if(v != e.value) {
+ errors += "- The field " +e.r + " must be a ";
+ errors += "number with no decimal\n";
+ continue;
+ }
+ }
+ else
+ var v = parseFloat(e.value);
+ if(isNaN(v) ||
+ ((e.min != null) && (v < e.min)) ||
+ ((e.max != null) && (v > e.max))) {
+
+ errors += "- The field " + e.r + " must be a number";
+ if(e.min != null)
+ errors += " that is greater than " + e.min;
+ if(e.max != null && e.min != null)
+ errors += " and less than " + e.max;
+ else if (e.max != null)
+ errors += " that is less than " + e.max;
+ errors += ".\n";
+ }
+ }
+ }
+ }
+
+ if(!empty_fields && !errors)
+ return(true);
+
+ msg = "_____________________________________________________\n\n";
+ msg +="The form was not submitted because of the following error(s).\n";
+ msg +="Please correct these error(s) and re-submit.\n";
+ msg +="_____________________________________________________\n\n";
+
+ if(empty_fields) {
+ msg += "- The following required field(s) are empty:"
+ + empty_fields + "\n";
+ if(errors)
+ msg += "\n";
+ }
+ msg += errors;
+ alert(msg);
+ return(false);
+}
--- /dev/null
+<?php
+require_once '../../setup.phtml';
+require_once 'contact_setup.inc';
+define("STYLE","main.css");
+if ($_REQUEST['id'] == '') {
+ $_REQUEST['id'] = 1;
+}
+
+GLM_TOOLBOX::top("AutoReponse for Newsletter", HELP_BASE."response.phtml?key=edit+section");
+GLM_TOOLBOX::html_nav_table($nav,$navWidth);
+
+echo'<iframe src="preview.phtml?id='.$_REQUEST['id'].'"
+width="780" height="480"
+align="center">
+</iframe>
+
+ </td>
+</tr>
+</table>';
+
+GLM_TOOLBOX::footer();
+?>
--- /dev/null
+function glm_open(o) {
+ var x = (screen.width/2) - (o.width/2);
+ var y = (screen.height/2) - (o.height/2);
+ var args = "width="+o.width+",height="+o.height+",screenX="+x+",screenY="+y+",top="+y+",left="+x;
+ if(o.scroll == true)
+ args += ",scrollbars=1";
+ //args += "\'";
+ //alert(args);
+ pow=window.open(o.url,o.name,args);
+ //confirm(args);
+ if (pow.opener == null)
+ pow.opener = self;
+}
--- /dev/null
+<?php
+require_once '../setup.phtml';
+$page = filter_var($_REQUEST['page'], FILTER_SANITIZE_STRING);
+$page = $page ? $page : 'splash.phtml';
+?>
+<!DOCTYPE HTML>
+<html lang="en">
+<head>
+ <title><?php echo SITENAME;?> Administration</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+</head>
+<frameset cols="160,*">
+ <frame name="Nav" src="nav.phtml" frameborder="0">
+ <frame name="Main" src="<?php echo $page;?>" frameborder="0">
+ <noframes>
+ <p>Admin Requires Frames Capable Browser</p>
+ You can get a Standard Compliant browser from:
+ <ul>
+ <li>Google
+ <a href="http://www.google.com/chrome">Chrome</a>
+ </li>
+ <li>Mozilla's
+ <a href="http://www.mozilla.org/products/firefox/">Firefox</a>
+ </li>
+ <li>Microsoft
+ <a href="http://www.microsoft.com/windows/ie/">Internet Explorer</a>
+ </li>
+ </ul>
+ </noframes>
+</frameset>
+</html>
--- /dev/null
+body {
+ padding-left: 50px;
+ font-family: arial, helvetica, sans-serif;
+ font-size: 12px;
+ }
+.clearer {
+ height:1px;
+ overflow:hidden;
+ margin-top:-1px;
+ clear:left;
+}
+h1 {font-size: 18px; color: #777;}
+form {margin: 0; padding: 0;}
+/* TOOLBOX NAV */
+ul#toolbox {list-style-position:inside;list-style-type:circle;}
+ul#toolbox li {list-style-type:circle}
+ul#toolbox li.toolboxArrow {list-style-type:none;padding-left:0;margin-left:-7px;}
+* html ul#toolbox li.toolboxArrow {margin-left:-20px;} /*style for IE*/
+/* APP Nav*/
+ul.admin_nav
+{
+margin: 0;
+list-style-type: none;
+padding: 5px 0;
+}
+ul.admin_nav li { display: inline; }
+ul.admin_nav li a
+{
+border-top: 1px solid #eee;
+border-right: 1px solid #ccc;
+border-bottom: 1px solid #ccc;
+border-left: 1px solid #eee;
+text-decoration: none;
+background-color: #ddd;
+color: #000;
+padding: 2px 6px;
+margin: 0 1px;
+font-weight: bold;
+font-size: 12px;
+}
+ul.admin_nav.current { color: #111 }
+#admin-list-table {clear:left;width:500px;}
+#admin-list-table td {
+ border: 2px solid #ccc;
+ border-collapse: collapse;
+ background: #eee;
+ padding: 4px;}
+/*#admin-list-table img {border: 0; text-align: center; margin: 0 auto; display: block;}*/
+#admin-list-table a:link {color: #666;}
+#admin-list-table a:visited {color: #666;}
+#admin-list-table a:active {color: #666;}
+#admin-list-table a:hover {color: #000;}
+
+/*event-edit-table */
+#admin-edit-table {
+ clear:left;
+ font-family: arial, helvetica, sans-serif;
+ border: 2px solid #ccc;
+ border-collapse: collapse;
+ font-size: 12px;
+ }
+#admin-edit-table td {
+ border: 2px solid #ccc;
+ border-collapse: collapse;
+ background: #eee; padding: 4px;}
+#admin-list-table table td {border:none;padding:0;margin:0;}
+#admin-edit-table table td {border:none;padding:0;margin:0;}
+#admin-edit-table select,
+#admin-edit-table input,
+#admin-edit-table option {font-size: 12px;}
+#glm-manual {position:absolute;right:200px;top:10px;width:300px;}
+#glm-manual a {padding:5px 2px;width:149px;background-color:#DDDDDD;color:#000;}
+div.fileupload { border:1px solid black;float:left;margin:5px; padding:5px;background-color:white; color:black; }
+div.fileupload p { margin:0; padding:0;float:left; }
+div.fileupload span { background-color:#c0c0c0; }
+.level-0 {
+ font-weight: bold;
+ padding-left: 0;
+ background-color: #ccc;
+}
+.level-1 {
+ padding-left: 20px;
+ background-color: #ddd;
+ }
+.level-2 {padding-left: 40px;}
+.level-3 {padding-left: 60px;}
+.level-4 {padding-left: 80px;}
+.level-5 {padding-left: 100px;}
+.level-6 {padding-left: 120px;}
+.pager {
+ text-align: center;
+ background: #F6F6F6;
+ border-color: #DDD;
+ border-style: solid;
+ border-width: 1px 0;
+ margin: 1.0em 0;
+ padding: 8px 0;
+ text-align: center;
+ width: 100%;
+ font-size: 12px;
+
+}
+.pager b {
+ border: 1px solid #CCC;
+ border: 1px solid #17186A;
+ background: #FFF;
+ padding: 5px 7px;
+}
+.pager a {
+ background: #FFF;
+ border: 1px solid #CCC;
+ padding: 5px 7px;
+ text-decoration: none;
+ color: #000;
+}
+.pager a:hover {
+ border: 1px solid #999;
+ border: 1px solid #17186A;
+}
+#form-wrap legend {
+ color: #fff;
+ background: #1D58A5;
+ border: 1px solid #17186A;
+ padding: 2px 6px;
+}
+#form-wrap p {margin:1px;}
+#form-wrap label {
+ float: none;
+ margin-right: 0;
+ display: inline;
+ clear: left;
+}
\ No newline at end of file
--- /dev/null
+<?php require_once '../setup.phtml';?>
+<!DOCTYPE HTML>
+<html lang="en">
+<head>
+<title>Admin Navigation</title>
+<style type="text/css">
+<?php
+$logoAdminSmall
+ = (file_exists('../images/logoAdminSmall.gif'))
+ ? 'background: url(../images/logoAdminSmall.gif) no-repeat;'
+ : '';
+?>
+body {
+ margin: 2px;
+ font-family: arial, sans-serif;
+ font-size: 12px;
+ background-color: #fff;}
+a:link {color: #004C64;}
+a:visited {color: #004C64;}
+a:hover {color: #2C788F;}
+a:active {color: #004C64;}
+
+h1 {
+ font-weight: bold;
+ text-align: center;
+ font-size: 14px;
+ <?php echo $logoAdminSmall;?>
+ text-indent: -3000px;
+ width: 130px;
+ height: 53px;
+ margin-left: 10px;
+ }
+ul { margin: 0; padding: 0; list-style-type: none; }
+li { margin: 0; padding: 0; display: block; }
+li a {
+ text-decoration: none;
+ display: block;
+ margin: 0;
+ padding: 4px 8px;
+ background-color: #004C64;
+ border-bottom: 1px solid #eee;
+ width: 136px;
+ }
+li a:link, li a:visited, li a:active { color: #EEE; }
+li a:hover { background-color: #2C788F; color: #fff; }
+</style>
+</head>
+<body>
+ <h1><a href="<?php echo MEDIA_BASE_URL.$url;?>" target="_top">
+ <?php echo SITENAME;?></a>
+ </h1>
+<ul>
+<?php
+
+$conf = new Config;
+
+$nav['Home'] = MEDIA_BASE_URL.'admin/splash.phtml';
+$nav['Toolbox'] = MEDIA_BASE_URL.'admin/toolbox.php';
+if (defined('GLM_BLOCKS') && GLM_BLOCKS) {
+ $blocksConfig = new Zend_Config_Ini(
+ BASE . 'Toolkit/Blocks/application.ini',
+ strtolower($_ENV['GLM_HOST_ID'])
+ );
+ $nav[$blocksConfig->application->name] = $blocksConfig->application->path;
+}
+if (defined('ROTATING_IMAGES') && ROTATING_IMAGES) {
+ $rotatingImagesRoot =& $conf->parseConfig(
+ BASE . 'Toolkit/RotatingImages/config.ini',
+ 'IniFile'
+ );
+ $rotatingImagesName
+ = $rotatingImagesRoot->getItem('section', 'conf')
+ ->getItem('directive', 'applicationName')
+ ->getContent();
+ $nav[$rotatingImagesName] = MEDIA_BASE_URL.'admin/rotatingImages.php';
+}
+if (defined('SEASONS') && SEASONS) {
+ $seasonConfig = new Zend_Config_Ini(
+ BASE . 'Toolkit/Seasons/application.ini',
+ strtolower($_ENV['GLM_HOST_ID'])
+ );
+ $nav[$seasonConfig->application->name] = MEDIA_BASE_URL.'admin/seasons.php';
+}
+if (defined('BANNERS') && BANNERS) {
+ $nav['Banners'] = MEDIA_BASE_URL.'admin/banners.php';
+}
+if (defined('CONTACT_DB') && CONTACT_DB) {
+ $nav['Contacts'] = MEDIA_BASE_URL.'admin/Contact/';
+}
+if (defined('EVENT_DB') && EVENT_DB) {
+ $nav['Events']
+ = (defined('COMMON_EVENTS') && COMMON_EVENTS)
+ ? MEDIA_BASE_URL.'admin/CommonEvents/'
+ : MEDIA_BASE_URL.'admin/Events/';
+}
+if (defined('COUPONS') && COUPONS) {
+ $couponsRoot =& $conf->parseConfig(
+ BASE . 'Toolkit/Coupons/config.ini',
+ 'IniFile'
+ );
+ $couponsName
+ = $couponsRoot->getItem('section', 'conf')
+ ->getItem('directive', 'applicationName')
+ ->getContent();
+ $nav[$couponsName] = MEDIA_BASE_URL.'admin/coupons.php';
+}
+if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ $memberRoot =& $conf->parseConfig(
+ BASE . 'Toolkit/Members/config.ini',
+ 'IniFile'
+ );
+ $memberName
+ = $memberRoot->getItem('section', 'listing type')
+ ->getItem('directive', 'plural')
+ ->getContent();
+ $nav[$memberName] = MEDIA_BASE_URL.'admin/members.php';
+}
+if (defined('EMPLOYMENT') && EMPLOYMENT) {
+ $empConfig = new Zend_Config_Ini(
+ BASE . 'Toolkit/Employment/config.ini',
+ strtolower($_ENV['GLM_HOST_ID'])
+ );
+ $empName
+ = $empConfig->applicationName;
+ $nav[$empName] = MEDIA_BASE_URL.'admin/employment/index.php';
+}
+if (defined('PHOTO_GALLERY') && PHOTO_GALLERY) {
+ $nav['Image Library'] = MEDIA_BASE_URL.'admin/photos.php';
+}
+if (defined('VIDEOS') && VIDEOS) {
+ $nav['Video Gallery'] = MEDIA_BASE_URL.'admin/videos.php';
+}
+if (defined('PRESS_DB') && PRESS_DB) {
+ $nav['Press'] = MEDIA_BASE_URL.'admin/Press/';
+}
+if (defined('TICKETING') && TICKETING) {
+ $nav['Ticketing'] = MEDIA_BASE_URL.'admin/ticketing/';
+}
+$nav['Support Form'] = MEDIA_APP_BASE_URL .
+ 'supportForm.php?sitename='.urlencode(SITENAME);
+if (defined('EVENT_MANAGEMENT') && EVENT_MANAGEMENT) {
+ $nav['Event Management']
+ = MEDIA_BASE_URL.'admin/EventManagement/EventManagement.php';
+}
+$nav['Server Statistics'] = MEDIA_BASE_URL.'admin/logs/';
+
+foreach ($nav as $name => $url) {
+ echo '
+ <li>
+ <a href="'.$url.'" target="Main">'.$name.'</a>
+ </li>';
+}
+?>
+</ul>
+
+<a
+ style="display: block; margin: 10px auto; text-align: center;"
+ href="http://www.gaslightmedia.com/"
+ target="_blank">
+ <img
+ alt=""
+ src="https://app.gaslightmedia.com/assets/poweredby.gif"
+ border="0"
+ title="Gaslight Media Website">
+</a>
+</body>
+</html>
--- /dev/null
+<?php
+require_once '../setup.phtml';
+// Registry Object to hold global objects and setting for application
+$registry = new Toolkit_Registry;
+// create a Zend Config Object and store into Registry
+$config = new Zend_Config_Ini(
+ BASE . 'Toolkit/Photos/application.ini',
+ strtolower($_ENV['GLM_HOST_ID'])
+);
+$registry->config = $config;
+$registry->page = MEDIA_BASE_URL . 'admin/photos.php';
+$appConfig = $config->application->toArray();
+$registry->dbh = Toolkit_Database::getInstance();
+$registry->logger = Toolkit_Logger::getLogger();
+$registry->router = new Toolkit_Router($registry);
+$registry->router->setPath($appConfig['path']);
+$registry->router->setApplication($appConfig['application']);
+
+$html = $registry->router->loader();
+
+echo $html;
\ No newline at end of file
--- /dev/null
+<?php
+require_once '../setup.phtml';
+$rotatingImagesConf = new Config;
+$rotatingImagesRoot =& $rotatingImagesConf->parseConfig(
+ BASE . 'Toolkit/RotatingImages/config.ini',
+ 'IniFile'
+);
+
+$registry = new Toolkit_Registry;
+$registry->dbh = Toolkit_Database::getInstance();
+$registry->logger = Toolkit_Logger::getLogger();
+$registry->config = $rotatingImagesRoot;
+$registry->router = new Toolkit_Router($registry);
+$registry->router->setPath(BASE . 'Toolkit/RotatingImages');
+$registry->router->setApplication('RotatingImages');
+
+$navigation = new Toolkit_RotatingImages_Navigation(
+ new HTML_Menu(),
+ new HTML_Menu_DirectRenderer()
+);
+
+$navArray = $navigation->getNavStructure($rotatingImagesRoot);
+$navHtml = $navigation->renderPageNav($navArray, 'rows');
+
+$html = $registry->router->loader();
+
+$appName
+ = $rotatingImagesRoot->getItem('section', 'conf')
+ ->getItem('directive', 'applicationName')
+ ->getContent();
+
+if (filter_input(INPUT_GET, 'ac') == 'preview') {
+ GLM_TOOLBOX::top('', '', null, false);
+ echo $html;
+ GLM_TOOLBOX::footer();
+} else {
+ GLM_TOOLBOX::top($appName, '');
+ echo $navHtml;
+ echo $html;
+ GLM_TOOLBOX::footer();
+}
+?>
--- /dev/null
+<?php require_once '../setup.phtml';?>
+<!DOCTYPE HTML>
+<html lang="en">
+<head>
+<link
+ type="text/css"
+ rel=stylesheet
+ href="<?php echo MEDIA_BASE_URL.'admin/main.css';?>">
+<title>Welcome to GLM Toolbox</TITLE>
+</head>
+<body>
+
+<div style="text-align: center;">
+<p>
+ <strong>Welcome To The <?php echo SITENAME;?> Administration Area</strong>
+</p>
+<p>Please Choose The Area You Wish To Update.</p>
+<img src="<?php echo MEDIA_BASE_URL.'images/logo.gif';?>">
+</div>
+
+</body>
+</html>
+
--- /dev/null
+<?php
+require_once '../setup.phtml';
+$registry = new Toolkit_Registry;
+$registry->dbh = Toolkit_Database::getInstance();
+$registry->logger = Toolkit_Logger::getLogger();
+$registry->router = new Toolkit_Router($registry);
+$registry->router->setPath(BASE . 'Toolkit/Toolbox');
+$registry->router->setApplication('Toolbox');
+
+$tlbConf = new Config;
+$tbxRoot
+ =& $tlbConf->parseConfig(BASE . 'Toolkit/Toolbox/config.ini', 'IniFile');
+
+$navigation = new Toolkit_Toolbox_Navigation(
+ new HTML_Menu(),
+ new HTML_Menu_DirectRenderer()
+);
+
+$navArray = $navigation->getNavStructure($tbxRoot);
+$navHtml = $navigation->renderPageNav($navArray, 'rows');
+
+$html = $registry->router->loader();
+
+$appName
+ = $tbxRoot->getItem('section', 'conf')
+ ->getItem('directive', 'applicationName')
+ ->getContent();
+
+
+GLM_TOOLBOX::top($appName, '');
+echo '<div
+ style="position:absolute;top:2px;right:5px;padding:5px;float:right;width:165px;background-color:#dddddd;"><a style="color:#000000;"
+ href="http://app.gaslightmedia.com/docs/ToolboxHelpGuide.pdf" target="_blank">Printable Toolbox Help Guide</a></div>';
+echo $navHtml;
+echo $html;
+GLM_TOOLBOX::footer();
+?>
--- /dev/null
+<?php
+require_once '../setup.phtml';
+
+// application configuration
+$conf = new Config;
+$confRoot=& $conf->parseConfig(
+ BASE . 'Toolkit/Videos/config.ini',
+ 'IniFile'
+);
+
+// get reference to [conf] section of config file
+$appName
+ = $confRoot->getItem('section', 'conf')
+ ->getItem('directive', 'applicationName')
+ ->getContent();
+
+$navigation = new Toolkit_Videos_Navigation(
+ new HTML_Menu(),
+ new HTML_Menu_DirectRenderer()
+);
+
+$navArray = $navigation->getNavStructure($confRoot);
+$navHtml = $navigation->renderPageNav($navArray, 'rows');
+$c = new Toolkit_Videos_Controller();
+$videos = $c->toHtml(
+ Toolkit_Database::getInstance(),
+ $confRoot
+);
+
+GLM_TOOLBOX::top($appName, '');
+echo $navHtml;
+echo $videos;
+GLM_TOOLBOX::footer();
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+ * class_db.inc
+ *
+ * Class build for providing postgres function to facilitate
+ * database abstraction.
+ * We're moving on to using PHP Data Objects (PDO) now
+ *
+ * PHP version 5
+ *
+ * @category Classes
+ * @package GLM_DB
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version CVS: $Id: class_db.inc,v 1.8 2010/05/25 14:15:15 jamie Exp $
+ * @link <>
+ */
+
+/**
+ * Short description for class
+ *
+ * Long description (if any) ...
+ *
+ * @category Classes
+ * @package GLM_DB
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2009 Gaslight Media
+ * @license Gaslight Media
+ * @version Release: @package_version@
+ * @link <>
+ */
+class GLM_DB
+{
+ // {{{ Properties
+
+ /**
+ * host
+ * string host database host server name
+ *
+ * @var mixed
+ * @access public
+ */
+ protected $host;
+ /**
+ * dbname
+ * string dbname name of the database
+ *
+ * @var mixed
+ * @access public
+ */
+ protected $dbname;
+ /**
+ * user
+ * string user The user to connect as
+ *
+ * @var mixed
+ * @access public
+ */
+ protected $user;
+ /**
+ * password
+ * string password The users password if any
+ *
+ * @var mixed
+ * @access public
+ */
+ protected $password;
+ /**
+ * dbd
+ * string dbd Database connection result ID#
+ *
+ * @var mixed
+ * @access public
+ */
+ protected $dbd;
+ /**
+ * conn
+ * string conn string postgres connection string default = CONN_STR
+ *
+ * @var mixed
+ * @access public
+ */
+ protected $conn;
+ /**
+ * trans
+ * boolean trans bool if true a transaction is in process
+ *
+ * @var mixed
+ * @access public
+ */
+ protected $trans;
+ /**
+ * Result
+ *
+ * @var mixed
+ * @access public
+ */
+ protected $Result;
+
+ /**
+ * Description for public
+ * @var unknown
+ * @access public
+ */
+ public $dbh;
+ // }}}
+ // {{{ GLM_DB()
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $conn Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function GLM_DB($conn = CONN_STR)
+ {
+ $this->dbh = Toolkit_Database::getInstance();
+ $this->host = "";
+ $this->dbname = "";
+ $this->user = "nobody";
+ $this->password = "";
+ $this->conn = $conn;
+ $this->trans = 0;
+ $this->dbd = "";
+ }
+
+ // }}}
+ // {{{ db_auto_array()
+
+ /** db_auto_get_array
+ *
+ * The auto function for retrieving an array based soley on a query
+ * string. This function makes the connection, does the exec, fetches
+ * the array, closes the connection, frees memory used by the result,
+ * and then returns the array
+ *
+ * {@source }
+ * @param $qs SQL query string
+ * @param $i row number
+ * @param $type PGSQL_ASSOC or PGSQL_BOTH or PSQL_NUM
+ *
+ * @returns array - Returns an associative array of key-value pairs
+ * @access public
+ */
+
+ function db_auto_array($qs, $i, $type)
+ {
+ if ($this->dbh) {
+ return $this->dbh->query($qs)->fetch(PDO::FETCH_ASSOC);
+ }
+ if (!$this->dbd) {
+ $this->dbd =& $this->db_connect();
+ }
+ $res = $this->db_exec($qs);
+ if (!$res) {
+ return 0;
+ }
+ if ($this->db_numrows($res) == 0) {
+ return 0;
+ }
+
+ $row = $this->db_fetch_array($res, $i, $type);
+
+ if(!$this->db_freeresult($res)) {
+ return 0;
+ }
+
+ return $row;
+ }
+
+ // }}}
+ // {{{ db_auto_exec()
+
+ /** db_auto_exec
+ *
+ * The auto function for executing a query.
+ * This function makes the connection, does the exec, fetches
+ * the array, closes the connection, frees memory used by the result,
+ * and then returns success (not a valid result index)
+ *
+ * {@source }
+ * @param $qs SQL query string
+ * @returns int - Returns 1 for success 0 for failure
+ * @access public
+ */
+
+ function db_auto_exec($qs)
+ {
+ if ($this->dbh) {
+ return $this->dbh->query($qs);
+ }
+ $this->db_connect();
+ if (!$this->dbd) {
+ return 0;
+ }
+ if (!$this->db_exec( $qs)) {
+ return 0;
+ } else {
+ return 1;
+ }
+ }
+
+ // }}}
+ // {{{ db_auto_get_data()
+
+ /** db_auto_get_data
+ *
+ * <p>The auto function for retrieving an array based soley on a query
+ * string. This function makes the connection, does the exec, fetches
+ * the array, closes the connection, frees memory used by the result,
+ * and then returns the array.</p>
+ *
+ * {@source }
+ * @param string $qs SQL query string
+ *
+ * @returns mixed
+ * @access public
+ */
+ function db_auto_get_data($qs)
+ {
+ if ($this->dbh) {
+ return $this->dbh->query($qs)->fetchAll(PDO::FETCH_ASSOC);
+ }
+ if (!$this->dbd) {
+ $this->db_connect();
+ }
+ if (!( $res = $this->db_exec( $qs))) {
+ return false;
+ }
+ $totalrows = pg_NumRows( $res);
+ for ($i = 0 ; $i < $totalrows ; $i++) {
+ $data[$i] = $this->db_fetch_array ($res, $i, PGSQL_ASSOC);
+ }
+ if (isset( $data) && $data != "") {
+ return $data;
+ } else {
+ return 0;
+ }
+ }
+
+ // }}}
+ // {{{ db_close()
+
+ /** db_close
+ *
+ * Closes the connection to database specified by the handle dbd
+ * returns a boolean for success
+ *
+ * {@source }
+ * @returns bool - Returns 1 on success 0 if dbd is not a valid connection
+ * @access public
+ */
+
+ function db_close()
+ {
+ switch (DB_TYPE) {
+ case "postgres":
+ pg_close($this->dbd);
+ break;
+ default:
+ return false;
+ }
+ }
+
+ // }}}
+ // {{{ db_connect()
+
+ /**
+ * db_connect
+ *
+ * Creates a connection to database specified $conn_str,
+ * and returns a boolean for success.
+ *
+ * @uses GLM_DB::$dbd
+ * @uses GLM_DB::$conn
+ * @uses GLM_DB::$dbname
+ * @uses GLM_DB::$host
+ * @uses GLM_DB::$user
+ * @uses GLM_DB::$password
+ * {@source }
+ * @returns int
+ * @access public
+ */
+
+ function db_connect()
+ {
+ if (isset( $this->dbd) && $this->dbd != "") {
+ return $this->dbd;
+ }
+ switch (DB_TYPE) {
+ case "postgres":
+ if ($this->host == '' && $this->dbname == '') {
+ $conn = $this->conn;// CONN_STR;
+ } else {
+ $conn .= ($this->host != '') ? 'host='.$this->host.' ' : '';
+ $conn .= ($this->dbname != '') ? 'dbname='.$this->dbname.' ' : '';
+ $conn .= ($this->user != '') ? 'user='.$this->user." " : '';
+ $conn .= ($this->password != '') ? "password=".$this->password : '';
+ }
+ if (!$this->dbd = pg_connect($conn)) {
+ echo pg_errormessage($conn);
+ }
+ $this->_setSearchPath();
+ break;
+
+ default:
+ return 0;
+ break;
+ }
+ return $this->dbd;
+ }
+
+ // }}}
+
+ // {{{ _setSearchPath()
+
+ private function _setSearchPath()
+ {
+ // Add schemas to search path.
+ $format = "
+ SELECT set_config(
+ 'search_path',
+ current_setting('search_path') || ',%s',
+ false
+ )";
+
+ $sql = sprintf($format, 'toolbox');
+ $ret = $this->db_exec($sql);
+
+ $sql = sprintf($format, 'ckimages');
+ $this->db_exec($sql);
+
+ if (defined('CONTACT_DB') && CONTACT_DB) {
+ // define banner search path
+ $sql = sprintf($format, 'contacts');
+ $this->db_exec($sql);
+ }
+
+ if (defined('BANNERS') && BANNERS) {
+ // define banner search path
+ $sql = sprintf($format, 'banners');
+ $this->db_exec($sql);
+ }
+
+ if (defined('ROTATING_IMAGES') && ROTATING_IMAGES) {
+ // define rotating images search path
+ $sql = sprintf($format, 'rotatingImages');
+ $this->db_exec($sql);
+ }
+
+ if (defined('PHOTO_GALLERY') && PHOTO_GALLERY) {
+ // define phot gallery search path
+ $sql = sprintf($format, 'photos');
+ $this->db_exec($sql);
+ }
+
+ if (defined('EVENT_DB') && EVENT_DB) {
+ // define members search path
+ $sql = sprintf($format, 'events');
+ $this->db_exec($sql);
+ }
+
+ if (defined('POSTCARD_DB') && POSTCARD_DB) {
+ // define members search path
+ $sql = sprintf($format, 'postcards');
+ $this->db_exec($sql);
+ }
+
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ // define members search path
+ $sql = sprintf($format, 'members');
+ $this->db_exec($sql);
+ }
+
+ if (defined('COUPONS') && COUPONS) {
+ // define coupon search path
+ $sql = sprintf($format, 'coupons');
+ $this->db_exec($sql);
+ }
+ }
+
+ // }}}
+ // {{{ db_exec()
+
+ /** db_exec
+ *
+ * Execute an SQL query, * returning a valid result index or zero(0) on
+ * failure.
+ *
+ * {@source }
+ * @param $qs -- SQL query string
+ * @returns int Returns a valid result index on success 0 on failure
+ * @access public
+ */
+ function db_exec($qs)
+ {
+ if ($this->dbh) {
+ try {
+ $stmt = $this->dbh->query($qs);
+ $stmt->setFetchMode(PDO::FETCH_ASSOC);
+ return $stmt;
+ } catch(PDOEXception $e) {
+ Toolkit_Common::handleError($e);
+ }
+ }
+ if (!$this->dbd) {
+ $this->dbd = $this->db_connect();
+ }
+ switch (DB_TYPE) {
+ case "postgres":
+ if(!$ret = pg_exec($this->dbd, $qs)) {
+ echo "<font color=red>".$qs."</font>";
+ }
+ break;
+ default:
+ return false;
+ }
+ return $ret;
+ }
+
+ // }}}
+ // {{{ db_fetch_array()
+
+ /** db_fetch_array
+ *
+ * Stores the data in associative indices, using the field names as
+ * keys.
+ *
+ * {@source }
+ * @param $res -- valid database result index
+ * @param $i -- row number
+ * @param $type -- PGSQL_ASSOC,PGSQL_BOTH,PGSQL_NUM
+ * @returns array Returns an associative array of key-value pairs
+ * @access public
+ */
+
+ function db_fetch_array($res, $i = 0, $type = 'PGSQL_ASSOC')
+ {
+ if ($this->dbh) {
+ return $res->fetch(PDO::FETCH_ASSOC);
+ }
+ switch (DB_TYPE) {
+ case "postgres":
+ $row = pg_fetch_array($res, $i, $type);
+ break;
+
+ default:
+ return false;
+ }
+ return $row;
+ }
+
+ // }}}
+ // {{{ db_freeresult()
+
+ /** db_freeresult
+ *
+ * Free result memory.
+ *
+ * {@source }
+ * @param $res -- valid database result index
+ * @returns bool - Returns 1 for success 0 for failure
+ * @access public
+ */
+
+ function db_freeresult($res)
+ {
+ switch (DB_TYPE) {
+ case "postgres":
+ $ret = pg_freeresult($res);
+ break;
+
+ default:
+ return false;
+ }
+ return $ret;
+ }
+
+ // }}}
+ // {{{ db_numrows()
+
+ /** db_numrows
+ *
+ * Determine number of rows in a result index
+ *
+ * {@source }
+ * @param $res -- valid database result index
+ * @returns int - Returns number of rows
+ * @access public
+ */
+
+ function db_numrows($res)
+ {
+ if ($this->dbh) {
+ return $res->rowCount();
+ }
+ switch (DB_TYPE) {
+ case "postgres":
+ $ret = pg_numrows($res);
+ break;
+
+ default:
+ return -1;
+ }
+ return $ret;
+ }
+
+ // }}}
+ // {{{ delete()
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $table Parameter description (if any) ...
+ * @param unknown $condition Parameter description (if any) ...
+ * @return unknown Return description (if any) ...
+ * @access public
+ */
+ function delete($table, $condition)
+ {
+ return $this->pgsql_delete($table, $condition);
+ }
+
+ // }}}
+ // {{{ insert()
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $table Parameter description (if any) ...
+ * @param unknown $data Parameter description (if any) ...
+ * @param unknown $primary_key Parameter description (if any) ...
+ * @param unknown $sequence Parameter description (if any) ...
+ * @return unknown Return description (if any) ...
+ * @access public
+ */
+ function insert($table, $data, $primary_key, $sequence)
+ {
+ return $this->pgsql_insert($table, $data, $primary_key, $sequence);
+ }
+
+ // }}}
+ // {{{ pgsql_convert()
+
+ /**
+ * pgsql_convert
+ *
+ * converts an array (like _POST) and verifies field types to use in insert or update of postgres table
+ *
+ * @param mixed $table
+ * @param mixed $data
+ * @access public
+ * @return string
+ */
+ function pgsql_convert($table, $data)
+ {
+ $query = "select a.attname, format_type(a.atttypid, a.atttypmod)
+ from pg_class c, pg_attribute a
+ where c.relname = '$table'
+ and a.attnum > 0 and a.attrelid = c.oid
+ order by a.attnum";
+ if ($mData = $this->db_auto_get_data($query)) {
+ foreach ($mData as $mRow) {
+ $meta_data[$mRow['attname']] = $mRow['format_type'];
+ }
+ }
+ if (is_array($data)) {
+ foreach ($data as $field => $val) {
+ if ($meta_data[$field]) {
+ switch ($meta_data[$field]) {
+ case "integer":
+ case "double precision":
+ if ($val == '') {
+ $proc_data[$field] = 'NULL';
+ } elseif (is_numeric( $val)) {
+ $proc_data[$field] = $val;
+ } else{
+ die('value for field (int)'.$field.' is not a number');
+ }
+ break;
+ case "boolean":
+ if ($val == '') {
+ $proc_data[$field] = 'NULL';
+ } elseif ($val == 'f' || $val == 't') {
+ $proc_data[$field] = "'".$val."'";
+ } else{
+ die('value for field (boolean)'.$field.' is not a boolean');
+ }
+ break;
+ case "text":
+ // maybe check to see that the text is being slashed if not then prepare it for postgres
+ $text = addslashes( stripslashes( trim( $val)));
+ $proc_data[$field] = "'$text'";
+ break;
+ case "date":
+ if (preg_match( "/([0-9]{1,2})[\/-]?([0-9]{1,2})[\/-]?([0-9]{2,4})|/", $val)) {
+ $proc_data[$field] = "'".$val."'";
+ } else{
+ die('value for field (date)'.$field.' is not a date');
+ }
+ break;
+ default:
+ die('need case for this name:'.$field.' type: '.$meta_data[$field]);
+ break;
+ }
+ } else{
+ die('Error no field named '.$field.' exist in '.$table);
+ }
+ }
+ } else{
+ return false;
+ }
+ return $proc_data;
+ }
+
+ // }}}
+ // {{{ pgsql_delete()
+
+ /**
+ * pgsql_delete
+ *
+ * @param mixed $table
+ * @param mixed $condition
+ * @access public
+ * @return string
+ */
+ function pgsql_delete($table, $condition)
+ {
+ reset($condition);
+ $cKey = key($condition);
+ $query = "delete from $table where ";
+ $query .= $cKey;
+ $query .= " = ".$condition[$cKey];
+ return $this->db_exec( $query);
+ }
+
+ // }}}
+ // {{{ pgsql_insert()
+
+ /**
+ * pgsql_insert
+ *
+ * @param mixed $table
+ * @param mixed $data
+ * @param mixed $primary_key
+ * @param mixed $sequence
+ * @access public
+ * @return string
+ */
+ function pgsql_insert($table, $data, $primary_key, $sequence)
+ {
+ $converted = $this->pgsql_convert($table, $data);
+ if ($res = $this->db_exec("select nextval('$sequence') as $primary_key")) {
+ $insert_data = $this->db_fetch_array( $res, 0, PGSQL_ASSOC);
+ $insert_id = $insert_data[$primary_key];
+ } else {
+ die('returned no insert_id');
+ }
+ $query = "INSERT INTO $table ($primary_key,".implode(",",array_keys( $converted)).") values ($insert_id,".implode(",",array_values( $converted)).")";
+ if ($res = $this->db_exec($query)) {
+ $this->insert_id = $insert_id;
+ return $insert_id;
+ } else {
+ echo $query;
+ die('error');
+ }
+ }
+
+ // }}}
+ // {{{ pgsql_select()
+
+ /**
+ * pgsql_select
+ *
+ * @param mixed $query
+ * @access public
+ * @return string
+ */
+ function pgsql_select($query)
+ {
+ return $this->db_auto_get_data( $query);
+ }
+
+ // }}}
+ // {{{ pgsql_update()
+
+ /**
+ * pgsql_update
+ *
+ * @param mixed $table
+ * @param mixed $data
+ * @param mixed $condition
+ * @access public
+ * @return string
+ */
+ function pgsql_update($table, $data, $condition)
+ {
+ $converted = $this->pgsql_convert($table, $data);
+ foreach ($converted as $key => $value) {
+ $q_parts[] = "$key = $value";
+ }
+ reset($condition);
+ $cKey = key($condition);
+ if (is_array($converted)) {
+ $query = "update $table set ";
+ if (is_array($q_parts)) {
+ $query .= implode(",",$q_parts);
+ }
+ $query .= " where ";
+ $query .= $cKey;
+ $query .= " = ".$condition[$cKey];
+ }
+ $this->db_exec($query);
+ }
+
+ // }}}
+ // {{{ select()
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $query Parameter description (if any) ...
+ * @return unknown Return description (if any) ...
+ * @access public
+ */
+ function select($query)
+ {
+ return $this->db_auto_get_data($query);
+ }
+
+ // }}}
+ // {{{ trans_end()
+
+ /** trans_end
+ *
+ * Commit the postgres transaction
+ *
+ * {@source }
+ * @returns bool true if successful
+ * @access public
+ */
+ function trans_end()
+ {
+ if (!$this->trans) {
+ if(!$this->db_exec("COMMIT WORK;")) {
+ return false;
+ } else{
+ return true;
+ }
+ } else{
+ return false;
+ }
+ }
+
+ // }}}
+ // {{{ trans_exec()
+
+ /** trans_exec
+ *
+ * exec a postgres query in a
+ * postgres transaction
+ *
+ * {@source }
+ * @param string query
+ * @access public
+ */
+ function trans_exec($query)
+ {
+ if ($query != "") {
+ if(!$ret = $this->db_exec($query)) {
+ $this->db_exec("ABORT WORK;");
+ return false;
+ } else {
+ return $ret;
+ }
+ } else {
+ return false;
+ }
+ }
+
+ // }}}
+ // {{{ trans_start()
+
+ /** trans_start
+ *
+ * Start a postgres transaction
+ *
+ * {@source }
+ * @returns bool true if sucessful
+ * @access public
+ */
+ function trans_start()
+ {
+ if (!$this->trans) {
+ if (!$this->dbd = $this->db_connect()) {
+ $this->trans = false;
+ return false;
+ } else {
+ $this->db_exec("BEGIN WORK;");
+ $this->trans = true;
+ return true;
+ }
+ } else {
+ return true;
+ }
+ }
+
+ // }}}
+ // {{{ update()
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $table Parameter description (if any) ...
+ * @param unknown $data Parameter description (if any) ...
+ * @param unknown $condition Parameter description (if any) ...
+ * @return unknown Return description (if any) ...
+ * @access public
+ */
+ function update($table, $data, $condition)
+ {
+ return $this->pgsql_update($table, $data, $condition);
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/**
+ * Toolbox Classes :)
+ *
+ * @package Toolbox Library
+ * @subpackage Template Library
+ * @filesource
+ */
+
+require_once BASE."classes/class_db.inc";
+require_once BASE."classes/class_toolbox.inc";
+
+/**
+ * Template Class :)
+ *
+ * <p>
+ * $Id: class_template.inc,v 1.52 2010/07/04 23:53:44 jamie Exp $
+ * NOTE: for the search engine freindly url's use .htaccess file.
+ * need to make sure .htaccess is enabled or this work work
+ * to turn off seo url's set define SEO_URL to 0 in setup file
+ * NOTE: make sure you redo the www.domain.com lines in the .htaccess file
+ * need to set it up before testing with it.
+ * </p>
+ * <p>
+ * For the page title and meta tags make a $title and $meta vars depending on
+ * weather or not it is the home page.
+ * </p>
+ *
+ * @package Toolbox Library
+ * @subpackage Template Library
+ * @category Template
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2007
+ * @version $Revision: 1.52 $
+ * @since $Date: 2010/07/04 23:53:44 $
+ * @todo update the phpdocs for all classes
+ * @todo add title for all the navigation links if and only if they have page title
+ * @todo some tutorial in the docs for how to set things up.
+ */
+class GLM_TEMPLATE
+{
+ // {{{ properties
+
+ /**
+ * The category id for the page
+ * @var integer
+ * @access public
+ */
+ public $catid;
+
+ /**
+ * The postgres database handler
+ * @var object
+ * @access public
+ */
+ public $DB;
+
+ /**
+ * The starting style for the header
+ *
+ * class="content" should not be used anymore
+ *
+ * @var string
+ * @access protected
+ */
+ protected $header_begin = '<h1>';
+
+ /**
+ * The ending style for the header
+ * @var string header_end
+ * @access protected
+ */
+ protected $header_end = '</h1>';
+
+ /**
+ * The starting style for the sub header
+ * @var string
+ * @access protected
+ */
+ protected $subheader_begin = '<h2>';
+
+ /**
+ * The ending style for the sub header
+ * @var string
+ * @access protected
+ */
+ protected $subheader_end = '</h2>';
+
+ /**
+ * The starting position for images
+ *
+ * @var string
+ * @access protected
+ */
+ protected $img_align = 'left';
+
+ /**
+ * Whether to alternate the images or not
+ *
+ * for alternating images set to 1 else leave alone
+ *
+ * @var string
+ * @access protected
+ */
+ protected $img_alternate = 1;
+
+ /**
+ * The path to the image directory
+ * @var string
+ * @access protected
+ */
+ protected $img_size;
+
+ /**
+ * The category array
+ * @var array
+ * @access protected
+ */
+ protected $data;
+
+ /**
+ * The items array
+ * @var array
+ * @access protected
+ */
+ protected $items;
+
+ /**
+ * @var string type The type
+ */
+ protected $type;
+
+ /**
+ * Used for menu generation
+ * @var string whole_thread The thread string
+ */
+ protected $whole_thread = null;
+
+ /**
+ * Used for menu generation
+ * @var integer thread_count The thread count
+ */
+ protected $thread_count = 1;
+
+ /**
+ * @var array $pages
+ * @access protected
+ */
+ protected $pages;
+
+ /**
+ * adds active = 't' to queries only if ACTIVE_FLAG is set to true
+ * @var string
+ * @access protected
+ */
+ protected $active_query;
+
+ /**
+ * determines page layout
+ * @var integer
+ * @access protected
+ */
+ protected $template;
+
+ /**
+ * Page extension for php pages .php or .phtml
+ * @var string
+ * @access protected
+ */
+ protected $php_ext = '.php';
+
+ // }}}
+ // {{{ __construct()
+
+ /**
+ * GLM_TEMPLATE
+ *
+ * @param mixed $catid current page category id
+ * @param mixed $DB Object passed from GLM_DB if done
+ * @access public
+ * @return string
+ */
+ function __construct($catid, $DB = NULL)
+ {
+ // set the cache option from $GLOBALS
+ $this->cacheOptions = $GLOBALS['cacheOptions'];
+ // redo the cachDir
+ $this->cacheOptions['cacheDir'] = BASE . 'cache/';
+ // create a new instance of Cache_Lite
+ $this->cache = new Cache_Lite($this->cacheOptions);
+ $this->catid = $this->get_catid($catid);
+ // using a reference to $DB (should be started on setup.phtml
+ $this->set_DB($DB);
+ // switching to $GLOBALS['dbh']
+ $this->dbh = Toolkit_Database::getInstance();
+ // used for cvb's
+ $this->Member = $this->set_member();
+ // img_size are RESIZED, MIDSIZED, THUMB do not use ORIGINAL
+ $this->img_size = RESIZED;
+
+ $this->set_body_tag();
+ // Uses the PAGE array set in setup.phtml
+ $this->set_pages($GLOBALS['PAGES']);
+ // tell if page is active, deleted or inactive
+ $this->page_status($catid);
+ // set active query string
+ $this->set_active_query();
+ }
+
+ // }}}
+
+ // {{{ build_picklist()
+
+ /**
+ * build_picklist:
+ * @param string $fieldname:
+ * @param array $data:
+ * @param mixed $selected:
+ * @param string $type = "standard":
+ * @param boolean $auto = 0:
+ * @param integer $width = NULL :
+ *
+ * @uses GLM_TOOLBOX::build_picklist()
+ *
+ * @return string
+ * @access public
+ */
+ function build_picklist( $fieldname, $data, $selected, $type = "standard",$auto = 0,$width = NULL )
+ {
+ return GLM_TOOLBOX::build_picklist( $fieldname, $data, $selected, $type = "standard",$auto = 0,$width = NULL );
+ }
+
+ // }}}
+
+ // {{{ clean_text()
+
+ /**
+ * clean_text:get rid of single br or p br tags left from htmlarea when textarea is empty.
+ * @param string $output:
+ *
+ * @return string text cleaned
+ * @access public
+ **/
+ function clean_text($output)
+ {
+ $output = str_replace("<br />","<br>",$output);
+ $output = str_replace("<p><br></p>","",$output);
+ return $output;
+ }
+
+ // }}}
+ // {{{ convert_to_thread()
+
+ /**
+ * convert_to_thread:
+ *
+ * @param array $threads:
+ * @param array $thread:
+ * @uses GLM_TEMPLATE::$thread_count
+ * @uses GLM_TEMPLATE::$whole_thread
+ * @uses GLM_TEMPLATE::get_seo_url()
+ * @uses GLM_TEMPLATE::convert_to_thread()
+ *
+ * @return string
+ * @access public
+ */
+ function convert_to_thread($threads, $thread)
+ {
+ foreach($thread as $parent=>$value) {
+ $this->whole_thread .= str_repeat(".",$this->thread_count);
+ $this->whole_thread .= "|".htmlentities($value['category'],ENT_QUOTES,'UTF-8');
+ $url = $this->get_seo_url( $value['id'] );
+ $this->whole_thread .= "|$url";
+ $this->whole_thread .= "\n";
+ if ($threads[$parent]) {
+ $this->thread_count++;
+ GLM_TEMPLATE::convert_to_thread($threads, $threads[$parent]);
+ }
+ }
+ $this->thread_count--;
+ return $this->whole_thread;
+ }
+
+ // }}}
+
+ // {{{ has_children()
+
+ /**
+ * has_children: return true or false if this category has sub categories under it.
+ *
+ * @param integer $catid:
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return string
+ * @access public
+ */
+ function has_children($catid)
+ {
+ // returns number of children that $catid has
+ $qs = "
+ SELECT count(*)
+ FROM bus_category
+ WHERE parent = $catid {$this-> active_query}";
+ $row=$this->DB->db_auto_get_data($qs);
+ return $row[0]['count'];
+ }
+
+ // }}}
+ // {{{ has_subs()
+
+ /**
+ * has_subs:
+ * @param integer $catid:
+ * @param object $DB:
+ *
+ * @uses GLM_TEMPLATE::$active_query
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return string
+ * @access public
+ */
+ function has_subs($catid, &$DB)
+ {
+ $sql = "
+ SELECT id
+ FROM bus_category
+ WHERE parent = $catid {$this->active_query}
+ ORDER BY pos";
+ $data = $DB->db_auto_get_data($sql);
+ return is_array($data);
+ }
+
+ // }}}
+
+ // {{{ get_all()
+
+ /**
+ * get_all:Does the query and set_data calls boths arrays
+ *
+ * @uses GLM_TEMPLATE::set_data()
+ * @uses GLM_TEMPLATE::$data
+ * @uses GLM_TEMPLATE::$items
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return void
+ * @access public
+ **/
+ function get_all($type = NULL)
+ {
+ $catid = $this->catid;
+ if ($type == 1 || !$type) {
+ $cat_query = "
+ SELECT *
+ FROM bus_category
+ WHERE id = $catid
+ ORDER BY pos";
+ try {
+ $res = $this->set_data($this->dbh->query($cat_query)->fetchAll());
+ $this->data = $res[0];
+ } catch(PDOException $e) {
+ echo '<pre>'.print_r($e, true).'</pre>';
+ die($e->getMessage());
+ }
+ }
+ //$this->img_size = MIDSIZED;
+ //$this->img_size = RESIZED;
+ if ($type == 2 || !$type) {
+ $item_query = "
+ SELECT b.*
+ FROM bus b
+ LEFT OUTER JOIN bus_category_bus bcb ON (bcb.busid = b.id)
+ WHERE bcb.catid = $catid
+ ORDER BY bcb.pos";
+ try {
+ $this->items = $this->set_data($this->dbh->query($item_query)->fetchAll());
+ } catch(PDOException $e) {
+ echo '<pre>'.print_r($e, true).'</pre>';
+ die($e->getMessage());
+ }
+ $file_query = "
+ SELECT *
+ FROM files
+ WHERE bus_id IN ( SELECT bus_id FROM bus_category_bus
+ WHERE catid = ".$this->catid." )
+ ORDER BY bus_id,pos;";
+ try {
+ $file_data = $this->DB->db_auto_get_data($file_query);
+ } catch(PDOException $e) {
+ echo '<pre>'.print_r($e, true).'</pre>';
+ die($e->getMessage());
+ }
+ if (is_array($file_data)) {
+ foreach ($file_data as $file_row) {
+ $this->item_files[$file_row['bus_id']][] = GLM_TEMPLATE::set_file( $file_row['filename'],$file_row['urltext'] );
+ }
+ }
+ }
+ }
+
+ // }}}
+ // {{{ get_ancestors()
+
+ /**
+ * get_ancestors:get the ancestors for this category
+ *
+ * @param integer $catid: catid
+ * @param integer $count: starting counter
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return array
+ * @access public
+ */
+ function get_ancestors($catid, $count)
+ {
+ if ($count == 0 ) {
+ unset ($this->ancestors);
+ }
+
+ if ($catid) {
+ $query = "
+ SELECT id,category,parent
+ FROM bus_category
+ WHERE id = ".$catid."
+ ".$this->active_query;
+
+ $res = $this->DB->db_auto_get_data($query);
+ $id = $res[0]['id'];
+ $parent = $res[0]['parent'];
+ $category = $res[0]['category'];
+ $this->ancestors[$count]['id'] = $id;
+ $this->ancestors[$count]['label'] = $category;
+
+ $url = $this->get_seo_url( $id );
+ $this->ancestors[$count]['link'] = $url;
+ GLM_TEMPLATE::get_ancestors($parent,$count+1);
+
+ return array_reverse($this->ancestors);
+ }
+ }
+
+ // }}}
+ // {{{ get_base_url()
+
+ /**
+ * get_base_url: generate the base of the url for the given category id
+ * @param integer $id :
+ *
+ * @return string
+ * @access public
+ */
+ function get_base_url($id)
+ {
+ if ($this->pages[$id]) {
+ $page = $this->pages[$id];
+ } else {
+ $page = $this->pages['default'];
+ }
+ if ($GLOBALS['GLM_SERVER_ID'] == 'ws1.gaslightmedia.com' &&
+ $this->catid == 1) {
+ $page = '';
+ }
+ return $page;
+ }
+
+ // }}}
+ // {{{ get_bottom_nav()
+
+ /**
+ * get_bottom_nav: generate a top level only bottom navigation for the pages.
+ *
+ * @param integer $parent=0:
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return string
+ * @access public
+ */
+ function get_bottom_nav($parent=0)
+ {
+ $out = '';
+ $query = "select id,category,intro from bus_category where id != 1 and parent = $parent ".$this->active_query." order by pos asc";
+ $row = $this->DB->db_auto_get_data( $query );
+ $url = $this->get_seo_url( HOME_ID );
+ $links[] = '<a href="'.$url.'">Home</a>';
+ if (!is_array( $row ) ) {
+ return false;
+ } else {
+ $out .= '<div id="nav-bottom">';
+ for ($i = 0; $i < sizeof($row); $i++) {
+ $category = htmlentities(strip_tags($row[$i]['category']),ENT_QUOTES,'UTF-8');
+ $url = $this->get_seo_url( $row[$i]['id'] );
+ $links[] = '<a href="'.$url.'">'.$category."</a>\n";
+ }
+ if (is_array($links)) {
+ $out .= implode(" | ",$links);
+ }
+ $out .= '</div>';
+ return $out;
+ }
+ }
+
+ // }}}
+ // {{{ get_bread_crumbs()
+
+ /**
+ * get_bread_crumbs
+ *
+ * @param mixed $catid
+ * @access public
+ * @return string
+ */
+ function get_bread_crumbs($catid)
+ {
+ $string = $this->get_ancestors($catid, 0);
+ $isMemberProfilePage = ( isset($_GET['member_id'])
+ && ctype_digit((string)$_GET['member_id']));
+ if (is_array($string)) {
+ // adjust end if we have a profile page so we can last search
+ // page as link.
+ $end = $isMemberProfilePage ? count($string) : count($string) - 1;
+ if ($this->catid != HOME_ID) {
+ $outarray[] = '<a href="'.BASE_URL.'">Home</a>';
+ }
+ for($i = 0; $i < $end; ++$i) {
+ $outarray[] = '<a href="'.$string[$i]["link"].'">'.$string[$i]["label"].'</a>';
+ }
+ if ( isset($_GET['photo_catid'])
+ && defined('PHOTO_GALLERY')
+ && PHOTO_GALLERY
+ && ctype_digit($_GET['photo_catid'])
+ ) {
+ // user is now in a photo gallery albumn.
+ // need to update the breadcrumbs for this.
+ $currPageUri = $this->get_seo_url($catid);
+ $currPageLabel = $this->get_catheader($catid, $this->DB);
+
+ $outarray[] = '<a href="'.$currPageUri.'">'.$currPageLabel.'</a>';
+
+ $sql = "
+ SELECT category
+ FROM photo_category
+ WHERE id = :id";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':id', $_GET['photo_catid'], PDO::PARAM_INT);
+ $stmt->execute();
+ $stmt->bindColumn('category', $photoCategory);
+ $stmt->fetch();
+
+ $outarray[] = $photoCategory;
+ } else {
+ if (!$isMemberProfilePage) {
+ $outarray[] = $this->get_catheader($catid, $this->DB);
+ } else {
+ $memberBreadCrumbs = new Toolkit_Members_BreadCrumbs();
+ $memberData = $memberBreadCrumbs->getArray(
+ $this->dbh,
+ $_GET['member_id']
+ );
+
+ $outarray = array_merge($outarray, $memberData);
+ }
+ }
+ $out = '';
+ if (is_array($outarray) && count($outarray) > 1) {
+ $out .= implode(" > ", $outarray);
+ }
+ if ($out) {
+ $return = '<div id="breadcrumbs">'.$out.'</div>';
+ }
+ }
+ return $return;
+ }
+
+ // }}}
+ // {{{ get_category()
+
+ /**
+ * get_category: grab just category contents
+ * @param integer $catid: id of bus_category
+ * @param boolean $showimg=1: weather or not to show category image
+ * @uses DELUXE_TOOLBOX
+ * @uses HOME_PAGE_EVENTS
+ * @uses GLM_TEMPLATE::clean_text()
+ * @uses GLM_TEMPLATE::get_home_events()
+ *
+ * @return string $output
+ * @access public
+ **/
+ function get_category($showimg = 1, $showdiv = 1)
+ {
+ if ($pageContent = $this->cache->get('page-'.$this->catid, 'Toolbox')) {
+ $sql = "
+ SELECT intro
+ FROM bus_category
+ WHERE id = :id";
+ try {
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(":id", $this->catid, PDO::PARAM_INT);
+ $stmt->execute();
+ $this->data['intro'] = $this->set_header($stmt->fetchColumn());
+ } catch(PDOException $e) {
+ Toolkit_Common::handleError($e);
+ }
+ return $pageContent;
+ } else {
+ if (DELUXE_TOOLBOX) {
+ $this->get_template("cat");
+ }
+ if (!$this->data) {
+ $this->get_all(1);
+ }
+ $data = $this->data;
+ // Setup the section_links boolean var so section links only
+ // show up on correct pages.
+ $this->section_links = ($data['section_links'] == 't');
+ if ( !$data["image"]
+ && !$data["description"]
+ && !$data["intro"] &&
+ ($this->catid != 1 && HOME_PAGE_EVENTS != true)
+ ) {
+ return false;
+ }
+
+ $output = '';
+ if ($showdiv == 1) {
+ $output .= '<div id="category">';
+ }
+
+ if ($this->catid == 1 && HOME_PAGE_EVENTS ) {
+ $output .= $this->get_home_events();
+ }
+
+ if ($data["image"] || $data["description"] || $data["intro"]) {
+ // $output .= $data["intro"] . ' ';
+ if ($showimg == 1) {
+ $output .= $data["image"] . ' ';
+ }
+ $output .= $data["description"] . ' ';
+ }
+
+ if ($showdiv == 1) {
+ $output .= '</div>';
+ }
+ $output = GLM_TEMPLATE::clean_text($output);
+ $this->cache->save($output, 'page-'.$this->catid, 'Toolbox');
+ return $output;
+ }
+
+ }
+
+ // }}}
+ // {{{ get_category_name()
+
+ /**
+ * getCategoryName:
+ * used mostly for getting category name for search engine friendly url's
+ *
+ * @param integer $id:
+ * @param string $table:
+ * @param object &$DB :
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return void
+ * @access public
+ */
+ function get_category_name($id, $table, &$DB)
+ {
+ if (!is_numeric($id)) {
+ return false;
+ }
+ if ($table == "class_category") {
+ $category = "name";
+ } else {
+ $category = "category";
+ }
+ $query = "
+ SELECT {$category}
+ FROM {$table}
+ WHERE id = :id";
+ try {
+ $stmt = $this->dbh->prepare($query);
+ $stmt->bindParam(":id", $id, PDO::PARAM_INT);
+ $stmt->execute();
+ $data = $stmt->fetchAll();;
+ } catch(PDOException $e) {
+ echo '<pre>'.print_r($e, true).'</pre>';
+ die($e->getMessage());
+ }
+ if (is_array($data)) {
+
+ $add = '-'.$id;
+ if ($data[0]['category']) {
+ $category = $data[0]['category'].$add;
+ } elseif ($data[0]['name']) {
+ $category = $data[0]['name'].$add;
+ } else {
+ $category = $add;
+ }
+ return htmlspecialchars($category);
+ }
+ }
+
+ // }}}
+ // {{{ get_catheader()
+
+ /**
+ * get_catheader:output the category name.
+ *
+ * @param integer $catid: The catid for the page
+ * @param object $DB: db obj
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return void
+ * @access public
+ */
+ function get_catheader($catid, &$DB)
+ {
+ $query = "SELECT category FROM bus_category WHERE id = $catid";
+ $data = $DB->db_auto_get_data($query);
+ if ($data[0]['category']!="") {
+ $header = strip_tags($data[0]['category']);
+ } else {
+ $header = '';
+ }
+ return $header;
+ }
+
+ // }}}
+ // {{{ get_catid()
+
+ /**
+ * get_catid: setting catid for class
+ *
+ * We should be using the $_POST or $_GET globals here
+ *
+ * @return int catid
+ * @access public
+ **/
+ function get_catid($catid)
+ {
+ if (is_numeric($_GET['catid'])) {
+ return $_GET['catid'];
+ } elseif (is_numeric($_POST['catid'])) {
+ return $_POST['catid'];
+ } else {
+ return $this->catid = $catid;
+ }
+ }
+
+ // }}}
+ // {{{ get_catintro()
+
+ /**
+ * get_catintro: return the category page name.
+ *
+ * @param integer $catid: The catid for the page
+ * @param object $DB: db obj
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return void
+ * @access public
+ */
+ function get_catintro($catid)
+ {
+ $query = "SELECT intro FROM bus_category WHERE id = $catid";
+ $data = $this->DB->db_auto_get_data($query);
+ if ($data[0]['intro']!="") {
+ $header = strip_tags($data[0]['intro']);
+ } else {
+ $header = '';
+ }
+ return $header;
+ }
+
+ // }}}
+ // {{{ get_distance_from_traverse()
+
+ function get_distance_from_traverse( $zipcode ){
+ if (is_numeric( $zipcode ) ){
+ // zipcode for search is 49684
+ $tlat = (float)44.77329;
+ $tlon = (float)-85.70123;
+ $zipDB = new GLM_DB();
+ $zipDB->host = 'ds1';
+ $zipDB->dbname = 'zip';
+ $zipDB->pgsql_select( "BEGIN WORK;" );
+ $query = "
+ SELECT lat, lon, city, state_name
+ FROM zip
+ WHERE zipcode = '$zipcode'
+ order by city_type desc limit 1 offset 0;";
+ if ($data = $zipDB->pgsql_select( $query ) ){
+ $lat = (float)$data[0]['lat'];
+ $lon = (float)$data[0]['lon'];
+ $city = $data[0]['city'];
+ $state = $data[0]['state_name'];
+ }
+
+ $temp = "(pow(sin( ( ( $tlat * pi()/180.0 ) - ( $lat * pi()/180.0 )) /2.0),2) + cos( ( $lat * pi()/180.0 )) * cos( ( $tlat * pi()/180.0 ) ) * pow(sin( ( ( $tlon * pi()/180.0 ) - ( $lon * pi()/180.0 )) /2.0),2))";
+ $query = "select ceil(3956 * 2 * atan2(sqrt($temp ),sqrt(1- ($temp) ))) as distance";
+ if ($zip_data = $zipDB->pgsql_select( $query ) ){
+ $zipDB->pgsql_select( "ABORT WORK;" );
+ $zdata['remote_addr'] = $_SERVER['REMOTE_ADDR'];
+ $zdata['zipcode'] = $zipcode;
+ $zdata['city'] = $city;
+ $zdata['state'] = $state;
+ $this->DB->pgsql_insert( 'zip_dist_form', $zdata, 'zip_dist_form_id', 'zip_dist_form_zip_dist_form_id_seq', true );
+ return $zip_data[0]['distance'];
+ }
+ }
+ }
+
+ // }}}
+ // {{{ get_event_date()
+
+ /**
+ * get_event_date: make the event date human readable
+ *
+ * @param string $sdate start date
+ * @param string $edate end date
+ * @param string $dateType dateType Postgres,etc
+ * @param boolean $microFormat use microformating on output
+ *
+ * @return string
+ * @access public
+ */
+ function get_event_date(
+ $sdate,
+ $edate,
+ $dateType,
+ $microFormat = false
+ ) {
+ switch($dateType) {
+ case "Postgres":
+ $postgresPattern = "/([0-9]{1,2})[/-]([0-9]{1,2})[/-]([0-9]{4})/";
+ if (preg_match($postgresPattern, $sdate, $spt)) {
+ $mon = $spt[1];
+ $day = $spt[2];
+ $yr = $spt[3];
+ }
+
+ if (preg_match($postgresPattern, $edate, $ept)) {
+ $mon2 = $ept[1];
+ $day2 = $ept[2];
+ $yr2 = $ept[3];
+ }
+ break;
+ case "eventstamp":
+ case "timestamp":
+ $mon = date("m",$sdate);
+ $day = date("d",$sdate);
+ $yr = date("Y",$sdate);
+ $mon2 = date("m",$edate);
+ $day2 = date("d",$edate);
+ $yr2 = date("Y",$edate);
+ break;
+ }
+
+ $start = mktime(0,0,0,$mon,$day,$yr);
+ $end = mktime(0,0,0,$mon2,$day2,$yr2);
+ if ($day == $day2 && $mon == $mon2 && $yr == $yr2) {
+ $dateparam = "M j, Y";
+ $dateBegin = date($dateparam, $start) ;
+ $dateEnd = "";
+ } elseif ($day == $day2 AND $mon == $mon2 AND $yr != $yr2) {
+ $dateparam1 = "M j, Y -";
+ $dateparam2 = "Y";
+ $dateBegin = date($dateparam1, $start);
+ $dateEnd = date($dateparam2, $end);
+ } elseif ($day != $day2 AND $mon == $mon2 AND $yr == $yr2) {
+ $dateparam1 = "M j -";
+ $dateparam2 = "j, Y";
+ $dateBegin = date($dateparam1, $start);
+ $dateEnd = date($dateparam2, $end);
+ } elseif ($day != $day2 AND $mon == $mon2 AND $yr != $yr2) {
+ $dateparam1 = "M j, Y -";
+ $dateparam2 = "M j, Y";
+ $dateBegin = date($dateparam1, $start);
+ $dateEnd = date($dateparam2, $end);
+ } elseif ($yr == $yr2) {
+ $dateparam1 = "M j -";
+ $dateparam2 = "M j, Y";
+ $dateBegin = date($dateparam1, $start);
+ $dateEnd = date($dateparam2, $end);
+ } else {
+ $dateparam1 = "M j, Y -";
+ $dateparam2 = "M j, Y";
+ $dateBegin = date($dateparam1, $start);
+ $dateEnd = date($dateparam2, $end);
+ }
+ if ($microFormat) {
+ $dateBegin = '<span class="dtstart">
+ <span class="value" title="'.date('Y-m-d', $start).'">' .
+ $dateBegin . '</span>
+ </span>';
+ $dateEnd
+ = ($dateEnd)
+ ? '<span class="dtend">
+ <span class="value" title="'.date('Y-m-d', $end).'">' .
+ $dateEnd . '</span>
+ </span>'
+ : '';
+ }
+ return $dateBegin." ".$dateEnd;
+ }
+
+ // }}}
+ // {{{ get_headlines()
+
+ function get_headlines()
+ {
+ $headlines = array();
+ $query = "
+ SELECT id,intro,feature_intro,description,image
+ FROM bus_category
+ WHERE featured = 't'
+ AND active = 't'
+ ORDER BY parent,pos;";
+ if( $data = $this->DB->pgsql_select( $query ) ){
+ foreach( $data as $row ){
+ $headlines[] = array(
+ 'href' => $this->get_seo_url($row['id']),
+ 'img' => ($row['image']) ? THUMB . $row['image']: '',
+ 'header' => $row['feature_intro'],
+ 'descr' => GLM_TOOLBOX::make_teaser($row['description'], 150, true));
+ }
+ }
+ return $headlines;
+ }// }}}
+ // {{{ get_home_events()
+ /**
+ * get_home_events: get events flaged as home events
+ *
+ * @uses GLM_TEMPLATE::get_event_date()
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return void
+ * @access public
+ **/
+ public function get_home_events($limit = 3)
+ {
+ $query = "
+ SELECT id, header, descr, bdate, edate, img,
+ to_char(bdate, 'Mon - DDth') AS sdate
+ FROM event
+ WHERE visable='t'
+ AND edate >= current_date
+ AND home='t'
+ ORDER BY bdate asc, edate asc";
+ $data = $this->DB->db_auto_get_data($query);
+ if(is_array($data)) {
+ foreach($data as $key => $value) {
+ $id = $value['id'];
+ $header = $value['header'];
+ $title = strip_tags(addslashes($header));
+ $descr = GLM_TOOLBOX::make_teaser($value['descr'], 250, true);
+ $sdate = strtotime($value['bdate']);
+ $edate = strtotime($value['edate']);
+ $month = date('n',$sdate);
+ $year = date('Y',$sdate);
+ $dates = GLM_TEMPLATE::get_event_date($sdate,$edate,"timestamp");
+ $href = BASE_URL.'index.php?catid='.EVENT_PAGE."&month={$month}&year={$year}&eventid={$id}";
+ $area_events[] = array(
+ 'href' => $href,
+ 'bdate' => $value['sdate'],
+ 'dates' => $dates,
+ 'header' => $header,
+ 'descr' => $descr,
+ );
+ }
+ return $area_events;
+ } else {
+ return null;
+ }
+ }// }}}
+ // {{{ get_hotspecials()
+
+ function get_hotspecials(){
+ $query = "
+ SELECT id, intro, feature_intro
+ FROM bus_category
+ WHERE featured = 't'
+ order by parent, pos;";
+ if ($data = $this->DB->pgsql_select( $query ) ){
+ $out = '<div id="h-hotspecials">
+ <span class="h-all">Hot specials</span>';
+ foreach ($data as $row) {
+ $intro = htmlspecialchars(strip_tags($row['intro']));
+ $intro_text = '<p>'.htmlspecialchars(strip_tags($row['feature_intro'] ) ).'</p>';
+ $out .= '<div class="h-hotspecial">
+ <a href="'.$this->get_seo_url( $row['id'] ).'">'.$intro.'</a>
+ '.$intro_text.'
+ </div>';
+ }
+ $out .= '</div>';
+ }
+ return $out;
+ }
+
+ // }}}
+ // {{{ get_main_nav()
+
+ function get_main_nav()
+ {
+ $query = "select id,category
+ from bus_category
+ where parent = 0
+ and id not in (".HOME_ID.",".MEMBERS_CATEGORY.",7,8,9)
+ and active = 't'
+ order by pos";
+ if ($data = $this->DB->pgsql_select( $query ) ){
+ $out = '<ul id="nav">';
+ foreach( $data as $row ){
+ $out .= '<li><a href="'.$this->get_seo_url( $row['id'] ).'">'.$row['category'].'</a></li>';
+ }
+ $out .= '</ul>';
+ }
+ return $out;
+ }
+
+ // }}}
+ // {{{ get_menu_array()
+
+
+ /**
+ * get_menu_array: like get_menu_string but returns an array
+ *
+ * @uses GLM_TEMPLATE::sort_childs()
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return string
+ * @access public
+ */
+ function get_menu_array()
+ {
+ $query = "
+ SELECT id, parent, category
+ FROM bus_category
+ WHERE id != 0 {$this->active_query}
+ order by parent, pos";
+ $data = $this->DB->db_auto_get_data($query);
+ $newdata = GLM_TEMPLATE::sort_childs($data);
+ return $newdata;
+ }
+
+ // }}}
+ // {{{ get_main_cats()
+
+ /**
+ * get_main_cats
+ *
+ * @access public
+ * @return string
+ */
+ function get_main_cats()
+ {
+ static $main_cats_array;
+ if (!is_array($main_cats_array)) {
+ $query = "
+ SELECT id, category
+ FROM bus_category
+ WHERE parent = 0
+ order by pos;";
+ if ($data = $this->DB->db_auto_get_data($query)) {
+ foreach ($data as $row) {
+ $main_cats_array[$row['id']] = htmlentities(strip_tags($row['category']),ENT_QUOTES,'UTF-8');
+ }
+ }
+ }
+ return $main_cats_array;
+ }
+
+ // }}}
+ // {{{ get_menu_string()
+
+ /**
+ * get_menu_string:get categories for the phplayermenu
+ *
+ * @uses GLM_TEMPLATE::sort_childs()
+ * @uses GLM_TEMPLATE::convert_to_thread()
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return string
+ * @access public
+ **/
+ function get_menu_string()
+ {
+ $query = "
+ SELECT id, parent, category
+ FROM bus_category
+ WHERE id != 0 {$this->active_query}
+ ORDER BY parent, pos";
+ $data = $this->DB->db_auto_get_data($query);
+ $newdata = GLM_TEMPLATE::sort_childs($data);
+ $string = GLM_TEMPLATE::convert_to_thread($newdata,$newdata[0]);
+ return $string;
+ }
+
+ // }}}
+ // {{{ get_id_from_name()
+
+ /**
+ * getIdFromName:
+ *
+ * @param string $name:
+ * @param string $table:
+ * @param object $DB:
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @deprecated Don't use this! THIS IS A WARNING (this funcion will be gone next time)
+ * @return string
+ * @access public
+ */
+ function get_id_from_name( $name, $table, &$DB)
+ {
+ if ($name == "") {
+ return 0;
+ }
+ if (is_numeric($name)) {
+ return $name;
+ }
+ $pattern = "/(.*)/$/";
+ if (preg_match($pattern, $name, $tmp)) {
+ $name = $tmp[1];
+ }
+ $category = "category";
+ $pattern = "/-([0-9]*)$/";
+ if (preg_match($pattern, $name, $tmp)) {
+ $id = $tmp[1];
+ return $id;
+ }
+ // should already be returning id at this point
+ // putting the _id on the end of all url's as
+ // the other way is very inifiecent for the database.
+ $name = str_replace( "-"," ",$name );
+ $query = "select id from $table where trim(lower(replace(replace(replace(replace(replace(replace($category,'\'',''),'/',''),'-',' '),'#',''),'&',''),'?',''))) = '".trim(strtolower($name))."'";
+ $data = $DB->db_auto_get_data($query);
+ if (is_array($data)) {
+ foreach ($data as $key => $val) {
+ $catid = $val['id'];
+ }
+ return $catid;
+ } else {
+ return 0;
+ }
+ }
+
+ // }}}
+ // {{{ get_id_from_path_info()
+
+ /**
+ * get_id_from_path_info: takes the path_info and gets a catid from bus_category table
+ * NOTE: not used.
+ *
+ * @deprecated using .htaccess file for this when using seo url's
+ * @return int catid
+ * @access public
+ **/
+ function get_id_from_path_info()
+ {
+ return false;
+ }
+
+ // }}}
+ // {{{ get_image_path()
+
+ /**
+ * get_image_path: get image path from the size used
+ *
+ * @uses MIDSIZED_PATH
+ * @uses RESIZED_PATH
+ * @uses THUMB_PATH
+ *
+ * @return path for images
+ * @access public
+ **/
+ function get_image_path()
+ {
+ if (strstr($this->img_size, 'midsized/')) {
+ return MIDSIZED_PATH;
+ }
+ if (strstr($this->img_size,'resized/')) {
+ return RESIZED_PATH;
+ }
+ if (strstr($this->img_size,'thumb/')) {
+ return THUMB_PATH;
+ }
+ }
+
+ // }}}
+ // {{{ get_listings()
+
+ /**
+ * template_parser:This function creates data
+ * and items arrays and does the output for the page.
+ *
+ * @uses DELUXE_TOOLBOX
+ * @uses GLM_TEMPLATE::$items
+ * @uses GLM_TEMPLATE::get_template()
+ * @uses GLM_TEMPLATE::get_all()
+ * @uses GLM_TEMPLATE::load_static_page()
+ * @uses GLM_TEMPLATE::clean_text()
+ * @uses GLM_TEMPLATE::$item_files
+ *
+ * @return void
+ * @access public
+ */
+ function get_listings()
+ {
+ if ($paragraphContent = $this->cache->get('paragraphs-'.$this->catid, 'Toolbox')) {
+ return $paragraphContent;
+ } else {
+ // grab category and items into data and items respectfully
+ if (DELUXE_TOOLBOX ) {
+ $this->get_template( "list" );
+ }
+
+ if (!is_array($this->items)) {
+ $this->get_all(2);
+ }
+
+ $output = '';
+ // load any static category page from the static directory
+ // hard codded content would have $catid.phtml page for it
+ //$output .= $this->load_static_page();
+ if (is_array($this->items)) {
+ $anchors = array();
+ foreach($this->items as $key=>$val) {
+ // building array with links to each paragraph
+ $name = trim(strip_tags($val["name"]));
+ if ($name && $this->section_links) {
+ $anchors[] = '<a href="#sect-'.$val['id'].'">'.strip_tags($val["name"]).'</a>';
+ }
+ // items can be moved around as needed
+ $output .= '<div class="listing" id="sect-'.$val['id'].'">'."\n";
+ $output .= $val["name"];
+ $output .= $val["image"];
+ $output .= $val["address"];
+ $output .= $val["description"];
+ $output .= $val["contactname"];
+ $output .= $val["email"];
+ $output .= $val["phone"];
+ $output .= $val["fax"];
+ $output .= $val["url"];
+ if ( isset($this->item_files[$val['id']])
+ && is_array($this->item_files[$val['id']])
+ ) {
+ $output .= implode('', $this->item_files[$val['id']]);
+ }
+ if ($val['back_to_top'] == 't') {
+ $output .= '<a href="#toolbox">Back to Top</a>';
+ }
+ $output .= "</div>"."\n";
+ }
+ // assign array of links to $this->sectionAnchors
+ $this->sectionAnchors = $anchors;
+ }
+ $output = GLM_TEMPLATE::clean_text($output);
+ $this->cache->save($output, 'paragraphs-'.$this->catid, 'Toolbox');
+ return $output;
+ }
+ }
+
+ // }}}
+ // {{{ get_page()
+
+ /**
+ * get_page: replacing template_parser with get_page function
+ *
+ * @uses GLM_TEMPLATE::get_category() For building the main page section
+ * @uses GLM_TEMPLATE::get_listings() For building out the paragraph sections
+ *
+ * @return string $out NEED to echo results of this function
+ * @access public
+ */
+ function get_page($showimg = 1, $showdiv = 1)
+ {
+ if (isset($_REQUEST['sitemap']) && $_REQUEST['sitemap'] == 1) {
+ return $this->get_sitemap();
+ } elseif ( isset($_REQUEST['zipcode'])
+ && is_numeric($_REQUEST['zipcode'])
+ ) {
+ $this->distance = '<div>'.$this->get_distance_from_traverse($_REQUEST['zipcode']).' miles from '.$_REQUEST['zipcode'].'</div>';
+ }
+
+ if ($this->page_status != 'Good') {
+ return '<h1>Sorry this page is Down!</h1>';
+ }
+
+ if ( defined('GOOGLE_SEARCH')
+ && GOOGLE_SEARCH
+ && isset($_REQUEST['query'])
+ && $_REQUEST['query']
+ ) {
+ $out = '<div id="searchcontrol"></div>';
+ } elseif ( isset($_REQUEST['member_id'])
+ && is_numeric($_REQUEST['member_id'])
+ && !$this->Member->memberSections[$this->catid]
+ ) {
+ $out = $this->load_static_page();
+ } elseif ( defined('MEMBERS_DB')
+ && MEMBERS_DB
+ && isset($this->Member->memberSections)
+ && $this->Member->memberSections[$this->catid]
+ ) {
+ $GLOBALS['bottomScripts'][]
+ = BASE_URL . 'Toolkit/Members/libjs/travel-list.js';
+ $out = $this->get_bread_crumbs($this->catid);
+ if ( !isset($_REQUEST['member_id'])
+ && !isset($_REQUEST['search'])
+ && !isset($_REQUEST['start'])
+ ) {
+ $out .= $this->get_category($showimg,0);
+ $pageHeader = $this->data['intro'];
+ $out .= '<div id="category">';
+ $out .= $pageHeader;
+ // $out .= $category;
+ $out .= '</div>';
+ }
+
+ // application configuration
+ $conf = new Config;
+ $root = $conf->parseConfig(
+ BASE . 'Toolkit/Members/config.ini',
+ 'IniFile'
+ );
+
+ if (isset($_GET['member_id']) && ctype_digit($_GET['member_id'])) {
+ try {
+ $profile = new Toolkit_Members_ProfilePage(
+ Toolkit_Database::getInstance(),
+ new Toolkit_Image_Server(),
+ $_GET['member_id']
+ );
+ $profile->setCatId($this->catid);
+ $profile->setConfig($root);
+ $flexy = new HTML_Template_Flexy(
+ Toolkit_Members::getFlexyOptions()
+ );
+ $cache = new Cache_Lite(Toolkit_Members::getCacheOptions());
+ $out .= $profile->toHtml($flexy, $cache, MEMBER_RESIZED);
+ } catch (PEAR_Exception $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ } elseif ( isset($_GET['search'])
+ || $this->Member->hideUserSearchForm()
+ ) {
+ if ($this->Member->includeMemberMap()) {
+ $googleMap = new Toolkit_Members_Map();
+ $out .= $googleMap->toHtml();
+ }
+
+ $searchQuery = new Toolkit_Members_SearchQueryGenerator(
+ true,
+ $root
+ );
+ $sql = $searchQuery->getQuery($this->dbh);
+ $searchList = new Toolkit_Members_SearchList(
+ $this->dbh,
+ 50,
+ null,
+ null,
+ true
+ );
+
+ $searchList->setConfig($root);
+ $searchList->setQuery($sql);
+ $searchList->setDefaultSort(array('member_name' => 'ASC'));
+ // rendering engine to use
+ $rEngine = new Structures_DataGrid_Renderer_Flexy();
+ // template options to use for template engine
+ $tplOpts = Toolkit_Members::getFlexyOptions();
+ // templating engine to use
+ $tEngine = new HTML_Template_Flexy($tplOpts);
+ $rEngine->setContainer($tEngine);
+
+ $out .= $searchList->toHtml($rEngine);
+ } else {
+ if ($this->Member->includeMemberMap()) {
+ $googleMap = new Toolkit_Members_Map();
+ $out .= $googleMap->toHtml();
+ }
+
+ $action = BASE_URL . "index.php?catid={$this->catid}";
+ $form = new Toolkit_Members_UserSearchForm(
+ 'SearchForm',
+ 'get',
+ $action,
+ null,
+ null,
+ true
+ );
+ $res = $form->setCatId($this->catid);
+ if (!PEAR::isError($res)) {
+ $form->setPageMemberCategories($this->dbh);
+ $form->configureForm($this->dbh, $root);
+ $out .= $form->toHtml(Toolkit_Members::getFlexyOptions());
+ } else {
+ return Toolkit_Common::handleError($res);
+ }
+ }
+
+ if ( !isset($_REQUEST['member_id'])
+ && !isset($_REQUEST['search'])
+ && !isset($_REQUEST['start'])
+ ) {
+ $out .= $this->load_static_page();
+ $out .= $this->get_listings();
+ }
+
+ if (PHOTO_GALLERY) {
+ $out .= $this->photo_module();
+ }
+ } else {
+ $breadCrumbs = $this->get_bread_crumbs($this->catid);
+ $category = $this->get_category($showimg, 0);
+ $pageHeader = $this->data['intro'];
+ $static = $this->load_static_page();
+ $listings = $this->get_listings();
+ if (!$links = $this->cache->get('sectionLinks-'.$this->catid, 'Toolbox')) {
+ // generation of the section links to each paragraph
+ if (is_array($this->sectionAnchors)) {
+ $links = '<ul id="paragraphLinks">';
+ foreach ($this->sectionAnchors as $anchors) {
+ $links .= '<li>'.$anchors.'</li>';
+ }
+ $links .= '</ul>';
+ $this->cache->save($links, 'sectionLinks-'.$this->catid, 'Toolbox');
+ }
+ }
+ $out = $breadCrumbs;
+ $out .= '<div id="category">';
+ $out .= $pageHeader;
+ $out .= $links;
+ $out .= $category;
+ $out .= '</div>';
+ $out .= $static;
+ $out .= $listings;
+
+ if ($this->_hasCouponsAssignedToPage()) {
+ $out .= $this->_getCouponWidget();
+ }
+
+ if (PHOTO_GALLERY) {
+ $out .= $this->photo_module();
+ }
+ }
+ return $out;
+ }
+
+ // }}}
+ // {{{ get_page_header_image()
+
+ function get_page_header_image(){
+ $headers[5] = 'accommodations';
+ $headers[21] = 'arts';
+ $headers[22] = 'beaches';
+ $headers[16] = 'golf';
+ $headers[20] = 'guest';
+ $headers[4] = 'outdoor';
+ $headers[43] = 'reservations';
+ $headers[3] = 'things';
+ $headers[18] = 'winaries';
+ $headers[7] = 'meeting';
+ $headers[8] = 'tour';
+ $headers[9] = 'media';
+ $headers[33] = 'events';
+ $this->header_images = $headers;
+ $top_parent = $this->get_top_parent($this->catid);
+ if ($top_parent && $this->catid != HOME_ID) {
+ if ($_SERVER['HTTPS'] == "on") {
+ $base_url = BASE_SECURE_URL;
+ } else {
+ $base_url = BASE_URL;
+ }
+
+ if ($_SERVER['HTTPS'] != "on") {
+ return( '
+<div id="topimg">
+ <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="565" height="95" id="accommodations" align="middle">
+ <param name="allowScriptAccess" value="sameDomain">
+ <param value="transparent" name="wmode">
+ <param name="movie" value="'.$base_url.'assets/headers/headers.swf?XMLfile='.$base_url.'assets/headers/'.$headers[$top_parent].'.xml">
+ <param name="quality" value="high">
+ <param name="bgcolor" value="#3D8D3A">
+ <embed wmode="transparent" src="'.$base_url.'assets/headers/headers.swf?XMLfile='.$base_url.'assets/headers/'.$headers[$top_parent].'.xml" quality="high" bgcolor="#ffffff" width="565" height="95" name="accommodations" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
+ </object>
+</div>
+' );
+ } else {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+
+ // }}}
+ // {{{ get_parent()
+
+ /**
+ * get_parent: get parent for this category
+ *
+ * @param integer $catid: id
+ * @param object $DB: database obj
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return int $parent
+ * @access public
+ **/
+ function get_parent($catid,&$DB)
+ {
+ $query = "
+ SELECT parent
+ FROM bus_category
+ WHERE id = $catid
+ ORDER BY pos";
+ $data = $DB->db_auto_get_data($query);
+ return $data[0]["parent"];
+ }
+
+ // }}}
+ // {{{ get_parent_id ()
+
+ function get_parent_id($id)
+ {
+ if (is_numeric($id)) {
+ $query = "select parent from bus_category where id = $id";
+ if ($data = $this->DB->pgsql_select($query)) {
+ return $data[0]['parent'];
+ }
+ }
+ }
+
+ // }}}
+ // {{{ get_seo_url()
+
+ /**
+ * get_seo_url:
+ * grab category part of the search engine friendly url
+ * looks at define for seo_url to see weather to use the seach engine friendly url's or not
+ *
+ * @param integer $id:
+ * @param boolean $slash = 1 : to put a slash on end or not
+ * @uses BASE_URL
+ * @uses SEO_URL
+ * @uses HOME_ID
+ * @uses GLM_TEMPLATE::$php_ext
+ * @uses GLM_TEMPLATE::set_name_url()
+ * @uses GLM_TEMPLATE::get_category_name()
+ * @uses GLM_TEMPLATE::get_base_url()
+ *
+ * @return string $url for page.
+ * @access public
+ **/
+ function get_seo_url($id, $slash = 1)
+ {
+ if ($id == HOME_ID &&
+ $GLOBALS['GLM_SERVER_ID'] != 'devsys.gaslightmedia.com') {
+ return BASE_URL;
+ } elseif ($id == HOME_ID &&
+ $GLOBALS['GLM_SERVER_ID'] == 'devsys.gaslightmedia.com') {
+ return BASE_URL.'index.php';
+ }
+ if ( isset($this->category_toolbox)
+ && is_array($this->category_toolbox)
+ && in_array($id, $this->category_toolbox)
+ ) {
+ $category_id = array_search($id, $this->category_toolbox);
+ $url = BASE_URL.'member.php?category_id='.$category_id;
+ return $url;
+ }
+ if (in_array($id, array(
+ MEMBERS_PROFILE_FORM_PAGE,
+ MEMBERS_COUPONS_PAGE,
+ MEMBERS_EVENTS_PAGE,
+ MEMBERS_REPORTS_PAGE
+ ))) {
+ switch ($id) {
+ case MEMBERS_PROFILE_FORM_PAGE :
+ return $baseurl . 'memberdb/index.php?Option=Member&Action=Edit';
+ break;
+ case MEMBERS_COUPONS_PAGE :
+ return $baseurl . 'memberdb/index.php?Option=Coupons&Action=List';
+ break;
+ case MEMBERS_EVENTS_PAGE :
+ return $baseurl . 'memberdb/index.php?Option=Events&Action=List';
+ break;
+ case MEMBERS_REPORTS_PAGE :
+ return $baseurl . 'memberdb/index.php?Option=Reports&Action=List';
+ break;
+ }
+ }
+ if (SEO_URL) {
+ if ($id == 142) {
+ $base_url = BASE_SECURE_URL;
+ } else {
+ $base_url = BASE_URL;
+ }
+ $url = $base_url;
+ if (defined("SHORT_URLS") && SHORT_URLS) {
+ static $ShortURL;
+ if (!$ShortURL) {
+ $ShortURL = new Toolkit_ShortURL($this->dbh);
+ }
+ $short_url = $ShortURL->getShortUrl($id);
+ if ($short_url) {
+ return $base_url.$short_url . '/';
+ }
+ }
+ $url .= GLM_TEMPLATE::set_name_url(GLM_TEMPLATE::get_category_name($id, "bus_category", $this->DB));
+ $url = htmlspecialchars(strip_tags($url));
+ if ($slash) {
+ $url .= '/';
+ }
+ } else {
+ $url = $this->get_base_url($id);
+ if ($url) {
+ if ($id == 142) {
+ $url = BASE_SECURE_URL.$url;
+ }else{
+ $url = BASE_URL.$url;
+ }
+ $url .= $this->php_ext.'?catid='.$id;
+ } else {
+ $url = BASE_URL;
+ }
+ }
+
+ return $url;
+ }
+
+ // }}}
+ // {{{ get_side_nav()
+
+ function get_side_nav($parent = 0)
+ {
+ if ($navContent = $this->cache->get($this->catid, 'Nav')) {
+ return $navContent;
+ } else {
+ $qs = "
+ SELECT id, category, intro
+ FROM bus_category
+ WHERE parent = :parent {$this->active_query}
+ ORDER BY pos";
+ try {
+ $stmt = $this->dbh->prepare($qs);
+ $stmt->bindParam(":parent", $parent, PDO::PARAM_INT);
+ $stmt->execute();
+ $data = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ } catch(PDOException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ if (!is_array($data)) {
+ return false;
+ } else {
+ $return = '';
+ foreach ($data as $key => $row) {
+ $url = $this->get_seo_url($row['id']);
+ $title = strip_tags(addslashes($row['intro']));
+ $return .= '<li><a title="' .
+ htmlentities($title,ENT_QUOTES,'UTF-8') .
+ '" href="'.$url.'"';
+ if ($this->catid == $row['id']) {
+ $return .= ' id="current"';
+ }
+ $return .= '>' .
+ htmlentities($row['category'],ENT_QUOTES,'UTF-8')."</a>";
+ $hasSubs = $this->has_subs($row['id'], $this->DB);
+ $isSubId = $this->is_sub_id($this->catid, $row['id'], $this->DB);
+ $isPage = $this->catid == $row['id'];
+
+ if ($hasSubs && ($isSubId || $isPage)) {
+ $ret2 = $this->get_side_nav($row['id']);
+ $return .= $ret2;
+ }
+ $return .= '</li>';
+ }
+ $main_cats = $this->get_main_cats();
+ if ($main_cats[$parent]) {
+ $return = '<h2>'.$this->get_catheader($parent, $this->DB).'</h2>
+ <ul>'.$return.'</ul>';
+ $this->cache->save($return, $this->catid, 'Nav');
+ return $return;
+ } else {
+ $return = "\n<ul>$return</ul>\n";
+ return $return;
+ }
+ }
+ }
+ }
+
+ // }}}
+ // {{{ get_sitemap()
+
+ function get_sitemap(){
+ // sitemap.inc goes here
+ // maybe make a sitemap class
+ }
+
+ // }}}
+ // {{{ get_sub_nav()
+
+ /**
+ * get_sub_nav:
+ * @param integer $catid:
+ * @param object $DB:
+ *
+ * @uses GLM_TEMPLATE::get_parent()
+ * @uses GLM_TEMPLATE::get_seo_url()
+ * @uses GLM_TEMPLATE::is_sub_id()
+ * @uses GLM_TEMPLATE::get_sub_nav()
+ * @uses GLM_TEMPLATE::has_subs()
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return string
+ * @access public
+ **/
+ function get_sub_nav($catid,&$DB)
+ {
+ $parentid = GLM_TEMPLATE::get_parent($catid, $DB);
+ //echo $parentid.'<br>';
+ $query = "SELECT id,category,intro FROM bus_category WHERE parent = $parentid ".$this->active_query." ORDER BY pos";
+ $data = $DB->db_auto_get_data($query);
+ if (is_array($data)) {
+ $output = '<div id="subnav">';
+ $counter = 1;
+ foreach($data as $key=>$val) {
+ $url = $this->get_seo_url( $val['id'] );
+ $title = strip_tags(addslashes($val['intro']));
+ if ( GLM_TEMPLATE::is_sub_id($catid, $parentid, $DB)
+ && ( GLM_TEMPLATE::is_sub_id($catid, $val['id'], $DB)
+ || $val['id'] == $catid)
+ ) {
+ $output .= '<a title="'.$title.'" class="current" href="'.$url.'">';
+ } else {
+ $output .= '<a title="'.$title.'" href="'.$url.'">';
+ }
+ $output .= $val["category"];
+ $output .= '</a>';
+ if ( GLM_TEMPLATE::is_sub_id($catid, $val['id'], $DB)
+ && GLM_TEMPLATE::has_subs($val['id'], $DB)
+ ) {
+ $output .= GLM_TEMPLATE::get_sub_nav(
+ $val["id"],
+ $DB,
+ $catid
+ );
+ }
+ }
+ $output .= '</div>';
+ $output = GLM_TEMPLATE::clean_text($output);
+ echo $output;
+ }
+ return false;
+ }
+
+ // }}}
+ // {{{ get_template()
+
+ /**
+ * get_template: get the template type of the bus_category
+ * @param mixed $type : 'cat' or 'list'
+ *
+ * @uses GLM_DB::db_auto_get_data()
+ * @uses GLM_TEMLATE::img_align()
+ * @uses GLM_TEMLATE::img_alternate()
+ * @uses GLM_TEMLATE::$template
+ *
+ * @return void
+ * @access public
+ */
+ function get_template($type)
+ {
+ $query = "select template from bus_category where id = ".$this->catid;
+ $data = $this->DB->db_auto_get_data($query);
+ switch ($type) {
+ case "cat" :
+ switch ($data[0]['template']) {
+ case "5" :
+ case "4" :
+ case "2" :
+ $this->img_align = "left";
+ break;
+
+ default:
+ $this->img_align = "right";
+ break;
+ }
+ break;
+
+ case "list" :
+ switch( $data[0]['template'] ) {
+ case "6" :
+ case "2" :
+ $this->img_align = "left";
+ $this->img_alternate = 0;
+ break;
+
+ case "5" :
+ case "1" :
+ $this->img_align = "right";
+ $this->img_alternate = 0;
+ break;
+
+ case "4" :
+ $this->img_align = "right";
+ $this->img_alternate = 1;
+ break;
+
+ case "3":
+ $this->img_align = "left";
+ $this->img_alternate = 1;
+ break;
+
+ default:
+ break;
+ }
+ break;
+ }
+ return $this->template = $data[0]['template'];
+ }
+
+ // }}}
+ // {{{ get_top_parent()
+
+ /**
+ * get_top_parent:Get the highest level parent id (not 0 )for the category.
+ *
+ * <p><b>NOTICE:</b> This is ment to get the top level parent not the parent of the id given.</p>
+ *
+ * @param integer $id: The catid for the page.
+ * @param object $DB: obj
+ * @uses GLM_TEMPLATE::get_top_parent()
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return int $parent
+ * @access public
+ */
+ function get_top_parent($id)
+ {
+ if ($id == 0 ){
+ return 0;
+ }
+ $qs = "select parent from bus_category where id = $id";
+ $parentrow = $this->DB->db_auto_get_data( $qs );
+ if ($parentrow[0]['parent'] == 0 ){
+ return $id;
+ } else {
+ return $this->get_top_parent($parentrow[0]['parent']);
+ }
+ }
+
+ // }}}
+
+ // {{{ _getCouponWidget()
+
+ private function _getCouponWidget()
+ {
+ $page = new Toolkit_Coupons_PageWidget(
+ new Toolkit_Coupons_WebCouponFactory(),
+ new Toolkit_Coupons_Coupons()
+ );
+
+ $flexyOpts = Toolkit_Coupons_Controller::getFlexyOptions();
+ $tEngine = new HTML_Template_Flexy($flexyOpts);
+
+ $page->addPageCategories($this->dbh, $this->catid);
+
+ $searchForm = new Toolkit_Coupons_UserSearch(
+ 'coupon_search',
+ 'get',
+ BASE_URL . 'index.php'
+ );
+ $searchForm->configureForm($this->dbh, $this->catid);
+
+ $page->setSearchForm($searchForm);
+
+ $couponForm = new HTML_QuickForm(
+ 'coupon_form',
+ 'post',
+ BASE_URL . 'Toolkit/Coupons/print.php'
+ );
+ $renderer = $couponForm->defaultRenderer();
+ $renderer->clearAllTemplates();
+ return $page->toHtml($couponForm, $tEngine, 'coupons.html');
+ }
+
+ // }}}
+ // {{{ _hasCouponsAssignedToPage()
+
+ private function _hasCouponsAssignedToPage()
+ {
+ try {
+ $sql = "
+ SELECT count(*) AS total
+ FROM coupon_categories2toolbox_pages
+ WHERE toolbox_catid = :catid";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->bindParam(':catid', $this->catid, PDO::PARAM_INT);
+ $stmt->execute();
+
+ $row = $stmt->fetch();
+
+ return (bool) $row['total'];
+ } catch (PDOException $e) {
+ Toolkit_Logger::logException('DB Error', $e);
+ return false;
+ }
+ }
+
+ // }}}
+
+ // {{{ is_sub_id()
+
+ /**
+ * is_sub_id:Check to see if catid is sub of category
+ *
+ * @param integer $catid: the catid looking at
+ * @param integer $category: to see if it is in category
+ * @param object $DB: Db object reference
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return bool
+ * @access public
+ */
+ function is_sub_id($catid,$category,&$DB)
+ {
+ if (!is_numeric($catid)) {
+ return false;
+ }
+
+ if ($category == $catid)
+ {
+ return true;
+ }
+
+ $query = "select id,parent from bus_category where id = $catid";
+ $data = $DB->db_auto_get_data($query);
+ $parent = $data[0]['parent'];
+ if ($parent == 0) {
+ return false;
+ } else {
+ return GLM_TEMPLATE::is_sub_id($parent, $category, $DB);
+ }
+ }
+
+ // }}}
+
+ // {{{ keyword_replace()
+
+ /**
+ * keyword_replace:
+ *
+ * @param string $string:
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return string
+ * @access public
+ */
+ function keyword_replace($string)
+ {
+ //return $string;
+ if ($search = strstr($string,"{")) {
+ if (preg_match("/\{([A-Z0-9\&\-\,\'\" ]*)\}/i",$string,$needle)) {
+ if ($needle[0] != "") {
+ $qs = "
+ SELECT id, category
+ FROM bus_category
+ WHERE trim(keyword) = '".trim($needle[1])."'";
+
+ $keyres = $this->DB->db_auto_get_data($qs);
+ $parent = $this->get_top_parent($keyres[0]['id']);
+ $url = $this->get_seo_url( $keyres[0]['id'] );
+ $replacement = "<a href=\"".$url."\">".htmlspecialchars($keyres[0]['category'])."</a>";
+ $string = str_replace($needle[0],$replacement,$string);
+ }
+ } else {
+ return $string;
+ }
+ if ($search = strstr($string,"{")) {
+ return $this->keyword_replace($string);
+ }
+ }
+ return $string;
+ }
+
+ // }}}
+
+ // {{{ load_static_page()
+
+ /**
+ * load_static_page:using object buffer include the page $catid.phtml from static dir
+ and return it as string
+ *
+ * @return string $text
+ * @access public
+ **/
+ function load_static_page()
+ {
+ if (file_exists(BASE . "static/{$this->catid}.phtml")) {
+ ob_start();
+ include BASE . "static/{$this->catid}.phtml";
+ $text = ob_get_contents();
+ ob_end_clean();
+ return $text;
+ }
+ }
+
+ // }}}
+
+ // {{{ make_ul_menu()
+
+ /**
+ * make_ul_menu: create url list of categories
+ *
+ * @param integer $parent parent to start from
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return string
+ * @access public
+ */
+ function make_ul_menu($parent = 0)
+ {
+ $qs = "
+ SELECT id, category, intro
+ FROM bus_category
+ WHERE parent = $parent
+ AND id <> ".MEMBERS_ONLY_CATEGORY."
+ {$this->active_query}
+ order by pos";
+ $data = $this->DB->db_auto_get_data($qs);
+
+ if (!is_array($data)) {
+ return false;
+ } else {
+ $return = '';
+ foreach ( $data as $key => $row ) {
+ $url = $this->get_seo_url( $row['id'] );
+ $title = strip_tags(addslashes($row['intro']));
+ $return .= "\t<li><a title=\"".htmlentities($title, ENT_QUOTES, 'UTF-8').'" href="'.$url.'"';
+ if ($this->catid == $row['id']) {
+ $return .= ' id="current"';
+ }
+ $return .= '>' . htmlentities($row['category'], ENT_QUOTES, 'UTF-8') . '</a>';
+ $hasSubs = $this->has_subs($row['id'], $this->DB);
+ $isSubId = $this->is_sub_id($this->catid, $row['id'], $this->DB);
+ $isPage = $this->catid == $row['id'];
+ if ($hasSubs && ($isSubId || $isPage)) {
+ $ret2 = $this->make_ul_menu($row['id']);
+ $return .= $ret2;
+ }
+ $return .= "</li>\n";
+ }
+ $main_cats = $this->get_main_cats();
+ if ( (isset($parent) && $parent != 0)
+ || ( isset($main_cats)
+ && isset($main_cats[$parent])
+ && $main_cats[$parent]
+ )
+ ) {
+ return "<ul>\n\t$return</ul>\n";
+ } else {
+ return "<ul id=\"nav\">\n\t" . $return . "</ul>\n";
+ }
+ }
+ }
+
+ // }}}
+ // {{{ meta_tags()
+
+ /**
+ * meta_tags: create the meta description content for this page.
+ * this is taken from the category description.
+ * this should be only done for all but the home page.
+ * $meta = ( $catid != 1 ) ? $toolbox->meta_tags() : '';
+ *
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return string
+ * @access public
+ */
+ function meta_tags()
+ {
+ $query = "
+ SELECT meta_descr,description
+ FROM bus_category
+ WHERE id = :id";
+ try {
+ $stmt = $this->dbh->prepare($query);
+ $stmt->bindParam(":id", $this->catid, PDO::PARAM_INT);
+ $stmt->execute();
+ $data = $stmt->fetch();;
+ } catch(PDOException $e) {
+ echo '<pre>'.print_r($e, true).'</pre>';
+ die($e->getMessage());
+ }
+ if ($data['meta_descr']) {
+ $description = htmlentities(trim(strip_tags($data['meta_descr'])), ENT_QUOTES, 'UTF-8');
+ } else {
+ $description = htmlentities(substr(trim(strip_tags($data['description'])), 0, 250),ENT_QUOTES,'UTF-8');
+ }
+ return $description;
+ }
+
+ // }}}
+
+ // {{{ page_status()
+
+ /**
+ * page_status
+ *
+ * tell if page is active, deleted or inactive
+ * this will redirect to the index.php page if the
+ * id has been deleted or not active
+ * it will display message about page not found.
+ *
+ * @param mixed $id
+ * @access public
+ * @return string
+ */
+ function page_status($id) {
+ if ($id == 9999) {
+ $this->page_status = 'Good';
+ return true;
+ }
+
+ if (empty($id)) {
+ return false;
+ }
+ if ($id == HOME_ID) {
+ $this->page_status = 'Good';
+ }
+ $query = "
+ SELECT id, active
+ FROM bus_category
+ WHERE id = :id";
+ try {
+ $stmt = $this->dbh->prepare($query);
+ $stmt->bindParam(":id", $id, PDO::PARAM_INT);
+ $stmt->execute();
+ $data = $stmt->fetch();
+ //echo '<pre>'.print_r($data, true).'</pre>';
+ } catch(PDOException $e) {
+ echo '<pre>'.print_r($e, true).'</pre>';
+ die($e->getMessage());
+ }
+
+ if (is_array($data)) {
+ if (!$data['active'] &&
+ !strstr($_SERVER['HTTP_REFERER'], 'admin/')) {
+ // page was deleted and no longer avail.
+ // give 404 redirect and go back to index page
+ header('HTTP/1.1 404 Not Found');
+ $this->page_status = 'Bad';
+ } else {
+ $this->page_status = 'Good';
+ }
+ } else {
+ // page was deleted and no longer avail.
+ // give 301 redirect and go back to index page
+ header('HTTP/1.1 301 Moved Permanently');
+ header('Location: '.BASE_URL);
+ exit();
+ }
+ }
+
+ // }}}
+ // {{{ photo_module()
+
+ /**
+ * photo_module
+ * Load the photo gallery into page
+ *
+ * @access public
+ * @return string
+ */
+ function photo_module()
+ {
+ $query = "
+ SELECT photocat_id
+ FROM photo_category_bus
+ WHERE buscat_id = $this->catid;";
+ $out = '';
+ if ($pData = $this->DB->db_auto_get_data($query)) {
+ if (count($pData) > 1) {
+ foreach ($pData as $pKey => $pVal) {
+ $photocatid[] = $pVal['photocat_id'];
+ }
+ $SINGLE_GALLERY = false;
+ } else {
+ $SINGLE_GALLERY = true;
+ $photocatid = $pData[0]['photocat_id'];
+ }
+ if (is_numeric($photocatid) || is_array($photocatid)) {
+ if (!$_REQUEST['photo_catid']) {
+ $_REQUEST['photo_catid'] = $photocatid;
+ }
+ $photoApp = new Toolkit_Photos_Display();
+ $out = $photoApp->toHTML();
+ }
+ }
+ return $out;
+ }
+
+ // }}}
+ // {{{ print_ancestors()
+
+ /**
+ * print_ancestors:print out the ancestors
+ * @param integer $catid: the id to start at.
+ *
+ * @return string
+ * @access public
+ */
+ function print_ancestors($catid)
+ {
+ return $this->get_bread_crumbs($catid);
+ }
+
+ // }}}
+
+ // {{{ set_active_query()
+
+ /**
+ * set_active_query: some toolboxes have an active flag some do not
+ * so this is to allow both with and without a flag.
+ *
+ * @uses ACTIVE_FLAG
+ *
+ * @return void
+ * @access public
+ **/
+ function set_active_query()
+ {
+ if (ACTIVE_FLAG) {
+ $this->active_query = " and active = 't'";
+ }
+ return $this->active_query;
+ }
+
+ // }}}
+ // {{{ set_address()
+
+ /**
+ * set_address:set_address
+ * <code><p>{$address}<br>{$city},{$state} {$zip}</p></code>
+ * @param array $data: data contain the address info for display.
+ *
+ * @return string $address
+ * @access public
+ **/
+ function set_address($data)
+ {
+ $address = "";
+ if ($data["address"]) {
+ $address .= $data["address"];
+ }
+ if ($data["city"] && $data["state"] && $data["zip"]) {
+ $address .= '<br>'.$data["city"].', '.$data["state"].' '.$data["zip"];
+ } elseif ($data["city"] && $data["state"]) {
+ $address .= '<br>'.$data["city"].', '.$data["state"];
+ } elseif ($data["city"]) {
+ $address .= '<br>'.$data["city"];
+ }
+
+ if ($address != "") {
+ return '<p>'.$address.'<br></p>';
+ }
+ }
+
+ // }}}
+ // {{{ set_body_tag()
+
+ /**
+ * @deprecated
+ */
+ function set_body_tag()
+ {
+ if ($this->catid != HOME_ID) {
+ $this->body_tag = ' id="inside"';
+ }
+ if (isset($_REQUEST['query']) && $_REQUEST['query']) {
+ switch (GLM_HOST_ID) {
+ case "devsys.gaslightmedia.com":
+ case "DEVELOPMENT":
+ $apikey = "ABQIAAAA4LuqJozzD0jiTLPhI0tT7xQUAAYHl_Rab4aEI5hGyHxlqR-rKxQMGKAdHLOEIFLI9wcDJjjSkJ7qng";
+ break;
+
+ case "ws1.gaslightmedia.com":
+ case "PRODUCTION":
+ $apikey = "ABQIAAAAWqyv9sBAgUBdsdOdgo7LsRQRzeqzQXKdvmJb4FZzpdF0AtrabhSiNxG27kD8OcNt7Ae6sNRUH1VXCA";
+ break;
+
+ default :
+ break;
+ }
+ $this->body_tag .= ' onload="OnLoad();"';
+ $this->scripts .= '
+ <script type="text/javascript" src="http://www.google.com/uds/api?file=uds.js&v=1.0&key='.$apikey.'"></script>';
+ $this->scripts .= '<link rel="stylesheet" type="text/css" href="'.BASE_URL.'gsearch.css">';
+ $this->scripts .= '<script type="text/javascript" src="'.BASE_URL.'libjs/gsearch.php?query='.urlencode($_REQUEST['query']).'"></script>';
+ }
+ }
+
+ // }}}
+ // {{{ set_catid()
+
+ /**
+ * set_catid:Set the class catid var
+ * @param integer $catid: $catid
+ *
+ * @deprecated using get_catid
+ * @return void
+ * @access public
+ **/
+ function set_catid($catid)
+ {
+ if (is_numeric($catid)) {
+ $this->catid = $catid;
+ } else {
+ $this->catid = 1;
+ }
+ }
+
+ // }}}
+ // {{{ set_contact()
+
+ /**
+ * set_contact:Set the contact string
+ * <code><p><strong>Contact Name:</strong> {$text}</p></code>
+ *
+ * @param string $text: The text as string
+ * @param string $email: email if givin
+ *
+ * @return string $text
+ * @access public
+ **/
+ function set_contact($text, $email)
+ {
+ if ($email != "") {
+ $text = "";
+ } else {
+ $text = '<p><strong>Contact Name:</strong> '.$text.'</p>';
+ }
+ return $text;
+ }
+
+ // }}}
+ // {{{ set_DB()
+
+ /**
+ * set_DB: set the DB up to be that of the global one if it exists
+ *
+ * @param object $DB : the DB object
+ * @uses GLM_DB
+ *
+ * @return void
+ * @access public
+ **/
+ function set_DB(&$DB) {
+ if (isset($DB)) {
+ $this->DB = $DB;
+ } else {
+ $this->DB = new GLM_DB();
+ }
+ }
+
+ // }}}
+ // {{{ set_data()
+
+ /**
+ * call all class methods to set tho data elements
+ *
+ * <p>This is hightly dependant on the three tables of bus bus_category and bus_category_bus
+ * set_data:Calls each function of the class
+ * based on the key af the array $data[0][$key]</p>
+ * @todo Really need to look at enhancing this function for different datasetups.
+ * @param array $data: The input array from db query
+ * @uses GLM_TEMPLATE::$img_size
+ * @uses GLM_TEMPLATE::$img_align
+ * @uses GLM_TEMPLATE::$img_alternate
+ * @uses GLM_TEMPLATE::set_text()
+ * @uses GLM_TEMPLATE::set_header()
+ * @uses GLM_TEMPLATE::set_subheader()
+ * @uses GLM_TEMPLATE::set_url()
+ * @uses GLM_TEMPLATE::set_address()
+ * @uses GLM_TEMPLATE::set_img()
+ * @uses GLM_TEMPLATE::set_email()
+ * @uses GLM_TEMPLATE::set_phone()
+ *
+ * @return array data The finished array
+ * @access public
+ **/
+ function set_data($data)
+ {
+ if (is_array($data)) {
+ foreach ($data as $k => $val) {
+ foreach ($val as $key => $value) {
+ if ( strstr($key, "image")
+ && !strstr($key, "name")
+ && $value != ""
+ ) {
+ $titletag = $data[$k]['category']
+ ? $data[$k]['category']
+ : $data[$k]['name'];
+ //$data[$k][$key."_name"] = $value;
+ $data[$k][$key] = $this->set_img(
+ $value,
+ $this->img_size,
+ $this->img_align,
+ $titletag,
+ $data[$k][$key."name"]
+ );
+
+ if (!strstr($key, "name")) {
+ if ( $this->img_align == "right"
+ && $this->img_alternate
+ ) {
+ $this->img_align = "left";
+ } elseif ($this->img_alternate) {
+ $this->img_align = "right";
+ }
+ }
+ } elseif ( strstr($key, "file")
+ && strstr($key, "name")
+ && $value != ""
+ ) {
+ } elseif ( strstr($key,"url")
+ && strstr($key,"name")
+ && $value != ""
+ ) {
+ } elseif (strstr($key,"descr") && $value != "") {
+ $data[$k][$key] = GLM_TEMPLATE::set_text($value);
+ } elseif (isset($data[$k]['email'])
+ && $key == "contactname"
+ && $value != ""
+ ) {
+ $data[$k][$key] = GLM_TEMPLATE::set_contact(
+ $value,
+ $data[$k]['email']
+ );
+ } elseif ($key == "name" && $value != "") {
+ $data[$k][$key] = GLM_TEMPLATE::set_subheader($value);
+ } elseif (strstr( $key, "header" ) && $value != "") {
+ $data[$k][$key] = GLM_TEMPLATE::set_subheader($value);
+ } elseif ($key == "intro" && $value != "") {
+ $data[$k][$key] = GLM_TEMPLATE::set_header($value);
+ } elseif ($key == "category" && $value != "") {
+ $data[$k][$key] = GLM_TEMPLATE::set_header($value);
+ } elseif ($key == "url" && $value != "") {
+ $data[$k][$key] = GLM_TEMPLATE::set_url(
+ $value,
+ $data[$k]["urlname"]
+ );
+ } elseif ($key == "email" && $value != "") {
+ $data[$k][$key] = GLM_TEMPLATE::set_email(
+ $value,
+ $data[$k]["contactname"]
+ );
+ } elseif ($key == "phone" && $value != "") {
+ $data[$k][$key] = GLM_TEMPLATE::set_phone($value);
+ } elseif ($key == "fax" && $value != "") {
+ $data[$k][$key] = GLM_TEMPLATE::set_fax($value);
+ } elseif (strstr($key, "file") && $value != "") {
+ $data[$k][$key] = GLM_TEMPLATE::set_file(
+ $value,
+ $data[$k][$key.'name']
+ );
+ } elseif ($key == "address") {
+ $data[$k][$key] = GLM_TEMPLATE::set_address($data[$k]);
+ } elseif ($key == "id") {
+ $data[$k][$key] = $value;
+ } else {
+ $data[$k][$key] = GLM_TEMPLATE::set_text($value);
+ }
+ }
+ }
+ return $data;
+ }
+ return false;
+ }
+
+ // }}}
+ // {{{ set_email()
+
+ /**
+ * set_email:Set the email string
+ * <code><p><strong>Contact:</strong> <a href="mailto:{$email}" target="_blank">{$text}</a></p></code>
+ * @param string $email: The email as string
+ * @param string $contact: The contactname this is used as the link text
+ *
+ * @return string $text
+ * @access public
+ **/
+ function set_email($email, $contact)
+ {
+ if ($email != "") {
+ if ($contact != "") {
+ $email = '<p><strong>Contact:</strong> <a href="mailto:'.$email.'" target="_blank">'.htmlspecialchars($contact).'</a></p>';
+ } else {
+ $email = '<p><strong>Email:</strong> <a href="mailto:'.$email.'" target="_blank">'.htmlspecialchars($email).'</a></p>';
+ }
+ }
+ return $email;
+ }
+
+ // }}}
+ // {{{ set_fax()
+
+ /**
+ * set_fax:Set the fax string
+ * <code><p><strong>Fax:</strong> {$text}</p></code>
+ * @param string $text: The text as string
+ *
+ * @return string $text
+ * @access public
+ **/
+ function set_fax($text)
+ {
+ if ($text != "") {
+ $text = '<p><strong>Fax:</strong> '.htmlspecialchars($text).'</p>';
+ }
+ return $text;
+ }
+
+ // }}}
+ // {{{ set_file()
+
+ /**
+ * set_file:Set the file string
+ * <code><p><strong>Contact Name:</strong> {$text}</p></code>
+ * @param string $text: The text as string
+ * @param string $name: The file name displayed
+ * @uses MEDIA_BASE_URL
+ *
+ * @return string $text
+ * @access public
+ **/
+ function set_file($text, $name)
+ {
+ if ($text != "") {
+ $outtext = '<p><a';
+ if (preg_match("/[.]([A-Z0-9]{3}$)/i", $text, $tmp)) {
+ $outtext .= ' class="file-download '.strtolower($tmp[1]).'"';
+ }
+ $outtext .= ' href="'.MEDIA_BASE_URL.'uploads/'.$text.'" target="_blank">';
+ if ($name) {
+ $outtext .= htmlspecialchars($name);
+ } else {
+ $outtext .= htmlspecialchars($text);
+ }
+ $outtext .= '</a>';
+ if (preg_match("/[.]([A-Z0-9]{3}$)/i", $text, $tmp)) {
+ // don't output second link
+ //$outtext .= '<a href="'.BASE_URL.'download.php?file='.$text.'" class="download">Click here to Download </a>';
+ }
+ $outtext .= '</p>';
+ }
+ return $outtext;
+ }
+
+ // }}}
+ // {{{ set_header()
+
+ /**
+ * set_header:Set the header string
+ * @param string $text: The text as string
+ * @uses GLM_TEMPLATE::header_begin()
+ * @uses GLM_TEMPLATE::header_end()
+ *
+ * @return string $text
+ * @access public
+ **/
+ function set_header($text)
+ {
+ if ($text != "") {
+ $text = $this->header_begin.htmlspecialchars($text).$this->header_end;
+ }
+ return $text;
+ }
+
+ // }}}
+ // {{{ set_img()
+
+ /**
+ * set_img:Set the image string
+ * <p><code>
+ * <div class="image{$align}" style="width: {$width}px" src="{$size}{$image}" {$titletag}>
+ * <div class="imagecaption">{$caption}</div>
+ * </div>
+ * </code>
+ * </p>
+ *
+ * @param string $image: The image
+ * @param string $size: The path
+ * @param string $align: The alignment
+ * @param string $name: The image_name (displayed under image)
+ * @param string $alt_title text for use in alt and title tags
+ * @param string $caption Text for image caption if given
+ * @uses GLM_TEMPLATE::get_image_path()
+ *
+ * @return void
+ * @access public
+ **/
+ function set_img($image, $size, $align, $alt_title = NULL, $caption = NULL)
+ {
+ if ($image != "") {
+ if ($caption != '') {
+ $caption = str_replace('&','&',$caption);
+ $titletag = 'title="'.htmlspecialchars(strip_tags($caption)).'"';
+ $titletag .= ' alt="'.htmlspecialchars(strip_tags($image)).'"';
+ } elseif ($alt_title != '') {
+ $alt_title = str_replace('&','&',$alt_title);
+ $titletag = 'title="'.htmlspecialchars(strip_tags($alt_title)).'"';
+ $titletag .= ' alt="'.htmlspecialchars(strip_tags($image)).'"';
+ } else {
+ $titletag = 'title="'.htmlspecialchars(strip_tags($image)).'"';
+ $titletag .= ' alt="'.htmlspecialchars(strip_tags($image)).'"';
+ }
+
+ if ($align != "") {
+ $img_align = 'class="image'.$align.'"';
+ }
+ $path = $this->get_image_path();
+ if (is_file($path.$image)) {
+ $image_size = getimagesize($path.$image);
+ $img_attr = $image_size[3];
+ } else {
+ $imServer = new Toolkit_Image_Server();
+ $image_size = $imServer->getImageSize($size.$image);
+ //$image_size[0] = $ret['width'];
+ //$image_size[1] = $ret['height'];
+ }
+ $img = '<div '.$img_align.' style="width: '.$image_size[0].'px">';
+ $img .= '<img ';
+ if (isset($img_attr)) {
+ $img .= $img_attr;
+ }
+ $img .= ' src="'.$size.$image.'" '.$titletag.'>';
+ if ($caption) {
+ $img .= '<div class="imagecaption">'.$caption.'</div>';
+ }
+ $img .= '</div>';
+ return $img;
+ }
+ }
+
+ // }}}
+ // {{{ set_member()
+
+ /**
+ * set_member
+ *
+ * @access public
+ * @return string
+ */
+ function set_member()
+ {
+ if (MEMBERS_DB && $this->catid) {
+ $member = new Toolkit_Members_Display($this->dbh);
+ try {
+ $res = $member->setCatId($this->catid);
+ } catch (InvalidArgumentException $e) {
+ return Toolkit_Common::handleError($e);
+ }
+ $member->setMemberSections();
+ return $member;
+ }
+ }
+
+ // }}}
+ // {{{ set_name_url()
+
+ /**
+ * setNameUrl:
+ * @param string $name :
+ *
+ * @return string
+ * @access public
+ */
+ function set_name_url( $name )
+ {
+ $name = str_replace(" ","-",$name);
+ $name = preg_replace("/[\/#&?'\"]|amp;/", "", strip_tags(strtolower(trim($name))));
+ return htmlspecialchars( $name );
+ }
+
+ // }}}
+ // {{{ set_pages()
+
+ /**
+ * set_pages: grab the globals for the pages an use this for
+ * the pages array for the class
+ *
+ * @return void
+ * @access public
+ **/
+ function set_pages(&$pages)
+ {
+ $this->pages[1] = 'index';
+ }
+
+ // }}}
+ // {{{ set_phone()
+
+ /**
+ * set_phone:Set the phone string
+ * <code><p><strong>Phone:</strong> {$text}</p></code>
+ * @param string $text: The text as string
+ *
+ * @return string $text
+ * @access public
+ **/
+ function set_phone($text)
+ {
+ if ($text != "") {
+ $text = '<p><strong>Phone:</strong> '.$text.'</p>';
+ }
+ return $text;
+ }
+
+ // }}}
+ // {{{ set_subheader()
+
+ /**
+ * set_subheader:Set the subheader string
+ * @param string $text: The text as string
+ * @uses GLM_TEMPLATE::subheader_begin()
+ * @uses GLM_TEMPLATE::subheader_end()
+ *
+ *
+ * @return string $text
+ * @access public
+ **/
+ function set_subheader($text)
+ {
+ if ($text != "") {
+ $text = $this->subheader_begin.htmlspecialchars($text).$this->subheader_end;
+ }
+ return $text;
+ }
+
+ // }}}
+ // {{{ set_text()
+
+ /**
+ * set_text:Set the contact string
+ * <code><p>{$text}</code>
+ * @param string $text: The text as string
+ *
+ * @return string $text
+ * @access public
+ **/
+ function set_text($text)
+ {
+ if ("" == str_replace("<br />", "", trim($text))) {
+ return false;
+ }
+ if ($text != "") {
+ $text = $this->keyword_replace($text);
+ $text = $text;
+ }
+ return $text;
+ }
+
+ // }}}
+ // {{{ set_toolbox_to_category_array()
+
+ function set_toolbox_to_category_array(){
+ $category_toolbox[1] = 70;// Places to Stay
+ $category_toolbox[20] = 71;// Things to Do
+ $category_toolbox[19] = 72;// Food & Spirits
+ $category_toolbox[24] = 73;// Camping
+ $category_toolbox[40] = 74;// Travel Services
+ $category_toolbox[25] = 75;// Attractions
+ $category_toolbox[41] = 76;// Golf
+ $category_toolbox[42] = 77;// Real Estate
+ $category_toolbox[43] = 78;// Shopping
+ $category_toolbox[44] = 79;// Recreation
+ $this->category_toolbox = $category_toolbox;
+ }
+
+ // }}}
+ // {{{ set_url()
+
+ /**
+ * set_url:Set the url string
+ * <p>
+ * <code><p><a href="http://{$url}" target="_blank">{$text}</a></code>
+ * </p>
+ *
+ * @param string $url: The url
+ * @param string $text: The text as string
+ *
+ * @return string $text
+ * @access public
+ **/
+ function set_url($url, $text)
+ {
+ if ($url != "") {
+ if (!$text) {
+ $text = $url;
+ }
+ if (strtolower(substr($url, 0, 7) ) == "https://") {
+ $url = '<p><a href="'.$url.'" target="_blank">'.htmlspecialchars($text).'</a></p>';
+ } else {
+ $url = '<p><a href="http://'.$url.'" target="_blank">'.htmlspecialchars($text).'</a></p>';
+ }
+ }
+ return $url;
+ }
+
+ // }}}
+ // {{{ show_catheader()
+
+ /**
+ * show_catheader:
+ *
+ * @param integer $catid:
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return string
+ * @access public
+ **/
+ function show_catheader($catid)
+ {
+ $query = "SELECT category FROM bus_category WHERE id = $catid";
+ $data = $this->DB->db_auto_get_data($query);
+ if ($data[0][category]!="") {
+ $header = $data[0][category];
+ } else {
+ $header = ' ';
+ }
+ echo $header;
+ }
+
+ // }}}
+ // {{{ show_catimg()
+
+ /**
+ * show_catimg:output the category image.
+ *
+ * @param integer $catid: The catid for the page.
+ * @uses GLM_TEMPLATE::MIDSIZED
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return void
+ * @access public
+ */
+ function show_catimg($catid)
+ {
+ $query = "SELECT image FROM bus_category WHERE id = $catid";
+ $data = $this->DB->db_auto_get_data($query);
+ if ($data[0]["image"]!="") {
+ $img = '<img src="'.MIDSIZED.$data[0]["image"].'" border="0" vspace="30" hspace="0">';
+ } else {
+ $img = '<img src="assets/logo_small.gif" width="150" height="85" vspace="0" hspace="0" border="0" alt="Birchwood Construction"><BR>';
+ }
+ echo $img;
+ echo '<BR><img src="assets/clear.gif" height="30" width="1">';
+ }
+
+ // }}}
+ // {{{ sort_childs()
+
+ /**
+ * sort_childs:
+ * @param array $threads:
+ *
+ * @return string
+ * @access public
+ */
+ function sort_childs($threads)
+ {
+ foreach($threads as $var=>$value) {
+ $childs[$value["parent"]][$value["id"]] = $value;
+ }
+ return $childs;
+ }
+
+ // }}}
+ // {{{ sub_nav()
+
+ /**
+ * sub_nav:Create a sub navigation 4 across
+ *
+ * @param integer $catid: The catid for the page
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return void
+ * @access public
+ */
+ function sub_nav($catid)
+ {
+ $newcatid = $this->get_parent_id($catid);
+ if ($newcatid != 0) {
+ $catid = $newcatid;
+ }
+ $query1 = "SELECT category FROM bus_category WHERE id = $catid";
+ $data1 = $this->DB->db_auto_get_data( $query1 );
+ $out = '<div id="subnav"> ';
+
+ $query = "SELECT id,category,intro FROM bus_category WHERE parent = $catid ".$this->active_query." ORDER BY pos";
+ $data = $this->DB->db_auto_get_data($query);
+ if (is_array($data)) {
+ $counter = 1;
+ foreach ($data as $key => $val) {
+ $url = $this->get_seo_url($val['id']);
+ $title = strip_tags(addslashes($val['intro']));
+ //GLM_TEMPLATE::set_name_url( GLM_TEMPLATE::get_category_Name( $val['id'],"bus_category",$this->DB ) );
+ $out .= '<a title="'.$title.'" href="'.$url.'">';
+ $out .= $val["category"];
+ $out .= '</a>';
+ }
+ }
+ $out .= '</div>';
+ return $out;
+ }
+
+ // }}}
+
+ // {{{ title()
+
+ /**
+ * title: create the title for the page.
+ * this should be only done for all but the home page.
+ * $title = ( $catid != 1 ) ? $toolbox->title() : '';
+ *
+ * @uses GLM_DB::db_auto_get_data()
+ *
+ * @return string
+ * @access public
+ */
+ function title()
+ {
+ $query = "
+ SELECT category,intro,title
+ FROM bus_category
+ WHERE id = :id";
+ try {
+ $stmt = $this->dbh->prepare($query);
+ $stmt->bindParam(":id", $this->catid, PDO::PARAM_INT);
+ $stmt->execute();
+ $data = $stmt->fetchAll();;
+ } catch(PDOException $e) {
+ echo '<pre>'.print_r($e, true).'</pre>';
+ die($e->getMessage());
+ }
+
+ if ($data[0]['title']) {
+ $title = strip_tags($data[0]['title']);
+ } else if ($data[0]['intro']) {
+ $title = strip_tags($data[0]['intro']);
+ } else {
+ $title = strip_tags($data[0]['category']);
+ }
+ return htmlentities($title.' - ',ENT_QUOTES,'UTF-8');
+ }
+
+ // }}}
+
+ // {{{ valid_email()
+
+ /** valid email
+ *
+ * <p>Checks for a valid format and good (mx check)
+ * email address.</p>
+ * @deprecated using GLM_TOOLBOX::valid_email()
+ * @uses GLM_TOOLBOX::valid_email()
+ *
+ * @param string email the email address as string.
+ * @return boolean
+ */
+ function valid_email( $email )
+ {
+ return GLM_TOOLBOX::valid_email( $email );
+ }
+
+ // }}}
+}
+?>
--- /dev/null
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Toolbox Classes :)
+ *
+ * PHP version 5
+ *
+ * <p>
+ * These classes and any code is not licensed for anyone but gaslight to use
+ * </p>
+ *
+ * @category Toolbox
+ * @package GLM_TOOLBOX
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2005-2008 Gaslight Media
+ * @license http://app.gaslightmedia.com/license.php Gaslight Media
+ * @link http://www.gaslightmedia.com www.gaslightmedia.com
+ * @since $Date: 2010/07/25 17:22:09 $
+ */
+/**
+ * Toolbox Class :)
+ *
+ * <p><b>NOTICE</b>
+ * Im going to be moving all functions from the setup.phtml
+ * file and putting it into this</p>
+ * <p>class. This is so we can eventially move
+ * everything to one siteinfo.inc file.</p>
+ * <kbd>matrix@devsys Does this work?</kbd>
+ *
+ * @todo move all functions from setup.phtml into here
+ */
+define('GLM_TOOLBOX', true);
+
+/**
+ * Short description for class
+ *
+ * Long description (if any) ...
+ *
+ * @category Toolbox
+ * @package GLM_TOOLBOX
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @copyright 2005-2008 Gaslight Media
+ * @license http://app.gaslightmedia.com/license.php Gaslight Media
+ * @link http://www.gaslightmedia.com www.gaslightmedia.com
+ * @see References to other sections (if any)...
+ */
+class GLM_TOOLBOX
+{
+ /** @var array php_version */
+ var $php_version;
+ /** @var boolean true if php is version < 4.2 */
+ var $php_old_pg;
+ // {{{ __construct()
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function __construct()
+ {
+ $this->php_version = $this->php_version_check();
+ $this->php_old_pg = $this->php_old_pg();
+ }// }}}
+ // {{{ CC_date_entry($month, $year, $month_name, $year_name)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param string $month Parameter description (if any) ...
+ * @param string $year Parameter description (if any) ...
+ * @param string $month_name Parameter description (if any) ...
+ * @param string $year_name Parameter description (if any) ...
+ *
+ * @return string Return description (if any) ...
+ * @access public
+ */
+ function CC_date_entry($month, $year, $month_name, $year_name)
+ {
+ $cur_date = getdate();
+ if ($month == "") {
+ $month = $cur_date['mon'];
+ }
+ if ($year == "") {
+ $year = $cur_date['year'];
+ }
+ $date = '<select name="'.$month_name.'">';
+ for ($i = 1; $i < 13; $i++) {
+ $date .= '<option value="';
+ if ($i < 10) {
+ $date .= "0";
+ }
+ $date .= $i.'"';
+ if ($i == $month) {
+ $date .= ' selected';
+ }
+ $date .= '>'.$i.'</option>';
+ }
+ $date .= '</select>';
+ $date .= '<select name="'.$year_name.'">';
+ for ($i = $year; $i < $year + 15; $i++) {
+ $date .= '<option value="'.$i.'"';
+ if ($i == $year) {
+ $date .= ' selected';
+ }
+ $date .= '>'.$i.'</option>';
+ }
+ $date .= '</select>';
+ return $date;
+ } // }}}
+ // {{{ CreditVal($Num, $Name = '', $Accepted='')
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $Num Parameter description (if any) ...
+ * @param string $Name Parameter description (if any) ...
+ * @param string $Accepted Parameter description (if any) ...
+ *
+ * @return boolean Return description (if any) ...
+ * @access public
+ */
+ function CreditVal($Num, $Name = '', $Accepted='')
+ {
+ $Name = strtolower($Name);
+ $Accepted = strtolower($Accepted);
+ $GoodCard = 1;
+ $Num = preg_replace("/[^[:digit:]]/", "", $Num);
+ switch ($Name) {
+
+ case "mastercard" :
+ $GoodCard = preg_match("/^5[1-5].{14}$/", $Num);
+ break;
+
+ case "visa" :
+ $GoodCard = preg_match("/^4.{15}$|^4.{12}$/", $Num);
+ break;
+
+ case "americanexpress" :
+ $GoodCard = preg_match("/^3[47].{13}$/", $Num);
+ break;
+
+ case "discover" :
+ $GoodCard = preg_match("/^6011.{12}$/", $Num);
+ break;
+
+ case "dinerscard" :
+ $GoodCard = preg_match("/^30[0-5].{11}$|^3[68].{12}$/", $Num);
+ break;
+
+ default:
+ if (preg_match("/^5[1-5].{14}$/", $Num)) {
+ $Name = "mastercard";
+ }
+ if (preg_match("/^4.{15}$|^4.{12}$/", $Num)) {
+ $Name = "visa";
+ }
+ if (preg_match("/^3[47].{13}$/", $Num)) {
+ $Name = "americanexpress";
+ }
+ if (preg_match("/^6011.{12}$/", $Num)) {
+ $Name = "discover";
+ }
+ if (preg_match("/^30[0-5].{11}$|^3[68].{12}$/", $Num)) {
+ $Name ="dinerscard";
+ }
+ break;
+ }
+
+ // If there's a limit on card types we accept, check for it here.
+ if ($Accepted) {
+ $type_verified = false;
+ $brands = explode(",", $Accepted);
+ foreach ($brands as $brand) {
+ if ($Name == $brand) {
+ $type_verified = true;
+ }
+ }
+ if (!$type_verified) {
+ return false;
+ }
+ }
+ $Num = strrev($Num);
+ $Total = 0;
+ for ($x=0; $x<strlen($Num); $x++) {
+ $digit = substr($Num, $x, 1);
+ if ($x/2 != floor($x/2)) {
+ $digit *= 2;
+ if (strlen($digit) == 2) {
+ $digit = substr($digit, 0, 1) + substr($digit, 1, 1);
+ }
+ }
+ $Total += $digit;
+ }
+ if ($GoodCard && $Total % 10 == 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }// }}}
+ // {{{ build_checklist($name, $data)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param string $name Parameter description (if any) ...
+ * @param array $data Parameter description (if any) ...
+ *
+ * @return mixed Return description (if any) ...
+ * @access public
+ */
+ function build_checklist($name, $data)
+ {
+ if (!is_array($selected)) {
+ $sel[0] = $selected;
+ } else {
+ $sel = $selected;
+ }
+ if (!is_array($data)) {
+ return false;
+ }
+ foreach ($data as $field => $title) {
+ $out .= '<label for="'.$name.'['.$field.']">
+ <input type="checkbox" id="'.$name.'['.$field.']"
+ name="'.$name.'['.$field.']" value="t"';
+ if ($_POST[$field] == 't') {
+ $out .= ' checked';
+ }
+ $out .= '>'.$title.'</label>';
+ }
+ return $out;
+ }// }}}
+ // {{{ build_picklist($fieldname, $data, $selected, $type = "standard",$auto = 0,$width = null)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param string $fieldname Parameter description (if any) ...
+ * @param array $data Parameter description (if any) ...
+ * @param unknown $selected Parameter description (if any) ...
+ * @param string $type Parameter description (if any) ...
+ * @param integer $auto Parameter description (if any) ...
+ * @param string $width Parameter description (if any) ...
+ *
+ * @return string Return description (if any) ...
+ * @access public
+ */
+ function build_picklist($fieldname, $data, $selected, $type = "standard",$auto = 0,$width = null)
+ {
+ if (!is_array($selected)) {
+ $sel[0] = $selected;
+ } else {
+ $sel = $selected;
+ }
+ if ($auto == 1) {
+ $autosubmit = "onChange=\"form.submit()\"";
+ }
+ if ($width) {
+ $autosubmit .= "style=\"width:".$width."px;\"";
+ }
+ switch($type) {
+ case "multiple":
+ $str = "<select name=\"".$fieldname."\" multiple size=\"10\" ".$autosubmit.">\n";
+ while (list($key, $val) = each($data)) {
+ if (in_array($key, $sel)) {
+ $select = " selected ";
+ } else {
+ $select = "";
+ }
+ $str .= " <option value=\"$key\"".$select.">$val\n";
+ }
+ break;
+ case "simple":
+ $str = "<select name=\"$fieldname\" ".$autosubmit.">\n";
+ for ($i = 0; $i < count($data); $i++) {
+ $select = (in_array($data[$i], $sel)) ? " selected ":"";
+ $str .= " <option value=\"".$data[$i]."\"".$select.">".$data[$i]."\n";
+ }
+ break;
+
+ case "standard":
+ default:
+ $str = "<select name=\"$fieldname\" ".$autosubmit.">\n";
+ while (list($key, $val) = each($data)) {
+ $select = (in_array($key, $sel)) ? " selected ":"";
+ $str .= " <option value=\"$key\"".$select.">$val\n";
+ }
+ break;
+ }
+ $str .= "</select>\n";
+ return $str;
+ }// }}}
+ // {{{ build_radios($name, $data)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param string $name Parameter description (if any) ...
+ * @param array $data Parameter description (if any) ...
+ *
+ * @return mixed Return description (if any) ...
+ * @access public
+ */
+ function build_radios($name, $data)
+ {
+ if (!is_array($selected)) {
+ $sel[0] = $selected;
+ } else {
+ $sel = $selected;
+ }
+ if (!is_array($data)) {
+ return false;
+ }
+ $count = 1;
+ foreach ($data as $field => $title) {
+ $out .= '<label for="'.$name.'-'.$count.'">
+ <input type="radio" id="'.$name.'-'.$count.'"
+ name="'.$name.'" value="'.$field.'"';
+ if ($_POST[$name] == $field) {
+ $out .= ' checked';
+ }
+ $out .= '>'.$title.'</label><br>';
+ $count++;
+ }
+ return $out;
+ }// }}}
+ // {{{ calendar_entry_input($name, $value, $icon_path)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param string $name Parameter description (if any) ...
+ * @param unknown $value Parameter description (if any) ...
+ * @param string $icon_path Parameter description (if any) ...
+ *
+ * @return string Return description (if any) ...
+ * @access public
+ */
+ function calendar_entry_input($name, $value, $icon_path)
+ {
+ $out = '
+ <input value="'.(($value)?$value:'Enter Date').'"
+ style="width:100px;float:left;" type="text" name="'.$name.'"
+ id="'.$name.'" readonly="1">
+ <img src="'.$icon_path.'img.gif" id="'.$name.'_trigger"
+ style="cursor: pointer; border: 1px solid red;" title="Date selector"
+ onmouseover="this.style.background=\'red\';"
+ onmouseout="this.style.background=\'\'">
+ ';
+ return $out;
+ }// }}}
+ // {{{ calendar_entry_javascript($name, $value)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param string $name Parameter description (if any) ...
+ * @param string $value Parameter description (if any) ...
+ *
+ * @return string Return description (if any) ...
+ * @access public
+ */
+ function calendar_entry_javascript($name, $value)
+ {
+ $out .= '
+ <script type="text/javascript">
+ Calendar.setup({
+ inputField : "'.$name.'", // id of the input field
+ ifFormat : "%m/%e/%Y", // format of the input field
+ button : "'.$name.'_trigger",// trigger for the calendar (button ID)
+ align : "Bl", // alignment (defaults to "Bl")
+ singleClick : true,
+ step : 1
+
+ ';
+ if ($value && $value != 'Enter Date') {
+ $out .= ',date : "'.$value.'"';
+ }
+ $out .= '
+ });
+</script>';
+ return $out;
+ }// }}}
+ // {{{ contact_date_entry($month,$day,$year,$month_name,$day_name,$year_name)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param string $month Month
+ * @param string $day Day
+ * @param string $year Year
+ * @param string $month_name id and name value of month
+ * @param string $day_name id and name value of day
+ * @param string $year_name id and name value of year
+ * @param string $onChange must be onChange="javzascript;"
+ *
+ * @return string Return description (if any) ...
+ * @access public
+ */
+ function contact_date_entry($month,$day,$year,$month_name,$day_name,$year_name,$onChange = null)
+ {
+ $cur_date = getdate();
+
+ if ($month == "") {
+ $month = $cur_date['mon'];
+ }
+ if ($day == "") {
+ $day = $cur_date['mday'];
+ }
+ if ($year == "") {
+ $year = $cur_date['year'];
+ }
+ $date = '<select id="'.$month_name.'" name="'.$month_name.'" '.$onChange.'>';
+ for ($i=1;$i<13;$i++) {
+ $date .= '<option value="';
+ if ($i < 10) {
+ $date .= "0";
+ }
+ $date .= $i.'"';
+ if ($i == $month) {
+ $date .= ' selected';
+ }
+ $date .= '>'.$i.'</option>';
+ }
+ $date .= '</select>';
+ $date .= '<select id="'.$day_name.'" name="'.$day_name.'" '.$onChange.'>';
+ for ($i=1;$i<32;$i++) {
+ $date .= '<option value="';
+ if ($i < 10) {
+ $date .= "0";
+ }
+ $date .= $i.'"';
+ if ($i == $day) {
+ $date .= ' selected';
+ }
+ $date .= '>'.$i.'</option>';
+ }
+ $date .= '</select>';
+ $date .= '<select id="'.$year_name.'" name="'.$year_name.'" '.$onChange.'>';
+ $ystart = $cur_date['year'] - 10;
+ for ($i=$ystart;$i<=$year;$i++) {
+ $date .= '<option value="'.$i.'"';
+ if ($i == $year) {
+ $date .= ' selected';
+ }
+ $date .= '>'.$i.'</option>';
+ }
+ $date .= '</select>';
+ return $date;
+ }// }}}
+ // {{{ cp1252_to_utf8($str)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $str Parameter description (if any) ...
+ *
+ * @return array Return description (if any) ...
+ * @access public
+ */
+ function cp1252_to_utf8($str)
+ {
+ $cp1252_map = array(
+ "\xc2\x80" => "\xe2\x82\xac", /* EURO SIGN */
+ "\xc2\x82" => "\xe2\x80\x9a", /* SINGLE LOW-9 QUOTATION MARK */
+ "\xc2\x83" => "\xc6\x92", /* LATIN SMALL LETTER F WITH HOOK */
+ "\xc2\x84" => "\xe2\x80\x9e", /* DOUBLE LOW-9 QUOTATION MARK */
+ "\xc2\x85" => "\xe2\x80\xa6", /* HORIZONTAL ELLIPSIS */
+ "\xc2\x86" => "\xe2\x80\xa0", /* DAGGER */
+ "\xc2\x87" => "\xe2\x80\xa1", /* DOUBLE DAGGER */
+ "\xc2\x88" => "\xcb\x86", /* MODIFIER LETTER CIRCUMFLEX ACCENT */
+ "\xc2\x89" => "\xe2\x80\xb0", /* PER MILLE SIGN */
+ "\xc2\x8a" => "\xc5\xa0", /* LATIN CAPITAL LETTER S WITH CARON */
+ "\xc2\x8b" => "\xe2\x80\xb9", /* SINGLE LEFT-POINTING ANGLE QUOTATION */
+ "\xc2\x8c" => "\xc5\x92", /* LATIN CAPITAL LIGATURE OE */
+ "\xc2\x8e" => "\xc5\xbd", /* LATIN CAPITAL LETTER Z WITH CARON */
+ "\xc2\x91" => "\xe2\x80\x98", /* LEFT SINGLE QUOTATION MARK */
+ "\xc2\x92" => "\xe2\x80\x99", /* RIGHT SINGLE QUOTATION MARK */
+ "\xc2\x93" => "\xe2\x80\x9c", /* LEFT DOUBLE QUOTATION MARK */
+ "\xc2\x94" => "\xe2\x80\x9d", /* RIGHT DOUBLE QUOTATION MARK */
+ "\xc2\x95" => "\xe2\x80\xa2", /* BULLET */
+ "\xc2\x96" => "\xe2\x80\x93", /* EN DASH */
+ "\xc2\x97" => "\xe2\x80\x94", /* EM DASH */
+
+ "\xc2\x98" => "\xcb\x9c", /* SMALL TILDE */
+ "\xc2\x99" => "\xe2\x84\xa2", /* TRADE MARK SIGN */
+ "\xc2\x9a" => "\xc5\xa1", /* LATIN SMALL LETTER S WITH CARON */
+ "\xc2\x9b" => "\xe2\x80\xba", /* SINGLE RIGHT-POINTING ANGLE QUOTATION*/
+ "\xc2\x9c" => "\xc5\x93", /* LATIN SMALL LIGATURE OE */
+ "\xc2\x9e" => "\xc5\xbe", /* LATIN SMALL LETTER Z WITH CARON */
+ "\xc2\x9f" => "\xc5\xb8" /* LATIN CAPITAL LETTER Y WITH DIAERESIS*/
+ );
+ return strtr(utf8_encode($str), $cp1252_map);
+ }// }}}
+ // {{{ create_href($options)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param array $options Parameter description (if any) ...
+ *
+ * @return mixed Return description (if any) ...
+ * @access public
+ */
+ function create_href($options)
+ {
+ if (!is_array($options)) {
+ return false;
+ } else {
+ $id = ($options['id'] && $options['id'] != '')
+ ? ' id="'.$options["id"].'"': '';
+ $title = ($options['title'] && $options['title'] != '')
+ ? ' title="'.$options["title"].'"': '';
+ $class = ($options['class'] && $options['class'] != '')
+ ? ' class="'.$options["class"].'"': '';
+ $text = ($options['text'] && $options['text'] != '')
+ ? strip_tags($options["text"]) : '';
+ $onClick = ($options['onClick'] && $options['onClick'] != '')
+ ? ' onClick="'.$options["onClick"].'"': '';
+ $onMouseover = ($options['onMouseover'] && $options['onMouseover'] != '')
+ ? ' onMouseover="'.$options["onMouseover"].'"': '';
+ $onMouseout = ($options['onMouseout'] && $options['onMouseout'] != '')
+ ? ' onMouseout="'.$options["onMouseout"].'"': '';
+ $out = '<a'.$class.$title.$onClick.$onMouseout.$id.'
+ href="'.$options["href"].'">'.$text.'</a>';
+ return $out;
+ }
+ }// }}}
+ // {{{ create_page_links($totalnum,$num,$start=0,$params,$page_length=ENTRIES_PER_PAGE)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param mixed $totalnum Parameter description (if any) ...
+ * @param unknown $num Parameter description (if any) ...
+ * @param number $start Parameter description (if any) ...
+ * @param unknown $params Parameter description (if any) ...
+ * @param number $page_length Parameter description (if any) ...
+ *
+ * @return string Return description (if any) ...
+ * @access public
+ */
+ function create_page_links($totalnum,$num,$start=0,$params=null,
+ $page_length=ENTRIES_PER_PAGE)
+ {
+ // FIND out which page we're on.
+ if ($totalnum!=0) {
+ $total_pages = floor($totalnum / $page_length); // total pages = the total result divided by page length rounded down
+ $total_pages++; // then add one
+ if ($start == 0) { // if start is 0 then page is one {
+ $page = 1;
+ } else {
+ $page = ($start / $page_length) + 1;
+ }
+ }
+
+ if ($totalnum > $page_length && ($page != $totalpages)) {
+ $end = $page_length + $start;
+ } else {
+ $end = $totalnum;
+ }
+ $last = $start - $page_length;
+ if (($start - $page_length) < 0) {
+ $prev = "";
+ } else {
+ $prev = "[<a href=\"$GLOBALS[PHP_SELF]?start=".$last
+ ."&$params\">PREVIOUS PAGE</a>]";
+ }
+ if ($end < $totalnum) {
+ $next = "[<a href=\"$GLOBALS[PHP_SELF]?start=".$end
+ ."&$params\">NEXT PAGE</a>]";
+ } else {
+ $next = "";
+ }
+ $starting = $start + 1;
+ $last_c = $start + $num;
+ $links = '<div class="page-links">Showing: '.$starting.' to '
+ .$last_c.' of '.$totalnum.'<div> '.$prev. ' '
+ .$next.'</div></div>';
+ return $links;
+ }// }}}
+ // {{{ create_sitemap()
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function create_sitemap()
+ {
+ $page = new Toolkit_Page(new GLM_TEMPLATE(9999));
+ // 404 pages must not contain any links (including css)
+ //$page->createErrorDocument();
+ }// }}}
+ // {{{ date_entry($month,$day,$year,$month_name,$day_name,$year_name)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param string $month Month
+ * @param string $day Day
+ * @param string $year Year
+ * @param string $month_name id and name value of month
+ * @param string $day_name id and name value of day
+ * @param string $year_name id and name value of year
+ * @param string $onChange must be onChange="javzascript;"
+ *
+ * @return string Return description (if any) ...
+ * @access public
+ */
+ function date_entry($month,$day,$year,$month_name,$day_name,$year_name,$onChange = null)
+ {
+ $cur_date = getdate();
+ if ($month == "") {
+ $month = $cur_date['mon'];
+ }
+ if ($day == "") {
+ $day = $cur_date['mday'];
+ }
+ if ($year == "") {
+ $year = $cur_date['year'];
+ }
+ $date = '<select id="'.$month_name.'" name="'.$month_name.'" '.$onChange.'>';
+ for ($i=1;$i<13;$i++) {
+ $date .= '<option value="';
+ if ($i < 10) {
+ $date .= "0";
+ }
+ $date .= $i.'"';
+ if ($i == $month) {
+ $date .= ' selected';
+ }
+ $date .= '>'.$i.'</option>';
+ }
+ $date .= '</select>';
+ $date .= '<select id="'.$day_name.'" name="'.$day_name.'" '.$onChange.'>';
+ for ($i=1;$i<32;$i++) {
+ $date .= '<option value="';
+ if ($i < 10) {
+ $date .= "0";
+ }
+ $date .= $i.'"';
+ if ($i == $day) {
+ $date .= ' selected';
+ }
+ $date .= '>'.$i.'</option>';
+ }
+ $date .= '</select>';
+ $date .= '<select id="'.$year_name.'" name="'.$year_name.'" '.$onChange.'>';
+ for ($i=2000;$i<2023;$i++) {
+ $date .= '<option value="'.$i.'"';
+ if ($i == $year) {
+ $date .= ' selected';
+ }
+ $date .= '>'.$i.'</option>';
+ }
+ $date .= '</select>';
+ return $date;
+ } // }}}
+ // {{{ explode_template($template,$data)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param boolean $template Parameter description (if any) ...
+ * @param unknown $data Parameter description (if any) ...
+ *
+ * @return boolean Return description (if any) ...
+ * @access public
+ */
+ function explode_template($template,$data)
+ {
+ $template = GLM_TOOLBOX::template_read($template);
+ $output = GLM_TOOLBOX::template_replacement($template, $data);
+ return $output;
+
+ }// }}}
+ // {{{ file_upload($form_field, $file_name, $destination_path, $restricted = false)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $form_field Parameter description (if any) ...
+ * @param string $file_name Parameter description (if any) ...
+ * @param string $destination_path Parameter description (if any) ...
+ * @param boolean $restricted Parameter description (if any) ...
+ *
+ * @return array Return description (if any) ...
+ * @access public
+ */
+ function file_upload($form_field, $file_name, $destination_path, $restricted = false)
+ {
+ foreach ($_FILES as $fieldName => $file) {
+ if ($file['tmp_name'] == $form_field) {
+ $fs = new Toolkit_FileServer_FileAdapter();
+ try {
+ $res = $fs->upload($fieldName);
+ return $res['name'];
+ } catch(Toolkit_FileServer_Exception $e) {
+ Toolkit_Logger::logException('File Server', $e);
+ return false;
+ }
+ }
+ }
+ return false;
+
+ }// }}}
+ // {{{ footer()
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function footer()
+ {
+ $bottomScripts = Toolkit_Common::getScripts($GLOBALS['bottomScripts']);
+
+ echo "$bottomScripts </body></html>";
+ }
+
+ // }}}
+ // {{{ form_footer($name, $suppress = 0, $cs)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $name Parameter description (if any) ...
+ * @param integer $suppress Parameter description (if any) ...
+ * @param unknown $cs Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function form_footer($name, $suppress = 0, $cs = 2)
+ {
+ echo "<tr><td colspan=\"$cs\" align=center>
+ <input type=\"SUBMIT\" name=\"Command\" value=\"$name\">";
+ if ($suppress == 1) {
+ echo '<input type="SUBMIT" name="Command" value="Delete" onclick="return confirm(\'This will be Deleted! Are you sure?\');">';
+ }
+ /* echo "<input type=\"SUBMIT\" name=\"Command\" value=\"Cancel\">";*/
+ echo "</td>";
+ }// }}}
+ // {{{ form_header($action, $method, $hidden = "")
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $action Parameter description (if any) ...
+ * @param unknown $method Parameter description (if any) ...
+ * @param mixed $hidden Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function form_header($action, $method, $hidden = "")
+ {
+ echo "<form action=\"$action\" method=\"$method\"
+ enctype=\"multipart/form-data\">";
+ if ($hidden != "" && is_array($hidden)) {
+ foreach ($hidden as $key=>$value) {
+ echo "<input type=\"hidden\" name=\"$key\" value=\"$value\">";
+ }
+ }
+ }// }}}
+ // {{{ get_parentid($id)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param integer $id Parameter description (if any) ...
+ *
+ * @return mixed Return description (if any) ...
+ * @access public
+ */
+ function get_parentid($id)
+ {
+ static $parentshow;
+ if ($id == 0) {
+ return 0;
+ }
+ if (!is_array($parentshow)) {
+ $qs = "select parent from bus_category where id = $id";
+ $parentrow = GLM_TOOLBOX::db_auto_get_data($qs);
+ }
+ if ($parentrow[0]['parent'] == 0) {
+ return $id;
+ } else {
+ return GLM_TOOLBOX::get_parentid($parentrow[0]['parent']);
+ }
+ }// }}}
+ // {{{ get_season()
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @return string Return description (if any) ...
+ * @access public
+ */
+ function get_season()
+ {
+ /*
+ The seasons
+ Spring March 21st to June 20
+ Summer June 21 to Sept 20
+ Fall Sept 21 to Dec 20
+ Winter Dec 21 to March 20
+ */
+ $Spring = mktime(0, 0, 0, 3, 21, date("Y"));
+ $Summer = mktime(0, 0, 0, 6, 21, date("Y"));
+ $Fall = mktime(0, 0, 0, 9, 21, date("Y"));
+ $Winter = mktime(0, 0, 0, 12, 21, date("Y"));
+ $time = mktime();
+ if ($time >= $Spring && $time < $Summer) {
+ $season = "spring";
+ } elseif ($time >= $Summer && $time < $Fall) {
+ $season = "summer";
+ } elseif ($time >= $Fall && $time < $Winter) {
+ $season = "fall";
+ } else {
+ $season = "winter";
+ }
+ return $season;
+ }// }}}
+ // {{{ get_size($file)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $file Parameter description (if any) ...
+ *
+ * @return mixed Return description (if any) ...
+ * @access public
+ */
+ function get_size($file)
+ {
+ $size = filesize($file) / 1024;
+ if ($size >= 1000) {
+ $size = (float) number_format($size / 1000, 2);
+ $size .= 'MB';
+ } elseif ($size < 1000) {
+ $size = ceil($size);
+ $size .= 'KB';
+ }
+ return $size;
+ }// }}}
+ // {{{ html_error($msg, $bail)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param string $msg Parameter description (if any) ...
+ * @param unknown $bail Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function html_error($msg, $bail)
+ {
+ echo '<div style="color:red;"><pre>'.$msg.'</pre></div>';
+ if ($bail) {
+ GLM_TOOLBOX::footer();
+ }
+ }// }}}
+ // {{{ html_header($title, $msg, $img)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $title Parameter description (if any) ...
+ * @param unknown $msg Parameter description (if any) ...
+ * @param unknown $img Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function html_header($title, $msg, $img)
+ {
+ $header_table_width = "400";
+ $header_table_align = "center";
+ echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+ <html>
+ <head>
+ <title><?echo $title?></title>
+ <link type="text/css" rel=stylesheet href="<?echo STYLE?>">
+ </head>
+ <body>
+ <table width="<?echo $header_table_width?>" align="<?echo $header_table_align?>" summary="Header Information" class="headertable" cellspacing="0" cellpadding="3">
+ <tr class="headertr">
+ <td class="headertd">';
+ if ($img) {
+ echo '<img src="<?echo IMG_BASE.$img?>" alt="<?echo HEAD?>" border="0">';
+ }
+ echo '</td>
+ </tr>
+ <tr>
+ <td class="headertd2" align="center">
+ <div class="headerh2" align="center"><?echo "$msg"?></div>
+ </td>
+ </tr>
+ </table>';
+ }// }}}
+ // {{{ html_nav_table($nav, $w)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param array $nav Parameter description (if any) ...
+ * @param unknown $w Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function html_nav_table($nav, $w)
+ {
+ if (is_array($nav)) {
+ $out = '<ul class="admin_nav">';
+ foreach ($nav as $link => $url) {
+ if (is_array($url)) {
+ $out .= '<li><a href="'.$url[0].'" '.$url[1].'>'.$link.'</a></li>';
+ } else {
+ $out .= '<li><a href="'.$url.'">'.$link.'</a></li>';
+ }
+ }
+ $out .= '</ul>';
+ }
+ echo $out;
+ }// }}}
+ // {{{ http_strip(&$string)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown &$string Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function http_strip(&$string)
+ {
+ $test_string = strtolower($string);
+ if (substr($test_string, 0, 7) == "http://") {
+ $string = substr($string, 7);
+ }
+ }// }}}
+ // {{{ img_resize($path2image, $path2thumb, $size)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $path2image Parameter description (if any) ...
+ * @param unknown $path2thumb Parameter description (if any) ...
+ * @param unknown $size Parameter description (if any) ...
+ *
+ * @return mixed Return description (if any) ...
+ * @access public
+ */
+ function img_resize($path2image, $path2thumb, $size)
+ {
+ exec("which convert", $output, $return);
+ if ($return == 0) {
+ $CONVERT = $output[0];
+ } else {
+ return $error = array('convert path uknown');
+ }
+ $imageName = basename($path2image);
+ $thumbName = basename($path2thumb);
+
+ exec("$CONVERT -quality 100 -scale $size $path2image $path2thumb");
+ //chmod($path2thumb,660);
+
+ $img_resize_array = array("$imageName","$path2image","$thumbName","$path2thumb");
+ return $img_resize_array;
+ }// }}}
+ // {{{ img_upload($form_field, $img_name, $destination_path)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $form_field Parameter description (if any) ...
+ * @param unknown $img_name Parameter description (if any) ...
+ * @param unknown $destination_path Parameter description (if any) ...
+ *
+ * @return boolean Return description (if any) ...
+ * @access public
+ */
+ function img_upload($form_field, $img_name, $destination_path)
+ {
+ return GLM_TOOLBOX::file_upload($form_field, $img_name, $destination_path, true);
+ }// }}}
+ // {{{ is_utf8($string)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $string Parameter description (if any) ...
+ *
+ * @return mixed Return description (if any) ...
+ * @access public
+ */
+ function is_utf8($string)
+ {
+ return preg_match('/^([\x00-\x7f]|[\xc2-\xdf][\x80-\xbf]|\xe0[\xa0-\xbf][\x80-\xbf]|[\xe1-\xec][\x80-\xbf]{2}|\xed[\x80-\x9f][\x80-\xbf]|[\xee-\xef][\x80-\xbf]{2}|f0[\x90-\xbf][\x80-\xbf]{2}|[\xf1-\xf3][\x80-\xbf]{3}|\xf4[\x80-\x8f][\x80-\xbf]{2})*$/', $string) === 1;
+ }// }}}
+ // {{{ make_data_table($data, $tableId = null)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param array $data Parameter description (if any) ...
+ * @param string $tableId Parameter description (if any) ...
+ *
+ * @return mixed Return description (if any) ...
+ * @access public
+ */
+ function make_data_table($data, $tableId = null)
+ {
+ if (is_array($data)) {
+ $count = 0;
+ foreach ($data as $row) {
+ if (!is_array($row)) {
+ return false;
+ }
+ $table_body .= '<tr>
+ ';
+ $col = 1;
+ foreach ($row as $field_name => $field) {
+ if ($count == 0) {
+ $table_head .= '<th>'.$field_name.'</th>';
+ }
+ $table_body .= '<td class="c'.$col.'">'.$field.'</td>';
+ $col++;
+ }
+ $count++;
+ $table_body .= '</tr>
+ ';
+ }
+ $table = '<table'.(($tableId)?' id="'.$tableId.'"':'').'>
+ <tr>'.$table_head.'</tr>
+ '.$table_body.'
+ </table>';
+ }
+ return $table;
+ }// }}}
+ // {{{ make_teaser($text, $maxlength, $strip_tags=false)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $text Parameter description (if any) ...
+ * @param unknown $maxlength Parameter description (if any) ...
+ * @param boolean $strip_tags Parameter description (if any) ...
+ *
+ * @return unknown Return description (if any) ...
+ * @access public
+ */
+ function make_teaser($text, $maxlength, $strip_tags=false)
+ {
+ if ($strip_tags) {
+ $text = strip_tags($text);
+ }
+ if (strlen($text) > $maxlength) {
+ if (!($pos = strpos($text, ' ', $maxlength))) {
+ return $text;
+ }
+ $text = substr($text, 0, $pos);
+ }
+ return $text;
+ }// }}}
+ // {{{ myEncode($string)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $string Parameter description (if any) ...
+ *
+ * @return boolean Return description (if any) ...
+ * @access public
+ */
+ function myEncode($string)
+ {
+ if (GLM_TOOLBOX::is_utf8($string)) {
+ return $string;
+ } else {
+ return GLM_TOOLBOX::cp1252_to_utf8($string);
+ }
+ }// }}}
+ // {{{ php_old_pg()
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @return boolean Return description (if any) ...
+ * @access public
+ */
+ function php_old_pg()
+ {
+ switch($this->php_version[0]) {
+ case 5:
+ return false;
+ break;
+
+ case 4:
+ switch($php_version[1]) {
+ case 2:
+ return false;
+ break;
+ case 1:
+ return true;
+ break;
+ }
+ break;
+ }
+ }// }}}
+ // {{{ php_version_check()
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @return array Return description (if any) ...
+ * @access public
+ */
+ function php_version_check()
+ {
+ $this->php_version = explode(".", phpversion());
+ return $this->php_version;
+ }// }}}
+ // {{{ process_image($image, $image_name)
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $image Parameter description (if any) ...
+ * @param unknown $image_name Parameter description (if any) ...
+ *
+ * @return unknown Return description (if any) ...
+ * @access public
+ */
+ function process_image($image)
+ {
+ require_once BASE.'Toolkit/Image/Server.php';
+ $imServer = new Toolkit_Image_Server();
+ $image_name = $imServer->imageUpload($image);
+ return $image_name;
+ }// }}}
+ // {{{ send_html_email($to, $subject, $body, $headers, $charset = 'utf-8')
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $to Parameter description (if any) ...
+ * @param unknown $subject Parameter description (if any) ...
+ * @param unknown $body Parameter description (if any) ...
+ * @param string $headers Parameter description (if any) ...
+ * @param string $charset Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function send_html_email($to, $subject, $body, $headers, $charset = 'utf-8')
+ {
+ if ($headers) {
+ $headers .= "\n";
+ }
+ $headers .= "MIME-Version: 1.0\n"
+ . "Content-type: text/html; charset=".$charset;
+ mail($to, $subject, $body, $headers);
+ }// }}}
+ // {{{ template_read($template)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param nknown $template Parameter description (if any) ...
+ *
+ * @return string Return description (if any) ...
+ * @access public
+ */
+ function template_read($template)
+ {
+ $fp = fopen($template, "r");
+ $contents = fread($fp, filesize($template));
+ fclose($fp);
+ if ($contents) {
+ return $contents;
+ } else {
+ return "";
+ }
+ }// }}}
+ // {{{ template_replacement($template, $fieldarr)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $template Parameter description (if any) ...
+ * @param array $fieldarr Parameter description (if any) ...
+ *
+ * @return unknown Return description (if any) ...
+ * @access public
+ */
+ function template_replacement($template, $fieldarr)
+ {
+ if (is_array($fieldarr)) {
+ $fieldarr['BASE_URL'] = BASE_URL;
+ foreach ($fieldarr as $key => $value) {
+ $p = "/<!-- loop:$key -->(.*?)<!-- endloop:$key -->/s";
+ if (preg_match($p, $template, $match) && is_array($value)) {
+ // ok we have found a loop for this array
+ // now lets add into this template the correct
+ // number we'll need to do the replacement
+ // replace template loop section with {loop:$key}
+ $p = "/<!-- loop:$key -->(.*?)<!-- endloop:$key -->/s";
+ $template = preg_replace($p, "{loop:$key}", $template);
+ // saving the actual template with match run through
+ // the array to build a tempory section
+ // then switch it out for {loop:$key}
+ $template_temp = '';
+ foreach ($value as $srow) {
+ $tpl = $match[1];
+ foreach ($srow as $field => $val) {
+ $p = "/<!-- if:$key:$field -->(.*?)<!-- endif:$key:$field -->/s";
+ if (preg_match($p, $template) && $val == '') {
+ $p = "/<!-- if:$key:$field -->(.*?)<!-- endif:$key:$field -->/s";
+ $tpl = preg_replace($p, '', $tpl);
+ } else {
+ $tpl = str_replace("<!-- $key:$field -->", $val, $tpl);
+ }
+ }
+ $template_temp .= $tpl;
+ }
+ $template = str_replace("{loop:$key}", $template_temp, $template);
+
+ } else {
+ $p = "/<!-- if:$key -->(.*?)<!-- endif:$key -->/s";
+ if (preg_match($p, $template) && $value == '') {
+ $p = "/<!-- if:$key -->(.*?)<!-- endif:$key -->/s";
+ $template = preg_replace($p, '', $template);
+ } else {
+ $template = str_replace("<!-- $key -->", $value, $template);
+ }
+ }
+ }
+ }
+
+ return $template;
+ }// }}}
+ // {{{ text_area($name, $value, $rows = 15, $cols = 50, $wrap = "virtual")
+
+
+ /**
+ * create td element with textarea element inside
+ * Creates the textarea field with souround ing td tags
+ *
+ * @deprecated
+ *
+ * @param unknown $name name attr
+ * @param unknown $value text node
+ * @param integer $rows rows attr
+ * @param integer $cols cols attr
+ * @param string $wrap wrap attr
+ *
+ * @return void
+ * @access public
+ */
+ function text_area($name, $value, $rows = 15, $cols = 50, $wrap = "virtual")
+ {
+ $html = '
+ <td>
+ <textarea id="%s" name="%s" rows="%s" cols="%s" wrap="%s">%s</textarea>
+ </td>';
+ return printf(
+ $html,
+ $name,
+ $name,
+ $rows,
+ $cols,
+ $wrap,
+ htmlspecialchars($value)
+ );
+ }// }}}
+ // {{{ text_box($name, $value, $size = 35)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $name Parameter description (if any) ...
+ * @param unknown $value Parameter description (if any) ...
+ * @param integer $size Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function text_box($name, $value, $size = 35)
+ {
+ echo "<td class=\"navtd2\"><input type=\"text\" name=\"$name\"
+ value=\"".htmlspecialchars($value)."\" size=\"$size\"></td>";
+ }// }}}
+ // {{{ time_entry($H, $m, $F, $H_name, $m_name, $F_name)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param mixed $H Parameter description (if any) ...
+ * @param string $m Parameter description (if any) ...
+ * @param string $F Parameter description (if any) ...
+ * @param unknown $H_name Parameter description (if any) ...
+ * @param unknown $m_name Parameter description (if any) ...
+ * @param unknown $F_name Parameter description (if any) ...
+ *
+ * @return string Return description (if any) ...
+ * @access public
+ */
+ function time_entry($H, $m, $F, $H_name, $m_name, $F_name)
+ {
+ $cur_date = getdate();
+ if ($H == "") {
+ $H = $cur_date['hours'];
+ }
+ if ($m == "") {
+ $m = $cur_date['minutes'];
+ }
+ if ($H>12) {
+ $F = "PM";
+ $H = $H - 12;
+ }
+ $time = "Hr:<select name=\"$H_name\" size=\"1\">";
+ for ($i=1;$i<=12;$i++) {
+ $time .= "<option value=\"";
+ if ($i < 10) {
+ $time .= "0";
+ }
+ $time .= "$i\"";
+ if ($i == $H) {
+ $time .= " selected";
+ }
+ $time .= ">$i\n";
+ }
+ $time .= "</select>\n";
+ $time .= "Min:<select name=\"$m_name\" size=\"1\">";
+ for ($i=0;$i<60;$i=$i+15) {
+ $time .= "<Option value=\"";
+ if ($i < 10) {
+ $time .= "0";
+ }
+ $time .= "$i\"";
+ if ($i == $m) {
+ $time .= " selected";
+ }
+ $time .= ">";
+ if ($i < 10) {
+ $time .= "0";
+ }
+ $time .= "$i\n";
+ }
+ $time .= "</select>";
+ $time .= "<select name=\"$F_name\" size=\"1\">";
+ $time .= "<option value=\"AM\"";
+ if ($F == "AM") {
+ $time .= " selected";
+ }
+ $time .= ">AM\n";
+ $time .= "<option value=\"PM\"";
+ if ($F == "PM") {
+ $time .= " selected";
+ }
+ $time .= ">PM\n";
+ $time .= "</select>\n";
+ return $time;
+ }// }}}
+ // {{{ top($message, $hp,$hp2 = null)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param string $message Parameter description (if any) ...
+ * @param unknown $hp Parameter description (if any) ...
+ * @param string $hp2 Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function top($message, $hp, $hp2 = null, $includeMainStyleSheet = true)
+ {
+ if ($hp2 != "") {
+ $help_guide = '<div id="glm-manual">';
+ /*
+ $help_guide = '<div id="glm-manual"><a id="manual-html"
+ href="http://www.gaslightmedia.com/manuals/html/'.$hp2.'.html"
+ target="_blank">Online Help Guide</a> ';
+ */
+ $help_guide .= '<a id="manual-pdf"
+ href="http://www.gaslightmedia.com/manuals/pdf/'.$hp2.'.pdf"
+ target="_blank">Printable Help Guide</a></div>';
+ }
+ // Default resources for admin pages.
+ if (is_array($GLOBALS['topScripts'])) {
+
+ $topScripts = $GLOBALS['topScripts'];
+ array_reverse($topScripts);
+ array_push($topScripts, JQUERY_CDN_JS);
+ array_reverse($topScripts);
+
+ $GLOBALS['topScripts'] = $topScripts;
+ } else {
+ $GLOBALS['topScripts'] = array(
+ JQUERY_CDN_JS
+ );
+ }
+ if ($includeMainStyleSheet) {
+ $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'admin/main.css';
+ }
+
+ $topScripts = Toolkit_Common::getScripts($GLOBALS['topScripts']);
+ $styles = Toolkit_Common::getStyleSheets($GLOBALS['styleSheets']);
+
+ if (!empty($message)) {
+ $header = "<h1>$message</h1>";
+ }
+
+ $out = '
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+ <html>
+ <head>
+ <title>Untitled</title>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ ' . $styles . $topScripts .'
+ </head>
+ <body>' .
+ $header . ' ' .
+ $help_guide;
+ echo $out;
+ }
+
+ // }}}
+ function topUserArea($message, $hp, $hp2 = null, $includeMainStyleSheet = true)
+ {
+ if ($hp2 != "") {
+ $help_guide = '<div id="glm-manual">';
+ /*
+ $help_guide = '<div id="glm-manual"><a id="manual-html"
+ href="http://www.gaslightmedia.com/manuals/html/'.$hp2.'.html"
+ target="_blank">Online Help Guide</a> ';
+ */
+ $help_guide .= '<a id="manual-pdf"
+ href="http://www.gaslightmedia.com/manuals/pdf/'.$hp2.'.pdf"
+ target="_blank">Printable Help Guide</a></div>';
+ }
+ // Default resources for admin pages.
+ $GLOBALS['topScripts'][] = MEDIA_APP_BASE_URL . 'libjs/jquery/jquery-1.4.2.min.js';
+ if ($includeMainStyleSheet) {
+ $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'userArea/main.css';
+ }
+
+ $topScripts = Toolkit_Common::getScripts($GLOBALS['topScripts']);
+ $styles = Toolkit_Common::getStyleSheets($GLOBALS['styleSheets']);
+
+ if (!empty($message)) {
+ $header = "<h1>$message</h1>";
+ }
+
+ $out = '
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+ <html>
+ <head>
+ <title>Untitled</title>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ ' . $styles . $topScripts .'
+ </head>
+ <body>' .
+ $header . ' ' .
+ $help_guide;
+ echo $out;
+ }
+ // {{{ top2($message, $hp,$hp2 = null)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $message Parameter description (if any) ...
+ * @param unknown $hp Parameter description (if any) ...
+ * @param unknown $hp2 Parameter description (if any) ...
+ *
+ * @return void
+ * @access public
+ */
+ function top2($message, $hp, $hp2 = null)
+ {
+ // make this an alias to top()
+ // by calling top instead of adding extra code
+ GLM_TOOLBOX::top($message, $hp, $hp2);
+ }// }}}
+ // {{{ valid_email($email)
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $email Parameter description (if any) ...
+ *
+ * @return boolean Return description (if any) ...
+ * @access public
+ */
+ function valid_email($email)
+ {
+ // First, we check that there's one @ symbol, and lengths are right
+ if (!preg_match("/^[^@]{1,64}@[^@]{1,255}$/", $email)) {
+ // Email invalid because wrong number of characters in one section,
+ // or wrong number of @ symbols.
+ return false;
+ }
+ // Split it into sections to make life easier
+ $email_array = explode("@", $email);
+ $local_array = explode(".", $email_array[0]);
+ for ($i = 0; $i < sizeof($local_array); $i++) {
+ $p = "/^(([A-Za-z0-9!#$%&'*+\/=?^_`{"
+ ."|}~-][A-Za-z0-9!#$%&'*+\/=?^_`{|}~\.-]{0,63})"
+ . "|(\"[^(\\|\")]{0,62}\"))$/";
+ if (!preg_match($p, $local_array[$i])) {
+ return false;
+ }
+ }
+ if (!preg_match("/^\[?[0-9\.]+\]?$/", $email_array[1])) {
+ // Check if domain is IP. If not, it should be valid domain name
+ $domain_array = explode(".", $email_array[1]);
+ if (sizeof($domain_array) < 2) {
+ return false; // Not enough parts to domain
+ }
+ for ($i = 0; $i < sizeof($domain_array); $i++) {
+ $p = "/^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])"
+ ."|([A-Za-z0-9]+))$/";
+ if (!preg_match($p, $domain_array[$i])) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }// }}}
+ // {{{ word_limiter($str, $limit = 100, $end_char = '…')
+
+
+ /**
+ * Short description for function
+ *
+ * Long description (if any) ...
+ *
+ * @param unknown $str Parameter description (if any) ...
+ * @param mixed $limit Parameter description (if any) ...
+ * @param string $end_char Parameter description (if any) ...
+ *
+ * @return mixed Return description (if any) ...
+ * @access public
+ */
+ function word_limiter($str, $limit = 100, $end_char = '…')
+ {
+ if (trim($str) == '') {
+ return $str;
+ }
+
+ preg_match('/\s*(?:\S*\s*) {'. (int) $limit .'}/', $str, $matches);
+
+ if (strlen($matches[0]) == strlen($str)) {
+ $end_char = '';
+ }
+ return rtrim($matches[0]) . $end_char;
+ }// }}}
+}
+?>
--- /dev/null
+<?php
+ /************************************************************************
+ * CSS and Javascript Combinator 0.5
+ * Copyright 2006 by Niels Leenheer
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+ $cache = true;
+ $cacheLife = 21600;
+ $cachedir = dirname(__FILE__) . '/cache';
+ $cssdir = dirname(__FILE__) . '/';
+ $jsdir = dirname(__FILE__) . '/';
+
+ // Determine the directory and type we should use
+ switch ($_GET['type']) {
+ case 'css':
+ $base = realpath($cssdir);
+ break;
+ case 'javascript':
+ $base = realpath($jsdir);
+ break;
+ default:
+ header ("HTTP/1.0 503 Not Implemented");
+ exit;
+ };
+
+ $type = $_GET['type'];
+
+ // This will be used later for changing relative urls for css image paths
+ // into absolute paths to prevent the browser from getting confused
+ if ($type == 'css') {
+ $scriptNameDir = dirname($_SERVER['SCRIPT_NAME']);
+ if ($scriptNameDir == '/') {
+ $scriptNameDir = '';
+ }
+
+ $baseUrl = $_SERVER['HTTP_HOST'] . $scriptNameDir;
+ $baseUrl = preg_replace('|/*$|', '', $baseUrl);
+ $glmBaseUrl
+ = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')
+ ? "https://$baseUrl/"
+ : "http://$baseUrl/";
+ }
+
+ $elements = explode(',', $_GET['files']);
+
+ // Determine last modification date of the files
+ $lastmodified = 0;
+ while (list(,$element) = each($elements)) {
+ $path = realpath($base . '/' . $element);
+ if ($_ENV['GLM_HOST_ID'] != 'PRODUCTION'
+ && (time() - filemtime($path)) >= $cacheLife
+ ) {
+ @touch($path);
+ }
+
+ if ( ($type == 'javascript' && substr($path, -3) != '.js')
+ || ($type == 'css' && substr($path, -4) != '.css')
+ ) {
+ header ("HTTP/1.0 403 Forbidden");
+ exit;
+ }
+
+ if (substr($path, 0, strlen($base)) != $base || !file_exists($path)) {
+ header ("HTTP/1.0 404 Not Found");
+ exit;
+ }
+
+ $lastmodified = max($lastmodified, filemtime($path));
+ }
+
+ // Send Etag hash
+ $hash = $lastmodified . '-' . md5($_GET['files']);
+ header ("Etag: \"" . $hash . "\"");
+
+ if ( isset($_SERVER['HTTP_IF_NONE_MATCH'])
+ && stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) == '"' . $hash . '"'
+ )
+ {
+ // Return visit and no modifications, so do not send anything
+ header ("HTTP/1.0 304 Not Modified");
+ header ('Content-Length: 0');
+ } else {
+ // First time visit or files were modified
+ if ($cache) {
+ // Determine supported compression method
+ $gzip = strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip');
+ $deflate = strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate');
+
+ // Determine used compression method
+ $encoding = $gzip ? 'gzip' : ($deflate ? 'deflate' : 'none');
+
+ // Check for buggy versions of Internet Explorer
+ if ( !strstr($_SERVER['HTTP_USER_AGENT'], 'Opera')
+ && preg_match('/^Mozilla\/4\.0 \(compatible; MSIE ([0-9]\.[0-9])/i', $_SERVER['HTTP_USER_AGENT'], $matches)
+ ) {
+ $version = floatval($matches[1]);
+
+ if ($version < 6) {
+ $encoding = 'none';
+ }
+
+ if ($version == 6 && !strstr($_SERVER['HTTP_USER_AGENT'], 'EV1')) {
+ $encoding = 'none';
+ }
+ }
+
+ // Try the cache first to see if the combined files were already generated
+ $cachefile = 'cache-' . $hash . '.' . $type . ($encoding != 'none' ? '.' . $encoding : '');
+
+ if (file_exists($cachedir . '/' . $cachefile)) {
+ if ($fp = fopen($cachedir . '/' . $cachefile, 'rb')) {
+
+ if ($encoding != 'none') {
+ header ("Content-Encoding: $encoding");
+ }
+
+ header ("Content-Type: text/$type");
+ header ("Content-Length: " . filesize("$cachedir/$cachefile"));
+
+ fpassthru($fp);
+ fclose($fp);
+ exit;
+ }
+ }
+ }
+
+ // Get contents of the files
+ $contents = '';
+ reset($elements);
+ while (list(,$element) = each($elements)) {
+ $path = realpath($base . '/' . $element);
+
+ // If we're dealing w/ css files, we need to change relative paths
+ // to images into absolute paths, this way the images are not
+ // confused when their paths are sent to the server
+ $fileContents = file_get_contents($path);
+ if ($type == 'css') {
+ $subDir = dirname($element);
+ if ($subDir == '.') {
+ $subDir = '';
+ }
+ if ($subDir != '') {
+ $subDir .= '/';
+ }
+ $fileContents = preg_replace(
+ '/url\(("|\')?(?!http)([^\'"]+?)("|\')?\)/',
+ "url('$glmBaseUrl$subDir\$2')",
+ $fileContents
+ );
+ }
+ $contents .= "\n\n$fileContents";
+ }
+
+ // Send Content-Type
+ header ("Content-Type: text/$type");
+
+ if (isset($encoding) && $encoding != 'none') {
+ // Send compressed contents
+ $contents = gzencode($contents, 9, $gzip ? FORCE_GZIP : FORCE_DEFLATE);
+ header ("Content-Encoding: $encoding");
+ header ('Content-Length: ' . strlen($contents));
+ echo $contents;
+ } else {
+ // Send regular contents
+ header ('Content-Length: ' . strlen($contents));
+ echo $contents;
+ }
+
+ // Store cache
+ if ($cache) {
+ if ($fp = fopen($cachedir . '/' . $cachefile, 'wb')) {
+ fwrite($fp, $contents);
+ fclose($fp);
+ }
+ }
+ }
+
--- /dev/null
+; Production server configuration data
+[production]
+; Turn the banner application On or Off
+bannerdb.application = Off
+; Turn the Shop application On or Off
+retailShop.application = Off
+
+; Turn the contact application On or Off
+contactdb.application = On
+; Set the first year available in the year select lists
+; these are in the report builder form for admin
+; site > admin > contacts > report builder
+contactdb.first_year = 2014
+; used in the email out for the contact db
+contactdb.production_mode = "ON"
+; turn on for html email
+contactdb.html_email = "ON"
+
+; STREAM SEND API
+; Turn on the streamsend module to use with our contact application
+contactdb.streamsend.application = Off
+; Login id for the streamsend account
+contactdb.streamsend.login = Off
+; Transaction key for the streamsend account
+contactdb.streamsend.key = Off
+; Streamsend account name
+contactdb.streamsend.account_name = Off
+; Streamsend audience number
+contactdb.streamsend.audience = Off
+
+; CONSTANT CONTACT API
+; Constant Contact forms
+constantcontact.application = Off
+; login for Constant Contact
+constantcontact.login = Off
+; password for Constant Contact
+constantcontact.password = Off
+; API Key
+constantcontact.apikey = Off
+; API Path
+constantcontact.apipath = Off
+; Constant Contact List - Array of list to add contacts to
+; example BeaverIslandBoatCo/lists/1
+constantcontact.list.0 = Off
+
+; Turn the coupon application On or Off
+coupons.application = Off
+
+; Turn the event application On or Off
+eventdb.application = Off
+; Turn the Events Common Application On or Off
+eventdb.commonEvents = On
+; The page id in the toolbox that holds the event calendar
+eventdb.event_page = Off
+; Turn the home page events module On or Off for the event application
+eventdb.home_events = Off
+
+; Turn the events management application On or Off
+event_management.application = Off
+; The page id in the toolbox that is the entry page for Event management - Generally set for each server
+event_management.home_page = Off
+event_management.members_only_page = Off
+
+; Turn the google search application On of Off
+google.search.application = Off
+
+; Turn on Gaslight Media Search application On or Off
+glmsearch.application = On
+glmsearch.site = "demo.gaslightmedia.com"
+glmsearch.login = "WebsiteServices"
+glmsearch.key = "829800701e8440b67a78e3afbefa1049"
+
+; Turn the home page headlines module On or Off for the toolbox
+headlines.application = Off
+
+; Turn the member application On or Off
+memberdb.application = Off
+; The page id in the toolbox that holds the login box to the members only area
+memberdb.login_page = Off
+; The page id in the toolbox that is the members only area home page
+memberdb.members.home_page = Off
+; The page id in the toolbox that is the members only area profile form page
+memberdb.members.profile_form_page = Off
+; The page id in the toolbox that is the members only area coupons page
+memberdb.members.coupons.page = Off
+memberdb.members.coupons.notification_email = Off
+; The page id in the toolbox that is the members only area events page
+memberdb.members.events_page = Off
+memberdb.members.events.notification_email = Off
+; The page id in the toolbox that is the members only reporting page
+memberdb.members.reports_page = Off
+; The page id in the toolbox that is the members only leads page
+memberdb.members.leads_page = Off
+; Turn the trip planner module On or Off for the member application
+memberdb.session.list = Off
+; The page id in the toolbox that holds the output for the trip planner
+memberdb.session.page = Off
+; The page id in the toolbox that holds the create account form for the trip planner
+memberdb.session.form = Off
+; Turn on the streamsend module to use with our member application
+memberdb.streamsend.application = Off
+
+; Turn the news On or Off
+news.application = Off
+; Turn the home page news On or Off
+news.home = Off
+; The page id for news output
+news.page = Off
+
+; Turn the photo gallery application On or Off
+photo_gallery.application = On
+
+; Turn the rotating image application On or Off
+rotating_images.application = On
+
+; Turn the weather application On or Off
+weather.application = Off
+
+; Turn the gift certificate application On or Off
+gift_certificates.application = Off
+
+ticketing.available = Off
+ticketing.catid = Off
+ticketing.cat_seo = Off
+
+employment.application = Off
+videos.application = On
+seasons.application = Off
+blocks.application = Off
+; development server configuration data inherits from production and
+; overrides values as necessary
+[development : production]
+
+; chuck's server configuration data inherits from development
+; and overrides values as necessary
+[chuck : development]
+
+; steve's server configuration data inherits from development
+; and overrides values as necessary
+[steve : development]
+
--- /dev/null
+; production server configuration for application
+[production]
+; Application specific options
+options.categoryBlocks.show = On
+options.categoryBlocks.events = 3
+options.defaultSearchDays = 7
+options.shortCuts.today = On
+options.shortCuts.tommorrow = On
+options.hasMajorEvents = Off
+options.eventsPerPageOnPdf = 8
+options.hasNameSearch = On
+; short cuts for next 7 days (date ranges)
+options.shortCuts.dayRange[] = 7
+
+; for pdf logo path from BASE
+options.pdfLogoPath = Off
+
+; default Flexy Options for this application
+flexyOptions.multiSource = On
+flexyOptions.templateDir[] = BASE "Toolkit/Events/views"
+flexyOptions.templateDir[] = COMMON_APP_PATH "views"
+flexyOptions.compileDir = BASE "Toolkit/Events/views/compiled"
+flexyOptions.templateDirOrder = "reverse"
+
+; development server configuration inherits from production and
+; overrides values as needed
+[development : production]
+
+; Chuck's server configuration inherits from development and
+; overrides values as needed
+[chuck : development]
+
+; Steve's server configuration inherits from development and
+; overrides values as needed
+[steve : development]
--- /dev/null
+; Production site configuration data
+[production]
+; Name used in the title tag, admin area and emails
+site_url = "http://www.cedarvillemarine.com/"
+coupon_site_url = "www.cedarvillemarine.com"
+
+; Link URL to access mobile site to home page
+mobile.link =
+mobile.hostname = On
+
+; google search api key
+google.search.key = "ABQIAAAANX0yQZ2OteLu_zqbwdfUuRT9PY8-4c5xPr71Q7CZ_E9OOktIvhS7e6r_9XaLW5jy3O84t-dz7SK21Q"
+; google search site restriction
+google.search.site_restriction = "http://demo.gaslightmedia.com/"
+; google maps api key
+google.maps.key = "ABQIAAAANX0yQZ2OteLu_zqbwdfUuRT9PY8-4c5xPr71Q7CZ_E9OOktIvhS7e6r_9XaLW5jy3O84t-dz7SK21Q"
+
+; unsecure url to servers app.gaslightmedia.com directory
+app.base_url = "http://app.gaslightmedia.com/"
+; secure url to servers app.gaslightmedia.com directory
+app.base_secure_url = "https://app.gaslightmedia.com/"
+
+; secure url to file server
+file_server.secure = "https://is0.gaslightmedia.com/"
+; unsecure url to file server
+file_server.unsecure = "http://is0.gaslightmedia.com/"
+; owner id for the file server
+file_server.owner_id = "cedarvillemarine"
+; owner password for the file server
+file_server.owner_password = "3Zx4TZy3"
+
+; Who to send emails to when we handle an error
+error.email = "errors@gaslightmedia.com"
+; level of error reporting
+error.reporting = 0
+; display errors on web page?
+error.display = 0
+; type of PEAR_Log subclass to use for error logging
+error.type = "error_log"
+; constant name of PEAR_Log store to use
+error.name = "PEAR_LOG_TYPE_FILE"
+; identity reported to the log system
+error.ident = "Production"
+; Log error messages up to and including this level
+; HIGHEST PRIORITY
+; +-------------------------------------------+
+; |PEAR_LOG_EMERG |System is unusable |
+; +-----------------+-------------------------+
+; |PEAR_LOG_ALERT |Immediate action required|
+; +-----------------+-------------------------+
+; |PEAR_LOG_CRIT |Critical conditions |
+; +-----------------+-------------------------+
+; |PEAR_LOG_ERR |Error conditions |
+; +-----------------+-------------------------+
+; |PEAR_LOG_WARNING |Warning conditions |
+; +-----------------+-------------------------+
+; |PEAR_LOG_NOTICE |Normal but significant |
+; +-----------------+-------------------------+
+; |PEAR_LOG_INFO |Informational |
+; +-----------------+-------------------------+
+; |PEAR_LOG_DEBUG |Debug-level messages |
+; +-------------------------------------------+
+; LOWEST PRIORITY
+error.level = "PEAR_LOG_WARNING"
+; constant used to figure out what site we are in
+error.conf.server = "SERVER_DIRECTORY"
+; path to log file
+error.conf.path = "/var/www/log/"
+; log file name
+error.conf.file = "php.error"
+; format of printed error message in log file
+error.conf.line_format = "%{timestamp: PRIORITY: %{priority} MESSAGE: %{message}
+"
+
+; type of database we're using
+database.type = "postgres"
+; adapter for database
+database.adapter = "pgsql"
+; error message displayed - used for GLM_DB class
+database.error.message = "An error has occured with the database!"
+; host to connect to
+database.params.host = "ds3"
+; username to connect as
+database.params.username = "nobody"
+; database name to connect to
+database.params.dbname = "cedarvillemarine"
+
+; if we're in development mode or not
+development = Off
+
+; site owner email address
+email.owner = "contact@gaslightmedia.com"
+; contact form email
+email.contact = "contact@gaslightmedia.com"
+; Add Your Event Form Email
+email.addEventForm = "contact@gaslightmedia.com"
+; enews form email
+email.enews = "contact@gaslightmedia.com"
+; visitor guide form email
+email.visitor_guide = "contact@gaslightmedia.com"
+; employment application form
+email.applicationForm = "contact@gaslightmedia.com"
+; reply header for admin/MContact
+email.reply_member_news = "contact@gaslightmedia.com"
+; which email address should pending member update notifications go to
+; if you set this to false - no emails will be sent for updates
+email.member_record_updates_advisor = "contact@gaslightmedia.com"
+; reply-to email used in the members forgot password email
+email.member_forgot_password_email_reply_to = "contact@gaslightmedia.com"
+; This is where the first email goes to notify the site owner that a gift
+; certificate has been ordered
+email.giftcert = "contact@gaslightmedia.com"
+; used at the from address for gift certificate emails
+email.giftcert_from = "contact@gaslightmedia.com"
+; email contains senstive information and must be an upnorth.net address
+email.giftcert_secure = "info@upnorth.net"
+; used in admin/Contact mailout.phtml file in the reply-to header
+email.reply_to = "contact@gaslightmedia.com"
+; email address to send the banner reports to for the site admin
+email.banner_reports_admin = "contact@gaslightmedia.com"
+; email address to send banner expiration notices to
+email.expiring_banner_notification = "contact@gaslightmedia.com"
+; from header for admin/Contact mailout
+;
+; the networking department assigns an alias for the
+; "From:newsletter@xxx.com address that forwards to a
+; "xxx_bounce@harbor.gaslightmedia.com" address
+;
+; xxx being the domain of the website
+email.from_news = "newsletter@gaslightmedia.com"
+; from header for admin/MContact mailout
+;
+; the networking department assigns an alias for the
+; "From:newsletter@xxx.com address that forwards to a
+; "xxx_bounce@harbor.gaslightmedia.com" address
+;
+; xxx being the domain of the website
+email.from_member_news = "newsletter@gaslightmedia.com"
+; dead email address for forms w/ one-way communication
+; ie: pending member updates
+email.do_not_reply = "donotreply@gaslightmedia.com"
+
+auth.test = "LOCAL_TEST"
+auth.send_conf = Off
+auth.merchant_email = Off
+auth.debug = Off
+
+; turn on/off xhtml output
+; if Off, html 4 strict is used
+xhtml = Off
+
+; version number for site resources
+; ie: stylesheets or scripts
+; this will be used for cache-busting
+resources.version = 1
+; environment request for resources
+; choices are "dev" or "prod"
+; dev will request resources that are not compressed
+; prod will request resources that have been compressed and minified
+resources.environment.javascript = "prod"
+resources.environment.css = "prod"
+
+; development site configuration data inherits from production and
+; overrides values as necessary
+[development : production]
+site_url = "http://dev53.gaslightmedia.com/www.cedarvillemarine.com/"
+
+mobile.link =
+mobile.hostname = Off
+
+google.search.key = "ABQIAAAANX0yQZ2OteLu_zqbwdfUuRTeX7yNUukyMrmY8FsCXcCA9axlYBTyhehgzuXOUfNI0E5UYHCLponA0A"
+google.maps.key = "ABQIAAAANX0yQZ2OteLu_zqbwdfUuRQsHGkczIjpqPY1-dTKNoaiGtfPJBTloI-YH7fzUV-bsMLwcy2Yjyti7A"
+
+app.base_url = "http://dev53.gaslightmedia.com/app.gaslightmedia.com/"
+app.base_secure_url = "https://dev53.gaslightmedia.com/app.gaslightmedia.com/"
+
+error.reporting[] = E_ALL
+error.reporting[] = E_NOTICE
+error.display = 1
+error.ident = ""
+error.conf.path = "/var/www/server/"
+
+database.params.host = "ds3"
+
+development = On
+
+email.owner = "leif@gaslightmedia.com"
+email.contact = "leif@gaslightmedia.com"
+email.addEventForm = "leif@gaslightmedia.com"
+email.enews = "leif@gaslightmedia.com"
+email.visitor_guide = "leif@gaslightmedia.com"
+email.applicationForm = "leif@gaslightmedia.com"
+email.reply_member_news = "leif@gaslightmedia.com"
+email.member_record_updates_advisor = "leif@gaslightmedia.com"
+email.member_forgot_password_email_reply_to = "leif@gaslightmedia.com"
+email.giftcert = "leif@gaslightmedia.com"
+email.giftcert_from = "leif@gaslightmedia.com"
+email.giftcert_secure = "leif@gaslightmedia.com"
+email.reply_to = "leif@gaslightmedia.com"
+email.banner_reports_admin = "leif@gaslightmedia.com"
+email.expiring_banner_notification = "leif@gaslightmedia.com"
+email.from_news = "leif@gaslightmedia.com"
+email.from_member_news = "leif@gaslightmedia.com"
+
+resources.version = "rand"
+resources.environment.javascript = "dev"
+resources.environment.css = "dev"
+
+[chuck : development]
+site_url = "http://192.168.44.7/www.cedarvillemarine.com/"
+
+mobile.link =
+mobile.hostname = On
+
+google.search.key = "ABQIAAAAFEik3hTZkksVQYtPm0OFmRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQhDw8ITgl-K4LjnHuSww6VQQFDnA"
+google.maps.key = "ABQIAAAAFEik3hTZkksVQYtPm0OFmRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQhDw8ITgl-K4LjnHuSww6VQQFDnA"
+
+app.base_url = "http://192.168.44.7/app.gaslightmedia.com/"
+
+database.params.host = "localhost"
+
+email.owner = "cscott@gaslightmedia.com"
+email.contact = "cscott@gaslightmedia.com"
+email.addEventForm = "cscott@gaslightmedia.com"
+email.enews = "cscott@gaslightmedia.com"
+email.visitor_guide = "cscott@gaslightmedia.com"
+email.applicationForm = "cscott@gaslightmedia.com"
+email.reply_member_news = "cscott@gaslightmedia.com"
+email.member_record_updates_advisor = "cscott@gaslightmedia.com"
+email.member_forgot_password_email_reply_to = "cscott@gaslightmedia.com"
+email.giftcert = "cscott@gaslightmedia.com"
+email.giftcert_from = "cscott@gaslightmedia.com"
+email.giftcert_secure = "cscott@gaslightmedia.com"
+email.reply_to = "cscott@gaslightmedia.com"
+email.banner_reports_admin = "cscott@gaslightmedia.com"
+email.expiring_banner_notification = "cscott@gaslightmedia.com"
+email.from_news = "cscott@gaslightmedia.com"
+email.from_member_news = "cscott@gaslightmedia.com"
+
+[steve : development]
+site_url = "http://vserver/www.cedarvillemarine.com/"
+
+mobile.link =
+mobile.hostname = Off
+
+google.search.key = "ABQIAAAAFEik3hTZkksVQYtPm0OFmRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQhDw8ITgl-K4LjnHuSww6VQQFDnA"
+google.maps.key = "ABQIAAAAFEik3hTZkksVQYtPm0OFmRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQhDw8ITgl-K4LjnHuSww6VQQFDnA"
+
+app.base_url = "http://vserver/app.gaslightmedia.com/"
+app.base_secure_url = "https://vserver/app.gaslightmedia.com/"
+
+;file_server.secure = "http://192.168.56.101/image_server/"
+;file_server.unsecure = "http://192.168.56.101/image_server/"
+
+database.params.host = "devdb"
+
+email.owner = "steve+owner@localhost"
+email.contact = "steve+contact@localhost"
+email.addEventForm = "steve+eventForm@localhost"
+email.enews = "steve+enews@localhost"
+email.visitor_guide = "steve+visitor_guide@localhost"
+email.applicationForm = "steve+applicationForm@localhost"
+email.reply_member_news = "steve+reply_member_news@localhost"
+email.member_record_updates_advisor = "steve+member_updates@localhost"
+email.member_forgot_password_email_reply_to = "steve+member_forgot@localhost"
+email.giftcert = "steve+giftcert@localhost"
+email.giftcert_from = "steve+giftcert_from@localhost"
+email.giftcert_secure = "steve+giftcert_secure@localhost"
+email.reply_to = "steve+reply_to@localhost"
+email.banner_reports_admin = "steve+banner_reports@localhost"
+email.expiring_banner_notification = "steve+exp_banner@localhost"
+email.from_news = "steve+from_news@localhost"
+
+email.from_member_news = "steve+from_member_news@localhost"
--- /dev/null
+; Production server configuration data
+[production]
+
+; Web Site Owner Information - for use by certain applications
+owner.name = "Gaslight Media"
+owner.short_name = "GLM"
+owner.address1 = "120 E. Lake St."
+owner.address2 = False
+owner.city = "Petoskey"
+owner.state = "MI"
+owner.zip = "49770"
+owner.country = "US"
+owner.phone = "231-487-0692"
+owner.toll_free = False
+
+; Home page id of site in the toolbox
+home_id = 1
+; Name to use in title tag and admin
+sitename = "cedarvillemarine"
+; used in contactdb to limit number of entries per list
+entries_per_page = 10
+; Turn short urls On or Off
+; requires .htaccess enabled
+short_urls = Off
+; Site is mobile enabled
+mobile_site = Off
+mobile_max_width = 600
+mobile_site_url = "http://m.***DOMAIN_GOES_HERE***/index.php?isMobile=yes"
+
+; development server configuration data inherits from production and
+; overrides values as necessary
+[development : production]
+
+; chuck's server configuration data inherits from development
+; and overrides values as necessary
+[chuck : development]
+
+; steve's server configuration data inherits from development
+; and overrides values as necessary
+[steve : development]
+++ /dev/null
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata></metadata>
-<defs>
-<font id="ralewaylight" horiz-adv-x="1556" >
-<font-face units-per-em="2048" ascent="1638" descent="-410" />
-<missing-glyph horiz-adv-x="534" />
-<glyph unicode="fi" horiz-adv-x="993" d="M61 856v84h150v160q0 74 20.5 145t62 133t113.5 100t164 38q98 0 174.5 -28.5t112.5 -57.5l-53 -72q-29 27 -92.5 46t-137.5 19q-67 0 -119 -28.5t-82 -76t-45.5 -102.5t-15.5 -114v-162h523v-940h-103v856h-420v-856h-102v856h-150z" />
-<glyph unicode="fl" horiz-adv-x="1142" d="M61 856v84h150v166q0 184 87.5 297t260.5 113q161 0 249.5 -82.5t88.5 -214.5v-1010q0 -48 31.5 -87.5t85.5 -39.5q15 0 33 2t33 5t28 6t21 5l8 2l24 -86q-3 -3 -27 -9t-67 -12.5t-82 -6.5q-87 0 -138.5 53.5t-51.5 130.5v1030q0 42 -13 79.5t-39 70t-73 52t-109 19.5 q-64 0 -113.5 -29t-78 -78t-42.5 -106t-14 -120v-150h238v-84h-238v-856h-102v856h-150z" />
-<glyph unicode="ffi" horiz-adv-x="1447" d="M61 856v84h150v96q0 77 19 147t56 127.5t98 91.5t138 34q134 0 223 -56q97 136 279 136q95 0 172 -28.5t115 -57.5l-54 -72q-28 26 -90.5 45.5t-134.5 19.5q-55 0 -100 -19t-75 -50.5t-50.5 -73.5t-29.5 -86.5t-9 -91.5v-162h522v-940h-102v856h-420v-856h-102v856h-353 v-856h-102v856h-150zM313 940h353v152q0 119 45 208q-55 43 -174 43q-60 0 -106 -29.5t-70.5 -77.5t-36 -98t-11.5 -100v-98z" />
-<glyph unicode="ffl" horiz-adv-x="1603" d="M61 856v84h150v113q0 167 86.5 275t241.5 108q113 0 206 -54q88 134 277 134q160 0 248 -82.5t88 -214.5v-1010q0 -48 31.5 -87.5t85.5 -39.5q23 0 53 5t50 10l21 5l23 -86q-1 -2 -26 -8.5t-67.5 -13t-80.5 -6.5q-88 0 -140.5 53.5t-52.5 130.5v1030q0 42 -12.5 79.5 t-39 70t-73 52t-108.5 19.5q-64 0 -113 -29t-77 -78t-42 -106t-14 -120v-150h236v-84h-236v-856h-102v856h-361v-856h-102v856h-150zM313 940h361v152q0 134 35 211q-51 40 -156 40q-81 0 -137 -43.5t-79.5 -106t-23.5 -136.5v-117z" />
-<glyph horiz-adv-x="0" />
-<glyph horiz-adv-x="682" />
-<glyph horiz-adv-x="0" />
-<glyph horiz-adv-x="0" />
-<glyph unicode="
" horiz-adv-x="0" />
-<glyph unicode=" " horiz-adv-x="534" />
-<glyph unicode="	" horiz-adv-x="534" />
-<glyph unicode=" " horiz-adv-x="534" />
-<glyph unicode="!" horiz-adv-x="473" d="M186 0v209h103v-209h-103zM186 446v1022h103v-1022h-103z" />
-<glyph unicode=""" horiz-adv-x="514" d="M131 1235v227h92v-227h-92zM291 1235v227h92v-227h-92z" />
-<glyph unicode="#" horiz-adv-x="1378" d="M82 434v84h252l104 436h-270v80h291l102 420h90l-104 -420h426l102 420h90l-104 -420h237v-80h-258l-104 -436h276v-84h-297l-104 -434h-90l106 434h-426l-104 -434h-90l106 434h-231zM422 518h426l106 436h-428z" />
-<glyph unicode="$" horiz-adv-x="1253" d="M76 205l55 84q86 -91 206 -145.5t265 -63.5v604q-101 22 -169 41.5t-130.5 49.5t-98 67t-56.5 91t-21 124q0 184 127.5 290t343.5 115v207h64v-205q259 -6 432 -170l-54 -82q-140 152 -385 158v-596q74 -16 129.5 -30t112 -34t96 -41.5t75.5 -51t57 -64.5t33.5 -80 t12.5 -100q0 -185 -137 -283.5t-372 -101.5v-191h-64v193q-307 15 -522 215zM233 1071q0 -65 20.5 -110t69 -77.5t112.5 -54t167 -43.5v582q-188 -7 -278.5 -84.5t-90.5 -212.5zM655 80q192 0 299 71.5t107 208.5q0 129 -95 196t-311 116v-592z" />
-<glyph unicode="%" horiz-adv-x="1445" d="M96 1184q0 121 87 206t210 85t210 -85t87 -206q0 -120 -87 -204.5t-210 -84.5t-210 84.5t-87 204.5zM127 43l573 705l562 712l57 -47l-574 -706l-561 -713zM176 1184q0 -92 64.5 -157.5t152.5 -65.5q90 0 153.5 67t63.5 156q0 93 -65 159t-152 66q-90 0 -153.5 -67.5 t-63.5 -157.5zM756 270q0 120 87 204.5t210 84.5t210 -84.5t87 -204.5q0 -121 -87 -205.5t-210 -84.5t-210 84.5t-87 205.5zM836 270q0 -93 63.5 -159t153.5 -66t153.5 66.5t63.5 158.5t-65 158t-152 66q-89 0 -153 -67.5t-64 -156.5z" />
-<glyph unicode="&" horiz-adv-x="1351" d="M102 365q0 58 17.5 111.5t44.5 95t72 85t86.5 75.5t101.5 73q-118 127 -164.5 204.5t-46.5 151.5q0 129 103 220.5t253 91.5q140 0 234 -79.5t94 -199.5q0 -48 -19 -94.5t-46.5 -83t-75.5 -78t-89 -71t-104 -70.5l438 -459q97 173 97 375h88q0 -245 -123 -439l264 -274 h-135l-186 195q-86 -101 -200.5 -158t-246.5 -57q-92 0 -174.5 27t-145.5 76t-100 122t-37 160zM203 360q0 -71 32 -129t85 -94t117 -55t132 -19q112 0 209 51t168 142l-463 487q-65 -46 -110.5 -84.5t-87 -86t-62 -100.5t-20.5 -112zM309 1163q0 -56 39.5 -120.5 t155.5 -184.5q78 52 123.5 86t90 76.5t64 83.5t19.5 86q0 86 -66 142.5t-166 56.5q-109 0 -184.5 -66.5t-75.5 -159.5z" />
-<glyph unicode="'" horiz-adv-x="319" d="M115 1270v192h90v-192h-90z" />
-<glyph unicode="(" horiz-adv-x="526" d="M96 707q0 192 73 381.5t208 414.5l80 -41q-102 -150 -183 -366.5t-81 -395.5q0 -158 69.5 -348.5t192.5 -374.5l-76 -45q-283 412 -283 775z" />
-<glyph unicode=")" horiz-adv-x="526" d="M70 1462l80 41q135 -224 207.5 -413.5t72.5 -382.5q0 -363 -280 -775l-78 45q123 184 192.5 374.5t69.5 348.5q0 179 -81 395.5t-183 366.5z" />
-<glyph unicode="*" horiz-adv-x="649" d="M133 1300l19 60l141 -49l-6 147h75l-6 -147l140 49l18 -60l-139 -45l88 -122l-53 -37l-86 125l-86 -125l-52 37l86 122z" />
-<glyph unicode="+" horiz-adv-x="854" d="M113 684v86h266v289h96v-289h266v-86h-266v-289h-96v289h-266z" />
-<glyph unicode="," horiz-adv-x="401" d="M125 -29q37 0 37 37v166h90v-178q0 -54 -36.5 -80.5t-90.5 -26.5v82z" />
-<glyph unicode="-" horiz-adv-x="868" d="M139 510v94h590v-94h-590z" />
-<glyph unicode="." horiz-adv-x="368" d="M139 0v174h90v-174h-90z" />
-<glyph unicode="/" horiz-adv-x="1189" d="M61 0l953 1454h119l-955 -1454h-117z" />
-<glyph unicode="0" horiz-adv-x="1261" d="M121 600q0 270 144.5 446.5t365.5 176.5q145 0 261.5 -80t182.5 -223t66 -320q0 -269 -145 -444.5t-365 -175.5q-221 0 -365.5 175t-144.5 445zM223 600q0 -233 113 -378.5t295 -145.5q180 0 292.5 145.5t112.5 378.5t-112.5 379.5t-292.5 146.5q-181 0 -294.5 -146.5 t-113.5 -379.5z" />
-<glyph unicode="1" horiz-adv-x="839" d="M94 872v103q47 0 107.5 27.5t108.5 63t82 65.5t38 38h105v-1075h260v-94h-656v94h291v946q-36 -51 -147.5 -109.5t-188.5 -58.5z" />
-<glyph unicode="2" horiz-adv-x="1071" d="M111 0q0 56 5.5 103.5t26.5 110.5t57 115.5t101 108t154 99.5q19 9 72.5 33.5t84.5 40t77.5 45t72.5 56.5t45.5 66.5t19.5 83.5q0 94 -76 164t-210 70q-198 0 -342 -172l-70 71q179 195 426 195q174 0 277.5 -94t103.5 -230q0 -46 -14 -87.5t-34 -72.5t-54.5 -61 t-63.5 -50t-72.5 -41.5t-69.5 -32.5t-67 -27q-94 -37 -159 -82.5t-101 -98t-52.5 -104.5t-21.5 -115h731v-94h-847z" />
-<glyph unicode="3" horiz-adv-x="1085" d="M86 -55l76 61q41 -99 136.5 -156t229.5 -57q162 0 256.5 85t94.5 233q0 150 -98.5 237.5t-274.5 87.5h-49v90h53q162 0 252 74.5t90 200.5q0 131 -90.5 207.5t-233.5 76.5q-121 0 -214 -56t-136 -152l-69 57q47 111 164.5 178.5t263.5 67.5q184 0 302.5 -103.5 t118.5 -265.5q0 -128 -76 -218.5t-204 -109.5q139 -22 223 -125t84 -252q0 -182 -127 -294.5t-332 -112.5q-153 0 -270 66t-170 180z" />
-<glyph unicode="4" horiz-adv-x="1097" d="M43 121v90l739 958h72v-954h180v-94h-180v-381h-102v381h-709zM158 215h602v789z" />
-<glyph unicode="5" horiz-adv-x="1126" d="M84 -18l74 43q58 -107 162 -171.5t227 -64.5q167 0 279 107.5t112 275.5q0 161 -109.5 265t-269.5 104q-104 0 -196.5 -47t-151.5 -132h-98l161 807h697v-96h-619l-112 -575q60 66 146 101.5t183 35.5q199 0 336 -131t137 -332q0 -140 -68 -250t-180.5 -168.5 t-246.5 -58.5q-154 0 -278 78t-185 209z" />
-<glyph unicode="6" horiz-adv-x="1239" d="M117 571q0 443 142 668t386 225q146 0 261 -75.5t169 -206.5l-71 -56q-40 110 -139 178t-220 68q-194 0 -310.5 -184t-117.5 -510q46 132 164.5 213.5t265.5 81.5q137 0 252 -66.5t181.5 -180.5t66.5 -249q0 -136 -67.5 -250t-185.5 -180.5t-259 -66.5 q-229 0 -373.5 159.5t-144.5 431.5zM227 477q0 -166 121.5 -285.5t290.5 -119.5q168 0 288 119t120 286t-121.5 287.5t-288.5 120.5q-169 0 -289.5 -120.5t-120.5 -287.5z" />
-<glyph unicode="7" horiz-adv-x="1112" d="M98 1098v96h981l-737 -1454h-117l693 1358h-820z" />
-<glyph unicode="8" horiz-adv-x="1216" d="M109 403q0 135 91.5 235.5t217.5 141.5q-111 41 -183.5 123t-72.5 189q0 68 25.5 127t69.5 101.5t101 73t121 45.5t129 15q82 0 161 -24t143 -68t103.5 -114t39.5 -154q0 -108 -74 -190.5t-186 -123.5q135 -45 223 -147t88 -236q0 -122 -70.5 -217t-184.5 -144.5 t-249 -49.5q-143 0 -256.5 57t-175 152t-61.5 208zM213 403q0 -98 61.5 -175t151 -114.5t184.5 -37.5q96 0 184.5 39.5t147.5 117t59 173.5q0 99 -61.5 176.5t-151 115t-184.5 37.5q-96 0 -185 -40t-147.5 -118t-58.5 -174zM264 1087q0 -82 54 -145t130.5 -93t157.5 -30 q82 0 159 31t131 95t54 147q0 82 -50.5 144t-128 93t-167.5 31q-137 0 -238.5 -75.5t-101.5 -197.5z" />
-<glyph unicode="9" horiz-adv-x="1206" d="M80 672q0 136 67.5 250t185.5 180.5t259 66.5q229 0 373.5 -159.5t144.5 -431.5q0 -443 -142 -668t-386 -225q-146 0 -261 75.5t-169 206.5l71 56q40 -110 139 -178t220 -68q194 0 310.5 184t117.5 510q-46 -132 -164.5 -213.5t-265.5 -81.5q-137 0 -252 66.5 t-181.5 180.5t-66.5 249zM180 672q0 -167 121.5 -287.5t288.5 -120.5q168 0 288.5 120t120.5 288q0 166 -121 285.5t-290 119.5q-168 0 -288 -119t-120 -286z" />
-<glyph unicode=":" horiz-adv-x="378" d="M145 0v174h88v-174h-88zM145 885v174h88v-174h-88z" />
-<glyph unicode=";" horiz-adv-x="411" d="M129 -29q37 0 37 37v166h90v-178q0 -54 -36.5 -80.5t-90.5 -26.5v82zM166 885v174h90v-174h-90z" />
-<glyph unicode="<" horiz-adv-x="1034" d="M70 498v61l856 514v-110l-707 -433l707 -432v-112z" />
-<glyph unicode="=" horiz-adv-x="907" d="M147 426v78h613v-78h-613zM147 627v78h613v-78h-613z" />
-<glyph unicode=">" horiz-adv-x="1034" d="M109 -14v112l708 432l-708 433v110l856 -514v-61z" />
-<glyph unicode="?" horiz-adv-x="974" d="M74 1208q54 124 172.5 194.5t253.5 70.5q77 0 146.5 -25t125 -72t88.5 -122.5t33 -168.5q0 -64 -20 -118t-40.5 -86.5t-72 -69.5t-74.5 -50t-87 -45q-9 -5 -13 -7q-32 -16 -53 -30t-43.5 -38.5t-35 -55.5t-20.5 -79t-8 -111h-90q0 103 21 174.5t57.5 113.5t95.5 75 q16 9 45.5 24.5t49.5 26t48 28t47 33.5t39.5 40t33 49.5t20.5 59.5t8 73q0 72 -25.5 129t-68.5 92t-96 53t-111 18q-114 0 -209.5 -61t-143.5 -160zM338 0v201h90v-201h-90z" />
-<glyph unicode="@" horiz-adv-x="1685" d="M106 471q0 167 62.5 311.5t166.5 242.5t240.5 154t282.5 56q150 0 285.5 -59t235.5 -160.5t159 -248t59 -312.5q0 -32 -2 -65t-9 -83.5t-19 -94t-34.5 -90.5t-52 -80t-75.5 -54t-102 -21q-39 0 -67.5 11t-45 27.5t-27.5 43.5t-16 52t-8 61q-59 -63 -151 -104.5 t-193 -41.5q-139 0 -222.5 75t-83.5 194q0 74 33 128t89 83.5t119.5 43t135.5 13.5q135 0 267 -47q0 82 -12.5 143t-41 109t-80.5 73t-127 25q-155 0 -290 -98l-31 63q163 107 330 107q84 0 145 -25.5t94.5 -63.5t53 -97t25 -111t5.5 -121v-283q0 -101 21.5 -148.5 t85.5 -47.5q63 0 109.5 43.5t70 112.5t34.5 136.5t11 133.5q0 198 -89.5 363t-246 260.5t-344.5 95.5q-137 0 -263 -53t-219.5 -145t-149.5 -224.5t-56 -282.5q0 -195 89.5 -358t246.5 -258t346 -95q160 0 313 78l23 -55q-158 -82 -338 -82q-150 0 -286.5 59t-237 160.5 t-159.5 245t-59 305.5zM563 289q0 -91 67.5 -147t166.5 -56q102 0 194 45q83 39 111 94t28 129v86q-8 1 -49.5 13.5t-101 23t-121.5 10.5q-59 0 -109 -10t-93 -31.5t-68 -61.5t-25 -95z" />
-<glyph unicode="A" horiz-adv-x="1394" d="M37 0l618 1454h86l619 -1454h-113l-203 479h-694l-203 -479h-110zM375 565h641l-318 762z" />
-<glyph unicode="B" horiz-adv-x="1361" d="M193 0v1454h677q98 0 176 -55.5t117 -139t39 -176.5q0 -110 -56.5 -203t-152.5 -135q124 -37 197.5 -137.5t73.5 -230.5q0 -159 -115 -268t-277 -109h-679zM297 94h575q119 0 203 90t84 207q0 120 -78.5 209.5t-193.5 89.5h-590v-596zM297 778h532q115 0 193 87.5 t78 203.5q0 121 -73 206t-185 85h-545v-582z" />
-<glyph unicode="C" horiz-adv-x="1421" d="M96 737q0 133 47 261.5t132.5 232t218.5 167.5t290 64q187 0 326.5 -86.5t208.5 -230.5l-86 -49q-48 96 -125.5 158.5t-159 87t-172.5 24.5q-133 0 -244.5 -56t-182 -147t-109.5 -203t-39 -229q0 -170 76 -318.5t210.5 -238.5t294.5 -90q91 0 179.5 28.5t170.5 95 t130 161.5l88 -43q-46 -105 -141.5 -183.5t-208 -116.5t-226.5 -38q-144 0 -272.5 65t-216 171t-138.5 240.5t-51 272.5z" />
-<glyph unicode="D" horiz-adv-x="1470" d="M193 0v1454h483q135 0 248.5 -37t194 -103t137 -157t83.5 -199t27 -229q0 -331 -187 -530t-503 -199h-483zM297 94h379q140 0 252.5 48.5t185 134t110.5 201t38 251.5q0 185 -67.5 326.5t-201.5 223t-317 81.5h-379v-1266z" />
-<glyph unicode="E" horiz-adv-x="1259" d="M193 0v1454h950v-94h-846v-572h739v-90h-739v-604h864v-94h-968z" />
-<glyph unicode="F" horiz-adv-x="1206" d="M193 0v1454h946v-94h-842v-578h715v-90h-715v-692h-104z" />
-<glyph unicode="G" horiz-adv-x="1484" d="M98 729q0 143 50.5 277t137.5 235t213 162t267 61q398 0 555 -317l-84 -51q-143 272 -473 272q-125 0 -232 -55t-178 -145t-111 -205t-40 -236q0 -169 76.5 -316.5t211.5 -236t295 -88.5q263 0 482 254v283h-330v84h422v-707h-92v225q-210 -235 -488 -235 q-144 0 -272.5 64t-217 168t-140.5 237t-52 270z" />
-<glyph unicode="H" horiz-adv-x="1511" d="M193 0v1454h104v-663h917v663h105v-1454h-105v696h-917v-696h-104z" />
-<glyph unicode="I" horiz-adv-x="489" d="M193 0v1452h104v-1452h-104z" />
-<glyph unicode="J" horiz-adv-x="991" d="M41 68l33 84q118 -78 282 -78q59 0 106 10.5t82.5 33t62 52t45 73.5t30 90.5t18 110.5t9 126.5t2.5 144.5v737h104v-737q0 -103 -4 -180.5t-16 -158.5t-32.5 -138t-55 -109t-82.5 -83.5t-115.5 -50t-153.5 -18.5q-182 0 -315 91z" />
-<glyph unicode="K" horiz-adv-x="1298" d="M193 0v1452h104v-881l848 883h121l-604 -637l634 -817h-118l-584 754l-297 -305v-449h-104z" />
-<glyph unicode="L" horiz-adv-x="1210" d="M193 0v1454h104v-1360h868v-94h-972z" />
-<glyph unicode="M" horiz-adv-x="1806" d="M193 0v1454h104l606 -1040l606 1040h105v-1454h-105v1257l-573 -981h-66l-573 981v-1257h-104z" />
-<glyph unicode="N" horiz-adv-x="1589" d="M193 0v1454h79l1020 -1280v1278h105v-1452h-97l-1003 1257v-1257h-104z" />
-<glyph unicode="O" d="M98 727q0 143 52.5 278t142.5 236t217.5 162t269.5 61q146 0 275 -64.5t216 -168.5t137 -236t50 -268q0 -145 -52.5 -280t-142 -235.5t-216.5 -161t-269 -60.5q-147 1 -275.5 64t-216 165.5t-138 235.5t-50.5 272zM203 727q0 -125 43 -241t117.5 -204.5t183 -142 t231.5 -53.5q126 0 236 56t183 146.5t115 205.5t42 233q0 124 -44 241t-119 205t-183.5 141.5t-229.5 53.5q-101 0 -193 -36t-160.5 -98.5t-119 -144t-76.5 -174.5t-26 -188z" />
-<glyph unicode="P" horiz-adv-x="1273" d="M193 0v1454h598q118 0 217 -66.5t152.5 -169.5t53.5 -214q0 -117 -50.5 -220.5t-145.5 -169t-213 -65.5h-508v-549h-104zM297 645h502q137 0 223 107t86 252q0 143 -95.5 249.5t-226.5 106.5h-489v-715z" />
-<glyph unicode="Q" d="M98 727q0 143 52.5 278t142.5 236t217.5 162t269.5 61q146 0 275 -64.5t216 -168.5t137 -236t50 -268q0 -152 -55.5 -290t-155.5 -242l162 -195h-106l-115 137q-181 -147 -410 -147q-147 1 -275.5 64t-216 165.5t-138 235.5t-50.5 272zM203 727q0 -125 43 -241 t117.5 -204.5t183 -142t231.5 -53.5q194 0 346 129l-172 207h109l123 -150q81 92 125.5 211t44.5 244q0 124 -44 241t-119 205t-183.5 141.5t-229.5 53.5q-101 0 -193 -36t-160.5 -98.5t-119 -144t-76.5 -174.5t-26 -188z" />
-<glyph unicode="R" horiz-adv-x="1343" d="M193 0v1454h606q89 0 169 -39.5t134.5 -103t86.5 -144t32 -163.5q0 -164 -95.5 -290t-246.5 -149l362 -565h-121l-352 549h-471v-549h-104zM297 645h510q91 0 163 52t109 133.5t37 173.5q0 141 -95.5 248.5t-227.5 107.5h-496v-715z" />
-<glyph unicode="S" horiz-adv-x="1251" d="M78 205l55 84q93 -98 227.5 -153.5t296.5 -55.5q192 0 299 71.5t107 208.5q0 57 -19 101.5t-52.5 77t-92.5 59t-126 46t-165 40.5q-102 22 -170.5 41.5t-131.5 49.5t-99 67t-57 91t-21 124q0 193 140 300t374 107q274 0 453 -170l-54 -82q-143 158 -399 158 q-207 0 -307 -78.5t-100 -220.5q0 -56 17 -97t46.5 -70t85.5 -53t117.5 -40.5t159.5 -36.5q74 -16 128.5 -30t110.5 -34t95.5 -41.5t75 -51t56.5 -64.5t33.5 -80t12.5 -100q0 -187 -141 -286t-380 -99q-339 0 -575 217z" />
-<glyph unicode="T" horiz-adv-x="1255" d="M43 1360v94h1169v-94h-532v-1360h-105v1360h-532z" />
-<glyph unicode="U" horiz-adv-x="1550" d="M170 723v731h104v-731q0 -102 14.5 -190.5t50.5 -172.5t91.5 -143t143.5 -95t200 -36q114 0 203.5 36.5t145 97t91.5 145t50 172t14 186.5v731h104v-731q0 -121 -20 -226t-65.5 -199.5t-114 -162t-172.5 -106.5t-234 -39q-134 0 -239.5 41.5t-173.5 110t-112 164.5 t-62.5 198.5t-18.5 218.5z" />
-<glyph unicode="V" horiz-adv-x="1388" d="M31 1454h108l555 -1323l553 1323h111l-617 -1454h-94z" />
-<glyph unicode="W" horiz-adv-x="2138" d="M31 1454h112l559 -1331l302 708l-256 613h102l217 -529l217 529h102l-256 -613l306 -708l557 1331h114l-622 -1454h-96l-320 748l-321 -748h-97z" />
-<glyph unicode="X" horiz-adv-x="1284" d="M14 1454h121l508 -661l508 661h119l-570 -737l553 -717h-118l-492 641l-491 -641h-121l553 717z" />
-<glyph unicode="Y" horiz-adv-x="1292" d="M23 1454h114l508 -805l512 805h115l-574 -905v-549h-104v553z" />
-<glyph unicode="Z" horiz-adv-x="1280" d="M59 0v86l1033 1274h-1020v94h1145v-86l-1029 -1274h1024v-94h-1153z" />
-<glyph unicode="[" horiz-adv-x="479" d="M178 -82v1598h207v-89h-109v-1421h109v-88h-207z" />
-<glyph unicode="\" horiz-adv-x="1126" d="M57 1454h119l891 -1454h-117z" />
-<glyph unicode="]" horiz-adv-x="479" d="M94 6h109v1421h-109v89h207v-1598h-207v88z" />
-<glyph unicode="^" horiz-adv-x="1083" d="M94 621l406 833h88l403 -833h-94l-354 729l-359 -729h-90z" />
-<glyph unicode="_" horiz-adv-x="868" d="M39 0h790v-94h-790v94z" />
-<glyph unicode="`" horiz-adv-x="436" d="M100 1495h117l127 -174l-70 -33z" />
-<glyph unicode="a" horiz-adv-x="1103" d="M70 309q0 138 124.5 227t319.5 89q180 0 332 -58v105q0 151 -87 240t-233 89q-161 0 -342 -127l-41 70q207 139 389 139q192 0 304 -112t112 -307v-521q0 -51 43 -51v-92q-14 -2 -37 -2q-38 0 -68 26t-30 66v88q-73 -95 -187 -146.5t-247 -51.5q-149 0 -250.5 95 t-101.5 234zM170 315q0 -107 78.5 -180.5t193.5 -73.5q119 0 219.5 44.5t149.5 119.5q35 41 35 82v189q-154 57 -320 57q-159 0 -257.5 -66t-98.5 -172z" />
-<glyph unicode="b" horiz-adv-x="1251" d="M158 0v1495h102v-661q169 249 416 249q110 0 203.5 -48t154.5 -127t95 -177.5t34 -202.5q0 -145 -66.5 -271t-184 -201.5t-257.5 -75.5q-123 0 -232.5 64.5t-172.5 168.5v-213h-92zM260 356q8 -75 70 -142.5t145.5 -104.5t159.5 -37q120 0 218.5 66.5t152 170.5t53.5 219 q0 120 -50.5 225.5t-145 171.5t-210.5 66q-129 0 -231.5 -80t-161.5 -202v-353z" />
-<glyph unicode="c" horiz-adv-x="1118" d="M86 537q0 150 67 275t188.5 198t270.5 73q144 0 254.5 -65.5t167.5 -181.5l-100 -33q-47 87 -135 137.5t-193 50.5q-175 0 -295.5 -130.5t-120.5 -323.5q0 -191 123.5 -328t294.5 -137q110 0 210.5 59t125.5 137l100 -28q-40 -113 -161.5 -186.5t-268.5 -73.5 q-146 0 -268 75.5t-191 203.5t-69 278z" />
-<glyph unicode="d" horiz-adv-x="1261" d="M86 530q0 148 62.5 274.5t175.5 202.5t251 76q132 0 241 -70t175 -179v661h103v-1352q0 -51 43 -51v-92q-12 -2 -35 -2q-43 0 -72 28t-29 64v123q-65 -106 -175 -169.5t-228 -63.5q-144 0 -263 78.5t-184 204.5t-65 267zM190 528q0 -121 56.5 -225.5t155 -167.5 t214.5 -63q76 0 159.5 38t145.5 106t70 142v351q-42 116 -158.5 199t-234.5 83q-89 0 -167 -39.5t-130 -104.5t-81.5 -148.5t-29.5 -170.5z" />
-<glyph unicode="e" horiz-adv-x="1196" d="M86 537q0 149 68 274t188 198.5t266 73.5q147 0 267 -74.5t187 -199t68 -272.5q0 -8 -1 -25.5t-1 -19.5h-935q13 -184 135 -307.5t288 -123.5q113 0 211 57.5t138 147.5l90 -24q-48 -115 -171.5 -188.5t-271.5 -73.5q-146 0 -267.5 75.5t-190 203.5t-68.5 278zM190 573 h840q-13 187 -132.5 306.5t-289.5 119.5q-168 0 -288 -120.5t-130 -305.5z" />
-<glyph unicode="f" horiz-adv-x="688" d="M61 856v84h150v160q0 195 81 305.5t222 110.5q60 0 117 -18.5t94 -49.5l-37 -74q-61 51 -158 51q-105 0 -161 -83.5t-56 -239.5v-162h303v-84h-303v-856h-102v856h-150z" />
-<glyph unicode="g" horiz-adv-x="1251" d="M88 530q0 146 62 272t176.5 203.5t255.5 77.5q243 0 419 -249v231h93v-1085q0 -105 -40.5 -189.5t-110 -138t-159.5 -81.5t-192 -28q-177 0 -289 63t-184 183l69 47q61 -104 168.5 -156.5t235.5 -52.5q82 0 154 23t127 66t86.5 111t31.5 153v233q-65 -103 -174 -166 t-225 -63q-143 0 -260 78.5t-180.5 203t-63.5 264.5zM190 528q0 -121 56.5 -225.5t155 -167.5t214.5 -63q131 0 246 90.5t129 195.5v351q-47 123 -158.5 202.5t-234.5 79.5q-92 0 -171 -41t-129.5 -107t-79 -148t-28.5 -167z" />
-<glyph unicode="h" horiz-adv-x="1173" d="M158 0v1495h102v-684q64 124 181 198t249 74q172 0 255 -122.5t83 -348.5v-612h-102v594q0 196 -67 295.5t-197 99.5q-131 0 -247.5 -95t-154.5 -235v-659h-102z" />
-<glyph unicode="i" horiz-adv-x="417" d="M158 0v1065h102v-1065h-102zM158 1307v188h102v-188h-102z" />
-<glyph unicode="j" horiz-adv-x="417" d="M-262 -287l55 68q57 -49 158 -49q79 0 143 60.5t64 146.5v1126h102v-1122q0 -129 -92 -217t-207 -88q-143 0 -223 75zM158 1307v188h102v-188h-102z" />
-<glyph unicode="k" horiz-adv-x="1062" d="M158 0v1495h102v-1044l647 612h119l-446 -432l460 -631h-112l-416 569l-252 -231v-338h-102z" />
-<glyph unicode="l" horiz-adv-x="509" d="M164 180v1315h104v-1284q0 -60 34 -94.5t93 -34.5q55 0 113 20l20 -82q-84 -32 -174 -32q-86 0 -138 52t-52 140z" />
-<glyph unicode="m" horiz-adv-x="1867" d="M158 0v1065h94v-254q68 129 175.5 200.5t234.5 71.5q131 0 215 -78.5t102 -209.5q155 288 418 288q170 0 247.5 -120t77.5 -351v-612h-102v594q0 200 -63 297.5t-191 97.5q-132 0 -233.5 -91.5t-141.5 -240.5v-657h-102v594q0 203 -62 299t-190 96q-130 0 -233 -90.5 t-144 -239.5v-659h-102z" />
-<glyph unicode="n" horiz-adv-x="1173" d="M158 0v1065h94v-254q65 122 191 197t268 75q168 0 242.5 -118.5t74.5 -352.5v-612h-102v594q0 205 -59 300t-187 95q-136 0 -257.5 -95t-162.5 -235v-659h-102z" />
-<glyph unicode="o" horiz-adv-x="1212" d="M86 530q0 148 68 275t188.5 202.5t263.5 75.5q108 0 205.5 -44.5t166.5 -119.5t109.5 -176.5t40.5 -212.5q0 -147 -68 -273t-188.5 -201.5t-265.5 -75.5q-146 0 -266 75.5t-187 201.5t-67 273zM190 526q0 -189 122 -321.5t294 -132.5q112 0 208 61.5t153 167.5t57 231 q0 187 -124 323t-294 136q-169 0 -292.5 -137.5t-123.5 -327.5z" />
-<glyph unicode="p" horiz-adv-x="1251" d="M158 -436v1501h92v-213q67 103 176.5 167t228.5 64q143 0 261 -80t182.5 -206t64.5 -267q0 -111 -35.5 -211.5t-98.5 -175t-155 -119t-198 -44.5q-130 0 -238.5 69t-177.5 180v-665h-102zM260 354q52 -122 160.5 -202t232.5 -80q89 0 166.5 39.5t129 104t81 146.5 t29.5 168q0 121 -55.5 227t-154 170t-214.5 64q-75 0 -159 -39t-146 -106.5t-70 -140.5v-351z" />
-<glyph unicode="q" horiz-adv-x="1251" d="M86 530q0 146 67.5 273t185.5 203.5t257 76.5q121 0 230.5 -65t172.5 -168v215h95v-1354q0 -26 10 -39t33 -14v-90q-12 -2 -37 -2q-46 0 -77.5 30.5t-31.5 77.5v555q-81 -123 -188 -186t-230 -63q-142 0 -255 78.5t-172.5 203.5t-59.5 268zM190 528q0 -121 52 -225.5 t147 -167.5t211 -63q127 0 227 76.5t164 197.5v348q-17 116 -135.5 206.5t-243.5 90.5q-120 0 -218.5 -68t-151 -173.5t-52.5 -221.5z" />
-<glyph unicode="r" horiz-adv-x="698" d="M158 0v1065h96v-262q55 112 147 182.5t195 81.5q15 0 37 1t29 1v-96q-145 -5 -252 -86.5t-150 -220.5v-666h-102z" />
-<glyph unicode="s" horiz-adv-x="985" d="M66 143l51 70q171 -152 381 -152q140 0 224.5 59.5t84.5 162.5q0 33 -9 58.5t-30.5 46t-46 35.5t-68.5 30t-82.5 25.5t-103.5 25.5q-82 19 -130.5 33.5t-96.5 35.5t-72 46t-38.5 62t-14.5 87q0 103 54 175.5t140.5 106t196.5 33.5q122 0 219.5 -40.5t151.5 -108.5 l-58 -55q-51 60 -135.5 91t-183.5 31q-127 0 -207 -54.5t-80 -164.5q0 -37 11.5 -63.5t28.5 -44t57 -33.5t76 -26t106 -27q65 -15 108 -26.5t91 -27t77.5 -31t59 -37t45 -46t25 -56.5t9.5 -71q0 -142 -111.5 -227.5t-297.5 -85.5q-126 0 -238 41.5t-194 121.5z" />
-<glyph unicode="t" horiz-adv-x="651" d="M53 981v84h150v365h102v-365h250v-84h-250v-778q0 -57 39.5 -88t95.5 -31q38 0 78 11.5t58.5 21t29.5 16.5l31 -82q-105 -63 -223 -63q-89 0 -150 50.5t-61 139.5v803h-150z" />
-<glyph unicode="u" horiz-adv-x="1202" d="M145 451v614h103v-600q0 -393 268 -393q136 0 252.5 89t163.5 232v672h102v-922q0 -51 43 -51v-92q-16 -2 -37 -2q-43 0 -70.5 26t-27.5 66v162q-70 -127 -192.5 -199.5t-262.5 -72.5q-169 0 -255.5 119t-86.5 352z" />
-<glyph unicode="v" horiz-adv-x="1077" d="M41 1065h109l391 -963l395 963h100l-444 -1065h-107z" />
-<glyph unicode="w" horiz-adv-x="1652" d="M41 1065h100l408 -952l223 524l-182 426h90l147 -352l146 352h90l-180 -426l223 -524l405 952h103l-461 -1065h-86l-240 563l-239 -563h-88z" />
-<glyph unicode="x" horiz-adv-x="1009" d="M31 1065h114l342 -440l17 -29l18 29l342 440h113l-414 -535l414 -530h-115l-340 438l-18 27l-17 -27l-340 -438h-114l413 530z" />
-<glyph unicode="y" horiz-adv-x="1110" d="M33 1065h108l422 -965l395 965h101l-584 -1401q-29 -70 -77 -95.5t-126 -25.5q-29 0 -41 2v93q80 0 109 14q19 9 50.5 73.5t117.5 274.5z" />
-<glyph unicode="z" horiz-adv-x="993" d="M59 0v74l756 911h-741v80h854v-74l-752 -911h750v-80h-867z" />
-<glyph unicode="{" horiz-adv-x="487" d="M117 698v82q37 0 54 35t17 68v571q0 34 16.5 48t31.5 14h161v-89h-112v-567q0 -76 -52 -123q28 -24 40 -60t12 -63v-589h112v-88h-161q-18 0 -33 15t-15 46v594q0 40 -18 71t-53 35z" />
-<glyph unicode="|" horiz-adv-x="440" d="M174 -266v1853h92v-1853h-92z" />
-<glyph unicode="}" horiz-adv-x="487" d="M92 25h113v589q0 79 51 123q-51 46 -51 123v567h-113v89h162q8 0 17 -4t19.5 -19t10.5 -39v-571q0 -33 17.5 -68t54.5 -35v-82q-36 -4 -54 -34.5t-18 -71.5v-594q0 -31 -14.5 -46t-32.5 -15h-162v88z" />
-<glyph unicode="~" horiz-adv-x="1009" d="M139 502q0 7 6.5 27t23 49t38.5 55t58 44.5t77 18.5q40 0 84.5 -19t78 -42.5t76.5 -42.5t81 -19q29 0 54 10.5t40 25t26.5 31t16 27.5t4.5 15h69q0 -4 -6 -21.5t-22.5 -45t-39 -52.5t-61.5 -43t-84 -18t-92.5 19t-81.5 41.5t-74 41.5t-71 19q-25 0 -48 -12t-37.5 -29 t-25 -35.5t-15.5 -30.5t-5 -14h-70z" />
-<glyph unicode="¡" horiz-adv-x="475" d="M186 -2v1022h103v-1022h-103zM186 1257v209h103v-209h-103z" />
-<glyph unicode="¢" horiz-adv-x="1146" d="M98 528q0 139 57.5 260t167.5 201.5t250 91.5v240h62v-240q288 -8 409 -245l-98 -33q-97 176 -311 186v-915q96 2 197.5 57.5t123.5 136.5l103 -28q-30 -82 -104 -143t-157 -89t-163 -28v-226h-62v228q-135 11 -245.5 93t-170 202.5t-59.5 250.5zM203 528 q0 -168 106 -299t264 -151v907q-113 -8 -199.5 -78t-128.5 -170t-42 -209z" />
-<glyph unicode="£" horiz-adv-x="1009" d="M109 674v84h204q-15 28 -48 85.5t-50.5 90.5t-33 84.5t-15.5 99.5q0 142 105 244t251 102q107 0 202.5 -58t154.5 -157l-64 -63q-50 88 -129.5 139t-167.5 51q-106 0 -180 -76.5t-74 -185.5q0 -57 21.5 -112t66.5 -132t62 -112h360v-84h-325q26 -80 26 -158 q0 -106 -50 -202t-175 -230q78 16 149 16q62 0 154.5 -19.5t140.5 -19.5q78 0 191 39l26 -82q-110 -49 -221 -49q-60 0 -164.5 22.5t-167.5 22.5q-98 0 -208 -28l-33 75q151 152 207.5 249.5t56.5 199.5q0 80 -31 164h-241z" />
-<glyph unicode="¥" horiz-adv-x="1370" d="M59 1454h117l508 -805l510 805h115l-463 -723h180v-78h-225l-66 -104v-53h291v-76h-291v-420h-104v420h-289v76h289v57l-62 100h-227v78h182z" />
-<glyph unicode="¦" horiz-adv-x="448" d="M178 -266v839h92v-839h-92zM178 748v839h92v-839h-92z" />
-<glyph unicode="§" horiz-adv-x="1036" d="M102 1124q0 99 59.5 178.5t148 120.5t184.5 41q137 0 221.5 -47.5t142.5 -132.5l-82 -37q-35 66 -111.5 94.5t-164.5 28.5q-73 0 -139 -28.5t-110 -86t-44 -131.5q0 -122 77.5 -175t217.5 -56q62 -1 118 -11.5t109 -34.5t91.5 -58.5t61.5 -87.5t23 -119 q0 -57 -18.5 -109.5t-48.5 -83.5q100 -60 100 -217q0 -85 -37.5 -154t-97 -111t-128.5 -64.5t-138 -22.5q-222 0 -398 180l68 63q154 -145 328 -145q115 0 207 70t92 182q0 50 -17.5 87t-44 58t-66.5 34.5t-75.5 18.5t-81.5 7q-114 5 -200.5 40t-139.5 107.5t-53 175.5 q0 53 16 102.5t41 80.5q-49 34 -80 98.5t-31 144.5zM256 688q0 -67 26 -113.5t65.5 -68.5t94.5 -35.5t105 -17t105 -12t87 -21.5q31 26 49.5 70.5t18.5 91.5q0 61 -28 106.5t-74 70t-96 35.5t-103 11q-114 0 -195 35q-25 -25 -40 -67t-15 -85z" />
-<glyph unicode="¨" horiz-adv-x="602" d="M117 1311v180h90v-180h-90zM395 1311v180h90v-180h-90z" />
-<glyph unicode="©" horiz-adv-x="1712" d="M109 727q0 208 96.5 377t267 264.5t381.5 95.5q160 0 299.5 -56t239 -153.5t156.5 -234.5t57 -293q0 -157 -57 -294.5t-156.5 -235.5t-239 -154.5t-299.5 -56.5q-158 0 -296.5 56.5t-237 154.5t-155 235.5t-56.5 294.5zM168 725q0 -192 89 -348t246.5 -245t352.5 -89 q192 0 349 85t248 240.5t91 352.5q0 146 -52.5 273.5t-143 218t-218.5 142.5t-274 52q-194 0 -351.5 -88.5t-247 -244.5t-89.5 -349zM403 727q0 69 17 136t53.5 129t88.5 109t128 75t166 28q131 0 232.5 -57t144.5 -162l-98 -33q-27 62 -80.5 100t-101 49t-97.5 11 q-85 0 -153.5 -34t-109.5 -90.5t-63 -123.5t-22 -137q0 -88 33 -162t85 -120.5t113.5 -72.5t122.5 -26q86 0 170.5 46.5t118.5 121.5l98 -29q-12 -35 -44.5 -74t-80.5 -75t-115.5 -59t-138.5 -23q-88 0 -171.5 33.5t-149.5 93t-106 150t-40 196.5z" />
-<glyph unicode="ª" horiz-adv-x="882" d="M100 936q0 95 86 156t220 61q129 0 219 -37v64q0 91 -56.5 145.5t-152.5 54.5q-109 0 -234 -84l-37 64q143 94 279 94q139 0 219 -75.5t80 -211.5v-313q0 -38 35 -41v-88q-10 -2 -29 -2q-87 0 -90 70l-2 53q-51 -64 -128 -98.5t-167 -34.5q-102 0 -172 64t-70 159z M195 942q0 -64 50 -107.5t124 -43.5q94 0 175 45.5t81 103.5v113q-79 34 -205 34q-100 0 -162.5 -39.5t-62.5 -105.5z" />
-<glyph unicode="«" horiz-adv-x="1142" d="M94 498v61l502 359v-93l-416 -295l416 -292v-93zM508 498v61l500 359v-93l-414 -295l414 -292v-93z" />
-<glyph unicode="¬" horiz-adv-x="1191" d="M170 631v94h872v-457h-92v363h-780z" />
-<glyph unicode="­" horiz-adv-x="1150" d="M139 510v94h873v-94h-873z" />
-<glyph unicode="®" horiz-adv-x="1712" d="M109 727q0 125 36 238.5t103.5 203.5t158.5 156.5t206.5 102.5t242.5 36t242.5 -36t207.5 -102.5t159.5 -156.5t104 -203.5t36.5 -238.5q0 -157 -57 -294.5t-156 -235.5t-238.5 -154.5t-298.5 -56.5t-298 56.5t-237.5 154.5t-155 235.5t-56.5 294.5zM170 727 q0 -193 88.5 -349.5t245.5 -245.5t352 -89q144 0 270.5 49.5t218 138t144.5 217t53 279.5q0 191 -88.5 346.5t-246 244.5t-351.5 89t-351.5 -89t-246 -244.5t-88.5 -346.5zM549 256v934h389q116 0 194 -89.5t78 -201.5q0 -104 -62 -184.5t-159 -93.5l232 -365h-95l-223 354 h-270v-354h-84zM633 684h309q87 0 136.5 61.5t49.5 153.5q0 91 -55 152t-139 61h-301v-428z" />
-<glyph unicode="¯" horiz-adv-x="798" d="M109 1376v76h583v-76h-583z" />
-<glyph unicode="°" horiz-adv-x="534" d="M109 1325q0 66 45.5 112t111.5 46q67 0 113.5 -46t46.5 -112q0 -69 -46 -115.5t-114 -46.5q-66 0 -111.5 47t-45.5 115zM174 1323q0 -39 27 -66q28 -28 65 -28q40 0 68 28q26 26 26 66q0 39 -26 68q-23 26 -68 26q-42 0 -65 -26q-27 -30 -27 -68z" />
-<glyph unicode="±" horiz-adv-x="935" d="M147 143v88h644v-88h-644zM147 694v88h273v295h96v-295h275v-88h-275v-295h-96v295h-273z" />
-<glyph unicode="²" horiz-adv-x="782" d="M78 682q0 149 62.5 233t193.5 134q16 6 54 19.5t57.5 21t51 21.5t48.5 27.5t36 32.5t27 42t8 51q0 70 -56 116.5t-161 46.5q-161 0 -262 -116l-49 49q8 12 29 30.5t60 44.5t101 44t132 18q139 0 212.5 -66.5t73.5 -168.5q0 -34 -10.5 -64t-24.5 -51.5t-41 -42t-46 -32.5 t-54.5 -27t-52 -20.5l-52.5 -17.5l-9 -3q-220 -74 -220 -252h506v-70h-614z" />
-<glyph unicode="³" horiz-adv-x="794" d="M78 858l47 43q5 -61 80.5 -109.5t183.5 -48.5q106 0 177 44t71 112q0 75 -83 118.5t-222 43.5h-47v65h47q132 0 204 37t72 107q0 71 -66 115.5t-163 44.5q-83 0 -146.5 -31.5t-93.5 -85.5l-51 53q35 60 115 95.5t176 35.5q132 0 219.5 -64t87.5 -159q0 -140 -184 -178 q95 -15 152 -72t57 -135q0 -97 -93 -158t-227 -61q-128 0 -214.5 51.5t-98.5 136.5z" />
-<glyph unicode="´" horiz-adv-x="436" d="M100 1321l125 174h119l-172 -207z" />
-<glyph unicode="µ" horiz-adv-x="1204" d="M170 -434v1499h102v-600q0 -393 271 -393q135 0 250.5 89t162.5 232v672h103v-922q0 -51 43 -51v-92q-16 -2 -37 -2q-40 0 -69 26.5t-29 65.5v162q-61 -120 -178.5 -196t-249.5 -76q-202 0 -271 188v-602h-98z" />
-<glyph unicode="¶" horiz-adv-x="1196" d="M76 969q0 228 152 356.5t425 128.5h461v-84h-143v-1534h-90v649h-166v-649h-92v649q-255 5 -401 133t-146 351zM166 971q0 -99 36.5 -175t100.5 -123t144.5 -72t175.5 -30v799q-220 -1 -338.5 -106.5t-118.5 -292.5zM715 571h166v799h-166v-799z" />
-<glyph unicode="·" horiz-adv-x="368" d="M139 508v207h90v-207h-90z" />
-<glyph unicode="¸" horiz-adv-x="555" d="M47 -311l29 55q85 -39 178 -39q119 0 119 76q0 74 -101 74q-59 0 -166 -29l115 205l55 -25l-69 -115q33 13 82 13q70 0 108.5 -31t38.5 -90q0 -65 -49 -99t-141 -34q-100 0 -199 39z" />
-<glyph unicode="¹" horiz-adv-x="542" d="M70 1313v71q25 0 54 11t53 27t44.5 32.5t32 28.5t12.5 14h74v-745h156v-72h-396v72h166v659q-25 -30 -87 -64t-109 -34z" />
-<glyph unicode="º" horiz-adv-x="921" d="M94 1081q0 154 104.5 263.5t260.5 109.5q157 0 261.5 -109t104.5 -264q0 -151 -104 -259.5t-262 -108.5q-157 0 -261 108.5t-104 259.5zM195 1079q0 -117 77.5 -198.5t186.5 -81.5q110 0 188 83.5t78 200.5q0 118 -77.5 199.5t-188.5 81.5q-108 0 -186 -83t-78 -202z" />
-<glyph unicode="»" horiz-adv-x="1142" d="M135 145v93l414 292l-414 295v93l500 -359v-61zM549 145v93l414 292l-414 295v93l500 -359v-61z" />
-<glyph unicode="¼" horiz-adv-x="1644" d="M94 1313v71q39 0 88 27.5t78 53.5t31 32h74v-745h155v-72h-395v72h166v659q-25 -30 -87.5 -64t-109.5 -34zM252 43l573 705l561 712l58 -47l-574 -706l-561 -713zM903 217v66l492 522h51v-518h117v-70h-117v-217h-72v217h-471zM985 287h389v413z" />
-<glyph unicode="½" horiz-adv-x="1730" d="M102 1313v71q39 0 88 27.5t78 53.5t31 32h74v-745h155v-72h-395v72h166v659q-25 -30 -87.5 -64t-109.5 -34zM186 43l574 705l561 712l57 -47l-573 -706l-561 -713zM1026 0q0 151 62.5 235t191.5 134q17 7 52.5 19.5t56 20.5t50.5 21.5t47.5 27t35.5 32t26 41.5t8 51 q0 70 -54.5 116.5t-158.5 46.5q-160 0 -258 -118l-49 51q11 14 30 31t58.5 44t100 44.5t129.5 17.5q136 0 209 -66t73 -169q0 -35 -11 -65.5t-25 -52.5t-42 -43t-47 -32.5t-56 -26.5t-52.5 -20.5t-52.5 -17.5q-69 -23 -114.5 -55t-66 -68t-27.5 -65t-7 -64h503v-70h-612z " />
-<glyph unicode="¾" horiz-adv-x="1677" d="M94 858l47 43q5 -61 81 -109.5t184 -48.5q105 0 176 44t71 112q0 75 -83 118.5t-222 43.5h-47v65h47q132 0 204.5 37t72.5 107q0 71 -66.5 115.5t-163.5 44.5q-83 0 -146 -31.5t-93 -85.5l-52 53q35 60 115 95.5t176 35.5q132 0 219.5 -64t87.5 -159q0 -140 -184 -178 q95 -15 152 -72t57 -135q0 -97 -92.5 -158t-226.5 -61q-128 0 -215 52t-99 136zM324 43l573 705l561 712l58 -47l-574 -706l-561 -713zM926 217v66l491 522h51v-518h117v-70h-117v-217h-71v217h-471zM1008 287h389v413z" />
-<glyph unicode="¿" horiz-adv-x="960" d="M74 -49q0 46 10 87t23.5 71.5t39.5 59.5t46.5 47.5t56.5 40.5t58 33.5t61 31.5q4 2 6.5 3.5t5.5 2.5q41 20 65.5 39t48.5 53.5t35 88.5t11 132h90q0 -103 -21.5 -174t-57.5 -112.5t-95 -75.5q-16 -9 -45.5 -24.5t-49.5 -26t-48 -28t-47 -33.5t-39.5 -40t-33 -49.5 t-20.5 -59.5t-8 -73q0 -95 44.5 -163.5t111 -99t145.5 -30.5q113 0 208.5 61t143.5 160l74 -45q-54 -124 -172.5 -194t-253.5 -70q-77 0 -146.5 24.5t-125 71.5t-88.5 122.5t-33 168.5zM539 836v200h90v-200h-90z" />
-<glyph unicode="À" horiz-adv-x="1394" d="M37 0l618 1454h86l619 -1454h-113l-203 479h-694l-203 -479h-110zM375 565h641l-318 762zM526 1880h117l127 -174l-70 -33z" />
-<glyph unicode="Á" horiz-adv-x="1394" d="M37 0l618 1454h86l619 -1454h-113l-203 479h-694l-203 -479h-110zM375 565h641l-318 762zM625 1704l125 174h118l-172 -207z" />
-<glyph unicode="Â" horiz-adv-x="1394" d="M37 0l618 1454h86l619 -1454h-113l-203 479h-694l-203 -479h-110zM375 565h641l-318 762zM463 1712l196 166h76l199 -166l-62 -35l-174 129l-174 -129z" />
-<glyph unicode="Ã" horiz-adv-x="1394" d="M37 0l618 1454h86l619 -1454h-113l-203 479h-694l-203 -479h-110zM375 565h641l-318 762zM391 1692q0 10 3.5 27t15.5 42.5t30 47.5t51 37.5t74 15.5q56 0 132.5 -41t127.5 -41q31 0 54 9.5t34.5 22.5t18.5 28.5t8.5 24t1.5 13.5h70q0 -10 -4 -27.5t-16.5 -43t-32 -47 t-55 -37t-81.5 -15.5q-51 0 -98 20.5t-86.5 41t-73.5 20.5q-31 0 -53.5 -13.5t-32.5 -32.5t-14 -32t-4 -20h-70z" />
-<glyph unicode="Ä" horiz-adv-x="1394" d="M37 0l618 1454h86l619 -1454h-113l-203 479h-694l-203 -479h-110zM375 565h641l-318 762zM514 1696v180h90v-180h-90zM793 1696v180h90v-180h-90z" />
-<glyph unicode="Å" horiz-adv-x="1394" d="M37 0l618 1454h86l619 -1454h-113l-203 479h-694l-203 -479h-110zM375 565h641l-318 762zM559 1751q0 55 39.5 91t99.5 36t100 -36t40 -91q0 -57 -40 -93t-100 -36t-99.5 36t-39.5 93zM616 1751q0 -34 23.5 -58t58.5 -24q33 0 58.5 24t25.5 58q0 36 -24 58t-60 22 q-35 0 -58.5 -22t-23.5 -58z" />
-<glyph unicode="Æ" horiz-adv-x="2035" d="M4 0l946 1454h969v-94h-840v-569h729v-97h-729v-600h858v-94h-960v479h-547l-309 -479h-117zM481 573h490v750z" />
-<glyph unicode="Ç" horiz-adv-x="1423" d="M98 737q0 133 47 261.5t132.5 232t218.5 167.5t290 64q187 0 326.5 -86.5t208.5 -230.5l-86 -49q-48 96 -125.5 158.5t-159 87t-172.5 24.5q-133 0 -244.5 -56t-182 -147t-109.5 -203t-39 -229q0 -170 76 -318.5t210.5 -238.5t294.5 -90q91 0 179.5 28.5t170.5 95 t130 161.5l88 -43q-44 -100 -132.5 -176t-193 -115.5t-213.5 -44.5l-59 -99q32 13 82 13q70 0 108.5 -31t38.5 -90q0 -65 -49 -99t-141 -34q-100 0 -199 39l29 55q85 -39 178 -39q119 0 119 76q0 74 -101 74q-59 0 -166 -29l90 164q-138 7 -260.5 74t-205.5 172t-131 236 t-48 265z" />
-<glyph unicode="È" horiz-adv-x="1259" d="M193 0v1454h950v-94h-846v-572h739v-90h-739v-604h864v-94h-968zM526 1880h117l127 -174l-70 -33z" />
-<glyph unicode="É" horiz-adv-x="1259" d="M193 0v1454h950v-94h-846v-572h739v-90h-739v-604h864v-94h-968zM625 1704l125 174h118l-172 -207z" />
-<glyph unicode="Ê" horiz-adv-x="1259" d="M193 0v1454h950v-94h-846v-572h739v-90h-739v-604h864v-94h-968zM463 1712l196 166h76l199 -166l-62 -35l-174 129l-174 -129z" />
-<glyph unicode="Ë" horiz-adv-x="1259" d="M193 0v1454h950v-94h-846v-572h739v-90h-739v-604h864v-94h-968zM514 1696v180h90v-180h-90zM793 1696v180h90v-180h-90z" />
-<glyph unicode="Ì" horiz-adv-x="489" d="M72 1880h116l127 -174l-69 -33zM193 0v1452h104v-1452h-104z" />
-<glyph unicode="Í" horiz-adv-x="489" d="M172 1704l125 174h119l-172 -207zM193 0v1452h104v-1452h-104z" />
-<glyph unicode="Î" horiz-adv-x="489" d="M10 1712l197 166h76l198 -166l-61 -35l-174 129l-174 -129zM193 0v1452h104v-1452h-104z" />
-<glyph unicode="Ï" horiz-adv-x="489" d="M59 1696v180h91v-180h-91zM193 0v1452h104v-1452h-104zM338 1696v180h90v-180h-90z" />
-<glyph unicode="Ð" horiz-adv-x="1482" d="M72 688v86h133v680h483q135 0 248.5 -37t194 -103t137 -157t83.5 -199t27 -229q0 -331 -187 -530t-503 -199h-483v688h-133zM309 94h379q140 0 252.5 48.5t185 134t110.5 201t38 251.5q0 185 -67.5 326.5t-201.5 223t-317 81.5h-379v-586h365v-86h-365v-594z" />
-<glyph unicode="Ñ" horiz-adv-x="1589" d="M193 0v1454h79l1020 -1280v1278h105v-1452h-97l-1003 1257v-1257h-104zM496 1692q0 10 3.5 27t15.5 42.5t30 47.5t51 37.5t74 15.5q56 0 132.5 -41t127.5 -41q31 0 54 9.5t34.5 22.5t18.5 28.5t8.5 24t1.5 13.5h69q0 -10 -3.5 -27.5t-16 -43t-32 -47t-55 -37t-81.5 -15.5 q-51 0 -98 20.5t-86.5 41t-73.5 20.5q-31 0 -54 -13.5t-33 -32.5t-14 -32t-4 -20h-69z" />
-<glyph unicode="Ò" d="M98 727q0 143 52.5 278t142.5 236t217.5 162t269.5 61q146 0 275 -64.5t216 -168.5t137 -236t50 -268q0 -145 -52.5 -280t-142 -235.5t-216.5 -161t-269 -60.5q-147 1 -275.5 64t-216 165.5t-138 235.5t-50.5 272zM203 727q0 -125 43 -241t117.5 -204.5t183 -142 t231.5 -53.5q126 0 236 56t183 146.5t115 205.5t42 233q0 124 -44 241t-119 205t-183.5 141.5t-229.5 53.5q-101 0 -193 -36t-160.5 -98.5t-119 -144t-76.5 -174.5t-26 -188zM608 1880h117l127 -174l-70 -33z" />
-<glyph unicode="Ó" d="M98 727q0 143 52.5 278t142.5 236t217.5 162t269.5 61q146 0 275 -64.5t216 -168.5t137 -236t50 -268q0 -145 -52.5 -280t-142 -235.5t-216.5 -161t-269 -60.5q-147 1 -275.5 64t-216 165.5t-138 235.5t-50.5 272zM203 727q0 -125 43 -241t117.5 -204.5t183 -142 t231.5 -53.5q126 0 236 56t183 146.5t115 205.5t42 233q0 124 -44 241t-119 205t-183.5 141.5t-229.5 53.5q-101 0 -193 -36t-160.5 -98.5t-119 -144t-76.5 -174.5t-26 -188zM707 1704l124 174h119l-172 -207z" />
-<glyph unicode="Ô" d="M98 727q0 143 52.5 278t142.5 236t217.5 162t269.5 61q146 0 275 -64.5t216 -168.5t137 -236t50 -268q0 -145 -52.5 -280t-142 -235.5t-216.5 -161t-269 -60.5q-147 1 -275.5 64t-216 165.5t-138 235.5t-50.5 272zM203 727q0 -125 43 -241t117.5 -204.5t183 -142 t231.5 -53.5q126 0 236 56t183 146.5t115 205.5t42 233q0 124 -44 241t-119 205t-183.5 141.5t-229.5 53.5q-101 0 -193 -36t-160.5 -98.5t-119 -144t-76.5 -174.5t-26 -188zM545 1712l196 166h76l199 -166l-62 -35l-174 129l-174 -129z" />
-<glyph unicode="Õ" d="M98 727q0 143 52.5 278t142.5 236t217.5 162t269.5 61q146 0 275 -64.5t216 -168.5t137 -236t50 -268q0 -145 -52.5 -280t-142 -235.5t-216.5 -161t-269 -60.5q-147 1 -275.5 64t-216 165.5t-138 235.5t-50.5 272zM203 727q0 -125 43 -241t117.5 -204.5t183 -142 t231.5 -53.5q126 0 236 56t183 146.5t115 205.5t42 233q0 124 -44 241t-119 205t-183.5 141.5t-229.5 53.5q-101 0 -193 -36t-160.5 -98.5t-119 -144t-76.5 -174.5t-26 -188zM473 1692q0 10 3.5 27t15.5 42.5t30 47.5t51 37.5t74 15.5q56 0 132.5 -41t127.5 -41q31 0 54 9.5 t34.5 22.5t18.5 28.5t8.5 24t1.5 13.5h70q0 -10 -4 -27.5t-16.5 -43t-32 -47t-55 -37t-81.5 -15.5q-51 0 -98 20.5t-86.5 41t-73.5 20.5q-31 0 -53.5 -13.5t-32.5 -32.5t-14 -32t-4 -20h-70z" />
-<glyph unicode="Ö" d="M98 727q0 143 52.5 278t142.5 236t217.5 162t269.5 61q146 0 275 -64.5t216 -168.5t137 -236t50 -268q0 -145 -52.5 -280t-142 -235.5t-216.5 -161t-269 -60.5q-147 1 -275.5 64t-216 165.5t-138 235.5t-50.5 272zM203 727q0 -125 43 -241t117.5 -204.5t183 -142 t231.5 -53.5q126 0 236 56t183 146.5t115 205.5t42 233q0 124 -44 241t-119 205t-183.5 141.5t-229.5 53.5q-101 0 -193 -36t-160.5 -98.5t-119 -144t-76.5 -174.5t-26 -188zM596 1696v180h90v-180h-90zM874 1696v180h91v-180h-91z" />
-<glyph unicode="×" horiz-adv-x="937" d="M143 299l256 256l-256 260l68 66l258 -258l258 260l66 -68l-258 -260l260 -258l-68 -66l-258 258l-260 -258z" />
-<glyph unicode="Ø" d="M98 727q0 143 52.5 278t142.5 236t217.5 162t269.5 61q194 0 350 -108l66 98h119l-105 -160q116 -107 182 -258t66 -309q0 -145 -52.5 -280t-142 -235.5t-216.5 -161t-269 -60.5q-200 3 -354 108l-64 -98h-116l102 158q-117 106 -182.5 256t-65.5 313zM203 727 q0 -140 52 -268t146 -219l676 1034q-137 94 -299 94q-101 0 -193 -36t-160.5 -98.5t-119 -144t-76.5 -174.5t-26 -188zM477 178q139 -92 301 -92q126 0 236 56t183 146.5t115 205.5t42 233q0 137 -53 264t-146 219z" />
-<glyph unicode="Ù" horiz-adv-x="1550" d="M170 723v731h104v-731q0 -102 14.5 -190.5t50.5 -172.5t91.5 -143t143.5 -95t200 -36q114 0 203.5 36.5t145 97t91.5 145t50 172t14 186.5v731h104v-731q0 -121 -20 -226t-65.5 -199.5t-114 -162t-172.5 -106.5t-234 -39q-134 0 -239.5 41.5t-173.5 110t-112 164.5 t-62.5 198.5t-18.5 218.5zM604 1880h117l127 -174l-70 -33z" />
-<glyph unicode="Ú" horiz-adv-x="1550" d="M170 723v731h104v-731q0 -102 14.5 -190.5t50.5 -172.5t91.5 -143t143.5 -95t200 -36q114 0 203.5 36.5t145 97t91.5 145t50 172t14 186.5v731h104v-731q0 -121 -20 -226t-65.5 -199.5t-114 -162t-172.5 -106.5t-234 -39q-134 0 -239.5 41.5t-173.5 110t-112 164.5 t-62.5 198.5t-18.5 218.5zM702 1704l125 174h119l-172 -207z" />
-<glyph unicode="Û" horiz-adv-x="1550" d="M170 723v731h104v-731q0 -102 14.5 -190.5t50.5 -172.5t91.5 -143t143.5 -95t200 -36q114 0 203.5 36.5t145 97t91.5 145t50 172t14 186.5v731h104v-731q0 -121 -20 -226t-65.5 -199.5t-114 -162t-172.5 -106.5t-234 -39q-134 0 -239.5 41.5t-173.5 110t-112 164.5 t-62.5 198.5t-18.5 218.5zM541 1712l196 166h76l199 -166l-62 -35l-174 129l-174 -129z" />
-<glyph unicode="Ü" horiz-adv-x="1550" d="M170 723v731h104v-731q0 -102 14.5 -190.5t50.5 -172.5t91.5 -143t143.5 -95t200 -36q114 0 203.5 36.5t145 97t91.5 145t50 172t14 186.5v731h104v-731q0 -121 -20 -226t-65.5 -199.5t-114 -162t-172.5 -106.5t-234 -39q-134 0 -239.5 41.5t-173.5 110t-112 164.5 t-62.5 198.5t-18.5 218.5zM592 1696v180h90v-180h-90zM870 1696v180h91v-180h-91z" />
-<glyph unicode="Ý" horiz-adv-x="1292" d="M23 1454h114l508 -805l512 805h115l-574 -905v-549h-104v553zM571 1704l125 174h119l-172 -207z" />
-<glyph unicode="Þ" horiz-adv-x="1241" d="M193 0v1454h104v-295h455q89 0 169.5 -39.5t135.5 -103t87 -145t32 -164.5q0 -117 -50.5 -220t-146.5 -168t-215 -65h-467v-254h-104zM297 350h465q91 0 163.5 52.5t109 133.5t36.5 171q0 142 -95.5 249t-227.5 107h-451v-713z" />
-<glyph unicode="ß" horiz-adv-x="1124" d="M158 0v1051q0 183 111 297t286 114q161 0 269 -92.5t108 -232.5q0 -110 -66.5 -200t-160.5 -112q157 -34 245 -141.5t88 -263.5q0 -200 -149 -311.5t-412 -120.5v94q216 5 335.5 92t119.5 252q0 155 -102.5 250.5t-268.5 95.5h-37v96h35q119 0 197 71t78 181 q0 113 -81.5 181.5t-201.5 68.5q-138 0 -216.5 -93t-78.5 -241v-1036h-98z" />
-<glyph unicode="à" horiz-adv-x="1103" d="M70 309q0 138 124.5 227t319.5 89q180 0 332 -58v105q0 151 -87 240t-233 89q-161 0 -342 -127l-41 70q207 139 389 139q192 0 304 -112t112 -307v-521q0 -51 43 -51v-92q-14 -2 -37 -2q-38 0 -68 26t-30 66v88q-73 -95 -187 -146.5t-247 -51.5q-149 0 -250.5 95 t-101.5 234zM170 315q0 -107 78.5 -180.5t193.5 -73.5q119 0 219.5 44.5t149.5 119.5q35 41 35 82v189q-154 57 -320 57q-159 0 -257.5 -66t-98.5 -172zM360 1495h117l127 -174l-69 -33z" />
-<glyph unicode="á" horiz-adv-x="1103" d="M70 309q0 138 124.5 227t319.5 89q180 0 332 -58v105q0 151 -87 240t-233 89q-161 0 -342 -127l-41 70q207 139 389 139q192 0 304 -112t112 -307v-521q0 -51 43 -51v-92q-14 -2 -37 -2q-38 0 -68 26t-30 66v88q-73 -95 -187 -146.5t-247 -51.5q-149 0 -250.5 95 t-101.5 234zM170 315q0 -107 78.5 -180.5t193.5 -73.5q119 0 219.5 44.5t149.5 119.5q35 41 35 82v189q-154 57 -320 57q-159 0 -257.5 -66t-98.5 -172zM461 1321l125 174h119l-173 -207z" />
-<glyph unicode="â" horiz-adv-x="1103" d="M70 309q0 138 124.5 227t319.5 89q180 0 332 -58v105q0 151 -87 240t-233 89q-161 0 -342 -127l-41 70q207 139 389 139q192 0 304 -112t112 -307v-521q0 -51 43 -51v-92q-14 -2 -37 -2q-38 0 -68 26t-30 66v88q-73 -95 -187 -146.5t-247 -51.5q-149 0 -250.5 95 t-101.5 234zM170 315q0 -107 78.5 -180.5t193.5 -73.5q119 0 219.5 44.5t149.5 119.5q35 41 35 82v189q-154 57 -320 57q-159 0 -257.5 -66t-98.5 -172zM299 1329l197 166h75l199 -166l-61 -35l-174 129l-175 -129z" />
-<glyph unicode="ã" horiz-adv-x="1103" d="M70 309q0 138 124.5 227t319.5 89q180 0 332 -58v105q0 151 -87 240t-233 89q-161 0 -342 -127l-41 70q207 139 389 139q192 0 304 -112t112 -307v-521q0 -51 43 -51v-92q-14 -2 -37 -2q-38 0 -68 26t-30 66v88q-73 -95 -187 -146.5t-247 -51.5q-149 0 -250.5 95 t-101.5 234zM170 315q0 -107 78.5 -180.5t193.5 -73.5q119 0 219.5 44.5t149.5 119.5q35 41 35 82v189q-154 57 -320 57q-159 0 -257.5 -66t-98.5 -172zM227 1309q0 10 3.5 27t15.5 42.5t30 47.5t51 37.5t74 15.5q56 0 133 -41t128 -41q31 0 54 9.5t34 22.5t18 28.5t8.5 24 t1.5 13.5h70q0 -10 -4 -27.5t-16.5 -43t-32 -47t-55 -37t-81.5 -15.5q-51 0 -98 20.5t-86.5 41t-73.5 20.5q-31 0 -53.5 -13.5t-32.5 -32.5t-14 -32t-4 -20h-70z" />
-<glyph unicode="ä" horiz-adv-x="1103" d="M70 309q0 138 124.5 227t319.5 89q180 0 332 -58v105q0 151 -87 240t-233 89q-161 0 -342 -127l-41 70q207 139 389 139q192 0 304 -112t112 -307v-521q0 -51 43 -51v-92q-14 -2 -37 -2q-38 0 -68 26t-30 66v88q-73 -95 -187 -146.5t-247 -51.5q-149 0 -250.5 95 t-101.5 234zM170 315q0 -107 78.5 -180.5t193.5 -73.5q119 0 219.5 44.5t149.5 119.5q35 41 35 82v189q-154 57 -320 57q-159 0 -257.5 -66t-98.5 -172zM348 1311v180h90v-180h-90zM627 1311v180h90v-180h-90z" />
-<glyph unicode="å" horiz-adv-x="1103" d="M70 309q0 138 124.5 227t319.5 89q180 0 332 -58v105q0 151 -87 240t-233 89q-161 0 -342 -127l-41 70q207 139 389 139q192 0 304 -112t112 -307v-521q0 -51 43 -51v-92q-14 -2 -37 -2q-38 0 -68 26t-30 66v88q-73 -95 -187 -146.5t-247 -51.5q-149 0 -250.5 95 t-101.5 234zM170 315q0 -107 78.5 -180.5t193.5 -73.5q119 0 219.5 44.5t149.5 119.5q35 41 35 82v189q-154 57 -320 57q-159 0 -257.5 -66t-98.5 -172zM393 1368q0 55 39.5 91t99.5 36t100 -36t40 -91q0 -57 -40 -93t-100 -36t-99.5 36t-39.5 93zM451 1368q0 -34 23 -58 t58 -24q33 0 58.5 24t25.5 58q0 36 -24 58t-60 22q-35 0 -58 -22t-23 -58z" />
-<glyph unicode="æ" horiz-adv-x="1906" d="M72 309q0 138 124 227t320 89q147 0 281 -41q6 92 41 172q-22 115 -104.5 180t-207.5 65q-158 0 -342 -127l-39 70q207 139 390 139q133 0 228 -59.5t138 -167.5q69 104 178 165.5t236 61.5q147 0 268 -74.5t189 -200.5t69 -276q0 -34 -2 -40h-944q13 -184 138 -307.5 t294 -123.5q113 0 210.5 57.5t137.5 147.5l90 -24q-46 -114 -169.5 -188t-270.5 -74q-135 0 -249 64.5t-185 174.5q-32 -61 -87 -108.5t-119 -75t-130.5 -41.5t-132.5 -14q-148 0 -249 95t-101 234zM170 315q0 -107 79 -180.5t193 -73.5q120 0 220 44.5t151 119.5 q30 41 35 72q-48 94 -51 215q-128 41 -271 41q-158 0 -257 -66t-99 -172zM895 567h846q-12 189 -132 310.5t-292 121.5q-173 0 -293 -122.5t-129 -309.5z" />
-<glyph unicode="ç" horiz-adv-x="1122" d="M88 537q0 150 67 275t188.5 198t270.5 73q144 0 254.5 -65.5t167.5 -181.5l-100 -33q-47 87 -135 137.5t-193 50.5q-175 0 -295 -130.5t-120 -323.5q0 -126 56.5 -233t152.5 -169.5t208 -62.5q110 0 210.5 59t125.5 137l101 -28q-38 -107 -151.5 -179.5t-252.5 -78.5 l-53 -91q32 13 82 13q70 0 108.5 -31t38.5 -90q0 -65 -49 -99t-141 -34q-100 0 -199 39l29 55q85 -39 178 -39q119 0 119 76q0 74 -101 74q-59 0 -166 -29l86 156q-208 15 -347.5 175.5t-139.5 379.5z" />
-<glyph unicode="è" horiz-adv-x="1196" d="M86 537q0 149 68 274t188 198.5t266 73.5q147 0 267 -74.5t187 -199t68 -272.5q0 -8 -1 -25.5t-1 -19.5h-935q13 -184 135 -307.5t288 -123.5q113 0 211 57.5t138 147.5l90 -24q-48 -115 -171.5 -188.5t-271.5 -73.5q-146 0 -267.5 75.5t-190 203.5t-68.5 278zM190 573 h840q-13 187 -132.5 306.5t-289.5 119.5q-168 0 -288 -120.5t-130 -305.5zM434 1495h117l127 -174l-70 -33z" />
-<glyph unicode="é" horiz-adv-x="1196" d="M86 537q0 149 68 274t188 198.5t266 73.5q147 0 267 -74.5t187 -199t68 -272.5q0 -8 -1 -25.5t-1 -19.5h-935q13 -184 135 -307.5t288 -123.5q113 0 211 57.5t138 147.5l90 -24q-48 -115 -171.5 -188.5t-271.5 -73.5q-146 0 -267.5 75.5t-190 203.5t-68.5 278zM190 573 h840q-13 187 -132.5 306.5t-289.5 119.5q-168 0 -288 -120.5t-130 -305.5zM532 1321l125 174h119l-172 -207z" />
-<glyph unicode="ê" horiz-adv-x="1196" d="M86 537q0 149 68 274t188 198.5t266 73.5q147 0 267 -74.5t187 -199t68 -272.5q0 -8 -1 -25.5t-1 -19.5h-935q13 -184 135 -307.5t288 -123.5q113 0 211 57.5t138 147.5l90 -24q-48 -115 -171.5 -188.5t-271.5 -73.5q-146 0 -267.5 75.5t-190 203.5t-68.5 278zM190 573 h840q-13 187 -132.5 306.5t-289.5 119.5q-168 0 -288 -120.5t-130 -305.5zM371 1329l196 166h76l199 -166l-62 -35l-174 129l-174 -129z" />
-<glyph unicode="ë" horiz-adv-x="1196" d="M86 537q0 149 68 274t188 198.5t266 73.5q147 0 267 -74.5t187 -199t68 -272.5q0 -8 -1 -25.5t-1 -19.5h-935q13 -184 135 -307.5t288 -123.5q113 0 211 57.5t138 147.5l90 -24q-48 -115 -171.5 -188.5t-271.5 -73.5q-146 0 -267.5 75.5t-190 203.5t-68.5 278zM190 573 h840q-13 187 -132.5 306.5t-289.5 119.5q-168 0 -288 -120.5t-130 -305.5zM422 1311v180h90v-180h-90zM700 1311v180h91v-180h-91z" />
-<glyph unicode="ì" horiz-adv-x="417" d="M37 1495h117l127 -174l-70 -33zM158 0v1065h102v-1065h-102z" />
-<glyph unicode="í" horiz-adv-x="417" d="M135 1321l125 174h119l-172 -207zM158 0v1065h102v-1065h-102z" />
-<glyph unicode="î" horiz-adv-x="417" d="M-27 1329l197 166h76l198 -166l-61 -35l-174 129l-174 -129zM158 0v1065h102v-1065h-102z" />
-<glyph unicode="ï" horiz-adv-x="417" d="M25 1311v180h90v-180h-90zM158 0v1065h102v-1065h-102zM303 1311v180h90v-180h-90z" />
-<glyph unicode="ð" horiz-adv-x="1228" d="M90 475q0 133 68 247.5t184 181.5t252 67q144 0 261 -71.5t173 -188.5q-21 151 -86 285t-201 261l-237 -151l-37 51l229 141q-125 106 -284 197h145q127 -76 217 -154l187 119l34 -49l-176 -111q176 -168 245 -356t69 -401q0 -120 -42 -225.5t-113.5 -179t-168.5 -116 t-203 -42.5q-213 0 -364.5 145.5t-151.5 349.5zM195 473q0 -166 121.5 -283.5t291.5 -117.5q172 0 296 126.5t124 299.5q0 159 -122.5 272t-293.5 113q-172 0 -294.5 -120.5t-122.5 -289.5z" />
-<glyph unicode="ñ" horiz-adv-x="1173" d="M158 0v1065h94v-254q65 122 191 197t268 75q168 0 242.5 -118.5t74.5 -352.5v-612h-102v594q0 205 -59 300t-187 95q-136 0 -257.5 -95t-162.5 -235v-659h-102zM285 1309q0 10 3.5 27t15.5 42.5t30 47.5t51 37.5t74 15.5q56 0 132.5 -41t127.5 -41q31 0 54 9.5t34.5 22.5 t18.5 28.5t8.5 24t1.5 13.5h69q0 -10 -3.5 -27.5t-16 -43t-32 -47t-55 -37t-81.5 -15.5q-51 0 -98 20.5t-86.5 41t-73.5 20.5q-31 0 -54 -13.5t-33 -32.5t-14 -32t-4 -20h-69z" />
-<glyph unicode="ò" horiz-adv-x="1212" d="M86 530q0 148 68 275t188.5 202.5t263.5 75.5q108 0 205.5 -44.5t166.5 -119.5t109.5 -176.5t40.5 -212.5q0 -147 -68 -273t-188.5 -201.5t-265.5 -75.5q-146 0 -266 75.5t-187 201.5t-67 273zM190 526q0 -189 122 -321.5t294 -132.5q112 0 208 61.5t153 167.5t57 231 q0 187 -124 323t-294 136q-169 0 -292.5 -137.5t-123.5 -327.5zM436 1495h117l127 -174l-70 -33z" />
-<glyph unicode="ó" horiz-adv-x="1212" d="M86 530q0 148 68 275t188.5 202.5t263.5 75.5q108 0 205.5 -44.5t166.5 -119.5t109.5 -176.5t40.5 -212.5q0 -147 -68 -273t-188.5 -201.5t-265.5 -75.5q-146 0 -266 75.5t-187 201.5t-67 273zM190 526q0 -189 122 -321.5t294 -132.5q112 0 208 61.5t153 167.5t57 231 q0 187 -124 323t-294 136q-169 0 -292.5 -137.5t-123.5 -327.5zM532 1321l125 174h119l-172 -207z" />
-<glyph unicode="ô" horiz-adv-x="1212" d="M86 530q0 148 68 275t188.5 202.5t263.5 75.5q108 0 205.5 -44.5t166.5 -119.5t109.5 -176.5t40.5 -212.5q0 -147 -68 -273t-188.5 -201.5t-265.5 -75.5q-146 0 -266 75.5t-187 201.5t-67 273zM190 526q0 -189 122 -321.5t294 -132.5q112 0 208 61.5t153 167.5t57 231 q0 187 -124 323t-294 136q-169 0 -292.5 -137.5t-123.5 -327.5zM371 1329l196 166h76l199 -166l-62 -35l-174 129l-174 -129z" />
-<glyph unicode="õ" horiz-adv-x="1212" d="M86 530q0 148 68 275t188.5 202.5t263.5 75.5q108 0 205.5 -44.5t166.5 -119.5t109.5 -176.5t40.5 -212.5q0 -147 -68 -273t-188.5 -201.5t-265.5 -75.5q-146 0 -266 75.5t-187 201.5t-67 273zM190 526q0 -189 122 -321.5t294 -132.5q112 0 208 61.5t153 167.5t57 231 q0 187 -124 323t-294 136q-169 0 -292.5 -137.5t-123.5 -327.5zM301 1309q0 10 3.5 27t15.5 42.5t30 47.5t51 37.5t74 15.5q56 0 132.5 -41t127.5 -41q31 0 54 9.5t34.5 22.5t18.5 28.5t8.5 24t1.5 13.5h70q0 -10 -4 -27.5t-16.5 -43t-32 -47t-55 -37t-81.5 -15.5 q-51 0 -98 20.5t-86.5 41t-73.5 20.5q-31 0 -53.5 -13.5t-32.5 -32.5t-14 -32t-4 -20h-70z" />
-<glyph unicode="ö" horiz-adv-x="1212" d="M86 530q0 148 68 275t188.5 202.5t263.5 75.5q108 0 205.5 -44.5t166.5 -119.5t109.5 -176.5t40.5 -212.5q0 -147 -68 -273t-188.5 -201.5t-265.5 -75.5q-146 0 -266 75.5t-187 201.5t-67 273zM190 526q0 -189 122 -321.5t294 -132.5q112 0 208 61.5t153 167.5t57 231 q0 187 -124 323t-294 136q-169 0 -292.5 -137.5t-123.5 -327.5zM422 1311v180h90v-180h-90zM700 1311v180h91v-180h-91z" />
-<glyph unicode="÷" horiz-adv-x="1112" d="M143 526v88h826v-88h-826zM510 166v164h90v-164h-90zM510 807v166h90v-166h-90z" />
-<glyph unicode="ø" horiz-adv-x="1212" d="M86 530q0 148 68 275t188.5 202.5t263.5 75.5q145 0 271 -79l45 63h79l-73 -102q93 -77 146.5 -191.5t53.5 -243.5q0 -147 -68 -273t-188.5 -201.5t-265.5 -75.5q-147 0 -270 77l-43 -59h-78l70 96q-93 77 -146 192t-53 244zM190 526q0 -105 40.5 -196t111.5 -156 l481 748q-101 69 -217 69q-169 0 -292.5 -137.5t-123.5 -327.5zM389 137q100 -65 217 -65q112 0 208 61.5t153 167.5t57 231q0 102 -41.5 194t-112.5 157z" />
-<glyph unicode="ù" horiz-adv-x="1202" d="M145 451v614h103v-600q0 -393 268 -393q136 0 252.5 89t163.5 232v672h102v-922q0 -51 43 -51v-92q-16 -2 -37 -2q-43 0 -70.5 26t-27.5 66v162q-70 -127 -192.5 -199.5t-262.5 -72.5q-169 0 -255.5 119t-86.5 352zM414 1495h116l127 -174l-69 -33z" />
-<glyph unicode="ú" horiz-adv-x="1202" d="M145 451v614h103v-600q0 -393 268 -393q136 0 252.5 89t163.5 232v672h102v-922q0 -51 43 -51v-92q-16 -2 -37 -2q-43 0 -70.5 26t-27.5 66v162q-70 -127 -192.5 -199.5t-262.5 -72.5q-169 0 -255.5 119t-86.5 352zM512 1321l125 174h119l-172 -207z" />
-<glyph unicode="û" horiz-adv-x="1202" d="M145 451v614h103v-600q0 -393 268 -393q136 0 252.5 89t163.5 232v672h102v-922q0 -51 43 -51v-92q-16 -2 -37 -2q-43 0 -70.5 26t-27.5 66v162q-70 -127 -192.5 -199.5t-262.5 -72.5q-169 0 -255.5 119t-86.5 352zM350 1329l197 166h76l198 -166l-61 -35l-174 129 l-174 -129z" />
-<glyph unicode="ü" horiz-adv-x="1202" d="M145 451v614h103v-600q0 -393 268 -393q136 0 252.5 89t163.5 232v672h102v-922q0 -51 43 -51v-92q-16 -2 -37 -2q-43 0 -70.5 26t-27.5 66v162q-70 -127 -192.5 -199.5t-262.5 -72.5q-169 0 -255.5 119t-86.5 352zM401 1311v180h91v-180h-91zM680 1311v180h90v-180h-90z " />
-<glyph unicode="ý" horiz-adv-x="1110" d="M33 1065h108l422 -965l395 965h101l-584 -1401q-29 -70 -77 -95.5t-126 -25.5q-29 0 -41 2v93q80 0 109 14q19 9 50.5 73.5t117.5 274.5zM489 1321l125 174h119l-172 -207z" />
-<glyph unicode="þ" horiz-adv-x="1232" d="M158 -436v1890h104v-592q157 223 385 223q91 0 172 -32.5t140 -87.5t102 -126.5t64.5 -151t21.5 -159.5q-2 -109 -43 -210.5t-109 -178t-164 -122.5t-202 -46q-113 0 -212.5 59t-154.5 148v-614h-104zM262 350q0 -70 60 -137t145 -106t160 -39q118 0 215 66.5 t149.5 171.5t52.5 222q0 121 -49.5 226t-142.5 171t-209 66q-125 0 -223.5 -77t-157.5 -195v-369z" />
-<glyph unicode="ÿ" horiz-adv-x="1110" d="M33 1065h108l422 -965l395 965h101l-584 -1401q-29 -70 -77 -95.5t-126 -25.5q-29 0 -41 2v93q80 0 109 14q19 9 50.5 73.5t117.5 274.5zM379 1311v180h90v-180h-90zM657 1311v180h91v-180h-91z" />
-<glyph unicode="Œ" horiz-adv-x="2416" d="M98 727q0 143 52.5 278t142.5 236t217.5 162t269.5 61q197 0 351 -119.5t225 -302.5v412h944v-94h-840v-569h729v-97h-729v-600h858v-94h-962v410q-71 -183 -227 -301.5t-347 -118.5q-148 0 -277.5 63t-217.5 166t-138.5 235.5t-50.5 272.5zM203 727q0 -125 43 -241 t117.5 -204.5t183 -142t231.5 -53.5q126 0 236 55.5t183 146.5t115 206t42 235q0 123 -44 239.5t-119 204.5t-183.5 141.5t-229.5 53.5q-101 0 -193 -36t-160.5 -98.5t-119 -144t-76.5 -174.5t-26 -188z" />
-<glyph unicode="œ" horiz-adv-x="2134" d="M88 528q0 152 69 279.5t189 201.5t264 74q161 0 286.5 -98t176.5 -262q53 169 178 264.5t295 95.5q227 0 373.5 -163t146.5 -428h-933q14 -181 140.5 -306t299.5 -125q117 0 215 57.5t133 147.5l88 -24q-49 -116 -173 -189t-269 -73q-159 0 -294.5 99t-195.5 259 q-62 -165 -188 -261.5t-285 -96.5q-143 0 -261.5 72.5t-186.5 198.5t-68 277zM193 524q0 -190 120.5 -321t292.5 -131q175 0 296.5 133t121.5 325t-121 326.5t-293 134.5q-173 0 -295 -136.5t-122 -330.5zM1130 567h836q-12 188 -132 310t-290 122q-169 0 -287 -122.5 t-127 -309.5z" />
-<glyph unicode="Ÿ" horiz-adv-x="1292" d="M23 1454h114l508 -805l512 805h115l-574 -905v-549h-104v553zM461 1696v180h90v-180h-90zM739 1696v180h90v-180h-90z" />
-<glyph unicode="ˆ" horiz-adv-x="655" d="M92 1329l197 166h76l198 -166l-61 -35l-174 129l-174 -129z" />
-<glyph unicode="˜" horiz-adv-x="813" d="M96 1309q0 10 3.5 27t15.5 42.5t30 47.5t51 37.5t74 15.5q56 0 132.5 -41t127.5 -41q31 0 54 9.5t34.5 22.5t18.5 28.5t8.5 24t1.5 13.5h70q0 -10 -4 -27.5t-16.5 -43t-32 -47t-55 -37t-81.5 -15.5q-51 0 -98 20.5t-86.5 41t-73.5 20.5q-31 0 -53.5 -13.5t-32.5 -32.5 t-14 -32t-4 -20h-70z" />
-<glyph unicode=" " horiz-adv-x="940" />
-<glyph unicode=" " horiz-adv-x="1880" />
-<glyph unicode=" " horiz-adv-x="940" />
-<glyph unicode=" " horiz-adv-x="1880" />
-<glyph unicode=" " horiz-adv-x="626" />
-<glyph unicode=" " horiz-adv-x="470" />
-<glyph unicode=" " horiz-adv-x="313" />
-<glyph unicode=" " horiz-adv-x="313" />
-<glyph unicode=" " horiz-adv-x="235" />
-<glyph unicode=" " horiz-adv-x="376" />
-<glyph unicode=" " horiz-adv-x="104" />
-<glyph unicode="‐" horiz-adv-x="868" d="M139 510v94h590v-94h-590z" />
-<glyph unicode="‑" horiz-adv-x="868" d="M139 510v94h590v-94h-590z" />
-<glyph unicode="‒" horiz-adv-x="868" d="M139 510v94h590v-94h-590z" />
-<glyph unicode="–" horiz-adv-x="1150" d="M139 510v94h873v-94h-873z" />
-<glyph unicode="—" horiz-adv-x="1830" d="M139 510v94h1553v-94h-1553z" />
-<glyph unicode="‘" horiz-adv-x="380" d="M125 1255v240h90v-229q0 -37 37 -37v-82q-55 0 -91 27t-36 81z" />
-<glyph unicode="’" horiz-adv-x="378" d="M113 1413v82q55 0 91 -27.5t36 -81.5v-239h-90v229q0 37 -37 37z" />
-<glyph unicode="‚" horiz-adv-x="401" d="M125 -29q37 0 37 37v166h90v-178q0 -54 -36.5 -80.5t-90.5 -26.5v82z" />
-<glyph unicode="“" horiz-adv-x="606" d="M125 1255v240h90v-229q0 -37 37 -37v-82q-55 0 -91 27t-36 81zM350 1255v240h90v-229q0 -37 37 -37v-82q-55 0 -91 27t-36 81z" />
-<glyph unicode="”" horiz-adv-x="604" d="M113 1413v82q55 0 91 -27.5t36 -81.5v-239h-90v229q0 37 -37 37zM338 1413v82q55 0 91 -27.5t36 -81.5v-239h-90v229q0 37 -37 37z" />
-<glyph unicode="„" horiz-adv-x="606" d="M125 -29q37 0 37 37v166h90v-178q0 -54 -36.5 -80.5t-90.5 -26.5v82zM330 -29q37 0 37 37v166h90v-178q0 -54 -36.5 -80.5t-90.5 -26.5v82z" />
-<glyph unicode="•" horiz-adv-x="722" d="M186 707q0 71 52 122.5t124 51.5t123.5 -51.5t51.5 -122.5q0 -73 -51.5 -125t-123.5 -52t-124 52t-52 125z" />
-<glyph unicode="…" horiz-adv-x="858" d="M139 0v174h90v-174h-90zM385 0v174h88v-174h-88zM629 0v174h90v-174h-90z" />
-<glyph unicode=" " horiz-adv-x="376" />
-<glyph unicode="‹" horiz-adv-x="729" d="M94 498v61l502 359v-93l-416 -295l416 -292v-93z" />
-<glyph unicode="›" horiz-adv-x="729" d="M135 145v93l414 292l-414 295v93l500 -359v-61z" />
-<glyph unicode=" " horiz-adv-x="470" />
-<glyph unicode="€" horiz-adv-x="1656" d="M70 567l30 70h197q-6 50 -6 100v33h-154l31 70h129q14 96 50 186.5t96 169.5t137.5 138t180.5 93.5t218 34.5q187 0 326 -86.5t208 -230.5l-86 -49q-36 73 -88.5 126.5t-113.5 84t-124 45t-130 14.5q-118 0 -219.5 -44t-172 -118t-115.5 -167.5t-61 -196.5h736l-31 -70 h-713v-39q0 -47 6 -94h662l-33 -70h-616q51 -207 206.5 -345t356.5 -138q91 0 179 28.5t170 95t130 161.5l88 -43q-46 -105 -141.5 -183.5t-207.5 -116.5t-226 -38q-122 0 -234 47t-196 127.5t-144 184.5t-86 220h-239z" />
-<glyph unicode="™" horiz-adv-x="1429" d="M121 1380v78h467v-78h-195v-506h-78v506h-194zM682 874v580h100l191 -399l188 399h103v-580h-76v463l-182 -376h-66l-182 376v-463h-76z" />
-<glyph unicode="◼" horiz-adv-x="1064" d="M0 0v1065h1065v-1065h-1065z" />
-<hkern u1=" " u2="’" k="63" />
-<hkern u1=" " u2="Æ" k="72" />
-<hkern u1=" " u2="y" k="57" />
-<hkern u1=" " u2="w" k="57" />
-<hkern u1=" " u2="v" k="57" />
-<hkern u1=" " u2="Y" k="78" />
-<hkern u1=" " u2="X" k="20" />
-<hkern u1=" " u2="W" k="72" />
-<hkern u1=" " u2="V" k="72" />
-<hkern u1=" " u2="T" k="53" />
-<hkern u1=" " u2="J" k="55" />
-<hkern u1=" " u2="A" k="63" />
-<hkern u1=" " u2="'" k="63" />
-<hkern u1=" " u2=""" k="74" />
-<hkern u1=""" u2=" " k="74" />
-<hkern u1="#" u2="4" k="20" />
-<hkern u1="$" u2="7" k="23" />
-<hkern u1="$" u2="3" k="23" />
-<hkern u1="&" u2="’" k="84" />
-<hkern u1="&" u2="ø" k="-6" />
-<hkern u1="&" u2="Ø" k="-14" />
-<hkern u1="&" u2="Æ" k="-47" />
-<hkern u1="&" u2="z" k="-4" />
-<hkern u1="&" u2="y" k="41" />
-<hkern u1="&" u2="x" k="-16" />
-<hkern u1="&" u2="w" k="41" />
-<hkern u1="&" u2="v" k="39" />
-<hkern u1="&" u2="s" k="-4" />
-<hkern u1="&" u2="Z" k="-4" />
-<hkern u1="&" u2="Y" k="111" />
-<hkern u1="&" u2="X" k="-25" />
-<hkern u1="&" u2="W" k="90" />
-<hkern u1="&" u2="V" k="88" />
-<hkern u1="&" u2="U" k="4" />
-<hkern u1="&" u2="T" k="84" />
-<hkern u1="&" u2="J" k="-8" />
-<hkern u1="&" u2="A" k="-16" />
-<hkern u1="&" u2="'" k="82" />
-<hkern u1="'" u2="‹" k="8" />
-<hkern u1="'" u2="ð" k="121" />
-<hkern u1="'" u2="ï" k="-10" />
-<hkern u1="'" u2="î" k="-6" />
-<hkern u1="'" u2="Æ" k="203" />
-<hkern u1="'" u2="s" k="6" />
-<hkern u1="'" u2="o" k="47" />
-<hkern u1="'" u2="f" k="14" />
-<hkern u1="'" u2="d" k="164" />
-<hkern u1="'" u2="a" k="18" />
-<hkern u1="'" u2="O" k="31" />
-<hkern u1="'" u2="J" k="178" />
-<hkern u1="'" u2="A" k="147" />
-<hkern u1="'" u2="@" k="82" />
-<hkern u1="'" u2="9" k="35" />
-<hkern u1="'" u2="5" k="29" />
-<hkern u1="'" u2="4" k="176" />
-<hkern u1="'" u2="3" k="23" />
-<hkern u1="'" u2="0" k="25" />
-<hkern u1="'" u2="/" k="193" />
-<hkern u1="'" u2="." k="248" />
-<hkern u1="'" u2=" " k="63" />
-<hkern u1="(" u2="ð" k="33" />
-<hkern u1="(" u2="ï" k="-23" />
-<hkern u1="(" u2="î" k="-4" />
-<hkern u1="(" u2="ì" k="-8" />
-<hkern u1="(" u2="Ø" k="-4" />
-<hkern u1="(" u2="Æ" k="-14" />
-<hkern u1="(" u2="y" k="25" />
-<hkern u1="(" u2="x" k="-6" />
-<hkern u1="(" u2="w" k="31" />
-<hkern u1="(" u2="v" k="29" />
-<hkern u1="(" u2="u" k="18" />
-<hkern u1="(" u2="o" k="33" />
-<hkern u1="(" u2="j" k="-10" />
-<hkern u1="(" u2="f" k="4" />
-<hkern u1="(" u2="d" k="37" />
-<hkern u1="(" u2="Y" k="-10" />
-<hkern u1="(" u2="X" k="-10" />
-<hkern u1="(" u2="W" k="-8" />
-<hkern u1="(" u2="V" k="-8" />
-<hkern u1="(" u2="T" k="-2" />
-<hkern u1="(" u2="O" k="31" />
-<hkern u1="(" u2="J" k="-4" />
-<hkern u1="(" u2="A" k="-8" />
-<hkern u1="(" u2="6" k="4" />
-<hkern u1="(" u2="0" k="31" />
-<hkern u1="*" u2="ð" k="109" />
-<hkern u1="*" u2="ï" k="-27" />
-<hkern u1="*" u2="î" k="-23" />
-<hkern u1="*" u2="ì" k="-6" />
-<hkern u1="*" u2="Æ" k="201" />
-<hkern u1="*" u2="x" k="-8" />
-<hkern u1="*" u2="w" k="-8" />
-<hkern u1="*" u2="v" k="-8" />
-<hkern u1="*" u2="s" k="39" />
-<hkern u1="*" u2="o" k="66" />
-<hkern u1="*" u2="f" k="14" />
-<hkern u1="*" u2="d" k="98" />
-<hkern u1="*" u2="a" k="33" />
-<hkern u1="*" u2="Y" k="-12" />
-<hkern u1="*" u2="X" k="-12" />
-<hkern u1="*" u2="W" k="-12" />
-<hkern u1="*" u2="V" k="-2" />
-<hkern u1="*" u2="T" k="-27" />
-<hkern u1="*" u2="O" k="16" />
-<hkern u1="*" u2="J" k="184" />
-<hkern u1="*" u2="A" k="139" />
-<hkern u1="+" u2="8" k="16" />
-<hkern u1="+" u2="7" k="49" />
-<hkern u1="+" u2="4" k="76" />
-<hkern u1="+" u2="3" k="43" />
-<hkern u1="+" u2="2" k="20" />
-<hkern u1="+" u2="1" k="23" />
-<hkern u1="," u2="j" k="-12" />
-<hkern u1="-" u2="Æ" k="31" />
-<hkern u1="-" u2="z" k="70" />
-<hkern u1="-" u2="y" k="51" />
-<hkern u1="-" u2="x" k="68" />
-<hkern u1="-" u2="w" k="51" />
-<hkern u1="-" u2="v" k="47" />
-<hkern u1="-" u2="t" k="16" />
-<hkern u1="-" u2="s" k="16" />
-<hkern u1="-" u2="f" k="14" />
-<hkern u1="-" u2="Z" k="33" />
-<hkern u1="-" u2="Y" k="145" />
-<hkern u1="-" u2="X" k="59" />
-<hkern u1="-" u2="W" k="92" />
-<hkern u1="-" u2="V" k="90" />
-<hkern u1="-" u2="T" k="141" />
-<hkern u1="-" u2="J" k="139" />
-<hkern u1="-" u2="A" k="33" />
-<hkern u1="-" u2="7" k="70" />
-<hkern u1="-" u2="4" k="39" />
-<hkern u1="-" u2="3" k="94" />
-<hkern u1="-" u2="2" k="16" />
-<hkern u1="-" u2="1" k="53" />
-<hkern u1="." u2="’" k="274" />
-<hkern u1="." u2="‘" k="279" />
-<hkern u1="." u2="Æ" k="-2" />
-<hkern u1="." u2="y" k="104" />
-<hkern u1="." u2="w" k="102" />
-<hkern u1="." u2="v" k="100" />
-<hkern u1="." u2="t" k="4" />
-<hkern u1="." u2="f" k="2" />
-<hkern u1="." u2="d" k="14" />
-<hkern u1="." u2="Y" k="166" />
-<hkern u1="." u2="W" k="156" />
-<hkern u1="." u2="V" k="156" />
-<hkern u1="." u2="U" k="43" />
-<hkern u1="." u2="T" k="143" />
-<hkern u1="." u2="O" k="45" />
-<hkern u1="." u2="7" k="70" />
-<hkern u1="." u2="'" k="248" />
-<hkern u1="/" u2="ð" k="84" />
-<hkern u1="/" u2="ï" k="-20" />
-<hkern u1="/" u2="ì" k="-2" />
-<hkern u1="/" u2="Æ" k="190" />
-<hkern u1="/" u2="z" k="8" />
-<hkern u1="/" u2="y" k="33" />
-<hkern u1="/" u2="x" k="6" />
-<hkern u1="/" u2="w" k="33" />
-<hkern u1="/" u2="v" k="33" />
-<hkern u1="/" u2="u" k="41" />
-<hkern u1="/" u2="s" k="63" />
-<hkern u1="/" u2="o" k="74" />
-<hkern u1="/" u2="n" k="43" />
-<hkern u1="/" u2="f" k="6" />
-<hkern u1="/" u2="d" k="76" />
-<hkern u1="/" u2="a" k="61" />
-<hkern u1="/" u2="Y" k="-8" />
-<hkern u1="/" u2="X" k="-8" />
-<hkern u1="/" u2="W" k="-8" />
-<hkern u1="/" u2="V" k="-8" />
-<hkern u1="/" u2="S" k="4" />
-<hkern u1="/" u2="O" k="39" />
-<hkern u1="/" u2="J" k="166" />
-<hkern u1="/" u2="A" k="131" />
-<hkern u1="/" u2="9" k="55" />
-<hkern u1="/" u2="8" k="4" />
-<hkern u1="/" u2="6" k="29" />
-<hkern u1="/" u2="5" k="66" />
-<hkern u1="/" u2="4" k="154" />
-<hkern u1="/" u2="3" k="51" />
-<hkern u1="/" u2="2" k="43" />
-<hkern u1="/" u2="1" k="37" />
-<hkern u1="/" u2="0" k="72" />
-<hkern u1="/" u2="/" k="475" />
-<hkern u1="0" u2="Æ" k="45" />
-<hkern u1="0" u2="°" k="43" />
-<hkern u1="0" u2="\" k="66" />
-<hkern u1="0" u2="Z" k="27" />
-<hkern u1="0" u2="Y" k="100" />
-<hkern u1="0" u2="X" k="29" />
-<hkern u1="0" u2="W" k="68" />
-<hkern u1="0" u2="V" k="68" />
-<hkern u1="0" u2="T" k="123" />
-<hkern u1="0" u2="J" k="20" />
-<hkern u1="0" u2="A" k="35" />
-<hkern u1="0" u2="7" k="33" />
-<hkern u1="0" u2="/" k="4" />
-<hkern u1="0" u2=")" k="31" />
-<hkern u1="0" u2="'" k="25" />
-<hkern u1="1" u2="Æ" k="-12" />
-<hkern u1="1" u2="·" k="43" />
-<hkern u1="1" u2="°" k="37" />
-<hkern u1="1" u2="\" k="74" />
-<hkern u1="1" u2="Y" k="102" />
-<hkern u1="1" u2="X" k="-4" />
-<hkern u1="1" u2="W" k="82" />
-<hkern u1="1" u2="V" k="82" />
-<hkern u1="1" u2="U" k="20" />
-<hkern u1="1" u2="T" k="127" />
-<hkern u1="1" u2="A" k="-6" />
-<hkern u1="1" u2="=" k="23" />
-<hkern u1="1" u2="7" k="23" />
-<hkern u1="1" u2="-" k="35" />
-<hkern u1="1" u2="+" k="43" />
-<hkern u1="1" u2="'" k="27" />
-<hkern u1="1" u2="#" k="-4" />
-<hkern u1="2" u2="Æ" k="-6" />
-<hkern u1="2" u2="\" k="47" />
-<hkern u1="2" u2="Y" k="80" />
-<hkern u1="2" u2="W" k="53" />
-<hkern u1="2" u2="V" k="53" />
-<hkern u1="2" u2="T" k="117" />
-<hkern u1="3" u2="Æ" k="-10" />
-<hkern u1="3" u2="°" k="45" />
-<hkern u1="3" u2="\" k="57" />
-<hkern u1="3" u2="Y" k="90" />
-<hkern u1="3" u2="X" k="-6" />
-<hkern u1="3" u2="W" k="59" />
-<hkern u1="3" u2="V" k="59" />
-<hkern u1="3" u2="T" k="119" />
-<hkern u1="3" u2="7" k="23" />
-<hkern u1="3" u2="'" k="27" />
-<hkern u1="4" u2="Æ" k="-10" />
-<hkern u1="4" u2="·" k="31" />
-<hkern u1="4" u2="°" k="25" />
-<hkern u1="4" u2="\" k="59" />
-<hkern u1="4" u2="Y" k="88" />
-<hkern u1="4" u2="X" k="-2" />
-<hkern u1="4" u2="W" k="68" />
-<hkern u1="4" u2="V" k="68" />
-<hkern u1="4" u2="T" k="123" />
-<hkern u1="4" u2="A" k="-4" />
-<hkern u1="4" u2="7" k="25" />
-<hkern u1="4" u2="-" k="18" />
-<hkern u1="4" u2="," k="-4" />
-<hkern u1="4" u2="+" k="31" />
-<hkern u1="4" u2="'" k="6" />
-<hkern u1="5" u2="Æ" k="-4" />
-<hkern u1="5" u2="·" k="27" />
-<hkern u1="5" u2="\" k="8" />
-<hkern u1="5" u2="Y" k="43" />
-<hkern u1="5" u2="W" k="27" />
-<hkern u1="5" u2="V" k="27" />
-<hkern u1="5" u2="T" k="102" />
-<hkern u1="5" u2="A" k="-6" />
-<hkern u1="5" u2="-" k="25" />
-<hkern u1="5" u2="+" k="59" />
-<hkern u1="6" u2="Æ" k="35" />
-<hkern u1="6" u2="Y" k="49" />
-<hkern u1="6" u2="W" k="35" />
-<hkern u1="6" u2="V" k="35" />
-<hkern u1="6" u2="T" k="23" />
-<hkern u1="6" u2="A" k="31" />
-<hkern u1="6" u2="3" k="4" />
-<hkern u1="7" u2="Æ" k="111" />
-<hkern u1="7" u2="·" k="47" />
-<hkern u1="7" u2="°" k="-2" />
-<hkern u1="7" u2="¢" k="35" />
-<hkern u1="7" u2="Z" k="27" />
-<hkern u1="7" u2="T" k="57" />
-<hkern u1="7" u2="J" k="111" />
-<hkern u1="7" u2="A" k="84" />
-<hkern u1="7" u2="=" k="27" />
-<hkern u1="7" u2="7" k="-4" />
-<hkern u1="7" u2="5" k="29" />
-<hkern u1="7" u2="4" k="100" />
-<hkern u1="7" u2="/" k="100" />
-<hkern u1="7" u2="." k="137" />
-<hkern u1="7" u2="-" k="53" />
-<hkern u1="7" u2="+" k="25" />
-<hkern u1="8" u2="Æ" k="31" />
-<hkern u1="8" u2="Y" k="49" />
-<hkern u1="8" u2="W" k="35" />
-<hkern u1="8" u2="V" k="35" />
-<hkern u1="8" u2="T" k="18" />
-<hkern u1="8" u2="A" k="31" />
-<hkern u1="8" u2="+" k="16" />
-<hkern u1="9" u2="°" k="61" />
-<hkern u1="9" u2="\" k="63" />
-<hkern u1="9" u2="Y" k="102" />
-<hkern u1="9" u2="W" k="68" />
-<hkern u1="9" u2="V" k="68" />
-<hkern u1="9" u2="T" k="125" />
-<hkern u1="9" u2="7" k="31" />
-<hkern u1="9" u2="'" k="45" />
-<hkern u1=":" u2="Y" k="55" />
-<hkern u1=":" u2="W" k="31" />
-<hkern u1=":" u2="V" k="31" />
-<hkern u1=":" u2="T" k="106" />
-<hkern u1=";" u2="j" k="-10" />
-<hkern u1="=" u2="7" k="45" />
-<hkern u1="=" u2="4" k="23" />
-<hkern u1="=" u2="3" k="53" />
-<hkern u1="=" u2="1" k="31" />
-<hkern u1="@" u2="’" k="74" />
-<hkern u1="@" u2="Y" k="113" />
-<hkern u1="@" u2="W" k="76" />
-<hkern u1="@" u2="V" k="76" />
-<hkern u1="@" u2="T" k="123" />
-<hkern u1="@" u2="A" k="23" />
-<hkern u1="@" u2="'" k="74" />
-<hkern u1="A" u2="™" k="135" />
-<hkern u1="A" u2="‹" k="33" />
-<hkern u1="A" u2="„" k="-2" />
-<hkern u1="A" u2="‚" k="-2" />
-<hkern u1="A" u2="’" k="143" />
-<hkern u1="A" u2="‘" k="145" />
-<hkern u1="A" u2="ð" k="31" />
-<hkern u1="A" u2="Ø" k="4" />
-<hkern u1="A" u2="Ð" k="10" />
-<hkern u1="A" u2="º" k="106" />
-<hkern u1="A" u2="®" k="45" />
-<hkern u1="A" u2="ª" k="96" />
-<hkern u1="A" u2="©" k="45" />
-<hkern u1="A" u2="y" k="72" />
-<hkern u1="A" u2="w" k="70" />
-<hkern u1="A" u2="v" k="68" />
-<hkern u1="A" u2="u" k="27" />
-<hkern u1="A" u2="t" k="43" />
-<hkern u1="A" u2="s" k="14" />
-<hkern u1="A" u2="o" k="35" />
-<hkern u1="A" u2="l" k="2" />
-<hkern u1="A" u2="f" k="29" />
-<hkern u1="A" u2="d" k="35" />
-<hkern u1="A" u2="a" k="16" />
-<hkern u1="A" u2="]" k="-2" />
-<hkern u1="A" u2="\" k="127" />
-<hkern u1="A" u2="Y" k="152" />
-<hkern u1="A" u2="W" k="115" />
-<hkern u1="A" u2="V" k="115" />
-<hkern u1="A" u2="U" k="61" />
-<hkern u1="A" u2="T" k="150" />
-<hkern u1="A" u2="S" k="25" />
-<hkern u1="A" u2="O" k="53" />
-<hkern u1="A" u2="@" k="23" />
-<hkern u1="A" u2="?" k="59" />
-<hkern u1="A" u2="8" k="31" />
-<hkern u1="A" u2="7" k="55" />
-<hkern u1="A" u2="6" k="35" />
-<hkern u1="A" u2="4" k="-8" />
-<hkern u1="A" u2="2" k="-4" />
-<hkern u1="A" u2="0" k="35" />
-<hkern u1="A" u2="/" k="-8" />
-<hkern u1="A" u2="-" k="33" />
-<hkern u1="A" u2="," k="-2" />
-<hkern u1="A" u2="*" k="139" />
-<hkern u1="A" u2=")" k="-8" />
-<hkern u1="A" u2="'" k="147" />
-<hkern u1="A" u2="&" k="31" />
-<hkern u1="A" u2=" " k="63" />
-<hkern u1="B" u2="ð" k="2" />
-<hkern u1="B" u2="ï" k="-6" />
-<hkern u1="B" u2="î" k="-6" />
-<hkern u1="B" u2="Æ" k="18" />
-<hkern u1="B" u2="z" k="2" />
-<hkern u1="B" u2="y" k="20" />
-<hkern u1="B" u2="x" k="27" />
-<hkern u1="B" u2="w" k="18" />
-<hkern u1="B" u2="v" k="18" />
-<hkern u1="B" u2="u" k="2" />
-<hkern u1="B" u2="t" k="18" />
-<hkern u1="B" u2="s" k="4" />
-<hkern u1="B" u2="o" k="2" />
-<hkern u1="B" u2="n" k="2" />
-<hkern u1="B" u2="f" k="20" />
-<hkern u1="B" u2="d" k="2" />
-<hkern u1="B" u2="Z" k="12" />
-<hkern u1="B" u2="Y" k="59" />
-<hkern u1="B" u2="X" k="33" />
-<hkern u1="B" u2="W" k="41" />
-<hkern u1="B" u2="V" k="41" />
-<hkern u1="B" u2="T" k="74" />
-<hkern u1="B" u2="J" k="35" />
-<hkern u1="B" u2="A" k="31" />
-<hkern u1="B" u2="7" k="27" />
-<hkern u1="B" u2="3" k="16" />
-<hkern u1="C" u2="™" k="-6" />
-<hkern u1="C" u2="ð" k="2" />
-<hkern u1="C" u2="ï" k="-16" />
-<hkern u1="C" u2="î" k="-10" />
-<hkern u1="C" u2="Æ" k="12" />
-<hkern u1="C" u2="z" k="2" />
-<hkern u1="C" u2="y" k="2" />
-<hkern u1="C" u2="w" k="2" />
-<hkern u1="C" u2="u" k="2" />
-<hkern u1="C" u2="t" k="2" />
-<hkern u1="C" u2="s" k="4" />
-<hkern u1="C" u2="o" k="2" />
-<hkern u1="C" u2="n" k="2" />
-<hkern u1="C" u2="f" k="4" />
-<hkern u1="C" u2="d" k="2" />
-<hkern u1="C" u2="Y" k="33" />
-<hkern u1="C" u2="X" k="12" />
-<hkern u1="C" u2="W" k="23" />
-<hkern u1="C" u2="V" k="23" />
-<hkern u1="C" u2="T" k="18" />
-<hkern u1="C" u2="S" k="10" />
-<hkern u1="C" u2="O" k="16" />
-<hkern u1="C" u2="A" k="20" />
-<hkern u1="C" u2="*" k="-8" />
-<hkern u1="D" u2="™" k="14" />
-<hkern u1="D" u2="‘" k="14" />
-<hkern u1="D" u2="ð" k="2" />
-<hkern u1="D" u2="Ð" k="12" />
-<hkern u1="D" u2="Æ" k="74" />
-<hkern u1="D" u2="z" k="2" />
-<hkern u1="D" u2="y" k="2" />
-<hkern u1="D" u2="x" k="20" />
-<hkern u1="D" u2="w" k="2" />
-<hkern u1="D" u2="u" k="2" />
-<hkern u1="D" u2="s" k="2" />
-<hkern u1="D" u2="n" k="10" />
-<hkern u1="D" u2="i" k="2" />
-<hkern u1="D" u2="h" k="2" />
-<hkern u1="D" u2="a" k="12" />
-<hkern u1="D" u2="\" k="27" />
-<hkern u1="D" u2="Z" k="35" />
-<hkern u1="D" u2="Y" k="80" />
-<hkern u1="D" u2="X" k="57" />
-<hkern u1="D" u2="W" k="49" />
-<hkern u1="D" u2="V" k="47" />
-<hkern u1="D" u2="T" k="74" />
-<hkern u1="D" u2="S" k="2" />
-<hkern u1="D" u2="J" k="78" />
-<hkern u1="D" u2="A" k="51" />
-<hkern u1="D" u2="4" k="16" />
-<hkern u1="D" u2="/" k="35" />
-<hkern u1="D" u2="." k="39" />
-<hkern u1="D" u2=")" k="25" />
-<hkern u1="D" u2="'" k="23" />
-<hkern u1="E" u2="‹" k="31" />
-<hkern u1="E" u2="ð" k="43" />
-<hkern u1="E" u2="ï" k="-14" />
-<hkern u1="E" u2="î" k="-10" />
-<hkern u1="E" u2="y" k="57" />
-<hkern u1="E" u2="w" k="53" />
-<hkern u1="E" u2="v" k="51" />
-<hkern u1="E" u2="u" k="29" />
-<hkern u1="E" u2="t" k="27" />
-<hkern u1="E" u2="s" k="10" />
-<hkern u1="E" u2="o" k="43" />
-<hkern u1="E" u2="n" k="8" />
-<hkern u1="E" u2="f" k="33" />
-<hkern u1="E" u2="d" k="43" />
-<hkern u1="E" u2="a" k="16" />
-<hkern u1="E" u2="S" k="27" />
-<hkern u1="E" u2="O" k="27" />
-<hkern u1="E" u2="7" k="37" />
-<hkern u1="E" u2="-" k="33" />
-<hkern u1="F" g2="uniFB04" k="51" />
-<hkern u1="F" g2="uniFB03" k="51" />
-<hkern u1="F" u2="™" k="-2" />
-<hkern u1="F" u2="›" k="41" />
-<hkern u1="F" u2="‹" k="45" />
-<hkern u1="F" u2="ð" k="94" />
-<hkern u1="F" u2="ï" k="-25" />
-<hkern u1="F" u2="î" k="-20" />
-<hkern u1="F" u2="í" k="4" />
-<hkern u1="F" u2="ì" k="-8" />
-<hkern u1="F" u2="ß" k="29" />
-<hkern u1="F" u2="Æ" k="260" />
-<hkern u1="F" u2="z" k="72" />
-<hkern u1="F" u2="y" k="55" />
-<hkern u1="F" u2="x" k="66" />
-<hkern u1="F" u2="w" k="55" />
-<hkern u1="F" u2="v" k="53" />
-<hkern u1="F" u2="u" k="55" />
-<hkern u1="F" u2="t" k="18" />
-<hkern u1="F" u2="s" k="76" />
-<hkern u1="F" u2="o" k="63" />
-<hkern u1="F" u2="n" k="66" />
-<hkern u1="F" u2="f" k="35" />
-<hkern u1="F" u2="d" k="61" />
-<hkern u1="F" u2="a" k="137" />
-<hkern u1="F" u2="S" k="53" />
-<hkern u1="F" u2="O" k="37" />
-<hkern u1="F" u2="J" k="283" />
-<hkern u1="F" u2="A" k="143" />
-<hkern u1="F" u2="@" k="16" />
-<hkern u1="F" u2=":" k="31" />
-<hkern u1="F" u2="7" k="49" />
-<hkern u1="F" u2="5" k="37" />
-<hkern u1="F" u2="4" k="96" />
-<hkern u1="F" u2="3" k="45" />
-<hkern u1="F" u2="2" k="57" />
-<hkern u1="F" u2="1" k="31" />
-<hkern u1="F" u2="/" k="117" />
-<hkern u1="F" u2="." k="166" />
-<hkern u1="F" u2="-" k="53" />
-<hkern u1="F" u2="*" k="-8" />
-<hkern u1="F" u2=")" k="-2" />
-<hkern u1="F" u2=" " k="43" />
-<hkern u1="G" u2="™" k="14" />
-<hkern u1="G" u2="ð" k="2" />
-<hkern u1="G" u2="y" k="25" />
-<hkern u1="G" u2="w" k="25" />
-<hkern u1="G" u2="v" k="25" />
-<hkern u1="G" u2="t" k="10" />
-<hkern u1="G" u2="f" k="12" />
-<hkern u1="G" u2="\" k="4" />
-<hkern u1="G" u2="Y" k="61" />
-<hkern u1="G" u2="W" k="41" />
-<hkern u1="G" u2="V" k="41" />
-<hkern u1="G" u2="T" k="51" />
-<hkern u1="G" u2="'" k="18" />
-<hkern u1="I" u2="ð" k="18" />
-<hkern u1="I" u2="ï" k="-6" />
-<hkern u1="I" u2="z" k="2" />
-<hkern u1="I" u2="y" k="2" />
-<hkern u1="I" u2="t" k="14" />
-<hkern u1="I" u2="s" k="12" />
-<hkern u1="I" u2="o" k="16" />
-<hkern u1="I" u2="f" k="14" />
-<hkern u1="I" u2="d" k="16" />
-<hkern u1="I" u2="a" k="12" />
-<hkern u1="J" u2="ð" k="23" />
-<hkern u1="J" u2="ï" k="-8" />
-<hkern u1="J" u2="î" k="-4" />
-<hkern u1="J" u2="Æ" k="39" />
-<hkern u1="J" u2="z" k="4" />
-<hkern u1="J" u2="x" k="2" />
-<hkern u1="J" u2="u" k="2" />
-<hkern u1="J" u2="t" k="10" />
-<hkern u1="J" u2="s" k="20" />
-<hkern u1="J" u2="o" k="18" />
-<hkern u1="J" u2="n" k="2" />
-<hkern u1="J" u2="l" k="2" />
-<hkern u1="J" u2="i" k="2" />
-<hkern u1="J" u2="h" k="2" />
-<hkern u1="J" u2="f" k="12" />
-<hkern u1="J" u2="d" k="18" />
-<hkern u1="J" u2="a" k="18" />
-<hkern u1="J" u2="J" k="33" />
-<hkern u1="J" u2="A" k="31" />
-<hkern u1="J" u2="/" k="6" />
-<hkern u1="J" u2="." k="23" />
-<hkern u1="K" u2="™" k="-6" />
-<hkern u1="K" u2="›" k="-2" />
-<hkern u1="K" u2="‹" k="33" />
-<hkern u1="K" u2="„" k="-8" />
-<hkern u1="K" u2="‚" k="-8" />
-<hkern u1="K" u2="ø" k="8" />
-<hkern u1="K" u2="ð" k="49" />
-<hkern u1="K" u2="ï" k="-29" />
-<hkern u1="K" u2="î" k="-6" />
-<hkern u1="K" u2="ì" k="-10" />
-<hkern u1="K" u2="Ø" k="8" />
-<hkern u1="K" u2="®" k="33" />
-<hkern u1="K" u2="©" k="33" />
-<hkern u1="K" u2="}" k="-6" />
-<hkern u1="K" u2="y" k="72" />
-<hkern u1="K" u2="w" k="72" />
-<hkern u1="K" u2="v" k="70" />
-<hkern u1="K" u2="u" k="33" />
-<hkern u1="K" u2="t" k="18" />
-<hkern u1="K" u2="o" k="57" />
-<hkern u1="K" u2="f" k="23" />
-<hkern u1="K" u2="d" k="57" />
-<hkern u1="K" u2="a" k="2" />
-<hkern u1="K" u2="]" k="-8" />
-<hkern u1="K" u2="\" k="-6" />
-<hkern u1="K" u2="S" k="16" />
-<hkern u1="K" u2="O" k="70" />
-<hkern u1="K" u2="J" k="-2" />
-<hkern u1="K" u2=";" k="-4" />
-<hkern u1="K" u2="4" k="-12" />
-<hkern u1="K" u2="2" k="-8" />
-<hkern u1="K" u2="0" k="16" />
-<hkern u1="K" u2="/" k="-12" />
-<hkern u1="K" u2="-" k="55" />
-<hkern u1="K" u2="," k="-8" />
-<hkern u1="K" u2="*" k="-8" />
-<hkern u1="K" u2=")" k="-12" />
-<hkern u1="K" u2=" " k="27" />
-<hkern u1="L" u2="™" k="233" />
-<hkern u1="L" u2="‹" k="111" />
-<hkern u1="L" u2="’" k="227" />
-<hkern u1="L" u2="‘" k="227" />
-<hkern u1="L" u2="ð" k="43" />
-<hkern u1="L" u2="Æ" k="-6" />
-<hkern u1="L" u2="º" k="229" />
-<hkern u1="L" u2="·" k="317" />
-<hkern u1="L" u2="®" k="51" />
-<hkern u1="L" u2="ª" k="227" />
-<hkern u1="L" u2="©" k="51" />
-<hkern u1="L" u2="y" k="174" />
-<hkern u1="L" u2="w" k="168" />
-<hkern u1="L" u2="v" k="160" />
-<hkern u1="L" u2="u" k="25" />
-<hkern u1="L" u2="t" k="31" />
-<hkern u1="L" u2="o" k="53" />
-<hkern u1="L" u2="f" k="20" />
-<hkern u1="L" u2="d" k="55" />
-<hkern u1="L" u2="\" k="180" />
-<hkern u1="L" u2="Y" k="248" />
-<hkern u1="L" u2="W" k="227" />
-<hkern u1="L" u2="V" k="225" />
-<hkern u1="L" u2="U" k="96" />
-<hkern u1="L" u2="T" k="242" />
-<hkern u1="L" u2="S" k="10" />
-<hkern u1="L" u2="O" k="100" />
-<hkern u1="L" u2="?" k="39" />
-<hkern u1="L" u2="7" k="23" />
-<hkern u1="L" u2="-" k="156" />
-<hkern u1="L" u2="*" k="231" />
-<hkern u1="L" u2="'" k="221" />
-<hkern u1="L" u2=" " k="53" />
-<hkern u1="O" u2="™" k="16" />
-<hkern u1="O" u2="’" k="14" />
-<hkern u1="O" u2="‘" k="16" />
-<hkern u1="O" u2="ð" k="2" />
-<hkern u1="O" u2="Ð" k="12" />
-<hkern u1="O" u2="Æ" k="80" />
-<hkern u1="O" u2="z" k="2" />
-<hkern u1="O" u2="y" k="8" />
-<hkern u1="O" u2="x" k="23" />
-<hkern u1="O" u2="w" k="2" />
-<hkern u1="O" u2="u" k="2" />
-<hkern u1="O" u2="s" k="2" />
-<hkern u1="O" u2="n" k="10" />
-<hkern u1="O" u2="i" k="10" />
-<hkern u1="O" u2="h" k="2" />
-<hkern u1="O" u2="a" k="12" />
-<hkern u1="O" u2="\" k="31" />
-<hkern u1="O" u2="Z" k="43" />
-<hkern u1="O" u2="Y" k="86" />
-<hkern u1="O" u2="X" k="57" />
-<hkern u1="O" u2="W" k="51" />
-<hkern u1="O" u2="V" k="51" />
-<hkern u1="O" u2="T" k="76" />
-<hkern u1="O" u2="S" k="2" />
-<hkern u1="O" u2="J" k="78" />
-<hkern u1="O" u2="A" k="53" />
-<hkern u1="O" u2="4" k="20" />
-<hkern u1="O" u2="/" k="39" />
-<hkern u1="O" u2="." k="45" />
-<hkern u1="O" u2="*" k="14" />
-<hkern u1="O" u2=")" k="29" />
-<hkern u1="O" u2="'" k="31" />
-<hkern u1="P" u2="‹" k="29" />
-<hkern u1="P" u2="ð" k="45" />
-<hkern u1="P" u2="ï" k="-12" />
-<hkern u1="P" u2="î" k="-6" />
-<hkern u1="P" u2="Æ" k="197" />
-<hkern u1="P" u2="y" k="-6" />
-<hkern u1="P" u2="x" k="-2" />
-<hkern u1="P" u2="w" k="-4" />
-<hkern u1="P" u2="v" k="-4" />
-<hkern u1="P" u2="s" k="14" />
-<hkern u1="P" u2="o" k="27" />
-<hkern u1="P" u2="d" k="25" />
-<hkern u1="P" u2="a" k="18" />
-<hkern u1="P" u2="Z" k="18" />
-<hkern u1="P" u2="Y" k="33" />
-<hkern u1="P" u2="X" k="35" />
-<hkern u1="P" u2="W" k="25" />
-<hkern u1="P" u2="V" k="25" />
-<hkern u1="P" u2="T" k="8" />
-<hkern u1="P" u2="J" k="205" />
-<hkern u1="P" u2="A" k="92" />
-<hkern u1="P" u2="5" k="4" />
-<hkern u1="P" u2="4" k="68" />
-<hkern u1="P" u2="/" k="106" />
-<hkern u1="P" u2="." k="160" />
-<hkern u1="P" u2="-" k="35" />
-<hkern u1="P" u2=")" k="6" />
-<hkern u1="P" u2=" " k="55" />
-<hkern u1="Q" u2="„" k="-4" />
-<hkern u1="Q" u2="‚" k="-4" />
-<hkern u1="Q" u2="Æ" k="8" />
-<hkern u1="Q" u2="}" k="-4" />
-<hkern u1="Q" u2="y" k="2" />
-<hkern u1="Q" u2="]" k="-4" />
-<hkern u1="Q" u2="X" k="6" />
-<hkern u1="Q" u2="J" k="6" />
-<hkern u1="Q" u2="A" k="4" />
-<hkern u1="Q" u2="4" k="-8" />
-<hkern u1="Q" u2="2" k="-4" />
-<hkern u1="Q" u2="/" k="-8" />
-<hkern u1="Q" u2="," k="-4" />
-<hkern u1="Q" u2=")" k="-8" />
-<hkern u1="R" u2="™" k="4" />
-<hkern u1="R" u2="‹" k="33" />
-<hkern u1="R" u2="’" k="2" />
-<hkern u1="R" u2="ð" k="51" />
-<hkern u1="R" u2="Ð" k="2" />
-<hkern u1="R" u2="y" k="4" />
-<hkern u1="R" u2="w" k="6" />
-<hkern u1="R" u2="v" k="4" />
-<hkern u1="R" u2="u" k="18" />
-<hkern u1="R" u2="t" k="6" />
-<hkern u1="R" u2="s" k="10" />
-<hkern u1="R" u2="o" k="41" />
-<hkern u1="R" u2="n" k="14" />
-<hkern u1="R" u2="l" k="12" />
-<hkern u1="R" u2="i" k="14" />
-<hkern u1="R" u2="h" k="10" />
-<hkern u1="R" u2="f" k="4" />
-<hkern u1="R" u2="d" k="39" />
-<hkern u1="R" u2="a" k="20" />
-<hkern u1="R" u2="\" k="8" />
-<hkern u1="R" u2="Y" k="51" />
-<hkern u1="R" u2="W" k="39" />
-<hkern u1="R" u2="V" k="39" />
-<hkern u1="R" u2="U" k="4" />
-<hkern u1="R" u2="T" k="35" />
-<hkern u1="R" u2="O" k="4" />
-<hkern u1="R" u2="A" k="18" />
-<hkern u1="R" u2="4" k="-4" />
-<hkern u1="R" u2="/" k="-4" />
-<hkern u1="R" u2="-" k="16" />
-<hkern u1="R" u2=")" k="-4" />
-<hkern u1="S" u2="ð" k="2" />
-<hkern u1="S" u2="ï" k="-12" />
-<hkern u1="S" u2="î" k="-8" />
-<hkern u1="S" u2="Æ" k="4" />
-<hkern u1="S" u2="ª" k="20" />
-<hkern u1="S" u2="z" k="4" />
-<hkern u1="S" u2="y" k="45" />
-<hkern u1="S" u2="x" k="18" />
-<hkern u1="S" u2="w" k="47" />
-<hkern u1="S" u2="v" k="45" />
-<hkern u1="S" u2="u" k="2" />
-<hkern u1="S" u2="t" k="20" />
-<hkern u1="S" u2="s" k="4" />
-<hkern u1="S" u2="n" k="2" />
-<hkern u1="S" u2="l" k="2" />
-<hkern u1="S" u2="i" k="2" />
-<hkern u1="S" u2="h" k="2" />
-<hkern u1="S" u2="f" k="23" />
-<hkern u1="S" u2="a" k="2" />
-<hkern u1="S" u2="Y" k="39" />
-<hkern u1="S" u2="X" k="18" />
-<hkern u1="S" u2="W" k="33" />
-<hkern u1="S" u2="V" k="33" />
-<hkern u1="S" u2="T" k="20" />
-<hkern u1="S" u2="A" k="29" />
-<hkern u1="S" u2="7" k="23" />
-<hkern u1="T" g2="uniFB04" k="96" />
-<hkern u1="T" g2="uniFB03" k="82" />
-<hkern u1="T" g2="uniFB01" k="59" />
-<hkern u1="T" u2="™" k="-2" />
-<hkern u1="T" u2="›" k="121" />
-<hkern u1="T" u2="‹" k="139" />
-<hkern u1="T" u2="ð" k="184" />
-<hkern u1="T" u2="ï" k="-25" />
-<hkern u1="T" u2="î" k="-20" />
-<hkern u1="T" u2="í" k="8" />
-<hkern u1="T" u2="ì" k="-8" />
-<hkern u1="T" u2="ã" k="190" />
-<hkern u1="T" u2="ß" k="49" />
-<hkern u1="T" u2="Æ" k="182" />
-<hkern u1="T" u2="®" k="55" />
-<hkern u1="T" u2="©" k="55" />
-<hkern u1="T" u2="z" k="176" />
-<hkern u1="T" u2="y" k="168" />
-<hkern u1="T" u2="x" k="158" />
-<hkern u1="T" u2="w" k="172" />
-<hkern u1="T" u2="v" k="172" />
-<hkern u1="T" u2="u" k="213" />
-<hkern u1="T" u2="t" k="23" />
-<hkern u1="T" u2="s" k="215" />
-<hkern u1="T" u2="o" k="223" />
-<hkern u1="T" u2="n" k="205" />
-<hkern u1="T" u2="f" k="59" />
-<hkern u1="T" u2="d" k="223" />
-<hkern u1="T" u2="a" k="213" />
-<hkern u1="T" u2="S" k="18" />
-<hkern u1="T" u2="O" k="74" />
-<hkern u1="T" u2="J" k="225" />
-<hkern u1="T" u2="A" k="150" />
-<hkern u1="T" u2="@" k="127" />
-<hkern u1="T" u2=":" k="106" />
-<hkern u1="T" u2="9" k="125" />
-<hkern u1="T" u2="8" k="16" />
-<hkern u1="T" u2="7" k="82" />
-<hkern u1="T" u2="6" k="35" />
-<hkern u1="T" u2="5" k="125" />
-<hkern u1="T" u2="4" k="139" />
-<hkern u1="T" u2="3" k="119" />
-<hkern u1="T" u2="2" k="111" />
-<hkern u1="T" u2="1" k="119" />
-<hkern u1="T" u2="0" k="121" />
-<hkern u1="T" u2="/" k="127" />
-<hkern u1="T" u2="." k="143" />
-<hkern u1="T" u2="-" k="139" />
-<hkern u1="T" u2="*" k="-27" />
-<hkern u1="T" u2=")" k="-2" />
-<hkern u1="T" u2="&" k="20" />
-<hkern u1="T" u2=" " k="53" />
-<hkern u1="U" u2="ð" k="29" />
-<hkern u1="U" u2="ï" k="-10" />
-<hkern u1="U" u2="î" k="-6" />
-<hkern u1="U" u2="Æ" k="88" />
-<hkern u1="U" u2="z" k="12" />
-<hkern u1="U" u2="x" k="2" />
-<hkern u1="U" u2="u" k="16" />
-<hkern u1="U" u2="t" k="10" />
-<hkern u1="U" u2="s" k="27" />
-<hkern u1="U" u2="o" k="23" />
-<hkern u1="U" u2="n" k="12" />
-<hkern u1="U" u2="l" k="14" />
-<hkern u1="U" u2="i" k="12" />
-<hkern u1="U" u2="h" k="12" />
-<hkern u1="U" u2="f" k="12" />
-<hkern u1="U" u2="d" k="23" />
-<hkern u1="U" u2="a" k="27" />
-<hkern u1="U" u2="J" k="61" />
-<hkern u1="U" u2="A" k="59" />
-<hkern u1="U" u2="4" k="23" />
-<hkern u1="U" u2="/" k="39" />
-<hkern u1="U" u2="." k="41" />
-<hkern u1="V" u2="™" k="-8" />
-<hkern u1="V" u2="›" k="59" />
-<hkern u1="V" u2="‹" k="92" />
-<hkern u1="V" u2="’" k="-2" />
-<hkern u1="V" u2="‘" k="-2" />
-<hkern u1="V" u2="ð" k="137" />
-<hkern u1="V" u2="ï" k="-31" />
-<hkern u1="V" u2="î" k="-16" />
-<hkern u1="V" u2="í" k="10" />
-<hkern u1="V" u2="ì" k="-14" />
-<hkern u1="V" u2="ã" k="16" />
-<hkern u1="V" u2="ß" k="45" />
-<hkern u1="V" u2="Ð" k="10" />
-<hkern u1="V" u2="Æ" k="178" />
-<hkern u1="V" u2="®" k="45" />
-<hkern u1="V" u2="©" k="45" />
-<hkern u1="V" u2="z" k="31" />
-<hkern u1="V" u2="y" k="29" />
-<hkern u1="V" u2="x" k="27" />
-<hkern u1="V" u2="w" k="31" />
-<hkern u1="V" u2="v" k="33" />
-<hkern u1="V" u2="u" k="78" />
-<hkern u1="V" u2="t" k="16" />
-<hkern u1="V" u2="s" k="102" />
-<hkern u1="V" u2="o" k="127" />
-<hkern u1="V" u2="n" k="80" />
-<hkern u1="V" u2="f" k="43" />
-<hkern u1="V" u2="d" k="127" />
-<hkern u1="V" u2="a" k="104" />
-<hkern u1="V" u2="]" k="-2" />
-<hkern u1="V" u2="\" k="-8" />
-<hkern u1="V" u2="S" k="35" />
-<hkern u1="V" u2="O" k="51" />
-<hkern u1="V" u2="J" k="176" />
-<hkern u1="V" u2="A" k="115" />
-<hkern u1="V" u2="@" k="80" />
-<hkern u1="V" u2=":" k="31" />
-<hkern u1="V" u2="9" k="61" />
-<hkern u1="V" u2="8" k="35" />
-<hkern u1="V" u2="6" k="41" />
-<hkern u1="V" u2="5" k="70" />
-<hkern u1="V" u2="4" k="133" />
-<hkern u1="V" u2="3" k="47" />
-<hkern u1="V" u2="2" k="45" />
-<hkern u1="V" u2="1" k="39" />
-<hkern u1="V" u2="0" k="68" />
-<hkern u1="V" u2="/" k="131" />
-<hkern u1="V" u2="." k="156" />
-<hkern u1="V" u2="-" k="90" />
-<hkern u1="V" u2="*" k="-12" />
-<hkern u1="V" u2=")" k="-8" />
-<hkern u1="V" u2="&" k="41" />
-<hkern u1="V" u2=" " k="72" />
-<hkern u1="W" u2="™" k="-8" />
-<hkern u1="W" u2="›" k="61" />
-<hkern u1="W" u2="‹" k="92" />
-<hkern u1="W" u2="’" k="-4" />
-<hkern u1="W" u2="‘" k="-4" />
-<hkern u1="W" u2="ð" k="139" />
-<hkern u1="W" u2="ï" k="-33" />
-<hkern u1="W" u2="î" k="-16" />
-<hkern u1="W" u2="í" k="10" />
-<hkern u1="W" u2="ì" k="-14" />
-<hkern u1="W" u2="ä" k="16" />
-<hkern u1="W" u2="ã" k="16" />
-<hkern u1="W" u2="ß" k="45" />
-<hkern u1="W" u2="Ð" k="10" />
-<hkern u1="W" u2="Æ" k="180" />
-<hkern u1="W" u2="®" k="45" />
-<hkern u1="W" u2="©" k="45" />
-<hkern u1="W" u2="}" k="-2" />
-<hkern u1="W" u2="z" k="31" />
-<hkern u1="W" u2="y" k="29" />
-<hkern u1="W" u2="x" k="27" />
-<hkern u1="W" u2="w" k="31" />
-<hkern u1="W" u2="v" k="33" />
-<hkern u1="W" u2="u" k="78" />
-<hkern u1="W" u2="t" k="16" />
-<hkern u1="W" u2="s" k="104" />
-<hkern u1="W" u2="o" k="129" />
-<hkern u1="W" u2="n" k="80" />
-<hkern u1="W" u2="f" k="45" />
-<hkern u1="W" u2="d" k="129" />
-<hkern u1="W" u2="a" k="104" />
-<hkern u1="W" u2="]" k="-2" />
-<hkern u1="W" u2="\" k="-8" />
-<hkern u1="W" u2="S" k="35" />
-<hkern u1="W" u2="O" k="51" />
-<hkern u1="W" u2="J" k="176" />
-<hkern u1="W" u2="A" k="115" />
-<hkern u1="W" u2="@" k="82" />
-<hkern u1="W" u2=":" k="31" />
-<hkern u1="W" u2="9" k="61" />
-<hkern u1="W" u2="8" k="35" />
-<hkern u1="W" u2="6" k="41" />
-<hkern u1="W" u2="5" k="72" />
-<hkern u1="W" u2="4" k="135" />
-<hkern u1="W" u2="3" k="47" />
-<hkern u1="W" u2="2" k="45" />
-<hkern u1="W" u2="1" k="39" />
-<hkern u1="W" u2="0" k="68" />
-<hkern u1="W" u2="/" k="133" />
-<hkern u1="W" u2="." k="156" />
-<hkern u1="W" u2="-" k="92" />
-<hkern u1="W" u2="*" k="-12" />
-<hkern u1="W" u2=")" k="-8" />
-<hkern u1="W" u2="&" k="41" />
-<hkern u1="W" u2=" " k="72" />
-<hkern u1="X" u2="™" k="-18" />
-<hkern u1="X" u2="‹" k="37" />
-<hkern u1="X" u2="’" k="-4" />
-<hkern u1="X" u2="‘" k="-4" />
-<hkern u1="X" u2="ø" k="12" />
-<hkern u1="X" u2="ð" k="66" />
-<hkern u1="X" u2="ï" k="-33" />
-<hkern u1="X" u2="î" k="-10" />
-<hkern u1="X" u2="í" k="4" />
-<hkern u1="X" u2="ì" k="-14" />
-<hkern u1="X" u2="ß" k="4" />
-<hkern u1="X" u2="Ø" k="8" />
-<hkern u1="X" u2="®" k="31" />
-<hkern u1="X" u2="©" k="31" />
-<hkern u1="X" u2="}" k="-2" />
-<hkern u1="X" u2="y" k="59" />
-<hkern u1="X" u2="w" k="61" />
-<hkern u1="X" u2="v" k="61" />
-<hkern u1="X" u2="u" k="43" />
-<hkern u1="X" u2="t" k="8" />
-<hkern u1="X" u2="o" k="72" />
-<hkern u1="X" u2="n" k="12" />
-<hkern u1="X" u2="f" k="23" />
-<hkern u1="X" u2="d" k="70" />
-<hkern u1="X" u2="a" k="6" />
-<hkern u1="X" u2="]" k="-4" />
-<hkern u1="X" u2="\" k="-8" />
-<hkern u1="X" u2="S" k="16" />
-<hkern u1="X" u2="O" k="57" />
-<hkern u1="X" u2="4" k="-6" />
-<hkern u1="X" u2="2" k="-2" />
-<hkern u1="X" u2="0" k="25" />
-<hkern u1="X" u2="/" k="-6" />
-<hkern u1="X" u2="-" k="59" />
-<hkern u1="X" u2="*" k="-12" />
-<hkern u1="X" u2=")" k="-10" />
-<hkern u1="X" u2=" " k="20" />
-<hkern u1="Y" u2="™" k="-10" />
-<hkern u1="Y" u2="›" k="98" />
-<hkern u1="Y" u2="‹" k="139" />
-<hkern u1="Y" u2="’" k="-6" />
-<hkern u1="Y" u2="‘" k="-4" />
-<hkern u1="Y" u2="ö" k="25" />
-<hkern u1="Y" u2="ð" k="184" />
-<hkern u1="Y" u2="ï" k="-33" />
-<hkern u1="Y" u2="î" k="-14" />
-<hkern u1="Y" u2="í" k="12" />
-<hkern u1="Y" u2="ì" k="-16" />
-<hkern u1="Y" u2="ë" k="25" />
-<hkern u1="Y" u2="ä" k="16" />
-<hkern u1="Y" u2="ã" k="18" />
-<hkern u1="Y" u2="ß" k="68" />
-<hkern u1="Y" u2="Ð" k="12" />
-<hkern u1="Y" u2="Æ" k="217" />
-<hkern u1="Y" u2="®" k="72" />
-<hkern u1="Y" u2="©" k="72" />
-<hkern u1="Y" u2="}" k="-4" />
-<hkern u1="Y" u2="z" k="76" />
-<hkern u1="Y" u2="y" k="80" />
-<hkern u1="Y" u2="x" k="74" />
-<hkern u1="Y" u2="w" k="84" />
-<hkern u1="Y" u2="v" k="86" />
-<hkern u1="Y" u2="u" k="129" />
-<hkern u1="Y" u2="t" k="31" />
-<hkern u1="Y" u2="s" k="180" />
-<hkern u1="Y" u2="o" k="180" />
-<hkern u1="Y" u2="n" k="137" />
-<hkern u1="Y" u2="f" k="70" />
-<hkern u1="Y" u2="d" k="176" />
-<hkern u1="Y" u2="a" k="176" />
-<hkern u1="Y" u2="]" k="-4" />
-<hkern u1="Y" u2="\" k="-8" />
-<hkern u1="Y" u2="S" k="43" />
-<hkern u1="Y" u2="O" k="84" />
-<hkern u1="Y" u2="J" k="195" />
-<hkern u1="Y" u2="A" k="152" />
-<hkern u1="Y" u2="@" k="119" />
-<hkern u1="Y" u2=":" k="55" />
-<hkern u1="Y" u2="9" k="96" />
-<hkern u1="Y" u2="8" k="47" />
-<hkern u1="Y" u2="6" k="59" />
-<hkern u1="Y" u2="5" k="92" />
-<hkern u1="Y" u2="4" k="158" />
-<hkern u1="Y" u2="3" k="76" />
-<hkern u1="Y" u2="2" k="74" />
-<hkern u1="Y" u2="1" k="74" />
-<hkern u1="Y" u2="0" k="100" />
-<hkern u1="Y" u2="/" k="141" />
-<hkern u1="Y" u2="." k="168" />
-<hkern u1="Y" u2="-" k="145" />
-<hkern u1="Y" u2="*" k="-12" />
-<hkern u1="Y" u2=")" k="-10" />
-<hkern u1="Y" u2="&" k="53" />
-<hkern u1="Y" u2=" " k="78" />
-<hkern u1="Z" u2="‹" k="23" />
-<hkern u1="Z" u2="ð" k="33" />
-<hkern u1="Z" u2="ï" k="-14" />
-<hkern u1="Z" u2="î" k="-10" />
-<hkern u1="Z" u2="®" k="29" />
-<hkern u1="Z" u2="©" k="29" />
-<hkern u1="Z" u2="y" k="47" />
-<hkern u1="Z" u2="w" k="47" />
-<hkern u1="Z" u2="v" k="49" />
-<hkern u1="Z" u2="u" k="33" />
-<hkern u1="Z" u2="t" k="16" />
-<hkern u1="Z" u2="s" k="2" />
-<hkern u1="Z" u2="o" k="39" />
-<hkern u1="Z" u2="n" k="16" />
-<hkern u1="Z" u2="f" k="25" />
-<hkern u1="Z" u2="d" k="39" />
-<hkern u1="Z" u2="a" k="10" />
-<hkern u1="Z" u2="O" k="41" />
-<hkern u1="Z" u2="0" k="16" />
-<hkern u1="Z" u2="-" k="35" />
-<hkern u1="[" u2="ï" k="-16" />
-<hkern u1="[" u2="î" k="-10" />
-<hkern u1="[" u2="Æ" k="-8" />
-<hkern u1="[" u2="j" k="-14" />
-<hkern u1="[" u2="Y" k="-4" />
-<hkern u1="[" u2="X" k="-4" />
-<hkern u1="[" u2="W" k="-2" />
-<hkern u1="[" u2="V" k="-2" />
-<hkern u1="[" u2="A" k="-2" />
-<hkern u1="\" u2="’" k="174" />
-<hkern u1="\" u2="Ø" k="-4" />
-<hkern u1="\" u2="Æ" k="-12" />
-<hkern u1="\" u2="y" k="72" />
-<hkern u1="\" u2="x" k="-4" />
-<hkern u1="\" u2="w" k="72" />
-<hkern u1="\" u2="v" k="68" />
-<hkern u1="\" u2="t" k="4" />
-<hkern u1="\" u2="Y" k="139" />
-<hkern u1="\" u2="X" k="-6" />
-<hkern u1="\" u2="W" k="129" />
-<hkern u1="\" u2="V" k="127" />
-<hkern u1="\" u2="U" k="35" />
-<hkern u1="\" u2="T" k="127" />
-<hkern u1="\" u2="O" k="37" />
-<hkern u1="\" u2="J" k="-2" />
-<hkern u1="\" u2="A" k="-6" />
-<hkern u1="\" u2="7" k="33" />
-<hkern u1="\" u2="6" k="4" />
-<hkern u1="\" u2="0" k="4" />
-<hkern u1="\" u2="'" k="180" />
-<hkern u1="a" u2="™" k="55" />
-<hkern u1="a" u2="’" k="43" />
-<hkern u1="a" u2="‘" k="47" />
-<hkern u1="a" u2="Ð" k="16" />
-<hkern u1="a" u2="º" k="20" />
-<hkern u1="a" u2="ª" k="4" />
-<hkern u1="a" u2="y" k="35" />
-<hkern u1="a" u2="w" k="37" />
-<hkern u1="a" u2="v" k="35" />
-<hkern u1="a" u2="t" k="14" />
-<hkern u1="a" u2="f" k="2" />
-<hkern u1="a" u2="\" k="78" />
-<hkern u1="a" u2="Z" k="8" />
-<hkern u1="a" u2="Y" k="174" />
-<hkern u1="a" u2="W" k="113" />
-<hkern u1="a" u2="V" k="113" />
-<hkern u1="a" u2="U" k="20" />
-<hkern u1="a" u2="T" k="227" />
-<hkern u1="a" u2="S" k="8" />
-<hkern u1="a" u2="O" k="14" />
-<hkern u1="a" u2="I" k="2" />
-<hkern u1="a" u2="?" k="29" />
-<hkern u1="a" u2="*" k="53" />
-<hkern u1="a" u2="'" k="35" />
-<hkern u1="b" u2="™" k="70" />
-<hkern u1="b" u2="’" k="127" />
-<hkern u1="b" u2="‘" k="133" />
-<hkern u1="b" u2="Ð" k="25" />
-<hkern u1="b" u2="Æ" k="43" />
-<hkern u1="b" u2="º" k="31" />
-<hkern u1="b" u2="ª" k="14" />
-<hkern u1="b" u2="z" k="27" />
-<hkern u1="b" u2="y" k="37" />
-<hkern u1="b" u2="x" k="39" />
-<hkern u1="b" u2="w" k="39" />
-<hkern u1="b" u2="v" k="37" />
-<hkern u1="b" u2="t" k="14" />
-<hkern u1="b" u2="s" k="2" />
-<hkern u1="b" u2="f" k="6" />
-<hkern u1="b" u2="\" k="76" />
-<hkern u1="b" u2="Z" k="45" />
-<hkern u1="b" u2="Y" k="176" />
-<hkern u1="b" u2="X" k="72" />
-<hkern u1="b" u2="W" k="129" />
-<hkern u1="b" u2="V" k="127" />
-<hkern u1="b" u2="U" k="23" />
-<hkern u1="b" u2="T" k="223" />
-<hkern u1="b" u2="S" k="16" />
-<hkern u1="b" u2="J" k="49" />
-<hkern u1="b" u2="I" k="16" />
-<hkern u1="b" u2="A" k="35" />
-<hkern u1="b" u2="?" k="33" />
-<hkern u1="b" u2="." k="14" />
-<hkern u1="b" u2="*" k="96" />
-<hkern u1="b" u2=")" k="35" />
-<hkern u1="b" u2="'" k="164" />
-<hkern u1="c" u2="™" k="41" />
-<hkern u1="c" u2="‹" k="29" />
-<hkern u1="c" u2="’" k="33" />
-<hkern u1="c" u2="‘" k="35" />
-<hkern u1="c" u2="ð" k="14" />
-<hkern u1="c" u2="Ð" k="14" />
-<hkern u1="c" u2="Æ" k="2" />
-<hkern u1="c" u2="y" k="20" />
-<hkern u1="c" u2="x" k="8" />
-<hkern u1="c" u2="w" k="18" />
-<hkern u1="c" u2="v" k="16" />
-<hkern u1="c" u2="s" k="10" />
-<hkern u1="c" u2="o" k="12" />
-<hkern u1="c" u2="d" k="12" />
-<hkern u1="c" u2="\" k="55" />
-<hkern u1="c" u2="Z" k="2" />
-<hkern u1="c" u2="Y" k="160" />
-<hkern u1="c" u2="X" k="4" />
-<hkern u1="c" u2="W" k="113" />
-<hkern u1="c" u2="V" k="113" />
-<hkern u1="c" u2="U" k="16" />
-<hkern u1="c" u2="T" k="205" />
-<hkern u1="c" u2="S" k="16" />
-<hkern u1="c" u2="O" k="10" />
-<hkern u1="c" u2="A" k="10" />
-<hkern u1="c" u2="?" k="16" />
-<hkern u1="c" u2="-" k="39" />
-<hkern u1="c" u2="*" k="39" />
-<hkern u1="c" u2="'" k="20" />
-<hkern u1="d" u2="Ð" k="2" />
-<hkern u1="d" u2="y" k="2" />
-<hkern u1="d" u2="w" k="4" />
-<hkern u1="d" u2="v" k="2" />
-<hkern u1="d" u2="t" k="2" />
-<hkern u1="d" u2="Y" k="6" />
-<hkern u1="d" u2="W" k="4" />
-<hkern u1="d" u2="V" k="4" />
-<hkern u1="d" u2="U" k="16" />
-<hkern u1="d" u2="T" k="6" />
-<hkern u1="d" u2="O" k="12" />
-<hkern u1="e" u2="™" k="55" />
-<hkern u1="e" u2="’" k="51" />
-<hkern u1="e" u2="‘" k="55" />
-<hkern u1="e" u2="Ð" k="23" />
-<hkern u1="e" u2="Æ" k="37" />
-<hkern u1="e" u2="º" k="14" />
-<hkern u1="e" u2="z" k="18" />
-<hkern u1="e" u2="y" k="33" />
-<hkern u1="e" u2="x" k="41" />
-<hkern u1="e" u2="w" k="33" />
-<hkern u1="e" u2="v" k="31" />
-<hkern u1="e" u2="t" k="10" />
-<hkern u1="e" u2="\" k="72" />
-<hkern u1="e" u2="Z" k="35" />
-<hkern u1="e" u2="Y" k="209" />
-<hkern u1="e" u2="X" k="41" />
-<hkern u1="e" u2="W" k="119" />
-<hkern u1="e" u2="V" k="119" />
-<hkern u1="e" u2="U" k="14" />
-<hkern u1="e" u2="T" k="217" />
-<hkern u1="e" u2="S" k="12" />
-<hkern u1="e" u2="J" k="37" />
-<hkern u1="e" u2="I" k="12" />
-<hkern u1="e" u2="A" k="27" />
-<hkern u1="e" u2="?" k="31" />
-<hkern u1="e" u2="*" k="59" />
-<hkern u1="e" u2=")" k="29" />
-<hkern u1="e" u2="'" k="43" />
-<hkern u1="f" u2="™" k="-47" />
-<hkern u1="f" u2="‹" k="55" />
-<hkern u1="f" u2="’" k="-4" />
-<hkern u1="f" u2="‘" k="-4" />
-<hkern u1="f" u2="ð" k="51" />
-<hkern u1="f" u2="ï" k="-68" />
-<hkern u1="f" u2="î" k="-23" />
-<hkern u1="f" u2="ì" k="-29" />
-<hkern u1="f" u2="Æ" k="94" />
-<hkern u1="f" u2="}" k="-18" />
-<hkern u1="f" u2="z" k="8" />
-<hkern u1="f" u2="o" k="16" />
-<hkern u1="f" u2="d" k="14" />
-<hkern u1="f" u2="a" k="16" />
-<hkern u1="f" u2="]" k="-20" />
-<hkern u1="f" u2="\" k="-43" />
-<hkern u1="f" u2="Z" k="-20" />
-<hkern u1="f" u2="Y" k="-70" />
-<hkern u1="f" u2="X" k="-78" />
-<hkern u1="f" u2="W" k="-59" />
-<hkern u1="f" u2="V" k="-59" />
-<hkern u1="f" u2="T" k="-51" />
-<hkern u1="f" u2="S" k="2" />
-<hkern u1="f" u2="J" k="123" />
-<hkern u1="f" u2="A" k="80" />
-<hkern u1="f" u2="/" k="57" />
-<hkern u1="f" u2="." k="70" />
-<hkern u1="f" u2="-" k="66" />
-<hkern u1="f" u2="*" k="-23" />
-<hkern u1="f" u2=")" k="-41" />
-<hkern u1="f" u2=" " k="33" />
-<hkern u1="g" u2="j" k="-80" />
-<hkern u1="g" u2="Z" k="14" />
-<hkern u1="g" u2="Y" k="137" />
-<hkern u1="g" u2="X" k="12" />
-<hkern u1="g" u2="W" k="82" />
-<hkern u1="g" u2="V" k="80" />
-<hkern u1="g" u2="U" k="12" />
-<hkern u1="g" u2="T" k="207" />
-<hkern u1="g" u2="S" k="2" />
-<hkern u1="g" u2="O" k="10" />
-<hkern u1="h" u2="™" k="59" />
-<hkern u1="h" u2="’" k="100" />
-<hkern u1="h" u2="‘" k="104" />
-<hkern u1="h" u2="º" k="18" />
-<hkern u1="h" u2="y" k="25" />
-<hkern u1="h" u2="w" k="25" />
-<hkern u1="h" u2="v" k="25" />
-<hkern u1="h" u2="t" k="8" />
-<hkern u1="h" u2="\" k="68" />
-<hkern u1="h" u2="Z" k="14" />
-<hkern u1="h" u2="Y" k="162" />
-<hkern u1="h" u2="X" k="4" />
-<hkern u1="h" u2="W" k="109" />
-<hkern u1="h" u2="V" k="109" />
-<hkern u1="h" u2="U" k="16" />
-<hkern u1="h" u2="T" k="225" />
-<hkern u1="h" u2="S" k="10" />
-<hkern u1="h" u2="O" k="10" />
-<hkern u1="h" u2="?" k="29" />
-<hkern u1="h" u2="*" k="74" />
-<hkern u1="h" u2="'" k="154" />
-<hkern u1="i" u2="ï" k="-10" />
-<hkern u1="i" u2="î" k="-6" />
-<hkern u1="i" u2="Z" k="12" />
-<hkern u1="i" u2="U" k="12" />
-<hkern u1="i" u2="S" k="2" />
-<hkern u1="i" u2="O" k="2" />
-<hkern u1="j" u2="j" k="-61" />
-<hkern u1="k" u2="‹" k="63" />
-<hkern u1="k" u2="„" k="-4" />
-<hkern u1="k" u2="‚" k="-4" />
-<hkern u1="k" u2="’" k="20" />
-<hkern u1="k" u2="‘" k="29" />
-<hkern u1="k" u2="ø" k="8" />
-<hkern u1="k" u2="ð" k="59" />
-<hkern u1="k" u2="}" k="-2" />
-<hkern u1="k" u2="s" k="10" />
-<hkern u1="k" u2="o" k="49" />
-<hkern u1="k" u2="f" k="2" />
-<hkern u1="k" u2="d" k="49" />
-<hkern u1="k" u2="a" k="16" />
-<hkern u1="k" u2="]" k="-2" />
-<hkern u1="k" u2="Y" k="78" />
-<hkern u1="k" u2="W" k="29" />
-<hkern u1="k" u2="V" k="29" />
-<hkern u1="k" u2="U" k="2" />
-<hkern u1="k" u2="T" k="162" />
-<hkern u1="k" u2="O" k="27" />
-<hkern u1="k" u2="/" k="-8" />
-<hkern u1="k" u2="-" k="74" />
-<hkern u1="k" u2="," k="-4" />
-<hkern u1="k" u2="*" k="-8" />
-<hkern u1="k" u2=")" k="-8" />
-<hkern u1="k" u2="'" k="98" />
-<hkern u1="l" u2="™" k="37" />
-<hkern u1="l" u2="‹" k="37" />
-<hkern u1="l" u2="’" k="37" />
-<hkern u1="l" u2="‘" k="37" />
-<hkern u1="l" u2="ð" k="2" />
-<hkern u1="l" u2="Æ" k="-2" />
-<hkern u1="l" u2="º" k="35" />
-<hkern u1="l" u2="·" k="150" />
-<hkern u1="l" u2="®" k="16" />
-<hkern u1="l" u2="ª" k="35" />
-<hkern u1="l" u2="©" k="16" />
-<hkern u1="l" u2="y" k="27" />
-<hkern u1="l" u2="w" k="33" />
-<hkern u1="l" u2="v" k="29" />
-<hkern u1="l" u2="t" k="8" />
-<hkern u1="l" u2="o" k="2" />
-<hkern u1="l" u2="f" k="6" />
-<hkern u1="l" u2="d" k="2" />
-<hkern u1="l" u2="\" k="25" />
-<hkern u1="l" u2="Y" k="43" />
-<hkern u1="l" u2="W" k="41" />
-<hkern u1="l" u2="V" k="41" />
-<hkern u1="l" u2="U" k="29" />
-<hkern u1="l" u2="T" k="41" />
-<hkern u1="l" u2="O" k="27" />
-<hkern u1="l" u2="I" k="2" />
-<hkern u1="l" u2="/" k="-27" />
-<hkern u1="l" u2="-" k="35" />
-<hkern u1="l" u2="*" k="39" />
-<hkern u1="l" u2=")" k="-12" />
-<hkern u1="l" u2="'" k="35" />
-<hkern u1="l" u2=" " k="59" />
-<hkern u1="n" u2="™" k="45" />
-<hkern u1="n" u2="’" k="29" />
-<hkern u1="n" u2="‘" k="31" />
-<hkern u1="n" u2="y" k="20" />
-<hkern u1="n" u2="w" k="23" />
-<hkern u1="n" u2="v" k="20" />
-<hkern u1="n" u2="t" k="8" />
-<hkern u1="n" u2="\" k="63" />
-<hkern u1="n" u2="Z" k="14" />
-<hkern u1="n" u2="Y" k="156" />
-<hkern u1="n" u2="X" k="4" />
-<hkern u1="n" u2="W" k="109" />
-<hkern u1="n" u2="V" k="109" />
-<hkern u1="n" u2="U" k="16" />
-<hkern u1="n" u2="T" k="223" />
-<hkern u1="n" u2="S" k="10" />
-<hkern u1="n" u2="O" k="10" />
-<hkern u1="n" u2="?" k="23" />
-<hkern u1="n" u2="*" k="39" />
-<hkern u1="n" u2="'" k="18" />
-<hkern u1="o" u2="™" k="59" />
-<hkern u1="o" u2="’" k="57" />
-<hkern u1="o" u2="‘" k="61" />
-<hkern u1="o" u2="Ð" k="25" />
-<hkern u1="o" u2="Æ" k="43" />
-<hkern u1="o" u2="º" k="18" />
-<hkern u1="o" u2="z" k="29" />
-<hkern u1="o" u2="y" k="39" />
-<hkern u1="o" u2="x" k="39" />
-<hkern u1="o" u2="w" k="39" />
-<hkern u1="o" u2="v" k="37" />
-<hkern u1="o" u2="t" k="16" />
-<hkern u1="o" u2="s" k="2" />
-<hkern u1="o" u2="f" k="8" />
-<hkern u1="o" u2="\" k="74" />
-<hkern u1="o" u2="Z" k="43" />
-<hkern u1="o" u2="Y" k="180" />
-<hkern u1="o" u2="X" k="72" />
-<hkern u1="o" u2="W" k="129" />
-<hkern u1="o" u2="V" k="129" />
-<hkern u1="o" u2="U" k="23" />
-<hkern u1="o" u2="T" k="225" />
-<hkern u1="o" u2="S" k="16" />
-<hkern u1="o" u2="J" k="47" />
-<hkern u1="o" u2="I" k="16" />
-<hkern u1="o" u2="A" k="35" />
-<hkern u1="o" u2="?" k="31" />
-<hkern u1="o" u2="*" k="66" />
-<hkern u1="o" u2=")" k="35" />
-<hkern u1="o" u2="'" k="47" />
-<hkern u1="q" u2="„" k="-6" />
-<hkern u1="q" u2="‚" k="-6" />
-<hkern u1="q" u2="j" k="-178" />
-<hkern u1="q" u2="Z" k="14" />
-<hkern u1="q" u2="Y" k="137" />
-<hkern u1="q" u2="X" k="12" />
-<hkern u1="q" u2="W" k="82" />
-<hkern u1="q" u2="V" k="80" />
-<hkern u1="q" u2="U" k="12" />
-<hkern u1="q" u2="T" k="207" />
-<hkern u1="q" u2="S" k="2" />
-<hkern u1="q" u2="O" k="10" />
-<hkern u1="q" u2=";" k="-2" />
-<hkern u1="q" u2="," k="-6" />
-<hkern u1="r" u2="›" k="33" />
-<hkern u1="r" u2="‹" k="90" />
-<hkern u1="r" u2="ð" k="78" />
-<hkern u1="r" u2="Æ" k="109" />
-<hkern u1="r" u2="s" k="12" />
-<hkern u1="r" u2="o" k="55" />
-<hkern u1="r" u2="d" k="53" />
-<hkern u1="r" u2="a" k="20" />
-<hkern u1="r" u2="Z" k="55" />
-<hkern u1="r" u2="Y" k="59" />
-<hkern u1="r" u2="X" k="57" />
-<hkern u1="r" u2="W" k="18" />
-<hkern u1="r" u2="V" k="16" />
-<hkern u1="r" u2="T" k="147" />
-<hkern u1="r" u2="S" k="2" />
-<hkern u1="r" u2="J" k="170" />
-<hkern u1="r" u2="I" k="2" />
-<hkern u1="r" u2="A" k="92" />
-<hkern u1="r" u2="@" k="29" />
-<hkern u1="r" u2="/" k="78" />
-<hkern u1="r" u2="." k="98" />
-<hkern u1="r" u2="-" k="88" />
-<hkern u1="r" u2=")" k="6" />
-<hkern u1="r" u2=" " k="45" />
-<hkern u1="s" u2="™" k="33" />
-<hkern u1="s" u2="’" k="14" />
-<hkern u1="s" u2="‘" k="14" />
-<hkern u1="s" u2="Ð" k="20" />
-<hkern u1="s" u2="y" k="27" />
-<hkern u1="s" u2="x" k="12" />
-<hkern u1="s" u2="w" k="25" />
-<hkern u1="s" u2="v" k="20" />
-<hkern u1="s" u2="t" k="2" />
-<hkern u1="s" u2="f" k="2" />
-<hkern u1="s" u2="\" k="51" />
-<hkern u1="s" u2="Z" k="8" />
-<hkern u1="s" u2="Y" k="150" />
-<hkern u1="s" u2="X" k="4" />
-<hkern u1="s" u2="W" k="94" />
-<hkern u1="s" u2="V" k="92" />
-<hkern u1="s" u2="U" k="23" />
-<hkern u1="s" u2="T" k="205" />
-<hkern u1="s" u2="O" k="2" />
-<hkern u1="s" u2="I" k="12" />
-<hkern u1="s" u2="A" k="18" />
-<hkern u1="s" u2="-" k="18" />
-<hkern u1="s" u2="*" k="20" />
-<hkern u1="t" u2="™" k="6" />
-<hkern u1="t" u2="‹" k="47" />
-<hkern u1="t" u2="’" k="14" />
-<hkern u1="t" u2="‘" k="16" />
-<hkern u1="t" u2="ð" k="27" />
-<hkern u1="t" u2="y" k="2" />
-<hkern u1="t" u2="w" k="2" />
-<hkern u1="t" u2="v" k="2" />
-<hkern u1="t" u2="t" k="2" />
-<hkern u1="t" u2="o" k="25" />
-<hkern u1="t" u2="f" k="2" />
-<hkern u1="t" u2="d" k="25" />
-<hkern u1="t" u2="\" k="27" />
-<hkern u1="t" u2="Y" k="94" />
-<hkern u1="t" u2="W" k="53" />
-<hkern u1="t" u2="V" k="51" />
-<hkern u1="t" u2="U" k="20" />
-<hkern u1="t" u2="T" k="113" />
-<hkern u1="t" u2="O" k="18" />
-<hkern u1="t" u2="I" k="2" />
-<hkern u1="t" u2="-" k="33" />
-<hkern u1="t" u2="'" k="35" />
-<hkern u1="u" u2="™" k="29" />
-<hkern u1="u" u2="’" k="4" />
-<hkern u1="u" u2="‘" k="4" />
-<hkern u1="u" u2="Ð" k="2" />
-<hkern u1="u" u2="y" k="2" />
-<hkern u1="u" u2="w" k="4" />
-<hkern u1="u" u2="v" k="2" />
-<hkern u1="u" u2="t" k="2" />
-<hkern u1="u" u2="\" k="49" />
-<hkern u1="u" u2="Z" k="8" />
-<hkern u1="u" u2="Y" k="143" />
-<hkern u1="u" u2="W" k="82" />
-<hkern u1="u" u2="V" k="80" />
-<hkern u1="u" u2="U" k="14" />
-<hkern u1="u" u2="T" k="215" />
-<hkern u1="u" u2="O" k="12" />
-<hkern u1="u" u2="*" k="4" />
-<hkern u1="v" u2="‹" k="53" />
-<hkern u1="v" u2="ð" k="55" />
-<hkern u1="v" u2="Ð" k="20" />
-<hkern u1="v" u2="Æ" k="104" />
-<hkern u1="v" u2="º" k="-2" />
-<hkern u1="v" u2="s" k="27" />
-<hkern u1="v" u2="o" k="37" />
-<hkern u1="v" u2="d" k="35" />
-<hkern u1="v" u2="a" k="29" />
-<hkern u1="v" u2="\" k="27" />
-<hkern u1="v" u2="Z" k="51" />
-<hkern u1="v" u2="Y" k="88" />
-<hkern u1="v" u2="X" k="61" />
-<hkern u1="v" u2="W" k="33" />
-<hkern u1="v" u2="V" k="33" />
-<hkern u1="v" u2="T" k="172" />
-<hkern u1="v" u2="J" k="162" />
-<hkern u1="v" u2="A" k="68" />
-<hkern u1="v" u2="@" k="16" />
-<hkern u1="v" u2="/" k="70" />
-<hkern u1="v" u2="." k="100" />
-<hkern u1="v" u2="-" k="47" />
-<hkern u1="v" u2="*" k="-8" />
-<hkern u1="v" u2=")" k="29" />
-<hkern u1="v" u2=" " k="57" />
-<hkern u1="w" u2="‹" k="57" />
-<hkern u1="w" u2="ð" k="57" />
-<hkern u1="w" u2="Ð" k="20" />
-<hkern u1="w" u2="Æ" k="106" />
-<hkern u1="w" u2="º" k="-2" />
-<hkern u1="w" u2="s" k="29" />
-<hkern u1="w" u2="o" k="39" />
-<hkern u1="w" u2="d" k="39" />
-<hkern u1="w" u2="a" k="29" />
-<hkern u1="w" u2="\" k="29" />
-<hkern u1="w" u2="Z" k="51" />
-<hkern u1="w" u2="Y" k="86" />
-<hkern u1="w" u2="X" k="61" />
-<hkern u1="w" u2="W" k="31" />
-<hkern u1="w" u2="V" k="31" />
-<hkern u1="w" u2="T" k="172" />
-<hkern u1="w" u2="S" k="2" />
-<hkern u1="w" u2="O" k="2" />
-<hkern u1="w" u2="J" k="168" />
-<hkern u1="w" u2="A" k="70" />
-<hkern u1="w" u2="@" k="16" />
-<hkern u1="w" u2="/" k="74" />
-<hkern u1="w" u2="." k="102" />
-<hkern u1="w" u2="-" k="51" />
-<hkern u1="w" u2="*" k="-8" />
-<hkern u1="w" u2=")" k="31" />
-<hkern u1="w" u2=" " k="57" />
-<hkern u1="x" u2="‹" k="61" />
-<hkern u1="x" u2="ð" k="49" />
-<hkern u1="x" u2="s" k="10" />
-<hkern u1="x" u2="o" k="39" />
-<hkern u1="x" u2="f" k="2" />
-<hkern u1="x" u2="d" k="39" />
-<hkern u1="x" u2="a" k="18" />
-<hkern u1="x" u2="Y" k="74" />
-<hkern u1="x" u2="W" k="27" />
-<hkern u1="x" u2="V" k="27" />
-<hkern u1="x" u2="U" k="2" />
-<hkern u1="x" u2="T" k="158" />
-<hkern u1="x" u2="O" k="23" />
-<hkern u1="x" u2="/" k="-4" />
-<hkern u1="x" u2="-" k="68" />
-<hkern u1="x" u2="*" k="-8" />
-<hkern u1="x" u2=")" k="-6" />
-<hkern u1="y" u2="‹" k="57" />
-<hkern u1="y" u2="ð" k="59" />
-<hkern u1="y" u2="Ð" k="23" />
-<hkern u1="y" u2="Æ" k="106" />
-<hkern u1="y" u2="s" k="29" />
-<hkern u1="y" u2="o" k="41" />
-<hkern u1="y" u2="d" k="41" />
-<hkern u1="y" u2="a" k="29" />
-<hkern u1="y" u2="\" k="31" />
-<hkern u1="y" u2="Z" k="57" />
-<hkern u1="y" u2="Y" k="92" />
-<hkern u1="y" u2="X" k="68" />
-<hkern u1="y" u2="W" k="39" />
-<hkern u1="y" u2="V" k="39" />
-<hkern u1="y" u2="T" k="176" />
-<hkern u1="y" u2="S" k="2" />
-<hkern u1="y" u2="J" k="162" />
-<hkern u1="y" u2="I" k="8" />
-<hkern u1="y" u2="A" k="72" />
-<hkern u1="y" u2="@" k="20" />
-<hkern u1="y" u2="/" k="70" />
-<hkern u1="y" u2="." k="102" />
-<hkern u1="y" u2="-" k="49" />
-<hkern u1="y" u2=")" k="31" />
-<hkern u1="y" u2="&" k="16" />
-<hkern u1="y" u2=" " k="55" />
-<hkern u1="z" u2="‹" k="53" />
-<hkern u1="z" u2="ð" k="37" />
-<hkern u1="z" u2="Ð" k="14" />
-<hkern u1="z" u2="o" k="27" />
-<hkern u1="z" u2="d" k="27" />
-<hkern u1="z" u2="\" k="8" />
-<hkern u1="z" u2="Y" k="92" />
-<hkern u1="z" u2="W" k="43" />
-<hkern u1="z" u2="V" k="43" />
-<hkern u1="z" u2="U" k="14" />
-<hkern u1="z" u2="T" k="174" />
-<hkern u1="z" u2="O" k="2" />
-<hkern u1="z" u2="I" k="2" />
-<hkern u1="z" u2="-" k="63" />
-<hkern u1="{" u2="ï" k="-16" />
-<hkern u1="{" u2="î" k="-10" />
-<hkern u1="{" u2="Æ" k="-8" />
-<hkern u1="{" u2="j" k="-12" />
-<hkern u1="{" u2="Y" k="-4" />
-<hkern u1="{" u2="X" k="-2" />
-<hkern u1="{" u2="W" k="-2" />
-<hkern u1="|" u2="ï" k="-8" />
-<hkern u1="|" u2="î" k="-2" />
-<hkern u1="|" u2="Ï" k="-4" />
-<hkern u1="|" u2="j" k="-125" />
-<hkern u1="¡" u2="ï" k="-4" />
-<hkern u1="°" u2="9" k="55" />
-<hkern u1="°" u2="5" k="39" />
-<hkern u1="°" u2="4" k="178" />
-<hkern u1="°" u2="3" k="37" />
-<hkern u1="°" u2="1" k="29" />
-<hkern u1="°" u2="0" k="43" />
-<hkern u1="·" u2="l" k="80" />
-<hkern u1="·" u2="7" k="63" />
-<hkern u1="·" u2="4" k="45" />
-<hkern u1="·" u2="3" k="72" />
-<hkern u1="·" u2="2" k="27" />
-<hkern u1="·" u2="1" k="45" />
-<hkern u1="¿" u2="ð" k="57" />
-<hkern u1="¿" u2="Ð" k="47" />
-<hkern u1="¿" u2="Æ" k="43" />
-<hkern u1="¿" u2="z" k="41" />
-<hkern u1="¿" u2="y" k="55" />
-<hkern u1="¿" u2="x" k="37" />
-<hkern u1="¿" u2="w" k="74" />
-<hkern u1="¿" u2="v" k="72" />
-<hkern u1="¿" u2="u" k="47" />
-<hkern u1="¿" u2="t" k="49" />
-<hkern u1="¿" u2="s" k="55" />
-<hkern u1="¿" u2="o" k="53" />
-<hkern u1="¿" u2="n" k="41" />
-<hkern u1="¿" u2="l" k="45" />
-<hkern u1="¿" u2="j" k="-186" />
-<hkern u1="¿" u2="i" k="41" />
-<hkern u1="¿" u2="h" k="41" />
-<hkern u1="¿" u2="f" k="45" />
-<hkern u1="¿" u2="d" k="53" />
-<hkern u1="¿" u2="a" k="55" />
-<hkern u1="¿" u2="Z" k="49" />
-<hkern u1="¿" u2="Y" k="135" />
-<hkern u1="¿" u2="X" k="39" />
-<hkern u1="¿" u2="W" k="109" />
-<hkern u1="¿" u2="V" k="109" />
-<hkern u1="¿" u2="U" k="49" />
-<hkern u1="¿" u2="T" k="156" />
-<hkern u1="¿" u2="S" k="45" />
-<hkern u1="¿" u2="O" k="49" />
-<hkern u1="¿" u2="J" k="68" />
-<hkern u1="¿" u2="I" k="31" />
-<hkern u1="¿" u2="A" k="47" />
-<hkern u1="Ï" u2="|" k="-4" />
-<hkern u1="Ø" u2="™" k="-6" />
-<hkern u1="Ø" u2="\" k="-4" />
-<hkern u1="Ø" u2="Y" k="8" />
-<hkern u1="Ø" u2="X" k="6" />
-<hkern u1="Ø" u2="W" k="6" />
-<hkern u1="Ø" u2="V" k="4" />
-<hkern u1="Ø" u2="*" k="-8" />
-<hkern u1="Ø" u2=")" k="-6" />
-<hkern u1="Þ" u2="™" k="33" />
-<hkern u1="Þ" u2="’" k="63" />
-<hkern u1="Þ" u2="‘" k="70" />
-<hkern u1="Þ" u2="Ð" k="2" />
-<hkern u1="Þ" u2="Æ" k="90" />
-<hkern u1="Þ" u2="}" k="4" />
-<hkern u1="Þ" u2="y" k="12" />
-<hkern u1="Þ" u2="x" k="12" />
-<hkern u1="Þ" u2="w" k="8" />
-<hkern u1="Þ" u2="a" k="2" />
-<hkern u1="Þ" u2="]" k="6" />
-<hkern u1="Þ" u2="\" k="49" />
-<hkern u1="Þ" u2="Z" k="53" />
-<hkern u1="Þ" u2="Y" k="119" />
-<hkern u1="Þ" u2="X" k="92" />
-<hkern u1="Þ" u2="W" k="61" />
-<hkern u1="Þ" u2="V" k="59" />
-<hkern u1="Þ" u2="T" k="131" />
-<hkern u1="Þ" u2="S" k="2" />
-<hkern u1="Þ" u2="J" k="115" />
-<hkern u1="Þ" u2="A" k="53" />
-<hkern u1="Þ" u2="?" k="23" />
-<hkern u1="Þ" u2="/" k="47" />
-<hkern u1="Þ" u2="." k="70" />
-<hkern u1="Þ" u2="-" k="14" />
-<hkern u1="Þ" u2="*" k="47" />
-<hkern u1="Þ" u2=")" k="35" />
-<hkern u1="Þ" u2="'" k="111" />
-<hkern u1="ß" u2="™" k="33" />
-<hkern u1="ß" u2="’" k="20" />
-<hkern u1="ß" u2="‘" k="20" />
-<hkern u1="ß" u2="Ð" k="27" />
-<hkern u1="ß" u2="Æ" k="23" />
-<hkern u1="ß" u2="ª" k="14" />
-<hkern u1="ß" u2="z" k="16" />
-<hkern u1="ß" u2="y" k="37" />
-<hkern u1="ß" u2="x" k="37" />
-<hkern u1="ß" u2="w" k="37" />
-<hkern u1="ß" u2="v" k="37" />
-<hkern u1="ß" u2="t" k="14" />
-<hkern u1="ß" u2="s" k="2" />
-<hkern u1="ß" u2="f" k="10" />
-<hkern u1="ß" u2="\" k="23" />
-<hkern u1="ß" u2="Z" k="25" />
-<hkern u1="ß" u2="Y" k="90" />
-<hkern u1="ß" u2="X" k="43" />
-<hkern u1="ß" u2="W" k="68" />
-<hkern u1="ß" u2="V" k="68" />
-<hkern u1="ß" u2="U" k="27" />
-<hkern u1="ß" u2="T" k="70" />
-<hkern u1="ß" u2="S" k="4" />
-<hkern u1="ß" u2="O" k="10" />
-<hkern u1="ß" u2="J" k="20" />
-<hkern u1="ß" u2="I" k="18" />
-<hkern u1="ß" u2="A" k="25" />
-<hkern u1="ß" u2="*" k="23" />
-<hkern u1="ß" u2="'" k="25" />
-<hkern u1="ç" u2="j" k="-8" />
-<hkern u1="í" u2="™" k="-2" />
-<hkern u1="í" u2="’" k="-2" />
-<hkern u1="í" u2="‘" k="-2" />
-<hkern u1="í" u2="\" k="-4" />
-<hkern u1="í" u2="*" k="-4" />
-<hkern u1="í" u2=")" k="-8" />
-<hkern u1="î" u2="™" k="-35" />
-<hkern u1="î" u2="’" k="-10" />
-<hkern u1="î" u2="‘" k="-10" />
-<hkern u1="î" u2="ß" k="-2" />
-<hkern u1="î" u2="º" k="-8" />
-<hkern u1="î" u2="ª" k="-4" />
-<hkern u1="î" u2="}" k="-10" />
-<hkern u1="î" u2="|" k="-2" />
-<hkern u1="î" u2="l" k="-8" />
-<hkern u1="î" u2="i" k="-6" />
-<hkern u1="î" u2="h" k="-6" />
-<hkern u1="î" u2="]" k="-10" />
-<hkern u1="î" u2="?" k="-8" />
-<hkern u1="î" u2="*" k="-23" />
-<hkern u1="î" u2=")" k="-4" />
-<hkern u1="î" u2="'" k="-6" />
-<hkern u1="ï" u2="™" k="-20" />
-<hkern u1="ï" u2="’" k="-16" />
-<hkern u1="ï" u2="‘" k="-16" />
-<hkern u1="ï" u2="ß" k="-8" />
-<hkern u1="ï" u2="º" k="-16" />
-<hkern u1="ï" u2="ª" k="-12" />
-<hkern u1="ï" u2="}" k="-16" />
-<hkern u1="ï" u2="|" k="-8" />
-<hkern u1="ï" u2="l" k="-12" />
-<hkern u1="ï" u2="i" k="-10" />
-<hkern u1="ï" u2="h" k="-10" />
-<hkern u1="ï" u2="]" k="-16" />
-<hkern u1="ï" u2="\" k="-20" />
-<hkern u1="ï" u2="?" k="-16" />
-<hkern u1="ï" u2="*" k="-27" />
-<hkern u1="ï" u2=")" k="-23" />
-<hkern u1="ï" u2="'" k="-10" />
-<hkern u1="ï" u2="!" k="-4" />
-<hkern u1="ð" u2="™" k="23" />
-<hkern u1="ð" u2="’" k="29" />
-<hkern u1="ð" u2="‘" k="29" />
-<hkern u1="ð" u2="Ð" k="18" />
-<hkern u1="ð" u2="Æ" k="45" />
-<hkern u1="ð" u2="z" k="14" />
-<hkern u1="ð" u2="y" k="29" />
-<hkern u1="ð" u2="x" k="31" />
-<hkern u1="ð" u2="w" k="27" />
-<hkern u1="ð" u2="v" k="25" />
-<hkern u1="ð" u2="t" k="6" />
-<hkern u1="ð" u2="\" k="16" />
-<hkern u1="ð" u2="Z" k="59" />
-<hkern u1="ð" u2="Y" k="76" />
-<hkern u1="ð" u2="X" k="55" />
-<hkern u1="ð" u2="W" k="61" />
-<hkern u1="ð" u2="V" k="61" />
-<hkern u1="ð" u2="U" k="18" />
-<hkern u1="ð" u2="T" k="66" />
-<hkern u1="ð" u2="S" k="14" />
-<hkern u1="ð" u2="J" k="51" />
-<hkern u1="ð" u2="I" k="12" />
-<hkern u1="ð" u2="A" k="35" />
-<hkern u1="ð" u2="/" k="4" />
-<hkern u1="ð" u2="*" k="31" />
-<hkern u1="ð" u2=")" k="18" />
-<hkern u1="ð" u2="'" k="25" />
-<hkern u1="ø" u2="*" k="2" />
-<hkern u1="‘" u2="ð" k="111" />
-<hkern u1="‘" u2="ï" k="-12" />
-<hkern u1="‘" u2="î" k="-6" />
-<hkern u1="‘" u2="Æ" k="199" />
-<hkern u1="‘" u2="s" k="20" />
-<hkern u1="‘" u2="o" k="51" />
-<hkern u1="‘" u2="f" k="14" />
-<hkern u1="‘" u2="d" k="123" />
-<hkern u1="‘" u2="a" k="27" />
-<hkern u1="‘" u2="O" k="14" />
-<hkern u1="‘" u2="J" k="180" />
-<hkern u1="‘" u2="A" k="139" />
-<hkern u1="‘" u2="." k="270" />
-<hkern u1="’" u2="‹" k="41" />
-<hkern u1="’" u2="ð" k="111" />
-<hkern u1="’" u2="ï" k="-10" />
-<hkern u1="’" u2="î" k="-6" />
-<hkern u1="’" u2="Æ" k="201" />
-<hkern u1="’" u2="s" k="23" />
-<hkern u1="’" u2="o" k="53" />
-<hkern u1="’" u2="f" k="14" />
-<hkern u1="’" u2="d" k="125" />
-<hkern u1="’" u2="a" k="29" />
-<hkern u1="’" u2="O" k="16" />
-<hkern u1="’" u2="J" k="180" />
-<hkern u1="’" u2="A" k="141" />
-<hkern u1="’" u2="@" k="78" />
-<hkern u1="’" u2="/" k="182" />
-<hkern u1="’" u2="." k="272" />
-<hkern u1="’" u2=" " k="61" />
-<hkern u1="‚" u2="j" k="-12" />
-<hkern u1="„" u2="j" k="-12" />
-<hkern u1="‹" u2="Y" k="100" />
-<hkern u1="‹" u2="W" k="61" />
-<hkern u1="‹" u2="V" k="59" />
-<hkern u1="‹" u2="T" k="121" />
-<hkern u1="›" u2="’" k="45" />
-<hkern u1="›" u2="Ð" k="16" />
-<hkern u1="›" u2="Æ" k="49" />
-<hkern u1="›" u2="z" k="53" />
-<hkern u1="›" u2="y" k="55" />
-<hkern u1="›" u2="x" k="61" />
-<hkern u1="›" u2="w" k="57" />
-<hkern u1="›" u2="v" k="53" />
-<hkern u1="›" u2="t" k="23" />
-<hkern u1="›" u2="s" k="18" />
-<hkern u1="›" u2="f" k="18" />
-<hkern u1="›" u2="Z" k="25" />
-<hkern u1="›" u2="Y" k="139" />
-<hkern u1="›" u2="X" k="37" />
-<hkern u1="›" u2="W" k="92" />
-<hkern u1="›" u2="V" k="92" />
-<hkern u1="›" u2="T" k="139" />
-<hkern u1="›" u2="J" k="59" />
-<hkern u1="›" u2="A" k="33" />
-<hkern u1="›" u2="'" k="8" />
-<hkern u1="€" u2="3" k="16" />
-<hkern g1="uniFB01" u2="ï" k="-4" />
-<hkern g1="uniFB03" u2="ï" k="-4" />
-</font>
-</defs></svg>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata></metadata>
-<defs>
-<font id="ralewaymedium" horiz-adv-x="1140" >
-<font-face units-per-em="2048" ascent="1638" descent="-410" />
-<missing-glyph horiz-adv-x="514" />
-<glyph unicode="fi" horiz-adv-x="1071" d="M57 803v141h146v148q0 81 25 155.5t72 135t124.5 97t173.5 36.5q181 0 336 -107l-78 -133q-41 37 -108 60.5t-140 23.5q-110 0 -167.5 -78t-57.5 -184v-154h547v-944h-180v803h-367v-803h-180v803h-146z" />
-<glyph unicode="fl" horiz-adv-x="1236" d="M57 803v141h146v162q0 190 101.5 300t291.5 110t290.5 -94.5t100.5 -250.5v-899q0 -47 29 -86t80 -39q14 0 31.5 2.5t32.5 6.5t28 7.5t21 6.5l8 2l30 -147q-3 -3 -33 -12t-82 -18t-98 -9q-104 0 -165.5 59t-61.5 145v943q0 42 -10.5 80t-33 72t-65 54.5t-100.5 20.5 q-56 0 -99 -25t-67.5 -68t-36.5 -93t-12 -105v-125h211v-141h-211v-803h-180v803h-146z" />
-<glyph unicode="ffi" horiz-adv-x="1562" d="M57 803v141h146v82q0 173 88.5 292.5t247.5 119.5q123 0 241 -56q111 134 307 134q170 0 338 -107l-77 -133q-40 35 -107.5 59.5t-136.5 24.5q-114 0 -172 -77.5t-58 -184.5v-154h547v-944h-180v803h-367v-803h-180v803h-311v-803h-180v803h-146zM383 944h311v131 q0 40 8.5 90t24.5 80q-55 37 -156 37q-41 0 -73.5 -15.5t-53.5 -41t-35 -58.5t-20 -67t-6 -68v-88z" />
-<glyph unicode="ffl" horiz-adv-x="1732" d="M57 803v141h146v94q0 176 92.5 288t253.5 112q113 0 231 -56q103 134 314 134q189 0 289 -94.5t100 -250.5v-899q0 -47 28.5 -86t79.5 -39q23 0 52.5 6.5t50.5 12.5l20 6l29 -147q-1 -3 -31.5 -12t-82.5 -18t-97 -9q-104 0 -166.5 59t-62.5 145v943q0 42 -10.5 80 t-32.5 72t-64.5 54.5t-99.5 20.5q-75 0 -125 -44.5t-70 -107.5t-20 -139v-125h209v-141h-209v-803h-181v803h-317v-803h-180v803h-146zM383 944h317v129q0 120 25 174q-52 35 -141 35q-99 0 -150 -69t-51 -169v-100z" />
-<glyph horiz-adv-x="0" />
-<glyph horiz-adv-x="682" />
-<glyph horiz-adv-x="0" />
-<glyph horiz-adv-x="0" />
-<glyph unicode="
" horiz-adv-x="0" />
-<glyph unicode=" " horiz-adv-x="514" />
-<glyph unicode="	" horiz-adv-x="514" />
-<glyph unicode=" " horiz-adv-x="514" />
-<glyph unicode="!" horiz-adv-x="526" d="M174 0v254h180v-254h-180zM174 492v976h180v-976h-180z" />
-<glyph unicode=""" horiz-adv-x="638" d="M125 1176v294h156v-294h-156zM358 1176v294h156v-294h-156z" />
-<glyph unicode="#" horiz-adv-x="1425" d="M80 412v139h264l88 364h-262v132h295l98 407h150l-101 -407h344l99 407h149l-100 -407h242v-132h-275l-88 -364h272v-139h-305l-100 -412h-150l103 412h-344l-101 -412h-149l102 412h-231zM492 551h344l88 364h-344z" />
-<glyph unicode="$" horiz-adv-x="1273" d="M74 190l88 156q66 -69 186.5 -125t259.5 -67v489l-30 8q-119 29 -196 58.5t-137.5 73t-88 105t-27.5 146.5q0 192 128.5 304t340.5 124v207h90v-207q253 -11 440 -164l-86 -149q-51 58 -151 101.5t-215 47.5v-485l26 -6q98 -22 168 -44.5t135 -56t104 -75.5t62 -102.5 t23 -137.5q0 -100 -38.5 -177.5t-107.5 -126t-159.5 -74t-200.5 -27.5v-205h-90v207q-301 18 -524 202zM319 1063q0 -98 65.5 -147.5t223.5 -88.5v471q-146 -7 -217.5 -68t-71.5 -167zM676 152q154 0 237.5 56.5t83.5 164.5q0 100 -76.5 154.5t-244.5 99.5v-475z" />
-<glyph unicode="%" horiz-adv-x="1525" d="M88 1176q0 124 92 211.5t223 87.5q132 0 224 -87t92 -212t-92 -212t-224 -87q-131 0 -223 87.5t-92 211.5zM158 68l573 690l549 706l88 -75l-567 -687l-557 -712zM219 1176q0 -83 54.5 -142t129.5 -59q76 0 130.5 60.5t54.5 140.5q0 82 -55.5 141t-129.5 59 q-76 0 -130 -60t-54 -140zM807 279q0 124 92 211.5t223 87.5q132 0 224 -87t92 -212t-92 -212t-224 -87q-131 0 -223 87.5t-92 211.5zM938 279q0 -83 54.5 -142t129.5 -59q76 0 130.5 59.5t54.5 141.5t-55.5 141t-129.5 59q-76 0 -130 -60t-54 -140z" />
-<glyph unicode="&" horiz-adv-x="1402" d="M94 385q0 69 22.5 131t66 114.5t90 93t110.5 85.5q-102 111 -143 185.5t-41 150.5q0 141 107 234.5t267 93.5q150 0 252.5 -82t102.5 -215q0 -60 -22 -113.5t-66.5 -101t-92 -85t-118.5 -83.5l370 -390q82 158 82 347h150q-3 -261 -125 -457l280 -293h-237l-152 158 q-184 -178 -432 -178q-202 0 -336.5 115.5t-134.5 289.5zM268 383q0 -119 93.5 -189.5t222.5 -70.5q182 0 315 139l-414 436q-105 -76 -161 -151t-56 -164zM365 1149q0 -45 32 -96t125 -152q124 82 182 140.5t58 129.5q0 72 -53.5 118t-135.5 46q-90 0 -149 -54t-59 -132z " />
-<glyph unicode="'" horiz-adv-x="380" d="M113 1200v270h155v-270h-155z" />
-<glyph unicode="(" horiz-adv-x="573" d="M84 709q0 133 41.5 277.5t100 264.5t149.5 273l139 -62q-95 -143 -178.5 -360.5t-83.5 -399.5q0 -313 258 -718l-133 -70q-293 436 -293 795z" />
-<glyph unicode=")" horiz-adv-x="573" d="M59 1462l140 62q140 -235 215 -428.5t75 -386.5q0 -360 -292 -795l-134 70q259 407 259 718q0 125 -45.5 280.5t-102.5 274t-115 205.5z" />
-<glyph unicode="*" horiz-adv-x="675" d="M121 1280l26 86l144 -55l-6 151h104l-6 -151l143 55l27 -86l-141 -45l92 -133l-78 -51l-88 137l-90 -137l-76 51l90 133z" />
-<glyph unicode="+" horiz-adv-x="860" d="M106 653v148h242v262h164v-262h242v-148h-242v-262h-164v262h-242z" />
-<glyph unicode="," horiz-adv-x="438" d="M98 -33q19 0 35.5 11t16.5 38v213h149v-241q0 -54 -32 -90.5t-75.5 -50t-93.5 -13.5v133z" />
-<glyph unicode="-" horiz-adv-x="862" d="M129 477v164h604v-164h-604z" />
-<glyph unicode="." horiz-adv-x="409" d="M129 0v229h152v-229h-152z" />
-<glyph unicode="/" horiz-adv-x="1298" d="M59 0l981 1454h203l-983 -1454h-201z" />
-<glyph unicode="0" horiz-adv-x="1259" d="M113 600q0 270 147 446.5t371 176.5q147 0 265.5 -80t185.5 -223t67 -320q0 -269 -147.5 -444.5t-370.5 -175.5q-148 0 -266 79.5t-185 221t-67 319.5zM293 600q0 -202 93.5 -327.5t244.5 -125.5q148 0 242 125.5t94 327.5t-94 328.5t-242 126.5q-151 0 -244.5 -126 t-93.5 -329z" />
-<glyph unicode="1" horiz-adv-x="915" d="M92 803v172q54 0 133.5 42.5t135.5 88t65 63.5h184v-1005h260v-164h-735v164h291v799q-37 -50 -147.5 -105t-186.5 -55z" />
-<glyph unicode="2" horiz-adv-x="1114" d="M98 0q0 88 13.5 155.5t49.5 134.5t103 127.5t168 117.5q29 16 82 43t85 44t73 44t64.5 51t40 56t16.5 67q0 76 -66 133t-180 57q-177 0 -316 -166l-116 131q24 25 58.5 51.5t93.5 62.5t141.5 58.5t171.5 22.5q184 0 295.5 -94.5t111.5 -235.5q0 -44 -12.5 -84.5 t-31 -71.5t-49 -62t-56 -51t-63.5 -43t-60.5 -34.5t-57.5 -28.5q-317 -154 -346 -321h699v-164h-912z" />
-<glyph unicode="3" horiz-adv-x="1112" d="M74 -78l121 121q99 -180 335 -180q144 0 224 65.5t80 190.5q0 131 -88.5 206.5t-251.5 75.5h-54v152h58q144 0 224.5 69.5t80.5 180.5q0 105 -73 160t-193 55q-112 0 -197 -47.5t-133 -134.5l-111 114q54 103 180 166.5t279 63.5q194 0 316 -100.5t122 -264.5 q0 -125 -70.5 -218.5t-187.5 -113.5q131 -23 208 -121.5t77 -242.5q0 -189 -134.5 -304.5t-355.5 -115.5q-154 0 -272.5 58.5t-183.5 164.5z" />
-<glyph unicode="4" horiz-adv-x="1124" d="M43 86v160l715 923h123v-919h180v-164h-180v-346h-181v346h-657zM229 250h490v641z" />
-<glyph unicode="5" horiz-adv-x="1130" d="M72 -35l112 98q58 -95 154 -151.5t205 -56.5q141 0 234 90t93 231q0 135 -90 222t-223 87q-89 0 -165.5 -39t-125.5 -110h-162l164 833h707v-165h-574l-88 -463q96 102 267 102q203 0 339 -131t136 -334q0 -213 -147.5 -348t-366.5 -135q-154 0 -280 73t-189 197z" />
-<glyph unicode="6" horiz-adv-x="1241" d="M106 606q0 420 146 639t399 219q141 0 257 -68t182 -190l-111 -108q-44 95 -133.5 152t-196.5 57q-169 0 -269.5 -151t-103.5 -419q44 106 146 170t229 64q138 0 253.5 -65t182 -177.5t66.5 -247.5q0 -138 -68.5 -253t-188 -181.5t-263.5 -66.5q-238 0 -382.5 168 t-144.5 458zM289 481q0 -141 102.5 -243.5t243.5 -102.5t243.5 102t102.5 244q0 141 -102.5 242.5t-243.5 101.5q-142 0 -244 -101.5t-102 -242.5z" />
-<glyph unicode="7" d="M88 1028v166h1032l-731 -1454h-205l652 1288h-748z" />
-<glyph unicode="8" horiz-adv-x="1226" d="M100 420q0 125 81 220t192 138q-96 41 -159.5 119.5t-63.5 175.5q0 89 41.5 163t108.5 120.5t148 72t164 25.5q84 0 165.5 -25t149 -71.5t109 -120t41.5 -162.5q0 -97 -64.5 -177t-162.5 -120q118 -46 196 -142.5t78 -223.5q0 -126 -71 -225t-188 -151t-257 -52 q-217 0 -362.5 125.5t-145.5 310.5zM285 422q0 -82 50 -147t124 -97.5t155 -32.5q127 0 227.5 79.5t100.5 199.5q0 84 -50.5 149t-125.5 97t-156 32q-83 0 -156.5 -34t-121 -99t-47.5 -147zM332 1067q0 -102 87 -163.5t193 -61.5t193.5 63t87.5 166q0 99 -84 160t-199 61 q-114 0 -196 -62t-82 -163z" />
-<glyph unicode="9" horiz-adv-x="1206" d="M74 668q0 138 68.5 253t188 181.5t263.5 66.5q238 0 382 -168t144 -458q0 -420 -146 -639t-399 -219q-141 0 -256.5 68t-181.5 190l111 108q44 -95 133.5 -152t196.5 -57q169 0 269 151t103 419q-44 -106 -146 -170t-229 -64q-138 0 -253.5 65t-181.5 177.5t-66 247.5z M246 668q0 -141 102.5 -242.5t243.5 -101.5q142 0 244 101.5t102 242.5t-102.5 243.5t-243.5 102.5t-243.5 -102t-102.5 -244z" />
-<glyph unicode=":" horiz-adv-x="432" d="M141 0v229h150v-229h-150zM141 831v230h150v-230h-150z" />
-<glyph unicode=";" horiz-adv-x="456" d="M106 -33q19 0 35.5 11t16.5 38v213h149v-241q0 -54 -32 -90.5t-75.5 -50t-93.5 -13.5v133zM158 831v230h149v-230h-149z" />
-<glyph unicode="<" horiz-adv-x="1038" d="M68 479v94l860 519v-193l-598 -369l598 -362v-201z" />
-<glyph unicode="=" horiz-adv-x="901" d="M139 367v122h625v-122h-625zM139 641v123h625v-123h-625z" />
-<glyph unicode=">" horiz-adv-x="1038" d="M111 -33v201l598 362l-598 369v193l860 -519v-94z" />
-<glyph unicode="?" horiz-adv-x="987" d="M72 1208q54 123 172 194t256 71q78 0 149.5 -24.5t130 -71.5t93 -124t34.5 -174q0 -60 -14.5 -110t-35.5 -84t-59 -66.5t-68.5 -52t-80.5 -47.5q-31 -17 -43.5 -24t-39 -25t-39 -31t-30.5 -35.5t-26.5 -45.5t-15 -55.5t-6.5 -70.5h-152q0 114 40.5 196t131.5 140 q14 9 54 32t63.5 38t58 43t54 55t34.5 66.5t15 84.5q0 110 -74.5 173t-177.5 63q-98 0 -178.5 -55.5t-124.5 -139.5zM301 0v238h152v-238h-152z" />
-<glyph unicode="@" horiz-adv-x="1697" d="M98 471q0 137 41 259t113.5 213t168 157.5t209 100.5t232.5 34q151 0 287.5 -55.5t239.5 -155t164 -247.5t61 -322q0 -32 -2 -64.5t-9.5 -83t-19.5 -94.5t-35.5 -90.5t-54.5 -79.5t-78.5 -54.5t-105.5 -21.5q-50 0 -85 15t-53.5 43t-27.5 57t-13 68 q-62 -65 -153.5 -105.5t-194.5 -40.5q-146 0 -228.5 78t-82.5 201q0 62 22.5 111.5t59.5 81.5t87.5 53t103.5 29.5t110 8.5q126 0 252 -47q0 72 -11.5 124.5t-38.5 95t-76.5 64t-121.5 21.5q-158 0 -283 -94l-40 100q156 105 339 105q66 0 119.5 -13.5t89 -35.5t62 -56.5 t40.5 -69t22.5 -80t11 -83t2.5 -84.5v-244q0 -52 3 -85.5t13.5 -65.5t32 -47t55.5 -15q47 0 84 29t58.5 72t36 99.5t19.5 106t5 95.5q0 193 -86.5 352t-240.5 250.5t-343 91.5q-187 0 -341 -87.5t-243.5 -244t-89.5 -350.5q0 -113 31.5 -217.5t91 -189.5t139.5 -148.5 t182.5 -98t215.5 -34.5q149 0 315 78l29 -78q-165 -82 -346 -82q-151 0 -288 58t-237.5 158.5t-159.5 244.5t-59 309zM588 291q0 -78 56 -129t147 -51q96 0 188 45q73 34 99 82.5t26 111.5v76q-7 1 -49 13.5t-95 22t-108 9.5q-116 0 -190 -43t-74 -137z" />
-<glyph unicode="A" horiz-adv-x="1388" d="M23 0l598 1454h151l596 -1454h-197l-172 426h-610l-170 -426h-196zM426 569h532l-262 672z" />
-<glyph unicode="B" horiz-adv-x="1376" d="M174 0v1454h723q98 0 176 -55.5t117 -139t39 -176.5q0 -110 -55.5 -202.5t-153.5 -135.5q125 -37 197.5 -136t72.5 -234q0 -165 -123.5 -270t-302.5 -105h-690zM358 160h506q100 0 170 74t70 174q0 102 -65 176.5t-160 74.5h-521v-499zM358 809h463q96 0 161 70.5 t65 171.5q0 103 -60.5 173t-152.5 70h-476v-485z" />
-<glyph unicode="C" horiz-adv-x="1398" d="M82 737q0 106 29.5 210.5t88.5 197t140.5 163.5t194 112.5t239.5 41.5q188 0 329.5 -86.5t211.5 -230.5l-146 -94q-31 66 -78 115.5t-101.5 76.5t-110 40t-113.5 13q-117 0 -214 -50t-157.5 -131.5t-93.5 -181t-33 -204.5q0 -151 65 -282.5t181.5 -212t257.5 -80.5 q80 0 156.5 25.5t148 85t111.5 145.5l153 -84q-44 -104 -139.5 -182.5t-209 -117t-228.5 -38.5q-145 0 -274 65t-217 171t-139.5 240.5t-51.5 272.5z" />
-<glyph unicode="D" horiz-adv-x="1470" d="M174 0v1454h504q171 0 306 -56.5t220.5 -156t130.5 -230t45 -282.5q0 -331 -191 -530t-511 -199h-504zM358 164h320q164 0 282 74.5t176 201t58 289.5q0 252 -137 406.5t-379 154.5h-320v-1126z" />
-<glyph unicode="E" horiz-adv-x="1249" d="M174 0v1454h969v-164h-785v-471h682v-153h-682v-502h803v-164h-987z" />
-<glyph unicode="F" horiz-adv-x="1189" d="M174 0v1454h961v-164h-777v-485h654v-154h-654v-651h-184z" />
-<glyph unicode="G" horiz-adv-x="1470" d="M84 731q0 145 52 279t140.5 234t216 160t269.5 60q203 0 342 -84.5t213 -232.5l-141 -98q-63 123 -172 186t-246 63q-143 0 -256.5 -81.5t-172.5 -211t-59 -278.5q0 -154 66 -285t183 -208.5t257 -77.5q239 0 428 229v201h-313v139h469v-725h-156v197 q-192 -207 -442 -207q-140 0 -267.5 63.5t-216.5 166.5t-141.5 237.5t-52.5 273.5z" />
-<glyph unicode="H" horiz-adv-x="1517" d="M174 0v1454h184v-629h801v629h184v-1454h-184v662h-801v-662h-184z" />
-<glyph unicode="I" horiz-adv-x="532" d="M174 0v1452h184v-1452h-184z" />
-<glyph unicode="J" horiz-adv-x="1001" d="M33 68l47 149q44 -31 115 -52.5t153 -21.5q59 0 104.5 13t78 35t55.5 60.5t37.5 82t22.5 106.5t10.5 126t2.5 149v737h185v-737q0 -103 -4.5 -180.5t-17 -158.5t-35 -138t-59.5 -109t-89 -83.5t-125 -50t-166 -18.5q-182 0 -315 91z" />
-<glyph unicode="K" horiz-adv-x="1329" d="M174 0v1452h184v-803l750 805h199l-584 -641l616 -813h-200l-529 707l-252 -263v-444h-184z" />
-<glyph unicode="L" horiz-adv-x="1208" d="M174 0v1454h184v-1290h811v-164h-995z" />
-<glyph unicode="M" horiz-adv-x="1789" d="M174 0v1454h195l526 -944l528 944h193v-1454h-184v1124l-484 -862h-104l-486 862v-1124h-184z" />
-<glyph unicode="N" horiz-adv-x="1576" d="M174 0v1454h143l902 -1132v1130h184v-1452h-156l-889 1110v-1110h-184z" />
-<glyph unicode="O" horiz-adv-x="1538" d="M84 727q0 192 89 361t248.5 272.5t350.5 103.5q119 0 227 -41.5t189.5 -113.5t142 -166t92 -201.5t31.5 -216.5q0 -193 -88.5 -361t-247.5 -271t-350 -103q-148 0 -278 62.5t-217.5 166t-138 236t-50.5 272.5zM270 727q0 -111 36.5 -214.5t100.5 -182.5t158.5 -126.5 t204.5 -47.5q112 0 207.5 49.5t158 130.5t97.5 183t35 208q0 149 -62 278.5t-177.5 210t-258.5 80.5q-112 0 -208 -49t-158.5 -129.5t-98 -182t-35.5 -208.5z" />
-<glyph unicode="P" horiz-adv-x="1271" d="M174 0v1454h606q123 0 226 -68.5t159 -175t56 -221.5q0 -121 -52.5 -227t-152 -173t-223.5 -67h-435v-522h-184zM358 686h424q112 0 182 88t70 215t-78.5 214t-185.5 87h-412v-604z" />
-<glyph unicode="Q" horiz-adv-x="1540" d="M84 727q0 192 89 361t248.5 272.5t350.5 103.5q119 0 227 -41.5t189.5 -113.5t142 -166t92 -201.5t31.5 -216.5q0 -145 -52 -278.5t-145 -235.5l183 -211h-180l-103 119q-176 -129 -389 -129q-148 1 -278 63.5t-217.5 165.5t-138 235.5t-50.5 272.5zM270 727 q0 -111 36.5 -214.5t100.5 -182.5t158.5 -126.5t204.5 -47.5q154 0 277 92l-195 227h180l111 -129q125 166 125 381q0 149 -62 279t-177.5 211t-258.5 81q-112 0 -208 -49.5t-158.5 -130t-98 -182.5t-35.5 -209z" />
-<glyph unicode="R" horiz-adv-x="1359" d="M174 0v1454h623q93 0 176.5 -40.5t140 -106t90 -149t33.5 -169.5q0 -154 -84.5 -275.5t-220.5 -156.5l352 -557h-209l-332 522h-385v-522h-184zM358 686h441q111 0 181.5 89.5t70.5 213.5q0 122 -79.5 211.5t-185.5 89.5h-428v-604z" />
-<glyph unicode="S" horiz-adv-x="1255" d="M63 190l89 156q74 -77 213 -135.5t294 -58.5q157 0 242.5 56.5t85.5 164.5q0 35 -10 64t-25.5 51.5t-45.5 42.5t-60 34.5t-78.5 30.5t-91.5 27.5t-109 27.5q-95 23 -161 45.5t-123.5 54t-91.5 70t-53 91.5t-19 122q0 136 68 234.5t185 147t269 48.5q273 0 477 -166 l-86 -149q-55 62 -163.5 106.5t-231.5 44.5q-165 0 -246.5 -62t-81.5 -175q0 -39 9.5 -69t32.5 -54t50.5 -41.5t75.5 -34t95 -28.5t120 -29q98 -22 168 -44.5t135 -56t104 -75.5t62 -102.5t23 -137.5q0 -136 -71 -229t-187.5 -134.5t-270.5 -41.5q-340 0 -592 204z" />
-<glyph unicode="T" horiz-adv-x="1261" d="M37 1290v164h1188v-164h-502v-1290h-184v1290h-502z" />
-<glyph unicode="U" horiz-adv-x="1542" d="M152 719v735h184v-735q0 -90 13 -169t44.5 -152.5t80 -126t124.5 -84t172 -31.5q71 0 130.5 16.5t104 46t79 71.5t57.5 90t37.5 105.5t21 114.5t6.5 119v735h185v-735q0 -121 -21 -227t-68.5 -199t-118.5 -159.5t-176 -105t-235 -38.5q-135 0 -242 40.5t-176.5 108.5 t-116 162.5t-66 198t-19.5 219.5z" />
-<glyph unicode="V" horiz-adv-x="1384" d="M16 1454h195l481 -1223l479 1223h195l-594 -1454h-160z" />
-<glyph unicode="W" horiz-adv-x="2146" d="M16 1454h199l494 -1241l247 600l-251 633h174l192 -506l195 506h174l-252 -633l250 -600l491 1241h201l-608 -1454h-160l-289 686l-291 -686h-159z" />
-<glyph unicode="X" horiz-adv-x="1300" d="M4 1454h205l442 -606l443 606h202l-546 -737l530 -717h-203l-426 586l-426 -586h-205l531 717z" />
-<glyph unicode="Y" horiz-adv-x="1304" d="M8 1454h203l440 -758l445 758h200l-553 -924v-530h-184v535z" />
-<glyph unicode="Z" horiz-adv-x="1277" d="M57 0v143l938 1147h-919v164h1134v-143l-921 -1147h921v-164h-1153z" />
-<glyph unicode="[" horiz-adv-x="540" d="M164 -82v1598h287v-148h-119v-1302h119v-148h-287z" />
-<glyph unicode="\" horiz-adv-x="1208" d="M55 1454h203l891 -1454h-201z" />
-<glyph unicode="]" horiz-adv-x="540" d="M90 66h119v1302h-119v148h287v-1598h-287v148z" />
-<glyph unicode="^" horiz-adv-x="1136" d="M88 621l406 833h151l404 -833h-154l-326 671l-331 -671h-150z" />
-<glyph unicode="_" horiz-adv-x="829" d="M29 0h772v-164h-772v164z" />
-<glyph unicode="`" horiz-adv-x="475" d="M98 1495h178l121 -207l-116 -41z" />
-<glyph unicode="a" d="M61 307q0 151 125.5 243.5t325.5 92.5q167 0 299 -53v86q0 131 -75 205.5t-208 74.5q-162 0 -340 -125l-59 117q207 139 420 139q205 0 323.5 -114t118.5 -316v-436q0 -34 13.5 -48.5t44.5 -16.5v-156q-54 -8 -74 -8q-51 0 -91.5 27t-43.5 81l-4 76 q-69 -93 -180.5 -144.5t-225.5 -51.5q-160 0 -264.5 94.5t-104.5 232.5zM233 324q0 -87 66 -148t176 -61q85 0 167.5 36t129.5 91q39 45 39 84v157q-132 52 -270 52q-139 0 -223.5 -57.5t-84.5 -153.5z" />
-<glyph unicode="b" horiz-adv-x="1271" d="M141 0v1495h181v-639q150 231 395 231q141 0 252.5 -80t169 -206t57.5 -271q0 -149 -66 -275t-182.5 -200.5t-257.5 -74.5q-122 0 -225.5 60.5t-163.5 160.5v-201h-160zM322 373q19 -97 120.5 -167.5t202.5 -70.5q157 0 262 118.5t105 276.5q0 105 -43.5 196.5 t-125 148.5t-181.5 57q-110 0 -199.5 -71t-140.5 -179v-309z" />
-<glyph unicode="c" horiz-adv-x="1134" d="M74 537q0 151 66.5 275.5t191.5 199.5t284 75q156 0 273.5 -69.5t177.5 -190.5l-176 -55q-41 75 -115.5 117.5t-163.5 42.5q-150 0 -252 -113t-102 -282q0 -168 104.5 -285t251.5 -117q93 0 176.5 49t108.5 117l176 -53q-48 -119 -173 -193.5t-284 -74.5 q-157 0 -282.5 76.5t-193.5 203.5t-68 277z" />
-<glyph unicode="d" horiz-adv-x="1292" d="M74 532q0 151 61.5 277.5t173.5 202t250 75.5q124 0 226.5 -64.5t164.5 -166.5v639h180v-1274q0 -34 13.5 -48.5t44.5 -16.5v-156q-58 -8 -72 -8q-60 0 -97.5 31t-39.5 77l-4 101q-63 -102 -169 -161.5t-222 -59.5q-145 0 -263 76.5t-182.5 202.5t-64.5 273zM260 530 q0 -163 106.5 -279t260.5 -116q101 0 202 72t121 168v307q-38 104 -138 177t-202 73t-183.5 -58t-124 -149.5t-42.5 -194.5z" />
-<glyph unicode="e" horiz-adv-x="1210" d="M74 535q0 112 40.5 213t111.5 176t174 119t221 44t219.5 -44.5t169.5 -119.5t106.5 -174t38.5 -206q0 -46 -4 -70h-887q12 -156 116 -257t245 -101q99 0 185.5 49.5t119.5 128.5l155 -43q-53 -120 -180.5 -195t-286.5 -75q-157 0 -282.5 76t-193.5 202.5t-68 276.5z M260 606h725q-13 152 -116.5 249t-247.5 97t-247.5 -97.5t-113.5 -248.5z" />
-<glyph unicode="f" horiz-adv-x="729" d="M57 803v141h146v148q0 196 88 310t239 114q130 0 236 -66l-45 -133q-65 45 -154 45t-136.5 -68t-47.5 -196v-154h285v-141h-285v-803h-180v803h-146z" />
-<glyph unicode="g" horiz-adv-x="1271" d="M76 532q0 150 62 276.5t176 202.5t257 76q244 0 400 -231v213h159v-1057q0 -147 -73.5 -255t-195 -161t-275.5 -53q-174 0 -290.5 60.5t-195.5 175.5l105 92q62 -92 162.5 -140t218.5 -48q101 0 182 35t131.5 111t50.5 183v189q-60 -98 -163.5 -155.5t-217.5 -57.5 q-106 0 -199 45t-157 120t-100.5 174t-36.5 205zM258 528q0 -161 107 -277t260 -116q111 0 207 73.5t118 166.5v307q-43 109 -139.5 179.5t-202.5 70.5q-104 0 -186 -60t-123 -151.5t-41 -192.5z" />
-<glyph unicode="h" horiz-adv-x="1200" d="M141 0v1495h181v-655q63 115 172 181t237 66q338 0 338 -448v-639h-180v598q0 163 -57.5 245.5t-167.5 82.5q-107 0 -207 -80.5t-135 -200.5v-645h-181z" />
-<glyph unicode="i" horiz-adv-x="462" d="M141 0v1069h181v-1069h-181zM141 1270v225h181v-225h-181z" />
-<glyph unicode="j" horiz-adv-x="462" d="M-256 -295l84 121q52 -47 141 -47q68 0 120 50.5t52 123.5v1116h181v-1104q0 -149 -99 -247.5t-233 -98.5q-150 0 -246 86zM141 1270v225h181v-225h-181z" />
-<glyph unicode="k" horiz-adv-x="1097" d="M141 0v1495h181v-983l548 555h199l-426 -442l447 -625h-195l-369 522l-204 -192v-330h-181z" />
-<glyph unicode="l" horiz-adv-x="573" d="M145 211v1284h181v-1219q0 -60 31.5 -93t88.5 -33q51 0 111 24l29 -145q-44 -19 -105.5 -31t-109.5 -12q-105 0 -165.5 60t-60.5 165z" />
-<glyph unicode="m" horiz-adv-x="1884" d="M141 0v1069h164v-229q65 119 170.5 183t235.5 64t211 -71t100 -189q144 260 408 260q323 0 323 -448v-639h-180v598q0 328 -215 328q-108 0 -196.5 -78.5t-125.5 -204.5v-643h-180v598q0 168 -53 248t-160 80t-195.5 -77.5t-125.5 -203.5v-645h-181z" />
-<glyph unicode="n" horiz-adv-x="1200" d="M141 0v1069h164v-229q63 113 183.5 180t261.5 67q90 0 154 -33t99 -95.5t50.5 -140t15.5 -179.5v-639h-180v598q0 169 -52 248.5t-159 79.5q-112 0 -216 -80.5t-140 -200.5v-645h-181z" />
-<glyph unicode="o" horiz-adv-x="1224" d="M74 532q0 149 67.5 275.5t192 203t278.5 76.5q155 0 280 -76.5t193 -203t68 -275.5q0 -111 -39.5 -211.5t-109.5 -176t-172 -120t-220 -44.5q-157 0 -281 76t-190.5 201.5t-66.5 274.5zM258 530q0 -167 103 -281t251 -114t252.5 116.5t104.5 283.5q0 165 -104.5 281 t-252.5 116q-146 0 -250 -117.5t-104 -284.5z" />
-<glyph unicode="p" horiz-adv-x="1269" d="M141 -436v1505h160v-201q64 100 167 159.5t222 59.5q142 0 259.5 -77.5t182 -203.5t64.5 -271q0 -152 -60 -278.5t-170.5 -201.5t-248.5 -75q-127 0 -229.5 63t-165.5 168v-647h-181zM322 387q45 -108 139.5 -180t200.5 -72q102 0 183.5 58t124 149t42.5 193 q0 163 -106.5 280t-260.5 117q-100 0 -201.5 -72.5t-121.5 -167.5v-305z" />
-<glyph unicode="q" horiz-adv-x="1269" d="M74 535q0 149 66.5 275.5t183 201.5t256.5 75q121 0 224 -60.5t165 -160.5v203h159v-1276q0 -34 13.5 -48.5t44.5 -16.5v-156q-40 -6 -86 -6q-64 0 -108 40.5t-44 102.5v502q-146 -231 -395 -231q-138 0 -249 77.5t-170.5 203.5t-59.5 274zM258 530q0 -164 101 -279.5 t255 -115.5q108 0 192.5 63.5t141.5 166.5v307q-12 68 -64 128.5t-124 96t-142 35.5q-102 0 -186 -58.5t-129 -150t-45 -193.5z" />
-<glyph unicode="r" horiz-adv-x="741" d="M141 0v1069h168v-248q57 114 148 185t190 71q46 0 60 -2v-164q-136 -3 -239.5 -69.5t-145.5 -182.5v-659h-181z" />
-<glyph unicode="s" horiz-adv-x="1009" d="M51 135l78 121q190 -143 387 -143q117 0 185.5 47t68.5 129q0 32 -12.5 56t-33 41t-62 33t-82.5 27.5t-111 28.5q-84 21 -138 38t-101.5 39.5t-73 50t-40 65.5t-14.5 88q0 104 55.5 180.5t147.5 113.5t207 37q117 0 222 -38t179 -103l-82 -108q-133 118 -323 118 q-105 0 -170.5 -44t-65.5 -132q0 -70 51 -100.5t201 -67.5q117 -28 187.5 -51.5t127.5 -58.5t81 -82.5t24 -114.5q0 -149 -115 -237t-309 -88q-130 0 -255.5 40.5t-213.5 114.5z" />
-<glyph unicode="t" horiz-adv-x="710" d="M49 928v141h146v356h180v-356h239v-141h-239v-664q3 -56 36.5 -84t84.5 -28q82 0 157 45l43 -144q-151 -67 -260 -67q-105 0 -173 56.5t-68 166.5v719h-146z" />
-<glyph unicode="u" horiz-adv-x="1234" d="M131 428v641h180v-606q0 -328 228 -328q112 0 208.5 71.5t143.5 192.5v670h180v-848q0 -34 13 -48.5t44 -16.5v-156q-62 -8 -71 -8q-61 0 -96.5 29t-38.5 79l-7 129q-70 -119 -187.5 -184t-256.5 -65q-167 0 -253.5 113.5t-86.5 334.5z" />
-<glyph unicode="v" horiz-adv-x="1093" d="M29 1069h186l338 -911l340 911h172l-422 -1069h-192z" />
-<glyph unicode="w" horiz-adv-x="1687" d="M27 1069h172l368 -891l181 445l-185 444h150l131 -342l131 342h149l-182 -444l180 -445l367 891h174l-455 -1069h-149l-215 522l-213 -522h-150z" />
-<glyph unicode="x" horiz-adv-x="1042" d="M20 0l402 532l-399 537h188l293 -393l16 -33l19 33l290 393h191l-399 -537l401 -532h-191l-292 391l-19 31l-16 -31l-293 -391h-191z" />
-<glyph unicode="y" horiz-adv-x="1112" d="M18 1069h187l364 -907l332 907h172l-524 -1350q-69 -180 -270 -180q-55 0 -91 10v158q56 -6 99 -6q28 0 47.5 17t52.5 82.5t84 199.5z" />
-<glyph unicode="z" horiz-adv-x="997" d="M55 0v117l684 821h-665v131h858v-117l-680 -821h682v-131h-879z" />
-<glyph unicode="{" horiz-adv-x="550" d="M100 674v131q39 0 62.5 39.5t23.5 77.5v532q0 33 15.5 47.5t31.5 14.5h230v-148h-113v-500q0 -77 -59 -131q29 -26 44 -63t15 -68v-522h113v-147h-230q-18 0 -32.5 14.5t-14.5 46.5v555q0 45 -24 80t-62 41z" />
-<glyph unicode="|" horiz-adv-x="475" d="M160 -266v1853h155v-1853h-155z" />
-<glyph unicode="}" horiz-adv-x="550" d="M90 -63v147h113v522q0 32 14.5 68.5t44.5 62.5q-59 54 -59 131v500h-113v148h229q15 0 31.5 -14.5t16.5 -47.5v-532q0 -38 23.5 -77.5t62.5 -39.5v-131q-39 -6 -62.5 -40.5t-23.5 -80.5v-555q0 -32 -15.5 -46.5t-32.5 -14.5h-229z" />
-<glyph unicode="~" horiz-adv-x="1073" d="M127 485q0 12 7.5 36.5t26 58.5t44.5 63.5t69 50.5t93 21q44 0 91.5 -18.5t82.5 -40t80 -40t84 -18.5q30 0 55 10t40.5 24.5t26 30.5t15 27t4.5 15h106q0 -7 -7.5 -29t-26.5 -55t-45.5 -63t-72 -51.5t-98.5 -21.5q-47 0 -96.5 18t-85 39.5t-78.5 39.5t-77 18 q-28 0 -52 -11.5t-38 -27.5t-24 -33.5t-14 -29t-4 -13.5h-106z" />
-<glyph unicode="¡" horiz-adv-x="528" d="M174 -6v977h180v-977h-180zM174 1208v254h180v-254h-180z" />
-<glyph unicode="¢" horiz-adv-x="1179" d="M92 528q0 139 56.5 259t167 201t255.5 97v236h91v-236q147 -4 254.5 -71t168.5 -187l-174 -55q-40 72 -105 110.5t-144 43.5v-787q79 7 158.5 52t99.5 110l176 -53q-33 -84 -111 -147.5t-162 -92t-161 -28.5v-226h-91v228q-136 11 -247.5 93t-171.5 202.5t-60 250.5z M276 528q0 -138 83.5 -247t211.5 -134v773q-134 -17 -214.5 -132.5t-80.5 -259.5z" />
-<glyph unicode="£" horiz-adv-x="1060" d="M111 115q131 124 187 220.5t56 196.5q0 50 -12 97h-231v139h178q-12 24 -42 80.5t-44.5 87.5t-28.5 80t-14 94q0 147 113.5 250.5t273.5 103.5q115 0 218 -57.5t169 -157.5l-100 -110q-49 79 -129 127.5t-162 48.5q-92 0 -154.5 -63.5t-62.5 -155.5q0 -50 19 -100 t58.5 -121.5t55.5 -106.5h366v-139h-321q8 -58 8 -88q0 -100 -45.5 -191t-155.5 -209q79 21 152 21q57 0 149 -18.5t138 -18.5q70 0 174 37l45 -137q-112 -56 -228 -56q-61 0 -174.5 25.5t-177.5 25.5q-117 0 -233 -36z" />
-<glyph unicode="¥" horiz-adv-x="1411" d="M61 1454h201l440 -758l445 758h203l-418 -682h166v-123h-234l-69 -119v-57h305v-123h-305v-350h-185v350h-301v123h301v62l-65 114h-236v123h170z" />
-<glyph unicode="¦" horiz-adv-x="483" d="M164 -266v825h155v-825h-155zM164 762v825h155v-825h-155z" />
-<glyph unicode="§" horiz-adv-x="1060" d="M96 1102q0 101 58.5 185.5t152.5 130.5t199 46q250 0 395 -213l-139 -65q-32 59 -99.5 88t-146.5 29q-96 0 -166.5 -55t-70.5 -144q0 -181 239 -184q79 -1 150.5 -19t133.5 -54.5t99 -101.5t37 -151q0 -56 -16 -105t-41 -77q88 -60 88 -213q0 -94 -40 -169.5 t-104.5 -119.5t-137 -67t-144.5 -23q-238 0 -418 194l117 111q136 -133 295 -133q97 0 171 55t74 146q0 39 -14.5 68.5t-35 46.5t-53.5 27.5t-61 14.5t-65 6q-188 11 -298 99t-110 243q0 102 50 168q-42 34 -70.5 96.5t-28.5 139.5zM322 676q0 -54 21 -91.5t53 -55 t76.5 -28.5t85 -14t85 -9.5t70.5 -16.5q24 20 38.5 55.5t14.5 73.5q0 50 -22.5 87t-60 56.5t-77.5 29t-82 9.5q-91 0 -157 27q-45 -45 -45 -123z" />
-<glyph unicode="¨" horiz-adv-x="753" d="M135 1278v209h152v-209h-152zM467 1278v209h151v-209h-151z" />
-<glyph unicode="©" horiz-adv-x="1718" d="M100 727q0 208 98 377t271 264.5t387 95.5q130 0 247.5 -36t211 -102.5t162.5 -156.5t106 -203.5t37 -238.5q0 -157 -58 -294.5t-159 -235.5t-243 -154.5t-304 -56.5q-160 0 -300.5 56.5t-240.5 154.5t-157.5 235.5t-57.5 294.5zM182 725q0 -185 87 -336.5t242 -238.5 t345 -87t345 82.5t245 234t90 343.5q0 187 -88 339t-243.5 238t-348.5 86q-142 0 -267.5 -50.5t-214.5 -138t-140.5 -210.5t-51.5 -262zM383 727q0 72 18.5 140.5t57.5 130.5t94 108.5t135 74t174 27.5q144 0 253.5 -62t158.5 -175l-174 -56q-35 75 -101.5 106.5 t-136.5 31.5q-138 0 -216.5 -97.5t-78.5 -228.5q0 -98 47 -174.5t114 -113t138 -36.5q74 0 144.5 39.5t101.5 104.5l174 -53q-38 -94 -151.5 -170t-262.5 -76q-133 0 -244 59.5t-178 170t-67 249.5z" />
-<glyph unicode="ª" horiz-adv-x="894" d="M92 932q0 101 85.5 165t219.5 64q116 0 197 -35v52q0 83 -47.5 129.5t-134.5 46.5q-107 0 -232 -84l-47 92q143 94 291 94q149 0 232 -77t83 -218v-268q0 -25 10 -36.5t33 -12.5v-127q-30 -6 -55 -6q-50 0 -79 21t-30 59l-2 47q-51 -64 -123.5 -98.5t-156.5 -34.5 q-103 0 -173.5 65.5t-70.5 161.5zM229 944q0 -56 42.5 -93.5t105.5 -37.5q79 0 148 42t69 89v98q-69 31 -172 31q-87 0 -140 -35.5t-53 -93.5z" />
-<glyph unicode="«" horiz-adv-x="1226" d="M86 479v94l518 371v-151l-373 -263l373 -256v-151zM582 479v94l518 371v-151l-373 -263l373 -256v-151z" />
-<glyph unicode="¬" horiz-adv-x="1222" d="M152 604v164h929v-522h-155v358h-774z" />
-<glyph unicode="­" horiz-adv-x="1187" d="M129 477v164h930v-164h-930z" />
-<glyph unicode="®" horiz-adv-x="1718" d="M100 727q0 156 57.5 293t157.5 234.5t241 153.5t302 56t302.5 -56t242.5 -153.5t159 -234.5t58 -293q0 -157 -58 -294.5t-159 -235.5t-242.5 -154.5t-302.5 -56.5t-302 56.5t-241 154.5t-157.5 235.5t-57.5 294.5zM186 727q0 -140 50.5 -263t139 -211.5t214 -140 t268.5 -51.5q189 0 343 83t243.5 235.5t89.5 345.5q0 139 -51.5 261.5t-140.5 210t-215 138.5t-269 51t-268.5 -51t-214 -138.5t-139 -209.5t-50.5 -260zM541 266v920h393q117 0 197.5 -91.5t80.5 -203.5q0 -96 -54.5 -174t-141.5 -99l223 -352h-149l-209 332h-207v-332 h-133zM674 715h254q72 0 112.5 49t40.5 127q0 77 -45.5 125.5t-113.5 48.5h-248v-350z" />
-<glyph unicode="¯" horiz-adv-x="825" d="M115 1339v119h598v-119h-598z" />
-<glyph unicode="°" horiz-adv-x="559" d="M96 1305q0 75 53 126.5t130 51.5q78 0 130 -51.5t52 -126.5q0 -81 -52 -134t-130 -53q-77 0 -130 54t-53 133zM193 1300q0 -35 24 -59q27 -27 62 -27q37 0 61 27q25 25 25 59q0 33 -25 62q-21 24 -61 24q-38 0 -62 -24q-24 -27 -24 -62z" />
-<glyph unicode="±" horiz-adv-x="950" d="M135 104v148h680v-148h-680zM135 680v147h258v279h164v-279h258v-147h-258v-279h-164v279h-258z" />
-<glyph unicode="²" horiz-adv-x="815" d="M72 655q0 157 60.5 243t199.5 142q16 6 54.5 20t57 21.5t50 22t48 27t34.5 30.5t26 39.5t8 46.5q0 62 -51.5 100.5t-146.5 38.5q-155 0 -258 -108l-74 80q12 17 38 38t68.5 45t106.5 40t135 16q149 0 229 -69t80 -183q0 -49 -20 -90t-45.5 -66t-70.5 -48.5t-72.5 -33 t-73.5 -24.5q-205 -67 -205 -217h473v-111h-651z" />
-<glyph unicode="³" horiz-adv-x="813" d="M70 819l65 78q7 -48 79.5 -93.5t176.5 -45.5q98 0 164 36.5t66 96.5q0 67 -82 103t-224 36h-47v105h47q131 0 204 32t73 95q0 59 -60.5 95t-144.5 36q-81 0 -141.5 -30t-93.5 -81l-76 88q39 59 125 93t186 34q140 0 233 -65.5t93 -163.5q0 -70 -48.5 -116t-140.5 -65 q95 -13 153 -72.5t58 -140.5q0 -72 -48.5 -125.5t-125 -79.5t-168.5 -26q-128 0 -215.5 47.5t-107.5 128.5z" />
-<glyph unicode="´" horiz-adv-x="475" d="M98 1288l119 207h180l-180 -248z" />
-<glyph unicode="µ" horiz-adv-x="1249" d="M158 -434v1503h180v-606q0 -328 231 -328q109 0 207 71.5t144 192.5v670h180v-848q0 -34 13 -48.5t44 -16.5v-156q-62 -8 -74 -8q-58 0 -94 29t-39 79l-6 129q-52 -103 -160 -176t-225 -73q-89 0 -147.5 43.5t-83.5 113.5v-571h-170z" />
-<glyph unicode="¶" horiz-adv-x="1259" d="M74 952q0 237 152 369.5t425 132.5h527v-139h-144v-1479h-155v623h-138v-623h-155v623q-235 3 -373.5 135.5t-138.5 357.5zM227 956q0 -166 101 -257t258 -101v717q-171 -3 -265 -98.5t-94 -260.5zM741 598h138v717h-138v-717z" />
-<glyph unicode="·" horiz-adv-x="409" d="M129 502v254h152v-254h-152z" />
-<glyph unicode="¸" horiz-adv-x="606" d="M45 -334l41 76q76 -39 180 -39q117 0 117 72q0 71 -104 71q-73 0 -164 -26l118 223l80 -29l-71 -112q29 10 73 10q74 0 118 -33.5t44 -97.5q0 -72 -58 -113t-167 -41q-104 0 -207 39z" />
-<glyph unicode="¹" horiz-adv-x="573" d="M68 1270v112q24 0 52.5 11.5t52.5 27.5t44.5 33t32 29t12.5 14h115v-729h151v-113h-430v113h164v602q-25 -31 -87 -65.5t-107 -34.5z" />
-<glyph unicode="º" horiz-adv-x="915" d="M84 1079q0 157 104.5 267t268.5 110t268 -110t104 -267q0 -154 -104 -264t-268 -110t-268.5 110t-104.5 264zM231 1077q0 -104 66 -176t160 -72t159.5 73t65.5 179q0 105 -65.5 176.5t-159.5 71.5t-160 -72.5t-66 -179.5z" />
-<glyph unicode="»" horiz-adv-x="1226" d="M127 123v151l373 256l-373 263v151l518 -371v-94zM623 123v151l372 256l-372 263v151l518 -371v-94z" />
-<glyph unicode="¼" horiz-adv-x="1763" d="M90 1270v112q38 0 86.5 28t77.5 54.5t31 32.5h114v-729h152v-113h-430v113h164v602q-25 -30 -87.5 -65t-107.5 -35zM301 68l573 690l549 706l88 -75l-567 -687l-557 -712zM989 205v108l498 518h78v-516h121v-110h-121v-205h-113v205h-463zM1106 315h350v369z" />
-<glyph unicode="½" horiz-adv-x="1835" d="M96 1270v112q38 0 86.5 28t77.5 54.5t31 32.5h115v-729h151v-113h-430v113h164v602q-25 -30 -87.5 -65t-107.5 -35zM231 68l574 690l549 706l88 -75l-568 -687l-557 -712zM1106 0q0 158 58.5 244t193.5 141q17 7 52 20t54.5 21t48.5 21.5t45.5 26.5t33.5 30.5t24.5 39 t7.5 46.5q0 64 -49.5 102.5t-140.5 38.5q-149 0 -250 -110l-70 81q13 17 37.5 38t65 45.5t102 40.5t129.5 16q145 0 222 -69t77 -185q0 -41 -11.5 -76t-36 -61t-46.5 -44t-60 -34.5t-58 -24.5t-58 -20q-197 -66 -197 -217h469v-111h-643z" />
-<glyph unicode="¾" horiz-adv-x="1794" d="M88 819l66 78q7 -48 79.5 -93.5t176.5 -45.5q98 0 163.5 36.5t65.5 96.5q0 67 -81.5 103t-223.5 36h-47v105h47q131 0 203.5 32t72.5 95q0 59 -60.5 95t-143.5 36q-81 0 -142 -30t-94 -81l-76 88q39 59 125 93t187 34q139 0 232 -65.5t93 -163.5q0 -70 -48.5 -116 t-139.5 -65q95 -13 153 -72.5t58 -140.5q0 -72 -48.5 -125.5t-125 -79.5t-168.5 -26q-128 0 -216 47.5t-108 128.5zM371 68l573 690l549 706l88 -75l-567 -687l-557 -712zM1010 205v108l497 518h78v-516h121v-110h-121v-205h-112v205h-463zM1126 315h351v369z" />
-<glyph unicode="¿" horiz-adv-x="972" d="M74 -43q0 60 14.5 110t35.5 84t59 66.5t68.5 52t80.5 47.5q31 17 43.5 24t39 25t39 31t30.5 35.5t26.5 45.5t15 55.5t6.5 70.5h152q0 -114 -40.5 -196t-131.5 -140q-14 -9 -54 -32t-63.5 -38t-58 -43t-54 -55t-34.5 -66.5t-15 -84.5q0 -110 74.5 -173t177.5 -63 q98 0 178.5 55.5t124.5 139.5l121 -80q-54 -123 -172 -193.5t-256 -70.5q-78 0 -149.5 24.5t-130 71t-93 123.5t-34.5 174zM528 799v237h152v-237h-152z" />
-<glyph unicode="À" horiz-adv-x="1388" d="M23 0l598 1454h151l596 -1454h-197l-172 426h-610l-170 -426h-196zM426 569h532l-262 672zM483 1878h179l120 -207l-116 -41z" />
-<glyph unicode="Á" horiz-adv-x="1388" d="M23 0l598 1454h151l596 -1454h-197l-172 426h-610l-170 -426h-196zM426 569h532l-262 672zM608 1669l119 207h180l-180 -248z" />
-<glyph unicode="Â" horiz-adv-x="1388" d="M23 0l598 1454h151l596 -1454h-197l-172 426h-610l-170 -426h-196zM424 1692l207 184h131l207 -184l-99 -50l-174 130l-174 -130zM426 569h532l-262 672z" />
-<glyph unicode="Ã" horiz-adv-x="1388" d="M23 0l598 1454h151l596 -1454h-197l-172 426h-610l-170 -426h-196zM352 1653q0 18 9.5 48.5t30.5 69t64 66t99 27.5q49 0 94 -22t87 -44t83 -22q29 0 51.5 10t34 23t18.5 28.5t9 24.5t2 14h106q0 -12 -5.5 -34t-21 -53.5t-38.5 -58.5t-63 -46t-89 -19q-52 0 -99.5 21.5 t-88 43t-76.5 21.5q-31 0 -53 -13.5t-31 -33t-12.5 -32t-3.5 -19.5h-107zM426 569h532l-262 672z" />
-<glyph unicode="Ä" horiz-adv-x="1388" d="M23 0l598 1454h151l596 -1454h-197l-172 426h-610l-170 -426h-196zM426 569h532l-262 672zM455 1661v209h151v-209h-151zM786 1661v209h152v-209h-152z" />
-<glyph unicode="Å" horiz-adv-x="1388" d="M23 0l598 1454h151l596 -1454h-197l-172 426h-610l-170 -426h-196zM426 569h532l-262 672zM528 1735q0 64 46.5 102.5t119.5 38.5q74 0 120 -38.5t46 -102.5t-46 -103t-120 -39q-73 0 -119.5 39t-46.5 103zM612 1735q0 -33 23.5 -55.5t58.5 -22.5q33 0 58.5 22.5 t25.5 55.5q0 35 -24 56t-60 21q-35 0 -58.5 -21.5t-23.5 -55.5z" />
-<glyph unicode="Æ" horiz-adv-x="2023" d="M-10 0l928 1454h999v-164h-768v-467h657v-164h-657v-495h786v-164h-968v426h-510l-267 -426h-200zM539 590h415v649z" />
-<glyph unicode="Ç" horiz-adv-x="1400" d="M84 737q0 106 29.5 210.5t88.5 197t140.5 163.5t194 112.5t239.5 41.5q188 0 329.5 -86.5t211.5 -230.5l-146 -94q-31 66 -78 115.5t-101.5 76.5t-110 40t-113.5 13q-117 0 -214 -50t-157.5 -131.5t-93.5 -181t-33 -204.5q0 -151 65 -282.5t181.5 -212t257.5 -80.5 q80 0 156.5 25.5t148 85t111.5 145.5l153 -84q-62 -144 -209.5 -233.5t-314.5 -102.5l-55 -88q29 10 74 10q74 0 117.5 -33.5t43.5 -97.5q0 -72 -58 -113t-167 -41q-104 0 -207 39l41 76q76 -39 180 -39q117 0 117 72q0 71 -104 71q-73 0 -164 -26l90 170q-138 8 -259.5 76 t-204.5 172.5t-131 235t-48 263.5z" />
-<glyph unicode="È" horiz-adv-x="1249" d="M174 0v1454h969v-164h-785v-471h682v-153h-682v-502h803v-164h-987zM471 1878h178l121 -207l-117 -41z" />
-<glyph unicode="É" horiz-adv-x="1249" d="M174 0v1454h969v-164h-785v-471h682v-153h-682v-502h803v-164h-987zM596 1669l119 207h180l-180 -248z" />
-<glyph unicode="Ê" horiz-adv-x="1249" d="M174 0v1454h969v-164h-785v-471h682v-153h-682v-502h803v-164h-987zM412 1692l206 184h132l206 -184l-98 -50l-174 130l-174 -130z" />
-<glyph unicode="Ë" horiz-adv-x="1249" d="M174 0v1454h969v-164h-785v-471h682v-153h-682v-502h803v-164h-987zM442 1661v209h152v-209h-152zM774 1661v209h152v-209h-152z" />
-<glyph unicode="Ì" horiz-adv-x="532" d="M53 1878h178l121 -207l-116 -41zM174 0v1452h184v-1452h-184z" />
-<glyph unicode="Í" horiz-adv-x="532" d="M174 0v1452h184v-1452h-184zM178 1669l119 207h180l-180 -248z" />
-<glyph unicode="Î" horiz-adv-x="532" d="M-6 1692l207 184h131l207 -184l-99 -50l-174 130l-174 -130zM174 0v1452h184v-1452h-184z" />
-<glyph unicode="Ï" horiz-adv-x="532" d="M25 1661v209h151v-209h-151zM174 0v1452h184v-1452h-184zM356 1661v209h152v-209h-152z" />
-<glyph unicode="Ð" horiz-adv-x="1480" d="M68 662v139h116v653h504q137 0 252 -37t197.5 -103t140 -156.5t85.5 -199t28 -229.5q0 -331 -191.5 -530t-511.5 -199h-504v662h-116zM369 164h319q164 0 282 74.5t176 201t58 289.5q0 252 -137 406.5t-379 154.5h-319v-489h329v-139h-329v-498z" />
-<glyph unicode="Ñ" horiz-adv-x="1576" d="M174 0v1454h143l902 -1132v1130h184v-1452h-156l-889 1110v-1110h-184zM449 1653q0 18 9.5 48.5t30 69t63.5 66t99 27.5q49 0 94 -22t87 -44t83 -22q29 0 51.5 10t34 23t18.5 28.5t9 24.5t2 14h107q0 -12 -5.5 -34t-21 -53.5t-38.5 -58.5t-63 -46t-89 -19 q-52 0 -100 21.5t-88.5 43t-76.5 21.5q-31 0 -53 -13.5t-31 -33t-12.5 -32t-3.5 -19.5h-106z" />
-<glyph unicode="Ò" horiz-adv-x="1538" d="M84 727q0 192 89 361t248.5 272.5t350.5 103.5q119 0 227 -41.5t189.5 -113.5t142 -166t92 -201.5t31.5 -216.5q0 -193 -88.5 -361t-247.5 -271t-350 -103q-148 0 -278 62.5t-217.5 166t-138 236t-50.5 272.5zM270 727q0 -111 36.5 -214.5t100.5 -182.5t158.5 -126.5 t204.5 -47.5q112 0 207.5 49.5t158 130.5t97.5 183t35 208q0 149 -62 278.5t-177.5 210t-258.5 80.5q-112 0 -208 -49t-158.5 -129.5t-98 -182t-35.5 -208.5zM559 1878h178l121 -207l-117 -41z" />
-<glyph unicode="Ó" horiz-adv-x="1538" d="M84 727q0 192 89 361t248.5 272.5t350.5 103.5q119 0 227 -41.5t189.5 -113.5t142 -166t92 -201.5t31.5 -216.5q0 -193 -88.5 -361t-247.5 -271t-350 -103q-148 0 -278 62.5t-217.5 166t-138 236t-50.5 272.5zM270 727q0 -111 36.5 -214.5t100.5 -182.5t158.5 -126.5 t204.5 -47.5q112 0 207.5 49.5t158 130.5t97.5 183t35 208q0 149 -62 278.5t-177.5 210t-258.5 80.5q-112 0 -208 -49t-158.5 -129.5t-98 -182t-35.5 -208.5zM684 1669l119 207h180l-180 -248z" />
-<glyph unicode="Ô" horiz-adv-x="1538" d="M84 727q0 192 89 361t248.5 272.5t350.5 103.5q119 0 227 -41.5t189.5 -113.5t142 -166t92 -201.5t31.5 -216.5q0 -193 -88.5 -361t-247.5 -271t-350 -103q-148 0 -278 62.5t-217.5 166t-138 236t-50.5 272.5zM270 727q0 -111 36.5 -214.5t100.5 -182.5t158.5 -126.5 t204.5 -47.5q112 0 207.5 49.5t158 130.5t97.5 183t35 208q0 149 -62 278.5t-177.5 210t-258.5 80.5q-112 0 -208 -49t-158.5 -129.5t-98 -182t-35.5 -208.5zM500 1692l207 184h131l206 -184l-98 -50l-174 130l-174 -130z" />
-<glyph unicode="Õ" horiz-adv-x="1538" d="M84 727q0 192 89 361t248.5 272.5t350.5 103.5q119 0 227 -41.5t189.5 -113.5t142 -166t92 -201.5t31.5 -216.5q0 -193 -88.5 -361t-247.5 -271t-350 -103q-148 0 -278 62.5t-217.5 166t-138 236t-50.5 272.5zM270 727q0 -111 36.5 -214.5t100.5 -182.5t158.5 -126.5 t204.5 -47.5q112 0 207.5 49.5t158 130.5t97.5 183t35 208q0 149 -62 278.5t-177.5 210t-258.5 80.5q-112 0 -208 -49t-158.5 -129.5t-98 -182t-35.5 -208.5zM428 1653q0 18 9.5 48.5t30.5 69t64 66t99 27.5q49 0 94 -22t87 -44t83 -22q29 0 51.5 10t34 23t18.5 28.5t9 24.5 t2 14h106q0 -12 -5.5 -34t-21 -53.5t-38.5 -58.5t-63 -46t-89 -19q-52 0 -99.5 21.5t-88 43t-76.5 21.5q-31 0 -53 -13.5t-31 -33t-12.5 -32t-3.5 -19.5h-107z" />
-<glyph unicode="Ö" horiz-adv-x="1538" d="M84 727q0 192 89 361t248.5 272.5t350.5 103.5q119 0 227 -41.5t189.5 -113.5t142 -166t92 -201.5t31.5 -216.5q0 -193 -88.5 -361t-247.5 -271t-350 -103q-148 0 -278 62.5t-217.5 166t-138 236t-50.5 272.5zM270 727q0 -111 36.5 -214.5t100.5 -182.5t158.5 -126.5 t204.5 -47.5q112 0 207.5 49.5t158 130.5t97.5 183t35 208q0 149 -62 278.5t-177.5 210t-258.5 80.5q-112 0 -208 -49t-158.5 -129.5t-98 -182t-35.5 -208.5zM530 1661v209h152v-209h-152zM862 1661v209h152v-209h-152z" />
-<glyph unicode="×" horiz-adv-x="956" d="M127 324l235 235l-231 234l115 112l231 -231l234 233l112 -114l-231 -234l237 -237l-114 -113l-238 237l-237 -237z" />
-<glyph unicode="Ø" horiz-adv-x="1540" d="M84 727q0 192 89 361t248.5 272.5t350.5 103.5q180 0 330 -94l57 84h203l-127 -188q103 -107 161 -250.5t58 -290.5q0 -193 -88.5 -361t-247.5 -271t-350 -103q-184 0 -334 92l-55 -82h-201l125 186q-104 104 -161.5 246t-57.5 295zM270 727q0 -111 34.5 -213t98.5 -180 l605 895q-109 67 -238 67q-112 0 -208 -49t-158.5 -129.5t-98 -182t-35.5 -208.5zM528 223q109 -67 242 -67q112 0 207.5 49.5t158 130.5t97.5 183t35 208q0 108 -35 209.5t-98 179.5z" />
-<glyph unicode="Ù" horiz-adv-x="1542" d="M152 719v735h184v-735q0 -90 13 -169t44.5 -152.5t80 -126t124.5 -84t172 -31.5q71 0 130.5 16.5t104 46t79 71.5t57.5 90t37.5 105.5t21 114.5t6.5 119v735h185v-735q0 -121 -21 -227t-68.5 -199t-118.5 -159.5t-176 -105t-235 -38.5q-135 0 -242 40.5t-176.5 108.5 t-116 162.5t-66 198t-19.5 219.5zM559 1878h178l121 -207l-117 -41z" />
-<glyph unicode="Ú" horiz-adv-x="1542" d="M152 719v735h184v-735q0 -90 13 -169t44.5 -152.5t80 -126t124.5 -84t172 -31.5q71 0 130.5 16.5t104 46t79 71.5t57.5 90t37.5 105.5t21 114.5t6.5 119v735h185v-735q0 -121 -21 -227t-68.5 -199t-118.5 -159.5t-176 -105t-235 -38.5q-135 0 -242 40.5t-176.5 108.5 t-116 162.5t-66 198t-19.5 219.5zM684 1669l119 207h180l-180 -248z" />
-<glyph unicode="Û" horiz-adv-x="1542" d="M152 719v735h184v-735q0 -90 13 -169t44.5 -152.5t80 -126t124.5 -84t172 -31.5q71 0 130.5 16.5t104 46t79 71.5t57.5 90t37.5 105.5t21 114.5t6.5 119v735h185v-735q0 -121 -21 -227t-68.5 -199t-118.5 -159.5t-176 -105t-235 -38.5q-135 0 -242 40.5t-176.5 108.5 t-116 162.5t-66 198t-19.5 219.5zM500 1692l207 184h131l206 -184l-98 -50l-174 130l-174 -130z" />
-<glyph unicode="Ü" horiz-adv-x="1542" d="M152 719v735h184v-735q0 -90 13 -169t44.5 -152.5t80 -126t124.5 -84t172 -31.5q71 0 130.5 16.5t104 46t79 71.5t57.5 90t37.5 105.5t21 114.5t6.5 119v735h185v-735q0 -121 -21 -227t-68.5 -199t-118.5 -159.5t-176 -105t-235 -38.5q-135 0 -242 40.5t-176.5 108.5 t-116 162.5t-66 198t-19.5 219.5zM530 1661v209h152v-209h-152zM862 1661v209h152v-209h-152z" />
-<glyph unicode="Ý" horiz-adv-x="1304" d="M8 1454h203l440 -758l445 758h200l-553 -924v-530h-184v535zM563 1669l119 207h180l-180 -248z" />
-<glyph unicode="Þ" horiz-adv-x="1241" d="M174 0v1454h184v-280h385q123 0 226 -68.5t159 -175t56 -221.5q0 -122 -52.5 -228t-152 -172.5t-223.5 -66.5h-398v-242h-184zM358 406h390q112 0 181.5 89.5t69.5 213.5q0 123 -78.5 212t-185.5 89h-377v-604z" />
-<glyph unicode="ß" horiz-adv-x="1132" d="M141 0v1059q0 178 119.5 290.5t304.5 112.5q167 0 277 -91.5t110 -237.5q0 -108 -59.5 -197.5t-144.5 -112.5q144 -30 226.5 -139t82.5 -258q0 -204 -155.5 -317t-412.5 -121v166q177 3 279 73t102 213q0 132 -85 211.5t-224 79.5h-39v164h37q99 0 160 58t61 153 q0 98 -63.5 149.5t-157.5 51.5q-81 0 -138.5 -40t-82.5 -101t-25 -136v-1030h-172z" />
-<glyph unicode="à" d="M61 307q0 151 125.5 243.5t325.5 92.5q167 0 299 -53v86q0 131 -75 205.5t-208 74.5q-162 0 -340 -125l-59 117q207 139 420 139q205 0 323.5 -114t118.5 -316v-436q0 -34 13.5 -48.5t44.5 -16.5v-156q-54 -8 -74 -8q-51 0 -91.5 27t-43.5 81l-4 76 q-69 -93 -180.5 -144.5t-225.5 -51.5q-160 0 -264.5 94.5t-104.5 232.5zM233 324q0 -87 66 -148t176 -61q85 0 167.5 36t129.5 91q39 45 39 84v157q-132 52 -270 52q-139 0 -223.5 -57.5t-84.5 -153.5zM332 1495h178l121 -207l-117 -41z" />
-<glyph unicode="á" d="M61 307q0 151 125.5 243.5t325.5 92.5q167 0 299 -53v86q0 131 -75 205.5t-208 74.5q-162 0 -340 -125l-59 117q207 139 420 139q205 0 323.5 -114t118.5 -316v-436q0 -34 13.5 -48.5t44.5 -16.5v-156q-54 -8 -74 -8q-51 0 -91.5 27t-43.5 81l-4 76 q-69 -93 -180.5 -144.5t-225.5 -51.5q-160 0 -264.5 94.5t-104.5 232.5zM233 324q0 -87 66 -148t176 -61q85 0 167.5 36t129.5 91q39 45 39 84v157q-132 52 -270 52q-139 0 -223.5 -57.5t-84.5 -153.5zM457 1288l118 207h181l-181 -248z" />
-<glyph unicode="â" d="M61 307q0 151 125.5 243.5t325.5 92.5q167 0 299 -53v86q0 131 -75 205.5t-208 74.5q-162 0 -340 -125l-59 117q207 139 420 139q205 0 323.5 -114t118.5 -316v-436q0 -34 13.5 -48.5t44.5 -16.5v-156q-54 -8 -74 -8q-51 0 -91.5 27t-43.5 81l-4 76 q-69 -93 -180.5 -144.5t-225.5 -51.5q-160 0 -264.5 94.5t-104.5 232.5zM233 324q0 -87 66 -148t176 -61q85 0 167.5 36t129.5 91q39 45 39 84v157q-132 52 -270 52q-139 0 -223.5 -57.5t-84.5 -153.5zM272 1311l207 184h131l207 -184l-98 -49l-174 129l-174 -129z" />
-<glyph unicode="ã" d="M61 307q0 151 125.5 243.5t325.5 92.5q167 0 299 -53v86q0 131 -75 205.5t-208 74.5q-162 0 -340 -125l-59 117q207 139 420 139q205 0 323.5 -114t118.5 -316v-436q0 -34 13.5 -48.5t44.5 -16.5v-156q-54 -8 -74 -8q-51 0 -91.5 27t-43.5 81l-4 76 q-69 -93 -180.5 -144.5t-225.5 -51.5q-160 0 -264.5 94.5t-104.5 232.5zM201 1272q0 18 9.5 48.5t30 69t63.5 66t99 27.5q49 0 94.5 -22t87.5 -44t83 -22q29 0 51.5 10t34 23t18.5 28.5t8.5 24.5t1.5 14h107q0 -12 -5.5 -34t-21 -53.5t-38.5 -58.5t-63 -46t-89 -19 q-52 0 -99.5 21.5t-88 43t-76.5 21.5q-25 0 -44.5 -9.5t-30 -22.5t-17 -28.5t-8 -24.5t-1.5 -13h-106zM233 324q0 -87 66 -148t176 -61q85 0 167.5 36t129.5 91q39 45 39 84v157q-132 52 -270 52q-139 0 -223.5 -57.5t-84.5 -153.5z" />
-<glyph unicode="ä" d="M61 307q0 151 125.5 243.5t325.5 92.5q167 0 299 -53v86q0 131 -75 205.5t-208 74.5q-162 0 -340 -125l-59 117q207 139 420 139q205 0 323.5 -114t118.5 -316v-436q0 -34 13.5 -48.5t44.5 -16.5v-156q-54 -8 -74 -8q-51 0 -91.5 27t-43.5 81l-4 76 q-69 -93 -180.5 -144.5t-225.5 -51.5q-160 0 -264.5 94.5t-104.5 232.5zM233 324q0 -87 66 -148t176 -61q85 0 167.5 36t129.5 91q39 45 39 84v157q-132 52 -270 52q-139 0 -223.5 -57.5t-84.5 -153.5zM303 1278v209h152v-209h-152zM635 1278v209h151v-209h-151z" />
-<glyph unicode="å" d="M61 307q0 151 125.5 243.5t325.5 92.5q167 0 299 -53v86q0 131 -75 205.5t-208 74.5q-162 0 -340 -125l-59 117q207 139 420 139q205 0 323.5 -114t118.5 -316v-436q0 -34 13.5 -48.5t44.5 -16.5v-156q-54 -8 -74 -8q-51 0 -91.5 27t-43.5 81l-4 76 q-69 -93 -180.5 -144.5t-225.5 -51.5q-160 0 -264.5 94.5t-104.5 232.5zM233 324q0 -87 66 -148t176 -61q85 0 167.5 36t129.5 91q39 45 39 84v157q-132 52 -270 52q-139 0 -223.5 -57.5t-84.5 -153.5zM377 1354q0 64 46.5 102.5t119.5 38.5q74 0 120 -38.5t46 -102.5 t-46 -103t-120 -39q-73 0 -119.5 39t-46.5 103zM461 1354q0 -33 23.5 -55.5t58.5 -22.5q33 0 58.5 22.5t25.5 55.5q0 35 -24 56.5t-60 21.5q-35 0 -58.5 -21.5t-23.5 -56.5z" />
-<glyph unicode="æ" horiz-adv-x="1912" d="M66 313q0 146 125 238t323 92q139 0 264 -41q8 83 29 135q-15 104 -87 161.5t-190 57.5q-159 0 -340 -125l-59 117q210 139 416 139q129 0 224 -50.5t147 -143.5q69 90 172.5 142t226.5 52q158 0 283 -75.5t192 -200.5t68 -276q0 -32 -5 -62h-907q12 -157 121 -257.5 t260 -100.5q99 0 185.5 49.5t119.5 128.5l156 -43q-53 -120 -180.5 -195t-286.5 -75q-141 0 -257.5 62t-188.5 169q-44 -78 -123.5 -132t-163 -76.5t-168.5 -22.5q-151 0 -253.5 96t-102.5 237zM236 328q0 -91 67.5 -152t165.5 -61q97 0 180 35.5t127 95.5q36 36 39 71 q-32 64 -37 179q-115 39 -237 39q-135 0 -220 -57.5t-85 -149.5zM946 590h742q-12 160 -116.5 261t-256.5 101t-256 -102t-113 -260z" />
-<glyph unicode="ç" horiz-adv-x="1138" d="M76 537q0 151 66.5 275.5t191.5 199.5t284 75q156 0 273.5 -69.5t177.5 -190.5l-176 -55q-41 75 -115.5 117.5t-163.5 42.5q-150 0 -252 -113t-102 -282q0 -168 104.5 -285t251.5 -117q93 0 176.5 49t108.5 117l176 -53q-45 -109 -155 -181.5t-254 -84.5l-52 -80 q29 10 74 10q74 0 118 -33.5t44 -97.5q0 -72 -58 -113t-167 -41q-104 0 -207 39l41 76q76 -39 180 -39q117 0 117 72q0 71 -105 71q-73 0 -164 -26l86 162q-219 17 -359 176.5t-140 378.5z" />
-<glyph unicode="è" horiz-adv-x="1210" d="M74 535q0 112 40.5 213t111.5 176t174 119t221 44t219.5 -44.5t169.5 -119.5t106.5 -174t38.5 -206q0 -46 -4 -70h-887q12 -156 116 -257t245 -101q99 0 185.5 49.5t119.5 128.5l155 -43q-53 -120 -180.5 -195t-286.5 -75q-157 0 -282.5 76t-193.5 202.5t-68 276.5z M260 606h725q-13 152 -116.5 249t-247.5 97t-247.5 -97.5t-113.5 -248.5zM399 1495h179l120 -207l-116 -41z" />
-<glyph unicode="é" horiz-adv-x="1210" d="M74 535q0 112 40.5 213t111.5 176t174 119t221 44t219.5 -44.5t169.5 -119.5t106.5 -174t38.5 -206q0 -46 -4 -70h-887q12 -156 116 -257t245 -101q99 0 185.5 49.5t119.5 128.5l155 -43q-53 -120 -180.5 -195t-286.5 -75q-157 0 -282.5 76t-193.5 202.5t-68 276.5z M260 606h725q-13 152 -116.5 249t-247.5 97t-247.5 -97.5t-113.5 -248.5zM524 1288l119 207h180l-180 -248z" />
-<glyph unicode="ê" horiz-adv-x="1210" d="M74 535q0 112 40.5 213t111.5 176t174 119t221 44t219.5 -44.5t169.5 -119.5t106.5 -174t38.5 -206q0 -46 -4 -70h-887q12 -156 116 -257t245 -101q99 0 185.5 49.5t119.5 128.5l155 -43q-53 -120 -180.5 -195t-286.5 -75q-157 0 -282.5 76t-193.5 202.5t-68 276.5z M260 606h725q-13 152 -116.5 249t-247.5 97t-247.5 -97.5t-113.5 -248.5zM340 1311l207 184h131l207 -184l-99 -49l-174 129l-174 -129z" />
-<glyph unicode="ë" horiz-adv-x="1210" d="M74 535q0 112 40.5 213t111.5 176t174 119t221 44t219.5 -44.5t169.5 -119.5t106.5 -174t38.5 -206q0 -46 -4 -70h-887q12 -156 116 -257t245 -101q99 0 185.5 49.5t119.5 128.5l155 -43q-53 -120 -180.5 -195t-286.5 -75q-157 0 -282.5 76t-193.5 202.5t-68 276.5z M260 606h725q-13 152 -116.5 249t-247.5 97t-247.5 -97.5t-113.5 -248.5zM371 1278v209h151v-209h-151zM702 1278v209h152v-209h-152z" />
-<glyph unicode="ì" horiz-adv-x="462" d="M18 1495h179l120 -207l-116 -41zM141 0v1069h181v-1069h-181z" />
-<glyph unicode="í" horiz-adv-x="462" d="M141 0v1069h181v-1069h-181zM143 1288l119 207h180l-180 -248z" />
-<glyph unicode="î" horiz-adv-x="462" d="M-41 1311l207 184h131l207 -184l-98 -49l-175 129l-174 -129zM141 0v1069h181v-1069h-181z" />
-<glyph unicode="ï" horiz-adv-x="462" d="M-10 1278v209h151v-209h-151zM141 0v1069h181v-1069h-181zM322 1278v209h151v-209h-151z" />
-<glyph unicode="ð" horiz-adv-x="1241" d="M78 477q0 132 67 245.5t182.5 180t250.5 66.5q126 0 232.5 -58.5t162.5 -156.5q-44 267 -238 467l-219 -131l-55 75l203 121q-118 103 -304 209h254q106 -63 191 -139l172 104l55 -76l-160 -94q147 -156 216 -341t69 -355q0 -139 -44.5 -256t-120 -194.5t-175.5 -120.5 t-211 -43q-143 0 -264 65.5t-192.5 180t-71.5 251.5zM262 477q0 -143 102 -242.5t248 -99.5q151 0 256 105t105 249q0 140 -102.5 236t-249.5 96q-150 0 -254.5 -100.5t-104.5 -243.5z" />
-<glyph unicode="ñ" horiz-adv-x="1200" d="M141 0v1069h164v-229q63 113 183.5 180t261.5 67q90 0 154 -33t99 -95.5t50.5 -140t15.5 -179.5v-639h-180v598q0 169 -52 248.5t-159 79.5q-112 0 -216 -80.5t-140 -200.5v-645h-181zM272 1272q0 18 9.5 48.5t30.5 69t64 66t99 27.5q49 0 94 -22t87 -44t83 -22 q29 0 51.5 10t34 23t18.5 28.5t9 24.5t2 14h107q0 -12 -5.5 -34t-21.5 -53.5t-39 -58.5t-63 -46t-89 -19q-52 0 -99.5 21.5t-88 43t-76.5 21.5q-31 0 -53 -13.5t-31 -33t-12.5 -32t-3.5 -19.5h-107z" />
-<glyph unicode="ò" horiz-adv-x="1224" d="M74 532q0 149 67.5 275.5t192 203t278.5 76.5q155 0 280 -76.5t193 -203t68 -275.5q0 -111 -39.5 -211.5t-109.5 -176t-172 -120t-220 -44.5q-157 0 -281 76t-190.5 201.5t-66.5 274.5zM258 530q0 -167 103 -281t251 -114t252.5 116.5t104.5 283.5q0 165 -104.5 281 t-252.5 116q-146 0 -250 -117.5t-104 -284.5zM401 1495h179l120 -207l-116 -41z" />
-<glyph unicode="ó" horiz-adv-x="1224" d="M74 532q0 149 67.5 275.5t192 203t278.5 76.5q155 0 280 -76.5t193 -203t68 -275.5q0 -111 -39.5 -211.5t-109.5 -176t-172 -120t-220 -44.5q-157 0 -281 76t-190.5 201.5t-66.5 274.5zM258 530q0 -167 103 -281t251 -114t252.5 116.5t104.5 283.5q0 165 -104.5 281 t-252.5 116q-146 0 -250 -117.5t-104 -284.5zM524 1288l119 207h180l-180 -248z" />
-<glyph unicode="ô" horiz-adv-x="1224" d="M74 532q0 149 67.5 275.5t192 203t278.5 76.5q155 0 280 -76.5t193 -203t68 -275.5q0 -111 -39.5 -211.5t-109.5 -176t-172 -120t-220 -44.5q-157 0 -281 76t-190.5 201.5t-66.5 274.5zM258 530q0 -167 103 -281t251 -114t252.5 116.5t104.5 283.5q0 165 -104.5 281 t-252.5 116q-146 0 -250 -117.5t-104 -284.5zM340 1311l207 184h131l207 -184l-99 -49l-174 129l-174 -129z" />
-<glyph unicode="õ" horiz-adv-x="1224" d="M74 532q0 149 67.5 275.5t192 203t278.5 76.5q155 0 280 -76.5t193 -203t68 -275.5q0 -111 -39.5 -211.5t-109.5 -176t-172 -120t-220 -44.5q-157 0 -281 76t-190.5 201.5t-66.5 274.5zM258 530q0 -167 103 -281t251 -114t252.5 116.5t104.5 283.5q0 165 -104.5 281 t-252.5 116q-146 0 -250 -117.5t-104 -284.5zM270 1272q0 18 9.5 48.5t30.5 69t64 66t99 27.5q49 0 94 -22t87 -44t83 -22q29 0 51.5 10t34 23t18.5 28.5t9 24.5t2 14h106q0 -12 -5.5 -34t-21 -53.5t-38.5 -58.5t-63 -46t-89 -19q-52 0 -99.5 21.5t-88 43t-76.5 21.5 q-31 0 -53 -13.5t-31 -33t-12.5 -32t-3.5 -19.5h-107z" />
-<glyph unicode="ö" horiz-adv-x="1224" d="M74 532q0 149 67.5 275.5t192 203t278.5 76.5q155 0 280 -76.5t193 -203t68 -275.5q0 -111 -39.5 -211.5t-109.5 -176t-172 -120t-220 -44.5q-157 0 -281 76t-190.5 201.5t-66.5 274.5zM258 530q0 -167 103 -281t251 -114t252.5 116.5t104.5 283.5q0 165 -104.5 281 t-252.5 116q-146 0 -250 -117.5t-104 -284.5zM371 1278v209h151v-209h-151zM702 1278v209h152v-209h-152z" />
-<glyph unicode="÷" horiz-adv-x="1079" d="M127 514v148h825v-148h-825zM463 135v209h153v-209h-153zM463 829v209h153v-209h-153z" />
-<glyph unicode="ø" horiz-adv-x="1224" d="M74 532q0 149 67.5 275.5t192 203t278.5 76.5q157 0 283 -77l49 63h115l-92 -117q88 -78 137 -189t49 -235q0 -111 -39.5 -211.5t-109.5 -176t-172 -120t-220 -44.5q-159 0 -286 79l-50 -63h-112l92 115q-87 77 -134.5 187t-47.5 234zM258 530q0 -171 107 -284l432 628 q-91 58 -185 58q-146 0 -250 -117.5t-104 -284.5zM426 193q83 -58 186 -58q148 0 252.5 116.5t104.5 283.5q0 165 -109 284z" />
-<glyph unicode="ù" horiz-adv-x="1234" d="M131 428v641h180v-606q0 -328 228 -328q112 0 208.5 71.5t143.5 192.5v670h180v-848q0 -34 13 -48.5t44 -16.5v-156q-62 -8 -71 -8q-61 0 -96.5 29t-38.5 79l-7 129q-70 -119 -187.5 -184t-256.5 -65q-167 0 -253.5 113.5t-86.5 334.5zM387 1495h178l121 -207l-117 -41z " />
-<glyph unicode="ú" horiz-adv-x="1234" d="M131 428v641h180v-606q0 -328 228 -328q112 0 208.5 71.5t143.5 192.5v670h180v-848q0 -34 13 -48.5t44 -16.5v-156q-62 -8 -71 -8q-61 0 -96.5 29t-38.5 79l-7 129q-70 -119 -187.5 -184t-256.5 -65q-167 0 -253.5 113.5t-86.5 334.5zM510 1288l119 207h180l-180 -248z " />
-<glyph unicode="û" horiz-adv-x="1234" d="M131 428v641h180v-606q0 -328 228 -328q112 0 208.5 71.5t143.5 192.5v670h180v-848q0 -34 13 -48.5t44 -16.5v-156q-62 -8 -71 -8q-61 0 -96.5 29t-38.5 79l-7 129q-70 -119 -187.5 -184t-256.5 -65q-167 0 -253.5 113.5t-86.5 334.5zM326 1311l206 184h132l206 -184 l-98 -49l-174 129l-174 -129z" />
-<glyph unicode="ü" horiz-adv-x="1234" d="M131 428v641h180v-606q0 -328 228 -328q112 0 208.5 71.5t143.5 192.5v670h180v-848q0 -34 13 -48.5t44 -16.5v-156q-62 -8 -71 -8q-61 0 -96.5 29t-38.5 79l-7 129q-70 -119 -187.5 -184t-256.5 -65q-167 0 -253.5 113.5t-86.5 334.5zM356 1278v209h152v-209h-152z M688 1278v209h152v-209h-152z" />
-<glyph unicode="ý" horiz-adv-x="1112" d="M18 1069h187l364 -907l332 907h172l-524 -1350q-69 -180 -270 -180q-55 0 -91 10v158q56 -6 99 -6q28 0 47.5 17t52.5 82.5t84 199.5zM481 1288l119 207h180l-180 -248z" />
-<glyph unicode="þ" horiz-adv-x="1230" d="M141 -436v1890h185v-534q125 174 323 174q92 0 174 -33t142 -89.5t104.5 -129t67 -154t22.5 -162.5q-2 -147 -72 -276.5t-191.5 -208t-264.5 -78.5q-100 0 -182 46t-123 114v-559h-185zM326 354q0 -83 100 -155t201 -72q98 0 179 56.5t125 148.5t44 196q0 106 -41 197.5 t-119 148t-176 56.5q-103 0 -183 -62.5t-130 -162.5v-351z" />
-<glyph unicode="ÿ" horiz-adv-x="1112" d="M18 1069h187l364 -907l332 907h172l-524 -1350q-69 -180 -270 -180q-55 0 -91 10v158q56 -6 99 -6q28 0 47.5 17t52.5 82.5t84 199.5zM328 1278v209h151v-209h-151zM659 1278v209h152v-209h-152z" />
-<glyph unicode="Œ" horiz-adv-x="2332" d="M84 727q0 192 89 361t248.5 272.5t350.5 103.5q165 0 298 -93t204 -238v321h952v-164h-768v-467h658v-164h-658v-495h787v-164h-971v322q-72 -146 -207 -239t-297 -93q-148 0 -278.5 63t-218.5 166t-138.5 235.5t-50.5 272.5zM270 727q0 -111 36.5 -214.5t100.5 -182.5 t158.5 -126.5t204.5 -47.5q112 0 207.5 49.5t158 130.5t97.5 183t35 210q0 148 -62 277.5t-177.5 210.5t-258.5 81q-112 0 -208 -49.5t-158.5 -130t-98 -182.5t-35.5 -209z" />
-<glyph unicode="œ" horiz-adv-x="2107" d="M74 530q0 155 70.5 283t194 201t273.5 73t268.5 -83t178.5 -228q63 150 179.5 230.5t272.5 80.5q229 0 376 -151.5t161 -400.5q0 -50 -2 -62h-887q12 -153 120 -256.5t255 -103.5q103 0 189.5 50.5t117.5 129.5l152 -43q-55 -121 -184 -195.5t-283 -74.5 q-144 0 -266.5 81.5t-198.5 223.5q-76 -146 -192 -225.5t-259 -79.5q-150 0 -273 72t-193 198.5t-70 279.5zM258 528q0 -167 102 -280t252 -113q151 0 254 115t103 282t-103 283.5t-252 116.5t-252.5 -117.5t-103.5 -286.5zM1155 590h719q-7 104 -58.5 187.5t-133 129 t-175.5 45.5q-145 0 -244 -102t-108 -260z" />
-<glyph unicode="Ÿ" horiz-adv-x="1304" d="M8 1454h203l440 -758l445 758h200l-553 -924v-530h-184v535zM410 1661v209h151v-209h-151zM741 1661v209h152v-209h-152z" />
-<glyph unicode="ˆ" horiz-adv-x="700" d="M78 1311l207 184h131l207 -184l-99 -49l-174 129l-174 -129z" />
-<glyph unicode="˜" horiz-adv-x="849" d="M82 1272q0 18 9.5 48.5t30.5 69t64 66t99 27.5q49 0 94 -22t87 -44t83 -22q29 0 51.5 10t34 23t18.5 28.5t9 24.5t2 14h106q0 -12 -5.5 -34t-21 -53.5t-38.5 -58.5t-63 -46t-89 -19q-52 0 -99.5 21.5t-88 43t-76.5 21.5q-25 0 -44.5 -9.5t-30 -22.5t-17 -28.5t-8 -24.5 t-1.5 -13h-106z" />
-<glyph unicode=" " horiz-adv-x="939" />
-<glyph unicode=" " horiz-adv-x="1878" />
-<glyph unicode=" " horiz-adv-x="939" />
-<glyph unicode=" " horiz-adv-x="1878" />
-<glyph unicode=" " horiz-adv-x="626" />
-<glyph unicode=" " horiz-adv-x="469" />
-<glyph unicode=" " horiz-adv-x="313" />
-<glyph unicode=" " horiz-adv-x="313" />
-<glyph unicode=" " horiz-adv-x="234" />
-<glyph unicode=" " horiz-adv-x="375" />
-<glyph unicode=" " horiz-adv-x="104" />
-<glyph unicode="‐" horiz-adv-x="862" d="M129 477v164h604v-164h-604z" />
-<glyph unicode="‑" horiz-adv-x="862" d="M129 477v164h604v-164h-604z" />
-<glyph unicode="‒" horiz-adv-x="862" d="M129 477v164h604v-164h-604z" />
-<glyph unicode="–" horiz-adv-x="1187" d="M129 477v164h930v-164h-930z" />
-<glyph unicode="—" horiz-adv-x="1861" d="M129 477v164h1604v-164h-1604z" />
-<glyph unicode="‘" horiz-adv-x="434" d="M111 1241v254h151v-225q0 -27 16 -38t35 -11v-134q-82 0 -142 37.5t-60 116.5z" />
-<glyph unicode="’" horiz-adv-x="434" d="M102 1362v133q82 0 142.5 -37.5t60.5 -116.5v-254h-151v226q0 27 -16.5 38t-35.5 11z" />
-<glyph unicode="‚" horiz-adv-x="438" d="M98 -33q19 0 35.5 11t16.5 38v213h149v-241q0 -54 -32 -90.5t-75.5 -50t-93.5 -13.5v133z" />
-<glyph unicode="“" horiz-adv-x="735" d="M111 1241v254h151v-225q0 -27 16 -38t35 -11v-134q-82 0 -142 37.5t-60 116.5zM414 1241v254h151v-225q0 -27 16 -38t35 -11v-134q-82 0 -142 37.5t-60 116.5z" />
-<glyph unicode="”" horiz-adv-x="737" d="M102 1362v133q82 0 142.5 -37.5t60.5 -116.5v-254h-151v226q0 27 -16.5 38t-35.5 11zM406 1362v133q82 0 142 -37.5t60 -116.5v-254h-151v226q0 27 -16 38t-35 11z" />
-<glyph unicode="„" horiz-adv-x="718" d="M98 -33q19 0 35.5 11t16.5 38v213h149v-241q0 -54 -32 -90.5t-75.5 -50t-93.5 -13.5v133zM379 -33q19 0 35 11t16 38v213h150v-241q0 -54 -32 -90.5t-75.5 -50t-93.5 -13.5v133z" />
-<glyph unicode="•" horiz-adv-x="731" d="M174 711q0 78 57.5 135t135.5 57q79 0 135.5 -57t56.5 -135q0 -80 -56.5 -136.5t-135.5 -56.5q-78 0 -135.5 57t-57.5 136z" />
-<glyph unicode="…" horiz-adv-x="1026" d="M129 0v229h152v-229h-152zM438 0v229h150v-229h-150zM745 0v229h152v-229h-152z" />
-<glyph unicode=" " horiz-adv-x="375" />
-<glyph unicode="‹" horiz-adv-x="731" d="M86 479v94l518 371v-151l-373 -263l373 -256v-151z" />
-<glyph unicode="›" horiz-adv-x="731" d="M127 123v151l373 256l-373 263v151l518 -371v-94z" />
-<glyph unicode=" " horiz-adv-x="469" />
-<glyph unicode="€" horiz-adv-x="1630" d="M70 530l45 107h159q-6 50 -6 121h-149l45 106h115q16 94 53.5 181t98 163t138 132.5t178.5 89t214 32.5q188 0 329 -86.5t211 -230.5l-145 -94q-31 66 -78 115.5t-102 76.5t-110.5 40t-113.5 13q-98 0 -182.5 -35.5t-144.5 -96t-100 -137t-58 -163.5h645l-45 -106h-612 q0 -78 6 -121h579l-45 -107h-510q54 -166 182 -271t291 -105q80 0 156.5 25.5t148 85t111.5 145.5l154 -84q-44 -104 -140 -182.5t-209.5 -117t-228.5 -38.5q-119 0 -227.5 43.5t-191 118t-143 172t-91.5 208.5h-227z" />
-<glyph unicode="™" horiz-adv-x="1548" d="M121 1335v123h512v-123h-195v-475h-123v475h-194zM727 860v594h174l158 -364l158 364h176v-594h-123v426l-160 -340h-100l-160 340v-426h-123z" />
-<glyph unicode="◼" horiz-adv-x="1064" d="M0 0v1065h1065v-1065h-1065z" />
-<hkern u1=" " u2="’" k="55" />
-<hkern u1=" " u2="Æ" k="72" />
-<hkern u1=" " u2="y" k="55" />
-<hkern u1=" " u2="w" k="57" />
-<hkern u1=" " u2="v" k="55" />
-<hkern u1=" " u2="Y" k="76" />
-<hkern u1=" " u2="X" k="14" />
-<hkern u1=" " u2="W" k="72" />
-<hkern u1=" " u2="V" k="72" />
-<hkern u1=" " u2="T" k="55" />
-<hkern u1=" " u2="J" k="57" />
-<hkern u1=" " u2="A" k="63" />
-<hkern u1=" " u2="'" k="57" />
-<hkern u1=" " u2=""" k="53" />
-<hkern u1=""" u2=" " k="53" />
-<hkern u1="#" u2="4" k="14" />
-<hkern u1="$" u2="7" k="16" />
-<hkern u1="$" u2="3" k="23" />
-<hkern u1="&" u2="’" k="78" />
-<hkern u1="&" u2="ø" k="-12" />
-<hkern u1="&" u2="Ø" k="-33" />
-<hkern u1="&" u2="Æ" k="-70" />
-<hkern u1="&" u2="z" k="-10" />
-<hkern u1="&" u2="y" k="39" />
-<hkern u1="&" u2="x" k="-35" />
-<hkern u1="&" u2="w" k="39" />
-<hkern u1="&" u2="v" k="37" />
-<hkern u1="&" u2="s" k="-10" />
-<hkern u1="&" u2="Z" k="-10" />
-<hkern u1="&" u2="Y" k="109" />
-<hkern u1="&" u2="X" k="-43" />
-<hkern u1="&" u2="W" k="88" />
-<hkern u1="&" u2="V" k="86" />
-<hkern u1="&" u2="U" k="10" />
-<hkern u1="&" u2="T" k="86" />
-<hkern u1="&" u2="J" k="-18" />
-<hkern u1="&" u2="A" k="-39" />
-<hkern u1="&" u2="'" k="80" />
-<hkern u1="'" u2="‹" k="16" />
-<hkern u1="'" u2="ð" k="106" />
-<hkern u1="'" u2="ï" k="-23" />
-<hkern u1="'" u2="î" k="-12" />
-<hkern u1="'" u2="Æ" k="195" />
-<hkern u1="'" u2="s" k="12" />
-<hkern u1="'" u2="o" k="45" />
-<hkern u1="'" u2="f" k="10" />
-<hkern u1="'" u2="d" k="133" />
-<hkern u1="'" u2="a" k="14" />
-<hkern u1="'" u2="O" k="23" />
-<hkern u1="'" u2="J" k="172" />
-<hkern u1="'" u2="A" k="135" />
-<hkern u1="'" u2="@" k="70" />
-<hkern u1="'" u2="9" k="31" />
-<hkern u1="'" u2="5" k="31" />
-<hkern u1="'" u2="4" k="168" />
-<hkern u1="'" u2="3" k="16" />
-<hkern u1="'" u2="0" k="18" />
-<hkern u1="'" u2="/" k="190" />
-<hkern u1="'" u2="." k="246" />
-<hkern u1="'" u2=" " k="57" />
-<hkern u1="(" u2="ð" k="31" />
-<hkern u1="(" u2="ï" k="-53" />
-<hkern u1="(" u2="î" k="-10" />
-<hkern u1="(" u2="ì" k="-20" />
-<hkern u1="(" u2="Ø" k="-10" />
-<hkern u1="(" u2="Æ" k="-31" />
-<hkern u1="(" u2="y" k="18" />
-<hkern u1="(" u2="x" k="-12" />
-<hkern u1="(" u2="w" k="29" />
-<hkern u1="(" u2="v" k="27" />
-<hkern u1="(" u2="u" k="14" />
-<hkern u1="(" u2="o" k="33" />
-<hkern u1="(" u2="j" k="-25" />
-<hkern u1="(" u2="f" k="8" />
-<hkern u1="(" u2="d" k="35" />
-<hkern u1="(" u2="Y" k="-23" />
-<hkern u1="(" u2="X" k="-23" />
-<hkern u1="(" u2="W" k="-20" />
-<hkern u1="(" u2="V" k="-20" />
-<hkern u1="(" u2="T" k="-4" />
-<hkern u1="(" u2="O" k="31" />
-<hkern u1="(" u2="J" k="-8" />
-<hkern u1="(" u2="A" k="-18" />
-<hkern u1="(" u2="6" k="8" />
-<hkern u1="(" u2="0" k="31" />
-<hkern u1="*" u2="ð" k="98" />
-<hkern u1="*" u2="ï" k="-59" />
-<hkern u1="*" u2="î" k="-49" />
-<hkern u1="*" u2="ì" k="-12" />
-<hkern u1="*" u2="Æ" k="193" />
-<hkern u1="*" u2="x" k="-20" />
-<hkern u1="*" u2="w" k="-20" />
-<hkern u1="*" u2="v" k="-16" />
-<hkern u1="*" u2="s" k="37" />
-<hkern u1="*" u2="o" k="61" />
-<hkern u1="*" u2="f" k="10" />
-<hkern u1="*" u2="d" k="86" />
-<hkern u1="*" u2="a" k="25" />
-<hkern u1="*" u2="Y" k="-29" />
-<hkern u1="*" u2="X" k="-29" />
-<hkern u1="*" u2="W" k="-27" />
-<hkern u1="*" u2="V" k="-4" />
-<hkern u1="*" u2="T" k="-33" />
-<hkern u1="*" u2="O" k="12" />
-<hkern u1="*" u2="J" k="176" />
-<hkern u1="*" u2="A" k="129" />
-<hkern u1="+" u2="8" k="12" />
-<hkern u1="+" u2="7" k="35" />
-<hkern u1="+" u2="4" k="63" />
-<hkern u1="+" u2="3" k="31" />
-<hkern u1="+" u2="2" k="14" />
-<hkern u1="+" u2="1" k="16" />
-<hkern u1="," u2="j" k="-29" />
-<hkern u1="-" u2="Æ" k="33" />
-<hkern u1="-" u2="z" k="51" />
-<hkern u1="-" u2="y" k="43" />
-<hkern u1="-" u2="x" k="59" />
-<hkern u1="-" u2="w" k="45" />
-<hkern u1="-" u2="v" k="41" />
-<hkern u1="-" u2="t" k="12" />
-<hkern u1="-" u2="s" k="12" />
-<hkern u1="-" u2="f" k="10" />
-<hkern u1="-" u2="Z" k="25" />
-<hkern u1="-" u2="Y" k="133" />
-<hkern u1="-" u2="X" k="55" />
-<hkern u1="-" u2="W" k="86" />
-<hkern u1="-" u2="V" k="84" />
-<hkern u1="-" u2="T" k="135" />
-<hkern u1="-" u2="J" k="102" />
-<hkern u1="-" u2="A" k="29" />
-<hkern u1="-" u2="7" k="51" />
-<hkern u1="-" u2="4" k="29" />
-<hkern u1="-" u2="3" k="82" />
-<hkern u1="-" u2="2" k="12" />
-<hkern u1="-" u2="1" k="39" />
-<hkern u1="." u2="’" k="264" />
-<hkern u1="." u2="‘" k="272" />
-<hkern u1="." u2="Æ" k="-4" />
-<hkern u1="." u2="y" k="92" />
-<hkern u1="." u2="w" k="96" />
-<hkern u1="." u2="v" k="88" />
-<hkern u1="." u2="t" k="8" />
-<hkern u1="." u2="f" k="6" />
-<hkern u1="." u2="d" k="10" />
-<hkern u1="." u2="Y" k="158" />
-<hkern u1="." u2="W" k="147" />
-<hkern u1="." u2="V" k="143" />
-<hkern u1="." u2="U" k="37" />
-<hkern u1="." u2="T" k="137" />
-<hkern u1="." u2="O" k="33" />
-<hkern u1="." u2="7" k="61" />
-<hkern u1="." u2="'" k="246" />
-<hkern u1="/" u2="ð" k="80" />
-<hkern u1="/" u2="ï" k="-47" />
-<hkern u1="/" u2="ì" k="-6" />
-<hkern u1="/" u2="Æ" k="193" />
-<hkern u1="/" u2="z" k="20" />
-<hkern u1="/" u2="y" k="31" />
-<hkern u1="/" u2="x" k="12" />
-<hkern u1="/" u2="w" k="33" />
-<hkern u1="/" u2="v" k="33" />
-<hkern u1="/" u2="u" k="43" />
-<hkern u1="/" u2="s" k="68" />
-<hkern u1="/" u2="o" k="76" />
-<hkern u1="/" u2="n" k="45" />
-<hkern u1="/" u2="f" k="14" />
-<hkern u1="/" u2="d" k="78" />
-<hkern u1="/" u2="a" k="61" />
-<hkern u1="/" u2="Y" k="-20" />
-<hkern u1="/" u2="X" k="-20" />
-<hkern u1="/" u2="W" k="-18" />
-<hkern u1="/" u2="V" k="-16" />
-<hkern u1="/" u2="S" k="10" />
-<hkern u1="/" u2="O" k="41" />
-<hkern u1="/" u2="J" k="160" />
-<hkern u1="/" u2="A" k="129" />
-<hkern u1="/" u2="9" k="59" />
-<hkern u1="/" u2="8" k="10" />
-<hkern u1="/" u2="6" k="31" />
-<hkern u1="/" u2="5" k="70" />
-<hkern u1="/" u2="4" k="156" />
-<hkern u1="/" u2="3" k="51" />
-<hkern u1="/" u2="2" k="45" />
-<hkern u1="/" u2="1" k="41" />
-<hkern u1="/" u2="0" k="76" />
-<hkern u1="/" u2="/" k="506" />
-<hkern u1="0" u2="Æ" k="43" />
-<hkern u1="0" u2="°" k="37" />
-<hkern u1="0" u2="\" k="68" />
-<hkern u1="0" u2="Z" k="20" />
-<hkern u1="0" u2="Y" k="94" />
-<hkern u1="0" u2="X" k="27" />
-<hkern u1="0" u2="W" k="66" />
-<hkern u1="0" u2="V" k="63" />
-<hkern u1="0" u2="T" k="100" />
-<hkern u1="0" u2="J" k="20" />
-<hkern u1="0" u2="A" k="33" />
-<hkern u1="0" u2="7" k="25" />
-<hkern u1="0" u2="/" k="10" />
-<hkern u1="0" u2=")" k="31" />
-<hkern u1="0" u2="'" k="18" />
-<hkern u1="1" u2="Æ" k="-27" />
-<hkern u1="1" u2="·" k="37" />
-<hkern u1="1" u2="°" k="41" />
-<hkern u1="1" u2="\" k="78" />
-<hkern u1="1" u2="Y" k="98" />
-<hkern u1="1" u2="X" k="-10" />
-<hkern u1="1" u2="W" k="80" />
-<hkern u1="1" u2="V" k="80" />
-<hkern u1="1" u2="U" k="14" />
-<hkern u1="1" u2="T" k="109" />
-<hkern u1="1" u2="A" k="-12" />
-<hkern u1="1" u2="=" k="16" />
-<hkern u1="1" u2="7" k="16" />
-<hkern u1="1" u2="-" k="27" />
-<hkern u1="1" u2="+" k="41" />
-<hkern u1="1" u2="'" k="33" />
-<hkern u1="1" u2="#" k="-8" />
-<hkern u1="2" u2="Æ" k="-12" />
-<hkern u1="2" u2="\" k="51" />
-<hkern u1="2" u2="Y" k="76" />
-<hkern u1="2" u2="W" k="51" />
-<hkern u1="2" u2="V" k="51" />
-<hkern u1="2" u2="T" k="92" />
-<hkern u1="3" u2="Æ" k="-25" />
-<hkern u1="3" u2="°" k="39" />
-<hkern u1="3" u2="\" k="59" />
-<hkern u1="3" u2="Y" k="84" />
-<hkern u1="3" u2="X" k="-12" />
-<hkern u1="3" u2="W" k="55" />
-<hkern u1="3" u2="V" k="55" />
-<hkern u1="3" u2="T" k="94" />
-<hkern u1="3" u2="7" k="16" />
-<hkern u1="3" u2="'" k="20" />
-<hkern u1="4" u2="Æ" k="-23" />
-<hkern u1="4" u2="·" k="29" />
-<hkern u1="4" u2="°" k="27" />
-<hkern u1="4" u2="\" k="61" />
-<hkern u1="4" u2="Y" k="84" />
-<hkern u1="4" u2="X" k="-6" />
-<hkern u1="4" u2="W" k="66" />
-<hkern u1="4" u2="V" k="66" />
-<hkern u1="4" u2="T" k="100" />
-<hkern u1="4" u2="A" k="-10" />
-<hkern u1="4" u2="7" k="18" />
-<hkern u1="4" u2="-" k="14" />
-<hkern u1="4" u2="," k="-8" />
-<hkern u1="4" u2="+" k="31" />
-<hkern u1="4" u2="'" k="12" />
-<hkern u1="5" u2="Æ" k="-10" />
-<hkern u1="5" u2="·" k="20" />
-<hkern u1="5" u2="\" k="16" />
-<hkern u1="5" u2="Y" k="45" />
-<hkern u1="5" u2="W" k="29" />
-<hkern u1="5" u2="V" k="29" />
-<hkern u1="5" u2="T" k="76" />
-<hkern u1="5" u2="A" k="-12" />
-<hkern u1="5" u2="-" k="18" />
-<hkern u1="5" u2="+" k="43" />
-<hkern u1="6" u2="Æ" k="35" />
-<hkern u1="6" u2="Y" k="45" />
-<hkern u1="6" u2="W" k="33" />
-<hkern u1="6" u2="V" k="33" />
-<hkern u1="6" u2="T" k="16" />
-<hkern u1="6" u2="A" k="29" />
-<hkern u1="6" u2="3" k="10" />
-<hkern u1="7" u2="Æ" k="106" />
-<hkern u1="7" u2="·" k="41" />
-<hkern u1="7" u2="°" k="-4" />
-<hkern u1="7" u2="¢" k="33" />
-<hkern u1="7" u2="Z" k="20" />
-<hkern u1="7" u2="T" k="27" />
-<hkern u1="7" u2="J" k="106" />
-<hkern u1="7" u2="A" k="80" />
-<hkern u1="7" u2="=" k="20" />
-<hkern u1="7" u2="7" k="-8" />
-<hkern u1="7" u2="5" k="31" />
-<hkern u1="7" u2="4" k="96" />
-<hkern u1="7" u2="/" k="102" />
-<hkern u1="7" u2="." k="129" />
-<hkern u1="7" u2="-" k="51" />
-<hkern u1="7" u2="+" k="18" />
-<hkern u1="8" u2="Æ" k="31" />
-<hkern u1="8" u2="Y" k="47" />
-<hkern u1="8" u2="W" k="33" />
-<hkern u1="8" u2="V" k="33" />
-<hkern u1="8" u2="T" k="14" />
-<hkern u1="8" u2="A" k="29" />
-<hkern u1="8" u2="+" k="12" />
-<hkern u1="9" u2="°" k="57" />
-<hkern u1="9" u2="\" k="68" />
-<hkern u1="9" u2="Y" k="96" />
-<hkern u1="9" u2="W" k="66" />
-<hkern u1="9" u2="V" k="66" />
-<hkern u1="9" u2="T" k="106" />
-<hkern u1="9" u2="7" k="23" />
-<hkern u1="9" u2="'" k="43" />
-<hkern u1=":" u2="Y" k="57" />
-<hkern u1=":" u2="W" k="33" />
-<hkern u1=":" u2="V" k="33" />
-<hkern u1=":" u2="T" k="78" />
-<hkern u1=";" u2="j" k="-23" />
-<hkern u1="=" u2="7" k="33" />
-<hkern u1="=" u2="4" k="16" />
-<hkern u1="=" u2="3" k="39" />
-<hkern u1="=" u2="1" k="23" />
-<hkern u1="@" u2="’" k="66" />
-<hkern u1="@" u2="Y" k="106" />
-<hkern u1="@" u2="W" k="74" />
-<hkern u1="@" u2="V" k="74" />
-<hkern u1="@" u2="T" k="106" />
-<hkern u1="@" u2="A" k="23" />
-<hkern u1="@" u2="'" k="66" />
-<hkern u1="A" u2="™" k="129" />
-<hkern u1="A" u2="‹" k="29" />
-<hkern u1="A" u2="„" k="-4" />
-<hkern u1="A" u2="‚" k="-4" />
-<hkern u1="A" u2="’" k="133" />
-<hkern u1="A" u2="‘" k="135" />
-<hkern u1="A" u2="ð" k="31" />
-<hkern u1="A" u2="Ø" k="10" />
-<hkern u1="A" u2="Ð" k="8" />
-<hkern u1="A" u2="º" k="100" />
-<hkern u1="A" u2="®" k="43" />
-<hkern u1="A" u2="ª" k="90" />
-<hkern u1="A" u2="©" k="43" />
-<hkern u1="A" u2="y" k="70" />
-<hkern u1="A" u2="w" k="72" />
-<hkern u1="A" u2="v" k="66" />
-<hkern u1="A" u2="u" k="25" />
-<hkern u1="A" u2="t" k="49" />
-<hkern u1="A" u2="s" k="10" />
-<hkern u1="A" u2="o" k="35" />
-<hkern u1="A" u2="l" k="6" />
-<hkern u1="A" u2="f" k="31" />
-<hkern u1="A" u2="d" k="35" />
-<hkern u1="A" u2="a" k="16" />
-<hkern u1="A" u2="]" k="-4" />
-<hkern u1="A" u2="\" k="123" />
-<hkern u1="A" u2="Y" k="147" />
-<hkern u1="A" u2="W" k="115" />
-<hkern u1="A" u2="V" k="113" />
-<hkern u1="A" u2="U" k="59" />
-<hkern u1="A" u2="T" k="143" />
-<hkern u1="A" u2="S" k="20" />
-<hkern u1="A" u2="O" k="53" />
-<hkern u1="A" u2="@" k="16" />
-<hkern u1="A" u2="?" k="43" />
-<hkern u1="A" u2="8" k="29" />
-<hkern u1="A" u2="7" k="41" />
-<hkern u1="A" u2="6" k="33" />
-<hkern u1="A" u2="4" k="-16" />
-<hkern u1="A" u2="2" k="-8" />
-<hkern u1="A" u2="0" k="33" />
-<hkern u1="A" u2="/" k="-16" />
-<hkern u1="A" u2="-" k="29" />
-<hkern u1="A" u2="," k="-4" />
-<hkern u1="A" u2="*" k="129" />
-<hkern u1="A" u2=")" k="-16" />
-<hkern u1="A" u2="'" k="135" />
-<hkern u1="A" u2="&" k="29" />
-<hkern u1="A" u2=" " k="63" />
-<hkern u1="B" u2="ð" k="4" />
-<hkern u1="B" u2="ï" k="-14" />
-<hkern u1="B" u2="î" k="-12" />
-<hkern u1="B" u2="Æ" k="20" />
-<hkern u1="B" u2="z" k="6" />
-<hkern u1="B" u2="y" k="20" />
-<hkern u1="B" u2="x" k="27" />
-<hkern u1="B" u2="w" k="20" />
-<hkern u1="B" u2="v" k="18" />
-<hkern u1="B" u2="u" k="4" />
-<hkern u1="B" u2="t" k="20" />
-<hkern u1="B" u2="s" k="8" />
-<hkern u1="B" u2="o" k="4" />
-<hkern u1="B" u2="n" k="4" />
-<hkern u1="B" u2="f" k="23" />
-<hkern u1="B" u2="d" k="4" />
-<hkern u1="B" u2="Z" k="8" />
-<hkern u1="B" u2="Y" k="59" />
-<hkern u1="B" u2="X" k="31" />
-<hkern u1="B" u2="W" k="43" />
-<hkern u1="B" u2="V" k="41" />
-<hkern u1="B" u2="T" k="59" />
-<hkern u1="B" u2="J" k="27" />
-<hkern u1="B" u2="A" k="29" />
-<hkern u1="B" u2="7" k="20" />
-<hkern u1="B" u2="3" k="12" />
-<hkern u1="C" u2="™" k="-14" />
-<hkern u1="C" u2="ð" k="6" />
-<hkern u1="C" u2="ï" k="-37" />
-<hkern u1="C" u2="î" k="-23" />
-<hkern u1="C" u2="Æ" k="14" />
-<hkern u1="C" u2="z" k="4" />
-<hkern u1="C" u2="y" k="4" />
-<hkern u1="C" u2="w" k="4" />
-<hkern u1="C" u2="u" k="4" />
-<hkern u1="C" u2="t" k="6" />
-<hkern u1="C" u2="s" k="8" />
-<hkern u1="C" u2="o" k="6" />
-<hkern u1="C" u2="n" k="4" />
-<hkern u1="C" u2="f" k="10" />
-<hkern u1="C" u2="d" k="6" />
-<hkern u1="C" u2="Y" k="35" />
-<hkern u1="C" u2="X" k="12" />
-<hkern u1="C" u2="W" k="23" />
-<hkern u1="C" u2="V" k="23" />
-<hkern u1="C" u2="T" k="14" />
-<hkern u1="C" u2="S" k="8" />
-<hkern u1="C" u2="O" k="16" />
-<hkern u1="C" u2="A" k="20" />
-<hkern u1="C" u2="*" k="-20" />
-<hkern u1="D" u2="™" k="10" />
-<hkern u1="D" u2="‘" k="10" />
-<hkern u1="D" u2="ð" k="6" />
-<hkern u1="D" u2="Ð" k="12" />
-<hkern u1="D" u2="Æ" k="76" />
-<hkern u1="D" u2="z" k="6" />
-<hkern u1="D" u2="y" k="6" />
-<hkern u1="D" u2="x" k="20" />
-<hkern u1="D" u2="w" k="4" />
-<hkern u1="D" u2="u" k="4" />
-<hkern u1="D" u2="s" k="6" />
-<hkern u1="D" u2="n" k="10" />
-<hkern u1="D" u2="i" k="4" />
-<hkern u1="D" u2="h" k="4" />
-<hkern u1="D" u2="a" k="14" />
-<hkern u1="D" u2="\" k="29" />
-<hkern u1="D" u2="Z" k="31" />
-<hkern u1="D" u2="Y" k="80" />
-<hkern u1="D" u2="X" k="57" />
-<hkern u1="D" u2="W" k="51" />
-<hkern u1="D" u2="V" k="49" />
-<hkern u1="D" u2="T" k="61" />
-<hkern u1="D" u2="S" k="4" />
-<hkern u1="D" u2="J" k="70" />
-<hkern u1="D" u2="A" k="51" />
-<hkern u1="D" u2="4" k="12" />
-<hkern u1="D" u2="/" k="39" />
-<hkern u1="D" u2="." k="29" />
-<hkern u1="D" u2=")" k="25" />
-<hkern u1="D" u2="'" k="16" />
-<hkern u1="E" u2="‹" k="23" />
-<hkern u1="E" u2="ð" k="37" />
-<hkern u1="E" u2="ï" k="-33" />
-<hkern u1="E" u2="î" k="-23" />
-<hkern u1="E" u2="y" k="45" />
-<hkern u1="E" u2="w" k="41" />
-<hkern u1="E" u2="v" k="37" />
-<hkern u1="E" u2="u" k="25" />
-<hkern u1="E" u2="t" k="25" />
-<hkern u1="E" u2="s" k="8" />
-<hkern u1="E" u2="o" k="37" />
-<hkern u1="E" u2="n" k="6" />
-<hkern u1="E" u2="f" k="31" />
-<hkern u1="E" u2="d" k="37" />
-<hkern u1="E" u2="a" k="12" />
-<hkern u1="E" u2="S" k="23" />
-<hkern u1="E" u2="O" k="25" />
-<hkern u1="E" u2="7" k="27" />
-<hkern u1="E" u2="-" k="25" />
-<hkern u1="F" g2="uniFB04" k="37" />
-<hkern u1="F" g2="uniFB03" k="37" />
-<hkern u1="F" u2="™" k="-4" />
-<hkern u1="F" u2="›" k="29" />
-<hkern u1="F" u2="‹" k="33" />
-<hkern u1="F" u2="ð" k="86" />
-<hkern u1="F" u2="ï" k="-55" />
-<hkern u1="F" u2="î" k="-45" />
-<hkern u1="F" u2="í" k="10" />
-<hkern u1="F" u2="ì" k="-16" />
-<hkern u1="F" u2="ß" k="20" />
-<hkern u1="F" u2="Æ" k="227" />
-<hkern u1="F" u2="z" k="59" />
-<hkern u1="F" u2="y" k="41" />
-<hkern u1="F" u2="x" k="47" />
-<hkern u1="F" u2="w" k="41" />
-<hkern u1="F" u2="v" k="39" />
-<hkern u1="F" u2="u" k="47" />
-<hkern u1="F" u2="t" k="14" />
-<hkern u1="F" u2="s" k="72" />
-<hkern u1="F" u2="o" k="59" />
-<hkern u1="F" u2="n" k="55" />
-<hkern u1="F" u2="f" k="31" />
-<hkern u1="F" u2="d" k="59" />
-<hkern u1="F" u2="a" k="113" />
-<hkern u1="F" u2="S" k="45" />
-<hkern u1="F" u2="O" k="33" />
-<hkern u1="F" u2="J" k="244" />
-<hkern u1="F" u2="A" k="131" />
-<hkern u1="F" u2="@" k="12" />
-<hkern u1="F" u2=":" k="23" />
-<hkern u1="F" u2="7" k="35" />
-<hkern u1="F" u2="5" k="33" />
-<hkern u1="F" u2="4" k="84" />
-<hkern u1="F" u2="3" k="33" />
-<hkern u1="F" u2="2" k="41" />
-<hkern u1="F" u2="1" k="23" />
-<hkern u1="F" u2="/" k="113" />
-<hkern u1="F" u2="." k="139" />
-<hkern u1="F" u2="-" k="39" />
-<hkern u1="F" u2="*" k="-18" />
-<hkern u1="F" u2=")" k="-4" />
-<hkern u1="F" u2=" " k="45" />
-<hkern u1="G" u2="™" k="10" />
-<hkern u1="G" u2="ð" k="4" />
-<hkern u1="G" u2="y" k="25" />
-<hkern u1="G" u2="w" k="27" />
-<hkern u1="G" u2="v" k="25" />
-<hkern u1="G" u2="t" k="12" />
-<hkern u1="G" u2="f" k="12" />
-<hkern u1="G" u2="\" k="10" />
-<hkern u1="G" u2="Y" k="63" />
-<hkern u1="G" u2="W" k="45" />
-<hkern u1="G" u2="V" k="43" />
-<hkern u1="G" u2="T" k="45" />
-<hkern u1="G" u2="'" k="14" />
-<hkern u1="I" u2="ð" k="20" />
-<hkern u1="I" u2="ï" k="-14" />
-<hkern u1="I" u2="z" k="4" />
-<hkern u1="I" u2="y" k="4" />
-<hkern u1="I" u2="t" k="16" />
-<hkern u1="I" u2="s" k="12" />
-<hkern u1="I" u2="o" k="18" />
-<hkern u1="I" u2="f" k="16" />
-<hkern u1="I" u2="d" k="16" />
-<hkern u1="I" u2="a" k="14" />
-<hkern u1="J" u2="ð" k="25" />
-<hkern u1="J" u2="ï" k="-20" />
-<hkern u1="J" u2="î" k="-10" />
-<hkern u1="J" u2="Æ" k="43" />
-<hkern u1="J" u2="z" k="8" />
-<hkern u1="J" u2="x" k="4" />
-<hkern u1="J" u2="u" k="6" />
-<hkern u1="J" u2="t" k="12" />
-<hkern u1="J" u2="s" k="23" />
-<hkern u1="J" u2="o" k="18" />
-<hkern u1="J" u2="n" k="6" />
-<hkern u1="J" u2="l" k="4" />
-<hkern u1="J" u2="i" k="4" />
-<hkern u1="J" u2="h" k="4" />
-<hkern u1="J" u2="f" k="14" />
-<hkern u1="J" u2="d" k="18" />
-<hkern u1="J" u2="a" k="20" />
-<hkern u1="J" u2="J" k="31" />
-<hkern u1="J" u2="A" k="33" />
-<hkern u1="J" u2="/" k="12" />
-<hkern u1="J" u2="." k="16" />
-<hkern u1="K" u2="™" k="-14" />
-<hkern u1="K" u2="›" k="-4" />
-<hkern u1="K" u2="‹" k="29" />
-<hkern u1="K" u2="„" k="-16" />
-<hkern u1="K" u2="‚" k="-16" />
-<hkern u1="K" u2="ø" k="18" />
-<hkern u1="K" u2="ð" k="53" />
-<hkern u1="K" u2="ï" k="-66" />
-<hkern u1="K" u2="î" k="-12" />
-<hkern u1="K" u2="ì" k="-25" />
-<hkern u1="K" u2="Ø" k="16" />
-<hkern u1="K" u2="®" k="31" />
-<hkern u1="K" u2="©" k="31" />
-<hkern u1="K" u2="}" k="-14" />
-<hkern u1="K" u2="y" k="74" />
-<hkern u1="K" u2="w" k="78" />
-<hkern u1="K" u2="v" k="74" />
-<hkern u1="K" u2="u" k="33" />
-<hkern u1="K" u2="t" k="27" />
-<hkern u1="K" u2="o" k="61" />
-<hkern u1="K" u2="f" k="29" />
-<hkern u1="K" u2="d" k="59" />
-<hkern u1="K" u2="a" k="6" />
-<hkern u1="K" u2="]" k="-16" />
-<hkern u1="K" u2="\" k="-12" />
-<hkern u1="K" u2="S" k="18" />
-<hkern u1="K" u2="O" k="72" />
-<hkern u1="K" u2="J" k="-4" />
-<hkern u1="K" u2=";" k="-8" />
-<hkern u1="K" u2="4" k="-29" />
-<hkern u1="K" u2="2" k="-18" />
-<hkern u1="K" u2="0" k="12" />
-<hkern u1="K" u2="/" k="-27" />
-<hkern u1="K" u2="-" k="51" />
-<hkern u1="K" u2="," k="-16" />
-<hkern u1="K" u2="*" k="-20" />
-<hkern u1="K" u2=")" k="-29" />
-<hkern u1="K" u2=" " k="27" />
-<hkern u1="L" u2="™" k="221" />
-<hkern u1="L" u2="‹" k="80" />
-<hkern u1="L" u2="’" k="215" />
-<hkern u1="L" u2="‘" k="217" />
-<hkern u1="L" u2="ð" k="31" />
-<hkern u1="L" u2="Æ" k="-12" />
-<hkern u1="L" u2="º" k="217" />
-<hkern u1="L" u2="·" k="291" />
-<hkern u1="L" u2="®" k="37" />
-<hkern u1="L" u2="ª" k="215" />
-<hkern u1="L" u2="©" k="37" />
-<hkern u1="L" u2="y" k="152" />
-<hkern u1="L" u2="w" k="156" />
-<hkern u1="L" u2="v" k="141" />
-<hkern u1="L" u2="u" k="18" />
-<hkern u1="L" u2="t" k="37" />
-<hkern u1="L" u2="o" k="39" />
-<hkern u1="L" u2="f" k="27" />
-<hkern u1="L" u2="d" k="41" />
-<hkern u1="L" u2="\" k="174" />
-<hkern u1="L" u2="Y" k="231" />
-<hkern u1="L" u2="W" k="213" />
-<hkern u1="L" u2="V" k="207" />
-<hkern u1="L" u2="U" k="80" />
-<hkern u1="L" u2="T" k="225" />
-<hkern u1="L" u2="S" k="8" />
-<hkern u1="L" u2="O" k="82" />
-<hkern u1="L" u2="?" k="29" />
-<hkern u1="L" u2="7" k="16" />
-<hkern u1="L" u2="-" k="113" />
-<hkern u1="L" u2="*" k="219" />
-<hkern u1="L" u2="'" k="213" />
-<hkern u1="L" u2=" " k="55" />
-<hkern u1="O" u2="™" k="12" />
-<hkern u1="O" u2="’" k="10" />
-<hkern u1="O" u2="‘" k="12" />
-<hkern u1="O" u2="ð" k="6" />
-<hkern u1="O" u2="Ð" k="14" />
-<hkern u1="O" u2="Æ" k="82" />
-<hkern u1="O" u2="z" k="6" />
-<hkern u1="O" u2="y" k="6" />
-<hkern u1="O" u2="x" k="25" />
-<hkern u1="O" u2="w" k="4" />
-<hkern u1="O" u2="u" k="4" />
-<hkern u1="O" u2="s" k="6" />
-<hkern u1="O" u2="n" k="10" />
-<hkern u1="O" u2="i" k="10" />
-<hkern u1="O" u2="h" k="4" />
-<hkern u1="O" u2="a" k="14" />
-<hkern u1="O" u2="\" k="33" />
-<hkern u1="O" u2="Z" k="37" />
-<hkern u1="O" u2="Y" k="84" />
-<hkern u1="O" u2="X" k="57" />
-<hkern u1="O" u2="W" k="53" />
-<hkern u1="O" u2="V" k="51" />
-<hkern u1="O" u2="T" k="63" />
-<hkern u1="O" u2="S" k="4" />
-<hkern u1="O" u2="J" k="70" />
-<hkern u1="O" u2="A" k="53" />
-<hkern u1="O" u2="4" k="14" />
-<hkern u1="O" u2="/" k="41" />
-<hkern u1="O" u2="." k="33" />
-<hkern u1="O" u2="*" k="10" />
-<hkern u1="O" u2=")" k="29" />
-<hkern u1="O" u2="'" k="23" />
-<hkern u1="P" u2="‹" k="27" />
-<hkern u1="P" u2="ð" k="47" />
-<hkern u1="P" u2="ï" k="-27" />
-<hkern u1="P" u2="î" k="-12" />
-<hkern u1="P" u2="Æ" k="188" />
-<hkern u1="P" u2="y" k="-14" />
-<hkern u1="P" u2="x" k="-6" />
-<hkern u1="P" u2="w" k="-10" />
-<hkern u1="P" u2="v" k="-8" />
-<hkern u1="P" u2="s" k="16" />
-<hkern u1="P" u2="o" k="27" />
-<hkern u1="P" u2="d" k="25" />
-<hkern u1="P" u2="a" k="20" />
-<hkern u1="P" u2="Z" k="16" />
-<hkern u1="P" u2="Y" k="33" />
-<hkern u1="P" u2="X" k="37" />
-<hkern u1="P" u2="W" k="25" />
-<hkern u1="P" u2="V" k="25" />
-<hkern u1="P" u2="T" k="6" />
-<hkern u1="P" u2="J" k="193" />
-<hkern u1="P" u2="A" k="98" />
-<hkern u1="P" u2="5" k="10" />
-<hkern u1="P" u2="4" k="70" />
-<hkern u1="P" u2="/" k="113" />
-<hkern u1="P" u2="." k="147" />
-<hkern u1="P" u2="-" k="31" />
-<hkern u1="P" u2=")" k="12" />
-<hkern u1="P" u2=" " k="55" />
-<hkern u1="Q" u2="„" k="-8" />
-<hkern u1="Q" u2="‚" k="-8" />
-<hkern u1="Q" u2="Æ" k="16" />
-<hkern u1="Q" u2="}" k="-8" />
-<hkern u1="Q" u2="y" k="6" />
-<hkern u1="Q" u2="]" k="-8" />
-<hkern u1="Q" u2="X" k="12" />
-<hkern u1="Q" u2="J" k="12" />
-<hkern u1="Q" u2="A" k="8" />
-<hkern u1="Q" u2="4" k="-20" />
-<hkern u1="Q" u2="2" k="-10" />
-<hkern u1="Q" u2="/" k="-18" />
-<hkern u1="Q" u2="," k="-8" />
-<hkern u1="Q" u2=")" k="-20" />
-<hkern u1="R" u2="™" k="8" />
-<hkern u1="R" u2="‹" k="29" />
-<hkern u1="R" u2="’" k="6" />
-<hkern u1="R" u2="ð" k="53" />
-<hkern u1="R" u2="Ð" k="6" />
-<hkern u1="R" u2="y" k="10" />
-<hkern u1="R" u2="w" k="12" />
-<hkern u1="R" u2="v" k="10" />
-<hkern u1="R" u2="u" k="20" />
-<hkern u1="R" u2="t" k="12" />
-<hkern u1="R" u2="s" k="8" />
-<hkern u1="R" u2="o" k="43" />
-<hkern u1="R" u2="n" k="14" />
-<hkern u1="R" u2="l" k="14" />
-<hkern u1="R" u2="i" k="14" />
-<hkern u1="R" u2="h" k="10" />
-<hkern u1="R" u2="f" k="10" />
-<hkern u1="R" u2="d" k="41" />
-<hkern u1="R" u2="a" k="23" />
-<hkern u1="R" u2="\" k="16" />
-<hkern u1="R" u2="Y" k="59" />
-<hkern u1="R" u2="W" k="47" />
-<hkern u1="R" u2="V" k="45" />
-<hkern u1="R" u2="U" k="8" />
-<hkern u1="R" u2="T" k="35" />
-<hkern u1="R" u2="O" k="10" />
-<hkern u1="R" u2="A" k="14" />
-<hkern u1="R" u2="4" k="-8" />
-<hkern u1="R" u2="/" k="-8" />
-<hkern u1="R" u2="-" k="12" />
-<hkern u1="R" u2=")" k="-8" />
-<hkern u1="S" u2="ð" k="4" />
-<hkern u1="S" u2="ï" k="-29" />
-<hkern u1="S" u2="î" k="-20" />
-<hkern u1="S" u2="Æ" k="8" />
-<hkern u1="S" u2="ª" k="14" />
-<hkern u1="S" u2="z" k="8" />
-<hkern u1="S" u2="y" k="43" />
-<hkern u1="S" u2="x" k="20" />
-<hkern u1="S" u2="w" k="45" />
-<hkern u1="S" u2="v" k="43" />
-<hkern u1="S" u2="u" k="6" />
-<hkern u1="S" u2="t" k="25" />
-<hkern u1="S" u2="s" k="8" />
-<hkern u1="S" u2="n" k="6" />
-<hkern u1="S" u2="l" k="4" />
-<hkern u1="S" u2="i" k="4" />
-<hkern u1="S" u2="h" k="4" />
-<hkern u1="S" u2="f" k="25" />
-<hkern u1="S" u2="a" k="4" />
-<hkern u1="S" u2="Y" k="39" />
-<hkern u1="S" u2="X" k="18" />
-<hkern u1="S" u2="W" k="31" />
-<hkern u1="S" u2="V" k="31" />
-<hkern u1="S" u2="T" k="14" />
-<hkern u1="S" u2="A" k="29" />
-<hkern u1="S" u2="7" k="16" />
-<hkern u1="T" g2="uniFB04" k="92" />
-<hkern u1="T" g2="uniFB03" k="59" />
-<hkern u1="T" g2="uniFB01" k="43" />
-<hkern u1="T" u2="™" k="-4" />
-<hkern u1="T" u2="›" k="88" />
-<hkern u1="T" u2="‹" k="125" />
-<hkern u1="T" u2="ð" k="176" />
-<hkern u1="T" u2="ï" k="-57" />
-<hkern u1="T" u2="î" k="-45" />
-<hkern u1="T" u2="í" k="16" />
-<hkern u1="T" u2="ì" k="-16" />
-<hkern u1="T" u2="ã" k="164" />
-<hkern u1="T" u2="ß" k="35" />
-<hkern u1="T" u2="Æ" k="178" />
-<hkern u1="T" u2="®" k="41" />
-<hkern u1="T" u2="©" k="41" />
-<hkern u1="T" u2="z" k="152" />
-<hkern u1="T" u2="y" k="133" />
-<hkern u1="T" u2="x" k="127" />
-<hkern u1="T" u2="w" k="137" />
-<hkern u1="T" u2="v" k="137" />
-<hkern u1="T" u2="u" k="178" />
-<hkern u1="T" u2="t" k="16" />
-<hkern u1="T" u2="s" k="197" />
-<hkern u1="T" u2="o" k="205" />
-<hkern u1="T" u2="n" k="160" />
-<hkern u1="T" u2="f" k="61" />
-<hkern u1="T" u2="d" k="203" />
-<hkern u1="T" u2="a" k="190" />
-<hkern u1="T" u2="S" k="16" />
-<hkern u1="T" u2="O" k="61" />
-<hkern u1="T" u2="J" k="211" />
-<hkern u1="T" u2="A" k="143" />
-<hkern u1="T" u2="@" k="109" />
-<hkern u1="T" u2=":" k="78" />
-<hkern u1="T" u2="9" k="104" />
-<hkern u1="T" u2="8" k="12" />
-<hkern u1="T" u2="7" k="59" />
-<hkern u1="T" u2="6" k="27" />
-<hkern u1="T" u2="5" k="102" />
-<hkern u1="T" u2="4" k="131" />
-<hkern u1="T" u2="3" k="86" />
-<hkern u1="T" u2="2" k="80" />
-<hkern u1="T" u2="1" k="94" />
-<hkern u1="T" u2="0" k="98" />
-<hkern u1="T" u2="/" k="121" />
-<hkern u1="T" u2="." k="137" />
-<hkern u1="T" u2="-" k="133" />
-<hkern u1="T" u2="*" k="-33" />
-<hkern u1="T" u2=")" k="-4" />
-<hkern u1="T" u2="&" k="14" />
-<hkern u1="T" u2=" " k="55" />
-<hkern u1="U" u2="ð" k="29" />
-<hkern u1="U" u2="ï" k="-25" />
-<hkern u1="U" u2="î" k="-12" />
-<hkern u1="U" u2="Æ" k="90" />
-<hkern u1="U" u2="z" k="14" />
-<hkern u1="U" u2="x" k="4" />
-<hkern u1="U" u2="u" k="16" />
-<hkern u1="U" u2="t" k="10" />
-<hkern u1="U" u2="s" k="29" />
-<hkern u1="U" u2="o" k="23" />
-<hkern u1="U" u2="n" k="14" />
-<hkern u1="U" u2="l" k="12" />
-<hkern u1="U" u2="i" k="12" />
-<hkern u1="U" u2="h" k="12" />
-<hkern u1="U" u2="f" k="14" />
-<hkern u1="U" u2="d" k="23" />
-<hkern u1="U" u2="a" k="27" />
-<hkern u1="U" u2="J" k="59" />
-<hkern u1="U" u2="A" k="57" />
-<hkern u1="U" u2="4" k="16" />
-<hkern u1="U" u2="/" k="41" />
-<hkern u1="U" u2="." k="35" />
-<hkern u1="V" u2="™" k="-18" />
-<hkern u1="V" u2="›" k="53" />
-<hkern u1="V" u2="‹" k="86" />
-<hkern u1="V" u2="’" k="-6" />
-<hkern u1="V" u2="‘" k="-4" />
-<hkern u1="V" u2="ð" k="135" />
-<hkern u1="V" u2="ï" k="-70" />
-<hkern u1="V" u2="î" k="-37" />
-<hkern u1="V" u2="í" k="23" />
-<hkern u1="V" u2="ì" k="-31" />
-<hkern u1="V" u2="ã" k="39" />
-<hkern u1="V" u2="ß" k="45" />
-<hkern u1="V" u2="Ð" k="8" />
-<hkern u1="V" u2="Æ" k="176" />
-<hkern u1="V" u2="®" k="43" />
-<hkern u1="V" u2="©" k="43" />
-<hkern u1="V" u2="z" k="43" />
-<hkern u1="V" u2="y" k="27" />
-<hkern u1="V" u2="x" k="27" />
-<hkern u1="V" u2="w" k="29" />
-<hkern u1="V" u2="v" k="31" />
-<hkern u1="V" u2="u" k="78" />
-<hkern u1="V" u2="t" k="20" />
-<hkern u1="V" u2="s" k="104" />
-<hkern u1="V" u2="o" k="125" />
-<hkern u1="V" u2="n" k="82" />
-<hkern u1="V" u2="f" k="49" />
-<hkern u1="V" u2="d" k="123" />
-<hkern u1="V" u2="a" k="106" />
-<hkern u1="V" u2="]" k="-4" />
-<hkern u1="V" u2="\" k="-16" />
-<hkern u1="V" u2="S" k="37" />
-<hkern u1="V" u2="O" k="53" />
-<hkern u1="V" u2="J" k="172" />
-<hkern u1="V" u2="A" k="113" />
-<hkern u1="V" u2="@" k="76" />
-<hkern u1="V" u2=":" k="33" />
-<hkern u1="V" u2="9" k="57" />
-<hkern u1="V" u2="8" k="33" />
-<hkern u1="V" u2="6" k="39" />
-<hkern u1="V" u2="5" k="68" />
-<hkern u1="V" u2="4" k="125" />
-<hkern u1="V" u2="3" k="43" />
-<hkern u1="V" u2="2" k="41" />
-<hkern u1="V" u2="1" k="37" />
-<hkern u1="V" u2="0" k="63" />
-<hkern u1="V" u2="/" k="127" />
-<hkern u1="V" u2="." k="143" />
-<hkern u1="V" u2="-" k="84" />
-<hkern u1="V" u2="*" k="-29" />
-<hkern u1="V" u2=")" k="-18" />
-<hkern u1="V" u2="&" k="39" />
-<hkern u1="V" u2=" " k="72" />
-<hkern u1="W" u2="™" k="-20" />
-<hkern u1="W" u2="›" k="55" />
-<hkern u1="W" u2="‹" k="88" />
-<hkern u1="W" u2="’" k="-8" />
-<hkern u1="W" u2="‘" k="-8" />
-<hkern u1="W" u2="ð" k="139" />
-<hkern u1="W" u2="ï" k="-74" />
-<hkern u1="W" u2="î" k="-37" />
-<hkern u1="W" u2="í" k="23" />
-<hkern u1="W" u2="ì" k="-33" />
-<hkern u1="W" u2="ä" k="39" />
-<hkern u1="W" u2="ã" k="39" />
-<hkern u1="W" u2="ß" k="45" />
-<hkern u1="W" u2="Ð" k="8" />
-<hkern u1="W" u2="Æ" k="178" />
-<hkern u1="W" u2="®" k="43" />
-<hkern u1="W" u2="©" k="43" />
-<hkern u1="W" u2="}" k="-4" />
-<hkern u1="W" u2="z" k="43" />
-<hkern u1="W" u2="y" k="27" />
-<hkern u1="W" u2="x" k="29" />
-<hkern u1="W" u2="w" k="29" />
-<hkern u1="W" u2="v" k="31" />
-<hkern u1="W" u2="u" k="80" />
-<hkern u1="W" u2="t" k="20" />
-<hkern u1="W" u2="s" k="109" />
-<hkern u1="W" u2="o" k="129" />
-<hkern u1="W" u2="n" k="82" />
-<hkern u1="W" u2="f" k="51" />
-<hkern u1="W" u2="d" k="127" />
-<hkern u1="W" u2="a" k="106" />
-<hkern u1="W" u2="]" k="-6" />
-<hkern u1="W" u2="\" k="-18" />
-<hkern u1="W" u2="S" k="37" />
-<hkern u1="W" u2="O" k="53" />
-<hkern u1="W" u2="J" k="172" />
-<hkern u1="W" u2="A" k="115" />
-<hkern u1="W" u2="@" k="78" />
-<hkern u1="W" u2=":" k="33" />
-<hkern u1="W" u2="9" k="59" />
-<hkern u1="W" u2="8" k="33" />
-<hkern u1="W" u2="6" k="39" />
-<hkern u1="W" u2="5" k="70" />
-<hkern u1="W" u2="4" k="127" />
-<hkern u1="W" u2="3" k="43" />
-<hkern u1="W" u2="2" k="41" />
-<hkern u1="W" u2="1" k="39" />
-<hkern u1="W" u2="0" k="63" />
-<hkern u1="W" u2="/" k="131" />
-<hkern u1="W" u2="." k="147" />
-<hkern u1="W" u2="-" k="86" />
-<hkern u1="W" u2="*" k="-27" />
-<hkern u1="W" u2=")" k="-20" />
-<hkern u1="W" u2="&" k="39" />
-<hkern u1="W" u2=" " k="72" />
-<hkern u1="X" u2="™" k="-29" />
-<hkern u1="X" u2="‹" k="35" />
-<hkern u1="X" u2="’" k="-8" />
-<hkern u1="X" u2="‘" k="-8" />
-<hkern u1="X" u2="ø" k="27" />
-<hkern u1="X" u2="ð" k="70" />
-<hkern u1="X" u2="ï" k="-74" />
-<hkern u1="X" u2="î" k="-25" />
-<hkern u1="X" u2="í" k="8" />
-<hkern u1="X" u2="ì" k="-33" />
-<hkern u1="X" u2="ß" k="8" />
-<hkern u1="X" u2="Ø" k="16" />
-<hkern u1="X" u2="®" k="29" />
-<hkern u1="X" u2="©" k="29" />
-<hkern u1="X" u2="}" k="-6" />
-<hkern u1="X" u2="y" k="59" />
-<hkern u1="X" u2="w" k="63" />
-<hkern u1="X" u2="v" k="61" />
-<hkern u1="X" u2="u" k="45" />
-<hkern u1="X" u2="t" k="16" />
-<hkern u1="X" u2="o" k="76" />
-<hkern u1="X" u2="n" k="14" />
-<hkern u1="X" u2="f" k="31" />
-<hkern u1="X" u2="d" k="72" />
-<hkern u1="X" u2="a" k="12" />
-<hkern u1="X" u2="]" k="-8" />
-<hkern u1="X" u2="\" k="-20" />
-<hkern u1="X" u2="S" k="14" />
-<hkern u1="X" u2="O" k="59" />
-<hkern u1="X" u2="4" k="-14" />
-<hkern u1="X" u2="2" k="-4" />
-<hkern u1="X" u2="0" k="25" />
-<hkern u1="X" u2="/" k="-12" />
-<hkern u1="X" u2="-" k="55" />
-<hkern u1="X" u2="*" k="-29" />
-<hkern u1="X" u2=")" k="-23" />
-<hkern u1="X" u2=" " k="14" />
-<hkern u1="Y" u2="™" k="-25" />
-<hkern u1="Y" u2="›" k="88" />
-<hkern u1="Y" u2="‹" k="131" />
-<hkern u1="Y" u2="’" k="-12" />
-<hkern u1="Y" u2="‘" k="-10" />
-<hkern u1="Y" u2="ö" k="57" />
-<hkern u1="Y" u2="ð" k="178" />
-<hkern u1="Y" u2="ï" k="-76" />
-<hkern u1="Y" u2="î" k="-33" />
-<hkern u1="Y" u2="í" k="29" />
-<hkern u1="Y" u2="ì" k="-37" />
-<hkern u1="Y" u2="ë" k="57" />
-<hkern u1="Y" u2="ä" k="35" />
-<hkern u1="Y" u2="ã" k="41" />
-<hkern u1="Y" u2="ß" k="66" />
-<hkern u1="Y" u2="Ð" k="8" />
-<hkern u1="Y" u2="Æ" k="211" />
-<hkern u1="Y" u2="®" k="66" />
-<hkern u1="Y" u2="©" k="66" />
-<hkern u1="Y" u2="}" k="-8" />
-<hkern u1="Y" u2="z" k="84" />
-<hkern u1="Y" u2="y" k="72" />
-<hkern u1="Y" u2="x" k="70" />
-<hkern u1="Y" u2="w" k="76" />
-<hkern u1="Y" u2="v" k="78" />
-<hkern u1="Y" u2="u" k="123" />
-<hkern u1="Y" u2="t" k="35" />
-<hkern u1="Y" u2="s" k="174" />
-<hkern u1="Y" u2="o" k="174" />
-<hkern u1="Y" u2="n" k="129" />
-<hkern u1="Y" u2="f" k="74" />
-<hkern u1="Y" u2="d" k="170" />
-<hkern u1="Y" u2="a" k="168" />
-<hkern u1="Y" u2="]" k="-8" />
-<hkern u1="Y" u2="\" k="-20" />
-<hkern u1="Y" u2="S" k="47" />
-<hkern u1="Y" u2="O" k="82" />
-<hkern u1="Y" u2="J" k="188" />
-<hkern u1="Y" u2="A" k="147" />
-<hkern u1="Y" u2="@" k="111" />
-<hkern u1="Y" u2=":" k="57" />
-<hkern u1="Y" u2="9" k="90" />
-<hkern u1="Y" u2="8" k="45" />
-<hkern u1="Y" u2="6" k="55" />
-<hkern u1="Y" u2="5" k="88" />
-<hkern u1="Y" u2="4" k="150" />
-<hkern u1="Y" u2="3" k="68" />
-<hkern u1="Y" u2="2" k="68" />
-<hkern u1="Y" u2="1" k="70" />
-<hkern u1="Y" u2="0" k="94" />
-<hkern u1="Y" u2="/" k="135" />
-<hkern u1="Y" u2="." k="160" />
-<hkern u1="Y" u2="-" k="133" />
-<hkern u1="Y" u2="*" k="-29" />
-<hkern u1="Y" u2=")" k="-25" />
-<hkern u1="Y" u2="&" k="49" />
-<hkern u1="Y" u2=" " k="78" />
-<hkern u1="Z" u2="‹" k="16" />
-<hkern u1="Z" u2="ð" k="31" />
-<hkern u1="Z" u2="ï" k="-33" />
-<hkern u1="Z" u2="î" k="-23" />
-<hkern u1="Z" u2="®" k="20" />
-<hkern u1="Z" u2="©" k="20" />
-<hkern u1="Z" u2="y" k="39" />
-<hkern u1="Z" u2="w" k="39" />
-<hkern u1="Z" u2="v" k="41" />
-<hkern u1="Z" u2="u" k="29" />
-<hkern u1="Z" u2="t" k="20" />
-<hkern u1="Z" u2="s" k="4" />
-<hkern u1="Z" u2="o" k="35" />
-<hkern u1="Z" u2="n" k="16" />
-<hkern u1="Z" u2="f" k="29" />
-<hkern u1="Z" u2="d" k="35" />
-<hkern u1="Z" u2="a" k="10" />
-<hkern u1="Z" u2="O" k="35" />
-<hkern u1="Z" u2="0" k="12" />
-<hkern u1="Z" u2="-" k="27" />
-<hkern u1="[" u2="ï" k="-35" />
-<hkern u1="[" u2="î" k="-25" />
-<hkern u1="[" u2="Æ" k="-16" />
-<hkern u1="[" u2="j" k="-33" />
-<hkern u1="[" u2="Y" k="-8" />
-<hkern u1="[" u2="X" k="-8" />
-<hkern u1="[" u2="W" k="-6" />
-<hkern u1="[" u2="V" k="-4" />
-<hkern u1="[" u2="A" k="-4" />
-<hkern u1="\" u2="’" k="170" />
-<hkern u1="\" u2="Ø" k="-8" />
-<hkern u1="\" u2="Æ" k="-29" />
-<hkern u1="\" u2="y" k="68" />
-<hkern u1="\" u2="x" k="-10" />
-<hkern u1="\" u2="w" k="72" />
-<hkern u1="\" u2="v" k="63" />
-<hkern u1="\" u2="t" k="10" />
-<hkern u1="\" u2="Y" k="133" />
-<hkern u1="\" u2="X" k="-12" />
-<hkern u1="\" u2="W" k="127" />
-<hkern u1="\" u2="V" k="123" />
-<hkern u1="\" u2="U" k="37" />
-<hkern u1="\" u2="T" k="119" />
-<hkern u1="\" u2="O" k="37" />
-<hkern u1="\" u2="J" k="-6" />
-<hkern u1="\" u2="A" k="-14" />
-<hkern u1="\" u2="7" k="25" />
-<hkern u1="\" u2="6" k="8" />
-<hkern u1="\" u2="0" k="8" />
-<hkern u1="\" u2="'" k="174" />
-<hkern u1="a" u2="™" k="61" />
-<hkern u1="a" u2="’" k="49" />
-<hkern u1="a" u2="‘" k="53" />
-<hkern u1="a" u2="Ð" k="12" />
-<hkern u1="a" u2="º" k="25" />
-<hkern u1="a" u2="ª" k="10" />
-<hkern u1="a" u2="y" k="37" />
-<hkern u1="a" u2="w" k="43" />
-<hkern u1="a" u2="v" k="39" />
-<hkern u1="a" u2="t" k="16" />
-<hkern u1="a" u2="f" k="4" />
-<hkern u1="a" u2="\" k="86" />
-<hkern u1="a" u2="Z" k="6" />
-<hkern u1="a" u2="Y" k="170" />
-<hkern u1="a" u2="W" k="115" />
-<hkern u1="a" u2="V" k="113" />
-<hkern u1="a" u2="U" k="25" />
-<hkern u1="a" u2="T" k="205" />
-<hkern u1="a" u2="S" k="6" />
-<hkern u1="a" u2="O" k="16" />
-<hkern u1="a" u2="I" k="4" />
-<hkern u1="a" u2="?" k="20" />
-<hkern u1="a" u2="*" k="55" />
-<hkern u1="a" u2="'" k="41" />
-<hkern u1="b" u2="™" k="68" />
-<hkern u1="b" u2="’" k="106" />
-<hkern u1="b" u2="‘" k="115" />
-<hkern u1="b" u2="Ð" k="18" />
-<hkern u1="b" u2="Æ" k="43" />
-<hkern u1="b" u2="º" k="29" />
-<hkern u1="b" u2="ª" k="10" />
-<hkern u1="b" u2="z" k="23" />
-<hkern u1="b" u2="y" k="35" />
-<hkern u1="b" u2="x" k="39" />
-<hkern u1="b" u2="w" k="39" />
-<hkern u1="b" u2="v" k="35" />
-<hkern u1="b" u2="t" k="14" />
-<hkern u1="b" u2="s" k="4" />
-<hkern u1="b" u2="f" k="4" />
-<hkern u1="b" u2="\" k="78" />
-<hkern u1="b" u2="Z" k="41" />
-<hkern u1="b" u2="Y" k="170" />
-<hkern u1="b" u2="X" k="74" />
-<hkern u1="b" u2="W" k="127" />
-<hkern u1="b" u2="V" k="125" />
-<hkern u1="b" u2="U" k="23" />
-<hkern u1="b" u2="T" k="203" />
-<hkern u1="b" u2="S" k="18" />
-<hkern u1="b" u2="J" k="41" />
-<hkern u1="b" u2="I" k="16" />
-<hkern u1="b" u2="A" k="33" />
-<hkern u1="b" u2="?" k="25" />
-<hkern u1="b" u2="." k="10" />
-<hkern u1="b" u2="*" k="84" />
-<hkern u1="b" u2=")" k="35" />
-<hkern u1="b" u2="'" k="133" />
-<hkern u1="c" u2="™" k="39" />
-<hkern u1="c" u2="‹" k="20" />
-<hkern u1="c" u2="’" k="29" />
-<hkern u1="c" u2="‘" k="33" />
-<hkern u1="c" u2="ð" k="14" />
-<hkern u1="c" u2="Ð" k="10" />
-<hkern u1="c" u2="Æ" k="4" />
-<hkern u1="c" u2="y" k="20" />
-<hkern u1="c" u2="x" k="8" />
-<hkern u1="c" u2="w" k="18" />
-<hkern u1="c" u2="v" k="14" />
-<hkern u1="c" u2="s" k="10" />
-<hkern u1="c" u2="o" k="12" />
-<hkern u1="c" u2="d" k="12" />
-<hkern u1="c" u2="\" k="57" />
-<hkern u1="c" u2="Z" k="4" />
-<hkern u1="c" u2="Y" k="152" />
-<hkern u1="c" u2="X" k="10" />
-<hkern u1="c" u2="W" k="111" />
-<hkern u1="c" u2="V" k="111" />
-<hkern u1="c" u2="U" k="16" />
-<hkern u1="c" u2="T" k="186" />
-<hkern u1="c" u2="S" k="16" />
-<hkern u1="c" u2="O" k="10" />
-<hkern u1="c" u2="A" k="12" />
-<hkern u1="c" u2="?" k="12" />
-<hkern u1="c" u2="-" k="29" />
-<hkern u1="c" u2="*" k="35" />
-<hkern u1="c" u2="'" k="14" />
-<hkern u1="d" u2="Ð" k="6" />
-<hkern u1="d" u2="y" k="4" />
-<hkern u1="d" u2="w" k="8" />
-<hkern u1="d" u2="v" k="6" />
-<hkern u1="d" u2="t" k="4" />
-<hkern u1="d" u2="Y" k="12" />
-<hkern u1="d" u2="W" k="10" />
-<hkern u1="d" u2="V" k="10" />
-<hkern u1="d" u2="U" k="18" />
-<hkern u1="d" u2="T" k="12" />
-<hkern u1="d" u2="O" k="14" />
-<hkern u1="e" u2="™" k="53" />
-<hkern u1="e" u2="’" k="47" />
-<hkern u1="e" u2="‘" k="53" />
-<hkern u1="e" u2="Ð" k="16" />
-<hkern u1="e" u2="Æ" k="39" />
-<hkern u1="e" u2="º" k="10" />
-<hkern u1="e" u2="z" k="16" />
-<hkern u1="e" u2="y" k="33" />
-<hkern u1="e" u2="x" k="41" />
-<hkern u1="e" u2="w" k="35" />
-<hkern u1="e" u2="v" k="29" />
-<hkern u1="e" u2="t" k="10" />
-<hkern u1="e" u2="\" k="74" />
-<hkern u1="e" u2="Z" k="35" />
-<hkern u1="e" u2="Y" k="201" />
-<hkern u1="e" u2="X" k="47" />
-<hkern u1="e" u2="W" k="119" />
-<hkern u1="e" u2="V" k="117" />
-<hkern u1="e" u2="U" k="16" />
-<hkern u1="e" u2="T" k="205" />
-<hkern u1="e" u2="S" k="14" />
-<hkern u1="e" u2="J" k="33" />
-<hkern u1="e" u2="I" k="14" />
-<hkern u1="e" u2="A" k="29" />
-<hkern u1="e" u2="?" k="23" />
-<hkern u1="e" u2="*" k="55" />
-<hkern u1="e" u2=")" k="29" />
-<hkern u1="e" u2="'" k="41" />
-<hkern u1="f" u2="™" k="-45" />
-<hkern u1="f" u2="‹" k="41" />
-<hkern u1="f" u2="’" k="-8" />
-<hkern u1="f" u2="‘" k="-8" />
-<hkern u1="f" u2="ð" k="41" />
-<hkern u1="f" u2="ï" k="-102" />
-<hkern u1="f" u2="î" k="-49" />
-<hkern u1="f" u2="ì" k="-45" />
-<hkern u1="f" u2="Æ" k="94" />
-<hkern u1="f" u2="}" k="-16" />
-<hkern u1="f" u2="z" k="6" />
-<hkern u1="f" u2="o" k="12" />
-<hkern u1="f" u2="d" k="10" />
-<hkern u1="f" u2="a" k="16" />
-<hkern u1="f" u2="]" k="-18" />
-<hkern u1="f" u2="\" k="-45" />
-<hkern u1="f" u2="Z" k="-14" />
-<hkern u1="f" u2="Y" k="-82" />
-<hkern u1="f" u2="X" k="-88" />
-<hkern u1="f" u2="W" k="-74" />
-<hkern u1="f" u2="V" k="-74" />
-<hkern u1="f" u2="T" k="-57" />
-<hkern u1="f" u2="S" k="4" />
-<hkern u1="f" u2="J" k="119" />
-<hkern u1="f" u2="A" k="78" />
-<hkern u1="f" u2="/" k="53" />
-<hkern u1="f" u2="." k="66" />
-<hkern u1="f" u2="-" k="47" />
-<hkern u1="f" u2="*" k="-25" />
-<hkern u1="f" u2=")" k="-49" />
-<hkern u1="f" u2=" " k="35" />
-<hkern u1="g" u2="j" k="-74" />
-<hkern u1="g" u2="Z" k="14" />
-<hkern u1="g" u2="Y" k="129" />
-<hkern u1="g" u2="X" k="14" />
-<hkern u1="g" u2="W" k="86" />
-<hkern u1="g" u2="V" k="82" />
-<hkern u1="g" u2="U" k="14" />
-<hkern u1="g" u2="T" k="164" />
-<hkern u1="g" u2="S" k="4" />
-<hkern u1="g" u2="O" k="10" />
-<hkern u1="h" u2="™" k="57" />
-<hkern u1="h" u2="’" k="84" />
-<hkern u1="h" u2="‘" k="88" />
-<hkern u1="h" u2="º" k="14" />
-<hkern u1="h" u2="y" k="20" />
-<hkern u1="h" u2="w" k="23" />
-<hkern u1="h" u2="v" k="20" />
-<hkern u1="h" u2="t" k="6" />
-<hkern u1="h" u2="\" k="68" />
-<hkern u1="h" u2="Z" k="16" />
-<hkern u1="h" u2="Y" k="154" />
-<hkern u1="h" u2="X" k="8" />
-<hkern u1="h" u2="W" k="109" />
-<hkern u1="h" u2="V" k="106" />
-<hkern u1="h" u2="U" k="20" />
-<hkern u1="h" u2="T" k="199" />
-<hkern u1="h" u2="S" k="10" />
-<hkern u1="h" u2="O" k="10" />
-<hkern u1="h" u2="?" k="20" />
-<hkern u1="h" u2="*" k="63" />
-<hkern u1="h" u2="'" k="121" />
-<hkern u1="i" u2="ï" k="-25" />
-<hkern u1="i" u2="î" k="-14" />
-<hkern u1="i" u2="Z" k="12" />
-<hkern u1="i" u2="U" k="12" />
-<hkern u1="i" u2="S" k="4" />
-<hkern u1="i" u2="O" k="4" />
-<hkern u1="j" u2="j" k="-68" />
-<hkern u1="k" u2="‹" k="57" />
-<hkern u1="k" u2="„" k="-8" />
-<hkern u1="k" u2="‚" k="-8" />
-<hkern u1="k" u2="’" k="14" />
-<hkern u1="k" u2="‘" k="20" />
-<hkern u1="k" u2="ø" k="16" />
-<hkern u1="k" u2="ð" k="59" />
-<hkern u1="k" u2="}" k="-4" />
-<hkern u1="k" u2="s" k="10" />
-<hkern u1="k" u2="o" k="51" />
-<hkern u1="k" u2="f" k="4" />
-<hkern u1="k" u2="d" k="49" />
-<hkern u1="k" u2="a" k="18" />
-<hkern u1="k" u2="]" k="-4" />
-<hkern u1="k" u2="Y" k="74" />
-<hkern u1="k" u2="W" k="31" />
-<hkern u1="k" u2="V" k="31" />
-<hkern u1="k" u2="U" k="6" />
-<hkern u1="k" u2="T" k="131" />
-<hkern u1="k" u2="O" k="29" />
-<hkern u1="k" u2="/" k="-16" />
-<hkern u1="k" u2="-" k="66" />
-<hkern u1="k" u2="," k="-8" />
-<hkern u1="k" u2="*" k="-16" />
-<hkern u1="k" u2=")" k="-18" />
-<hkern u1="k" u2="'" k="72" />
-<hkern u1="l" u2="™" k="41" />
-<hkern u1="l" u2="‹" k="27" />
-<hkern u1="l" u2="’" k="41" />
-<hkern u1="l" u2="‘" k="41" />
-<hkern u1="l" u2="ð" k="4" />
-<hkern u1="l" u2="Æ" k="-4" />
-<hkern u1="l" u2="º" k="39" />
-<hkern u1="l" u2="·" k="145" />
-<hkern u1="l" u2="®" k="12" />
-<hkern u1="l" u2="ª" k="39" />
-<hkern u1="l" u2="©" k="12" />
-<hkern u1="l" u2="y" k="39" />
-<hkern u1="l" u2="w" k="47" />
-<hkern u1="l" u2="v" k="39" />
-<hkern u1="l" u2="t" k="16" />
-<hkern u1="l" u2="o" k="4" />
-<hkern u1="l" u2="f" k="12" />
-<hkern u1="l" u2="d" k="4" />
-<hkern u1="l" u2="\" k="29" />
-<hkern u1="l" u2="Y" k="66" />
-<hkern u1="l" u2="W" k="61" />
-<hkern u1="l" u2="V" k="59" />
-<hkern u1="l" u2="U" k="41" />
-<hkern u1="l" u2="T" k="55" />
-<hkern u1="l" u2="O" k="33" />
-<hkern u1="l" u2="I" k="6" />
-<hkern u1="l" u2="/" k="-20" />
-<hkern u1="l" u2="-" k="27" />
-<hkern u1="l" u2="*" k="43" />
-<hkern u1="l" u2=")" k="-14" />
-<hkern u1="l" u2="'" k="39" />
-<hkern u1="l" u2=" " k="55" />
-<hkern u1="n" u2="™" k="45" />
-<hkern u1="n" u2="’" k="29" />
-<hkern u1="n" u2="‘" k="31" />
-<hkern u1="n" u2="y" k="18" />
-<hkern u1="n" u2="w" k="20" />
-<hkern u1="n" u2="v" k="18" />
-<hkern u1="n" u2="t" k="6" />
-<hkern u1="n" u2="\" k="66" />
-<hkern u1="n" u2="Z" k="16" />
-<hkern u1="n" u2="Y" k="150" />
-<hkern u1="n" u2="X" k="8" />
-<hkern u1="n" u2="W" k="109" />
-<hkern u1="n" u2="V" k="106" />
-<hkern u1="n" u2="U" k="20" />
-<hkern u1="n" u2="T" k="197" />
-<hkern u1="n" u2="S" k="10" />
-<hkern u1="n" u2="O" k="10" />
-<hkern u1="n" u2="?" k="16" />
-<hkern u1="n" u2="*" k="35" />
-<hkern u1="n" u2="'" k="20" />
-<hkern u1="o" u2="™" k="57" />
-<hkern u1="o" u2="’" k="53" />
-<hkern u1="o" u2="‘" k="59" />
-<hkern u1="o" u2="Ð" k="18" />
-<hkern u1="o" u2="Æ" k="45" />
-<hkern u1="o" u2="º" k="14" />
-<hkern u1="o" u2="z" k="25" />
-<hkern u1="o" u2="y" k="37" />
-<hkern u1="o" u2="x" k="41" />
-<hkern u1="o" u2="w" k="41" />
-<hkern u1="o" u2="v" k="35" />
-<hkern u1="o" u2="t" k="16" />
-<hkern u1="o" u2="s" k="4" />
-<hkern u1="o" u2="f" k="8" />
-<hkern u1="o" u2="\" k="76" />
-<hkern u1="o" u2="Z" k="41" />
-<hkern u1="o" u2="Y" k="174" />
-<hkern u1="o" u2="X" k="76" />
-<hkern u1="o" u2="W" k="129" />
-<hkern u1="o" u2="V" k="127" />
-<hkern u1="o" u2="U" k="23" />
-<hkern u1="o" u2="T" k="207" />
-<hkern u1="o" u2="S" k="18" />
-<hkern u1="o" u2="J" k="41" />
-<hkern u1="o" u2="I" k="18" />
-<hkern u1="o" u2="A" k="35" />
-<hkern u1="o" u2="?" k="23" />
-<hkern u1="o" u2="*" k="61" />
-<hkern u1="o" u2=")" k="35" />
-<hkern u1="o" u2="'" k="45" />
-<hkern u1="q" u2="„" k="-12" />
-<hkern u1="q" u2="‚" k="-12" />
-<hkern u1="q" u2="j" k="-209" />
-<hkern u1="q" u2="Z" k="14" />
-<hkern u1="q" u2="Y" k="129" />
-<hkern u1="q" u2="X" k="14" />
-<hkern u1="q" u2="W" k="86" />
-<hkern u1="q" u2="V" k="82" />
-<hkern u1="q" u2="U" k="14" />
-<hkern u1="q" u2="T" k="164" />
-<hkern u1="q" u2="S" k="4" />
-<hkern u1="q" u2="O" k="10" />
-<hkern u1="q" u2=";" k="-6" />
-<hkern u1="q" u2="," k="-12" />
-<hkern u1="r" u2="›" k="25" />
-<hkern u1="r" u2="‹" k="72" />
-<hkern u1="r" u2="ð" k="63" />
-<hkern u1="r" u2="Æ" k="111" />
-<hkern u1="r" u2="s" k="8" />
-<hkern u1="r" u2="o" k="43" />
-<hkern u1="r" u2="d" k="41" />
-<hkern u1="r" u2="a" k="18" />
-<hkern u1="r" u2="Z" k="49" />
-<hkern u1="r" u2="Y" k="59" />
-<hkern u1="r" u2="X" k="63" />
-<hkern u1="r" u2="W" k="23" />
-<hkern u1="r" u2="V" k="20" />
-<hkern u1="r" u2="T" k="123" />
-<hkern u1="r" u2="S" k="4" />
-<hkern u1="r" u2="J" k="162" />
-<hkern u1="r" u2="I" k="4" />
-<hkern u1="r" u2="A" k="92" />
-<hkern u1="r" u2="@" k="20" />
-<hkern u1="r" u2="/" k="76" />
-<hkern u1="r" u2="." k="96" />
-<hkern u1="r" u2="-" k="63" />
-<hkern u1="r" u2=")" k="12" />
-<hkern u1="r" u2=" " k="43" />
-<hkern u1="s" u2="™" k="33" />
-<hkern u1="s" u2="’" k="10" />
-<hkern u1="s" u2="‘" k="10" />
-<hkern u1="s" u2="Ð" k="14" />
-<hkern u1="s" u2="y" k="25" />
-<hkern u1="s" u2="x" k="12" />
-<hkern u1="s" u2="w" k="25" />
-<hkern u1="s" u2="v" k="18" />
-<hkern u1="s" u2="t" k="4" />
-<hkern u1="s" u2="f" k="4" />
-<hkern u1="s" u2="\" k="53" />
-<hkern u1="s" u2="Z" k="6" />
-<hkern u1="s" u2="Y" k="141" />
-<hkern u1="s" u2="X" k="10" />
-<hkern u1="s" u2="W" k="98" />
-<hkern u1="s" u2="V" k="94" />
-<hkern u1="s" u2="U" k="23" />
-<hkern u1="s" u2="T" k="178" />
-<hkern u1="s" u2="O" k="6" />
-<hkern u1="s" u2="I" k="12" />
-<hkern u1="s" u2="A" k="18" />
-<hkern u1="s" u2="-" k="14" />
-<hkern u1="s" u2="*" k="14" />
-<hkern u1="t" u2="™" k="12" />
-<hkern u1="t" u2="‹" k="35" />
-<hkern u1="t" u2="’" k="10" />
-<hkern u1="t" u2="‘" k="12" />
-<hkern u1="t" u2="ð" k="23" />
-<hkern u1="t" u2="y" k="4" />
-<hkern u1="t" u2="w" k="4" />
-<hkern u1="t" u2="v" k="4" />
-<hkern u1="t" u2="t" k="4" />
-<hkern u1="t" u2="o" k="20" />
-<hkern u1="t" u2="f" k="4" />
-<hkern u1="t" u2="d" k="20" />
-<hkern u1="t" u2="\" k="31" />
-<hkern u1="t" u2="Y" k="100" />
-<hkern u1="t" u2="W" k="61" />
-<hkern u1="t" u2="V" k="59" />
-<hkern u1="t" u2="U" k="23" />
-<hkern u1="t" u2="T" k="96" />
-<hkern u1="t" u2="O" k="18" />
-<hkern u1="t" u2="I" k="4" />
-<hkern u1="t" u2="-" k="25" />
-<hkern u1="t" u2="'" k="27" />
-<hkern u1="u" u2="™" k="31" />
-<hkern u1="u" u2="’" k="10" />
-<hkern u1="u" u2="‘" k="8" />
-<hkern u1="u" u2="Ð" k="6" />
-<hkern u1="u" u2="y" k="4" />
-<hkern u1="u" u2="w" k="8" />
-<hkern u1="u" u2="v" k="6" />
-<hkern u1="u" u2="t" k="4" />
-<hkern u1="u" u2="\" k="53" />
-<hkern u1="u" u2="Z" k="6" />
-<hkern u1="u" u2="Y" k="141" />
-<hkern u1="u" u2="W" k="86" />
-<hkern u1="u" u2="V" k="84" />
-<hkern u1="u" u2="U" k="18" />
-<hkern u1="u" u2="T" k="182" />
-<hkern u1="u" u2="O" k="14" />
-<hkern u1="u" u2="*" k="8" />
-<hkern u1="v" u2="‹" k="47" />
-<hkern u1="v" u2="ð" k="53" />
-<hkern u1="v" u2="Ð" k="14" />
-<hkern u1="v" u2="Æ" k="104" />
-<hkern u1="v" u2="º" k="-4" />
-<hkern u1="v" u2="s" k="27" />
-<hkern u1="v" u2="o" k="35" />
-<hkern u1="v" u2="d" k="33" />
-<hkern u1="v" u2="a" k="27" />
-<hkern u1="v" u2="\" k="25" />
-<hkern u1="v" u2="Z" k="43" />
-<hkern u1="v" u2="Y" k="80" />
-<hkern u1="v" u2="X" k="61" />
-<hkern u1="v" u2="W" k="31" />
-<hkern u1="v" u2="V" k="31" />
-<hkern u1="v" u2="T" k="139" />
-<hkern u1="v" u2="J" k="145" />
-<hkern u1="v" u2="A" k="66" />
-<hkern u1="v" u2="@" k="12" />
-<hkern u1="v" u2="/" k="66" />
-<hkern u1="v" u2="." k="88" />
-<hkern u1="v" u2="-" k="41" />
-<hkern u1="v" u2="*" k="-16" />
-<hkern u1="v" u2=")" k="27" />
-<hkern u1="v" u2=" " k="55" />
-<hkern u1="w" u2="‹" k="53" />
-<hkern u1="w" u2="ð" k="59" />
-<hkern u1="w" u2="Ð" k="14" />
-<hkern u1="w" u2="Æ" k="109" />
-<hkern u1="w" u2="º" k="-6" />
-<hkern u1="w" u2="s" k="31" />
-<hkern u1="w" u2="o" k="41" />
-<hkern u1="w" u2="d" k="39" />
-<hkern u1="w" u2="a" k="29" />
-<hkern u1="w" u2="\" k="27" />
-<hkern u1="w" u2="Z" k="43" />
-<hkern u1="w" u2="Y" k="78" />
-<hkern u1="w" u2="X" k="63" />
-<hkern u1="w" u2="W" k="29" />
-<hkern u1="w" u2="V" k="29" />
-<hkern u1="w" u2="T" k="137" />
-<hkern u1="w" u2="S" k="4" />
-<hkern u1="w" u2="O" k="4" />
-<hkern u1="w" u2="J" k="160" />
-<hkern u1="w" u2="A" k="72" />
-<hkern u1="w" u2="@" k="12" />
-<hkern u1="w" u2="/" k="74" />
-<hkern u1="w" u2="." k="96" />
-<hkern u1="w" u2="-" k="45" />
-<hkern u1="w" u2="*" k="-20" />
-<hkern u1="w" u2=")" k="29" />
-<hkern u1="w" u2=" " k="57" />
-<hkern u1="x" u2="‹" k="55" />
-<hkern u1="x" u2="ð" k="51" />
-<hkern u1="x" u2="s" k="10" />
-<hkern u1="x" u2="o" k="41" />
-<hkern u1="x" u2="f" k="4" />
-<hkern u1="x" u2="d" k="39" />
-<hkern u1="x" u2="a" k="18" />
-<hkern u1="x" u2="Y" k="70" />
-<hkern u1="x" u2="W" k="29" />
-<hkern u1="x" u2="V" k="27" />
-<hkern u1="x" u2="U" k="4" />
-<hkern u1="x" u2="T" k="127" />
-<hkern u1="x" u2="O" k="25" />
-<hkern u1="x" u2="/" k="-10" />
-<hkern u1="x" u2="-" k="59" />
-<hkern u1="x" u2="*" k="-20" />
-<hkern u1="x" u2=")" k="-12" />
-<hkern u1="y" u2="‹" k="49" />
-<hkern u1="y" u2="ð" k="55" />
-<hkern u1="y" u2="Ð" k="16" />
-<hkern u1="y" u2="Æ" k="104" />
-<hkern u1="y" u2="s" k="29" />
-<hkern u1="y" u2="o" k="39" />
-<hkern u1="y" u2="d" k="37" />
-<hkern u1="y" u2="a" k="27" />
-<hkern u1="y" u2="\" k="29" />
-<hkern u1="y" u2="Z" k="47" />
-<hkern u1="y" u2="Y" k="86" />
-<hkern u1="y" u2="X" k="68" />
-<hkern u1="y" u2="W" k="37" />
-<hkern u1="y" u2="V" k="37" />
-<hkern u1="y" u2="T" k="143" />
-<hkern u1="y" u2="S" k="4" />
-<hkern u1="y" u2="J" k="143" />
-<hkern u1="y" u2="I" k="6" />
-<hkern u1="y" u2="A" k="68" />
-<hkern u1="y" u2="@" k="14" />
-<hkern u1="y" u2="/" k="63" />
-<hkern u1="y" u2="." k="88" />
-<hkern u1="y" u2="-" k="41" />
-<hkern u1="y" u2=")" k="29" />
-<hkern u1="y" u2="&" k="12" />
-<hkern u1="y" u2=" " k="53" />
-<hkern u1="z" u2="‹" k="39" />
-<hkern u1="z" u2="ð" k="33" />
-<hkern u1="z" u2="Ð" k="10" />
-<hkern u1="z" u2="o" k="23" />
-<hkern u1="z" u2="d" k="23" />
-<hkern u1="z" u2="\" k="16" />
-<hkern u1="z" u2="Y" k="96" />
-<hkern u1="z" u2="W" k="51" />
-<hkern u1="z" u2="V" k="49" />
-<hkern u1="z" u2="U" k="16" />
-<hkern u1="z" u2="T" k="150" />
-<hkern u1="z" u2="O" k="6" />
-<hkern u1="z" u2="I" k="4" />
-<hkern u1="z" u2="-" k="47" />
-<hkern u1="{" u2="ï" k="-35" />
-<hkern u1="{" u2="î" k="-25" />
-<hkern u1="{" u2="Æ" k="-16" />
-<hkern u1="{" u2="j" k="-27" />
-<hkern u1="{" u2="Y" k="-8" />
-<hkern u1="{" u2="X" k="-6" />
-<hkern u1="{" u2="W" k="-4" />
-<hkern u1="|" u2="ï" k="-16" />
-<hkern u1="|" u2="î" k="-6" />
-<hkern u1="|" u2="Ï" k="-8" />
-<hkern u1="|" u2="j" k="-131" />
-<hkern u1="¡" u2="ï" k="-10" />
-<hkern u1="°" u2="9" k="51" />
-<hkern u1="°" u2="5" k="39" />
-<hkern u1="°" u2="4" k="174" />
-<hkern u1="°" u2="3" k="27" />
-<hkern u1="°" u2="1" k="20" />
-<hkern u1="°" u2="0" k="37" />
-<hkern u1="·" u2="l" k="76" />
-<hkern u1="·" u2="7" k="47" />
-<hkern u1="·" u2="4" k="33" />
-<hkern u1="·" u2="3" k="57" />
-<hkern u1="·" u2="2" k="20" />
-<hkern u1="·" u2="1" k="33" />
-<hkern u1="¿" u2="ð" k="41" />
-<hkern u1="¿" u2="Ð" k="35" />
-<hkern u1="¿" u2="Æ" k="31" />
-<hkern u1="¿" u2="z" k="29" />
-<hkern u1="¿" u2="y" k="41" />
-<hkern u1="¿" u2="x" k="27" />
-<hkern u1="¿" u2="w" k="61" />
-<hkern u1="¿" u2="v" k="57" />
-<hkern u1="¿" u2="u" k="35" />
-<hkern u1="¿" u2="t" k="35" />
-<hkern u1="¿" u2="s" k="41" />
-<hkern u1="¿" u2="o" k="39" />
-<hkern u1="¿" u2="n" k="29" />
-<hkern u1="¿" u2="l" k="33" />
-<hkern u1="¿" u2="j" k="-178" />
-<hkern u1="¿" u2="i" k="29" />
-<hkern u1="¿" u2="h" k="29" />
-<hkern u1="¿" u2="f" k="33" />
-<hkern u1="¿" u2="d" k="39" />
-<hkern u1="¿" u2="a" k="41" />
-<hkern u1="¿" u2="Z" k="35" />
-<hkern u1="¿" u2="Y" k="119" />
-<hkern u1="¿" u2="X" k="29" />
-<hkern u1="¿" u2="W" k="94" />
-<hkern u1="¿" u2="V" k="94" />
-<hkern u1="¿" u2="U" k="35" />
-<hkern u1="¿" u2="T" k="123" />
-<hkern u1="¿" u2="S" k="33" />
-<hkern u1="¿" u2="O" k="35" />
-<hkern u1="¿" u2="J" k="55" />
-<hkern u1="¿" u2="I" k="23" />
-<hkern u1="¿" u2="A" k="35" />
-<hkern u1="Ï" u2="|" k="-8" />
-<hkern u1="Ø" u2="™" k="-12" />
-<hkern u1="Ø" u2="\" k="-8" />
-<hkern u1="Ø" u2="Y" k="20" />
-<hkern u1="Ø" u2="X" k="14" />
-<hkern u1="Ø" u2="W" k="12" />
-<hkern u1="Ø" u2="V" k="10" />
-<hkern u1="Ø" u2="*" k="-18" />
-<hkern u1="Ø" u2=")" k="-12" />
-<hkern u1="Þ" u2="™" k="35" />
-<hkern u1="Þ" u2="’" k="55" />
-<hkern u1="Þ" u2="‘" k="61" />
-<hkern u1="Þ" u2="Ð" k="4" />
-<hkern u1="Þ" u2="Æ" k="94" />
-<hkern u1="Þ" u2="}" k="10" />
-<hkern u1="Þ" u2="y" k="12" />
-<hkern u1="Þ" u2="x" k="14" />
-<hkern u1="Þ" u2="w" k="6" />
-<hkern u1="Þ" u2="a" k="4" />
-<hkern u1="Þ" u2="]" k="12" />
-<hkern u1="Þ" u2="\" k="53" />
-<hkern u1="Þ" u2="Z" k="47" />
-<hkern u1="Þ" u2="Y" k="115" />
-<hkern u1="Þ" u2="X" k="90" />
-<hkern u1="Þ" u2="W" k="63" />
-<hkern u1="Þ" u2="V" k="61" />
-<hkern u1="Þ" u2="T" k="104" />
-<hkern u1="Þ" u2="S" k="4" />
-<hkern u1="Þ" u2="J" k="92" />
-<hkern u1="Þ" u2="A" k="55" />
-<hkern u1="Þ" u2="?" k="16" />
-<hkern u1="Þ" u2="/" k="51" />
-<hkern u1="Þ" u2="." k="57" />
-<hkern u1="Þ" u2="-" k="10" />
-<hkern u1="Þ" u2="*" k="41" />
-<hkern u1="Þ" u2=")" k="37" />
-<hkern u1="Þ" u2="'" k="88" />
-<hkern u1="ß" u2="™" k="29" />
-<hkern u1="ß" u2="’" k="20" />
-<hkern u1="ß" u2="‘" k="18" />
-<hkern u1="ß" u2="Ð" k="20" />
-<hkern u1="ß" u2="Æ" k="25" />
-<hkern u1="ß" u2="ª" k="10" />
-<hkern u1="ß" u2="z" k="14" />
-<hkern u1="ß" u2="y" k="35" />
-<hkern u1="ß" u2="x" k="35" />
-<hkern u1="ß" u2="w" k="37" />
-<hkern u1="ß" u2="v" k="35" />
-<hkern u1="ß" u2="t" k="16" />
-<hkern u1="ß" u2="s" k="4" />
-<hkern u1="ß" u2="f" k="12" />
-<hkern u1="ß" u2="\" k="25" />
-<hkern u1="ß" u2="Z" k="23" />
-<hkern u1="ß" u2="Y" k="90" />
-<hkern u1="ß" u2="X" k="47" />
-<hkern u1="ß" u2="W" k="70" />
-<hkern u1="ß" u2="V" k="70" />
-<hkern u1="ß" u2="U" k="27" />
-<hkern u1="ß" u2="T" k="63" />
-<hkern u1="ß" u2="S" k="8" />
-<hkern u1="ß" u2="O" k="12" />
-<hkern u1="ß" u2="J" k="14" />
-<hkern u1="ß" u2="I" k="18" />
-<hkern u1="ß" u2="A" k="25" />
-<hkern u1="ß" u2="*" k="20" />
-<hkern u1="ß" u2="'" k="23" />
-<hkern u1="ç" u2="j" k="-16" />
-<hkern u1="í" u2="™" k="-6" />
-<hkern u1="í" u2="’" k="-6" />
-<hkern u1="í" u2="‘" k="-6" />
-<hkern u1="í" u2="\" k="-8" />
-<hkern u1="í" u2="*" k="-8" />
-<hkern u1="í" u2=")" k="-20" />
-<hkern u1="î" u2="™" k="-49" />
-<hkern u1="î" u2="’" k="-25" />
-<hkern u1="î" u2="‘" k="-25" />
-<hkern u1="î" u2="ß" k="-6" />
-<hkern u1="î" u2="º" k="-20" />
-<hkern u1="î" u2="ª" k="-8" />
-<hkern u1="î" u2="}" k="-25" />
-<hkern u1="î" u2="|" k="-6" />
-<hkern u1="î" u2="l" k="-16" />
-<hkern u1="î" u2="i" k="-14" />
-<hkern u1="î" u2="h" k="-14" />
-<hkern u1="î" u2="]" k="-25" />
-<hkern u1="î" u2="?" k="-20" />
-<hkern u1="î" u2="*" k="-49" />
-<hkern u1="î" u2=")" k="-10" />
-<hkern u1="î" u2="'" k="-12" />
-<hkern u1="ï" u2="™" k="-45" />
-<hkern u1="ï" u2="’" k="-37" />
-<hkern u1="ï" u2="‘" k="-37" />
-<hkern u1="ï" u2="ß" k="-16" />
-<hkern u1="ï" u2="º" k="-37" />
-<hkern u1="ï" u2="ª" k="-27" />
-<hkern u1="ï" u2="}" k="-35" />
-<hkern u1="ï" u2="|" k="-16" />
-<hkern u1="ï" u2="l" k="-27" />
-<hkern u1="ï" u2="i" k="-25" />
-<hkern u1="ï" u2="h" k="-25" />
-<hkern u1="ï" u2="]" k="-35" />
-<hkern u1="ï" u2="\" k="-47" />
-<hkern u1="ï" u2="?" k="-37" />
-<hkern u1="ï" u2="*" k="-59" />
-<hkern u1="ï" u2=")" k="-53" />
-<hkern u1="ï" u2="'" k="-23" />
-<hkern u1="ï" u2="!" k="-10" />
-<hkern u1="ð" u2="™" k="16" />
-<hkern u1="ð" u2="’" k="20" />
-<hkern u1="ð" u2="‘" k="20" />
-<hkern u1="ð" u2="Ð" k="14" />
-<hkern u1="ð" u2="Æ" k="49" />
-<hkern u1="ð" u2="z" k="12" />
-<hkern u1="ð" u2="y" k="27" />
-<hkern u1="ð" u2="x" k="31" />
-<hkern u1="ð" u2="w" k="27" />
-<hkern u1="ð" u2="v" k="23" />
-<hkern u1="ð" u2="t" k="4" />
-<hkern u1="ð" u2="\" k="12" />
-<hkern u1="ð" u2="Z" k="51" />
-<hkern u1="ð" u2="Y" k="72" />
-<hkern u1="ð" u2="X" k="57" />
-<hkern u1="ð" u2="W" k="59" />
-<hkern u1="ð" u2="V" k="57" />
-<hkern u1="ð" u2="U" k="18" />
-<hkern u1="ð" u2="T" k="59" />
-<hkern u1="ð" u2="S" k="16" />
-<hkern u1="ð" u2="J" k="45" />
-<hkern u1="ð" u2="I" k="14" />
-<hkern u1="ð" u2="A" k="37" />
-<hkern u1="ð" u2="/" k="10" />
-<hkern u1="ð" u2="*" k="23" />
-<hkern u1="ð" u2=")" k="14" />
-<hkern u1="ð" u2="'" k="18" />
-<hkern u1="ø" u2="*" k="6" />
-<hkern u1="‘" u2="ð" k="94" />
-<hkern u1="‘" u2="ï" k="-29" />
-<hkern u1="‘" u2="î" k="-12" />
-<hkern u1="‘" u2="Æ" k="188" />
-<hkern u1="‘" u2="s" k="14" />
-<hkern u1="‘" u2="o" k="43" />
-<hkern u1="‘" u2="f" k="10" />
-<hkern u1="‘" u2="d" k="98" />
-<hkern u1="‘" u2="a" k="20" />
-<hkern u1="‘" u2="O" k="10" />
-<hkern u1="‘" u2="J" k="174" />
-<hkern u1="‘" u2="A" k="125" />
-<hkern u1="‘" u2="." k="256" />
-<hkern u1="’" u2="‹" k="37" />
-<hkern u1="’" u2="ð" k="96" />
-<hkern u1="’" u2="ï" k="-25" />
-<hkern u1="’" u2="î" k="-12" />
-<hkern u1="’" u2="Æ" k="190" />
-<hkern u1="’" u2="s" k="16" />
-<hkern u1="’" u2="o" k="45" />
-<hkern u1="’" u2="f" k="10" />
-<hkern u1="’" u2="d" k="100" />
-<hkern u1="’" u2="a" k="20" />
-<hkern u1="’" u2="O" k="12" />
-<hkern u1="’" u2="J" k="174" />
-<hkern u1="’" u2="A" k="129" />
-<hkern u1="’" u2="@" k="63" />
-<hkern u1="’" u2="/" k="180" />
-<hkern u1="’" u2="." k="258" />
-<hkern u1="’" u2=" " k="53" />
-<hkern u1="‚" u2="j" k="-29" />
-<hkern u1="„" u2="j" k="-29" />
-<hkern u1="‹" u2="Y" k="90" />
-<hkern u1="‹" u2="W" k="55" />
-<hkern u1="‹" u2="V" k="53" />
-<hkern u1="‹" u2="T" k="88" />
-<hkern u1="›" u2="’" k="45" />
-<hkern u1="›" u2="Ð" k="12" />
-<hkern u1="›" u2="Æ" k="45" />
-<hkern u1="›" u2="z" k="39" />
-<hkern u1="›" u2="y" k="49" />
-<hkern u1="›" u2="x" k="55" />
-<hkern u1="›" u2="w" k="53" />
-<hkern u1="›" u2="v" k="47" />
-<hkern u1="›" u2="t" k="16" />
-<hkern u1="›" u2="s" k="14" />
-<hkern u1="›" u2="f" k="14" />
-<hkern u1="›" u2="Z" k="18" />
-<hkern u1="›" u2="Y" k="131" />
-<hkern u1="›" u2="X" k="35" />
-<hkern u1="›" u2="W" k="88" />
-<hkern u1="›" u2="V" k="88" />
-<hkern u1="›" u2="T" k="125" />
-<hkern u1="›" u2="J" k="43" />
-<hkern u1="›" u2="A" k="29" />
-<hkern u1="›" u2="'" k="16" />
-<hkern u1="€" u2="3" k="12" />
-<hkern g1="uniFB01" u2="ï" k="-8" />
-<hkern g1="uniFB03" u2="ï" k="-8" />
-</font>
-</defs></svg>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata></metadata>
-<defs>
-<font id="ralewayregular" horiz-adv-x="1548" >
-<font-face units-per-em="2048" ascent="1638" descent="-410" />
-<missing-glyph horiz-adv-x="524" />
-<glyph unicode="fi" horiz-adv-x="1030" d="M59 831v111h148v154q0 61 13.5 120t44 113.5t73.5 96t106.5 66t139.5 24.5q101 0 180.5 -30t128.5 -67l-64 -100q-35 32 -99.5 53t-137.5 21q-63 0 -111.5 -26t-77 -69t-43 -93.5t-14.5 -104.5v-158h535v-942h-140v831h-395v-831h-139v831h-148z" />
-<glyph unicode="fl" horiz-adv-x="1187" d="M59 831v111h148v164q0 187 94.5 298.5t276.5 111.5q174 0 268 -88.5t94 -231.5v-956q0 -48 30 -87.5t83 -39.5q14 0 31.5 2.5t32.5 5.5t28 6t21 5l8 3l28 -115q-3 -3 -30 -10t-74.5 -14.5t-89.5 -7.5q-95 0 -151 55.5t-56 136.5v989q0 42 -11.5 79.5t-36.5 71t-70 53.5 t-105 20q-79 0 -133 -48t-76.5 -116.5t-22.5 -149.5v-137h225v-111h-225v-831h-139v831h-148z" />
-<glyph unicode="ffi" horiz-adv-x="1501" d="M59 831v111h148v90q0 107 34 196.5t109 148.5t180 59q130 0 232 -54q105 134 293 134q164 0 311 -97l-66 -100q-34 31 -98.5 52.5t-136.5 21.5q-63 0 -112 -26t-77.5 -69t-42.5 -93.5t-14 -104.5v-158h533v-942h-140v831h-393v-831h-139v831h-334v-831h-139v831h-148z M346 942h334v141q0 117 39 191q-56 41 -166 41q-55 0 -97.5 -27t-65 -70t-33.5 -89t-11 -93v-94z" />
-<glyph unicode="ffl" horiz-adv-x="1665" d="M59 831v111h148v105q0 171 89.5 280t246.5 109q117 0 219 -54q97 134 293 134q174 0 268 -88.5t94 -231.5v-956q0 -48 30 -87.5t83 -39.5q15 0 33 2.5t33 5.5t28 6t21 5l8 3l26 -115q-1 -3 -28.5 -10t-74.5 -14.5t-89 -7.5q-95 0 -152 55.5t-57 136.5v989 q0 42 -11.5 79.5t-36 71t-69.5 53.5t-104 20q-80 0 -134 -48t-76 -116.5t-22 -149.5v-137h224v-111h-224v-831h-139v831h-340v-831h-139v831h-148zM346 942h340v141q0 130 31 193q-53 39 -150 39q-109 0 -165 -77.5t-56 -186.5v-109z" />
-<glyph horiz-adv-x="0" />
-<glyph horiz-adv-x="682" />
-<glyph horiz-adv-x="0" />
-<glyph horiz-adv-x="0" />
-<glyph unicode="
" horiz-adv-x="0" />
-<glyph unicode=" " horiz-adv-x="524" />
-<glyph unicode="	" horiz-adv-x="524" />
-<glyph unicode=" " horiz-adv-x="524" />
-<glyph unicode="!" horiz-adv-x="497" d="M180 0v229h139v-229h-139zM180 467v1001h139v-1001h-139z" />
-<glyph unicode=""" horiz-adv-x="573" d="M127 1206v260h123v-260h-123zM324 1206v260h120v-260h-120z" />
-<glyph unicode="#" horiz-adv-x="1400" d="M82 424v111h256l98 401h-268v104h295l98 414h119l-102 -414h387l100 414h119l-103 -414h240v-104h-266l-97 -401h275v-111h-301l-103 -424h-118l104 424h-387l-102 -424h-119l106 424h-231zM455 535h387l98 401h-389z" />
-<glyph unicode="$" horiz-adv-x="1263" d="M76 199l69 116q76 -80 197.5 -134.5t263.5 -63.5v547q-103 24 -172.5 46t-131.5 53t-97.5 69t-55.5 91.5t-20 123.5q0 188 127.5 296t341.5 119v207h76v-205q249 -8 436 -168l-68 -114q-62 68 -159.5 109.5t-216.5 45.5v-546q102 -20 175 -41t141 -53.5t109.5 -74.5 t66 -102.5t24.5 -138.5q0 -191 -138.5 -290.5t-369.5 -102.5v-199h-76v201q-304 18 -522 209zM274 1067q0 -112 74.5 -166t257.5 -96v530q-169 -7 -250.5 -76.5t-81.5 -191.5zM666 115q175 0 270.5 64t95.5 188q0 60 -22 104t-71.5 76.5t-112.5 55t-160 46.5v-534z" />
-<glyph unicode="%" horiz-adv-x="1482" d="M92 1180q0 123 89.5 209t215.5 86q128 0 218 -86t90 -209q0 -121 -90 -207t-218 -86q-126 0 -215.5 86t-89.5 207zM141 55l574 697l555 710l71 -61l-569 -696l-559 -713zM197 1180q0 -88 59 -150.5t141 -62.5q84 0 143.5 63.5t59.5 149.5q0 88 -61 150.5t-142 62.5 q-82 0 -141 -63.5t-59 -149.5zM780 274q0 121 89.5 207t215.5 86q127 0 216.5 -85.5t89.5 -207.5q0 -123 -89 -208.5t-217 -85.5q-126 0 -215.5 85.5t-89.5 208.5zM885 274q0 -89 58.5 -151t141.5 -62q84 0 142.5 63t58.5 150t-60.5 150t-140.5 63q-84 0 -142 -63.5 t-58 -149.5z" />
-<glyph unicode="&" horiz-adv-x="1376" d="M98 375q0 71 23.5 133t70.5 116t95 94t119 89q-112 120 -155.5 195t-43.5 151q0 135 104.5 227.5t259.5 92.5q145 0 242.5 -80.5t97.5 -206.5q0 -61 -23.5 -115t-71.5 -103t-97.5 -86.5t-124.5 -86.5l407 -426q89 168 89 360h118q-3 -250 -125 -446l273 -283h-185 l-167 176q-88 -94 -201.5 -145t-241.5 -51q-127 0 -232 49t-168 140t-63 206zM233 371q0 -87 51 -152t127.5 -96t163.5 -31q102 0 192 43.5t159 122.5l-441 465q-122 -85 -187 -167.5t-65 -184.5zM336 1157q0 -51 35.5 -108.5t140.5 -169.5q60 41 91 63t71.5 56t60 59 t33.5 58t14 67q0 79 -60 130.5t-151 51.5q-100 0 -167.5 -60.5t-67.5 -146.5z" />
-<glyph unicode="'" horiz-adv-x="348" d="M113 1237v229h123v-229h-123z" />
-<glyph unicode="(" horiz-adv-x="548" d="M90 709q0 192 74 383t213 421l106 -51q-98 -144 -180 -361.5t-82 -398.5q0 -158 68.5 -346.5t191.5 -375.5l-104 -56q-287 427 -287 785z" />
-<glyph unicode=")" horiz-adv-x="548" d="M66 1462l106 51q139 -230 213 -421t74 -383q0 -358 -287 -785l-104 56q123 187 191.5 375.5t68.5 346.5q0 180 -82 397t-180 363z" />
-<glyph unicode="*" horiz-adv-x="661" d="M127 1290l23 74l141 -53l-6 149h90l-6 -149l141 53l22 -74l-139 -45l90 -127l-65 -45l-88 133l-88 -133l-62 45l88 127z" />
-<glyph unicode="+" horiz-adv-x="856" d="M109 670v114h256v277h127v-277h256v-114h-256v-277h-127v277h-256z" />
-<glyph unicode="," horiz-adv-x="419" d="M113 -31q17 0 30 9.5t13 33.5v189h118v-209q0 -65 -47.5 -97t-113.5 -32v106z" />
-<glyph unicode="-" horiz-adv-x="866" d="M135 494v129h596v-129h-596z" />
-<glyph unicode="." horiz-adv-x="387" d="M135 0v201h119v-201h-119z" />
-<glyph unicode="/" horiz-adv-x="1241" d="M59 0l967 1454h160l-969 -1454h-158z" />
-<glyph unicode="0" horiz-adv-x="1259" d="M117 600q0 133 39 249t106.5 198t163 129t205.5 47q146 0 263.5 -80t184 -223t66.5 -320t-66.5 -319t-184 -221.5t-263.5 -79.5q-147 0 -264.5 79.5t-183.5 221t-66 319.5zM256 600q0 -219 104.5 -354t270.5 -135q165 0 269 135t104 354t-104 355.5t-269 136.5 q-166 0 -270.5 -136.5t-104.5 -355.5z" />
-<glyph unicode="1" horiz-adv-x="876" d="M94 840v135q44 0 103.5 26.5t107.5 61t83 65t40 41.5h143v-1042h260v-127h-694v127h291v877q-38 -50 -148 -107t-186 -57z" />
-<glyph unicode="2" horiz-adv-x="1091" d="M104 0q0 83 14 151t50 138t105 132.5t171 115.5q24 13 78 38.5t85.5 41.5t75 44.5t68 53.5t42.5 60.5t18 74.5q0 86 -71.5 150.5t-196.5 64.5q-191 0 -328 -170l-92 100q14 16 33.5 34.5t62.5 49t90 53.5t116.5 40.5t141.5 17.5q179 0 286.5 -94t107.5 -230 q0 -63 -26 -119t-62.5 -93.5t-88.5 -71.5t-89 -52t-79 -37q-7 -3 -10 -4q-182 -82 -251.5 -157.5t-88.5 -204.5h717v-127h-879z" />
-<glyph unicode="3" horiz-adv-x="1097" d="M80 -66l96 89q44 -92 134 -144.5t218 -52.5q154 0 242 76t88 213q0 141 -94 223t-264 82h-51v119h55q154 0 239.5 72t85.5 192q0 118 -82.5 184t-214.5 66q-116 0 -205.5 -52t-133.5 -145l-91 86q51 107 172.5 172.5t270.5 65.5q189 0 309.5 -102.5t120.5 -264.5 q0 -127 -73 -219.5t-197 -110.5q135 -22 215.5 -122t80.5 -248q0 -186 -130.5 -300t-342.5 -114q-154 0 -271.5 62t-176.5 173z" />
-<glyph unicode="4" horiz-adv-x="1110" d="M43 104v123l727 942h96v-938h181v-127h-181v-364h-139v364h-684zM190 231h549v719z" />
-<glyph unicode="5" horiz-adv-x="1128" d="M78 -27l92 70q58 -101 158 -162t217 -61q154 0 257 99.5t103 254.5q0 149 -99 244.5t-247 95.5q-98 0 -183 -42.5t-138 -121.5h-129l161 819h703v-129h-598l-101 -522q53 57 131 89t168 32q132 0 240.5 -58.5t172 -165t63.5 -239.5q0 -141 -68.5 -252t-183.5 -170 t-254 -59q-153 0 -278 75.5t-187 202.5z" />
-<glyph unicode="6" horiz-adv-x="1241" d="M113 588q0 432 143.5 654t392.5 222q142 0 257 -72t175 -198l-90 -82q-41 104 -135 166.5t-209 62.5q-182 0 -291 -168.5t-110 -465.5q44 120 154.5 192t248.5 72q137 0 252 -65.5t181.5 -178.5t66.5 -248q0 -136 -67.5 -250.5t-186 -181.5t-260.5 -67q-234 0 -378 164 t-144 444zM256 479q0 -154 113 -265.5t268 -111.5t267 111t112 266t-112.5 266t-266.5 111q-157 0 -269 -111t-112 -266z" />
-<glyph unicode="7" horiz-adv-x="1126" d="M94 1065v129h1006l-735 -1454h-160l674 1325h-785z" />
-<glyph unicode="8" horiz-adv-x="1220" d="M104 412q0 130 86.5 227.5t204.5 138.5q-104 43 -171.5 123t-67.5 182q0 70 26.5 130.5t71 104t103 75t123 46.5t130.5 15q83 0 163 -25t145.5 -70t106 -116.5t40.5 -157.5q0 -102 -69.5 -183t-174.5 -124q127 -44 210 -143.5t83 -231.5q0 -123 -70.5 -220t-186 -148 t-253.5 -51q-216 0 -358 124.5t-142 303.5zM248 412q0 -91 56 -162t138 -106t170 -35q89 0 171 37t136 108.5t54 159.5q0 93 -56.5 164.5t-138.5 106t-170 34.5q-91 0 -172.5 -37t-134.5 -109t-53 -161zM297 1077q0 -76 48.5 -134.5t119 -86t145.5 -27.5q74 0 144.5 28.5 t120 88t49.5 135.5q0 112 -93.5 179t-222.5 67q-127 0 -219 -68.5t-92 -181.5z" />
-<glyph unicode="9" horiz-adv-x="1206" d="M78 670q0 136 67.5 250.5t186 181.5t260.5 67q234 0 378 -164t144 -444q0 -432 -143.5 -654t-392.5 -222q-142 0 -257.5 72t-175.5 198l91 82q41 -104 135 -167t209 -63q182 0 291 168.5t110 466.5q-44 -120 -154.5 -192t-248.5 -72q-137 0 -252 65.5t-181.5 178.5 t-66.5 248zM211 670q0 -155 112.5 -266t266.5 -111q157 0 269 111t112 266q0 154 -113 265.5t-268 111.5t-267 -111t-112 -266z" />
-<glyph unicode=":" horiz-adv-x="403" d="M143 0v201h117v-201h-117zM143 860v201h117v-201h-117z" />
-<glyph unicode=";" horiz-adv-x="434" d="M119 -31q17 0 30 9.5t13 33.5v189h119v-209q0 -65 -48 -97t-114 -32v106zM162 860v201h119v-201h-119z" />
-<glyph unicode="<" horiz-adv-x="1036" d="M70 489v76l858 516v-149l-658 -402l658 -399v-154z" />
-<glyph unicode="=" horiz-adv-x="903" d="M143 397v101h619v-101h-619zM143 633v100h619v-100h-619z" />
-<glyph unicode=">" horiz-adv-x="1036" d="M109 -23v154l657 399l-657 402v149l860 -516v-76z" />
-<glyph unicode="?" horiz-adv-x="980" d="M72 1208q56 123 173.5 194t254.5 71q77 0 147.5 -24.5t127 -71.5t90.5 -124t34 -172q0 -45 -9 -85t-20.5 -68.5t-36.5 -57.5t-42 -45.5t-54 -40.5t-54 -34t-60 -33q-37 -20 -57.5 -33t-49 -39.5t-43.5 -54.5t-26 -73.5t-11 -102.5h-119q0 132 42 212.5t133 135.5 q16 9 58 32.5t65.5 37.5t58.5 42.5t54 56t33.5 69.5t14.5 90q0 126 -82 196t-196 70q-105 0 -194.5 -59t-135.5 -150zM319 0v219h121v-219h-121z" />
-<glyph unicode="@" horiz-adv-x="1691" d="M102 471q0 169 63 314t168 242.5t242 152.5t285 55q150 0 286.5 -57t238 -158t161.5 -248t60 -317q0 -31 -2 -64t-9.5 -83.5t-19.5 -94.5t-35 -90.5t-53 -79.5t-76.5 -54.5t-103.5 -21.5q-49 0 -82.5 15t-51.5 44t-26 58.5t-12 71.5q-61 -64 -153 -105t-194 -41 q-142 0 -224.5 76.5t-82.5 198.5q0 60 22.5 108.5t59 78.5t86.5 50.5t102 28.5t109 8q128 0 260 -47q0 77 -12 134.5t-39.5 103t-78.5 69t-124 23.5q-154 0 -286 -97l-37 80q159 107 334 107q64 0 114.5 -13.5t85 -35t60 -55t40 -68t22.5 -79.5t10.5 -83t2.5 -86v-264 q0 -51 3.5 -84t14 -63t32.5 -44t55 -14q61 0 105.5 42.5t67 110.5t32.5 133.5t10 129.5q0 195 -88 357t-243 255.5t-343 93.5q-186 0 -342 -88.5t-248 -248.5t-92 -357q0 -192 87 -352.5t241 -254t342 -93.5q158 0 315 77l27 -65q-165 -82 -342 -82q-151 0 -288 58.5 t-237.5 159.5t-159.5 245t-59 307zM575 289q0 -84 62 -137.5t158 -53.5q98 0 190 45q78 36 105.5 88.5t27.5 120.5v82q-9 1 -50 13t-97.5 22t-114.5 10t-106 -9.5t-88.5 -30.5t-63.5 -59.5t-23 -90.5z" />
-<glyph unicode="A" horiz-adv-x="1390" d="M31 0l608 1454h117l608 -1454h-154l-188 455h-653l-187 -455h-151zM399 567h590l-291 719z" />
-<glyph unicode="B" horiz-adv-x="1368" d="M184 0v1454h699q98 0 175.5 -55.5t116.5 -139t39 -176.5q0 -110 -55.5 -202t-152.5 -136q124 -37 197 -137.5t73 -232.5q0 -106 -55.5 -192.5t-148.5 -134.5t-204 -48h-684zM326 125h542q111 0 188 82.5t77 191.5q0 110 -72.5 193.5t-177.5 83.5h-557v-551zM326 793h499 q105 0 177.5 80t72.5 188q0 112 -67.5 190t-169.5 78h-512v-536z" />
-<glyph unicode="C" horiz-adv-x="1411" d="M90 737q0 133 47 261t132.5 232t219 168t291.5 64q188 0 327.5 -86t209.5 -231l-115 -70q-33 70 -83 121.5t-108 80.5t-117.5 42.5t-121.5 13.5q-101 0 -189 -34.5t-151.5 -93.5t-109 -136.5t-67.5 -164t-22 -175.5q0 -160 71 -300.5t197.5 -226t276.5 -85.5 q86 0 169 27.5t159.5 90t120.5 152.5l119 -61q-45 -104 -140.5 -182.5t-208.5 -117t-227 -38.5q-116 0 -223 42t-189 115.5t-143 168t-93 204t-32 219.5z" />
-<glyph unicode="D" horiz-adv-x="1470" d="M184 0v1454h492q136 0 250.5 -37t196 -103t138 -157t84 -199t27.5 -229q0 -331 -189 -530t-507 -199h-492zM326 127h350q133 0 239 46t174 127t104 190.5t36 238.5q0 267 -146.5 432.5t-406.5 165.5h-350v-1200z" />
-<glyph unicode="E" horiz-adv-x="1255" d="M184 0v1454h959v-127h-817v-524h712v-121h-712v-555h835v-127h-977z" />
-<glyph unicode="F" horiz-adv-x="1198" d="M184 0v1454h953v-127h-811v-534h686v-119h-686v-674h-142z" />
-<glyph unicode="G" horiz-adv-x="1478" d="M92 729q0 145 51 279t138.5 234.5t214 161t268.5 60.5q395 0 555 -317l-111 -74q-137 262 -446 262q-118 0 -218.5 -51.5t-166.5 -136.5t-103.5 -194.5t-37.5 -225.5q0 -162 71.5 -301.5t197.5 -223t277 -83.5q253 0 455 241v244h-322v111h445v-715h-123v211 q-203 -221 -465 -221q-114 0 -220.5 41t-188.5 113t-144 165t-94.5 201.5t-32.5 218.5z" />
-<glyph unicode="H" horiz-adv-x="1513" d="M184 0v1454h142v-647h862v647h143v-1454h-143v680h-862v-680h-142z" />
-<glyph unicode="I" horiz-adv-x="509" d="M184 0v1452h142v-1452h-142z" />
-<glyph unicode="J" horiz-adv-x="995" d="M37 68l41 114q109 -76 274 -76q63 0 112 14t84 38t60 65.5t40 87.5t23.5 113.5t11.5 133.5t3 157v737h143v-737q0 -103 -4 -180.5t-16.5 -158.5t-34 -138t-57 -109t-85.5 -83.5t-120 -50t-160 -18.5q-182 0 -315 91z" />
-<glyph unicode="K" horiz-adv-x="1312" d="M184 0v1452h142v-844l800 846h158l-594 -639l627 -815h-158l-557 731l-276 -285v-446h-142z" />
-<glyph unicode="L" horiz-adv-x="1208" d="M184 0v1454h142v-1327h841v-127h-983z" />
-<glyph unicode="M" horiz-adv-x="1798" d="M184 0v1454h146l569 -995l569 995h146v-1454h-141v1194l-531 -924h-84l-532 924v-1194h-142z" />
-<glyph unicode="N" horiz-adv-x="1583" d="M184 0v1454h111l962 -1210v1208h142v-1452h-123l-950 1188v-1188h-142z" />
-<glyph unicode="O" d="M92 727q0 144 53 278.5t142.5 235.5t218 162t270.5 61q118 0 226 -41.5t189.5 -113.5t142 -166t91.5 -201.5t31 -216.5q0 -144 -52.5 -278t-142 -235t-217.5 -161.5t-270 -60.5q-148 0 -277.5 63t-217 166t-137.5 235.5t-50 272.5zM236 727q0 -158 67 -296.5t192 -225 t279 -86.5q120 0 223 53t171 139t106.5 194.5t38.5 221.5q0 158 -68 296t-193 224t-278 86q-120 0 -223 -52.5t-170.5 -138t-106 -194t-38.5 -221.5z" />
-<glyph unicode="P" horiz-adv-x="1271" d="M184 0v1454h602q120 0 221 -67.5t155.5 -172t54.5 -217.5q0 -120 -51.5 -224.5t-148.5 -170t-218 -65.5h-473v-537h-142zM326 664h465q125 0 203.5 98t78.5 235q0 136 -87.5 233t-207.5 97h-452v-663z" />
-<glyph unicode="Q" d="M92 727q0 144 53 278.5t142.5 235.5t218 162t270.5 61q118 0 226 -41.5t189.5 -113.5t142 -166t91.5 -201.5t31 -216.5q0 -147 -54 -283t-151 -239l172 -203h-141l-111 129q-179 -139 -397 -139q-119 1 -226.5 41.5t-189.5 111.5t-142.5 163.5t-92 201t-31.5 219.5z M236 727q0 -158 67 -296.5t192 -225t279 -86.5q174 0 313 110l-182 217h142l116 -139q72 86 111 196t39 224q0 158 -68 296.5t-193 225t-278 86.5q-96 0 -182 -34t-150 -93.5t-111 -136.5t-71 -165.5t-24 -178.5z" />
-<glyph unicode="R" horiz-adv-x="1351" d="M184 0v1454h613q121 0 222 -67.5t155.5 -172t54.5 -217.5q0 -160 -90.5 -283.5t-235.5 -152.5l359 -561h-162l-344 537h-430v-537h-142zM326 664h477q83 0 148.5 47.5t99.5 123t34 162.5q0 133 -87.5 231.5t-206.5 98.5h-465v-663z" />
-<glyph unicode="S" horiz-adv-x="1253" d="M72 199l69 116q84 -88 220.5 -144t295.5 -56q176 0 273.5 64t97.5 188q0 53 -19 93.5t-51 70t-90.5 54.5t-121 43t-158.5 40q-99 23 -165.5 44t-127.5 51.5t-95.5 68.5t-54.5 91.5t-20 123.5q0 198 142 307.5t376 109.5q271 0 463 -168l-68 -114q-63 71 -167 113t-230 42 q-188 0 -279.5 -70.5t-91.5 -199.5q0 -51 16.5 -89.5t44.5 -65.5t82 -49.5t112 -38.5t151 -36q101 -22 172 -43t137.5 -53.5t106 -74t63 -100.5t23.5 -136q0 -130 -68.5 -220t-184 -131.5t-270.5 -41.5q-340 0 -583 211z" />
-<glyph unicode="T" horiz-adv-x="1257" d="M39 1327v127h1180v-127h-519v-1327h-143v1327h-518z" />
-<glyph unicode="U" horiz-adv-x="1546" d="M162 721v733h141v-733q0 -96 14 -180t48 -163t86 -135.5t134 -90t187 -33.5q107 0 190.5 34.5t135.5 91.5t85.5 136.5t46.5 162.5t13 177v733h143v-733q0 -121 -20.5 -226.5t-67 -199.5t-116 -160.5t-174 -105.5t-234.5 -39q-135 0 -241 41t-174.5 109t-114 163.5 t-64 198.5t-18.5 219z" />
-<glyph unicode="V" horiz-adv-x="1386" d="M25 1454h149l520 -1276l516 1276h152l-606 -1454h-125z" />
-<glyph unicode="W" horiz-adv-x="2142" d="M25 1454h151l529 -1288l276 657l-254 621h137l205 -516l207 516h135l-254 -621l279 -657l526 1288h156l-615 -1454h-127l-305 719l-307 -719h-127z" />
-<glyph unicode="X" horiz-adv-x="1292" d="M10 1454h160l477 -635l477 635h158l-559 -737l543 -717h-158l-461 614l-461 -614h-159l542 717z" />
-<glyph unicode="Y" horiz-adv-x="1298" d="M16 1454h156l477 -782l479 782h156l-565 -913v-541h-141v545z" />
-<glyph unicode="Z" horiz-adv-x="1277" d="M57 0v113l990 1214h-973v127h1138v-113l-976 -1214h974v-127h-1153z" />
-<glyph unicode="[" horiz-adv-x="507" d="M172 -82v1598h244v-117h-113v-1364h113v-117h-244z" />
-<glyph unicode="\" horiz-adv-x="1165" d="M55 1454h160l891 -1454h-158z" />
-<glyph unicode="]" horiz-adv-x="507" d="M92 35h115v1364h-115v117h244v-1598h-244v117z" />
-<glyph unicode="^" horiz-adv-x="1107" d="M90 621l406 833h118l404 -833h-123l-340 702l-346 -702h-119z" />
-<glyph unicode="_" horiz-adv-x="849" d="M35 0h780v-127h-780v127z" />
-<glyph unicode="`" horiz-adv-x="454" d="M100 1495h146l123 -190l-90 -35z" />
-<glyph unicode="a" horiz-adv-x="1122" d="M66 305q0 148 124.5 238t325.5 90q175 0 313 -55v96q0 141 -81 224t-218 83q-163 0 -344 -127l-49 92q207 139 408 139q195 0 309.5 -113t114.5 -310v-482q0 -57 49 -57v-123q-46 -4 -55 -4q-44 0 -77 25.5t-36 72.5l-4 84q-68 -92 -182 -145t-232 -53q-161 0 -263.5 95 t-102.5 230zM201 317q0 -93 70 -162t196 -69q94 0 185 41t143 109q34 47 34 79v174q-147 56 -292 56q-151 0 -243.5 -61.5t-92.5 -166.5z" />
-<glyph unicode="b" horiz-adv-x="1261" d="M150 0v1495h139v-651q162 241 407 241q108 0 200.5 -47.5t153.5 -125.5t95.5 -177.5t34.5 -204.5q0 -148 -66.5 -274t-183.5 -201t-258 -75q-122 0 -229.5 62.5t-168.5 164.5v-207h-124zM289 365q17 -106 128.5 -184.5t221.5 -78.5q113 0 205 61.5t142 159t50 207.5 q0 112 -47.5 210.5t-135.5 160.5t-196 62q-119 0 -216 -75.5t-152 -191.5v-331z" />
-<glyph unicode="c" horiz-adv-x="1126" d="M80 537q0 151 67 276t190 198.5t277 73.5q149 0 263 -68t172 -186l-136 -43q-44 82 -125 128.5t-178 46.5q-164 0 -275.5 -122t-111.5 -304q0 -181 114.5 -308t274.5 -127q101 0 194 54.5t118 128.5l135 -41q-43 -116 -166.5 -190t-276.5 -74q-151 0 -274.5 76 t-192.5 203.5t-69 277.5z" />
-<glyph unicode="d" horiz-adv-x="1275" d="M80 530q0 150 62 276.5t174.5 202.5t250.5 76q128 0 234 -67t172 -174v651h139v-1315q0 -57 49 -57v-123q-35 -6 -55 -6q-50 0 -83.5 29t-33.5 71v113q-64 -104 -172 -165.5t-225 -61.5q-108 0 -204.5 45.5t-163.5 121.5t-105.5 176t-38.5 207zM223 530 q0 -114 52.5 -212.5t144.5 -157t201 -58.5q111 0 223 80t129 185v329q-41 110 -150.5 188.5t-218.5 78.5q-110 0 -199 -63t-135.5 -161.5t-46.5 -208.5z" />
-<glyph unicode="e" horiz-adv-x="1202" d="M80 537q0 148 68.5 273.5t191.5 200t274 74.5t273 -75.5t188.5 -200t67.5 -270.5q0 -40 -4 -56h-912q12 -171 125.5 -284t268.5 -113q107 0 199 53.5t128 139.5l121 -33q-50 -118 -175 -192t-278 -74q-152 0 -275.5 76t-192 203t-68.5 278zM223 590h787 q-13 169 -125.5 278t-270.5 109t-269.5 -109.5t-121.5 -277.5z" />
-<glyph unicode="f" horiz-adv-x="706" d="M59 831v111h148v154q0 195 84.5 307.5t230.5 112.5q128 0 223 -68l-43 -100q-60 47 -153 47q-98 0 -150.5 -76t-52.5 -219v-158h295v-111h-295v-831h-139v831h-148z" />
-<glyph unicode="g" horiz-adv-x="1261" d="M82 530q0 148 62 274.5t176.5 203.5t257.5 77q244 0 409 -241v223h125v-1071q0 -144 -72 -248.5t-189 -154.5t-263 -50q-174 0 -288 62t-189 180l86 68q61 -98 164.5 -148.5t226.5 -50.5q166 0 275.5 89t109.5 253v211q-63 -101 -169 -161t-222 -60q-142 0 -258 77.5 t-179 201.5t-63 265zM223 528q0 -173 116 -299.5t282 -126.5q122 0 227.5 82t124.5 183v329q-46 116 -151 191.5t-220 75.5q-114 0 -202.5 -65.5t-132.5 -163.5t-44 -206z" />
-<glyph unicode="h" horiz-adv-x="1185" d="M150 0v1495h139v-670q64 120 177.5 190t242.5 70q338 0 338 -460v-625h-140v596q0 362 -245 362q-120 0 -228.5 -88t-144.5 -217v-653h-139z" />
-<glyph unicode="i" horiz-adv-x="438" d="M150 0v1067h139v-1067h-139zM150 1290v205h139v-205h-139z" />
-<glyph unicode="j" horiz-adv-x="438" d="M-258 -291l68 94q54 -49 149 -49q74 0 132.5 55.5t58.5 135.5v1122h139v-1114q0 -137 -95 -230.5t-219 -93.5q-147 0 -233 80zM150 1290v205h139v-205h-139z" />
-<glyph unicode="k" horiz-adv-x="1079" d="M150 0v1495h139v-1016l600 586h158l-437 -436l453 -629h-152l-393 547l-229 -213v-334h-139z" />
-<glyph unicode="l" horiz-adv-x="540" d="M156 195v1300h139v-1253q0 -60 33 -93.5t92 -33.5q55 0 110 22l25 -112q-39 -15 -95.5 -26t-97.5 -11q-96 0 -151 55t-55 152z" />
-<glyph unicode="m" horiz-adv-x="1875" d="M150 0v1067h126v-242q66 123 172.5 191.5t235.5 68.5q131 0 214 -75t101 -199q149 274 414 274q324 0 324 -460v-625h-140v596q0 185 -58 273.5t-177 88.5q-120 0 -215.5 -85t-134.5 -222v-651h-140v596q0 188 -57 275t-176 87t-214.5 -84t-135.5 -221v-653h-139z" />
-<glyph unicode="n" horiz-adv-x="1185" d="M150 0v1067h126v-242q65 117 188.5 188.5t264.5 71.5q88 0 150.5 -31.5t99 -93.5t52.5 -144t16 -191v-625h-140v596q0 188 -55 275t-172 87q-126 0 -239 -87t-152 -218v-653h-139z" />
-<glyph unicode="o" horiz-adv-x="1218" d="M80 530q0 148 68 275.5t190.5 203.5t271.5 76t271.5 -76t191 -203.5t68.5 -275.5t-68 -273.5t-190.5 -201t-272.5 -75.5q-114 0 -213.5 44.5t-168.5 119t-108.5 175.5t-39.5 211zM223 528q0 -178 112.5 -302t272.5 -124t274.5 126t114.5 304t-114 304.5t-273 126.5 q-160 0 -273.5 -127.5t-113.5 -307.5z" />
-<glyph unicode="p" horiz-adv-x="1259" d="M150 -436v1503h124v-207q66 102 172.5 163.5t225.5 61.5q143 0 261 -79t182.5 -205.5t64.5 -268.5q0 -150 -60.5 -276t-172 -201t-251.5 -75q-129 0 -234.5 66t-172.5 175v-657h-139zM289 371q48 -117 149.5 -193t218.5 -76q110 0 198.5 62.5t134.5 160t46 207.5 q0 174 -116 302.5t-281 128.5q-70 0 -146.5 -35.5t-134.5 -98t-69 -131.5v-327z" />
-<glyph unicode="q" horiz-adv-x="1259" d="M80 532q0 147 67 274t184.5 203t256.5 76q121 0 227.5 -63t169.5 -164v209h125v-1317q0 -29 11.5 -43.5t37.5 -15.5v-121q-27 -6 -59 -6q-54 0 -91.5 36.5t-37.5 90.5v530q-156 -241 -408 -241q-140 0 -252 78t-171.5 203.5t-59.5 270.5zM223 530q0 -176 109.5 -302 t273.5 -126q119 0 211.5 70t153.5 182v330q-17 108 -128 193.5t-227 85.5q-84 0 -158.5 -37t-125 -98t-80 -139t-29.5 -159z" />
-<glyph unicode="r" horiz-adv-x="718" d="M150 0v1067h131v-256q57 116 148.5 189t191.5 73q47 0 61 -2v-127q-141 -5 -246 -78.5t-147 -201.5v-664h-139z" />
-<glyph unicode="s" horiz-adv-x="997" d="M59 139l64 94q178 -147 383 -147q129 0 205.5 53.5t76.5 147.5q0 35 -14 62t-35.5 45.5t-66.5 36t-87.5 29t-117.5 29.5q-83 20 -133.5 36t-98.5 38t-72.5 48t-39 63.5t-14.5 87.5q0 104 55 178.5t143.5 109.5t200.5 35q120 0 221 -39.5t164 -105.5l-68 -82 q-59 60 -143.5 91.5t-177.5 31.5q-116 0 -189 -50t-73 -149q0 -34 10.5 -58.5t27 -41t53.5 -31.5t73 -25t102 -26q92 -22 150 -39.5t114 -42.5t86 -54t48 -70t18 -95q0 -146 -113.5 -232.5t-302.5 -86.5q-127 0 -245.5 41t-203.5 118z" />
-<glyph unicode="t" horiz-adv-x="679" d="M51 956v111h148v360h139v-360h246v-111h-246v-725q4 -56 39.5 -85t89.5 -29q87 0 162 47l37 -113q-1 -1 -20.5 -9.5t-32 -13.5t-37.5 -13.5t-46 -13.5t-50 -9t-56 -4q-96 0 -160.5 53.5t-64.5 151.5v763h-148z" />
-<glyph unicode="u" horiz-adv-x="1216" d="M139 440v627h140v-602q0 -363 247 -363q125 0 231.5 80t153.5 213v672h140v-887q0 -57 51 -57v-123q-40 -6 -58 -6q-48 0 -81 29t-33 71v148q-70 -124 -190 -193t-261 -69q-167 0 -253.5 116.5t-86.5 343.5z" />
-<glyph unicode="v" horiz-adv-x="1085" d="M35 1067h145l367 -938l368 938h136l-435 -1067h-147z" />
-<glyph unicode="w" horiz-adv-x="1669" d="M35 1067h133l389 -924l203 488l-182 434h118l140 -348l137 348h119l-181 -434l203 -488l387 924h135l-456 -1067h-117l-227 545l-228 -545h-116z" />
-<glyph unicode="x" horiz-adv-x="1024" d="M27 0l407 530l-407 537h149l320 -418l16 -31l18 31l318 418h149l-407 -537l407 -530h-149l-318 416l-18 28l-16 -28l-318 -416h-151z" />
-<glyph unicode="y" horiz-adv-x="1110" d="M27 1067h145l395 -938l365 938h133l-555 -1376q-32 -77 -85 -113.5t-144 -36.5q-40 0 -70 6v123q24 -4 41 -4q50 0 78 12q23 9 53 68t109 254z" />
-<glyph unicode="z" horiz-adv-x="995" d="M57 0v94l721 869h-704v104h856v-94l-717 -869h717v-104h-873z" />
-<glyph unicode="{" horiz-adv-x="518" d="M109 686v107q38 0 58.5 36.5t20.5 71.5v553q0 33 16 47.5t32 14.5h192v-117h-113v-535q0 -77 -55 -127q29 -25 42 -61t13 -66v-557h113v-116h-192q-20 0 -34 14.5t-14 46.5v575q0 42 -21.5 75.5t-57.5 37.5z" />
-<glyph unicode="|" horiz-adv-x="456" d="M168 -266v1853h121v-1853h-121z" />
-<glyph unicode="}" horiz-adv-x="518" d="M92 53h113v557q0 81 53 127q-53 48 -53 127v535h-113v117h193q15 0 31 -14.5t16 -47.5v-553q0 -35 20 -71.5t58 -36.5v-107q-36 -4 -57 -37t-21 -76v-575q0 -32 -14.5 -46.5t-32.5 -14.5h-193v116z" />
-<glyph unicode="~" horiz-adv-x="1040" d="M133 494q0 10 7 32.5t24 53.5t41 58.5t63.5 47t85.5 19.5q42 0 88 -18.5t80 -41t78 -41t82 -18.5q29 0 54 10t40.5 24.5t26.5 30t15.5 26.5t4.5 15h88q0 -6 -6.5 -25.5t-24.5 -49.5t-42.5 -57t-66.5 -46.5t-91 -19.5q-45 0 -94 18.5t-84 40.5t-76.5 40.5t-73.5 18.5 q-27 0 -50.5 -12t-37.5 -28.5t-24.5 -34.5t-14.5 -29.5t-4 -13.5h-88z" />
-<glyph unicode="¡" horiz-adv-x="499" d="M180 -4v1001h139v-1001h-139zM180 1235v229h139v-229h-139z" />
-<glyph unicode="¢" horiz-adv-x="1161" d="M94 528q0 103 34 199t94.5 171.5t151 125t197.5 59.5v238h76v-238q294 -9 416 -252l-133 -43q-44 81 -118 123t-165 47v-854q89 5 180 56.5t113 124.5l135 -41q-31 -83 -106.5 -145.5t-159 -90.5t-162.5 -28v-226h-76v228q-135 11 -246 93t-171 202.5t-60 250.5zM238 528 q0 -154 94.5 -274t238.5 -143v843q-101 -10 -179 -75t-116 -157t-38 -194z" />
-<glyph unicode="£" horiz-adv-x="1034" d="M109 651v111h192q-13 26 -45 83.5t-48 90t-31 82.5t-15 96q0 146 109.5 248t263.5 102q110 0 209 -57.5t161 -157.5l-82 -86q-50 85 -129 135t-164 50q-100 0 -168.5 -70.5t-68.5 -171.5q0 -54 20.5 -107.5t62 -126.5t58.5 -110h365v-111h-324q17 -66 17 -123 q0 -104 -47.5 -198t-165.5 -219q77 18 151 18q60 0 152 -18.5t139 -18.5q72 0 182 37l35 -106q-111 -54 -223 -54q-61 0 -169.5 24.5t-172.5 24.5q-102 0 -221 -34l-37 102q140 139 197 236.5t57 197.5q0 59 -21 131h-239z" />
-<glyph unicode="¥" horiz-adv-x="1388" d="M61 1454h156l475 -782l479 782h158l-442 -704h172v-99h-228l-67 -110v-56h297v-98h-297v-387h-143v387h-293v98h293v60l-64 106h-229v99h176z" />
-<glyph unicode="¦" horiz-adv-x="464" d="M172 -266v833h121v-833h-121zM172 754v833h121v-833h-121z" />
-<glyph unicode="§" horiz-adv-x="1048" d="M100 1110q0 154 122 254t292 100q122 0 214.5 -54t150.5 -140l-109 -51q-31 60 -103.5 89t-152.5 29q-115 0 -194.5 -60.5t-79.5 -170.5q0 -38 11.5 -69t28 -51.5t43 -35.5t48 -23t52.5 -13t47 -6.5t40 -2.5q68 -4 126 -15.5t111.5 -35t91 -58t59.5 -86.5t22 -118 q0 -124 -62 -193q94 -58 94 -209q0 -93 -38 -166.5t-100.5 -116.5t-133.5 -65t-145 -22q-121 0 -225 54t-177 132l90 86q148 -139 303 -139q114 0 198.5 61.5t84.5 169.5q0 46 -18 79.5t-41.5 51.5t-64 30t-66.5 15.5t-68 6.5q-399 36 -399 325q0 114 53 182 q-45 32 -75 96.5t-30 139.5zM287 674q0 -58 24 -98.5t60.5 -59.5t87 -31t96 -16t95 -11t77.5 -18q28 22 43.5 62.5t15.5 85.5q0 56 -25 97t-67.5 62.5t-86 31.5t-93.5 12q-42 1 -62 2.5t-52 7.5t-62 18q-51 -48 -51 -145z" />
-<glyph unicode="¨" horiz-adv-x="673" d="M125 1296v193h119v-193h-119zM430 1296v193h119v-193h-119z" />
-<glyph unicode="©" horiz-adv-x="1716" d="M104 727q0 156 57 293t156.5 234.5t239 153.5t299.5 56q214 0 387 -95.5t271 -264.5t98 -377q0 -157 -57.5 -294.5t-157.5 -235.5t-240.5 -154.5t-300.5 -56.5t-299.5 56.5t-239 154.5t-156.5 235.5t-57 294.5zM174 725q0 -189 88.5 -343t244.5 -241.5t349 -87.5 q191 0 347 84t246.5 237.5t90.5 348.5q0 143 -52 268t-142.5 214.5t-217.5 140.5t-272 51q-192 0 -348 -87t-245 -241t-89 -344zM393 727q0 70 18 138t55.5 129.5t91.5 108.5t132 75t170 28q136 0 241 -59.5t150 -167.5l-133 -43q-37 81 -109.5 114t-148.5 33 q-78 0 -141.5 -31t-102 -82.5t-59 -114t-20.5 -128.5q0 -81 30 -149.5t78.5 -112t105.5 -68t113 -24.5q80 0 158 43t111 112l135 -39q-34 -87 -144 -162t-254 -75q-125 0 -233 57.5t-176 167.5t-68 250z" />
-<glyph unicode="ª" horiz-adv-x="888" d="M96 934q0 98 85.5 160.5t219.5 62.5q125 0 209 -37v58q0 88 -52 139t-144 51q-106 0 -234 -84l-41 76q143 94 285 94q144 0 225.5 -76t81.5 -213v-293q0 -42 39 -45v-106q-36 -4 -47 -4q-40 0 -66.5 20.5t-27.5 53.5l-2 51q-51 -64 -125.5 -98.5t-161.5 -34.5 q-103 0 -173.5 65t-70.5 160zM211 942q0 -60 46.5 -100.5t115.5 -40.5q87 0 162 44.5t75 96.5v107q-73 32 -188 32q-94 0 -152.5 -38t-58.5 -101z" />
-<glyph unicode="«" horiz-adv-x="1183" d="M90 489v76l510 365v-121l-395 -279l395 -274v-121zM543 489v76l508 365v-121l-394 -279l394 -274v-121z" />
-<glyph unicode="¬" horiz-adv-x="1206" d="M162 618v127h899v-487h-123v360h-776z" />
-<glyph unicode="­" horiz-adv-x="1167" d="M135 494v129h899v-129h-899z" />
-<glyph unicode="®" horiz-adv-x="1716" d="M104 727q0 156 57 293t156.5 234.5t239 153.5t299.5 56q214 0 387 -95.5t271 -264.5t98 -377q0 -157 -57.5 -294.5t-157.5 -235.5t-240.5 -154.5t-300.5 -56.5t-299.5 56.5t-239 154.5t-156.5 235.5t-57 294.5zM178 727q0 -190 87.5 -345t242.5 -243t348 -88 q191 0 346.5 84t245.5 238.5t90 351.5q0 189 -88 343t-244 241.5t-350 87.5q-192 0 -347.5 -87.5t-243 -241t-87.5 -341.5zM545 260v928h391q116 0 195 -90.5t79 -202.5q0 -101 -58 -179.5t-151 -97.5l228 -358h-119l-217 344h-242v-344h-106zM651 698h285q81 0 125.5 55 t44.5 142q0 85 -50.5 140t-127.5 55h-277v-392z" />
-<glyph unicode="¯" horiz-adv-x="811" d="M111 1358v96h591v-96h-591z" />
-<glyph unicode="°" horiz-adv-x="546" d="M102 1315q0 70 49.5 119t120.5 49q72 0 121 -48.5t49 -119.5q0 -73 -49 -122.5t-121 -49.5q-71 0 -120.5 49.5t-49.5 122.5zM182 1313q0 -37 27 -64q26 -26 63 -26q40 0 66 26q24 27 24 64q0 36 -24 63t-66 27q-39 0 -63 -27q-27 -27 -27 -63z" />
-<glyph unicode="±" horiz-adv-x="942" d="M141 125v117h662v-117h-662zM141 688v117h267v287h127v-287h268v-117h-268v-287h-127v287h-267z" />
-<glyph unicode="²" horiz-adv-x="798" d="M76 670q0 104 28.5 175.5t83 117t146.5 81.5q17 7 63 23.5t67 25t55.5 27t51 35.5t30 43t13.5 57q0 66 -54 109t-154 43q-158 0 -261 -113l-61 64q10 15 33.5 35t64 45t103.5 42t133 17q143 0 221 -67.5t78 -172.5q0 -34 -9.5 -64t-23 -51.5t-36.5 -41.5t-42 -32t-48 -25 t-47 -19t-46 -15t-37 -12q-121 -41 -169 -101.5t-48 -137.5h496v-88h-631z" />
-<glyph unicode="³" horiz-adv-x="802" d="M74 840l55 59q6 -55 81 -102t181 -47q102 0 170 40t68 105q0 71 -82 111.5t-223 40.5h-48v83h48q131 0 203.5 34.5t72.5 101.5q0 66 -63 106.5t-154 40.5q-82 0 -144 -31t-94 -84l-63 70q36 59 119.5 94t181.5 35q135 0 225 -64t90 -161q0 -142 -186 -180 q96 -13 153.5 -71.5t57.5 -137.5q0 -102 -96.5 -164t-235.5 -62q-128 0 -215 50t-102 133z" />
-<glyph unicode="´" horiz-adv-x="454" d="M100 1305l121 190h148l-176 -225z" />
-<glyph unicode="µ" horiz-adv-x="1224" d="M164 -434v1501h139v-602q0 -183 62.5 -273t189.5 -90q123 0 229.5 80.5t153.5 212.5v672h139v-887q0 -57 51 -57v-123q-40 -6 -59 -6q-47 0 -80 28.5t-33 71.5v148q-57 -112 -170 -187t-237 -75q-96 0 -159.5 47t-92.5 127v-588h-133z" />
-<glyph unicode="¶" horiz-adv-x="1226" d="M74 961q0 232 153 362.5t424 130.5h494v-111h-144v-1507h-122v637h-152v-637h-121v637q-246 3 -389 133.5t-143 354.5zM195 965q0 -180 115.5 -275.5t295.5 -105.5v759q-197 -1 -304 -102t-107 -276zM727 584h152v759h-152v-759z" />
-<glyph unicode="·" horiz-adv-x="387" d="M135 504v229h119v-229h-119z" />
-<glyph unicode="¸" horiz-adv-x="579" d="M45 -322l35 64q76 -37 180 -37q117 0 117 72q0 73 -103 73q-81 0 -163 -28l116 215l68 -27l-72 -114q30 12 78 12q72 0 114 -32.5t42 -92.5q0 -69 -54 -106t-155 -37q-102 0 -203 38z" />
-<glyph unicode="¹" horiz-adv-x="557" d="M70 1292v92q24 0 52.5 11t52.5 27t44.5 32.5t32 28.5t12.5 14h94v-737h154v-92h-414v92h166v633q-26 -31 -87.5 -66t-106.5 -35z" />
-<glyph unicode="º" horiz-adv-x="917" d="M90 1081q0 155 104.5 264t264.5 109t264 -109t104 -264q0 -153 -104 -262.5t-264 -109.5q-161 0 -265 109.5t-104 262.5zM213 1079q0 -112 71.5 -189t174.5 -77q102 0 174 79t72 191t-72 188.5t-174 76.5t-174 -78t-72 -191z" />
-<glyph unicode="»" horiz-adv-x="1183" d="M131 135v121l395 274l-395 279v121l508 -365v-76zM584 135v121l393 274l-393 279v121l508 -365v-76z" />
-<glyph unicode="¼" horiz-adv-x="1699" d="M94 1292v92q38 0 86.5 27.5t77.5 53.5t31 32h94v-737h154v-92h-414v92h166v633q-25 -31 -87.5 -66t-107.5 -35zM274 55l574 697l555 710l72 -61l-570 -696l-559 -713zM944 211v86l496 520h63v-516h117v-90h-117v-211h-92v211h-467zM1042 301h371v391z" />
-<glyph unicode="½" horiz-adv-x="1779" d="M100 1292v92q38 0 86.5 27.5t77.5 53.5t31 32h94v-737h154v-92h-414v92h166v633q-25 -31 -87.5 -66t-107.5 -35zM207 55l573 697l555 710l72 -61l-569 -696l-559 -713zM1065 0q0 154 60 239t192 138q16 6 52 19t55.5 21t49.5 21.5t47 27t34.5 31.5t25.5 40.5t8 48.5 q0 66 -53 109.5t-150 43.5q-149 0 -253 -114l-60 65q13 16 34.5 34.5t61.5 44t100.5 42t129.5 16.5q140 0 215.5 -67.5t75.5 -175.5q0 -35 -10.5 -66t-24.5 -52.5t-41.5 -42.5t-46 -32.5t-54.5 -26t-51 -19.5l-51 -17q-121 -39 -175 -105t-54 -133h510v-90h-627z" />
-<glyph unicode="¾" horiz-adv-x="1732" d="M90 840l55 59q6 -55 81.5 -102t181.5 -47q102 0 169.5 40t67.5 105q0 71 -82 111.5t-223 40.5h-47v83h47q131 0 203.5 34.5t72.5 101.5q0 66 -63 106.5t-154 40.5q-82 0 -143.5 -31t-93.5 -84l-64 70q36 59 119.5 94t181.5 35q135 0 225.5 -64t90.5 -161 q0 -141 -187 -180q96 -13 153.5 -71.5t57.5 -137.5q0 -102 -96 -164t-235 -62q-128 0 -215.5 50t-102.5 133zM346 55l574 697l555 710l71 -61l-569 -696l-559 -713zM965 211v86l495 520h64v-516h116v-90h-116v-211h-92v211h-467zM1063 301h371v391z" />
-<glyph unicode="¿" horiz-adv-x="966" d="M74 -45q0 45 9 85t20.5 68.5t36.5 57.5t42 45.5t54 40.5t54 34t60 33q37 20 57.5 33.5t49 39.5t43.5 54.5t26 74t11 102.5h118q0 -132 -41.5 -213t-132.5 -136q-16 -10 -57.5 -33t-65.5 -37t-59 -42.5t-54 -55.5t-33.5 -69t-14.5 -90q0 -126 82 -196t196 -70 q106 0 195 58.5t135 149.5l96 -61q-56 -123 -173.5 -193.5t-254.5 -70.5q-77 0 -147.5 24.5t-127 71.5t-90.5 123.5t-34 171.5zM532 817v219h121v-219h-121z" />
-<glyph unicode="À" horiz-adv-x="1390" d="M31 0l608 1454h117l608 -1454h-154l-188 455h-653l-187 -455h-151zM399 567h590l-291 719zM508 1878h145l123 -190l-90 -35z" />
-<glyph unicode="Á" horiz-adv-x="1390" d="M31 0l608 1454h117l608 -1454h-154l-188 455h-653l-187 -455h-151zM399 567h590l-291 719zM618 1688l121 190h148l-176 -225z" />
-<glyph unicode="Â" horiz-adv-x="1390" d="M31 0l608 1454h117l608 -1454h-154l-188 455h-653l-187 -455h-151zM399 567h590l-291 719zM444 1704l201 174h103l202 -174l-80 -43l-174 129l-174 -129z" />
-<glyph unicode="Ã" horiz-adv-x="1390" d="M31 0l608 1454h117l608 -1454h-154l-188 455h-653l-187 -455h-151zM373 1673q0 16 8 43t26.5 62.5t58.5 60.5t93 25q48 0 92.5 -21.5t86 -43t83.5 -21.5q30 0 53 10t34.5 23t18.5 28.5t9 24.5t2 14h86q0 -11 -4.5 -30t-18.5 -47.5t-35 -52.5t-58.5 -41t-84.5 -17 q-52 0 -99.5 20.5t-87.5 41t-75 20.5q-31 0 -53.5 -13.5t-32 -33t-13 -32.5t-3.5 -20h-86zM399 567h590l-291 719z" />
-<glyph unicode="Ä" horiz-adv-x="1390" d="M31 0l608 1454h117l608 -1454h-154l-188 455h-653l-187 -455h-151zM399 567h590l-291 719zM485 1679v193h119v-193h-119zM791 1679v193h118v-193h-118z" />
-<glyph unicode="Å" horiz-adv-x="1390" d="M31 0l608 1454h117l608 -1454h-154l-188 455h-653l-187 -455h-151zM399 567h590l-291 719zM545 1745q0 60 42 96.5t109 36.5t109.5 -37t42.5 -96q0 -61 -42.5 -98t-109.5 -37t-109 37t-42 98zM614 1745q0 -34 23.5 -57t58.5 -23q33 0 58.5 23t25.5 57q0 35 -24 56.5 t-60 21.5q-35 0 -58.5 -21.5t-23.5 -56.5z" />
-<glyph unicode="Æ" horiz-adv-x="2029" d="M-2 0l936 1454h985v-127h-807v-522h696v-127h-696v-551h825v-127h-964v455h-531l-288 -455h-156zM508 582h455v700z" />
-<glyph unicode="Ç" horiz-adv-x="1413" d="M92 737q0 133 47 261t132.5 232t219 168t291.5 64q188 0 327.5 -86t209.5 -231l-115 -70q-33 70 -83 121.5t-108 80.5t-117.5 42.5t-121.5 13.5q-126 0 -230 -53t-170 -139.5t-102 -193t-36 -218.5q0 -119 42 -231t113.5 -196t173.5 -134.5t215 -50.5q86 0 169 27.5 t159.5 90t120.5 152.5l119 -61q-42 -98 -129 -173.5t-191 -115.5t-213 -47l-57 -94q30 12 78 12q72 0 113.5 -32.5t41.5 -92.5q0 -69 -54 -106t-155 -37t-202 38l34 64q76 -37 181 -37q116 0 116 72q0 73 -102 73q-82 0 -164 -28l90 168q-138 7 -259.5 74.5t-204.5 172 t-131 235.5t-48 265z" />
-<glyph unicode="È" horiz-adv-x="1255" d="M184 0v1454h959v-127h-817v-524h712v-121h-712v-555h835v-127h-977zM502 1878h145l123 -190l-90 -35z" />
-<glyph unicode="É" horiz-adv-x="1255" d="M184 0v1454h959v-127h-817v-524h712v-121h-712v-555h835v-127h-977zM612 1688l121 190h148l-176 -225z" />
-<glyph unicode="Ê" horiz-adv-x="1255" d="M184 0v1454h959v-127h-817v-524h712v-121h-712v-555h835v-127h-977zM438 1704l201 174h102l203 -174l-80 -43l-174 129l-174 -129z" />
-<glyph unicode="Ë" horiz-adv-x="1255" d="M184 0v1454h959v-127h-817v-524h712v-121h-712v-555h835v-127h-977zM479 1679v193h119v-193h-119zM784 1679v193h119v-193h-119z" />
-<glyph unicode="Ì" horiz-adv-x="509" d="M63 1878h146l123 -190l-90 -35zM184 0v1452h142v-1452h-142z" />
-<glyph unicode="Í" horiz-adv-x="509" d="M176 1688l121 190h147l-176 -225zM184 0v1452h142v-1452h-142z" />
-<glyph unicode="Î" horiz-adv-x="509" d="M2 1704l201 174h102l203 -174l-80 -43l-174 129l-174 -129zM184 0v1452h142v-1452h-142z" />
-<glyph unicode="Ï" horiz-adv-x="509" d="M43 1679v193h119v-193h-119zM184 0v1452h142v-1452h-142zM348 1679v193h119v-193h-119z" />
-<glyph unicode="Ð" horiz-adv-x="1480" d="M70 676v110h125v668h491q136 0 250.5 -37t196 -103t138 -157t84 -199t27.5 -229q0 -331 -189 -530t-507 -199h-491v676h-125zM336 127h350q133 0 239 46t174 127t104 190.5t36 238.5q0 267 -146.5 432.5t-406.5 165.5h-350v-541h350v-110h-350v-549z" />
-<glyph unicode="Ñ" horiz-adv-x="1583" d="M184 0v1454h111l962 -1210v1208h142v-1452h-123l-950 1188v-1188h-142zM473 1673q0 16 8 43t26.5 62.5t58.5 60.5t93 25q48 0 92.5 -21.5t86.5 -43t84 -21.5q30 0 52.5 10t34 23t19 28.5t9 24.5t1.5 14h86q0 -15 -8.5 -41.5t-28.5 -61.5t-62.5 -60t-100.5 -25 q-52 0 -99.5 20.5t-87.5 41t-75 20.5q-31 0 -53.5 -13.5t-32 -32.5t-13.5 -32.5t-4 -20.5h-86z" />
-<glyph unicode="Ò" d="M92 727q0 144 53 278.5t142.5 235.5t218 162t270.5 61q118 0 226 -41.5t189.5 -113.5t142 -166t91.5 -201.5t31 -216.5q0 -144 -52.5 -278t-142 -235t-217.5 -161.5t-270 -60.5q-148 0 -277.5 63t-217 166t-137.5 235.5t-50 272.5zM236 727q0 -158 67 -296.5t192 -225 t279 -86.5q120 0 223 53t171 139t106.5 194.5t38.5 221.5q0 158 -68 296t-193 224t-278 86q-120 0 -223 -52.5t-170.5 -138t-106 -194t-38.5 -221.5zM586 1878h145l123 -190l-90 -35z" />
-<glyph unicode="Ó" d="M92 727q0 144 53 278.5t142.5 235.5t218 162t270.5 61q118 0 226 -41.5t189.5 -113.5t142 -166t91.5 -201.5t31 -216.5q0 -144 -52.5 -278t-142 -235t-217.5 -161.5t-270 -60.5q-148 0 -277.5 63t-217 166t-137.5 235.5t-50 272.5zM236 727q0 -158 67 -296.5t192 -225 t279 -86.5q120 0 223 53t171 139t106.5 194.5t38.5 221.5q0 158 -68 296t-193 224t-278 86q-120 0 -223 -52.5t-170.5 -138t-106 -194t-38.5 -221.5zM696 1688l121 190h148l-177 -225z" />
-<glyph unicode="Ô" d="M92 727q0 144 53 278.5t142.5 235.5t218 162t270.5 61q118 0 226 -41.5t189.5 -113.5t142 -166t91.5 -201.5t31 -216.5q0 -144 -52.5 -278t-142 -235t-217.5 -161.5t-270 -60.5q-148 0 -277.5 63t-217 166t-137.5 235.5t-50 272.5zM236 727q0 -158 67 -296.5t192 -225 t279 -86.5q120 0 223 53t171 139t106.5 194.5t38.5 221.5q0 158 -68 296t-193 224t-278 86q-120 0 -223 -52.5t-170.5 -138t-106 -194t-38.5 -221.5zM524 1704l201 174h102l203 -174l-80 -43l-174 129l-174 -129z" />
-<glyph unicode="Õ" d="M92 727q0 144 53 278.5t142.5 235.5t218 162t270.5 61q118 0 226 -41.5t189.5 -113.5t142 -166t91.5 -201.5t31 -216.5q0 -144 -52.5 -278t-142 -235t-217.5 -161.5t-270 -60.5q-148 0 -277.5 63t-217 166t-137.5 235.5t-50 272.5zM236 727q0 -158 67 -296.5t192 -225 t279 -86.5q120 0 223 53t171 139t106.5 194.5t38.5 221.5q0 158 -68 296t-193 224t-278 86q-120 0 -223 -52.5t-170.5 -138t-106 -194t-38.5 -221.5zM453 1673q0 16 8 43t26.5 62.5t58.5 60.5t93 25q48 0 92.5 -21.5t86 -43t83.5 -21.5q30 0 53 10t34.5 23t18.5 28.5t9 24.5 t2 14h86q0 -11 -4.5 -30t-18.5 -47.5t-35 -52.5t-58.5 -41t-84.5 -17q-52 0 -99.5 20.5t-87.5 41t-75 20.5q-31 0 -53.5 -13.5t-32 -33t-13 -32.5t-3.5 -20h-86z" />
-<glyph unicode="Ö" d="M92 727q0 144 53 278.5t142.5 235.5t218 162t270.5 61q118 0 226 -41.5t189.5 -113.5t142 -166t91.5 -201.5t31 -216.5q0 -144 -52.5 -278t-142 -235t-217.5 -161.5t-270 -60.5q-148 0 -277.5 63t-217 166t-137.5 235.5t-50 272.5zM236 727q0 -158 67 -296.5t192 -225 t279 -86.5q120 0 223 53t171 139t106.5 194.5t38.5 221.5q0 158 -68 296t-193 224t-278 86q-120 0 -223 -52.5t-170.5 -138t-106 -194t-38.5 -221.5zM563 1679v193h119v-193h-119zM868 1679v193h119v-193h-119z" />
-<glyph unicode="×" horiz-adv-x="946" d="M135 311l248 246l-246 248l90 88l246 -246l246 248l88 -90l-246 -248l250 -248l-90 -88l-248 248l-250 -248z" />
-<glyph unicode="Ø" d="M92 727q0 144 53 278.5t142.5 235.5t218 162t270.5 61q183 0 340 -100l62 90h159l-116 -174q110 -107 172.5 -254t62.5 -301q0 -144 -52.5 -278t-142 -235t-217.5 -161.5t-270 -60.5q-190 0 -346 100l-59 -90h-158l115 172q-110 106 -172 252t-62 303zM236 727 q0 -125 43 -240t122 -202l641 966q-125 82 -268 82q-120 0 -223 -52.5t-170.5 -138t-106 -194t-38.5 -221.5zM502 201q125 -82 272 -82q120 0 223 53t171 139t106.5 194.5t38.5 221.5q0 123 -44.5 237.5t-123.5 200.5z" />
-<glyph unicode="Ù" horiz-adv-x="1546" d="M162 721v733h141v-733q0 -96 14 -180t48 -163t86 -135.5t134 -90t187 -33.5q107 0 190.5 34.5t135.5 91.5t85.5 136.5t46.5 162.5t13 177v733h143v-733q0 -121 -20.5 -226.5t-67 -199.5t-116 -160.5t-174 -105.5t-234.5 -39q-135 0 -241 41t-174.5 109t-114 163.5 t-64 198.5t-18.5 219zM584 1878h145l123 -190l-90 -35z" />
-<glyph unicode="Ú" horiz-adv-x="1546" d="M162 721v733h141v-733q0 -96 14 -180t48 -163t86 -135.5t134 -90t187 -33.5q107 0 190.5 34.5t135.5 91.5t85.5 136.5t46.5 162.5t13 177v733h143v-733q0 -121 -20.5 -226.5t-67 -199.5t-116 -160.5t-174 -105.5t-234.5 -39q-135 0 -241 41t-174.5 109t-114 163.5 t-64 198.5t-18.5 219zM694 1688l121 190h148l-177 -225z" />
-<glyph unicode="Û" horiz-adv-x="1546" d="M162 721v733h141v-733q0 -96 14 -180t48 -163t86 -135.5t134 -90t187 -33.5q107 0 190.5 34.5t135.5 91.5t85.5 136.5t46.5 162.5t13 177v733h143v-733q0 -121 -20.5 -226.5t-67 -199.5t-116 -160.5t-174 -105.5t-234.5 -39q-135 0 -241 41t-174.5 109t-114 163.5 t-64 198.5t-18.5 219zM522 1704l201 174h102l203 -174l-80 -43l-174 129l-174 -129z" />
-<glyph unicode="Ü" horiz-adv-x="1546" d="M162 721v733h141v-733q0 -96 14 -180t48 -163t86 -135.5t134 -90t187 -33.5q107 0 190.5 34.5t135.5 91.5t85.5 136.5t46.5 162.5t13 177v733h143v-733q0 -121 -20.5 -226.5t-67 -199.5t-116 -160.5t-174 -105.5t-234.5 -39q-135 0 -241 41t-174.5 109t-114 163.5 t-64 198.5t-18.5 219zM563 1679v193h119v-193h-119zM868 1679v193h119v-193h-119z" />
-<glyph unicode="Ý" horiz-adv-x="1298" d="M16 1454h156l477 -782l479 782h156l-565 -913v-541h-141v545zM569 1688l121 190h148l-176 -225z" />
-<glyph unicode="Þ" horiz-adv-x="1241" d="M184 0v1454h142v-289h422q121 0 221.5 -67t155.5 -171.5t55 -217.5q0 -120 -52 -224.5t-149.5 -170.5t-218.5 -66h-434v-248h-142zM326 377h430q124 0 202 99t78 233q0 133 -87 231t-208 98h-415v-661z" />
-<glyph unicode="ß" horiz-adv-x="1128" d="M150 0v1055q0 181 115 294t294 113q164 0 273.5 -92t109.5 -235q0 -108 -63.5 -198t-153.5 -112q150 -32 236 -141t86 -260q0 -203 -152 -315.5t-412 -120.5v129q197 3 308.5 82t111.5 233q0 144 -94.5 233t-247.5 89h-37v127h35q109 0 179.5 65.5t70.5 167.5 q0 105 -73 165t-181 60q-130 0 -201 -86t-71 -219v-1034h-133z" />
-<glyph unicode="à" horiz-adv-x="1122" d="M66 305q0 148 124.5 238t325.5 90q175 0 313 -55v96q0 141 -81 224t-218 83q-163 0 -344 -127l-49 92q207 139 408 139q195 0 309.5 -113t114.5 -310v-482q0 -57 49 -57v-123q-46 -4 -55 -4q-44 0 -77 25.5t-36 72.5l-4 84q-68 -92 -182 -145t-232 -53q-161 0 -263.5 95 t-102.5 230zM201 317q0 -93 70 -162t196 -69q94 0 185 41t143 109q34 47 34 79v174q-147 56 -292 56q-151 0 -243.5 -61.5t-92.5 -166.5zM348 1495h146l122 -190l-90 -35z" />
-<glyph unicode="á" horiz-adv-x="1122" d="M66 305q0 148 124.5 238t325.5 90q175 0 313 -55v96q0 141 -81 224t-218 83q-163 0 -344 -127l-49 92q207 139 408 139q195 0 309.5 -113t114.5 -310v-482q0 -57 49 -57v-123q-46 -4 -55 -4q-44 0 -77 25.5t-36 72.5l-4 84q-68 -92 -182 -145t-232 -53q-161 0 -263.5 95 t-102.5 230zM201 317q0 -93 70 -162t196 -69q94 0 185 41t143 109q34 47 34 79v174q-147 56 -292 56q-151 0 -243.5 -61.5t-92.5 -166.5zM459 1305l121 190h147l-176 -225z" />
-<glyph unicode="â" horiz-adv-x="1122" d="M66 305q0 148 124.5 238t325.5 90q175 0 313 -55v96q0 141 -81 224t-218 83q-163 0 -344 -127l-49 92q207 139 408 139q195 0 309.5 -113t114.5 -310v-482q0 -57 49 -57v-123q-46 -4 -55 -4q-44 0 -77 25.5t-36 72.5l-4 84q-68 -92 -182 -145t-232 -53q-161 0 -263.5 95 t-102.5 230zM201 317q0 -93 70 -162t196 -69q94 0 185 41t143 109q34 47 34 79v174q-147 56 -292 56q-151 0 -243.5 -61.5t-92.5 -166.5zM287 1321l200 174h103l203 -174l-80 -43l-174 129l-174 -129z" />
-<glyph unicode="ã" horiz-adv-x="1122" d="M66 305q0 148 124.5 238t325.5 90q175 0 313 -55v96q0 141 -81 224t-218 83q-163 0 -344 -127l-49 92q207 139 408 139q195 0 309.5 -113t114.5 -310v-482q0 -57 49 -57v-123q-46 -4 -55 -4q-44 0 -77 25.5t-36 72.5l-4 84q-68 -92 -182 -145t-232 -53q-161 0 -263.5 95 t-102.5 230zM201 317q0 -93 70 -162t196 -69q94 0 185 41t143 109q34 47 34 79v174q-147 56 -292 56q-151 0 -243.5 -61.5t-92.5 -166.5zM215 1290q0 16 8 43t26.5 62.5t58.5 60.5t93 25q48 0 92.5 -21.5t86.5 -43t84 -21.5q30 0 52.5 10t34 23t19 28.5t9 24.5t1.5 14h86 q0 -15 -8.5 -41.5t-28.5 -61.5t-62.5 -60t-100.5 -25q-52 0 -99.5 20.5t-88 41t-75.5 20.5q-31 0 -53.5 -13.5t-32 -33t-13 -32.5t-3.5 -20h-86z" />
-<glyph unicode="ä" horiz-adv-x="1122" d="M66 305q0 148 124.5 238t325.5 90q175 0 313 -55v96q0 141 -81 224t-218 83q-163 0 -344 -127l-49 92q207 139 408 139q195 0 309.5 -113t114.5 -310v-482q0 -57 49 -57v-123q-46 -4 -55 -4q-44 0 -77 25.5t-36 72.5l-4 84q-68 -92 -182 -145t-232 -53q-161 0 -263.5 95 t-102.5 230zM201 317q0 -93 70 -162t196 -69q94 0 185 41t143 109q34 47 34 79v174q-147 56 -292 56q-151 0 -243.5 -61.5t-92.5 -166.5zM326 1296v193h118v-193h-118zM631 1296v193h119v-193h-119z" />
-<glyph unicode="å" horiz-adv-x="1122" d="M66 305q0 148 124.5 238t325.5 90q175 0 313 -55v96q0 141 -81 224t-218 83q-163 0 -344 -127l-49 92q207 139 408 139q195 0 309.5 -113t114.5 -310v-482q0 -57 49 -57v-123q-46 -4 -55 -4q-44 0 -77 25.5t-36 72.5l-4 84q-68 -92 -182 -145t-232 -53q-161 0 -263.5 95 t-102.5 230zM201 317q0 -93 70 -162t196 -69q94 0 185 41t143 109q34 47 34 79v174q-147 56 -292 56q-151 0 -243.5 -61.5t-92.5 -166.5zM385 1362q0 59 42.5 96t109.5 37t109 -36.5t42 -96.5q0 -61 -42 -98t-109 -37t-109.5 37t-42.5 98zM455 1362q0 -34 23.5 -57t58.5 -23 q33 0 58.5 23t25.5 57q0 35 -24 56.5t-60 21.5q-35 0 -58.5 -21.5t-23.5 -56.5z" />
-<glyph unicode="æ" horiz-adv-x="1908" d="M70 311q0 141 124 231.5t320 90.5q143 0 274 -41q7 90 35 156q-19 109 -96.5 171t-198.5 62q-156 0 -340 -127l-49 92q207 139 402 139q131 0 225.5 -55.5t142.5 -157.5q70 98 176 155.5t232 57.5q152 0 274.5 -75t189.5 -201t68 -277q0 -41 -2 -49h-927 q13 -171 130.5 -284t278.5 -113q106 0 199 54t129 139l121 -33q-50 -118 -175.5 -192t-279.5 -74q-137 0 -252 63.5t-186 171.5q-44 -79 -124.5 -134t-166 -78t-172.5 -23q-149 0 -250.5 95.5t-101.5 235.5zM201 322q0 -99 74 -167.5t180 -68.5q108 0 200 41t140 109 q33 33 36 71q-39 77 -43 197q-121 41 -256 41q-148 0 -239.5 -61.5t-91.5 -161.5zM920 578h796q-12 175 -125 287t-276 112t-274.5 -113t-120.5 -286z" />
-<glyph unicode="ç" horiz-adv-x="1130" d="M82 537q0 151 67 276t190 198.5t277 73.5q149 0 263 -68t172 -186l-136 -43q-44 82 -125 128.5t-178 46.5q-164 0 -275.5 -122t-111.5 -304q0 -181 114.5 -308t274.5 -127q101 0 194 54.5t118 128.5l135 -41q-41 -109 -153 -181t-253 -81l-53 -86q30 12 78 12 q72 0 114 -32.5t42 -92.5q0 -69 -54 -106t-155 -37q-102 0 -203 38l35 64q76 -37 180 -37q117 0 117 72q0 73 -103 73q-82 0 -164 -28l86 160q-213 15 -353 175.5t-140 379.5z" />
-<glyph unicode="è" horiz-adv-x="1202" d="M80 537q0 148 68.5 273.5t191.5 200t274 74.5t273 -75.5t188.5 -200t67.5 -270.5q0 -40 -4 -56h-912q12 -171 125.5 -284t268.5 -113q107 0 199 53.5t128 139.5l121 -33q-50 -118 -175 -192t-278 -74q-152 0 -275.5 76t-192 203t-68.5 278zM223 590h787 q-13 169 -125.5 278t-270.5 109t-269.5 -109.5t-121.5 -277.5zM418 1495h145l123 -190l-90 -35z" />
-<glyph unicode="é" horiz-adv-x="1202" d="M80 537q0 148 68.5 273.5t191.5 200t274 74.5t273 -75.5t188.5 -200t67.5 -270.5q0 -40 -4 -56h-912q12 -171 125.5 -284t268.5 -113q107 0 199 53.5t128 139.5l121 -33q-50 -118 -175 -192t-278 -74q-152 0 -275.5 76t-192 203t-68.5 278zM223 590h787 q-13 169 -125.5 278t-270.5 109t-269.5 -109.5t-121.5 -277.5zM528 1305l121 190h148l-176 -225z" />
-<glyph unicode="ê" horiz-adv-x="1202" d="M80 537q0 148 68.5 273.5t191.5 200t274 74.5t273 -75.5t188.5 -200t67.5 -270.5q0 -40 -4 -56h-912q12 -171 125.5 -284t268.5 -113q107 0 199 53.5t128 139.5l121 -33q-50 -118 -175 -192t-278 -74q-152 0 -275.5 76t-192 203t-68.5 278zM223 590h787 q-13 169 -125.5 278t-270.5 109t-269.5 -109.5t-121.5 -277.5zM356 1321l201 174h102l203 -174l-80 -43l-174 129l-174 -129z" />
-<glyph unicode="ë" horiz-adv-x="1202" d="M80 537q0 148 68.5 273.5t191.5 200t274 74.5t273 -75.5t188.5 -200t67.5 -270.5q0 -40 -4 -56h-912q12 -171 125.5 -284t268.5 -113q107 0 199 53.5t128 139.5l121 -33q-50 -118 -175 -192t-278 -74q-152 0 -275.5 76t-192 203t-68.5 278zM223 590h787 q-13 169 -125.5 278t-270.5 109t-269.5 -109.5t-121.5 -277.5zM397 1296v193h119v-193h-119zM702 1296v193h119v-193h-119z" />
-<glyph unicode="ì" horiz-adv-x="438" d="M29 1495h145l123 -190l-90 -35zM150 0v1067h139v-1067h-139z" />
-<glyph unicode="í" horiz-adv-x="438" d="M139 1305l121 190h148l-177 -225zM150 0v1067h139v-1067h-139z" />
-<glyph unicode="î" horiz-adv-x="438" d="M-33 1321l201 174h102l203 -174l-80 -43l-174 129l-174 -129zM150 0v1067h139v-1067h-139z" />
-<glyph unicode="ï" horiz-adv-x="438" d="M8 1296v193h119v-193h-119zM150 0v1067h139v-1067h-139zM313 1296v193h119v-193h-119z" />
-<glyph unicode="ð" horiz-adv-x="1234" d="M84 477q0 132 67.5 246t183.5 181t251 67q134 0 246.5 -66t168.5 -174q-22 142 -82.5 267t-181.5 243l-227 -143l-45 63l215 133q-112 97 -293 201h197q112 -68 204 -147l181 112l45 -61l-170 -105q301 -298 301 -727q0 -129 -43.5 -240t-117 -186t-171.5 -118t-207 -43 q-106 0 -202.5 39t-166.5 105.5t-111.5 158.5t-41.5 194zM227 475q0 -155 111.5 -264t271.5 -109q162 0 276.5 116.5t114.5 275.5q0 151 -113 255.5t-272 104.5q-161 0 -275 -111t-114 -268z" />
-<glyph unicode="ñ" horiz-adv-x="1185" d="M150 0v1067h126v-242q65 117 188.5 188.5t264.5 71.5q88 0 150.5 -31.5t99 -93.5t52.5 -144t16 -191v-625h-140v596q0 188 -55 275t-172 87q-126 0 -239 -87t-152 -218v-653h-139zM279 1290q0 16 8 43t26.5 62.5t58.5 60.5t93 25q48 0 92.5 -21.5t86 -43t83.5 -21.5 q30 0 53 10t34.5 23t18.5 28.5t9 24.5t2 14h86q0 -11 -4.5 -30t-18.5 -47.5t-35 -52.5t-58.5 -41t-84.5 -17q-52 0 -99.5 20.5t-87.5 41t-75 20.5q-31 0 -53.5 -13.5t-32 -33t-13 -32.5t-3.5 -20h-86z" />
-<glyph unicode="ò" horiz-adv-x="1218" d="M80 530q0 148 68 275.5t190.5 203.5t271.5 76t271.5 -76t191 -203.5t68.5 -275.5t-68 -273.5t-190.5 -201t-272.5 -75.5q-114 0 -213.5 44.5t-168.5 119t-108.5 175.5t-39.5 211zM223 528q0 -178 112.5 -302t272.5 -124t274.5 126t114.5 304t-114 304.5t-273 126.5 q-160 0 -273.5 -127.5t-113.5 -307.5zM420 1495h145l123 -190l-90 -35z" />
-<glyph unicode="ó" horiz-adv-x="1218" d="M80 530q0 148 68 275.5t190.5 203.5t271.5 76t271.5 -76t191 -203.5t68.5 -275.5t-68 -273.5t-190.5 -201t-272.5 -75.5q-114 0 -213.5 44.5t-168.5 119t-108.5 175.5t-39.5 211zM223 528q0 -178 112.5 -302t272.5 -124t274.5 126t114.5 304t-114 304.5t-273 126.5 q-160 0 -273.5 -127.5t-113.5 -307.5zM530 1305l121 190h148l-176 -225z" />
-<glyph unicode="ô" horiz-adv-x="1218" d="M80 530q0 148 68 275.5t190.5 203.5t271.5 76t271.5 -76t191 -203.5t68.5 -275.5t-68 -273.5t-190.5 -201t-272.5 -75.5q-114 0 -213.5 44.5t-168.5 119t-108.5 175.5t-39.5 211zM223 528q0 -178 112.5 -302t272.5 -124t274.5 126t114.5 304t-114 304.5t-273 126.5 q-160 0 -273.5 -127.5t-113.5 -307.5zM356 1321l201 174h102l203 -174l-80 -43l-174 129l-174 -129z" />
-<glyph unicode="õ" horiz-adv-x="1218" d="M80 530q0 148 68 275.5t190.5 203.5t271.5 76t271.5 -76t191 -203.5t68.5 -275.5t-68 -273.5t-190.5 -201t-272.5 -75.5q-114 0 -213.5 44.5t-168.5 119t-108.5 175.5t-39.5 211zM223 528q0 -178 112.5 -302t272.5 -124t274.5 126t114.5 304t-114 304.5t-273 126.5 q-160 0 -273.5 -127.5t-113.5 -307.5zM287 1290q0 16 8 43t26.5 62.5t58.5 60.5t93 25q48 0 92.5 -21.5t86 -43t83.5 -21.5q30 0 53 10t34.5 23t18.5 28.5t9 24.5t2 14h86q0 -11 -4.5 -30t-18.5 -47.5t-35 -52.5t-58.5 -41t-84.5 -17q-52 0 -99.5 20.5t-87.5 41t-75 20.5 q-31 0 -53.5 -13.5t-32 -33t-13 -32.5t-3.5 -20h-86z" />
-<glyph unicode="ö" horiz-adv-x="1218" d="M80 530q0 148 68 275.5t190.5 203.5t271.5 76t271.5 -76t191 -203.5t68.5 -275.5t-68 -273.5t-190.5 -201t-272.5 -75.5q-114 0 -213.5 44.5t-168.5 119t-108.5 175.5t-39.5 211zM223 528q0 -178 112.5 -302t272.5 -124t274.5 126t114.5 304t-114 304.5t-273 126.5 q-160 0 -273.5 -127.5t-113.5 -307.5zM397 1296v193h119v-193h-119zM702 1296v193h119v-193h-119z" />
-<glyph unicode="÷" horiz-adv-x="1095" d="M135 520v117h826v-117h-826zM487 152v184h121v-184h-121zM487 817v187h121v-187h-121z" />
-<glyph unicode="ø" horiz-adv-x="1218" d="M80 530q0 148 68 275.5t190.5 203.5t271.5 76t275 -77l47 63h96l-82 -110q91 -77 143 -190.5t52 -240.5q0 -148 -68 -273.5t-190.5 -201t-272.5 -75.5q-154 0 -280 77l-45 -59h-95l80 104q-90 77 -140 189t-50 239zM223 528q0 -195 129 -321l459 692q-97 64 -201 64 q-160 0 -273.5 -127.5t-113.5 -307.5zM408 164q91 -62 200 -62q160 0 274.5 126t114.5 304q0 93 -35 177t-96 145z" />
-<glyph unicode="ù" horiz-adv-x="1216" d="M139 440v627h140v-602q0 -363 247 -363q125 0 231.5 80t153.5 213v672h140v-887q0 -57 51 -57v-123q-40 -6 -58 -6q-48 0 -81 29t-33 71v148q-70 -124 -190 -193t-261 -69q-167 0 -253.5 116.5t-86.5 343.5zM401 1495h146l123 -190l-90 -35z" />
-<glyph unicode="ú" horiz-adv-x="1216" d="M139 440v627h140v-602q0 -363 247 -363q125 0 231.5 80t153.5 213v672h140v-887q0 -57 51 -57v-123q-40 -6 -58 -6q-48 0 -81 29t-33 71v148q-70 -124 -190 -193t-261 -69q-167 0 -253.5 116.5t-86.5 343.5zM512 1305l121 190h147l-176 -225z" />
-<glyph unicode="û" horiz-adv-x="1216" d="M139 440v627h140v-602q0 -363 247 -363q125 0 231.5 80t153.5 213v672h140v-887q0 -57 51 -57v-123q-40 -6 -58 -6q-48 0 -81 29t-33 71v148q-70 -124 -190 -193t-261 -69q-167 0 -253.5 116.5t-86.5 343.5zM340 1321l201 174h102l203 -174l-80 -43l-174 129l-174 -129z " />
-<glyph unicode="ü" horiz-adv-x="1216" d="M139 440v627h140v-602q0 -363 247 -363q125 0 231.5 80t153.5 213v672h140v-887q0 -57 51 -57v-123q-40 -6 -58 -6q-48 0 -81 29t-33 71v148q-70 -124 -190 -193t-261 -69q-167 0 -253.5 116.5t-86.5 343.5zM379 1296v193h119v-193h-119zM684 1296v193h119v-193h-119z " />
-<glyph unicode="ý" horiz-adv-x="1110" d="M27 1067h145l395 -938l365 938h133l-555 -1376q-32 -77 -85 -113.5t-144 -36.5q-40 0 -70 6v123q24 -4 41 -4q50 0 78 12q23 9 53 68t109 254zM487 1305l121 190h148l-176 -225z" />
-<glyph unicode="þ" horiz-adv-x="1232" d="M150 -436v1890h143v-565q141 201 354 201q114 0 211.5 -50.5t160.5 -131.5t98.5 -180.5t35.5 -201.5q-3 -147 -72 -275t-189 -206t-263 -78q-105 0 -197 53.5t-139 131.5v-588h-143zM293 352q0 -63 54.5 -124t132 -96.5t147.5 -35.5q108 0 197.5 62t138.5 160.5t49 209.5 q0 113 -46 212t-132 161t-193 62q-115 0 -204 -70.5t-144 -179.5v-361z" />
-<glyph unicode="ÿ" horiz-adv-x="1110" d="M27 1067h145l395 -938l365 938h133l-555 -1376q-32 -77 -85 -113.5t-144 -36.5q-40 0 -70 6v123q24 -4 41 -4q50 0 78 12q23 9 53 68t109 254zM354 1296v193h119v-193h-119zM659 1296v193h119v-193h-119z" />
-<glyph unicode="Œ" horiz-adv-x="2375" d="M92 727q0 144 53 278.5t142.5 235.5t218 162t270.5 61q183 0 326.5 -107t214.5 -272v369h948v-127h-805v-522h694v-127h-694v-551h824v-127h-967v369q-71 -167 -217 -273t-324 -106q-148 0 -277.5 63t-217.5 166t-138.5 235.5t-50.5 272.5zM236 727q0 -158 67 -296.5 t192 -225t279 -86.5q120 0 223 52.5t171 139t106.5 195.5t38.5 223q0 157 -68 295t-193 224.5t-278 86.5q-96 0 -182 -34t-150 -93.5t-111 -136.5t-71 -165.5t-24 -178.5z" />
-<glyph unicode="œ" horiz-adv-x="2121" d="M82 528q0 154 69.5 282t191 201.5t267.5 73.5q156 0 278.5 -90.5t178.5 -246.5q57 160 178 248.5t285 88.5q224 0 367.5 -151t160.5 -402q0 -41 -2 -49h-911q14 -168 131 -282.5t278 -114.5q111 0 203.5 53.5t126.5 139.5l117 -33q-52 -118 -178.5 -192t-274.5 -74 q-153 0 -282 90.5t-197 242.5q-68 -156 -189 -244.5t-272 -88.5q-223 0 -374.5 158.5t-151.5 389.5zM223 526q0 -180 112 -302t275 -122t275 124t112 304q0 181 -112 307t-273 126t-275 -128t-114 -309zM1143 578h780q-12 173 -125.5 286t-271.5 113q-157 0 -265.5 -113 t-117.5 -286z" />
-<glyph unicode="Ÿ" horiz-adv-x="1298" d="M16 1454h156l477 -782l479 782h156l-565 -913v-541h-141v545zM436 1679v193h119v-193h-119zM741 1679v193h119v-193h-119z" />
-<glyph unicode="ˆ" horiz-adv-x="675" d="M86 1321l201 174h102l203 -174l-80 -43l-174 129l-174 -129z" />
-<glyph unicode="˜" horiz-adv-x="831" d="M90 1290q0 16 8 43t26.5 62.5t58.5 60.5t93 25q48 0 92.5 -21.5t86.5 -43t84 -21.5q30 0 52.5 10t34 23t19 28.5t9 24.5t1.5 14h86q0 -15 -8.5 -41.5t-28.5 -61.5t-62.5 -60t-100.5 -25q-52 0 -99.5 20.5t-87.5 41t-75 20.5q-31 0 -53.5 -13.5t-32 -32.5t-13.5 -32.5 t-4 -20.5h-86z" />
-<glyph unicode=" " horiz-adv-x="939" />
-<glyph unicode=" " horiz-adv-x="1878" />
-<glyph unicode=" " horiz-adv-x="939" />
-<glyph unicode=" " horiz-adv-x="1878" />
-<glyph unicode=" " horiz-adv-x="626" />
-<glyph unicode=" " horiz-adv-x="469" />
-<glyph unicode=" " horiz-adv-x="313" />
-<glyph unicode=" " horiz-adv-x="313" />
-<glyph unicode=" " horiz-adv-x="234" />
-<glyph unicode=" " horiz-adv-x="375" />
-<glyph unicode=" " horiz-adv-x="104" />
-<glyph unicode="‐" horiz-adv-x="866" d="M135 494v129h596v-129h-596z" />
-<glyph unicode="‑" horiz-adv-x="866" d="M135 494v129h596v-129h-596z" />
-<glyph unicode="‒" horiz-adv-x="866" d="M135 494v129h596v-129h-596z" />
-<glyph unicode="–" horiz-adv-x="1167" d="M135 494v129h899v-129h-899z" />
-<glyph unicode="—" horiz-adv-x="1845" d="M135 494v129h1577v-129h-1577z" />
-<glyph unicode="‘" horiz-adv-x="405" d="M119 1249v246h119v-227q0 -24 13 -33.5t30 -9.5v-107q-67 0 -114.5 32.5t-47.5 98.5z" />
-<glyph unicode="’" horiz-adv-x="405" d="M109 1389v106q67 0 114 -32.5t47 -98.5v-246h-118v228q0 24 -13 33.5t-30 9.5z" />
-<glyph unicode="‚" horiz-adv-x="419" d="M113 -31q17 0 30 9.5t13 33.5v189h118v-209q0 -65 -47.5 -97t-113.5 -32v106z" />
-<glyph unicode="“" horiz-adv-x="667" d="M119 1249v246h119v-227q0 -24 13 -33.5t30 -9.5v-107q-67 0 -114.5 32.5t-47.5 98.5zM381 1249v246h119v-227q0 -24 13 -33.5t30 -9.5v-107q-67 0 -114.5 32.5t-47.5 98.5z" />
-<glyph unicode="”" horiz-adv-x="667" d="M109 1389v106q67 0 114 -32.5t47 -98.5v-246h-118v228q0 24 -13 33.5t-30 9.5zM371 1389v106q67 0 114 -32.5t47 -98.5v-246h-118v228q0 24 -13 33.5t-30 9.5z" />
-<glyph unicode="„" horiz-adv-x="659" d="M113 -31q17 0 30 9.5t13 33.5v189h118v-209q0 -65 -47.5 -97t-113.5 -32v106zM352 -31q17 0 30 9.5t13 33.5v189h119v-209q0 -65 -48 -97t-114 -32v106z" />
-<glyph unicode="•" horiz-adv-x="727" d="M180 709q0 74 55 128t130 54t128.5 -54t53.5 -128q0 -76 -53.5 -130.5t-128.5 -54.5t-130 54.5t-55 130.5z" />
-<glyph unicode="…" horiz-adv-x="937" d="M135 0v201h119v-201h-119zM410 0v201h118v-201h-118zM684 0v201h119v-201h-119z" />
-<glyph unicode=" " horiz-adv-x="375" />
-<glyph unicode="‹" horiz-adv-x="731" d="M90 489v76l510 365v-121l-395 -279l395 -274v-121z" />
-<glyph unicode="›" horiz-adv-x="731" d="M131 135v121l395 274l-395 279v121l508 -365v-76z" />
-<glyph unicode=" " horiz-adv-x="469" />
-<glyph unicode="€" horiz-adv-x="1644" d="M70 549l36 88h181q-6 50 -6 127h-152l37 88h123q18 119 72.5 227t139 194.5t206.5 137.5t264 51q188 0 327 -86t209 -231l-114 -70q-33 70 -83 121.5t-108 80.5t-117.5 42.5t-121.5 13.5q-109 0 -202.5 -39.5t-158.5 -107.5t-108 -153t-60 -181h692l-36 -88h-666 q0 -80 6 -127h623l-39 -88h-565q52 -188 194.5 -310t325.5 -122q86 0 168.5 27.5t159 90t120.5 152.5l119 -61q-45 -104 -140.5 -182.5t-208 -117t-226.5 -38.5q-121 0 -231.5 45.5t-194 123t-143.5 178.5t-89 214h-233z" />
-<glyph unicode="™" horiz-adv-x="1484" d="M121 1360v98h487v-98h-194v-492h-99v492h-194zM702 868v586h136l176 -383l174 383h137v-586h-98v445l-172 -359h-82l-172 359v-445h-99z" />
-<glyph unicode="◼" horiz-adv-x="1064" d="M0 0v1065h1065v-1065h-1065z" />
-<hkern u1=" " u2="’" k="59" />
-<hkern u1=" " u2="Æ" k="72" />
-<hkern u1=" " u2="y" k="55" />
-<hkern u1=" " u2="w" k="57" />
-<hkern u1=" " u2="v" k="55" />
-<hkern u1=" " u2="Y" k="76" />
-<hkern u1=" " u2="X" k="16" />
-<hkern u1=" " u2="W" k="72" />
-<hkern u1=" " u2="V" k="72" />
-<hkern u1=" " u2="T" k="55" />
-<hkern u1=" " u2="J" k="57" />
-<hkern u1=" " u2="A" k="63" />
-<hkern u1=" " u2="'" k="61" />
-<hkern u1=" " u2=""" k="63" />
-<hkern u1=""" u2=" " k="63" />
-<hkern u1="#" u2="4" k="16" />
-<hkern u1="$" u2="7" k="20" />
-<hkern u1="$" u2="3" k="23" />
-<hkern u1="&" u2="’" k="80" />
-<hkern u1="&" u2="ø" k="-8" />
-<hkern u1="&" u2="Ø" k="-23" />
-<hkern u1="&" u2="Æ" k="-57" />
-<hkern u1="&" u2="z" k="-8" />
-<hkern u1="&" u2="y" k="41" />
-<hkern u1="&" u2="x" k="-25" />
-<hkern u1="&" u2="w" k="39" />
-<hkern u1="&" u2="v" k="39" />
-<hkern u1="&" u2="s" k="-8" />
-<hkern u1="&" u2="Z" k="-8" />
-<hkern u1="&" u2="Y" k="111" />
-<hkern u1="&" u2="X" k="-33" />
-<hkern u1="&" u2="W" k="88" />
-<hkern u1="&" u2="V" k="88" />
-<hkern u1="&" u2="U" k="8" />
-<hkern u1="&" u2="T" k="86" />
-<hkern u1="&" u2="J" k="-12" />
-<hkern u1="&" u2="A" k="-27" />
-<hkern u1="&" u2="'" k="82" />
-<hkern u1="'" u2="‹" k="12" />
-<hkern u1="'" u2="ð" k="115" />
-<hkern u1="'" u2="ï" k="-16" />
-<hkern u1="'" u2="î" k="-8" />
-<hkern u1="'" u2="Æ" k="199" />
-<hkern u1="'" u2="s" k="8" />
-<hkern u1="'" u2="o" k="45" />
-<hkern u1="'" u2="f" k="12" />
-<hkern u1="'" u2="d" k="150" />
-<hkern u1="'" u2="a" k="16" />
-<hkern u1="'" u2="O" k="27" />
-<hkern u1="'" u2="J" k="174" />
-<hkern u1="'" u2="A" k="141" />
-<hkern u1="'" u2="@" k="76" />
-<hkern u1="'" u2="9" k="33" />
-<hkern u1="'" u2="5" k="31" />
-<hkern u1="'" u2="4" k="172" />
-<hkern u1="'" u2="3" k="18" />
-<hkern u1="'" u2="0" k="23" />
-<hkern u1="'" u2="/" k="190" />
-<hkern u1="'" u2="." k="248" />
-<hkern u1="'" u2=" " k="61" />
-<hkern u1="(" u2="ð" k="33" />
-<hkern u1="(" u2="ï" k="-37" />
-<hkern u1="(" u2="î" k="-8" />
-<hkern u1="(" u2="ì" k="-14" />
-<hkern u1="(" u2="Ø" k="-8" />
-<hkern u1="(" u2="Æ" k="-23" />
-<hkern u1="(" u2="y" k="23" />
-<hkern u1="(" u2="x" k="-8" />
-<hkern u1="(" u2="w" k="29" />
-<hkern u1="(" u2="v" k="27" />
-<hkern u1="(" u2="u" k="16" />
-<hkern u1="(" u2="o" k="33" />
-<hkern u1="(" u2="j" k="-16" />
-<hkern u1="(" u2="f" k="6" />
-<hkern u1="(" u2="d" k="35" />
-<hkern u1="(" u2="Y" k="-16" />
-<hkern u1="(" u2="X" k="-16" />
-<hkern u1="(" u2="W" k="-14" />
-<hkern u1="(" u2="V" k="-14" />
-<hkern u1="(" u2="T" k="-2" />
-<hkern u1="(" u2="O" k="31" />
-<hkern u1="(" u2="J" k="-6" />
-<hkern u1="(" u2="A" k="-12" />
-<hkern u1="(" u2="6" k="6" />
-<hkern u1="(" u2="0" k="31" />
-<hkern u1="*" u2="ð" k="104" />
-<hkern u1="*" u2="ï" k="-41" />
-<hkern u1="*" u2="î" k="-35" />
-<hkern u1="*" u2="ì" k="-8" />
-<hkern u1="*" u2="Æ" k="197" />
-<hkern u1="*" u2="x" k="-14" />
-<hkern u1="*" u2="w" k="-14" />
-<hkern u1="*" u2="v" k="-12" />
-<hkern u1="*" u2="s" k="37" />
-<hkern u1="*" u2="o" k="63" />
-<hkern u1="*" u2="f" k="12" />
-<hkern u1="*" u2="d" k="92" />
-<hkern u1="*" u2="a" k="29" />
-<hkern u1="*" u2="Y" k="-20" />
-<hkern u1="*" u2="X" k="-20" />
-<hkern u1="*" u2="W" k="-18" />
-<hkern u1="*" u2="V" k="-2" />
-<hkern u1="*" u2="T" k="-31" />
-<hkern u1="*" u2="O" k="14" />
-<hkern u1="*" u2="J" k="180" />
-<hkern u1="*" u2="A" k="135" />
-<hkern u1="+" u2="8" k="14" />
-<hkern u1="+" u2="7" k="43" />
-<hkern u1="+" u2="4" k="70" />
-<hkern u1="+" u2="3" k="37" />
-<hkern u1="+" u2="2" k="16" />
-<hkern u1="+" u2="1" k="18" />
-<hkern u1="," u2="j" k="-20" />
-<hkern u1="-" u2="Æ" k="33" />
-<hkern u1="-" u2="z" k="61" />
-<hkern u1="-" u2="y" k="47" />
-<hkern u1="-" u2="x" k="63" />
-<hkern u1="-" u2="w" k="47" />
-<hkern u1="-" u2="v" k="45" />
-<hkern u1="-" u2="t" k="14" />
-<hkern u1="-" u2="s" k="14" />
-<hkern u1="-" u2="f" k="12" />
-<hkern u1="-" u2="Z" k="29" />
-<hkern u1="-" u2="Y" k="139" />
-<hkern u1="-" u2="X" k="57" />
-<hkern u1="-" u2="W" k="88" />
-<hkern u1="-" u2="V" k="88" />
-<hkern u1="-" u2="T" k="137" />
-<hkern u1="-" u2="J" k="123" />
-<hkern u1="-" u2="A" k="31" />
-<hkern u1="-" u2="7" k="61" />
-<hkern u1="-" u2="4" k="35" />
-<hkern u1="-" u2="3" k="88" />
-<hkern u1="-" u2="2" k="14" />
-<hkern u1="-" u2="1" k="47" />
-<hkern u1="." u2="’" k="270" />
-<hkern u1="." u2="‘" k="276" />
-<hkern u1="." u2="Æ" k="-2" />
-<hkern u1="." u2="y" k="98" />
-<hkern u1="." u2="w" k="100" />
-<hkern u1="." u2="v" k="94" />
-<hkern u1="." u2="t" k="6" />
-<hkern u1="." u2="f" k="4" />
-<hkern u1="." u2="d" k="12" />
-<hkern u1="." u2="Y" k="162" />
-<hkern u1="." u2="W" k="152" />
-<hkern u1="." u2="V" k="150" />
-<hkern u1="." u2="U" k="39" />
-<hkern u1="." u2="T" k="141" />
-<hkern u1="." u2="O" k="39" />
-<hkern u1="." u2="7" k="66" />
-<hkern u1="." u2="'" k="248" />
-<hkern u1="/" u2="ð" k="82" />
-<hkern u1="/" u2="ï" k="-33" />
-<hkern u1="/" u2="ì" k="-4" />
-<hkern u1="/" u2="Æ" k="190" />
-<hkern u1="/" u2="z" k="14" />
-<hkern u1="/" u2="y" k="31" />
-<hkern u1="/" u2="x" k="8" />
-<hkern u1="/" u2="w" k="33" />
-<hkern u1="/" u2="v" k="33" />
-<hkern u1="/" u2="u" k="43" />
-<hkern u1="/" u2="s" k="66" />
-<hkern u1="/" u2="o" k="76" />
-<hkern u1="/" u2="n" k="45" />
-<hkern u1="/" u2="f" k="10" />
-<hkern u1="/" u2="d" k="78" />
-<hkern u1="/" u2="a" k="61" />
-<hkern u1="/" u2="Y" k="-14" />
-<hkern u1="/" u2="X" k="-14" />
-<hkern u1="/" u2="W" k="-12" />
-<hkern u1="/" u2="V" k="-12" />
-<hkern u1="/" u2="S" k="8" />
-<hkern u1="/" u2="O" k="39" />
-<hkern u1="/" u2="J" k="164" />
-<hkern u1="/" u2="A" k="131" />
-<hkern u1="/" u2="9" k="57" />
-<hkern u1="/" u2="8" k="8" />
-<hkern u1="/" u2="6" k="29" />
-<hkern u1="/" u2="5" k="68" />
-<hkern u1="/" u2="4" k="156" />
-<hkern u1="/" u2="3" k="51" />
-<hkern u1="/" u2="2" k="45" />
-<hkern u1="/" u2="1" k="39" />
-<hkern u1="/" u2="0" k="74" />
-<hkern u1="/" u2="/" k="489" />
-<hkern u1="0" u2="Æ" k="43" />
-<hkern u1="0" u2="°" k="39" />
-<hkern u1="0" u2="\" k="66" />
-<hkern u1="0" u2="Z" k="25" />
-<hkern u1="0" u2="Y" k="96" />
-<hkern u1="0" u2="X" k="27" />
-<hkern u1="0" u2="W" k="68" />
-<hkern u1="0" u2="V" k="66" />
-<hkern u1="0" u2="T" k="113" />
-<hkern u1="0" u2="J" k="20" />
-<hkern u1="0" u2="A" k="35" />
-<hkern u1="0" u2="7" k="29" />
-<hkern u1="0" u2="/" k="8" />
-<hkern u1="0" u2=")" k="31" />
-<hkern u1="0" u2="'" k="23" />
-<hkern u1="1" u2="Æ" k="-18" />
-<hkern u1="1" u2="·" k="41" />
-<hkern u1="1" u2="°" k="39" />
-<hkern u1="1" u2="\" k="76" />
-<hkern u1="1" u2="Y" k="100" />
-<hkern u1="1" u2="X" k="-8" />
-<hkern u1="1" u2="W" k="80" />
-<hkern u1="1" u2="V" k="80" />
-<hkern u1="1" u2="U" k="16" />
-<hkern u1="1" u2="T" k="119" />
-<hkern u1="1" u2="A" k="-8" />
-<hkern u1="1" u2="=" k="18" />
-<hkern u1="1" u2="7" k="20" />
-<hkern u1="1" u2="-" k="31" />
-<hkern u1="1" u2="+" k="43" />
-<hkern u1="1" u2="'" k="31" />
-<hkern u1="1" u2="#" k="-6" />
-<hkern u1="2" u2="Æ" k="-8" />
-<hkern u1="2" u2="\" k="49" />
-<hkern u1="2" u2="Y" k="78" />
-<hkern u1="2" u2="W" k="53" />
-<hkern u1="2" u2="V" k="53" />
-<hkern u1="2" u2="T" k="104" />
-<hkern u1="3" u2="Æ" k="-16" />
-<hkern u1="3" u2="°" k="43" />
-<hkern u1="3" u2="\" k="57" />
-<hkern u1="3" u2="Y" k="86" />
-<hkern u1="3" u2="X" k="-8" />
-<hkern u1="3" u2="W" k="57" />
-<hkern u1="3" u2="V" k="57" />
-<hkern u1="3" u2="T" k="106" />
-<hkern u1="3" u2="7" k="18" />
-<hkern u1="3" u2="'" k="25" />
-<hkern u1="4" u2="Æ" k="-16" />
-<hkern u1="4" u2="·" k="31" />
-<hkern u1="4" u2="°" k="27" />
-<hkern u1="4" u2="\" k="59" />
-<hkern u1="4" u2="Y" k="86" />
-<hkern u1="4" u2="X" k="-4" />
-<hkern u1="4" u2="W" k="66" />
-<hkern u1="4" u2="V" k="66" />
-<hkern u1="4" u2="T" k="113" />
-<hkern u1="4" u2="A" k="-8" />
-<hkern u1="4" u2="7" k="23" />
-<hkern u1="4" u2="-" k="16" />
-<hkern u1="4" u2="," k="-6" />
-<hkern u1="4" u2="+" k="31" />
-<hkern u1="4" u2="'" k="8" />
-<hkern u1="5" u2="Æ" k="-8" />
-<hkern u1="5" u2="·" k="25" />
-<hkern u1="5" u2="\" k="12" />
-<hkern u1="5" u2="Y" k="45" />
-<hkern u1="5" u2="W" k="27" />
-<hkern u1="5" u2="V" k="27" />
-<hkern u1="5" u2="T" k="90" />
-<hkern u1="5" u2="A" k="-8" />
-<hkern u1="5" u2="-" k="23" />
-<hkern u1="5" u2="+" k="51" />
-<hkern u1="6" u2="Æ" k="35" />
-<hkern u1="6" u2="Y" k="47" />
-<hkern u1="6" u2="W" k="35" />
-<hkern u1="6" u2="V" k="35" />
-<hkern u1="6" u2="T" k="20" />
-<hkern u1="6" u2="A" k="29" />
-<hkern u1="6" u2="3" k="8" />
-<hkern u1="7" u2="Æ" k="109" />
-<hkern u1="7" u2="·" k="43" />
-<hkern u1="7" u2="°" k="-2" />
-<hkern u1="7" u2="¢" k="33" />
-<hkern u1="7" u2="Z" k="25" />
-<hkern u1="7" u2="T" k="43" />
-<hkern u1="7" u2="J" k="109" />
-<hkern u1="7" u2="A" k="82" />
-<hkern u1="7" u2="=" k="25" />
-<hkern u1="7" u2="7" k="-6" />
-<hkern u1="7" u2="5" k="31" />
-<hkern u1="7" u2="4" k="98" />
-<hkern u1="7" u2="/" k="102" />
-<hkern u1="7" u2="." k="133" />
-<hkern u1="7" u2="-" k="53" />
-<hkern u1="7" u2="+" k="23" />
-<hkern u1="8" u2="Æ" k="31" />
-<hkern u1="8" u2="Y" k="49" />
-<hkern u1="8" u2="W" k="35" />
-<hkern u1="8" u2="V" k="35" />
-<hkern u1="8" u2="T" k="16" />
-<hkern u1="8" u2="A" k="31" />
-<hkern u1="8" u2="+" k="14" />
-<hkern u1="9" u2="°" k="59" />
-<hkern u1="9" u2="\" k="66" />
-<hkern u1="9" u2="Y" k="98" />
-<hkern u1="9" u2="W" k="68" />
-<hkern u1="9" u2="V" k="68" />
-<hkern u1="9" u2="T" k="117" />
-<hkern u1="9" u2="7" k="27" />
-<hkern u1="9" u2="'" k="45" />
-<hkern u1=":" u2="Y" k="57" />
-<hkern u1=":" u2="W" k="31" />
-<hkern u1=":" u2="V" k="31" />
-<hkern u1=":" u2="T" k="92" />
-<hkern u1=";" u2="j" k="-16" />
-<hkern u1="=" u2="7" k="39" />
-<hkern u1="=" u2="4" k="18" />
-<hkern u1="=" u2="3" k="47" />
-<hkern u1="=" u2="1" k="27" />
-<hkern u1="@" u2="’" k="70" />
-<hkern u1="@" u2="Y" k="111" />
-<hkern u1="@" u2="W" k="76" />
-<hkern u1="@" u2="V" k="76" />
-<hkern u1="@" u2="T" k="115" />
-<hkern u1="@" u2="A" k="23" />
-<hkern u1="@" u2="'" k="70" />
-<hkern u1="A" u2="™" k="133" />
-<hkern u1="A" u2="‹" k="31" />
-<hkern u1="A" u2="„" k="-2" />
-<hkern u1="A" u2="‚" k="-2" />
-<hkern u1="A" u2="’" k="139" />
-<hkern u1="A" u2="‘" k="141" />
-<hkern u1="A" u2="ð" k="31" />
-<hkern u1="A" u2="Ø" k="8" />
-<hkern u1="A" u2="Ð" k="10" />
-<hkern u1="A" u2="º" k="102" />
-<hkern u1="A" u2="®" k="45" />
-<hkern u1="A" u2="ª" k="92" />
-<hkern u1="A" u2="©" k="45" />
-<hkern u1="A" u2="y" k="72" />
-<hkern u1="A" u2="w" k="72" />
-<hkern u1="A" u2="v" k="66" />
-<hkern u1="A" u2="u" k="27" />
-<hkern u1="A" u2="t" k="47" />
-<hkern u1="A" u2="s" k="12" />
-<hkern u1="A" u2="o" k="35" />
-<hkern u1="A" u2="l" k="4" />
-<hkern u1="A" u2="f" k="29" />
-<hkern u1="A" u2="d" k="35" />
-<hkern u1="A" u2="a" k="16" />
-<hkern u1="A" u2="]" k="-2" />
-<hkern u1="A" u2="\" k="125" />
-<hkern u1="A" u2="Y" k="150" />
-<hkern u1="A" u2="W" k="115" />
-<hkern u1="A" u2="V" k="113" />
-<hkern u1="A" u2="U" k="59" />
-<hkern u1="A" u2="T" k="145" />
-<hkern u1="A" u2="S" k="23" />
-<hkern u1="A" u2="O" k="53" />
-<hkern u1="A" u2="@" k="20" />
-<hkern u1="A" u2="?" k="51" />
-<hkern u1="A" u2="8" k="29" />
-<hkern u1="A" u2="7" k="49" />
-<hkern u1="A" u2="6" k="33" />
-<hkern u1="A" u2="4" k="-12" />
-<hkern u1="A" u2="2" k="-6" />
-<hkern u1="A" u2="0" k="35" />
-<hkern u1="A" u2="/" k="-12" />
-<hkern u1="A" u2="-" k="31" />
-<hkern u1="A" u2="," k="-2" />
-<hkern u1="A" u2="*" k="135" />
-<hkern u1="A" u2=")" k="-12" />
-<hkern u1="A" u2="'" k="141" />
-<hkern u1="A" u2="&" k="29" />
-<hkern u1="A" u2=" " k="63" />
-<hkern u1="B" u2="ð" k="2" />
-<hkern u1="B" u2="ï" k="-10" />
-<hkern u1="B" u2="î" k="-8" />
-<hkern u1="B" u2="Æ" k="20" />
-<hkern u1="B" u2="z" k="4" />
-<hkern u1="B" u2="y" k="20" />
-<hkern u1="B" u2="x" k="27" />
-<hkern u1="B" u2="w" k="20" />
-<hkern u1="B" u2="v" k="18" />
-<hkern u1="B" u2="u" k="2" />
-<hkern u1="B" u2="t" k="18" />
-<hkern u1="B" u2="s" k="6" />
-<hkern u1="B" u2="o" k="2" />
-<hkern u1="B" u2="n" k="2" />
-<hkern u1="B" u2="f" k="20" />
-<hkern u1="B" u2="d" k="2" />
-<hkern u1="B" u2="Z" k="10" />
-<hkern u1="B" u2="Y" k="59" />
-<hkern u1="B" u2="X" k="33" />
-<hkern u1="B" u2="W" k="43" />
-<hkern u1="B" u2="V" k="41" />
-<hkern u1="B" u2="T" k="68" />
-<hkern u1="B" u2="J" k="31" />
-<hkern u1="B" u2="A" k="29" />
-<hkern u1="B" u2="7" k="25" />
-<hkern u1="B" u2="3" k="14" />
-<hkern u1="C" u2="™" k="-10" />
-<hkern u1="C" u2="ð" k="4" />
-<hkern u1="C" u2="ï" k="-27" />
-<hkern u1="C" u2="î" k="-16" />
-<hkern u1="C" u2="Æ" k="12" />
-<hkern u1="C" u2="z" k="2" />
-<hkern u1="C" u2="y" k="2" />
-<hkern u1="C" u2="w" k="2" />
-<hkern u1="C" u2="u" k="2" />
-<hkern u1="C" u2="t" k="4" />
-<hkern u1="C" u2="s" k="6" />
-<hkern u1="C" u2="o" k="4" />
-<hkern u1="C" u2="n" k="2" />
-<hkern u1="C" u2="f" k="8" />
-<hkern u1="C" u2="d" k="4" />
-<hkern u1="C" u2="Y" k="35" />
-<hkern u1="C" u2="X" k="12" />
-<hkern u1="C" u2="W" k="23" />
-<hkern u1="C" u2="V" k="23" />
-<hkern u1="C" u2="T" k="16" />
-<hkern u1="C" u2="S" k="10" />
-<hkern u1="C" u2="O" k="16" />
-<hkern u1="C" u2="A" k="20" />
-<hkern u1="C" u2="*" k="-14" />
-<hkern u1="D" u2="™" k="12" />
-<hkern u1="D" u2="‘" k="12" />
-<hkern u1="D" u2="ð" k="4" />
-<hkern u1="D" u2="Ð" k="12" />
-<hkern u1="D" u2="Æ" k="74" />
-<hkern u1="D" u2="z" k="4" />
-<hkern u1="D" u2="y" k="4" />
-<hkern u1="D" u2="x" k="20" />
-<hkern u1="D" u2="w" k="2" />
-<hkern u1="D" u2="u" k="2" />
-<hkern u1="D" u2="s" k="4" />
-<hkern u1="D" u2="n" k="10" />
-<hkern u1="D" u2="i" k="2" />
-<hkern u1="D" u2="h" k="2" />
-<hkern u1="D" u2="a" k="12" />
-<hkern u1="D" u2="\" k="29" />
-<hkern u1="D" u2="Z" k="33" />
-<hkern u1="D" u2="Y" k="80" />
-<hkern u1="D" u2="X" k="57" />
-<hkern u1="D" u2="W" k="49" />
-<hkern u1="D" u2="V" k="49" />
-<hkern u1="D" u2="T" k="68" />
-<hkern u1="D" u2="S" k="2" />
-<hkern u1="D" u2="J" k="74" />
-<hkern u1="D" u2="A" k="51" />
-<hkern u1="D" u2="4" k="14" />
-<hkern u1="D" u2="/" k="37" />
-<hkern u1="D" u2="." k="35" />
-<hkern u1="D" u2=")" k="25" />
-<hkern u1="D" u2="'" k="18" />
-<hkern u1="E" u2="‹" k="27" />
-<hkern u1="E" u2="ð" k="41" />
-<hkern u1="E" u2="ï" k="-23" />
-<hkern u1="E" u2="î" k="-16" />
-<hkern u1="E" u2="y" k="51" />
-<hkern u1="E" u2="w" k="47" />
-<hkern u1="E" u2="v" k="45" />
-<hkern u1="E" u2="u" k="27" />
-<hkern u1="E" u2="t" k="27" />
-<hkern u1="E" u2="s" k="10" />
-<hkern u1="E" u2="o" k="39" />
-<hkern u1="E" u2="n" k="8" />
-<hkern u1="E" u2="f" k="33" />
-<hkern u1="E" u2="d" k="39" />
-<hkern u1="E" u2="a" k="14" />
-<hkern u1="E" u2="S" k="25" />
-<hkern u1="E" u2="O" k="25" />
-<hkern u1="E" u2="7" k="33" />
-<hkern u1="E" u2="-" k="29" />
-<hkern u1="F" g2="uniFB04" k="45" />
-<hkern u1="F" g2="uniFB03" k="45" />
-<hkern u1="F" u2="™" k="-2" />
-<hkern u1="F" u2="›" k="35" />
-<hkern u1="F" u2="‹" k="39" />
-<hkern u1="F" u2="ð" k="90" />
-<hkern u1="F" u2="ï" k="-39" />
-<hkern u1="F" u2="î" k="-33" />
-<hkern u1="F" u2="í" k="8" />
-<hkern u1="F" u2="ì" k="-12" />
-<hkern u1="F" u2="ß" k="25" />
-<hkern u1="F" u2="Æ" k="244" />
-<hkern u1="F" u2="z" k="66" />
-<hkern u1="F" u2="y" k="49" />
-<hkern u1="F" u2="x" k="57" />
-<hkern u1="F" u2="w" k="49" />
-<hkern u1="F" u2="v" k="47" />
-<hkern u1="F" u2="u" k="51" />
-<hkern u1="F" u2="t" k="16" />
-<hkern u1="F" u2="s" k="74" />
-<hkern u1="F" u2="o" k="61" />
-<hkern u1="F" u2="n" k="61" />
-<hkern u1="F" u2="f" k="33" />
-<hkern u1="F" u2="d" k="61" />
-<hkern u1="F" u2="a" k="125" />
-<hkern u1="F" u2="S" k="49" />
-<hkern u1="F" u2="O" k="35" />
-<hkern u1="F" u2="J" k="264" />
-<hkern u1="F" u2="A" k="137" />
-<hkern u1="F" u2="@" k="14" />
-<hkern u1="F" u2=":" k="27" />
-<hkern u1="F" u2="7" k="43" />
-<hkern u1="F" u2="5" k="35" />
-<hkern u1="F" u2="4" k="90" />
-<hkern u1="F" u2="3" k="39" />
-<hkern u1="F" u2="2" k="49" />
-<hkern u1="F" u2="1" k="27" />
-<hkern u1="F" u2="/" k="115" />
-<hkern u1="F" u2="." k="154" />
-<hkern u1="F" u2="-" k="47" />
-<hkern u1="F" u2="*" k="-12" />
-<hkern u1="F" u2=")" k="-2" />
-<hkern u1="F" u2=" " k="45" />
-<hkern u1="G" u2="™" k="12" />
-<hkern u1="G" u2="ð" k="2" />
-<hkern u1="G" u2="y" k="25" />
-<hkern u1="G" u2="w" k="27" />
-<hkern u1="G" u2="v" k="25" />
-<hkern u1="G" u2="t" k="12" />
-<hkern u1="G" u2="f" k="12" />
-<hkern u1="G" u2="\" k="8" />
-<hkern u1="G" u2="Y" k="61" />
-<hkern u1="G" u2="W" k="43" />
-<hkern u1="G" u2="V" k="41" />
-<hkern u1="G" u2="T" k="49" />
-<hkern u1="G" u2="'" k="16" />
-<hkern u1="I" u2="ð" k="20" />
-<hkern u1="I" u2="ï" k="-10" />
-<hkern u1="I" u2="z" k="2" />
-<hkern u1="I" u2="y" k="2" />
-<hkern u1="I" u2="t" k="16" />
-<hkern u1="I" u2="s" k="12" />
-<hkern u1="I" u2="o" k="18" />
-<hkern u1="I" u2="f" k="16" />
-<hkern u1="I" u2="d" k="16" />
-<hkern u1="I" u2="a" k="14" />
-<hkern u1="J" u2="ð" k="25" />
-<hkern u1="J" u2="ï" k="-14" />
-<hkern u1="J" u2="î" k="-8" />
-<hkern u1="J" u2="Æ" k="41" />
-<hkern u1="J" u2="z" k="6" />
-<hkern u1="J" u2="x" k="2" />
-<hkern u1="J" u2="u" k="4" />
-<hkern u1="J" u2="t" k="12" />
-<hkern u1="J" u2="s" k="23" />
-<hkern u1="J" u2="o" k="18" />
-<hkern u1="J" u2="n" k="4" />
-<hkern u1="J" u2="l" k="2" />
-<hkern u1="J" u2="i" k="2" />
-<hkern u1="J" u2="h" k="2" />
-<hkern u1="J" u2="f" k="14" />
-<hkern u1="J" u2="d" k="18" />
-<hkern u1="J" u2="a" k="20" />
-<hkern u1="J" u2="J" k="31" />
-<hkern u1="J" u2="A" k="33" />
-<hkern u1="J" u2="/" k="8" />
-<hkern u1="J" u2="." k="18" />
-<hkern u1="K" u2="™" k="-10" />
-<hkern u1="K" u2="›" k="-2" />
-<hkern u1="K" u2="‹" k="31" />
-<hkern u1="K" u2="„" k="-12" />
-<hkern u1="K" u2="‚" k="-12" />
-<hkern u1="K" u2="ø" k="12" />
-<hkern u1="K" u2="ð" k="51" />
-<hkern u1="K" u2="ï" k="-47" />
-<hkern u1="K" u2="î" k="-8" />
-<hkern u1="K" u2="ì" k="-16" />
-<hkern u1="K" u2="Ø" k="12" />
-<hkern u1="K" u2="®" k="31" />
-<hkern u1="K" u2="©" k="31" />
-<hkern u1="K" u2="}" k="-10" />
-<hkern u1="K" u2="y" k="72" />
-<hkern u1="K" u2="w" k="76" />
-<hkern u1="K" u2="v" k="72" />
-<hkern u1="K" u2="u" k="33" />
-<hkern u1="K" u2="t" k="23" />
-<hkern u1="K" u2="o" k="59" />
-<hkern u1="K" u2="f" k="25" />
-<hkern u1="K" u2="d" k="57" />
-<hkern u1="K" u2="a" k="4" />
-<hkern u1="K" u2="]" k="-12" />
-<hkern u1="K" u2="\" k="-8" />
-<hkern u1="K" u2="S" k="18" />
-<hkern u1="K" u2="O" k="70" />
-<hkern u1="K" u2="J" k="-2" />
-<hkern u1="K" u2=";" k="-6" />
-<hkern u1="K" u2="4" k="-20" />
-<hkern u1="K" u2="2" k="-12" />
-<hkern u1="K" u2="0" k="14" />
-<hkern u1="K" u2="/" k="-18" />
-<hkern u1="K" u2="-" k="53" />
-<hkern u1="K" u2="," k="-12" />
-<hkern u1="K" u2="*" k="-14" />
-<hkern u1="K" u2=")" k="-20" />
-<hkern u1="K" u2=" " k="27" />
-<hkern u1="L" u2="™" k="227" />
-<hkern u1="L" u2="‹" k="96" />
-<hkern u1="L" u2="’" k="221" />
-<hkern u1="L" u2="‘" k="223" />
-<hkern u1="L" u2="ð" k="37" />
-<hkern u1="L" u2="Æ" k="-8" />
-<hkern u1="L" u2="º" k="223" />
-<hkern u1="L" u2="·" k="305" />
-<hkern u1="L" u2="®" k="45" />
-<hkern u1="L" u2="ª" k="221" />
-<hkern u1="L" u2="©" k="45" />
-<hkern u1="L" u2="y" k="164" />
-<hkern u1="L" u2="w" k="162" />
-<hkern u1="L" u2="v" k="152" />
-<hkern u1="L" u2="u" k="23" />
-<hkern u1="L" u2="t" k="35" />
-<hkern u1="L" u2="o" k="47" />
-<hkern u1="L" u2="f" k="23" />
-<hkern u1="L" u2="d" k="49" />
-<hkern u1="L" u2="\" k="178" />
-<hkern u1="L" u2="Y" k="240" />
-<hkern u1="L" u2="W" k="221" />
-<hkern u1="L" u2="V" k="217" />
-<hkern u1="L" u2="U" k="88" />
-<hkern u1="L" u2="T" k="233" />
-<hkern u1="L" u2="S" k="10" />
-<hkern u1="L" u2="O" k="92" />
-<hkern u1="L" u2="?" k="35" />
-<hkern u1="L" u2="7" k="18" />
-<hkern u1="L" u2="-" k="135" />
-<hkern u1="L" u2="*" k="225" />
-<hkern u1="L" u2="'" k="217" />
-<hkern u1="L" u2=" " k="55" />
-<hkern u1="O" u2="™" k="14" />
-<hkern u1="O" u2="’" k="12" />
-<hkern u1="O" u2="‘" k="14" />
-<hkern u1="O" u2="ð" k="4" />
-<hkern u1="O" u2="Ð" k="14" />
-<hkern u1="O" u2="Æ" k="80" />
-<hkern u1="O" u2="z" k="4" />
-<hkern u1="O" u2="y" k="8" />
-<hkern u1="O" u2="x" k="25" />
-<hkern u1="O" u2="w" k="2" />
-<hkern u1="O" u2="u" k="2" />
-<hkern u1="O" u2="s" k="4" />
-<hkern u1="O" u2="n" k="10" />
-<hkern u1="O" u2="i" k="10" />
-<hkern u1="O" u2="h" k="2" />
-<hkern u1="O" u2="a" k="14" />
-<hkern u1="O" u2="\" k="33" />
-<hkern u1="O" u2="Z" k="39" />
-<hkern u1="O" u2="Y" k="86" />
-<hkern u1="O" u2="X" k="57" />
-<hkern u1="O" u2="W" k="53" />
-<hkern u1="O" u2="V" k="51" />
-<hkern u1="O" u2="T" k="70" />
-<hkern u1="O" u2="S" k="2" />
-<hkern u1="O" u2="J" k="74" />
-<hkern u1="O" u2="A" k="53" />
-<hkern u1="O" u2="4" k="16" />
-<hkern u1="O" u2="/" k="39" />
-<hkern u1="O" u2="." k="39" />
-<hkern u1="O" u2="*" k="12" />
-<hkern u1="O" u2=")" k="29" />
-<hkern u1="O" u2="'" k="27" />
-<hkern u1="P" u2="‹" k="27" />
-<hkern u1="P" u2="ð" k="47" />
-<hkern u1="P" u2="ï" k="-18" />
-<hkern u1="P" u2="î" k="-8" />
-<hkern u1="P" u2="Æ" k="193" />
-<hkern u1="P" u2="y" k="-10" />
-<hkern u1="P" u2="x" k="-4" />
-<hkern u1="P" u2="w" k="-8" />
-<hkern u1="P" u2="v" k="-6" />
-<hkern u1="P" u2="s" k="14" />
-<hkern u1="P" u2="o" k="27" />
-<hkern u1="P" u2="d" k="25" />
-<hkern u1="P" u2="a" k="20" />
-<hkern u1="P" u2="Z" k="18" />
-<hkern u1="P" u2="Y" k="33" />
-<hkern u1="P" u2="X" k="35" />
-<hkern u1="P" u2="W" k="25" />
-<hkern u1="P" u2="V" k="25" />
-<hkern u1="P" u2="T" k="8" />
-<hkern u1="P" u2="J" k="199" />
-<hkern u1="P" u2="A" k="96" />
-<hkern u1="P" u2="5" k="8" />
-<hkern u1="P" u2="4" k="70" />
-<hkern u1="P" u2="/" k="111" />
-<hkern u1="P" u2="." k="154" />
-<hkern u1="P" u2="-" k="33" />
-<hkern u1="P" u2=")" k="8" />
-<hkern u1="P" u2=" " k="55" />
-<hkern u1="Q" u2="„" k="-6" />
-<hkern u1="Q" u2="‚" k="-6" />
-<hkern u1="Q" u2="Æ" k="12" />
-<hkern u1="Q" u2="}" k="-6" />
-<hkern u1="Q" u2="y" k="4" />
-<hkern u1="Q" u2="]" k="-6" />
-<hkern u1="Q" u2="X" k="8" />
-<hkern u1="Q" u2="J" k="8" />
-<hkern u1="Q" u2="A" k="6" />
-<hkern u1="Q" u2="4" k="-14" />
-<hkern u1="Q" u2="2" k="-8" />
-<hkern u1="Q" u2="/" k="-12" />
-<hkern u1="Q" u2="," k="-6" />
-<hkern u1="Q" u2=")" k="-14" />
-<hkern u1="R" u2="™" k="6" />
-<hkern u1="R" u2="‹" k="31" />
-<hkern u1="R" u2="’" k="4" />
-<hkern u1="R" u2="ð" k="51" />
-<hkern u1="R" u2="Ð" k="4" />
-<hkern u1="R" u2="y" k="8" />
-<hkern u1="R" u2="w" k="8" />
-<hkern u1="R" u2="v" k="8" />
-<hkern u1="R" u2="u" k="18" />
-<hkern u1="R" u2="t" k="8" />
-<hkern u1="R" u2="s" k="10" />
-<hkern u1="R" u2="o" k="41" />
-<hkern u1="R" u2="n" k="14" />
-<hkern u1="R" u2="l" k="12" />
-<hkern u1="R" u2="i" k="14" />
-<hkern u1="R" u2="h" k="10" />
-<hkern u1="R" u2="f" k="8" />
-<hkern u1="R" u2="d" k="39" />
-<hkern u1="R" u2="a" k="20" />
-<hkern u1="R" u2="\" k="12" />
-<hkern u1="R" u2="Y" k="55" />
-<hkern u1="R" u2="W" k="43" />
-<hkern u1="R" u2="V" k="41" />
-<hkern u1="R" u2="U" k="6" />
-<hkern u1="R" u2="T" k="35" />
-<hkern u1="R" u2="O" k="8" />
-<hkern u1="R" u2="A" k="16" />
-<hkern u1="R" u2="4" k="-6" />
-<hkern u1="R" u2="/" k="-6" />
-<hkern u1="R" u2="-" k="14" />
-<hkern u1="R" u2=")" k="-6" />
-<hkern u1="S" u2="ð" k="2" />
-<hkern u1="S" u2="ï" k="-20" />
-<hkern u1="S" u2="î" k="-14" />
-<hkern u1="S" u2="Æ" k="6" />
-<hkern u1="S" u2="ª" k="16" />
-<hkern u1="S" u2="z" k="6" />
-<hkern u1="S" u2="y" k="45" />
-<hkern u1="S" u2="x" k="18" />
-<hkern u1="S" u2="w" k="45" />
-<hkern u1="S" u2="v" k="45" />
-<hkern u1="S" u2="u" k="4" />
-<hkern u1="S" u2="t" k="23" />
-<hkern u1="S" u2="s" k="6" />
-<hkern u1="S" u2="n" k="4" />
-<hkern u1="S" u2="l" k="2" />
-<hkern u1="S" u2="i" k="2" />
-<hkern u1="S" u2="h" k="2" />
-<hkern u1="S" u2="f" k="23" />
-<hkern u1="S" u2="a" k="2" />
-<hkern u1="S" u2="Y" k="39" />
-<hkern u1="S" u2="X" k="18" />
-<hkern u1="S" u2="W" k="31" />
-<hkern u1="S" u2="V" k="31" />
-<hkern u1="S" u2="T" k="16" />
-<hkern u1="S" u2="A" k="29" />
-<hkern u1="S" u2="7" k="20" />
-<hkern u1="T" g2="uniFB04" k="94" />
-<hkern u1="T" g2="uniFB03" k="72" />
-<hkern u1="T" g2="uniFB01" k="51" />
-<hkern u1="T" u2="™" k="-2" />
-<hkern u1="T" u2="›" k="104" />
-<hkern u1="T" u2="‹" k="133" />
-<hkern u1="T" u2="ð" k="180" />
-<hkern u1="T" u2="ï" k="-41" />
-<hkern u1="T" u2="î" k="-33" />
-<hkern u1="T" u2="í" k="12" />
-<hkern u1="T" u2="ì" k="-12" />
-<hkern u1="T" u2="ã" k="178" />
-<hkern u1="T" u2="ß" k="43" />
-<hkern u1="T" u2="Æ" k="180" />
-<hkern u1="T" u2="®" k="49" />
-<hkern u1="T" u2="©" k="49" />
-<hkern u1="T" u2="z" k="164" />
-<hkern u1="T" u2="y" k="152" />
-<hkern u1="T" u2="x" k="143" />
-<hkern u1="T" u2="w" k="156" />
-<hkern u1="T" u2="v" k="156" />
-<hkern u1="T" u2="u" k="197" />
-<hkern u1="T" u2="t" k="18" />
-<hkern u1="T" u2="s" k="207" />
-<hkern u1="T" u2="o" k="215" />
-<hkern u1="T" u2="n" k="184" />
-<hkern u1="T" u2="f" k="61" />
-<hkern u1="T" u2="d" k="213" />
-<hkern u1="T" u2="a" k="203" />
-<hkern u1="T" u2="S" k="18" />
-<hkern u1="T" u2="O" k="68" />
-<hkern u1="T" u2="J" k="219" />
-<hkern u1="T" u2="A" k="145" />
-<hkern u1="T" u2="@" k="119" />
-<hkern u1="T" u2=":" k="92" />
-<hkern u1="T" u2="9" k="115" />
-<hkern u1="T" u2="8" k="14" />
-<hkern u1="T" u2="7" k="72" />
-<hkern u1="T" u2="6" k="31" />
-<hkern u1="T" u2="5" k="115" />
-<hkern u1="T" u2="4" k="135" />
-<hkern u1="T" u2="3" k="102" />
-<hkern u1="T" u2="2" k="96" />
-<hkern u1="T" u2="1" k="106" />
-<hkern u1="T" u2="0" k="111" />
-<hkern u1="T" u2="/" k="125" />
-<hkern u1="T" u2="." k="141" />
-<hkern u1="T" u2="-" k="137" />
-<hkern u1="T" u2="*" k="-31" />
-<hkern u1="T" u2=")" k="-2" />
-<hkern u1="T" u2="&" k="16" />
-<hkern u1="T" u2=" " k="55" />
-<hkern u1="U" u2="ð" k="29" />
-<hkern u1="U" u2="ï" k="-16" />
-<hkern u1="U" u2="î" k="-8" />
-<hkern u1="U" u2="Æ" k="90" />
-<hkern u1="U" u2="z" k="12" />
-<hkern u1="U" u2="x" k="2" />
-<hkern u1="U" u2="u" k="16" />
-<hkern u1="U" u2="t" k="10" />
-<hkern u1="U" u2="s" k="29" />
-<hkern u1="U" u2="o" k="23" />
-<hkern u1="U" u2="n" k="12" />
-<hkern u1="U" u2="l" k="12" />
-<hkern u1="U" u2="i" k="12" />
-<hkern u1="U" u2="h" k="12" />
-<hkern u1="U" u2="f" k="14" />
-<hkern u1="U" u2="d" k="23" />
-<hkern u1="U" u2="a" k="27" />
-<hkern u1="U" u2="J" k="61" />
-<hkern u1="U" u2="A" k="59" />
-<hkern u1="U" u2="4" k="20" />
-<hkern u1="U" u2="/" k="39" />
-<hkern u1="U" u2="." k="37" />
-<hkern u1="V" u2="™" k="-12" />
-<hkern u1="V" u2="›" k="57" />
-<hkern u1="V" u2="‹" k="88" />
-<hkern u1="V" u2="’" k="-4" />
-<hkern u1="V" u2="‘" k="-2" />
-<hkern u1="V" u2="ð" k="137" />
-<hkern u1="V" u2="ï" k="-49" />
-<hkern u1="V" u2="î" k="-27" />
-<hkern u1="V" u2="í" k="16" />
-<hkern u1="V" u2="ì" k="-23" />
-<hkern u1="V" u2="ã" k="27" />
-<hkern u1="V" u2="ß" k="45" />
-<hkern u1="V" u2="Ð" k="10" />
-<hkern u1="V" u2="Æ" k="178" />
-<hkern u1="V" u2="®" k="45" />
-<hkern u1="V" u2="©" k="45" />
-<hkern u1="V" u2="z" k="37" />
-<hkern u1="V" u2="y" k="29" />
-<hkern u1="V" u2="x" k="27" />
-<hkern u1="V" u2="w" k="31" />
-<hkern u1="V" u2="v" k="33" />
-<hkern u1="V" u2="u" k="78" />
-<hkern u1="V" u2="t" k="18" />
-<hkern u1="V" u2="s" k="102" />
-<hkern u1="V" u2="o" k="127" />
-<hkern u1="V" u2="n" k="80" />
-<hkern u1="V" u2="f" k="47" />
-<hkern u1="V" u2="d" k="125" />
-<hkern u1="V" u2="a" k="104" />
-<hkern u1="V" u2="]" k="-2" />
-<hkern u1="V" u2="\" k="-12" />
-<hkern u1="V" u2="S" k="35" />
-<hkern u1="V" u2="O" k="53" />
-<hkern u1="V" u2="J" k="174" />
-<hkern u1="V" u2="A" k="113" />
-<hkern u1="V" u2="@" k="78" />
-<hkern u1="V" u2=":" k="31" />
-<hkern u1="V" u2="9" k="59" />
-<hkern u1="V" u2="8" k="35" />
-<hkern u1="V" u2="6" k="41" />
-<hkern u1="V" u2="5" k="70" />
-<hkern u1="V" u2="4" k="129" />
-<hkern u1="V" u2="3" k="45" />
-<hkern u1="V" u2="2" k="43" />
-<hkern u1="V" u2="1" k="37" />
-<hkern u1="V" u2="0" k="66" />
-<hkern u1="V" u2="/" k="129" />
-<hkern u1="V" u2="." k="150" />
-<hkern u1="V" u2="-" k="88" />
-<hkern u1="V" u2="*" k="-20" />
-<hkern u1="V" u2=")" k="-12" />
-<hkern u1="V" u2="&" k="41" />
-<hkern u1="V" u2=" " k="72" />
-<hkern u1="W" u2="™" k="-14" />
-<hkern u1="W" u2="›" k="57" />
-<hkern u1="W" u2="‹" k="90" />
-<hkern u1="W" u2="’" k="-6" />
-<hkern u1="W" u2="‘" k="-6" />
-<hkern u1="W" u2="ð" k="139" />
-<hkern u1="W" u2="ï" k="-51" />
-<hkern u1="W" u2="î" k="-27" />
-<hkern u1="W" u2="í" k="16" />
-<hkern u1="W" u2="ì" k="-23" />
-<hkern u1="W" u2="ä" k="27" />
-<hkern u1="W" u2="ã" k="27" />
-<hkern u1="W" u2="ß" k="45" />
-<hkern u1="W" u2="Ð" k="10" />
-<hkern u1="W" u2="Æ" k="178" />
-<hkern u1="W" u2="®" k="45" />
-<hkern u1="W" u2="©" k="45" />
-<hkern u1="W" u2="}" k="-2" />
-<hkern u1="W" u2="z" k="37" />
-<hkern u1="W" u2="y" k="29" />
-<hkern u1="W" u2="x" k="29" />
-<hkern u1="W" u2="w" k="31" />
-<hkern u1="W" u2="v" k="33" />
-<hkern u1="W" u2="u" k="80" />
-<hkern u1="W" u2="t" k="18" />
-<hkern u1="W" u2="s" k="106" />
-<hkern u1="W" u2="o" k="129" />
-<hkern u1="W" u2="n" k="80" />
-<hkern u1="W" u2="f" k="47" />
-<hkern u1="W" u2="d" k="127" />
-<hkern u1="W" u2="a" k="104" />
-<hkern u1="W" u2="]" k="-4" />
-<hkern u1="W" u2="\" k="-12" />
-<hkern u1="W" u2="S" k="35" />
-<hkern u1="W" u2="O" k="53" />
-<hkern u1="W" u2="J" k="174" />
-<hkern u1="W" u2="A" k="115" />
-<hkern u1="W" u2="@" k="80" />
-<hkern u1="W" u2=":" k="31" />
-<hkern u1="W" u2="9" k="61" />
-<hkern u1="W" u2="8" k="35" />
-<hkern u1="W" u2="6" k="41" />
-<hkern u1="W" u2="5" k="70" />
-<hkern u1="W" u2="4" k="131" />
-<hkern u1="W" u2="3" k="45" />
-<hkern u1="W" u2="2" k="43" />
-<hkern u1="W" u2="1" k="39" />
-<hkern u1="W" u2="0" k="66" />
-<hkern u1="W" u2="/" k="131" />
-<hkern u1="W" u2="." k="152" />
-<hkern u1="W" u2="-" k="88" />
-<hkern u1="W" u2="*" k="-18" />
-<hkern u1="W" u2=")" k="-14" />
-<hkern u1="W" u2="&" k="41" />
-<hkern u1="W" u2=" " k="72" />
-<hkern u1="X" u2="™" k="-23" />
-<hkern u1="X" u2="‹" k="37" />
-<hkern u1="X" u2="’" k="-6" />
-<hkern u1="X" u2="‘" k="-6" />
-<hkern u1="X" u2="ø" k="18" />
-<hkern u1="X" u2="ð" k="68" />
-<hkern u1="X" u2="ï" k="-51" />
-<hkern u1="X" u2="î" k="-16" />
-<hkern u1="X" u2="í" k="6" />
-<hkern u1="X" u2="ì" k="-23" />
-<hkern u1="X" u2="ß" k="6" />
-<hkern u1="X" u2="Ø" k="12" />
-<hkern u1="X" u2="®" k="29" />
-<hkern u1="X" u2="©" k="29" />
-<hkern u1="X" u2="}" k="-4" />
-<hkern u1="X" u2="y" k="59" />
-<hkern u1="X" u2="w" k="63" />
-<hkern u1="X" u2="v" k="61" />
-<hkern u1="X" u2="u" k="45" />
-<hkern u1="X" u2="t" k="12" />
-<hkern u1="X" u2="o" k="74" />
-<hkern u1="X" u2="n" k="12" />
-<hkern u1="X" u2="f" k="27" />
-<hkern u1="X" u2="d" k="70" />
-<hkern u1="X" u2="a" k="8" />
-<hkern u1="X" u2="]" k="-6" />
-<hkern u1="X" u2="\" k="-14" />
-<hkern u1="X" u2="S" k="14" />
-<hkern u1="X" u2="O" k="59" />
-<hkern u1="X" u2="4" k="-10" />
-<hkern u1="X" u2="2" k="-2" />
-<hkern u1="X" u2="0" k="25" />
-<hkern u1="X" u2="/" k="-8" />
-<hkern u1="X" u2="-" k="57" />
-<hkern u1="X" u2="*" k="-20" />
-<hkern u1="X" u2=")" k="-16" />
-<hkern u1="X" u2=" " k="16" />
-<hkern u1="Y" u2="™" k="-16" />
-<hkern u1="Y" u2="›" k="94" />
-<hkern u1="Y" u2="‹" k="135" />
-<hkern u1="Y" u2="’" k="-8" />
-<hkern u1="Y" u2="‘" k="-8" />
-<hkern u1="Y" u2="ö" k="41" />
-<hkern u1="Y" u2="ð" k="182" />
-<hkern u1="Y" u2="ï" k="-53" />
-<hkern u1="Y" u2="î" k="-23" />
-<hkern u1="Y" u2="í" k="20" />
-<hkern u1="Y" u2="ì" k="-27" />
-<hkern u1="Y" u2="ë" k="41" />
-<hkern u1="Y" u2="ä" k="25" />
-<hkern u1="Y" u2="ã" k="29" />
-<hkern u1="Y" u2="ß" k="66" />
-<hkern u1="Y" u2="Ð" k="10" />
-<hkern u1="Y" u2="Æ" k="213" />
-<hkern u1="Y" u2="®" k="68" />
-<hkern u1="Y" u2="©" k="68" />
-<hkern u1="Y" u2="}" k="-6" />
-<hkern u1="Y" u2="z" k="80" />
-<hkern u1="Y" u2="y" k="76" />
-<hkern u1="Y" u2="x" k="72" />
-<hkern u1="Y" u2="w" k="80" />
-<hkern u1="Y" u2="v" k="82" />
-<hkern u1="Y" u2="u" k="127" />
-<hkern u1="Y" u2="t" k="33" />
-<hkern u1="Y" u2="s" k="176" />
-<hkern u1="Y" u2="o" k="178" />
-<hkern u1="Y" u2="n" k="133" />
-<hkern u1="Y" u2="f" k="72" />
-<hkern u1="Y" u2="d" k="174" />
-<hkern u1="Y" u2="a" k="172" />
-<hkern u1="Y" u2="]" k="-6" />
-<hkern u1="Y" u2="\" k="-14" />
-<hkern u1="Y" u2="S" k="45" />
-<hkern u1="Y" u2="O" k="84" />
-<hkern u1="Y" u2="J" k="190" />
-<hkern u1="Y" u2="A" k="150" />
-<hkern u1="Y" u2="@" k="115" />
-<hkern u1="Y" u2=":" k="57" />
-<hkern u1="Y" u2="9" k="92" />
-<hkern u1="Y" u2="8" k="47" />
-<hkern u1="Y" u2="6" k="57" />
-<hkern u1="Y" u2="5" k="90" />
-<hkern u1="Y" u2="4" k="154" />
-<hkern u1="Y" u2="3" k="72" />
-<hkern u1="Y" u2="2" k="72" />
-<hkern u1="Y" u2="1" k="72" />
-<hkern u1="Y" u2="0" k="96" />
-<hkern u1="Y" u2="/" k="137" />
-<hkern u1="Y" u2="." k="164" />
-<hkern u1="Y" u2="-" k="139" />
-<hkern u1="Y" u2="*" k="-20" />
-<hkern u1="Y" u2=")" k="-16" />
-<hkern u1="Y" u2="&" k="51" />
-<hkern u1="Y" u2=" " k="78" />
-<hkern u1="Z" u2="‹" k="20" />
-<hkern u1="Z" u2="ð" k="33" />
-<hkern u1="Z" u2="ï" k="-23" />
-<hkern u1="Z" u2="î" k="-16" />
-<hkern u1="Z" u2="®" k="25" />
-<hkern u1="Z" u2="©" k="25" />
-<hkern u1="Z" u2="y" k="43" />
-<hkern u1="Z" u2="w" k="43" />
-<hkern u1="Z" u2="v" k="45" />
-<hkern u1="Z" u2="u" k="31" />
-<hkern u1="Z" u2="t" k="18" />
-<hkern u1="Z" u2="s" k="2" />
-<hkern u1="Z" u2="o" k="37" />
-<hkern u1="Z" u2="n" k="16" />
-<hkern u1="Z" u2="f" k="27" />
-<hkern u1="Z" u2="d" k="37" />
-<hkern u1="Z" u2="a" k="10" />
-<hkern u1="Z" u2="O" k="37" />
-<hkern u1="Z" u2="0" k="14" />
-<hkern u1="Z" u2="-" k="31" />
-<hkern u1="[" u2="ï" k="-25" />
-<hkern u1="[" u2="î" k="-16" />
-<hkern u1="[" u2="Æ" k="-12" />
-<hkern u1="[" u2="j" k="-23" />
-<hkern u1="[" u2="Y" k="-6" />
-<hkern u1="[" u2="X" k="-6" />
-<hkern u1="[" u2="W" k="-4" />
-<hkern u1="[" u2="V" k="-2" />
-<hkern u1="[" u2="A" k="-2" />
-<hkern u1="\" u2="’" k="172" />
-<hkern u1="\" u2="Ø" k="-6" />
-<hkern u1="\" u2="Æ" k="-20" />
-<hkern u1="\" u2="y" k="70" />
-<hkern u1="\" u2="x" k="-8" />
-<hkern u1="\" u2="w" k="72" />
-<hkern u1="\" u2="v" k="66" />
-<hkern u1="\" u2="t" k="8" />
-<hkern u1="\" u2="Y" k="135" />
-<hkern u1="\" u2="X" k="-8" />
-<hkern u1="\" u2="W" k="129" />
-<hkern u1="\" u2="V" k="125" />
-<hkern u1="\" u2="U" k="37" />
-<hkern u1="\" u2="T" k="123" />
-<hkern u1="\" u2="O" k="37" />
-<hkern u1="\" u2="J" k="-4" />
-<hkern u1="\" u2="A" k="-10" />
-<hkern u1="\" u2="7" k="29" />
-<hkern u1="\" u2="6" k="6" />
-<hkern u1="\" u2="0" k="6" />
-<hkern u1="\" u2="'" k="176" />
-<hkern u1="a" u2="™" k="59" />
-<hkern u1="a" u2="’" k="47" />
-<hkern u1="a" u2="‘" k="49" />
-<hkern u1="a" u2="Ð" k="14" />
-<hkern u1="a" u2="º" k="23" />
-<hkern u1="a" u2="ª" k="8" />
-<hkern u1="a" u2="y" k="35" />
-<hkern u1="a" u2="w" k="39" />
-<hkern u1="a" u2="v" k="37" />
-<hkern u1="a" u2="t" k="14" />
-<hkern u1="a" u2="f" k="2" />
-<hkern u1="a" u2="\" k="82" />
-<hkern u1="a" u2="Z" k="8" />
-<hkern u1="a" u2="Y" k="172" />
-<hkern u1="a" u2="W" k="115" />
-<hkern u1="a" u2="V" k="113" />
-<hkern u1="a" u2="U" k="23" />
-<hkern u1="a" u2="T" k="217" />
-<hkern u1="a" u2="S" k="8" />
-<hkern u1="a" u2="O" k="14" />
-<hkern u1="a" u2="I" k="2" />
-<hkern u1="a" u2="?" k="25" />
-<hkern u1="a" u2="*" k="53" />
-<hkern u1="a" u2="'" k="37" />
-<hkern u1="b" u2="™" k="68" />
-<hkern u1="b" u2="’" k="117" />
-<hkern u1="b" u2="‘" k="125" />
-<hkern u1="b" u2="Ð" k="23" />
-<hkern u1="b" u2="Æ" k="43" />
-<hkern u1="b" u2="º" k="31" />
-<hkern u1="b" u2="ª" k="12" />
-<hkern u1="b" u2="z" k="25" />
-<hkern u1="b" u2="y" k="37" />
-<hkern u1="b" u2="x" k="39" />
-<hkern u1="b" u2="w" k="39" />
-<hkern u1="b" u2="v" k="37" />
-<hkern u1="b" u2="t" k="14" />
-<hkern u1="b" u2="s" k="2" />
-<hkern u1="b" u2="f" k="6" />
-<hkern u1="b" u2="\" k="78" />
-<hkern u1="b" u2="Z" k="43" />
-<hkern u1="b" u2="Y" k="174" />
-<hkern u1="b" u2="X" k="72" />
-<hkern u1="b" u2="W" k="127" />
-<hkern u1="b" u2="V" k="127" />
-<hkern u1="b" u2="U" k="23" />
-<hkern u1="b" u2="T" k="213" />
-<hkern u1="b" u2="S" k="16" />
-<hkern u1="b" u2="J" k="45" />
-<hkern u1="b" u2="I" k="16" />
-<hkern u1="b" u2="A" k="33" />
-<hkern u1="b" u2="?" k="29" />
-<hkern u1="b" u2="." k="12" />
-<hkern u1="b" u2="*" k="90" />
-<hkern u1="b" u2=")" k="35" />
-<hkern u1="b" u2="'" k="150" />
-<hkern u1="c" u2="™" k="39" />
-<hkern u1="c" u2="‹" k="25" />
-<hkern u1="c" u2="’" k="31" />
-<hkern u1="c" u2="‘" k="35" />
-<hkern u1="c" u2="ð" k="14" />
-<hkern u1="c" u2="Ð" k="12" />
-<hkern u1="c" u2="Æ" k="2" />
-<hkern u1="c" u2="y" k="20" />
-<hkern u1="c" u2="x" k="8" />
-<hkern u1="c" u2="w" k="18" />
-<hkern u1="c" u2="v" k="14" />
-<hkern u1="c" u2="s" k="10" />
-<hkern u1="c" u2="o" k="12" />
-<hkern u1="c" u2="d" k="12" />
-<hkern u1="c" u2="\" k="57" />
-<hkern u1="c" u2="Z" k="2" />
-<hkern u1="c" u2="Y" k="156" />
-<hkern u1="c" u2="X" k="8" />
-<hkern u1="c" u2="W" k="113" />
-<hkern u1="c" u2="V" k="113" />
-<hkern u1="c" u2="U" k="16" />
-<hkern u1="c" u2="T" k="197" />
-<hkern u1="c" u2="S" k="16" />
-<hkern u1="c" u2="O" k="10" />
-<hkern u1="c" u2="A" k="12" />
-<hkern u1="c" u2="?" k="14" />
-<hkern u1="c" u2="-" k="35" />
-<hkern u1="c" u2="*" k="37" />
-<hkern u1="c" u2="'" k="16" />
-<hkern u1="d" u2="Ð" k="4" />
-<hkern u1="d" u2="y" k="2" />
-<hkern u1="d" u2="w" k="6" />
-<hkern u1="d" u2="v" k="4" />
-<hkern u1="d" u2="t" k="2" />
-<hkern u1="d" u2="Y" k="8" />
-<hkern u1="d" u2="W" k="8" />
-<hkern u1="d" u2="V" k="8" />
-<hkern u1="d" u2="U" k="16" />
-<hkern u1="d" u2="T" k="8" />
-<hkern u1="d" u2="O" k="12" />
-<hkern u1="e" u2="™" k="53" />
-<hkern u1="e" u2="’" k="49" />
-<hkern u1="e" u2="‘" k="55" />
-<hkern u1="e" u2="Ð" k="18" />
-<hkern u1="e" u2="Æ" k="37" />
-<hkern u1="e" u2="º" k="12" />
-<hkern u1="e" u2="z" k="16" />
-<hkern u1="e" u2="y" k="33" />
-<hkern u1="e" u2="x" k="41" />
-<hkern u1="e" u2="w" k="33" />
-<hkern u1="e" u2="v" k="29" />
-<hkern u1="e" u2="t" k="10" />
-<hkern u1="e" u2="\" k="74" />
-<hkern u1="e" u2="Z" k="35" />
-<hkern u1="e" u2="Y" k="205" />
-<hkern u1="e" u2="X" k="45" />
-<hkern u1="e" u2="W" k="119" />
-<hkern u1="e" u2="V" k="117" />
-<hkern u1="e" u2="U" k="16" />
-<hkern u1="e" u2="T" k="211" />
-<hkern u1="e" u2="S" k="12" />
-<hkern u1="e" u2="J" k="35" />
-<hkern u1="e" u2="I" k="14" />
-<hkern u1="e" u2="A" k="29" />
-<hkern u1="e" u2="?" k="27" />
-<hkern u1="e" u2="*" k="57" />
-<hkern u1="e" u2=")" k="29" />
-<hkern u1="e" u2="'" k="41" />
-<hkern u1="f" u2="™" k="-45" />
-<hkern u1="f" u2="‹" k="49" />
-<hkern u1="f" u2="’" k="-6" />
-<hkern u1="f" u2="‘" k="-6" />
-<hkern u1="f" u2="ð" k="47" />
-<hkern u1="f" u2="ï" k="-84" />
-<hkern u1="f" u2="î" k="-35" />
-<hkern u1="f" u2="ì" k="-37" />
-<hkern u1="f" u2="Æ" k="94" />
-<hkern u1="f" u2="}" k="-16" />
-<hkern u1="f" u2="z" k="8" />
-<hkern u1="f" u2="o" k="14" />
-<hkern u1="f" u2="d" k="12" />
-<hkern u1="f" u2="a" k="16" />
-<hkern u1="f" u2="]" k="-18" />
-<hkern u1="f" u2="\" k="-45" />
-<hkern u1="f" u2="Z" k="-16" />
-<hkern u1="f" u2="Y" k="-76" />
-<hkern u1="f" u2="X" k="-82" />
-<hkern u1="f" u2="W" k="-66" />
-<hkern u1="f" u2="V" k="-66" />
-<hkern u1="f" u2="T" k="-55" />
-<hkern u1="f" u2="S" k="2" />
-<hkern u1="f" u2="J" k="121" />
-<hkern u1="f" u2="A" k="80" />
-<hkern u1="f" u2="/" k="55" />
-<hkern u1="f" u2="." k="68" />
-<hkern u1="f" u2="-" k="57" />
-<hkern u1="f" u2="*" k="-25" />
-<hkern u1="f" u2=")" k="-45" />
-<hkern u1="f" u2=" " k="35" />
-<hkern u1="g" u2="j" k="-76" />
-<hkern u1="g" u2="Z" k="14" />
-<hkern u1="g" u2="Y" k="133" />
-<hkern u1="g" u2="X" k="12" />
-<hkern u1="g" u2="W" k="84" />
-<hkern u1="g" u2="V" k="80" />
-<hkern u1="g" u2="U" k="12" />
-<hkern u1="g" u2="T" k="186" />
-<hkern u1="g" u2="S" k="2" />
-<hkern u1="g" u2="O" k="10" />
-<hkern u1="h" u2="™" k="57" />
-<hkern u1="h" u2="’" k="92" />
-<hkern u1="h" u2="‘" k="96" />
-<hkern u1="h" u2="º" k="16" />
-<hkern u1="h" u2="y" k="23" />
-<hkern u1="h" u2="w" k="25" />
-<hkern u1="h" u2="v" k="23" />
-<hkern u1="h" u2="t" k="8" />
-<hkern u1="h" u2="\" k="68" />
-<hkern u1="h" u2="Z" k="16" />
-<hkern u1="h" u2="Y" k="158" />
-<hkern u1="h" u2="X" k="6" />
-<hkern u1="h" u2="W" k="109" />
-<hkern u1="h" u2="V" k="106" />
-<hkern u1="h" u2="U" k="18" />
-<hkern u1="h" u2="T" k="213" />
-<hkern u1="h" u2="S" k="10" />
-<hkern u1="h" u2="O" k="10" />
-<hkern u1="h" u2="?" k="25" />
-<hkern u1="h" u2="*" k="70" />
-<hkern u1="h" u2="'" k="137" />
-<hkern u1="i" u2="ï" k="-16" />
-<hkern u1="i" u2="î" k="-10" />
-<hkern u1="i" u2="Z" k="12" />
-<hkern u1="i" u2="U" k="12" />
-<hkern u1="i" u2="S" k="2" />
-<hkern u1="i" u2="O" k="2" />
-<hkern u1="j" u2="j" k="-66" />
-<hkern u1="k" u2="‹" k="59" />
-<hkern u1="k" u2="„" k="-6" />
-<hkern u1="k" u2="‚" k="-6" />
-<hkern u1="k" u2="’" k="16" />
-<hkern u1="k" u2="‘" k="25" />
-<hkern u1="k" u2="ø" k="12" />
-<hkern u1="k" u2="ð" k="59" />
-<hkern u1="k" u2="}" k="-2" />
-<hkern u1="k" u2="s" k="10" />
-<hkern u1="k" u2="o" k="51" />
-<hkern u1="k" u2="f" k="2" />
-<hkern u1="k" u2="d" k="49" />
-<hkern u1="k" u2="a" k="18" />
-<hkern u1="k" u2="]" k="-2" />
-<hkern u1="k" u2="Y" k="76" />
-<hkern u1="k" u2="W" k="29" />
-<hkern u1="k" u2="V" k="29" />
-<hkern u1="k" u2="U" k="4" />
-<hkern u1="k" u2="T" k="147" />
-<hkern u1="k" u2="O" k="27" />
-<hkern u1="k" u2="/" k="-12" />
-<hkern u1="k" u2="-" k="70" />
-<hkern u1="k" u2="," k="-6" />
-<hkern u1="k" u2="*" k="-12" />
-<hkern u1="k" u2=")" k="-12" />
-<hkern u1="k" u2="'" k="86" />
-<hkern u1="l" u2="™" k="39" />
-<hkern u1="l" u2="‹" k="33" />
-<hkern u1="l" u2="’" k="39" />
-<hkern u1="l" u2="‘" k="39" />
-<hkern u1="l" u2="ð" k="2" />
-<hkern u1="l" u2="Æ" k="-2" />
-<hkern u1="l" u2="º" k="37" />
-<hkern u1="l" u2="·" k="147" />
-<hkern u1="l" u2="®" k="14" />
-<hkern u1="l" u2="ª" k="37" />
-<hkern u1="l" u2="©" k="14" />
-<hkern u1="l" u2="y" k="33" />
-<hkern u1="l" u2="w" k="39" />
-<hkern u1="l" u2="v" k="33" />
-<hkern u1="l" u2="t" k="12" />
-<hkern u1="l" u2="o" k="2" />
-<hkern u1="l" u2="f" k="8" />
-<hkern u1="l" u2="d" k="2" />
-<hkern u1="l" u2="\" k="27" />
-<hkern u1="l" u2="Y" k="53" />
-<hkern u1="l" u2="W" k="51" />
-<hkern u1="l" u2="V" k="49" />
-<hkern u1="l" u2="U" k="35" />
-<hkern u1="l" u2="T" k="47" />
-<hkern u1="l" u2="O" k="29" />
-<hkern u1="l" u2="I" k="4" />
-<hkern u1="l" u2="/" k="-25" />
-<hkern u1="l" u2="-" k="31" />
-<hkern u1="l" u2="*" k="41" />
-<hkern u1="l" u2=")" k="-14" />
-<hkern u1="l" u2="'" k="37" />
-<hkern u1="l" u2=" " k="57" />
-<hkern u1="n" u2="™" k="45" />
-<hkern u1="n" u2="’" k="29" />
-<hkern u1="n" u2="‘" k="31" />
-<hkern u1="n" u2="y" k="20" />
-<hkern u1="n" u2="w" k="20" />
-<hkern u1="n" u2="v" k="20" />
-<hkern u1="n" u2="t" k="8" />
-<hkern u1="n" u2="\" k="66" />
-<hkern u1="n" u2="Z" k="16" />
-<hkern u1="n" u2="Y" k="154" />
-<hkern u1="n" u2="X" k="6" />
-<hkern u1="n" u2="W" k="109" />
-<hkern u1="n" u2="V" k="106" />
-<hkern u1="n" u2="U" k="18" />
-<hkern u1="n" u2="T" k="211" />
-<hkern u1="n" u2="S" k="10" />
-<hkern u1="n" u2="O" k="10" />
-<hkern u1="n" u2="?" k="20" />
-<hkern u1="n" u2="*" k="37" />
-<hkern u1="n" u2="'" k="20" />
-<hkern u1="o" u2="™" k="57" />
-<hkern u1="o" u2="’" k="55" />
-<hkern u1="o" u2="‘" k="59" />
-<hkern u1="o" u2="Ð" k="23" />
-<hkern u1="o" u2="Æ" k="45" />
-<hkern u1="o" u2="º" k="16" />
-<hkern u1="o" u2="z" k="27" />
-<hkern u1="o" u2="y" k="39" />
-<hkern u1="o" u2="x" k="41" />
-<hkern u1="o" u2="w" k="41" />
-<hkern u1="o" u2="v" k="37" />
-<hkern u1="o" u2="t" k="16" />
-<hkern u1="o" u2="s" k="2" />
-<hkern u1="o" u2="f" k="8" />
-<hkern u1="o" u2="\" k="76" />
-<hkern u1="o" u2="Z" k="43" />
-<hkern u1="o" u2="Y" k="178" />
-<hkern u1="o" u2="X" k="74" />
-<hkern u1="o" u2="W" k="129" />
-<hkern u1="o" u2="V" k="127" />
-<hkern u1="o" u2="U" k="23" />
-<hkern u1="o" u2="T" k="217" />
-<hkern u1="o" u2="S" k="16" />
-<hkern u1="o" u2="J" k="45" />
-<hkern u1="o" u2="I" k="18" />
-<hkern u1="o" u2="A" k="35" />
-<hkern u1="o" u2="?" k="27" />
-<hkern u1="o" u2="*" k="63" />
-<hkern u1="o" u2=")" k="35" />
-<hkern u1="o" u2="'" k="45" />
-<hkern u1="q" u2="„" k="-8" />
-<hkern u1="q" u2="‚" k="-8" />
-<hkern u1="q" u2="j" k="-193" />
-<hkern u1="q" u2="Z" k="14" />
-<hkern u1="q" u2="Y" k="133" />
-<hkern u1="q" u2="X" k="12" />
-<hkern u1="q" u2="W" k="84" />
-<hkern u1="q" u2="V" k="80" />
-<hkern u1="q" u2="U" k="12" />
-<hkern u1="q" u2="T" k="186" />
-<hkern u1="q" u2="S" k="2" />
-<hkern u1="q" u2="O" k="10" />
-<hkern u1="q" u2=";" k="-4" />
-<hkern u1="q" u2="," k="-8" />
-<hkern u1="r" u2="›" k="29" />
-<hkern u1="r" u2="‹" k="82" />
-<hkern u1="r" u2="ð" k="72" />
-<hkern u1="r" u2="Æ" k="111" />
-<hkern u1="r" u2="s" k="10" />
-<hkern u1="r" u2="o" k="49" />
-<hkern u1="r" u2="d" k="47" />
-<hkern u1="r" u2="a" k="20" />
-<hkern u1="r" u2="Z" k="51" />
-<hkern u1="r" u2="Y" k="59" />
-<hkern u1="r" u2="X" k="59" />
-<hkern u1="r" u2="W" k="20" />
-<hkern u1="r" u2="V" k="18" />
-<hkern u1="r" u2="T" k="135" />
-<hkern u1="r" u2="S" k="2" />
-<hkern u1="r" u2="J" k="166" />
-<hkern u1="r" u2="I" k="2" />
-<hkern u1="r" u2="A" k="92" />
-<hkern u1="r" u2="@" k="25" />
-<hkern u1="r" u2="/" k="78" />
-<hkern u1="r" u2="." k="98" />
-<hkern u1="r" u2="-" k="76" />
-<hkern u1="r" u2=")" k="8" />
-<hkern u1="r" u2=" " k="45" />
-<hkern u1="s" u2="™" k="33" />
-<hkern u1="s" u2="’" k="12" />
-<hkern u1="s" u2="‘" k="12" />
-<hkern u1="s" u2="Ð" k="16" />
-<hkern u1="s" u2="y" k="25" />
-<hkern u1="s" u2="x" k="12" />
-<hkern u1="s" u2="w" k="25" />
-<hkern u1="s" u2="v" k="20" />
-<hkern u1="s" u2="t" k="2" />
-<hkern u1="s" u2="f" k="2" />
-<hkern u1="s" u2="\" k="53" />
-<hkern u1="s" u2="Z" k="8" />
-<hkern u1="s" u2="Y" k="145" />
-<hkern u1="s" u2="X" k="8" />
-<hkern u1="s" u2="W" k="96" />
-<hkern u1="s" u2="V" k="94" />
-<hkern u1="s" u2="U" k="23" />
-<hkern u1="s" u2="T" k="193" />
-<hkern u1="s" u2="O" k="4" />
-<hkern u1="s" u2="I" k="12" />
-<hkern u1="s" u2="A" k="18" />
-<hkern u1="s" u2="-" k="16" />
-<hkern u1="s" u2="*" k="16" />
-<hkern u1="t" u2="™" k="8" />
-<hkern u1="t" u2="‹" k="41" />
-<hkern u1="t" u2="’" k="12" />
-<hkern u1="t" u2="‘" k="14" />
-<hkern u1="t" u2="ð" k="25" />
-<hkern u1="t" u2="y" k="2" />
-<hkern u1="t" u2="w" k="2" />
-<hkern u1="t" u2="v" k="2" />
-<hkern u1="t" u2="t" k="2" />
-<hkern u1="t" u2="o" k="23" />
-<hkern u1="t" u2="f" k="2" />
-<hkern u1="t" u2="d" k="23" />
-<hkern u1="t" u2="\" k="29" />
-<hkern u1="t" u2="Y" k="98" />
-<hkern u1="t" u2="W" k="57" />
-<hkern u1="t" u2="V" k="55" />
-<hkern u1="t" u2="U" k="23" />
-<hkern u1="t" u2="T" k="104" />
-<hkern u1="t" u2="O" k="18" />
-<hkern u1="t" u2="I" k="2" />
-<hkern u1="t" u2="-" k="29" />
-<hkern u1="t" u2="'" k="31" />
-<hkern u1="u" u2="™" k="29" />
-<hkern u1="u" u2="’" k="8" />
-<hkern u1="u" u2="‘" k="6" />
-<hkern u1="u" u2="Ð" k="4" />
-<hkern u1="u" u2="y" k="2" />
-<hkern u1="u" u2="w" k="6" />
-<hkern u1="u" u2="v" k="4" />
-<hkern u1="u" u2="t" k="2" />
-<hkern u1="u" u2="\" k="51" />
-<hkern u1="u" u2="Z" k="8" />
-<hkern u1="u" u2="Y" k="143" />
-<hkern u1="u" u2="W" k="84" />
-<hkern u1="u" u2="V" k="82" />
-<hkern u1="u" u2="U" k="16" />
-<hkern u1="u" u2="T" k="199" />
-<hkern u1="u" u2="O" k="12" />
-<hkern u1="u" u2="*" k="6" />
-<hkern u1="v" u2="‹" k="51" />
-<hkern u1="v" u2="ð" k="53" />
-<hkern u1="v" u2="Ð" k="16" />
-<hkern u1="v" u2="Æ" k="104" />
-<hkern u1="v" u2="º" k="-2" />
-<hkern u1="v" u2="s" k="27" />
-<hkern u1="v" u2="o" k="37" />
-<hkern u1="v" u2="d" k="35" />
-<hkern u1="v" u2="a" k="27" />
-<hkern u1="v" u2="\" k="27" />
-<hkern u1="v" u2="Z" k="47" />
-<hkern u1="v" u2="Y" k="84" />
-<hkern u1="v" u2="X" k="61" />
-<hkern u1="v" u2="W" k="33" />
-<hkern u1="v" u2="V" k="33" />
-<hkern u1="v" u2="T" k="158" />
-<hkern u1="v" u2="J" k="154" />
-<hkern u1="v" u2="A" k="68" />
-<hkern u1="v" u2="@" k="14" />
-<hkern u1="v" u2="/" k="68" />
-<hkern u1="v" u2="." k="94" />
-<hkern u1="v" u2="-" k="45" />
-<hkern u1="v" u2="*" k="-12" />
-<hkern u1="v" u2=")" k="27" />
-<hkern u1="v" u2=" " k="55" />
-<hkern u1="w" u2="‹" k="55" />
-<hkern u1="w" u2="ð" k="59" />
-<hkern u1="w" u2="Ð" k="16" />
-<hkern u1="w" u2="Æ" k="106" />
-<hkern u1="w" u2="º" k="-4" />
-<hkern u1="w" u2="s" k="29" />
-<hkern u1="w" u2="o" k="41" />
-<hkern u1="w" u2="d" k="39" />
-<hkern u1="w" u2="a" k="29" />
-<hkern u1="w" u2="\" k="29" />
-<hkern u1="w" u2="Z" k="47" />
-<hkern u1="w" u2="Y" k="82" />
-<hkern u1="w" u2="X" k="63" />
-<hkern u1="w" u2="W" k="31" />
-<hkern u1="w" u2="V" k="31" />
-<hkern u1="w" u2="T" k="156" />
-<hkern u1="w" u2="S" k="2" />
-<hkern u1="w" u2="O" k="2" />
-<hkern u1="w" u2="J" k="164" />
-<hkern u1="w" u2="A" k="72" />
-<hkern u1="w" u2="@" k="14" />
-<hkern u1="w" u2="/" k="74" />
-<hkern u1="w" u2="." k="100" />
-<hkern u1="w" u2="-" k="47" />
-<hkern u1="w" u2="*" k="-14" />
-<hkern u1="w" u2=")" k="29" />
-<hkern u1="w" u2=" " k="57" />
-<hkern u1="x" u2="‹" k="57" />
-<hkern u1="x" u2="ð" k="49" />
-<hkern u1="x" u2="s" k="10" />
-<hkern u1="x" u2="o" k="41" />
-<hkern u1="x" u2="f" k="2" />
-<hkern u1="x" u2="d" k="39" />
-<hkern u1="x" u2="a" k="18" />
-<hkern u1="x" u2="Y" k="72" />
-<hkern u1="x" u2="W" k="29" />
-<hkern u1="x" u2="V" k="27" />
-<hkern u1="x" u2="U" k="2" />
-<hkern u1="x" u2="T" k="143" />
-<hkern u1="x" u2="O" k="25" />
-<hkern u1="x" u2="/" k="-8" />
-<hkern u1="x" u2="-" k="63" />
-<hkern u1="x" u2="*" k="-14" />
-<hkern u1="x" u2=")" k="-8" />
-<hkern u1="y" u2="‹" k="53" />
-<hkern u1="y" u2="ð" k="57" />
-<hkern u1="y" u2="Ð" k="18" />
-<hkern u1="y" u2="Æ" k="106" />
-<hkern u1="y" u2="s" k="29" />
-<hkern u1="y" u2="o" k="41" />
-<hkern u1="y" u2="d" k="39" />
-<hkern u1="y" u2="a" k="29" />
-<hkern u1="y" u2="\" k="31" />
-<hkern u1="y" u2="Z" k="53" />
-<hkern u1="y" u2="Y" k="90" />
-<hkern u1="y" u2="X" k="68" />
-<hkern u1="y" u2="W" k="37" />
-<hkern u1="y" u2="V" k="37" />
-<hkern u1="y" u2="T" k="162" />
-<hkern u1="y" u2="S" k="2" />
-<hkern u1="y" u2="J" k="154" />
-<hkern u1="y" u2="I" k="8" />
-<hkern u1="y" u2="A" k="70" />
-<hkern u1="y" u2="@" k="16" />
-<hkern u1="y" u2="/" k="68" />
-<hkern u1="y" u2="." k="96" />
-<hkern u1="y" u2="-" k="45" />
-<hkern u1="y" u2=")" k="31" />
-<hkern u1="y" u2="&" k="14" />
-<hkern u1="y" u2=" " k="55" />
-<hkern u1="z" u2="‹" k="47" />
-<hkern u1="z" u2="ð" k="35" />
-<hkern u1="z" u2="Ð" k="12" />
-<hkern u1="z" u2="o" k="25" />
-<hkern u1="z" u2="d" k="25" />
-<hkern u1="z" u2="\" k="12" />
-<hkern u1="z" u2="Y" k="94" />
-<hkern u1="z" u2="W" k="47" />
-<hkern u1="z" u2="V" k="45" />
-<hkern u1="z" u2="U" k="14" />
-<hkern u1="z" u2="T" k="162" />
-<hkern u1="z" u2="O" k="4" />
-<hkern u1="z" u2="I" k="2" />
-<hkern u1="z" u2="-" k="55" />
-<hkern u1="{" u2="ï" k="-25" />
-<hkern u1="{" u2="î" k="-16" />
-<hkern u1="{" u2="Æ" k="-12" />
-<hkern u1="{" u2="j" k="-18" />
-<hkern u1="{" u2="Y" k="-6" />
-<hkern u1="{" u2="X" k="-4" />
-<hkern u1="{" u2="W" k="-2" />
-<hkern u1="|" u2="ï" k="-12" />
-<hkern u1="|" u2="î" k="-4" />
-<hkern u1="|" u2="Ï" k="-6" />
-<hkern u1="|" u2="j" k="-129" />
-<hkern u1="¡" u2="ï" k="-8" />
-<hkern u1="°" u2="9" k="53" />
-<hkern u1="°" u2="5" k="39" />
-<hkern u1="°" u2="4" k="176" />
-<hkern u1="°" u2="3" k="33" />
-<hkern u1="°" u2="1" k="25" />
-<hkern u1="°" u2="0" k="39" />
-<hkern u1="·" u2="l" k="78" />
-<hkern u1="·" u2="7" k="55" />
-<hkern u1="·" u2="4" k="39" />
-<hkern u1="·" u2="3" k="66" />
-<hkern u1="·" u2="2" k="25" />
-<hkern u1="·" u2="1" k="39" />
-<hkern u1="¿" u2="ð" k="49" />
-<hkern u1="¿" u2="Ð" k="41" />
-<hkern u1="¿" u2="Æ" k="37" />
-<hkern u1="¿" u2="z" k="35" />
-<hkern u1="¿" u2="y" k="49" />
-<hkern u1="¿" u2="x" k="33" />
-<hkern u1="¿" u2="w" k="68" />
-<hkern u1="¿" u2="v" k="66" />
-<hkern u1="¿" u2="u" k="41" />
-<hkern u1="¿" u2="t" k="43" />
-<hkern u1="¿" u2="s" k="49" />
-<hkern u1="¿" u2="o" k="47" />
-<hkern u1="¿" u2="n" k="35" />
-<hkern u1="¿" u2="l" k="39" />
-<hkern u1="¿" u2="j" k="-182" />
-<hkern u1="¿" u2="i" k="35" />
-<hkern u1="¿" u2="h" k="35" />
-<hkern u1="¿" u2="f" k="39" />
-<hkern u1="¿" u2="d" k="47" />
-<hkern u1="¿" u2="a" k="49" />
-<hkern u1="¿" u2="Z" k="43" />
-<hkern u1="¿" u2="Y" k="127" />
-<hkern u1="¿" u2="X" k="35" />
-<hkern u1="¿" u2="W" k="102" />
-<hkern u1="¿" u2="V" k="102" />
-<hkern u1="¿" u2="U" k="43" />
-<hkern u1="¿" u2="T" k="139" />
-<hkern u1="¿" u2="S" k="39" />
-<hkern u1="¿" u2="O" k="43" />
-<hkern u1="¿" u2="J" k="61" />
-<hkern u1="¿" u2="I" k="27" />
-<hkern u1="¿" u2="A" k="41" />
-<hkern u1="Ï" u2="|" k="-6" />
-<hkern u1="Ø" u2="™" k="-8" />
-<hkern u1="Ø" u2="\" k="-6" />
-<hkern u1="Ø" u2="Y" k="14" />
-<hkern u1="Ø" u2="X" k="10" />
-<hkern u1="Ø" u2="W" k="8" />
-<hkern u1="Ø" u2="V" k="8" />
-<hkern u1="Ø" u2="*" k="-12" />
-<hkern u1="Ø" u2=")" k="-8" />
-<hkern u1="Þ" u2="™" k="33" />
-<hkern u1="Þ" u2="’" k="59" />
-<hkern u1="Þ" u2="‘" k="66" />
-<hkern u1="Þ" u2="Ð" k="2" />
-<hkern u1="Þ" u2="Æ" k="92" />
-<hkern u1="Þ" u2="}" k="8" />
-<hkern u1="Þ" u2="y" k="12" />
-<hkern u1="Þ" u2="x" k="14" />
-<hkern u1="Þ" u2="w" k="8" />
-<hkern u1="Þ" u2="a" k="2" />
-<hkern u1="Þ" u2="]" k="8" />
-<hkern u1="Þ" u2="\" k="51" />
-<hkern u1="Þ" u2="Z" k="51" />
-<hkern u1="Þ" u2="Y" k="117" />
-<hkern u1="Þ" u2="X" k="92" />
-<hkern u1="Þ" u2="W" k="61" />
-<hkern u1="Þ" u2="V" k="61" />
-<hkern u1="Þ" u2="T" k="119" />
-<hkern u1="Þ" u2="S" k="2" />
-<hkern u1="Þ" u2="J" k="104" />
-<hkern u1="Þ" u2="A" k="55" />
-<hkern u1="Þ" u2="?" k="18" />
-<hkern u1="Þ" u2="/" k="49" />
-<hkern u1="Þ" u2="." k="63" />
-<hkern u1="Þ" u2="-" k="12" />
-<hkern u1="Þ" u2="*" k="45" />
-<hkern u1="Þ" u2=")" k="35" />
-<hkern u1="Þ" u2="'" k="100" />
-<hkern u1="ß" u2="™" k="31" />
-<hkern u1="ß" u2="’" k="20" />
-<hkern u1="ß" u2="‘" k="18" />
-<hkern u1="ß" u2="Ð" k="25" />
-<hkern u1="ß" u2="Æ" k="25" />
-<hkern u1="ß" u2="ª" k="12" />
-<hkern u1="ß" u2="z" k="14" />
-<hkern u1="ß" u2="y" k="35" />
-<hkern u1="ß" u2="x" k="35" />
-<hkern u1="ß" u2="w" k="37" />
-<hkern u1="ß" u2="v" k="35" />
-<hkern u1="ß" u2="t" k="14" />
-<hkern u1="ß" u2="s" k="2" />
-<hkern u1="ß" u2="f" k="12" />
-<hkern u1="ß" u2="\" k="25" />
-<hkern u1="ß" u2="Z" k="23" />
-<hkern u1="ß" u2="Y" k="90" />
-<hkern u1="ß" u2="X" k="45" />
-<hkern u1="ß" u2="W" k="68" />
-<hkern u1="ß" u2="V" k="68" />
-<hkern u1="ß" u2="U" k="27" />
-<hkern u1="ß" u2="T" k="68" />
-<hkern u1="ß" u2="S" k="6" />
-<hkern u1="ß" u2="O" k="12" />
-<hkern u1="ß" u2="J" k="16" />
-<hkern u1="ß" u2="I" k="18" />
-<hkern u1="ß" u2="A" k="25" />
-<hkern u1="ß" u2="*" k="20" />
-<hkern u1="ß" u2="'" k="23" />
-<hkern u1="ç" u2="j" k="-12" />
-<hkern u1="í" u2="™" k="-4" />
-<hkern u1="í" u2="’" k="-4" />
-<hkern u1="í" u2="‘" k="-4" />
-<hkern u1="í" u2="\" k="-6" />
-<hkern u1="í" u2="*" k="-6" />
-<hkern u1="í" u2=")" k="-14" />
-<hkern u1="î" u2="™" k="-41" />
-<hkern u1="î" u2="’" k="-16" />
-<hkern u1="î" u2="‘" k="-16" />
-<hkern u1="î" u2="ß" k="-4" />
-<hkern u1="î" u2="º" k="-14" />
-<hkern u1="î" u2="ª" k="-6" />
-<hkern u1="î" u2="}" k="-16" />
-<hkern u1="î" u2="|" k="-4" />
-<hkern u1="î" u2="l" k="-12" />
-<hkern u1="î" u2="i" k="-10" />
-<hkern u1="î" u2="h" k="-10" />
-<hkern u1="î" u2="]" k="-16" />
-<hkern u1="î" u2="?" k="-14" />
-<hkern u1="î" u2="*" k="-35" />
-<hkern u1="î" u2=")" k="-8" />
-<hkern u1="î" u2="'" k="-8" />
-<hkern u1="ï" u2="™" k="-33" />
-<hkern u1="ï" u2="’" k="-27" />
-<hkern u1="ï" u2="‘" k="-27" />
-<hkern u1="ï" u2="ß" k="-12" />
-<hkern u1="ï" u2="º" k="-27" />
-<hkern u1="ï" u2="ª" k="-18" />
-<hkern u1="ï" u2="}" k="-25" />
-<hkern u1="ï" u2="|" k="-12" />
-<hkern u1="ï" u2="l" k="-18" />
-<hkern u1="ï" u2="i" k="-16" />
-<hkern u1="ï" u2="h" k="-16" />
-<hkern u1="ï" u2="]" k="-25" />
-<hkern u1="ï" u2="\" k="-33" />
-<hkern u1="ï" u2="?" k="-27" />
-<hkern u1="ï" u2="*" k="-41" />
-<hkern u1="ï" u2=")" k="-37" />
-<hkern u1="ï" u2="'" k="-16" />
-<hkern u1="ï" u2="!" k="-8" />
-<hkern u1="ð" u2="™" k="18" />
-<hkern u1="ð" u2="’" k="25" />
-<hkern u1="ð" u2="‘" k="25" />
-<hkern u1="ð" u2="Ð" k="16" />
-<hkern u1="ð" u2="Æ" k="47" />
-<hkern u1="ð" u2="z" k="12" />
-<hkern u1="ð" u2="y" k="27" />
-<hkern u1="ð" u2="x" k="31" />
-<hkern u1="ð" u2="w" k="27" />
-<hkern u1="ð" u2="v" k="25" />
-<hkern u1="ð" u2="t" k="6" />
-<hkern u1="ð" u2="\" k="14" />
-<hkern u1="ð" u2="Z" k="55" />
-<hkern u1="ð" u2="Y" k="74" />
-<hkern u1="ð" u2="X" k="55" />
-<hkern u1="ð" u2="W" k="61" />
-<hkern u1="ð" u2="V" k="59" />
-<hkern u1="ð" u2="U" k="18" />
-<hkern u1="ð" u2="T" k="61" />
-<hkern u1="ð" u2="S" k="14" />
-<hkern u1="ð" u2="J" k="47" />
-<hkern u1="ð" u2="I" k="12" />
-<hkern u1="ð" u2="A" k="37" />
-<hkern u1="ð" u2="/" k="8" />
-<hkern u1="ð" u2="*" k="27" />
-<hkern u1="ð" u2=")" k="16" />
-<hkern u1="ð" u2="'" k="23" />
-<hkern u1="ø" u2="*" k="4" />
-<hkern u1="‘" u2="ð" k="102" />
-<hkern u1="‘" u2="ï" k="-20" />
-<hkern u1="‘" u2="î" k="-8" />
-<hkern u1="‘" u2="Æ" k="195" />
-<hkern u1="‘" u2="s" k="16" />
-<hkern u1="‘" u2="o" k="47" />
-<hkern u1="‘" u2="f" k="12" />
-<hkern u1="‘" u2="d" k="111" />
-<hkern u1="‘" u2="a" k="25" />
-<hkern u1="‘" u2="O" k="12" />
-<hkern u1="‘" u2="J" k="178" />
-<hkern u1="‘" u2="A" k="133" />
-<hkern u1="‘" u2="." k="264" />
-<hkern u1="’" u2="‹" k="39" />
-<hkern u1="’" u2="ð" k="104" />
-<hkern u1="’" u2="ï" k="-16" />
-<hkern u1="’" u2="î" k="-8" />
-<hkern u1="’" u2="Æ" k="197" />
-<hkern u1="’" u2="s" k="18" />
-<hkern u1="’" u2="o" k="49" />
-<hkern u1="’" u2="f" k="12" />
-<hkern u1="’" u2="d" k="113" />
-<hkern u1="’" u2="a" k="25" />
-<hkern u1="’" u2="O" k="14" />
-<hkern u1="’" u2="J" k="178" />
-<hkern u1="’" u2="A" k="135" />
-<hkern u1="’" u2="@" k="72" />
-<hkern u1="’" u2="/" k="182" />
-<hkern u1="’" u2="." k="266" />
-<hkern u1="’" u2=" " k="57" />
-<hkern u1="‚" u2="j" k="-20" />
-<hkern u1="„" u2="j" k="-20" />
-<hkern u1="‹" u2="Y" k="96" />
-<hkern u1="‹" u2="W" k="57" />
-<hkern u1="‹" u2="V" k="57" />
-<hkern u1="‹" u2="T" k="104" />
-<hkern u1="›" u2="’" k="45" />
-<hkern u1="›" u2="Ð" k="14" />
-<hkern u1="›" u2="Æ" k="47" />
-<hkern u1="›" u2="z" k="47" />
-<hkern u1="›" u2="y" k="53" />
-<hkern u1="›" u2="x" k="57" />
-<hkern u1="›" u2="w" k="55" />
-<hkern u1="›" u2="v" k="51" />
-<hkern u1="›" u2="t" k="18" />
-<hkern u1="›" u2="s" k="16" />
-<hkern u1="›" u2="f" k="16" />
-<hkern u1="›" u2="Z" k="23" />
-<hkern u1="›" u2="Y" k="135" />
-<hkern u1="›" u2="X" k="37" />
-<hkern u1="›" u2="W" k="90" />
-<hkern u1="›" u2="V" k="90" />
-<hkern u1="›" u2="T" k="133" />
-<hkern u1="›" u2="J" k="51" />
-<hkern u1="›" u2="A" k="31" />
-<hkern u1="›" u2="'" k="12" />
-<hkern u1="€" u2="3" k="14" />
-<hkern g1="uniFB01" u2="ï" k="-6" />
-<hkern g1="uniFB03" u2="ï" k="-6" />
-</font>
-</defs></svg>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata></metadata>
-<defs>
-<font id="ralewaysemibold" horiz-adv-x="1384" >
-<font-face units-per-em="2048" ascent="1638" descent="-410" />
-<missing-glyph horiz-adv-x="501" />
-<glyph unicode="fi" horiz-adv-x="1116" d="M55 772v174h144v141q0 114 46 210t142 157.5t227 61.5q189 0 365 -119l-94 -168q-47 42 -116 68t-142 26q-99 0 -151 -67t-52 -162v-148h561v-946h-225v772h-336v-772h-225v772h-144z" />
-<glyph unicode="fl" horiz-adv-x="1292" d="M55 772v174h144v160q0 193 109.5 301.5t309.5 108.5q207 0 313.5 -100.5t106.5 -270.5v-836q0 -46 27.5 -84.5t77.5 -38.5q14 0 31.5 3t32.5 7t28 7.5t21 6.5l8 3l34 -182q-4 -4 -37 -14t-90 -20.5t-108 -10.5q-114 0 -182 62t-68 153v893q0 42 -9 79.5t-29 72.5 t-59.5 56t-94.5 21q-68 0 -114 -40.5t-64.5 -98t-18.5 -127.5v-111h194v-174h-194v-772h-225v772h-144z" />
-<glyph unicode="ffi" horiz-adv-x="1630" d="M55 772v174h144v74q0 180 92.5 300t257.5 120q125 0 252 -58q117 134 323 134q180 0 367 -119l-92 -168q-46 40 -116 67t-138 27q-103 0 -156 -67t-53 -162v-148h561v-946h-225v772h-336v-772h-225v772h-287v-772h-225v772h-144zM424 946h287v119q0 34 7 79.5t19 69.5 q-57 33 -145 33q-59 0 -98.5 -35t-54.5 -82t-15 -102v-82z" />
-<glyph unicode="ffl" horiz-adv-x="1806" d="M55 772v174h144v84q0 182 96 296t260 114q119 0 246 -58q110 134 334 134q207 0 313 -100t106 -271v-836q0 -46 27.5 -84.5t77.5 -38.5q23 0 52.5 7t50.5 13l20 7l33 -182q-3 -4 -36 -14.5t-90.5 -20.5t-107.5 -10q-115 0 -183.5 62t-68.5 153v893q0 42 -9 79.5t-29 72.5 t-59.5 56t-94.5 21q-68 0 -114 -40.5t-64.5 -98t-18.5 -127.5v-111h195v-174h-195v-772h-225v772h-291v-772h-225v772h-144zM424 946h291v117q0 110 20 154q-52 30 -135 30q-87 0 -131.5 -60t-44.5 -149v-92z" />
-<glyph horiz-adv-x="0" />
-<glyph horiz-adv-x="682" />
-<glyph horiz-adv-x="0" />
-<glyph horiz-adv-x="0" />
-<glyph unicode="
" horiz-adv-x="0" />
-<glyph unicode=" " horiz-adv-x="501" />
-<glyph unicode="	" horiz-adv-x="501" />
-<glyph unicode=" " horiz-adv-x="501" />
-<glyph unicode="!" horiz-adv-x="557" d="M168 0v281h225v-281h-225zM168 518v950h225v-950h-225z" />
-<glyph unicode=""" horiz-adv-x="710" d="M121 1141v336h192v-336h-192zM397 1141v336h193v-336h-193z" />
-<glyph unicode="#" horiz-adv-x="1452" d="M78 397v172h272l78 324h-256v160h297l96 401h185l-101 -401h297l96 401h185l-99 -401h246v-160h-287l-77 -324h270v-172h-311l-97 -397h-184l100 397h-296l-97 -397h-184l98 397h-231zM532 569h297l78 324h-297z" />
-<glyph unicode="$" horiz-adv-x="1286" d="M72 182l106 197q53 -57 174.5 -113.5t259.5 -70.5v423q-107 28 -181 55t-134.5 60.5t-95.5 74.5t-53.5 93.5t-18.5 120.5q0 195 130.5 310.5t338.5 129.5v207h107v-207q239 -13 442 -162l-105 -188q-46 48 -143 92.5t-211 52.5v-423q77 -19 132 -35.5t113 -38t96.5 -44.5 t74.5 -53.5t57 -67t33 -83.5t12 -104q0 -107 -39 -188t-109 -130.5t-158.5 -75t-194.5 -28.5v-215h-107v219q-300 18 -526 192zM367 1057q0 -82 56 -124.5t189 -78.5v403q-119 -6 -182 -58t-63 -142zM688 193q129 2 199.5 49.5t70.5 138.5q0 84 -64.5 130.5t-205.5 86.5 v-405z" />
-<glyph unicode="%" horiz-adv-x="1572" d="M84 1169q0 127 95.5 216.5t230.5 89.5q136 0 230.5 -89t94.5 -217q0 -126 -94.5 -214.5t-230.5 -88.5q-135 0 -230.5 88.5t-95.5 214.5zM176 82l582 682l534 702l107 -92l-574 -674l-544 -712zM244 1169q0 -76 49 -131t117 -55t116.5 56t48.5 130q0 77 -49.5 133 t-115.5 56q-68 0 -117 -56.5t-49 -132.5zM838 285q0 126 95 214.5t230 88.5q136 0 231 -88.5t95 -214.5q0 -128 -95 -216.5t-231 -88.5q-135 0 -230 89t-95 216zM997 285q0 -78 49 -133.5t117 -55.5q69 0 117.5 56t48.5 133q0 76 -49.5 131t-116.5 55q-68 0 -117 -56 t-49 -130z" />
-<glyph unicode="&" horiz-adv-x="1433" d="M90 397q0 68 21 128.5t61 112t83.5 91t102.5 82.5q-94 104 -131 175.5t-37 148.5q0 148 109.5 243t275.5 95q156 0 263.5 -83t107.5 -227q0 -113 -71 -202t-203 -177l325 -342q74 155 74 330h186q-3 -267 -127 -469l291 -303h-297l-133 139q-186 -159 -422 -159 q-209 0 -344 120.5t-135 296.5zM307 395q0 -104 83 -170.5t202 -66.5q152 0 278 110l-378 400q-90 -65 -137.5 -130.5t-47.5 -142.5zM395 1141q0 -41 27.5 -82.5t112.5 -130.5q107 70 155.5 120t48.5 111q0 64 -46.5 105t-117.5 41q-77 0 -128.5 -48t-51.5 -116z" />
-<glyph unicode="'" horiz-adv-x="415" d="M113 1161v316h192v-316h-192z" />
-<glyph unicode="(" horiz-adv-x="600" d="M78 709q0 192 76.5 387.5t220.5 439.5l172 -74q-39 -58 -81.5 -142t-84 -187t-68 -218.5t-26.5 -212.5q0 -298 256 -714l-166 -84q-299 442 -299 805z" />
-<glyph unicode=")" horiz-adv-x="600" d="M53 1462l174 74q144 -244 220.5 -439.5t76.5 -387.5q0 -358 -299 -805l-166 84q254 412 254 714q0 97 -26.5 212.5t-68 218.5t-84 187t-81.5 142z" />
-<glyph unicode="*" horiz-adv-x="690" d="M113 1268l32 102l146 -59l-8 155h125l-9 -155l146 59l30 -102l-141 -45l92 -138l-90 -61l-90 145l-92 -145l-90 61l92 138z" />
-<glyph unicode="+" horiz-adv-x="864" d="M102 637v180h228v248h205v-248h225v-180h-225v-248h-205v248h-228z" />
-<glyph unicode="," horiz-adv-x="460" d="M82 -35q20 0 39.5 13t19.5 45v239h187v-280q0 -49 -22.5 -85.5t-60 -56.5t-78.5 -29.5t-85 -9.5v164z" />
-<glyph unicode="-" horiz-adv-x="858" d="M123 459v203h612v-203h-612z" />
-<glyph unicode="." horiz-adv-x="434" d="M123 0v262h186v-262h-186z" />
-<glyph unicode="/" horiz-adv-x="1361" d="M59 0l996 1454h252l-998 -1454h-250z" />
-<glyph unicode="0" horiz-adv-x="1259" d="M106 600q0 177 68 320t188 223t269 80q148 0 267 -80t187 -223t68 -320t-68 -319t-187 -221.5t-267 -79.5q-226 0 -375.5 175.5t-149.5 444.5zM332 600q0 -184 82.5 -298t216.5 -114q130 0 212.5 114.5t82.5 297.5q0 184 -82.5 299t-212.5 115q-133 0 -216 -114.5 t-83 -299.5z" />
-<glyph unicode="1" horiz-adv-x="960" d="M90 764v211q51 0 129.5 41t136 86.5t68.5 66.5h229v-966h260v-203h-780v203h291v715q-38 -49 -147.5 -101.5t-186.5 -52.5z" />
-<glyph unicode="2" horiz-adv-x="1138" d="M92 0q0 92 14 161t50 135.5t101 124t163 111.5q32 18 78.5 42.5t75 39.5t64 36t56.5 38.5t40.5 38.5t28.5 44.5t9 49.5q0 70 -59 120t-160 50q-170 0 -303 -162l-144 166q25 27 66.5 57t103.5 63t146 54t172 21q194 0 308 -95t114 -243q0 -58 -21 -110.5t-49.5 -88 t-75 -71t-78.5 -54t-79 -43.5q-41 -21 -72.5 -38t-76 -46.5t-75.5 -57t-58 -65t-38 -75.5h645v-203h-946z" />
-<glyph unicode="3" horiz-adv-x="1128" d="M68 -90l137 156q102 -162 323 -162q135 0 208 58t73 171q0 120 -83 187t-241 67h-55v176h62q133 0 208.5 63.5t75.5 164.5q0 94 -64.5 142t-172.5 48q-103 0 -184 -45.5t-128 -128.5l-139 154q59 99 189 159t286 60q202 0 327.5 -100.5t125.5 -264.5q0 -124 -71 -218 t-187 -114q129 -23 206.5 -122.5t77.5 -241.5q0 -191 -139 -305.5t-371 -114.5q-154 0 -273.5 54.5t-190.5 156.5z" />
-<glyph unicode="4" horiz-adv-x="1140" d="M43 66v200l700 903h154v-899h180v-204h-180v-326h-225v326h-629zM270 270h426v555z" />
-<glyph unicode="5" horiz-adv-x="1132" d="M66 -43l133 129q60 -88 150 -140t190 -52q127 0 209.5 79t82.5 205q0 120 -79 197.5t-197 77.5q-79 0 -147 -35t-109 -99h-199l164 850h713v-206h-547l-74 -398q77 84 230 84q204 0 340.5 -131.5t136.5 -335.5q0 -215 -150 -351t-376 -136q-154 0 -280 70.5t-191 191.5z " />
-<glyph unicode="6" horiz-adv-x="1241" d="M100 625q0 408 148.5 623.5t406.5 215.5q138 0 254.5 -64t188.5 -179l-133 -140q-46 86 -130 136.5t-184 50.5q-154 0 -245.5 -131.5t-94.5 -364.5q43 91 135 145t207 54q139 0 255 -64.5t182.5 -176.5t66.5 -247q0 -211 -152 -357t-374 -146q-242 0 -386.5 173 t-144.5 472zM324 483q0 -127 91.5 -219t217.5 -92t217.5 92t91.5 219q0 126 -91.5 217t-217.5 91q-127 0 -218 -91t-91 -217z" />
-<glyph unicode="7" horiz-adv-x="1157" d="M82 987v207h1061l-725 -1454h-256l626 1247h-706z" />
-<glyph unicode="8" horiz-adv-x="1232" d="M96 430q0 119 74 211t176 137q-87 38 -145 115.5t-58 169.5q0 91 43 167t112 123.5t151.5 74t166.5 26.5t167 -26t152 -73.5t112 -123t43 -166.5q0 -92 -59.5 -170.5t-147.5 -116.5q108 -48 180 -141.5t72 -216.5q0 -128 -71.5 -229t-190 -154t-261.5 -53 q-220 0 -368 127t-148 319zM326 434q0 -110 88.5 -179t201.5 -69q114 0 202.5 71.5t88.5 176.5q0 112 -89.5 181t-203.5 69q-117 0 -202.5 -70t-85.5 -180zM371 1055q0 -91 75.5 -145t169.5 -54q93 0 168.5 55.5t75.5 147.5q0 86 -72.5 140t-173.5 54q-100 0 -171.5 -55 t-71.5 -143z" />
-<glyph unicode="9" horiz-adv-x="1206" d="M70 666q0 211 152 357t374 146q241 0 385.5 -172.5t144.5 -472.5q0 -408 -148.5 -623.5t-406.5 -215.5q-138 0 -254 64t-188 179l133 140q46 -86 130 -136.5t183 -50.5q154 0 245.5 131.5t94.5 364.5q-43 -91 -135 -145t-207 -54q-139 0 -255 64.5t-182 176.5t-66 247z M285 666q0 -126 91.5 -217t217.5 -91q127 0 218 91t91 217q0 127 -91.5 219t-217.5 92t-217.5 -92t-91.5 -219z" />
-<glyph unicode=":" horiz-adv-x="462" d="M139 0v262h185v-262h-185zM139 801v260h185v-260h-185z" />
-<glyph unicode=";" horiz-adv-x="483" d="M92 -35q21 0 40.5 13t19.5 45v239h186v-280q0 -49 -22.5 -85.5t-60 -56.5t-78.5 -29.5t-85 -9.5v164zM152 801v260h186v-260h-186z" />
-<glyph unicode="<" horiz-adv-x="1040" d="M68 469v113l860 520v-240l-535 -332l535 -323v-250z" />
-<glyph unicode="=" horiz-adv-x="897" d="M133 332v149h633v-149h-633zM133 649v150h633v-150h-633z" />
-<glyph unicode=">" horiz-adv-x="1040" d="M113 -43v250l534 323l-534 332v240l862 -520v-113z" />
-<glyph unicode="?" horiz-adv-x="995" d="M72 1208q54 124 171.5 194.5t256.5 70.5q79 0 152 -24t133.5 -71t96.5 -125.5t36 -179.5q0 -132 -61 -211.5t-177 -138.5q-35 -18 -53 -28t-48.5 -29.5t-47 -38t-34.5 -44.5t-26 -58.5t-8 -71.5h-187q0 112 38 192t132 137q10 6 50.5 29t62 36t57 41t54.5 53t34 62t15 78 q0 95 -66 151t-157 56q-90 0 -162 -52t-113 -128zM281 0v258h188v-258h-188z" />
-<glyph unicode="@" horiz-adv-x="1703" d="M94 471q0 140 41 262.5t114 213t170 156.5t210.5 99t234.5 33t233.5 -33.5t207.5 -100t166 -159t111 -218t40 -269.5q0 -32 -2 -64.5t-9 -83t-19.5 -94t-36 -90.5t-55 -80t-80 -54.5t-107.5 -21.5q-51 0 -87.5 14.5t-56.5 41.5t-29.5 55.5t-13.5 64.5 q-64 -66 -155.5 -105.5t-194.5 -39.5q-150 0 -232.5 79t-82.5 206q0 79 34 138t91.5 91.5t123 47.5t138.5 15q118 0 244 -47q0 135 -54 207t-188 72q-163 0 -279 -92l-45 123q151 102 344 102q70 0 125.5 -14t92.5 -36.5t64 -58t41.5 -69.5t23 -80.5t10.5 -82.5t2 -83v-221 q0 -52 3.5 -86.5t13.5 -68t31.5 -50t55.5 -16.5q55 0 95 41t59.5 105t28 123.5t8.5 115.5q0 192 -84.5 347.5t-237.5 245t-344 89.5q-188 0 -339.5 -86t-237.5 -239.5t-86 -344.5q0 -186 80.5 -340t229 -245t335.5 -91q86 0 158.5 19.5t158.5 58.5l31 -90q-165 -82 -350 -82 q-152 0 -288.5 57t-237 157.5t-159.5 245t-59 310.5zM602 291q0 -70 49 -118t135 -48q93 0 185 45q68 31 93.5 75.5t25.5 102.5v70q-1 0 -48 13.5t-95.5 21.5t-98.5 8q-110 0 -178 -40.5t-68 -129.5z" />
-<glyph unicode="A" d="M14 0l586 1454h188l584 -1454h-244l-155 395h-561l-152 -395h-246zM453 565h475l-234 633z" />
-<glyph unicode="B" d="M164 0v1454h749q98 0 176 -55.5t117 -139t39 -176.5q0 -109 -56 -202t-153 -136q126 -37 198.5 -135t72.5 -235q0 -170 -129.5 -272.5t-319.5 -102.5h-694zM393 199h465q90 0 151.5 64.5t61.5 154.5q0 91 -57 158t-142 67h-479v-444zM393 827h422q85 0 143 60.5t58 152.5 q0 94 -53.5 154.5t-135.5 60.5h-434v-428z" />
-<glyph unicode="C" horiz-adv-x="1386" d="M74 737q0 106 29.5 210.5t89 197t141.5 163.5t194.5 112.5t239.5 41.5q188 0 331 -86.5t214 -230.5l-180 -121q-28 63 -71.5 109.5t-94.5 72t-102 37.5t-105 12q-86 0 -160.5 -30.5t-127.5 -81.5t-91 -119t-56 -143t-18 -152q0 -141 58.5 -263t165 -196.5t235.5 -74.5 q115 0 221 60t158 179l190 -108q-43 -104 -138 -182.5t-209 -117t-230 -38.5q-117 0 -224.5 42t-190 115.5t-144 168t-93.5 204t-32 219.5z" />
-<glyph unicode="D" horiz-adv-x="1470" d="M164 0v1454h516q171 0 307.5 -56.5t223.5 -156t132.5 -230t45.5 -282.5q0 -330 -193.5 -529.5t-515.5 -199.5h-516zM393 203h287q150 0 258.5 69.5t162.5 187.5t54 269q0 233 -126.5 377.5t-348.5 144.5h-287v-1048z" />
-<glyph unicode="E" horiz-adv-x="1243" d="M164 0v1454h979v-203h-750v-413h649v-191h-649v-444h768v-203h-997z" />
-<glyph unicode="F" horiz-adv-x="1179" d="M164 0v1454h969v-203h-740v-434h619v-190h-619v-627h-229z" />
-<glyph unicode="G" horiz-adv-x="1462" d="M76 733q0 146 52.5 280.5t142.5 233.5t218 158t271 59q198 0 339 -84.5t216 -232.5l-176 -127q-57 116 -158 176.5t-227 60.5q-130 0 -233 -74.5t-157.5 -195t-54.5 -260.5q0 -145 60 -266.5t166 -192.5t235 -71q221 0 397 215v153h-305v170h498v-735h-193v180 q-178 -190 -415 -190q-138 0 -264.5 63t-216 165.5t-142.5 238t-53 276.5z" />
-<glyph unicode="H" horiz-adv-x="1521" d="M164 0v1454h229v-608h733v608h232v-1454h-232v641h-733v-641h-229z" />
-<glyph unicode="I" horiz-adv-x="557" d="M164 0v1452h229v-1452h-229z" />
-<glyph unicode="J" horiz-adv-x="1007" d="M29 68l55 188q39 -28 109 -50t151 -22q62 0 108.5 14t77.5 46.5t51 73t30.5 105t14 131t3.5 161.5v737h231v-737q0 -103 -4.5 -180.5t-17.5 -158.5t-36.5 -138t-62 -109t-92.5 -83.5t-130 -50t-173 -18.5q-182 0 -315 91z" />
-<glyph unicode="K" horiz-adv-x="1347" d="M164 0v1452h229v-758l692 760h246l-573 -643l606 -811h-248l-495 680l-228 -238v-442h-229z" />
-<glyph unicode="L" horiz-adv-x="1208" d="M164 0v1454h229v-1251h781v-203h-1010z" />
-<glyph unicode="M" horiz-adv-x="1781" d="M164 0v1454h246l481 -889l481 889h246v-1454h-232v1047l-432 -793h-127l-434 793v-1047h-229z" />
-<glyph unicode="N" horiz-adv-x="1570" d="M164 0v1454h180l832 -1048v1046h231v-1452h-190l-824 1024v-1024h-229z" />
-<glyph unicode="O" horiz-adv-x="1527" d="M76 727q0 144 53 278.5t143.5 235.5t220.5 162t275 61q149 0 279 -64t217.5 -168.5t137.5 -237t50 -269.5q0 -144 -52.5 -278t-143 -235t-220 -161.5t-274.5 -60.5q-120 0 -228.5 40.5t-190.5 111.5t-143 164t-92.5 201.5t-31.5 219.5zM309 727q0 -138 54.5 -258 t160 -196t240.5 -76q104 0 191.5 46t144 121.5t88 169.5t31.5 193q0 82 -20.5 160.5t-61 144.5t-95 116t-126.5 78.5t-152 28.5q-103 0 -190.5 -45.5t-144.5 -120.5t-88.5 -169t-31.5 -193z" />
-<glyph unicode="P" horiz-adv-x="1271" d="M164 0v1454h610q126 0 231.5 -70t162.5 -178t57 -225q0 -91 -32 -177t-88.5 -152t-140 -106t-178.5 -40h-393v-506h-229zM393 709h379q96 0 157.5 77t61.5 195t-68 194t-163 76h-367v-542z" />
-<glyph unicode="Q" horiz-adv-x="1529" d="M76 727q0 144 53 278.5t143.5 235.5t220.5 162t275 61q149 0 279 -64t217.5 -168.5t137.5 -237t50 -269.5q0 -141 -49.5 -272t-138.5 -232l192 -221h-221l-96 109q-170 -119 -377 -119q-120 1 -228.5 41.5t-190.5 111.5t-143 163.5t-92.5 201t-31.5 219.5zM309 727 q0 -138 54.5 -258t160 -196t240.5 -76q131 0 235 71l-204 238h221l100 -117q103 145 103 338q0 103 -33 199t-91 169.5t-144.5 117.5t-186.5 44q-103 0 -190.5 -46t-144.5 -121t-88.5 -169.5t-31.5 -193.5z" />
-<glyph unicode="R" horiz-adv-x="1370" d="M164 0v1454h633q95 0 180.5 -41t143.5 -108t92 -152t34 -172q0 -148 -78 -267.5t-206 -160.5l346 -553h-260l-320 506h-336v-506h-229zM393 709h402q95 0 157 79.5t62 192.5q0 111 -70 190.5t-162 79.5h-389v-542z" />
-<glyph unicode="S" horiz-adv-x="1257" d="M55 182l107 197q64 -66 206 -126t298 -60q132 0 204 48.5t72 139.5q0 31 -10 56.5t-24 45t-44 38t-56 31t-75 28.5t-85.5 26t-102.5 27q-115 30 -190 61t-132.5 76t-83.5 106.5t-26 145.5q0 105 40.5 189.5t111 139.5t166 84t206.5 29q270 0 493 -164l-104 -188 q-50 54 -161 101t-240 47q-132 0 -203.5 -53.5t-71.5 -149.5q0 -23 5 -42.5t12 -35.5t23.5 -30.5t30 -25t41 -22.5t48 -19.5t59 -18.5t65.5 -18t77 -20q98 -25 161.5 -46t129.5 -55t103.5 -75t61 -101.5t23.5 -139.5q0 -110 -42 -193t-116.5 -132t-168.5 -73t-206 -24 q-166 0 -322 50.5t-280 145.5z" />
-<glyph unicode="T" horiz-adv-x="1265" d="M33 1251v203h1198v-203h-483v-1251h-230v1251h-485z" />
-<glyph unicode="U" horiz-adv-x="1536" d="M141 717v737h230v-737q0 -83 12 -156.5t41.5 -141.5t73.5 -116t113 -77t157 -29q89 0 158.5 29.5t113.5 78.5t73 117t40.5 140.5t11.5 154.5v737h232v-737q0 -153 -36 -281.5t-109.5 -230t-197 -158.5t-286.5 -57q-135 0 -242.5 40t-178.5 107t-118 161.5t-67.5 198 t-20.5 220.5z" />
-<glyph unicode="V" horiz-adv-x="1382" d="M8 1454h244l440 -1165l436 1165h242l-579 -1454h-197z" />
-<glyph unicode="W" horiz-adv-x="2150" d="M8 1454h248l457 -1188l215 535l-248 647h215l178 -494l180 494h217l-249 -647l219 -535l452 1188h250l-598 -1454h-198l-271 651l-272 -651h-197z" />
-<glyph unicode="X" horiz-adv-x="1308" d="M-2 1454h254l403 -573l404 573h252l-533 -737l516 -717h-252l-387 553l-387 -553h-254l518 717z" />
-<glyph unicode="Y" horiz-adv-x="1310" d="M0 1454h252l403 -729l406 729h250l-541 -934v-520h-231v524z" />
-<glyph unicode="Z" horiz-adv-x="1277" d="M57 0v176l883 1075h-862v203h1128v-176l-860 -1075h864v-203h-1153z" />
-<glyph unicode="[" horiz-adv-x="575" d="M156 -82v1598h333v-183h-124v-1233h124v-182h-333z" />
-<glyph unicode="\" horiz-adv-x="1255" d="M55 1454h252l891 -1454h-250z" />
-<glyph unicode="]" horiz-adv-x="575" d="M88 -82v182h125v1233h-125v183h334v-1598h-334z" />
-<glyph unicode="^" horiz-adv-x="1167" d="M84 621l405 833h191l403 -833h-188l-309 639l-318 -639h-184z" />
-<glyph unicode="_" horiz-adv-x="806" d="M23 0h761v-203h-761v203z" />
-<glyph unicode="`" horiz-adv-x="497" d="M96 1495h215l117 -225l-143 -45z" />
-<glyph unicode="a" horiz-adv-x="1161" d="M57 315q0 150 126.5 244t326.5 94q160 0 283 -49v74q0 119 -69 185.5t-194 66.5q-160 0 -340 -123l-69 143q208 140 430 140q221 0 344 -114.5t123 -322.5v-387q0 -39 14 -55.5t49 -17.5v-193q-54 -10 -110 -10q-126 9 -142 116l-6 68q-72 -93 -177 -143.5t-226 -50.5 q-155 0 -259 96t-104 239zM270 334q0 -80 60.5 -134.5t150.5 -54.5q83 0 156.5 30.5t112.5 82.5q43 37 43 78v141q-123 47 -248 47q-121 0 -198 -53t-77 -137z" />
-<glyph unicode="b" horiz-adv-x="1284" d="M131 0v1495h225v-627q65 105 162 163.5t221 58.5q139 0 249 -78.5t168 -206t58 -275.5q0 -151 -65.5 -277t-181 -199.5t-256.5 -73.5q-123 0 -223 57.5t-158 157.5v-195h-199zM356 383q24 -89 113.5 -150t181.5 -61q144 0 239 106.5t95 251.5q0 149 -90.5 258t-226.5 109 q-100 0 -182.5 -65t-129.5 -166v-283z" />
-<glyph unicode="c" horiz-adv-x="1144" d="M66 537q0 113 39.5 213.5t110.5 176t176 119.5t229 44q162 0 282 -72t182 -195l-219 -69q-38 67 -104 105t-146 38q-136 0 -227.5 -101.5t-91.5 -258.5q0 -154 94 -259.5t227 -105.5q83 0 156 42.5t98 104.5l222 -65q-54 -123 -181 -198.5t-292 -75.5q-162 0 -290.5 77 t-196.5 203.5t-68 276.5z" />
-<glyph unicode="d" horiz-adv-x="1310" d="M68 535q0 152 61 278.5t172 201.5t248 75q120 0 219.5 -61.5t157.5 -160.5v627h225v-1229q0 -38 15.5 -54.5t50.5 -18.5v-193q-59 -10 -111 -10q-128 12 -143 116l-5 89q-61 -101 -164 -158t-219 -57q-145 0 -262 75.5t-181 202t-64 277.5zM299 530q0 -149 96.5 -253.5 t237.5 -104.5q91 0 180.5 62.5t112.5 150.5v281q-35 97 -126 164t-184 67q-92 0 -165.5 -52.5t-112.5 -136t-39 -178.5z" />
-<glyph unicode="e" horiz-adv-x="1218" d="M66 532q0 113 40.5 215t111.5 178t176.5 120.5t228.5 44.5t226.5 -45t173 -120.5t108 -174.5t38.5 -207q0 -28 -6 -82h-858q10 -139 103.5 -227.5t220.5 -88.5q92 0 171 45.5t109 118.5l193 -55q-57 -123 -186 -198.5t-295 -75.5q-163 0 -291 76t-196 201t-68 275z M299 616h647q-13 136 -104.5 222t-220.5 86t-220.5 -86.5t-101.5 -221.5z" />
-<glyph unicode="f" horiz-adv-x="753" d="M55 772v174h144v141q0 197 92.5 313t249.5 116q128 0 247 -66l-49 -168q-67 43 -151 43q-80 0 -122 -59.5t-42 -171.5v-148h272v-174h-272v-772h-225v772h-144z" />
-<glyph unicode="g" horiz-adv-x="1284" d="M70 535q0 152 62 278.5t176 201.5t257 75q125 0 223 -59.5t164 -162.5v203h199v-1040q0 -151 -75 -263t-203 -168.5t-291 -56.5q-171 0 -289.5 58.5t-204.5 171.5l127 118q60 -85 158 -130.5t209 -45.5q149 0 246.5 80.5t97.5 235.5v164q-56 -95 -156.5 -150t-212.5 -55 q-140 0 -253 76t-173.5 200t-60.5 269zM297 528q0 -147 97 -251.5t237 -104.5q99 0 184.5 63t110.5 150v281q-40 101 -127.5 166t-184.5 65q-94 0 -168 -54.5t-111.5 -138t-37.5 -176.5z" />
-<glyph unicode="h" horiz-adv-x="1216" d="M131 0v1495h225v-639q63 109 169.5 171.5t230.5 62.5q338 0 338 -437v-653h-226v600q0 289 -204 289q-93 0 -184 -72t-124 -180v-637h-225z" />
-<glyph unicode="i" horiz-adv-x="489" d="M131 0v1071h225v-1071h-225zM131 1247v248h225v-248h-225z" />
-<glyph unicode="j" horiz-adv-x="489" d="M-252 -299l100 152q51 -48 132 -48q61 0 106 45t45 111v1110h225v-1094q0 -160 -102.5 -264t-247.5 -104q-156 0 -258 92zM131 1247v248h225v-248h-225z" />
-<glyph unicode="k" horiz-adv-x="1118" d="M131 0v1495h225v-948l494 522h244l-414 -448l438 -621h-241l-342 494l-179 -168v-326h-225z" />
-<glyph unicode="l" horiz-adv-x="610" d="M133 227v1268h225v-1180q0 -60 31 -93.5t86 -33.5q52 0 111 27l32 -182q-49 -22 -116 -35.5t-121 -13.5q-116 0 -182 64t-66 179z" />
-<glyph unicode="m" horiz-adv-x="1892" d="M131 0v1071h205v-215q63 113 167 173.5t236 60.5q128 0 207.5 -67t100.5 -177q68 119 170 181.5t231 62.5q324 0 324 -437v-653h-226v600q0 289 -192 289q-95 0 -176 -70.5t-115 -183.5v-635h-225v600q0 289 -191 289q-94 0 -175 -70t-116 -182v-637h-225z" />
-<glyph unicode="n" horiz-adv-x="1216" d="M131 0v1071h205v-215q62 108 179 171t257 63q75 0 132 -23t93 -62t58 -96.5t30.5 -119t8.5 -136.5v-653h-226v600q0 289 -190 289q-100 0 -193.5 -72.5t-128.5 -179.5v-637h-225z" />
-<glyph unicode="o" horiz-adv-x="1230" d="M66 535q0 111 40 212t110 177t174.5 121t225.5 45q162 0 289.5 -77t194.5 -203t67 -275t-67 -275t-194.5 -203t-289.5 -77q-123 0 -227.5 45t-174.5 121t-109 177t-39 212zM297 532q0 -154 92.5 -257t226.5 -103t227 105t93 258t-93 257.5t-227 104.5q-133 0 -226 -106 t-93 -259z" />
-<glyph unicode="p" horiz-adv-x="1282" d="M131 -436v1507h199v-192q63 98 162.5 154.5t218.5 56.5q107 0 201 -45t160 -120t104 -176.5t38 -211.5q0 -154 -60 -281t-169 -201.5t-246 -74.5q-125 0 -223.5 59.5t-159.5 161.5v-637h-225zM356 406q42 -101 128.5 -167.5t183.5 -66.5q91 0 164.5 52.5t113 136 t39.5 176.5q0 150 -97 255t-237 105q-91 0 -181 -62t-114 -149v-280z" />
-<glyph unicode="q" horiz-adv-x="1282" d="M68 537q0 151 65.5 277.5t181 201t256.5 74.5q120 0 219.5 -58t159.5 -155v194h199v-1231q0 -38 14.5 -54t50.5 -19v-193q-47 -8 -106 -8q-77 0 -130.5 45.5t-53.5 118.5v471q-134 -221 -383 -221q-136 0 -245.5 76.5t-168.5 203.5t-59 277zM297 530q0 -150 92.5 -254 t233.5 -104q185 0 301 205v282q-20 95 -112 166.5t-189 71.5q-92 0 -168 -52.5t-117 -136.5t-41 -178z" />
-<glyph unicode="r" horiz-adv-x="765" d="M131 0v1071h209v-240q58 113 148 181.5t188 68.5q43 0 57 -2v-202q-132 -3 -232.5 -61.5t-144.5 -160.5v-655h-225z" />
-<glyph unicode="s" horiz-adv-x="1024" d="M43 129l94 152q198 -138 391 -138q103 0 162.5 39.5t59.5 110.5q0 63 -60 95t-219 71q-108 27 -173 50.5t-114 57t-68.5 76.5t-19.5 105q0 158 118.5 250t301.5 92q115 0 224 -37t196 -101l-96 -137q-153 115 -328 115q-91 0 -148 -37.5t-57 -112.5q0 -62 47.5 -90 t188.5 -63q118 -28 192 -53.5t129.5 -62t79 -84.5t23.5 -116q0 -152 -118 -241.5t-317 -89.5q-131 0 -264.5 40t-224.5 109z" />
-<glyph unicode="t" horiz-adv-x="745" d="M47 897v174h143v352h226v-352h233v-174h-233v-598q0 -54 31.5 -81.5t80.5 -27.5q71 0 154 43l49 -178q-155 -71 -282 -71q-113 0 -186 60.5t-73 182.5v670h-143z" />
-<glyph unicode="u" horiz-adv-x="1253" d="M123 416v655h225v-610q0 -289 203 -289q99 0 185 60.5t132 170.5v668h226v-805q0 -39 14.5 -55.5t50.5 -17.5v-193q-61 -10 -110 -10q-129 9 -144 116l-4 111q-71 -116 -185.5 -176.5t-254.5 -60.5q-166 0 -252 110.5t-86 325.5z" />
-<glyph unicode="v" horiz-adv-x="1103" d="M20 1071h234l305 -881l309 881h213l-409 -1071h-242z" />
-<glyph unicode="w" horiz-adv-x="1708" d="M18 1071h213l347 -854l155 397l-186 455h184l123 -336l123 336h184l-184 -455l156 -397l344 854h215l-453 -1071h-184l-201 498l-199 -498h-186z" />
-<glyph unicode="x" horiz-adv-x="1060" d="M12 0l396 535l-392 536h234l262 -366l18 -35l19 35l262 366h233l-391 -536l396 -535h-236l-264 365l-19 32l-16 -32l-266 -365h-236z" />
-<glyph unicode="y" horiz-adv-x="1114" d="M10 1071h232l331 -872l295 872h213l-489 -1319q-40 -108 -121.5 -162.5t-191.5 -54.5q-59 0 -115 16v195q46 -10 98 -10q40 0 62 13.5t52.5 70.5t72.5 180z" />
-<glyph unicode="z" horiz-adv-x="1001" d="M53 0v141l643 770h-622v160h860v-141l-639 -770h645v-160h-887z" />
-<glyph unicode="{" horiz-adv-x="587" d="M90 659v160q40 0 67 41.5t27 83.5v510q0 33 15.5 47.5t31.5 14.5h271v-183h-113v-459q0 -78 -65 -137q30 -27 47.5 -64.5t17.5 -72.5v-481h113v-182h-271q-17 0 -32 14.5t-15 46.5v532q0 49 -27 85t-67 44z" />
-<glyph unicode="|" horiz-adv-x="495" d="M152 -266v1853h192v-1853h-192z" />
-<glyph unicode="}" horiz-adv-x="587" d="M88 -63v182h113v481q0 35 17 72.5t48 64.5q-65 59 -65 137v459h-113v183h270q15 0 31.5 -14.5t16.5 -47.5v-510q0 -42 26.5 -83.5t65.5 -41.5v-160q-40 -8 -66 -44t-26 -85v-532q0 -31 -16 -46t-32 -15h-270z" />
-<glyph unicode="~" horiz-adv-x="1110" d="M119 475q0 15 8 42t28 63.5t48.5 68.5t75 54t102.5 22q47 0 96.5 -17.5t85 -39t81.5 -39t85 -17.5q31 0 57 10t41 24.5t25 30.5t14 26t4 14h127q0 -9 -8 -33t-28 -60.5t-49 -69t-78 -56t-107 -23.5q-48 0 -99 17.5t-87 39t-80.5 39t-81.5 17.5q-30 0 -54 -11.5t-38 -27 t-23.5 -33t-12.5 -28t-3 -13.5h-129z" />
-<glyph unicode="¡" horiz-adv-x="559" d="M168 -8v950h225v-950h-225zM168 1180v280h225v-280h-225z" />
-<glyph unicode="¢" horiz-adv-x="1198" d="M88 528q0 139 56 258t167.5 200.5t259.5 100.5v234h105v-234q146 -4 257.5 -72.5t176.5 -191.5l-219 -69q-34 62 -90.5 96t-124.5 39v-711q71 8 137 47t84 94l221 -65q-36 -86 -116 -150.5t-165 -94t-161 -29.5v-226h-105v228q-137 11 -249.5 93t-173 202.5t-60.5 250.5z M319 528q0 -121 70.5 -217.5t181.5 -122.5v693q-115 -18 -183.5 -121t-68.5 -232z" />
-<glyph unicode="£" horiz-adv-x="1089" d="M106 145q120 106 176 203.5t56 196.5q0 21 -4 57h-221v172h163q-6 13 -38.5 76.5t-43.5 89t-24.5 74.5t-13.5 92q0 149 118.5 253.5t286.5 104.5q118 0 226.5 -57.5t179.5 -157.5l-123 -139q-49 76 -129 123t-158 47q-85 0 -141 -56t-56 -139q0 -47 17.5 -94t54 -115.5 t51.5 -101.5h373v-172h-326q5 -40 5 -47q0 -97 -43 -183.5t-146 -195.5q90 23 154 23q53 0 144.5 -18.5t137.5 -18.5q64 0 164 35l55 -168q-110 -60 -231 -60q-61 0 -180 28t-184 28q-115 0 -246 -41z" />
-<glyph unicode="¥" horiz-adv-x="1433" d="M61 1454h252l402 -729l405 729h252l-391 -657h158v-150h-238l-72 -127v-59h312v-150h-312v-311h-231v311h-307v150h307v63l-68 123h-239v150h162z" />
-<glyph unicode="¦" horiz-adv-x="503" d="M156 -266v817h192v-817h-192zM156 770v817h192v-817h-192z" />
-<glyph unicode="§" horiz-adv-x="1075" d="M92 1090q0 155 125.5 264.5t294.5 109.5q81 0 149.5 -21t119 -58.5t83.5 -72t64 -79.5l-174 -82q-31 55 -92.5 84t-135.5 29q-86 0 -146.5 -47.5t-60.5 -124.5q0 -85 54.5 -119.5t152.5 -36.5q63 -1 122 -12.5t116 -36.5t99 -62.5t67.5 -95t25.5 -129.5q0 -55 -14.5 -102 t-34.5 -72q80 -64 80 -211q0 -81 -28 -148.5t-73 -112t-103.5 -76t-118 -45t-117.5 -13.5q-73 0 -142.5 19.5t-124 52.5t-93 64.5t-70.5 66.5l145 139q124 -127 275 -127q87 0 152 46.5t65 125.5q0 34 -12.5 59t-30.5 39t-47 23t-52.5 12.5t-56.5 5.5q-194 12 -305 104.5 t-111 247.5q0 95 45 160q-38 33 -65 94.5t-27 137.5zM358 670q0 -55 24.5 -90t65.5 -49t83 -20t91 -12t74 -16q21 17 34 48.5t13 64.5q0 42 -19.5 74.5t-51 49.5t-66.5 25.5t-71 8.5q-90 0 -136 22q-41 -38 -41 -106z" />
-<glyph unicode="¨" horiz-adv-x="841" d="M145 1260v225h189v-225h-189zM508 1260v225h188v-225h-188z" />
-<glyph unicode="©" horiz-adv-x="1722" d="M96 727q0 156 58 293t158 234.5t241.5 153.5t302.5 56q164 0 307.5 -56t245.5 -153.5t160.5 -234.5t58.5 -293q0 -157 -58.5 -294.5t-160.5 -235.5t-245.5 -154.5t-307.5 -56.5q-161 0 -302.5 56.5t-241.5 154.5t-158 235.5t-58 294.5zM190 725q0 -181 86.5 -330 t239.5 -234t340 -85q189 0 343 81t243.5 229.5t89.5 336.5q0 137 -51.5 258t-140.5 207t-214.5 136t-269.5 50q-140 0 -263.5 -50t-212 -136t-139.5 -206.5t-51 -256.5zM371 727q0 93 31.5 178.5t91 154.5t156 110.5t216.5 41.5q152 0 265.5 -66t166.5 -183l-219 -70 q-22 46 -61 75.5t-76 39.5t-76 10q-123 0 -193.5 -85.5t-70.5 -205.5q0 -131 82 -211t184 -80q67 0 129.5 34.5t92.5 94.5l217 -65q-44 -103 -161 -179.5t-272 -76.5q-216 0 -359.5 136.5t-143.5 346.5z" />
-<glyph unicode="ª" horiz-adv-x="901" d="M88 930q0 104 85.5 169.5t219.5 65.5q107 0 185 -32v45q0 76 -43.5 117.5t-126.5 41.5q-104 0 -228 -82l-53 109q143 94 297 94t240 -78t86 -223v-242q0 -28 10.5 -40t36.5 -13v-149q-46 -8 -66 -8q-113 0 -125 86l-2 43q-104 -134 -272 -134q-103 0 -173.5 66t-70.5 164 zM248 944q0 -50 38 -83.5t95 -33.5q73 0 135 39t62 82v88q-68 29 -156 29q-77 0 -125.5 -33.5t-48.5 -87.5z" />
-<glyph unicode="«" horiz-adv-x="1275" d="M80 469v113l530 379v-187l-350 -244l350 -235v-184zM625 469v113l528 379v-187l-348 -244l348 -235v-184z" />
-<glyph unicode="¬" horiz-adv-x="1241" d="M141 590v203h963v-562h-193v359h-770z" />
-<glyph unicode="­" horiz-adv-x="1210" d="M123 459v203h962v-203h-962z" />
-<glyph unicode="®" horiz-adv-x="1722" d="M96 727q0 156 57.5 293t158 234.5t242.5 153.5t304 56q163 0 306 -56t244.5 -153.5t160.5 -234.5t59 -293q0 -157 -59 -294.5t-160.5 -235.5t-244.5 -154.5t-306 -56.5q-217 0 -391.5 96.5t-272.5 266t-98 378.5zM197 727q0 -183 84.5 -332t236.5 -235t342 -86 q140 0 263 48t212.5 132.5t141 206.5t51.5 264q0 181 -86 329.5t-239.5 234t-342.5 85.5q-190 0 -342 -85.5t-236.5 -233t-84.5 -328.5zM535 272v910h397q79 0 145 -44t101.5 -112t35.5 -141q0 -91 -50.5 -166t-131.5 -101l217 -346h-182l-199 318h-170v-318h-163zM698 731 h222q62 0 97.5 42t35.5 112t-39.5 110.5t-98.5 40.5h-217v-305z" />
-<glyph unicode="¯" horiz-adv-x="841" d="M119 1319v143h606v-143h-606z" />
-<glyph unicode="°" horiz-adv-x="573" d="M90 1292q0 82 56 136.5t139 54.5q86 0 141 -54.5t55 -136.5q0 -89 -54.5 -144.5t-141.5 -55.5q-83 0 -139 57t-56 143zM205 1288q0 -36 24 -59t56 -23q34 0 58 23.5t24 58.5q0 34 -23.5 57t-58.5 23q-32 0 -56 -23t-24 -57z" />
-<glyph unicode="±" horiz-adv-x="958" d="M129 82v182h700v-182h-700zM129 672v182h248v268h205v-268h247v-182h-247v-271h-205v271h-248z" />
-<glyph unicode="²" horiz-adv-x="833" d="M68 641q0 162 59.5 248.5t204.5 144.5q18 7 54.5 21t56 22t49.5 22t47 26.5t34.5 29.5t25 37.5t7.5 44.5q0 58 -49 92.5t-139 34.5q-150 0 -254 -104l-88 98q34 47 130.5 93t231.5 46q155 0 238.5 -70.5t83.5 -191.5q0 -50 -19.5 -91.5t-45.5 -67.5t-68.5 -49.5 t-71.5 -34.5t-72 -25q-196 -62 -196 -193h454v-133h-673z" />
-<glyph unicode="³" horiz-adv-x="823" d="M66 797l75 98q7 -42 77.5 -85.5t172.5 -43.5q94 0 156.5 33t62.5 88q0 62 -80.5 94.5t-222.5 32.5h-49v125h47q130 0 203.5 29t73.5 87q0 54 -57 84.5t-134 30.5q-154 0 -233 -106l-88 108q40 58 129 91.5t192 33.5q145 0 241.5 -66.5t96.5 -166.5q0 -70 -50.5 -117 t-141.5 -64q97 -13 155 -73.5t58 -143.5q0 -114 -104 -176.5t-253 -62.5q-128 0 -216 45.5t-111 124.5z" />
-<glyph unicode="´" horiz-adv-x="497" d="M96 1270l117 225h215l-184 -270z" />
-<glyph unicode="µ" horiz-adv-x="1275" d="M152 -434v1505h225v-610q0 -289 209 -289q95 0 180 61t131 170v668h225v-805q0 -38 15.5 -54.5t50.5 -18.5v-193q-61 -10 -111 -10q-62 5 -99 34.5t-44 81.5l-4 111q-44 -93 -146.5 -165t-212.5 -72q-81 0 -134.5 40.5t-74.5 98.5l19 -553h-229z" />
-<glyph unicode="¶" horiz-adv-x="1296" d="M74 944q0 242 151 376t426 134h563v-172h-143v-1446h-192v606h-123v-606h-193v606q-224 3 -356.5 139t-132.5 363zM262 948q0 -151 85.5 -237.5t215.5 -96.5v668q-143 -3 -222 -93t-79 -241zM756 614h123v668h-123v-668z" />
-<glyph unicode="·" horiz-adv-x="434" d="M123 498v280h186v-280h-186z" />
-<glyph unicode="¸" horiz-adv-x="634" d="M45 -346l47 88q28 -15 79 -28t101 -13q117 0 117 70q0 69 -106 69q-80 0 -164 -24l123 233l92 -31l-72 -110q27 8 70 8q76 0 122 -34.5t46 -102.5q0 -76 -63 -121t-181 -45q-102 0 -211 41z" />
-<glyph unicode="¹" horiz-adv-x="591" d="M66 1245v135q24 0 52.5 11.5t52.5 28t44.5 33.5t32 29.5t12.5 14.5h139v-721h148v-135h-449v135h162v572q-25 -32 -86.5 -67.5t-107.5 -35.5z" />
-<glyph unicode="º" horiz-adv-x="911" d="M78 1077q0 160 104.5 270.5t272.5 110.5q169 0 272.5 -110.5t103.5 -270.5q0 -157 -103.5 -267t-272.5 -110q-168 0 -272.5 110.5t-104.5 266.5zM252 1077q0 -98 59 -163.5t144 -65.5t143.5 66t58.5 165t-58.5 164.5t-143.5 65.5t-144 -66.5t-59 -165.5z" />
-<glyph unicode="»" horiz-adv-x="1275" d="M123 111v184l348 235l-348 244v187l528 -379v-113zM666 111v184l348 235l-348 244v187l528 -379v-113z" />
-<glyph unicode="¼" horiz-adv-x="1832" d="M88 1245v135q38 0 86.5 28.5t77.5 55.5t31 33h139v-721h147v-135h-448v135h162v572q-25 -32 -87 -67.5t-108 -35.5zM330 82l581 682l535 702l106 -92l-573 -674l-545 -712zM1038 199v131l500 518h94v-516h123v-133h-123v-199h-135v199h-459zM1176 332h325v342z" />
-<glyph unicode="½" horiz-adv-x="1896" d="M90 1245v135q38 0 86.5 28.5t77.5 55.5t31 33h139v-721h147v-135h-448v135h162v572q-25 -32 -87 -67.5t-108 -35.5zM256 82l582 682l534 702l107 -92l-574 -674l-545 -712zM1149 0q0 161 58 249t196 146q13 6 58.5 23.5t63 25.5t51.5 26.5t48 34t26.5 39.5t12.5 52 q0 59 -46.5 93t-133.5 34q-144 0 -242 -107l-84 101q35 47 126.5 93t219.5 46q148 0 226.5 -70t78.5 -192q0 -50 -18 -91.5t-43 -67.5t-64.5 -49t-67.5 -34t-67 -24q-188 -63 -188 -195h450v-133h-661z" />
-<glyph unicode="¾" horiz-adv-x="1861" d="M86 797l76 98q7 -42 77.5 -85.5t172.5 -43.5q94 0 156.5 33t62.5 88q0 62 -80.5 94.5t-222.5 32.5h-49v125h47q130 0 203 29t73 87q0 54 -57 84.5t-133 30.5q-155 0 -234 -106l-88 108q40 58 129.5 91.5t192.5 33.5q145 0 241.5 -66.5t96.5 -166.5q0 -70 -50.5 -117 t-142.5 -64q97 -13 155 -73.5t58 -143.5q0 -114 -103.5 -176.5t-252.5 -62.5q-128 0 -216.5 45.5t-111.5 124.5zM397 82l582 682l534 702l107 -92l-573 -674l-545 -712zM1059 199v131l500 518h94v-516h123v-133h-123v-199h-135v199h-459zM1196 332h326v342z" />
-<glyph unicode="¿" horiz-adv-x="980" d="M72 -37q0 132 60.5 211.5t176.5 138.5q42 21 64 33.5t56 38t51.5 50.5t31.5 64t14 85h187q0 -113 -38 -193t-132 -137q-10 -6 -50.5 -29t-62 -36t-57 -41t-54.5 -53t-34 -62t-15 -78q0 -95 66 -151t158 -56q90 0 161.5 52t112.5 128l150 -100q-54 -123 -171.5 -193.5 t-257.5 -70.5q-80 0 -152.5 24t-132.5 70.5t-96 125t-36 179.5zM520 778v258h189v-258h-189z" />
-<glyph unicode="À" d="M14 0l586 1454h188l584 -1454h-244l-155 395h-561l-152 -395h-246zM453 565h475l-234 633zM457 1878h215l116 -225l-143 -45z" />
-<glyph unicode="Á" d="M14 0l586 1454h188l584 -1454h-244l-155 395h-561l-152 -395h-246zM453 565h475l-234 633zM598 1651l117 225h215l-185 -270z" />
-<glyph unicode="Â" d="M14 0l586 1454h188l584 -1454h-244l-155 395h-561l-152 -395h-246zM401 1681l213 195h162l213 -195l-121 -57l-174 129l-174 -129zM453 565h475l-234 633z" />
-<glyph unicode="Ã" d="M14 0l586 1454h188l584 -1454h-244l-155 395h-561l-152 -395h-246zM330 1630q0 15 6 41t22.5 60.5t40 64t63 50t87.5 20.5q51 0 97 -22.5t88 -45t83 -22.5q28 0 49.5 10t33 23t18.5 28.5t8.5 24.5t1.5 14h129q0 -13 -6.5 -38t-24 -60t-42.5 -65t-67.5 -51.5t-93.5 -21.5 q-42 0 -82 14t-65 30.5t-57.5 30.5t-61.5 14q-32 0 -54 -13.5t-31 -33.5t-12 -32.5t-3 -19.5h-127zM453 565h475l-234 633z" />
-<glyph unicode="Ä" d="M14 0l586 1454h188l584 -1454h-244l-155 395h-561l-152 -395h-246zM420 1642v226h188v-226h-188zM453 565h475l-234 633zM782 1642v226h189v-226h-189z" />
-<glyph unicode="Å" d="M14 0l586 1454h188l584 -1454h-244l-155 395h-561l-152 -395h-246zM453 565h475l-234 633zM512 1726q0 69 49.5 109.5t130.5 40.5q83 0 132.5 -40t49.5 -110q0 -69 -50 -109t-132 -40q-80 0 -130 40.5t-50 108.5zM610 1726q0 -31 23.5 -53t58.5 -22q34 0 59 21.5t25 53.5 q0 33 -24 54.5t-60 21.5q-34 0 -58 -21.5t-24 -54.5z" />
-<glyph unicode="Æ" horiz-adv-x="2017" d="M-18 0l917 1454h1018v-203h-727v-409h616v-203h-616v-436h745v-203h-974v395h-490l-242 -395h-247zM571 600h373v590z" />
-<glyph unicode="Ç" horiz-adv-x="1388" d="M76 737q0 106 29.5 210.5t89 197t141.5 163.5t194.5 112.5t239.5 41.5q188 0 331 -86.5t214 -230.5l-180 -121q-28 63 -71.5 109.5t-94.5 72t-102 37.5t-105 12q-86 0 -160.5 -30.5t-127.5 -81.5t-91 -119t-56 -143t-18 -152q0 -141 58.5 -263t165 -196.5t235.5 -74.5 q115 0 221 60t158 179l190 -108q-59 -142 -203.5 -231t-310.5 -103l-53 -84q27 8 70 8q76 0 122 -34.5t46 -102.5q0 -76 -63 -121t-181 -45q-102 0 -211 41l47 88q28 -15 79 -28t101 -13q117 0 117 70q0 69 -106 69q-80 0 -164 -24l90 174q-111 7 -212 52.5t-178 119 t-134 166t-87 198t-30 211.5z" />
-<glyph unicode="È" horiz-adv-x="1243" d="M164 0v1454h979v-203h-750v-413h649v-191h-649v-444h768v-203h-997zM438 1878h215l117 -225l-143 -45z" />
-<glyph unicode="É" horiz-adv-x="1243" d="M164 0v1454h979v-203h-750v-413h649v-191h-649v-444h768v-203h-997zM580 1651l116 225h215l-184 -270z" />
-<glyph unicode="Ê" horiz-adv-x="1243" d="M164 0v1454h979v-203h-750v-413h649v-191h-649v-444h768v-203h-997zM383 1681l213 195h162l213 -195l-121 -57l-174 129l-174 -129z" />
-<glyph unicode="Ë" horiz-adv-x="1243" d="M164 0v1454h979v-203h-750v-413h649v-191h-649v-444h768v-203h-997zM401 1642v226h189v-226h-189zM764 1642v226h188v-226h-188z" />
-<glyph unicode="Ì" horiz-adv-x="557" d="M41 1878h215l117 -225l-144 -45zM164 0v1452h229v-1452h-229z" />
-<glyph unicode="Í" horiz-adv-x="557" d="M164 0v1452h229v-1452h-229zM182 1651l117 225h215l-184 -270z" />
-<glyph unicode="Î" horiz-adv-x="557" d="M-14 1681l213 195h161l213 -195l-120 -57l-174 129l-175 -129zM164 0v1452h229v-1452h-229z" />
-<glyph unicode="Ï" horiz-adv-x="557" d="M4 1642v226h189v-226h-189zM164 0v1452h229v-1452h-229zM367 1642v226h188v-226h-188z" />
-<glyph unicode="Ð" horiz-adv-x="1480" d="M66 645v172h108v637h516q171 0 307.5 -56.5t223.5 -156t132.5 -230t45.5 -282.5q0 -330 -193.5 -529.5t-515.5 -199.5h-516v645h-108zM403 203h287q150 0 258.5 69.5t162.5 187.5t54 269q0 233 -126.5 377.5t-348.5 144.5h-287v-434h310v-172h-310v-442z" />
-<glyph unicode="Ñ" horiz-adv-x="1570" d="M164 0v1454h180l832 -1048v1046h231v-1452h-190l-824 1024v-1024h-229zM422 1628q0 15 6 41t22.5 60.5t40 64t63 50t87.5 20.5q51 0 97 -22.5t88 -45t83 -22.5q28 0 49.5 10t33 23t18.5 28.5t8.5 24.5t1.5 14h129q0 -13 -6.5 -38t-24 -60t-42.5 -65t-67.5 -51.5 t-93.5 -21.5q-53 0 -101 22t-88.5 44t-76.5 22q-32 0 -54 -13.5t-31 -33t-12 -32t-3 -19.5h-127z" />
-<glyph unicode="Ò" horiz-adv-x="1527" d="M76 727q0 144 53 278.5t143.5 235.5t220.5 162t275 61q149 0 279 -64t217.5 -168.5t137.5 -237t50 -269.5q0 -144 -52.5 -278t-143 -235t-220 -161.5t-274.5 -60.5q-120 0 -228.5 40.5t-190.5 111.5t-143 164t-92.5 201.5t-31.5 219.5zM309 727q0 -138 54.5 -258 t160 -196t240.5 -76q104 0 191.5 46t144 121.5t88 169.5t31.5 193q0 82 -20.5 160.5t-61 144.5t-95 116t-126.5 78.5t-152 28.5q-103 0 -190.5 -45.5t-144.5 -120.5t-88.5 -169t-31.5 -193zM530 1878h215l117 -225l-143 -45z" />
-<glyph unicode="Ó" horiz-adv-x="1527" d="M76 727q0 144 53 278.5t143.5 235.5t220.5 162t275 61q149 0 279 -64t217.5 -168.5t137.5 -237t50 -269.5q0 -144 -52.5 -278t-143 -235t-220 -161.5t-274.5 -60.5q-120 0 -228.5 40.5t-190.5 111.5t-143 164t-92.5 201.5t-31.5 219.5zM309 727q0 -138 54.5 -258 t160 -196t240.5 -76q104 0 191.5 46t144 121.5t88 169.5t31.5 193q0 82 -20.5 160.5t-61 144.5t-95 116t-126.5 78.5t-152 28.5q-103 0 -190.5 -45.5t-144.5 -120.5t-88.5 -169t-31.5 -193zM670 1651l116 225h215l-184 -270z" />
-<glyph unicode="Ô" horiz-adv-x="1527" d="M76 727q0 144 53 278.5t143.5 235.5t220.5 162t275 61q149 0 279 -64t217.5 -168.5t137.5 -237t50 -269.5q0 -144 -52.5 -278t-143 -235t-220 -161.5t-274.5 -60.5q-120 0 -228.5 40.5t-190.5 111.5t-143 164t-92.5 201.5t-31.5 219.5zM309 727q0 -138 54.5 -258 t160 -196t240.5 -76q104 0 191.5 46t144 121.5t88 169.5t31.5 193q0 82 -20.5 160.5t-61 144.5t-95 116t-126.5 78.5t-152 28.5q-103 0 -190.5 -45.5t-144.5 -120.5t-88.5 -169t-31.5 -193zM473 1681l213 195h162l213 -195l-121 -57l-174 129l-174 -129z" />
-<glyph unicode="Õ" horiz-adv-x="1527" d="M76 727q0 144 53 278.5t143.5 235.5t220.5 162t275 61q149 0 279 -64t217.5 -168.5t137.5 -237t50 -269.5q0 -144 -52.5 -278t-143 -235t-220 -161.5t-274.5 -60.5q-120 0 -228.5 40.5t-190.5 111.5t-143 164t-92.5 201.5t-31.5 219.5zM309 727q0 -138 54.5 -258 t160 -196t240.5 -76q104 0 191.5 46t144 121.5t88 169.5t31.5 193q0 82 -20.5 160.5t-61 144.5t-95 116t-126.5 78.5t-152 28.5q-103 0 -190.5 -45.5t-144.5 -120.5t-88.5 -169t-31.5 -193zM401 1630q0 15 6 41t22.5 60.5t40 64t63.5 50t88 20.5q51 0 97 -22.5t88 -45 t83 -22.5q28 0 49.5 10t32.5 23t18 28.5t8.5 24.5t1.5 14h129q0 -13 -6.5 -38t-23.5 -60t-42 -65t-67.5 -51.5t-93.5 -21.5q-42 0 -82 14t-65 30.5t-57.5 30.5t-61.5 14q-26 0 -45.5 -9.5t-30 -22.5t-16.5 -29t-7.5 -24.5t-1.5 -13.5h-127z" />
-<glyph unicode="Ö" horiz-adv-x="1527" d="M76 727q0 144 53 278.5t143.5 235.5t220.5 162t275 61q149 0 279 -64t217.5 -168.5t137.5 -237t50 -269.5q0 -144 -52.5 -278t-143 -235t-220 -161.5t-274.5 -60.5q-120 0 -228.5 40.5t-190.5 111.5t-143 164t-92.5 201.5t-31.5 219.5zM309 727q0 -138 54.5 -258 t160 -196t240.5 -76q104 0 191.5 46t144 121.5t88 169.5t31.5 193q0 82 -20.5 160.5t-61 144.5t-95 116t-126.5 78.5t-152 28.5q-103 0 -190.5 -45.5t-144.5 -120.5t-88.5 -169t-31.5 -193zM492 1642v226h188v-226h-188zM854 1642v226h188v-226h-188z" />
-<glyph unicode="×" horiz-adv-x="966" d="M117 338l223 223l-217 219l143 140l217 -218l217 220l142 -142l-217 -219l225 -225l-143 -139l-224 223l-225 -223z" />
-<glyph unicode="Ø" horiz-adv-x="1529" d="M76 727q0 144 53 278.5t143.5 235.5t220.5 162t275 61q168 0 317 -86l52 76h252l-142 -205q97 -106 151 -244.5t54 -279.5q0 -144 -52.5 -278t-143 -235t-220 -161.5t-274.5 -60.5q-174 0 -320 84l-51 -74h-250l138 203q-97 104 -150 241t-53 283zM309 727 q0 -188 99 -336l557 813q-91 51 -201 51q-103 0 -190.5 -45.5t-144.5 -120.5t-88.5 -169t-31.5 -193zM561 248q91 -51 203 -51q104 0 191.5 46t144 121.5t88 169.5t31.5 193q0 183 -101 334z" />
-<glyph unicode="Ù" horiz-adv-x="1536" d="M141 717v737h230v-737q0 -83 12 -156.5t41.5 -141.5t73.5 -116t113 -77t157 -29q89 0 158.5 29.5t113.5 78.5t73 117t40.5 140.5t11.5 154.5v737h232v-737q0 -153 -36 -281.5t-109.5 -230t-197 -158.5t-286.5 -57q-135 0 -242.5 40t-178.5 107t-118 161.5t-67.5 198 t-20.5 220.5zM532 1878h216l116 -225l-143 -45z" />
-<glyph unicode="Ú" horiz-adv-x="1536" d="M141 717v737h230v-737q0 -83 12 -156.5t41.5 -141.5t73.5 -116t113 -77t157 -29q89 0 158.5 29.5t113.5 78.5t73 117t40.5 140.5t11.5 154.5v737h232v-737q0 -153 -36 -281.5t-109.5 -230t-197 -158.5t-286.5 -57q-135 0 -242.5 40t-178.5 107t-118 161.5t-67.5 198 t-20.5 220.5zM672 1651l116 225h216l-185 -270z" />
-<glyph unicode="Û" horiz-adv-x="1536" d="M141 717v737h230v-737q0 -83 12 -156.5t41.5 -141.5t73.5 -116t113 -77t157 -29q89 0 158.5 29.5t113.5 78.5t73 117t40.5 140.5t11.5 154.5v737h232v-737q0 -153 -36 -281.5t-109.5 -230t-197 -158.5t-286.5 -57q-135 0 -242.5 40t-178.5 107t-118 161.5t-67.5 198 t-20.5 220.5zM475 1681l213 195h162l213 -195l-121 -57l-174 129l-174 -129z" />
-<glyph unicode="Ü" horiz-adv-x="1536" d="M141 717v737h230v-737q0 -83 12 -156.5t41.5 -141.5t73.5 -116t113 -77t157 -29q89 0 158.5 29.5t113.5 78.5t73 117t40.5 140.5t11.5 154.5v737h232v-737q0 -153 -36 -281.5t-109.5 -230t-197 -158.5t-286.5 -57q-135 0 -242.5 40t-178.5 107t-118 161.5t-67.5 198 t-20.5 220.5zM494 1642v226h188v-226h-188zM856 1642v226h188v-226h-188z" />
-<glyph unicode="Ý" horiz-adv-x="1310" d="M0 1454h252l403 -729l406 729h250l-541 -934v-520h-231v524zM557 1651l117 225h215l-184 -270z" />
-<glyph unicode="Þ" horiz-adv-x="1241" d="M164 0v1454h229v-272h346q126 0 231.5 -70t162.5 -178t57 -225q0 -124 -54 -232t-156 -176t-230 -68h-357v-233h-229zM393 438h346q96 0 157.5 80t61.5 191q0 113 -68 191.5t-163 78.5h-334v-541z" />
-<glyph unicode="ß" horiz-adv-x="1136" d="M131 0v1065q0 173 124.5 285t315.5 112q170 0 282 -92t112 -242q0 -105 -56.5 -192.5t-136.5 -112.5q138 -33 217.5 -140t79.5 -255q0 -108 -44 -192t-123 -136.5t-181.5 -80.5t-224.5 -31v207q156 3 248 66.5t92 189.5q0 117 -77.5 186.5t-197.5 69.5h-41v204h39 q86 0 138.5 50.5t52.5 132.5q0 88 -57.5 132t-135.5 44q-106 0 -158.5 -71.5t-52.5 -172.5v-1026h-215z" />
-<glyph unicode="à" horiz-adv-x="1161" d="M57 315q0 150 126.5 244t326.5 94q160 0 283 -49v74q0 119 -69 185.5t-194 66.5q-160 0 -340 -123l-69 143q208 140 430 140q221 0 344 -114.5t123 -322.5v-387q0 -39 14 -55.5t49 -17.5v-193q-54 -10 -110 -10q-126 9 -142 116l-6 68q-72 -93 -177 -143.5t-226 -50.5 q-155 0 -259 96t-104 239zM270 334q0 -80 60.5 -134.5t150.5 -54.5q83 0 156.5 30.5t112.5 82.5q43 37 43 78v141q-123 47 -248 47q-121 0 -198 -53t-77 -137zM313 1495h215l117 -225l-143 -45z" />
-<glyph unicode="á" horiz-adv-x="1161" d="M57 315q0 150 126.5 244t326.5 94q160 0 283 -49v74q0 119 -69 185.5t-194 66.5q-160 0 -340 -123l-69 143q208 140 430 140q221 0 344 -114.5t123 -322.5v-387q0 -39 14 -55.5t49 -17.5v-193q-54 -10 -110 -10q-126 9 -142 116l-6 68q-72 -93 -177 -143.5t-226 -50.5 q-155 0 -259 96t-104 239zM270 334q0 -80 60.5 -134.5t150.5 -54.5q83 0 156.5 30.5t112.5 82.5q43 37 43 78v141q-123 47 -248 47q-121 0 -198 -53t-77 -137zM455 1270l116 225h215l-184 -270z" />
-<glyph unicode="â" horiz-adv-x="1161" d="M57 315q0 150 126.5 244t326.5 94q160 0 283 -49v74q0 119 -69 185.5t-194 66.5q-160 0 -340 -123l-69 143q208 140 430 140q221 0 344 -114.5t123 -322.5v-387q0 -39 14 -55.5t49 -17.5v-193q-54 -10 -110 -10q-126 9 -142 116l-6 68q-72 -93 -177 -143.5t-226 -50.5 q-155 0 -259 96t-104 239zM258 1300l213 195h162l213 -195l-121 -57l-174 129l-174 -129zM270 334q0 -80 60.5 -134.5t150.5 -54.5q83 0 156.5 30.5t112.5 82.5q43 37 43 78v141q-123 47 -248 47q-121 0 -198 -53t-77 -137z" />
-<glyph unicode="ã" horiz-adv-x="1161" d="M57 315q0 150 126.5 244t326.5 94q160 0 283 -49v74q0 119 -69 185.5t-194 66.5q-160 0 -340 -123l-69 143q208 140 430 140q221 0 344 -114.5t123 -322.5v-387q0 -39 14 -55.5t49 -17.5v-193q-54 -10 -110 -10q-126 9 -142 116l-6 68q-72 -93 -177 -143.5t-226 -50.5 q-155 0 -259 96t-104 239zM186 1249q0 15 6 41t22.5 60.5t40 64t63.5 50t88 20.5q51 0 97 -22.5t88 -45t83 -22.5q28 0 49.5 10t32.5 23t18 28.5t8.5 24.5t1.5 14h129q0 -13 -6.5 -38t-23.5 -59.5t-42 -65t-67.5 -51.5t-93.5 -21q-53 0 -101 22t-88.5 44t-76.5 22 q-26 0 -45.5 -9.5t-30 -22.5t-16.5 -29t-7.5 -24.5t-1.5 -13.5h-127zM270 334q0 -80 60.5 -134.5t150.5 -54.5q83 0 156.5 30.5t112.5 82.5q43 37 43 78v141q-123 47 -248 47q-121 0 -198 -53t-77 -137z" />
-<glyph unicode="ä" horiz-adv-x="1161" d="M57 315q0 150 126.5 244t326.5 94q160 0 283 -49v74q0 119 -69 185.5t-194 66.5q-160 0 -340 -123l-69 143q208 140 430 140q221 0 344 -114.5t123 -322.5v-387q0 -39 14 -55.5t49 -17.5v-193q-54 -10 -110 -10q-126 9 -142 116l-6 68q-72 -93 -177 -143.5t-226 -50.5 q-155 0 -259 96t-104 239zM270 334q0 -80 60.5 -134.5t150.5 -54.5q83 0 156.5 30.5t112.5 82.5q43 37 43 78v141q-123 47 -248 47q-121 0 -198 -53t-77 -137zM276 1260v225h189v-225h-189zM639 1260v225h188v-225h-188z" />
-<glyph unicode="å" horiz-adv-x="1161" d="M57 315q0 150 126.5 244t326.5 94q160 0 283 -49v74q0 119 -69 185.5t-194 66.5q-160 0 -340 -123l-69 143q208 140 430 140q221 0 344 -114.5t123 -322.5v-387q0 -39 14 -55.5t49 -17.5v-193q-54 -10 -110 -10q-126 9 -142 116l-6 68q-72 -93 -177 -143.5t-226 -50.5 q-155 0 -259 96t-104 239zM270 334q0 -80 60.5 -134.5t150.5 -54.5q83 0 156.5 30.5t112.5 82.5q43 37 43 78v141q-123 47 -248 47q-121 0 -198 -53t-77 -137zM369 1346q0 69 49.5 109t130.5 40q83 0 132.5 -39.5t49.5 -109.5q0 -69 -50 -109.5t-132 -40.5q-80 0 -130 41 t-50 109zM467 1346q0 -31 23.5 -53.5t58.5 -22.5q34 0 59 22t25 54q0 33 -24 54t-60 21q-35 0 -58.5 -21t-23.5 -54z" />
-<glyph unicode="æ" horiz-adv-x="1916" d="M59 315q0 150 126.5 244t326.5 94q145 0 254 -41q9 83 22 115q-12 98 -78 150.5t-180 52.5q-154 0 -337 -123l-72 143q215 140 432 140q126 0 221.5 -45.5t151.5 -129.5q70 81 170.5 128t218.5 47q124 0 228.5 -44.5t175 -120t110 -176.5t39.5 -214q0 -38 -4 -74h-875 q10 -139 107.5 -227.5t230.5 -88.5q92 0 172.5 45.5t110.5 118.5l192 -55q-57 -123 -186 -198.5t-295 -75.5q-146 0 -263.5 60.5t-191.5 166.5q-66 -113 -191 -170t-255 -57q-153 0 -257 96.5t-104 238.5zM272 334q0 -80 61 -134.5t150 -54.5q84 0 157 30.5t114 82.5 q37 30 41 72q-24 46 -29 157q-109 37 -219 37q-122 0 -198.5 -52.5t-76.5 -137.5zM985 604h657q-11 141 -102.5 230.5t-226.5 89.5t-227 -90t-101 -230z" />
-<glyph unicode="ç" horiz-adv-x="1148" d="M68 537q0 113 39.5 213.5t110.5 176t176 119.5t229 44q162 0 282 -72t182 -195l-219 -69q-38 67 -104 105t-146 38q-136 0 -227.5 -101.5t-91.5 -258.5q0 -154 94.5 -259.5t227.5 -105.5q83 0 155.5 42.5t97.5 104.5l222 -65q-48 -111 -158.5 -185t-257.5 -87l-47 -74 q27 8 69 8q76 0 122 -34.5t46 -102.5q0 -76 -62.5 -121t-180.5 -45q-102 0 -211 41l47 88q28 -15 79 -28t101 -13q117 0 117 70q0 69 -107 69q-80 0 -164 -24l86 166q-150 11 -266.5 90t-178.5 200.5t-62 264.5z" />
-<glyph unicode="è" horiz-adv-x="1218" d="M66 532q0 113 40.5 215t111.5 178t176.5 120.5t228.5 44.5t226.5 -45t173 -120.5t108 -174.5t38.5 -207q0 -28 -6 -82h-858q10 -139 103.5 -227.5t220.5 -88.5q92 0 171 45.5t109 118.5l193 -55q-57 -123 -186 -198.5t-295 -75.5q-163 0 -291 76t-196 201t-68 275z M299 616h647q-13 136 -104.5 222t-220.5 86t-220.5 -86.5t-101.5 -221.5zM379 1495h215l117 -225l-144 -45z" />
-<glyph unicode="é" horiz-adv-x="1218" d="M66 532q0 113 40.5 215t111.5 178t176.5 120.5t228.5 44.5t226.5 -45t173 -120.5t108 -174.5t38.5 -207q0 -28 -6 -82h-858q10 -139 103.5 -227.5t220.5 -88.5q92 0 171 45.5t109 118.5l193 -55q-57 -123 -186 -198.5t-295 -75.5q-163 0 -291 76t-196 201t-68 275z M299 616h647q-13 136 -104.5 222t-220.5 86t-220.5 -86.5t-101.5 -221.5zM518 1270l117 225h215l-184 -270z" />
-<glyph unicode="ê" horiz-adv-x="1218" d="M66 532q0 113 40.5 215t111.5 178t176.5 120.5t228.5 44.5t226.5 -45t173 -120.5t108 -174.5t38.5 -207q0 -28 -6 -82h-858q10 -139 103.5 -227.5t220.5 -88.5q92 0 171 45.5t109 118.5l193 -55q-57 -123 -186 -198.5t-295 -75.5q-163 0 -291 76t-196 201t-68 275z M299 616h647q-13 136 -104.5 222t-220.5 86t-220.5 -86.5t-101.5 -221.5zM322 1300l213 195h161l213 -195l-121 -57l-174 129l-174 -129z" />
-<glyph unicode="ë" horiz-adv-x="1218" d="M66 532q0 113 40.5 215t111.5 178t176.5 120.5t228.5 44.5t226.5 -45t173 -120.5t108 -174.5t38.5 -207q0 -28 -6 -82h-858q10 -139 103.5 -227.5t220.5 -88.5q92 0 171 45.5t109 118.5l193 -55q-57 -123 -186 -198.5t-295 -75.5q-163 0 -291 76t-196 201t-68 275z M299 616h647q-13 136 -104.5 222t-220.5 86t-220.5 -86.5t-101.5 -221.5zM340 1260v225h188v-225h-188zM702 1260v225h189v-225h-189z" />
-<glyph unicode="ì" horiz-adv-x="489" d="M8 1495h215l117 -225l-143 -45zM131 0v1071h225v-1071h-225z" />
-<glyph unicode="í" horiz-adv-x="489" d="M131 0v1071h225v-1071h-225zM147 1270l117 225h215l-184 -270z" />
-<glyph unicode="î" horiz-adv-x="489" d="M-49 1300l213 195h162l213 -195l-121 -57l-174 129l-174 -129zM131 0v1071h225v-1071h-225z" />
-<glyph unicode="ï" horiz-adv-x="489" d="M-31 1260v225h189v-225h-189zM131 0v1071h225v-1071h-225zM332 1260v225h188v-225h-188z" />
-<glyph unicode="ð" horiz-adv-x="1247" d="M72 477q0 203 144.5 347.5t350.5 144.5q117 0 217 -52t156 -139q-44 239 -211 420l-207 -119l-65 92l188 109q-122 108 -315 215h301q103 -58 188 -133l168 98l66 -92l-152 -86q136 -150 203 -333t67 -355q0 -140 -43.5 -256.5t-119 -194t-178 -120.5t-218.5 -43 q-149 0 -272.5 65t-195.5 179.5t-72 252.5zM301 477q0 -129 91.5 -217t223.5 -88q137 0 230.5 92.5t93.5 222.5q0 127 -91 213t-224 86q-136 0 -230 -90t-94 -219z" />
-<glyph unicode="ñ" horiz-adv-x="1216" d="M131 0v1071h205v-215q62 108 179 171t257 63q75 0 132 -23t93 -62t58 -96.5t30.5 -119t8.5 -136.5v-653h-226v600q0 289 -190 289q-100 0 -193.5 -72.5t-128.5 -179.5v-637h-225zM266 1249q0 15 6 41t22.5 60.5t40 64t63 50t87.5 20.5q41 0 79 -14t63.5 -31t59.5 -31 t67 -14q28 0 49.5 10t32.5 23t18 28.5t8.5 24.5t1.5 14h129q0 -13 -6.5 -38t-23.5 -59.5t-42 -65t-67.5 -51.5t-93.5 -21q-53 0 -101 22t-88.5 44t-76.5 22q-26 0 -45.5 -9.5t-30 -22.5t-16.5 -29t-7.5 -24.5t-1.5 -13.5h-127z" />
-<glyph unicode="ò" horiz-adv-x="1230" d="M66 535q0 111 40 212t110 177t174.5 121t225.5 45q162 0 289.5 -77t194.5 -203t67 -275t-67 -275t-194.5 -203t-289.5 -77q-123 0 -227.5 45t-174.5 121t-109 177t-39 212zM297 532q0 -154 92.5 -257t226.5 -103t227 105t93 258t-93 257.5t-227 104.5q-133 0 -226 -106 t-93 -259zM381 1495h215l117 -225l-144 -45z" />
-<glyph unicode="ó" horiz-adv-x="1230" d="M66 535q0 111 40 212t110 177t174.5 121t225.5 45q162 0 289.5 -77t194.5 -203t67 -275t-67 -275t-194.5 -203t-289.5 -77q-123 0 -227.5 45t-174.5 121t-109 177t-39 212zM297 532q0 -154 92.5 -257t226.5 -103t227 105t93 258t-93 257.5t-227 104.5q-133 0 -226 -106 t-93 -259zM518 1270l117 225h215l-184 -270z" />
-<glyph unicode="ô" horiz-adv-x="1230" d="M66 535q0 111 40 212t110 177t174.5 121t225.5 45q162 0 289.5 -77t194.5 -203t67 -275t-67 -275t-194.5 -203t-289.5 -77q-123 0 -227.5 45t-174.5 121t-109 177t-39 212zM297 532q0 -154 92.5 -257t226.5 -103t227 105t93 258t-93 257.5t-227 104.5q-133 0 -226 -106 t-93 -259zM322 1300l213 195h161l213 -195l-121 -57l-174 129l-174 -129z" />
-<glyph unicode="õ" horiz-adv-x="1230" d="M66 535q0 111 40 212t110 177t174.5 121t225.5 45q162 0 289.5 -77t194.5 -203t67 -275t-67 -275t-194.5 -203t-289.5 -77q-123 0 -227.5 45t-174.5 121t-109 177t-39 212zM252 1249q0 15 6 41t22.5 60.5t40 64t63 50t87.5 20.5q51 0 97 -22.5t88 -45t83 -22.5 q28 0 49.5 10t33 23t18.5 28.5t8.5 24.5t1.5 14h129q0 -13 -6.5 -38t-24 -59.5t-42.5 -65t-67.5 -51.5t-93.5 -21q-53 0 -101 22t-88.5 44t-76.5 22q-32 0 -54 -13.5t-31 -33.5t-12 -32.5t-3 -19.5h-127zM297 532q0 -154 92.5 -257t226.5 -103t227 105t93 258t-93 257.5 t-227 104.5q-133 0 -226 -106t-93 -259z" />
-<glyph unicode="ö" horiz-adv-x="1230" d="M66 535q0 111 40 212t110 177t174.5 121t225.5 45q162 0 289.5 -77t194.5 -203t67 -275t-67 -275t-194.5 -203t-289.5 -77q-123 0 -227.5 45t-174.5 121t-109 177t-39 212zM297 532q0 -154 92.5 -257t226.5 -103t227 105t93 258t-93 257.5t-227 104.5q-133 0 -226 -106 t-93 -259zM340 1260v225h188v-225h-188zM702 1260v225h189v-225h-189z" />
-<glyph unicode="÷" horiz-adv-x="1060" d="M117 508v180h827v-180h-827zM436 119v233h191v-233h-191zM436 842v235h191v-235h-191z" />
-<glyph unicode="ø" horiz-adv-x="1230" d="M66 535q0 111 40 212t110 177t174.5 121t225.5 45q158 0 289 -78l51 65h136l-105 -127q86 -76 133 -184.5t47 -230.5q0 -149 -67 -275t-194.5 -203t-289.5 -77q-170 0 -297 79l-53 -65h-131l105 127q-84 78 -129 185t-45 229zM297 532q0 -144 82 -245l401 559 q-76 51 -164 51q-133 0 -226 -106t-93 -259zM446 225q74 -53 170 -53q134 0 227 105t93 258q0 138 -84 247z" />
-<glyph unicode="ù" horiz-adv-x="1253" d="M123 416v655h225v-610q0 -289 203 -289q99 0 185 60.5t132 170.5v668h226v-805q0 -39 14.5 -55.5t50.5 -17.5v-193q-61 -10 -110 -10q-129 9 -144 116l-4 111q-71 -116 -185.5 -176.5t-254.5 -60.5q-166 0 -252 110.5t-86 325.5zM371 1495h215l116 -225l-143 -45z" />
-<glyph unicode="ú" horiz-adv-x="1253" d="M123 416v655h225v-610q0 -289 203 -289q99 0 185 60.5t132 170.5v668h226v-805q0 -39 14.5 -55.5t50.5 -17.5v-193q-61 -10 -110 -10q-129 9 -144 116l-4 111q-71 -116 -185.5 -176.5t-254.5 -60.5q-166 0 -252 110.5t-86 325.5zM508 1270l117 225h215l-185 -270z" />
-<glyph unicode="û" horiz-adv-x="1253" d="M123 416v655h225v-610q0 -289 203 -289q99 0 185 60.5t132 170.5v668h226v-805q0 -39 14.5 -55.5t50.5 -17.5v-193q-61 -10 -110 -10q-129 9 -144 116l-4 111q-71 -116 -185.5 -176.5t-254.5 -60.5q-166 0 -252 110.5t-86 325.5zM311 1300l213 195h162l213 -195l-121 -57 l-174 129l-174 -129z" />
-<glyph unicode="ü" horiz-adv-x="1253" d="M123 416v655h225v-610q0 -289 203 -289q99 0 185 60.5t132 170.5v668h226v-805q0 -39 14.5 -55.5t50.5 -17.5v-193q-61 -10 -110 -10q-129 9 -144 116l-4 111q-71 -116 -185.5 -176.5t-254.5 -60.5q-166 0 -252 110.5t-86 325.5zM330 1260v225h188v-225h-188zM692 1260 v225h189v-225h-189z" />
-<glyph unicode="ý" horiz-adv-x="1114" d="M10 1071h232l331 -872l295 872h213l-489 -1319q-40 -108 -121.5 -162.5t-191.5 -54.5q-59 0 -115 16v195q46 -10 98 -10q40 0 62 13.5t52.5 70.5t72.5 180zM475 1270l117 225h215l-184 -270z" />
-<glyph unicode="þ" horiz-adv-x="1230" d="M131 -436v1890h231v-502q101 146 287 146q93 0 176 -33t144 -90t106 -130t67.5 -155t22.5 -164q-1 -149 -72 -280t-194 -210t-266 -79q-93 0 -165 39t-106 94v-526h-231zM362 356q0 -69 87.5 -131.5t177.5 -62.5q132 0 220.5 108.5t88.5 257.5q0 151 -83 259t-216 108 q-91 0 -160.5 -55t-114.5 -144v-340z" />
-<glyph unicode="ÿ" horiz-adv-x="1114" d="M10 1071h232l331 -872l295 872h213l-489 -1319q-40 -108 -121.5 -162.5t-191.5 -54.5q-59 0 -115 16v195q46 -10 98 -10q40 0 62 13.5t52.5 70.5t72.5 180zM297 1260v225h188v-225h-188zM659 1260v225h189v-225h-189z" />
-<glyph unicode="Œ" horiz-adv-x="2283" d="M76 727q0 144 53 278.5t143.5 235.5t220.5 162t275 61q146 0 267 -77.5t192 -202.5v270h958v-203h-727v-409h617v-203h-617v-436h746v-203h-977v270q-72 -125 -194.5 -202.5t-268.5 -77.5q-149 0 -279.5 62.5t-219 166t-139 236t-50.5 272.5zM309 727q0 -138 54.5 -258 t160 -196t240.5 -76q104 0 191.5 46t144 121.5t88 170t31.5 194.5q0 103 -33 198.5t-91 168.5t-144.5 117t-186.5 44q-103 0 -190.5 -46t-144.5 -121t-88.5 -169.5t-31.5 -193.5z" />
-<glyph unicode="œ" horiz-adv-x="2091" d="M66 532q0 238 157 398t391 160q144 0 257 -74t180 -209q69 139 181 211t259 72q235 0 386 -153t161 -402q0 -56 -4 -74h-858q11 -136 106.5 -228t228.5 -92q95 0 175.5 47.5t109.5 120.5l186 -55q-58 -124 -189.5 -199t-289.5 -75q-136 0 -251 71t-201 203 q-171 -274 -437 -274q-155 0 -280.5 72t-196.5 198.5t-71 281.5zM297 530q0 -153 92 -255.5t227 -102.5q137 0 228.5 104t91.5 259q0 154 -91.5 258t-226.5 104q-136 0 -228.5 -106t-92.5 -261zM1169 604h643q-10 140 -103.5 230t-223.5 90q-129 0 -218 -90t-98 -230z" />
-<glyph unicode="Ÿ" horiz-adv-x="1310" d="M0 1454h252l403 -729l406 729h250l-541 -934v-520h-231v524zM379 1642v226h188v-226h-188zM741 1642v226h189v-226h-189z" />
-<glyph unicode="ˆ" horiz-adv-x="727" d="M70 1300l213 195h161l213 -195l-120 -57l-175 129l-174 -129z" />
-<glyph unicode="˜" horiz-adv-x="872" d="M74 1249q0 15 6 41t22.5 60.5t40 64t63 50t87.5 20.5q51 0 97 -22.5t88 -45t83 -22.5q28 0 49.5 10t33 23t18.5 28.5t8.5 24.5t1.5 14h129q0 -13 -6.5 -38t-24 -59.5t-42.5 -65t-67.5 -51.5t-93.5 -21q-53 0 -101 22t-88.5 44t-76.5 22q-32 0 -54 -13.5t-31 -33.5 t-12 -32.5t-3 -19.5h-127z" />
-<glyph unicode=" " horiz-adv-x="939" />
-<glyph unicode=" " horiz-adv-x="1878" />
-<glyph unicode=" " horiz-adv-x="939" />
-<glyph unicode=" " horiz-adv-x="1878" />
-<glyph unicode=" " horiz-adv-x="626" />
-<glyph unicode=" " horiz-adv-x="469" />
-<glyph unicode=" " horiz-adv-x="313" />
-<glyph unicode=" " horiz-adv-x="313" />
-<glyph unicode=" " horiz-adv-x="234" />
-<glyph unicode=" " horiz-adv-x="375" />
-<glyph unicode=" " horiz-adv-x="104" />
-<glyph unicode="‐" horiz-adv-x="858" d="M123 459v203h612v-203h-612z" />
-<glyph unicode="‑" horiz-adv-x="858" d="M123 459v203h612v-203h-612z" />
-<glyph unicode="‒" horiz-adv-x="858" d="M123 459v203h612v-203h-612z" />
-<glyph unicode="–" horiz-adv-x="1210" d="M123 459v203h962v-203h-962z" />
-<glyph unicode="—" horiz-adv-x="1878" d="M123 459v203h1632v-203h-1632z" />
-<glyph unicode="‘" horiz-adv-x="464" d="M102 1233v262h189v-223q0 -31 19 -43t38 -12v-164q-44 0 -85 9.5t-78.5 29t-60 56t-22.5 85.5z" />
-<glyph unicode="’" horiz-adv-x="466" d="M98 1331v164q44 0 85 -9.5t78.5 -29t60 -56t22.5 -85.5v-262h-188v223q0 31 -19.5 43t-38.5 12z" />
-<glyph unicode="‚" horiz-adv-x="460" d="M82 -35q20 0 39.5 13t19.5 45v239h187v-280q0 -49 -22.5 -85.5t-60 -56.5t-78.5 -29.5t-85 -9.5v164z" />
-<glyph unicode="“" horiz-adv-x="811" d="M102 1233v262h189v-223q0 -31 19 -43t38 -12v-164q-44 0 -85 9.5t-78.5 29t-60 56t-22.5 85.5zM451 1233v262h188v-223q0 -31 19 -43t38 -12v-164q-44 0 -85 9.5t-78 29t-59.5 56t-22.5 85.5z" />
-<glyph unicode="”" horiz-adv-x="813" d="M98 1331v164q44 0 85 -9.5t78.5 -29t60 -56t22.5 -85.5v-262h-188v223q0 31 -19.5 43t-38.5 12zM444 1331v164q44 0 85 -9.5t78.5 -29t60 -56t22.5 -85.5v-262h-188v223q0 31 -19.5 43t-38.5 12z" />
-<glyph unicode="„" horiz-adv-x="784" d="M82 -35q20 0 39.5 13t19.5 45v239h187v-280q0 -49 -22.5 -85.5t-60 -56.5t-78.5 -29.5t-85 -9.5v164zM408 -35q20 0 39.5 13t19.5 45v239h186v-280q0 -49 -22.5 -85.5t-59.5 -56.5t-78 -29.5t-85 -9.5v164z" />
-<glyph unicode="•" horiz-adv-x="737" d="M166 713q0 83 60 142.5t143 59.5q84 0 143 -59t59 -143q0 -85 -58.5 -144t-143.5 -59q-84 0 -143.5 59.5t-59.5 143.5z" />
-<glyph unicode="…" horiz-adv-x="1124" d="M123 0v262h186v-262h-186zM469 0v262h186v-262h-186zM813 0v262h186v-262h-186z" />
-<glyph unicode=" " horiz-adv-x="375" />
-<glyph unicode="‹" horiz-adv-x="731" d="M80 469v113l530 379v-187l-350 -244l350 -235v-184z" />
-<glyph unicode="›" horiz-adv-x="731" d="M123 111v184l348 235l-348 244v187l528 -379v-113z" />
-<glyph unicode=" " horiz-adv-x="469" />
-<glyph unicode="€" horiz-adv-x="1613" d="M70 510l53 127h139q-6 50 -6 100v15h-147l53 127h108q22 116 77.5 219.5t140 185.5t204.5 130t258 48q188 0 331 -86.5t214 -230.5l-180 -121q-28 63 -71.5 109.5t-94.5 72t-102 37.5t-105 12q-170 0 -283 -107t-153 -269h590l-54 -127h-553v-23q0 -41 7 -92h532 l-53 -127h-447q54 -141 166 -228t254 -87q115 0 221 60t158 179l191 -108q-43 -104 -138.5 -182.5t-209.5 -117t-230 -38.5t-223 41.5t-189.5 113.5t-143 166t-93.5 201h-221z" />
-<glyph unicode="™" horiz-adv-x="1617" d="M121 1309v149h538v-149h-194v-457h-150v457h-194zM754 852v602h217l139 -344l139 344h217v-602h-147v405l-148 -319h-120l-148 319v-405h-149z" />
-<glyph unicode="◼" horiz-adv-x="1075" d="M0 0v1075h1075v-1075h-1075z" />
-<hkern u1=" " u2="’" k="51" />
-<hkern u1=" " u2="Æ" k="72" />
-<hkern u1=" " u2="y" k="55" />
-<hkern u1=" " u2="w" k="57" />
-<hkern u1=" " u2="v" k="55" />
-<hkern u1=" " u2="Y" k="76" />
-<hkern u1=" " u2="X" k="10" />
-<hkern u1=" " u2="W" k="72" />
-<hkern u1=" " u2="V" k="72" />
-<hkern u1=" " u2="T" k="55" />
-<hkern u1=" " u2="J" k="57" />
-<hkern u1=" " u2="A" k="63" />
-<hkern u1=" " u2="'" k="53" />
-<hkern u1=" " u2=""" k="41" />
-<hkern u1=""" u2=" " k="41" />
-<hkern u1="#" u2="4" k="10" />
-<hkern u1="$" u2="7" k="12" />
-<hkern u1="$" u2="3" k="23" />
-<hkern u1="&" u2="’" k="74" />
-<hkern u1="&" u2="ø" k="-16" />
-<hkern u1="&" u2="Ø" k="-43" />
-<hkern u1="&" u2="Æ" k="-82" />
-<hkern u1="&" u2="z" k="-14" />
-<hkern u1="&" u2="y" k="37" />
-<hkern u1="&" u2="x" k="-45" />
-<hkern u1="&" u2="w" k="39" />
-<hkern u1="&" u2="v" k="35" />
-<hkern u1="&" u2="s" k="-14" />
-<hkern u1="&" u2="Z" k="-14" />
-<hkern u1="&" u2="Y" k="106" />
-<hkern u1="&" u2="X" k="-53" />
-<hkern u1="&" u2="W" k="88" />
-<hkern u1="&" u2="V" k="86" />
-<hkern u1="&" u2="U" k="14" />
-<hkern u1="&" u2="T" k="86" />
-<hkern u1="&" u2="J" k="-25" />
-<hkern u1="&" u2="A" k="-51" />
-<hkern u1="&" u2="'" k="78" />
-<hkern u1="'" u2="‹" k="23" />
-<hkern u1="'" u2="ð" k="98" />
-<hkern u1="'" u2="ï" k="-31" />
-<hkern u1="'" u2="î" k="-16" />
-<hkern u1="'" u2="Æ" k="190" />
-<hkern u1="'" u2="s" k="16" />
-<hkern u1="'" u2="o" k="45" />
-<hkern u1="'" u2="f" k="8" />
-<hkern u1="'" u2="d" k="117" />
-<hkern u1="'" u2="a" k="10" />
-<hkern u1="'" u2="O" k="18" />
-<hkern u1="'" u2="J" k="168" />
-<hkern u1="'" u2="A" k="129" />
-<hkern u1="'" u2="@" k="63" />
-<hkern u1="'" u2="9" k="29" />
-<hkern u1="'" u2="5" k="31" />
-<hkern u1="'" u2="4" k="164" />
-<hkern u1="'" u2="3" k="12" />
-<hkern u1="'" u2="0" k="14" />
-<hkern u1="'" u2="/" k="190" />
-<hkern u1="'" u2="." k="246" />
-<hkern u1="'" u2=" " k="53" />
-<hkern u1="(" u2="ð" k="29" />
-<hkern u1="(" u2="ï" k="-70" />
-<hkern u1="(" u2="î" k="-14" />
-<hkern u1="(" u2="ì" k="-27" />
-<hkern u1="(" u2="Ø" k="-14" />
-<hkern u1="(" u2="Æ" k="-41" />
-<hkern u1="(" u2="y" k="14" />
-<hkern u1="(" u2="x" k="-16" />
-<hkern u1="(" u2="w" k="29" />
-<hkern u1="(" u2="v" k="27" />
-<hkern u1="(" u2="u" k="10" />
-<hkern u1="(" u2="o" k="33" />
-<hkern u1="(" u2="j" k="-33" />
-<hkern u1="(" u2="f" k="10" />
-<hkern u1="(" u2="d" k="35" />
-<hkern u1="(" u2="Y" k="-31" />
-<hkern u1="(" u2="X" k="-29" />
-<hkern u1="(" u2="W" k="-27" />
-<hkern u1="(" u2="V" k="-27" />
-<hkern u1="(" u2="T" k="-6" />
-<hkern u1="(" u2="O" k="31" />
-<hkern u1="(" u2="J" k="-10" />
-<hkern u1="(" u2="A" k="-25" />
-<hkern u1="(" u2="6" k="10" />
-<hkern u1="(" u2="0" k="31" />
-<hkern u1="*" u2="ð" k="92" />
-<hkern u1="*" u2="ï" k="-78" />
-<hkern u1="*" u2="î" k="-66" />
-<hkern u1="*" u2="ì" k="-16" />
-<hkern u1="*" u2="Æ" k="188" />
-<hkern u1="*" u2="x" k="-27" />
-<hkern u1="*" u2="w" k="-27" />
-<hkern u1="*" u2="v" k="-23" />
-<hkern u1="*" u2="s" k="37" />
-<hkern u1="*" u2="o" k="57" />
-<hkern u1="*" u2="f" k="8" />
-<hkern u1="*" u2="d" k="78" />
-<hkern u1="*" u2="a" k="18" />
-<hkern u1="*" u2="Y" k="-39" />
-<hkern u1="*" u2="X" k="-37" />
-<hkern u1="*" u2="W" k="-35" />
-<hkern u1="*" u2="V" k="-6" />
-<hkern u1="*" u2="T" k="-37" />
-<hkern u1="*" u2="O" k="10" />
-<hkern u1="*" u2="J" k="172" />
-<hkern u1="*" u2="A" k="123" />
-<hkern u1="+" u2="8" k="10" />
-<hkern u1="+" u2="7" k="27" />
-<hkern u1="+" u2="4" k="57" />
-<hkern u1="+" u2="3" k="25" />
-<hkern u1="+" u2="2" k="10" />
-<hkern u1="+" u2="1" k="12" />
-<hkern u1="," u2="j" k="-39" />
-<hkern u1="-" u2="Æ" k="33" />
-<hkern u1="-" u2="z" k="41" />
-<hkern u1="-" u2="y" k="39" />
-<hkern u1="-" u2="x" k="55" />
-<hkern u1="-" u2="w" k="41" />
-<hkern u1="-" u2="v" k="37" />
-<hkern u1="-" u2="t" k="10" />
-<hkern u1="-" u2="s" k="10" />
-<hkern u1="-" u2="f" k="8" />
-<hkern u1="-" u2="Z" k="18" />
-<hkern u1="-" u2="Y" k="127" />
-<hkern u1="-" u2="X" k="53" />
-<hkern u1="-" u2="W" k="82" />
-<hkern u1="-" u2="V" k="80" />
-<hkern u1="-" u2="T" k="131" />
-<hkern u1="-" u2="J" k="80" />
-<hkern u1="-" u2="A" k="27" />
-<hkern u1="-" u2="7" k="41" />
-<hkern u1="-" u2="4" k="23" />
-<hkern u1="-" u2="3" k="76" />
-<hkern u1="-" u2="2" k="10" />
-<hkern u1="-" u2="1" k="31" />
-<hkern u1="." u2="’" k="258" />
-<hkern u1="." u2="‘" k="268" />
-<hkern u1="." u2="Æ" k="-6" />
-<hkern u1="." u2="y" k="86" />
-<hkern u1="." u2="w" k="92" />
-<hkern u1="." u2="v" k="82" />
-<hkern u1="." u2="t" k="12" />
-<hkern u1="." u2="f" k="8" />
-<hkern u1="." u2="d" k="8" />
-<hkern u1="." u2="Y" k="154" />
-<hkern u1="." u2="W" k="141" />
-<hkern u1="." u2="V" k="137" />
-<hkern u1="." u2="U" k="33" />
-<hkern u1="." u2="T" k="133" />
-<hkern u1="." u2="O" k="27" />
-<hkern u1="." u2="7" k="57" />
-<hkern u1="." u2="'" k="246" />
-<hkern u1="/" u2="ð" k="76" />
-<hkern u1="/" u2="ï" k="-61" />
-<hkern u1="/" u2="ì" k="-8" />
-<hkern u1="/" u2="Æ" k="195" />
-<hkern u1="/" u2="z" k="27" />
-<hkern u1="/" u2="y" k="31" />
-<hkern u1="/" u2="x" k="16" />
-<hkern u1="/" u2="w" k="33" />
-<hkern u1="/" u2="v" k="33" />
-<hkern u1="/" u2="u" k="43" />
-<hkern u1="/" u2="s" k="70" />
-<hkern u1="/" u2="o" k="76" />
-<hkern u1="/" u2="n" k="45" />
-<hkern u1="/" u2="f" k="18" />
-<hkern u1="/" u2="d" k="78" />
-<hkern u1="/" u2="a" k="61" />
-<hkern u1="/" u2="Y" k="-27" />
-<hkern u1="/" u2="X" k="-27" />
-<hkern u1="/" u2="W" k="-25" />
-<hkern u1="/" u2="V" k="-23" />
-<hkern u1="/" u2="S" k="14" />
-<hkern u1="/" u2="O" k="41" />
-<hkern u1="/" u2="J" k="156" />
-<hkern u1="/" u2="A" k="127" />
-<hkern u1="/" u2="9" k="61" />
-<hkern u1="/" u2="8" k="14" />
-<hkern u1="/" u2="6" k="31" />
-<hkern u1="/" u2="5" k="72" />
-<hkern u1="/" u2="4" k="156" />
-<hkern u1="/" u2="3" k="51" />
-<hkern u1="/" u2="2" k="45" />
-<hkern u1="/" u2="1" k="43" />
-<hkern u1="/" u2="0" k="78" />
-<hkern u1="/" u2="/" k="522" />
-<hkern u1="0" u2="Æ" k="43" />
-<hkern u1="0" u2="°" k="33" />
-<hkern u1="0" u2="\" k="68" />
-<hkern u1="0" u2="Z" k="16" />
-<hkern u1="0" u2="Y" k="90" />
-<hkern u1="0" u2="X" k="27" />
-<hkern u1="0" u2="W" k="63" />
-<hkern u1="0" u2="V" k="61" />
-<hkern u1="0" u2="T" k="88" />
-<hkern u1="0" u2="J" k="20" />
-<hkern u1="0" u2="A" k="33" />
-<hkern u1="0" u2="7" k="18" />
-<hkern u1="0" u2="/" k="14" />
-<hkern u1="0" u2=")" k="31" />
-<hkern u1="0" u2="'" k="14" />
-<hkern u1="1" u2="Æ" k="-35" />
-<hkern u1="1" u2="·" k="33" />
-<hkern u1="1" u2="°" k="43" />
-<hkern u1="1" u2="\" k="80" />
-<hkern u1="1" u2="Y" k="96" />
-<hkern u1="1" u2="X" k="-14" />
-<hkern u1="1" u2="W" k="80" />
-<hkern u1="1" u2="V" k="80" />
-<hkern u1="1" u2="U" k="10" />
-<hkern u1="1" u2="T" k="98" />
-<hkern u1="1" u2="A" k="-16" />
-<hkern u1="1" u2="=" k="12" />
-<hkern u1="1" u2="7" k="12" />
-<hkern u1="1" u2="-" k="20" />
-<hkern u1="1" u2="+" k="39" />
-<hkern u1="1" u2="'" k="37" />
-<hkern u1="1" u2="#" k="-10" />
-<hkern u1="2" u2="Æ" k="-16" />
-<hkern u1="2" u2="\" k="53" />
-<hkern u1="2" u2="Y" k="74" />
-<hkern u1="2" u2="W" k="49" />
-<hkern u1="2" u2="V" k="49" />
-<hkern u1="2" u2="T" k="78" />
-<hkern u1="3" u2="Æ" k="-33" />
-<hkern u1="3" u2="°" k="35" />
-<hkern u1="3" u2="\" k="59" />
-<hkern u1="3" u2="Y" k="80" />
-<hkern u1="3" u2="X" k="-16" />
-<hkern u1="3" u2="W" k="53" />
-<hkern u1="3" u2="V" k="53" />
-<hkern u1="3" u2="T" k="80" />
-<hkern u1="3" u2="7" k="12" />
-<hkern u1="3" u2="'" k="16" />
-<hkern u1="4" u2="Æ" k="-31" />
-<hkern u1="4" u2="·" k="29" />
-<hkern u1="4" u2="°" k="27" />
-<hkern u1="4" u2="\" k="63" />
-<hkern u1="4" u2="Y" k="82" />
-<hkern u1="4" u2="X" k="-8" />
-<hkern u1="4" u2="W" k="66" />
-<hkern u1="4" u2="V" k="66" />
-<hkern u1="4" u2="T" k="86" />
-<hkern u1="4" u2="A" k="-14" />
-<hkern u1="4" u2="7" k="14" />
-<hkern u1="4" u2="-" k="10" />
-<hkern u1="4" u2="," k="-10" />
-<hkern u1="4" u2="+" k="31" />
-<hkern u1="4" u2="'" k="16" />
-<hkern u1="5" u2="Æ" k="-14" />
-<hkern u1="5" u2="·" k="16" />
-<hkern u1="5" u2="\" k="23" />
-<hkern u1="5" u2="Y" k="45" />
-<hkern u1="5" u2="W" k="31" />
-<hkern u1="5" u2="V" k="31" />
-<hkern u1="5" u2="T" k="59" />
-<hkern u1="5" u2="A" k="-16" />
-<hkern u1="5" u2="-" k="14" />
-<hkern u1="5" u2="+" k="33" />
-<hkern u1="6" u2="Æ" k="35" />
-<hkern u1="6" u2="Y" k="41" />
-<hkern u1="6" u2="W" k="31" />
-<hkern u1="6" u2="V" k="31" />
-<hkern u1="6" u2="T" k="12" />
-<hkern u1="6" u2="A" k="29" />
-<hkern u1="6" u2="3" k="14" />
-<hkern u1="7" u2="Æ" k="104" />
-<hkern u1="7" u2="·" k="37" />
-<hkern u1="7" u2="°" k="-6" />
-<hkern u1="7" u2="¢" k="33" />
-<hkern u1="7" u2="Z" k="16" />
-<hkern u1="7" u2="T" k="8" />
-<hkern u1="7" u2="J" k="102" />
-<hkern u1="7" u2="A" k="78" />
-<hkern u1="7" u2="=" k="16" />
-<hkern u1="7" u2="7" k="-12" />
-<hkern u1="7" u2="5" k="31" />
-<hkern u1="7" u2="4" k="94" />
-<hkern u1="7" u2="/" k="102" />
-<hkern u1="7" u2="." k="125" />
-<hkern u1="7" u2="-" k="49" />
-<hkern u1="7" u2="+" k="14" />
-<hkern u1="8" u2="Æ" k="31" />
-<hkern u1="8" u2="Y" k="45" />
-<hkern u1="8" u2="W" k="33" />
-<hkern u1="8" u2="V" k="33" />
-<hkern u1="8" u2="T" k="10" />
-<hkern u1="8" u2="A" k="29" />
-<hkern u1="8" u2="+" k="10" />
-<hkern u1="9" u2="°" k="55" />
-<hkern u1="9" u2="\" k="70" />
-<hkern u1="9" u2="Y" k="92" />
-<hkern u1="9" u2="W" k="66" />
-<hkern u1="9" u2="V" k="63" />
-<hkern u1="9" u2="T" k="94" />
-<hkern u1="9" u2="7" k="18" />
-<hkern u1="9" u2="'" k="41" />
-<hkern u1=":" u2="Y" k="57" />
-<hkern u1=":" u2="W" k="35" />
-<hkern u1=":" u2="V" k="35" />
-<hkern u1=":" u2="T" k="61" />
-<hkern u1=";" u2="j" k="-31" />
-<hkern u1="=" u2="7" k="27" />
-<hkern u1="=" u2="4" k="12" />
-<hkern u1="=" u2="3" k="31" />
-<hkern u1="=" u2="1" k="18" />
-<hkern u1="@" u2="’" k="61" />
-<hkern u1="@" u2="Y" k="102" />
-<hkern u1="@" u2="W" k="72" />
-<hkern u1="@" u2="V" k="72" />
-<hkern u1="@" u2="T" k="96" />
-<hkern u1="@" u2="A" k="23" />
-<hkern u1="@" u2="'" k="59" />
-<hkern u1="A" u2="™" k="125" />
-<hkern u1="A" u2="‹" k="27" />
-<hkern u1="A" u2="„" k="-6" />
-<hkern u1="A" u2="‚" k="-6" />
-<hkern u1="A" u2="’" k="127" />
-<hkern u1="A" u2="‘" k="129" />
-<hkern u1="A" u2="ð" k="31" />
-<hkern u1="A" u2="Ø" k="14" />
-<hkern u1="A" u2="Ð" k="6" />
-<hkern u1="A" u2="º" k="96" />
-<hkern u1="A" u2="®" k="41" />
-<hkern u1="A" u2="ª" k="86" />
-<hkern u1="A" u2="©" k="41" />
-<hkern u1="A" u2="y" k="70" />
-<hkern u1="A" u2="w" k="72" />
-<hkern u1="A" u2="v" k="66" />
-<hkern u1="A" u2="u" k="23" />
-<hkern u1="A" u2="t" k="53" />
-<hkern u1="A" u2="s" k="8" />
-<hkern u1="A" u2="o" k="35" />
-<hkern u1="A" u2="l" k="8" />
-<hkern u1="A" u2="f" k="33" />
-<hkern u1="A" u2="d" k="35" />
-<hkern u1="A" u2="a" k="16" />
-<hkern u1="A" u2="]" k="-6" />
-<hkern u1="A" u2="\" k="121" />
-<hkern u1="A" u2="Y" k="143" />
-<hkern u1="A" u2="W" k="115" />
-<hkern u1="A" u2="V" k="113" />
-<hkern u1="A" u2="U" k="59" />
-<hkern u1="A" u2="T" k="139" />
-<hkern u1="A" u2="S" k="18" />
-<hkern u1="A" u2="O" k="53" />
-<hkern u1="A" u2="@" k="12" />
-<hkern u1="A" u2="?" k="33" />
-<hkern u1="A" u2="8" k="29" />
-<hkern u1="A" u2="7" k="33" />
-<hkern u1="A" u2="6" k="33" />
-<hkern u1="A" u2="4" k="-23" />
-<hkern u1="A" u2="2" k="-10" />
-<hkern u1="A" u2="0" k="33" />
-<hkern u1="A" u2="/" k="-20" />
-<hkern u1="A" u2="-" k="27" />
-<hkern u1="A" u2="," k="-6" />
-<hkern u1="A" u2="*" k="123" />
-<hkern u1="A" u2=")" k="-23" />
-<hkern u1="A" u2="'" k="129" />
-<hkern u1="A" u2="&" k="29" />
-<hkern u1="A" u2=" " k="63" />
-<hkern u1="B" u2="ð" k="6" />
-<hkern u1="B" u2="ï" k="-18" />
-<hkern u1="B" u2="î" k="-16" />
-<hkern u1="B" u2="Æ" k="20" />
-<hkern u1="B" u2="z" k="8" />
-<hkern u1="B" u2="y" k="20" />
-<hkern u1="B" u2="x" k="27" />
-<hkern u1="B" u2="w" k="20" />
-<hkern u1="B" u2="v" k="18" />
-<hkern u1="B" u2="u" k="6" />
-<hkern u1="B" u2="t" k="20" />
-<hkern u1="B" u2="s" k="10" />
-<hkern u1="B" u2="o" k="6" />
-<hkern u1="B" u2="n" k="6" />
-<hkern u1="B" u2="f" k="23" />
-<hkern u1="B" u2="d" k="6" />
-<hkern u1="B" u2="Z" k="6" />
-<hkern u1="B" u2="Y" k="59" />
-<hkern u1="B" u2="X" k="31" />
-<hkern u1="B" u2="W" k="43" />
-<hkern u1="B" u2="V" k="41" />
-<hkern u1="B" u2="T" k="51" />
-<hkern u1="B" u2="J" k="20" />
-<hkern u1="B" u2="A" k="29" />
-<hkern u1="B" u2="7" k="16" />
-<hkern u1="B" u2="3" k="10" />
-<hkern u1="C" u2="™" k="-18" />
-<hkern u1="C" u2="ð" k="8" />
-<hkern u1="C" u2="ï" k="-49" />
-<hkern u1="C" u2="î" k="-29" />
-<hkern u1="C" u2="Æ" k="14" />
-<hkern u1="C" u2="z" k="6" />
-<hkern u1="C" u2="y" k="6" />
-<hkern u1="C" u2="w" k="6" />
-<hkern u1="C" u2="u" k="6" />
-<hkern u1="C" u2="t" k="8" />
-<hkern u1="C" u2="s" k="10" />
-<hkern u1="C" u2="o" k="8" />
-<hkern u1="C" u2="n" k="6" />
-<hkern u1="C" u2="f" k="14" />
-<hkern u1="C" u2="d" k="8" />
-<hkern u1="C" u2="Y" k="35" />
-<hkern u1="C" u2="X" k="12" />
-<hkern u1="C" u2="W" k="23" />
-<hkern u1="C" u2="V" k="23" />
-<hkern u1="C" u2="T" k="10" />
-<hkern u1="C" u2="S" k="6" />
-<hkern u1="C" u2="O" k="16" />
-<hkern u1="C" u2="A" k="20" />
-<hkern u1="C" u2="*" k="-27" />
-<hkern u1="D" u2="™" k="8" />
-<hkern u1="D" u2="‘" k="8" />
-<hkern u1="D" u2="ð" k="8" />
-<hkern u1="D" u2="Ð" k="12" />
-<hkern u1="D" u2="Æ" k="78" />
-<hkern u1="D" u2="z" k="8" />
-<hkern u1="D" u2="y" k="8" />
-<hkern u1="D" u2="x" k="20" />
-<hkern u1="D" u2="w" k="6" />
-<hkern u1="D" u2="u" k="6" />
-<hkern u1="D" u2="s" k="8" />
-<hkern u1="D" u2="n" k="10" />
-<hkern u1="D" u2="i" k="6" />
-<hkern u1="D" u2="h" k="6" />
-<hkern u1="D" u2="a" k="14" />
-<hkern u1="D" u2="\" k="29" />
-<hkern u1="D" u2="Z" k="29" />
-<hkern u1="D" u2="Y" k="80" />
-<hkern u1="D" u2="X" k="57" />
-<hkern u1="D" u2="W" k="51" />
-<hkern u1="D" u2="V" k="49" />
-<hkern u1="D" u2="T" k="53" />
-<hkern u1="D" u2="S" k="6" />
-<hkern u1="D" u2="J" k="66" />
-<hkern u1="D" u2="A" k="51" />
-<hkern u1="D" u2="4" k="10" />
-<hkern u1="D" u2="/" k="41" />
-<hkern u1="D" u2="." k="23" />
-<hkern u1="D" u2=")" k="25" />
-<hkern u1="D" u2="'" k="12" />
-<hkern u1="E" u2="‹" k="18" />
-<hkern u1="E" u2="ð" k="33" />
-<hkern u1="E" u2="ï" k="-43" />
-<hkern u1="E" u2="î" k="-29" />
-<hkern u1="E" u2="y" k="39" />
-<hkern u1="E" u2="w" k="35" />
-<hkern u1="E" u2="v" k="29" />
-<hkern u1="E" u2="u" k="20" />
-<hkern u1="E" u2="t" k="23" />
-<hkern u1="E" u2="s" k="6" />
-<hkern u1="E" u2="o" k="33" />
-<hkern u1="E" u2="n" k="4" />
-<hkern u1="E" u2="f" k="29" />
-<hkern u1="E" u2="d" k="33" />
-<hkern u1="E" u2="a" k="10" />
-<hkern u1="E" u2="S" k="20" />
-<hkern u1="E" u2="O" k="25" />
-<hkern u1="E" u2="7" k="20" />
-<hkern u1="E" u2="-" k="18" />
-<hkern u1="F" g2="uniFB04" k="29" />
-<hkern u1="F" g2="uniFB03" k="29" />
-<hkern u1="F" u2="™" k="-6" />
-<hkern u1="F" u2="›" k="23" />
-<hkern u1="F" u2="‹" k="27" />
-<hkern u1="F" u2="ð" k="82" />
-<hkern u1="F" u2="ï" k="-74" />
-<hkern u1="F" u2="î" k="-59" />
-<hkern u1="F" u2="í" k="14" />
-<hkern u1="F" u2="ì" k="-20" />
-<hkern u1="F" u2="ß" k="16" />
-<hkern u1="F" u2="Æ" k="209" />
-<hkern u1="F" u2="z" k="51" />
-<hkern u1="F" u2="y" k="33" />
-<hkern u1="F" u2="x" k="37" />
-<hkern u1="F" u2="w" k="33" />
-<hkern u1="F" u2="v" k="31" />
-<hkern u1="F" u2="u" k="41" />
-<hkern u1="F" u2="t" k="10" />
-<hkern u1="F" u2="s" k="70" />
-<hkern u1="F" u2="o" k="57" />
-<hkern u1="F" u2="n" k="49" />
-<hkern u1="F" u2="f" k="29" />
-<hkern u1="F" u2="d" k="57" />
-<hkern u1="F" u2="a" k="98" />
-<hkern u1="F" u2="S" k="41" />
-<hkern u1="F" u2="O" k="31" />
-<hkern u1="F" u2="J" k="221" />
-<hkern u1="F" u2="A" k="125" />
-<hkern u1="F" u2="@" k="10" />
-<hkern u1="F" u2=":" k="18" />
-<hkern u1="F" u2="7" k="27" />
-<hkern u1="F" u2="5" k="31" />
-<hkern u1="F" u2="4" k="78" />
-<hkern u1="F" u2="3" k="27" />
-<hkern u1="F" u2="2" k="33" />
-<hkern u1="F" u2="1" k="18" />
-<hkern u1="F" u2="/" k="111" />
-<hkern u1="F" u2="." k="125" />
-<hkern u1="F" u2="-" k="31" />
-<hkern u1="F" u2="*" k="-25" />
-<hkern u1="F" u2=")" k="-6" />
-<hkern u1="F" u2=" " k="45" />
-<hkern u1="G" u2="™" k="8" />
-<hkern u1="G" u2="ð" k="6" />
-<hkern u1="G" u2="y" k="25" />
-<hkern u1="G" u2="w" k="27" />
-<hkern u1="G" u2="v" k="25" />
-<hkern u1="G" u2="t" k="12" />
-<hkern u1="G" u2="f" k="12" />
-<hkern u1="G" u2="\" k="14" />
-<hkern u1="G" u2="Y" k="66" />
-<hkern u1="G" u2="W" k="47" />
-<hkern u1="G" u2="V" k="45" />
-<hkern u1="G" u2="T" k="41" />
-<hkern u1="G" u2="'" k="10" />
-<hkern u1="I" u2="ð" k="20" />
-<hkern u1="I" u2="ï" k="-18" />
-<hkern u1="I" u2="z" k="6" />
-<hkern u1="I" u2="y" k="6" />
-<hkern u1="I" u2="t" k="16" />
-<hkern u1="I" u2="s" k="12" />
-<hkern u1="I" u2="o" k="18" />
-<hkern u1="I" u2="f" k="16" />
-<hkern u1="I" u2="d" k="16" />
-<hkern u1="I" u2="a" k="14" />
-<hkern u1="J" u2="ð" k="25" />
-<hkern u1="J" u2="ï" k="-27" />
-<hkern u1="J" u2="î" k="-14" />
-<hkern u1="J" u2="Æ" k="45" />
-<hkern u1="J" u2="z" k="10" />
-<hkern u1="J" u2="x" k="6" />
-<hkern u1="J" u2="u" k="8" />
-<hkern u1="J" u2="t" k="12" />
-<hkern u1="J" u2="s" k="23" />
-<hkern u1="J" u2="o" k="18" />
-<hkern u1="J" u2="n" k="8" />
-<hkern u1="J" u2="l" k="6" />
-<hkern u1="J" u2="i" k="6" />
-<hkern u1="J" u2="h" k="6" />
-<hkern u1="J" u2="f" k="14" />
-<hkern u1="J" u2="d" k="18" />
-<hkern u1="J" u2="a" k="20" />
-<hkern u1="J" u2="J" k="31" />
-<hkern u1="J" u2="A" k="33" />
-<hkern u1="J" u2="/" k="16" />
-<hkern u1="J" u2="." k="12" />
-<hkern u1="K" u2="™" k="-18" />
-<hkern u1="K" u2="›" k="-6" />
-<hkern u1="K" u2="‹" k="27" />
-<hkern u1="K" u2="„" k="-23" />
-<hkern u1="K" u2="‚" k="-23" />
-<hkern u1="K" u2="ø" k="25" />
-<hkern u1="K" u2="ð" k="55" />
-<hkern u1="K" u2="ï" k="-88" />
-<hkern u1="K" u2="î" k="-16" />
-<hkern u1="K" u2="ì" k="-33" />
-<hkern u1="K" u2="Ø" k="23" />
-<hkern u1="K" u2="®" k="31" />
-<hkern u1="K" u2="©" k="31" />
-<hkern u1="K" u2="}" k="-18" />
-<hkern u1="K" u2="y" k="76" />
-<hkern u1="K" u2="w" k="82" />
-<hkern u1="K" u2="v" k="76" />
-<hkern u1="K" u2="u" k="33" />
-<hkern u1="K" u2="t" k="31" />
-<hkern u1="K" u2="o" k="63" />
-<hkern u1="K" u2="f" k="33" />
-<hkern u1="K" u2="d" k="61" />
-<hkern u1="K" u2="a" k="8" />
-<hkern u1="K" u2="]" k="-20" />
-<hkern u1="K" u2="\" k="-16" />
-<hkern u1="K" u2="S" k="18" />
-<hkern u1="K" u2="O" k="74" />
-<hkern u1="K" u2="J" k="-6" />
-<hkern u1="K" u2=";" k="-12" />
-<hkern u1="K" u2="4" k="-37" />
-<hkern u1="K" u2="2" k="-25" />
-<hkern u1="K" u2="0" k="10" />
-<hkern u1="K" u2="/" k="-35" />
-<hkern u1="K" u2="-" k="49" />
-<hkern u1="K" u2="," k="-23" />
-<hkern u1="K" u2="*" k="-27" />
-<hkern u1="K" u2=")" k="-39" />
-<hkern u1="K" u2=" " k="27" />
-<hkern u1="L" u2="™" k="215" />
-<hkern u1="L" u2="‹" k="63" />
-<hkern u1="L" u2="’" k="209" />
-<hkern u1="L" u2="‘" k="211" />
-<hkern u1="L" u2="ð" k="25" />
-<hkern u1="L" u2="Æ" k="-16" />
-<hkern u1="L" u2="º" k="211" />
-<hkern u1="L" u2="·" k="274" />
-<hkern u1="L" u2="®" k="29" />
-<hkern u1="L" u2="ª" k="209" />
-<hkern u1="L" u2="©" k="29" />
-<hkern u1="L" u2="y" k="139" />
-<hkern u1="L" u2="w" k="150" />
-<hkern u1="L" u2="v" k="129" />
-<hkern u1="L" u2="u" k="14" />
-<hkern u1="L" u2="t" k="41" />
-<hkern u1="L" u2="o" k="31" />
-<hkern u1="L" u2="f" k="31" />
-<hkern u1="L" u2="d" k="33" />
-<hkern u1="L" u2="\" k="170" />
-<hkern u1="L" u2="Y" k="221" />
-<hkern u1="L" u2="W" k="205" />
-<hkern u1="L" u2="V" k="197" />
-<hkern u1="L" u2="U" k="70" />
-<hkern u1="L" u2="T" k="215" />
-<hkern u1="L" u2="S" k="6" />
-<hkern u1="L" u2="O" k="70" />
-<hkern u1="L" u2="?" k="23" />
-<hkern u1="L" u2="7" k="12" />
-<hkern u1="L" u2="-" k="88" />
-<hkern u1="L" u2="*" k="213" />
-<hkern u1="L" u2="'" k="207" />
-<hkern u1="L" u2=" " k="55" />
-<hkern u1="O" u2="™" k="10" />
-<hkern u1="O" u2="’" k="8" />
-<hkern u1="O" u2="‘" k="10" />
-<hkern u1="O" u2="ð" k="8" />
-<hkern u1="O" u2="Ð" k="14" />
-<hkern u1="O" u2="Æ" k="82" />
-<hkern u1="O" u2="z" k="8" />
-<hkern u1="O" u2="y" k="4" />
-<hkern u1="O" u2="x" k="25" />
-<hkern u1="O" u2="w" k="6" />
-<hkern u1="O" u2="u" k="6" />
-<hkern u1="O" u2="s" k="8" />
-<hkern u1="O" u2="n" k="10" />
-<hkern u1="O" u2="i" k="10" />
-<hkern u1="O" u2="h" k="6" />
-<hkern u1="O" u2="a" k="14" />
-<hkern u1="O" u2="\" k="33" />
-<hkern u1="O" u2="Z" k="33" />
-<hkern u1="O" u2="Y" k="84" />
-<hkern u1="O" u2="X" k="57" />
-<hkern u1="O" u2="W" k="53" />
-<hkern u1="O" u2="V" k="51" />
-<hkern u1="O" u2="T" k="57" />
-<hkern u1="O" u2="S" k="6" />
-<hkern u1="O" u2="J" k="66" />
-<hkern u1="O" u2="A" k="53" />
-<hkern u1="O" u2="4" k="10" />
-<hkern u1="O" u2="/" k="43" />
-<hkern u1="O" u2="." k="27" />
-<hkern u1="O" u2="*" k="8" />
-<hkern u1="O" u2=")" k="29" />
-<hkern u1="O" u2="'" k="18" />
-<hkern u1="P" u2="‹" k="27" />
-<hkern u1="P" u2="ð" k="47" />
-<hkern u1="P" u2="ï" k="-35" />
-<hkern u1="P" u2="î" k="-16" />
-<hkern u1="P" u2="Æ" k="184" />
-<hkern u1="P" u2="y" k="-18" />
-<hkern u1="P" u2="x" k="-8" />
-<hkern u1="P" u2="w" k="-14" />
-<hkern u1="P" u2="v" k="-10" />
-<hkern u1="P" u2="s" k="16" />
-<hkern u1="P" u2="o" k="27" />
-<hkern u1="P" u2="d" k="25" />
-<hkern u1="P" u2="a" k="20" />
-<hkern u1="P" u2="Z" k="14" />
-<hkern u1="P" u2="Y" k="33" />
-<hkern u1="P" u2="X" k="39" />
-<hkern u1="P" u2="W" k="25" />
-<hkern u1="P" u2="V" k="25" />
-<hkern u1="P" u2="T" k="4" />
-<hkern u1="P" u2="J" k="186" />
-<hkern u1="P" u2="A" k="102" />
-<hkern u1="P" u2="5" k="14" />
-<hkern u1="P" u2="4" k="70" />
-<hkern u1="P" u2="/" k="117" />
-<hkern u1="P" u2="." k="141" />
-<hkern u1="P" u2="-" k="27" />
-<hkern u1="P" u2=")" k="16" />
-<hkern u1="P" u2=" " k="55" />
-<hkern u1="Q" u2="„" k="-10" />
-<hkern u1="Q" u2="‚" k="-10" />
-<hkern u1="Q" u2="Æ" k="20" />
-<hkern u1="Q" u2="}" k="-10" />
-<hkern u1="Q" u2="y" k="8" />
-<hkern u1="Q" u2="]" k="-10" />
-<hkern u1="Q" u2="X" k="16" />
-<hkern u1="Q" u2="J" k="16" />
-<hkern u1="Q" u2="A" k="12" />
-<hkern u1="Q" u2="4" k="-27" />
-<hkern u1="Q" u2="2" k="-14" />
-<hkern u1="Q" u2="/" k="-25" />
-<hkern u1="Q" u2="," k="-10" />
-<hkern u1="Q" u2=")" k="-27" />
-<hkern u1="R" u2="™" k="10" />
-<hkern u1="R" u2="‹" k="27" />
-<hkern u1="R" u2="’" k="8" />
-<hkern u1="R" u2="ð" k="53" />
-<hkern u1="R" u2="Ð" k="8" />
-<hkern u1="R" u2="y" k="14" />
-<hkern u1="R" u2="w" k="16" />
-<hkern u1="R" u2="v" k="14" />
-<hkern u1="R" u2="u" k="23" />
-<hkern u1="R" u2="t" k="16" />
-<hkern u1="R" u2="s" k="6" />
-<hkern u1="R" u2="o" k="45" />
-<hkern u1="R" u2="n" k="14" />
-<hkern u1="R" u2="l" k="16" />
-<hkern u1="R" u2="i" k="14" />
-<hkern u1="R" u2="h" k="10" />
-<hkern u1="R" u2="f" k="14" />
-<hkern u1="R" u2="d" k="43" />
-<hkern u1="R" u2="a" k="25" />
-<hkern u1="R" u2="\" k="23" />
-<hkern u1="R" u2="Y" k="66" />
-<hkern u1="R" u2="W" k="51" />
-<hkern u1="R" u2="V" k="49" />
-<hkern u1="R" u2="U" k="10" />
-<hkern u1="R" u2="T" k="35" />
-<hkern u1="R" u2="O" k="14" />
-<hkern u1="R" u2="A" k="10" />
-<hkern u1="R" u2="4" k="-10" />
-<hkern u1="R" u2="/" k="-10" />
-<hkern u1="R" u2="-" k="10" />
-<hkern u1="R" u2=")" k="-12" />
-<hkern u1="S" u2="ð" k="6" />
-<hkern u1="S" u2="ï" k="-39" />
-<hkern u1="S" u2="î" k="-27" />
-<hkern u1="S" u2="Æ" k="12" />
-<hkern u1="S" u2="ª" k="10" />
-<hkern u1="S" u2="z" k="10" />
-<hkern u1="S" u2="y" k="41" />
-<hkern u1="S" u2="x" k="23" />
-<hkern u1="S" u2="w" k="45" />
-<hkern u1="S" u2="v" k="41" />
-<hkern u1="S" u2="u" k="8" />
-<hkern u1="S" u2="t" k="27" />
-<hkern u1="S" u2="s" k="10" />
-<hkern u1="S" u2="n" k="8" />
-<hkern u1="S" u2="l" k="6" />
-<hkern u1="S" u2="i" k="6" />
-<hkern u1="S" u2="h" k="6" />
-<hkern u1="S" u2="f" k="25" />
-<hkern u1="S" u2="a" k="6" />
-<hkern u1="S" u2="Y" k="39" />
-<hkern u1="S" u2="X" k="18" />
-<hkern u1="S" u2="W" k="31" />
-<hkern u1="S" u2="V" k="31" />
-<hkern u1="S" u2="T" k="10" />
-<hkern u1="S" u2="A" k="29" />
-<hkern u1="S" u2="7" k="12" />
-<hkern u1="T" g2="uniFB04" k="88" />
-<hkern u1="T" g2="uniFB03" k="47" />
-<hkern u1="T" g2="uniFB01" k="33" />
-<hkern u1="T" u2="™" k="-6" />
-<hkern u1="T" u2="›" k="70" />
-<hkern u1="T" u2="‹" k="117" />
-<hkern u1="T" u2="ð" k="172" />
-<hkern u1="T" u2="ï" k="-76" />
-<hkern u1="T" u2="î" k="-59" />
-<hkern u1="T" u2="í" k="23" />
-<hkern u1="T" u2="ì" k="-23" />
-<hkern u1="T" u2="ã" k="147" />
-<hkern u1="T" u2="ß" k="27" />
-<hkern u1="T" u2="Æ" k="176" />
-<hkern u1="T" u2="®" k="33" />
-<hkern u1="T" u2="©" k="33" />
-<hkern u1="T" u2="z" k="137" />
-<hkern u1="T" u2="y" k="113" />
-<hkern u1="T" u2="x" k="109" />
-<hkern u1="T" u2="w" k="119" />
-<hkern u1="T" u2="v" k="119" />
-<hkern u1="T" u2="u" k="160" />
-<hkern u1="T" u2="t" k="12" />
-<hkern u1="T" u2="s" k="186" />
-<hkern u1="T" u2="o" k="195" />
-<hkern u1="T" u2="n" k="133" />
-<hkern u1="T" u2="f" k="61" />
-<hkern u1="T" u2="d" k="190" />
-<hkern u1="T" u2="a" k="178" />
-<hkern u1="T" u2="S" k="14" />
-<hkern u1="T" u2="O" k="55" />
-<hkern u1="T" u2="J" k="203" />
-<hkern u1="T" u2="A" k="139" />
-<hkern u1="T" u2="@" k="98" />
-<hkern u1="T" u2=":" k="61" />
-<hkern u1="T" u2="9" k="92" />
-<hkern u1="T" u2="8" k="10" />
-<hkern u1="T" u2="7" k="47" />
-<hkern u1="T" u2="6" k="20" />
-<hkern u1="T" u2="5" k="90" />
-<hkern u1="T" u2="4" k="127" />
-<hkern u1="T" u2="3" k="68" />
-<hkern u1="T" u2="2" k="63" />
-<hkern u1="T" u2="1" k="80" />
-<hkern u1="T" u2="0" k="86" />
-<hkern u1="T" u2="/" k="117" />
-<hkern u1="T" u2="." k="133" />
-<hkern u1="T" u2="-" k="129" />
-<hkern u1="T" u2="*" k="-37" />
-<hkern u1="T" u2=")" k="-6" />
-<hkern u1="T" u2="&" k="10" />
-<hkern u1="T" u2=" " k="55" />
-<hkern u1="U" u2="ð" k="29" />
-<hkern u1="U" u2="ï" k="-33" />
-<hkern u1="U" u2="î" k="-16" />
-<hkern u1="U" u2="Æ" k="90" />
-<hkern u1="U" u2="z" k="16" />
-<hkern u1="U" u2="x" k="6" />
-<hkern u1="U" u2="u" k="16" />
-<hkern u1="U" u2="t" k="10" />
-<hkern u1="U" u2="s" k="29" />
-<hkern u1="U" u2="o" k="23" />
-<hkern u1="U" u2="n" k="16" />
-<hkern u1="U" u2="l" k="12" />
-<hkern u1="U" u2="i" k="12" />
-<hkern u1="U" u2="h" k="12" />
-<hkern u1="U" u2="f" k="14" />
-<hkern u1="U" u2="d" k="23" />
-<hkern u1="U" u2="a" k="27" />
-<hkern u1="U" u2="J" k="59" />
-<hkern u1="U" u2="A" k="57" />
-<hkern u1="U" u2="4" k="12" />
-<hkern u1="U" u2="/" k="43" />
-<hkern u1="U" u2="." k="31" />
-<hkern u1="V" u2="™" k="-25" />
-<hkern u1="V" u2="›" k="49" />
-<hkern u1="V" u2="‹" k="82" />
-<hkern u1="V" u2="’" k="-8" />
-<hkern u1="V" u2="‘" k="-6" />
-<hkern u1="V" u2="ð" k="135" />
-<hkern u1="V" u2="ï" k="-92" />
-<hkern u1="V" u2="î" k="-49" />
-<hkern u1="V" u2="í" k="31" />
-<hkern u1="V" u2="ì" k="-41" />
-<hkern u1="V" u2="ã" k="51" />
-<hkern u1="V" u2="ß" k="45" />
-<hkern u1="V" u2="Ð" k="6" />
-<hkern u1="V" u2="Æ" k="176" />
-<hkern u1="V" u2="®" k="41" />
-<hkern u1="V" u2="©" k="41" />
-<hkern u1="V" u2="z" k="49" />
-<hkern u1="V" u2="y" k="25" />
-<hkern u1="V" u2="x" k="27" />
-<hkern u1="V" u2="w" k="27" />
-<hkern u1="V" u2="v" k="29" />
-<hkern u1="V" u2="u" k="78" />
-<hkern u1="V" u2="t" k="23" />
-<hkern u1="V" u2="s" k="106" />
-<hkern u1="V" u2="o" k="125" />
-<hkern u1="V" u2="n" k="82" />
-<hkern u1="V" u2="f" k="53" />
-<hkern u1="V" u2="d" k="121" />
-<hkern u1="V" u2="a" k="109" />
-<hkern u1="V" u2="]" k="-6" />
-<hkern u1="V" u2="\" k="-20" />
-<hkern u1="V" u2="S" k="39" />
-<hkern u1="V" u2="O" k="53" />
-<hkern u1="V" u2="J" k="170" />
-<hkern u1="V" u2="A" k="113" />
-<hkern u1="V" u2="@" k="74" />
-<hkern u1="V" u2=":" k="35" />
-<hkern u1="V" u2="9" k="55" />
-<hkern u1="V" u2="8" k="33" />
-<hkern u1="V" u2="6" k="37" />
-<hkern u1="V" u2="5" k="66" />
-<hkern u1="V" u2="4" k="119" />
-<hkern u1="V" u2="3" k="39" />
-<hkern u1="V" u2="2" k="39" />
-<hkern u1="V" u2="1" k="37" />
-<hkern u1="V" u2="0" k="61" />
-<hkern u1="V" u2="/" k="125" />
-<hkern u1="V" u2="." k="137" />
-<hkern u1="V" u2="-" k="80" />
-<hkern u1="V" u2="*" k="-39" />
-<hkern u1="V" u2=")" k="-25" />
-<hkern u1="V" u2="&" k="37" />
-<hkern u1="V" u2=" " k="72" />
-<hkern u1="W" u2="™" k="-27" />
-<hkern u1="W" u2="›" k="51" />
-<hkern u1="W" u2="‹" k="86" />
-<hkern u1="W" u2="’" k="-10" />
-<hkern u1="W" u2="‘" k="-10" />
-<hkern u1="W" u2="ð" k="139" />
-<hkern u1="W" u2="ï" k="-96" />
-<hkern u1="W" u2="î" k="-49" />
-<hkern u1="W" u2="í" k="31" />
-<hkern u1="W" u2="ì" k="-43" />
-<hkern u1="W" u2="ä" k="51" />
-<hkern u1="W" u2="ã" k="51" />
-<hkern u1="W" u2="ß" k="45" />
-<hkern u1="W" u2="Ð" k="6" />
-<hkern u1="W" u2="Æ" k="178" />
-<hkern u1="W" u2="®" k="41" />
-<hkern u1="W" u2="©" k="41" />
-<hkern u1="W" u2="}" k="-6" />
-<hkern u1="W" u2="z" k="49" />
-<hkern u1="W" u2="y" k="27" />
-<hkern u1="W" u2="x" k="29" />
-<hkern u1="W" u2="w" k="27" />
-<hkern u1="W" u2="v" k="29" />
-<hkern u1="W" u2="u" k="80" />
-<hkern u1="W" u2="t" k="23" />
-<hkern u1="W" u2="s" k="111" />
-<hkern u1="W" u2="o" k="129" />
-<hkern u1="W" u2="n" k="84" />
-<hkern u1="W" u2="f" k="55" />
-<hkern u1="W" u2="d" k="127" />
-<hkern u1="W" u2="a" k="106" />
-<hkern u1="W" u2="]" k="-8" />
-<hkern u1="W" u2="\" k="-25" />
-<hkern u1="W" u2="S" k="39" />
-<hkern u1="W" u2="O" k="53" />
-<hkern u1="W" u2="J" k="170" />
-<hkern u1="W" u2="A" k="115" />
-<hkern u1="W" u2="@" k="76" />
-<hkern u1="W" u2=":" k="35" />
-<hkern u1="W" u2="9" k="57" />
-<hkern u1="W" u2="8" k="33" />
-<hkern u1="W" u2="6" k="37" />
-<hkern u1="W" u2="5" k="70" />
-<hkern u1="W" u2="4" k="123" />
-<hkern u1="W" u2="3" k="41" />
-<hkern u1="W" u2="2" k="39" />
-<hkern u1="W" u2="1" k="39" />
-<hkern u1="W" u2="0" k="61" />
-<hkern u1="W" u2="/" k="131" />
-<hkern u1="W" u2="." k="141" />
-<hkern u1="W" u2="-" k="82" />
-<hkern u1="W" u2="*" k="-35" />
-<hkern u1="W" u2=")" k="-27" />
-<hkern u1="W" u2="&" k="37" />
-<hkern u1="W" u2=" " k="72" />
-<hkern u1="X" u2="™" k="-35" />
-<hkern u1="X" u2="‹" k="33" />
-<hkern u1="X" u2="’" k="-10" />
-<hkern u1="X" u2="‘" k="-10" />
-<hkern u1="X" u2="ø" k="35" />
-<hkern u1="X" u2="ð" k="72" />
-<hkern u1="X" u2="ï" k="-98" />
-<hkern u1="X" u2="î" k="-33" />
-<hkern u1="X" u2="í" k="10" />
-<hkern u1="X" u2="ì" k="-43" />
-<hkern u1="X" u2="ß" k="10" />
-<hkern u1="X" u2="Ø" k="20" />
-<hkern u1="X" u2="®" k="29" />
-<hkern u1="X" u2="©" k="29" />
-<hkern u1="X" u2="}" k="-8" />
-<hkern u1="X" u2="y" k="59" />
-<hkern u1="X" u2="w" k="63" />
-<hkern u1="X" u2="v" k="61" />
-<hkern u1="X" u2="u" k="45" />
-<hkern u1="X" u2="t" k="23" />
-<hkern u1="X" u2="o" k="78" />
-<hkern u1="X" u2="n" k="16" />
-<hkern u1="X" u2="f" k="37" />
-<hkern u1="X" u2="d" k="74" />
-<hkern u1="X" u2="a" k="16" />
-<hkern u1="X" u2="]" k="-10" />
-<hkern u1="X" u2="\" k="-27" />
-<hkern u1="X" u2="S" k="14" />
-<hkern u1="X" u2="O" k="59" />
-<hkern u1="X" u2="4" k="-18" />
-<hkern u1="X" u2="2" k="-6" />
-<hkern u1="X" u2="0" k="25" />
-<hkern u1="X" u2="/" k="-16" />
-<hkern u1="X" u2="-" k="53" />
-<hkern u1="X" u2="*" k="-37" />
-<hkern u1="X" u2=")" k="-29" />
-<hkern u1="X" u2=" " k="10" />
-<hkern u1="Y" u2="™" k="-33" />
-<hkern u1="Y" u2="›" k="82" />
-<hkern u1="Y" u2="‹" k="125" />
-<hkern u1="Y" u2="’" k="-16" />
-<hkern u1="Y" u2="‘" k="-14" />
-<hkern u1="Y" u2="ö" k="76" />
-<hkern u1="Y" u2="ð" k="174" />
-<hkern u1="Y" u2="ï" k="-100" />
-<hkern u1="Y" u2="î" k="-43" />
-<hkern u1="Y" u2="í" k="39" />
-<hkern u1="Y" u2="ì" k="-49" />
-<hkern u1="Y" u2="ë" k="76" />
-<hkern u1="Y" u2="ä" k="47" />
-<hkern u1="Y" u2="ã" k="53" />
-<hkern u1="Y" u2="ß" k="66" />
-<hkern u1="Y" u2="Ð" k="6" />
-<hkern u1="Y" u2="Æ" k="207" />
-<hkern u1="Y" u2="®" k="61" />
-<hkern u1="Y" u2="©" k="61" />
-<hkern u1="Y" u2="}" k="-10" />
-<hkern u1="Y" u2="z" k="90" />
-<hkern u1="Y" u2="y" k="66" />
-<hkern u1="Y" u2="x" k="66" />
-<hkern u1="Y" u2="w" k="70" />
-<hkern u1="Y" u2="v" k="74" />
-<hkern u1="Y" u2="u" k="119" />
-<hkern u1="Y" u2="t" k="37" />
-<hkern u1="Y" u2="s" k="170" />
-<hkern u1="Y" u2="o" k="170" />
-<hkern u1="Y" u2="n" k="125" />
-<hkern u1="Y" u2="f" k="78" />
-<hkern u1="Y" u2="d" k="166" />
-<hkern u1="Y" u2="a" k="162" />
-<hkern u1="Y" u2="]" k="-12" />
-<hkern u1="Y" u2="\" k="-27" />
-<hkern u1="Y" u2="S" k="49" />
-<hkern u1="Y" u2="O" k="82" />
-<hkern u1="Y" u2="J" k="184" />
-<hkern u1="Y" u2="A" k="143" />
-<hkern u1="Y" u2="@" k="106" />
-<hkern u1="Y" u2=":" k="57" />
-<hkern u1="Y" u2="9" k="86" />
-<hkern u1="Y" u2="8" k="43" />
-<hkern u1="Y" u2="6" k="53" />
-<hkern u1="Y" u2="5" k="86" />
-<hkern u1="Y" u2="4" k="143" />
-<hkern u1="Y" u2="3" k="63" />
-<hkern u1="Y" u2="2" k="63" />
-<hkern u1="Y" u2="1" k="68" />
-<hkern u1="Y" u2="0" k="90" />
-<hkern u1="Y" u2="/" k="131" />
-<hkern u1="Y" u2="." k="156" />
-<hkern u1="Y" u2="-" k="127" />
-<hkern u1="Y" u2="*" k="-39" />
-<hkern u1="Y" u2=")" k="-33" />
-<hkern u1="Y" u2="&" k="47" />
-<hkern u1="Y" u2=" " k="78" />
-<hkern u1="Z" u2="‹" k="12" />
-<hkern u1="Z" u2="ð" k="29" />
-<hkern u1="Z" u2="ï" k="-43" />
-<hkern u1="Z" u2="î" k="-31" />
-<hkern u1="Z" u2="®" k="16" />
-<hkern u1="Z" u2="©" k="16" />
-<hkern u1="Z" u2="y" k="35" />
-<hkern u1="Z" u2="w" k="35" />
-<hkern u1="Z" u2="v" k="37" />
-<hkern u1="Z" u2="u" k="27" />
-<hkern u1="Z" u2="t" k="23" />
-<hkern u1="Z" u2="s" k="6" />
-<hkern u1="Z" u2="o" k="33" />
-<hkern u1="Z" u2="n" k="16" />
-<hkern u1="Z" u2="f" k="31" />
-<hkern u1="Z" u2="d" k="33" />
-<hkern u1="Z" u2="a" k="10" />
-<hkern u1="Z" u2="O" k="31" />
-<hkern u1="Z" u2="0" k="10" />
-<hkern u1="Z" u2="-" k="20" />
-<hkern u1="[" u2="ï" k="-45" />
-<hkern u1="[" u2="î" k="-33" />
-<hkern u1="[" u2="Æ" k="-23" />
-<hkern u1="[" u2="j" k="-43" />
-<hkern u1="[" u2="Y" k="-10" />
-<hkern u1="[" u2="X" k="-10" />
-<hkern u1="[" u2="W" k="-8" />
-<hkern u1="[" u2="V" k="-6" />
-<hkern u1="[" u2="A" k="-6" />
-<hkern u1="\" u2="’" k="168" />
-<hkern u1="\" u2="Ø" k="-10" />
-<hkern u1="\" u2="Æ" k="-37" />
-<hkern u1="\" u2="y" k="66" />
-<hkern u1="\" u2="x" k="-14" />
-<hkern u1="\" u2="w" k="72" />
-<hkern u1="\" u2="v" k="61" />
-<hkern u1="\" u2="t" k="14" />
-<hkern u1="\" u2="Y" k="129" />
-<hkern u1="\" u2="X" k="-16" />
-<hkern u1="\" u2="W" k="125" />
-<hkern u1="\" u2="V" k="121" />
-<hkern u1="\" u2="U" k="37" />
-<hkern u1="\" u2="T" k="115" />
-<hkern u1="\" u2="O" k="37" />
-<hkern u1="\" u2="J" k="-8" />
-<hkern u1="\" u2="A" k="-18" />
-<hkern u1="\" u2="7" k="18" />
-<hkern u1="\" u2="6" k="12" />
-<hkern u1="\" u2="0" k="10" />
-<hkern u1="\" u2="'" k="170" />
-<hkern u1="a" u2="™" k="66" />
-<hkern u1="a" u2="’" k="53" />
-<hkern u1="a" u2="‘" k="57" />
-<hkern u1="a" u2="Ð" k="10" />
-<hkern u1="a" u2="º" k="27" />
-<hkern u1="a" u2="ª" k="14" />
-<hkern u1="a" u2="y" k="39" />
-<hkern u1="a" u2="w" k="47" />
-<hkern u1="a" u2="v" k="41" />
-<hkern u1="a" u2="t" k="16" />
-<hkern u1="a" u2="f" k="6" />
-<hkern u1="a" u2="\" k="90" />
-<hkern u1="a" u2="Z" k="4" />
-<hkern u1="a" u2="Y" k="168" />
-<hkern u1="a" u2="W" k="115" />
-<hkern u1="a" u2="V" k="113" />
-<hkern u1="a" u2="U" k="29" />
-<hkern u1="a" u2="T" k="193" />
-<hkern u1="a" u2="S" k="4" />
-<hkern u1="a" u2="O" k="18" />
-<hkern u1="a" u2="I" k="6" />
-<hkern u1="a" u2="?" k="16" />
-<hkern u1="a" u2="*" k="57" />
-<hkern u1="a" u2="'" k="45" />
-<hkern u1="b" u2="™" k="68" />
-<hkern u1="b" u2="’" k="94" />
-<hkern u1="b" u2="‘" k="104" />
-<hkern u1="b" u2="Ð" k="14" />
-<hkern u1="b" u2="Æ" k="43" />
-<hkern u1="b" u2="º" k="27" />
-<hkern u1="b" u2="ª" k="8" />
-<hkern u1="b" u2="z" k="20" />
-<hkern u1="b" u2="y" k="35" />
-<hkern u1="b" u2="x" k="39" />
-<hkern u1="b" u2="w" k="39" />
-<hkern u1="b" u2="v" k="33" />
-<hkern u1="b" u2="t" k="14" />
-<hkern u1="b" u2="s" k="4" />
-<hkern u1="b" u2="f" k="4" />
-<hkern u1="b" u2="\" k="78" />
-<hkern u1="b" u2="Z" k="39" />
-<hkern u1="b" u2="Y" k="166" />
-<hkern u1="b" u2="X" k="76" />
-<hkern u1="b" u2="W" k="127" />
-<hkern u1="b" u2="V" k="123" />
-<hkern u1="b" u2="U" k="23" />
-<hkern u1="b" u2="T" k="190" />
-<hkern u1="b" u2="S" k="20" />
-<hkern u1="b" u2="J" k="37" />
-<hkern u1="b" u2="I" k="16" />
-<hkern u1="b" u2="A" k="33" />
-<hkern u1="b" u2="?" k="18" />
-<hkern u1="b" u2="." k="8" />
-<hkern u1="b" u2="*" k="78" />
-<hkern u1="b" u2=")" k="35" />
-<hkern u1="b" u2="'" k="117" />
-<hkern u1="c" u2="™" k="39" />
-<hkern u1="c" u2="‹" k="16" />
-<hkern u1="c" u2="’" k="27" />
-<hkern u1="c" u2="‘" k="31" />
-<hkern u1="c" u2="ð" k="14" />
-<hkern u1="c" u2="Ð" k="8" />
-<hkern u1="c" u2="Æ" k="6" />
-<hkern u1="c" u2="y" k="20" />
-<hkern u1="c" u2="x" k="8" />
-<hkern u1="c" u2="w" k="18" />
-<hkern u1="c" u2="v" k="14" />
-<hkern u1="c" u2="s" k="10" />
-<hkern u1="c" u2="o" k="12" />
-<hkern u1="c" u2="d" k="12" />
-<hkern u1="c" u2="\" k="57" />
-<hkern u1="c" u2="Z" k="6" />
-<hkern u1="c" u2="Y" k="147" />
-<hkern u1="c" u2="X" k="14" />
-<hkern u1="c" u2="W" k="111" />
-<hkern u1="c" u2="V" k="109" />
-<hkern u1="c" u2="U" k="16" />
-<hkern u1="c" u2="T" k="176" />
-<hkern u1="c" u2="S" k="16" />
-<hkern u1="c" u2="O" k="10" />
-<hkern u1="c" u2="A" k="12" />
-<hkern u1="c" u2="?" k="10" />
-<hkern u1="c" u2="-" k="23" />
-<hkern u1="c" u2="*" k="33" />
-<hkern u1="c" u2="'" k="10" />
-<hkern u1="d" u2="Ð" k="8" />
-<hkern u1="d" u2="y" k="6" />
-<hkern u1="d" u2="w" k="10" />
-<hkern u1="d" u2="v" k="8" />
-<hkern u1="d" u2="t" k="6" />
-<hkern u1="d" u2="Y" k="16" />
-<hkern u1="d" u2="W" k="14" />
-<hkern u1="d" u2="V" k="14" />
-<hkern u1="d" u2="U" k="20" />
-<hkern u1="d" u2="T" k="16" />
-<hkern u1="d" u2="O" k="16" />
-<hkern u1="e" u2="™" k="53" />
-<hkern u1="e" u2="’" k="45" />
-<hkern u1="e" u2="‘" k="51" />
-<hkern u1="e" u2="Ð" k="12" />
-<hkern u1="e" u2="Æ" k="39" />
-<hkern u1="e" u2="º" k="8" />
-<hkern u1="e" u2="z" k="16" />
-<hkern u1="e" u2="y" k="33" />
-<hkern u1="e" u2="x" k="41" />
-<hkern u1="e" u2="w" k="35" />
-<hkern u1="e" u2="v" k="29" />
-<hkern u1="e" u2="t" k="10" />
-<hkern u1="e" u2="\" k="74" />
-<hkern u1="e" u2="Z" k="35" />
-<hkern u1="e" u2="Y" k="197" />
-<hkern u1="e" u2="X" k="51" />
-<hkern u1="e" u2="W" k="119" />
-<hkern u1="e" u2="V" k="117" />
-<hkern u1="e" u2="U" k="16" />
-<hkern u1="e" u2="T" k="197" />
-<hkern u1="e" u2="S" k="16" />
-<hkern u1="e" u2="J" k="31" />
-<hkern u1="e" u2="I" k="14" />
-<hkern u1="e" u2="A" k="29" />
-<hkern u1="e" u2="?" k="18" />
-<hkern u1="e" u2="*" k="53" />
-<hkern u1="e" u2=")" k="29" />
-<hkern u1="e" u2="'" k="41" />
-<hkern u1="f" u2="™" k="-45" />
-<hkern u1="f" u2="‹" k="33" />
-<hkern u1="f" u2="’" k="-10" />
-<hkern u1="f" u2="‘" k="-10" />
-<hkern u1="f" u2="ð" k="35" />
-<hkern u1="f" u2="ï" k="-121" />
-<hkern u1="f" u2="î" k="-66" />
-<hkern u1="f" u2="ì" k="-55" />
-<hkern u1="f" u2="Æ" k="94" />
-<hkern u1="f" u2="}" k="-16" />
-<hkern u1="f" u2="z" k="4" />
-<hkern u1="f" u2="o" k="10" />
-<hkern u1="f" u2="d" k="8" />
-<hkern u1="f" u2="a" k="16" />
-<hkern u1="f" u2="]" k="-18" />
-<hkern u1="f" u2="\" k="-45" />
-<hkern u1="f" u2="Z" k="-10" />
-<hkern u1="f" u2="Y" k="-90" />
-<hkern u1="f" u2="X" k="-94" />
-<hkern u1="f" u2="W" k="-82" />
-<hkern u1="f" u2="V" k="-82" />
-<hkern u1="f" u2="T" k="-61" />
-<hkern u1="f" u2="S" k="6" />
-<hkern u1="f" u2="J" k="117" />
-<hkern u1="f" u2="A" k="76" />
-<hkern u1="f" u2="/" k="51" />
-<hkern u1="f" u2="." k="61" />
-<hkern u1="f" u2="-" k="37" />
-<hkern u1="f" u2="*" k="-25" />
-<hkern u1="f" u2=")" k="-55" />
-<hkern u1="f" u2=" " k="35" />
-<hkern u1="g" u2="j" k="-70" />
-<hkern u1="g" u2="Z" k="14" />
-<hkern u1="g" u2="Y" k="125" />
-<hkern u1="g" u2="X" k="16" />
-<hkern u1="g" u2="W" k="88" />
-<hkern u1="g" u2="V" k="84" />
-<hkern u1="g" u2="U" k="16" />
-<hkern u1="g" u2="T" k="139" />
-<hkern u1="g" u2="S" k="6" />
-<hkern u1="g" u2="O" k="10" />
-<hkern u1="h" u2="™" k="57" />
-<hkern u1="h" u2="’" k="74" />
-<hkern u1="h" u2="‘" k="78" />
-<hkern u1="h" u2="º" k="10" />
-<hkern u1="h" u2="y" k="18" />
-<hkern u1="h" u2="w" k="23" />
-<hkern u1="h" u2="v" k="18" />
-<hkern u1="h" u2="t" k="4" />
-<hkern u1="h" u2="\" k="68" />
-<hkern u1="h" u2="Z" k="16" />
-<hkern u1="h" u2="Y" k="147" />
-<hkern u1="h" u2="X" k="10" />
-<hkern u1="h" u2="W" k="109" />
-<hkern u1="h" u2="V" k="106" />
-<hkern u1="h" u2="U" k="23" />
-<hkern u1="h" u2="T" k="182" />
-<hkern u1="h" u2="S" k="10" />
-<hkern u1="h" u2="O" k="10" />
-<hkern u1="h" u2="?" k="16" />
-<hkern u1="h" u2="*" k="57" />
-<hkern u1="h" u2="'" k="102" />
-<hkern u1="i" u2="ï" k="-33" />
-<hkern u1="i" u2="î" k="-18" />
-<hkern u1="i" u2="Z" k="12" />
-<hkern u1="i" u2="U" k="12" />
-<hkern u1="i" u2="S" k="6" />
-<hkern u1="i" u2="O" k="6" />
-<hkern u1="j" u2="j" k="-72" />
-<hkern u1="k" u2="‹" k="53" />
-<hkern u1="k" u2="„" k="-12" />
-<hkern u1="k" u2="‚" k="-12" />
-<hkern u1="k" u2="’" k="10" />
-<hkern u1="k" u2="‘" k="16" />
-<hkern u1="k" u2="ø" k="20" />
-<hkern u1="k" u2="ð" k="59" />
-<hkern u1="k" u2="}" k="-6" />
-<hkern u1="k" u2="s" k="10" />
-<hkern u1="k" u2="o" k="51" />
-<hkern u1="k" u2="f" k="6" />
-<hkern u1="k" u2="d" k="49" />
-<hkern u1="k" u2="a" k="18" />
-<hkern u1="k" u2="]" k="-6" />
-<hkern u1="k" u2="Y" k="72" />
-<hkern u1="k" u2="W" k="33" />
-<hkern u1="k" u2="V" k="31" />
-<hkern u1="k" u2="U" k="8" />
-<hkern u1="k" u2="T" k="115" />
-<hkern u1="k" u2="O" k="31" />
-<hkern u1="k" u2="/" k="-23" />
-<hkern u1="k" u2="-" k="59" />
-<hkern u1="k" u2="," k="-12" />
-<hkern u1="k" u2="*" k="-23" />
-<hkern u1="k" u2=")" k="-25" />
-<hkern u1="k" u2="'" k="55" />
-<hkern u1="l" u2="™" k="43" />
-<hkern u1="l" u2="‹" k="20" />
-<hkern u1="l" u2="’" k="43" />
-<hkern u1="l" u2="‘" k="43" />
-<hkern u1="l" u2="ð" k="6" />
-<hkern u1="l" u2="Æ" k="-6" />
-<hkern u1="l" u2="º" k="41" />
-<hkern u1="l" u2="·" k="141" />
-<hkern u1="l" u2="®" k="10" />
-<hkern u1="l" u2="ª" k="41" />
-<hkern u1="l" u2="©" k="10" />
-<hkern u1="l" u2="y" k="45" />
-<hkern u1="l" u2="w" k="55" />
-<hkern u1="l" u2="v" k="45" />
-<hkern u1="l" u2="t" k="23" />
-<hkern u1="l" u2="o" k="6" />
-<hkern u1="l" u2="f" k="16" />
-<hkern u1="l" u2="d" k="6" />
-<hkern u1="l" u2="\" k="31" />
-<hkern u1="l" u2="Y" k="78" />
-<hkern u1="l" u2="W" k="74" />
-<hkern u1="l" u2="V" k="72" />
-<hkern u1="l" u2="U" k="47" />
-<hkern u1="l" u2="T" k="63" />
-<hkern u1="l" u2="O" k="37" />
-<hkern u1="l" u2="I" k="8" />
-<hkern u1="l" u2="/" k="-16" />
-<hkern u1="l" u2="-" k="20" />
-<hkern u1="l" u2="*" k="45" />
-<hkern u1="l" u2=")" k="-14" />
-<hkern u1="l" u2="'" k="41" />
-<hkern u1="l" u2=" " k="51" />
-<hkern u1="n" u2="™" k="45" />
-<hkern u1="n" u2="’" k="29" />
-<hkern u1="n" u2="‘" k="31" />
-<hkern u1="n" u2="y" k="16" />
-<hkern u1="n" u2="w" k="20" />
-<hkern u1="n" u2="v" k="16" />
-<hkern u1="n" u2="t" k="4" />
-<hkern u1="n" u2="\" k="66" />
-<hkern u1="n" u2="Z" k="16" />
-<hkern u1="n" u2="Y" k="145" />
-<hkern u1="n" u2="X" k="10" />
-<hkern u1="n" u2="W" k="109" />
-<hkern u1="n" u2="V" k="106" />
-<hkern u1="n" u2="U" k="23" />
-<hkern u1="n" u2="T" k="182" />
-<hkern u1="n" u2="S" k="10" />
-<hkern u1="n" u2="O" k="10" />
-<hkern u1="n" u2="?" k="12" />
-<hkern u1="n" u2="*" k="33" />
-<hkern u1="n" u2="'" k="20" />
-<hkern u1="o" u2="™" k="57" />
-<hkern u1="o" u2="’" k="51" />
-<hkern u1="o" u2="‘" k="59" />
-<hkern u1="o" u2="Ð" k="14" />
-<hkern u1="o" u2="Æ" k="45" />
-<hkern u1="o" u2="º" k="10" />
-<hkern u1="o" u2="z" k="23" />
-<hkern u1="o" u2="y" k="37" />
-<hkern u1="o" u2="x" k="41" />
-<hkern u1="o" u2="w" k="41" />
-<hkern u1="o" u2="v" k="35" />
-<hkern u1="o" u2="t" k="16" />
-<hkern u1="o" u2="s" k="4" />
-<hkern u1="o" u2="f" k="8" />
-<hkern u1="o" u2="\" k="76" />
-<hkern u1="o" u2="Z" k="39" />
-<hkern u1="o" u2="Y" k="170" />
-<hkern u1="o" u2="X" k="78" />
-<hkern u1="o" u2="W" k="129" />
-<hkern u1="o" u2="V" k="127" />
-<hkern u1="o" u2="U" k="23" />
-<hkern u1="o" u2="T" k="197" />
-<hkern u1="o" u2="S" k="20" />
-<hkern u1="o" u2="J" k="37" />
-<hkern u1="o" u2="I" k="18" />
-<hkern u1="o" u2="A" k="35" />
-<hkern u1="o" u2="?" k="18" />
-<hkern u1="o" u2="*" k="57" />
-<hkern u1="o" u2=")" k="35" />
-<hkern u1="o" u2="'" k="45" />
-<hkern u1="q" u2="„" k="-16" />
-<hkern u1="q" u2="‚" k="-16" />
-<hkern u1="q" u2="j" k="-227" />
-<hkern u1="q" u2="Z" k="14" />
-<hkern u1="q" u2="Y" k="125" />
-<hkern u1="q" u2="X" k="16" />
-<hkern u1="q" u2="W" k="88" />
-<hkern u1="q" u2="V" k="84" />
-<hkern u1="q" u2="U" k="16" />
-<hkern u1="q" u2="T" k="139" />
-<hkern u1="q" u2="S" k="6" />
-<hkern u1="q" u2="O" k="10" />
-<hkern u1="q" u2=";" k="-8" />
-<hkern u1="q" u2="," k="-16" />
-<hkern u1="r" u2="›" k="18" />
-<hkern u1="r" u2="‹" k="61" />
-<hkern u1="r" u2="ð" k="55" />
-<hkern u1="r" u2="Æ" k="111" />
-<hkern u1="r" u2="s" k="6" />
-<hkern u1="r" u2="o" k="37" />
-<hkern u1="r" u2="d" k="35" />
-<hkern u1="r" u2="a" k="18" />
-<hkern u1="r" u2="Z" k="45" />
-<hkern u1="r" u2="Y" k="59" />
-<hkern u1="r" u2="X" k="68" />
-<hkern u1="r" u2="W" k="25" />
-<hkern u1="r" u2="V" k="23" />
-<hkern u1="r" u2="T" k="109" />
-<hkern u1="r" u2="S" k="6" />
-<hkern u1="r" u2="J" k="158" />
-<hkern u1="r" u2="I" k="6" />
-<hkern u1="r" u2="A" k="92" />
-<hkern u1="r" u2="@" k="16" />
-<hkern u1="r" u2="/" k="76" />
-<hkern u1="r" u2="." k="94" />
-<hkern u1="r" u2="-" k="49" />
-<hkern u1="r" u2=")" k="16" />
-<hkern u1="r" u2=" " k="43" />
-<hkern u1="s" u2="™" k="33" />
-<hkern u1="s" u2="’" k="8" />
-<hkern u1="s" u2="‘" k="8" />
-<hkern u1="s" u2="Ð" k="10" />
-<hkern u1="s" u2="y" k="25" />
-<hkern u1="s" u2="x" k="12" />
-<hkern u1="s" u2="w" k="25" />
-<hkern u1="s" u2="v" k="18" />
-<hkern u1="s" u2="t" k="4" />
-<hkern u1="s" u2="f" k="6" />
-<hkern u1="s" u2="\" k="53" />
-<hkern u1="s" u2="Z" k="4" />
-<hkern u1="s" u2="Y" k="137" />
-<hkern u1="s" u2="X" k="14" />
-<hkern u1="s" u2="W" k="100" />
-<hkern u1="s" u2="V" k="94" />
-<hkern u1="s" u2="U" k="23" />
-<hkern u1="s" u2="T" k="162" />
-<hkern u1="s" u2="O" k="8" />
-<hkern u1="s" u2="I" k="12" />
-<hkern u1="s" u2="A" k="18" />
-<hkern u1="s" u2="-" k="10" />
-<hkern u1="s" u2="*" k="10" />
-<hkern u1="t" u2="™" k="16" />
-<hkern u1="t" u2="‹" k="27" />
-<hkern u1="t" u2="’" k="8" />
-<hkern u1="t" u2="‘" k="10" />
-<hkern u1="t" u2="ð" k="20" />
-<hkern u1="t" u2="y" k="4" />
-<hkern u1="t" u2="w" k="6" />
-<hkern u1="t" u2="v" k="4" />
-<hkern u1="t" u2="t" k="6" />
-<hkern u1="t" u2="o" k="18" />
-<hkern u1="t" u2="f" k="4" />
-<hkern u1="t" u2="d" k="18" />
-<hkern u1="t" u2="\" k="33" />
-<hkern u1="t" u2="Y" k="104" />
-<hkern u1="t" u2="W" k="68" />
-<hkern u1="t" u2="V" k="63" />
-<hkern u1="t" u2="U" k="23" />
-<hkern u1="t" u2="T" k="86" />
-<hkern u1="t" u2="O" k="18" />
-<hkern u1="t" u2="I" k="6" />
-<hkern u1="t" u2="-" k="18" />
-<hkern u1="t" u2="'" k="20" />
-<hkern u1="u" u2="™" k="31" />
-<hkern u1="u" u2="’" k="14" />
-<hkern u1="u" u2="‘" k="10" />
-<hkern u1="u" u2="Ð" k="8" />
-<hkern u1="u" u2="y" k="6" />
-<hkern u1="u" u2="w" k="10" />
-<hkern u1="u" u2="v" k="8" />
-<hkern u1="u" u2="t" k="6" />
-<hkern u1="u" u2="\" k="55" />
-<hkern u1="u" u2="Z" k="4" />
-<hkern u1="u" u2="Y" k="139" />
-<hkern u1="u" u2="W" k="88" />
-<hkern u1="u" u2="V" k="86" />
-<hkern u1="u" u2="U" k="20" />
-<hkern u1="u" u2="T" k="164" />
-<hkern u1="u" u2="O" k="16" />
-<hkern u1="u" u2="*" k="10" />
-<hkern u1="v" u2="‹" k="43" />
-<hkern u1="v" u2="ð" k="53" />
-<hkern u1="v" u2="Ð" k="10" />
-<hkern u1="v" u2="Æ" k="104" />
-<hkern u1="v" u2="º" k="-6" />
-<hkern u1="v" u2="s" k="27" />
-<hkern u1="v" u2="o" k="35" />
-<hkern u1="v" u2="d" k="33" />
-<hkern u1="v" u2="a" k="27" />
-<hkern u1="v" u2="\" k="25" />
-<hkern u1="v" u2="Z" k="37" />
-<hkern u1="v" u2="Y" k="76" />
-<hkern u1="v" u2="X" k="61" />
-<hkern u1="v" u2="W" k="29" />
-<hkern u1="v" u2="V" k="29" />
-<hkern u1="v" u2="T" k="121" />
-<hkern u1="v" u2="J" k="135" />
-<hkern u1="v" u2="A" k="66" />
-<hkern u1="v" u2="@" k="10" />
-<hkern u1="v" u2="/" k="63" />
-<hkern u1="v" u2="." k="82" />
-<hkern u1="v" u2="-" k="37" />
-<hkern u1="v" u2="*" k="-23" />
-<hkern u1="v" u2=")" k="27" />
-<hkern u1="v" u2=" " k="55" />
-<hkern u1="w" u2="‹" k="51" />
-<hkern u1="w" u2="ð" k="59" />
-<hkern u1="w" u2="Ð" k="10" />
-<hkern u1="w" u2="Æ" k="109" />
-<hkern u1="w" u2="º" k="-8" />
-<hkern u1="w" u2="s" k="33" />
-<hkern u1="w" u2="o" k="41" />
-<hkern u1="w" u2="d" k="39" />
-<hkern u1="w" u2="a" k="29" />
-<hkern u1="w" u2="\" k="27" />
-<hkern u1="w" u2="Z" k="39" />
-<hkern u1="w" u2="Y" k="72" />
-<hkern u1="w" u2="X" k="63" />
-<hkern u1="w" u2="W" k="27" />
-<hkern u1="w" u2="V" k="27" />
-<hkern u1="w" u2="T" k="119" />
-<hkern u1="w" u2="S" k="6" />
-<hkern u1="w" u2="O" k="6" />
-<hkern u1="w" u2="J" k="156" />
-<hkern u1="w" u2="A" k="72" />
-<hkern u1="w" u2="@" k="10" />
-<hkern u1="w" u2="/" k="74" />
-<hkern u1="w" u2="." k="92" />
-<hkern u1="w" u2="-" k="41" />
-<hkern u1="w" u2="*" k="-27" />
-<hkern u1="w" u2=")" k="29" />
-<hkern u1="w" u2=" " k="57" />
-<hkern u1="x" u2="‹" k="51" />
-<hkern u1="x" u2="ð" k="51" />
-<hkern u1="x" u2="s" k="10" />
-<hkern u1="x" u2="o" k="41" />
-<hkern u1="x" u2="f" k="4" />
-<hkern u1="x" u2="d" k="39" />
-<hkern u1="x" u2="a" k="18" />
-<hkern u1="x" u2="Y" k="68" />
-<hkern u1="x" u2="W" k="29" />
-<hkern u1="x" u2="V" k="27" />
-<hkern u1="x" u2="U" k="6" />
-<hkern u1="x" u2="T" k="109" />
-<hkern u1="x" u2="O" k="25" />
-<hkern u1="x" u2="/" k="-14" />
-<hkern u1="x" u2="-" k="55" />
-<hkern u1="x" u2="*" k="-27" />
-<hkern u1="x" u2=")" k="-16" />
-<hkern u1="y" u2="‹" k="45" />
-<hkern u1="y" u2="ð" k="53" />
-<hkern u1="y" u2="Ð" k="12" />
-<hkern u1="y" u2="Æ" k="104" />
-<hkern u1="y" u2="s" k="29" />
-<hkern u1="y" u2="o" k="37" />
-<hkern u1="y" u2="d" k="35" />
-<hkern u1="y" u2="a" k="27" />
-<hkern u1="y" u2="\" k="27" />
-<hkern u1="y" u2="Z" k="41" />
-<hkern u1="y" u2="Y" k="82" />
-<hkern u1="y" u2="X" k="68" />
-<hkern u1="y" u2="W" k="37" />
-<hkern u1="y" u2="V" k="37" />
-<hkern u1="y" u2="T" k="125" />
-<hkern u1="y" u2="S" k="6" />
-<hkern u1="y" u2="J" k="133" />
-<hkern u1="y" u2="I" k="4" />
-<hkern u1="y" u2="A" k="66" />
-<hkern u1="y" u2="@" k="10" />
-<hkern u1="y" u2="/" k="59" />
-<hkern u1="y" u2="." k="80" />
-<hkern u1="y" u2="-" k="37" />
-<hkern u1="y" u2=")" k="29" />
-<hkern u1="y" u2="&" k="10" />
-<hkern u1="y" u2=" " k="51" />
-<hkern u1="z" u2="‹" k="31" />
-<hkern u1="z" u2="ð" k="29" />
-<hkern u1="z" u2="Ð" k="8" />
-<hkern u1="z" u2="o" k="20" />
-<hkern u1="z" u2="d" k="20" />
-<hkern u1="z" u2="\" k="20" />
-<hkern u1="z" u2="Y" k="98" />
-<hkern u1="z" u2="W" k="55" />
-<hkern u1="z" u2="V" k="53" />
-<hkern u1="z" u2="U" k="18" />
-<hkern u1="z" u2="T" k="135" />
-<hkern u1="z" u2="O" k="8" />
-<hkern u1="z" u2="I" k="6" />
-<hkern u1="z" u2="-" k="37" />
-<hkern u1="{" u2="ï" k="-45" />
-<hkern u1="{" u2="î" k="-33" />
-<hkern u1="{" u2="Æ" k="-23" />
-<hkern u1="{" u2="j" k="-35" />
-<hkern u1="{" u2="Y" k="-10" />
-<hkern u1="{" u2="X" k="-8" />
-<hkern u1="{" u2="W" k="-6" />
-<hkern u1="|" u2="ï" k="-23" />
-<hkern u1="|" u2="î" k="-8" />
-<hkern u1="|" u2="Ï" k="-12" />
-<hkern u1="|" u2="j" k="-135" />
-<hkern u1="¡" u2="ï" k="-14" />
-<hkern u1="°" u2="9" k="47" />
-<hkern u1="°" u2="5" k="39" />
-<hkern u1="°" u2="4" k="170" />
-<hkern u1="°" u2="3" k="20" />
-<hkern u1="°" u2="1" k="16" />
-<hkern u1="°" u2="0" k="33" />
-<hkern u1="·" u2="l" k="74" />
-<hkern u1="·" u2="7" k="37" />
-<hkern u1="·" u2="4" k="27" />
-<hkern u1="·" u2="3" k="49" />
-<hkern u1="·" u2="2" k="16" />
-<hkern u1="·" u2="1" k="27" />
-<hkern u1="¿" u2="ð" k="33" />
-<hkern u1="¿" u2="Ð" k="27" />
-<hkern u1="¿" u2="Æ" k="25" />
-<hkern u1="¿" u2="z" k="23" />
-<hkern u1="¿" u2="y" k="33" />
-<hkern u1="¿" u2="x" k="20" />
-<hkern u1="¿" u2="w" k="55" />
-<hkern u1="¿" u2="v" k="49" />
-<hkern u1="¿" u2="u" k="27" />
-<hkern u1="¿" u2="t" k="27" />
-<hkern u1="¿" u2="s" k="33" />
-<hkern u1="¿" u2="o" k="31" />
-<hkern u1="¿" u2="n" k="23" />
-<hkern u1="¿" u2="l" k="27" />
-<hkern u1="¿" u2="j" k="-174" />
-<hkern u1="¿" u2="i" k="23" />
-<hkern u1="¿" u2="h" k="23" />
-<hkern u1="¿" u2="f" k="27" />
-<hkern u1="¿" u2="d" k="31" />
-<hkern u1="¿" u2="a" k="33" />
-<hkern u1="¿" u2="Z" k="27" />
-<hkern u1="¿" u2="Y" k="109" />
-<hkern u1="¿" u2="X" k="23" />
-<hkern u1="¿" u2="W" k="86" />
-<hkern u1="¿" u2="V" k="86" />
-<hkern u1="¿" u2="U" k="27" />
-<hkern u1="¿" u2="T" k="104" />
-<hkern u1="¿" u2="S" k="27" />
-<hkern u1="¿" u2="O" k="27" />
-<hkern u1="¿" u2="J" k="49" />
-<hkern u1="¿" u2="I" k="18" />
-<hkern u1="¿" u2="A" k="27" />
-<hkern u1="Ï" u2="|" k="-10" />
-<hkern u1="Ø" u2="™" k="-16" />
-<hkern u1="Ø" u2="\" k="-12" />
-<hkern u1="Ø" u2="Y" k="27" />
-<hkern u1="Ø" u2="X" k="18" />
-<hkern u1="Ø" u2="W" k="16" />
-<hkern u1="Ø" u2="V" k="14" />
-<hkern u1="Ø" u2="*" k="-25" />
-<hkern u1="Ø" u2=")" k="-16" />
-<hkern u1="Þ" u2="™" k="37" />
-<hkern u1="Þ" u2="’" k="51" />
-<hkern u1="Þ" u2="‘" k="57" />
-<hkern u1="Þ" u2="Ð" k="6" />
-<hkern u1="Þ" u2="Æ" k="96" />
-<hkern u1="Þ" u2="}" k="14" />
-<hkern u1="Þ" u2="y" k="12" />
-<hkern u1="Þ" u2="x" k="14" />
-<hkern u1="Þ" u2="w" k="4" />
-<hkern u1="Þ" u2="a" k="6" />
-<hkern u1="Þ" u2="]" k="16" />
-<hkern u1="Þ" u2="\" k="55" />
-<hkern u1="Þ" u2="Z" k="43" />
-<hkern u1="Þ" u2="Y" k="113" />
-<hkern u1="Þ" u2="X" k="90" />
-<hkern u1="Þ" u2="W" k="66" />
-<hkern u1="Þ" u2="V" k="61" />
-<hkern u1="Þ" u2="T" k="90" />
-<hkern u1="Þ" u2="S" k="6" />
-<hkern u1="Þ" u2="J" k="80" />
-<hkern u1="Þ" u2="A" k="55" />
-<hkern u1="Þ" u2="?" k="12" />
-<hkern u1="Þ" u2="/" k="55" />
-<hkern u1="Þ" u2="." k="51" />
-<hkern u1="Þ" u2="-" k="8" />
-<hkern u1="Þ" u2="*" k="37" />
-<hkern u1="Þ" u2=")" k="39" />
-<hkern u1="Þ" u2="'" k="76" />
-<hkern u1="ß" u2="™" k="27" />
-<hkern u1="ß" u2="’" k="20" />
-<hkern u1="ß" u2="‘" k="18" />
-<hkern u1="ß" u2="Ð" k="16" />
-<hkern u1="ß" u2="Æ" k="25" />
-<hkern u1="ß" u2="ª" k="8" />
-<hkern u1="ß" u2="z" k="14" />
-<hkern u1="ß" u2="y" k="35" />
-<hkern u1="ß" u2="x" k="35" />
-<hkern u1="ß" u2="w" k="37" />
-<hkern u1="ß" u2="v" k="35" />
-<hkern u1="ß" u2="t" k="18" />
-<hkern u1="ß" u2="s" k="6" />
-<hkern u1="ß" u2="f" k="12" />
-<hkern u1="ß" u2="\" k="25" />
-<hkern u1="ß" u2="Z" k="23" />
-<hkern u1="ß" u2="Y" k="90" />
-<hkern u1="ß" u2="X" k="49" />
-<hkern u1="ß" u2="W" k="72" />
-<hkern u1="ß" u2="V" k="70" />
-<hkern u1="ß" u2="U" k="27" />
-<hkern u1="ß" u2="T" k="59" />
-<hkern u1="ß" u2="S" k="10" />
-<hkern u1="ß" u2="O" k="12" />
-<hkern u1="ß" u2="J" k="10" />
-<hkern u1="ß" u2="I" k="18" />
-<hkern u1="ß" u2="A" k="25" />
-<hkern u1="ß" u2="*" k="20" />
-<hkern u1="ß" u2="'" k="23" />
-<hkern u1="ç" u2="j" k="-23" />
-<hkern u1="í" u2="™" k="-8" />
-<hkern u1="í" u2="’" k="-8" />
-<hkern u1="í" u2="‘" k="-8" />
-<hkern u1="í" u2="\" k="-10" />
-<hkern u1="í" u2="*" k="-10" />
-<hkern u1="í" u2=")" k="-27" />
-<hkern u1="î" u2="™" k="-57" />
-<hkern u1="î" u2="’" k="-33" />
-<hkern u1="î" u2="‘" k="-33" />
-<hkern u1="î" u2="ß" k="-8" />
-<hkern u1="î" u2="º" k="-27" />
-<hkern u1="î" u2="ª" k="-10" />
-<hkern u1="î" u2="}" k="-33" />
-<hkern u1="î" u2="|" k="-8" />
-<hkern u1="î" u2="l" k="-23" />
-<hkern u1="î" u2="i" k="-18" />
-<hkern u1="î" u2="h" k="-18" />
-<hkern u1="î" u2="]" k="-33" />
-<hkern u1="î" u2="?" k="-27" />
-<hkern u1="î" u2="*" k="-66" />
-<hkern u1="î" u2=")" k="-14" />
-<hkern u1="î" u2="'" k="-16" />
-<hkern u1="ï" u2="™" k="-59" />
-<hkern u1="ï" u2="’" k="-49" />
-<hkern u1="ï" u2="‘" k="-49" />
-<hkern u1="ï" u2="ß" k="-23" />
-<hkern u1="ï" u2="º" k="-49" />
-<hkern u1="ï" u2="ª" k="-35" />
-<hkern u1="ï" u2="}" k="-45" />
-<hkern u1="ï" u2="|" k="-23" />
-<hkern u1="ï" u2="l" k="-35" />
-<hkern u1="ï" u2="i" k="-33" />
-<hkern u1="ï" u2="h" k="-33" />
-<hkern u1="ï" u2="]" k="-45" />
-<hkern u1="ï" u2="\" k="-63" />
-<hkern u1="ï" u2="?" k="-49" />
-<hkern u1="ï" u2="*" k="-78" />
-<hkern u1="ï" u2=")" k="-70" />
-<hkern u1="ï" u2="'" k="-31" />
-<hkern u1="ï" u2="!" k="-14" />
-<hkern u1="ð" u2="™" k="12" />
-<hkern u1="ð" u2="’" k="16" />
-<hkern u1="ð" u2="‘" k="16" />
-<hkern u1="ð" u2="Ð" k="10" />
-<hkern u1="ð" u2="Æ" k="51" />
-<hkern u1="ð" u2="z" k="12" />
-<hkern u1="ð" u2="y" k="27" />
-<hkern u1="ð" u2="x" k="31" />
-<hkern u1="ð" u2="w" k="27" />
-<hkern u1="ð" u2="v" k="23" />
-<hkern u1="ð" u2="t" k="4" />
-<hkern u1="ð" u2="\" k="10" />
-<hkern u1="ð" u2="Z" k="47" />
-<hkern u1="ð" u2="Y" k="70" />
-<hkern u1="ð" u2="X" k="57" />
-<hkern u1="ð" u2="W" k="57" />
-<hkern u1="ð" u2="V" k="55" />
-<hkern u1="ð" u2="U" k="18" />
-<hkern u1="ð" u2="T" k="55" />
-<hkern u1="ð" u2="S" k="18" />
-<hkern u1="ð" u2="J" k="41" />
-<hkern u1="ð" u2="I" k="14" />
-<hkern u1="ð" u2="A" k="37" />
-<hkern u1="ð" u2="/" k="14" />
-<hkern u1="ð" u2="*" k="18" />
-<hkern u1="ð" u2=")" k="10" />
-<hkern u1="ð" u2="'" k="14" />
-<hkern u1="ø" u2="*" k="8" />
-<hkern u1="‘" u2="ð" k="86" />
-<hkern u1="‘" u2="ï" k="-39" />
-<hkern u1="‘" u2="î" k="-16" />
-<hkern u1="‘" u2="Æ" k="182" />
-<hkern u1="‘" u2="s" k="10" />
-<hkern u1="‘" u2="o" k="39" />
-<hkern u1="‘" u2="f" k="8" />
-<hkern u1="‘" u2="d" k="84" />
-<hkern u1="‘" u2="a" k="16" />
-<hkern u1="‘" u2="O" k="8" />
-<hkern u1="‘" u2="J" k="170" />
-<hkern u1="‘" u2="A" k="117" />
-<hkern u1="‘" u2="." k="248" />
-<hkern u1="’" u2="‹" k="35" />
-<hkern u1="’" u2="ð" k="88" />
-<hkern u1="’" u2="ï" k="-33" />
-<hkern u1="’" u2="î" k="-16" />
-<hkern u1="’" u2="Æ" k="184" />
-<hkern u1="’" u2="s" k="12" />
-<hkern u1="’" u2="o" k="41" />
-<hkern u1="’" u2="f" k="8" />
-<hkern u1="’" u2="d" k="86" />
-<hkern u1="’" u2="a" k="16" />
-<hkern u1="’" u2="O" k="10" />
-<hkern u1="’" u2="J" k="170" />
-<hkern u1="’" u2="A" k="121" />
-<hkern u1="’" u2="@" k="55" />
-<hkern u1="’" u2="/" k="178" />
-<hkern u1="’" u2="." k="250" />
-<hkern u1="’" u2=" " k="47" />
-<hkern u1="‚" u2="j" k="-39" />
-<hkern u1="„" u2="j" k="-39" />
-<hkern u1="‹" u2="Y" k="84" />
-<hkern u1="‹" u2="W" k="51" />
-<hkern u1="‹" u2="V" k="49" />
-<hkern u1="‹" u2="T" k="70" />
-<hkern u1="›" u2="’" k="45" />
-<hkern u1="›" u2="Ð" k="10" />
-<hkern u1="›" u2="Æ" k="41" />
-<hkern u1="›" u2="z" k="31" />
-<hkern u1="›" u2="y" k="45" />
-<hkern u1="›" u2="x" k="51" />
-<hkern u1="›" u2="w" k="51" />
-<hkern u1="›" u2="v" k="43" />
-<hkern u1="›" u2="t" k="12" />
-<hkern u1="›" u2="s" k="10" />
-<hkern u1="›" u2="f" k="10" />
-<hkern u1="›" u2="Z" k="14" />
-<hkern u1="›" u2="Y" k="125" />
-<hkern u1="›" u2="X" k="33" />
-<hkern u1="›" u2="W" k="86" />
-<hkern u1="›" u2="V" k="84" />
-<hkern u1="›" u2="T" k="117" />
-<hkern u1="›" u2="J" k="33" />
-<hkern u1="›" u2="A" k="27" />
-<hkern u1="›" u2="'" k="23" />
-<hkern u1="€" u2="3" k="10" />
-<hkern g1="uniFB01" u2="ï" k="-10" />
-<hkern g1="uniFB03" u2="ï" k="-10" />
-</font>
-</defs></svg>
\ No newline at end of file
+++ /dev/null
-@charset "UTF-8";
-img, object, embed, video {
- max-width: 100%;
-}
-.ie6 img {
- width:100%;
-}
-@font-face {
- font-family: 'ralewaylight';
- src: url('fonts/raleway-light-webfont.eot');
- src: url('fonts/raleway-light-webfont.eot?#iefix') format('embedded-opentype'),
- url('fonts/raleway-light-webfont.woff') format('woff'),
- url('fonts/raleway-light-webfont.ttf') format('truetype'),
- url('fonts/raleway-light-webfont.svg#ralewaylight') format('svg');
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: 'ralewayregular';
- src: url('fonts/raleway-regular-webfont.eot');
- src: url('fonts/raleway-regular-webfont.eot?#iefix') format('embedded-opentype'),
- url('fonts/raleway-regular-webfont.woff') format('woff'),
- url('fonts/raleway-regular-webfont.ttf') format('truetype'),
- url('fonts/raleway-regular-webfont.svg#ralewayregular') format('svg');
- font-weight: normal;
- font-style: normal;
-}
-@font-face {
- font-family: 'ralewaysemibold';
- src: url('fonts/raleway-semibold-webfont.eot');
- src: url('fonts/raleway-semibold-webfont.eot?#iefix') format('embedded-opentype'),
- url('fonts/raleway-semibold-webfont.woff') format('woff'),
- url('fonts/raleway-semibold-webfont.ttf') format('truetype'),
- url('fonts/raleway-semibold-webfont.svg#ralewaysemibold') format('svg');
- font-weight: normal;
- font-style: normal;
-}
-html, body, h1, h2, h3, p, ul, li {margin:0;padding:0; line-height:1em;font-size:1em;}
-html, body {
- height:100%;
- min-height:100%;
-}
-/***************************************************************************************************************** 250px to 480px */
-body {
- background-image: -webkit-gradient(
- linear,
- left top,
- left bottom,color-stop(0, #6E6657),color-stop(1, #4F526E), color-stop(1, #FFFFFF));
- background-image: -o-linear-gradient(bottom, #6E6657 0%, #4F526E 100%, #FFFFFF 100%);
- background-image: -moz-linear-gradient(bottom, #6E6657 0%, #4F526E 100%, #FFFFFF 100%);
- background-image: -webkit-linear-gradient(bottom, #6E6657 0%, #4F526E 100%, #FFFFFF 100%);
- background-image: -ms-linear-gradient(bottom, #6E6657 0%, #4F526E 100%, #FFFFFF 100%);
- background-image: linear-gradient(to bottom, #6E6657 0%, #4F526E 100%, #FFFFFF 100%);
-}
-#container {
- width:100%;
- margin:0 auto;
-}
-h1 {
- font-family:ralewaylight, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:100%;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- text-align:center;
- padding:.66em 0 0 0;
-}
-h1 span {
- font-size:.5em;
- display:block;
- line-height:1em;
- margin:35px 0 0 0;
-}
-h2 {
- background-color:rgba(255,255,255,0.2);
- width:100%;
- position:absolute;
- top:0;
-}
-a.tel{
- font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:1.4em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- display:block;
- max-width:50%;
- padding:.6em 3%;
- float:right;
- text-decoration:none;
-}
-a.tel:hover {
- color:rgba(232,173,0,1.00);
-}
-h2 #desktop_phone {
- font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:1.4em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- display:block;
- max-width:50%;
- padding:.6em 3%;
- float:right;
- text-decoration:none;
-}
-section {
- width:100%;
- margin:0;
- padding:0;
-}
-p {
- font-family:ralewayregular, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:1em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- margin:1em 4% 0 4%;
- line-height:1.3em;
-}
-p>a.tel {
- font-family:ralewayregular, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:1em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- display:inherit;
- padding:inherit;
- float:none;
- text-decoration:none;
- display:inline;
-}
-a.tel:hover {
- color:rgba(185,20,30,1.00);
-}
-ul {
- font-family:ralewaysemibold, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:.8em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- margin:1.5em 4% 0 2.2em;
-}
-ul li {
- margin:0 0 .55em 0;
-}
-#logo {
- display:block;
- position:fixed;
- top:5px;
- left:5px;
- width:60px;
- height:60px;
- background-image:url(../_img/cm_logo_sm.png);
- background-size:contain;
- background-repeat:no-repeat;
-}
-/***************************************************************************************************************** 480px to 768px */
-@media only screen and (min-width: 481px) {
-body {
- background-image:url(../_img/bg_lrg.jpg);
- background-size:cover;
-}
-#container {
- width:100%;
- margin:0 auto;
-}
-h1 {
- font-family:ralewaylight, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:100%;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- text-align:center;
- padding:40px 0 0 0;
-}
-h1 span {
- font-size:.5em;
- display:block;
- line-height:.1em;
- margin:25px 0 1% 0;
-}
-h2 {
- background-color:rgba(255,255,255,0.2);
- width:100%;
- position:absolute;
- top:0;
-}
-a.tel {
- font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:1.4em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- display:block;
- max-width:50%;
- padding:.6em 3%;
- float:right;
- text-decoration:none;
-}
-a.tel:hover {
- color:rgba(232,173,0,1.00);
-}
-section {
- width:65%;
- margin:0 auto;
- padding:.5em 0 0 0;
-}
-p {
- font-family:ralewayregular, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:1em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- margin:0 0 1em 0;
- line-height:1.3em;
-}
-p>a.tel {
- font-family:ralewayregular, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:1em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- display:inherit;
- padding:inherit;
- float:none;
- text-decoration:none;
- display:inline;
-}
-a.tel:hover {
- color:rgba(185,20,30,1.00);
-}
-ul {
- font-family:ralewaysemibold, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:.8em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- margin:1.5em 4% 0 2.2em;
-}
-ul li {
- margin:0 0 .55em 0;
-}
-#logo {
- display:block;
- position:fixed;
- top:10px;
- left:10px;
- width:90px;
- height:90px;
- background-image:url(../_img/cm_logo_sm.png);
- background-size:contain;
- background-repeat:no-repeat;
-}
-}
-/***************************************************************************************************************** 768px to 1200px */
-@media only screen and (min-width: 769px) {
-#container {
- width:100%;
- margin:0 auto;
-}
-h1 {
- font-family:ralewaylight, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:100%;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- text-align:center;
- padding:.66em 0 .1em 0;
- border-bottom:1px solid rgba(255,255,255,0.3);
- max-width:60%;
- margin:0 auto;
-}
-h1 span {
- font-size:.5em;
- display:block;
- line-height:.1em;
- margin:25px 0 1% 0;
-}
-h2 {
- background-color:rgba(255,255,255,0.2);
- width:100%;
- position:absolute;
- top:0;
-}
-a.tel {
- font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:1.4em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- display:block;
- max-width:50%;
- padding:.6em 3%;
- float:right;
- text-decoration:none;
-}
-a.tel:hover {
- color:rgba(232,173,0,1.00);
-}
-section {
- width:65%;
- margin:0 auto;
- padding:.5em 0 0 0;
- max-width:900px;
-}
-p {
- font-family:ralewayregular, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:1em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- margin:1em 4% 0 4%;
- line-height:1.3em;
-}
-p>a.tel {
- font-family:ralewayregular, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:1em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- display:inherit;
- padding:inherit;
- float:none;
- text-decoration:none;
- display:inline;
-}
-a.tel:hover {
- color:rgba(185,20,30,1.00);
-}
-ul {
- font-family:ralewaysemibold, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size:.8em;
- color:rgba(255,255,255,1.00);
- font-weight:normal;
- margin:1.5em 4% 0 4%;
- padding:0 0 0 1em;
-}
-ul li {
- margin:0 0 .55em 0;
-}
-#logo {
- display:block;
- position:fixed;
- top:10px;
- left:10px;
- width:140px;
- height:140px;
- background-image:url(../_img/cm_logo_lg.png);
- background-size:contain;
- background-repeat:no-repeat;
-}
-}
\ No newline at end of file
+++ /dev/null
-/*global jQuery */
-/*!
-* FitText.js 1.2
-*
-* Copyright 2011, Dave Rupert http://daverupert.com
-* Released under the WTFPL license
-* http://sam.zoy.org/wtfpl/
-*
-* Date: Thu May 05 14:23:00 2011 -0600
-*/
-
-(function( $ ){
-
- $.fn.fitText = function( kompressor, options ) {
-
- // Setup options
- var compressor = kompressor || 1,
- settings = $.extend({
- 'minFontSize' : Number.NEGATIVE_INFINITY,
- 'maxFontSize' : Number.POSITIVE_INFINITY
- }, options);
-
- return this.each(function(){
-
- // Store the object
- var $this = $(this);
-
- // Resizer() resizes items based on the object width divided by the compressor * 10
- var resizer = function () {
- $this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)));
- };
-
- // Call once to set.
- resizer();
-
- // Call on resize. Opera debounces their resize by default.
- $(window).on('resize.fittext orientationchange.fittext', resizer);
-
- });
-
- };
-
-})( jQuery );
\ No newline at end of file
--- /dev/null
+#contact,
+.webform {margin: 10px;}
+
+.req {color: #f00;}
+
+/* Main table */
+#contact table,
+.webform table {
+ background-color: #fff;
+ border: 1px solid #eee;
+ border-collapse: collapse;
+ }
+/* Any Table inside the form */
+#contact table table,
+.webform table table {
+ width: 100%;
+ margin-left: 0;
+ border: 0px solid #ddd;
+ }
+#contact table table td { border: 0px solid #ddd;}
+
+/* TD's */
+#contact td,
+.webform td {
+ padding: 3px;
+ font-family: arial, helvetica, sans-serif;
+ color: #000;
+ border: 1px solid #eee;
+ border-collapse: collapse;
+ }
+/* Left Cells */
+.labelcell {
+ background-color: transparent;
+ text-align: right;
+ padding-right: 10px;
+ padding-top: 3px;
+ white-space:nowrap;
+ width: 140px;
+ }
+/*Right Cells */
+.fieldcell {
+ padding-left: 4px;
+ width: 250px;
+ }
+
+/* Misc */
+textarea {width: 95%; height: 100px; display:block;}
+
+/* WARNINGS */
+#form-warning-top {
+ margin-top: 1em;
+ margin-bottom: 0.5em;
+ color: #f00;
+ font-size: 14px;
+ font-weight: bold;
+ }
+/* SHow hide instruction div */
+#contact table tr td .form-warning-inside,
+.webform table tr td .form-warning-inside {
+ display: none;
+ }
+#contact table tr.req td .form-warning-inside,
+.webform table tr.req td .form-warning-inside {
+ display: block;
+ background-image: url('../../../../images/error.gif');
+ background-repeat:no-repeat;
+ background-position: top left;
+ padding: 2px 2px 2px 22px;
+}
+
+/* Showing/hiding rows */
+/*invisible*/
+#contact table tr td.instructioncell,
+.webform table tr td.instructioncell {
+ width: 200px;
+ white-space: nowrap;
+ color: #fff;
+ }
+
+/*visible*/
+table tr.req {
+ border: 2px solid #f00;
+ background-color:#FCD6D4;
+ border-collapse: separate;
+ border-collapse: collapse;
+}
+/*color*/
+table tr.req td { background-color: #fcd6d4;}
+table tr.req td.labelcell { background-color: #FCD6D4; }
+table tr.req td.fieldcell { background-color: #FCD6D4; }
+table tr.req td.instructioncell { background-color: #FCD6D4; }
+table tr.req td.instructioncell {
+ padding: 4px;
+ padding-left: 20px;
+ background-image: url('../../../../images/error.gif');
+ background-repeat:no-repeat;
+ background-position: center left;
+ border-width: 0;
+ color: #000;
+ }
+.glmCheckBox {
+ width: 200px;
+ float: left;
+}
+.single-checkbox label.glmCheckBox {
+ width: auto;
+ float: none;
+}
--- /dev/null
+body {
+ background-color: #ff;
+ color: black;
+ font-family: verdana, arial, helvetica, sans-serif;
+}
+h1, h2 {
+ font-family: arial, helvetica, sans-serif;
+}
+h1 {
+ font-size: 18px;
+}
+h2 {
+ font-size: 16px;
+ margin-bottom: 5px;
+}
+p {
+ font-size: 12px;
+}
+.label {
+ font-weight: bold;
+ background-color: transparent;
+ text-align: right;
+ width: 200px;
+ padding: 5px;
+}
+.field {
+ background-color: #fff;
+ padding: 3px;
+}
+table.data {
+ background-color: #fff;
+ color: #000;
+ width: 500px;
+ border: 1px solid #ccc;
+ border-collapse: collapse;
+ margin-left: 20px;
+}
+table.data td {
+ border: 1px solid #ccc;
+ padding-left: 4px;
+ font-size: 12px;
+}
--- /dev/null
+/** Copyright 2005 Google Inc. All rights reserved. */
+
+/* the GSearchControl CSS Classes
+ * .gsc-control : the primary class of the control
+ */
+#searchcontrol {background-color:white; padding: 20px; clear: both;}
+.gsc-control {
+ width: auto;
+}
+
+.gsc-control div {
+ position: static;
+}
+
+/* control inputs
+ * .gsc-search-box : the container that hosts the text input area
+ * .gsc-input : the text input area
+ * .gsc-keeper : the save link below savable results
+ */
+form.gsc-search-box {
+ font-size: 13px;
+ margin-top : 0px;
+ margin-right : 0px;
+ margin-bottom : 4px;
+ margin-left : 0px;
+ width: 100%;
+}
+
+/*
+ * This table contains the input element as well as the search button
+ * Note that the search button column is fixed width, designed to hold the
+ * button div's background image
+ */
+table.gsc-search-box {
+ border-style : none;
+ border-width : 0px;
+ border-spacing : 0px 0px;
+ width : 100%;
+ margin-bottom : 2px;
+}
+
+table.gsc-search-box td {
+ vertical-align : middle;
+}
+
+td.gsc-search-button {
+ width : 1%;
+}
+
+td.gsc-clear-button {
+ width : 14px;
+ display: none;
+}
+
+table.gsc-branding {
+ border-style : none;
+ border-width : 0px;
+ border-spacing : 0px 0px;
+ width : 100%;
+ display: none;
+ }
+
+td.gsc-branding-text {
+ vertical-align : top;
+}
+
+td.gsc-branding-text div.gsc-branding-text {
+ padding-bottom : 2px;
+ text-align : right;
+ color : #676767;
+ font-size : 11px;
+ margin-right : 2px;
+}
+
+td.gsc-branding-img-noclear {
+ width : 51px;
+ vertical-align : bottom;
+}
+
+td.gsc-branding-img {
+ width : 65px;
+ vertical-align : bottom;
+}
+
+table.gsc-branding-vertical td.gsc-branding-text div.gsc-branding-text {
+ margin-right : 0px;
+ text-align : center;
+}
+
+table.gsc-branding-vertical td.gsc-branding-img-noclear {
+ text-align : center;
+}
+
+div.gsc-branding-img,
+div.gsc-branding-img-noclear,
+img.gsc-branding-img,
+img.gsc-branding-img-noclear {
+ padding-top : 1px;
+}
+
+img.gsc-branding-img,
+img.gsc-branding-img-noclear {
+ margin : 0 0 0 0;
+ padding-right : 0;
+ padding-left : 0;
+ padding-bottom : 0;
+ border : none;
+}
+
+input.gsc-search-button {
+ margin-left : 4px;
+}
+
+div.gsc-clear-button {
+ display : inline;
+ text-align : right;
+ margin-left : 4px;
+ margin-right : 4px;
+ padding-left : 10px;
+ background-repeat: no-repeat;
+ background-position: center center;
+ background-image: url('http://www.google.com/uds/css/clear.gif');
+ cursor : pointer;
+}
+
+/*
+ * Given that this is sitting in a variable width tabel cell, the idea is
+ * for it to consume the entire cell. The adjacent cell contains the search
+ * button and that is a fixed width cell.
+ */
+input.gsc-input {
+ padding-left : 2px;
+ border-style : solid;
+ border-width : 1px;
+ border-color : #BCCDF0;
+ width : 99%;
+}
+
+.gsc-keeper {
+ color: #3366cc;
+ text-decoration: underline;
+ font-size: 13px;
+ cursor: pointer;
+ font-weight: normal;
+
+ padding-left: 16px;
+ background-repeat: no-repeat;
+ background-position: 1px 3px;
+ background-image: url('http://www.google.com/uds/css/blue_check.gif');
+}
+.gsc-imageResult .gsc-keeper {
+ text-decoration: none;
+}
+
+/* each section of results has a results header table
+ * .gsc-resultsHeader : the header itseld
+ * td.twiddleRegionCell : the section that controls twiddleing of the section to expand/collapse
+ * td.configLabelCell : the twiddler that controls active configuration of a searcher (used in GlocalSearch)
+ * .gsc-twiddle : the twiddle image, note, this is a div that wraps gsc-title so that standard image replacement is feasible
+ * .gsc-twiddle-closed : class added to gsc-twiddle when the twiddler is in the closed state
+ * .gsc-twiddle-opened : class added to gsc-twiddle when the twiddler is in the opened state
+ * .gsc-title : the section's title (e.g., Web Results, etc.)
+ * .gsc-stats : contains the result counts
+ * .gsc-stats
+ */
+.gsc-resultsHeader {
+ clear: both;
+ width: 100%;
+ border-bottom: 1px solid #e9e9e9;
+ margin-bottom : 4px;
+}
+
+.gsc-resultsHeader td.gsc-twiddleRegionCell{
+ width: 75%;
+}
+
+.gsc-resultsHeader td.gsc-configLabelCell{
+ text-align: right;
+ width: 75%;
+}
+
+/*
+ * note that the next three classes are all joined together
+ * to implement the twiddle image. apps can substitute in their
+ * own images but will need to account for the image size here
+ * as well as in the left padding of the title element
+ *
+ * Note: uds provides the following images that work with the geometry/padding defined below
+ * to use these images simply over-ride the.gsc-twiddle-opened/-closed class and specify an alternate image
+ * or use an image of your own design
+ */
+.gsc-resultsHeader .gsc-twiddle{
+ margin-top: 4px;
+ display: inline;
+ cursor: pointer;
+ background-repeat: no-repeat;
+ background-position: 0px 2px;
+}
+.gsc-resultsHeader td.gsc-twiddle-closed div.gsc-twiddle{
+ background-image: url('http://www.google.com/uds/css/arrow_close.gif');
+}
+.gsc-resultsHeader td.gsc-twiddle-opened div.gsc-twiddle{
+ background-image: url('http://www.google.com/uds/css/arrow_open.gif');
+}
+
+.gsc-resultsHeader .gsc-title{
+ color: #676767;
+ margin-right: 10px;
+ padding-left: 14px;
+ display: inline;
+}
+
+.gsc-resultsHeader .gsc-stats {
+ color: #676767;
+ font-size: 11px;
+ font-weight: normal;
+ display : inline;
+}
+
+.gsc-resultsHeader td.gsc-twiddle-opened .gsc-stats {
+ display : none;
+}
+
+/*
+ * .gsc-results-selector : box surrounding individual selectors for 1, more, or all results
+ * .gsc-result-selector : an individual selector
+ * .gsc-one-result : single result selector
+ * .gsc-more-results : more (4) results selector
+ * .gsc-all-results : all results (8) selector
+ */
+.gsc-results-selector {
+ display : inline;
+}
+
+.gsc-resultsHeader td.gsc-twiddle-closed .gsc-results-selector {
+ display : none;
+}
+
+.gsc-result-selector {
+ cursor : pointer;
+ display : inline;
+ font-size : 13px;
+ padding-left : 13px;
+ background-repeat: no-repeat;
+ background-position: center left;
+}
+
+/* default mode is dark */
+.gsc-one-result {
+ background-image: url('http://www.google.com/uds/css/one-complex-dark.gif');
+}
+
+.gsc-more-results {
+ background-image: url('http://www.google.com/uds/css/more-complex-dark.gif');
+}
+
+.gsc-all-results {
+ background-image: url('http://www.google.com/uds/css/all-complex-dark.gif');
+ padding-right : 1px;
+}
+
+/* active mode is light */
+.gsc-one-result-active .gsc-one-result {
+ background-image: url('http://www.google.com/uds/css/one-complex-light-blue.gif');
+}
+
+.gsc-more-results-active .gsc-more-results {
+ background-image: url('http://www.google.com/uds/css/more-complex-light-blue.gif');
+}
+
+.gsc-all-results-active .gsc-all-results {
+ background-image: url('http://www.google.com/uds/css/all-complex-light-blue.gif');
+}
+
+.gsc-resultsHeader .gsc-configLabel{
+ color: #676767;
+ display: inline;
+ font-size: 11px;
+ cursor: pointer;
+}
+
+.gsc-resultsHeader td.gsc-configLabelCell span.gsc-twiddle-closed {
+ padding-right: 12px;
+ background-repeat: no-repeat;
+ background-position: center center;
+ background-image: url('http://www.google.com/uds/css/settings.gif');
+}
+
+
+/* tabbed mode of search control
+ * .gsc-tabsArea : the box containing all of the tabs
+ * .gsc-tabsAreaInvisible : same as above, but this is the state when search has been cleared
+ * .gsc-tabHeader : an individual tab
+ * .gsc-tabHeader.gsc-tabhActive : the active tab
+ * .gsc-tabHeader.gsc-tabhInactive : an inactive tab
+ * .gsc-tabData : the data area/box containg results and header data for each tab
+ * .gsc-tabData.gsc-tabdActive : the data area for the active tab
+ * .gsc-tabData.gsc-tabdInactive : the data area for inactive tabs
+ */
+.gsc-tabsArea {
+ clear: both;
+ margin-top: 6px;
+ display: none;
+ }
+
+.gsc-tabsAreaInvisible {
+ display : none;
+ }
+
+.gsc-tabHeader {
+ display: inline;
+ cursor: pointer;
+ padding-left: 6px;
+ padding-right: 6px;
+ margin-right: 2px;
+ }
+
+.gsc-tabHeader.gsc-tabhActive {
+ border-left: 1px solid #e9e9e9;
+ border-right: 1px solid #e9e9e9;
+ border-top: 2px solid #ff9900;
+ color: black;
+ }
+
+.gsc-tabHeader.gsc-tabhInactive {
+ border-left: 1px solid #e9e9e9;
+ border-right: 1px solid #e9e9e9;
+ border-top: 2px solid #e9e9e9;
+ background: #e9e9e9;
+ color: #676767;
+ }
+
+.gsc-tabData.gsc-tabdActive {
+ display: block;
+ }
+
+.gsc-tabData.gsc-tabdInactive {
+ display: none;
+ }
+
+/* tab specific results header supression
+ * - no twiddle, tabbed mode runs in full expand mode
+ * - no title
+ * - no stats
+ */
+.gsc-tabData .gsc-resultsHeader .gsc-title {
+ display: none;
+ }
+
+.gsc-tabData .gsc-resultsHeader .gsc-stats {
+ display: none;
+ }
+
+.gsc-tabData .gsc-resultsHeader .gsc-results-selector {
+ display : none;
+}
+
+
+
+/* the results for each section
+ * .gsc-resultsbox-{visible,invisible} : a complete-collection of results including headers
+ * .gsc-results : the collection of results for a given searcher
+ * .gsc-result : a generic result within the control. each result has this class, as well as .gsc-xxxResult where xxx is web, image, local, blog, etc.
+ */
+.gsc-resultsbox-visible {
+ display : block;
+}
+
+.gsc-resultsbox-invisible {
+ display : none;
+}
+
+.gsc-results {
+ clear: both;
+ padding-bottom: 2px;
+}
+
+.gsc-result {
+ margin-bottom: 10px;
+}
+
+.gsc-result .gs-title {
+ height: 1.4em;
+ overflow: hidden;
+ }
+
+/* specialized, result type specific, fine grained controls */
+.gsc-result div.gs-watermark {
+ display: none;
+}
+
+/* Ads
+ * inline the title div so that we can have an adjecent ad marker
+ * in the control, the ad-marker is supressed since ads are already positioned
+ * underneath a results divider
+ */
+.gsc-webResult a div.gs-title {
+ display: inline;
+}
+.gsc-results .gsc-result img.gs-ad-marker {
+ display: none;
+}
+
+/* Standard configuration div/form */
+div.gsc-config {
+ border: 1px solid #e9e9e9;
+ margin-top: 0px;
+ margin-bottom: 10px;
+ padding-top : 2px;
+ padding-left : 6px;
+ padding-right : 6px;
+ padding-bottom : 6px;
+}
+
+form.gsc-config {
+ margin-bottom : 0px;
+}
+
+.gsc-configSetting {
+ margin-top : 6px;
+ }
+
+.gsc-configSetting_Label {
+ color: #676767;
+ }
+
+.gsc-configSettingInput {
+ color: #676767;
+ border: 1px solid #e9e9e9;
+ width: 75%;
+ }
+
+.gsc-configSettingCheckbox {
+ color: #676767;
+ margin-right: 6px;
+ }
+
+.gsc-configSettingCheckboxLabel {
+ display : inline;
+ color: #676767;
+ }
+
+div.gsc-configSettingSubmit {
+ margin-top : 8px;
+ text-align : right;
+}
+
+input.gsc-configSettingSubmit {
+ display: inline;
+ font-size: 11px;
+ cursor: pointer;
+}
+
+
+/* Image Search
+ * - support for horizontal and vertical orientation
+ * - title, url, and size supression
+ */
+.gsc-results.gsc-imageResult .gsc-imageResult.horizontal{
+ float: left;
+ width: 65px;
+ margin-bottom: 4px;
+ margin-right: 8px;
+ text-align: center;
+}
+
+.gsc-results.gsc-imageResult .gsc-imageResult.horizontal .gs-imageResult {
+ height: 41px;
+}
+
+.gsc-results.gsc-imageResult .gsc-imageResult.vertical{
+ float: none;
+ margin-bottom: 4px;
+ margin-right: 8px;
+ text-align: left;
+}
+
+.gsc-results.gsc-imageResult .gsc-imageResult.horizontal .gsc-keeper {
+ background-position: center;
+}
+
+.gsc-imageResult .gs-title {
+ display: none;
+}
+.gsc-imageResult .gs-visibleUrl {
+ display: none;
+}
+.gsc-imageResult .gs-size {
+ display: none;
+}
+
+/* Video Search
+ * - metadata, publisher small font
+ * - single line title
+ */
+
+.gsc-videoResult .gs-videoResult .gs-metadata {
+ font-size: 11px;
+}
+
+.gsc-videoResult .gs-videoResult .gs-title {
+ line-height: 1.3em;
+ height: 1.3em;
+ overflow: hidden;
+ }
+
+.gsc-videoResult .gs-videoResult .gs-snippet {
+ line-height: 1.3em;
+ max-height: 2.6em;
+ overflow: hidden;
+ }
+
+/*** End of Control, Begin Results ***/
+
+/* generic, cross cutting result style
+ * - in the form of .gs-result .gs-xxx where xxx is the generic style
+ * .gs-title : typically the first line of a result, typically a link, image results over ride this, since for image results, the image is the link
+ * .gs-divider : typically seperates results from ads
+ * .gs-visibleUrl : typically the last line of a result, displayed in green. sometimes a link (like in blog search)
+ * .gs-clusterUrl : for news, and other similar services, this is a cluster of additional results
+ * img.gs-image : an actial image in a result
+ * .gs-phone : a phone number
+ * .gs-address : an address (includes street, city, region, country)
+ * .gs-streetAddress : a street (including #)
+ * .gs-city : a city
+ * .gs-region : a region (zip code, area, etc.)
+ * .gs-country : a country
+ * .gs-snippet : snippetized content
+ * .gs-watermark : indicator that user selected this result
+ * .gs-metadata : generic metadata, e.g.,
+ * .gs-image-box : generic container for a result's image (within a table)
+ * .gs-text-box : generic container for a result's text content (within a table). Note that this class, and image-box are only used in video
+ */
+.gs-result .gs-title,
+.gs-result .gs-title * {
+ color: #0000cc;
+ text-decoration: underline;
+}
+
+.gs-divider {
+ padding-bottom: 8px;
+ text-align: center;
+ color: #676767;
+}
+
+.gs-result a.gs-visibleUrl,
+.gs-result .gs-visibleUrl {
+ color: #008000;
+ text-decoration: none;
+}
+
+/* relative and absolute dates, not, news inlines these */
+.gs-relativePublishedDate,
+.gs-publishedDate {
+ color: #6f6f6f;
+ text-decoration: none;
+}
+.gs-result a.gs-clusterUrl,
+.gs-result .gs-clusterUrl {
+ color: #008000;
+ text-decoration: none;
+ cursor: pointer;
+}
+
+.gs-newsResult .gs-publisher {
+ color: #6f6f6f;
+ display : inline;
+ text-decoration: none;
+}
+
+.gs-bookResult .gs-author {
+ color: #6f6f6f;
+}
+
+/*
+ * For news results there are two dates...
+ * The relative date is visible while in the
+ * search control and the published date
+ * is visible when clipped. Why? It doesn't
+ * make sense to say 4 hours ago for a clipped
+ * result...
+ */
+
+/* establish the base style */
+.gs-newsResult .gs-relativePublishedDate,
+.gs-newsResult .gs-publishedDate {
+ display : inline;
+ margin-left : 4px;
+}
+
+/* base styling for relative date is none */
+.gs-blogResult .gs-relativePublishedDate,
+.gs-newsResult .gs-relativePublishedDate {
+ display : none;
+}
+
+/* suppress publishedDate while in the control */
+.gsc-blogResult .gs-blogResult .gs-publishedDate,
+.gsc-newsResult .gs-newsResult .gs-publishedDate {
+ display : none;
+}
+
+/* enable relativePublishedDate while in the control */
+.gsc-blogResult .gs-blogResult .gs-relativePublishedDate,
+.gsc-newsResult .gs-newsResult .gs-relativePublishedDate {
+ display : inline;
+}
+
+.gs-newsResult .gs-location {
+ color: #6f6f6f;
+ display : inline;
+ text-decoration: none;
+}
+
+.gs-result img.gs-image {
+ vertical-align : middle;
+ border : 1px solid #0000cc;
+}
+
+.gs-result div.gs-phone {}
+
+.gs-result .gs-directions,
+.gs-result .gs-directions * {
+ color: #3366cc;
+ font-weight: normal;
+ text-decoration : underline;
+}
+
+.gs-videoResult a.gs-publisher,
+.gs-videoResult .gs-publisher {
+ color: #008000;
+ text-decoration: none;
+}
+
+.gs-result a {
+ cursor: pointer;
+}
+
+.gs-result .gs-address {
+}
+
+.gs-result .gs-snippet {
+}
+
+.gs-result .gs-watermark{
+ font-size: 10px;
+ color: #7777cc;
+}
+
+div.gs-results-attribution {
+ text-align : center;
+ margin-bottom : 4px;
+}
+
+div.gs-results-attribution,
+div.gs-results-attribution * {
+ font-size : 10px;
+ color : #676767;
+ text-decoration : none;
+}
+
+div.gs-results-attribution a {
+ color: #0000cc;
+ cursor : pointer;
+}
+
+div.gs-results-attribution a:hover {
+ text-decoration : underline;
+}
+
+.gs-result .gs-metadata{
+ color: #676767;
+}
+
+/* searcher specific styling for
+ * - web ad
+ * - web
+ * - local
+ * - image (none)
+ * - blog (none)
+ * - video (none)
+ */
+
+/* webAd search specific over rides
+ * .gs-ad-marker : disabled in control, but on in green to indicate clipped result is an ad
+ */
+.gs-localAd img.gs-ad-marker,
+.gs-webAd img.gs-ad-marker {
+ padding-left: 4px;
+}
+
+.gs-localAd a.gs-visibleUrl div.gs-visibleUrl,
+.gs-webAd a.gs-visibleUrl div.gs-visibleUrl {
+ display : none;
+}
+
+/* default is to not show long mode visible urls
+ * apps should selectively enable this while disabling
+ * div.gs-visibleUrl-short
+ */
+.gs-webResult div.gs-visibleUrl-long {
+ width : 100%;
+ overflow : hidden;
+ display : block;
+}
+
+.gs-webResult div.gs-visibleUrl-short {
+ display: none;
+}
+
+/* local search specific over rides
+ * - city, region displayed inline
+ * - country supressed
+ * - small font size for info window's
+ */
+
+.gs-localAd div.gs-address * {
+ color : #676767;
+}
+
+.gs-localAd div.gs-street {
+ display: inline;
+}
+
+div.gs-city {
+ display: inline;
+}
+
+div.gs-region {
+ display: inline;
+}
+
+div.gs-country {
+ display: none;
+}
+
+div.gs-infoWindow * {
+ font-size: 11px;
+ }
+
+/* video search specific over rides
+ * - align the table data
+ * - default image width garuntee
+ * - appropriate cell seperation
+ */
+
+/* todo(markl): workaround until gre in gmail fixes his styles */
+.gs-videoResult * {
+ font-size: 13px;
+ }
+
+/*
+.gs-videoResult td .gs-image {
+ vertical-align : middle;
+}
+
+.gs-videoResult td.gs-image-box {
+ background-color : #000000;
+}*/
+
+.gs-videoResult td div.gs-image-box {
+ width : 110px;
+ height : 78px;
+}
+
+.gs-videoResult td div.gs-text-box {
+ vertical-align: top;
+ margin-left: 4px;
+ }
+
+
+/* book search specific over rides
+ * - default image width garuntee
+ * - appropriate cell seperation
+ */
+.gs-bookResult td div.gs-image-box {
+ width : 75px;
+ height : 90px;
+}
+
+.gs-bookResult td div.gs-text-box {
+ vertical-align: top;
+ margin-left: 4px;
+ }
+
+.gs-bookResult img.gs-image,
+.gs-bookResult img {
+ border-spacing : 0px 0px;
+ border : none;
+}
+
+.gs-bookResult table.gs-image-box {
+ border-style : none;
+ border-width : 0px;
+ border-spacing : 0px 0px;
+}
+
+.gs-bookResult td.gs-pages img {
+ height : 7px;
+ width : 45px;
+}
+
+.gs-bookResult td.gs-page-edge img {
+ height : 7px;
+ width : 11px;
+}
+
+.gs-bookResult td.gs-shadow {
+ vertical-align : bottom;
+}
+
+.gs-bookResult td.gs-image img {
+ height : 80px;
+}
+.gsc-ad-box { display:none;}
+
+
+/* trailing cursor section
+ */
+.gsc-imageResult .gsc-cursor-box {
+ clear : both;
+}
+
+.gsc-results .gsc-cursor-box .gsc-trailing-more-results {
+ margin-bottom : 0px;
+ display : inline;
+}
+
+.gsc-results .gsc-cursor {
+ display : inline;
+}
+
+.gsc-results .gsc-cursor-box {
+ margin-bottom : 10px;
+}
+
+.gsc-results .gsc-cursor-box .gsc-cursor-page {
+ cursor : pointer;
+ color : #000000;
+ text-decoration: underline;
+ margin-right : 8px;
+ display : inline;
+}
+
+.gsc-results .gsc-cursor-box .gsc-cursor-current-page {
+ color : #A90A08;
+ font-weight : bold;
+ text-decoration: none;
+}
+
+.gsc-resultsHeader *{display:none;}
--- /dev/null
+body .imagecaption {
+ position: relative;
+ width: auto;
+ bottom: auto;
+ background: url("../../assets/imagecaptionBg.gif") no-repeat bottom center !important;
+ padding: 0 0 10px 0;
+ margin-top: 4px;
+ }
+
--- /dev/null
+body {
+ background-color: #ff;
+ color: black;
+ font-family: verdana, arial, helvetica, sans-serif;
+}
+h1, h2 {
+ font-family: arial, helvetica, sans-serif;
+}
+h1 {
+ font-size: 18px;
+}
+h2 {
+ font-size: 16px;
+ margin-bottom: 5px;
+}
+p {
+ font-size: 12px;
+}
+.label {
+ font-weight: bold;
+ background-color: transparent;
+ text-align: right;
+ width: 200px;
+ padding: 5px;
+}
+.field {
+ background-color: #fff;
+ padding: 3px;
+}
+table.data {
+ background-color: #fff;
+ color: #000;
+ width: 500px;
+ border: 1px solid #ccc;
+ border-collapse: collapse;
+ margin-left: 20px;
+}
+table.data td {
+ border: 1px solid #ccc;
+ padding-left: 4px;
+ font-size: 12px;
+}
--- /dev/null
+/** Copyright 2005 Google Inc. All rights reserved. */
+
+/* the GSearchControl CSS Classes
+ * .gsc-control : the primary class of the control
+ */
+#searchcontrol {background-color:white; padding: 20px; clear: both;}
+.gsc-control {
+ width: auto;
+}
+
+.gsc-control div {
+ position: static;
+}
+
+/* control inputs
+ * .gsc-search-box : the container that hosts the text input area
+ * .gsc-input : the text input area
+ * .gsc-keeper : the save link below savable results
+ */
+form.gsc-search-box {
+ font-size: 13px;
+ margin-top : 0px;
+ margin-right : 0px;
+ margin-bottom : 4px;
+ margin-left : 0px;
+ width: 100%;
+}
+
+/*
+ * This table contains the input element as well as the search button
+ * Note that the search button column is fixed width, designed to hold the
+ * button div's background image
+ */
+table.gsc-search-box {
+ border-style : none;
+ border-width : 0px;
+ border-spacing : 0px 0px;
+ width : 100%;
+ margin-bottom : 2px;
+}
+
+table.gsc-search-box td {
+ vertical-align : middle;
+}
+
+td.gsc-search-button {
+ width : 1%;
+}
+
+td.gsc-clear-button {
+ width : 14px;
+ display: none;
+}
+
+table.gsc-branding {
+ border-style : none;
+ border-width : 0px;
+ border-spacing : 0px 0px;
+ width : 100%;
+ display: none;
+ }
+
+td.gsc-branding-text {
+ vertical-align : top;
+}
+
+td.gsc-branding-text div.gsc-branding-text {
+ padding-bottom : 2px;
+ text-align : right;
+ color : #676767;
+ font-size : 11px;
+ margin-right : 2px;
+}
+
+td.gsc-branding-img-noclear {
+ width : 51px;
+ vertical-align : bottom;
+}
+
+td.gsc-branding-img {
+ width : 65px;
+ vertical-align : bottom;
+}
+
+table.gsc-branding-vertical td.gsc-branding-text div.gsc-branding-text {
+ margin-right : 0px;
+ text-align : center;
+}
+
+table.gsc-branding-vertical td.gsc-branding-img-noclear {
+ text-align : center;
+}
+
+div.gsc-branding-img,
+div.gsc-branding-img-noclear,
+img.gsc-branding-img,
+img.gsc-branding-img-noclear {
+ padding-top : 1px;
+}
+
+img.gsc-branding-img,
+img.gsc-branding-img-noclear {
+ margin : 0 0 0 0;
+ padding-right : 0;
+ padding-left : 0;
+ padding-bottom : 0;
+ border : none;
+}
+
+input.gsc-search-button {
+ margin-left : 4px;
+}
+
+div.gsc-clear-button {
+ display : inline;
+ text-align : right;
+ margin-left : 4px;
+ margin-right : 4px;
+ padding-left : 10px;
+ background-repeat: no-repeat;
+ background-position: center center;
+ background-image: url('http://www.google.com/uds/css/clear.gif');
+ cursor : pointer;
+}
+
+/*
+ * Given that this is sitting in a variable width tabel cell, the idea is
+ * for it to consume the entire cell. The adjacent cell contains the search
+ * button and that is a fixed width cell.
+ */
+input.gsc-input {
+ padding-left : 2px;
+ border-style : solid;
+ border-width : 1px;
+ border-color : #BCCDF0;
+ width : 99%;
+}
+
+.gsc-keeper {
+ color: #3366cc;
+ text-decoration: underline;
+ font-size: 13px;
+ cursor: pointer;
+ font-weight: normal;
+
+ padding-left: 16px;
+ background-repeat: no-repeat;
+ background-position: 1px 3px;
+ background-image: url('http://www.google.com/uds/css/blue_check.gif');
+}
+.gsc-imageResult .gsc-keeper {
+ text-decoration: none;
+}
+
+/* each section of results has a results header table
+ * .gsc-resultsHeader : the header itseld
+ * td.twiddleRegionCell : the section that controls twiddleing of the section to expand/collapse
+ * td.configLabelCell : the twiddler that controls active configuration of a searcher (used in GlocalSearch)
+ * .gsc-twiddle : the twiddle image, note, this is a div that wraps gsc-title so that standard image replacement is feasible
+ * .gsc-twiddle-closed : class added to gsc-twiddle when the twiddler is in the closed state
+ * .gsc-twiddle-opened : class added to gsc-twiddle when the twiddler is in the opened state
+ * .gsc-title : the section's title (e.g., Web Results, etc.)
+ * .gsc-stats : contains the result counts
+ * .gsc-stats
+ */
+.gsc-resultsHeader {
+ clear: both;
+ width: 100%;
+ border-bottom: 1px solid #e9e9e9;
+ margin-bottom : 4px;
+}
+
+.gsc-resultsHeader td.gsc-twiddleRegionCell{
+ width: 75%;
+}
+
+.gsc-resultsHeader td.gsc-configLabelCell{
+ text-align: right;
+ width: 75%;
+}
+
+/*
+ * note that the next three classes are all joined together
+ * to implement the twiddle image. apps can substitute in their
+ * own images but will need to account for the image size here
+ * as well as in the left padding of the title element
+ *
+ * Note: uds provides the following images that work with the geometry/padding defined below
+ * to use these images simply over-ride the.gsc-twiddle-opened/-closed class and specify an alternate image
+ * or use an image of your own design
+ */
+.gsc-resultsHeader .gsc-twiddle{
+ margin-top: 4px;
+ display: inline;
+ cursor: pointer;
+ background-repeat: no-repeat;
+ background-position: 0px 2px;
+}
+.gsc-resultsHeader td.gsc-twiddle-closed div.gsc-twiddle{
+ background-image: url('http://www.google.com/uds/css/arrow_close.gif');
+}
+.gsc-resultsHeader td.gsc-twiddle-opened div.gsc-twiddle{
+ background-image: url('http://www.google.com/uds/css/arrow_open.gif');
+}
+
+.gsc-resultsHeader .gsc-title{
+ color: #676767;
+ margin-right: 10px;
+ padding-left: 14px;
+ display: inline;
+}
+
+.gsc-resultsHeader .gsc-stats {
+ color: #676767;
+ font-size: 11px;
+ font-weight: normal;
+ display : inline;
+}
+
+.gsc-resultsHeader td.gsc-twiddle-opened .gsc-stats {
+ display : none;
+}
+
+/*
+ * .gsc-results-selector : box surrounding individual selectors for 1, more, or all results
+ * .gsc-result-selector : an individual selector
+ * .gsc-one-result : single result selector
+ * .gsc-more-results : more (4) results selector
+ * .gsc-all-results : all results (8) selector
+ */
+.gsc-results-selector {
+ display : inline;
+}
+
+.gsc-resultsHeader td.gsc-twiddle-closed .gsc-results-selector {
+ display : none;
+}
+
+.gsc-result-selector {
+ cursor : pointer;
+ display : inline;
+ font-size : 13px;
+ padding-left : 13px;
+ background-repeat: no-repeat;
+ background-position: center left;
+}
+
+/* default mode is dark */
+.gsc-one-result {
+ background-image: url('http://www.google.com/uds/css/one-complex-dark.gif');
+}
+
+.gsc-more-results {
+ background-image: url('http://www.google.com/uds/css/more-complex-dark.gif');
+}
+
+.gsc-all-results {
+ background-image: url('http://www.google.com/uds/css/all-complex-dark.gif');
+ padding-right : 1px;
+}
+
+/* active mode is light */
+.gsc-one-result-active .gsc-one-result {
+ background-image: url('http://www.google.com/uds/css/one-complex-light-blue.gif');
+}
+
+.gsc-more-results-active .gsc-more-results {
+ background-image: url('http://www.google.com/uds/css/more-complex-light-blue.gif');
+}
+
+.gsc-all-results-active .gsc-all-results {
+ background-image: url('http://www.google.com/uds/css/all-complex-light-blue.gif');
+}
+
+.gsc-resultsHeader .gsc-configLabel{
+ color: #676767;
+ display: inline;
+ font-size: 11px;
+ cursor: pointer;
+}
+
+.gsc-resultsHeader td.gsc-configLabelCell span.gsc-twiddle-closed {
+ padding-right: 12px;
+ background-repeat: no-repeat;
+ background-position: center center;
+ background-image: url('http://www.google.com/uds/css/settings.gif');
+}
+
+
+/* tabbed mode of search control
+ * .gsc-tabsArea : the box containing all of the tabs
+ * .gsc-tabsAreaInvisible : same as above, but this is the state when search has been cleared
+ * .gsc-tabHeader : an individual tab
+ * .gsc-tabHeader.gsc-tabhActive : the active tab
+ * .gsc-tabHeader.gsc-tabhInactive : an inactive tab
+ * .gsc-tabData : the data area/box containg results and header data for each tab
+ * .gsc-tabData.gsc-tabdActive : the data area for the active tab
+ * .gsc-tabData.gsc-tabdInactive : the data area for inactive tabs
+ */
+.gsc-tabsArea {
+ clear: both;
+ margin-top: 6px;
+ display: none;
+ }
+
+.gsc-tabsAreaInvisible {
+ display : none;
+ }
+
+.gsc-tabHeader {
+ display: inline;
+ cursor: pointer;
+ padding-left: 6px;
+ padding-right: 6px;
+ margin-right: 2px;
+ }
+
+.gsc-tabHeader.gsc-tabhActive {
+ border-left: 1px solid #e9e9e9;
+ border-right: 1px solid #e9e9e9;
+ border-top: 2px solid #ff9900;
+ color: black;
+ }
+
+.gsc-tabHeader.gsc-tabhInactive {
+ border-left: 1px solid #e9e9e9;
+ border-right: 1px solid #e9e9e9;
+ border-top: 2px solid #e9e9e9;
+ background: #e9e9e9;
+ color: #676767;
+ }
+
+.gsc-tabData.gsc-tabdActive {
+ display: block;
+ }
+
+.gsc-tabData.gsc-tabdInactive {
+ display: none;
+ }
+
+/* tab specific results header supression
+ * - no twiddle, tabbed mode runs in full expand mode
+ * - no title
+ * - no stats
+ */
+.gsc-tabData .gsc-resultsHeader .gsc-title {
+ display: none;
+ }
+
+.gsc-tabData .gsc-resultsHeader .gsc-stats {
+ display: none;
+ }
+
+.gsc-tabData .gsc-resultsHeader .gsc-results-selector {
+ display : none;
+}
+
+
+
+/* the results for each section
+ * .gsc-resultsbox-{visible,invisible} : a complete-collection of results including headers
+ * .gsc-results : the collection of results for a given searcher
+ * .gsc-result : a generic result within the control. each result has this class, as well as .gsc-xxxResult where xxx is web, image, local, blog, etc.
+ */
+.gsc-resultsbox-visible {
+ display : block;
+}
+
+.gsc-resultsbox-invisible {
+ display : none;
+}
+
+.gsc-results {
+ clear: both;
+ padding-bottom: 2px;
+}
+
+.gsc-result {
+ margin-bottom: 10px;
+}
+
+.gsc-result .gs-title {
+ height: 1.4em;
+ overflow: hidden;
+ }
+
+/* specialized, result type specific, fine grained controls */
+.gsc-result div.gs-watermark {
+ display: none;
+}
+
+/* Ads
+ * inline the title div so that we can have an adjecent ad marker
+ * in the control, the ad-marker is supressed since ads are already positioned
+ * underneath a results divider
+ */
+.gsc-webResult a div.gs-title {
+ display: inline;
+}
+.gsc-results .gsc-result img.gs-ad-marker {
+ display: none;
+}
+
+/* Standard configuration div/form */
+div.gsc-config {
+ border: 1px solid #e9e9e9;
+ margin-top: 0px;
+ margin-bottom: 10px;
+ padding-top : 2px;
+ padding-left : 6px;
+ padding-right : 6px;
+ padding-bottom : 6px;
+}
+
+form.gsc-config {
+ margin-bottom : 0px;
+}
+
+.gsc-configSetting {
+ margin-top : 6px;
+ }
+
+.gsc-configSetting_Label {
+ color: #676767;
+ }
+
+.gsc-configSettingInput {
+ color: #676767;
+ border: 1px solid #e9e9e9;
+ width: 75%;
+ }
+
+.gsc-configSettingCheckbox {
+ color: #676767;
+ margin-right: 6px;
+ }
+
+.gsc-configSettingCheckboxLabel {
+ display : inline;
+ color: #676767;
+ }
+
+div.gsc-configSettingSubmit {
+ margin-top : 8px;
+ text-align : right;
+}
+
+input.gsc-configSettingSubmit {
+ display: inline;
+ font-size: 11px;
+ cursor: pointer;
+}
+
+
+/* Image Search
+ * - support for horizontal and vertical orientation
+ * - title, url, and size supression
+ */
+.gsc-results.gsc-imageResult .gsc-imageResult.horizontal{
+ float: left;
+ width: 65px;
+ margin-bottom: 4px;
+ margin-right: 8px;
+ text-align: center;
+}
+
+.gsc-results.gsc-imageResult .gsc-imageResult.horizontal .gs-imageResult {
+ height: 41px;
+}
+
+.gsc-results.gsc-imageResult .gsc-imageResult.vertical{
+ float: none;
+ margin-bottom: 4px;
+ margin-right: 8px;
+ text-align: left;
+}
+
+.gsc-results.gsc-imageResult .gsc-imageResult.horizontal .gsc-keeper {
+ background-position: center;
+}
+
+.gsc-imageResult .gs-title {
+ display: none;
+}
+.gsc-imageResult .gs-visibleUrl {
+ display: none;
+}
+.gsc-imageResult .gs-size {
+ display: none;
+}
+
+/* Video Search
+ * - metadata, publisher small font
+ * - single line title
+ */
+
+.gsc-videoResult .gs-videoResult .gs-metadata {
+ font-size: 11px;
+}
+
+.gsc-videoResult .gs-videoResult .gs-title {
+ line-height: 1.3em;
+ height: 1.3em;
+ overflow: hidden;
+ }
+
+.gsc-videoResult .gs-videoResult .gs-snippet {
+ line-height: 1.3em;
+ max-height: 2.6em;
+ overflow: hidden;
+ }
+
+/*** End of Control, Begin Results ***/
+
+/* generic, cross cutting result style
+ * - in the form of .gs-result .gs-xxx where xxx is the generic style
+ * .gs-title : typically the first line of a result, typically a link, image results over ride this, since for image results, the image is the link
+ * .gs-divider : typically seperates results from ads
+ * .gs-visibleUrl : typically the last line of a result, displayed in green. sometimes a link (like in blog search)
+ * .gs-clusterUrl : for news, and other similar services, this is a cluster of additional results
+ * img.gs-image : an actial image in a result
+ * .gs-phone : a phone number
+ * .gs-address : an address (includes street, city, region, country)
+ * .gs-streetAddress : a street (including #)
+ * .gs-city : a city
+ * .gs-region : a region (zip code, area, etc.)
+ * .gs-country : a country
+ * .gs-snippet : snippetized content
+ * .gs-watermark : indicator that user selected this result
+ * .gs-metadata : generic metadata, e.g.,
+ * .gs-image-box : generic container for a result's image (within a table)
+ * .gs-text-box : generic container for a result's text content (within a table). Note that this class, and image-box are only used in video
+ */
+.gs-result .gs-title,
+.gs-result .gs-title * {
+ color: #0000cc;
+ text-decoration: underline;
+}
+
+.gs-divider {
+ padding-bottom: 8px;
+ text-align: center;
+ color: #676767;
+}
+
+.gs-result a.gs-visibleUrl,
+.gs-result .gs-visibleUrl {
+ color: #008000;
+ text-decoration: none;
+}
+
+/* relative and absolute dates, not, news inlines these */
+.gs-relativePublishedDate,
+.gs-publishedDate {
+ color: #6f6f6f;
+ text-decoration: none;
+}
+.gs-result a.gs-clusterUrl,
+.gs-result .gs-clusterUrl {
+ color: #008000;
+ text-decoration: none;
+ cursor: pointer;
+}
+
+.gs-newsResult .gs-publisher {
+ color: #6f6f6f;
+ display : inline;
+ text-decoration: none;
+}
+
+.gs-bookResult .gs-author {
+ color: #6f6f6f;
+}
+
+/*
+ * For news results there are two dates...
+ * The relative date is visible while in the
+ * search control and the published date
+ * is visible when clipped. Why? It doesn't
+ * make sense to say 4 hours ago for a clipped
+ * result...
+ */
+
+/* establish the base style */
+.gs-newsResult .gs-relativePublishedDate,
+.gs-newsResult .gs-publishedDate {
+ display : inline;
+ margin-left : 4px;
+}
+
+/* base styling for relative date is none */
+.gs-blogResult .gs-relativePublishedDate,
+.gs-newsResult .gs-relativePublishedDate {
+ display : none;
+}
+
+/* suppress publishedDate while in the control */
+.gsc-blogResult .gs-blogResult .gs-publishedDate,
+.gsc-newsResult .gs-newsResult .gs-publishedDate {
+ display : none;
+}
+
+/* enable relativePublishedDate while in the control */
+.gsc-blogResult .gs-blogResult .gs-relativePublishedDate,
+.gsc-newsResult .gs-newsResult .gs-relativePublishedDate {
+ display : inline;
+}
+
+.gs-newsResult .gs-location {
+ color: #6f6f6f;
+ display : inline;
+ text-decoration: none;
+}
+
+.gs-result img.gs-image {
+ vertical-align : middle;
+ border : 1px solid #0000cc;
+}
+
+.gs-result div.gs-phone {}
+
+.gs-result .gs-directions,
+.gs-result .gs-directions * {
+ color: #3366cc;
+ font-weight: normal;
+ text-decoration : underline;
+}
+
+.gs-videoResult a.gs-publisher,
+.gs-videoResult .gs-publisher {
+ color: #008000;
+ text-decoration: none;
+}
+
+.gs-result a {
+ cursor: pointer;
+}
+
+.gs-result .gs-address {
+}
+
+.gs-result .gs-snippet {
+}
+
+.gs-result .gs-watermark{
+ font-size: 10px;
+ color: #7777cc;
+}
+
+div.gs-results-attribution {
+ text-align : center;
+ margin-bottom : 4px;
+}
+
+div.gs-results-attribution,
+div.gs-results-attribution * {
+ font-size : 10px;
+ color : #676767;
+ text-decoration : none;
+}
+
+div.gs-results-attribution a {
+ color: #0000cc;
+ cursor : pointer;
+}
+
+div.gs-results-attribution a:hover {
+ text-decoration : underline;
+}
+
+.gs-result .gs-metadata{
+ color: #676767;
+}
+
+/* searcher specific styling for
+ * - web ad
+ * - web
+ * - local
+ * - image (none)
+ * - blog (none)
+ * - video (none)
+ */
+
+/* webAd search specific over rides
+ * .gs-ad-marker : disabled in control, but on in green to indicate clipped result is an ad
+ */
+.gs-localAd img.gs-ad-marker,
+.gs-webAd img.gs-ad-marker {
+ padding-left: 4px;
+}
+
+.gs-localAd a.gs-visibleUrl div.gs-visibleUrl,
+.gs-webAd a.gs-visibleUrl div.gs-visibleUrl {
+ display : none;
+}
+
+/* default is to not show long mode visible urls
+ * apps should selectively enable this while disabling
+ * div.gs-visibleUrl-short
+ */
+.gs-webResult div.gs-visibleUrl-long {
+ width : 100%;
+ overflow : hidden;
+ display : block;
+}
+
+.gs-webResult div.gs-visibleUrl-short {
+ display: none;
+}
+
+/* local search specific over rides
+ * - city, region displayed inline
+ * - country supressed
+ * - small font size for info window's
+ */
+
+.gs-localAd div.gs-address * {
+ color : #676767;
+}
+
+.gs-localAd div.gs-street {
+ display: inline;
+}
+
+div.gs-city {
+ display: inline;
+}
+
+div.gs-region {
+ display: inline;
+}
+
+div.gs-country {
+ display: none;
+}
+
+div.gs-infoWindow * {
+ font-size: 11px;
+ }
+
+/* video search specific over rides
+ * - align the table data
+ * - default image width garuntee
+ * - appropriate cell seperation
+ */
+
+/* todo(markl): workaround until gre in gmail fixes his styles */
+.gs-videoResult * {
+ font-size: 13px;
+ }
+
+/*
+.gs-videoResult td .gs-image {
+ vertical-align : middle;
+}
+
+.gs-videoResult td.gs-image-box {
+ background-color : #000000;
+}*/
+
+.gs-videoResult td div.gs-image-box {
+ width : 110px;
+ height : 78px;
+}
+
+.gs-videoResult td div.gs-text-box {
+ vertical-align: top;
+ margin-left: 4px;
+ }
+
+
+/* book search specific over rides
+ * - default image width garuntee
+ * - appropriate cell seperation
+ */
+.gs-bookResult td div.gs-image-box {
+ width : 75px;
+ height : 90px;
+}
+
+.gs-bookResult td div.gs-text-box {
+ vertical-align: top;
+ margin-left: 4px;
+ }
+
+.gs-bookResult img.gs-image,
+.gs-bookResult img {
+ border-spacing : 0px 0px;
+ border : none;
+}
+
+.gs-bookResult table.gs-image-box {
+ border-style : none;
+ border-width : 0px;
+ border-spacing : 0px 0px;
+}
+
+.gs-bookResult td.gs-pages img {
+ height : 7px;
+ width : 45px;
+}
+
+.gs-bookResult td.gs-page-edge img {
+ height : 7px;
+ width : 11px;
+}
+
+.gs-bookResult td.gs-shadow {
+ vertical-align : bottom;
+}
+
+.gs-bookResult td.gs-image img {
+ height : 80px;
+}
+.gsc-ad-box { display:none;}
+
+
+/* trailing cursor section
+ */
+.gsc-imageResult .gsc-cursor-box {
+ clear : both;
+}
+
+.gsc-results .gsc-cursor-box .gsc-trailing-more-results {
+ margin-bottom : 0px;
+ display : inline;
+}
+
+.gsc-results .gsc-cursor {
+ display : inline;
+}
+
+.gsc-results .gsc-cursor-box {
+ margin-bottom : 10px;
+}
+
+.gsc-results .gsc-cursor-box .gsc-cursor-page {
+ cursor : pointer;
+ color : #000000;
+ text-decoration: underline;
+ margin-right : 8px;
+ display : inline;
+}
+
+.gsc-results .gsc-cursor-box .gsc-cursor-current-page {
+ color : #A90A08;
+ font-weight : bold;
+ text-decoration: none;
+}
+
+.gsc-resultsHeader *{display:none;}
--- /dev/null
+body .imagecaption {
+ position: relative;
+ width: auto;
+ bottom: auto;
+ background: url("../../assets/imagecaptionBg.gif") no-repeat bottom center !important;
+ padding: 0 0 10px 0;
+ margin-top: 4px;
+ }
+
--- /dev/null
+body{background-color:#ff;color:black;font-family:verdana,arial,helvetica,sans-serif;}h1,h2{font-family:arial,helvetica,sans-serif;}h1{font-size:18px;}h2{font-size:16px;margin-bottom:5px;}p{font-size:12px;}.label{font-weight:bold;background-color:transparent;text-align:right;width:200px;padding:5px;}.field{background-color:#fff;padding:3px;}table.data{background-color:#fff;color:#000;width:500px;border:1px solid #ccc;border-collapse:collapse;margin-left:20px;}table.data td{border:1px solid #ccc;padding-left:4px;font-size:12px;}
\ No newline at end of file
--- /dev/null
+#searchcontrol{background-color:white;padding:20px;clear:both;}.gsc-control{width:auto;}.gsc-control div{position:static;}form.gsc-search-box{font-size:13px;margin-top:0;margin-right:0;margin-bottom:4px;margin-left:0;width:100%;}table.gsc-search-box{border-style:none;border-width:0;border-spacing:0;width:100%;margin-bottom:2px;}table.gsc-search-box td{vertical-align:middle;}td.gsc-search-button{width:1%;}td.gsc-clear-button{width:14px;display:none;}table.gsc-branding{border-style:none;border-width:0;border-spacing:0;width:100%;display:none;}td.gsc-branding-text{vertical-align:top;}td.gsc-branding-text div.gsc-branding-text{padding-bottom:2px;text-align:right;color:#676767;font-size:11px;margin-right:2px;}td.gsc-branding-img-noclear{width:51px;vertical-align:bottom;}td.gsc-branding-img{width:65px;vertical-align:bottom;}table.gsc-branding-vertical td.gsc-branding-text div.gsc-branding-text{margin-right:0;text-align:center;}table.gsc-branding-vertical td.gsc-branding-img-noclear{text-align:center;}div.gsc-branding-img,div.gsc-branding-img-noclear,img.gsc-branding-img,img.gsc-branding-img-noclear{padding-top:1px;}img.gsc-branding-img,img.gsc-branding-img-noclear{margin:0;padding-right:0;padding-left:0;padding-bottom:0;border:none;}input.gsc-search-button{margin-left:4px;}div.gsc-clear-button{display:inline;text-align:right;margin-left:4px;margin-right:4px;padding-left:10px;background-repeat:no-repeat;background-position:center center;background-image:url('http://www.google.com/uds/css/clear.gif');cursor:pointer;}input.gsc-input{padding-left:2px;border-style:solid;border-width:1px;border-color:#BCCDF0;width:99%;}.gsc-keeper{color:#36c;text-decoration:underline;font-size:13px;cursor:pointer;font-weight:normal;padding-left:16px;background-repeat:no-repeat;background-position:1px 3px;background-image:url('http://www.google.com/uds/css/blue_check.gif');}.gsc-imageResult .gsc-keeper{text-decoration:none;}.gsc-resultsHeader{clear:both;width:100%;border-bottom:1px solid #e9e9e9;margin-bottom:4px;}.gsc-resultsHeader td.gsc-twiddleRegionCell{width:75%;}.gsc-resultsHeader td.gsc-configLabelCell{text-align:right;width:75%;}.gsc-resultsHeader .gsc-twiddle{margin-top:4px;display:inline;cursor:pointer;background-repeat:no-repeat;background-position:0 2px;}.gsc-resultsHeader td.gsc-twiddle-closed div.gsc-twiddle{background-image:url('http://www.google.com/uds/css/arrow_close.gif');}.gsc-resultsHeader td.gsc-twiddle-opened div.gsc-twiddle{background-image:url('http://www.google.com/uds/css/arrow_open.gif');}.gsc-resultsHeader .gsc-title{color:#676767;margin-right:10px;padding-left:14px;display:inline;}.gsc-resultsHeader .gsc-stats{color:#676767;font-size:11px;font-weight:normal;display:inline;}.gsc-resultsHeader td.gsc-twiddle-opened .gsc-stats{display:none;}.gsc-results-selector{display:inline;}.gsc-resultsHeader td.gsc-twiddle-closed .gsc-results-selector{display:none;}.gsc-result-selector{cursor:pointer;display:inline;font-size:13px;padding-left:13px;background-repeat:no-repeat;background-position:center left;}.gsc-one-result{background-image:url('http://www.google.com/uds/css/one-complex-dark.gif');}.gsc-more-results{background-image:url('http://www.google.com/uds/css/more-complex-dark.gif');}.gsc-all-results{background-image:url('http://www.google.com/uds/css/all-complex-dark.gif');padding-right:1px;}.gsc-one-result-active .gsc-one-result{background-image:url('http://www.google.com/uds/css/one-complex-light-blue.gif');}.gsc-more-results-active .gsc-more-results{background-image:url('http://www.google.com/uds/css/more-complex-light-blue.gif');}.gsc-all-results-active .gsc-all-results{background-image:url('http://www.google.com/uds/css/all-complex-light-blue.gif');}.gsc-resultsHeader .gsc-configLabel{color:#676767;display:inline;font-size:11px;cursor:pointer;}.gsc-resultsHeader td.gsc-configLabelCell span.gsc-twiddle-closed{padding-right:12px;background-repeat:no-repeat;background-position:center center;background-image:url('http://www.google.com/uds/css/settings.gif');}.gsc-tabsArea{clear:both;margin-top:6px;display:none;}.gsc-tabsAreaInvisible{display:none;}.gsc-tabHeader{display:inline;cursor:pointer;padding-left:6px;padding-right:6px;margin-right:2px;}.gsc-tabHeader.gsc-tabhActive{border-left:1px solid #e9e9e9;border-right:1px solid #e9e9e9;border-top:2px solid #f90;color:black;}.gsc-tabHeader.gsc-tabhInactive{border-left:1px solid #e9e9e9;border-right:1px solid #e9e9e9;border-top:2px solid #e9e9e9;background:#e9e9e9;color:#676767;}.gsc-tabData.gsc-tabdActive{display:block;}.gsc-tabData.gsc-tabdInactive{display:none;}.gsc-tabData .gsc-resultsHeader .gsc-title{display:none;}.gsc-tabData .gsc-resultsHeader .gsc-stats{display:none;}.gsc-tabData .gsc-resultsHeader .gsc-results-selector{display:none;}.gsc-resultsbox-visible{display:block;}.gsc-resultsbox-invisible{display:none;}.gsc-results{clear:both;padding-bottom:2px;}.gsc-result{margin-bottom:10px;}.gsc-result .gs-title{height:1.4em;overflow:hidden;}.gsc-result div.gs-watermark{display:none;}.gsc-webResult a div.gs-title{display:inline;}.gsc-results .gsc-result img.gs-ad-marker{display:none;}div.gsc-config{border:1px solid #e9e9e9;margin-top:0;margin-bottom:10px;padding-top:2px;padding-left:6px;padding-right:6px;padding-bottom:6px;}form.gsc-config{margin-bottom:0;}.gsc-configSetting{margin-top:6px;}.gsc-configSetting_Label{color:#676767;}.gsc-configSettingInput{color:#676767;border:1px solid #e9e9e9;width:75%;}.gsc-configSettingCheckbox{color:#676767;margin-right:6px;}.gsc-configSettingCheckboxLabel{display:inline;color:#676767;}div.gsc-configSettingSubmit{margin-top:8px;text-align:right;}input.gsc-configSettingSubmit{display:inline;font-size:11px;cursor:pointer;}.gsc-results.gsc-imageResult .gsc-imageResult.horizontal{float:left;width:65px;margin-bottom:4px;margin-right:8px;text-align:center;}.gsc-results.gsc-imageResult .gsc-imageResult.horizontal .gs-imageResult{height:41px;}.gsc-results.gsc-imageResult .gsc-imageResult.vertical{float:none;margin-bottom:4px;margin-right:8px;text-align:left;}.gsc-results.gsc-imageResult .gsc-imageResult.horizontal .gsc-keeper{background-position:center;}.gsc-imageResult .gs-title{display:none;}.gsc-imageResult .gs-visibleUrl{display:none;}.gsc-imageResult .gs-size{display:none;}.gsc-videoResult .gs-videoResult .gs-metadata{font-size:11px;}.gsc-videoResult .gs-videoResult .gs-title{line-height:1.3em;height:1.3em;overflow:hidden;}.gsc-videoResult .gs-videoResult .gs-snippet{line-height:1.3em;max-height:2.6em;overflow:hidden;}.gs-result .gs-title,.gs-result .gs-title *{color:#00c;text-decoration:underline;}.gs-divider{padding-bottom:8px;text-align:center;color:#676767;}.gs-result a.gs-visibleUrl,.gs-result .gs-visibleUrl{color:#008000;text-decoration:none;}.gs-relativePublishedDate,.gs-publishedDate{color:#6f6f6f;text-decoration:none;}.gs-result a.gs-clusterUrl,.gs-result .gs-clusterUrl{color:#008000;text-decoration:none;cursor:pointer;}.gs-newsResult .gs-publisher{color:#6f6f6f;display:inline;text-decoration:none;}.gs-bookResult .gs-author{color:#6f6f6f;}.gs-newsResult .gs-relativePublishedDate,.gs-newsResult .gs-publishedDate{display:inline;margin-left:4px;}.gs-blogResult .gs-relativePublishedDate,.gs-newsResult .gs-relativePublishedDate{display:none;}.gsc-blogResult .gs-blogResult .gs-publishedDate,.gsc-newsResult .gs-newsResult .gs-publishedDate{display:none;}.gsc-blogResult .gs-blogResult .gs-relativePublishedDate,.gsc-newsResult .gs-newsResult .gs-relativePublishedDate{display:inline;}.gs-newsResult .gs-location{color:#6f6f6f;display:inline;text-decoration:none;}.gs-result img.gs-image{vertical-align:middle;border:1px solid #00c;}.gs-result .gs-directions,.gs-result .gs-directions *{color:#36c;font-weight:normal;text-decoration:underline;}.gs-videoResult a.gs-publisher,.gs-videoResult .gs-publisher{color:#008000;text-decoration:none;}.gs-result a{cursor:pointer;}.gs-result .gs-watermark{font-size:10px;color:#77c;}div.gs-results-attribution{text-align:center;margin-bottom:4px;}div.gs-results-attribution,div.gs-results-attribution *{font-size:10px;color:#676767;text-decoration:none;}div.gs-results-attribution a{color:#00c;cursor:pointer;}div.gs-results-attribution a:hover{text-decoration:underline;}.gs-result .gs-metadata{color:#676767;}.gs-localAd img.gs-ad-marker,.gs-webAd img.gs-ad-marker{padding-left:4px;}.gs-localAd a.gs-visibleUrl div.gs-visibleUrl,.gs-webAd a.gs-visibleUrl div.gs-visibleUrl{display:none;}.gs-webResult div.gs-visibleUrl-long{width:100%;overflow:hidden;display:block;}.gs-webResult div.gs-visibleUrl-short{display:none;}.gs-localAd div.gs-address *{color:#676767;}.gs-localAd div.gs-street{display:inline;}div.gs-city{display:inline;}div.gs-region{display:inline;}div.gs-country{display:none;}div.gs-infoWindow *{font-size:11px;}.gs-videoResult *{font-size:13px;}.gs-videoResult td div.gs-image-box{width:110px;height:78px;}.gs-videoResult td div.gs-text-box{vertical-align:top;margin-left:4px;}.gs-bookResult td div.gs-image-box{width:75px;height:90px;}.gs-bookResult td div.gs-text-box{vertical-align:top;margin-left:4px;}.gs-bookResult img.gs-image,.gs-bookResult img{border-spacing:0;border:none;}.gs-bookResult table.gs-image-box{border-style:none;border-width:0;border-spacing:0;}.gs-bookResult td.gs-pages img{height:7px;width:45px;}.gs-bookResult td.gs-page-edge img{height:7px;width:11px;}.gs-bookResult td.gs-shadow{vertical-align:bottom;}.gs-bookResult td.gs-image img{height:80px;}.gsc-ad-box{display:none;}.gsc-imageResult .gsc-cursor-box{clear:both;}.gsc-results .gsc-cursor-box .gsc-trailing-more-results{margin-bottom:0;display:inline;}.gsc-results .gsc-cursor{display:inline;}.gsc-results .gsc-cursor-box{margin-bottom:10px;}.gsc-results .gsc-cursor-box .gsc-cursor-page{cursor:pointer;color:#000;text-decoration:underline;margin-right:8px;display:inline;}.gsc-results .gsc-cursor-box .gsc-cursor-current-page{color:#A90A08;font-weight:bold;text-decoration:none;}.gsc-resultsHeader *{display:none;}
\ No newline at end of file
--- /dev/null
+body .imagecaption{position:relative;width:auto;bottom:auto;background:url("../../assets/imagecaptionBg.gif") no-repeat bottom center!important;padding:0 0 10px 0;margin-top:4px;}
\ No newline at end of file
--- /dev/null
+body{margin:0;padding:0;text-align:center;font-family:arial,sans-serif;font-size:12px;background:#adc7e8;}a:link{color:#006BB5;}a:visited{color:#006BB5;}a:hover{color:#000;}a:active{color:#006BB5;}img{border:0;display:block;}#wrapper{width:806px;margin:0 auto;text-align:left;background:url(../../assets/bg.gif) repeat-y;}#wrapperInner{width:760px;margin:0 auto;height:1%;overflow:hidden;}#top{background:url(../../assets/topBg.jpg) #fff no-repeat top right;height:154px;position:relative;}#logo{position:absolute;top:67px;left:84px;}#nav{background:url(../../assets/navBg.gif) no-repeat;height:40px;}#nav ul,#nav li{margin:0;padding:0;height:31px;list-style-type:none;}#nav li{float:left;position:relative;margin-top:4px;}#nav li a{line-height:31px;display:block;text-decoration:none;width:152px;text-align:center;font-weight:bold;}#nav li a:link{color:white;}#nav li a:visited{color:white;}#nav li a:hover{color:#e66b23;background:white;color:#006BB5;}#nav li a:active{color:white;}#main{width:593px;float:right;position:relative;padding-bottom:30px;}#column{width:167px;float:left;position:relative;}#toolbox{margin:20px 15px;}h1,h2{font-size:14px;margin-bottom:1em;}.imageright,.imageleft{position:relative;}.imageright{float:right;margin:0 0 10px 10px;}.imageleft{float:left;margin:0 10px 10px 0;}.imageright img,.imageleft img{border-bottom:1px solid #e66b23;}.imagecaption{position:absolute;width:271px;bottom:0;background:rgba(255,255,255,0.7);color:black;padding:4px 8px;font-size:12px;}.listing{clear:both;}#subnav{background:#006BB5;margin:6px 6px 6px 5px;}#subnav h2{background:url(../../assets/subnav-h-bg.gif) repeat-x left bottom;padding:5px 5px 10px 5px;color:#fff;margin:0;border-bottom:1px solid white;}#subnav ul{margin:0;padding:0;list-style-type:none;}#subnav ul li{margin:0;padding:0;zoom:1;}#subnav ul li a{display:block;padding:3px 4px 3px 8px;font-weight:bold;text-decoration:none;zoom:1;}#subnav ul a:link{color:white;}#subnav ul a:visited{color:white;}#subnav ul a:hover{color:white;background:#E66B23;}#subnav ul a:active{color:white;}#subnav ul ul a{padding-left:16px;background:#67A5CF;}a#current{color:#E8D092!important;}ul ul a#current{color:#BF7723!important;}#guide{background:url(../../assets/guideBg.gif) no-repeat;width:156px;height:180px;position:relative;margin-left:5px;}#guide a{position:absolute;top:160px;left:38px;font-weight:bold;}#guide a:link{color:white;}#guide a:visited{color:white;}#guide a:hover{color:white;text-decoration:none;}#guide a:active{color:white;}#cReservations{background:url(../../assets/reservationBg.gif) no-repeat;width:156px;height:114px;margin:6px 6px 6px 5px;text-align:center;}#cReservations a{display:block;padding-top:95px;text-align:center;text-decoration:none;font-weight:bold;}#cReservations a:link{color:white;}#cReservations a:visited{color:white;}#cReservations a:hover{color:#006BB5;}#cReservations a:active{color:white;}#cEvents{background:url(../../assets/eventsBg.gif) no-repeat #006bb5 20px 6px;margin:6px 6px 6px 5px;padding-top:61px;padding-bottom:5px;border:2px solid white;}a.cEventItem{border-top:1px solid #adc7e8;margin:0 6px;display:block;color:white;text-decoration:none;padding:5px;}.cEventDate{display:block;}.cEventTitle{display:block;font-weight:bold;}a.cEventItem:link{color:white;}a.cEventItem:visited{color:white;}a.cEventItem:hover{color:white;background:#E66B23;}a.cEventItem:active{color:white;}#cNewsletter{height:75px;margin-left:12px;margin-top:28px;background:url(../../assets/signupBg.gif) no-repeat;position:relative;}#cNewsletter .text{position:absolute;top:35px;left:3px;border:1px solid #2950ae;height:18px;width:140px;}#cNewsletter .submit{position:absolute;top:56px;left:3px;}#bottom{clear:both;background:#006bb5;position:relative;}#bottom #logoGlm{position:absolute;top:-10px;right:0;}#bottom #address{color:white;padding-left:50px;padding-top:10px;padding-bottom:5px;font-size:11px;font-weight:bold;}#bottom #address span{margin:15px;}#copyright{clear:both;padding:10px;text-align:center;background:white;position:relative;font-size:11px;}#banner{text-align:center;clear:left;}#banner img{margin:0 auto 0 auto;margin-left:30px;}#headlines{margin:40px 20px 20px;}#headlines h2{margin:0;padding:0;text-indent:-9999px;background:url(../../assets/headlinesHeader.gif) no-repeat;width:463px;height:47px;}#headlines h3{color:#e66b23;margin:0;}#headlines p{color:#002b91;margin:0;margin-bottom:1em;}#headlines h3,#headlines p{margin-left:50px;}#headlines p a{font-weight:bold;}.pages{padding:1em 0;clear:left;}.pages a,.pages b{color:#036;display:block;float:left;padding:.2em .5em;margin-right:.1em;border:1px solid #fff;background:#fff;}.pages b,.business-first-letter a.curr{border:1px solid #2E6AB1;font-weight:bold;background:#2E6AB1;color:#fff;}.pages a{border:1px solid #9AAFE5;text-decoration:none;}.pages a:hover,.business-first-letter a:hover{border-color:#2E6AB1;}.business-first-letter{margin:1em 0;}.business-first-letter>div{margin-bottom:1em;}.business-first-letter a{margin-right:.1em;color:#036;padding:.1em .4em;border:1px solid #9AAFE5;text-decoration:none;}#accountBox{border-right:1px solid #3D1006;border-bottom:1px solid #3D1006;border-left:1px solid #CBCBAA;border-top:1px solid #CBCBAA;background:#E7E7D5;width:230px;float:right;margin-left:10px;}#accountBox h2{margin:0 0 6px 0;}#accountBox #plannerLogin{padding:6px;}#accountBox #plannerLogin p{margin:0;}#plannerUser,#plannerP{float:left;}#accountBox #plannerLogin #plannerUser{margin-right:3px;}#accountBox #plannerLogin input{width:90px;display:block;}#accountBox #plannerLogin a{font-size:11px;}#plannerSubmit{float:right;}#accountBox #plannerLogin input.submit{border:0;width:20px;height:20px;text-indent:-5000px;padding:0;margin-top:15px;margin-left:3px;}#accountBox #plannerNew{padding:0;}#accountBox #plannerNew a{display:block;width:220px;height:30px;text-indent:-5000px;background:url(../../assets/saveplanner.gif) no-repeat;margin-left:0;}#plannerList{padding:6px;margin:0;clear:both;}.page-break{display:none;}.plannerItem{border:1px solid #E7E7D5;border-left:20px solid #CBCBAA;background:#CBCBAA;background:#E7E7D5;background:#FFF7DF;background:#FFFBEF;padding:1px 0 26px 0;position:relative;clear:both;margin-top:12px;height:1%;overflow:hidden;}.plannerRemove{text-indent:-5000px;background:url(../../assets/btn_close.gif) no-repeat;width:20px;height:20px;display:block;position:absolute;top:6px;right:6px;}.plannerItem h2{font-size:12px;padding:6px 0 3px 10px;margin:0;}.plannerItem h2 a{font-weight:normal;}.plannerItem h3{font-size:18px;padding:3px 0 0 10px;margin:0;}.plannerItem .plannerAddress{width:270px;float:left;}.plannerItem p{margin:0 10px;}.plannerInfo{float:right;width:280px;margin-top:0;}p.plannerTime{background:#CBCBAA;background:transparent;padding:3px 6px;padding:0;margin:0;position:absolute;bottom:6px;left:10px;font-style:italic;}ul#plannerNav{list-style-type:none;margin:0;padding:0;}ul#plannerNav li{list-style-type:none;margin:0;padding:0;float:left;}ul#plannerNav li a{text-indent:-5000px;display:block;}ul#plannerNav li#pN1 a{background:url(../../assets/btn_planneractions.gif) no-repeat;width:100px;height:35px;}ul#plannerNav li#pN2 a{background:url(../../assets/btn_planneractions.gif) no-repeat;height:35px;width:110px;background-position:-100px;}ul#plannerNav li#pN3 a{background:url(../../assets/btn_planneractions.gif) no-repeat;height:35px;width:85px;background-position:-210px;}ul#plannerNav li#pN4 a{background:url(../../assets/btn_planneractions.gif) no-repeat;height:35px;width:50px;background-position:-295px;}.galleryRow{height:180px;overflow:hidden;}div.thumb{height:160px!important;margin:3px!important;}.first-in-row{clear:left!important;}.thumb img{display:block!important;}.file-download{background-repeat:no-repeat;background-position:left;padding:1px 2px;padding-left:18px;position:relative;margin-right:10px;margin-bottom:5px;display:block;float:left;clear:left;background-image:url(images/file-ext/txt.png);}.avi,.mov,.wmv{background-image:url(images/file-ext/movie.gif);}.doc{background-image:url(images/file-ext/doc.gif);}.gif{background-image:url(images/file-ext/gif.gif);}.html{background-image:url(images/file-ext/html.gif);}.jpg{background-image:url(images/file-ext/jpg.gif);}.mp3{background-image:url(images/file-ext/mp3.gif);}.pdf{background-image:url(images/file-ext/pdf.png);}.ppt{background-image:url(images/file-ext/ppt.gif);}.txt{background-image:url(images/file-ext/txt.png);}.xls{background-image:url(images/file-ext/xls.gif);}.zip{background-image:url(images/file-ext/zip.png);}.rar{background-image:url(images/file-ext/rar.gif);}#slideshow,#slideshow li{margin:0;padding:0;overflow:hidden;list-style-type:none;}
\ No newline at end of file
--- /dev/null
+
+#sitemap h2 {
+ font-size: 14px;
+ font-weight: bold;
+ margin: 20px 0 5px 0;
+ padding: 5px;
+ border-bottom: 1px solid #000;
+ }
+#sitemap h2 a {
+ color: #000;
+ }
+#sitemap .row {
+ clear: both;
+ overflow: hidden;
+ }
+.row ol, .row li {
+ list-style-image: none;
+ list-style-type: none;
+ text-transform: capitalize;
+ font-size: 12px;
+ font-weight: normal;
+ margin: 0;
+ padding: 0;
+}
+#sitemap a {
+ border-bottom: none;
+ text-decoration: none;
+ color: #666;
+ }
+#sitemap a:hover {
+ text-decoration: underline;
+ color: #00F;
+ }
+#sitemap a:active {
+ text-decoration: underline;
+ color: #00F;
+ }
+.row > ol {
+ float: left;
+ margin-right: 3%;
+ /* width: 30% */
+ }
+.row > ol > li {
+ margin: 5px;
+ font-weight: bold;
+ }
+.row > ol > li > ol > li {
+ margin: 5px 0 5px 20px;
+ }
\ No newline at end of file
--- /dev/null
+
+@font-face {
+ font-family: 'source_sans_prosemibold';
+ src: url('fonts/sourcesanspro-semibold-webfont.eot');
+ src: url('fonts/sourcesanspro-semibold-webfont.eot?#iefix') format('embedded-opentype'),
+ url('fonts/sourcesanspro-semibold-webfont.woff') format('woff'),
+ url('fonts/sourcesanspro-semibold-webfont.ttf') format('truetype'),
+ url('fonts/sourcesanspro-semibold-webfont.svg#source_sans_prosemibold') format('svg');
+ font-weight: normal;
+ font-style: normal;
+
+}
+
+
+
+/*********************************/
+@font-face {
+ font-family: 'source_sans_proregular';
+ src: url('fonts/sourcesanspro-regular-webfont.eot');
+ src: url('fonts/sourcesanspro-regular-webfont.eot?#iefix') format('embedded-opentype'),
+ url('fonts/sourcesanspro-regular-webfont.woff') format('woff'),
+ url('fonts/sourcesanspro-regular-webfont.ttf') format('truetype'),
+ url('fonts/sourcesanspro-regular-webfont.svg#source_sans_proregular') format('svg');
+ font-weight: normal;
+ font-style: normal;
+
+}
+
+
+
+/*********************************/
+@font-face {
+ font-family: 'klinic_slabbold';
+ src: url('fonts/klinicslabbold-webfont.eot');
+ src: url('fonts/klinicslabbold-webfont.eot?#iefix') format('embedded-opentype'),
+ url('fonts/klinicslabbold-webfont.woff') format('woff'),
+ url('fonts/klinicslabbold-webfont.ttf') format('truetype'),
+ url('fonts/klinicslabbold-webfont.svg#klinic_slabbold') format('svg');
+ font-weight: normal;
+ font-style: normal;
+
+}
+
+
+
+/*********************************/
+@font-face {
+ font-family: 'klinic_slabmedium';
+ src: url('fonts/klinicslabmedium-webfont.eot');
+ src: url('fonts/klinicslabmedium-webfont.eot?#iefix') format('embedded-opentype'),
+ url('fonts/klinicslabmedium-webfont.woff') format('woff'),
+ url('fonts/klinicslabmedium-webfont.ttf') format('truetype'),
+ url('fonts/klinicslabmedium-webfont.svg#klinic_slabmedium') format('svg');
+ font-weight: normal;
+ font-style: normal;
+
+}
--- /dev/null
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="klinic_slabbold" horiz-adv-x="1402" >
+<font-face units-per-em="2048" ascent="1536" descent="-512" />
+<missing-glyph horiz-adv-x="432" />
+<glyph unicode="fi" horiz-adv-x="1271" d="M53 702v183h170v227q0 358 406 358q135 0 340 -47l-25 -168q-171 37 -264 37q-106 0 -165.5 -39t-59.5 -139v-229h639v-705h135v-180h-488v180h121v525h-407v-525h178v-180h-555v180h145v522h-170z" />
+<glyph unicode="fl" horiz-adv-x="1271" d="M53 702v183h170v227q0 358 406 358q91 0 223 -22h242v-1268h135v-180h-502v180h135v1092q-95 20 -182 20q-106 0 -165.5 -39t-59.5 -139v-229h219v-183h-219v-522h178v-180h-555v180h145v522h-170z" />
+<glyph unicode="ffi" horiz-adv-x="1910" d="M53 702v183h170v190q0 192 111.5 285.5t296.5 93.5q133 0 348 -61q104 77 289 77q135 0 340 -47l-25 -168q-171 37 -264 37q-106 0 -165.5 -39t-59.5 -139v-229h639v-705h135v-180h-488v180h121v525h-407v-525h178v-180h-555v180h145v522h-407v-522h178v-180h-555v180 h145v522h-170zM455 885h407v227q0 67 17 133q-118 31 -203 31q-110 0 -165.5 -47t-55.5 -152v-192z" />
+<glyph unicode="ffl" horiz-adv-x="1910" d="M53 702v183h170v190q0 192 111.5 285.5t296.5 93.5q133 0 348 -61q104 77 289 77q91 0 223 -22h242v-1268h135v-180h-502v180h135v1092q-95 20 -182 20q-106 0 -165.5 -39t-59.5 -139v-229h219v-183h-219v-522h178v-180h-555v180h145v522h-407v-522h178v-180h-555v180 h145v522h-170zM455 885h407v227q0 67 17 133q-118 31 -203 31q-110 0 -165.5 -47t-55.5 -152v-192z" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="
" horiz-adv-x="2048" />
+<glyph unicode=" " horiz-adv-x="432" />
+<glyph unicode="	" horiz-adv-x="432" />
+<glyph unicode=" " horiz-adv-x="432" />
+<glyph unicode="!" horiz-adv-x="536" d="M127 121q0 59 41.5 100t99.5 41q59 0 100.5 -41.5t41.5 -99.5t-41.5 -99.5t-100.5 -41.5q-58 0 -99.5 41t-41.5 100zM141 1247h254l-37 -887h-180z" />
+<glyph unicode=""" horiz-adv-x="786" d="M115 784v490h207v-490h-207zM465 784v490h207v-490h-207z" />
+<glyph unicode="#" horiz-adv-x="1173" d="M82 250v147h190l37 260h-176v148h199l30 227h177l-33 -227h229l33 227h178l-33 -227h181v-148h-203l-37 -260h188v-147h-206l-33 -225h-178l32 225h-229l-31 -225h-176l31 225h-170zM451 397h229l35 260h-228z" />
+<glyph unicode="$" horiz-adv-x="993" d="M66 217q0 52 33.5 87.5t90.5 35.5q50 0 83.5 -29t33.5 -75q0 -27 -12 -54q65 -38 180 -41v287q-48 12 -77 20.5t-73.5 24t-72 31t-59.5 40t-50 52t-30.5 66t-12.5 83.5q0 142 104 221.5t271 82.5v131h57v-131q94 -4 176 -32t132.5 -76.5t50.5 -106.5q0 -48 -32 -85.5 t-89 -37.5q-52 0 -86.5 29.5t-34.5 78.5q0 25 10 47q-59 25 -127 25v-268q48 -13 78 -22.5t75.5 -26.5t74.5 -33.5t63 -42.5t53.5 -55t32.5 -68.5t13 -85.5q0 -98 -55 -168t-141 -103.5t-194 -35.5v-191h-57v191q-98 4 -189.5 31.5t-155.5 81.5t-64 122zM299 770 q0 -28 11.5 -48.5t38.5 -36t52.5 -25t73.5 -23.5v254q-176 -11 -176 -121zM532 141q187 15 187 125q0 32 -14 56t-43 41.5t-57.5 28.5t-72.5 24v-275z" />
+<glyph unicode="%" horiz-adv-x="1349" d="M82 737q0 121 66 191.5t188 70.5t188 -70.5t66 -191.5t-66 -191.5t-188 -70.5t-188 70.5t-66 191.5zM211 82l823 924l105 -91l-824 -923zM242 737q0 -143 94 -143t94 143q0 144 -94 144t-94 -144zM760 262q0 121 66 191.5t188 70.5t188 -70.5t66 -191.5t-66 -191.5 t-188 -70.5t-188 70.5t-66 191.5zM920 262q0 -143 94 -143t94 143q0 144 -94 144t-94 -144z" />
+<glyph unicode="&" horiz-adv-x="1333" d="M74 315q0 115 59.5 197t190.5 166l-15 18q-68 88 -96.5 147t-28.5 126q0 131 97 215t247 84q147 0 232.5 -82t85.5 -205q0 -96 -54 -167.5t-165 -149.5l245 -271q59 105 70 211h-100v170h415v-172h-112q-32 -204 -137 -356q83 -80 170 -80q36 0 71 12v-180 q-71 -21 -129 -21q-138 0 -258 115q-161 -119 -377 -119q-189 0 -300 89t-111 253zM299 340q0 -85 57 -131.5t156 -46.5q124 0 219 67l-287 314q-72 -46 -108.5 -90.5t-36.5 -112.5zM403 985q0 -42 20.5 -79t63.5 -87l23 -26q139 94 139 192q0 51 -30.5 86t-86.5 35 q-52 0 -90.5 -31.5t-38.5 -89.5z" />
+<glyph unicode="'" horiz-adv-x="436" d="M115 784v490h207v-490h-207z" />
+<glyph unicode="(" horiz-adv-x="593" d="M59 522q0 223 81.5 469t228.5 457h231q-155 -206 -237 -453.5t-82 -472.5q0 -226 81.5 -474t237.5 -454h-231q-147 212 -228.5 458t-81.5 470z" />
+<glyph unicode=")" horiz-adv-x="593" d="M-6 -406q156 206 237.5 454t81.5 474q0 225 -82 472.5t-237 453.5h231q147 -211 228.5 -457t81.5 -469q0 -224 -81.5 -470t-228.5 -458h-231z" />
+<glyph unicode="*" horiz-adv-x="815" d="M100 857.5q6 33.5 41 53.5q24 14 116.5 30t123.5 24l4 -7q-24 -24 -83 -96t-83 -86q-41 -18 -67.5 -8.5t-42.5 35.5q-15 21 -9 54.5zM100 1094q-6 34 9 55q16 26 42.5 35.5t67.5 -8.5q24 -14 83 -86.5t83 -96.5l-4 -6q-32 9 -124 24t-116 29q-35 20 -41 54zM330 713 q0 28 32.5 116t40.5 119h9q8 -31 40.5 -119t32.5 -116q0 -41 -23.5 -61.5t-53.5 -20.5t-54 20.5t-24 61.5zM330 1239q0 41 24 61.5t54 20.5t53.5 -20.5t23.5 -61.5q0 -28 -32.5 -116t-40.5 -119h-9q-8 31 -40.5 119t-32.5 116zM430 958l4 7q31 -8 123.5 -24t116.5 -30 q35 -20 41.5 -53.5t-8.5 -54.5q-16 -26 -43 -35.5t-68 8.5q-24 14 -83 86t-83 96zM430 993q24 24 83 96.5t83 86.5q41 18 68 8.5t43 -35.5q15 -21 8.5 -55t-41.5 -54q-24 -14 -116 -29t-124 -24z" />
+<glyph unicode="+" horiz-adv-x="995" d="M61 403v177h345v348h184v-348h344v-177h-344v-348h-184v348h-345z" />
+<glyph unicode="," horiz-adv-x="454" d="M51 -186q91 98 121 186q-39 12 -63.5 45t-24.5 76q0 59 40.5 100t102.5 41t101 -43.5t39 -109.5q0 -87 -69 -196.5t-155 -176.5z" />
+<glyph unicode="-" horiz-adv-x="806" d="M109 381v194h589v-194h-589z" />
+<glyph unicode="." horiz-adv-x="450" d="M84 121q0 59 41 100t100 41t100.5 -41.5t41.5 -99.5t-41.5 -99.5t-100.5 -41.5t-100 41t-41 100z" />
+<glyph unicode="/" horiz-adv-x="1099" d="M39 -406l811 1854h215l-809 -1854h-217z" />
+<glyph unicode="0" horiz-adv-x="1081" d="M74 487q0 106 27 196t81.5 161.5t146 112t212.5 40.5t212.5 -40.5t146 -112t81.5 -161.5t27 -196t-27 -196t-81.5 -161.5t-146 -112t-212.5 -40.5t-212.5 40.5t-146 112t-81.5 161.5t-27 196zM313 487q0 -158 56 -245.5t172 -87.5t171.5 87.5t55.5 245.5 q0 159 -55.5 246.5t-171.5 87.5t-172 -88t-56 -246z" />
+<glyph unicode="1" horiz-adv-x="776" d="M61 852l287 123h203v-801h164v-174h-602v174h209v608q-73 -73 -152 -73q-63 0 -91.5 39t-17.5 104z" />
+<glyph unicode="2" horiz-adv-x="958" d="M72 750q0 103 121.5 175t291.5 72q77 0 141.5 -16.5t115.5 -50t79.5 -90t28.5 -131.5q0 -79 -32 -151.5t-94 -136t-133 -115.5t-169 -109h461v-197h-758l-37 160q32 24 114.5 78.5t143.5 99t128.5 103.5t104.5 121.5t37 123.5q0 23 -6 44t-21.5 43.5t-49.5 36t-82 13.5 q-73 0 -144 -30q9 -21 9 -43q0 -54 -33.5 -89.5t-91.5 -35.5q-57 0 -91 35.5t-34 89.5z" />
+<glyph unicode="3" horiz-adv-x="1021" d="M63 -43q0 61 40 100t100 39q61 0 96 -38.5t35 -94.5q0 -20 -8 -47q74 -29 157 -29q117 0 178.5 53t61.5 148q0 205 -301 205h-68v168h60q129 0 198.5 48t69.5 144q0 83 -52 126.5t-149 43.5q-82 0 -147 -30q8 -19 8 -45q0 -57 -35.5 -95.5t-95.5 -38.5q-62 0 -98.5 38.5 t-36.5 97.5q1 73 60.5 130t155.5 87t208 30q184 0 299.5 -84t115.5 -243q0 -103 -52 -175.5t-154 -105.5q123 -33 187.5 -110.5t64.5 -196.5q0 -116 -63 -201t-167 -126.5t-235 -41.5q-108 0 -204.5 26.5t-162.5 84t-66 133.5z" />
+<glyph unicode="4" horiz-adv-x="1019" d="M33 49v154q144 169 252 389.5t129 398.5q93 20 146.5 -13.5t53.5 -115.5q0 -123 -112.5 -319t-227.5 -326h326v139q70 114 117 246h98v-385h166v-168h-160v-151h158v-162h-578v162h189v151h-557z" />
+<glyph unicode="5" horiz-adv-x="1034" d="M66 -14q0 58 37 95.5t96 37.5t96 -37.5t37 -93.5q0 -24 -10 -51q68 -46 170 -46q116 0 182.5 61t66.5 173q0 110 -65 172.5t-170 62.5q-81 0 -146 -34.5t-104 -83.5l-156 71q85 330 88 660h721q13 -47 13 -76q0 -145 -209 -145q-59 0 -184 15t-162 17q-9 -172 -52 -317 q112 70 250 70q180 0 296 -112.5t116 -295.5q0 -192 -129.5 -304t-329.5 -112q-113 0 -217 35t-169.5 99t-65.5 139z" />
+<glyph unicode="6" horiz-adv-x="1087" d="M84 571q0 114 19 216t60 189.5t100.5 150.5t144.5 99t188 36q157 0 254.5 -72t97.5 -160q0 -49 -32 -89t-91 -40q-57 0 -93 35t-36 86q0 20 6 41q-39 24 -114 24q-74 0 -128.5 -36.5t-84.5 -101t-45 -136t-19 -158.5q48 63 128.5 100.5t181.5 37.5q177 0 283 -110 t106 -288q0 -192 -124 -305t-327 -113q-228 0 -351.5 151.5t-123.5 442.5zM326 389q0 -104 60.5 -170.5t166.5 -66.5q102 0 159.5 64.5t57.5 170.5q0 105 -56.5 174.5t-160.5 69.5q-101 0 -164 -66.5t-63 -175.5z" />
+<glyph unicode="7" horiz-adv-x="985" d="M37 621v354h164v-123q41 131 176 131q67 0 163.5 -44t143.5 -44q17 0 25 2q11 43 45 69.5t84 26.5q57 0 92 -35.5t35 -91.5q0 -45 -39 -108q-77 -128 -129.5 -228t-103 -221t-76 -243t-25.5 -244q0 -60 4 -92q-53 -17 -100 -17q-69 0 -107.5 37t-38.5 131q0 160 106 413 t240 466q-27 -6 -51 -6q-42 0 -130 22.5t-136 22.5q-158 0 -164 -178h-178z" />
+<glyph unicode="8" horiz-adv-x="1101" d="M78 332q0 125 70 206t192 115q-95 32 -154 102.5t-59 178.5q0 143 110.5 235.5t313.5 92.5t313.5 -92.5t110.5 -235.5q0 -108 -59 -178.5t-154 -102.5q122 -34 192 -115t70 -206q0 -164 -124 -259.5t-349 -95.5t-349 95.5t-124 259.5zM313 356q0 -96 62.5 -152.5 t175.5 -56.5t175 56.5t62 152.5q0 98 -64 153.5t-173 55.5q-110 0 -174 -55.5t-64 -153.5zM352 924q0 -83 54 -134t145 -51t145 51t54 134t-54 127.5t-145 44.5t-145 -44.5t-54 -127.5z" />
+<glyph unicode="9" horiz-adv-x="1060" d="M63 575q0 192 128 307t333 115q225 0 347 -151.5t122 -454.5q0 -202 -53.5 -352.5t-165.5 -238t-272 -87.5q-95 0 -186 28t-154.5 84t-63.5 126q0 56 38 94.5t97 38.5q58 0 95 -38t37 -91q0 -13 -9 -45q51 -25 131 -25q138 0 204.5 110t72.5 331q-116 -144 -315 -144 q-175 0 -280.5 110t-105.5 283zM303 582q0 -99 58 -167.5t159 -68.5q103 0 165.5 69.5t62.5 170.5q0 96 -59 165.5t-163 69.5q-103 0 -163 -69.5t-60 -169.5z" />
+<glyph unicode=":" horiz-adv-x="499" d="M109 121q0 59 41.5 100t99.5 41t99.5 -41t41.5 -100t-41.5 -100t-99.5 -41t-99.5 41t-41.5 100zM109 719q0 59 41.5 100t99.5 41t99.5 -41t41.5 -100t-41.5 -100t-99.5 -41t-99.5 41t-41.5 100z" />
+<glyph unicode=";" horiz-adv-x="505" d="M80 -186q91 98 121 186q-39 12 -63.5 45t-24.5 76q0 59 40.5 100t102.5 41t100.5 -43.5t38.5 -109.5q0 -87 -68.5 -197t-154.5 -176zM113 719q0 59 41.5 100t99.5 41t99.5 -41t41.5 -100t-41.5 -100t-99.5 -41t-99.5 41t-41.5 100z" />
+<glyph unicode="<" horiz-adv-x="942" d="M57 442v99l781 395v-199l-519 -245l519 -246v-199z" />
+<glyph unicode="=" horiz-adv-x="1097" d="M113 172v184h872v-184h-872zM113 627v184h872v-184h-872z" />
+<glyph unicode=">" horiz-adv-x="942" d="M104 47v199l519 246l-519 245v199l781 -395v-99z" />
+<glyph unicode="?" horiz-adv-x="788" d="M59 1069v168q147 39 279 39q171 0 277 -74.5t106 -222.5q0 -76 -30 -140.5t-72.5 -109t-85.5 -85.5t-73 -88t-30 -97q0 -17 3 -32.5t10 -38t8 -28.5h-215q-19 51 -19 107q0 58 27 110.5t65.5 93.5t77 82.5t65.5 94t27 110.5q0 73 -43.5 108.5t-138.5 35.5 q-102 0 -238 -33zM205 121q0 59 41.5 100t99.5 41t99.5 -41t41.5 -100t-41.5 -100t-99.5 -41t-99.5 41t-41.5 100z" />
+<glyph unicode="@" horiz-adv-x="1552" d="M70 473q0 149 59 281.5t158.5 224.5t232.5 145.5t277 53.5q186 0 338 -84t240.5 -238t88.5 -348q0 -197 -88 -304.5t-225 -107.5q-50 0 -89 15t-60 40t-32.5 48t-15.5 47h-8q-97 -150 -268 -150q-133 0 -211 90t-78 230q0 112 48.5 208t135.5 154t191 58q79 0 140 -35.5 t93 -100.5h7q15 55 36 103h127q-73 -282 -73 -436q0 -164 90 -164q70 0 122 83.5t52 225.5q0 165 -74.5 293.5t-202 197t-284.5 68.5q-168 0 -310 -77.5t-225.5 -216.5t-83.5 -308q0 -164 79 -299.5t216 -212t303 -76.5q183 0 344 103l58 -88q-203 -121 -406 -121 q-200 0 -362 95.5t-251 254.5t-89 348zM563 418q0 -88 40 -137.5t110 -49.5q96 0 162.5 84.5t66.5 202.5q0 88 -40 136t-111 48q-97 0 -162.5 -83t-65.5 -201z" />
+<glyph unicode="A" d="M2 0v188h148l352 871h-170v188h510l428 -1059h149v-188h-559v188h164l-66 170h-512l-65 -170h164v-188h-543zM520 547h367l-185 471z" />
+<glyph unicode="B" horiz-adv-x="1277" d="M82 0v188h168v871h-168v188h620q211 0 338 -86t127 -239q0 -211 -235 -283q138 -34 205 -113.5t67 -189.5q0 -155 -123.5 -245.5t-351.5 -90.5h-647zM483 186h240q115 0 179.5 45.5t64.5 130.5q0 84 -64 132.5t-186 48.5h-234v-357zM483 723h203q118 0 182 44.5t64 127.5 q0 80 -62 123t-168 43h-219v-338z" />
+<glyph unicode="C" horiz-adv-x="1275" d="M70 616q0 305 184 480.5t481 175.5q134 0 260.5 -32t204.5 -69v-358h-227v229q-114 31 -225 31q-196 0 -314.5 -116.5t-118.5 -327.5q0 -215 123.5 -332t323.5 -117q216 0 436 131v-227q-208 -109 -457 -109q-309 0 -490 171t-181 470z" />
+<glyph unicode="D" horiz-adv-x="1417" d="M82 0v188h168v871h-168v188h592q167 0 295.5 -45t209.5 -128t122.5 -196.5t41.5 -254.5q0 -140 -41.5 -253.5t-122.5 -196.5t-209.5 -128t-295.5 -45h-592zM487 188h187q216 0 321 113.5t105 321.5q0 210 -105 323t-321 113h-187v-871z" />
+<glyph unicode="E" horiz-adv-x="1204" d="M82 0v188h168v871h-168v188h1028v-366h-219v178h-404v-338h469v-189h-469v-344h410v187h221v-375h-1036z" />
+<glyph unicode="F" horiz-adv-x="1130" d="M82 0v188h168v871h-168v188h1012v-383h-220v193h-387v-367h443v-192h-443v-310h179v-188h-584z" />
+<glyph unicode="G" horiz-adv-x="1392" d="M72 616q0 301 179.5 478.5t500.5 177.5q140 0 271 -32.5t220 -78.5v-321h-223v192q-138 43 -262 43q-213 0 -330 -120.5t-117 -333.5q0 -219 122 -332t329 -113q121 0 258 45v264h-260v185h583v-185h-102v-389q-87 -49 -214 -85t-277 -36q-312 0 -495 168t-183 473z" />
+<glyph unicode="H" horiz-adv-x="1566" d="M82 0v188h168v871h-168v188h575v-188h-170v-338h592v338h-170v188h576v-188h-168v-871h168v-188h-576v188h170v336h-592v-336h170v-188h-575z" />
+<glyph unicode="I" horiz-adv-x="737" d="M82 0v188h168v871h-168v188h573v-188h-168v-871h168v-188h-573z" />
+<glyph unicode="J" horiz-adv-x="675" d="M29 -205q84 45 119 78q71 67 71 156v1030h-147v188h532v-188h-147v-1030q0 -76 -19.5 -135.5t-48.5 -97t-77 -68.5t-89.5 -49t-102.5 -41q-13 -4 -20 -7z" />
+<glyph unicode="K" horiz-adv-x="1413" d="M82 0v188h168v871h-168v188h567v-188h-162v-871h189v-188h-594zM547 612v15l407 436h-135v184h547v-188h-145l-390 -424l377 -447h178v-188h-329z" />
+<glyph unicode="L" horiz-adv-x="1140" d="M82 0v188h168v871h-168v188h604v-188h-199v-871h404v201h219v-389h-1028z" />
+<glyph unicode="M" horiz-adv-x="1867" d="M78 0v188h153l31 871h-156v188h523l305 -829l305 829h522v-188h-155l30 -871h154v-188h-524v188h153l-28 836l-359 -915h-196l-359 915l-28 -836h153v-188h-524z" />
+<glyph unicode="N" horiz-adv-x="1544" d="M82 0v188h168v871h-168v188h412l598 -862v674h-168v188h561v-188h-168v-1059h-211l-631 901v-713h168v-188h-561z" />
+<glyph unicode="O" horiz-adv-x="1433" d="M68 623q0 189 83 337t230.5 230t335.5 82q187 0 335 -82t231 -230t83 -337t-83.5 -337t-231 -229.5t-334.5 -81.5q-285 0 -467 181t-182 467zM311 623q0 -207 113.5 -328t292.5 -121q177 0 291 121.5t114 327.5q0 205 -114 327.5t-291 122.5q-178 0 -292 -122t-114 -328z " />
+<glyph unicode="P" horiz-adv-x="1212" d="M82 0v188h168v871h-168v188h582q133 0 234.5 -34.5t160 -93t87 -128.5t28.5 -149q0 -62 -17 -119.5t-56.5 -110t-97 -91.5t-145 -62t-194.5 -23h-177v-248h209v-188h-614zM487 625h185q138 0 200 62t62 155t-62 155t-200 62h-185v-434z" />
+<glyph unicode="Q" horiz-adv-x="1437" d="M70 623q0 189 83 337t230.5 230t335.5 82q187 0 335 -82t231 -230t83 -337q0 -219 -109 -379.5t-296 -227.5l219 -133l-129 -180l-369 272q-272 12 -443 191t-171 457zM313 623q0 -207 113.5 -328t292.5 -121q177 0 291 121.5t114 327.5q0 205 -114 327.5t-291 122.5 q-178 0 -292 -122t-114 -328z" />
+<glyph unicode="R" horiz-adv-x="1331" d="M82 0v188h168v871h-168v188h602q107 0 194 -23t144.5 -60.5t96.5 -89t56 -106.5t17 -114q0 -114 -64.5 -204t-187.5 -130l188 -332h154v-188h-315l-256 457h-224v-269h168v-188h-573zM487 641h201q139 0 201.5 59t62.5 150t-63 150t-201 59h-201v-418z" />
+<glyph unicode="S" horiz-adv-x="1081" d="M86 43v311h213v-164q117 -26 215 -26q258 0 258 155q0 45 -23 79.5t-61.5 57t-89 41t-106 35t-111 36t-106 48t-89 66.5t-61.5 96t-23 131q0 95 38 166.5t104 113.5t147.5 62.5t177.5 20.5q200 0 398 -68v-305h-217v168q-109 16 -175 16q-104 0 -173.5 -35t-69.5 -114 q0 -42 23 -74.5t61.5 -54t89 -39t105.5 -35t110.5 -38t106 -51t89 -70t61.5 -100t23 -136.5q0 -79 -25.5 -141.5t-69 -103t-104.5 -67.5t-128.5 -38t-145.5 -11q-181 0 -442 68z" />
+<glyph unicode="T" horiz-adv-x="1208" d="M37 868v379h1134v-379h-215v191h-233v-871h184v-188h-606v188h184v871h-233v-191h-215z" />
+<glyph unicode="U" horiz-adv-x="1429" d="M41 1059v188h573v-188h-168v-613q0 -134 76.5 -196t202.5 -62q125 0 200.5 63t75.5 198v610h-174v188h564v-188h-168v-615q0 -220 -135.5 -344.5t-370.5 -124.5q-102 0 -190.5 25.5t-161 77t-114.5 140.5t-42 206v635h-168z" />
+<glyph unicode="V" horiz-adv-x="1343" d="M-8 1059v188h567v-188h-168l285 -778l287 778h-168v188h557v-188h-148l-411 -1059h-242l-412 1059h-147z" />
+<glyph unicode="W" horiz-adv-x="1921" d="M-2 1059v188h549v-188h-176l239 -785l250 727l-20 58h-158v188h559v-188h-178l250 -776l235 776h-174v188h549v-188h-141l-344 -1059h-232l-239 690l-252 -690h-232l-346 1059h-139z" />
+<glyph unicode="X" horiz-adv-x="1351" d="M29 0v184h139l379 449l-352 430h-138v184h568v-182h-160l217 -272l223 272h-155v182h548v-186h-137l-354 -420l379 -459h135v-182h-571v182h159l-237 297l-244 -297h156v-182h-555z" />
+<glyph unicode="Y" horiz-adv-x="1306" d="M-10 1059v188h581v-186h-178l262 -418l265 418h-179v186h568v-188h-138l-397 -617v-254h176v-188h-590v188h177v242l-404 629h-143z" />
+<glyph unicode="Z" horiz-adv-x="1193" d="M80 0v205l715 844h-478v-201h-219v399h987v-209l-712 -839h524v211h219v-410h-1036z" />
+<glyph unicode="[" horiz-adv-x="632" d="M152 -406v1854h444v-158h-231v-1538h231v-158h-444z" />
+<glyph unicode="\" horiz-adv-x="1099" d="M35 1448h215l811 -1854h-217z" />
+<glyph unicode="]" horiz-adv-x="632" d="M37 -248h231v1538h-231v158h444v-1854h-444v158z" />
+<glyph unicode="^" horiz-adv-x="917" d="M63 690l332 606h127l332 -606h-211l-184 387l-185 -387h-211z" />
+<glyph unicode="_" horiz-adv-x="1103" d="M106 -59h891v-144h-891v144z" />
+<glyph unicode="`" horiz-adv-x="708" d="M111 1272l151 192l326 -340l-76 -94z" />
+<glyph unicode="a" horiz-adv-x="983" d="M45 248q0 274 412 274h145v56q0 82 -41.5 117.5t-148.5 35.5q-140 0 -293 -45v172q157 49 342 49q186 0 279.5 -75t93.5 -250v-402h131v-180h-351v100q-119 -123 -280 -123q-128 0 -208.5 72t-80.5 199zM276 258q0 -49 29.5 -83t97.5 -34q106 0 199 97v141h-135 q-95 0 -143 -28t-48 -93z" />
+<glyph unicode="b" horiz-adv-x="1048" d="M-10 1268v180h366v-602q109 61 238 61q186 0 289.5 -119t103.5 -327q0 -241 -140.5 -362.5t-397.5 -121.5q-159 0 -324 33v1258h-135zM356 156q50 -4 82 -4q314 0 314 307q0 121 -51 198.5t-164 77.5q-91 0 -181 -49v-530z" />
+<glyph unicode="c" horiz-adv-x="911" d="M59 438q0 226 127 347.5t342 121.5q158 0 320 -59v-299h-193v172q-49 12 -102 12q-125 0 -189.5 -75.5t-64.5 -211.5t65 -213t197 -77q129 0 279 77v-182q-132 -74 -316 -74q-219 0 -342 119.5t-123 341.5z" />
+<glyph unicode="d" horiz-adv-x="1110" d="M59 442q0 213 114 339t302 126q136 0 234 -69v428h-168v182h399v-1268h135v-180h-346v98q-112 -121 -274 -121q-178 0 -287 128.5t-109 336.5zM297 446q0 -127 55 -209.5t168 -82.5q105 0 189 73v449q-75 55 -172 55q-119 0 -179.5 -75.5t-60.5 -209.5z" />
+<glyph unicode="e" horiz-adv-x="950" d="M59 442q0 207 115 336t320 129q135 0 228 -60t135 -157t42 -223q0 -54 -8 -98h-598q36 -215 266 -215q130 0 285 82v-179q-144 -80 -320 -80q-226 0 -345.5 128t-119.5 337zM291 530h391q-16 209 -184 209q-93 0 -143.5 -58.5t-63.5 -150.5z" />
+<glyph unicode="f" horiz-adv-x="724" d="M53 702v183h170v260q0 89 26.5 153.5t74 101t106.5 53.5t131 17q69 0 172 -18v-170q-58 10 -112 10q-77 0 -121.5 -32t-44.5 -119v-256h219v-183h-219v-522h178v-180h-555v180h145v522h-170z" />
+<glyph unicode="g" horiz-adv-x="989" d="M29 -180q0 125 125 200q-58 41 -58 109q0 93 109 172q-125 94 -125 266q0 147 100 243.5t283 96.5q84 0 155 -22h353v-180l-156 8q31 -77 31 -146q0 -147 -100 -243.5t-283 -96.5q-85 0 -150 21q-16 -16 -16 -35q0 -23 27 -37t71 -19.5t100.5 -12t115 -13t115 -24.5 t100.5 -44.5t71 -75t27 -114.5q0 -46 -12.5 -86.5t-45 -81.5t-84 -70t-135.5 -47t-192 -18q-115 0 -199.5 19.5t-133 55t-71 79t-22.5 96.5zM229 -137q0 -64 64 -93.5t170 -29.5q62 0 108.5 10.5t69.5 24t36.5 32t16 30t2.5 22.5q0 30 -24.5 49.5t-70.5 28.5t-92.5 14 t-112.5 10.5t-109 13.5q-58 -51 -58 -112zM295 567q0 -95 49.5 -137.5t118.5 -42.5q70 0 119 42t49 138q0 95 -49.5 136.5t-118.5 41.5t-118.5 -41.5t-49.5 -136.5z" />
+<glyph unicode="h" horiz-adv-x="1165" d="M43 0v180h135v1088h-135v180h367v-668q157 127 321 127q124 0 194 -70t70 -204v-453h135v-180h-501v180h135v430q0 58 -25 86.5t-84 28.5q-110 0 -245 -102v-443h135v-180h-502z" />
+<glyph unicode="i" horiz-adv-x="612" d="M68 0v180h135v525h-135v180h366v-705h135v-180h-501zM147 1171q0 66 47 113t113 47t113 -47t47 -113t-47 -112.5t-113 -46.5t-113 46.5t-47 112.5z" />
+<glyph unicode="j" horiz-adv-x="536" d="M0 -309q42 24 67.5 41.5t55 46t43.5 64.5t14 81v781h-143v180h375v-963q0 -90 -24.5 -153.5t-84 -107.5t-99.5 -63.5t-129 -53.5q-5 -2 -7 -3zM125 1171q0 66 47 113t113 47t112.5 -47t46.5 -113t-46.5 -112.5t-112.5 -46.5t-113 46.5t-47 112.5z" />
+<glyph unicode="k" horiz-adv-x="1103" d="M43 0v180h135v1088h-135v180h367v-1268h122v-180h-489zM446 432v6l259 275h-125v172h477v-174h-115l-248 -267l113 -149q54 -72 95 -105.5t99 -33.5q27 0 54 6v-164q-56 -18 -109 -18q-97 0 -168.5 46.5t-142.5 145.5z" />
+<glyph unicode="l" horiz-adv-x="587" d="M43 0v180h135v1086h-135v182h367v-1268h135v-180h-502z" />
+<glyph unicode="m" horiz-adv-x="1646" d="M72 0v178h118v529h-118v178h331v-103q139 125 293 125q171 0 226 -133q72 63 143 98t160 35q118 0 184 -68t66 -202v-459h120v-178h-469v178h121v445q0 57 -23 82.5t-79 25.5q-98 0 -199 -82v-471h121v-178h-469v178h121v445q0 57 -23.5 82.5t-79.5 25.5q-91 0 -198 -86 v-467h121v-178h-467z" />
+<glyph unicode="n" horiz-adv-x="1189" d="M68 0v180h135v525h-135v180h360v-111q163 133 328 133q124 0 194 -70t70 -204v-453h135v-180h-502v180h135v430q0 58 -24.5 86.5t-83.5 28.5q-111 0 -246 -102v-443h135v-180h-501z" />
+<glyph unicode="o" horiz-adv-x="1052" d="M59 442q0 210 123.5 337.5t343.5 127.5t343.5 -127.5t123.5 -337.5t-123.5 -337.5t-343.5 -127.5t-343.5 127.5t-123.5 337.5zM299 442q0 -129 57 -209.5t170 -80.5t170.5 80.5t57.5 209.5t-57.5 210t-170.5 81t-170 -81t-57 -210z" />
+<glyph unicode="p" horiz-adv-x="1116" d="M41 -225h135v930h-135v180h350v-97q110 119 273 119q179 0 286 -125t107 -333q0 -214 -113 -343t-303 -129q-134 0 -233 70v-272h161v-183h-528v183zM408 209q68 -55 172 -55q119 0 179 76t60 210q0 127 -55 209t-168 82q-105 0 -188 -76v-446z" />
+<glyph unicode="q" horiz-adv-x="1060" d="M59 440q0 214 114.5 340.5t299.5 126.5q155 0 266 -98l17 76h180v-1110h135v-183h-526v183h160v299q-104 -97 -252 -97q-179 0 -286.5 128t-107.5 335zM297 451q0 -128 55.5 -212.5t169.5 -84.5q104 0 183 69v441q-74 67 -173 67q-115 0 -175 -73.5t-60 -206.5z" />
+<glyph unicode="r" horiz-adv-x="765" d="M68 0v180h135v525h-135v180h358v-162q99 184 293 184h18v-233h-37q-174 0 -266 -58v-436h154v-180h-520z" />
+<glyph unicode="s" horiz-adv-x="849" d="M72 27v249h184v-110q82 -21 164 -21q73 0 109 24.5t36 61.5q0 28 -21 49t-55 33.5t-77.5 26.5t-89 26.5t-89 35t-77.5 50.5t-55 75t-21 106q0 126 90 200t266 74q152 0 314 -49v-250h-187v121q-59 12 -125 12q-72 0 -104.5 -24t-32.5 -60q0 -34 27 -58t70 -38.5t94.5 -28 t103.5 -34t95 -49.5t70 -80t27 -121q0 -42 -9 -78.5t-34.5 -73t-65 -62t-105.5 -41.5t-152 -16q-90 0 -189 15.5t-161 34.5z" />
+<glyph unicode="t" horiz-adv-x="694" d="M16 702v183h154v225h231v-225h242v-183h-242v-446q0 -59 30 -79.5t89 -20.5q73 0 137 22v-170q-117 -31 -211 -31q-155 0 -215.5 67.5t-60.5 199.5v458h-154z" />
+<glyph unicode="u" horiz-adv-x="1165" d="M33 705v180h368v-611q0 -58 25 -86t84 -28q114 0 246 100v445h-154v180h385v-705h135v-180h-360v109q-162 -132 -328 -132q-124 0 -194 70.5t-70 204.5v453h-137z" />
+<glyph unicode="v" horiz-adv-x="1073" d="M8 709v176h467v-168h-127l197 -484l194 482h-125v170h449v-176h-109l-305 -709h-225l-305 709h-111z" />
+<glyph unicode="w" horiz-adv-x="1507" d="M14 711v174h453v-174h-133l131 -441l194 615h201l197 -617l129 443h-133v174h440v-174h-117l-221 -711h-201l-202 573l-189 -573h-203l-239 711h-107z" />
+<glyph unicode="x" horiz-adv-x="1093" d="M47 0v168h96l271 283l-256 266h-101v168h473v-164h-112l149 -158l142 158h-111v164h442v-168h-92l-264 -277l262 -272h98v-168h-462v164h110l-162 164l-147 -164h111v-164h-447z" />
+<glyph unicode="y" horiz-adv-x="1062" d="M20 707v178h461v-180h-119l164 -623l201 623h-121v180h447v-178h-101l-297 -887q-41 -125 -114.5 -187.5t-192.5 -62.5q-138 0 -248 68l66 153q84 -45 149 -45q105 0 138 102l47 152h-170l-205 707h-105z" />
+<glyph unicode="z" horiz-adv-x="915" d="M70 0v143l467 580h-267v-158h-190v320h745v-140l-475 -583h307v174h187v-336h-774z" />
+<glyph unicode="{" horiz-adv-x="657" d="M14 434v168q130 8 183 65.5t53 153.5q0 66 -30 209t-30 195q0 48 15 90t46.5 77.5t86.5 56.5t127 21q69 0 147 -20v-137q-62 12 -102 12q-109 0 -109 -113q0 -50 32 -199t32 -227q0 -101 -45.5 -170t-157.5 -98q112 -29 157.5 -98t45.5 -170q0 -78 -32 -227t-32 -199 q0 -113 109 -113q35 0 102 13v-138q-78 -20 -147 -20q-72 0 -127 21t-86.5 57t-46.5 78t-15 90q0 52 30 194.5t30 208.5q0 96 -53 153.5t-183 65.5z" />
+<glyph unicode="|" horiz-adv-x="516" d="M152 -406v1854h213v-1854h-213z" />
+<glyph unicode="}" horiz-adv-x="657" d="M45 -276q67 -13 102 -13q109 0 109 113q0 50 -31.5 199t-31.5 227q0 101 45 170t157 98q-112 29 -157 98t-45 170q0 78 31.5 227t31.5 199q0 113 -109 113q-40 0 -102 -12v137q78 20 148 20q72 0 127 -21t86 -56.5t46 -77.5t15 -90q0 -52 -29.5 -195t-29.5 -209 q0 -96 52.5 -153.5t182.5 -65.5v-168q-130 -8 -182.5 -65.5t-52.5 -153.5q0 -66 29.5 -208.5t29.5 -194.5q0 -48 -15 -90t-46 -78t-86 -57t-127 -21q-70 0 -148 20v138z" />
+<glyph unicode="~" horiz-adv-x="1214" d="M90 393q27 66 54 114.5t66 96.5t91 73t115 25q59 0 122 -24.5t107 -54t97 -54t96 -24.5q30 0 57.5 12t45 27.5t35.5 41.5t26.5 41.5t19.5 39.5l111 -56q-19 -48 -36 -84.5t-45 -81.5t-58 -74t-72.5 -49t-90.5 -20q-53 0 -113 25.5t-104.5 56.5t-101.5 56.5t-106 25.5 q-71 0 -119 -45t-84 -121z" />
+<glyph unicode="¡" horiz-adv-x="503" d="M111 766q0 58 41.5 99.5t99.5 41.5t99.5 -41.5t41.5 -99.5t-41.5 -99.5t-99.5 -41.5t-99.5 41.5t-41.5 99.5zM125 -360l37 886h180l37 -886h-254z" />
+<glyph unicode="¢" horiz-adv-x="925" d="M76 508q0 192 109 304t298 112q48 0 101 -11l61 177l68 -25l-60 -170q175 -70 205 -279h-178q-17 92 -74 138l-180 -516q40 -9 66 -9q89 0 134.5 53t55.5 134h180q-42 -320 -381 -320q-59 0 -100 8l-86 -243l-68 20l84 244q-113 43 -174 142.5t-61 240.5zM268 510 q0 -168 94 -238l177 510q-24 6 -54 6q-109 0 -163 -77.5t-54 -200.5z" />
+<glyph unicode="£" horiz-adv-x="1112" d="M76 461v84h139q-41 102 -41 180q0 138 109.5 231t306.5 93q94 0 168.5 -23.5t119 -59t73.5 -82t40.5 -88t12.5 -81.5h-213q-1 33 -10.5 62.5t-30.5 58t-62 45t-98 16.5q-98 0 -146.5 -48t-48.5 -130q0 -63 39 -174h330v-84h-299q37 -105 37 -142q0 -71 -58 -143 q27 -2 103.5 -16.5t124.5 -14.5q80 0 134.5 31t100.5 103l142 -111q-63 -99 -141 -142.5t-191 -43.5q-73 0 -195 24.5t-188 24.5q-77 0 -174 -37l-49 106q89 34 133.5 89.5t44.5 117.5q0 47 -43 154h-170z" />
+<glyph unicode="¤" horiz-adv-x="1191" d="M94 145l142 134q-82 119 -82 258t82 258l-142 133l111 110l133 -141q116 82 258 82t258 -82l133 141l111 -110l-142 -133q82 -119 82 -258t-82 -258l142 -134l-111 -110l-133 141q-116 -82 -258 -82t-258 82l-133 -141zM330 537q0 -112 78 -190.5t188 -78.5t188 78.5 t78 190.5t-77.5 190t-188.5 78t-188.5 -78t-77.5 -190z" />
+<glyph unicode="¥" horiz-adv-x="1292" d="M66 868v160h495v-162h-137l229 -338l228 338h-138v162h484v-160h-121l-207 -297h182v-86h-241l-82 -118v-25h323v-86h-323v-106h149v-150h-522v150h150v106h-324v86h324v25l-82 118h-242v86h182l-205 297h-122z" />
+<glyph unicode="¦" horiz-adv-x="520" d="M154 -406v836h213v-836h-213zM154 721v727h213v-727h-213z" />
+<glyph unicode="§" horiz-adv-x="909" d="M88 469q0 143 148 205q-101 74 -101 186q0 64 29.5 114t78 78t103.5 42t113 14q51 0 105.5 -11t106 -32.5t84.5 -60.5t33 -89q0 -47 -28 -80.5t-84 -33.5q-51 0 -80 28.5t-29 71.5q0 20 11 53q-47 21 -109 21q-64 0 -101.5 -25.5t-37.5 -68.5q0 -35 27.5 -63t71 -47 t96.5 -38t106.5 -42t97 -51.5t71 -75t27.5 -105.5q0 -140 -149 -205q106 -75 106 -188q0 -115 -92 -180.5t-233 -65.5q-88 0 -170 24t-137.5 72t-55.5 109q0 44 29.5 78t83.5 34q53 0 81.5 -31t28.5 -75q0 -22 -10 -49q52 -31 135 -31q63 0 105.5 25.5t42.5 70.5 q0 35 -28 62t-72 46.5t-98 38t-108 42t-98 52.5t-72 75.5t-28 105.5zM281 504q0 -26 12 -48t29 -37t47.5 -31t54.5 -25.5t65 -25.5t64 -26q76 39 76 111q0 31 -14 55.5t-44.5 43.5t-57.5 31t-73 30t-71 30q-88 -32 -88 -108z" />
+<glyph unicode="¨" horiz-adv-x="892" d="M109 1159q0 55 38.5 94t94.5 39t94.5 -39t38.5 -94t-38.5 -94t-94.5 -39t-94.5 39t-38.5 94zM506 1159q0 55 39 94t94 39t94 -39t39 -94t-39 -94t-94 -39t-94 39t-39 94z" />
+<glyph unicode="©" horiz-adv-x="1445" d="M74 541q0 176 87 325.5t236.5 236.5t325.5 87t325.5 -87t236.5 -236.5t87 -325.5q0 -132 -51.5 -252.5t-138.5 -207.5t-207 -138.5t-252 -51.5t-252 51.5t-207 138.5t-138.5 207.5t-51.5 252.5zM170 541q0 -112 44 -214.5t118 -176.5t176.5 -118t214.5 -44q113 0 216 44 t177 118t118 176.5t44 214.5t-44 215t-118 177.5t-177 118.5t-216 44q-112 0 -214.5 -44t-176.5 -118.5t-118 -177.5t-44 -215zM362 539q0 179 106 275.5t275 96.5q130 0 254 -51v-221h-139v131q-54 14 -102 14q-107 0 -168.5 -60.5t-61.5 -174.5t61 -180t173 -66 q103 0 233 66v-136q-110 -61 -254 -61q-169 0 -273 96t-104 271z" />
+<glyph unicode="ª" horiz-adv-x="718" d="M55 786q0 181 273 181h90v34q0 50 -26.5 71.5t-90.5 21.5q-86 0 -197 -39v129q109 37 232 37q122 0 187 -49t65 -168v-254h69v-132h-229v66q-72 -80 -180 -80q-86 0 -139.5 48t-53.5 134zM82 397v107h571v-107h-571zM225 793q0 -29 17 -50.5t59 -21.5q66 0 117 59v84h-82 q-58 0 -84.5 -16.5t-26.5 -54.5z" />
+<glyph unicode="«" horiz-adv-x="1169" d="M55 522v8l318 385h248l-332 -389l332 -389h-248zM545 522v8l317 385h248l-332 -389l332 -389h-248z" />
+<glyph unicode="¬" horiz-adv-x="1040" d="M113 551v145h805v-417h-144v272h-661z" />
+<glyph unicode="­" horiz-adv-x="806" d="M109 381v194h589v-194h-589z" />
+<glyph unicode="®" horiz-adv-x="866" d="M76 858q0 149 104.5 254t253.5 105q148 0 253.5 -105t105.5 -254q0 -148 -105.5 -253t-253.5 -105q-149 0 -253.5 105t-104.5 253zM139 858q0 -122 86 -207.5t209 -85.5q122 0 207.5 85.5t85.5 207.5t-86 208.5t-207 86.5q-123 0 -209 -86.5t-86 -208.5zM266 694v56h49 v217h-49v57h183q66 0 101.5 -29.5t35.5 -74.5q0 -34 -19.5 -58.5t-46.5 -34.5l47 -77h51v-56h-102l-70 119h-55v-63h51v-56h-176zM391 868h58q27 0 43 14t16 38q0 21 -16 34t-46 13h-55v-99z" />
+<glyph unicode="¯" horiz-adv-x="858" d="M137 1059v172h582v-172h-582z" />
+<glyph unicode="°" horiz-adv-x="753" d="M63 1006q0 129 92.5 221t221.5 92t221 -92t92 -221t-92 -221.5t-221 -92.5t-221.5 92.5t-92.5 221.5zM201 1006q0 -74 51.5 -125.5t124.5 -51.5t124.5 51.5t51.5 125.5q0 72 -51.5 124t-124.5 52t-124.5 -52t-51.5 -124z" />
+<glyph unicode="±" horiz-adv-x="1089" d="M109 43v172h872v-172h-872zM109 567v168h344v277h184v-277h344v-168h-344v-268h-184v268h-344z" />
+<glyph unicode="²" horiz-adv-x="817" d="M76 1440q0 87 95.5 140.5t231.5 53.5t219 -58.5t83 -178.5q0 -67 -26.5 -128t-78 -114.5t-109.5 -97.5t-137 -92h379v-156h-616l-31 131q27 20 84.5 59.5t97.5 67.5t90.5 70t82 77.5t53.5 79.5t22 86q0 47 -30.5 80t-102.5 33q-58 0 -117 -23q10 -20 10 -47 q0 -39 -27.5 -63.5t-70.5 -24.5q-50 0 -76 30.5t-26 74.5z" />
+<glyph unicode="³" horiz-adv-x="759" d="M57 963q0 45 29.5 74.5t73.5 29.5t71 -28.5t27 -69.5q0 -7 -1 -14t-1 -9q38 -12 102 -12q72 0 106 30t34 80q0 119 -181 119h-63v131h53q75 0 117.5 27.5t42.5 79.5q0 42 -29.5 68t-87.5 26q-45 0 -92 -14q2 -8 2 -21q0 -43 -25.5 -70.5t-70.5 -27.5q-44 0 -72.5 27.5 t-28.5 70.5q0 80 88 127t211 47q131 0 216.5 -56t85.5 -157q0 -63 -36 -110t-102 -72q168 -58 168 -201q0 -111 -92 -177t-231 -66q-45 0 -93 7t-101 24t-86.5 52.5t-33.5 84.5z" />
+<glyph unicode="´" horiz-adv-x="708" d="M104 1124l326 340l152 -192l-402 -242z" />
+<glyph unicode="µ" horiz-adv-x="1236" d="M66 705v180h368v-611q0 -58 25 -86t84 -28q113 0 245 100v445h-153v180h385v-705h135v-180h-360v109q-162 -132 -328 -132q-31 0 -66 7l33 -392h-231v1113h-137z" />
+<glyph unicode="¶" horiz-adv-x="1253" d="M59 696q0 164 120.5 277.5t291.5 113.5h690v-131h-168v-985h168v-129h-807v129h197v336h-80q-171 0 -291.5 113.5t-120.5 275.5zM707 -29h133v985h-133v-985z" />
+<glyph unicode="·" horiz-adv-x="479" d="M98 514q0 58 41.5 99.5t100.5 41.5q58 0 99.5 -41.5t41.5 -99.5t-41.5 -99.5t-99.5 -41.5q-59 0 -100.5 41.5t-41.5 99.5z" />
+<glyph unicode="¸" horiz-adv-x="622" d="M70 -412l28 129q66 -12 117 -12q94 0 94 55q0 68 -141 68v43l117 229l114 -24l-67 -150q76 -5 125 -50t49 -118q0 -91 -78 -137.5t-201 -46.5q-85 0 -157 14z" />
+<glyph unicode="¹" horiz-adv-x="684" d="M68 1516l245 104h172v-662h140v-149h-514v149h180v498q-63 -63 -131 -63q-53 0 -77 34t-15 89z" />
+<glyph unicode="º" horiz-adv-x="714" d="M43 911q0 141 82.5 225.5t230.5 84.5t232 -83.5t84 -224.5q0 -142 -82.5 -225.5t-231.5 -83.5t-232 83t-83 224zM63 397v107h588v-107h-588zM219 913q0 -83 33 -133.5t104 -50.5t105.5 50t34.5 132q0 81 -34.5 133t-103.5 52q-71 0 -105 -50.5t-34 -132.5z" />
+<glyph unicode="»" horiz-adv-x="1169" d="M59 137l332 389l-332 389h248l318 -385v-8l-318 -385h-248zM549 137l332 389l-332 389h248l317 -385v-8l-317 -385h-248z" />
+<glyph unicode="¼" horiz-adv-x="1595" d="M66 1155l213 92h149v-608h121v-129h-447v129h158v465q-58 -55 -115 -55q-45 0 -66 29.5t-13 76.5zM418 25l690 1265l125 -67l-688 -1266zM954 184v111q82 110 146 235.5t71 214.5q71 16 105.5 -6t34.5 -71q0 -70 -62.5 -179t-126.5 -186h176v57q49 73 74 162h68v-219h94 v-119h-88v-73h88v-111h-385v111h129v73h-324z" />
+<glyph unicode="½" horiz-adv-x="1677" d="M66 1155l213 92h149v-608h121v-129h-447v129h158v465q-58 -55 -113 -55q-46 0 -67.5 28t-13.5 78zM418 25l690 1265l127 -67l-690 -1266zM1028 565q0 79 87 133t210 54q116 0 188 -53.5t72 -163.5q0 -62 -24.5 -119t-71.5 -106.5t-99 -89.5t-122 -83h348v-137h-551 l-27 119q24 18 76 54.5t87 62t80.5 64t73 70.5t47 72t19.5 78q0 43 -26.5 74t-91.5 31q-49 0 -105 -23q10 -17 10 -45q0 -38 -24 -62t-64 -24q-43 0 -67.5 26.5t-24.5 67.5z" />
+<glyph unicode="¾" horiz-adv-x="1626" d="M70 649q0 39 26.5 65.5t65.5 26.5q37 0 60.5 -24.5t23.5 -57.5q0 -16 -2 -24q43 -17 94 -17q131 0 131 107q0 109 -158 109h-67v114h59q67 0 103 26t36 73q0 43 -28.5 67.5t-83.5 24.5q-44 0 -82 -15q2 -8 2 -24q0 -34 -22.5 -59t-61.5 -25q-41 0 -65.5 25.5t-24.5 64.5 q0 73 80.5 114.5t189.5 41.5q118 0 192 -51t74 -142q0 -58 -32.5 -101.5t-92.5 -66.5q152 -50 152 -184q0 -101 -81 -161t-198 -60q-43 0 -90 8.5t-93.5 25.5t-76.5 48t-30 71zM453 25l690 1265l125 -67l-688 -1266zM987 184v111q82 110 146 235.5t71 214.5q71 16 105 -6 t34 -71q0 -70 -62.5 -179.5t-125.5 -185.5h176v57q49 73 74 162h68v-219h94v-119h-88v-73h88v-111h-385v111h129v73h-324z" />
+<glyph unicode="¿" horiz-adv-x="772" d="M55 -92q0 76 30 140.5t72.5 109t85.5 85.5t73 88t30 97q0 17 -2.5 31.5t-9.5 39t-8 27.5h215q18 -49 18 -106q0 -58 -27 -110.5t-65.5 -94l-77 -83t-65.5 -94t-27 -110.5q0 -73 43.5 -108t138.5 -35q102 0 238 33v-168q-147 -39 -279 -39q-171 0 -277 74.5t-106 222.5z M289 766q0 58 41.5 99.5t99.5 41.5t99.5 -41.5t41.5 -99.5t-41.5 -99.5t-99.5 -41.5t-99.5 41.5t-41.5 99.5z" />
+<glyph unicode="À" d="M2 0v188h148l352 871h-170v188h510l428 -1059h149v-188h-559v188h164l-66 170h-512l-65 -170h164v-188h-543zM383 1593l152 193l325 -340l-76 -94zM520 547h367l-185 471z" />
+<glyph unicode="Á" d="M2 0v188h148l352 871h-170v188h510l428 -1059h149v-188h-559v188h164l-66 170h-512l-65 -170h164v-188h-543zM467 1446l326 340l151 -193l-401 -241zM520 547h367l-185 471z" />
+<glyph unicode="Â" d="M2 0v188h148l352 871h-170v188h510l428 -1059h149v-188h-559v188h164l-66 170h-512l-65 -170h164v-188h-543zM317 1419l277 285h151l279 -285l-49 -67l-305 137l-303 -137zM520 547h367l-185 471z" />
+<glyph unicode="Ã" d="M2 0v188h148l352 871h-170v188h510l428 -1059h149v-188h-559v188h164l-66 170h-512l-65 -170h164v-188h-543zM301 1403q15 41 27 69t34 65.5t44 60t54.5 39t69.5 16.5q53 0 143.5 -47t137.5 -47q84 0 135 100l84 -45q-21 -50 -40 -86.5t-48.5 -78t-67 -63.5t-81.5 -22 q-42 0 -95 23.5t-101.5 47t-80.5 23.5q-79 0 -131 -98zM520 547h367l-185 471z" />
+<glyph unicode="Ä" d="M2 0v188h148l352 871h-170v188h510l428 -1059h149v-188h-559v188h164l-66 170h-512l-65 -170h164v-188h-543zM346 1493q0 55 39 94t94 39t94 -39t39 -94t-39 -94t-94 -39t-94 39t-39 94zM520 547h367l-185 471zM743 1493q0 55 39 94t95 39q55 0 94 -39t39 -94t-39 -94 t-94 -39q-56 0 -95 39t-39 94z" />
+<glyph unicode="Å" d="M2 0v188h148l352 871h-170v188h510l428 -1059h149v-188h-559v188h164l-66 170h-512l-65 -170h164v-188h-543zM422 1573q0 98 68 163.5t188 65.5t188 -65.5t68 -163.5t-68 -164t-188 -66t-188 66t-68 164zM520 547h367l-185 471zM592 1573q0 -45 22.5 -75t63.5 -30 t63.5 30t22.5 75q0 44 -22.5 73t-63.5 29t-63.5 -29t-22.5 -73z" />
+<glyph unicode="Æ" horiz-adv-x="1908" d="M-6 0v193h139l576 868h-131v186h1239v-352h-220v164h-374v-338h440v-189h-440v-344h381v172h221v-360h-998v188h164v189h-487l-123 -189h119v-188h-506zM625 563h366v496h-43z" />
+<glyph unicode="Ç" horiz-adv-x="1275" d="M70 616q0 305 184 480.5t481 175.5q134 0 260.5 -32t204.5 -69v-358h-227v229q-114 31 -225 31q-196 0 -314.5 -116.5t-118.5 -327.5q0 -215 123.5 -332t323.5 -117q216 0 436 131v-227q-185 -100 -416 -107l-22 -51q76 -5 125 -50t49 -118q0 -91 -78 -137.5t-201 -46.5 q-85 0 -157 14l28 129q66 -12 117 -12q94 0 94 55q0 68 -141 68v43l55 109q-271 25 -426 192t-155 444z" />
+<glyph unicode="È" horiz-adv-x="1204" d="M82 0v188h168v871h-168v188h1028v-366h-219v178h-404v-338h469v-189h-469v-344h410v187h221v-375h-1036zM340 1593l152 193l325 -340l-76 -94z" />
+<glyph unicode="É" horiz-adv-x="1204" d="M82 0v188h168v871h-168v188h1028v-366h-219v178h-404v-338h469v-189h-469v-344h410v187h221v-375h-1036zM434 1446l326 340l151 -193l-401 -241z" />
+<glyph unicode="Ê" horiz-adv-x="1204" d="M82 0v188h168v871h-168v188h1028v-366h-219v178h-404v-338h469v-189h-469v-344h410v187h221v-375h-1036zM279 1419l276 285h152l278 -285l-49 -67l-305 137l-303 -137z" />
+<glyph unicode="Ë" horiz-adv-x="1204" d="M82 0v188h168v871h-168v188h1028v-366h-219v178h-404v-338h469v-189h-469v-344h410v187h221v-375h-1036zM299 1493q0 55 38.5 94t94.5 39t94.5 -39t38.5 -94t-38.5 -94t-94.5 -39t-94.5 39t-38.5 94zM696 1493q0 55 39 94t94 39q56 0 95 -39t39 -94t-39 -94t-95 -39 q-55 0 -94 39t-39 94z" />
+<glyph unicode="Ì" horiz-adv-x="737" d="M82 0v188h168v871h-168v188h573v-188h-168v-871h168v-188h-573zM98 1593l152 193l325 -340l-75 -94z" />
+<glyph unicode="Í" horiz-adv-x="737" d="M82 0v188h168v871h-168v188h573v-188h-168v-871h168v-188h-573zM170 1446l326 340l151 -193l-401 -241z" />
+<glyph unicode="Î" horiz-adv-x="737" d="M16 1419l277 285h151l279 -285l-49 -67l-305 137l-303 -137zM82 0v188h168v871h-168v188h573v-188h-168v-871h168v-188h-573z" />
+<glyph unicode="Ï" horiz-adv-x="737" d="M37 1493q0 55 38.5 94t94.5 39t94.5 -39t38.5 -94t-38.5 -94t-94.5 -39t-94.5 39t-38.5 94zM82 0v188h168v871h-168v188h573v-188h-168v-871h168v-188h-573zM434 1493q0 55 39 94t94 39t94 -39t39 -94t-39 -94t-94 -39t-94 39t-39 94z" />
+<glyph unicode="Ð" horiz-adv-x="1417" d="M82 0v188h168v344h-154v193h154v334h-168v188h592q167 0 295.5 -45t209.5 -128t122.5 -196.5t41.5 -254.5q0 -140 -41.5 -253.5t-122.5 -196.5t-209.5 -128t-295.5 -45h-592zM487 188h187q216 0 321 113.5t105 321.5q0 210 -105 323t-321 113h-187v-334h334v-193h-334 v-344z" />
+<glyph unicode="Ñ" horiz-adv-x="1544" d="M82 0v188h168v871h-168v188h412l598 -862v674h-168v188h561v-188h-168v-1059h-211l-631 901v-713h168v-188h-561zM410 1403q15 41 27 69t34 65.5t44 60t54.5 39t69.5 16.5q53 0 143.5 -47t137.5 -47q84 0 135 100l84 -45q-20 -50 -39.5 -86.5t-49 -77.5t-67.5 -63.5 t-82 -22.5q-42 0 -94.5 23.5t-101 47t-80.5 23.5q-79 0 -131 -98z" />
+<glyph unicode="Ò" horiz-adv-x="1433" d="M68 623q0 189 83 337t230.5 230t335.5 82q187 0 335 -82t231 -230t83 -337t-83.5 -337t-231 -229.5t-334.5 -81.5q-285 0 -467 181t-182 467zM311 623q0 -207 113.5 -328t292.5 -121q177 0 291 121.5t114 327.5q0 205 -114 327.5t-291 122.5q-178 0 -292 -122t-114 -328z M426 1599l152 193l325 -340l-76 -94z" />
+<glyph unicode="Ó" horiz-adv-x="1433" d="M68 623q0 189 83 337t230.5 230t335.5 82q187 0 335 -82t231 -230t83 -337t-83.5 -337t-231 -229.5t-334.5 -81.5q-285 0 -467 181t-182 467zM311 623q0 -207 113.5 -328t292.5 -121q177 0 291 121.5t114 327.5q0 205 -114 327.5t-291 122.5q-178 0 -292 -122t-114 -328z M510 1452l326 340l151 -193l-401 -241z" />
+<glyph unicode="Ô" horiz-adv-x="1433" d="M68 623q0 189 83 337t230.5 230t335.5 82q187 0 335 -82t231 -230t83 -337t-83.5 -337t-231 -229.5t-334.5 -81.5q-285 0 -467 181t-182 467zM311 623q0 -207 113.5 -328t292.5 -121q177 0 291 121.5t114 327.5q0 205 -114 327.5t-291 122.5q-178 0 -292 -122t-114 -328z M365 1425l276 285h152l278 -285l-49 -67l-305 137l-303 -137z" />
+<glyph unicode="Õ" horiz-adv-x="1433" d="M68 623q0 189 83 337t230.5 230t335.5 82q187 0 335 -82t231 -230t83 -337t-83.5 -337t-231 -229.5t-334.5 -81.5q-285 0 -467 181t-182 467zM311 623q0 -207 113.5 -328t292.5 -121q177 0 291 121.5t114 327.5q0 205 -114 327.5t-291 122.5q-178 0 -292 -122t-114 -328z M342 1409q15 41 27 69t34 65.5t44 60t54.5 39t69.5 16.5q53 0 143.5 -47t137.5 -47q84 0 135 100l84 -45q-21 -50 -40 -86.5t-48.5 -78t-67 -63.5t-81.5 -22q-42 0 -95 23.5t-101.5 47t-80.5 23.5q-79 0 -131 -98z" />
+<glyph unicode="Ö" horiz-adv-x="1433" d="M68 623q0 189 83 337t230.5 230t335.5 82q187 0 335 -82t231 -230t83 -337t-83.5 -337t-231 -229.5t-334.5 -81.5q-285 0 -467 181t-182 467zM311 623q0 -207 113.5 -328t292.5 -121q177 0 291 121.5t114 327.5q0 205 -114 327.5t-291 122.5q-178 0 -292 -122t-114 -328z M385 1499q0 55 38.5 94t94.5 39t94.5 -39t38.5 -94t-38.5 -94t-94.5 -39t-94.5 39t-38.5 94zM782 1499q0 55 39 94t94 39q56 0 95 -39t39 -94t-39 -94t-95 -39q-55 0 -94 39t-39 94z" />
+<glyph unicode="×" horiz-adv-x="1009" d="M76 190l301 302l-301 303l127 127l301 -304l303 304l127 -127l-303 -303l303 -302l-127 -127l-303 302l-301 -302z" />
+<glyph unicode="Ø" horiz-adv-x="1433" d="M68 623q0 189 83 337t230.5 230t335.5 82q213 0 375 -109l110 137l78 -65l-109 -133q93 -88 144 -211t51 -268q0 -189 -83.5 -337t-231 -229.5t-334.5 -81.5q-218 0 -377 107l-109 -135l-79 63l108 133q-92 88 -142 210.5t-50 269.5zM311 623q0 -185 92 -304l551 678 q-102 76 -237 76q-178 0 -292 -122t-114 -328zM475 248q103 -74 242 -74q177 0 291 121.5t114 327.5q0 182 -94 303z" />
+<glyph unicode="Ù" horiz-adv-x="1429" d="M41 1059v188h573v-188h-168v-613q0 -134 76.5 -196t202.5 -62q125 0 200.5 63t75.5 198v610h-174v188h564v-188h-168v-615q0 -220 -135.5 -344.5t-370.5 -124.5q-102 0 -190.5 25.5t-161 77t-114.5 140.5t-42 206v635h-168zM403 1593l152 193l326 -340l-76 -94z" />
+<glyph unicode="Ú" horiz-adv-x="1429" d="M41 1059v188h573v-188h-168v-613q0 -134 76.5 -196t202.5 -62q125 0 200.5 63t75.5 198v610h-174v188h564v-188h-168v-615q0 -220 -135.5 -344.5t-370.5 -124.5q-102 0 -190.5 25.5t-161 77t-114.5 140.5t-42 206v635h-168zM528 1446l326 340l152 -193l-402 -241z" />
+<glyph unicode="Û" horiz-adv-x="1429" d="M41 1059v188h573v-188h-168v-613q0 -134 76.5 -196t202.5 -62q125 0 200.5 63t75.5 198v610h-174v188h564v-188h-168v-615q0 -220 -135.5 -344.5t-370.5 -124.5q-102 0 -190.5 25.5t-161 77t-114.5 140.5t-42 206v635h-168zM362 1419l277 285h152l278 -285l-49 -67 l-305 137l-303 -137z" />
+<glyph unicode="Ü" horiz-adv-x="1429" d="M41 1059v188h573v-188h-168v-613q0 -134 76.5 -196t202.5 -62q125 0 200.5 63t75.5 198v610h-174v188h564v-188h-168v-615q0 -220 -135.5 -344.5t-370.5 -124.5q-102 0 -190.5 25.5t-161 77t-114.5 140.5t-42 206v635h-168zM383 1493q0 55 38.5 94t94.5 39t94.5 -39 t38.5 -94t-38.5 -94t-94.5 -39t-94.5 39t-38.5 94zM780 1493q0 55 39 94t94 39q56 0 95 -39t39 -94t-39 -94t-95 -39q-55 0 -94 39t-39 94z" />
+<glyph unicode="Ý" horiz-adv-x="1306" d="M-10 1059v188h581v-186h-178l262 -418l265 418h-179v186h568v-188h-138l-397 -617v-254h176v-188h-590v188h177v242l-404 629h-143zM469 1446l326 340l151 -193l-401 -241z" />
+<glyph unicode="Þ" horiz-adv-x="1196" d="M80 0v182h174v883h-174v182h606v-176h-194v-84h155q262 0 386 -99t124 -261q0 -78 -28.5 -141.5t-87.5 -114t-159.5 -78t-234.5 -27.5h-155v-90h194v-176h-606zM492 451h163q143 0 203 44.5t60 131.5t-60 131.5t-203 44.5h-163v-352z" />
+<glyph unicode="ß" horiz-adv-x="1218" d="M53 702v183h168v166q0 195 109.5 307t324.5 112q186 0 294 -85t108 -244q0 -67 -20 -125.5t-44.5 -93.5t-44.5 -76.5t-20 -77.5q0 -41 24.5 -87.5t60 -92t70.5 -94.5t59.5 -113t24.5 -131q0 -128 -86 -198t-247 -70q-130 0 -248 43v178q103 -49 213 -49q137 0 137 104 q0 45 -25 92t-60.5 89.5t-71 87t-60.5 101t-25 115.5q0 53 21.5 103t47 84t47 84.5t21.5 105.5q0 83 -45.5 128.5t-132.5 45.5q-105 0 -152.5 -63.5t-47.5 -165.5v-1065h-377v180h145v522h-168z" />
+<glyph unicode="à" horiz-adv-x="983" d="M45 248q0 274 412 274h145v56q0 82 -41.5 117.5t-148.5 35.5q-140 0 -293 -45v172q157 49 342 49q186 0 279.5 -75t93.5 -250v-402h131v-180h-351v100q-119 -123 -280 -123q-128 0 -208.5 72t-80.5 199zM178 1272l152 192l325 -340l-75 -94zM276 258q0 -49 29.5 -83 t97.5 -34q106 0 199 97v141h-135q-95 0 -143 -28t-48 -93z" />
+<glyph unicode="á" horiz-adv-x="983" d="M45 248q0 274 412 274h145v56q0 82 -41.5 117.5t-148.5 35.5q-140 0 -293 -45v172q157 49 342 49q186 0 279.5 -75t93.5 -250v-402h131v-180h-351v100q-119 -123 -280 -123q-128 0 -208.5 72t-80.5 199zM250 1124l325 340l152 -192l-401 -242zM276 258q0 -49 29.5 -83 t97.5 -34q106 0 199 97v141h-135q-95 0 -143 -28t-48 -93z" />
+<glyph unicode="â" horiz-adv-x="983" d="M45 248q0 274 412 274h145v56q0 82 -41.5 117.5t-148.5 35.5q-140 0 -293 -45v172q157 49 342 49q186 0 279.5 -75t93.5 -250v-402h131v-180h-351v100q-119 -123 -280 -123q-128 0 -208.5 72t-80.5 199zM109 1087l276 285h152l278 -285l-49 -67l-305 137l-303 -137z M276 258q0 -49 29.5 -83t97.5 -34q106 0 199 97v141h-135q-95 0 -143 -28t-48 -93z" />
+<glyph unicode="ã" horiz-adv-x="983" d="M45 248q0 274 412 274h145v56q0 82 -41.5 117.5t-148.5 35.5q-140 0 -293 -45v172q157 49 342 49q186 0 279.5 -75t93.5 -250v-402h131v-180h-351v100q-119 -123 -280 -123q-128 0 -208.5 72t-80.5 199zM92 1071q20 52 36.5 87t44.5 77t65.5 64t83.5 22q53 0 143 -47 t137 -47q84 0 135 100l84 -45q-21 -50 -40 -86.5t-48.5 -78t-67 -63.5t-81.5 -22q-42 0 -95 23.5t-101.5 47t-80.5 23.5q-79 0 -131 -98zM276 258q0 -49 29.5 -83t97.5 -34q106 0 199 97v141h-135q-95 0 -143 -28t-48 -93z" />
+<glyph unicode="ä" horiz-adv-x="983" d="M45 248q0 274 412 274h145v56q0 82 -41.5 117.5t-148.5 35.5q-140 0 -293 -45v172q157 49 342 49q186 0 279.5 -75t93.5 -250v-402h131v-180h-351v100q-119 -123 -280 -123q-128 0 -208.5 72t-80.5 199zM129 1159q0 55 38.5 94t94.5 39t94.5 -39t38.5 -94t-38.5 -94 t-94.5 -39t-94.5 39t-38.5 94zM276 258q0 -49 29.5 -83t97.5 -34q106 0 199 97v141h-135q-95 0 -143 -28t-48 -93zM526 1159q0 55 39 94t94 39q56 0 95 -39t39 -94t-39 -94t-95 -39q-55 0 -94 39t-39 94z" />
+<glyph unicode="å" horiz-adv-x="983" d="M45 248q0 274 412 274h145v56q0 82 -41.5 117.5t-148.5 35.5q-140 0 -293 -45v172q157 49 342 49q186 0 279.5 -75t93.5 -250v-402h131v-180h-351v100q-119 -123 -280 -123q-128 0 -208.5 72t-80.5 199zM201 1249q0 98 68 164t188 66t188 -66t68 -164t-68 -163.5 t-188 -65.5t-188 65.5t-68 163.5zM276 258q0 -49 29.5 -83t97.5 -34q106 0 199 97v141h-135q-95 0 -143 -28t-48 -93zM371 1249q0 -45 22.5 -74.5t63.5 -29.5t63.5 29.5t22.5 74.5q0 44 -22.5 73.5t-63.5 29.5t-63.5 -29.5t-22.5 -73.5z" />
+<glyph unicode="æ" horiz-adv-x="1474" d="M43 250q0 272 412 272h145v56q0 82 -41.5 118.5t-144.5 36.5q-142 0 -297 -59v178q159 55 332 55q212 0 299 -106q109 106 282 106q128 0 219 -60.5t132.5 -158t41.5 -221.5q0 -54 -8 -98h-592q30 -215 264 -215q56 0 112.5 14t89.5 29t79 39v-179q-144 -80 -313 -80 q-229 0 -346 140q-165 -140 -349 -140q-145 0 -231 71.5t-86 201.5zM274 260q0 -49 32.5 -81t105.5 -32q122 0 227 93q-21 64 -27 139h-147q-94 0 -142.5 -28t-48.5 -91zM821 526h385q-8 217 -180 217q-94 0 -143.5 -61t-61.5 -156z" />
+<glyph unicode="ç" horiz-adv-x="911" d="M59 438q0 226 127 347.5t342 121.5q158 0 320 -59v-299h-193v172q-49 12 -102 12q-125 0 -189.5 -75.5t-64.5 -211.5t65 -213t197 -77q129 0 279 77v-182q-120 -68 -283 -74l-22 -51q76 -5 125 -50t49 -118q0 -91 -78 -137.5t-201 -46.5q-86 0 -158 14l29 129 q66 -12 117 -12q94 0 94 55q0 68 -141 68v43l57 113q-175 25 -272 141.5t-97 312.5z" />
+<glyph unicode="è" horiz-adv-x="950" d="M59 442q0 207 115 336t320 129q135 0 228 -60t135 -157t42 -223q0 -54 -8 -98h-598q36 -215 266 -215q130 0 285 82v-179q-144 -80 -320 -80q-226 0 -345.5 128t-119.5 337zM209 1272l151 192l326 -340l-76 -94zM291 530h391q-16 209 -184 209q-93 0 -143.5 -58.5 t-63.5 -150.5z" />
+<glyph unicode="é" horiz-adv-x="950" d="M59 442q0 207 115 336t320 129q135 0 228 -60t135 -157t42 -223q0 -54 -8 -98h-598q36 -215 266 -215q130 0 285 82v-179q-144 -80 -320 -80q-226 0 -345.5 128t-119.5 337zM285 1124l325 340l152 -192l-402 -242zM291 530h391q-16 209 -184 209q-93 0 -143.5 -58.5 t-63.5 -150.5z" />
+<glyph unicode="ê" horiz-adv-x="950" d="M59 442q0 207 115 336t320 129q135 0 228 -60t135 -157t42 -223q0 -54 -8 -98h-598q36 -215 266 -215q130 0 285 82v-179q-144 -80 -320 -80q-226 0 -345.5 128t-119.5 337zM135 1087l277 285h151l279 -285l-49 -67l-306 137l-303 -137zM291 530h391q-16 209 -184 209 q-93 0 -143.5 -58.5t-63.5 -150.5z" />
+<glyph unicode="ë" horiz-adv-x="950" d="M59 442q0 207 115 336t320 129q135 0 228 -60t135 -157t42 -223q0 -54 -8 -98h-598q36 -215 266 -215q130 0 285 82v-179q-144 -80 -320 -80q-226 0 -345.5 128t-119.5 337zM150 1159q0 55 39 94t94 39t94 -39t39 -94t-39 -94t-94 -39t-94 39t-39 94zM291 530h391 q-16 209 -184 209q-93 0 -143.5 -58.5t-63.5 -150.5zM547 1159q0 55 38.5 94t94.5 39t94.5 -39t38.5 -94t-38.5 -94t-94.5 -39t-94.5 39t-38.5 94z" />
+<glyph unicode="ì" horiz-adv-x="612" d="M2 1272l152 192l325 -340l-76 -94zM68 0v180h135v525h-135v180h366v-705h135v-180h-501z" />
+<glyph unicode="í" horiz-adv-x="612" d="M68 0v180h135v525h-135v180h366v-705h135v-180h-501zM78 1124l325 340l152 -192l-401 -242z" />
+<glyph unicode="î" horiz-adv-x="612" d="M-59 1087l276 285h152l278 -285l-49 -67l-305 137l-303 -137zM68 0v180h135v525h-135v180h366v-705h135v-180h-501z" />
+<glyph unicode="ï" horiz-adv-x="612" d="M-39 1159q0 55 38.5 94t94.5 39t94.5 -39t38.5 -94t-38.5 -94t-94.5 -39t-94.5 39t-38.5 94zM68 0v180h135v525h-135v180h366v-705h135v-180h-501zM358 1159q0 55 39 94t95 39t94.5 -39t38.5 -94t-38.5 -94t-94.5 -39t-95 39t-39 94z" />
+<glyph unicode="ð" horiz-adv-x="1067" d="M59 428q0 193 111 315.5t301 122.5q168 0 266 -106q-38 212 -229 403l-225 -157l-58 84l205 143q-73 65 -182 127l114 133q141 -70 238 -147l180 124l60 -81l-162 -113q321 -317 321 -744q0 -265 -125.5 -410t-353.5 -145q-213 0 -337 123.5t-124 327.5zM299 426 q0 -124 61 -199t168 -75q108 0 170 76.5t62 199.5q0 121 -60.5 195.5t-171.5 74.5q-110 0 -169.5 -75t-59.5 -197z" />
+<glyph unicode="ñ" horiz-adv-x="1189" d="M68 0v180h135v525h-135v180h360v-111q163 133 328 133q124 0 194 -70t70 -204v-453h135v-180h-502v180h135v430q0 58 -24.5 86.5t-83.5 28.5q-111 0 -246 -102v-443h135v-180h-501zM233 1071q20 52 36.5 87t44.5 77t65.5 64t83.5 22q53 0 143 -47t137 -47q85 0 136 100 l84 -45q-20 -50 -39.5 -86.5t-49 -77.5t-67.5 -63.5t-82 -22.5q-42 0 -94.5 23.5t-101 47t-80.5 23.5q-37 0 -72 -25t-60 -73z" />
+<glyph unicode="ò" horiz-adv-x="1052" d="M59 442q0 210 123.5 337.5t343.5 127.5t343.5 -127.5t123.5 -337.5t-123.5 -337.5t-343.5 -127.5t-343.5 127.5t-123.5 337.5zM242 1272l151 192l326 -340l-76 -94zM299 442q0 -129 57 -209.5t170 -80.5t170.5 80.5t57.5 209.5t-57.5 210t-170.5 81t-170 -81t-57 -210z " />
+<glyph unicode="ó" horiz-adv-x="1052" d="M59 442q0 210 123.5 337.5t343.5 127.5t343.5 -127.5t123.5 -337.5t-123.5 -337.5t-343.5 -127.5t-343.5 127.5t-123.5 337.5zM299 442q0 -129 57 -209.5t170 -80.5t170.5 80.5t57.5 209.5t-57.5 210t-170.5 81t-170 -81t-57 -210zM317 1124l326 340l152 -192l-402 -242z " />
+<glyph unicode="ô" horiz-adv-x="1052" d="M59 442q0 210 123.5 337.5t343.5 127.5t343.5 -127.5t123.5 -337.5t-123.5 -337.5t-343.5 -127.5t-343.5 127.5t-123.5 337.5zM174 1087l277 285h151l279 -285l-50 -67l-305 137l-303 -137zM299 442q0 -129 57 -209.5t170 -80.5t170.5 80.5t57.5 209.5t-57.5 210 t-170.5 81t-170 -81t-57 -210z" />
+<glyph unicode="õ" horiz-adv-x="1052" d="M59 442q0 210 123.5 337.5t343.5 127.5t343.5 -127.5t123.5 -337.5t-123.5 -337.5t-343.5 -127.5t-343.5 127.5t-123.5 337.5zM158 1071q15 41 27 69t34 65.5t44 60t54.5 39t69.5 16.5q53 0 143.5 -47t137.5 -47q84 0 135 100l84 -45q-20 -50 -39.5 -86.5t-49 -77.5 t-67.5 -63.5t-82 -22.5q-42 0 -94.5 23.5t-101 47t-80.5 23.5q-79 0 -131 -98zM299 442q0 -129 57 -209.5t170 -80.5t170.5 80.5t57.5 209.5t-57.5 210t-170.5 81t-170 -81t-57 -210z" />
+<glyph unicode="ö" horiz-adv-x="1052" d="M59 442q0 210 123.5 337.5t343.5 127.5t343.5 -127.5t123.5 -337.5t-123.5 -337.5t-343.5 -127.5t-343.5 127.5t-123.5 337.5zM195 1159q0 55 38.5 94t94.5 39t94.5 -39t38.5 -94t-38.5 -94t-94.5 -39t-94.5 39t-38.5 94zM299 442q0 -129 57 -209.5t170 -80.5t170.5 80.5 t57.5 209.5t-57.5 210t-170.5 81t-170 -81t-57 -210zM592 1159q0 55 39 94t94 39t94 -39t39 -94t-39 -94t-94 -39t-94 39t-39 94z" />
+<glyph unicode="÷" horiz-adv-x="1019" d="M74 418v164h872v-164h-872zM373 168q0 57 40 97t97 40t97 -40t40 -97t-40 -97t-97 -40t-97 40t-40 97zM373 831q0 57 40 97.5t97 40.5t97 -40.5t40 -97.5t-40 -97t-97 -40t-97 40t-40 97z" />
+<glyph unicode="ø" horiz-adv-x="1046" d="M55 442q0 210 123.5 337.5t343.5 127.5q165 0 283 -78l86 101l61 -53l-86 -99q123 -126 123 -336t-123.5 -337.5t-343.5 -127.5q-167 0 -282 76l-86 -100l-64 53l86 100q-121 124 -121 336zM295 442q0 -90 31 -163l346 397q-57 57 -150 57q-113 0 -170 -81t-57 -210z M373 207q58 -55 149 -55q113 0 170.5 80.5t57.5 209.5q0 91 -31 164z" />
+<glyph unicode="ù" horiz-adv-x="1165" d="M33 705v180h368v-611q0 -58 25 -86t84 -28q114 0 246 100v445h-154v180h385v-705h135v-180h-360v109q-162 -132 -328 -132q-124 0 -194 70.5t-70 204.5v453h-137zM242 1272l151 192l326 -340l-76 -94z" />
+<glyph unicode="ú" horiz-adv-x="1165" d="M33 705v180h368v-611q0 -58 25 -86t84 -28q114 0 246 100v445h-154v180h385v-705h135v-180h-360v109q-162 -132 -328 -132q-124 0 -194 70.5t-70 204.5v453h-137zM346 1124l326 340l151 -192l-401 -242z" />
+<glyph unicode="û" horiz-adv-x="1165" d="M33 705v180h368v-611q0 -58 25 -86t84 -28q114 0 246 100v445h-154v180h385v-705h135v-180h-360v109q-162 -132 -328 -132q-124 0 -194 70.5t-70 204.5v453h-137zM186 1087l277 285h151l279 -285l-49 -67l-305 137l-303 -137z" />
+<glyph unicode="ü" horiz-adv-x="1165" d="M33 705v180h368v-611q0 -58 25 -86t84 -28q114 0 246 100v445h-154v180h385v-705h135v-180h-360v109q-162 -132 -328 -132q-124 0 -194 70.5t-70 204.5v453h-137zM197 1159q0 55 38.5 94t94.5 39t94.5 -39t38.5 -94t-38.5 -94t-94.5 -39t-94.5 39t-38.5 94zM594 1159 q0 55 39 94t94 39t94 -39t39 -94t-39 -94t-94 -39t-94 39t-39 94z" />
+<glyph unicode="ý" horiz-adv-x="1062" d="M20 707v178h461v-180h-119l164 -623l201 623h-121v180h447v-178h-101l-297 -887q-41 -125 -114.5 -187.5t-192.5 -62.5q-138 0 -248 68l66 153q84 -45 149 -45q105 0 138 102l47 152h-170l-205 707h-105zM360 1124l326 340l152 -192l-402 -242z" />
+<glyph unicode="þ" horiz-adv-x="1058" d="M-16 -225h135v1493h-135v180h366v-643q106 102 256 102q179 0 286 -125t107 -333q0 -214 -112.5 -343t-302.5 -129q-135 0 -234 70v-272h162v-183h-528v183zM350 209q68 -55 172 -55q119 0 179.5 76t60.5 210q0 127 -55 209t-168 82q-106 0 -189 -76v-446z" />
+<glyph unicode="ÿ" horiz-adv-x="1062" d="M20 707v178h461v-180h-119l164 -623l201 623h-121v180h447v-178h-101l-297 -887q-41 -125 -114.5 -187.5t-192.5 -62.5q-138 0 -248 68l66 153q84 -45 149 -45q105 0 138 102l47 152h-170l-205 707h-105zM211 1159q0 55 38.5 94t94.5 39t94.5 -39t38.5 -94t-38.5 -94 t-94.5 -39t-94.5 39t-38.5 94zM608 1159q0 55 39 94t94 39t94 -39t39 -94t-39 -94t-94 -39t-94 39t-39 94z" />
+<glyph unicode="Œ" horiz-adv-x="1771" d="M74 623q0 290 168.5 457t457.5 167h979v-358h-219v170h-375v-338h441v-189h-441v-344h381v179h222v-367h-988q-290 0 -458 166t-168 457zM317 623q0 -197 101.5 -312.5t286.5 -115.5h149v858h-149q-186 0 -287 -116.5t-101 -313.5z" />
+<glyph unicode="œ" horiz-adv-x="1638" d="M59 442q0 209 120.5 337t332.5 128q232 0 352 -157q108 157 326 157q99 0 176 -34t125 -94.5t72 -139.5t24 -172q0 -54 -8 -98h-594q36 -215 266 -215q130 0 285 82v-179q-144 -80 -315 -80q-245 0 -357 162q-126 -162 -356 -162q-208 0 -328.5 128t-120.5 337zM295 442 q0 -129 57 -209.5t170 -80.5t170.5 80.5t57.5 209.5t-57.5 210t-170.5 81t-170 -81t-57 -210zM983 530h391q-16 209 -184 209q-93 0 -143.5 -58.5t-63.5 -150.5z" />
+<glyph unicode="Ÿ" horiz-adv-x="1306" d="M-10 1059v188h581v-186h-178l262 -418l265 418h-179v186h568v-188h-138l-397 -617v-254h176v-188h-590v188h177v242l-404 629h-143zM326 1493q0 55 39 94t94 39t94 -39t39 -94t-39 -94t-94 -39t-94 39t-39 94zM723 1493q0 55 38.5 94t94.5 39t94.5 -39t38.5 -94 t-38.5 -94t-94.5 -39t-94.5 39t-38.5 94z" />
+<glyph unicode="ˆ" horiz-adv-x="888" d="M104 1087l277 285h151l279 -285l-49 -67l-305 137l-303 -137z" />
+<glyph unicode="˜" horiz-adv-x="954" d="M111 1071q15 41 27 69t34 65.5t44 60t54.5 39t69.5 16.5q53 0 143.5 -47t137.5 -47q84 0 135 100l84 -45q-20 -50 -39.5 -86.5t-49 -77.5t-67.5 -63.5t-82 -22.5q-42 0 -94.5 23.5t-101 47t-80.5 23.5q-79 0 -131 -98z" />
+<glyph unicode=" " horiz-adv-x="901" />
+<glyph unicode=" " horiz-adv-x="1802" />
+<glyph unicode=" " horiz-adv-x="901" />
+<glyph unicode=" " horiz-adv-x="1802" />
+<glyph unicode=" " horiz-adv-x="600" />
+<glyph unicode=" " horiz-adv-x="450" />
+<glyph unicode=" " horiz-adv-x="300" />
+<glyph unicode=" " horiz-adv-x="300" />
+<glyph unicode=" " horiz-adv-x="225" />
+<glyph unicode=" " horiz-adv-x="360" />
+<glyph unicode=" " horiz-adv-x="100" />
+<glyph unicode="‐" horiz-adv-x="806" d="M109 381v194h589v-194h-589z" />
+<glyph unicode="‑" horiz-adv-x="806" d="M109 381v194h589v-194h-589z" />
+<glyph unicode="‒" horiz-adv-x="806" d="M109 381v194h589v-194h-589z" />
+<glyph unicode="–" horiz-adv-x="1341" d="M109 381v194h1124v-194h-1124z" />
+<glyph unicode="—" horiz-adv-x="1802" d="M109 381v194h1585v-194h-1585z" />
+<glyph unicode="‘" horiz-adv-x="452" d="M70 944q0 87 68.5 197t154.5 176l92 -78q-91 -98 -121 -186q39 -12 63.5 -45t24.5 -76q0 -59 -40.5 -100t-102.5 -41t-100.5 43.5t-38.5 109.5z" />
+<glyph unicode="’" horiz-adv-x="446" d="M72 868q91 98 121 187q-39 12 -64 45t-25 76q0 59 41 100t103 41t100.5 -44t38.5 -110q0 -87 -68.5 -196t-154.5 -176z" />
+<glyph unicode="‚" horiz-adv-x="454" d="M51 -186q91 98 121 186q-39 12 -63.5 45t-24.5 76q0 59 40.5 100t102.5 41t101 -43.5t39 -109.5q0 -87 -69 -196.5t-155 -176.5z" />
+<glyph unicode="“" horiz-adv-x="839" d="M70 944q0 87 68.5 197t154.5 176l92 -78q-91 -98 -121 -186q39 -12 63.5 -45t24.5 -76q0 -59 -40.5 -100t-102.5 -41t-100.5 43.5t-38.5 109.5zM457 944q0 87 68.5 197t154.5 176l92 -78q-91 -98 -121 -186q39 -12 63.5 -45t24.5 -76q0 -59 -40.5 -100t-102.5 -41 t-100.5 43.5t-38.5 109.5z" />
+<glyph unicode="”" horiz-adv-x="833" d="M72 868q91 98 121 187q-39 12 -64 45t-25 76q0 59 41 100t103 41t100.5 -44t38.5 -110q0 -87 -68.5 -196t-154.5 -176zM459 868q91 98 121 187q-39 12 -63.5 45t-24.5 76q0 59 40.5 100t102.5 41t100.5 -44t38.5 -110q0 -87 -68.5 -196t-154.5 -176z" />
+<glyph unicode="„" horiz-adv-x="841" d="M51 -186q91 98 121 186q-39 12 -63.5 45t-24.5 76q0 59 40.5 100t102.5 41t101 -43.5t39 -109.5q0 -87 -69 -196.5t-155 -176.5zM438 -186q91 98 121 186q-39 12 -63.5 45t-24.5 76q0 59 40.5 100t102.5 41t101 -43.5t39 -109.5q0 -87 -69 -196.5t-155 -176.5z" />
+<glyph unicode="•" horiz-adv-x="753" d="M127 608q0 103 73.5 175.5t176.5 72.5t176.5 -72.5t73.5 -175.5t-73.5 -175.5t-176.5 -72.5t-176.5 72.5t-73.5 175.5z" />
+<glyph unicode="…" horiz-adv-x="1622" d="M84 121q0 59 41 100t100 41t100.5 -41.5t41.5 -99.5t-41.5 -99.5t-100.5 -41.5t-100 41t-41 100zM670 121q0 59 41 100t100 41t100 -41t41 -100t-41 -100t-100 -41t-100 41t-41 100zM1255 121q0 58 41.5 99.5t100.5 41.5t100 -41t41 -100t-41 -100t-100 -41t-100.5 41.5 t-41.5 99.5z" />
+<glyph unicode=" " horiz-adv-x="360" />
+<glyph unicode="‹" horiz-adv-x="679" d="M55 522v8l318 385h248l-332 -389l332 -389h-248z" />
+<glyph unicode="›" horiz-adv-x="679" d="M59 137l332 389l-332 389h248l318 -385v-8l-318 -385h-248z" />
+<glyph unicode=" " horiz-adv-x="450" />
+<glyph unicode="€" horiz-adv-x="1222" d="M61 385l29 76h105q-2 16 -2 51q0 51 4 76h-136l29 76h119q43 185 187 284t347 99q192 0 363 -76v-289h-195v166q-67 18 -149 18q-124 0 -208.5 -50.5t-119.5 -151.5h373l-29 -76h-360q-4 -20 -4 -66q0 -25 4 -61h313l-29 -76h-270q34 -104 119 -159.5t213 -55.5 q162 0 338 90v-190q-161 -86 -361 -86q-214 0 -357 104t-181 297h-142z" />
+<glyph unicode="™" horiz-adv-x="1452" d="M125 1079v168h473v-168h-88v82h-92v-354h63v-74h-241v74h65v354h-92v-82h-88zM662 733v76h61l10 362h-65v76h188l145 -321l144 321h184v-80h-65l10 -358h61v-76h-227v74h68l-7 287l-141 -297h-61l-142 305l-8 -293h70v-76h-225z" />
+<glyph unicode="◼" horiz-adv-x="880" d="M0 0v881h881v-881h-881z" />
+<hkern u1=" " u2="v" k="43" />
+<hkern u1=" " u2="X" k="20" />
+<hkern u1=" " u2="V" k="61" />
+<hkern u1="&" u2="V" k="61" />
+<hkern u1="(" u2="þ" k="-72" />
+<hkern u1="(" u2="Ï" k="-16" />
+<hkern u1="(" u2="Î" k="-37" />
+<hkern u1="(" u2="{" k="23" />
+<hkern u1="(" u2="x" k="49" />
+<hkern u1="(" u2="v" k="68" />
+<hkern u1="(" u2="p" k="-12" />
+<hkern u1="(" u2="b" k="-66" />
+<hkern u1="(" u2="9" k="43" />
+<hkern u1="(" u2="8" k="51" />
+<hkern u1="(" u2="7" k="49" />
+<hkern u1="(" u2="6" k="61" />
+<hkern u1="(" u2="5" k="33" />
+<hkern u1="(" u2="4" k="37" />
+<hkern u1="(" u2="3" k="33" />
+<hkern u1="(" u2="2" k="57" />
+<hkern u1="(" u2="1" k="53" />
+<hkern u1="(" u2="0" k="76" />
+<hkern u1="(" u2="(" k="37" />
+<hkern u1=")" u2="}" k="20" />
+<hkern u1=")" u2="]" k="33" />
+<hkern u1=")" u2=")" k="37" />
+<hkern u1="*" u2="ï" k="-47" />
+<hkern u1="*" u2="î" k="-70" />
+<hkern u1="*" u2="V" k="-41" />
+<hkern u1="+" u2="3" k="20" />
+<hkern u1="/" u2="þ" k="-35" />
+<hkern u1="/" u2="x" k="55" />
+<hkern u1="/" u2="v" k="39" />
+<hkern u1="/" u2="p" k="47" />
+<hkern u1="/" u2="b" k="-31" />
+<hkern u1="/" u2="9" k="78" />
+<hkern u1="/" u2="8" k="37" />
+<hkern u1="/" u2="7" k="20" />
+<hkern u1="/" u2="6" k="47" />
+<hkern u1="/" u2="5" k="80" />
+<hkern u1="/" u2="4" k="117" />
+<hkern u1="/" u2="3" k="70" />
+<hkern u1="/" u2="2" k="63" />
+<hkern u1="/" u2="1" k="53" />
+<hkern u1="/" u2="0" k="82" />
+<hkern u1="/" u2="/" k="561" />
+<hkern u1="0" u2="}" k="47" />
+<hkern u1="0" u2="]" k="68" />
+<hkern u1="0" u2="\" k="82" />
+<hkern u1="0" u2="V" k="72" />
+<hkern u1="0" u2="/" k="72" />
+<hkern u1="0" u2=")" k="76" />
+<hkern u1="1" u2="÷" k="25" />
+<hkern u1="1" u2="·" k="29" />
+<hkern u1="1" u2="°" k="25" />
+<hkern u1="1" u2="}" k="41" />
+<hkern u1="1" u2="]" k="63" />
+<hkern u1="1" u2="\" k="92" />
+<hkern u1="1" u2="V" k="66" />
+<hkern u1="1" u2="+" k="20" />
+<hkern u1="1" u2=")" k="47" />
+<hkern u1="2" u2="}" k="39" />
+<hkern u1="2" u2="]" k="61" />
+<hkern u1="2" u2="\" k="76" />
+<hkern u1="2" u2="V" k="61" />
+<hkern u1="2" u2="/" k="25" />
+<hkern u1="2" u2=")" k="49" />
+<hkern u1="3" u2="}" k="35" />
+<hkern u1="3" u2="]" k="43" />
+<hkern u1="3" u2="\" k="84" />
+<hkern u1="3" u2="V" k="74" />
+<hkern u1="3" u2=")" k="41" />
+<hkern u1="4" u2="°" k="68" />
+<hkern u1="4" u2="}" k="20" />
+<hkern u1="4" u2="\" k="117" />
+<hkern u1="4" u2="V" k="96" />
+<hkern u1="4" u2=")" k="37" />
+<hkern u1="5" u2="·" k="23" />
+<hkern u1="5" u2="}" k="29" />
+<hkern u1="5" u2="]" k="41" />
+<hkern u1="5" u2="\" k="59" />
+<hkern u1="5" u2="V" k="37" />
+<hkern u1="5" u2=")" k="39" />
+<hkern u1="6" u2="}" k="35" />
+<hkern u1="6" u2="]" k="51" />
+<hkern u1="6" u2="\" k="33" />
+<hkern u1="6" u2="/" k="63" />
+<hkern u1="6" u2=")" k="51" />
+<hkern u1="7" u2="}" k="23" />
+<hkern u1="7" u2="]" k="49" />
+<hkern u1="7" u2="4" k="37" />
+<hkern u1="7" u2="/" k="98" />
+<hkern u1="7" u2=")" k="45" />
+<hkern u1="8" u2="}" k="33" />
+<hkern u1="8" u2="]" k="51" />
+<hkern u1="8" u2="\" k="37" />
+<hkern u1="8" u2="/" k="59" />
+<hkern u1="8" u2=")" k="51" />
+<hkern u1="9" u2="°" k="27" />
+<hkern u1="9" u2="}" k="39" />
+<hkern u1="9" u2="]" k="53" />
+<hkern u1="9" u2="\" k="88" />
+<hkern u1="9" u2="V" k="78" />
+<hkern u1="9" u2="/" k="39" />
+<hkern u1="9" u2=")" k="57" />
+<hkern u1="@" u2="V" k="49" />
+<hkern u1="B" u2="}" k="37" />
+<hkern u1="B" u2="x" k="14" />
+<hkern u1="B" u2="v" k="18" />
+<hkern u1="B" u2="p" k="10" />
+<hkern u1="B" u2="b" k="10" />
+<hkern u1="B" u2="]" k="53" />
+<hkern u1="B" u2="\" k="37" />
+<hkern u1="B" u2="V" k="31" />
+<hkern u1="B" u2="/" k="63" />
+<hkern u1="B" u2=")" k="53" />
+<hkern u1="C" u2="ï" k="-12" />
+<hkern u1="C" u2="î" k="-33" />
+<hkern u1="E" u2="þ" k="16" />
+<hkern u1="E" u2="î" k="-12" />
+<hkern u1="F" u2="ï" k="-51" />
+<hkern u1="F" u2="î" k="-70" />
+<hkern u1="F" u2="4" k="61" />
+<hkern u1="F" u2="/" k="139" />
+<hkern u1="F" u2=" " k="47" />
+<hkern u1="H" u2="þ" k="39" />
+<hkern u1="H" u2="ï" k="-6" />
+<hkern u1="H" u2="î" k="-25" />
+<hkern u1="I" u2="þ" k="39" />
+<hkern u1="I" u2="ï" k="-6" />
+<hkern u1="I" u2="î" k="-25" />
+<hkern u1="J" u2="ï" k="-18" />
+<hkern u1="J" u2="î" k="-37" />
+<hkern u1="K" u2="ï" k="-43" />
+<hkern u1="K" u2="î" k="-59" />
+<hkern u1="M" u2="þ" k="37" />
+<hkern u1="M" u2="º" k="20" />
+<hkern u1="M" u2="ª" k="43" />
+<hkern u1="M" u2="v" k="76" />
+<hkern u1="M" u2="p" k="49" />
+<hkern u1="M" u2="b" k="18" />
+<hkern u1="M" u2="/" k="20" />
+<hkern u1="N" u2="ï" k="-29" />
+<hkern u1="N" u2="î" k="-47" />
+<hkern u1="P" u2="}" k="20" />
+<hkern u1="P" u2="]" k="45" />
+<hkern u1="P" u2="X" k="20" />
+<hkern u1="P" u2="M" k="14" />
+<hkern u1="P" u2="4" k="61" />
+<hkern u1="P" u2="/" k="127" />
+<hkern u1="P" u2=")" k="45" />
+<hkern u1="S" u2="þ" k="35" />
+<hkern u1="T" u2="ï" k="-51" />
+<hkern u1="T" u2="î" k="-72" />
+<hkern u1="U" u2="ï" k="-51" />
+<hkern u1="U" u2="î" k="-68" />
+<hkern u1="V" u2="™" k="-14" />
+<hkern u1="V" u2="õ" k="98" />
+<hkern u1="V" u2="ô" k="119" />
+<hkern u1="V" u2="ï" k="-96" />
+<hkern u1="V" u2="î" k="-115" />
+<hkern u1="V" u2="ì" k="-12" />
+<hkern u1="V" u2="ë" k="92" />
+<hkern u1="V" u2="ê" k="80" />
+<hkern u1="V" u2="å" k="145" />
+<hkern u1="V" u2="ä" k="72" />
+<hkern u1="V" u2="ã" k="35" />
+<hkern u1="V" u2="â" k="55" />
+<hkern u1="V" u2="ª" k="12" />
+<hkern u1="V" u2="©" k="45" />
+<hkern u1="V" u2="x" k="94" />
+<hkern u1="V" u2="v" k="84" />
+<hkern u1="V" u2="p" k="84" />
+<hkern u1="V" u2="@" k="59" />
+<hkern u1="V" u2="?" k="-14" />
+<hkern u1="V" u2="9" k="70" />
+<hkern u1="V" u2="5" k="59" />
+<hkern u1="V" u2="4" k="94" />
+<hkern u1="V" u2="3" k="59" />
+<hkern u1="V" u2="2" k="51" />
+<hkern u1="V" u2="1" k="47" />
+<hkern u1="V" u2="0" k="72" />
+<hkern u1="V" u2="/" k="164" />
+<hkern u1="V" u2="*" k="-41" />
+<hkern u1="V" u2=" " k="61" />
+<hkern u1="W" u2="ï" k="-92" />
+<hkern u1="W" u2="î" k="-111" />
+<hkern u1="W" u2="ì" k="-6" />
+<hkern u1="W" u2="ë" k="96" />
+<hkern u1="W" u2="ê" k="84" />
+<hkern u1="W" u2="ä" k="78" />
+<hkern u1="W" u2="ã" k="39" />
+<hkern u1="W" u2="â" k="59" />
+<hkern u1="X" u2="þ" k="12" />
+<hkern u1="X" u2="ï" k="-35" />
+<hkern u1="X" u2="î" k="-53" />
+<hkern u1="X" u2="ª" k="16" />
+<hkern u1="X" u2="v" k="68" />
+<hkern u1="X" u2="p" k="27" />
+<hkern u1="X" u2=" " k="20" />
+<hkern u1="Y" u2="ö" k="143" />
+<hkern u1="Y" u2="õ" k="104" />
+<hkern u1="Y" u2="ô" k="125" />
+<hkern u1="Y" u2="ï" k="-92" />
+<hkern u1="Y" u2="î" k="-111" />
+<hkern u1="Y" u2="ì" k="-6" />
+<hkern u1="Y" u2="ë" k="98" />
+<hkern u1="Y" u2="ê" k="86" />
+<hkern u1="Y" u2="å" k="150" />
+<hkern u1="Y" u2="ä" k="78" />
+<hkern u1="Y" u2="ã" k="41" />
+<hkern u1="Y" u2="â" k="59" />
+<hkern u1="Z" u2="þ" k="35" />
+<hkern u1="[" u2="þ" k="-31" />
+<hkern u1="[" u2="ï" k="14" />
+<hkern u1="[" u2="ì" k="-2" />
+<hkern u1="[" u2="x" k="61" />
+<hkern u1="[" u2="v" k="66" />
+<hkern u1="[" u2="b" k="-25" />
+<hkern u1="[" u2="9" k="39" />
+<hkern u1="[" u2="8" k="51" />
+<hkern u1="[" u2="7" k="51" />
+<hkern u1="[" u2="6" k="55" />
+<hkern u1="[" u2="5" k="37" />
+<hkern u1="[" u2="4" k="45" />
+<hkern u1="[" u2="3" k="31" />
+<hkern u1="[" u2="2" k="63" />
+<hkern u1="[" u2="1" k="61" />
+<hkern u1="[" u2="0" k="68" />
+<hkern u1="[" u2="(" k="33" />
+<hkern u1="\" u2="þ" k="-33" />
+<hkern u1="\" u2="x" k="25" />
+<hkern u1="\" u2="v" k="129" />
+<hkern u1="\" u2="b" k="37" />
+<hkern u1="\" u2="V" k="164" />
+<hkern u1="\" u2="M" k="23" />
+<hkern u1="\" u2="8" k="59" />
+<hkern u1="\" u2="7" k="94" />
+<hkern u1="\" u2="6" k="76" />
+<hkern u1="\" u2="2" k="43" />
+<hkern u1="\" u2="1" k="41" />
+<hkern u1="\" u2="0" k="72" />
+<hkern u1="f" u2="ì" k="-33" />
+<hkern u1="q" u2="™" k="20" />
+<hkern u1="q" u2="}" k="-16" />
+<hkern u1="q" u2="]" k="-25" />
+<hkern u1="q" u2="\" k="63" />
+<hkern u1="q" u2="V" k="111" />
+<hkern u1="q" u2="M" k="31" />
+<hkern u1="q" u2="/" k="-25" />
+<hkern u1="q" u2=")" k="-63" />
+<hkern u1="v" u2="Ð" k="57" />
+<hkern u1="v" u2="}" k="39" />
+<hkern u1="v" u2="]" k="66" />
+<hkern u1="v" u2="\" k="39" />
+<hkern u1="v" u2="X" k="70" />
+<hkern u1="v" u2="V" k="84" />
+<hkern u1="v" u2="M" k="76" />
+<hkern u1="v" u2="/" k="129" />
+<hkern u1="v" u2=")" k="70" />
+<hkern u1="v" u2=" " k="43" />
+<hkern u1="w" u2="Ð" k="61" />
+<hkern u1="x" u2="}" k="37" />
+<hkern u1="x" u2="]" k="61" />
+<hkern u1="x" u2="\" k="55" />
+<hkern u1="x" u2="V" k="92" />
+<hkern u1="x" u2="/" k="29" />
+<hkern u1="x" u2=")" k="51" />
+<hkern u1="y" u2="Ð" k="57" />
+<hkern u1="{" u2="þ" k="-25" />
+<hkern u1="{" u2="x" k="37" />
+<hkern u1="{" u2="v" k="39" />
+<hkern u1="{" u2="b" k="-18" />
+<hkern u1="{" u2="9" k="37" />
+<hkern u1="{" u2="8" k="33" />
+<hkern u1="{" u2="7" k="31" />
+<hkern u1="{" u2="6" k="37" />
+<hkern u1="{" u2="5" k="33" />
+<hkern u1="{" u2="4" k="20" />
+<hkern u1="{" u2="3" k="31" />
+<hkern u1="{" u2="2" k="39" />
+<hkern u1="{" u2="1" k="37" />
+<hkern u1="{" u2="0" k="47" />
+<hkern u1="{" u2="(" k="20" />
+<hkern u1="}" u2=")" k="23" />
+<hkern u1="¡" u2="V" k="72" />
+<hkern u1="°" u2="4" k="66" />
+<hkern u1="·" u2="L" k="39" />
+<hkern u1="·" u2="1" k="23" />
+<hkern u1="¿" u2="þ" k="-14" />
+<hkern u1="¿" u2="x" k="37" />
+<hkern u1="¿" u2="v" k="29" />
+<hkern u1="¿" u2="b" k="35" />
+<hkern u1="¿" u2="X" k="43" />
+<hkern u1="¿" u2="V" k="111" />
+<hkern u1="¿" u2="M" k="49" />
+<hkern u1="Æ" u2="þ" k="16" />
+<hkern u1="È" u2="þ" k="16" />
+<hkern u1="É" u2="þ" k="16" />
+<hkern u1="Ê" u2="þ" k="16" />
+<hkern u1="Ë" u2="þ" k="16" />
+<hkern u1="Ì" u2="þ" k="39" />
+<hkern u1="Í" u2="þ" k="39" />
+<hkern u1="Î" u2="þ" k="39" />
+<hkern u1="Î" u2=")" k="-39" />
+<hkern u1="Ï" u2="þ" k="39" />
+<hkern u1="Ï" u2=")" k="-16" />
+<hkern u1="Þ" u2="}" k="31" />
+<hkern u1="Þ" u2="]" k="53" />
+<hkern u1="Þ" u2="\" k="49" />
+<hkern u1="Þ" u2="X" k="84" />
+<hkern u1="Þ" u2="V" k="51" />
+<hkern u1="Þ" u2="M" k="35" />
+<hkern u1="Þ" u2="/" k="92" />
+<hkern u1="Þ" u2=")" k="68" />
+<hkern u1="ß" u2="®" k="23" />
+<hkern u1="ß" u2="ª" k="14" />
+<hkern u1="ß" u2="}" k="25" />
+<hkern u1="ß" u2="x" k="10" />
+<hkern u1="ß" u2="v" k="61" />
+<hkern u1="ß" u2="p" k="20" />
+<hkern u1="ß" u2="]" k="35" />
+<hkern u1="ß" u2="V" k="41" />
+<hkern u1="ß" u2="M" k="16" />
+<hkern u1="ß" u2="/" k="47" />
+<hkern u1="ß" u2="*" k="20" />
+<hkern u1="ß" u2=")" k="39" />
+<hkern u1="î" u2="™" k="-18" />
+<hkern u1="î" u2="?" k="-29" />
+<hkern u1="î" u2="*" k="-47" />
+<hkern u1="ï" u2="*" k="-23" />
+<hkern u1="ð" u2="™" k="16" />
+<hkern u1="ð" u2="}" k="33" />
+<hkern u1="ð" u2="]" k="45" />
+<hkern u1="ð" u2="\" k="27" />
+<hkern u1="ð" u2="X" k="31" />
+<hkern u1="ð" u2="V" k="74" />
+<hkern u1="ð" u2="M" k="45" />
+<hkern u1="ð" u2="/" k="78" />
+<hkern u1="ð" u2=")" k="47" />
+<hkern u1="÷" u2="3" k="27" />
+<hkern u1="÷" u2="1" k="20" />
+<hkern u1="Œ" u2="þ" k="16" />
+<hkern u1="’" u2="ï" k="-33" />
+<hkern u1="’" u2="î" k="-41" />
+<hkern u1="”" u2="ï" k="-33" />
+<hkern u1="”" u2="î" k="-41" />
+<hkern g1="one" g2="J" k="25" />
+<hkern g1="one" g2="W" k="59" />
+<hkern g1="one" g2="Y,Yacute,Ydieresis" k="59" />
+<hkern g1="one" g2="T" k="23" />
+<hkern g1="one" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="31" />
+<hkern g1="one" g2="quotedbl,quotesingle" k="25" />
+<hkern g1="two" g2="W" k="55" />
+<hkern g1="two" g2="Y,Yacute,Ydieresis" k="66" />
+<hkern g1="three" g2="W" k="66" />
+<hkern g1="three" g2="Y,Yacute,Ydieresis" k="74" />
+<hkern g1="three" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="27" />
+<hkern g1="four" g2="W" k="82" />
+<hkern g1="four" g2="Y,Yacute,Ydieresis" k="78" />
+<hkern g1="four" g2="T" k="47" />
+<hkern g1="four" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="27" />
+<hkern g1="four" g2="quotedbl,quotesingle" k="66" />
+<hkern g1="four" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="-27" />
+<hkern g1="four" g2="AE" k="-33" />
+<hkern g1="five" g2="W" k="29" />
+<hkern g1="five" g2="Y,Yacute,Ydieresis" k="29" />
+<hkern g1="seven" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="55" />
+<hkern g1="seven" g2="AE" k="61" />
+<hkern g1="seven" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="72" />
+<hkern g1="nine" g2="W" k="66" />
+<hkern g1="nine" g2="Y,Yacute,Ydieresis" k="84" />
+<hkern g1="nine" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="nine" g2="quotedbl,quotesingle" k="20" />
+<hkern g1="parenleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="37" />
+<hkern g1="parenleft" g2="AE" k="49" />
+<hkern g1="parenleft" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="66" />
+<hkern g1="parenleft" g2="S" k="41" />
+<hkern g1="parenleft" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="66" />
+<hkern g1="parenleft" g2="d,q" k="76" />
+<hkern g1="parenleft" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="39" />
+<hkern g1="parenleft" g2="h,k,thorn" k="-12" />
+<hkern g1="parenleft" g2="i,igrave,iacute,icircumflex,idieresis" k="35" />
+<hkern g1="parenleft" g2="j" k="-14" />
+<hkern g1="parenleft" g2="l" k="-12" />
+<hkern g1="parenleft" g2="m,n,r,ntilde" k="53" />
+<hkern g1="parenleft" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="80" />
+<hkern g1="parenleft" g2="s" k="61" />
+<hkern g1="parenleft" g2="t" k="51" />
+<hkern g1="parenleft" g2="u,ugrave,uacute,ucircumflex,udieresis" k="61" />
+<hkern g1="parenleft" g2="w" k="70" />
+<hkern g1="parenleft" g2="z" k="55" />
+<hkern g1="braceleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="29" />
+<hkern g1="braceleft" g2="AE" k="43" />
+<hkern g1="braceleft" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="39" />
+<hkern g1="braceleft" g2="S" k="31" />
+<hkern g1="braceleft" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="39" />
+<hkern g1="braceleft" g2="d,q" k="47" />
+<hkern g1="braceleft" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="25" />
+<hkern g1="braceleft" g2="m,n,r,ntilde" k="39" />
+<hkern g1="braceleft" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="51" />
+<hkern g1="braceleft" g2="s" k="41" />
+<hkern g1="braceleft" g2="t" k="27" />
+<hkern g1="braceleft" g2="u,ugrave,uacute,ucircumflex,udieresis" k="35" />
+<hkern g1="braceleft" g2="w" k="39" />
+<hkern g1="braceleft" g2="z" k="39" />
+<hkern g1="bracketleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="49" />
+<hkern g1="bracketleft" g2="AE" k="66" />
+<hkern g1="bracketleft" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="59" />
+<hkern g1="bracketleft" g2="S" k="45" />
+<hkern g1="bracketleft" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="66" />
+<hkern g1="bracketleft" g2="d,q" k="70" />
+<hkern g1="bracketleft" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="41" />
+<hkern g1="bracketleft" g2="i,igrave,iacute,icircumflex,idieresis" k="33" />
+<hkern g1="bracketleft" g2="j" k="-14" />
+<hkern g1="bracketleft" g2="m,n,r,ntilde" k="63" />
+<hkern g1="bracketleft" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="74" />
+<hkern g1="bracketleft" g2="s" k="66" />
+<hkern g1="bracketleft" g2="t" k="51" />
+<hkern g1="bracketleft" g2="u,ugrave,uacute,ucircumflex,udieresis" k="61" />
+<hkern g1="bracketleft" g2="w" k="66" />
+<hkern g1="bracketleft" g2="z" k="63" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="J" k="27" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="W" k="106" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="Y,Yacute,Ydieresis" k="123" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="T" k="94" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="59" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="quotedbl,quotesingle" k="96" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="hyphen,uni00AD,endash,emdash" k="35" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="37" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="d,q" k="16" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="j" k="25" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="16" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="t" k="29" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="u,ugrave,uacute,ucircumflex,udieresis" k="31" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="w" k="92" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="V" k="117" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="g" k="10" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="p" k="23" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="v" k="100" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="y,yacute,ydieresis" k="86" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="four" k="-49" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="seven" k="53" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="parenright" k="27" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="bracketright" k="45" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="backslash" k="127" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="guillemotleft,guilsinglleft" k="25" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="registered" k="78" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="trademark" k="102" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="asterisk" k="90" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="quoteleft,quotedblleft" k="98" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="quoteright,quotedblright" k="98" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="ordfeminine" k="115" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="ordmasculine" k="96" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="space" k="63" />
+<hkern g1="B" g2="J" k="10" />
+<hkern g1="B" g2="W" k="18" />
+<hkern g1="B" g2="Y,Yacute,Ydieresis" k="23" />
+<hkern g1="B" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="23" />
+<hkern g1="B" g2="h,k,thorn" k="14" />
+<hkern g1="B" g2="j" k="10" />
+<hkern g1="B" g2="l" k="14" />
+<hkern g1="B" g2="s" k="12" />
+<hkern g1="B" g2="w" k="18" />
+<hkern g1="B" g2="z" k="14" />
+<hkern g1="B" g2="g" k="18" />
+<hkern g1="B" g2="y,yacute,ydieresis" k="18" />
+<hkern g1="C,Ccedilla" g2="parenright" k="23" />
+<hkern g1="C,Ccedilla" g2="bracketright" k="31" />
+<hkern g1="C,Ccedilla" g2="slash" k="43" />
+<hkern g1="D,Eth" g2="J" k="20" />
+<hkern g1="D,Eth" g2="W" k="31" />
+<hkern g1="D,Eth" g2="Y,Yacute,Ydieresis" k="37" />
+<hkern g1="D,Eth" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="14" />
+<hkern g1="D,Eth" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="39" />
+<hkern g1="D,Eth" g2="AE" k="49" />
+<hkern g1="D,Eth" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="27" />
+<hkern g1="D,Eth" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="14" />
+<hkern g1="D,Eth" g2="h,k,thorn" k="29" />
+<hkern g1="D,Eth" g2="l" k="29" />
+<hkern g1="D,Eth" g2="s" k="10" />
+<hkern g1="D,Eth" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="20" />
+<hkern g1="D,Eth" g2="V" k="33" />
+<hkern g1="D,Eth" g2="g" k="12" />
+<hkern g1="D,Eth" g2="parenright" k="66" />
+<hkern g1="D,Eth" g2="bracketright" k="59" />
+<hkern g1="D,Eth" g2="backslash" k="47" />
+<hkern g1="D,Eth" g2="slash" k="90" />
+<hkern g1="D,Eth" g2="M" k="20" />
+<hkern g1="D,Eth" g2="X" k="53" />
+<hkern g1="D,Eth" g2="b" k="12" />
+<hkern g1="D,Eth" g2="x" k="14" />
+<hkern g1="D,Eth" g2="braceright" k="41" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="g" k="12" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="slash" k="29" />
+<hkern g1="F" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="90" />
+<hkern g1="F" g2="AE" k="129" />
+<hkern g1="F" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="121" />
+<hkern g1="F" g2="hyphen,uni00AD,endash,emdash" k="27" />
+<hkern g1="F" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="39" />
+<hkern g1="F" g2="d,q" k="66" />
+<hkern g1="F" g2="h,k,thorn" k="37" />
+<hkern g1="F" g2="l" k="37" />
+<hkern g1="F" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="68" />
+<hkern g1="F" g2="s" k="49" />
+<hkern g1="F" g2="z" k="14" />
+<hkern g1="F" g2="g" k="61" />
+<hkern g1="G" g2="W" k="16" />
+<hkern g1="G" g2="Y,Yacute,Ydieresis" k="16" />
+<hkern g1="G" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="G" g2="AE" k="12" />
+<hkern g1="G" g2="h,k,thorn" k="14" />
+<hkern g1="G" g2="l" k="14" />
+<hkern g1="G" g2="w" k="10" />
+<hkern g1="G" g2="V" k="18" />
+<hkern g1="G" g2="v" k="10" />
+<hkern g1="G" g2="y,yacute,ydieresis" k="10" />
+<hkern g1="G" g2="parenright" k="43" />
+<hkern g1="G" g2="bracketright" k="43" />
+<hkern g1="G" g2="backslash" k="23" />
+<hkern g1="G" g2="slash" k="66" />
+<hkern g1="G" g2="braceright" k="27" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="hyphen,uni00AD,endash,emdash" k="23" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="12" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="d,q" k="43" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="12" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="i,igrave,iacute,icircumflex,idieresis" k="10" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="j" k="27" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="m,n,r,ntilde" k="10" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="47" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="s" k="14" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="t" k="35" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="49" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="w" k="74" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="z" k="14" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="g" k="33" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="p" k="51" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="v" k="74" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="y,yacute,ydieresis" k="76" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="guillemotleft,guilsinglleft" k="25" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="ordfeminine" k="29" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="ordmasculine" k="12" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="slash" k="23" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="b" k="14" />
+<hkern g1="J" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="35" />
+<hkern g1="J" g2="AE" k="35" />
+<hkern g1="J" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="29" />
+<hkern g1="J" g2="hyphen,uni00AD,endash,emdash" k="16" />
+<hkern g1="J" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="J" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="70" />
+<hkern g1="J" g2="d,q" k="57" />
+<hkern g1="J" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="55" />
+<hkern g1="J" g2="h,k,thorn" k="53" />
+<hkern g1="J" g2="i,igrave,iacute,icircumflex,idieresis" k="37" />
+<hkern g1="J" g2="j" k="33" />
+<hkern g1="J" g2="l" k="53" />
+<hkern g1="J" g2="m,n,r,ntilde" k="59" />
+<hkern g1="J" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="61" />
+<hkern g1="J" g2="s" k="68" />
+<hkern g1="J" g2="t" k="41" />
+<hkern g1="J" g2="u,ugrave,uacute,ucircumflex,udieresis" k="55" />
+<hkern g1="J" g2="w" k="72" />
+<hkern g1="J" g2="z" k="68" />
+<hkern g1="J" g2="g" k="59" />
+<hkern g1="J" g2="p" k="57" />
+<hkern g1="J" g2="v" k="70" />
+<hkern g1="J" g2="y,yacute,ydieresis" k="76" />
+<hkern g1="J" g2="guillemotleft,guilsinglleft" k="39" />
+<hkern g1="J" g2="ordfeminine" k="27" />
+<hkern g1="J" g2="slash" k="49" />
+<hkern g1="J" g2="b" k="27" />
+<hkern g1="J" g2="x" k="55" />
+<hkern g1="J" g2="zero" k="25" />
+<hkern g1="J" g2="three" k="20" />
+<hkern g1="J" g2="nine" k="23" />
+<hkern g1="J" g2="colon,semicolon" k="23" />
+<hkern g1="J" g2="at" k="20" />
+<hkern g1="K" g2="hyphen,uni00AD,endash,emdash" k="53" />
+<hkern g1="K" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="66" />
+<hkern g1="K" g2="d,q" k="25" />
+<hkern g1="K" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="29" />
+<hkern g1="K" g2="u,ugrave,uacute,ucircumflex,udieresis" k="23" />
+<hkern g1="K" g2="w" k="55" />
+<hkern g1="K" g2="g" k="12" />
+<hkern g1="K" g2="p" k="23" />
+<hkern g1="K" g2="v" k="66" />
+<hkern g1="K" g2="y,yacute,ydieresis" k="49" />
+<hkern g1="K" g2="space" k="23" />
+<hkern g1="L" g2="J" k="25" />
+<hkern g1="L" g2="W" k="90" />
+<hkern g1="L" g2="Y,Yacute,Ydieresis" k="96" />
+<hkern g1="L" g2="T" k="113" />
+<hkern g1="L" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="37" />
+<hkern g1="L" g2="quotedbl,quotesingle" k="119" />
+<hkern g1="L" g2="j" k="29" />
+<hkern g1="L" g2="t" k="31" />
+<hkern g1="L" g2="u,ugrave,uacute,ucircumflex,udieresis" k="27" />
+<hkern g1="L" g2="w" k="80" />
+<hkern g1="L" g2="V" k="119" />
+<hkern g1="L" g2="p" k="25" />
+<hkern g1="L" g2="v" k="113" />
+<hkern g1="L" g2="y,yacute,ydieresis" k="74" />
+<hkern g1="L" g2="seven" k="33" />
+<hkern g1="L" g2="parenright" k="35" />
+<hkern g1="L" g2="bracketright" k="45" />
+<hkern g1="L" g2="backslash" k="106" />
+<hkern g1="L" g2="registered" k="88" />
+<hkern g1="L" g2="trademark" k="113" />
+<hkern g1="L" g2="asterisk" k="113" />
+<hkern g1="L" g2="quoteleft,quotedblleft" k="121" />
+<hkern g1="L" g2="quoteright,quotedblright" k="121" />
+<hkern g1="L" g2="ordfeminine" k="18" />
+<hkern g1="L" g2="ordmasculine" k="10" />
+<hkern g1="L" g2="space" k="47" />
+<hkern g1="L" g2="braceright" k="20" />
+<hkern g1="L" g2="periodcentered" k="137" />
+<hkern g1="M" g2="hyphen,uni00AD,endash,emdash" k="20" />
+<hkern g1="M" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="M" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="10" />
+<hkern g1="M" g2="d,q" k="41" />
+<hkern g1="M" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="12" />
+<hkern g1="M" g2="j" k="35" />
+<hkern g1="M" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="41" />
+<hkern g1="M" g2="s" k="12" />
+<hkern g1="M" g2="t" k="43" />
+<hkern g1="M" g2="u,ugrave,uacute,ucircumflex,udieresis" k="49" />
+<hkern g1="M" g2="w" k="74" />
+<hkern g1="M" g2="z" k="14" />
+<hkern g1="M" g2="g" k="31" />
+<hkern g1="M" g2="y,yacute,ydieresis" k="76" />
+<hkern g1="M" g2="guillemotleft,guilsinglleft" k="25" />
+<hkern g1="N,Ntilde" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="41" />
+<hkern g1="N,Ntilde" g2="AE" k="45" />
+<hkern g1="N,Ntilde" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="35" />
+<hkern g1="N,Ntilde" g2="hyphen,uni00AD,endash,emdash" k="23" />
+<hkern g1="N,Ntilde" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="23" />
+<hkern g1="N,Ntilde" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="70" />
+<hkern g1="N,Ntilde" g2="d,q" k="59" />
+<hkern g1="N,Ntilde" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="59" />
+<hkern g1="N,Ntilde" g2="h,k,thorn" k="55" />
+<hkern g1="N,Ntilde" g2="i,igrave,iacute,icircumflex,idieresis" k="39" />
+<hkern g1="N,Ntilde" g2="j" k="29" />
+<hkern g1="N,Ntilde" g2="l" k="55" />
+<hkern g1="N,Ntilde" g2="m,n,r,ntilde" k="61" />
+<hkern g1="N,Ntilde" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="63" />
+<hkern g1="N,Ntilde" g2="s" k="70" />
+<hkern g1="N,Ntilde" g2="t" k="43" />
+<hkern g1="N,Ntilde" g2="u,ugrave,uacute,ucircumflex,udieresis" k="55" />
+<hkern g1="N,Ntilde" g2="w" k="74" />
+<hkern g1="N,Ntilde" g2="z" k="70" />
+<hkern g1="N,Ntilde" g2="g" k="59" />
+<hkern g1="N,Ntilde" g2="p" k="59" />
+<hkern g1="N,Ntilde" g2="v" k="76" />
+<hkern g1="N,Ntilde" g2="y,yacute,ydieresis" k="76" />
+<hkern g1="N,Ntilde" g2="guillemotleft,guilsinglleft" k="43" />
+<hkern g1="N,Ntilde" g2="ordfeminine" k="25" />
+<hkern g1="N,Ntilde" g2="slash" k="78" />
+<hkern g1="N,Ntilde" g2="b" k="23" />
+<hkern g1="N,Ntilde" g2="x" k="55" />
+<hkern g1="N,Ntilde" g2="zero" k="31" />
+<hkern g1="N,Ntilde" g2="three" k="29" />
+<hkern g1="N,Ntilde" g2="nine" k="27" />
+<hkern g1="N,Ntilde" g2="colon,semicolon" k="29" />
+<hkern g1="N,Ntilde" g2="at" k="25" />
+<hkern g1="N,Ntilde" g2="one" k="23" />
+<hkern g1="N,Ntilde" g2="two" k="23" />
+<hkern g1="N,Ntilde" g2="five" k="25" />
+<hkern g1="N,Ntilde" g2="copyright" k="23" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="J" k="20" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="W" k="29" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Y,Yacute,Ydieresis" k="37" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="14" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="39" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="AE" k="51" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="31" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="14" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="h,k,thorn" k="27" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="l" k="27" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="s" k="10" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="20" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Z" k="10" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="V" k="33" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="g" k="12" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="parenright" k="66" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="bracketright" k="59" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="backslash" k="47" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="slash" k="90" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="M" k="20" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="X" k="53" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="b" k="10" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="x" k="14" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="braceright" k="39" />
+<hkern g1="P" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="88" />
+<hkern g1="P" g2="AE" k="150" />
+<hkern g1="P" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="141" />
+<hkern g1="P" g2="hyphen,uni00AD,endash,emdash" k="23" />
+<hkern g1="P" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="16" />
+<hkern g1="P" g2="d,q" k="27" />
+<hkern g1="P" g2="h,k,thorn" k="47" />
+<hkern g1="P" g2="l" k="47" />
+<hkern g1="P" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="29" />
+<hkern g1="P" g2="s" k="14" />
+<hkern g1="P" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="10" />
+<hkern g1="P" g2="g" k="23" />
+<hkern g1="R" g2="J" k="16" />
+<hkern g1="R" g2="W" k="33" />
+<hkern g1="R" g2="Y,Yacute,Ydieresis" k="31" />
+<hkern g1="R" g2="T" k="10" />
+<hkern g1="R" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="R" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="12" />
+<hkern g1="R" g2="d,q" k="20" />
+<hkern g1="R" g2="j" k="12" />
+<hkern g1="R" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="R" g2="u,ugrave,uacute,ucircumflex,udieresis" k="10" />
+<hkern g1="R" g2="w" k="25" />
+<hkern g1="R" g2="V" k="35" />
+<hkern g1="R" g2="g" k="14" />
+<hkern g1="R" g2="p" k="12" />
+<hkern g1="R" g2="v" k="25" />
+<hkern g1="R" g2="y,yacute,ydieresis" k="25" />
+<hkern g1="R" g2="parenright" k="35" />
+<hkern g1="R" g2="bracketright" k="49" />
+<hkern g1="R" g2="backslash" k="53" />
+<hkern g1="R" g2="ordfeminine" k="29" />
+<hkern g1="R" g2="ordmasculine" k="16" />
+<hkern g1="R" g2="b" k="10" />
+<hkern g1="R" g2="braceright" k="25" />
+<hkern g1="S" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="14" />
+<hkern g1="S" g2="d,q" k="10" />
+<hkern g1="S" g2="h,k,thorn" k="14" />
+<hkern g1="S" g2="j" k="12" />
+<hkern g1="S" g2="l" k="14" />
+<hkern g1="S" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="S" g2="s" k="14" />
+<hkern g1="S" g2="w" k="23" />
+<hkern g1="S" g2="z" k="14" />
+<hkern g1="S" g2="g" k="23" />
+<hkern g1="S" g2="p" k="12" />
+<hkern g1="S" g2="v" k="23" />
+<hkern g1="S" g2="y,yacute,ydieresis" k="23" />
+<hkern g1="S" g2="parenright" k="33" />
+<hkern g1="S" g2="bracketright" k="33" />
+<hkern g1="S" g2="ordfeminine" k="10" />
+<hkern g1="S" g2="slash" k="61" />
+<hkern g1="S" g2="braceright" k="23" />
+<hkern g1="T" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="98" />
+<hkern g1="T" g2="AE" k="145" />
+<hkern g1="T" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="68" />
+<hkern g1="T" g2="hyphen,uni00AD,endash,emdash" k="47" />
+<hkern g1="T" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="35" />
+<hkern g1="T" g2="d,q" k="78" />
+<hkern g1="T" g2="h,k,thorn" k="31" />
+<hkern g1="T" g2="l" k="31" />
+<hkern g1="T" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="84" />
+<hkern g1="T" g2="s" k="45" />
+<hkern g1="T" g2="z" k="12" />
+<hkern g1="T" g2="g" k="66" />
+<hkern g1="T" g2="four" k="43" />
+<hkern g1="T" g2="space" k="45" />
+<hkern g1="T" g2="slash" k="109" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="68" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="AE" k="86" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="47" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="hyphen,uni00AD,endash,emdash" k="16" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="12" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="70" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="d,q" k="70" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="45" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="h,k,thorn" k="49" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="i,igrave,iacute,icircumflex,idieresis" k="25" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="j" k="16" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="l" k="49" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="m,n,r,ntilde" k="63" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="70" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="s" k="70" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="t" k="25" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="51" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="w" k="51" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="z" k="63" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="g" k="72" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="p" k="57" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="v" k="49" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="y,yacute,ydieresis" k="55" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="four" k="29" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="guillemotleft,guilsinglleft" k="31" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="slash" k="113" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="b" k="10" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="x" k="55" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="colon,semicolon" k="25" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="five" k="25" />
+<hkern g1="V" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="121" />
+<hkern g1="V" g2="AE" k="170" />
+<hkern g1="V" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="129" />
+<hkern g1="V" g2="hyphen,uni00AD,endash,emdash" k="74" />
+<hkern g1="V" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="33" />
+<hkern g1="V" g2="S" k="25" />
+<hkern g1="V" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="160" />
+<hkern g1="V" g2="d,q" k="135" />
+<hkern g1="V" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="59" />
+<hkern g1="V" g2="h,k,thorn" k="39" />
+<hkern g1="V" g2="i,igrave,iacute,icircumflex,idieresis" k="25" />
+<hkern g1="V" g2="j" k="12" />
+<hkern g1="V" g2="l" k="39" />
+<hkern g1="V" g2="m,n,r,ntilde" k="106" />
+<hkern g1="V" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="137" />
+<hkern g1="V" g2="s" k="143" />
+<hkern g1="V" g2="t" k="31" />
+<hkern g1="V" g2="u,ugrave,uacute,ucircumflex,udieresis" k="72" />
+<hkern g1="V" g2="w" k="80" />
+<hkern g1="V" g2="z" k="119" />
+<hkern g1="V" g2="g" k="133" />
+<hkern g1="V" g2="y,yacute,ydieresis" k="82" />
+<hkern g1="V" g2="guillemotleft,guilsinglleft" k="88" />
+<hkern g1="V" g2="colon,semicolon" k="63" />
+<hkern g1="V" g2="guillemotright,guilsinglright" k="47" />
+<hkern g1="W" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="109" />
+<hkern g1="W" g2="AE" k="156" />
+<hkern g1="W" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="113" />
+<hkern g1="W" g2="hyphen,uni00AD,endash,emdash" k="61" />
+<hkern g1="W" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="29" />
+<hkern g1="W" g2="S" k="23" />
+<hkern g1="W" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="135" />
+<hkern g1="W" g2="d,q" k="111" />
+<hkern g1="W" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="53" />
+<hkern g1="W" g2="h,k,thorn" k="37" />
+<hkern g1="W" g2="i,igrave,iacute,icircumflex,idieresis" k="25" />
+<hkern g1="W" g2="j" k="12" />
+<hkern g1="W" g2="l" k="37" />
+<hkern g1="W" g2="m,n,r,ntilde" k="86" />
+<hkern g1="W" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="115" />
+<hkern g1="W" g2="s" k="121" />
+<hkern g1="W" g2="t" k="27" />
+<hkern g1="W" g2="u,ugrave,uacute,ucircumflex,udieresis" k="59" />
+<hkern g1="W" g2="w" k="80" />
+<hkern g1="W" g2="z" k="96" />
+<hkern g1="W" g2="g" k="111" />
+<hkern g1="W" g2="p" k="68" />
+<hkern g1="W" g2="v" k="78" />
+<hkern g1="W" g2="y,yacute,ydieresis" k="80" />
+<hkern g1="W" g2="four" k="82" />
+<hkern g1="W" g2="guillemotleft,guilsinglleft" k="76" />
+<hkern g1="W" g2="trademark" k="-10" />
+<hkern g1="W" g2="asterisk" k="-35" />
+<hkern g1="W" g2="ordfeminine" k="10" />
+<hkern g1="W" g2="space" k="59" />
+<hkern g1="W" g2="slash" k="154" />
+<hkern g1="W" g2="x" k="76" />
+<hkern g1="W" g2="zero" k="61" />
+<hkern g1="W" g2="three" k="53" />
+<hkern g1="W" g2="nine" k="59" />
+<hkern g1="W" g2="colon,semicolon" k="55" />
+<hkern g1="W" g2="at" k="51" />
+<hkern g1="W" g2="one" k="37" />
+<hkern g1="W" g2="two" k="45" />
+<hkern g1="W" g2="five" k="51" />
+<hkern g1="W" g2="copyright" k="39" />
+<hkern g1="W" g2="guillemotright,guilsinglright" k="39" />
+<hkern g1="W" g2="question" k="-10" />
+<hkern g1="X" g2="hyphen,uni00AD,endash,emdash" k="45" />
+<hkern g1="X" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="53" />
+<hkern g1="X" g2="d,q" k="27" />
+<hkern g1="X" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="29" />
+<hkern g1="X" g2="t" k="12" />
+<hkern g1="X" g2="u,ugrave,uacute,ucircumflex,udieresis" k="29" />
+<hkern g1="X" g2="w" k="57" />
+<hkern g1="X" g2="g" k="12" />
+<hkern g1="X" g2="y,yacute,ydieresis" k="51" />
+<hkern g1="Y,Yacute,Ydieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="129" />
+<hkern g1="Y,Yacute,Ydieresis" g2="AE" k="170" />
+<hkern g1="Y,Yacute,Ydieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="94" />
+<hkern g1="Y,Yacute,Ydieresis" g2="hyphen,uni00AD,endash,emdash" k="106" />
+<hkern g1="Y,Yacute,Ydieresis" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="39" />
+<hkern g1="Y,Yacute,Ydieresis" g2="S" k="16" />
+<hkern g1="Y,Yacute,Ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="170" />
+<hkern g1="Y,Yacute,Ydieresis" g2="d,q" k="168" />
+<hkern g1="Y,Yacute,Ydieresis" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="66" />
+<hkern g1="Y,Yacute,Ydieresis" g2="h,k,thorn" k="41" />
+<hkern g1="Y,Yacute,Ydieresis" g2="i,igrave,iacute,icircumflex,idieresis" k="29" />
+<hkern g1="Y,Yacute,Ydieresis" g2="j" k="16" />
+<hkern g1="Y,Yacute,Ydieresis" g2="l" k="41" />
+<hkern g1="Y,Yacute,Ydieresis" g2="m,n,r,ntilde" k="129" />
+<hkern g1="Y,Yacute,Ydieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="174" />
+<hkern g1="Y,Yacute,Ydieresis" g2="s" k="156" />
+<hkern g1="Y,Yacute,Ydieresis" g2="t" k="39" />
+<hkern g1="Y,Yacute,Ydieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="104" />
+<hkern g1="Y,Yacute,Ydieresis" g2="w" k="100" />
+<hkern g1="Y,Yacute,Ydieresis" g2="z" k="141" />
+<hkern g1="Y,Yacute,Ydieresis" g2="g" k="158" />
+<hkern g1="Y,Yacute,Ydieresis" g2="p" k="117" />
+<hkern g1="Y,Yacute,Ydieresis" g2="v" k="96" />
+<hkern g1="Y,Yacute,Ydieresis" g2="y,yacute,ydieresis" k="104" />
+<hkern g1="Y,Yacute,Ydieresis" g2="four" k="74" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotleft,guilsinglleft" k="113" />
+<hkern g1="Y,Yacute,Ydieresis" g2="trademark" k="-10" />
+<hkern g1="Y,Yacute,Ydieresis" g2="asterisk" k="-35" />
+<hkern g1="Y,Yacute,Ydieresis" g2="ordfeminine" k="12" />
+<hkern g1="Y,Yacute,Ydieresis" g2="space" k="61" />
+<hkern g1="Y,Yacute,Ydieresis" g2="slash" k="137" />
+<hkern g1="Y,Yacute,Ydieresis" g2="b" k="10" />
+<hkern g1="Y,Yacute,Ydieresis" g2="x" k="117" />
+<hkern g1="Y,Yacute,Ydieresis" g2="zero" k="82" />
+<hkern g1="Y,Yacute,Ydieresis" g2="three" k="66" />
+<hkern g1="Y,Yacute,Ydieresis" g2="nine" k="78" />
+<hkern g1="Y,Yacute,Ydieresis" g2="colon,semicolon" k="72" />
+<hkern g1="Y,Yacute,Ydieresis" g2="at" k="63" />
+<hkern g1="Y,Yacute,Ydieresis" g2="one" k="55" />
+<hkern g1="Y,Yacute,Ydieresis" g2="two" k="57" />
+<hkern g1="Y,Yacute,Ydieresis" g2="five" k="55" />
+<hkern g1="Y,Yacute,Ydieresis" g2="copyright" k="51" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotright,guilsinglright" k="53" />
+<hkern g1="Y,Yacute,Ydieresis" g2="question" k="-10" />
+<hkern g1="Z" g2="d,q" k="10" />
+<hkern g1="Z" g2="j" k="20" />
+<hkern g1="Z" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="Z" g2="t" k="16" />
+<hkern g1="Z" g2="u,ugrave,uacute,ucircumflex,udieresis" k="23" />
+<hkern g1="Z" g2="w" k="49" />
+<hkern g1="Z" g2="z" k="10" />
+<hkern g1="Z" g2="g" k="16" />
+<hkern g1="Z" g2="p" k="27" />
+<hkern g1="Z" g2="v" k="51" />
+<hkern g1="Z" g2="y,yacute,ydieresis" k="47" />
+<hkern g1="Z" g2="ordfeminine" k="18" />
+<hkern g1="Z" g2="slash" k="20" />
+<hkern g1="Thorn" g2="J" k="27" />
+<hkern g1="Thorn" g2="W" k="43" />
+<hkern g1="Thorn" g2="Y,Yacute,Ydieresis" k="66" />
+<hkern g1="Thorn" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="Thorn" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="61" />
+<hkern g1="Thorn" g2="AE" k="86" />
+<hkern g1="Thorn" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="57" />
+<hkern g1="Thorn" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="10" />
+<hkern g1="Thorn" g2="h,k,thorn" k="31" />
+<hkern g1="Thorn" g2="l" k="31" />
+<hkern g1="Thorn" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="35" />
+<hkern g1="Thorn" g2="Z" k="14" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="J" k="47" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="W" k="133" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="Y,Yacute,Ydieresis" k="137" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="T" k="70" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="61" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="quotedbl,quotesingle" k="39" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="16" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="w" k="23" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="V" k="164" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="v" k="25" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="y,yacute,ydieresis" k="20" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="parenright" k="47" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="bracketright" k="61" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="backslash" k="115" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="guillemotleft,guilsinglleft" k="25" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="registered" k="27" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="trademark" k="57" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="asterisk" k="39" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="quoteleft,quotedblleft" k="45" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="quoteright,quotedblright" k="45" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="ordfeminine" k="14" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="ordmasculine" k="10" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="space" k="20" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="braceright" k="37" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="question" k="20" />
+<hkern g1="b,p,thorn" g2="J" k="59" />
+<hkern g1="b,p,thorn" g2="W" k="113" />
+<hkern g1="b,p,thorn" g2="Y,Yacute,Ydieresis" k="164" />
+<hkern g1="b,p,thorn" g2="T" k="70" />
+<hkern g1="b,p,thorn" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="70" />
+<hkern g1="b,p,thorn" g2="quotedbl,quotesingle" k="31" />
+<hkern g1="b,p,thorn" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="b,p,thorn" g2="AE" k="14" />
+<hkern g1="b,p,thorn" g2="S" k="12" />
+<hkern g1="b,p,thorn" g2="w" k="16" />
+<hkern g1="b,p,thorn" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="47" />
+<hkern g1="b,p,thorn" g2="Z" k="27" />
+<hkern g1="b,p,thorn" g2="V" k="133" />
+<hkern g1="b,p,thorn" g2="v" k="20" />
+<hkern g1="b,p,thorn" g2="y,yacute,ydieresis" k="12" />
+<hkern g1="b,p,thorn" g2="parenright" k="76" />
+<hkern g1="b,p,thorn" g2="bracketright" k="72" />
+<hkern g1="b,p,thorn" g2="backslash" k="92" />
+<hkern g1="b,p,thorn" g2="trademark" k="43" />
+<hkern g1="b,p,thorn" g2="asterisk" k="25" />
+<hkern g1="b,p,thorn" g2="quoteleft,quotedblleft" k="35" />
+<hkern g1="b,p,thorn" g2="quoteright,quotedblright" k="37" />
+<hkern g1="b,p,thorn" g2="slash" k="74" />
+<hkern g1="b,p,thorn" g2="M" k="43" />
+<hkern g1="b,p,thorn" g2="X" k="29" />
+<hkern g1="b,p,thorn" g2="x" k="20" />
+<hkern g1="b,p,thorn" g2="braceright" k="49" />
+<hkern g1="b,p,thorn" g2="question" k="27" />
+<hkern g1="c,ccedilla" g2="J" k="61" />
+<hkern g1="c,ccedilla" g2="W" k="90" />
+<hkern g1="c,ccedilla" g2="Y,Yacute,Ydieresis" k="145" />
+<hkern g1="c,ccedilla" g2="T" k="10" />
+<hkern g1="c,ccedilla" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="47" />
+<hkern g1="c,ccedilla" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="10" />
+<hkern g1="c,ccedilla" g2="V" k="113" />
+<hkern g1="c,ccedilla" g2="parenright" k="59" />
+<hkern g1="c,ccedilla" g2="bracketright" k="63" />
+<hkern g1="c,ccedilla" g2="backslash" k="68" />
+<hkern g1="c,ccedilla" g2="slash" k="45" />
+<hkern g1="c,ccedilla" g2="M" k="10" />
+<hkern g1="c,ccedilla" g2="braceright" k="39" />
+<hkern g1="d" g2="J" k="45" />
+<hkern g1="d" g2="W" k="29" />
+<hkern g1="d" g2="Y,Yacute,Ydieresis" k="27" />
+<hkern g1="d" g2="T" k="23" />
+<hkern g1="d" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="43" />
+<hkern g1="d" g2="quotedbl,quotesingle" k="18" />
+<hkern g1="d" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="18" />
+<hkern g1="d" g2="w" k="16" />
+<hkern g1="d" g2="V" k="29" />
+<hkern g1="d" g2="v" k="16" />
+<hkern g1="d" g2="y,yacute,ydieresis" k="16" />
+<hkern g1="d" g2="bracketright" k="25" />
+<hkern g1="d" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="d" g2="registered" k="16" />
+<hkern g1="d" g2="trademark" k="16" />
+<hkern g1="d" g2="asterisk" k="18" />
+<hkern g1="d" g2="quoteleft,quotedblleft" k="16" />
+<hkern g1="d" g2="quoteright,quotedblright" k="18" />
+<hkern g1="d" g2="ordfeminine" k="16" />
+<hkern g1="d" g2="ordmasculine" k="12" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="J" k="70" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="W" k="139" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="Y,Yacute,Ydieresis" k="166" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="T" k="61" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="70" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quotedbl,quotesingle" k="18" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="10" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="S" k="10" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="w" k="18" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="27" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="Z" k="18" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="V" k="162" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="v" k="23" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="y,yacute,ydieresis" k="10" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="parenright" k="70" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="bracketright" k="68" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="backslash" k="92" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="trademark" k="37" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="asterisk" k="18" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quoteleft,quotedblleft" k="23" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quoteright,quotedblright" k="25" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="slash" k="55" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="M" k="23" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="braceright" k="45" />
+<hkern g1="f" g2="J" k="68" />
+<hkern g1="f" g2="W" k="72" />
+<hkern g1="f" g2="Y,Yacute,Ydieresis" k="80" />
+<hkern g1="f" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="51" />
+<hkern g1="f" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="8" />
+<hkern g1="f" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="18" />
+<hkern g1="f" g2="V" k="74" />
+<hkern g1="f" g2="parenright" k="-63" />
+<hkern g1="f" g2="bracketright" k="-25" />
+<hkern g1="f" g2="backslash" k="-27" />
+<hkern g1="f" g2="guillemotleft,guilsinglleft" k="20" />
+<hkern g1="f" g2="slash" k="35" />
+<hkern g1="f" g2="M" k="18" />
+<hkern g1="f" g2="braceright" k="-16" />
+<hkern g1="g" g2="J" k="55" />
+<hkern g1="g" g2="W" k="74" />
+<hkern g1="g" g2="Y,Yacute,Ydieresis" k="98" />
+<hkern g1="g" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="29" />
+<hkern g1="g" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="g" g2="AE" k="18" />
+<hkern g1="g" g2="S" k="10" />
+<hkern g1="g" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="8" />
+<hkern g1="g" g2="d,q" k="8" />
+<hkern g1="g" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="8" />
+<hkern g1="g" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="27" />
+<hkern g1="g" g2="Z" k="10" />
+<hkern g1="g" g2="V" k="78" />
+<hkern g1="g" g2="g" k="8" />
+<hkern g1="g" g2="backslash" k="37" />
+<hkern g1="g" g2="M" k="29" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="J" k="47" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="W" k="29" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="Y,Yacute,Ydieresis" k="29" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="T" k="23" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="41" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="27" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="w" k="25" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="V" k="31" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="v" k="25" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="y,yacute,ydieresis" k="25" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="parenright" k="33" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="bracketright" k="35" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="backslash" k="23" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="quoteleft,quotedblleft" k="16" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="ordfeminine" k="25" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="ordmasculine" k="20" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="braceright" k="27" />
+<hkern g1="j" g2="J" k="18" />
+<hkern g1="j" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="12" />
+<hkern g1="j" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="10" />
+<hkern g1="j" g2="M" k="16" />
+<hkern g1="k" g2="J" k="51" />
+<hkern g1="k" g2="W" k="68" />
+<hkern g1="k" g2="Y,Yacute,Ydieresis" k="111" />
+<hkern g1="k" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="53" />
+<hkern g1="k" g2="hyphen,uni00AD,endash,emdash" k="33" />
+<hkern g1="k" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="12" />
+<hkern g1="k" g2="d,q" k="23" />
+<hkern g1="k" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="25" />
+<hkern g1="k" g2="V" k="84" />
+<hkern g1="k" g2="parenright" k="47" />
+<hkern g1="k" g2="bracketright" k="55" />
+<hkern g1="k" g2="backslash" k="49" />
+<hkern g1="k" g2="guillemotleft,guilsinglleft" k="29" />
+<hkern g1="k" g2="trademark" k="20" />
+<hkern g1="k" g2="slash" k="23" />
+<hkern g1="k" g2="braceright" k="33" />
+<hkern g1="l,uniFB02,uniFB04" g2="J" k="53" />
+<hkern g1="l,uniFB02,uniFB04" g2="W" k="37" />
+<hkern g1="l,uniFB02,uniFB04" g2="Y,Yacute,Ydieresis" k="35" />
+<hkern g1="l,uniFB02,uniFB04" g2="T" k="31" />
+<hkern g1="l,uniFB02,uniFB04" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="51" />
+<hkern g1="l,uniFB02,uniFB04" g2="quotedbl,quotesingle" k="18" />
+<hkern g1="l,uniFB02,uniFB04" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="27" />
+<hkern g1="l,uniFB02,uniFB04" g2="w" k="25" />
+<hkern g1="l,uniFB02,uniFB04" g2="V" k="39" />
+<hkern g1="l,uniFB02,uniFB04" g2="v" k="25" />
+<hkern g1="l,uniFB02,uniFB04" g2="y,yacute,ydieresis" k="25" />
+<hkern g1="l,uniFB02,uniFB04" g2="bracketright" k="25" />
+<hkern g1="l,uniFB02,uniFB04" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="l,uniFB02,uniFB04" g2="registered" k="16" />
+<hkern g1="l,uniFB02,uniFB04" g2="trademark" k="16" />
+<hkern g1="l,uniFB02,uniFB04" g2="asterisk" k="18" />
+<hkern g1="l,uniFB02,uniFB04" g2="quoteleft,quotedblleft" k="16" />
+<hkern g1="l,uniFB02,uniFB04" g2="quoteright,quotedblright" k="18" />
+<hkern g1="l,uniFB02,uniFB04" g2="ordfeminine" k="25" />
+<hkern g1="l,uniFB02,uniFB04" g2="ordmasculine" k="20" />
+<hkern g1="l,uniFB02,uniFB04" g2="periodcentered" k="98" />
+<hkern g1="h,m,n,ntilde" g2="J" k="59" />
+<hkern g1="h,m,n,ntilde" g2="W" k="141" />
+<hkern g1="h,m,n,ntilde" g2="Y,Yacute,Ydieresis" k="145" />
+<hkern g1="h,m,n,ntilde" g2="T" k="80" />
+<hkern g1="h,m,n,ntilde" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="72" />
+<hkern g1="h,m,n,ntilde" g2="quotedbl,quotesingle" k="37" />
+<hkern g1="h,m,n,ntilde" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="27" />
+<hkern g1="h,m,n,ntilde" g2="w" k="31" />
+<hkern g1="h,m,n,ntilde" g2="V" k="174" />
+<hkern g1="h,m,n,ntilde" g2="v" k="35" />
+<hkern g1="h,m,n,ntilde" g2="y,yacute,ydieresis" k="33" />
+<hkern g1="h,m,n,ntilde" g2="parenright" k="49" />
+<hkern g1="h,m,n,ntilde" g2="bracketright" k="61" />
+<hkern g1="h,m,n,ntilde" g2="backslash" k="115" />
+<hkern g1="h,m,n,ntilde" g2="guillemotleft,guilsinglleft" k="27" />
+<hkern g1="h,m,n,ntilde" g2="registered" k="25" />
+<hkern g1="h,m,n,ntilde" g2="trademark" k="57" />
+<hkern g1="h,m,n,ntilde" g2="asterisk" k="37" />
+<hkern g1="h,m,n,ntilde" g2="quoteleft,quotedblleft" k="41" />
+<hkern g1="h,m,n,ntilde" g2="quoteright,quotedblright" k="43" />
+<hkern g1="h,m,n,ntilde" g2="ordfeminine" k="27" />
+<hkern g1="h,m,n,ntilde" g2="ordmasculine" k="25" />
+<hkern g1="h,m,n,ntilde" g2="braceright" k="39" />
+<hkern g1="h,m,n,ntilde" g2="question" k="20" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="J" k="61" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="W" k="115" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="Y,Yacute,Ydieresis" k="172" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="T" k="84" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="72" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quotedbl,quotesingle" k="29" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="18" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="AE" k="12" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="S" k="12" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="w" k="16" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="47" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="Z" k="27" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="V" k="137" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="v" k="18" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="y,yacute,ydieresis" k="16" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="parenright" k="80" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="bracketright" k="74" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="backslash" k="98" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="trademark" k="41" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="asterisk" k="29" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quoteleft,quotedblleft" k="35" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quoteright,quotedblright" k="35" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="slash" k="72" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="M" k="41" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="X" k="27" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="x" k="23" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="braceright" k="51" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="question" k="23" />
+<hkern g1="q" g2="J" k="35" />
+<hkern g1="q" g2="W" k="88" />
+<hkern g1="q" g2="Y,Yacute,Ydieresis" k="123" />
+<hkern g1="q" g2="T" k="27" />
+<hkern g1="q" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="49" />
+<hkern g1="q" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="12" />
+<hkern g1="q" g2="S" k="10" />
+<hkern g1="q" g2="j" k="-57" />
+<hkern g1="q" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="33" />
+<hkern g1="q" g2="Z" k="16" />
+<hkern g1="q" g2="g" k="-23" />
+<hkern g1="r" g2="J" k="68" />
+<hkern g1="r" g2="W" k="74" />
+<hkern g1="r" g2="Y,Yacute,Ydieresis" k="92" />
+<hkern g1="r" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="27" />
+<hkern g1="r" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="41" />
+<hkern g1="r" g2="AE" k="37" />
+<hkern g1="r" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="25" />
+<hkern g1="r" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="8" />
+<hkern g1="r" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="35" />
+<hkern g1="r" g2="V" k="78" />
+<hkern g1="r" g2="parenright" k="59" />
+<hkern g1="r" g2="bracketright" k="59" />
+<hkern g1="r" g2="backslash" k="37" />
+<hkern g1="r" g2="slash" k="74" />
+<hkern g1="r" g2="M" k="39" />
+<hkern g1="r" g2="braceright" k="35" />
+<hkern g1="s" g2="J" k="66" />
+<hkern g1="s" g2="W" k="119" />
+<hkern g1="s" g2="Y,Yacute,Ydieresis" k="154" />
+<hkern g1="s" g2="T" k="23" />
+<hkern g1="s" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="68" />
+<hkern g1="s" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="10" />
+<hkern g1="s" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="16" />
+<hkern g1="s" g2="Z" k="10" />
+<hkern g1="s" g2="V" k="139" />
+<hkern g1="s" g2="v" k="8" />
+<hkern g1="s" g2="y,yacute,ydieresis" k="8" />
+<hkern g1="s" g2="parenright" k="66" />
+<hkern g1="s" g2="bracketright" k="68" />
+<hkern g1="s" g2="backslash" k="74" />
+<hkern g1="s" g2="trademark" k="29" />
+<hkern g1="s" g2="slash" k="53" />
+<hkern g1="s" g2="M" k="14" />
+<hkern g1="s" g2="braceright" k="41" />
+<hkern g1="t" g2="J" k="45" />
+<hkern g1="t" g2="W" k="74" />
+<hkern g1="t" g2="Y,Yacute,Ydieresis" k="92" />
+<hkern g1="t" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="37" />
+<hkern g1="t" g2="V" k="78" />
+<hkern g1="t" g2="parenright" k="43" />
+<hkern g1="t" g2="bracketright" k="51" />
+<hkern g1="t" g2="backslash" k="49" />
+<hkern g1="t" g2="slash" k="20" />
+<hkern g1="t" g2="braceright" k="29" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="J" k="57" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="W" k="123" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="Y,Yacute,Ydieresis" k="145" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="T" k="70" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="72" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="quotedbl,quotesingle" k="27" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="27" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="w" k="25" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="V" k="147" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="v" k="25" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="y,yacute,ydieresis" k="25" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="parenright" k="55" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="bracketright" k="68" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="backslash" k="102" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="registered" k="18" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="trademark" k="49" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="asterisk" k="29" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="quoteleft,quotedblleft" k="25" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="quoteright,quotedblright" k="29" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="ordfeminine" k="25" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="ordmasculine" k="20" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="slash" k="23" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="braceright" k="45" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="question" k="25" />
+<hkern g1="v" g2="J" k="72" />
+<hkern g1="v" g2="W" k="78" />
+<hkern g1="v" g2="Y,Yacute,Ydieresis" k="94" />
+<hkern g1="v" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="53" />
+<hkern g1="v" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="106" />
+<hkern g1="v" g2="AE" k="133" />
+<hkern g1="v" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="84" />
+<hkern g1="v" g2="hyphen,uni00AD,endash,emdash" k="23" />
+<hkern g1="v" g2="S" k="12" />
+<hkern g1="v" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="14" />
+<hkern g1="v" g2="d,q" k="16" />
+<hkern g1="v" g2="h,k,thorn" k="27" />
+<hkern g1="v" g2="l" k="27" />
+<hkern g1="v" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="18" />
+<hkern g1="v" g2="s" k="14" />
+<hkern g1="v" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="74" />
+<hkern g1="v" g2="Z" k="14" />
+<hkern g1="v" g2="g" k="18" />
+<hkern g1="v" g2="guillemotleft,guilsinglleft" k="20" />
+<hkern g1="w" g2="J" k="72" />
+<hkern g1="w" g2="W" k="78" />
+<hkern g1="w" g2="Y,Yacute,Ydieresis" k="98" />
+<hkern g1="w" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="55" />
+<hkern g1="w" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="96" />
+<hkern g1="w" g2="AE" k="123" />
+<hkern g1="w" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="66" />
+<hkern g1="w" g2="hyphen,uni00AD,endash,emdash" k="18" />
+<hkern g1="w" g2="S" k="12" />
+<hkern g1="w" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="14" />
+<hkern g1="w" g2="d,q" k="16" />
+<hkern g1="w" g2="h,k,thorn" k="23" />
+<hkern g1="w" g2="l" k="23" />
+<hkern g1="w" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="16" />
+<hkern g1="w" g2="s" k="14" />
+<hkern g1="w" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="74" />
+<hkern g1="w" g2="Z" k="14" />
+<hkern g1="w" g2="V" k="80" />
+<hkern g1="w" g2="g" k="18" />
+<hkern g1="w" g2="parenright" k="70" />
+<hkern g1="w" g2="bracketright" k="66" />
+<hkern g1="w" g2="backslash" k="39" />
+<hkern g1="w" g2="space" k="41" />
+<hkern g1="w" g2="slash" k="123" />
+<hkern g1="w" g2="M" k="74" />
+<hkern g1="w" g2="X" k="55" />
+<hkern g1="w" g2="braceright" k="39" />
+<hkern g1="x" g2="J" k="55" />
+<hkern g1="x" g2="W" k="74" />
+<hkern g1="x" g2="Y,Yacute,Ydieresis" k="115" />
+<hkern g1="x" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="55" />
+<hkern g1="x" g2="hyphen,uni00AD,endash,emdash" k="27" />
+<hkern g1="x" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="14" />
+<hkern g1="x" g2="d,q" k="23" />
+<hkern g1="x" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="25" />
+<hkern g1="x" g2="g" k="10" />
+<hkern g1="x" g2="guillemotleft,guilsinglleft" k="31" />
+<hkern g1="y,yacute,ydieresis" g2="J" k="68" />
+<hkern g1="y,yacute,ydieresis" g2="W" k="76" />
+<hkern g1="y,yacute,ydieresis" g2="Y,Yacute,Ydieresis" k="96" />
+<hkern g1="y,yacute,ydieresis" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="51" />
+<hkern g1="y,yacute,ydieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="92" />
+<hkern g1="y,yacute,ydieresis" g2="AE" k="119" />
+<hkern g1="y,yacute,ydieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="61" />
+<hkern g1="y,yacute,ydieresis" g2="S" k="12" />
+<hkern g1="y,yacute,ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="12" />
+<hkern g1="y,yacute,ydieresis" g2="d,q" k="14" />
+<hkern g1="y,yacute,ydieresis" g2="h,k,thorn" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="l" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="14" />
+<hkern g1="y,yacute,ydieresis" g2="s" k="10" />
+<hkern g1="y,yacute,ydieresis" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="70" />
+<hkern g1="y,yacute,ydieresis" g2="Z" k="14" />
+<hkern g1="y,yacute,ydieresis" g2="V" k="80" />
+<hkern g1="y,yacute,ydieresis" g2="g" k="16" />
+<hkern g1="y,yacute,ydieresis" g2="parenright" k="63" />
+<hkern g1="y,yacute,ydieresis" g2="bracketright" k="61" />
+<hkern g1="y,yacute,ydieresis" g2="backslash" k="39" />
+<hkern g1="y,yacute,ydieresis" g2="space" k="41" />
+<hkern g1="y,yacute,ydieresis" g2="slash" k="106" />
+<hkern g1="y,yacute,ydieresis" g2="M" k="74" />
+<hkern g1="y,yacute,ydieresis" g2="X" k="53" />
+<hkern g1="y,yacute,ydieresis" g2="braceright" k="35" />
+<hkern g1="z" g2="J" k="70" />
+<hkern g1="z" g2="W" k="106" />
+<hkern g1="z" g2="Y,Yacute,Ydieresis" k="145" />
+<hkern g1="z" g2="T" k="16" />
+<hkern g1="z" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="61" />
+<hkern g1="z" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="12" />
+<hkern g1="z" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="12" />
+<hkern g1="z" g2="V" k="127" />
+<hkern g1="z" g2="v" k="8" />
+<hkern g1="z" g2="y,yacute,ydieresis" k="8" />
+<hkern g1="z" g2="parenright" k="55" />
+<hkern g1="z" g2="bracketright" k="63" />
+<hkern g1="z" g2="backslash" k="66" />
+<hkern g1="z" g2="guillemotleft,guilsinglleft" k="23" />
+<hkern g1="z" g2="trademark" k="23" />
+<hkern g1="z" g2="slash" k="33" />
+<hkern g1="z" g2="M" k="10" />
+<hkern g1="z" g2="braceright" k="39" />
+<hkern g1="eth" g2="J" k="51" />
+<hkern g1="eth" g2="W" k="72" />
+<hkern g1="eth" g2="Y,Yacute,Ydieresis" k="74" />
+<hkern g1="eth" g2="T" k="23" />
+<hkern g1="eth" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="57" />
+<hkern g1="eth" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="29" />
+<hkern g1="eth" g2="AE" k="23" />
+<hkern g1="eth" g2="S" k="12" />
+<hkern g1="eth" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="45" />
+<hkern g1="eth" g2="Z" k="25" />
+<hkern g1="germandbls" g2="J" k="59" />
+<hkern g1="germandbls" g2="W" k="41" />
+<hkern g1="germandbls" g2="Y,Yacute,Ydieresis" k="39" />
+<hkern g1="germandbls" g2="T" k="41" />
+<hkern g1="germandbls" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="49" />
+<hkern g1="germandbls" g2="quotedbl,quotesingle" k="20" />
+<hkern g1="germandbls" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="25" />
+<hkern g1="germandbls" g2="j" k="23" />
+<hkern g1="germandbls" g2="t" k="20" />
+<hkern g1="germandbls" g2="u,ugrave,uacute,ucircumflex,udieresis" k="23" />
+<hkern g1="germandbls" g2="w" k="51" />
+<hkern g1="germandbls" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="20" />
+<hkern g1="germandbls" g2="Z" k="14" />
+<hkern g1="germandbls" g2="g" k="8" />
+<hkern g1="germandbls" g2="y,yacute,ydieresis" k="47" />
+<hkern g1="germandbls" g2="quoteleft,quotedblleft" k="20" />
+<hkern g1="germandbls" g2="quoteright,quotedblright" k="20" />
+<hkern g1="colon,semicolon" g2="J" k="23" />
+<hkern g1="colon,semicolon" g2="W" k="55" />
+<hkern g1="colon,semicolon" g2="Y,Yacute,Ydieresis" k="72" />
+<hkern g1="colon,semicolon" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="27" />
+<hkern g1="colon,semicolon" g2="V" k="63" />
+<hkern g1="exclamdown" g2="W" k="59" />
+<hkern g1="exclamdown" g2="Y,Yacute,Ydieresis" k="76" />
+<hkern g1="exclamdown" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="questiondown" g2="W" k="100" />
+<hkern g1="questiondown" g2="Y,Yacute,Ydieresis" k="119" />
+<hkern g1="questiondown" g2="T" k="43" />
+<hkern g1="questiondown" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="59" />
+<hkern g1="questiondown" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="53" />
+<hkern g1="questiondown" g2="AE" k="53" />
+<hkern g1="questiondown" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="31" />
+<hkern g1="questiondown" g2="S" k="29" />
+<hkern g1="questiondown" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="39" />
+<hkern g1="questiondown" g2="d,q" k="39" />
+<hkern g1="questiondown" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="35" />
+<hkern g1="questiondown" g2="h,k,thorn" k="57" />
+<hkern g1="questiondown" g2="i,igrave,iacute,icircumflex,idieresis" k="37" />
+<hkern g1="questiondown" g2="l" k="57" />
+<hkern g1="questiondown" g2="m,n,r,ntilde" k="37" />
+<hkern g1="questiondown" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="39" />
+<hkern g1="questiondown" g2="s" k="41" />
+<hkern g1="questiondown" g2="t" k="20" />
+<hkern g1="questiondown" g2="u,ugrave,uacute,ucircumflex,udieresis" k="27" />
+<hkern g1="questiondown" g2="w" k="29" />
+<hkern g1="questiondown" g2="z" k="37" />
+<hkern g1="questiondown" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="49" />
+<hkern g1="questiondown" g2="Z" k="35" />
+<hkern g1="slash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="119" />
+<hkern g1="slash" g2="AE" k="156" />
+<hkern g1="slash" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="47" />
+<hkern g1="slash" g2="S" k="33" />
+<hkern g1="slash" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="84" />
+<hkern g1="slash" g2="d,q" k="92" />
+<hkern g1="slash" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="31" />
+<hkern g1="slash" g2="m,n,r,ntilde" k="57" />
+<hkern g1="slash" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="98" />
+<hkern g1="slash" g2="s" k="88" />
+<hkern g1="slash" g2="t" k="29" />
+<hkern g1="slash" g2="u,ugrave,uacute,ucircumflex,udieresis" k="39" />
+<hkern g1="slash" g2="w" k="41" />
+<hkern g1="slash" g2="z" k="61" />
+<hkern g1="slash" g2="g" k="96" />
+<hkern g1="slash" g2="y,yacute,ydieresis" k="43" />
+<hkern g1="backslash" g2="W" k="154" />
+<hkern g1="backslash" g2="Y,Yacute,Ydieresis" k="137" />
+<hkern g1="backslash" g2="T" k="109" />
+<hkern g1="backslash" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="111" />
+<hkern g1="backslash" g2="quotedbl,quotesingle" k="143" />
+<hkern g1="backslash" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="88" />
+<hkern g1="backslash" g2="S" k="39" />
+<hkern g1="backslash" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="45" />
+<hkern g1="backslash" g2="d,q" k="68" />
+<hkern g1="backslash" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="33" />
+<hkern g1="backslash" g2="i,igrave,iacute,icircumflex,idieresis" k="29" />
+<hkern g1="backslash" g2="m,n,r,ntilde" k="33" />
+<hkern g1="backslash" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="72" />
+<hkern g1="backslash" g2="s" k="37" />
+<hkern g1="backslash" g2="t" k="84" />
+<hkern g1="backslash" g2="u,ugrave,uacute,ucircumflex,udieresis" k="88" />
+<hkern g1="backslash" g2="w" k="123" />
+<hkern g1="backslash" g2="z" k="33" />
+<hkern g1="backslash" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="27" />
+<hkern g1="backslash" g2="Z" k="27" />
+<hkern g1="backslash" g2="quoteright,quotedblright" k="143" />
+<hkern g1="at" g2="J" k="25" />
+<hkern g1="at" g2="W" k="45" />
+<hkern g1="at" g2="Y,Yacute,Ydieresis" k="53" />
+<hkern g1="at" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="23" />
+<hkern g1="at" g2="AE" k="23" />
+<hkern g1="ampersand" g2="W" k="51" />
+<hkern g1="ampersand" g2="Y,Yacute,Ydieresis" k="74" />
+<hkern g1="ampersand" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="23" />
+<hkern g1="guillemotleft,guilsinglleft" g2="W" k="39" />
+<hkern g1="guillemotleft,guilsinglleft" g2="Y,Yacute,Ydieresis" k="51" />
+<hkern g1="guillemotleft,guilsinglleft" g2="V" k="47" />
+<hkern g1="guillemotright,guilsinglright" g2="J" k="39" />
+<hkern g1="guillemotright,guilsinglright" g2="W" k="76" />
+<hkern g1="guillemotright,guilsinglright" g2="Y,Yacute,Ydieresis" k="113" />
+<hkern g1="guillemotright,guilsinglright" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="33" />
+<hkern g1="guillemotright,guilsinglright" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="31" />
+<hkern g1="guillemotright,guilsinglright" g2="AE" k="33" />
+<hkern g1="guillemotright,guilsinglright" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="20" />
+<hkern g1="guillemotright,guilsinglright" g2="h,k,thorn" k="33" />
+<hkern g1="guillemotright,guilsinglright" g2="i,igrave,iacute,icircumflex,idieresis" k="25" />
+<hkern g1="guillemotright,guilsinglright" g2="l" k="33" />
+<hkern g1="guillemotright,guilsinglright" g2="m,n,r,ntilde" k="25" />
+<hkern g1="guillemotright,guilsinglright" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="25" />
+<hkern g1="guillemotright,guilsinglright" g2="V" k="88" />
+<hkern g1="guillemotright,guilsinglright" g2="M" k="25" />
+<hkern g1="guillemotright,guilsinglright" g2="x" k="31" />
+<hkern g1="asterisk" g2="W" k="-35" />
+<hkern g1="asterisk" g2="Y,Yacute,Ydieresis" k="-43" />
+<hkern g1="asterisk" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="88" />
+<hkern g1="asterisk" g2="AE" k="145" />
+<hkern g1="asterisk" g2="d,q" k="31" />
+<hkern g1="asterisk" g2="h,k,thorn" k="18" />
+<hkern g1="asterisk" g2="l" k="18" />
+<hkern g1="asterisk" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="29" />
+<hkern g1="asterisk" g2="g" k="18" />
+<hkern g1="quotedbl,quotesingle" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="94" />
+<hkern g1="quotedbl,quotesingle" g2="AE" k="152" />
+<hkern g1="quotedbl,quotesingle" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="217" />
+<hkern g1="quotedbl,quotesingle" g2="d,q" k="35" />
+<hkern g1="quotedbl,quotesingle" g2="h,k,thorn" k="18" />
+<hkern g1="quotedbl,quotesingle" g2="l" k="18" />
+<hkern g1="quotedbl,quotesingle" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="29" />
+<hkern g1="quotedbl,quotesingle" g2="g" k="20" />
+<hkern g1="quotedbl,quotesingle" g2="four" k="59" />
+<hkern g1="quotedbl,quotesingle" g2="space" k="20" />
+<hkern g1="quotedbl,quotesingle" g2="slash" k="143" />
+<hkern g1="quoteleft,quotedblleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="100" />
+<hkern g1="quoteleft,quotedblleft" g2="AE" k="158" />
+<hkern g1="quoteleft,quotedblleft" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="225" />
+<hkern g1="quoteleft,quotedblleft" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="18" />
+<hkern g1="quoteleft,quotedblleft" g2="d,q" k="51" />
+<hkern g1="quoteleft,quotedblleft" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="43" />
+<hkern g1="quoteleft,quotedblleft" g2="s" k="27" />
+<hkern g1="quoteleft,quotedblleft" g2="g" k="37" />
+<hkern g1="quoteright,quotedblright" g2="Y,Yacute,Ydieresis" k="-12" />
+<hkern g1="quoteright,quotedblright" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="100" />
+<hkern g1="quoteright,quotedblright" g2="AE" k="160" />
+<hkern g1="quoteright,quotedblright" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="223" />
+<hkern g1="quoteright,quotedblright" g2="hyphen,uni00AD,endash,emdash" k="66" />
+<hkern g1="quoteright,quotedblright" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="37" />
+<hkern g1="quoteright,quotedblright" g2="d,q" k="74" />
+<hkern g1="quoteright,quotedblright" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="66" />
+<hkern g1="quoteright,quotedblright" g2="s" k="45" />
+<hkern g1="quoteright,quotedblright" g2="V" k="-10" />
+<hkern g1="quoteright,quotedblright" g2="g" k="61" />
+<hkern g1="quoteright,quotedblright" g2="guillemotleft,guilsinglleft" k="47" />
+<hkern g1="quoteright,quotedblright" g2="space" k="33" />
+<hkern g1="quoteright,quotedblright" g2="slash" k="156" />
+<hkern g1="quoteright,quotedblright" g2="colon,semicolon" k="23" />
+<hkern g1="quoteright,quotedblright" g2="at" k="43" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="J" k="29" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="W" k="113" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="Y,Yacute,Ydieresis" k="96" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="T" k="68" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="45" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quotedbl,quotesingle" k="217" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="31" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="j" k="23" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="t" k="23" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="u,ugrave,uacute,ucircumflex,udieresis" k="20" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="w" k="66" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="V" k="129" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="p" k="20" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="v" k="84" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="y,yacute,ydieresis" k="59" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="seven" k="94" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quoteleft,quotedblleft" k="225" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quoteright,quotedblright" k="223" />
+<hkern g1="periodcentered" g2="l" k="98" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="J" k="16" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="W" k="61" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="Y,Yacute,Ydieresis" k="106" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="T" k="47" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="16" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="39" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="AE" k="31" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="w" k="16" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="23" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="V" k="74" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="v" k="23" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="y,yacute,ydieresis" k="16" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="quoteright,quotedblright" k="27" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="M" k="20" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="X" k="45" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="x" k="27" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="three" k="20" />
+<hkern g1="space" g2="W" k="59" />
+<hkern g1="space" g2="Y,Yacute,Ydieresis" k="61" />
+<hkern g1="space" g2="T" k="45" />
+<hkern g1="space" g2="quotedbl,quotesingle" k="20" />
+<hkern g1="space" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="61" />
+<hkern g1="space" g2="AE" k="68" />
+<hkern g1="space" g2="t" k="20" />
+<hkern g1="space" g2="w" k="41" />
+<hkern g1="space" g2="y,yacute,ydieresis" k="41" />
+<hkern g1="space" g2="quoteright,quotedblright" k="25" />
+</font>
+</defs></svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="klinic_slabmedium" horiz-adv-x="1032" >
+<font-face units-per-em="2048" ascent="1536" descent="-512" />
+<missing-glyph horiz-adv-x="446" />
+<glyph unicode="fi" horiz-adv-x="1206" d="M53 735v142h176v268q0 325 375 325q142 0 318 -45l-21 -129q-167 37 -262 37q-111 0 -173.5 -41.5t-62.5 -148.5v-266h615v-738h149v-139h-462v139h139v598h-441v-598h189v-139h-518v139h155v596h-176z" />
+<glyph unicode="fl" horiz-adv-x="1206" d="M53 735v142h176v268q0 325 375 325q90 0 215 -22h199v-1309h149v-139h-473v139h150v1170q-105 24 -205 24q-111 0 -173.5 -41.5t-62.5 -148.5v-266h236v-142h-236v-596h189v-139h-518v139h155v596h-176z" />
+<glyph unicode="ffi" horiz-adv-x="1820" d="M53 735v142h176v227q0 177 104 262.5t273 85.5q141 0 332 -63q96 81 281 81q141 0 317 -45l-20 -129q-166 37 -263 37q-111 0 -173 -41.5t-62 -148.5v-266h614v-738h150v-139h-463v139h139v598h-440v-598h188v-139h-518v139h156v596h-441v-596h189v-139h-518v139h155v596 h-176zM403 877h441v268q0 73 18 129q-118 41 -225 41q-234 0 -234 -211v-227z" />
+<glyph unicode="ffl" horiz-adv-x="1820" d="M53 735v142h176v227q0 177 104 262.5t273 85.5q141 0 332 -63q96 81 281 81q90 0 215 -22h198v-1309h150v-139h-473v139h149v1170q-105 24 -205 24q-111 0 -173 -41.5t-62 -148.5v-266h235v-142h-235v-596h188v-139h-518v139h156v596h-441v-596h189v-139h-518v139h155 v596h-176zM403 877h441v268q0 73 18 129q-118 41 -225 41q-234 0 -234 -211v-227z" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="
" horiz-adv-x="2048" />
+<glyph unicode=" " horiz-adv-x="446" />
+<glyph unicode="	" horiz-adv-x="446" />
+<glyph unicode=" " horiz-adv-x="446" />
+<glyph unicode="!" horiz-adv-x="509" d="M139 96q0 47 34 82t81 35t82 -35t35 -82t-34.5 -80.5t-82.5 -33.5q-47 0 -81 33.5t-34 80.5zM158 1247h194l-30 -905h-134z" />
+<glyph unicode=""" horiz-adv-x="724" d="M121 817v457h160v-457h-160zM444 817v457h160v-457h-160z" />
+<glyph unicode="#" horiz-adv-x="1153" d="M82 262v115h203l43 301h-191v115h209l33 239h135l-35 -239h262l35 239h137l-34 -239h192v-115h-211l-43 -301h199v-115h-213l-35 -237h-137l35 237h-263l-32 -237h-135l32 237h-186zM422 377h262l41 301h-260z" />
+<glyph unicode="$" horiz-adv-x="944" d="M70 193q0 42 28.5 72t75.5 30q42 0 69 -25.5t27 -64.5q0 -27 -12 -51q72 -42 197 -45v331q-45 13 -73 21.5t-69.5 24t-67.5 30.5t-56 38.5t-47 49.5t-28.5 62t-11.5 77q0 132 99.5 206t253.5 77v139h49v-139q135 -6 235.5 -62.5t100.5 -132.5q0 -40 -26.5 -71t-72.5 -31 q-43 0 -72.5 26.5t-29.5 67.5q0 28 12 47q-72 30 -147 33v-317q44 -13 73.5 -22.5t70.5 -26t68.5 -32.5t58 -40.5t48 -51.5t29.5 -64t12 -79q0 -134 -102 -208.5t-258 -77.5v-201h-49v201q-92 3 -178.5 28t-146.5 73.5t-60 107.5zM254 760q0 -23 6 -41.5t22 -34t29.5 -25.5 t43 -22t46 -18t54.5 -19v303q-100 -6 -150.5 -43t-50.5 -100zM504 109q96 5 151.5 42t55.5 103q0 37 -15.5 64.5t-48.5 48t-63 33t-80 28.5v-319z" />
+<glyph unicode="%" horiz-adv-x="1310" d="M86 735q0 116 63.5 186t176.5 70q114 0 176.5 -69.5t62.5 -186.5q0 -118 -62 -188t-177 -70q-114 0 -177 70t-63 188zM205 70l821 921l82 -71l-819 -922zM215 735q0 -80 29.5 -120t81.5 -40q112 0 112 160q0 78 -29.5 119t-82.5 41q-52 0 -81.5 -41t-29.5 -119zM748 256 q0 118 62 188t177 70q114 0 177 -70t63 -188q0 -116 -63.5 -186t-176.5 -70q-114 0 -176.5 69.5t-62.5 186.5zM874 256q0 -80 29.5 -120t83.5 -40q52 0 81.5 40t29.5 120t-29.5 120t-81.5 40q-54 0 -83.5 -40t-29.5 -120z" />
+<glyph unicode="&" horiz-adv-x="1325" d="M82 311q0 121 67 206.5t203 172.5l-16 21q-69 87 -100 148.5t-31 129.5q0 120 85.5 199.5t227.5 79.5q140 0 216.5 -79.5t76.5 -193.5q0 -96 -57.5 -169t-169.5 -150l290 -334q79 127 97 289h-127v131h409v-133h-127q-35 -243 -149 -402q100 -104 184 -104q35 0 70 12 v-141q-55 -17 -109 -17q-73 0 -133.5 35t-122.5 99q-159 -136 -379 -136q-182 0 -293.5 88t-111.5 248zM252 328q0 -100 69.5 -154.5t182.5 -54.5q149 0 262 98l-322 367q-38 -25 -59 -40t-50.5 -41.5t-44.5 -49.5t-26.5 -55.5t-11.5 -69.5zM373 999q0 -77 96 -194l25 -29 q79 53 122 105t43 118q0 60 -36 101t-103 41q-63 0 -105 -38t-42 -104z" />
+<glyph unicode="'" horiz-adv-x="401" d="M121 817v457h160v-457h-160z" />
+<glyph unicode="(" horiz-adv-x="550" d="M70 522q0 226 78.5 474t218.5 452h178q-148 -200 -227.5 -446t-79.5 -480q0 -235 79 -481t228 -447h-178q-141 207 -219 453.5t-78 474.5z" />
+<glyph unicode=")" horiz-adv-x="550" d="M4 -406q149 201 229 447.5t80 480.5q0 233 -80 479t-229 447h178q142 -203 220.5 -451t78.5 -475q0 -229 -78 -475.5t-221 -452.5h-178z" />
+<glyph unicode="*" horiz-adv-x="811" d="M106.5 872q6.5 31 38.5 50q21 11 107.5 27.5t124.5 27.5l6 -8q-26 -25 -61 -66t-61 -69t-42 -37q-39 -19 -63.5 -11t-40.5 33q-15 22 -8.5 53zM106.5 1104.5q-6.5 30.5 8.5 50.5q16 25 40.5 33.5t63.5 -8.5q20 -12 77.5 -78.5t86.5 -93.5l-6 -9q-33 9 -86.5 19t-91 18.5 t-54.5 18.5q-32 19 -38.5 49.5zM334 729q0 20 11.5 56.5t29 87.5t26.5 85h9q9 -34 26.5 -85t29 -87.5t11.5 -56.5q0 -39 -21 -58.5t-50 -19.5t-50.5 20t-21.5 58zM334 1245q0 38 21.5 58t50.5 20t50 -19.5t21 -58.5q0 -19 -11.5 -55.5t-29 -87.5t-26.5 -84h-9 q-9 33 -26.5 84t-29 87.5t-11.5 55.5zM428 969l6 8q37 -11 123.5 -27.5t106.5 -27.5q34 -19 40.5 -50t-8.5 -53q-15 -25 -41 -33t-63 11q-16 9 -42 37t-61 69t-61 66zM428 1008q29 27 86.5 93.5t77.5 78.5q37 17 63 8.5t41 -33.5q15 -20 8.5 -50.5t-40.5 -49.5 q-16 -10 -53 -18.5t-91 -18.5t-86 -19z" />
+<glyph unicode="+" horiz-adv-x="983" d="M68 418v135h352v358h141v-358h357v-135h-357v-357h-141v357h-352z" />
+<glyph unicode="," horiz-adv-x="450" d="M76 -197q88 100 110 195q-35 7 -56 34.5t-21 65.5q0 48 32.5 81.5t83.5 33.5q52 0 83.5 -36.5t31.5 -92.5q0 -76 -58 -175.5t-135 -166.5z" />
+<glyph unicode="-" horiz-adv-x="790" d="M115 399v152h561v-152h-561z" />
+<glyph unicode="." horiz-adv-x="430" d="M100 96q0 47 34 82t81 35t81 -35t34 -82t-34 -80.5t-81 -33.5t-81 33.5t-34 80.5z" />
+<glyph unicode="/" horiz-adv-x="1093" d="M41 -406l852 1854h164l-850 -1854h-166z" />
+<glyph unicode="0" horiz-adv-x="1083" d="M90 483q0 106 26 195t79 160t142 111t206 40q116 0 204.5 -40t141.5 -110.5t79.5 -160t26.5 -195.5q0 -105 -26.5 -194.5t-79.5 -160t-141.5 -111t-204.5 -40.5q-117 0 -206 40.5t-142 111t-79 160t-26 194.5zM270 483q0 -169 66.5 -268.5t206.5 -99.5q138 0 204 99.5 t66 268.5q0 171 -66 271t-204 100q-140 0 -206.5 -100t-66.5 -271z" />
+<glyph unicode="1" horiz-adv-x="724" d="M66 856l274 111h154v-832h180v-135h-563v135h208v684q-86 -71 -167 -71q-49 0 -72 29t-14 79z" />
+<glyph unicode="2" horiz-adv-x="944" d="M84 770q0 90 116.5 154.5t274.5 64.5t255 -71t97 -211q0 -70 -28.5 -139t-73 -124.5t-110 -111t-126 -96.5t-135.5 -84h510v-152h-739l-29 123q30 22 116.5 79t150.5 104t136 111.5t112 134.5t40 140q0 72 -48 118t-148 46q-84 0 -170 -39q12 -21 12 -47q0 -44 -29 -74 t-78 -30t-77.5 29.5t-28.5 74.5z" />
+<glyph unicode="3" horiz-adv-x="1003" d="M74 -68q0 50 32.5 82.5t83.5 32.5t81 -32t30 -78q0 -21 -14 -52q88 -37 184 -37q126 0 200 60.5t74 169.5q0 117 -84 173t-233 56h-84v131h82q133 0 209 56t76 161q0 98 -63.5 149.5t-174.5 51.5q-96 0 -176 -39q14 -17 14 -47q0 -47 -31 -79t-81 -32t-81.5 32t-31.5 79 q1 63 58 114t147.5 78t193.5 27q180 0 291 -84.5t111 -236.5q0 -105 -56 -179t-157 -108q119 -33 184.5 -111t65.5 -196q0 -113 -61 -196t-160 -124t-222 -41q-99 0 -191 25.5t-154 77t-62 116.5z" />
+<glyph unicode="4" horiz-adv-x="1005" d="M35 66v118q150 171 255 390t128 411q71 15 111 -10t40 -90q0 -122 -110.5 -336.5t-233.5 -351.5h400v165q48 84 94 213h69v-378h170v-131h-165v-203h161v-127h-532v127h196v203h-583z" />
+<glyph unicode="5" horiz-adv-x="1005" d="M68 -39q0 47 30 79t80 32t81.5 -32t31.5 -79q0 -21 -17 -51q81 -60 203 -60q125 0 205 68t80 201q0 126 -73 196t-189 70q-89 0 -163 -38.5t-114 -94.5l-121 55q82 302 88 660h689q10 -33 10 -60q0 -110 -174 -110q-57 0 -199.5 12t-187.5 14q-10 -229 -56 -385 q118 84 267 84q172 0 286.5 -108t114.5 -291q0 -191 -125.5 -300.5t-320.5 -109.5q-106 0 -204.5 34t-160 91.5t-61.5 122.5z" />
+<glyph unicode="6" horiz-adv-x="1060" d="M92 559q0 110 18 210t57 189t95.5 154t139.5 103t184 38q141 0 237.5 -63t96.5 -143q0 -44 -28 -77.5t-79 -33.5q-46 0 -77 30t-31 72q0 22 14 47q-51 33 -139 33q-83 0 -144.5 -41.5t-97 -115.5t-53.5 -158.5t-23 -186.5q43 74 130 123t200 49q172 0 279.5 -110 t107.5 -289q0 -187 -118 -299.5t-312 -112.5q-215 0 -336 146.5t-121 435.5zM281 389q0 -118 70 -197t194 -79q116 0 184 73t68 197q0 121 -65 200t-185 79q-117 0 -191.5 -75t-74.5 -198z" />
+<glyph unicode="7" horiz-adv-x="972" d="M47 647v320h129v-115q41 127 174 127q66 0 171 -42t159 -42q23 0 47 6q8 38 37 62t72 24q46 0 75 -29t29 -75q0 -38 -39 -101q-340 -552 -340 -968q0 -70 2 -88q-32 -13 -74 -13q-53 0 -81.5 32t-28.5 118q0 173 106.5 443.5t245.5 488.5q-41 -13 -76 -13q-50 0 -150 28 t-151 28q-84 0 -123.5 -48.5t-44.5 -142.5h-139z" />
+<glyph unicode="8" horiz-adv-x="1079" d="M86 328q0 125 72 208t194 115q-95 30 -155 102.5t-60 180.5q0 139 108 229t296 90q187 0 295 -90t108 -229q0 -108 -61 -180.5t-156 -102.5q123 -32 194.5 -115t71.5 -208q0 -161 -120 -256t-332 -95q-213 0 -334 95t-121 256zM264 346q0 -106 72.5 -170.5t204.5 -64.5 q130 0 202 64.5t72 170.5q0 107 -73 171.5t-201 64.5q-129 0 -203 -64.5t-74 -171.5zM307 926q0 -91 64 -150t170 -59q105 0 168 59t63 150t-62 144.5t-169 53.5t-170.5 -53.5t-63.5 -144.5z" />
+<glyph unicode="9" horiz-adv-x="1044" d="M74 575q0 184 121 299t319 115q211 0 330 -145t119 -445q0 -106 -15.5 -202.5t-51 -186t-89 -154.5t-135 -104t-183.5 -39q-142 0 -259 63t-117 154q0 46 31 78.5t83 32.5q47 0 78 -29t31 -75q0 -30 -17 -54q72 -37 164 -37q154 0 227.5 130t82.5 382 q-44 -75 -132 -124.5t-202 -49.5q-171 0 -278 108.5t-107 282.5zM254 580q0 -116 68.5 -191.5t185.5 -75.5q115 0 189.5 74t74.5 193q0 113 -67.5 193.5t-188.5 80.5q-120 0 -191 -78t-71 -196z" />
+<glyph unicode=":" horiz-adv-x="462" d="M115 96q0 47 34.5 82t81.5 35t81 -35t34 -82t-34 -80.5t-81 -33.5t-81.5 33.5t-34.5 80.5zM115 719q0 47 34.5 81t81.5 34t81 -34t34 -81q0 -49 -33.5 -83t-81.5 -34t-82 34t-34 83z" />
+<glyph unicode=";" horiz-adv-x="487" d="M98 -197q89 102 111 195q-36 8 -58 35t-22 65q0 48 33.5 81.5t85.5 33.5t83 -36.5t31 -92.5q0 -76 -57.5 -176t-134.5 -166zM131 719q0 47 35 81t82 34t80.5 -34t33.5 -81q0 -49 -33.5 -83t-80.5 -34q-48 0 -82.5 34t-34.5 83z" />
+<glyph unicode="<" horiz-adv-x="923" d="M59 444v80l758 387v-153l-557 -273l557 -272v-156z" />
+<glyph unicode="=" horiz-adv-x="1091" d="M121 182v142h850v-142h-850zM121 645v141h850v-141h-850z" />
+<glyph unicode=">" horiz-adv-x="923" d="M106 57v156l558 272l-558 273v153l758 -387v-80z" />
+<glyph unicode="?" horiz-adv-x="770" d="M63 1100v131q135 41 267 41q164 0 264 -74.5t100 -218.5q0 -57 -16.5 -107t-42.5 -87.5t-57.5 -72t-63.5 -65.5t-58 -61t-42.5 -66t-16.5 -74q0 -37 23 -104h-166q-18 49 -18 109q0 52 20.5 100t51 82.5t66.5 74t66.5 74t51 82.5t20.5 101q0 172 -211 172q-98 0 -238 -37 zM221 96q0 47 35 82t82 35t81 -35t34 -82t-34 -80.5t-81 -33.5q-48 0 -82.5 33.5t-34.5 80.5z" />
+<glyph unicode="@" horiz-adv-x="1552" d="M78 473q0 120 37.5 230.5t105.5 196t157.5 149t198 97.5t222.5 34q137 0 258 -49t209 -135.5t139 -211.5t51 -270q0 -194 -86 -303t-219 -109q-51 0 -88.5 16.5t-56.5 43t-27.5 48.5t-11.5 44h-9q-102 -152 -270 -152q-132 0 -207 89t-75 227q0 169 107 292.5t265 123.5 q86 0 145 -40t89 -106h4q7 26 37 113h104q-80 -309 -80 -453q0 -160 97 -160q81 0 138.5 89t57.5 239q0 170 -75.5 303t-205 204t-290.5 71q-174 0 -319.5 -83t-229.5 -227t-84 -315q0 -125 47.5 -238t129 -194.5t195 -129.5t240.5 -48q185 0 344 106l47 -74 q-191 -118 -395 -118q-196 0 -356.5 95t-250 255t-89.5 350zM541 420q0 -98 47 -153.5t127 -55.5q106 0 177 92t71 221q0 97 -43.5 150t-122.5 53q-109 0 -182.5 -90.5t-73.5 -216.5z" />
+<glyph unicode="A" horiz-adv-x="1396" d="M-2 0v145h160l387 957h-178v145h438l446 -1102h162v-145h-534v145h186l-96 240h-539l-94 -240h184v-145h-522zM487 530h426l-213 543z" />
+<glyph unicode="B" horiz-adv-x="1253" d="M78 0v145h184v957h-184v145h594q206 0 331 -84.5t125 -236.5q0 -99 -58 -175t-185 -112q146 -31 216 -112.5t70 -194.5q0 -156 -125.5 -244t-345.5 -88h-622zM438 143h258q138 0 217.5 53.5t79.5 153.5q0 102 -80.5 157.5t-224.5 55.5h-250v-420zM438 702h211 q142 0 221.5 53t79.5 152q0 95 -74.5 146t-203.5 51h-234v-402z" />
+<glyph unicode="C" horiz-adv-x="1267" d="M80 618q0 298 179.5 476t483.5 178q126 0 246.5 -29t200.5 -67v-328h-174v229q-120 43 -264 43q-218 0 -352 -129.5t-134 -363.5q0 -122 39 -218t107 -156t156.5 -91t191.5 -31q210 0 430 125v-172q-205 -109 -445 -109q-197 0 -346.5 75.5t-234 222t-84.5 345.5z" />
+<glyph unicode="D" horiz-adv-x="1400" d="M78 0v145h184v957h-184v145h577q307 0 484.5 -165t177.5 -459q0 -293 -177.5 -458t-484.5 -165h-577zM442 145h213q228 0 353 126t125 352q0 228 -125 353.5t-353 125.5h-213v-957z" />
+<glyph unicode="E" horiz-adv-x="1189" d="M78 0v145h184v957h-184v145h1009v-350h-165v205h-480v-402h516v-145h-516v-410h484v211h168v-356h-1016z" />
+<glyph unicode="F" horiz-adv-x="1122" d="M78 0v145h184v957h-184v145h997v-370h-166v223h-467v-426h482v-150h-482v-379h203v-145h-567z" />
+<glyph unicode="G" horiz-adv-x="1400" d="M82 616q0 194 77.5 341t231 231t365.5 84q133 0 259 -30.5t214 -72.5v-301h-168v203q-157 49 -299 49q-235 0 -367.5 -134.5t-132.5 -364.5q0 -231 131.5 -361.5t364.5 -130.5q152 0 309 59v324h-291v143h574v-143h-115v-418q-224 -119 -481 -119q-312 0 -492 172 t-180 469z" />
+<glyph unicode="H" horiz-adv-x="1552" d="M78 0v145h184v957h-184v145h549v-145h-185v-400h668v400h-184v145h547v-145h-183v-957h183v-145h-547v145h184v406h-668v-406h185v-145h-549z" />
+<glyph unicode="I" horiz-adv-x="702" d="M78 0v145h184v957h-184v145h547v-145h-183v-957h183v-145h-547z" />
+<glyph unicode="J" horiz-adv-x="649" d="M39 -229q38 20 65.5 39t60 49.5t50.5 71t18 87.5v1084h-170v145h521v-145h-170v-1086q0 -50 -10 -92.5t-24.5 -74t-41 -59.5t-49.5 -46.5t-60 -38.5t-63 -31t-68 -28z" />
+<glyph unicode="K" horiz-adv-x="1384" d="M78 0v145h184v957h-184v145h543v-145h-179v-957h195v-145h-559zM524 618v13l453 473h-162v143h524v-145h-157l-441 -467l428 -490h189v-145h-299z" />
+<glyph unicode="L" horiz-adv-x="1128" d="M78 0v145h184v957h-184v145h573v-145h-209v-957h484v224h168v-369h-1016z" />
+<glyph unicode="M" horiz-adv-x="1849" d="M70 0v145h174l35 957h-175v145h455l365 -919l366 919h455v-145h-176l37 -957h174v-145h-514v145h174l-35 934l-408 -989h-145l-408 989l-34 -934h174v-145h-514z" />
+<glyph unicode="N" horiz-adv-x="1531" d="M78 0v145h184v957h-184v145h368l674 -956v811h-182v145h537v-145h-183v-1102h-162l-698 985v-840h182v-145h-536z" />
+<glyph unicode="O" horiz-adv-x="1437" d="M78 623q0 284 178.5 466.5t462.5 182.5t462.5 -182.5t178.5 -466.5t-178.5 -466t-462.5 -182t-462.5 182t-178.5 466zM264 623q0 -225 126 -360.5t329 -135.5q202 0 329.5 136t127.5 360q0 225 -127 361t-330 136q-201 0 -328 -136.5t-127 -360.5z" />
+<glyph unicode="P" horiz-adv-x="1189" d="M78 0v145h184v957h-184v145h565q226 0 362 -107t136 -288t-136 -288t-362 -107h-201v-312h222v-145h-586zM442 602h205q157 0 234 69t77 181t-77 181t-234 69h-205v-500z" />
+<glyph unicode="Q" horiz-adv-x="1441" d="M80 623q0 187 79.5 334.5t226 231t335.5 83.5q284 0 462.5 -182.5t178.5 -466.5q0 -230 -120.5 -396.5t-326.5 -222.5l263 -154l-97 -137l-383 262q-277 9 -447.5 189.5t-170.5 458.5zM264 623q0 -225 127 -360.5t330 -135.5q202 0 329.5 136t127.5 360q0 225 -127 361 t-330 136t-330 -136.5t-127 -360.5z" />
+<glyph unicode="R" horiz-adv-x="1308" d="M78 0v145h184v957h-184v145h584q225 0 361 -103.5t136 -277.5q0 -126 -72 -215.5t-202 -126.5l211 -379h172v-145h-295l-264 477h-267v-332h183v-145h-547zM442 618h224q158 0 234.5 65.5t76.5 176.5q0 110 -77 176t-234 66h-224v-484z" />
+<glyph unicode="S" horiz-adv-x="1064" d="M92 41v291h164v-178q126 -33 254 -33q135 0 215 47t80 141q0 51 -23.5 90t-63.5 65t-92 47t-109.5 39.5t-115 39t-109.5 49.5t-92 66t-63.5 94t-23.5 129q0 167 121 255.5t325 88.5q194 0 381 -64v-286h-166v180q-106 24 -209 24q-129 0 -203.5 -47.5t-74.5 -134.5 q0 -48 23.5 -84.5t63.5 -61.5t92 -45t109.5 -39t115 -40t109.5 -51.5t92 -69.5t63.5 -98t23.5 -133q0 -90 -35 -158t-98 -108.5t-144.5 -60.5t-181.5 -20q-194 0 -428 66z" />
+<glyph unicode="T" horiz-adv-x="1196" d="M41 895v352h1114v-352h-166v207h-301v-957h197v-145h-574v145h197v957h-303v-207h-164z" />
+<glyph unicode="U" horiz-adv-x="1425" d="M41 1102v145h545v-145h-183v-672q0 -150 88.5 -221.5t229.5 -71.5q67 0 122 16.5t98.5 50.5t68 92.5t24.5 135.5v670h-188v145h538v-145h-182v-674q0 -214 -131.5 -333.5t-355.5 -119.5q-102 0 -189.5 26.5t-156 79t-107.5 138.5t-39 197v686h-182z" />
+<glyph unicode="V" horiz-adv-x="1341" d="M-12 1102v145h538v-145h-186l334 -889l334 889h-187v145h533v-145h-162l-430 -1102h-182l-430 1102h-162z" />
+<glyph unicode="W" horiz-adv-x="1914" d="M-6 1102v145h524v-145h-192l276 -883l277 799l-29 84h-168v145h532v-145h-194l293 -879l274 879h-192v145h526v-145h-156l-358 -1102h-172l-272 778l-283 -778h-172l-358 1102h-156z" />
+<glyph unicode="X" horiz-adv-x="1329" d="M27 0v143h153l385 490l-362 471h-154v143h535v-141h-176l260 -350l268 350h-174v141h522v-143h-154l-366 -467l383 -496h156v-141h-539v141h176l-278 371l-285 -371h176v-141h-526z" />
+<glyph unicode="Y" horiz-adv-x="1294" d="M-12 1102v145h549v-143h-193l305 -494l305 494h-190v143h539v-145h-156l-408 -645v-312h189v-145h-557v145h188v304l-412 653h-159z" />
+<glyph unicode="Z" horiz-adv-x="1167" d="M82 0v154l754 940h-570v-213h-168v366h957v-157l-752 -938h617v227h167v-379h-1005z" />
+<glyph unicode="[" horiz-adv-x="606" d="M160 -406v1854h409v-121h-247v-1612h247v-121h-409z" />
+<glyph unicode="\" horiz-adv-x="1093" d="M37 1448h164l852 -1854h-166z" />
+<glyph unicode="]" horiz-adv-x="606" d="M37 -285h248v1612h-248v121h409v-1854h-409v121z" />
+<glyph unicode="^" horiz-adv-x="903" d="M74 692l329 594h97l329 -594h-161l-217 420l-215 -420h-162z" />
+<glyph unicode="_" horiz-adv-x="1071" d="M113 -68h843v-112h-843v112z" />
+<glyph unicode="`" horiz-adv-x="677" d="M119 1278l117 147l321 -319l-57 -72z" />
+<glyph unicode="a" horiz-adv-x="966" d="M53 240q0 270 402 270h172v68q0 101 -45.5 142.5t-159.5 41.5q-146 0 -297 -51v135q157 53 332 53q174 0 259 -74t85 -239v-447h145v-139h-313v106q-133 -129 -299 -129q-122 0 -201.5 69t-79.5 194zM229 246q0 -63 39.5 -101.5t114.5 -38.5q121 0 244 115v174h-164 q-234 0 -234 -149z" />
+<glyph unicode="b" horiz-adv-x="1024" d="M-14 1309v139h323v-629q128 80 262 80q180 0 281.5 -120t101.5 -324q0 -233 -136 -355.5t-374 -122.5q-146 0 -309 35v1297h-149zM309 125q74 -12 129 -12q166 0 252 89t86 253q0 138 -62 223.5t-184 85.5q-109 0 -221 -74v-565z" />
+<glyph unicode="c" horiz-adv-x="905" d="M70 436q0 218 123.5 340.5t332.5 122.5q148 0 310 -59v-275h-150v176q-75 23 -143 23q-144 0 -218.5 -86.5t-74.5 -235.5q0 -151 77 -239t220 -88q135 0 284 84v-142q-137 -80 -309 -80q-212 0 -332 121t-120 338z" />
+<glyph unicode="d" horiz-adv-x="1089" d="M70 438q0 206 109.5 333.5t295.5 127.5q145 0 258 -94v504h-178v139h352v-1309h150v-139h-312v111q-120 -134 -290 -134q-176 0 -280.5 130t-104.5 331zM250 440q0 -67 14.5 -124t43.5 -103t78 -72t114 -26q121 0 233 104v457q-101 86 -217 86q-131 0 -198.5 -87.5 t-67.5 -234.5z" />
+<glyph unicode="e" horiz-adv-x="937" d="M70 436q0 207 112 335t305 128q99 0 176 -36.5t122.5 -98.5t68.5 -137.5t23 -161.5q0 -44 -5 -78h-626q12 -131 87 -201.5t208 -70.5q136 0 288 84v-140q-141 -82 -313 -82q-214 0 -330 126t-116 333zM246 514h467q-3 50 -16 93t-38.5 80.5t-68.5 59t-101 21.5 q-107 0 -168.5 -70.5t-74.5 -183.5z" />
+<glyph unicode="f" horiz-adv-x="686" d="M53 735v142h176v292q0 156 85.5 228.5t230.5 72.5q56 0 162 -16v-131q-62 10 -119 10q-90 0 -137.5 -38.5t-47.5 -129.5v-288h236v-142h-236v-596h189v-139h-518v139h155v596h-176z" />
+<glyph unicode="g" horiz-adv-x="958" d="M35 -182q0 132 139 217q-63 40 -63 108q0 88 106 164q-63 44 -95 113.5t-32 148.5q0 65 22.5 123.5t65.5 105t114 74t161 27.5q81 0 149 -22h338v-140l-180 8q57 -79 57 -176q0 -65 -22.5 -123.5t-66 -104.5t-114.5 -73.5t-161 -27.5q-82 0 -150 22q-39 -27 -39 -59 q0 -29 34.5 -45.5t90 -24t122 -14.5t133.5 -22t122.5 -40.5t90 -76.5t34.5 -123q0 -128 -110 -207.5t-337 -79.5q-210 0 -309.5 69t-99.5 179zM190 -152q0 -71 68 -109t191 -38q141 0 205.5 44t64.5 103q0 38 -26.5 63.5t-76.5 38t-100 19.5t-119 14.5t-112 16.5 q-95 -65 -95 -152zM252 569q0 -95 55.5 -149.5t145.5 -54.5t145 54t55 150q0 95 -55 149t-145 54t-145.5 -54t-55.5 -149z" />
+<glyph unicode="h" horiz-adv-x="1134" d="M39 0v139h149v1170h-149v139h323v-690q162 141 334 141q121 0 189.5 -71t68.5 -207v-482h150v-139h-473v139h149v463q0 76 -32 116t-105 40q-128 0 -281 -127v-492h150v-139h-473z" />
+<glyph unicode="i" horiz-adv-x="575" d="M66 0v139h147v598h-147v140h323v-738h148v-139h-471zM160 1180q0 53 37.5 90t91.5 37q53 0 90 -37.5t37 -89.5t-37 -89.5t-90 -37.5q-54 0 -91.5 37t-37.5 90z" />
+<glyph unicode="j" horiz-adv-x="499" d="M12 -338q86 46 132 98.5t46 133.5v843h-157v140h332v-988q0 -75 -23 -132t-69 -96.5t-91.5 -63.5t-113.5 -50zM137 1180q0 52 37.5 89.5t89.5 37.5t89.5 -37.5t37.5 -89.5t-37.5 -89.5t-89.5 -37.5t-89.5 37.5t-37.5 89.5z" />
+<glyph unicode="k" horiz-adv-x="1067" d="M39 0v139h149v1170h-149v139h323v-1309h142v-139h-465zM422 430v8l293 305h-142v134h449v-136h-123l-287 -301l150 -186q52 -67 98.5 -102t104.5 -35q26 0 53 6v-129q-47 -14 -94 -14q-88 0 -157 45.5t-136 136.5z" />
+<glyph unicode="l" horiz-adv-x="548" d="M39 0v139h149v1170h-149v139h323v-1309h150v-139h-473z" />
+<glyph unicode="m" horiz-adv-x="1642" d="M68 0v137h137v602h-137v138h301v-113q150 135 303 135q175 0 227 -145q73 67 148 106t167 39q111 0 178.5 -66t67.5 -204v-492h139v-137h-450v137h139v477q0 75 -30.5 111.5t-98.5 36.5q-115 0 -239 -111v-514h139v-137h-451v137h140v477q0 75 -31 111.5t-99 36.5 q-111 0 -241 -113v-512h139v-137h-448z" />
+<glyph unicode="n" horiz-adv-x="1161" d="M66 0v139h147v598h-147v140h319v-123q163 145 338 145q121 0 189.5 -71t68.5 -207v-482h149v-139h-473v139h150v463q0 76 -32 116t-105 40q-128 0 -281 -127v-492h148v-139h-471z" />
+<glyph unicode="o" d="M70 438q0 210 120.5 335.5t325.5 125.5t326 -125.5t121 -335.5q0 -211 -121 -336t-326 -125t-325.5 125t-120.5 336zM250 438q0 -147 69.5 -236t196.5 -89t196.5 89t69.5 236t-69.5 236.5t-196.5 89.5t-196.5 -89.5t-69.5 -236.5z" />
+<glyph unicode="p" horiz-adv-x="1093" d="M37 -268h149v1005h-149v140h313v-111q122 133 291 133q176 0 279.5 -128t103.5 -329q0 -205 -109.5 -335t-296.5 -130q-144 0 -258 95v-340h177v-140h-500v140zM360 201q90 -86 218 -86q131 0 199.5 88.5t68.5 234.5q0 90 -25 161t-83.5 117t-143.5 46q-125 0 -234 -109 v-452z" />
+<glyph unicode="q" horiz-adv-x="1038" d="M70 438q0 210 113 335.5t292 125.5q158 0 277 -111l14 89h135v-1145h150v-140h-498v140h174v352q-116 -107 -268 -107q-173 0 -281 128t-108 333zM250 444q0 -92 27.5 -165t86.5 -118.5t142 -45.5q122 0 221 92v465q-94 90 -213 90q-126 0 -195 -85.5t-69 -232.5z" />
+<glyph unicode="r" horiz-adv-x="741" d="M66 0v139h147v598h-147v140h317v-172q116 194 311 194h21v-176h-31q-172 0 -295 -107v-477h166v-139h-489z" />
+<glyph unicode="s" horiz-adv-x="831" d="M78 27v233h141v-125q95 -26 189 -26q87 0 136.5 29t49.5 83q0 39 -28 66.5t-72 44.5t-98 32.5t-108 36t-98 48t-72 77t-28 115.5q0 119 86.5 188.5t251.5 69.5q156 0 295 -47v-231h-143v131q-69 16 -152 16q-85 0 -127.5 -30.5t-42.5 -80.5q0 -35 21.5 -61.5t57 -41.5 t81 -30.5t92.5 -28t92.5 -34.5t81 -49t57 -73t21.5 -106q0 -116 -85 -186t-265 -70q-174 0 -334 50z" />
+<glyph unicode="t" horiz-adv-x="659" d="M27 735v142h153v225h174v-225h260v-142h-260v-489q0 -72 34.5 -101.5t105.5 -29.5t135 22v-131q-100 -29 -187 -29q-126 0 -194 61t-68 198v499h-153z" />
+<glyph unicode="u" horiz-adv-x="1132" d="M29 737v140h323v-603q0 -76 32 -115.5t105 -39.5q133 0 281 125v493h-160v140h336v-738h148v-139h-320v121q-162 -144 -338 -144q-121 0 -189.5 71.5t-68.5 207.5v481h-149z" />
+<glyph unicode="v" horiz-adv-x="1073" d="M12 739v138h439v-132h-144l234 -563l233 561h-143v134h428v-138h-119l-319 -739h-168l-322 739h-119z" />
+<glyph unicode="w" horiz-adv-x="1503" d="M16 741v136h435v-136h-154l164 -526l217 662h153l222 -662l159 526h-151v136h424v-136h-123l-236 -741h-149l-227 637l-218 -637h-151l-246 741h-119z" />
+<glyph unicode="x" horiz-adv-x="1067" d="M45 0v131h111l276 315l-260 299h-115v132h445v-127h-133l178 -211l174 211h-131v127h424v-132h-111l-266 -305l270 -309h113v-131h-432v127h127l-193 223l-184 -223h129v-127h-422z" />
+<glyph unicode="y" horiz-adv-x="1056" d="M23 739v138h440v-140h-144l203 -682l238 682h-142v140h429v-138h-115l-336 -944q-78 -225 -287 -225q-117 0 -223 63l51 119q84 -47 150 -47q115 0 157 121l60 174h-133l-232 739h-116z" />
+<glyph unicode="z" horiz-adv-x="888" d="M76 0v113l504 639h-349v-166h-147v291h713v-109l-508 -641h379v178h145v-305h-737z" />
+<glyph unicode="{" horiz-adv-x="614" d="M16 453v133q70 4 119 24t75.5 53t38 72t11.5 90q0 73 -29.5 223t-29.5 203q0 96 58 159t177 63q57 0 129 -21v-106q-54 12 -96 12q-58 0 -83.5 -29.5t-25.5 -87.5q0 -47 31 -202t31 -238q0 -52 -10 -94.5t-33.5 -81.5t-66.5 -66.5t-105 -40.5q119 -26 167 -98.5 t48 -181.5q0 -83 -31 -238.5t-31 -204.5q0 -117 109 -117q28 0 96 15v-107q-68 -20 -129 -20q-119 0 -177 62t-58 159q0 52 29.5 202.5t29.5 223.5q0 50 -11.5 89t-38 72.5t-75.5 54t-119 24.5z" />
+<glyph unicode="|" horiz-adv-x="479" d="M160 -406v1854h162v-1854h-162z" />
+<glyph unicode="}" horiz-adv-x="614" d="M49 -307q68 -15 96 -15q109 0 109 117q0 49 -30.5 204.5t-30.5 238.5q0 109 48 181.5t167 98.5q-62 13 -105 40.5t-66.5 66.5t-33.5 81.5t-10 94.5q0 83 30.5 238t30.5 202q0 58 -25.5 87.5t-83.5 29.5q-42 0 -96 -12v106q72 21 129 21q119 0 177.5 -63t58.5 -159 q0 -53 -30 -203t-30 -223q0 -51 11.5 -90t38 -72t75.5 -53t119 -24v-133q-70 -4 -119 -24.5t-75.5 -54t-38 -72.5t-11.5 -89q0 -73 30 -223.5t30 -202.5q0 -97 -58.5 -159t-177.5 -62q-61 0 -129 20v107z" />
+<glyph unicode="~" horiz-adv-x="1206" d="M104 397q25 60 50 105.5t62 91t86 70t108 24.5q58 0 120.5 -27.5t107 -60.5t98.5 -60.5t98 -27.5q35 0 65.5 16t53.5 45.5t37.5 54.5t29.5 60l90 -45q-23 -58 -45 -101t-56.5 -89.5t-80 -71.5t-99.5 -25q-53 0 -113 28.5t-105 62t-102 62t-106 28.5q-72 0 -120 -50 t-88 -133z" />
+<glyph unicode="¡" horiz-adv-x="468" d="M119 782q0 47 35 82t82 35t80.5 -34.5t33.5 -82.5q0 -47 -33.5 -80.5t-80.5 -33.5q-48 0 -82.5 33.5t-34.5 80.5zM137 -369l31 908h133l31 -908h-195z" />
+<glyph unicode="¢" horiz-adv-x="907" d="M84 510q0 185 104.5 298.5t288.5 113.5q57 0 107 -13l59 174l57 -20l-59 -170q156 -69 193 -262h-140q-20 99 -90 149l-196 -567q38 -10 75 -10q95 0 148.5 55.5t66.5 142.5h140q-22 -147 -113 -226t-248 -79q-65 0 -104 10l-88 -249l-58 16l86 252q-109 44 -169 145 t-60 240zM231 510q0 -193 123 -268l193 563q-33 10 -68 10q-118 0 -183 -85t-65 -220z" />
+<glyph unicode="£" horiz-adv-x="1081" d="M82 457v71h145q-45 103 -45 185q0 62 24 117t70.5 99.5t123 70.5t173.5 26q87 0 157 -22t112 -55t70.5 -77t40 -83t12.5 -78h-160q-2 34 -13.5 65t-36 62t-71.5 50t-111 19q-113 0 -168 -54.5t-55 -143.5q0 -75 45 -181h357v-71h-328q41 -109 41 -152q0 -47 -21.5 -90 t-46.5 -70q42 -1 128 -17.5t139 -16.5q84 0 141 29t100 93l105 -88q-110 -161 -314 -161q-68 0 -188.5 23.5t-185.5 23.5q-75 0 -170 -35l-37 86q91 31 139.5 88.5t48.5 124.5q0 51 -47 162h-174z" />
+<glyph unicode="¤" horiz-adv-x="1175" d="M106 147l140 134q-88 118 -88 262q0 145 88 260l-140 135l87 86l133 -139q120 88 262 88q140 0 260 -88l135 139l86 -86l-139 -135q88 -120 88 -260q0 -139 -88 -262l139 -134l-86 -86l-135 140q-115 -88 -260 -88q-147 0 -262 88l-133 -140zM293 543q0 -124 86 -210.5 t209 -86.5q122 0 208.5 86.5t86.5 210.5q0 123 -86.5 209t-208.5 86q-123 0 -209 -86t-86 -209z" />
+<glyph unicode="¥" horiz-adv-x="1230" d="M61 883v123h465v-123h-151l246 -387l243 387h-151v123h454v-123h-133l-207 -316h199v-73h-248l-80 -121v-35h328v-76h-328v-145h162v-117h-489v117h161v145h-325v76h325v35l-79 121h-246v73h196l-206 316h-136z" />
+<glyph unicode="¦" horiz-adv-x="485" d="M162 -406v820h162v-820h-162zM162 702v746h162v-746h-162z" />
+<glyph unicode="§" horiz-adv-x="884" d="M96 477q0 134 146 207q-99 71 -99 180q0 79 46.5 133t112.5 76.5t142 22.5q71 0 141.5 -19.5t122.5 -62.5t52 -99q0 -41 -24 -69.5t-72 -28.5q-43 0 -69 25.5t-26 62.5q0 23 15 53q-57 31 -133 31q-71 0 -114.5 -29.5t-43.5 -80.5q0 -39 27.5 -70t72 -53t98 -42t107 -44 t98 -53.5t72 -75.5t27.5 -105q0 -137 -150 -205q105 -74 105 -184q0 -108 -85 -167.5t-216 -59.5q-133 0 -240 55t-107 135q0 37 26.5 66.5t70.5 29.5q45 0 71.5 -27.5t26.5 -66.5q0 -21 -16 -49q26 -16 70.5 -27.5t88.5 -11.5q69 0 115.5 29t46.5 82q0 38 -28 68.5 t-72.5 52t-98.5 42t-108 44.5t-98.5 53.5t-72.5 76t-28 105.5zM242 502q0 -30 14 -55.5t34.5 -43t54 -35.5t62.5 -29.5t71 -28.5t69 -29q96 45 96 131q0 30 -13.5 55.5t-34 42.5t-53 34.5t-61.5 29t-69 28t-66 29.5q-104 -41 -104 -129z" />
+<glyph unicode="¨" horiz-adv-x="849" d="M131 1151q0 44 32.5 76.5t76.5 32.5t76 -32.5t32 -76.5q0 -45 -32 -77t-76 -32q-45 0 -77 32t-32 77zM504 1151q0 44 32 76.5t76 32.5t76.5 -32.5t32.5 -76.5q0 -45 -32 -77t-77 -32q-44 0 -76 32t-32 77z" />
+<glyph unicode="©" horiz-adv-x="1462" d="M82 541q0 176 87 325.5t236.5 236.5t325.5 87t325.5 -87t236.5 -236.5t87 -325.5q0 -132 -51.5 -252.5t-138.5 -207.5t-207 -138.5t-252 -51.5t-252 51.5t-207 138.5t-138.5 207.5t-51.5 252.5zM164 541q0 -154 76 -285t206.5 -207t284.5 -76q116 0 221 45t181 121 t120.5 181.5t44.5 220.5q0 154 -75.5 284.5t-206 206.5t-285.5 76q-154 0 -284.5 -76t-206.5 -206.5t-76 -284.5zM377 541q0 170 103 271t274 101q124 0 245 -53v-201h-110v132q-58 20 -127 20q-120 0 -189 -70t-69 -192t67.5 -198.5t188.5 -76.5q118 0 237 70v-111 q-107 -63 -252 -63q-165 0 -266.5 100.5t-101.5 270.5z" />
+<glyph unicode="ª" horiz-adv-x="755" d="M82 782q0 181 270 181h107v43q0 61 -29 86.5t-100 25.5q-84 0 -199 -39v103q100 39 225 39q116 0 176 -48.5t60 -162.5v-287h84v-105h-209v70q-88 -84 -195 -84q-83 0 -136.5 46.5t-53.5 131.5zM102 414v88h566v-88h-566zM215 786q0 -38 24 -63t72 -25q76 0 148 72v109 h-103q-141 0 -141 -93z" />
+<glyph unicode="«" horiz-adv-x="1099" d="M66 526v9l309 370h192l-319 -375l319 -376h-192zM526 526v9l310 370h190l-319 -375l319 -376h-190z" />
+<glyph unicode="¬" d="M121 565v117h782v-412h-115v295h-667z" />
+<glyph unicode="­" horiz-adv-x="790" d="M115 399v152h561v-152h-561z" />
+<glyph unicode="®" horiz-adv-x="854" d="M86 874q0 143 100 243t242 100q141 0 241.5 -100.5t100.5 -242.5q0 -141 -100.5 -241.5t-241.5 -100.5q-142 0 -242 100.5t-100 241.5zM141 874q0 -119 83.5 -201.5t203.5 -82.5q119 0 203 83t84 201q0 119 -84.5 204t-202.5 85q-119 0 -203 -85t-84 -204zM268 713v47h49 v229h-49v49h176q62 0 96.5 -28.5t34.5 -71.5q0 -36 -21 -60t-50 -32l51 -86h49v-47h-92l-70 121h-61v-74h49v-47h-162zM381 883h61q32 0 50 14.5t18 40.5q0 51 -68 51h-61v-106z" />
+<glyph unicode="¯" horiz-adv-x="841" d="M141 1069v133h553v-133h-553z" />
+<glyph unicode="°" horiz-adv-x="749" d="M72 1016q0 124 89 213.5t214 89.5t214 -89.5t89 -213.5t-89 -213.5t-214 -89.5t-214 89.5t-89 213.5zM184 1016q0 -80 56 -135.5t135 -55.5t134.5 55.5t55.5 135.5q0 79 -55.5 135.5t-134.5 56.5t-135 -57t-56 -135z" />
+<glyph unicode="±" horiz-adv-x="1085" d="M119 49v133h848v-133h-848zM119 571v131h352v295h141v-295h355v-131h-355v-290h-141v290h-352z" />
+<glyph unicode="²" horiz-adv-x="796" d="M86 1456q0 75 90 123.5t215 48.5q131 0 209 -58t78 -173q0 -71 -31 -138t-88 -125t-116 -102.5t-136 -91.5h400v-123h-588l-27 105q25 19 80.5 57t97 67t93.5 73t86 82.5t57.5 87t23.5 95.5q0 59 -38 95.5t-117 36.5q-69 0 -129 -27q10 -20 10 -45q0 -35 -23.5 -55.5 t-60.5 -20.5q-41 0 -63.5 25.5t-22.5 62.5z" />
+<glyph unicode="³" horiz-adv-x="749" d="M68 952q0 39 24.5 64.5t63.5 25.5t62.5 -24.5t23.5 -59.5q0 -8 -6 -26q51 -21 118 -21q81 0 124.5 35t43.5 96q0 68 -54.5 101t-148.5 33h-63v106h57q85 0 134 31.5t49 91.5q0 51 -38.5 81t-107.5 30q-51 0 -110 -19q6 -12 6 -24q0 -36 -23.5 -61.5t-62.5 -25.5 q-38 0 -62 25t-24 62q0 69 84.5 112t199.5 43q128 0 208.5 -56t80.5 -153q0 -65 -38.5 -112.5t-110.5 -69.5q176 -51 176 -201q0 -109 -88 -172t-221 -63q-46 0 -94 8t-95.5 24t-77.5 47t-30 72z" />
+<glyph unicode="´" horiz-adv-x="686" d="M111 1106l323 319l117 -147l-381 -244z" />
+<glyph unicode="µ" horiz-adv-x="1204" d="M63 737v140h324v-603q0 -76 32 -115.5t105 -39.5q137 0 281 125v493h-160v140h336v-738h147v-139h-319v121q-162 -144 -338 -144q-62 0 -104 31l20 -416h-174v1145h-150z" />
+<glyph unicode="¶" horiz-adv-x="1210" d="M61 686q0 162 117.5 274.5t284.5 112.5h655v-104h-176v-1022h176v-103h-768v103h205v356h-92q-167 0 -284.5 111.5t-117.5 271.5zM676 -53h145v1022h-145v-1022z" />
+<glyph unicode="·" horiz-adv-x="448" d="M109 516q0 47 34.5 82t81.5 35t81 -35t34 -82t-34 -81t-81 -34t-81.5 34t-34.5 81z" />
+<glyph unicode="¸" horiz-adv-x="610" d="M90 -399l25 104q48 -10 100 -10q121 0 121 69q0 78 -156 78v39l99 195l92 -25l-58 -129q73 -5 124.5 -46.5t51.5 -113.5q0 -86 -76 -129t-192 -43q-67 0 -131 11z" />
+<glyph unicode="¹" horiz-adv-x="649" d="M76 1518l231 94h133v-676h146v-119h-473v119h178v547q-79 -62 -139 -62q-41 0 -61.5 26.5t-14.5 70.5z" />
+<glyph unicode="º" horiz-adv-x="755" d="M72 911q0 141 83 225.5t222 84.5q140 0 223.5 -83.5t83.5 -224.5q0 -142 -82.5 -225.5t-222.5 -83.5q-141 0 -224 83t-83 224zM98 414v88h559v-88h-559zM211 913q0 -94 42.5 -151t123.5 -57q82 0 125 56t43 150t-42.5 151.5t-123.5 57.5q-82 0 -125 -56.5t-43 -150.5z " />
+<glyph unicode="»" horiz-adv-x="1099" d="M72 154l321 376l-321 375h192l309 -370v-9l-309 -372h-192zM532 154l320 376l-320 375h191l309 -370v-9l-309 -372h-191z" />
+<glyph unicode="¼" horiz-adv-x="1581" d="M70 1161l209 86h118v-635h133v-104h-428v104h162v521q-69 -56 -127 -56q-35 0 -53 22.5t-14 61.5zM410 25l708 1251l99 -53l-707 -1254zM938 193v90q88 107 152 236.5t73 230.5q113 22 113 -68q0 -71 -65.5 -192t-133.5 -199h226v78q41 64 63 143h53v-221h101v-98h-97 v-101h95v-92h-359v92h131v101h-352z" />
+<glyph unicode="½" horiz-adv-x="1648" d="M68 1161l208 86h119v-633h131v-104h-426v104h160v519q-73 -56 -125 -56q-36 0 -53.5 21.5t-13.5 62.5zM403 25l707 1253l100 -55l-706 -1252zM1016 588q0 69 85.5 117.5t201.5 48.5q114 0 182.5 -54.5t68.5 -160.5q0 -67 -28.5 -129.5t-81 -116.5t-107 -96t-125.5 -86 h373v-111h-538l-23 96q21 16 76 54.5t90 64t83.5 68t77.5 77.5t50.5 80.5t21.5 89.5q0 54 -33.5 87.5t-105.5 33.5q-63 0 -121 -26q11 -15 11 -43q0 -33 -21.5 -54.5t-56.5 -21.5q-37 0 -58.5 23.5t-21.5 58.5z" />
+<glyph unicode="¾" horiz-adv-x="1626" d="M76 635q0 34 23.5 57t58.5 23q32 0 52.5 -21.5t20.5 -50.5q0 -19 -4 -29q45 -20 111 -20q77 0 118.5 33t41.5 92q0 125 -185 125h-65v94h61q77 0 120.5 30t43.5 85q0 52 -36.5 81t-102.5 29q-58 0 -103 -20q7 -14 7 -27q0 -31 -20.5 -52.5t-55.5 -21.5q-36 0 -58 22.5 t-22 55.5q0 66 79.5 105t184.5 39q118 0 190 -51.5t72 -143.5q0 -125 -133 -172q73 -20 115.5 -66t42.5 -118q0 -102 -80.5 -160.5t-198.5 -58.5q-61 0 -122 14t-108.5 47.5t-47.5 79.5zM457 25l708 1251l101 -53l-709 -1254zM985 193v90q87 106 151 235.5t74 231.5 q113 23 113 -68q0 -71 -65.5 -192t-133.5 -199h226v78q40 67 61 143h53v-221h101v-98h-97v-101h95v-92h-357v92h129v101h-350z" />
+<glyph unicode="¿" horiz-adv-x="753" d="M63 -98q0 57 16.5 107t42.5 87.5t57.5 71.5t63.5 65t58 61t42.5 66t16.5 74q0 37 -22 105h164q20 -48 20 -109q0 -62 -28.5 -117.5t-69 -98l-81 -85t-69 -98t-28.5 -117.5q0 -172 209 -172q106 0 239 39v-131q-142 -43 -268 -43q-163 0 -263 75t-100 220zM305 782 q0 47 34 82t81 35t81 -35t34 -82t-34 -80.5t-81 -33.5t-81 33.5t-34 80.5z" />
+<glyph unicode="À" horiz-adv-x="1396" d="M-2 0v145h160l387 957h-178v145h438l446 -1102h162v-145h-534v145h186l-96 240h-539l-94 -240h184v-145h-522zM397 1614l117 149l332 -327l-60 -72zM487 530h426l-213 543z" />
+<glyph unicode="Á" horiz-adv-x="1396" d="M-2 0v145h160l387 957h-178v145h438l446 -1102h162v-145h-534v145h186l-96 240h-539l-94 -240h184v-145h-522zM477 1436l332 327l117 -149l-391 -250zM487 530h426l-213 543z" />
+<glyph unicode="Â" horiz-adv-x="1396" d="M-2 0v145h160l387 957h-178v145h438l446 -1102h162v-145h-534v145h186l-96 240h-539l-94 -240h184v-145h-522zM328 1417l280 281h115l285 -281l-43 -53l-299 164l-297 -164zM487 530h426l-213 543z" />
+<glyph unicode="Ã" horiz-adv-x="1396" d="M-2 0v145h160l387 957h-178v145h438l446 -1102h162v-145h-534v145h186l-96 240h-539l-94 -240h184v-145h-522zM311 1403q15 39 24.5 61.5t30 58.5t40 56t49.5 35.5t65 15.5q46 0 99 -26t103 -52t89 -26q43 0 75.5 27t61.5 83l68 -37q-21 -48 -36 -77t-42.5 -68.5 t-62.5 -59.5t-76 -20q-44 0 -98.5 26t-104.5 52.5t-84 26.5q-77 0 -133 -109zM487 530h426l-213 543z" />
+<glyph unicode="Ä" horiz-adv-x="1396" d="M-2 0v145h160l387 957h-178v145h438l446 -1102h162v-145h-534v145h186l-96 240h-539l-94 -240h184v-145h-522zM375 1483q0 46 32 78t78 32q45 0 77 -32.5t32 -77.5t-32 -77t-77 -32q-46 0 -78 31.5t-32 77.5zM487 530h426l-213 543zM748 1483q0 46 32 78t78 32t77.5 -32 t31.5 -78t-31.5 -77.5t-77.5 -31.5t-78 31.5t-32 77.5z" />
+<glyph unicode="Å" horiz-adv-x="1396" d="M-2 0v145h160l387 957h-178v145h438l446 -1102h162v-145h-534v145h186l-96 240h-539l-94 -240h184v-145h-522zM434 1571q0 93 64 156t174 63t173.5 -63t63.5 -156q0 -95 -63.5 -158t-173.5 -63t-174 63.5t-64 157.5zM487 530h426l-213 543zM567 1571q0 -52 27.5 -86.5 t77.5 -34.5t78 34.5t28 86.5q0 49 -28 84t-78 35t-77.5 -35t-27.5 -84z" />
+<glyph unicode="Æ" horiz-adv-x="1894" d="M-10 0v147h151l639 957h-145v143h1159v-342h-166v197h-450v-402h485v-145h-485v-410h454v201h168v-346h-979v145h180v250h-503l-166 -250h145v-145h-487zM592 539h409v563h-36z" />
+<glyph unicode="Ç" horiz-adv-x="1267" d="M78 618q0 298 180.5 476t482.5 178q126 0 246.5 -29t200.5 -67v-328h-172v229q-124 43 -264 43q-219 0 -353.5 -129.5t-134.5 -363.5q0 -122 39 -218t107 -156t156.5 -91t191.5 -31q210 0 430 125v-172q-187 -102 -414 -107l-22 -55q72 -5 123 -46.5t51 -113.5 q0 -86 -75.5 -129t-191.5 -43q-65 0 -133 11l25 104q48 -10 100 -10q123 0 123 69q0 78 -156 78v39l50 99q-269 22 -429.5 190.5t-160.5 447.5z" />
+<glyph unicode="È" horiz-adv-x="1189" d="M78 0v145h184v957h-184v145h1009v-350h-165v205h-480v-402h516v-145h-516v-410h484v211h168v-356h-1016zM342 1614l119 149l330 -327l-60 -72z" />
+<glyph unicode="É" horiz-adv-x="1189" d="M78 0v145h184v957h-184v145h1009v-350h-165v205h-480v-402h516v-145h-516v-410h484v211h168v-356h-1016zM446 1436l330 327l119 -149l-391 -250z" />
+<glyph unicode="Ê" horiz-adv-x="1189" d="M78 0v145h184v957h-184v145h1009v-350h-165v205h-480v-402h516v-145h-516v-410h484v211h168v-356h-1016zM283 1417l282 281h113l285 -281l-43 -53l-299 164l-297 -164z" />
+<glyph unicode="Ë" horiz-adv-x="1189" d="M78 0v145h184v957h-184v145h1009v-350h-165v205h-480v-402h516v-145h-516v-410h484v211h168v-356h-1016zM330 1483q0 46 32 78t78 32t77.5 -32t31.5 -78t-31.5 -77.5t-77.5 -31.5t-78 31.5t-32 77.5zM702 1483q0 46 32.5 78t78.5 32t77.5 -32t31.5 -78t-31.5 -77.5 t-77.5 -31.5t-78.5 31.5t-32.5 77.5z" />
+<glyph unicode="Ì" horiz-adv-x="702" d="M78 0v145h184v957h-184v145h547v-145h-183v-957h183v-145h-547zM100 1614l119 149l330 -327l-60 -72z" />
+<glyph unicode="Í" horiz-adv-x="702" d="M78 0v145h184v957h-184v145h547v-145h-183v-957h183v-145h-547zM162 1436l332 327l116 -149l-389 -250z" />
+<glyph unicode="Î" horiz-adv-x="702" d="M12 1417l283 281h113l284 -281l-43 -53l-297 164l-299 -164zM78 0v145h184v957h-184v145h547v-145h-183v-957h183v-145h-547z" />
+<glyph unicode="Ï" horiz-adv-x="702" d="M55 1483q0 46 32.5 78t78.5 32q44 0 76 -32t32 -78q0 -45 -32 -77t-76 -32q-46 0 -78.5 31.5t-32.5 77.5zM78 0v145h184v957h-184v145h547v-145h-183v-957h183v-145h-547zM428 1483q0 46 32.5 78t78.5 32q44 0 76 -32t32 -78q0 -45 -31.5 -77t-76.5 -32q-46 0 -78.5 31.5 t-32.5 77.5z" />
+<glyph unicode="Ð" horiz-adv-x="1400" d="M80 0v145h182v410h-168v147h168v400h-182v145h575q308 0 485 -165t177 -459q0 -293 -177 -458t-485 -165h-575zM442 145h215q227 0 351.5 126t124.5 352q0 228 -124.5 353.5t-351.5 125.5h-215v-400h346v-147h-346v-410z" />
+<glyph unicode="Ñ" horiz-adv-x="1531" d="M78 0v145h184v957h-184v145h368l674 -956v811h-182v145h537v-145h-183v-1102h-162l-698 985v-840h182v-145h-536zM418 1403q14 35 21 51t23.5 49.5t31 50.5t35 37.5t46 29.5t54.5 9q46 0 98.5 -26t102.5 -52t90 -26q82 0 135 110l69 -37q-21 -48 -36 -77t-42.5 -68.5 t-62.5 -59.5t-76 -20q-44 0 -98 26t-104 52.5t-84 26.5q-77 0 -136 -109z" />
+<glyph unicode="Ò" horiz-adv-x="1437" d="M78 623q0 284 178.5 466.5t462.5 182.5t462.5 -182.5t178.5 -466.5t-178.5 -466t-462.5 -182t-462.5 182t-178.5 466zM264 623q0 -225 126 -360.5t329 -135.5q202 0 329.5 136t127.5 360q0 225 -127 361t-330 136q-201 0 -328 -136.5t-127 -360.5zM426 1622l119 150 l329 -330l-59 -72z" />
+<glyph unicode="Ó" horiz-adv-x="1437" d="M78 623q0 284 178.5 466.5t462.5 182.5t462.5 -182.5t178.5 -466.5t-178.5 -466t-462.5 -182t-462.5 182t-178.5 466zM264 623q0 -225 126 -360.5t329 -135.5q202 0 329.5 136t127.5 360q0 225 -127 361t-330 136q-201 0 -328 -136.5t-127 -360.5zM524 1442l332 330 l117 -150l-389 -252z" />
+<glyph unicode="Ô" horiz-adv-x="1437" d="M78 623q0 284 178.5 466.5t462.5 182.5t462.5 -182.5t178.5 -466.5t-178.5 -466t-462.5 -182t-462.5 182t-178.5 466zM264 623q0 -225 126 -360.5t329 -135.5q202 0 329.5 136t127.5 360q0 225 -127 361t-330 136q-201 0 -328 -136.5t-127 -360.5zM379 1423l283 281h114 l283 -281l-41 -53l-299 164l-297 -164z" />
+<glyph unicode="Õ" horiz-adv-x="1437" d="M78 623q0 284 178.5 466.5t462.5 182.5t462.5 -182.5t178.5 -466.5t-178.5 -466t-462.5 -182t-462.5 182t-178.5 466zM264 623q0 -225 126 -360.5t329 -135.5q202 0 329.5 136t127.5 360q0 225 -127 361t-330 136q-201 0 -328 -136.5t-127 -360.5zM358 1409q14 35 21 51 t23.5 49.5t31 50.5t35 37.5t46 29.5t54.5 9q46 0 98.5 -26t102.5 -52t90 -26q82 0 135 110l70 -36q-16 -37 -27.5 -60.5t-33 -58.5t-42.5 -55.5t-51 -36t-63 -15.5q-44 0 -98.5 26t-104.5 52.5t-84 26.5q-76 0 -135 -109z" />
+<glyph unicode="Ö" horiz-adv-x="1437" d="M78 623q0 284 178.5 466.5t462.5 182.5t462.5 -182.5t178.5 -466.5t-178.5 -466t-462.5 -182t-462.5 182t-178.5 466zM264 623q0 -225 126 -360.5t329 -135.5q202 0 329.5 136t127.5 360q0 225 -127 361t-330 136q-201 0 -328 -136.5t-127 -360.5zM424 1489q0 46 32 78 t76 32q46 0 77.5 -32t31.5 -78t-31.5 -77.5t-77.5 -31.5q-44 0 -76 32t-32 77zM797 1489q0 46 31 78t77 32t78.5 -32t32.5 -78t-32.5 -77.5t-78.5 -31.5t-77 31.5t-31 77.5z" />
+<glyph unicode="×" horiz-adv-x="980" d="M86 176l307 309l-307 310l96 98l307 -311l310 311l98 -98l-309 -310l309 -309l-98 -96l-310 309l-307 -309z" />
+<glyph unicode="Ø" horiz-adv-x="1437" d="M78 623q0 284 178.5 466.5t462.5 182.5q222 0 381 -115l108 131l66 -53l-107 -131q92 -87 142.5 -211t50.5 -270q0 -284 -178.5 -466t-462.5 -182q-220 0 -383 113l-105 -129l-67 53l106 129q-92 89 -142 212.5t-50 269.5zM264 625q0 -217 115 -351l616 756 q-117 90 -276 90q-201 0 -328 -135.5t-127 -359.5zM440 215q117 -88 279 -88q202 0 329.5 135.5t127.5 360.5q0 213 -119 348z" />
+<glyph unicode="Ù" horiz-adv-x="1425" d="M41 1102v145h545v-145h-183v-672q0 -150 88.5 -221.5t229.5 -71.5q67 0 122 16.5t98.5 50.5t68 92.5t24.5 135.5v670h-188v145h538v-145h-182v-674q0 -214 -131.5 -333.5t-355.5 -119.5q-102 0 -189.5 26.5t-156 79t-107.5 138.5t-39 197v686h-182zM412 1614l116 149 l332 -327l-59 -72z" />
+<glyph unicode="Ú" horiz-adv-x="1425" d="M41 1102v145h545v-145h-183v-672q0 -150 88.5 -221.5t229.5 -71.5q67 0 122 16.5t98.5 50.5t68 92.5t24.5 135.5v670h-188v145h538v-145h-182v-674q0 -214 -131.5 -333.5t-355.5 -119.5q-102 0 -189.5 26.5t-156 79t-107.5 138.5t-39 197v686h-182zM545 1436l332 327 l116 -149l-389 -250z" />
+<glyph unicode="Û" horiz-adv-x="1425" d="M41 1102v145h545v-145h-183v-672q0 -150 88.5 -221.5t229.5 -71.5q67 0 122 16.5t98.5 50.5t68 92.5t24.5 135.5v670h-188v145h538v-145h-182v-674q0 -214 -131.5 -333.5t-355.5 -119.5q-102 0 -189.5 26.5t-156 79t-107.5 138.5t-39 197v686h-182zM373 1417l282 281h113 l285 -281l-43 -53l-297 164l-299 -164z" />
+<glyph unicode="Ü" horiz-adv-x="1425" d="M41 1102v145h545v-145h-183v-672q0 -150 88.5 -221.5t229.5 -71.5q67 0 122 16.5t98.5 50.5t68 92.5t24.5 135.5v670h-188v145h538v-145h-182v-674q0 -214 -131.5 -333.5t-355.5 -119.5q-102 0 -189.5 26.5t-156 79t-107.5 138.5t-39 197v686h-182zM416 1483q0 46 32 78 t78 32q44 0 76.5 -32.5t32.5 -77.5t-32 -77t-77 -32q-46 0 -78 31.5t-32 77.5zM788 1483q0 46 32.5 78t78.5 32q45 0 77 -32.5t32 -77.5t-32 -77t-77 -32q-46 0 -78.5 31.5t-32.5 77.5z" />
+<glyph unicode="Ý" horiz-adv-x="1294" d="M-12 1102v145h549v-143h-193l305 -494l305 494h-190v143h539v-145h-156l-408 -645v-312h189v-145h-557v145h188v304l-412 653h-159zM475 1436l330 327l119 -149l-392 -250z" />
+<glyph unicode="Þ" horiz-adv-x="1173" d="M78 0v141h186v965h-186v141h579v-137h-213v-119h181q232 0 364.5 -91.5t132.5 -268.5q0 -179 -132.5 -271t-364.5 -92h-181v-131h213v-137h-579zM444 412h187q161 0 235 55.5t74 163.5t-74 163.5t-235 55.5h-187v-438z" />
+<glyph unicode="ß" horiz-adv-x="1161" d="M53 735v142h174v196q0 180 103 288.5t299 108.5q166 0 267 -79.5t101 -231.5q0 -56 -15.5 -106t-37.5 -85t-44.5 -67t-38 -66.5t-15.5 -68.5q0 -44 26 -90.5t63.5 -89.5t75 -90.5t63.5 -111t26 -132.5q0 -131 -86.5 -199.5t-237.5 -68.5q-117 0 -227 36v140 q98 -43 203 -43q172 0 172 139q0 52 -26 102t-63.5 92t-75 85.5t-63.5 99t-26 115.5q0 47 16 89t39 75.5t46.5 66.5t39.5 76t16 90q0 89 -52.5 138.5t-147.5 49.5q-61 0 -106.5 -21.5t-70.5 -58.5t-37 -80.5t-12 -93.5v-1081h-329v139h155v596h-174z" />
+<glyph unicode="à" horiz-adv-x="966" d="M53 240q0 270 402 270h172v68q0 101 -45.5 142.5t-159.5 41.5q-146 0 -297 -51v135q157 53 332 53q174 0 259 -74t85 -239v-447h145v-139h-313v106q-133 -129 -299 -129q-122 0 -201.5 69t-79.5 194zM188 1278l117 147l322 -319l-58 -72zM229 246q0 -63 39.5 -101.5 t114.5 -38.5q121 0 244 115v174h-164q-234 0 -234 -149z" />
+<glyph unicode="á" horiz-adv-x="966" d="M53 240q0 270 402 270h172v68q0 101 -45.5 142.5t-159.5 41.5q-146 0 -297 -51v135q157 53 332 53q174 0 259 -74t85 -239v-447h145v-139h-313v106q-133 -129 -299 -129q-122 0 -201.5 69t-79.5 194zM229 246q0 -63 39.5 -101.5t114.5 -38.5q121 0 244 115v174h-164 q-234 0 -234 -149zM262 1106l322 319l116 -147l-381 -244z" />
+<glyph unicode="â" horiz-adv-x="966" d="M53 240q0 270 402 270h172v68q0 101 -45.5 142.5t-159.5 41.5q-146 0 -297 -51v135q157 53 332 53q174 0 259 -74t85 -239v-447h145v-139h-313v106q-133 -129 -299 -129q-122 0 -201.5 69t-79.5 194zM115 1081l276 273h113l276 -273l-41 -55l-293 160l-288 -160zM229 246 q0 -63 39.5 -101.5t114.5 -38.5q121 0 244 115v174h-164q-234 0 -234 -149z" />
+<glyph unicode="ã" horiz-adv-x="966" d="M53 240q0 270 402 270h172v68q0 101 -45.5 142.5t-159.5 41.5q-146 0 -297 -51v135q157 53 332 53q174 0 259 -74t85 -239v-447h145v-139h-313v106q-133 -129 -299 -129q-122 0 -201.5 69t-79.5 194zM98 1075q16 39 26 60.5t30.5 56.5t40 54.5t49 34.5t63.5 15 q55 0 146 -52t137 -52q78 0 133 108l68 -36q-18 -44 -34.5 -75.5t-43 -69t-61 -57.5t-74.5 -20q-43 0 -95.5 26t-101.5 52.5t-84 26.5q-73 0 -129 -107zM229 246q0 -63 39.5 -101.5t114.5 -38.5q121 0 244 115v174h-164q-234 0 -234 -149z" />
+<glyph unicode="ä" horiz-adv-x="966" d="M53 240q0 270 402 270h172v68q0 101 -45.5 142.5t-159.5 41.5q-146 0 -297 -51v135q157 53 332 53q174 0 259 -74t85 -239v-447h145v-139h-313v106q-133 -129 -299 -129q-122 0 -201.5 69t-79.5 194zM154 1151q0 44 32 76.5t76 32.5t76.5 -32.5t32.5 -76.5q0 -45 -32 -77 t-77 -32q-44 0 -76 32t-32 77zM229 246q0 -63 39.5 -101.5t114.5 -38.5q121 0 244 115v174h-164q-234 0 -234 -149zM526 1151q0 44 32.5 76.5t76.5 32.5t76 -32.5t32 -76.5q0 -45 -31.5 -77t-76.5 -32t-77 32t-32 77z" />
+<glyph unicode="å" horiz-adv-x="966" d="M53 240q0 270 402 270h172v68q0 101 -45.5 142.5t-159.5 41.5q-146 0 -297 -51v135q157 53 332 53q174 0 259 -74t85 -239v-447h145v-139h-313v106q-133 -129 -299 -129q-122 0 -201.5 69t-79.5 194zM207 1245q0 93 64.5 156t174.5 63t174 -63t64 -156q0 -94 -64 -157.5 t-174 -63.5t-174.5 63.5t-64.5 157.5zM229 246q0 -63 39.5 -101.5t114.5 -38.5q121 0 244 115v174h-164q-234 0 -234 -149zM340 1245q0 -53 27 -87t79 -34q50 0 77.5 34.5t27.5 86.5q0 49 -27.5 84t-77.5 35q-51 0 -78.5 -34.5t-27.5 -84.5z" />
+<glyph unicode="æ" horiz-adv-x="1478" d="M53 240q0 268 402 268h170v70q0 101 -45.5 143.5t-157.5 42.5q-141 0 -297 -62v140q158 57 324 57q218 0 290 -139q110 139 297 139q96 0 171 -36.5t120 -98.5t67.5 -138t22.5 -161q0 -51 -6 -78h-620q11 -131 85 -201.5t207 -70.5q137 0 285 84v-140q-137 -82 -307 -82 q-223 0 -340 146q-170 -146 -365 -146q-137 0 -220 68.5t-83 194.5zM227 248q0 -64 42 -100.5t124 -36.5q141 0 275 108q-30 67 -37 174h-170q-234 0 -234 -145zM791 510h460q-2 51 -14 95.5t-36.5 82.5t-67.5 60t-101 22q-109 0 -169.5 -72t-71.5 -188z" />
+<glyph unicode="ç" horiz-adv-x="905" d="M70 436q0 218 123.5 340.5t332.5 122.5q148 0 310 -59v-275h-150v176q-75 23 -143 23q-144 0 -218.5 -86.5t-74.5 -235.5q0 -151 77 -239t220 -88q135 0 284 84v-142q-123 -74 -286 -80l-23 -55q72 -5 123 -46.5t51 -113.5q0 -86 -75 -129t-191 -43q-69 0 -133 11l25 104 q48 -10 100 -10q123 0 123 69q0 78 -156 78v39l51 103q-174 22 -272 140t-98 312z" />
+<glyph unicode="è" horiz-adv-x="937" d="M70 436q0 207 112 335t305 128q99 0 176 -36.5t122.5 -98.5t68.5 -137.5t23 -161.5q0 -44 -5 -78h-626q12 -131 87 -201.5t208 -70.5q136 0 288 84v-140q-141 -82 -313 -82q-214 0 -330 126t-116 333zM215 1278l117 147l321 -319l-57 -72zM246 514h467q-3 50 -16 93 t-38.5 80.5t-68.5 59t-101 21.5q-107 0 -168.5 -70.5t-74.5 -183.5z" />
+<glyph unicode="é" horiz-adv-x="937" d="M70 436q0 207 112 335t305 128q99 0 176 -36.5t122.5 -98.5t68.5 -137.5t23 -161.5q0 -44 -5 -78h-626q12 -131 87 -201.5t208 -70.5q136 0 288 84v-140q-141 -82 -313 -82q-214 0 -330 126t-116 333zM246 514h467q-3 50 -16 93t-38.5 80.5t-68.5 59t-101 21.5 q-107 0 -168.5 -70.5t-74.5 -183.5zM301 1106l322 319l116 -147l-381 -244z" />
+<glyph unicode="ê" horiz-adv-x="937" d="M70 436q0 207 112 335t305 128q99 0 176 -36.5t122.5 -98.5t68.5 -137.5t23 -161.5q0 -44 -5 -78h-626q12 -131 87 -201.5t208 -70.5q136 0 288 84v-140q-141 -82 -313 -82q-214 0 -330 126t-116 333zM145 1081l277 273h113l276 -273l-43 -55l-291 160l-291 -160z M246 514h467q-3 50 -16 93t-38.5 80.5t-68.5 59t-101 21.5q-107 0 -168.5 -70.5t-74.5 -183.5z" />
+<glyph unicode="ë" horiz-adv-x="937" d="M70 436q0 207 112 335t305 128q99 0 176 -36.5t122.5 -98.5t68.5 -137.5t23 -161.5q0 -44 -5 -78h-626q12 -131 87 -201.5t208 -70.5q136 0 288 84v-140q-141 -82 -313 -82q-214 0 -330 126t-116 333zM180 1151q0 45 32 77t77 32q44 0 76 -32.5t32 -76.5q0 -45 -31.5 -77 t-76.5 -32q-46 0 -77.5 31.5t-31.5 77.5zM246 514h467q-3 50 -16 93t-38.5 80.5t-68.5 59t-101 21.5q-107 0 -168.5 -70.5t-74.5 -183.5zM553 1151q0 44 32.5 76.5t76.5 32.5t76 -32.5t32 -76.5q0 -45 -32 -77t-76 -32q-45 0 -77 32t-32 77z" />
+<glyph unicode="ì" horiz-adv-x="575" d="M6 1278l117 147l323 -319l-59 -72zM66 0v139h147v598h-147v140h323v-738h148v-139h-471z" />
+<glyph unicode="í" horiz-adv-x="575" d="M66 0v139h147v598h-147v140h323v-738h148v-139h-471zM76 1106l321 319l117 -147l-381 -244z" />
+<glyph unicode="î" horiz-adv-x="575" d="M-59 1081l276 273h113l276 -273l-41 -55l-293 160l-290 -160zM66 0v139h147v598h-147v140h323v-738h148v-139h-471z" />
+<glyph unicode="ï" horiz-adv-x="575" d="M-23 1151q0 44 32.5 76.5t76.5 32.5t76.5 -32.5t32.5 -76.5q0 -45 -32 -77t-77 -32t-77 32t-32 77zM66 0v139h147v598h-147v140h323v-738h148v-139h-471zM350 1151q0 44 32.5 76.5t76.5 32.5q45 0 76.5 -32t31.5 -77q0 -46 -31 -77.5t-77 -31.5q-45 0 -77 32t-32 77z" />
+<glyph unicode="ð" horiz-adv-x="1034" d="M70 420q0 194 109 318t292 124q175 0 272 -119q-43 242 -251 447l-218 -166l-49 70l203 155q-76 65 -186 133l90 101q126 -68 223 -148l166 127l51 -67l-154 -117q152 -150 241 -344.5t89 -421.5q0 -252 -114.5 -393.5t-329.5 -141.5q-203 0 -318.5 122.5t-115.5 320.5z M250 420q0 -141 70.5 -224t189.5 -83q118 0 188 84.5t70 224.5t-69 224.5t-189 84.5t-190 -85.5t-70 -225.5z" />
+<glyph unicode="ñ" horiz-adv-x="1161" d="M66 0v139h147v598h-147v140h319v-123q163 145 338 145q121 0 189.5 -71t68.5 -207v-482h149v-139h-473v139h150v463q0 76 -32 116t-105 40q-128 0 -281 -127v-492h148v-139h-471zM240 1075q14 36 25 60t31 57.5t40 53.5t49.5 35t63.5 15q53 0 144.5 -52t137.5 -52 q41 0 71.5 26t59.5 82l70 -36q-20 -46 -36 -76.5t-43 -68t-61.5 -57.5t-74.5 -20q-43 0 -95.5 26t-101 52.5t-82.5 26.5q-73 0 -129 -107z" />
+<glyph unicode="ò" d="M70 438q0 210 120.5 335.5t325.5 125.5t326 -125.5t121 -335.5q0 -211 -121 -336t-326 -125t-325.5 125t-120.5 336zM242 1278l116 147l322 -319l-57 -72zM250 438q0 -147 69.5 -236t196.5 -89t196.5 89t69.5 236t-69.5 236.5t-196.5 89.5t-196.5 -89.5t-69.5 -236.5z " />
+<glyph unicode="ó" d="M70 438q0 210 120.5 335.5t325.5 125.5t326 -125.5t121 -335.5q0 -211 -121 -336t-326 -125t-325.5 125t-120.5 336zM250 438q0 -147 69.5 -236t196.5 -89t196.5 89t69.5 236t-69.5 236.5t-196.5 89.5t-196.5 -89.5t-69.5 -236.5zM330 1106l321 319l117 -147l-381 -244z " />
+<glyph unicode="ô" d="M70 438q0 210 120.5 335.5t325.5 125.5t326 -125.5t121 -335.5q0 -211 -121 -336t-326 -125t-325.5 125t-120.5 336zM184 1081l277 273h112l277 -273l-43 -55l-291 160l-291 -160zM250 438q0 -147 69.5 -236t196.5 -89t196.5 89t69.5 236t-69.5 236.5t-196.5 89.5 t-196.5 -89.5t-69.5 -236.5z" />
+<glyph unicode="õ" d="M70 438q0 210 120.5 335.5t325.5 125.5t326 -125.5t121 -335.5q0 -211 -121 -336t-326 -125t-325.5 125t-120.5 336zM162 1075q16 39 26 60.5t30.5 56.5t40 54.5t49 34.5t63.5 15q44 0 95 -26t99.5 -52t87.5 -26q42 0 73 26.5t60 81.5l68 -36q-18 -44 -34.5 -75.5 t-43 -69t-61 -57.5t-74.5 -20q-43 0 -96 26t-102 52.5t-83 26.5q-73 0 -129 -107zM250 438q0 -147 69.5 -236t196.5 -89t196.5 89t69.5 236t-69.5 236.5t-196.5 89.5t-196.5 -89.5t-69.5 -236.5z" />
+<glyph unicode="ö" d="M70 438q0 210 120.5 335.5t325.5 125.5t326 -125.5t121 -335.5q0 -211 -121 -336t-326 -125t-325.5 125t-120.5 336zM221 1151q0 44 32.5 76.5t76.5 32.5t76 -32.5t32 -76.5q0 -45 -32 -77t-76 -32q-45 0 -77 32t-32 77zM250 438q0 -147 69.5 -236t196.5 -89t196.5 89 t69.5 236t-69.5 236.5t-196.5 89.5t-196.5 -89.5t-69.5 -236.5zM594 1151q0 44 32 76.5t76 32.5t76.5 -32.5t32.5 -76.5q0 -45 -32 -77t-77 -32q-44 0 -76 32t-32 77z" />
+<glyph unicode="÷" horiz-adv-x="1040" d="M96 426v129h850v-129h-850zM408 172q0 47 33 81t79 34q47 0 81 -34t34 -81q0 -46 -34 -79.5t-81 -33.5q-46 0 -79 33.5t-33 79.5zM408 807q0 47 33 81t79 34q47 0 81 -34t34 -81q0 -46 -34 -79.5t-81 -33.5q-46 0 -79 33.5t-33 79.5z" />
+<glyph unicode="ø" d="M70 438q0 210 120.5 335.5t325.5 125.5q164 0 277 -86l86 100l53 -45l-86 -100q117 -126 117 -330q0 -211 -121 -336t-326 -125q-165 0 -278 84l-86 -100l-56 45l88 103q-114 120 -114 329zM250 438q0 -120 47 -200l395 458q-71 68 -176 68q-127 0 -196.5 -89.5 t-69.5 -236.5zM340 178q65 -65 176 -65q127 0 196.5 89t69.5 236q0 121 -47 201z" />
+<glyph unicode="ù" horiz-adv-x="1132" d="M29 737v140h323v-603q0 -76 32 -115.5t105 -39.5q133 0 281 125v493h-160v140h336v-738h148v-139h-320v121q-162 -144 -338 -144q-121 0 -189.5 71.5t-68.5 207.5v481h-149zM233 1278l117 147l324 -319l-60 -72z" />
+<glyph unicode="ú" horiz-adv-x="1132" d="M29 737v140h323v-603q0 -76 32 -115.5t105 -39.5q133 0 281 125v493h-160v140h336v-738h148v-139h-320v121q-162 -144 -338 -144q-121 0 -189.5 71.5t-68.5 207.5v481h-149zM358 1106l324 319l115 -147l-379 -244z" />
+<glyph unicode="û" horiz-adv-x="1132" d="M29 737v140h323v-603q0 -76 32 -115.5t105 -39.5q133 0 281 125v493h-160v140h336v-738h148v-139h-320v121q-162 -144 -338 -144q-121 0 -189.5 71.5t-68.5 207.5v481h-149zM193 1081l274 273h115l274 -273l-41 -55l-291 160l-291 -160z" />
+<glyph unicode="ü" horiz-adv-x="1132" d="M29 737v140h323v-603q0 -76 32 -115.5t105 -39.5q133 0 281 125v493h-160v140h336v-738h148v-139h-320v121q-162 -144 -338 -144q-121 0 -189.5 71.5t-68.5 207.5v481h-149zM225 1151q0 44 31.5 76.5t75.5 32.5q45 0 76.5 -32t31.5 -77q0 -46 -31 -77.5t-77 -31.5 q-44 0 -75.5 31.5t-31.5 77.5zM598 1151q0 44 31.5 76.5t75.5 32.5q45 0 76.5 -32t31.5 -77q0 -46 -31 -77.5t-77 -31.5q-44 0 -75.5 31.5t-31.5 77.5z" />
+<glyph unicode="ý" horiz-adv-x="1056" d="M23 739v138h440v-140h-144l203 -682l238 682h-142v140h429v-138h-115l-336 -944q-78 -225 -287 -225q-117 0 -223 63l51 119q84 -47 150 -47q115 0 157 121l60 174h-133l-232 739h-116zM377 1106l321 319l117 -147l-381 -244z" />
+<glyph unicode="þ" horiz-adv-x="1036" d="M-18 -268h147v1577h-147v139h323v-672q114 123 279 123q178 0 281.5 -128t103.5 -329q0 -205 -109.5 -335t-296.5 -130q-149 0 -258 95v-340h174v-140h-497v140zM305 201q90 -86 217 -86q129 0 197.5 88.5t68.5 234.5q0 90 -24.5 161t-83 117t-143.5 46q-127 0 -232 -109 v-452z" />
+<glyph unicode="ÿ" horiz-adv-x="1056" d="M23 739v138h440v-140h-144l203 -682l238 682h-142v140h429v-138h-115l-336 -944q-78 -225 -287 -225q-117 0 -223 63l51 119q84 -47 150 -47q115 0 157 121l60 174h-133l-232 739h-116zM246 1151q0 45 31.5 77t76.5 32q44 0 75.5 -32.5t31.5 -76.5q0 -46 -31.5 -77.5 t-75.5 -31.5q-46 0 -77 31.5t-31 77.5zM618 1151q0 45 32 77t77 32q44 0 75.5 -32.5t31.5 -76.5q0 -46 -31.5 -77.5t-75.5 -31.5q-46 0 -77.5 31.5t-31.5 77.5z" />
+<glyph unicode="Œ" horiz-adv-x="1767" d="M84 623q0 285 168 454.5t459 169.5h956v-346h-168v201h-450v-402h487v-145h-487v-410h456v205h168v-350h-962q-290 0 -458.5 168.5t-168.5 454.5zM268 623q0 -219 118.5 -346t326.5 -127h159v948h-159q-208 0 -326.5 -127t-118.5 -348z" />
+<glyph unicode="œ" horiz-adv-x="1644" d="M70 438q0 210 118.5 335.5t317.5 125.5q122 0 214 -52.5t144 -146.5q47 94 132.5 146.5t203.5 52.5q97 0 172.5 -36.5t120 -98.5t67.5 -138t23 -161q0 -51 -6 -78h-623q12 -131 87 -201.5t208 -70.5q141 0 289 84v-140q-141 -82 -309 -82q-134 0 -226 52.5t-139 146.5 q-55 -94 -147 -146.5t-213 -52.5q-197 0 -315.5 125.5t-118.5 335.5zM248 438q0 -147 69 -236t195 -89q127 0 196.5 89t69.5 236t-69.5 236.5t-196.5 89.5q-126 0 -195 -89.5t-69 -236.5zM954 514h467q-3 50 -16 93t-38 80.5t-68.5 59t-100.5 21.5q-107 0 -169 -70.5 t-75 -183.5z" />
+<glyph unicode="Ÿ" horiz-adv-x="1294" d="M-12 1102v145h549v-143h-193l305 -494l305 494h-190v143h539v-145h-156l-408 -645v-312h189v-145h-557v145h188v304l-412 653h-159zM354 1483q0 46 32.5 78t78.5 32q44 0 76 -32t32 -78q0 -45 -31.5 -77t-76.5 -32q-46 0 -78.5 31.5t-32.5 77.5zM727 1483q0 46 32.5 78 t78.5 32t77 -32t31 -78t-31 -77.5t-77 -31.5t-78.5 31.5t-32.5 77.5z" />
+<glyph unicode="ˆ" horiz-adv-x="888" d="M119 1081l274 273h113l276 -273l-41 -55l-290 160l-291 -160z" />
+<glyph unicode="˜" horiz-adv-x="950" d="M127 1075q16 39 26 60.5t30.5 56.5t40 54.5t49 34.5t63.5 15q53 0 144.5 -52t137.5 -52q80 0 132 108l69 -36q-20 -46 -36 -76.5t-43 -68t-61.5 -57.5t-74.5 -20q-34 0 -75 16.5t-72 36t-67.5 36t-63.5 16.5q-73 0 -129 -107z" />
+<glyph unicode=" " horiz-adv-x="895" />
+<glyph unicode=" " horiz-adv-x="1790" />
+<glyph unicode=" " horiz-adv-x="895" />
+<glyph unicode=" " horiz-adv-x="1790" />
+<glyph unicode=" " horiz-adv-x="596" />
+<glyph unicode=" " horiz-adv-x="447" />
+<glyph unicode=" " horiz-adv-x="298" />
+<glyph unicode=" " horiz-adv-x="298" />
+<glyph unicode=" " horiz-adv-x="223" />
+<glyph unicode=" " horiz-adv-x="358" />
+<glyph unicode=" " horiz-adv-x="99" />
+<glyph unicode="‐" horiz-adv-x="790" d="M115 399v152h561v-152h-561z" />
+<glyph unicode="‑" horiz-adv-x="790" d="M115 399v152h561v-152h-561z" />
+<glyph unicode="‒" horiz-adv-x="790" d="M115 399v152h561v-152h-561z" />
+<glyph unicode="–" horiz-adv-x="1271" d="M115 399v152h1040v-152h-1040z" />
+<glyph unicode="—" horiz-adv-x="1701" d="M115 399v152h1470v-152h-1470z" />
+<glyph unicode="‘" horiz-adv-x="423" d="M82 971q0 76 57.5 175.5t134.5 164.5l72 -60q-88 -101 -110 -194q35 -7 56 -35.5t21 -65.5q0 -48 -32.5 -81t-83.5 -33q-52 0 -83.5 36.5t-31.5 92.5z" />
+<glyph unicode="’" horiz-adv-x="417" d="M84 901q85 102 111 197q-36 8 -58 35t-22 63q0 48 33.5 82.5t84.5 34.5q52 0 83.5 -37t31.5 -94q0 -76 -57 -174.5t-135 -165.5z" />
+<glyph unicode="‚" horiz-adv-x="450" d="M76 -197q88 100 110 195q-35 7 -56 34.5t-21 65.5q0 48 32.5 81.5t83.5 33.5q52 0 83.5 -36.5t31.5 -92.5q0 -76 -58 -175.5t-135 -166.5z" />
+<glyph unicode="“" horiz-adv-x="784" d="M82 971q0 76 57.5 175.5t134.5 164.5l72 -60q-88 -101 -110 -194q35 -7 56 -35.5t21 -65.5q0 -48 -32.5 -81t-83.5 -33q-52 0 -83.5 36.5t-31.5 92.5zM442 971q0 76 58 175.5t135 164.5l72 -60q-89 -102 -111 -194q35 -7 56.5 -35.5t21.5 -65.5q0 -48 -32.5 -81 t-84.5 -33t-83.5 36.5t-31.5 92.5z" />
+<glyph unicode="”" horiz-adv-x="778" d="M84 901q85 102 111 197q-36 8 -58 35t-22 63q0 48 33.5 82.5t84.5 34.5q52 0 83.5 -37t31.5 -94q0 -76 -57 -174.5t-135 -165.5zM444 901q90 108 111 197q-36 8 -58 35t-22 63q0 48 34 82.5t85 34.5q52 0 83.5 -37t31.5 -94q0 -76 -57.5 -174.5t-135.5 -165.5z" />
+<glyph unicode="„" horiz-adv-x="811" d="M82 -199q85 102 111 197q-36 8 -58 35t-22 63q0 48 33.5 82.5t84.5 34.5q52 0 83.5 -37t31.5 -94q0 -76 -57 -174.5t-135 -165.5zM442 -199q90 108 111 197q-36 8 -58 35t-22 63q0 48 34 82.5t85 34.5q52 0 83.5 -37t31.5 -94q0 -76 -57.5 -174.5t-135.5 -165.5z" />
+<glyph unicode="•" horiz-adv-x="735" d="M139 604q0 93 67 159t161 66q95 0 162 -65.5t67 -159.5q0 -95 -67 -161t-162 -66q-94 0 -161 66t-67 161z" />
+<glyph unicode="…" horiz-adv-x="1605" d="M100 96q0 47 34 82t81 35t81 -35t34 -82t-34 -80.5t-81 -33.5t-81 33.5t-34 80.5zM686 96q0 47 35 82t82 35t81 -35t34 -82t-34 -80.5t-81 -33.5q-48 0 -82.5 33.5t-34.5 80.5zM1274 96q0 47 34 82t81 35t81.5 -35t34.5 -82t-34.5 -80.5t-81.5 -33.5t-81 33.5t-34 80.5z " />
+<glyph unicode=" " horiz-adv-x="358" />
+<glyph unicode="‹" horiz-adv-x="638" d="M66 526v9l309 370h192l-319 -375l319 -376h-192z" />
+<glyph unicode="›" horiz-adv-x="638" d="M72 154l321 376l-321 375h192l309 -370v-9l-309 -372h-192z" />
+<glyph unicode=" " horiz-adv-x="447" />
+<glyph unicode="€" horiz-adv-x="1185" d="M66 381l22 65h117q-4 32 -4 56q0 38 6 78h-141l22 65h127q40 175 175.5 277t334.5 102q178 0 338 -72v-250h-148v158q-95 27 -178 27q-136 0 -227 -63t-123 -179h387l-22 -65h-379q-4 -23 -4 -70q0 -24 4 -64h332l-23 -65h-297q33 -120 123 -188t227 -68q162 0 328 94 v-145q-159 -90 -342 -90q-204 0 -339 106.5t-169 290.5h-147z" />
+<glyph unicode="™" horiz-adv-x="1454" d="M131 1087v160h461v-160h-72v91h-114v-377h73v-62h-237v62h75v377h-112v-91h-74zM662 739v62h65l16 383h-69v63h168l155 -348l156 348h166v-65h-68l15 -381h67v-62h-221v62h74l-10 323l-156 -327h-51l-154 333l-12 -329h74v-62h-215z" />
+<glyph unicode="◼" horiz-adv-x="880" d="M0 0v881h881v-881h-881z" />
+<hkern u1=" " u2="v" k="45" />
+<hkern u1=" " u2="X" k="23" />
+<hkern u1=" " u2="V" k="63" />
+<hkern u1="&" u2="V" k="59" />
+<hkern u1="(" u2="þ" k="-66" />
+<hkern u1="(" u2="Î" k="-29" />
+<hkern u1="(" u2="{" k="20" />
+<hkern u1="(" u2="x" k="43" />
+<hkern u1="(" u2="v" k="63" />
+<hkern u1="(" u2="b" k="-59" />
+<hkern u1="(" u2="9" k="39" />
+<hkern u1="(" u2="8" k="47" />
+<hkern u1="(" u2="7" k="45" />
+<hkern u1="(" u2="6" k="55" />
+<hkern u1="(" u2="5" k="27" />
+<hkern u1="(" u2="4" k="35" />
+<hkern u1="(" u2="3" k="27" />
+<hkern u1="(" u2="2" k="49" />
+<hkern u1="(" u2="1" k="47" />
+<hkern u1="(" u2="0" k="68" />
+<hkern u1="(" u2="(" k="33" />
+<hkern u1=")" u2="]" k="33" />
+<hkern u1=")" u2=")" k="33" />
+<hkern u1="*" u2="ï" k="-31" />
+<hkern u1="*" u2="î" k="-55" />
+<hkern u1="*" u2="V" k="-39" />
+<hkern u1="+" u2="1" k="23" />
+<hkern u1="/" u2="þ" k="-37" />
+<hkern u1="/" u2="x" k="55" />
+<hkern u1="/" u2="v" k="43" />
+<hkern u1="/" u2="p" k="47" />
+<hkern u1="/" u2="b" k="-33" />
+<hkern u1="/" u2="9" k="76" />
+<hkern u1="/" u2="8" k="37" />
+<hkern u1="/" u2="7" k="25" />
+<hkern u1="/" u2="6" k="47" />
+<hkern u1="/" u2="5" k="78" />
+<hkern u1="/" u2="4" k="117" />
+<hkern u1="/" u2="3" k="68" />
+<hkern u1="/" u2="2" k="61" />
+<hkern u1="/" u2="1" k="53" />
+<hkern u1="/" u2="0" k="82" />
+<hkern u1="/" u2="/" k="557" />
+<hkern u1="0" u2="}" k="43" />
+<hkern u1="0" u2="]" k="68" />
+<hkern u1="0" u2="\" k="82" />
+<hkern u1="0" u2="V" k="74" />
+<hkern u1="0" u2="/" k="72" />
+<hkern u1="0" u2=")" k="68" />
+<hkern u1="1" u2="÷" k="25" />
+<hkern u1="1" u2="·" k="27" />
+<hkern u1="1" u2="°" k="27" />
+<hkern u1="1" u2="}" k="33" />
+<hkern u1="1" u2="]" k="61" />
+<hkern u1="1" u2="\" k="92" />
+<hkern u1="1" u2="V" k="76" />
+<hkern u1="1" u2="+" k="20" />
+<hkern u1="1" u2=")" k="39" />
+<hkern u1="2" u2="}" k="31" />
+<hkern u1="2" u2="]" k="59" />
+<hkern u1="2" u2="\" k="74" />
+<hkern u1="2" u2="V" k="63" />
+<hkern u1="2" u2="/" k="23" />
+<hkern u1="2" u2=")" k="41" />
+<hkern u1="3" u2="°" k="20" />
+<hkern u1="3" u2="}" k="31" />
+<hkern u1="3" u2="]" k="47" />
+<hkern u1="3" u2="\" k="82" />
+<hkern u1="3" u2="V" k="76" />
+<hkern u1="3" u2=")" k="37" />
+<hkern u1="4" u2="°" k="84" />
+<hkern u1="4" u2="]" k="23" />
+<hkern u1="4" u2="\" k="123" />
+<hkern u1="4" u2="V" k="106" />
+<hkern u1="4" u2="7" k="29" />
+<hkern u1="4" u2=")" k="25" />
+<hkern u1="5" u2="÷" k="25" />
+<hkern u1="5" u2="·" k="29" />
+<hkern u1="5" u2="}" k="25" />
+<hkern u1="5" u2="]" k="45" />
+<hkern u1="5" u2="\" k="57" />
+<hkern u1="5" u2="V" k="43" />
+<hkern u1="5" u2=")" k="35" />
+<hkern u1="6" u2="}" k="31" />
+<hkern u1="6" u2="]" k="51" />
+<hkern u1="6" u2="\" k="31" />
+<hkern u1="6" u2="/" k="61" />
+<hkern u1="6" u2=")" k="45" />
+<hkern u1="7" u2="÷" k="20" />
+<hkern u1="7" u2="]" k="51" />
+<hkern u1="7" u2="4" k="37" />
+<hkern u1="7" u2="/" k="96" />
+<hkern u1="7" u2=")" k="41" />
+<hkern u1="8" u2="}" k="29" />
+<hkern u1="8" u2="]" k="53" />
+<hkern u1="8" u2="\" k="37" />
+<hkern u1="8" u2="/" k="59" />
+<hkern u1="8" u2=")" k="47" />
+<hkern u1="9" u2="°" k="29" />
+<hkern u1="9" u2="}" k="35" />
+<hkern u1="9" u2="]" k="53" />
+<hkern u1="9" u2="\" k="86" />
+<hkern u1="9" u2="V" k="78" />
+<hkern u1="9" u2="/" k="37" />
+<hkern u1="9" u2=")" k="51" />
+<hkern u1="@" u2="X" k="25" />
+<hkern u1="@" u2="V" k="51" />
+<hkern u1="@" u2="M" k="20" />
+<hkern u1="B" u2="}" k="33" />
+<hkern u1="B" u2="x" k="14" />
+<hkern u1="B" u2="v" k="20" />
+<hkern u1="B" u2="]" k="55" />
+<hkern u1="B" u2="\" k="39" />
+<hkern u1="B" u2="X" k="20" />
+<hkern u1="B" u2="V" k="33" />
+<hkern u1="B" u2="/" k="63" />
+<hkern u1="B" u2=")" k="49" />
+<hkern u1="C" u2="î" k="-29" />
+<hkern u1="E" u2="þ" k="14" />
+<hkern u1="F" u2="ï" k="-33" />
+<hkern u1="F" u2="î" k="-59" />
+<hkern u1="F" u2="]" k="20" />
+<hkern u1="F" u2="4" k="59" />
+<hkern u1="F" u2="/" k="137" />
+<hkern u1="F" u2=" " k="45" />
+<hkern u1="H" u2="þ" k="25" />
+<hkern u1="H" u2="î" k="-16" />
+<hkern u1="I" u2="þ" k="25" />
+<hkern u1="I" u2="î" k="-16" />
+<hkern u1="J" u2="ï" k="-6" />
+<hkern u1="J" u2="î" k="-14" />
+<hkern u1="K" u2="ï" k="-29" />
+<hkern u1="K" u2="î" k="-39" />
+<hkern u1="M" u2="þ" k="25" />
+<hkern u1="M" u2="º" k="18" />
+<hkern u1="M" u2="ª" k="33" />
+<hkern u1="M" u2="v" k="72" />
+<hkern u1="M" u2="p" k="45" />
+<hkern u1="M" u2="b" k="14" />
+<hkern u1="M" u2="]" k="25" />
+<hkern u1="N" u2="ï" k="-12" />
+<hkern u1="N" u2="î" k="-20" />
+<hkern u1="P" u2="]" k="47" />
+<hkern u1="P" u2="X" k="25" />
+<hkern u1="P" u2="M" k="16" />
+<hkern u1="P" u2="4" k="61" />
+<hkern u1="P" u2="/" k="127" />
+<hkern u1="P" u2=")" k="41" />
+<hkern u1="P" u2=" " k="27" />
+<hkern u1="S" u2="þ" k="29" />
+<hkern u1="T" u2="ï" k="-29" />
+<hkern u1="T" u2="î" k="-68" />
+<hkern u1="T" u2="ã" k="63" />
+<hkern u1="U" u2="ï" k="-31" />
+<hkern u1="U" u2="î" k="-33" />
+<hkern u1="V" u2="™" k="-10" />
+<hkern u1="V" u2="õ" k="119" />
+<hkern u1="V" u2="ô" k="137" />
+<hkern u1="V" u2="ï" k="-78" />
+<hkern u1="V" u2="î" k="-78" />
+<hkern u1="V" u2="ì" k="-4" />
+<hkern u1="V" u2="ë" k="121" />
+<hkern u1="V" u2="ê" k="113" />
+<hkern u1="V" u2="å" k="150" />
+<hkern u1="V" u2="ä" k="96" />
+<hkern u1="V" u2="ã" k="55" />
+<hkern u1="V" u2="â" k="96" />
+<hkern u1="V" u2="©" k="49" />
+<hkern u1="V" u2="x" k="100" />
+<hkern u1="V" u2="v" k="88" />
+<hkern u1="V" u2="p" k="88" />
+<hkern u1="V" u2="@" k="61" />
+<hkern u1="V" u2="?" k="-14" />
+<hkern u1="V" u2="9" k="70" />
+<hkern u1="V" u2="5" k="66" />
+<hkern u1="V" u2="4" k="98" />
+<hkern u1="V" u2="3" k="59" />
+<hkern u1="V" u2="2" k="53" />
+<hkern u1="V" u2="1" k="49" />
+<hkern u1="V" u2="0" k="74" />
+<hkern u1="V" u2="/" k="162" />
+<hkern u1="V" u2="*" k="-37" />
+<hkern u1="V" u2=" " k="63" />
+<hkern u1="W" u2="ï" k="-74" />
+<hkern u1="W" u2="î" k="-76" />
+<hkern u1="W" u2="ì" k="-2" />
+<hkern u1="W" u2="ê" k="102" />
+<hkern u1="W" u2="ä" k="102" />
+<hkern u1="W" u2="ã" k="59" />
+<hkern u1="W" u2="â" k="94" />
+<hkern u1="X" u2="ï" k="-23" />
+<hkern u1="X" u2="î" k="-35" />
+<hkern u1="X" u2="ª" k="16" />
+<hkern u1="X" u2="v" k="98" />
+<hkern u1="X" u2="p" k="20" />
+<hkern u1="X" u2=" " k="23" />
+<hkern u1="Y" u2="ö" k="168" />
+<hkern u1="Y" u2="õ" k="123" />
+<hkern u1="Y" u2="ô" k="164" />
+<hkern u1="Y" u2="ï" k="-78" />
+<hkern u1="Y" u2="î" k="-76" />
+<hkern u1="Y" u2="ì" k="2" />
+<hkern u1="Y" u2="ë" k="127" />
+<hkern u1="Y" u2="ê" k="129" />
+<hkern u1="Y" u2="å" k="152" />
+<hkern u1="Y" u2="ä" k="100" />
+<hkern u1="Y" u2="ã" k="61" />
+<hkern u1="Y" u2="â" k="98" />
+<hkern u1="Z" u2="þ" k="23" />
+<hkern u1="[" u2="þ" k="-35" />
+<hkern u1="[" u2="ì" k="14" />
+<hkern u1="[" u2="Î" k="-10" />
+<hkern u1="[" u2="x" k="59" />
+<hkern u1="[" u2="v" k="68" />
+<hkern u1="[" u2="b" k="-31" />
+<hkern u1="[" u2="X" k="20" />
+<hkern u1="[" u2="M" k="27" />
+<hkern u1="[" u2="9" k="43" />
+<hkern u1="[" u2="8" k="53" />
+<hkern u1="[" u2="7" k="51" />
+<hkern u1="[" u2="6" k="57" />
+<hkern u1="[" u2="5" k="41" />
+<hkern u1="[" u2="4" k="47" />
+<hkern u1="[" u2="3" k="37" />
+<hkern u1="[" u2="2" k="61" />
+<hkern u1="[" u2="1" k="59" />
+<hkern u1="[" u2="0" k="68" />
+<hkern u1="[" u2="(" k="33" />
+<hkern u1="\" u2="þ" k="-35" />
+<hkern u1="\" u2="x" k="23" />
+<hkern u1="\" u2="v" k="131" />
+<hkern u1="\" u2="b" k="39" />
+<hkern u1="\" u2="V" k="162" />
+<hkern u1="\" u2="M" k="20" />
+<hkern u1="\" u2="8" k="59" />
+<hkern u1="\" u2="7" k="94" />
+<hkern u1="\" u2="6" k="74" />
+<hkern u1="\" u2="2" k="39" />
+<hkern u1="\" u2="1" k="39" />
+<hkern u1="\" u2="0" k="70" />
+<hkern u1="f" u2="ì" k="-20" />
+<hkern u1="q" u2="™" k="18" />
+<hkern u1="q" u2="}" k="-14" />
+<hkern u1="q" u2="]" k="-27" />
+<hkern u1="q" u2="\" k="66" />
+<hkern u1="q" u2="V" k="121" />
+<hkern u1="q" u2="M" k="25" />
+<hkern u1="q" u2="/" k="-27" />
+<hkern u1="q" u2=")" k="-57" />
+<hkern u1="v" u2="}" k="35" />
+<hkern u1="v" u2="]" k="68" />
+<hkern u1="v" u2="\" k="43" />
+<hkern u1="v" u2="X" k="98" />
+<hkern u1="v" u2="V" k="88" />
+<hkern u1="v" u2="M" k="72" />
+<hkern u1="v" u2="/" k="131" />
+<hkern u1="v" u2=")" k="66" />
+<hkern u1="v" u2="&" k="23" />
+<hkern u1="v" u2=" " k="45" />
+<hkern u1="x" u2="}" k="29" />
+<hkern u1="x" u2="]" k="59" />
+<hkern u1="x" u2="\" k="55" />
+<hkern u1="x" u2="V" k="98" />
+<hkern u1="x" u2="/" k="27" />
+<hkern u1="x" u2=")" k="43" />
+<hkern u1="{" u2="þ" k="-23" />
+<hkern u1="{" u2="x" k="29" />
+<hkern u1="{" u2="v" k="35" />
+<hkern u1="{" u2="b" k="-18" />
+<hkern u1="{" u2="9" k="33" />
+<hkern u1="{" u2="8" k="29" />
+<hkern u1="{" u2="7" k="27" />
+<hkern u1="{" u2="6" k="33" />
+<hkern u1="{" u2="5" k="29" />
+<hkern u1="{" u2="3" k="27" />
+<hkern u1="{" u2="2" k="31" />
+<hkern u1="{" u2="1" k="31" />
+<hkern u1="{" u2="0" k="43" />
+<hkern u1="}" u2=")" k="20" />
+<hkern u1="¡" u2="V" k="70" />
+<hkern u1="°" u2="4" k="66" />
+<hkern u1="·" u2="L" k="39" />
+<hkern u1="·" u2="1" k="27" />
+<hkern u1="¿" u2="þ" k="-12" />
+<hkern u1="¿" u2="x" k="39" />
+<hkern u1="¿" u2="v" k="33" />
+<hkern u1="¿" u2="b" k="35" />
+<hkern u1="¿" u2="X" k="53" />
+<hkern u1="¿" u2="V" k="111" />
+<hkern u1="¿" u2="M" k="49" />
+<hkern u1="Æ" u2="þ" k="14" />
+<hkern u1="È" u2="þ" k="14" />
+<hkern u1="É" u2="þ" k="14" />
+<hkern u1="Ê" u2="þ" k="14" />
+<hkern u1="Ë" u2="þ" k="14" />
+<hkern u1="Ì" u2="þ" k="25" />
+<hkern u1="Í" u2="þ" k="25" />
+<hkern u1="Î" u2="þ" k="25" />
+<hkern u1="Î" u2="]" k="-12" />
+<hkern u1="Î" u2=")" k="-31" />
+<hkern u1="Ï" u2="þ" k="25" />
+<hkern u1="Þ" u2="}" k="27" />
+<hkern u1="Þ" u2="]" k="53" />
+<hkern u1="Þ" u2="\" k="49" />
+<hkern u1="Þ" u2="X" k="109" />
+<hkern u1="Þ" u2="V" k="55" />
+<hkern u1="Þ" u2="M" k="37" />
+<hkern u1="Þ" u2="?" k="20" />
+<hkern u1="Þ" u2="4" k="20" />
+<hkern u1="Þ" u2="/" k="92" />
+<hkern u1="Þ" u2=")" k="59" />
+<hkern u1="ß" u2="®" k="20" />
+<hkern u1="ß" u2="ª" k="12" />
+<hkern u1="ß" u2="}" k="23" />
+<hkern u1="ß" u2="x" k="18" />
+<hkern u1="ß" u2="v" k="70" />
+<hkern u1="ß" u2="p" k="20" />
+<hkern u1="ß" u2="]" k="33" />
+<hkern u1="ß" u2="V" k="33" />
+<hkern u1="ß" u2="M" k="14" />
+<hkern u1="ß" u2="/" k="47" />
+<hkern u1="ß" u2="*" k="18" />
+<hkern u1="ß" u2=")" k="33" />
+<hkern u1="î" u2="?" k="-14" />
+<hkern u1="î" u2="*" k="-25" />
+<hkern u1="ð" u2="™" k="16" />
+<hkern u1="ð" u2="}" k="31" />
+<hkern u1="ð" u2="x" k="14" />
+<hkern u1="ð" u2="v" k="8" />
+<hkern u1="ð" u2="]" k="47" />
+<hkern u1="ð" u2="\" k="31" />
+<hkern u1="ð" u2="X" k="33" />
+<hkern u1="ð" u2="V" k="84" />
+<hkern u1="ð" u2="M" k="39" />
+<hkern u1="ð" u2="/" k="74" />
+<hkern u1="ð" u2=")" k="45" />
+<hkern u1="÷" u2="3" k="31" />
+<hkern u1="÷" u2="1" k="27" />
+<hkern u1="Œ" u2="þ" k="14" />
+<hkern u1="’" u2="ï" k="-20" />
+<hkern u1="’" u2="î" k="-27" />
+<hkern u1="”" u2="ï" k="-20" />
+<hkern u1="”" u2="î" k="-27" />
+<hkern g1="one" g2="J" k="27" />
+<hkern g1="one" g2="T" k="25" />
+<hkern g1="one" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="35" />
+<hkern g1="one" g2="W" k="68" />
+<hkern g1="one" g2="Y,Yacute,Ydieresis" k="68" />
+<hkern g1="one" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="-10" />
+<hkern g1="one" g2="quotedbl,quotesingle" k="27" />
+<hkern g1="one" g2="AE" k="-14" />
+<hkern g1="two" g2="J" k="23" />
+<hkern g1="two" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="25" />
+<hkern g1="two" g2="W" k="57" />
+<hkern g1="two" g2="Y,Yacute,Ydieresis" k="70" />
+<hkern g1="three" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="31" />
+<hkern g1="three" g2="W" k="66" />
+<hkern g1="three" g2="Y,Yacute,Ydieresis" k="76" />
+<hkern g1="four" g2="T" k="53" />
+<hkern g1="four" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="37" />
+<hkern g1="four" g2="W" k="90" />
+<hkern g1="four" g2="Y,Yacute,Ydieresis" k="84" />
+<hkern g1="four" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="-16" />
+<hkern g1="four" g2="quotedbl,quotesingle" k="86" />
+<hkern g1="four" g2="AE" k="-23" />
+<hkern g1="five" g2="W" k="35" />
+<hkern g1="five" g2="Y,Yacute,Ydieresis" k="39" />
+<hkern g1="seven" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="51" />
+<hkern g1="seven" g2="AE" k="63" />
+<hkern g1="seven" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="76" />
+<hkern g1="nine" g2="T" k="20" />
+<hkern g1="nine" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="25" />
+<hkern g1="nine" g2="W" k="66" />
+<hkern g1="nine" g2="Y,Yacute,Ydieresis" k="84" />
+<hkern g1="nine" g2="quotedbl,quotesingle" k="25" />
+<hkern g1="parenleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="27" />
+<hkern g1="parenleft" g2="AE" k="39" />
+<hkern g1="parenleft" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="59" />
+<hkern g1="parenleft" g2="S" k="37" />
+<hkern g1="parenleft" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="59" />
+<hkern g1="parenleft" g2="d,q" k="68" />
+<hkern g1="parenleft" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="31" />
+<hkern g1="parenleft" g2="i,igrave,iacute,icircumflex,idieresis" k="31" />
+<hkern g1="parenleft" g2="j" k="-10" />
+<hkern g1="parenleft" g2="m,n,r,ntilde" k="45" />
+<hkern g1="parenleft" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="72" />
+<hkern g1="parenleft" g2="s" k="55" />
+<hkern g1="parenleft" g2="t" k="49" />
+<hkern g1="parenleft" g2="u,ugrave,uacute,ucircumflex,udieresis" k="55" />
+<hkern g1="parenleft" g2="w" k="63" />
+<hkern g1="parenleft" g2="z" k="49" />
+<hkern g1="braceleft" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="braceleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="braceleft" g2="AE" k="31" />
+<hkern g1="braceleft" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="35" />
+<hkern g1="braceleft" g2="S" k="27" />
+<hkern g1="braceleft" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="33" />
+<hkern g1="braceleft" g2="d,q" k="43" />
+<hkern g1="braceleft" g2="m,n,r,ntilde" k="31" />
+<hkern g1="braceleft" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="45" />
+<hkern g1="braceleft" g2="s" k="37" />
+<hkern g1="braceleft" g2="t" k="27" />
+<hkern g1="braceleft" g2="u,ugrave,uacute,ucircumflex,udieresis" k="29" />
+<hkern g1="braceleft" g2="w" k="33" />
+<hkern g1="braceleft" g2="z" k="33" />
+<hkern g1="bracketleft" g2="T" k="20" />
+<hkern g1="bracketleft" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="23" />
+<hkern g1="bracketleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="45" />
+<hkern g1="bracketleft" g2="AE" k="61" />
+<hkern g1="bracketleft" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="59" />
+<hkern g1="bracketleft" g2="S" k="47" />
+<hkern g1="bracketleft" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="66" />
+<hkern g1="bracketleft" g2="d,q" k="70" />
+<hkern g1="bracketleft" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="39" />
+<hkern g1="bracketleft" g2="i,igrave,iacute,icircumflex,idieresis" k="37" />
+<hkern g1="bracketleft" g2="j" k="-10" />
+<hkern g1="bracketleft" g2="m,n,r,ntilde" k="61" />
+<hkern g1="bracketleft" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="74" />
+<hkern g1="bracketleft" g2="s" k="66" />
+<hkern g1="bracketleft" g2="t" k="55" />
+<hkern g1="bracketleft" g2="u,ugrave,uacute,ucircumflex,udieresis" k="61" />
+<hkern g1="bracketleft" g2="w" k="66" />
+<hkern g1="bracketleft" g2="z" k="61" />
+<hkern g1="bracketleft" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="23" />
+<hkern g1="bracketleft" g2="Z" k="25" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="J" k="27" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="T" k="100" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="57" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="W" k="115" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="Y,Yacute,Ydieresis" k="133" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="quotedbl,quotesingle" k="104" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="AE" k="-18" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="hyphen,uni00AD,endash,emdash" k="41" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="41" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="d,q" k="18" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="j" k="20" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="18" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="t" k="29" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="u,ugrave,uacute,ucircumflex,udieresis" k="33" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="w" k="102" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="V" k="129" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="p" k="18" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="v" k="117" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="y,yacute,ydieresis" k="102" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="four" k="-37" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="seven" k="51" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="parenright" k="20" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="bracketright" k="43" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="backslash" k="127" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="guillemotleft,guilsinglleft" k="39" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="registered" k="86" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="trademark" k="106" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="asterisk" k="98" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="quoteleft,quotedblleft" k="109" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="quoteright,quotedblright" k="109" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="ordfeminine" k="100" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="ordmasculine" k="88" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="space" k="63" />
+<hkern g1="B" g2="J" k="12" />
+<hkern g1="B" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="10" />
+<hkern g1="B" g2="W" k="23" />
+<hkern g1="B" g2="Y,Yacute,Ydieresis" k="29" />
+<hkern g1="B" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="25" />
+<hkern g1="B" g2="AE" k="14" />
+<hkern g1="B" g2="s" k="10" />
+<hkern g1="B" g2="w" k="20" />
+<hkern g1="B" g2="z" k="14" />
+<hkern g1="B" g2="y,yacute,ydieresis" k="23" />
+<hkern g1="B" g2="g" k="18" />
+<hkern g1="B" g2="h,k,thorn" k="16" />
+<hkern g1="B" g2="l" k="16" />
+<hkern g1="C,Ccedilla" g2="bracketright" k="35" />
+<hkern g1="C,Ccedilla" g2="slash" k="41" />
+<hkern g1="D,Eth" g2="J" k="23" />
+<hkern g1="D,Eth" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="18" />
+<hkern g1="D,Eth" g2="W" k="37" />
+<hkern g1="D,Eth" g2="Y,Yacute,Ydieresis" k="45" />
+<hkern g1="D,Eth" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="47" />
+<hkern g1="D,Eth" g2="AE" k="61" />
+<hkern g1="D,Eth" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="37" />
+<hkern g1="D,Eth" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="14" />
+<hkern g1="D,Eth" g2="s" k="10" />
+<hkern g1="D,Eth" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="23" />
+<hkern g1="D,Eth" g2="Z" k="10" />
+<hkern g1="D,Eth" g2="V" k="43" />
+<hkern g1="D,Eth" g2="v" k="10" />
+<hkern g1="D,Eth" g2="y,yacute,ydieresis" k="10" />
+<hkern g1="D,Eth" g2="parenright" k="59" />
+<hkern g1="D,Eth" g2="bracketright" k="59" />
+<hkern g1="D,Eth" g2="backslash" k="47" />
+<hkern g1="D,Eth" g2="g" k="12" />
+<hkern g1="D,Eth" g2="h,k,thorn" k="27" />
+<hkern g1="D,Eth" g2="l" k="27" />
+<hkern g1="D,Eth" g2="slash" k="90" />
+<hkern g1="D,Eth" g2="M" k="23" />
+<hkern g1="D,Eth" g2="X" k="57" />
+<hkern g1="D,Eth" g2="x" k="14" />
+<hkern g1="D,Eth" g2="braceright" k="37" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="w" k="10" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="v" k="12" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="y,yacute,ydieresis" k="12" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="bracketright" k="27" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="g" k="12" />
+<hkern g1="E,AE,Egrave,Eacute,Ecircumflex,Edieresis,OE" g2="slash" k="31" />
+<hkern g1="F" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="94" />
+<hkern g1="F" g2="AE" k="137" />
+<hkern g1="F" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="123" />
+<hkern g1="F" g2="hyphen,uni00AD,endash,emdash" k="33" />
+<hkern g1="F" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="51" />
+<hkern g1="F" g2="d,q" k="70" />
+<hkern g1="F" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="70" />
+<hkern g1="F" g2="s" k="51" />
+<hkern g1="F" g2="z" k="14" />
+<hkern g1="F" g2="g" k="61" />
+<hkern g1="F" g2="h,k,thorn" k="35" />
+<hkern g1="F" g2="l" k="35" />
+<hkern g1="G" g2="W" k="18" />
+<hkern g1="G" g2="Y,Yacute,Ydieresis" k="18" />
+<hkern g1="G" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="18" />
+<hkern g1="G" g2="AE" k="12" />
+<hkern g1="G" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="16" />
+<hkern g1="G" g2="w" k="12" />
+<hkern g1="G" g2="V" k="20" />
+<hkern g1="G" g2="v" k="14" />
+<hkern g1="G" g2="y,yacute,ydieresis" k="14" />
+<hkern g1="G" g2="parenright" k="41" />
+<hkern g1="G" g2="bracketright" k="45" />
+<hkern g1="G" g2="backslash" k="27" />
+<hkern g1="G" g2="h,k,thorn" k="12" />
+<hkern g1="G" g2="l" k="12" />
+<hkern g1="G" g2="slash" k="66" />
+<hkern g1="G" g2="braceright" k="25" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="hyphen,uni00AD,endash,emdash" k="27" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="10" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="d,q" k="43" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="j" k="20" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="47" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="s" k="10" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="t" k="37" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="45" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="w" k="70" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="z" k="10" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="p" k="45" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="v" k="70" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="y,yacute,ydieresis" k="72" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="bracketright" k="20" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="guillemotleft,guilsinglleft" k="29" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="ordfeminine" k="23" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="ordmasculine" k="12" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="g" k="31" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="slash" k="20" />
+<hkern g1="H,I,Igrave,Iacute,Icircumflex,Idieresis" g2="b" k="10" />
+<hkern g1="J" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="33" />
+<hkern g1="J" g2="AE" k="35" />
+<hkern g1="J" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="35" />
+<hkern g1="J" g2="hyphen,uni00AD,endash,emdash" k="20" />
+<hkern g1="J" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="23" />
+<hkern g1="J" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="63" />
+<hkern g1="J" g2="d,q" k="53" />
+<hkern g1="J" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="49" />
+<hkern g1="J" g2="i,igrave,iacute,icircumflex,idieresis" k="35" />
+<hkern g1="J" g2="j" k="29" />
+<hkern g1="J" g2="m,n,r,ntilde" k="53" />
+<hkern g1="J" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="55" />
+<hkern g1="J" g2="s" k="61" />
+<hkern g1="J" g2="t" k="41" />
+<hkern g1="J" g2="u,ugrave,uacute,ucircumflex,udieresis" k="49" />
+<hkern g1="J" g2="w" k="68" />
+<hkern g1="J" g2="z" k="61" />
+<hkern g1="J" g2="p" k="49" />
+<hkern g1="J" g2="v" k="68" />
+<hkern g1="J" g2="y,yacute,ydieresis" k="72" />
+<hkern g1="J" g2="bracketright" k="23" />
+<hkern g1="J" g2="guillemotleft,guilsinglleft" k="41" />
+<hkern g1="J" g2="ordfeminine" k="18" />
+<hkern g1="J" g2="g" k="55" />
+<hkern g1="J" g2="h,k,thorn" k="47" />
+<hkern g1="J" g2="l" k="47" />
+<hkern g1="J" g2="slash" k="53" />
+<hkern g1="J" g2="x" k="45" />
+<hkern g1="J" g2="b" k="23" />
+<hkern g1="J" g2="zero" k="29" />
+<hkern g1="J" g2="one" k="20" />
+<hkern g1="J" g2="two" k="20" />
+<hkern g1="J" g2="three" k="23" />
+<hkern g1="J" g2="five" k="23" />
+<hkern g1="J" g2="nine" k="25" />
+<hkern g1="J" g2="colon,semicolon" k="23" />
+<hkern g1="J" g2="at" k="23" />
+<hkern g1="J" g2="copyright" k="23" />
+<hkern g1="K" g2="hyphen,uni00AD,endash,emdash" k="72" />
+<hkern g1="K" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="82" />
+<hkern g1="K" g2="d,q" k="39" />
+<hkern g1="K" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="39" />
+<hkern g1="K" g2="t" k="14" />
+<hkern g1="K" g2="u,ugrave,uacute,ucircumflex,udieresis" k="25" />
+<hkern g1="K" g2="w" k="90" />
+<hkern g1="K" g2="p" k="25" />
+<hkern g1="K" g2="v" k="102" />
+<hkern g1="K" g2="y,yacute,ydieresis" k="90" />
+<hkern g1="K" g2="seven" k="20" />
+<hkern g1="K" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="K" g2="ordfeminine" k="12" />
+<hkern g1="K" g2="space" k="23" />
+<hkern g1="K" g2="g" k="12" />
+<hkern g1="L" g2="J" k="27" />
+<hkern g1="L" g2="T" k="127" />
+<hkern g1="L" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="39" />
+<hkern g1="L" g2="W" k="104" />
+<hkern g1="L" g2="Y,Yacute,Ydieresis" k="117" />
+<hkern g1="L" g2="quotedbl,quotesingle" k="123" />
+<hkern g1="L" g2="j" k="25" />
+<hkern g1="L" g2="t" k="27" />
+<hkern g1="L" g2="u,ugrave,uacute,ucircumflex,udieresis" k="25" />
+<hkern g1="L" g2="w" k="90" />
+<hkern g1="L" g2="V" k="127" />
+<hkern g1="L" g2="p" k="23" />
+<hkern g1="L" g2="v" k="131" />
+<hkern g1="L" g2="y,yacute,ydieresis" k="94" />
+<hkern g1="L" g2="seven" k="49" />
+<hkern g1="L" g2="parenright" k="31" />
+<hkern g1="L" g2="bracketright" k="45" />
+<hkern g1="L" g2="backslash" k="109" />
+<hkern g1="L" g2="registered" k="109" />
+<hkern g1="L" g2="trademark" k="121" />
+<hkern g1="L" g2="asterisk" k="123" />
+<hkern g1="L" g2="quoteleft,quotedblleft" k="125" />
+<hkern g1="L" g2="quoteright,quotedblright" k="125" />
+<hkern g1="L" g2="ordfeminine" k="37" />
+<hkern g1="L" g2="ordmasculine" k="35" />
+<hkern g1="L" g2="space" k="47" />
+<hkern g1="L" g2="periodcentered" k="162" />
+<hkern g1="M" g2="hyphen,uni00AD,endash,emdash" k="25" />
+<hkern g1="M" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="23" />
+<hkern g1="M" g2="d,q" k="39" />
+<hkern g1="M" g2="j" k="29" />
+<hkern g1="M" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="41" />
+<hkern g1="M" g2="t" k="41" />
+<hkern g1="M" g2="u,ugrave,uacute,ucircumflex,udieresis" k="45" />
+<hkern g1="M" g2="w" k="70" />
+<hkern g1="M" g2="z" k="10" />
+<hkern g1="M" g2="y,yacute,ydieresis" k="72" />
+<hkern g1="M" g2="guillemotleft,guilsinglleft" k="27" />
+<hkern g1="M" g2="g" k="27" />
+<hkern g1="N,Ntilde" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="37" />
+<hkern g1="N,Ntilde" g2="AE" k="43" />
+<hkern g1="N,Ntilde" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="39" />
+<hkern g1="N,Ntilde" g2="hyphen,uni00AD,endash,emdash" k="25" />
+<hkern g1="N,Ntilde" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="23" />
+<hkern g1="N,Ntilde" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="63" />
+<hkern g1="N,Ntilde" g2="d,q" k="53" />
+<hkern g1="N,Ntilde" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="51" />
+<hkern g1="N,Ntilde" g2="i,igrave,iacute,icircumflex,idieresis" k="35" />
+<hkern g1="N,Ntilde" g2="j" k="25" />
+<hkern g1="N,Ntilde" g2="m,n,r,ntilde" k="53" />
+<hkern g1="N,Ntilde" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="57" />
+<hkern g1="N,Ntilde" g2="s" k="63" />
+<hkern g1="N,Ntilde" g2="t" k="43" />
+<hkern g1="N,Ntilde" g2="u,ugrave,uacute,ucircumflex,udieresis" k="49" />
+<hkern g1="N,Ntilde" g2="w" k="70" />
+<hkern g1="N,Ntilde" g2="z" k="63" />
+<hkern g1="N,Ntilde" g2="p" k="51" />
+<hkern g1="N,Ntilde" g2="v" k="72" />
+<hkern g1="N,Ntilde" g2="y,yacute,ydieresis" k="72" />
+<hkern g1="N,Ntilde" g2="four" k="20" />
+<hkern g1="N,Ntilde" g2="bracketright" k="23" />
+<hkern g1="N,Ntilde" g2="guillemotleft,guilsinglleft" k="43" />
+<hkern g1="N,Ntilde" g2="ordfeminine" k="18" />
+<hkern g1="N,Ntilde" g2="g" k="55" />
+<hkern g1="N,Ntilde" g2="h,k,thorn" k="47" />
+<hkern g1="N,Ntilde" g2="l" k="47" />
+<hkern g1="N,Ntilde" g2="slash" k="78" />
+<hkern g1="N,Ntilde" g2="x" k="45" />
+<hkern g1="N,Ntilde" g2="b" k="23" />
+<hkern g1="N,Ntilde" g2="zero" k="33" />
+<hkern g1="N,Ntilde" g2="one" k="25" />
+<hkern g1="N,Ntilde" g2="two" k="25" />
+<hkern g1="N,Ntilde" g2="three" k="31" />
+<hkern g1="N,Ntilde" g2="five" k="27" />
+<hkern g1="N,Ntilde" g2="nine" k="29" />
+<hkern g1="N,Ntilde" g2="colon,semicolon" k="27" />
+<hkern g1="N,Ntilde" g2="at" k="27" />
+<hkern g1="N,Ntilde" g2="copyright" k="25" />
+<hkern g1="N,Ntilde" g2="guillemotright,guilsinglright" k="23" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="J" k="23" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="16" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="W" k="33" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Y,Yacute,Ydieresis" k="45" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="45" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="AE" k="61" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="39" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="14" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="s" k="10" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="20" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Z" k="10" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="V" k="39" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="v" k="10" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="y,yacute,ydieresis" k="10" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="parenright" k="59" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="bracketright" k="59" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="backslash" k="47" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="g" k="10" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="h,k,thorn" k="25" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="l" k="25" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="slash" k="88" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="M" k="23" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="X" k="57" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="x" k="14" />
+<hkern g1="O,Q,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="braceright" k="35" />
+<hkern g1="P" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="88" />
+<hkern g1="P" g2="AE" k="145" />
+<hkern g1="P" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="143" />
+<hkern g1="P" g2="hyphen,uni00AD,endash,emdash" k="43" />
+<hkern g1="P" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="14" />
+<hkern g1="P" g2="d,q" k="31" />
+<hkern g1="P" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="31" />
+<hkern g1="P" g2="s" k="14" />
+<hkern g1="P" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="10" />
+<hkern g1="P" g2="g" k="23" />
+<hkern g1="P" g2="h,k,thorn" k="45" />
+<hkern g1="P" g2="l" k="45" />
+<hkern g1="R" g2="J" k="16" />
+<hkern g1="R" g2="T" k="10" />
+<hkern g1="R" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="25" />
+<hkern g1="R" g2="W" k="39" />
+<hkern g1="R" g2="Y,Yacute,Ydieresis" k="41" />
+<hkern g1="R" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="14" />
+<hkern g1="R" g2="d,q" k="23" />
+<hkern g1="R" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="25" />
+<hkern g1="R" g2="w" k="25" />
+<hkern g1="R" g2="V" k="45" />
+<hkern g1="R" g2="v" k="27" />
+<hkern g1="R" g2="y,yacute,ydieresis" k="27" />
+<hkern g1="R" g2="parenright" k="27" />
+<hkern g1="R" g2="bracketright" k="47" />
+<hkern g1="R" g2="backslash" k="51" />
+<hkern g1="R" g2="ordfeminine" k="25" />
+<hkern g1="R" g2="ordmasculine" k="14" />
+<hkern g1="R" g2="g" k="12" />
+<hkern g1="S" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="14" />
+<hkern g1="S" g2="j" k="10" />
+<hkern g1="S" g2="s" k="12" />
+<hkern g1="S" g2="t" k="10" />
+<hkern g1="S" g2="w" k="29" />
+<hkern g1="S" g2="z" k="14" />
+<hkern g1="S" g2="p" k="12" />
+<hkern g1="S" g2="v" k="33" />
+<hkern g1="S" g2="y,yacute,ydieresis" k="35" />
+<hkern g1="S" g2="parenright" k="29" />
+<hkern g1="S" g2="bracketright" k="39" />
+<hkern g1="S" g2="g" k="20" />
+<hkern g1="S" g2="h,k,thorn" k="12" />
+<hkern g1="S" g2="l" k="12" />
+<hkern g1="S" g2="slash" k="59" />
+<hkern g1="S" g2="braceright" k="20" />
+<hkern g1="T" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="102" />
+<hkern g1="T" g2="AE" k="150" />
+<hkern g1="T" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="70" />
+<hkern g1="T" g2="hyphen,uni00AD,endash,emdash" k="74" />
+<hkern g1="T" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="76" />
+<hkern g1="T" g2="d,q" k="102" />
+<hkern g1="T" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="16" />
+<hkern g1="T" g2="i,igrave,iacute,icircumflex,idieresis" k="12" />
+<hkern g1="T" g2="m,n,r,ntilde" k="33" />
+<hkern g1="T" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="109" />
+<hkern g1="T" g2="s" k="82" />
+<hkern g1="T" g2="t" k="12" />
+<hkern g1="T" g2="u,ugrave,uacute,ucircumflex,udieresis" k="29" />
+<hkern g1="T" g2="w" k="43" />
+<hkern g1="T" g2="z" k="45" />
+<hkern g1="T" g2="p" k="29" />
+<hkern g1="T" g2="v" k="39" />
+<hkern g1="T" g2="y,yacute,ydieresis" k="47" />
+<hkern g1="T" g2="four" k="45" />
+<hkern g1="T" g2="guillemotleft,guilsinglleft" k="37" />
+<hkern g1="T" g2="space" k="47" />
+<hkern g1="T" g2="g" k="92" />
+<hkern g1="T" g2="h,k,thorn" k="31" />
+<hkern g1="T" g2="l" k="31" />
+<hkern g1="T" g2="slash" k="106" />
+<hkern g1="T" g2="x" k="35" />
+<hkern g1="T" g2="zero" k="20" />
+<hkern g1="T" g2="colon,semicolon" k="23" />
+<hkern g1="T" g2="at" k="20" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="63" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="AE" k="84" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="55" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="hyphen,uni00AD,endash,emdash" k="20" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="16" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="68" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="d,q" k="66" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="43" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="i,igrave,iacute,icircumflex,idieresis" k="27" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="j" k="14" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="m,n,r,ntilde" k="57" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="66" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="s" k="70" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="t" k="29" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="47" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="w" k="53" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="z" k="61" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="p" k="49" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="v" k="53" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="y,yacute,ydieresis" k="59" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="four" k="33" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="bracketright" k="23" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="guillemotleft,guilsinglleft" k="35" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="g" k="66" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="h,k,thorn" k="45" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="l" k="45" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="slash" k="113" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="x" k="51" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="b" k="12" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="zero" k="23" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="two" k="20" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="three" k="27" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="five" k="29" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="nine" k="23" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="colon,semicolon" k="27" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="at" k="23" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="copyright" k="20" />
+<hkern g1="V" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="127" />
+<hkern g1="V" g2="AE" k="168" />
+<hkern g1="V" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="135" />
+<hkern g1="V" g2="hyphen,uni00AD,endash,emdash" k="80" />
+<hkern g1="V" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="39" />
+<hkern g1="V" g2="S" k="23" />
+<hkern g1="V" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="166" />
+<hkern g1="V" g2="d,q" k="150" />
+<hkern g1="V" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="51" />
+<hkern g1="V" g2="i,igrave,iacute,icircumflex,idieresis" k="20" />
+<hkern g1="V" g2="m,n,r,ntilde" k="111" />
+<hkern g1="V" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="150" />
+<hkern g1="V" g2="s" k="150" />
+<hkern g1="V" g2="t" k="51" />
+<hkern g1="V" g2="u,ugrave,uacute,ucircumflex,udieresis" k="76" />
+<hkern g1="V" g2="w" k="82" />
+<hkern g1="V" g2="z" k="127" />
+<hkern g1="V" g2="y,yacute,ydieresis" k="88" />
+<hkern g1="V" g2="guillemotleft,guilsinglleft" k="88" />
+<hkern g1="V" g2="g" k="145" />
+<hkern g1="V" g2="h,k,thorn" k="33" />
+<hkern g1="V" g2="l" k="33" />
+<hkern g1="V" g2="colon,semicolon" k="66" />
+<hkern g1="V" g2="guillemotright,guilsinglright" k="51" />
+<hkern g1="W" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="113" />
+<hkern g1="W" g2="AE" k="150" />
+<hkern g1="W" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="119" />
+<hkern g1="W" g2="hyphen,uni00AD,endash,emdash" k="66" />
+<hkern g1="W" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="33" />
+<hkern g1="W" g2="S" k="20" />
+<hkern g1="W" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="145" />
+<hkern g1="W" g2="d,q" k="119" />
+<hkern g1="W" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="45" />
+<hkern g1="W" g2="i,igrave,iacute,icircumflex,idieresis" k="20" />
+<hkern g1="W" g2="m,n,r,ntilde" k="88" />
+<hkern g1="W" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="121" />
+<hkern g1="W" g2="s" k="131" />
+<hkern g1="W" g2="t" k="39" />
+<hkern g1="W" g2="u,ugrave,uacute,ucircumflex,udieresis" k="59" />
+<hkern g1="W" g2="w" k="78" />
+<hkern g1="W" g2="z" k="102" />
+<hkern g1="W" g2="p" k="68" />
+<hkern g1="W" g2="v" k="80" />
+<hkern g1="W" g2="y,yacute,ydieresis" k="80" />
+<hkern g1="W" g2="four" k="84" />
+<hkern g1="W" g2="guillemotleft,guilsinglleft" k="76" />
+<hkern g1="W" g2="asterisk" k="-33" />
+<hkern g1="W" g2="space" k="61" />
+<hkern g1="W" g2="g" k="117" />
+<hkern g1="W" g2="h,k,thorn" k="31" />
+<hkern g1="W" g2="l" k="31" />
+<hkern g1="W" g2="slash" k="152" />
+<hkern g1="W" g2="x" k="78" />
+<hkern g1="W" g2="zero" k="63" />
+<hkern g1="W" g2="one" k="39" />
+<hkern g1="W" g2="two" k="47" />
+<hkern g1="W" g2="three" k="53" />
+<hkern g1="W" g2="five" k="57" />
+<hkern g1="W" g2="nine" k="59" />
+<hkern g1="W" g2="colon,semicolon" k="55" />
+<hkern g1="W" g2="at" k="53" />
+<hkern g1="W" g2="copyright" k="43" />
+<hkern g1="W" g2="guillemotright,guilsinglright" k="43" />
+<hkern g1="X" g2="hyphen,uni00AD,endash,emdash" k="63" />
+<hkern g1="X" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="57" />
+<hkern g1="X" g2="d,q" k="33" />
+<hkern g1="X" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="35" />
+<hkern g1="X" g2="t" k="14" />
+<hkern g1="X" g2="u,ugrave,uacute,ucircumflex,udieresis" k="31" />
+<hkern g1="X" g2="w" k="88" />
+<hkern g1="X" g2="y,yacute,ydieresis" k="84" />
+<hkern g1="X" g2="guillemotleft,guilsinglleft" k="43" />
+<hkern g1="X" g2="g" k="12" />
+<hkern g1="Y,Yacute,Ydieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="137" />
+<hkern g1="Y,Yacute,Ydieresis" g2="AE" k="168" />
+<hkern g1="Y,Yacute,Ydieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="94" />
+<hkern g1="Y,Yacute,Ydieresis" g2="hyphen,uni00AD,endash,emdash" k="113" />
+<hkern g1="Y,Yacute,Ydieresis" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="47" />
+<hkern g1="Y,Yacute,Ydieresis" g2="S" k="14" />
+<hkern g1="Y,Yacute,Ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="176" />
+<hkern g1="Y,Yacute,Ydieresis" g2="d,q" k="188" />
+<hkern g1="Y,Yacute,Ydieresis" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="57" />
+<hkern g1="Y,Yacute,Ydieresis" g2="i,igrave,iacute,icircumflex,idieresis" k="25" />
+<hkern g1="Y,Yacute,Ydieresis" g2="j" k="10" />
+<hkern g1="Y,Yacute,Ydieresis" g2="m,n,r,ntilde" k="139" />
+<hkern g1="Y,Yacute,Ydieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="195" />
+<hkern g1="Y,Yacute,Ydieresis" g2="s" k="162" />
+<hkern g1="Y,Yacute,Ydieresis" g2="t" k="70" />
+<hkern g1="Y,Yacute,Ydieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="121" />
+<hkern g1="Y,Yacute,Ydieresis" g2="w" k="121" />
+<hkern g1="Y,Yacute,Ydieresis" g2="z" k="154" />
+<hkern g1="Y,Yacute,Ydieresis" g2="p" k="129" />
+<hkern g1="Y,Yacute,Ydieresis" g2="v" k="119" />
+<hkern g1="Y,Yacute,Ydieresis" g2="y,yacute,ydieresis" k="125" />
+<hkern g1="Y,Yacute,Ydieresis" g2="four" k="78" />
+<hkern g1="Y,Yacute,Ydieresis" g2="seven" k="23" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotleft,guilsinglleft" k="113" />
+<hkern g1="Y,Yacute,Ydieresis" g2="asterisk" k="-33" />
+<hkern g1="Y,Yacute,Ydieresis" g2="space" k="63" />
+<hkern g1="Y,Yacute,Ydieresis" g2="g" k="174" />
+<hkern g1="Y,Yacute,Ydieresis" g2="h,k,thorn" k="35" />
+<hkern g1="Y,Yacute,Ydieresis" g2="l" k="35" />
+<hkern g1="Y,Yacute,Ydieresis" g2="slash" k="133" />
+<hkern g1="Y,Yacute,Ydieresis" g2="x" k="129" />
+<hkern g1="Y,Yacute,Ydieresis" g2="zero" k="88" />
+<hkern g1="Y,Yacute,Ydieresis" g2="one" k="59" />
+<hkern g1="Y,Yacute,Ydieresis" g2="two" k="61" />
+<hkern g1="Y,Yacute,Ydieresis" g2="three" k="68" />
+<hkern g1="Y,Yacute,Ydieresis" g2="five" k="63" />
+<hkern g1="Y,Yacute,Ydieresis" g2="nine" k="82" />
+<hkern g1="Y,Yacute,Ydieresis" g2="colon,semicolon" k="74" />
+<hkern g1="Y,Yacute,Ydieresis" g2="at" k="68" />
+<hkern g1="Y,Yacute,Ydieresis" g2="copyright" k="57" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotright,guilsinglright" k="61" />
+<hkern g1="Y,Yacute,Ydieresis" g2="six" k="23" />
+<hkern g1="Y,Yacute,Ydieresis" g2="question" k="-10" />
+<hkern g1="Z" g2="j" k="18" />
+<hkern g1="Z" g2="t" k="20" />
+<hkern g1="Z" g2="u,ugrave,uacute,ucircumflex,udieresis" k="23" />
+<hkern g1="Z" g2="w" k="55" />
+<hkern g1="Z" g2="p" k="27" />
+<hkern g1="Z" g2="v" k="61" />
+<hkern g1="Z" g2="y,yacute,ydieresis" k="57" />
+<hkern g1="Z" g2="bracketright" k="25" />
+<hkern g1="Z" g2="ordfeminine" k="16" />
+<hkern g1="Z" g2="g" k="14" />
+<hkern g1="Z" g2="slash" k="20" />
+<hkern g1="Thorn" g2="J" k="29" />
+<hkern g1="Thorn" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="23" />
+<hkern g1="Thorn" g2="W" k="47" />
+<hkern g1="Thorn" g2="Y,Yacute,Ydieresis" k="63" />
+<hkern g1="Thorn" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="61" />
+<hkern g1="Thorn" g2="AE" k="90" />
+<hkern g1="Thorn" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="74" />
+<hkern g1="Thorn" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="10" />
+<hkern g1="Thorn" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="35" />
+<hkern g1="Thorn" g2="Z" k="16" />
+<hkern g1="Thorn" g2="h,k,thorn" k="29" />
+<hkern g1="Thorn" g2="l" k="29" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="J" k="47" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="T" k="94" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="61" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="W" k="150" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="Y,Yacute,Ydieresis" k="160" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="quotedbl,quotesingle" k="41" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="18" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="w" k="29" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="V" k="182" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="v" k="31" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="y,yacute,ydieresis" k="31" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="parenright" k="43" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="bracketright" k="61" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="backslash" k="115" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="guillemotleft,guilsinglleft" k="27" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="registered" k="29" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="trademark" k="53" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="asterisk" k="39" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="quoteleft,quotedblleft" k="49" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="quoteright,quotedblright" k="49" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="ordfeminine" k="16" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="ordmasculine" k="14" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="braceright" k="33" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="question" k="25" />
+<hkern g1="b,p,thorn" g2="J" k="55" />
+<hkern g1="b,p,thorn" g2="T" k="96" />
+<hkern g1="b,p,thorn" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="66" />
+<hkern g1="b,p,thorn" g2="W" k="119" />
+<hkern g1="b,p,thorn" g2="Y,Yacute,Ydieresis" k="186" />
+<hkern g1="b,p,thorn" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="23" />
+<hkern g1="b,p,thorn" g2="quotedbl,quotesingle" k="35" />
+<hkern g1="b,p,thorn" g2="AE" k="16" />
+<hkern g1="b,p,thorn" g2="S" k="12" />
+<hkern g1="b,p,thorn" g2="w" k="20" />
+<hkern g1="b,p,thorn" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="47" />
+<hkern g1="b,p,thorn" g2="Z" k="35" />
+<hkern g1="b,p,thorn" g2="V" k="145" />
+<hkern g1="b,p,thorn" g2="v" k="25" />
+<hkern g1="b,p,thorn" g2="y,yacute,ydieresis" k="20" />
+<hkern g1="b,p,thorn" g2="parenright" k="70" />
+<hkern g1="b,p,thorn" g2="bracketright" k="70" />
+<hkern g1="b,p,thorn" g2="backslash" k="92" />
+<hkern g1="b,p,thorn" g2="trademark" k="41" />
+<hkern g1="b,p,thorn" g2="asterisk" k="27" />
+<hkern g1="b,p,thorn" g2="quoteleft,quotedblleft" k="45" />
+<hkern g1="b,p,thorn" g2="quoteright,quotedblright" k="47" />
+<hkern g1="b,p,thorn" g2="slash" k="72" />
+<hkern g1="b,p,thorn" g2="M" k="43" />
+<hkern g1="b,p,thorn" g2="X" k="35" />
+<hkern g1="b,p,thorn" g2="x" k="33" />
+<hkern g1="b,p,thorn" g2="braceright" k="43" />
+<hkern g1="b,p,thorn" g2="question" k="29" />
+<hkern g1="c,ccedilla" g2="J" k="59" />
+<hkern g1="c,ccedilla" g2="T" k="57" />
+<hkern g1="c,ccedilla" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="51" />
+<hkern g1="c,ccedilla" g2="W" k="96" />
+<hkern g1="c,ccedilla" g2="Y,Yacute,Ydieresis" k="162" />
+<hkern g1="c,ccedilla" g2="V" k="123" />
+<hkern g1="c,ccedilla" g2="parenright" k="53" />
+<hkern g1="c,ccedilla" g2="bracketright" k="63" />
+<hkern g1="c,ccedilla" g2="backslash" k="70" />
+<hkern g1="c,ccedilla" g2="slash" k="45" />
+<hkern g1="c,ccedilla" g2="braceright" k="33" />
+<hkern g1="d" g2="J" k="41" />
+<hkern g1="d" g2="T" k="27" />
+<hkern g1="d" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="41" />
+<hkern g1="d" g2="W" k="27" />
+<hkern g1="d" g2="Y,Yacute,Ydieresis" k="25" />
+<hkern g1="d" g2="quotedbl,quotesingle" k="16" />
+<hkern g1="d" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="18" />
+<hkern g1="d" g2="w" k="18" />
+<hkern g1="d" g2="V" k="27" />
+<hkern g1="d" g2="v" k="20" />
+<hkern g1="d" g2="y,yacute,ydieresis" k="23" />
+<hkern g1="d" g2="bracketright" k="25" />
+<hkern g1="d" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="d" g2="registered" k="16" />
+<hkern g1="d" g2="trademark" k="16" />
+<hkern g1="d" g2="asterisk" k="18" />
+<hkern g1="d" g2="quoteleft,quotedblleft" k="16" />
+<hkern g1="d" g2="quoteright,quotedblright" k="18" />
+<hkern g1="d" g2="ordfeminine" k="16" />
+<hkern g1="d" g2="ordmasculine" k="12" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="J" k="63" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="T" k="104" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="66" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="W" k="150" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="Y,Yacute,Ydieresis" k="178" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quotedbl,quotesingle" k="23" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="S" k="10" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="w" k="23" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="23" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="Z" k="20" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="V" k="172" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="v" k="27" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="y,yacute,ydieresis" k="18" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="parenright" k="61" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="bracketright" k="68" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="backslash" k="92" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="trademark" k="35" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="asterisk" k="20" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quoteleft,quotedblleft" k="29" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quoteright,quotedblright" k="31" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="slash" k="53" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="M" k="18" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="braceright" k="41" />
+<hkern g1="f" g2="J" k="59" />
+<hkern g1="f" g2="T" k="23" />
+<hkern g1="f" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="49" />
+<hkern g1="f" g2="W" k="68" />
+<hkern g1="f" g2="Y,Yacute,Ydieresis" k="82" />
+<hkern g1="f" g2="hyphen,uni00AD,endash,emdash" k="25" />
+<hkern g1="f" g2="d,q" k="8" />
+<hkern g1="f" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="f" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="14" />
+<hkern g1="f" g2="V" k="74" />
+<hkern g1="f" g2="parenright" k="-63" />
+<hkern g1="f" g2="bracketright" k="-37" />
+<hkern g1="f" g2="backslash" k="-37" />
+<hkern g1="f" g2="guillemotleft,guilsinglleft" k="25" />
+<hkern g1="f" g2="slash" k="35" />
+<hkern g1="f" g2="M" k="12" />
+<hkern g1="f" g2="braceright" k="-23" />
+<hkern g1="g" g2="J" k="53" />
+<hkern g1="g" g2="T" k="35" />
+<hkern g1="g" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="35" />
+<hkern g1="g" g2="W" k="72" />
+<hkern g1="g" g2="Y,Yacute,Ydieresis" k="117" />
+<hkern g1="g" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="g" g2="AE" k="18" />
+<hkern g1="g" g2="S" k="10" />
+<hkern g1="g" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="8" />
+<hkern g1="g" g2="d,q" k="8" />
+<hkern g1="g" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="8" />
+<hkern g1="g" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="27" />
+<hkern g1="g" g2="Z" k="12" />
+<hkern g1="g" g2="V" k="80" />
+<hkern g1="g" g2="backslash" k="37" />
+<hkern g1="g" g2="g" k="8" />
+<hkern g1="g" g2="M" k="29" />
+<hkern g1="g" g2="X" k="10" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="J" k="43" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="T" k="33" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="39" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="W" k="25" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="Y,Yacute,Ydieresis" k="27" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="25" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="w" k="25" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="V" k="27" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="v" k="27" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="y,yacute,ydieresis" k="27" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="parenright" k="31" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="bracketright" k="41" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="backslash" k="27" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="quoteleft,quotedblleft" k="16" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="ordfeminine" k="20" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="ordmasculine" k="18" />
+<hkern g1="i,igrave,iacute,icircumflex,idieresis,uniFB01,uniFB03" g2="braceright" k="25" />
+<hkern g1="j" g2="J" k="18" />
+<hkern g1="j" g2="M" k="12" />
+<hkern g1="k" g2="J" k="43" />
+<hkern g1="k" g2="T" k="33" />
+<hkern g1="k" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="45" />
+<hkern g1="k" g2="W" k="70" />
+<hkern g1="k" g2="Y,Yacute,Ydieresis" k="123" />
+<hkern g1="k" g2="hyphen,uni00AD,endash,emdash" k="47" />
+<hkern g1="k" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="25" />
+<hkern g1="k" g2="d,q" k="41" />
+<hkern g1="k" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="41" />
+<hkern g1="k" g2="V" k="88" />
+<hkern g1="k" g2="parenright" k="39" />
+<hkern g1="k" g2="bracketright" k="53" />
+<hkern g1="k" g2="backslash" k="49" />
+<hkern g1="k" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="k" g2="trademark" k="18" />
+<hkern g1="k" g2="slash" k="23" />
+<hkern g1="k" g2="braceright" k="25" />
+<hkern g1="l,uniFB02,uniFB04" g2="J" k="47" />
+<hkern g1="l,uniFB02,uniFB04" g2="T" k="31" />
+<hkern g1="l,uniFB02,uniFB04" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="47" />
+<hkern g1="l,uniFB02,uniFB04" g2="W" k="31" />
+<hkern g1="l,uniFB02,uniFB04" g2="Y,Yacute,Ydieresis" k="31" />
+<hkern g1="l,uniFB02,uniFB04" g2="quotedbl,quotesingle" k="16" />
+<hkern g1="l,uniFB02,uniFB04" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="25" />
+<hkern g1="l,uniFB02,uniFB04" g2="w" k="25" />
+<hkern g1="l,uniFB02,uniFB04" g2="V" k="33" />
+<hkern g1="l,uniFB02,uniFB04" g2="v" k="27" />
+<hkern g1="l,uniFB02,uniFB04" g2="y,yacute,ydieresis" k="27" />
+<hkern g1="l,uniFB02,uniFB04" g2="bracketright" k="25" />
+<hkern g1="l,uniFB02,uniFB04" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="l,uniFB02,uniFB04" g2="registered" k="16" />
+<hkern g1="l,uniFB02,uniFB04" g2="trademark" k="16" />
+<hkern g1="l,uniFB02,uniFB04" g2="asterisk" k="18" />
+<hkern g1="l,uniFB02,uniFB04" g2="quoteleft,quotedblleft" k="16" />
+<hkern g1="l,uniFB02,uniFB04" g2="quoteright,quotedblright" k="18" />
+<hkern g1="l,uniFB02,uniFB04" g2="ordfeminine" k="23" />
+<hkern g1="l,uniFB02,uniFB04" g2="ordmasculine" k="18" />
+<hkern g1="l,uniFB02,uniFB04" g2="periodcentered" k="90" />
+<hkern g1="h,m,n,ntilde" g2="J" k="55" />
+<hkern g1="h,m,n,ntilde" g2="T" k="100" />
+<hkern g1="h,m,n,ntilde" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="70" />
+<hkern g1="h,m,n,ntilde" g2="W" k="154" />
+<hkern g1="h,m,n,ntilde" g2="Y,Yacute,Ydieresis" k="164" />
+<hkern g1="h,m,n,ntilde" g2="quotedbl,quotesingle" k="41" />
+<hkern g1="h,m,n,ntilde" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="25" />
+<hkern g1="h,m,n,ntilde" g2="w" k="35" />
+<hkern g1="h,m,n,ntilde" g2="V" k="190" />
+<hkern g1="h,m,n,ntilde" g2="v" k="39" />
+<hkern g1="h,m,n,ntilde" g2="y,yacute,ydieresis" k="39" />
+<hkern g1="h,m,n,ntilde" g2="parenright" k="43" />
+<hkern g1="h,m,n,ntilde" g2="bracketright" k="61" />
+<hkern g1="h,m,n,ntilde" g2="backslash" k="115" />
+<hkern g1="h,m,n,ntilde" g2="guillemotleft,guilsinglleft" k="29" />
+<hkern g1="h,m,n,ntilde" g2="registered" k="27" />
+<hkern g1="h,m,n,ntilde" g2="trademark" k="53" />
+<hkern g1="h,m,n,ntilde" g2="asterisk" k="39" />
+<hkern g1="h,m,n,ntilde" g2="quoteleft,quotedblleft" k="45" />
+<hkern g1="h,m,n,ntilde" g2="quoteright,quotedblright" k="47" />
+<hkern g1="h,m,n,ntilde" g2="ordfeminine" k="25" />
+<hkern g1="h,m,n,ntilde" g2="ordmasculine" k="25" />
+<hkern g1="h,m,n,ntilde" g2="braceright" k="33" />
+<hkern g1="h,m,n,ntilde" g2="question" k="25" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="J" k="55" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="T" k="109" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="68" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="W" k="121" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="Y,Yacute,Ydieresis" k="193" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quotedbl,quotesingle" k="33" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="AE" k="14" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="S" k="12" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="w" k="23" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="47" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="Z" k="35" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="V" k="150" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="v" k="25" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="y,yacute,ydieresis" k="27" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="parenright" k="72" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="bracketright" k="74" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="backslash" k="98" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="trademark" k="39" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="asterisk" k="29" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quoteleft,quotedblleft" k="39" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="quoteright,quotedblright" k="39" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="slash" k="70" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="M" k="41" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="X" k="33" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="x" k="35" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="braceright" k="45" />
+<hkern g1="o,ograve,oacute,ocircumflex,otilde,odieresis,oslash" g2="question" k="25" />
+<hkern g1="q" g2="J" k="33" />
+<hkern g1="q" g2="T" k="55" />
+<hkern g1="q" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="45" />
+<hkern g1="q" g2="W" k="94" />
+<hkern g1="q" g2="Y,Yacute,Ydieresis" k="141" />
+<hkern g1="q" g2="S" k="10" />
+<hkern g1="q" g2="j" k="-47" />
+<hkern g1="q" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="29" />
+<hkern g1="q" g2="Z" k="18" />
+<hkern g1="q" g2="g" k="-14" />
+<hkern g1="r" g2="J" k="66" />
+<hkern g1="r" g2="T" k="31" />
+<hkern g1="r" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="39" />
+<hkern g1="r" g2="W" k="76" />
+<hkern g1="r" g2="Y,Yacute,Ydieresis" k="111" />
+<hkern g1="r" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="49" />
+<hkern g1="r" g2="AE" k="53" />
+<hkern g1="r" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="27" />
+<hkern g1="r" g2="hyphen,uni00AD,endash,emdash" k="31" />
+<hkern g1="r" g2="S" k="10" />
+<hkern g1="r" g2="d,q" k="18" />
+<hkern g1="r" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="23" />
+<hkern g1="r" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="39" />
+<hkern g1="r" g2="Z" k="10" />
+<hkern g1="r" g2="V" k="84" />
+<hkern g1="r" g2="parenright" k="55" />
+<hkern g1="r" g2="bracketright" k="61" />
+<hkern g1="r" g2="backslash" k="39" />
+<hkern g1="r" g2="guillemotleft,guilsinglleft" k="23" />
+<hkern g1="r" g2="g" k="12" />
+<hkern g1="r" g2="h,k,thorn" k="8" />
+<hkern g1="r" g2="l" k="8" />
+<hkern g1="r" g2="slash" k="74" />
+<hkern g1="r" g2="M" k="43" />
+<hkern g1="r" g2="X" k="23" />
+<hkern g1="r" g2="braceright" k="31" />
+<hkern g1="s" g2="J" k="61" />
+<hkern g1="s" g2="T" k="57" />
+<hkern g1="s" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="66" />
+<hkern g1="s" g2="W" k="127" />
+<hkern g1="s" g2="Y,Yacute,Ydieresis" k="160" />
+<hkern g1="s" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="10" />
+<hkern g1="s" g2="w" k="8" />
+<hkern g1="s" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="14" />
+<hkern g1="s" g2="Z" k="10" />
+<hkern g1="s" g2="V" k="145" />
+<hkern g1="s" g2="v" k="10" />
+<hkern g1="s" g2="y,yacute,ydieresis" k="10" />
+<hkern g1="s" g2="parenright" k="59" />
+<hkern g1="s" g2="bracketright" k="66" />
+<hkern g1="s" g2="backslash" k="74" />
+<hkern g1="s" g2="trademark" k="25" />
+<hkern g1="s" g2="slash" k="51" />
+<hkern g1="s" g2="M" k="10" />
+<hkern g1="s" g2="braceright" k="35" />
+<hkern g1="t" g2="J" k="41" />
+<hkern g1="t" g2="T" k="31" />
+<hkern g1="t" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="41" />
+<hkern g1="t" g2="W" k="72" />
+<hkern g1="t" g2="Y,Yacute,Ydieresis" k="106" />
+<hkern g1="t" g2="V" k="78" />
+<hkern g1="t" g2="parenright" k="33" />
+<hkern g1="t" g2="bracketright" k="49" />
+<hkern g1="t" g2="backslash" k="47" />
+<hkern g1="t" g2="guillemotleft,guilsinglleft" k="20" />
+<hkern g1="t" g2="braceright" k="20" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="J" k="55" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="T" k="92" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="70" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="W" k="133" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="Y,Yacute,Ydieresis" k="160" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="quotedbl,quotesingle" k="27" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="25" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="w" k="25" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="V" k="162" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="v" k="27" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="y,yacute,ydieresis" k="27" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="parenright" k="47" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="bracketright" k="66" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="backslash" k="102" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="registered" k="18" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="trademark" k="45" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="asterisk" k="29" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="quoteleft,quotedblleft" k="27" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="quoteright,quotedblright" k="31" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="ordfeminine" k="23" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="ordmasculine" k="18" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="slash" k="20" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="braceright" k="39" />
+<hkern g1="u,ugrave,uacute,ucircumflex,udieresis" g2="question" k="27" />
+<hkern g1="v" g2="J" k="70" />
+<hkern g1="v" g2="T" k="41" />
+<hkern g1="v" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="55" />
+<hkern g1="v" g2="W" k="80" />
+<hkern g1="v" g2="Y,Yacute,Ydieresis" k="117" />
+<hkern g1="v" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="119" />
+<hkern g1="v" g2="AE" k="147" />
+<hkern g1="v" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="86" />
+<hkern g1="v" g2="hyphen,uni00AD,endash,emdash" k="33" />
+<hkern g1="v" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="10" />
+<hkern g1="v" g2="S" k="14" />
+<hkern g1="v" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="16" />
+<hkern g1="v" g2="d,q" k="25" />
+<hkern g1="v" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="25" />
+<hkern g1="v" g2="s" k="18" />
+<hkern g1="v" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="70" />
+<hkern g1="v" g2="Z" k="18" />
+<hkern g1="v" g2="guillemotleft,guilsinglleft" k="27" />
+<hkern g1="v" g2="g" k="25" />
+<hkern g1="v" g2="h,k,thorn" k="27" />
+<hkern g1="v" g2="l" k="27" />
+<hkern g1="w" g2="J" k="68" />
+<hkern g1="w" g2="T" k="41" />
+<hkern g1="w" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="57" />
+<hkern g1="w" g2="W" k="76" />
+<hkern g1="w" g2="Y,Yacute,Ydieresis" k="119" />
+<hkern g1="w" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="106" />
+<hkern g1="w" g2="AE" k="131" />
+<hkern g1="w" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="68" />
+<hkern g1="w" g2="hyphen,uni00AD,endash,emdash" k="25" />
+<hkern g1="w" g2="S" k="14" />
+<hkern g1="w" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="16" />
+<hkern g1="w" g2="d,q" k="20" />
+<hkern g1="w" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="23" />
+<hkern g1="w" g2="s" k="16" />
+<hkern g1="w" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="70" />
+<hkern g1="w" g2="Z" k="18" />
+<hkern g1="w" g2="V" k="82" />
+<hkern g1="w" g2="parenright" k="63" />
+<hkern g1="w" g2="bracketright" k="66" />
+<hkern g1="w" g2="backslash" k="41" />
+<hkern g1="w" g2="guillemotleft,guilsinglleft" k="23" />
+<hkern g1="w" g2="space" k="43" />
+<hkern g1="w" g2="g" k="23" />
+<hkern g1="w" g2="h,k,thorn" k="25" />
+<hkern g1="w" g2="l" k="25" />
+<hkern g1="w" g2="slash" k="125" />
+<hkern g1="w" g2="M" k="70" />
+<hkern g1="w" g2="X" k="86" />
+<hkern g1="w" g2="braceright" k="33" />
+<hkern g1="w" g2="ampersand" k="20" />
+<hkern g1="x" g2="J" k="45" />
+<hkern g1="x" g2="T" k="35" />
+<hkern g1="x" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="49" />
+<hkern g1="x" g2="W" k="76" />
+<hkern g1="x" g2="Y,Yacute,Ydieresis" k="129" />
+<hkern g1="x" g2="hyphen,uni00AD,endash,emdash" k="41" />
+<hkern g1="x" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="27" />
+<hkern g1="x" g2="d,q" k="35" />
+<hkern g1="x" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="37" />
+<hkern g1="x" g2="guillemotleft,guilsinglleft" k="35" />
+<hkern g1="y,yacute,ydieresis" g2="J" k="66" />
+<hkern g1="y,yacute,ydieresis" g2="T" k="37" />
+<hkern g1="y,yacute,ydieresis" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="55" />
+<hkern g1="y,yacute,ydieresis" g2="W" k="76" />
+<hkern g1="y,yacute,ydieresis" g2="Y,Yacute,Ydieresis" k="117" />
+<hkern g1="y,yacute,ydieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="106" />
+<hkern g1="y,yacute,ydieresis" g2="AE" k="131" />
+<hkern g1="y,yacute,ydieresis" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="68" />
+<hkern g1="y,yacute,ydieresis" g2="hyphen,uni00AD,endash,emdash" k="25" />
+<hkern g1="y,yacute,ydieresis" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="10" />
+<hkern g1="y,yacute,ydieresis" g2="S" k="14" />
+<hkern g1="y,yacute,ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="16" />
+<hkern g1="y,yacute,ydieresis" g2="d,q" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="s" k="14" />
+<hkern g1="y,yacute,ydieresis" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="68" />
+<hkern g1="y,yacute,ydieresis" g2="Z" k="18" />
+<hkern g1="y,yacute,ydieresis" g2="V" k="84" />
+<hkern g1="y,yacute,ydieresis" g2="parenright" k="59" />
+<hkern g1="y,yacute,ydieresis" g2="bracketright" k="61" />
+<hkern g1="y,yacute,ydieresis" g2="backslash" k="41" />
+<hkern g1="y,yacute,ydieresis" g2="guillemotleft,guilsinglleft" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="space" k="45" />
+<hkern g1="y,yacute,ydieresis" g2="g" k="23" />
+<hkern g1="y,yacute,ydieresis" g2="h,k,thorn" k="23" />
+<hkern g1="y,yacute,ydieresis" g2="l" k="23" />
+<hkern g1="y,yacute,ydieresis" g2="slash" k="113" />
+<hkern g1="y,yacute,ydieresis" g2="M" k="70" />
+<hkern g1="y,yacute,ydieresis" g2="X" k="86" />
+<hkern g1="y,yacute,ydieresis" g2="braceright" k="31" />
+<hkern g1="y,yacute,ydieresis" g2="ampersand" k="20" />
+<hkern g1="z" g2="J" k="63" />
+<hkern g1="z" g2="T" k="47" />
+<hkern g1="z" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="61" />
+<hkern g1="z" g2="W" k="113" />
+<hkern g1="z" g2="Y,Yacute,Ydieresis" k="156" />
+<hkern g1="z" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="10" />
+<hkern g1="z" g2="V" k="137" />
+<hkern g1="z" g2="y,yacute,ydieresis" k="8" />
+<hkern g1="z" g2="parenright" k="49" />
+<hkern g1="z" g2="bracketright" k="61" />
+<hkern g1="z" g2="backslash" k="66" />
+<hkern g1="z" g2="guillemotleft,guilsinglleft" k="25" />
+<hkern g1="z" g2="trademark" k="20" />
+<hkern g1="z" g2="slash" k="33" />
+<hkern g1="z" g2="braceright" k="31" />
+<hkern g1="eth" g2="J" k="41" />
+<hkern g1="eth" g2="T" k="39" />
+<hkern g1="eth" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="51" />
+<hkern g1="eth" g2="W" k="78" />
+<hkern g1="eth" g2="Y,Yacute,Ydieresis" k="88" />
+<hkern g1="eth" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="29" />
+<hkern g1="eth" g2="AE" k="23" />
+<hkern g1="eth" g2="S" k="12" />
+<hkern g1="eth" g2="w" k="8" />
+<hkern g1="eth" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="39" />
+<hkern g1="eth" g2="Z" k="27" />
+<hkern g1="eth" g2="y,yacute,ydieresis" k="8" />
+<hkern g1="germandbls" g2="J" k="51" />
+<hkern g1="germandbls" g2="T" k="39" />
+<hkern g1="germandbls" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="43" />
+<hkern g1="germandbls" g2="W" k="31" />
+<hkern g1="germandbls" g2="Y,Yacute,Ydieresis" k="31" />
+<hkern g1="germandbls" g2="quotedbl,quotesingle" k="16" />
+<hkern g1="germandbls" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="25" />
+<hkern g1="germandbls" g2="j" k="23" />
+<hkern g1="germandbls" g2="t" k="20" />
+<hkern g1="germandbls" g2="u,ugrave,uacute,ucircumflex,udieresis" k="23" />
+<hkern g1="germandbls" g2="w" k="55" />
+<hkern g1="germandbls" g2="z" k="8" />
+<hkern g1="germandbls" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="18" />
+<hkern g1="germandbls" g2="Z" k="18" />
+<hkern g1="germandbls" g2="y,yacute,ydieresis" k="57" />
+<hkern g1="germandbls" g2="quoteleft,quotedblleft" k="16" />
+<hkern g1="germandbls" g2="quoteright,quotedblright" k="16" />
+<hkern g1="germandbls" g2="g" k="8" />
+<hkern g1="colon,semicolon" g2="J" k="23" />
+<hkern g1="colon,semicolon" g2="T" k="23" />
+<hkern g1="colon,semicolon" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="29" />
+<hkern g1="colon,semicolon" g2="W" k="55" />
+<hkern g1="colon,semicolon" g2="Y,Yacute,Ydieresis" k="74" />
+<hkern g1="colon,semicolon" g2="V" k="66" />
+<hkern g1="exclamdown" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="25" />
+<hkern g1="exclamdown" g2="W" k="59" />
+<hkern g1="exclamdown" g2="Y,Yacute,Ydieresis" k="76" />
+<hkern g1="questiondown" g2="T" k="49" />
+<hkern g1="questiondown" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="66" />
+<hkern g1="questiondown" g2="W" k="100" />
+<hkern g1="questiondown" g2="Y,Yacute,Ydieresis" k="121" />
+<hkern g1="questiondown" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="55" />
+<hkern g1="questiondown" g2="AE" k="55" />
+<hkern g1="questiondown" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="33" />
+<hkern g1="questiondown" g2="S" k="31" />
+<hkern g1="questiondown" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="41" />
+<hkern g1="questiondown" g2="d,q" k="39" />
+<hkern g1="questiondown" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="35" />
+<hkern g1="questiondown" g2="i,igrave,iacute,icircumflex,idieresis" k="37" />
+<hkern g1="questiondown" g2="m,n,r,ntilde" k="37" />
+<hkern g1="questiondown" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="39" />
+<hkern g1="questiondown" g2="s" k="43" />
+<hkern g1="questiondown" g2="t" k="27" />
+<hkern g1="questiondown" g2="u,ugrave,uacute,ucircumflex,udieresis" k="29" />
+<hkern g1="questiondown" g2="w" k="33" />
+<hkern g1="questiondown" g2="z" k="37" />
+<hkern g1="questiondown" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="51" />
+<hkern g1="questiondown" g2="Z" k="37" />
+<hkern g1="questiondown" g2="h,k,thorn" k="59" />
+<hkern g1="questiondown" g2="l" k="59" />
+<hkern g1="slash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="119" />
+<hkern g1="slash" g2="AE" k="158" />
+<hkern g1="slash" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="47" />
+<hkern g1="slash" g2="S" k="31" />
+<hkern g1="slash" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="84" />
+<hkern g1="slash" g2="d,q" k="92" />
+<hkern g1="slash" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="29" />
+<hkern g1="slash" g2="i,igrave,iacute,icircumflex,idieresis" k="20" />
+<hkern g1="slash" g2="m,n,r,ntilde" k="57" />
+<hkern g1="slash" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="98" />
+<hkern g1="slash" g2="s" k="88" />
+<hkern g1="slash" g2="t" k="35" />
+<hkern g1="slash" g2="u,ugrave,uacute,ucircumflex,udieresis" k="41" />
+<hkern g1="slash" g2="w" k="43" />
+<hkern g1="slash" g2="z" k="61" />
+<hkern g1="slash" g2="y,yacute,ydieresis" k="45" />
+<hkern g1="slash" g2="g" k="94" />
+<hkern g1="backslash" g2="T" k="106" />
+<hkern g1="backslash" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="111" />
+<hkern g1="backslash" g2="W" k="152" />
+<hkern g1="backslash" g2="Y,Yacute,Ydieresis" k="133" />
+<hkern g1="backslash" g2="quotedbl,quotesingle" k="152" />
+<hkern g1="backslash" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="88" />
+<hkern g1="backslash" g2="S" k="39" />
+<hkern g1="backslash" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="45" />
+<hkern g1="backslash" g2="d,q" k="66" />
+<hkern g1="backslash" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="31" />
+<hkern g1="backslash" g2="i,igrave,iacute,icircumflex,idieresis" k="27" />
+<hkern g1="backslash" g2="m,n,r,ntilde" k="31" />
+<hkern g1="backslash" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="70" />
+<hkern g1="backslash" g2="s" k="37" />
+<hkern g1="backslash" g2="t" k="84" />
+<hkern g1="backslash" g2="u,ugrave,uacute,ucircumflex,udieresis" k="88" />
+<hkern g1="backslash" g2="w" k="125" />
+<hkern g1="backslash" g2="z" k="33" />
+<hkern g1="backslash" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="25" />
+<hkern g1="backslash" g2="Z" k="27" />
+<hkern g1="backslash" g2="quoteright,quotedblright" k="154" />
+<hkern g1="at" g2="J" k="27" />
+<hkern g1="at" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="25" />
+<hkern g1="at" g2="W" k="47" />
+<hkern g1="at" g2="Y,Yacute,Ydieresis" k="59" />
+<hkern g1="at" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="at" g2="AE" k="35" />
+<hkern g1="at" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="20" />
+<hkern g1="ampersand" g2="J" k="20" />
+<hkern g1="ampersand" g2="T" k="27" />
+<hkern g1="ampersand" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="25" />
+<hkern g1="ampersand" g2="W" k="51" />
+<hkern g1="ampersand" g2="Y,Yacute,Ydieresis" k="74" />
+<hkern g1="ampersand" g2="quoteright,quotedblright" k="31" />
+<hkern g1="guillemotleft,guilsinglleft" g2="W" k="43" />
+<hkern g1="guillemotleft,guilsinglleft" g2="Y,Yacute,Ydieresis" k="59" />
+<hkern g1="guillemotleft,guilsinglleft" g2="V" k="51" />
+<hkern g1="guillemotright,guilsinglright" g2="J" k="41" />
+<hkern g1="guillemotright,guilsinglright" g2="T" k="37" />
+<hkern g1="guillemotright,guilsinglright" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="35" />
+<hkern g1="guillemotright,guilsinglright" g2="W" k="76" />
+<hkern g1="guillemotright,guilsinglright" g2="Y,Yacute,Ydieresis" k="113" />
+<hkern g1="guillemotright,guilsinglright" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="43" />
+<hkern g1="guillemotright,guilsinglright" g2="AE" k="51" />
+<hkern g1="guillemotright,guilsinglright" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="23" />
+<hkern g1="guillemotright,guilsinglright" g2="i,igrave,iacute,icircumflex,idieresis" k="27" />
+<hkern g1="guillemotright,guilsinglright" g2="m,n,r,ntilde" k="27" />
+<hkern g1="guillemotright,guilsinglright" g2="w" k="23" />
+<hkern g1="guillemotright,guilsinglright" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="29" />
+<hkern g1="guillemotright,guilsinglright" g2="V" k="88" />
+<hkern g1="guillemotright,guilsinglright" g2="p" k="20" />
+<hkern g1="guillemotright,guilsinglright" g2="v" k="25" />
+<hkern g1="guillemotright,guilsinglright" g2="y,yacute,ydieresis" k="25" />
+<hkern g1="guillemotright,guilsinglright" g2="quoteright,quotedblright" k="25" />
+<hkern g1="guillemotright,guilsinglright" g2="h,k,thorn" k="33" />
+<hkern g1="guillemotright,guilsinglright" g2="l" k="33" />
+<hkern g1="guillemotright,guilsinglright" g2="M" k="27" />
+<hkern g1="guillemotright,guilsinglright" g2="X" k="43" />
+<hkern g1="guillemotright,guilsinglright" g2="x" k="35" />
+<hkern g1="asterisk" g2="W" k="-33" />
+<hkern g1="asterisk" g2="Y,Yacute,Ydieresis" k="-39" />
+<hkern g1="asterisk" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="96" />
+<hkern g1="asterisk" g2="AE" k="156" />
+<hkern g1="asterisk" g2="d,q" k="33" />
+<hkern g1="asterisk" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="29" />
+<hkern g1="asterisk" g2="g" k="20" />
+<hkern g1="asterisk" g2="h,k,thorn" k="18" />
+<hkern g1="asterisk" g2="l" k="18" />
+<hkern g1="quotedbl,quotesingle" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="102" />
+<hkern g1="quotedbl,quotesingle" g2="AE" k="158" />
+<hkern g1="quotedbl,quotesingle" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="201" />
+<hkern g1="quotedbl,quotesingle" g2="hyphen,uni00AD,endash,emdash" k="45" />
+<hkern g1="quotedbl,quotesingle" g2="d,q" k="39" />
+<hkern g1="quotedbl,quotesingle" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="33" />
+<hkern g1="quotedbl,quotesingle" g2="four" k="61" />
+<hkern g1="quotedbl,quotesingle" g2="space" k="25" />
+<hkern g1="quotedbl,quotesingle" g2="g" k="23" />
+<hkern g1="quotedbl,quotesingle" g2="h,k,thorn" k="16" />
+<hkern g1="quotedbl,quotesingle" g2="l" k="16" />
+<hkern g1="quotedbl,quotesingle" g2="slash" k="152" />
+<hkern g1="quoteleft,quotedblleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="109" />
+<hkern g1="quoteleft,quotedblleft" g2="AE" k="168" />
+<hkern g1="quoteleft,quotedblleft" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="211" />
+<hkern g1="quoteleft,quotedblleft" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="23" />
+<hkern g1="quoteleft,quotedblleft" g2="d,q" k="59" />
+<hkern g1="quoteleft,quotedblleft" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="47" />
+<hkern g1="quoteleft,quotedblleft" g2="s" k="29" />
+<hkern g1="quoteleft,quotedblleft" g2="g" k="39" />
+<hkern g1="quoteright,quotedblright" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="109" />
+<hkern g1="quoteright,quotedblright" g2="AE" k="166" />
+<hkern g1="quoteright,quotedblright" g2="comma,period,quotesinglbase,quotedblbase,ellipsis" k="209" />
+<hkern g1="quoteright,quotedblright" g2="hyphen,uni00AD,endash,emdash" k="98" />
+<hkern g1="quoteright,quotedblright" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="39" />
+<hkern g1="quoteright,quotedblright" g2="d,q" k="80" />
+<hkern g1="quoteright,quotedblright" g2="c,e,o,ccedilla,egrave,eacute,ecircumflex,edieresis,eth,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="66" />
+<hkern g1="quoteright,quotedblright" g2="s" k="45" />
+<hkern g1="quoteright,quotedblright" g2="guillemotleft,guilsinglleft" k="51" />
+<hkern g1="quoteright,quotedblright" g2="space" k="37" />
+<hkern g1="quoteright,quotedblright" g2="g" k="57" />
+<hkern g1="quoteright,quotedblright" g2="slash" k="164" />
+<hkern g1="quoteright,quotedblright" g2="colon,semicolon" k="16" />
+<hkern g1="quoteright,quotedblright" g2="at" k="47" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="J" k="35" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="T" k="70" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="55" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="W" k="119" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="Y,Yacute,Ydieresis" k="96" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quotedbl,quotesingle" k="201" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="39" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="j" k="23" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="t" k="23" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="u,ugrave,uacute,ucircumflex,udieresis" k="23" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="w" k="68" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="V" k="135" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="p" k="20" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="v" k="86" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="y,yacute,ydieresis" k="66" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="seven" k="98" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quoteleft,quotedblleft" k="211" />
+<hkern g1="comma,period,quotesinglbase,quotedblbase" g2="quoteright,quotedblright" k="209" />
+<hkern g1="periodcentered" g2="l" k="90" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="J" k="20" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="T" k="74" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="W" k="66" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="Y,Yacute,Ydieresis" k="113" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="43" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="quotedbl,quotesingle" k="45" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="AE" k="39" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="f,germandbls,uniFB01,uniFB02,uniFB03,uniFB04" k="16" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="w" k="23" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="B,D,E,F,H,I,K,L,N,P,R,Egrave,Eacute,Ecircumflex,Edieresis,Igrave,Iacute,Icircumflex,Idieresis,Eth,Ntilde,Thorn" k="27" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="Z" k="20" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="V" k="80" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="v" k="33" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="y,yacute,ydieresis" k="27" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="quoteright,quotedblright" k="70" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="M" k="25" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="X" k="63" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="x" k="41" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="one" k="20" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="three" k="25" />
+<hkern g1="space" g2="T" k="47" />
+<hkern g1="space" g2="W" k="61" />
+<hkern g1="space" g2="Y,Yacute,Ydieresis" k="63" />
+<hkern g1="space" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="63" />
+<hkern g1="space" g2="quotedbl,quotesingle" k="25" />
+<hkern g1="space" g2="AE" k="70" />
+<hkern g1="space" g2="w" k="43" />
+<hkern g1="space" g2="y,yacute,ydieresis" k="43" />
+<hkern g1="space" g2="quoteright,quotedblright" k="29" />
+</font>
+</defs></svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="source_sans_proregular" horiz-adv-x="1017" >
+<font-face units-per-em="2048" ascent="1536" descent="-512" />
+<missing-glyph horiz-adv-x="413" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="
" horiz-adv-x="2048" />
+<glyph unicode=" " horiz-adv-x="413" />
+<glyph unicode="	" horiz-adv-x="413" />
+<glyph unicode=" " horiz-adv-x="413" />
+<glyph unicode="!" horiz-adv-x="591" d="M174 102q0 58 35.5 94.5t87.5 36.5q51 0 86 -37t35 -94q0 -55 -35.5 -91t-85.5 -36q-52 0 -87.5 36t-35.5 91zM211 1372h170l-4 -192l-23 -774h-116l-23 774z" />
+<glyph unicode=""" horiz-adv-x="872" d="M164 1413h180l-6 -188l-33 -342h-102l-33 342zM526 1413h179l-5 -188l-32 -342h-105l-33 342z" />
+<glyph unicode="#" d="M72 418v117h178l37 303h-174v118h188l47 375h109l-47 -375h272l49 375h109l-49 -375h165v-118h-178l-37 -303h174v-117h-188l-51 -418h-109l49 418h-270l-51 -418h-111l52 418h-164zM360 535h271l37 303h-271z" />
+<glyph unicode="$" d="M106 135l78 117q159 -137 318 -137q111 0 169 56.5t58 154.5q0 67 -31.5 119.5t-82 87t-111 66t-121.5 65t-111.5 74t-82 103.5t-31.5 144q0 135 81 227.5t216 114.5v205h123v-203q91 -10 159 -49.5t131 -105.5l-90 -101q-63 61 -117.5 89t-132.5 28q-93 0 -148.5 -53.5 t-55.5 -143.5q0 -60 31.5 -106t82 -77t111.5 -60t121.5 -63.5t111 -77.5t82 -112.5t31.5 -158.5q0 -146 -85 -241t-232 -115v-207h-123v202q-95 9 -188.5 52.5t-160.5 105.5z" />
+<glyph unicode="%" horiz-adv-x="1687" d="M72 946q0 200 82.5 311t222.5 111q139 0 222 -111.5t83 -310.5q0 -200 -83 -313t-222 -113q-140 0 -222.5 113t-82.5 313zM199 946q0 -156 48 -238.5t130 -82.5q80 0 128 82.5t48 238.5t-47.5 237t-128.5 81q-82 0 -130 -80.5t-48 -237.5zM416 -25l741 1393h113 l-742 -1393h-112zM1008 401q0 199 82.5 310.5t222.5 111.5q139 0 222 -112t83 -310q0 -201 -83 -313.5t-222 -112.5q-140 0 -222.5 112.5t-82.5 313.5zM1135 401q0 -155 48.5 -238t129.5 -83q80 0 128 82.5t48 238.5q0 155 -47.5 236.5t-128.5 81.5t-129.5 -81.5 t-48.5 -236.5z" />
+<glyph unicode="&" horiz-adv-x="1247" d="M66 348q0 65 21 122t61 105t82 84t100 76q-88 178 -88 316q0 136 86.5 226.5t224.5 90.5q123 0 193.5 -73t70.5 -193q0 -43 -11 -82t-35.5 -76t-47.5 -65t-65 -63t-68.5 -55t-75.5 -56q129 -201 340 -377q129 174 188 397h158q-85 -281 -235 -481q147 -101 252 -129 l-46 -140q-150 43 -309 154q-171 -154 -387 -154q-182 0 -295.5 104.5t-113.5 268.5zM229 358q0 -110 76 -178.5t189 -68.5q132 0 256 108q-214 188 -353 399q-81 -65 -124.5 -126.5t-43.5 -133.5zM387 1053q0 -101 64 -236q54 36 89 63.5t70.5 63t52.5 74.5t17 82 q0 64 -31.5 105.5t-95.5 41.5q-74 0 -120 -55t-46 -139z" />
+<glyph unicode="'" horiz-adv-x="509" d="M164 1413h180l-6 -188l-33 -342h-102l-33 342z" />
+<glyph unicode="(" horiz-adv-x="620" d="M168 569q0 495 270 930l105 -49q-117 -192 -176.5 -418t-59.5 -463t59.5 -462.5t176.5 -417.5l-105 -49q-270 435 -270 929z" />
+<glyph unicode=")" horiz-adv-x="620" d="M78 -311q235 387 235 880q0 237 -59 463t-176 418l104 49q271 -437 271 -930q0 -261 -69 -488t-202 -441z" />
+<glyph unicode="*" horiz-adv-x="856" d="M119 1194l31 94l208 -51l19 221h100l19 -219l211 49l30 -94l-198 -82l114 -192l-80 -60l-145 176l-145 -176l-82 60l116 192z" />
+<glyph unicode="+" d="M70 612v127h372v400h133v-400h373v-127h-373v-399h-133v399h-372z" />
+<glyph unicode="," horiz-adv-x="509" d="M96 -250q88 39 136.5 103.5t48.5 146.5q-6 -2 -21 -2q-52 0 -86.5 31t-34.5 86q0 54 36 86t89 32q66 0 104 -53t38 -145q0 -130 -71.5 -230t-197.5 -153z" />
+<glyph unicode="-" horiz-adv-x="636" d="M84 449v129h471v-129h-471z" />
+<glyph unicode="." horiz-adv-x="509" d="M133 102q0 58 35.5 94.5t87.5 36.5q51 0 86 -37t35 -94q0 -55 -35.5 -91t-85.5 -36q-52 0 -87.5 36t-35.5 91z" />
+<glyph unicode="/" horiz-adv-x="716" d="M20 -328l547 1782h123l-547 -1782h-123z" />
+<glyph unicode="0" d="M90 657q0 325 110.5 499.5t309.5 174.5q197 0 307.5 -174.5t110.5 -499.5q0 -326 -110.5 -504t-307.5 -178q-198 0 -309 178t-111 504zM254 657q0 -277 68 -411.5t188 -134.5q119 0 186.5 134.5t67.5 411.5q0 276 -67 407.5t-187 131.5q-121 0 -188.5 -131t-67.5 -408z " />
+<glyph unicode="1" d="M162 0v139h299v963h-238v108q159 27 277 97h129v-1168h270v-139h-737z" />
+<glyph unicode="2" d="M74 1133q89 97 182 147.5t213 50.5q180 0 285.5 -105t105.5 -280q0 -52 -14.5 -106.5t-36 -104.5t-62.5 -111.5t-78.5 -111t-101 -121t-112 -123.5t-127.5 -135q144 12 219 12h379v-145h-844v100q135 134 217 219t167 182t129.5 165.5t72.5 139t28 132.5q0 117 -63 186.5 t-184 69.5q-143 0 -279 -158z" />
+<glyph unicode="3" d="M53 160l86 110q147 -155 334 -155q120 0 195 65.5t75 173.5q0 125 -97.5 192.5t-319.5 67.5v129q370 0 370 244q0 95 -60.5 151t-164.5 56q-145 0 -278 -133l-91 106q174 164 375 164q174 0 282.5 -88.5t108.5 -243.5q0 -114 -63 -191.5t-174 -119.5v-8 q125 -29 203.5 -115.5t78.5 -216.5q0 -169 -122.5 -271t-307.5 -102q-260 0 -430 185z" />
+<glyph unicode="4" d="M35 360v111l559 836h188v-811h179v-136h-179v-360h-159v360h-588zM213 496h410v378q0 77 10 252h-8q-9 -17 -107 -184z" />
+<glyph unicode="5" d="M51 154l82 110q69 -69 147 -109t183 -40q123 0 205 82.5t82 216.5t-76 210t-203 76q-63 0 -110.5 -18.5t-112.5 -60.5l-90 57l43 629h653v-146h-506l-35 -387q98 53 201 53q178 0 292 -103.5t114 -305.5q0 -103 -37 -188t-98.5 -140t-140.5 -85t-165 -30q-249 0 -428 179 z" />
+<glyph unicode="6" d="M98 604q0 153 27 276.5t73.5 206.5t110.5 138.5t135.5 80.5t151.5 25q186 0 315 -139l-94 -105q-40 48 -97 75.5t-118 27.5q-71 0 -130 -29.5t-107 -92t-76 -173t-31 -260.5q62 75 144 119.5t161 44.5q173 0 273 -103.5t100 -300.5q0 -184 -112.5 -302t-274.5 -118 q-200 0 -325.5 162.5t-125.5 466.5zM262 500q15 -190 88.5 -290.5t198.5 -100.5q98 0 162.5 79.5t64.5 206.5q0 131 -61 204t-180 73q-66 0 -138.5 -42.5t-134.5 -129.5z" />
+<glyph unicode="7" d="M90 1161v146h842v-105q-115 -147 -188.5 -280t-116.5 -280.5t-62 -291.5t-28 -350h-175q17 372 102 633t277 528h-651z" />
+<glyph unicode="8" d="M84 334q0 118 70 206.5t176 145.5v8q-183 130 -183 301q0 149 105.5 242.5t265.5 93.5q168 0 268.5 -97t100.5 -251q0 -93 -54 -176.5t-126 -138.5v-9q49 -29 85.5 -57.5t71 -68.5t52.5 -93t18 -116q0 -149 -117.5 -249t-304.5 -100q-185 0 -306.5 102t-121.5 257z M236 350q0 -108 80 -179t200 -71q114 0 185 64t71 166q0 47 -20.5 87.5t-42.5 65.5t-79.5 56.5t-85 43.5t-107.5 44q-13 5 -19 8q-182 -123 -182 -285zM303 995q0 -38 10.5 -70.5t33 -59t47 -47t63 -40.5t70 -33.5t77.5 -31.5q137 121 137 262q0 100 -61.5 165.5 t-165.5 65.5q-92 0 -151.5 -58.5t-59.5 -152.5z" />
+<glyph unicode="9" d="M82 911q0 184 112.5 302t272.5 118q202 0 326.5 -162.5t124.5 -466.5q0 -153 -27 -276.5t-73.5 -206.5t-110.5 -138.5t-135.5 -80.5t-151.5 -25q-189 0 -316 138l95 106q40 -48 97 -76t118 -28q72 0 131.5 29.5t108 93t76.5 175t30 263.5q-62 -78 -143.5 -123t-163.5 -45 q-173 0 -272 103t-99 300zM240 911q0 -130 61 -203t180 -73q68 0 140.5 42.5t134.5 131.5q-17 191 -91 290t-198 99q-97 0 -162 -80t-65 -207z" />
+<glyph unicode=":" horiz-adv-x="509" d="M133 102q0 58 35.5 94.5t87.5 36.5q51 0 86 -37t35 -94q0 -55 -35.5 -91t-85.5 -36q-52 0 -87.5 36t-35.5 91zM133 842q0 57 35.5 93t87.5 36q51 0 86 -36t35 -93q0 -56 -35 -91.5t-86 -35.5q-52 0 -87.5 35.5t-35.5 91.5z" />
+<glyph unicode=";" horiz-adv-x="509" d="M96 -250q88 39 136.5 103.5t48.5 146.5q-6 -2 -21 -2q-52 0 -86.5 31t-34.5 86q0 54 36 86t89 32q66 0 104 -53t38 -145q0 -130 -71.5 -230t-197.5 -153zM133 842q0 57 35.5 93t87.5 36q51 0 86 -36t35 -93q0 -56 -35 -91.5t-86 -35.5q-52 0 -87.5 35.5t-35.5 91.5z" />
+<glyph unicode="<" d="M70 612v136l878 344v-146l-432 -160l-274 -102v-8l274 -103l432 -159v-146z" />
+<glyph unicode="=" d="M70 393v127h878v-127h-878zM70 831v127h878v-127h-878z" />
+<glyph unicode=">" d="M70 268v146l432 159l274 103v8l-274 102l-432 160v146l878 -344v-136z" />
+<glyph unicode="?" horiz-adv-x="870" d="M78 1227q149 170 344 170q159 0 254.5 -88.5t95.5 -239.5q0 -73 -34 -142.5t-80.5 -125.5t-92 -113.5t-72.5 -130t-18 -151.5h-147q-9 65 1.5 125t34.5 106.5t55.5 90.5t64.5 84t60.5 78t45.5 81.5t18 87.5q0 86 -52 142t-146 56q-136 0 -236 -118zM285 102 q0 58 34.5 94.5t86.5 36.5t87 -36.5t35 -94.5q0 -55 -35 -91t-87 -36q-51 0 -86 36t-35 91z" />
+<glyph unicode="@" horiz-adv-x="1734" d="M104 416q0 201 69 372.5t186 287.5t272 181.5t327 65.5q308 0 490 -186.5t182 -491.5q0 -129 -37.5 -235.5t-97.5 -172t-131 -101.5t-143 -36q-86 0 -143.5 40.5t-67.5 115.5h-4q-53 -63 -119 -101t-131 -38q-108 0 -177 76.5t-69 212.5q0 83 28 167t77.5 152.5t125 112 t162.5 43.5q110 0 164 -99h4l23 82h112l-80 -409q-61 -240 111 -240q49 0 97.5 29.5t88 82t64 134.5t24.5 178q0 167 -63 294.5t-192.5 202t-311.5 74.5q-137 0 -266 -56.5t-229.5 -157t-161 -250.5t-60.5 -324q0 -195 80.5 -338.5t218 -216t312.5 -72.5q171 0 331 92 l45 -100q-172 -104 -389 -104q-121 0 -229 30t-198 91t-155.5 147.5t-102 205.5t-36.5 259zM645 416q0 -94 39 -139.5t104 -45.5q88 0 189 121l59 326q-29 47 -59 66.5t-72 19.5q-58 0 -108.5 -32.5t-82.5 -84t-50.5 -112t-18.5 -119.5z" />
+<glyph unicode="A" horiz-adv-x="1114" d="M6 0l455 1343h192l455 -1343h-182l-127 410h-490l-129 -410h-174zM352 547h404l-64 205q-67 204 -135 452h-8q-60 -230 -133 -452z" />
+<glyph unicode="B" horiz-adv-x="1204" d="M184 0v1343h400q216 0 338 -79t122 -248q0 -104 -59.5 -183.5t-173.5 -109.5v-8q150 -24 230.5 -105t80.5 -217q0 -192 -138 -292.5t-372 -100.5h-428zM354 135h234q177 0 271.5 66t94.5 200q0 242 -366 242h-234v-508zM354 770h199q168 0 246 58t78 173q0 107 -78.5 157 t-237.5 50h-207v-438z" />
+<glyph unicode="C" horiz-adv-x="1169" d="M106 672q0 318 168 507t431 189q114 0 207.5 -46.5t158.5 -119.5l-96 -108q-115 125 -268 125q-193 0 -308.5 -147t-115.5 -396q0 -253 112 -402t303 -149q177 0 310 149l96 -104q-168 -195 -410 -195q-127 0 -234.5 48t-186 136t-123 220t-44.5 293z" />
+<glyph unicode="D" horiz-adv-x="1259" d="M184 0v1343h336q309 0 472 -172t163 -493q0 -323 -162 -500.5t-465 -177.5h-344zM354 139h154q232 0 351.5 140.5t119.5 398.5q0 256 -119 391t-352 135h-154v-1065z" />
+<glyph unicode="E" horiz-adv-x="1079" d="M184 0v1343h774v-143h-604v-422h510v-145h-510v-488h625v-145h-795z" />
+<glyph unicode="F" horiz-adv-x="1011" d="M184 0v1343h774v-143h-604v-455h512v-143h-512v-602h-170z" />
+<glyph unicode="G" horiz-adv-x="1263" d="M106 672q0 159 46.5 290.5t128.5 220t196 137t248 48.5q227 0 385 -166l-96 -108q-118 125 -287 125q-203 0 -323.5 -146.5t-120.5 -396.5q0 -257 116.5 -404t329.5 -147q72 0 137 21.5t105 58.5v350h-285v141h440v-565q-69 -71 -177 -113.5t-238 -42.5q-176 0 -312.5 82 t-214.5 241t-78 374z" />
+<glyph unicode="H" horiz-adv-x="1335" d="M184 0v1343h170v-563h625v563h172v-1343h-172v633h-625v-633h-170z" />
+<glyph unicode="I" horiz-adv-x="538" d="M184 0v1343h170v-1343h-170z" />
+<glyph unicode="J" horiz-adv-x="983" d="M63 190l123 86q84 -151 232 -151q109 0 162 68t53 219v931h172v-948q0 -71 -13 -132.5t-42 -115t-72 -91.5t-105 -59.5t-139 -21.5q-252 0 -371 215z" />
+<glyph unicode="K" horiz-adv-x="1185" d="M184 0v1343h170v-673h6l560 673h192l-420 -512l486 -831h-191l-401 698l-232 -272v-426h-170z" />
+<glyph unicode="L" horiz-adv-x="995" d="M184 0v1343h170v-1198h588v-145h-758z" />
+<glyph unicode="M" horiz-adv-x="1488" d="M184 0v1343h201l260 -720l98 -275h9l94 275l258 720h201v-1343h-162v739q0 136 22 398h-8l-108 -299l-258 -703h-97l-260 703l-106 299h-9q1 -19 8.5 -117.5t11 -162.5t3.5 -118v-739h-158z" />
+<glyph unicode="N" horiz-adv-x="1325" d="M184 0v1343h176l486 -843l145 -279h8q-20 337 -20 428v694h162v-1343h-176l-488 846l-145 276h-8q22 -297 22 -420v-702h-162z" />
+<glyph unicode="O" horiz-adv-x="1359" d="M106 678q0 318 158.5 504t415.5 186t416 -186.5t159 -503.5q0 -321 -159.5 -512t-415.5 -191t-415 191t-159 512zM283 678q0 -252 108.5 -402.5t288.5 -150.5t288.5 150.5t108.5 402.5q0 249 -108 395t-289 146t-289 -146t-108 -395z" />
+<glyph unicode="P" horiz-adv-x="1179" d="M184 0v1343h412q115 0 203.5 -20.5t155.5 -66t102 -123t35 -185.5q0 -206 -133.5 -311t-362.5 -105h-242v-532h-170zM354 672h221q176 0 261.5 67t85.5 209t-83.5 200t-263.5 58h-221v-534z" />
+<glyph unicode="Q" horiz-adv-x="1359" d="M106 678q0 318 158.5 504t415.5 186t416 -186.5t159 -503.5q0 -287 -129 -472t-346 -222q45 -87 131.5 -132t198.5 -45q63 0 141 21l33 -133q-91 -31 -192 -31q-179 0 -307 86.5t-189 231.5q-223 31 -356.5 217t-133.5 479zM283 678q0 -257 108 -409t289 -152t289 152 t108 409q0 249 -108 395t-289 146t-289 -146t-108 -395z" />
+<glyph unicode="R" horiz-adv-x="1189" d="M184 0v1343h420q471 0 471 -376q0 -153 -80 -249.5t-221 -131.5l340 -586h-192l-324 567h-244v-567h-170zM354 707h226q158 0 241.5 65.5t83.5 194.5q0 128 -81 183.5t-244 55.5h-226v-499z" />
+<glyph unicode="S" horiz-adv-x="1093" d="M86 174l102 119q74 -77 171.5 -122.5t199.5 -45.5q131 0 206 60t75 159q0 40 -12.5 72.5t-28.5 53.5t-50.5 43.5t-59 34.5t-73.5 34l-192 84q-272 114 -272 346q0 154 119 255t302 101q116 0 219.5 -45t178.5 -121l-92 -110q-134 127 -306 127q-113 0 -181 -53.5 t-68 -143.5q0 -37 14.5 -69t32 -52t53.5 -41.5t58 -32t65 -28.5l190 -82q64 -28 110 -57.5t86 -72t60.5 -100t20.5 -129.5q0 -164 -125 -273.5t-332 -109.5q-138 0 -259.5 53t-211.5 146z" />
+<glyph unicode="T" horiz-adv-x="1097" d="M57 1200v143h983v-143h-405v-1200h-172v1200h-406z" />
+<glyph unicode="U" horiz-adv-x="1320" d="M178 555v788h170v-792q0 -426 314 -426q317 0 317 426v792h164v-788q0 -157 -36 -272t-102.5 -181t-151 -96.5t-191.5 -30.5t-192 30.5t-152 96.5t-103.5 181t-36.5 272z" />
+<glyph unicode="V" horiz-adv-x="1054" d="M0 1343h182l215 -725q20 -65 61.5 -211t69.5 -233h9q28 91 71.5 244.5t57.5 199.5l215 725h174l-426 -1343h-199z" />
+<glyph unicode="W" horiz-adv-x="1609" d="M47 1343h176l142 -731q12 -73 38 -217t39 -217h9q6 28 94 434l186 731h156l186 -731q19 -81 53.5 -234.5t44.5 -199.5h9q73 423 75 434l142 731h164l-279 -1343h-205l-203 809q-32 132 -65 305h-8q-12 -62 -38.5 -176t-29.5 -129l-198 -809h-203z" />
+<glyph unicode="X" horiz-adv-x="1050" d="M31 0l391 694l-365 649h189l182 -344q24 -42 104 -194h9q64 134 96 194l178 344h180l-366 -657l391 -686h-189l-196 362q-10 19 -50 93.5t-65 122.5h-8q-39 -82 -106 -216l-195 -362h-180z" />
+<glyph unicode="Y" horiz-adv-x="974" d="M-2 1343h182l174 -378q111 -254 129 -293h9q113 241 135 293l172 378h178l-404 -823v-520h-172v520z" />
+<glyph unicode="Z" horiz-adv-x="1103" d="M92 0v102l707 1098h-643v143h856v-100l-709 -1098h715v-145h-926z" />
+<glyph unicode="[" horiz-adv-x="620" d="M193 -311v1761h366v-96h-240v-1569h240v-96h-366z" />
+<glyph unicode="\" horiz-adv-x="716" d="M29 1454h121l546 -1782h-121z" />
+<glyph unicode="]" horiz-adv-x="620" d="M63 -215h238v1569h-238v96h365v-1761h-365v96z" />
+<glyph unicode="^" d="M123 582l311 790h150l311 -790h-147l-134 360l-100 272h-8l-103 -272l-133 -360h-147z" />
+<glyph unicode="_" horiz-adv-x="1024" d="M25 -145h974v-113h-974v113z" />
+<glyph unicode="`" horiz-adv-x="1110" d="M328 1462h176l184 -288h-129z" />
+<glyph unicode="a" horiz-adv-x="1048" d="M119 258q0 162 146 250t466 123q0 51 -9.5 93t-31.5 79t-64 57.5t-100 20.5q-140 0 -297 -107l-67 117q201 129 391 129q177 0 261.5 -108t84.5 -302v-610h-139l-15 119h-4q-177 -144 -329 -144q-129 0 -211 76t-82 207zM285 270q0 -81 48 -120t126 -39q69 0 132.5 32.5 t139.5 100.5v276q-242 -30 -344 -90.5t-102 -159.5z" />
+<glyph unicode="b" horiz-adv-x="1136" d="M168 0v1458h168v-397l-4 -180q156 139 311 139q190 0 292.5 -135.5t102.5 -370.5q0 -124 -35 -227t-95 -170.5t-137 -104.5t-163 -37q-145 0 -284 123h-7l-14 -98h-135zM336 221q120 -104 244 -104q125 0 204.5 107t79.5 288q0 173 -63.5 270t-198.5 97q-121 0 -266 -136 v-522z" />
+<glyph unicode="c" horiz-adv-x="933" d="M94 496q0 122 38.5 222.5t105 165.5t152.5 100.5t183 35.5q163 0 291 -119l-84 -108q-102 88 -200 88q-136 0 -224 -107t-88 -278q0 -170 85 -275.5t222 -105.5q123 0 234 100l76 -111q-145 -129 -324 -129q-204 0 -335.5 140t-131.5 381z" />
+<glyph unicode="d" horiz-adv-x="1136" d="M96 496q0 118 35.5 218t95.5 166t138 103t163 37q81 0 144 -28t135 -87l-8 170v383h170v-1458h-140l-14 117h-6q-146 -142 -301 -142q-190 0 -301 137.5t-111 383.5zM270 498q0 -179 72.5 -280t202.5 -101q132 0 254 137v520q-116 105 -242 105q-122 0 -204.5 -106.5 t-82.5 -274.5z" />
+<glyph unicode="e" horiz-adv-x="1015" d="M94 496q0 118 38 218.5t100.5 166.5t142.5 102.5t166 36.5q188 0 292.5 -125.5t104.5 -341.5q0 -55 -6 -92h-672q9 -161 99 -255.5t233 -94.5q127 0 248 77l59 -110q-161 -103 -328 -103q-205 0 -341 141.5t-136 379.5zM258 571h533q0 152 -64.5 234t-181.5 82 q-109 0 -190.5 -85t-96.5 -231z" />
+<glyph unicode="f" horiz-adv-x="598" d="M61 858v127l136 10v158q0 157 72 243.5t218 86.5q83 0 166 -33l-37 -129q-58 25 -112 25q-139 0 -139 -193v-158h210v-137h-210v-858h-168v858h-136z" />
+<glyph unicode="g" horiz-adv-x="1032" d="M92 -190q0 62 38.5 120t107.5 105v8q-88 56 -88 162q0 58 31.5 105.5t76.5 78.5v8q-55 44 -92 115t-37 154q0 158 109 256t266 98q75 0 141 -25h346v-129h-205q37 -35 59.5 -89t22.5 -115q0 -156 -104 -251.5t-260 -95.5q-82 0 -150 35q-63 -56 -63 -119q0 -108 176 -108 h192q176 0 262.5 -57.5t86.5 -180.5q0 -143 -139.5 -243.5t-364.5 -100.5q-187 0 -299.5 71t-112.5 198zM240 -168q0 -80 77 -127t211 -47q138 0 227 61t89 142q0 67 -50 95t-151 28h-172q-72 0 -129 16q-102 -72 -102 -168zM293 666q0 -106 61 -172t150 -66t150 66t61 172 t-60 168.5t-151 62.5t-151 -62.5t-60 -168.5z" />
+<glyph unicode="h" horiz-adv-x="1114" d="M168 0v1458h168v-397l-6 -205q82 78 160 121t172 43q303 0 303 -389v-631h-168v608q0 139 -45.5 202.5t-143.5 63.5q-72 0 -131 -35.5t-141 -117.5v-721h-168z" />
+<glyph unicode="i" horiz-adv-x="503" d="M137 1309q0 49 33.5 78.5t83.5 29.5t83.5 -29.5t33.5 -78.5q0 -47 -33.5 -78t-83.5 -31t-83.5 31t-33.5 78zM168 0v995h168v-995h-168z" />
+<glyph unicode="j" horiz-adv-x="505" d="M-82 -418l35 127q50 -16 94 -16q70 0 96.5 48t26.5 146v1108h168v-1108q0 -160 -64.5 -245.5t-207.5 -85.5q-83 0 -148 26zM139 1309q0 49 33.5 78.5t83.5 29.5q49 0 82 -30t33 -78q0 -47 -33.5 -78t-81.5 -31q-50 0 -83.5 31t-33.5 78z" />
+<glyph unicode="k" horiz-adv-x="1013" d="M168 0v1458h166v-987h6l424 524h186l-334 -399l379 -596h-184l-291 479l-186 -217v-262h-166z" />
+<glyph unicode="l" horiz-adv-x="522" d="M168 201v1257h168v-1270q0 -37 13 -55t34 -18q19 0 37 4l22 -127q-39 -17 -96 -17q-93 0 -135.5 57t-42.5 169z" />
+<glyph unicode="m" horiz-adv-x="1697" d="M168 0v995h139l15 -143h6q154 168 309 168q208 0 274 -191q85 93 164 142t164 49q303 0 303 -389v-631h-168v608q0 138 -45 202t-139 64q-112 0 -250 -153v-721h-168v608q0 139 -45 202.5t-141 63.5q-112 0 -250 -153v-721h-168z" />
+<glyph unicode="n" horiz-adv-x="1120" d="M168 0v995h139l15 -143h6q80 80 159.5 124t174.5 44q303 0 303 -389v-631h-168v608q0 139 -45.5 202.5t-143.5 63.5q-72 0 -131 -35.5t-141 -117.5v-721h-168z" />
+<glyph unicode="o" horiz-adv-x="1110" d="M94 496q0 122 37.5 222.5t101.5 165.5t147 100.5t175 35.5t175 -35.5t147 -100.5t101.5 -165.5t37.5 -222.5q0 -120 -37.5 -220t-101.5 -165t-147 -100.5t-175 -35.5t-175 35.5t-147 100.5t-101.5 165t-37.5 220zM268 496q0 -170 79.5 -275.5t207.5 -105.5 q129 0 208 105.5t79 275.5q0 172 -79 278.5t-208 106.5q-128 0 -207.5 -106.5t-79.5 -278.5z" />
+<glyph unicode="p" horiz-adv-x="1136" d="M168 -420v1415h139l15 -114h6q165 139 317 139q189 0 291 -136t102 -372q0 -123 -35 -226t-94.5 -170t-137 -104t-163.5 -37q-129 0 -276 115l4 -174v-336h-168zM336 221q123 -104 244 -104q125 0 204.5 107t79.5 288q0 173 -63.5 270t-198.5 97q-115 0 -266 -136v-522z " />
+<glyph unicode="q" horiz-adv-x="1126" d="M96 496q0 118 35.5 218t95.5 166t138 103t163 37q83 0 148.5 -28.5t136.5 -90.5h4l17 94h135v-1415h-170v354l8 177q-147 -136 -299 -136q-190 0 -301 137.5t-111 383.5zM270 498q0 -179 72.5 -280t202.5 -101q132 0 254 137v520q-116 105 -242 105q-122 0 -204.5 -106.5 t-82.5 -274.5z" />
+<glyph unicode="r" horiz-adv-x="710" d="M168 0v995h139l15 -180h6q52 96 125.5 150.5t156.5 54.5q58 0 107 -21l-33 -147q-53 16 -96 16q-69 0 -136.5 -55.5t-115.5 -173.5v-639h-168z" />
+<glyph unicode="s" horiz-adv-x="858" d="M57 113l84 112q71 -58 140.5 -88.5t152.5 -30.5q94 0 145.5 44t51.5 112q0 29 -14.5 55t-33 43.5t-54 36t-59.5 28.5t-67 26q-51 18 -86 33t-78.5 41t-69.5 53.5t-44.5 69t-18.5 89.5q0 123 92.5 203t250.5 80q168 0 309 -113l-80 -106q-117 88 -227 88q-89 0 -136 -41.5 t-47 -102.5q0 -32 16 -57.5t45.5 -43.5t63.5 -33t76 -31q4 -1 5.5 -1.5l4.5 -1.5t5.5 -2t4.5 -2q41 -15 62.5 -23.5t59 -26t59 -32t48.5 -38.5t41 -49t24 -59t10 -73q0 -127 -97 -212t-268 -85q-101 0 -199 38t-172 100z" />
+<glyph unicode="t" horiz-adv-x="692" d="M49 858v127l156 10l20 279h142v-279h268v-137h-268v-553q0 -97 35 -144.5t118 -47.5q42 0 113 26l33 -127q-113 -37 -185 -37q-152 0 -218 87t-66 245v551h-148z" />
+<glyph unicode="u" horiz-adv-x="1114" d="M154 365v630h170v-608q0 -140 44 -203t142 -63q75 0 135.5 39t132.5 129v706h168v-995h-139l-14 156h-7q-75 -89 -152.5 -135t-174.5 -46q-305 0 -305 390z" />
+<glyph unicode="v" horiz-adv-x="956" d="M25 995h174l188 -565q40 -137 92 -293h8q7 22 40.5 129t50.5 164l188 565h166l-352 -995h-197z" />
+<glyph unicode="w" horiz-adv-x="1470" d="M49 995h172l148 -575q24 -98 59 -277h8q6 25 29.5 124.5t38.5 152.5l153 575h164l156 -575q12 -47 70 -277h8q14 55 61 277l146 575h159l-266 -995h-205l-143 535q-14 51 -35.5 147.5t-32.5 138.5h-8q-56 -245 -69 -289l-140 -532h-196z" />
+<glyph unicode="x" horiz-adv-x="913" d="M29 0l325 520l-301 475h183l133 -219q87 -148 98 -166h8q65 123 90 166l121 219h176l-301 -493l324 -502h-183l-145 231q-87 147 -108 179h-9q-27 -43 -100 -179l-135 -231h-176z" />
+<glyph unicode="y" horiz-adv-x="956" d="M25 995h174l202 -551q41 -113 97 -280h8q16 51 45 150t39 130l178 551h164l-375 -1077q-28 -79 -60 -138t-76.5 -108t-104 -74.5t-132.5 -25.5q-61 0 -116 20l32 134q50 -15 76 -15q154 0 225 213l23 74z" />
+<glyph unicode="z" horiz-adv-x="870" d="M63 0v90l525 768h-467v137h680v-90l-525 -768h541v-137h-754z" />
+<glyph unicode="{" horiz-adv-x="620" d="M70 516v107q50 1 86 14t54.5 36t27 49.5t8.5 57.5q0 68 -9.5 195t-9.5 203q0 153 57 212.5t183 59.5h92v-96h-55q-81 0 -110 -42t-29 -145q0 -61 6 -180t6 -190q0 -100 -28.5 -152.5t-94.5 -71.5v-8q66 -19 94.5 -71.5t28.5 -151.5q0 -71 -6 -190.5t-6 -180.5 q0 -103 29 -144.5t110 -41.5h55v-96h-92q-126 0 -183 59.5t-57 212.5q0 77 9.5 202.5t9.5 192.5q0 157 -176 160z" />
+<glyph unicode="|" horiz-adv-x="493" d="M188 -512v2048h119v-2048h-119z" />
+<glyph unicode="}" horiz-adv-x="620" d="M63 -215h54q81 0 110 41.5t29 144.5q0 61 -5 180.5t-5 190.5q0 99 28 151.5t93 71.5v8q-65 19 -93 71t-28 153q0 71 5 190t5 180q0 103 -29 145t-110 42h-54v96h91q127 0 183 -59t56 -213q0 -76 -9 -203t-9 -195q0 -67 40.5 -111.5t135.5 -45.5v-107q-65 -1 -106 -25 t-55.5 -57.5t-14.5 -77.5q0 -67 9 -192.5t9 -202.5q0 -154 -56 -213t-183 -59h-91v96z" />
+<glyph unicode="~" d="M74 641q53 94 119.5 139t136.5 45q45 0 88 -17.5t77 -43t66 -51t66 -43t65 -17.5q91 0 158 125l94 -69q-53 -93 -119.5 -138t-136.5 -45q-45 0 -88 17.5t-77 43t-66 51t-66 43t-65 17.5q-91 0 -158 -125z" />
+<glyph unicode="¡" horiz-adv-x="591" d="M174 893q0 55 35.5 91t87.5 36q50 0 85.5 -36t35.5 -91q0 -57 -35 -94t-86 -37q-52 0 -87.5 36.5t-35.5 94.5zM211 -377l4 193l23 774h116l23 -774l4 -193h-170z" />
+<glyph unicode="¢" d="M125 635q0 205 115.5 332t296.5 153v217h106v-211q150 -8 268 -118l-82 -107q-91 81 -186 86v-704q114 8 213 96l74 -107q-130 -117 -287 -129v-211h-106v213q-188 22 -300 150t-112 340zM293 635q0 -137 64.5 -227.5t179.5 -116.5v686q-113 -26 -178.5 -117t-65.5 -225z " />
+<glyph unicode="£" d="M109 584v106l137 8h37q-1 4 -8.5 28t-9.5 30t-8.5 27t-8.5 29.5t-6.5 27t-6 29.5t-4 27t-3.5 30t-1 28q0 172 105 274.5t276 102.5q193 0 318 -153l-99 -97q-88 109 -206 109q-108 0 -168 -66t-60 -174q0 -40 8 -88t16 -76.5t25 -87.5h326v-114h-299q10 -62 10 -115 q0 -103 -31 -176t-96 -139v-9h576v-145h-817v102q103 56 160 154t57 215q0 44 -15 113h-204z" />
+<glyph unicode="¤" d="M53 303l131 133q-73 98 -73 238q0 141 73 239l-131 136l90 92l140 -144q98 76 227 76q127 0 225 -76l139 144l91 -92l-134 -136q76 -102 76 -239q0 -136 -76 -238l134 -133l-91 -92l-139 141q-96 -78 -225 -78q-131 0 -227 78l-140 -141zM266 674q0 -121 71 -198t173 -77 q101 0 171.5 77.5t70.5 197.5t-70.5 197t-171.5 77q-102 0 -173 -77t-71 -197z" />
+<glyph unicode="¥" d="M47 1307h176l160 -351q23 -51 65.5 -147t57.5 -129h8q26 56 70 154.5t55 121.5l160 351h172l-336 -656h291v-96h-334v-133h334v-98h-334v-324h-168v324h-332v98h332v133h-332v96h289z" />
+<glyph unicode="¦" horiz-adv-x="493" d="M188 438h119v-950h-119v950zM188 596v940h119v-940h-119z" />
+<glyph unicode="§" d="M92 702q0 85 47.5 152.5t128.5 112.5q-65 68 -65 168q0 112 82 189t229 77q170 0 315 -117l-81 -108q-117 94 -228 94q-82 0 -122 -36t-40 -93q0 -44 31.5 -80t81.5 -62t110.5 -51.5t121 -57t110.5 -70.5t81.5 -100t31.5 -138q0 -91 -45 -154t-129 -111q61 -70 61 -167 q0 -122 -93 -201.5t-237 -79.5q-107 0 -198.5 38t-155.5 107l102 92q109 -106 252 -106q80 0 127 40.5t47 100.5q0 47 -31 84t-81 63.5t-110.5 51.5t-120.5 56t-110 69.5t-81 99t-31 137.5zM240 713q0 -51 25.5 -91.5t73 -70.5t95.5 -52t114 -51t107 -53q63 29 93 69t30 105 q0 44 -19.5 81t-49 62t-74.5 50t-86.5 42.5t-94.5 41.5t-89 45q-62 -34 -93.5 -76t-31.5 -102z" />
+<glyph unicode="¨" horiz-adv-x="1110" d="M279 1305q0 43 28.5 71.5t71.5 28.5t71.5 -28.5t28.5 -71.5t-28.5 -72t-71.5 -29t-71.5 29t-28.5 72zM633 1305q0 43 27.5 71.5t70.5 28.5q44 0 72 -28.5t28 -71.5t-28 -72t-72 -29q-42 0 -70 29t-28 72z" />
+<glyph unicode="©" horiz-adv-x="1523" d="M100 662q0 152 53.5 280.5t144 214t211 133t253.5 47.5t253 -47.5t211 -133t144 -214t53 -280.5q0 -153 -53.5 -283t-143.5 -217t-210.5 -136t-253.5 -49t-253.5 49t-211 136t-144 217t-53.5 283zM197 662q0 -131 45 -244t121.5 -190t180 -121t218.5 -44t218.5 44 t180 121t121.5 190t45 244q0 130 -45 242t-121.5 187.5t-180 118.5t-218.5 43t-218.5 -43t-180 -118.5t-121.5 -187.5t-45 -242zM406 662q0 173 111.5 280t266.5 107q80 0 140 -30.5t116 -86.5l-71 -80q-87 84 -178 84q-112 0 -181 -76.5t-69 -197.5q0 -135 66 -214t177 -79 q105 0 209 90l62 -86q-66 -57 -129 -87t-148 -30q-160 0 -266 110t-106 296z" />
+<glyph unicode="ª" horiz-adv-x="706" d="M76 723q0 107 97 164.5t310 77.5q-2 72 -30.5 111.5t-96.5 39.5q-98 0 -206 -69l-48 86q139 88 273 88q235 0 235 -275v-401h-102l-14 76h-9q-104 -93 -206 -93q-91 0 -147 53.5t-56 141.5zM201 733q0 -102 114 -102q80 0 168 82v174q-152 -18 -217 -56t-65 -98z" />
+<glyph unicode="«" horiz-adv-x="878" d="M92 453v127l279 317l73 -61l-241 -320l241 -323l-73 -58zM416 453v127l280 317l72 -61l-242 -320l242 -323l-72 -58z" />
+<glyph unicode="¬" d="M70 612v127h878v-526h-135v399h-743z" />
+<glyph unicode="­" horiz-adv-x="636" d="M84 449v129h471v-129h-471z" />
+<glyph unicode="®" horiz-adv-x="866" d="M47 1057q0 177 111.5 290t273.5 113q163 0 275 -113t112 -290t-112 -290.5t-275 -113.5q-161 0 -273 113.5t-112 290.5zM129 1057q0 -145 86.5 -236.5t216.5 -91.5q131 0 218 91.5t87 236.5q0 143 -87.5 236t-217.5 93t-216.5 -92.5t-86.5 -236.5zM285 854v416h155 q71 0 115.5 -32t44.5 -101q0 -37 -21.5 -69t-54.5 -44l94 -170h-94l-71 143h-84v-143h-84zM369 1063h53q42 0 65 18t23 52q0 67 -84 67h-57v-137z" />
+<glyph unicode="¯" horiz-adv-x="1110" d="M305 1231v117h502v-117h-502z" />
+<glyph unicode="°" horiz-adv-x="677" d="M84 1139q0 118 75 191t181 73t181 -73t75 -191q0 -115 -75 -187.5t-181 -72.5t-181 72.5t-75 187.5zM186 1139q0 -72 43.5 -119t110.5 -47t110.5 47t43.5 119q0 75 -43 122.5t-111 47.5t-111 -47.5t-43 -122.5z" />
+<glyph unicode="±" d="M70 0v127h878v-127h-878zM70 623v127h372v389h133v-389h373v-127h-373v-363h-133v363h-372z" />
+<glyph unicode="²" horiz-adv-x="751" d="M82 1569q47 71 116.5 113t149.5 42q122 0 194 -67t72 -191q0 -54 -16.5 -102.5t-67 -113t-79.5 -96.5t-116 -121q-12 -13 -18 -19h338v-113h-549v76q108 97 166 152.5t113.5 117.5t77.5 108.5t22 90.5q0 78 -41 123t-112 45q-92 0 -172 -117z" />
+<glyph unicode="³" horiz-adv-x="751" d="M72 1032l88 68q79 -119 202 -119q68 0 114 38.5t46 104.5q0 69 -65 105.5t-183 36.5v84q101 0 159.5 40t58.5 103q0 57 -40 92t-106 35q-83 0 -162 -96l-80 69q115 131 263 131q107 0 180.5 -58.5t73.5 -156.5q0 -129 -140 -196q73 -19 122.5 -70.5t49.5 -126.5 q0 -108 -82 -173.5t-202 -65.5q-94 0 -171.5 42.5t-125.5 112.5z" />
+<glyph unicode="´" horiz-adv-x="1110" d="M422 1174l184 288h176l-231 -288h-129z" />
+<glyph unicode="µ" horiz-adv-x="1126" d="M168 -410v1405h168v-608q0 -139 45 -202.5t143 -63.5q75 0 134.5 39t132.5 129v706h167v-995h-139l-14 156h-4q-127 -172 -287 -172q-66 0 -110.5 18.5t-77.5 69.5l10 -185v-297h-168z" />
+<glyph unicode="¶" horiz-adv-x="1146" d="M84 907q0 118 36.5 203.5t105 135.5t155.5 73.5t197 23.5h90v-880h-68q-153 0 -266.5 45.5t-181.5 147t-68 251.5zM778 -164v1507h172v-1507h-172z" />
+<glyph unicode="·" horiz-adv-x="509" d="M133 657q0 58 35.5 94.5t87.5 36.5q51 0 86 -37t35 -94q0 -55 -35.5 -91t-85.5 -36q-52 0 -87.5 36t-35.5 91z" />
+<glyph unicode="¸" horiz-adv-x="1110" d="M395 -352q183 24 183 98q0 38 -32.5 61t-99.5 39l82 160h111l-53 -108q121 -41 121 -146q0 -83 -83.5 -129.5t-211.5 -58.5z" />
+<glyph unicode="¹" horiz-adv-x="751" d="M178 1532v86q117 21 199 82h106v-799h-131v631h-174z" />
+<glyph unicode="º" horiz-adv-x="747" d="M61 874q0 159 90 253t222 94q131 0 221 -94t90 -253q0 -158 -90 -252t-221 -94q-132 0 -222 94t-90 252zM190 874q0 -108 49.5 -174.5t133.5 -66.5t132 66t48 175q0 110 -48 176t-132 66t-133.5 -66t-49.5 -176z" />
+<glyph unicode="»" horiz-adv-x="878" d="M111 193l241 323l-241 320l71 61l281 -317v-127l-281 -318zM434 193l242 323l-242 320l74 61l278 -317v-127l-278 -318z" />
+<glyph unicode="¼" horiz-adv-x="1599" d="M129 1176v86q116 21 197 81h108v-798h-131v631h-174zM369 -25l741 1393h115l-742 -1393h-114zM934 213v68l334 518h147v-492h119v-94h-119v-213h-119v213h-362zM1069 307h227v144l11 223h-9l-102 -166z" />
+<glyph unicode="½" horiz-adv-x="1654" d="M129 1176v86q116 21 197 81h108v-798h-131v631h-174zM328 -25l741 1393h115l-742 -1393h-114zM985 668q47 71 116.5 113t149.5 42q123 0 195 -67t72 -191q0 -54 -16.5 -102.5t-67 -113t-79.5 -96.5t-116 -121q-12 -13 -18 -19h338v-113h-549v76q108 97 166 152.5 t113.5 117.5t77.5 108.5t22 90.5q0 78 -41.5 123t-112.5 45q-92 0 -172 -117z" />
+<glyph unicode="¾" horiz-adv-x="1630" d="M70 678l86 65q78 -118 202 -118q68 0 114 38.5t46 104.5q0 69 -64.5 105t-183.5 36v84q100 0 158.5 40.5t58.5 103.5q0 59 -38.5 93t-104.5 34q-84 0 -164 -97l-78 70q111 131 260 131q108 0 182 -58.5t74 -156.5q0 -132 -139 -195q73 -20 121.5 -71.5t48.5 -126.5 q0 -108 -81 -174t-201 -66q-94 0 -171.5 43.5t-125.5 114.5zM446 -25l742 1393h112l-741 -1393h-113zM963 213v68l335 518h148v-492h119v-94h-119v-213h-119v213h-364zM1100 307h227v144l10 223h-8l-102 -166z" />
+<glyph unicode="¿" horiz-adv-x="870" d="M98 -74q0 62 24 122t60 105.5t76.5 97.5t73.5 99t51 110t10 130h150q9 -65 -1.5 -125t-34.5 -106.5t-55.5 -90.5t-65 -84t-61 -78t-45.5 -81.5t-18 -87.5q0 -86 51.5 -141.5t147.5 -55.5q133 0 233 117l99 -88q-152 -170 -344 -170q-160 0 -255.5 88t-95.5 239zM342 893 q0 55 35.5 91t87.5 36q50 0 85.5 -36t35.5 -91q0 -57 -35 -94t-86 -37q-52 0 -87.5 36.5t-35.5 94.5z" />
+<glyph unicode="À" horiz-adv-x="1114" d="M6 0l455 1343h192l455 -1343h-182l-127 410h-490l-129 -410h-174zM285 1675h192l180 -229h-141zM352 547h404l-64 205q-67 204 -135 452h-8q-60 -230 -133 -452z" />
+<glyph unicode="Á" horiz-adv-x="1114" d="M6 0l455 1343h192l455 -1343h-182l-127 410h-490l-129 -410h-174zM352 547h404l-64 205q-67 204 -135 452h-8q-60 -230 -133 -452zM449 1446l180 229h192l-231 -229h-141z" />
+<glyph unicode="Â" horiz-adv-x="1114" d="M6 0l455 1343h192l455 -1343h-182l-127 410h-490l-129 -410h-174zM276 1446l197 229h162l196 -229h-137l-137 139h-8l-137 -139h-136zM352 547h404l-64 205q-67 204 -135 452h-8q-60 -230 -133 -452z" />
+<glyph unicode="Ã" horiz-adv-x="1114" d="M6 0l455 1343h192l455 -1343h-182l-127 410h-490l-129 -410h-174zM258 1456q8 98 54 159.5t118 61.5q46 0 91 -26.5t83.5 -53t69.5 -26.5t53 27.5t29 78.5h94q-9 -97 -55.5 -159t-116.5 -62q-37 0 -73.5 16.5t-61 37t-54.5 37t-55 16.5q-31 0 -53 -27.5t-31 -79.5h-92z M352 547h404l-64 205q-67 204 -135 452h-8q-60 -230 -133 -452z" />
+<glyph unicode="Ä" horiz-adv-x="1114" d="M6 0l455 1343h192l455 -1343h-182l-127 410h-490l-129 -410h-174zM276 1565q0 44 29 72t72 28t71.5 -28t28.5 -72q0 -43 -28.5 -72t-71.5 -29t-72 29t-29 72zM352 547h404l-64 205q-67 204 -135 452h-8q-60 -230 -133 -452zM631 1565q0 44 28 72t72 28q43 0 71.5 -28 t28.5 -72q0 -43 -28.5 -72t-71.5 -29q-44 0 -72 29t-28 72z" />
+<glyph unicode="Å" horiz-adv-x="1114" d="M6 0l455 1343h192l455 -1343h-182l-127 410h-490l-129 -410h-174zM352 547h404l-64 205q-67 204 -135 452h-8q-60 -230 -133 -452zM362 1612q0 81 53.5 130.5t137.5 49.5q83 0 137.5 -49.5t54.5 -130.5q0 -82 -54.5 -131t-137.5 -49q-84 0 -137.5 49t-53.5 131zM455 1612 q0 -49 28.5 -78t69.5 -29t68.5 29t27.5 78q0 46 -27.5 75t-68.5 29t-69.5 -29t-28.5 -75z" />
+<glyph unicode="Æ" horiz-adv-x="1683" d="M16 0l705 1343h842v-143h-570v-422h475v-145h-475v-488h590v-145h-762v391h-422l-202 -391h-181zM469 528h352v680h-8q-163 -328 -219 -438z" />
+<glyph unicode="Ç" horiz-adv-x="1169" d="M106 672q0 318 168 507t431 189q114 0 207.5 -46.5t158.5 -119.5l-96 -108q-115 125 -268 125q-193 0 -308.5 -147t-115.5 -396q0 -253 112 -402t303 -149q177 0 310 149l96 -104q-145 -167 -344 -190l-39 -82q121 -41 121 -146q0 -83 -83.5 -129.5t-211.5 -58.5l-19 84 q183 24 183 98q0 38 -31.5 61t-97.5 39l67 131q-242 18 -392.5 203t-150.5 492z" />
+<glyph unicode="È" horiz-adv-x="1079" d="M184 0v1343h774v-143h-604v-422h510v-145h-510v-488h625v-145h-795zM313 1675h193l180 -229h-141z" />
+<glyph unicode="É" horiz-adv-x="1079" d="M184 0v1343h774v-143h-604v-422h510v-145h-510v-488h625v-145h-795zM477 1446l180 229h193l-232 -229h-141z" />
+<glyph unicode="Ê" horiz-adv-x="1079" d="M184 0v1343h774v-143h-604v-422h510v-145h-510v-488h625v-145h-795zM305 1446l197 229h162l196 -229h-137l-137 139h-8l-138 -139h-135z" />
+<glyph unicode="Ë" horiz-adv-x="1079" d="M184 0v1343h774v-143h-604v-422h510v-145h-510v-488h625v-145h-795zM305 1565q0 44 29 72t72 28t71.5 -28t28.5 -72q0 -43 -28.5 -72t-71.5 -29t-72 29t-29 72zM659 1565q0 44 28.5 72t72.5 28q43 0 71.5 -28t28.5 -72q0 -43 -28.5 -72t-71.5 -29q-44 0 -72.5 29 t-28.5 72z" />
+<glyph unicode="Ì" horiz-adv-x="538" d="M0 1675h193l182 -229h-142zM184 0v1343h170v-1343h-170z" />
+<glyph unicode="Í" horiz-adv-x="538" d="M164 1446l180 229h193l-232 -229h-141zM184 0v1343h170v-1343h-170z" />
+<glyph unicode="Î" horiz-adv-x="538" d="M-8 1446l196 229h162l197 -229h-137l-138 139h-8l-137 -139h-135zM184 0v1343h170v-1343h-170z" />
+<glyph unicode="Ï" horiz-adv-x="538" d="M-8 1565q0 44 28.5 72t71.5 28t72 -28t29 -72q0 -43 -29 -72t-72 -29t-71.5 29t-28.5 72zM184 0v1343h170v-1343h-170zM346 1565q0 44 28 72t72 28q43 0 72 -28t29 -72q0 -43 -29 -72t-72 -29q-44 0 -72 29t-28 72z" />
+<glyph unicode="Ð" horiz-adv-x="1306" d="M68 657v88l161 9v589h336q309 0 472 -172t163 -493q0 -323 -162 -500.5t-465 -177.5h-344v657h-161zM399 139h154q232 0 351.5 140.5t119.5 398.5q0 256 -119 391t-352 135h-154v-450h306v-97h-306v-518z" />
+<glyph unicode="Ñ" horiz-adv-x="1325" d="M184 0v1343h176l486 -843l145 -279h8q-20 337 -20 428v694h162v-1343h-176l-488 846l-145 276h-8q22 -297 22 -420v-702h-162zM373 1456q9 98 55.5 159.5t116.5 61.5q37 0 73.5 -16.5t60.5 -36.5t54 -36.5t55 -16.5q31 0 53 27.5t31 78.5h93q-9 -97 -55.5 -159 t-116.5 -62q-37 0 -73.5 16.5t-61 37t-54.5 37t-55 16.5q-31 0 -53 -27.5t-31 -79.5h-92z" />
+<glyph unicode="Ò" horiz-adv-x="1359" d="M106 678q0 318 158.5 504t415.5 186t416 -186.5t159 -503.5q0 -321 -159.5 -512t-415.5 -191t-415 191t-159 512zM283 678q0 -252 108.5 -402.5t288.5 -150.5t288.5 150.5t108.5 402.5q0 249 -108 395t-289 146t-289 -146t-108 -395zM412 1675h192l180 -229h-141z" />
+<glyph unicode="Ó" horiz-adv-x="1359" d="M106 678q0 318 158.5 504t415.5 186t416 -186.5t159 -503.5q0 -321 -159.5 -512t-415.5 -191t-415 191t-159 512zM283 678q0 -252 108.5 -402.5t288.5 -150.5t288.5 150.5t108.5 402.5q0 249 -108 395t-289 146t-289 -146t-108 -395zM575 1446l181 229h192l-231 -229 h-142z" />
+<glyph unicode="Ô" horiz-adv-x="1359" d="M106 678q0 318 158.5 504t415.5 186t416 -186.5t159 -503.5q0 -321 -159.5 -512t-415.5 -191t-415 191t-159 512zM283 678q0 -252 108.5 -402.5t288.5 -150.5t288.5 150.5t108.5 402.5q0 249 -108 395t-289 146t-289 -146t-108 -395zM401 1446l197 229h164l196 -229h-137 l-137 139h-8l-137 -139h-138z" />
+<glyph unicode="Õ" horiz-adv-x="1359" d="M106 678q0 318 158.5 504t415.5 186t416 -186.5t159 -503.5q0 -321 -159.5 -512t-415.5 -191t-415 191t-159 512zM283 678q0 -252 108.5 -402.5t288.5 -150.5t288.5 150.5t108.5 402.5q0 249 -108 395t-289 146t-289 -146t-108 -395zM383 1456q9 98 55.5 159.5 t118.5 61.5q46 0 91 -26.5t83.5 -53t69.5 -26.5q30 0 52.5 28t29.5 78h94q-9 -97 -56 -159t-118 -62q-45 0 -90 27t-83.5 53.5t-68.5 26.5q-31 0 -53 -27.5t-31 -79.5h-94z" />
+<glyph unicode="Ö" horiz-adv-x="1359" d="M106 678q0 318 158.5 504t415.5 186t416 -186.5t159 -503.5q0 -321 -159.5 -512t-415.5 -191t-415 191t-159 512zM283 678q0 -252 108.5 -402.5t288.5 -150.5t288.5 150.5t108.5 402.5q0 249 -108 395t-289 146t-289 -146t-108 -395zM403 1565q0 44 28.5 72t72.5 28 q43 0 71.5 -28t28.5 -72q0 -43 -28.5 -72t-71.5 -29q-44 0 -72.5 29t-28.5 72zM756 1565q0 44 28.5 72t71.5 28q44 0 72 -28t28 -72q0 -43 -28 -72t-72 -29q-43 0 -71.5 29t-28.5 72z" />
+<glyph unicode="×" d="M102 350l318 326l-318 323l91 93l317 -326l315 326l90 -93l-317 -323l317 -326l-90 -92l-315 328l-317 -328z" />
+<glyph unicode="Ø" horiz-adv-x="1359" d="M102 12l144 187q-135 187 -135 479q0 318 159 504t416 186q214 0 358 -129l130 166l94 -72l-142 -184q134 -187 134 -471q0 -320 -159.5 -511.5t-414.5 -191.5q-210 0 -360 134l-129 -170zM287 678q0 -198 69 -336l590 766q-105 111 -260 111q-182 0 -290.5 -146 t-108.5 -395zM426 238q107 -113 260 -113q180 0 288.5 150.5t108.5 402.5q0 194 -67 328z" />
+<glyph unicode="Ù" horiz-adv-x="1320" d="M178 555v788h170v-792q0 -426 314 -426q317 0 317 426v792h164v-788q0 -157 -36 -272t-102.5 -181t-151 -96.5t-191.5 -30.5t-192 30.5t-152 96.5t-103.5 181t-36.5 272zM393 1675h193l180 -229h-141z" />
+<glyph unicode="Ú" horiz-adv-x="1320" d="M178 555v788h170v-792q0 -426 314 -426q317 0 317 426v792h164v-788q0 -157 -36 -272t-102.5 -181t-151 -96.5t-191.5 -30.5t-192 30.5t-152 96.5t-103.5 181t-36.5 272zM557 1446l180 229h193l-232 -229h-141z" />
+<glyph unicode="Û" horiz-adv-x="1320" d="M178 555v788h170v-792q0 -426 314 -426q317 0 317 426v792h164v-788q0 -157 -36 -272t-102.5 -181t-151 -96.5t-191.5 -30.5t-192 30.5t-152 96.5t-103.5 181t-36.5 272zM383 1446l197 229h161l197 -229h-135l-137 139h-9l-137 -139h-137z" />
+<glyph unicode="Ü" horiz-adv-x="1320" d="M178 555v788h170v-792q0 -426 314 -426q317 0 317 426v792h164v-788q0 -157 -36 -272t-102.5 -181t-151 -96.5t-191.5 -30.5t-192 30.5t-152 96.5t-103.5 181t-36.5 272zM383 1565q0 44 28.5 72t71.5 28q44 0 72.5 -28t28.5 -72q0 -43 -28.5 -72t-72.5 -29 q-43 0 -71.5 29t-28.5 72zM737 1565q0 44 29 72t72 28t71.5 -28t28.5 -72q0 -43 -28.5 -72t-71.5 -29t-72 29t-29 72z" />
+<glyph unicode="Ý" horiz-adv-x="974" d="M-2 1343h182l174 -378q111 -254 129 -293h9q113 241 135 293l172 378h178l-404 -823v-520h-172v520zM383 1446l180 229h193l-232 -229h-141z" />
+<glyph unicode="Þ" horiz-adv-x="1193" d="M184 0v1343h170v-225h242q115 0 203.5 -21t155.5 -66.5t102 -123t35 -184.5q0 -207 -133 -311.5t-363 -104.5h-242v-307h-170zM354 446h221q176 0 261.5 67t85.5 210q0 141 -84 198.5t-263 57.5h-221v-533z" />
+<glyph unicode="ß" horiz-adv-x="1179" d="M168 0v1055q0 195 105.5 309.5t295.5 114.5q155 0 244.5 -86t89.5 -213q0 -57 -19 -107.5t-46.5 -87t-55 -70.5t-46.5 -72.5t-19 -76.5q0 -40 22 -71.5t58 -54t78.5 -44t85.5 -48.5t79 -60t58 -86.5t22 -120.5q0 -132 -89 -219t-238 -87q-150 0 -289 101l67 119 q109 -89 217 -89q81 0 127 48t46 116q0 48 -22.5 86t-58 63t-78.5 47.5t-86 47t-78.5 54t-58 74.5t-22.5 103q0 51 18.5 97t45 81.5t53 70.5t45 78.5t18.5 90.5q0 80 -44 129t-126 49q-110 0 -170.5 -80.5t-60.5 -236.5v-1024h-168z" />
+<glyph unicode="à" horiz-adv-x="1048" d="M119 258q0 162 146 250t466 123q0 51 -9.5 93t-31.5 79t-64 57.5t-100 20.5q-140 0 -297 -107l-67 117q201 129 391 129q177 0 261.5 -108t84.5 -302v-610h-139l-15 119h-4q-177 -144 -329 -144q-129 0 -211 76t-82 207zM285 270q0 -81 48 -120t126 -39q69 0 132.5 32.5 t139.5 100.5v276q-242 -30 -344 -90.5t-102 -159.5zM324 1462h176l184 -288h-129z" />
+<glyph unicode="á" horiz-adv-x="1048" d="M119 258q0 162 146 250t466 123q0 51 -9.5 93t-31.5 79t-64 57.5t-100 20.5q-140 0 -297 -107l-67 117q201 129 391 129q177 0 261.5 -108t84.5 -302v-610h-139l-15 119h-4q-177 -144 -329 -144q-129 0 -211 76t-82 207zM285 270q0 -81 48 -120t126 -39q69 0 132.5 32.5 t139.5 100.5v276q-242 -30 -344 -90.5t-102 -159.5zM418 1174l184 288h176l-231 -288h-129z" />
+<glyph unicode="â" horiz-adv-x="1048" d="M119 258q0 162 146 250t466 123q0 51 -9.5 93t-31.5 79t-64 57.5t-100 20.5q-140 0 -297 -107l-67 117q201 129 391 129q177 0 261.5 -108t84.5 -302v-610h-139l-15 119h-4q-177 -144 -329 -144q-129 0 -211 76t-82 207zM285 270q0 -81 48 -120t126 -39q69 0 132.5 32.5 t139.5 100.5v276q-242 -30 -344 -90.5t-102 -159.5zM289 1174l192 288h140l194 -288h-123l-137 186h-8l-137 -186h-121z" />
+<glyph unicode="ã" horiz-adv-x="1048" d="M119 258q0 162 146 250t466 123q0 51 -9.5 93t-31.5 79t-64 57.5t-100 20.5q-140 0 -297 -107l-67 117q201 129 391 129q177 0 261.5 -108t84.5 -302v-610h-139l-15 119h-4q-177 -144 -329 -144q-129 0 -211 76t-82 207zM266 1186q10 98 52.5 157.5t115.5 59.5 q34 0 69.5 -16.5t60 -36t52.5 -36t50 -16.5q57 0 75 105h97q-9 -97 -52.5 -157t-115.5 -60q-34 0 -69.5 16t-59.5 36t-53 36t-52 16q-59 0 -74 -104h-96zM285 270q0 -81 48 -120t126 -39q69 0 132.5 32.5t139.5 100.5v276q-242 -30 -344 -90.5t-102 -159.5z" />
+<glyph unicode="ä" horiz-adv-x="1048" d="M119 258q0 162 146 250t466 123q0 51 -9.5 93t-31.5 79t-64 57.5t-100 20.5q-140 0 -297 -107l-67 117q201 129 391 129q177 0 261.5 -108t84.5 -302v-610h-139l-15 119h-4q-177 -144 -329 -144q-129 0 -211 76t-82 207zM274 1305q0 43 29 71.5t72 28.5t71.5 -28.5 t28.5 -71.5t-28.5 -72t-71.5 -29t-72 29t-29 72zM285 270q0 -81 48 -120t126 -39q69 0 132.5 32.5t139.5 100.5v276q-242 -30 -344 -90.5t-102 -159.5zM629 1305q0 43 28 71.5t72 28.5q43 0 70.5 -28.5t27.5 -71.5t-28 -72t-70 -29q-44 0 -72 29t-28 72z" />
+<glyph unicode="å" horiz-adv-x="1048" d="M119 258q0 162 146 250t466 123q0 51 -9.5 93t-31.5 79t-64 57.5t-100 20.5q-140 0 -297 -107l-67 117q201 129 391 129q177 0 261.5 -108t84.5 -302v-610h-139l-15 119h-4q-177 -144 -329 -144q-129 0 -211 76t-82 207zM285 270q0 -81 48 -120t126 -39q69 0 132.5 32.5 t139.5 100.5v276q-242 -30 -344 -90.5t-102 -159.5zM360 1300q0 84 53.5 136.5t137.5 52.5q85 0 138.5 -52.5t53.5 -136.5q0 -86 -53.5 -138t-138.5 -52q-84 0 -137.5 52.5t-53.5 137.5zM453 1300q0 -51 28.5 -82.5t69.5 -31.5q42 0 70 31.5t28 82.5q0 50 -28 81.5t-70 31.5 q-41 0 -69.5 -31.5t-28.5 -81.5z" />
+<glyph unicode="æ" horiz-adv-x="1607" d="M119 258q0 161 144.5 249t457.5 124q0 250 -203 250q-132 0 -289 -107l-67 117q201 129 377 129q108 0 180 -56t104 -155q60 99 144.5 155t183.5 56q181 0 280 -126t99 -343q0 -57 -6 -94h-645q6 -154 93 -249t216 -95q113 0 242 82l61 -117q-161 -103 -324 -103 q-205 0 -350 187q-209 -187 -405 -187q-129 0 -211 76t-82 207zM285 270q0 -81 48 -120t126 -39q71 0 153 40.5t148 112.5q-36 79 -39 205v51q-231 -30 -333.5 -91t-102.5 -159zM879 569h503q0 154 -60.5 236t-174.5 82q-104 0 -179.5 -87t-88.5 -231z" />
+<glyph unicode="ç" horiz-adv-x="933" d="M94 496q0 122 38.5 222.5t105 165.5t152.5 100.5t183 35.5q163 0 291 -119l-84 -108q-102 88 -200 88q-136 0 -224 -107t-88 -278q0 -170 85 -275.5t222 -105.5q123 0 234 100l76 -111q-122 -109 -271 -124l-39 -82q121 -42 121 -146q0 -83 -84 -129.5t-213 -58.5l-16 84 q182 24 182 98q0 38 -32.5 61t-98.5 39l68 134q-181 21 -294.5 157.5t-113.5 358.5z" />
+<glyph unicode="è" horiz-adv-x="1015" d="M94 496q0 118 38 218.5t100.5 166.5t142.5 102.5t166 36.5q188 0 292.5 -125.5t104.5 -341.5q0 -55 -6 -92h-672q9 -161 99 -255.5t233 -94.5q127 0 248 77l59 -110q-161 -103 -328 -103q-205 0 -341 141.5t-136 379.5zM258 571h533q0 152 -64.5 234t-181.5 82 q-109 0 -190.5 -85t-96.5 -231zM315 1462h174l187 -288h-131z" />
+<glyph unicode="é" horiz-adv-x="1015" d="M94 496q0 118 38 218.5t100.5 166.5t142.5 102.5t166 36.5q188 0 292.5 -125.5t104.5 -341.5q0 -55 -6 -92h-672q9 -161 99 -255.5t233 -94.5q127 0 248 77l59 -110q-161 -103 -328 -103q-205 0 -341 141.5t-136 379.5zM258 571h533q0 152 -64.5 234t-181.5 82 q-109 0 -190.5 -85t-96.5 -231zM408 1174l186 288h174l-231 -288h-129z" />
+<glyph unicode="ê" horiz-adv-x="1015" d="M94 496q0 118 38 218.5t100.5 166.5t142.5 102.5t166 36.5q188 0 292.5 -125.5t104.5 -341.5q0 -55 -6 -92h-672q9 -161 99 -255.5t233 -94.5q127 0 248 77l59 -110q-161 -103 -328 -103q-205 0 -341 141.5t-136 379.5zM258 571h533q0 152 -64.5 234t-181.5 82 q-109 0 -190.5 -85t-96.5 -231zM279 1174l194 288h137l195 -288h-123l-137 186h-8l-138 -186h-120z" />
+<glyph unicode="ë" horiz-adv-x="1015" d="M94 496q0 118 38 218.5t100.5 166.5t142.5 102.5t166 36.5q188 0 292.5 -125.5t104.5 -341.5q0 -55 -6 -92h-672q9 -161 99 -255.5t233 -94.5q127 0 248 77l59 -110q-161 -103 -328 -103q-205 0 -341 141.5t-136 379.5zM258 571h533q0 152 -64.5 234t-181.5 82 q-109 0 -190.5 -85t-96.5 -231zM264 1305q0 43 29 71.5t72 28.5t71.5 -28.5t28.5 -71.5t-28.5 -72t-71.5 -29t-72 29t-29 72zM618 1305q0 43 28.5 71.5t72.5 28.5q43 0 71.5 -28.5t28.5 -71.5t-28.5 -72t-71.5 -29q-44 0 -72.5 29t-28.5 72z" />
+<glyph unicode="ì" horiz-adv-x="503" d="M25 1462h176l184 -288h-129zM168 0v995h168v-995h-168z" />
+<glyph unicode="í" horiz-adv-x="503" d="M119 1174l184 288h176l-231 -288h-129zM168 0v995h168v-995h-168z" />
+<glyph unicode="î" horiz-adv-x="503" d="M-10 1174l192 288h140l194 -288h-123l-137 186h-8l-137 -186h-121zM168 0v995h168v-995h-168z" />
+<glyph unicode="ï" horiz-adv-x="503" d="M-25 1305q0 43 29 71.5t72 28.5t71.5 -28.5t28.5 -71.5t-28.5 -72t-71.5 -29t-72 29t-29 72zM168 0v995h168v-995h-168zM330 1305q0 43 27.5 71.5t70.5 28.5q44 0 72 -28.5t28 -71.5t-28 -72t-72 -29q-42 0 -70 29t-28 72z" />
+<glyph unicode="ð" horiz-adv-x="1116" d="M109 455q0 206 119.5 333t301.5 127q172 0 275 -135q-50 229 -219 394l-289 -150l-49 84l260 133q-114 87 -229 148l77 106q173 -94 283 -186l291 149l49 -84l-264 -135q278 -281 278 -713q0 -247 -121.5 -399t-320.5 -152q-87 0 -166.5 34t-141 94.5t-98 152 t-36.5 199.5zM268 455q0 -150 83.5 -245t203.5 -95q134 0 205 109.5t71 295.5q0 43 -4 113q-63 85 -129 118t-143 33q-133 0 -210 -92t-77 -237z" />
+<glyph unicode="ñ" horiz-adv-x="1120" d="M168 0v995h139l15 -143h6q80 80 159.5 124t174.5 44q303 0 303 -389v-631h-168v608q0 139 -45.5 202.5t-143.5 63.5q-72 0 -131 -35.5t-141 -117.5v-721h-168zM313 1186q8 97 51 157t115 60q43 0 87.5 -26.5t82 -52.5t64.5 -26q58 0 73 105h97q-8 -97 -51 -157t-115 -60 q-35 0 -70.5 16t-59.5 36t-52.5 36t-51.5 16q-30 0 -48 -25.5t-27 -78.5h-95z" />
+<glyph unicode="ò" horiz-adv-x="1110" d="M94 496q0 122 37.5 222.5t101.5 165.5t147 100.5t175 35.5t175 -35.5t147 -100.5t101.5 -165.5t37.5 -222.5q0 -120 -37.5 -220t-101.5 -165t-147 -100.5t-175 -35.5t-175 35.5t-147 100.5t-101.5 165t-37.5 220zM268 496q0 -170 79.5 -275.5t207.5 -105.5 q129 0 208 105.5t79 275.5q0 172 -79 278.5t-208 106.5q-128 0 -207.5 -106.5t-79.5 -278.5zM328 1462h176l184 -288h-129z" />
+<glyph unicode="ó" horiz-adv-x="1110" d="M94 496q0 122 37.5 222.5t101.5 165.5t147 100.5t175 35.5t175 -35.5t147 -100.5t101.5 -165.5t37.5 -222.5q0 -120 -37.5 -220t-101.5 -165t-147 -100.5t-175 -35.5t-175 35.5t-147 100.5t-101.5 165t-37.5 220zM268 496q0 -170 79.5 -275.5t207.5 -105.5 q129 0 208 105.5t79 275.5q0 172 -79 278.5t-208 106.5q-128 0 -207.5 -106.5t-79.5 -278.5zM422 1174l184 288h176l-231 -288h-129z" />
+<glyph unicode="ô" horiz-adv-x="1110" d="M94 496q0 122 37.5 222.5t101.5 165.5t147 100.5t175 35.5t175 -35.5t147 -100.5t101.5 -165.5t37.5 -222.5q0 -120 -37.5 -220t-101.5 -165t-147 -100.5t-175 -35.5t-175 35.5t-147 100.5t-101.5 165t-37.5 220zM268 496q0 -170 79.5 -275.5t207.5 -105.5 q129 0 208 105.5t79 275.5q0 172 -79 278.5t-208 106.5q-128 0 -207.5 -106.5t-79.5 -278.5zM293 1174l192 288h140l194 -288h-123l-137 186h-8l-137 -186h-121z" />
+<glyph unicode="õ" horiz-adv-x="1110" d="M94 496q0 122 37.5 222.5t101.5 165.5t147 100.5t175 35.5t175 -35.5t147 -100.5t101.5 -165.5t37.5 -222.5q0 -120 -37.5 -220t-101.5 -165t-147 -100.5t-175 -35.5t-175 35.5t-147 100.5t-101.5 165t-37.5 220zM268 496q0 -170 79.5 -275.5t207.5 -105.5 q129 0 208 105.5t79 275.5q0 172 -79 278.5t-208 106.5q-128 0 -207.5 -106.5t-79.5 -278.5zM270 1186q8 97 51 157t115 60q35 0 71 -16.5t60.5 -36t52.5 -36t50 -16.5q57 0 75 105h95q-8 -97 -51 -157t-115 -60q-34 0 -69.5 16t-59.5 36t-53 36t-52 16q-58 0 -73 -104h-97z " />
+<glyph unicode="ö" horiz-adv-x="1110" d="M94 496q0 122 37.5 222.5t101.5 165.5t147 100.5t175 35.5t175 -35.5t147 -100.5t101.5 -165.5t37.5 -222.5q0 -120 -37.5 -220t-101.5 -165t-147 -100.5t-175 -35.5t-175 35.5t-147 100.5t-101.5 165t-37.5 220zM268 496q0 -170 79.5 -275.5t207.5 -105.5 q129 0 208 105.5t79 275.5q0 172 -79 278.5t-208 106.5q-128 0 -207.5 -106.5t-79.5 -278.5zM279 1305q0 43 28.5 71.5t71.5 28.5t71.5 -28.5t28.5 -71.5t-28.5 -72t-71.5 -29t-71.5 29t-28.5 72zM633 1305q0 43 27.5 71.5t70.5 28.5q44 0 72 -28.5t28 -71.5t-28 -72 t-72 -29q-42 0 -70 29t-28 72z" />
+<glyph unicode="÷" d="M70 612v127h878v-127h-878zM397 307q0 47 32.5 78t80.5 31q46 0 78.5 -31t32.5 -78q0 -49 -32 -79.5t-79 -30.5q-48 0 -80.5 30.5t-32.5 79.5zM397 1044q0 47 32.5 78t80.5 31q46 0 78.5 -31t32.5 -78q0 -49 -32 -79.5t-79 -30.5q-48 0 -80.5 30.5t-32.5 79.5z" />
+<glyph unicode="ø" horiz-adv-x="1110" d="M94 12l111 133q-111 144 -111 351q0 122 37.5 222.5t101.5 165.5t147 100.5t175 35.5q165 0 285 -102l102 124l74 -59l-111 -133q111 -144 111 -354q0 -120 -37.5 -220t-101.5 -165t-147 -100.5t-175 -35.5q-163 0 -285 101l-100 -123zM260 504q0 -140 47 -232l438 531 q-76 82 -190 82q-128 0 -211.5 -106.5t-83.5 -274.5zM365 190q79 -79 190 -79q130 0 212.5 105t82.5 273q0 140 -49 234z" />
+<glyph unicode="ù" horiz-adv-x="1114" d="M154 365v630h170v-608q0 -140 44 -203t142 -63q75 0 135.5 39t132.5 129v706h168v-995h-139l-14 156h-7q-75 -89 -152.5 -135t-174.5 -46q-305 0 -305 390zM330 1462h176l186 -288h-131z" />
+<glyph unicode="ú" horiz-adv-x="1114" d="M154 365v630h170v-608q0 -140 44 -203t142 -63q75 0 135.5 39t132.5 129v706h168v-995h-139l-14 156h-7q-75 -89 -152.5 -135t-174.5 -46q-305 0 -305 390zM424 1174l186 288h174l-231 -288h-129z" />
+<glyph unicode="û" horiz-adv-x="1114" d="M154 365v630h170v-608q0 -140 44 -203t142 -63q75 0 135.5 39t132.5 129v706h168v-995h-139l-14 156h-7q-75 -89 -152.5 -135t-174.5 -46q-305 0 -305 390zM295 1174l192 288h140l194 -288h-123l-137 186h-8l-137 -186h-121z" />
+<glyph unicode="ü" horiz-adv-x="1114" d="M154 365v630h170v-608q0 -140 44 -203t142 -63q75 0 135.5 39t132.5 129v706h168v-995h-139l-14 156h-7q-75 -89 -152.5 -135t-174.5 -46q-305 0 -305 390zM281 1305q0 43 28.5 71.5t71.5 28.5t71.5 -28.5t28.5 -71.5t-28.5 -72t-71.5 -29t-71.5 29t-28.5 72zM635 1305 q0 43 28 71.5t72 28.5q43 0 72 -28.5t29 -71.5t-29 -72t-72 -29q-44 0 -72 29t-28 72z" />
+<glyph unicode="ý" horiz-adv-x="956" d="M25 995h174l202 -551q41 -113 97 -280h8q16 51 45 150t39 130l178 551h164l-375 -1077q-28 -79 -60 -138t-76.5 -108t-104 -74.5t-132.5 -25.5q-61 0 -116 20l32 134q50 -15 76 -15q154 0 225 213l23 74zM365 1174l184 288h176l-231 -288h-129z" />
+<glyph unicode="þ" horiz-adv-x="1136" d="M168 -420v1878h168v-397l-2 -170q162 129 303 129q193 0 297 -136t104 -372q0 -123 -35 -226t-94.5 -170t-137 -104t-163.5 -37q-131 0 -274 111l2 -170v-336h-168zM336 221q123 -104 244 -104q125 0 204.5 107t79.5 288q0 173 -63.5 270t-198.5 97q-115 0 -266 -136 v-522z" />
+<glyph unicode="ÿ" horiz-adv-x="956" d="M25 995h174l202 -551q41 -113 97 -280h8q16 51 45 150t39 130l178 551h164l-375 -1077q-28 -79 -60 -138t-76.5 -108t-104 -74.5t-132.5 -25.5q-61 0 -116 20l32 134q50 -15 76 -15q154 0 225 213l23 74zM221 1305q0 43 29 71.5t72 28.5t71.5 -28.5t28.5 -71.5t-28.5 -72 t-71.5 -29t-72 29t-29 72zM575 1305q0 43 28 71.5t71 28.5q44 0 72 -28.5t28 -71.5t-28 -72t-72 -29q-43 0 -71 29t-28 72z" />
+<glyph unicode="Œ" horiz-adv-x="1734" d="M106 678q0 318 172.5 491.5t485.5 173.5h850v-143h-570v-422h476v-145h-476v-488h590v-145h-878q-306 0 -478 178.5t-172 499.5zM283 678q0 -259 126 -399t367 -140h98v1065h-98q-242 0 -367.5 -135t-125.5 -391z" />
+<glyph unicode="œ" horiz-adv-x="1718" d="M94 496q0 122 36.5 222.5t98.5 165.5t143.5 100.5t172.5 35.5q116 0 211.5 -65t148.5 -185q57 118 149.5 184t200.5 66q182 0 283.5 -126.5t101.5 -342.5q0 -57 -6 -94h-653q6 -153 95 -248.5t218 -95.5q117 0 246 82l62 -117q-161 -103 -328 -103q-116 0 -213 66 t-154 182q-118 -248 -366 -248q-90 0 -171 35.5t-142.5 100.5t-97.5 165t-36 220zM266 496q0 -170 78 -275.5t201 -105.5t200.5 105.5t77.5 275.5q0 171 -77.5 278t-200.5 107t-201 -107t-78 -278zM981 569h512q0 153 -63.5 235.5t-178.5 82.5q-105 0 -181 -87t-89 -231z " />
+<glyph unicode="Ÿ" horiz-adv-x="974" d="M-2 1343h182l174 -378q111 -254 129 -293h9q113 241 135 293l172 378h178l-404 -823v-520h-172v520zM211 1565q0 44 28 72t72 28q43 0 71 -28t28 -72q0 -43 -28 -72t-71 -29q-44 0 -72 29t-28 72zM563 1565q0 44 29 72t72 28t71.5 -28t28.5 -72q0 -43 -28.5 -72 t-71.5 -29t-72 29t-29 72z" />
+<glyph unicode="ˆ" horiz-adv-x="1110" d="M293 1174l192 288h140l194 -288h-123l-137 186h-8l-137 -186h-121z" />
+<glyph unicode="˜" horiz-adv-x="1110" d="M270 1186q8 97 51 157t115 60q35 0 71 -16.5t60.5 -36t52.5 -36t50 -16.5q57 0 75 105h95q-8 -97 -51 -157t-115 -60q-34 0 -69.5 16t-59.5 36t-53 36t-52 16q-58 0 -73 -104h-97z" />
+<glyph unicode=" " horiz-adv-x="896" />
+<glyph unicode=" " horiz-adv-x="1792" />
+<glyph unicode=" " horiz-adv-x="896" />
+<glyph unicode=" " horiz-adv-x="1792" />
+<glyph unicode=" " horiz-adv-x="597" />
+<glyph unicode=" " horiz-adv-x="448" />
+<glyph unicode=" " horiz-adv-x="298" />
+<glyph unicode=" " horiz-adv-x="298" />
+<glyph unicode=" " horiz-adv-x="224" />
+<glyph unicode=" " horiz-adv-x="358" />
+<glyph unicode=" " horiz-adv-x="99" />
+<glyph unicode="‐" horiz-adv-x="636" d="M84 449v129h471v-129h-471z" />
+<glyph unicode="‑" horiz-adv-x="636" d="M84 449v129h471v-129h-471z" />
+<glyph unicode="‒" horiz-adv-x="636" d="M84 449v129h471v-129h-471z" />
+<glyph unicode="–" horiz-adv-x="983" d="M84 457v116h815v-116h-815z" />
+<glyph unicode="—" horiz-adv-x="1638" d="M84 457v116h1470v-116h-1470z" />
+<glyph unicode="‘" horiz-adv-x="509" d="M117 1061q0 238 217 364l49 -79q-81 -53 -118.5 -111t-37.5 -143q6 2 19 2q44 0 76 -28t32 -77q0 -52 -30 -82t-78 -30q-62 0 -95.5 47.5t-33.5 136.5z" />
+<glyph unicode="’" horiz-adv-x="509" d="M129 961q80 53 117 111.5t37 144.5q-9 -3 -17 -3q-45 0 -76.5 27.5t-31.5 75.5q0 53 30 84t78 31q60 0 94.5 -49t34.5 -138q0 -235 -219 -362z" />
+<glyph unicode="‚" horiz-adv-x="509" d="M129 -219q81 55 117.5 112.5t36.5 143.5q-6 -2 -17 -2q-45 0 -76.5 27.5t-31.5 74.5q0 53 30 84t78 31q60 0 94.5 -48.5t34.5 -137.5q0 -236 -219 -363z" />
+<glyph unicode="“" horiz-adv-x="872" d="M117 1061q0 238 217 364l49 -79q-81 -53 -118.5 -111t-37.5 -143q6 2 19 2q44 0 76 -28t32 -77q0 -52 -30 -82t-78 -30q-62 0 -95.5 47.5t-33.5 136.5zM477 1061q0 238 219 364l47 -79q-80 -54 -117.5 -112t-37.5 -142q6 2 18 2q45 0 77 -28t32 -77q0 -52 -30.5 -82 t-78.5 -30q-62 0 -95.5 47.5t-33.5 136.5z" />
+<glyph unicode="”" horiz-adv-x="872" d="M129 961q80 53 117 111.5t37 144.5q-9 -3 -17 -3q-45 0 -76.5 27.5t-31.5 75.5q0 53 30 84t78 31q60 0 94.5 -49t34.5 -138q0 -235 -219 -362zM489 961q81 54 118.5 112t37.5 144q-9 -3 -18 -3q-45 0 -77 28t-32 75q0 53 30.5 84t78.5 31q62 0 95.5 -49t33.5 -138 q0 -236 -217 -362z" />
+<glyph unicode="„" horiz-adv-x="872" d="M129 -219q81 55 117.5 112.5t36.5 143.5q-6 -2 -17 -2q-45 0 -76.5 27.5t-31.5 74.5q0 53 30 84t78 31q60 0 94.5 -48.5t34.5 -137.5q0 -236 -219 -363zM489 -219q81 56 118.5 113.5t37.5 142.5q-6 -2 -18 -2q-45 0 -77 27.5t-32 74.5q0 53 30.5 84t78.5 31 q62 0 95.5 -48.5t33.5 -137.5q0 -237 -217 -363z" />
+<glyph unicode="•" horiz-adv-x="622" d="M82 539q0 108 67 177.5t162 69.5t162.5 -69.5t67.5 -177.5t-67.5 -177t-162.5 -69t-162 69t-67 177z" />
+<glyph unicode="…" horiz-adv-x="1941" d="M193 102q0 58 35 94.5t87 36.5q51 0 86 -37t35 -94q0 -55 -35.5 -91t-85.5 -36q-52 0 -87 36t-35 91zM879 102q0 58 35 94.5t87 36.5q51 0 86 -37t35 -94q0 -55 -35.5 -91t-85.5 -36q-52 0 -87 36t-35 91zM1565 102q0 58 35.5 94.5t87.5 36.5q50 0 85 -37t35 -94 q0 -55 -35 -91t-85 -36q-52 0 -87.5 36t-35.5 91z" />
+<glyph unicode=" " horiz-adv-x="358" />
+<glyph unicode="‹" horiz-adv-x="555" d="M92 453v127l279 317l73 -61l-241 -320l241 -323l-73 -58z" />
+<glyph unicode="›" horiz-adv-x="555" d="M111 193l241 323l-241 320l71 61l281 -317v-127l-281 -318z" />
+<glyph unicode=" " horiz-adv-x="448" />
+<glyph unicode="€" d="M47 481v88l121 9q-2 25 -2 73q0 46 2 66h-121v90l131 10q35 241 169 377.5t335 136.5q88 0 168 -44t137 -116l-100 -96q-96 121 -211 121q-133 0 -217 -99.5t-109 -279.5h520v-100h-528q-2 -18 -2 -60q0 -52 2 -77h446v-99h-436q27 -175 107 -272.5t205 -97.5 q72 0 129 35.5t112 109.5l101 -90q-144 -191 -353 -191q-186 0 -313 134t-162 372h-131z" />
+<glyph unicode="™" horiz-adv-x="1304" d="M6 1274v110h531v-110h-205v-524h-123v524h-203zM635 750v634h153l95 -229l55 -162h8l55 162l93 229h151v-634h-117v280l13 215h-8l-146 -397h-92l-147 397h-9l15 -215v-280h-119z" />
+<glyph unicode="◼" horiz-adv-x="993" d="M0 0v993h993v-993h-993z" />
+<glyph unicode="fi" horiz-adv-x="1138" d="M61 858v127l136 10v158q0 157 72 243.5t218 86.5q83 0 166 -33l-37 -129q-58 25 -112 25q-139 0 -139 -193v-158h210v-137h-210v-858h-168v858h-136zM772 1309q0 49 33.5 78.5t83.5 29.5t82.5 -29.5t32.5 -78.5q0 -47 -32.5 -78t-82.5 -31t-83.5 31t-33.5 78zM803 0v995 h168v-995h-168z" />
+<glyph unicode="fl" horiz-adv-x="1120" d="M61 858v127l136 10v158q0 157 72 243.5t218 86.5q83 0 166 -33l-37 -129q-58 25 -112 25q-139 0 -139 -193v-158h210v-137h-210v-858h-168v858h-136zM766 201v1257h168v-1270q0 -37 13 -55t34 -18q19 0 37 4l22 -127q-42 -17 -96 -17q-93 0 -135.5 57t-42.5 169z" />
+<hkern u1="/" u2="ï" k="-14" />
+<hkern u1="F" u2="™" k="-78" />
+<hkern u1="F" u2="ï" k="-74" />
+<hkern u1="F" u2="î" k="-37" />
+<hkern u1="F" u2="·" k="29" />
+<hkern u1="F" u2="®" k="-41" />
+<hkern u1="F" u2="x" k="53" />
+<hkern u1="F" u2="v" k="41" />
+<hkern u1="F" u2="X" k="49" />
+<hkern u1="F" u2="V" k="-8" />
+<hkern u1="F" u2="/" k="141" />
+<hkern u1="P" u2="·" k="16" />
+<hkern u1="P" u2="®" k="-61" />
+<hkern u1="P" u2="x" k="29" />
+<hkern u1="P" u2="X" k="49" />
+<hkern u1="P" u2="/" k="154" />
+<hkern u1="V" u2="™" k="-111" />
+<hkern u1="V" u2="ï" k="-104" />
+<hkern u1="V" u2="î" k="-82" />
+<hkern u1="V" u2="ì" k="-20" />
+<hkern u1="V" u2="·" k="23" />
+<hkern u1="V" u2="®" k="-109" />
+<hkern u1="V" u2="x" k="31" />
+<hkern u1="V" u2="v" k="18" />
+<hkern u1="V" u2="/" k="96" />
+<hkern u1="X" u2="™" k="-43" />
+<hkern u1="X" u2="·" k="82" />
+<hkern u1="X" u2="®" k="-16" />
+<hkern u1="X" u2="x" k="20" />
+<hkern u1="X" u2="v" k="33" />
+<hkern u1="X" u2="*" k="20" />
+<hkern u1="\" u2="v" k="41" />
+<hkern u1="\" u2="V" k="109" />
+<hkern u1="v" u2="™" k="-27" />
+<hkern u1="v" u2="®" k="-92" />
+<hkern u1="v" u2="V" k="8" />
+<hkern u1="v" u2="/" k="41" />
+<hkern u1="v" u2="*" k="16" />
+<hkern u1="x" u2="™" k="-27" />
+<hkern u1="x" u2="·" k="41" />
+<hkern u1="x" u2="®" k="-78" />
+<hkern u1="x" u2="X" k="20" />
+<hkern u1="x" u2="V" k="14" />
+<hkern u1="x" u2="*" k="31" />
+<hkern u1="¡" u2="V" k="66" />
+<hkern u1="£" u2="5" k="12" />
+<hkern u1="£" u2="3" k="12" />
+<hkern u1="·" u2="x" k="41" />
+<hkern u1="·" u2="X" k="53" />
+<hkern u1="·" u2="V" k="53" />
+<hkern u1="¿" u2="X" k="86" />
+<hkern u1="¿" u2="V" k="119" />
+<hkern u1="Þ" u2="™" k="49" />
+<hkern u1="Þ" u2="\" k="82" />
+<hkern u1="Þ" u2="/" k="119" />
+<hkern u1="Þ" u2="*" k="127" />
+<hkern u1="ß" u2="®" k="72" />
+<hkern u1="ß" u2="x" k="-12" />
+<hkern u1="ß" u2="v" k="33" />
+<hkern u1="ß" u2="\" k="53" />
+<hkern g1="exclam" g2="quoteright,quotedblright" k="66" />
+<hkern g1="exclamdown" g2="W" k="33" />
+<hkern g1="exclamdown" g2="Y,Yacute,Ydieresis" k="92" />
+<hkern g1="exclamdown" g2="j" k="-68" />
+<hkern g1="periodcentered" g2="T" k="131" />
+<hkern g1="periodcentered" g2="Y,Yacute,Ydieresis" k="119" />
+<hkern g1="periodcentered" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="49" />
+<hkern g1="periodcentered" g2="S" k="49" />
+<hkern g1="periodcentered" g2="Z" k="78" />
+<hkern g1="questiondown" g2="T" k="178" />
+<hkern g1="questiondown" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="82" />
+<hkern g1="questiondown" g2="W" k="82" />
+<hkern g1="questiondown" g2="Y,Yacute,Ydieresis" k="182" />
+<hkern g1="questiondown" g2="j" k="-121" />
+<hkern g1="questiondown" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="127" />
+<hkern g1="questiondown" g2="S" k="72" />
+<hkern g1="questiondown" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="90" />
+<hkern g1="questiondown" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="72" />
+<hkern g1="questiondown" g2="f,uniFB01,uniFB02" k="127" />
+<hkern g1="questiondown" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="43" />
+<hkern g1="slash" g2="g" k="20" />
+<hkern g1="slash" g2="j" k="-51" />
+<hkern g1="slash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="82" />
+<hkern g1="slash" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="49" />
+<hkern g1="slash" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="63" />
+<hkern g1="slash" g2="J" k="164" />
+<hkern g1="slash" g2="i,igrave,iacute,icircumflex,idieresis" k="-51" />
+<hkern g1="slash" g2="t" k="-18" />
+<hkern g1="slash" g2="u,ugrave,uacute,ucircumflex,udieresis" k="41" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="T" k="82" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="31" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="Y,Yacute,Ydieresis" k="29" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="w" k="8" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="y,yacute,ydieresis" k="29" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="quoteright,quotedblright" k="113" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="Z" k="16" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="f,uniFB01,uniFB02" k="20" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="t" k="29" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="u,ugrave,uacute,ucircumflex,udieresis" k="12" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="asterisk" k="193" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="backslash" k="82" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="periodcentered" k="49" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="registered" k="164" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="trademark" k="106" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="V" k="29" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="X" k="-8" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="question" k="53" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="quotedbl,quotesingle" k="106" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="quoteleft,quotedblleft" k="119" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="v" k="29" />
+<hkern g1="B" g2="T" k="49" />
+<hkern g1="B" g2="W" k="8" />
+<hkern g1="B" g2="Y,Yacute,Ydieresis" k="29" />
+<hkern g1="B" g2="w" k="20" />
+<hkern g1="B" g2="y,yacute,ydieresis" k="29" />
+<hkern g1="B" g2="S" k="29" />
+<hkern g1="B" g2="Z" k="8" />
+<hkern g1="B" g2="J" k="33" />
+<hkern g1="B" g2="t" k="20" />
+<hkern g1="B" g2="asterisk" k="61" />
+<hkern g1="B" g2="periodcentered" k="41" />
+<hkern g1="B" g2="trademark" k="41" />
+<hkern g1="B" g2="V" k="12" />
+<hkern g1="B" g2="X" k="8" />
+<hkern g1="B" g2="v" k="29" />
+<hkern g1="B" g2="x" k="20" />
+<hkern g1="C,Ccedilla" g2="T" k="37" />
+<hkern g1="C,Ccedilla" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="29" />
+<hkern g1="C,Ccedilla" g2="W" k="8" />
+<hkern g1="C,Ccedilla" g2="Y,Yacute,Ydieresis" k="14" />
+<hkern g1="C,Ccedilla" g2="g" k="41" />
+<hkern g1="C,Ccedilla" g2="w" k="20" />
+<hkern g1="C,Ccedilla" g2="y,yacute,ydieresis" k="29" />
+<hkern g1="C,Ccedilla" g2="S" k="49" />
+<hkern g1="C,Ccedilla" g2="Z" k="20" />
+<hkern g1="C,Ccedilla" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="59" />
+<hkern g1="C,Ccedilla" g2="J" k="20" />
+<hkern g1="C,Ccedilla" g2="t" k="29" />
+<hkern g1="C,Ccedilla" g2="u,ugrave,uacute,ucircumflex,udieresis" k="20" />
+<hkern g1="C,Ccedilla" g2="periodcentered" k="106" />
+<hkern g1="C,Ccedilla" g2="registered" k="-29" />
+<hkern g1="C,Ccedilla" g2="trademark" k="-41" />
+<hkern g1="C,Ccedilla" g2="V" k="8" />
+<hkern g1="C,Ccedilla" g2="X" k="8" />
+<hkern g1="C,Ccedilla" g2="v" k="29" />
+<hkern g1="C,Ccedilla" g2="hyphen,uni00AD,endash,emdash" k="53" />
+<hkern g1="C,Ccedilla" g2="guillemotleft,guilsinglleft" k="29" />
+<hkern g1="G" g2="T" k="41" />
+<hkern g1="G" g2="W" k="8" />
+<hkern g1="G" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="8" />
+<hkern g1="G" g2="asterisk" k="57" />
+<hkern g1="G" g2="registered" k="-16" />
+<hkern g1="G" g2="trademark" k="-31" />
+<hkern g1="G" g2="V" k="29" />
+<hkern g1="K" g2="T" k="33" />
+<hkern g1="K" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="29" />
+<hkern g1="K" g2="W" k="20" />
+<hkern g1="K" g2="Y,Yacute,Ydieresis" k="33" />
+<hkern g1="K" g2="j" k="20" />
+<hkern g1="K" g2="w" k="33" />
+<hkern g1="K" g2="y,yacute,ydieresis" k="41" />
+<hkern g1="K" g2="quoteright,quotedblright" k="37" />
+<hkern g1="K" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="K" g2="S" k="29" />
+<hkern g1="K" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="45" />
+<hkern g1="K" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="14" />
+<hkern g1="K" g2="t" k="53" />
+<hkern g1="K" g2="u,ugrave,uacute,ucircumflex,udieresis" k="29" />
+<hkern g1="K" g2="asterisk" k="41" />
+<hkern g1="K" g2="periodcentered" k="94" />
+<hkern g1="K" g2="trademark" k="-31" />
+<hkern g1="K" g2="V" k="25" />
+<hkern g1="K" g2="question" k="14" />
+<hkern g1="K" g2="quotedbl,quotesingle" k="41" />
+<hkern g1="K" g2="quoteleft,quotedblleft" k="37" />
+<hkern g1="K" g2="v" k="41" />
+<hkern g1="K" g2="x" k="33" />
+<hkern g1="K" g2="hyphen,uni00AD,endash,emdash" k="61" />
+<hkern g1="K" g2="guillemotleft,guilsinglleft" k="20" />
+<hkern g1="K" g2="z" k="29" />
+<hkern g1="L" g2="T" k="246" />
+<hkern g1="L" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="59" />
+<hkern g1="L" g2="W" k="115" />
+<hkern g1="L" g2="Y,Yacute,Ydieresis" k="156" />
+<hkern g1="L" g2="g" k="8" />
+<hkern g1="L" g2="w" k="70" />
+<hkern g1="L" g2="y,yacute,ydieresis" k="74" />
+<hkern g1="L" g2="quoteright,quotedblright" k="160" />
+<hkern g1="L" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="-6" />
+<hkern g1="L" g2="S" k="45" />
+<hkern g1="L" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="53" />
+<hkern g1="L" g2="f,uniFB01,uniFB02" k="29" />
+<hkern g1="L" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="25" />
+<hkern g1="L" g2="t" k="41" />
+<hkern g1="L" g2="u,ugrave,uacute,ucircumflex,udieresis" k="20" />
+<hkern g1="L" g2="asterisk" k="311" />
+<hkern g1="L" g2="backslash" k="164" />
+<hkern g1="L" g2="periodcentered" k="188" />
+<hkern g1="L" g2="registered" k="188" />
+<hkern g1="L" g2="trademark" k="201" />
+<hkern g1="L" g2="V" k="156" />
+<hkern g1="L" g2="question" k="66" />
+<hkern g1="L" g2="quotedbl,quotesingle" k="182" />
+<hkern g1="L" g2="quoteleft,quotedblleft" k="160" />
+<hkern g1="L" g2="v" k="74" />
+<hkern g1="L" g2="hyphen,uni00AD,endash,emdash" k="111" />
+<hkern g1="L" g2="guillemotleft,guilsinglleft" k="70" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="T" k="41" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="W" k="12" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Y,Yacute,Ydieresis" k="41" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Z" k="41" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="J" k="82" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="asterisk" k="70" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="registered" k="-12" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="trademark" k="53" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="slash" k="29" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="V" k="20" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="X" k="35" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="z" k="14" />
+<hkern g1="R" g2="T" k="41" />
+<hkern g1="R" g2="Y,Yacute,Ydieresis" k="29" />
+<hkern g1="R" g2="g" k="20" />
+<hkern g1="R" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="R" g2="S" k="29" />
+<hkern g1="R" g2="Z" k="20" />
+<hkern g1="R" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="20" />
+<hkern g1="R" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="R" g2="J" k="37" />
+<hkern g1="R" g2="asterisk" k="20" />
+<hkern g1="R" g2="periodcentered" k="20" />
+<hkern g1="R" g2="registered" k="-29" />
+<hkern g1="R" g2="V" k="29" />
+<hkern g1="R" g2="X" k="20" />
+<hkern g1="R" g2="x" k="29" />
+<hkern g1="R" g2="hyphen,uni00AD,endash,emdash" k="78" />
+<hkern g1="R" g2="guillemotleft,guilsinglleft" k="61" />
+<hkern g1="R" g2="z" k="29" />
+<hkern g1="R" g2="guillemotright,guilsinglright" k="29" />
+<hkern g1="S" g2="T" k="41" />
+<hkern g1="S" g2="Y,Yacute,Ydieresis" k="14" />
+<hkern g1="S" g2="S" k="29" />
+<hkern g1="S" g2="J" k="29" />
+<hkern g1="S" g2="asterisk" k="37" />
+<hkern g1="S" g2="periodcentered" k="16" />
+<hkern g1="S" g2="registered" k="-8" />
+<hkern g1="T" g2="Y,Yacute,Ydieresis" k="29" />
+<hkern g1="T" g2="g" k="150" />
+<hkern g1="T" g2="w" k="70" />
+<hkern g1="T" g2="y,yacute,ydieresis" k="68" />
+<hkern g1="T" g2="comma,period,ellipsis" k="217" />
+<hkern g1="T" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="82" />
+<hkern g1="T" g2="S" k="80" />
+<hkern g1="T" g2="Z" k="111" />
+<hkern g1="T" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="49" />
+<hkern g1="T" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="150" />
+<hkern g1="T" g2="f,uniFB01,uniFB02" k="37" />
+<hkern g1="T" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="135" />
+<hkern g1="T" g2="J" k="258" />
+<hkern g1="T" g2="t" k="37" />
+<hkern g1="T" g2="u,ugrave,uacute,ucircumflex,udieresis" k="94" />
+<hkern g1="T" g2="periodcentered" k="131" />
+<hkern g1="T" g2="registered" k="-41" />
+<hkern g1="T" g2="trademark" k="-70" />
+<hkern g1="T" g2="slash" k="182" />
+<hkern g1="T" g2="X" k="41" />
+<hkern g1="T" g2="v" k="68" />
+<hkern g1="T" g2="x" k="80" />
+<hkern g1="T" g2="hyphen,uni00AD,endash,emdash" k="164" />
+<hkern g1="T" g2="guillemotleft,guilsinglleft" k="96" />
+<hkern g1="T" g2="m,n,p,r,ntilde" k="94" />
+<hkern g1="T" g2="s" k="121" />
+<hkern g1="T" g2="z" k="154" />
+<hkern g1="T" g2="guillemotright,guilsinglright" k="82" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="Y,Yacute,Ydieresis" k="29" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="g" k="20" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="comma,period,ellipsis" k="33" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="37" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="S" k="20" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="8" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="J" k="96" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="slash" k="63" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="V" k="20" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="X" k="20" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="x" k="14" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="s" k="8" />
+<hkern g1="W" g2="g" k="27" />
+<hkern g1="W" g2="comma,period,ellipsis" k="70" />
+<hkern g1="W" g2="S" k="12" />
+<hkern g1="W" g2="Z" k="12" />
+<hkern g1="W" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="12" />
+<hkern g1="W" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="33" />
+<hkern g1="W" g2="J" k="133" />
+<hkern g1="W" g2="registered" k="-80" />
+<hkern g1="W" g2="trademark" k="-70" />
+<hkern g1="W" g2="slash" k="59" />
+<hkern g1="W" g2="hyphen,uni00AD,endash,emdash" k="8" />
+<hkern g1="W" g2="guillemotleft,guilsinglleft" k="20" />
+<hkern g1="W" g2="z" k="20" />
+<hkern g1="W" g2="guillemotright,guilsinglright" k="33" />
+<hkern g1="Y,Yacute,Ydieresis" g2="T" k="29" />
+<hkern g1="Y,Yacute,Ydieresis" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="Y,Yacute,Ydieresis" g2="g" k="123" />
+<hkern g1="Y,Yacute,Ydieresis" g2="w" k="49" />
+<hkern g1="Y,Yacute,Ydieresis" g2="y,yacute,ydieresis" k="29" />
+<hkern g1="Y,Yacute,Ydieresis" g2="quoteright,quotedblright" k="-18" />
+<hkern g1="Y,Yacute,Ydieresis" g2="comma,period,ellipsis" k="186" />
+<hkern g1="Y,Yacute,Ydieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="29" />
+<hkern g1="Y,Yacute,Ydieresis" g2="S" k="33" />
+<hkern g1="Y,Yacute,Ydieresis" g2="Z" k="53" />
+<hkern g1="Y,Yacute,Ydieresis" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="29" />
+<hkern g1="Y,Yacute,Ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="137" />
+<hkern g1="Y,Yacute,Ydieresis" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="84" />
+<hkern g1="Y,Yacute,Ydieresis" g2="J" k="205" />
+<hkern g1="Y,Yacute,Ydieresis" g2="t" k="29" />
+<hkern g1="Y,Yacute,Ydieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="70" />
+<hkern g1="Y,Yacute,Ydieresis" g2="periodcentered" k="94" />
+<hkern g1="Y,Yacute,Ydieresis" g2="registered" k="-68" />
+<hkern g1="Y,Yacute,Ydieresis" g2="trademark" k="-94" />
+<hkern g1="Y,Yacute,Ydieresis" g2="slash" k="137" />
+<hkern g1="Y,Yacute,Ydieresis" g2="question" k="14" />
+<hkern g1="Y,Yacute,Ydieresis" g2="v" k="29" />
+<hkern g1="Y,Yacute,Ydieresis" g2="x" k="70" />
+<hkern g1="Y,Yacute,Ydieresis" g2="hyphen,uni00AD,endash,emdash" k="135" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotleft,guilsinglleft" k="113" />
+<hkern g1="Y,Yacute,Ydieresis" g2="m,n,p,r,ntilde" k="82" />
+<hkern g1="Y,Yacute,Ydieresis" g2="s" k="84" />
+<hkern g1="Y,Yacute,Ydieresis" g2="z" k="96" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotright,guilsinglright" k="92" />
+<hkern g1="Y,Yacute,Ydieresis" g2="colon,semicolon" k="51" />
+<hkern g1="Z" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="Z" g2="W" k="12" />
+<hkern g1="Z" g2="Y,Yacute,Ydieresis" k="29" />
+<hkern g1="Z" g2="g" k="29" />
+<hkern g1="Z" g2="w" k="33" />
+<hkern g1="Z" g2="y,yacute,ydieresis" k="33" />
+<hkern g1="Z" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="12" />
+<hkern g1="Z" g2="S" k="61" />
+<hkern g1="Z" g2="Z" k="20" />
+<hkern g1="Z" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="41" />
+<hkern g1="Z" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="33" />
+<hkern g1="Z" g2="f,uniFB01,uniFB02" k="41" />
+<hkern g1="Z" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="43" />
+<hkern g1="Z" g2="J" k="68" />
+<hkern g1="Z" g2="t" k="29" />
+<hkern g1="Z" g2="u,ugrave,uacute,ucircumflex,udieresis" k="47" />
+<hkern g1="Z" g2="periodcentered" k="123" />
+<hkern g1="Z" g2="registered" k="-41" />
+<hkern g1="Z" g2="trademark" k="-41" />
+<hkern g1="Z" g2="V" k="12" />
+<hkern g1="Z" g2="v" k="33" />
+<hkern g1="Z" g2="hyphen,uni00AD,endash,emdash" k="70" />
+<hkern g1="Z" g2="guillemotleft,guilsinglleft" k="70" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="T" k="49" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="W" k="8" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="Y,Yacute,Ydieresis" k="49" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="quoteright,quotedblright" k="33" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="asterisk" k="111" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="V" k="33" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="question" k="25" />
+<hkern g1="c,ccedilla" g2="T" k="41" />
+<hkern g1="c,ccedilla" g2="Y,Yacute,Ydieresis" k="49" />
+<hkern g1="c,ccedilla" g2="g" k="20" />
+<hkern g1="c,ccedilla" g2="w" k="-12" />
+<hkern g1="c,ccedilla" g2="y,yacute,ydieresis" k="-12" />
+<hkern g1="c,ccedilla" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="20" />
+<hkern g1="c,ccedilla" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="43" />
+<hkern g1="c,ccedilla" g2="periodcentered" k="29" />
+<hkern g1="c,ccedilla" g2="registered" k="-41" />
+<hkern g1="c,ccedilla" g2="V" k="29" />
+<hkern g1="c,ccedilla" g2="v" k="-12" />
+<hkern g1="c,ccedilla" g2="x" k="-16" />
+<hkern g1="c,ccedilla" g2="hyphen,uni00AD,endash,emdash" k="41" />
+<hkern g1="colon,semicolon" g2="Y,Yacute,Ydieresis" k="53" />
+<hkern g1="colon,semicolon" g2="j" k="-8" />
+<hkern g1="colon,semicolon" g2="asterisk" k="100" />
+<hkern g1="comma,period,ellipsis" g2="T" k="217" />
+<hkern g1="comma,period,ellipsis" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="41" />
+<hkern g1="comma,period,ellipsis" g2="W" k="70" />
+<hkern g1="comma,period,ellipsis" g2="Y,Yacute,Ydieresis" k="188" />
+<hkern g1="comma,period,ellipsis" g2="j" k="-53" />
+<hkern g1="comma,period,ellipsis" g2="w" k="45" />
+<hkern g1="comma,period,ellipsis" g2="y,yacute,ydieresis" k="41" />
+<hkern g1="comma,period,ellipsis" g2="quoteright,quotedblright" k="213" />
+<hkern g1="comma,period,ellipsis" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="16" />
+<hkern g1="comma,period,ellipsis" g2="t" k="57" />
+<hkern g1="comma,period,ellipsis" g2="asterisk" k="283" />
+<hkern g1="comma,period,ellipsis" g2="V" k="147" />
+<hkern g1="comma,period,ellipsis" g2="quotedbl,quotesingle" k="197" />
+<hkern g1="comma,period,ellipsis" g2="quoteleft,quotedblleft" k="172" />
+<hkern g1="comma,period,ellipsis" g2="v" k="72" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="T" k="49" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="W" k="20" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="Y,Yacute,Ydieresis" k="53" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="g" k="20" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="w" k="-10" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="y,yacute,ydieresis" k="-10" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quoteright,quotedblright" k="20" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="S" k="41" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="29" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="J" k="41" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="t" k="29" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="asterisk" k="70" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="backslash" k="41" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="periodcentered" k="8" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="trademark" k="35" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="V" k="33" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="question" k="14" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="v" k="-10" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="x" k="14" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="hyphen,uni00AD,endash,emdash" k="-12" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="z" k="-8" />
+<hkern g1="f" g2="T" k="-94" />
+<hkern g1="f" g2="W" k="-94" />
+<hkern g1="f" g2="Y,Yacute,Ydieresis" k="-94" />
+<hkern g1="f" g2="g" k="29" />
+<hkern g1="f" g2="j" k="20" />
+<hkern g1="f" g2="quoteright,quotedblright" k="-70" />
+<hkern g1="f" g2="comma,period,ellipsis" k="102" />
+<hkern g1="f" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="41" />
+<hkern g1="f" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="f" g2="u,ugrave,uacute,ucircumflex,udieresis" k="31" />
+<hkern g1="f" g2="backslash" k="-127" />
+<hkern g1="f" g2="periodcentered" k="41" />
+<hkern g1="f" g2="registered" k="-154" />
+<hkern g1="f" g2="trademark" k="-156" />
+<hkern g1="f" g2="slash" k="29" />
+<hkern g1="f" g2="exclam" k="-29" />
+<hkern g1="f" g2="V" k="-111" />
+<hkern g1="f" g2="X" k="-68" />
+<hkern g1="f" g2="question" k="-53" />
+<hkern g1="f" g2="quotedbl,quotesingle" k="-82" />
+<hkern g1="f" g2="quoteleft,quotedblleft" k="-70" />
+<hkern g1="f" g2="v" k="-27" />
+<hkern g1="f" g2="x" k="8" />
+<hkern g1="f" g2="hyphen,uni00AD,endash,emdash" k="29" />
+<hkern g1="f" g2="s" k="8" />
+<hkern g1="f" g2="z" k="29" />
+<hkern g1="f" g2="parenright,bracketright,braceright" k="-100" />
+<hkern g1="g" g2="T" k="53" />
+<hkern g1="g" g2="Y,Yacute,Ydieresis" k="29" />
+<hkern g1="g" g2="j" k="-76" />
+<hkern g1="g" g2="w" k="8" />
+<hkern g1="g" g2="y,yacute,ydieresis" k="8" />
+<hkern g1="g" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="33" />
+<hkern g1="g" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="29" />
+<hkern g1="g" g2="asterisk" k="70" />
+<hkern g1="g" g2="periodcentered" k="16" />
+<hkern g1="g" g2="registered" k="-29" />
+<hkern g1="g" g2="slash" k="-98" />
+<hkern g1="g" g2="question" k="74" />
+<hkern g1="g" g2="v" k="8" />
+<hkern g1="g" g2="z" k="29" />
+<hkern g1="g" g2="parenright,bracketright,braceright" k="-29" />
+<hkern g1="k" g2="T" k="45" />
+<hkern g1="k" g2="Y,Yacute,Ydieresis" k="23" />
+<hkern g1="k" g2="g" k="20" />
+<hkern g1="k" g2="j" k="20" />
+<hkern g1="k" g2="quoteright,quotedblright" k="53" />
+<hkern g1="k" g2="comma,period,ellipsis" k="-29" />
+<hkern g1="k" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="20" />
+<hkern g1="k" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="37" />
+<hkern g1="k" g2="t" k="29" />
+<hkern g1="k" g2="u,ugrave,uacute,ucircumflex,udieresis" k="29" />
+<hkern g1="k" g2="asterisk" k="29" />
+<hkern g1="k" g2="periodcentered" k="53" />
+<hkern g1="k" g2="registered" k="14" />
+<hkern g1="k" g2="trademark" k="41" />
+<hkern g1="k" g2="question" k="25" />
+<hkern g1="k" g2="x" k="8" />
+<hkern g1="k" g2="hyphen,uni00AD,endash,emdash" k="90" />
+<hkern g1="k" g2="guillemotleft,guilsinglleft" k="53" />
+<hkern g1="k" g2="z" k="14" />
+<hkern g1="k" g2="guillemotright,guilsinglright" k="14" />
+<hkern g1="h,m,n,ntilde" g2="T" k="49" />
+<hkern g1="h,m,n,ntilde" g2="Y,Yacute,Ydieresis" k="33" />
+<hkern g1="h,m,n,ntilde" g2="asterisk" k="70" />
+<hkern g1="h,m,n,ntilde" g2="trademark" k="41" />
+<hkern g1="h,m,n,ntilde" g2="V" k="20" />
+<hkern g1="h,m,n,ntilde" g2="question" k="14" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="T" k="117" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="Y,Yacute,Ydieresis" k="94" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="w" k="8" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="y,yacute,ydieresis" k="8" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="quoteright,quotedblright" k="53" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="comma,period,ellipsis" k="20" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="29" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="backslash" k="53" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="registered" k="14" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="V" k="39" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="X" k="8" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="question" k="25" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="quoteleft,quotedblleft" k="29" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="v" k="8" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="x" k="35" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="hyphen,uni00AD,endash,emdash" k="-12" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="z" k="12" />
+<hkern g1="quoteleft,quotedblleft" g2="Y,Yacute,Ydieresis" k="-18" />
+<hkern g1="quoteleft,quotedblleft" g2="g" k="68" />
+<hkern g1="quoteleft,quotedblleft" g2="comma,period,ellipsis" k="170" />
+<hkern g1="quoteleft,quotedblleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="113" />
+<hkern g1="quoteleft,quotedblleft" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="88" />
+<hkern g1="quoteleft,quotedblleft" g2="f,uniFB01,uniFB02" k="29" />
+<hkern g1="quoteleft,quotedblleft" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="68" />
+<hkern g1="quoteleft,quotedblleft" g2="exclamdown" k="109" />
+<hkern g1="quoteleft,quotedblleft" g2="questiondown" k="272" />
+<hkern g1="quoteleft,quotedblleft" g2="X" k="14" />
+<hkern g1="r" g2="g" k="20" />
+<hkern g1="r" g2="j" k="12" />
+<hkern g1="r" g2="w" k="-27" />
+<hkern g1="r" g2="y,yacute,ydieresis" k="-39" />
+<hkern g1="r" g2="quoteright,quotedblright" k="14" />
+<hkern g1="r" g2="comma,period,ellipsis" k="117" />
+<hkern g1="r" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="39" />
+<hkern g1="r" g2="Z" k="20" />
+<hkern g1="r" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="51" />
+<hkern g1="r" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="r" g2="J" k="113" />
+<hkern g1="r" g2="backslash" k="-27" />
+<hkern g1="r" g2="periodcentered" k="33" />
+<hkern g1="r" g2="registered" k="-127" />
+<hkern g1="r" g2="slash" k="70" />
+<hkern g1="r" g2="quoteleft,quotedblleft" k="-70" />
+<hkern g1="r" g2="v" k="-39" />
+<hkern g1="r" g2="hyphen,uni00AD,endash,emdash" k="49" />
+<hkern g1="r" g2="guillemotleft,guilsinglleft" k="41" />
+<hkern g1="r" g2="s" k="20" />
+<hkern g1="r" g2="z" k="20" />
+<hkern g1="s" g2="T" k="49" />
+<hkern g1="s" g2="Y,Yacute,Ydieresis" k="41" />
+<hkern g1="s" g2="quoteright,quotedblright" k="23" />
+<hkern g1="s" g2="asterisk" k="100" />
+<hkern g1="s" g2="V" k="20" />
+<hkern g1="s" g2="question" k="23" />
+<hkern g1="s" g2="hyphen,uni00AD,endash,emdash" k="-20" />
+<hkern g1="t" g2="T" k="29" />
+<hkern g1="t" g2="Y,Yacute,Ydieresis" k="8" />
+<hkern g1="t" g2="g" k="20" />
+<hkern g1="t" g2="comma,period,ellipsis" k="-29" />
+<hkern g1="t" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="37" />
+<hkern g1="t" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="t" g2="u,ugrave,uacute,ucircumflex,udieresis" k="12" />
+<hkern g1="t" g2="periodcentered" k="41" />
+<hkern g1="t" g2="registered" k="-70" />
+<hkern g1="t" g2="slash" k="-29" />
+<hkern g1="t" g2="question" k="53" />
+<hkern g1="t" g2="hyphen,uni00AD,endash,emdash" k="53" />
+<hkern g1="t" g2="guillemotleft,guilsinglleft" k="37" />
+<hkern g1="t" g2="colon,semicolon" k="-29" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="T" k="41" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="Y,Yacute,Ydieresis" k="61" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="asterisk" k="49" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="V" k="29" />
+<hkern g1="w" g2="T" k="49" />
+<hkern g1="w" g2="Y,Yacute,Ydieresis" k="23" />
+<hkern g1="w" g2="j" k="20" />
+<hkern g1="w" g2="comma,period,ellipsis" k="84" />
+<hkern g1="w" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="8" />
+<hkern g1="w" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="20" />
+<hkern g1="w" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="8" />
+<hkern g1="w" g2="J" k="61" />
+<hkern g1="w" g2="asterisk" k="16" />
+<hkern g1="w" g2="registered" k="-78" />
+<hkern g1="w" g2="trademark" k="-29" />
+<hkern g1="w" g2="slash" k="16" />
+<hkern g1="w" g2="V" k="8" />
+<hkern g1="w" g2="X" k="29" />
+<hkern g1="w" g2="z" k="35" />
+<hkern g1="y,yacute,ydieresis" g2="T" k="41" />
+<hkern g1="y,yacute,ydieresis" g2="Y,Yacute,Ydieresis" k="14" />
+<hkern g1="y,yacute,ydieresis" g2="j" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="comma,period,ellipsis" k="72" />
+<hkern g1="y,yacute,ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="41" />
+<hkern g1="y,yacute,ydieresis" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="8" />
+<hkern g1="y,yacute,ydieresis" g2="J" k="82" />
+<hkern g1="y,yacute,ydieresis" g2="registered" k="-92" />
+<hkern g1="y,yacute,ydieresis" g2="trademark" k="-27" />
+<hkern g1="y,yacute,ydieresis" g2="slash" k="29" />
+<hkern g1="y,yacute,ydieresis" g2="V" k="8" />
+<hkern g1="y,yacute,ydieresis" g2="X" k="8" />
+<hkern g1="y,yacute,ydieresis" g2="z" k="49" />
+<hkern g1="z" g2="T" k="53" />
+<hkern g1="z" g2="Y,Yacute,Ydieresis" k="8" />
+<hkern g1="z" g2="g" k="12" />
+<hkern g1="z" g2="y,yacute,ydieresis" k="8" />
+<hkern g1="z" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="47" />
+<hkern g1="z" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="z" g2="u,ugrave,uacute,ucircumflex,udieresis" k="20" />
+<hkern g1="z" g2="periodcentered" k="16" />
+<hkern g1="z" g2="registered" k="-51" />
+<hkern g1="z" g2="trademark" k="-27" />
+<hkern g1="z" g2="v" k="8" />
+<hkern g1="z" g2="hyphen,uni00AD,endash,emdash" k="33" />
+<hkern g1="F" g2="W" k="-8" />
+<hkern g1="F" g2="g" k="49" />
+<hkern g1="F" g2="w" k="33" />
+<hkern g1="F" g2="y,yacute,ydieresis" k="33" />
+<hkern g1="F" g2="comma,period,ellipsis" k="147" />
+<hkern g1="F" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="76" />
+<hkern g1="F" g2="S" k="41" />
+<hkern g1="F" g2="Z" k="61" />
+<hkern g1="F" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="F" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="70" />
+<hkern g1="F" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="29" />
+<hkern g1="F" g2="J" k="283" />
+<hkern g1="F" g2="t" k="20" />
+<hkern g1="F" g2="u,ugrave,uacute,ucircumflex,udieresis" k="33" />
+<hkern g1="F" g2="guillemotleft,guilsinglleft" k="41" />
+<hkern g1="F" g2="m,n,p,r,ntilde" k="41" />
+<hkern g1="F" g2="s" k="41" />
+<hkern g1="F" g2="z" k="61" />
+<hkern g1="J" g2="comma,period,ellipsis" k="49" />
+<hkern g1="J" g2="J" k="80" />
+<hkern g1="P" g2="T" k="49" />
+<hkern g1="P" g2="Y,Yacute,Ydieresis" k="20" />
+<hkern g1="P" g2="g" k="61" />
+<hkern g1="P" g2="comma,period,ellipsis" k="229" />
+<hkern g1="P" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="102" />
+<hkern g1="P" g2="S" k="20" />
+<hkern g1="P" g2="Z" k="160" />
+<hkern g1="P" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="88" />
+<hkern g1="P" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="49" />
+<hkern g1="P" g2="J" k="299" />
+<hkern g1="P" g2="hyphen,uni00AD,endash,emdash" k="51" />
+<hkern g1="P" g2="guillemotleft,guilsinglleft" k="41" />
+<hkern g1="P" g2="s" k="20" />
+<hkern g1="P" g2="z" k="41" />
+<hkern g1="V" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="V" g2="g" k="43" />
+<hkern g1="V" g2="w" k="18" />
+<hkern g1="V" g2="y,yacute,ydieresis" k="18" />
+<hkern g1="V" g2="comma,period,ellipsis" k="133" />
+<hkern g1="V" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="29" />
+<hkern g1="V" g2="S" k="33" />
+<hkern g1="V" g2="Z" k="39" />
+<hkern g1="V" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="V" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="45" />
+<hkern g1="V" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="31" />
+<hkern g1="V" g2="J" k="150" />
+<hkern g1="V" g2="i,igrave,iacute,icircumflex,idieresis" k="6" />
+<hkern g1="V" g2="u,ugrave,uacute,ucircumflex,udieresis" k="61" />
+<hkern g1="V" g2="hyphen,uni00AD,endash,emdash" k="39" />
+<hkern g1="V" g2="guillemotleft,guilsinglleft" k="43" />
+<hkern g1="V" g2="m,n,p,r,ntilde" k="41" />
+<hkern g1="V" g2="s" k="25" />
+<hkern g1="V" g2="z" k="51" />
+<hkern g1="V" g2="guillemotright,guilsinglright" k="39" />
+<hkern g1="X" g2="T" k="41" />
+<hkern g1="X" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="X" g2="w" k="29" />
+<hkern g1="X" g2="y,yacute,ydieresis" k="33" />
+<hkern g1="X" g2="quoteright,quotedblright" k="14" />
+<hkern g1="X" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="-6" />
+<hkern g1="X" g2="S" k="29" />
+<hkern g1="X" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="35" />
+<hkern g1="X" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="20" />
+<hkern g1="X" g2="f,uniFB01,uniFB02" k="33" />
+<hkern g1="X" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="14" />
+<hkern g1="X" g2="J" k="10" />
+<hkern g1="X" g2="t" k="33" />
+<hkern g1="X" g2="u,ugrave,uacute,ucircumflex,udieresis" k="20" />
+<hkern g1="X" g2="quotedbl,quotesingle" k="8" />
+<hkern g1="X" g2="quoteleft,quotedblleft" k="14" />
+<hkern g1="X" g2="hyphen,uni00AD,endash,emdash" k="55" />
+<hkern g1="X" g2="guillemotleft,guilsinglleft" k="29" />
+<hkern g1="X" g2="z" k="29" />
+<hkern g1="X" g2="guillemotright,guilsinglright" k="14" />
+<hkern g1="parenleft,bracketleft,braceleft" g2="j" k="-164" />
+<hkern g1="parenleft,bracketleft,braceleft" g2="J" k="41" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="T" k="51" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="W" k="8" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="Y,Yacute,Ydieresis" k="135" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="Z" k="41" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="V" k="53" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="X" k="53" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="v" k="8" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="x" k="29" />
+<hkern g1="germandbls" g2="w" k="29" />
+<hkern g1="germandbls" g2="y,yacute,ydieresis" k="33" />
+<hkern g1="germandbls" g2="quoteright,quotedblright" k="115" />
+<hkern g1="germandbls" g2="f,uniFB01,uniFB02" k="8" />
+<hkern g1="germandbls" g2="t" k="33" />
+<hkern g1="germandbls" g2="question" k="33" />
+<hkern g1="germandbls" g2="quotedbl,quotesingle" k="137" />
+<hkern g1="germandbls" g2="quoteleft,quotedblleft" k="98" />
+<hkern g1="guillemotleft,guilsinglleft" g2="T" k="82" />
+<hkern g1="guillemotleft,guilsinglleft" g2="W" k="35" />
+<hkern g1="guillemotleft,guilsinglleft" g2="Y,Yacute,Ydieresis" k="92" />
+<hkern g1="guillemotleft,guilsinglleft" g2="V" k="35" />
+<hkern g1="guillemotleft,guilsinglleft" g2="X" k="14" />
+<hkern g1="guillemotleft,guilsinglleft" g2="x" k="41" />
+<hkern g1="guillemotright,guilsinglright" g2="T" k="94" />
+<hkern g1="guillemotright,guilsinglright" g2="W" k="20" />
+<hkern g1="guillemotright,guilsinglright" g2="Y,Yacute,Ydieresis" k="113" />
+<hkern g1="guillemotright,guilsinglright" g2="S" k="61" />
+<hkern g1="guillemotright,guilsinglright" g2="Z" k="37" />
+<hkern g1="guillemotright,guilsinglright" g2="J" k="61" />
+<hkern g1="guillemotright,guilsinglright" g2="V" k="43" />
+<hkern g1="guillemotright,guilsinglright" g2="X" k="29" />
+<hkern g1="guillemotright,guilsinglright" g2="x" k="49" />
+<hkern g1="question" g2="quoteright,quotedblright" k="43" />
+<hkern g1="quotedbl,quotesingle" g2="comma,period,ellipsis" k="236" />
+<hkern g1="quotedbl,quotesingle" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="113" />
+<hkern g1="quotedbl,quotesingle" g2="X" k="8" />
+<hkern g1="quotedbl,quotesingle" g2="s" k="41" />
+<hkern g1="quoteright,quotedblright" g2="g" k="68" />
+<hkern g1="quoteright,quotedblright" g2="comma,period,ellipsis" k="270" />
+<hkern g1="quoteright,quotedblright" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="119" />
+<hkern g1="quoteright,quotedblright" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="70" />
+<hkern g1="quoteright,quotedblright" g2="f,uniFB01,uniFB02" k="33" />
+<hkern g1="quoteright,quotedblright" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="68" />
+<hkern g1="quoteright,quotedblright" g2="X" k="14" />
+<hkern g1="quoteright,quotedblright" g2="s" k="100" />
+<hkern g1="v" g2="T" k="41" />
+<hkern g1="v" g2="Y,Yacute,Ydieresis" k="14" />
+<hkern g1="v" g2="j" k="20" />
+<hkern g1="v" g2="comma,period,ellipsis" k="72" />
+<hkern g1="v" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="23" />
+<hkern g1="v" g2="Z" k="8" />
+<hkern g1="v" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="41" />
+<hkern g1="v" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="8" />
+<hkern g1="v" g2="J" k="82" />
+<hkern g1="v" g2="hyphen,uni00AD,endash,emdash" k="14" />
+<hkern g1="v" g2="z" k="49" />
+<hkern g1="x" g2="T" k="68" />
+<hkern g1="x" g2="Y,Yacute,Ydieresis" k="31" />
+<hkern g1="x" g2="y,yacute,ydieresis" k="29" />
+<hkern g1="x" g2="S" k="8" />
+<hkern g1="x" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="x" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="20" />
+<hkern g1="x" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="35" />
+<hkern g1="x" g2="hyphen,uni00AD,endash,emdash" k="29" />
+<hkern g1="x" g2="guillemotleft,guilsinglleft" k="49" />
+<hkern g1="x" g2="guillemotright,guilsinglright" k="41" />
+</font>
+</defs></svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="source_sans_prosemibold" horiz-adv-x="1050" >
+<font-face units-per-em="2048" ascent="1536" descent="-512" />
+<missing-glyph horiz-adv-x="419" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="
" horiz-adv-x="2048" />
+<glyph unicode=" " horiz-adv-x="419" />
+<glyph unicode="	" horiz-adv-x="419" />
+<glyph unicode=" " horiz-adv-x="419" />
+<glyph unicode="!" horiz-adv-x="645" d="M170 135q0 69 44.5 114.5t109.5 45.5t108 -45.5t43 -114.5t-43 -114.5t-108 -45.5t-109.5 45.5t-44.5 114.5zM205 1372h237l-8 -233l-33 -699h-157l-33 699z" />
+<glyph unicode=""" horiz-adv-x="987" d="M160 1409h241l-6 -231l-47 -375h-135l-45 375zM584 1409h243l-8 -231l-47 -375h-133l-47 375z" />
+<glyph unicode="#" d="M72 399v156h174l33 264h-166v156h186l45 356h141l-43 -356h240l47 356h139l-43 -356h164v-156h-182l-33 -264h174v-156h-192l-47 -399h-144l47 399h-239l-49 -399h-144l49 399h-157zM389 555h242l33 264h-242z" />
+<glyph unicode="$" d="M92 135l107 160q160 -127 303 -127q98 0 148 45.5t50 130.5q0 54 -30.5 98t-80 75.5t-109 61t-118.5 63.5t-108.5 75t-80 103.5t-30.5 140.5q0 141 82 237t221 121v209h164v-205q164 -20 297 -160l-121 -137q-62 57 -115 83t-122 26q-84 0 -131 -42.5t-47 -121.5 q0 -49 30.5 -89t80 -68t109 -56t118.5 -62t108.5 -76.5t80 -109t30.5 -150.5q0 -147 -83.5 -246.5t-234.5 -127.5v-211h-164v205q-95 9 -190.5 50.5t-163.5 104.5z" />
+<glyph unicode="%" horiz-adv-x="1722" d="M61 942q0 197 88 309.5t232 112.5t231.5 -112t87.5 -310q0 -199 -87.5 -312.5t-231.5 -113.5t-232 113.5t-88 312.5zM231 942q0 -145 41 -217t109 -72t108.5 72t40.5 217q0 144 -40.5 214.5t-108.5 70.5t-109 -70.5t-41 -214.5zM424 -25l731 1389h143l-731 -1389h-143z M1022 401q0 198 87.5 310t231.5 112t232 -112.5t88 -309.5q0 -199 -88 -312.5t-232 -113.5t-231.5 113.5t-87.5 312.5zM1192 401q0 -145 40.5 -216.5t108.5 -71.5t109 72t41 216t-41 214.5t-109 70.5t-108.5 -70.5t-40.5 -214.5z" />
+<glyph unicode="&" horiz-adv-x="1308" d="M57 352q0 66 20 123.5t58.5 104.5t79.5 82t98 73q-86 159 -86 295q0 141 93.5 237.5t244.5 96.5q135 0 215 -78t80 -207q0 -51 -17.5 -99t-42 -84t-67.5 -76.5t-77 -66.5t-87 -63q125 -169 305 -307q116 154 170 356h218q-75 -258 -230 -465q145 -87 242 -106l-60 -193 q-166 41 -325 144q-173 -144 -404 -144q-195 0 -311.5 107.5t-116.5 269.5zM283 367q0 -93 65 -151t166 -58q104 0 215 80q-192 162 -317 337q-129 -104 -129 -208zM424 1032q0 -84 53 -196q99 62 149 116t50 125q0 58 -26.5 92.5t-82.5 34.5q-63 0 -103 -48t-40 -124z" />
+<glyph unicode="'" horiz-adv-x="563" d="M160 1409h241l-6 -231l-47 -375h-135l-45 375z" />
+<glyph unicode="(" horiz-adv-x="663" d="M158 569q0 261 68.5 488.5t201.5 445.5l147 -65q-225 -383 -225 -869q0 -485 225 -868l-147 -66q-133 218 -201.5 445.5t-68.5 488.5z" />
+<glyph unicode=")" horiz-adv-x="663" d="M88 -299q225 383 225 868q0 486 -225 869l148 65q133 -218 201.5 -445.5t68.5 -488.5t-68.5 -488.5t-201.5 -445.5z" />
+<glyph unicode="*" horiz-adv-x="897" d="M98 1155l39 123l223 -51l23 231h129l23 -231l225 51l39 -123l-211 -92l119 -201l-105 -76l-153 179l-156 -179l-105 76l119 201z" />
+<glyph unicode="+" d="M70 590v172h366v387h178v-387h367v-172h-367v-387h-178v387h-366z" />
+<glyph unicode="," horiz-adv-x="563" d="M96 -244q98 38 152.5 104t54.5 144h-18q-63 0 -107.5 40t-44.5 106q0 64 46 104.5t112 40.5q83 0 129.5 -64t46.5 -178q0 -151 -84 -262t-236 -164z" />
+<glyph unicode="-" horiz-adv-x="659" d="M86 430v172h487v-172h-487z" />
+<glyph unicode="." horiz-adv-x="563" d="M129 135q0 69 44.5 114.5t109.5 45.5t108 -45.5t43 -114.5t-43 -114.5t-108 -45.5t-109.5 45.5t-44.5 114.5z" />
+<glyph unicode="/" horiz-adv-x="704" d="M25 -328l477 1782h160l-478 -1782h-159z" />
+<glyph unicode="0" d="M82 657q0 324 118 497t324 173t324.5 -173.5t118.5 -496.5q0 -326 -119 -504t-324 -178t-323.5 178t-118.5 504zM307 657q0 -497 217 -497t217 497q0 135 -15.5 231t-45.5 151t-68 79.5t-88 24.5q-217 0 -217 -486z" />
+<glyph unicode="1" d="M152 0v193h290v856h-239v147q180 35 301 107h176v-1110h256v-193h-784z" />
+<glyph unicode="2" d="M68 1126q95 102 191.5 151.5t223.5 49.5q187 0 299.5 -108.5t112.5 -290.5q0 -56 -16 -114.5t-50.5 -121.5t-72 -118.5t-98.5 -127t-110.5 -125.5t-125.5 -135q170 15 217 15h319v-201h-880v137q107 104 171 167t141.5 144t120 136t83 117t57.5 113.5t17 100.5 q0 104 -56 165t-159 61q-123 0 -254 -146z" />
+<glyph unicode="3" d="M49 160l113 151q139 -143 309 -143q107 0 173.5 53t66.5 144q0 53 -18.5 92t-61 69t-118.5 45t-185 15v172q340 0 340 209q0 81 -51.5 127.5t-141.5 46.5q-129 0 -262 -123l-121 145q186 164 391 164q191 0 306.5 -90.5t115.5 -253.5q0 -210 -227 -299v-8 q121 -32 195.5 -116t74.5 -208q0 -173 -131 -275t-325 -102q-276 0 -443 185z" />
+<glyph unicode="4" d="M37 336v160l516 807h281v-785h163v-182h-163v-336h-222v336h-575zM270 518h342v295q0 61 11 270h-9q-9 -18 -106 -202z" />
+<glyph unicode="5" d="M49 156l109 151q147 -139 305 -139q111 0 181.5 67t70.5 183q0 115 -65.5 179.5t-174.5 64.5q-60 0 -103 -16.5t-106 -57.5l-112 71l39 644h696v-199h-492l-26 -316q88 43 172 43q85 0 158 -24.5t130 -73t89 -128t32 -181.5q0 -104 -37.5 -190t-101.5 -142t-146 -86.5 t-173 -30.5q-264 0 -445 181z" />
+<glyph unicode="6" d="M90 612q0 147 28 268t75.5 203t113.5 137.5t139.5 81t155.5 25.5q208 0 348 -147l-127 -144q-36 44 -93 71.5t-114 27.5q-51 0 -94 -15.5t-81.5 -51t-66.5 -90t-45 -137.5t-20 -188q56 71 133.5 112.5t149.5 41.5q175 0 278 -103t103 -301q0 -190 -119 -309t-291 -119 q-78 0 -147.5 24t-129.5 74.5t-103.5 124.5t-68 180t-24.5 234zM315 485q18 -168 81.5 -248.5t162.5 -80.5q85 0 140 65.5t55 181.5q0 114 -53.5 173t-151.5 59q-132 0 -234 -150z" />
+<glyph unicode="7" d="M90 1104v199h875v-144q-91 -113 -154.5 -219t-104.5 -205t-66 -218.5t-37 -235.5t-19 -281h-240q18 353 97.5 599t265.5 505h-617z" />
+<glyph unicode="8" d="M84 334q0 208 235 334v8q-180 130 -180 305q0 156 111 251t282 95q174 0 278.5 -96.5t104.5 -255.5q0 -89 -51 -168t-123 -131v-8q105 -59 165.5 -138.5t60.5 -199.5q0 -153 -122.5 -254t-318.5 -101q-192 0 -317 101t-125 258zM291 358q0 -95 68.5 -155t170.5 -60 q95 0 155 53t60 142q0 40 -15.5 73t-40 56.5t-64.5 46.5t-80 40.5t-95 40.5q-12 5 -18 7q-65 -47 -103 -109.5t-38 -134.5zM350 981q0 -47 19 -84.5t59 -67t80.5 -49.5t103.5 -45q109 109 109 226q0 88 -52 143t-141 55q-77 0 -127.5 -48t-50.5 -130z" />
+<glyph unicode="9" d="M76 901q0 190 118.5 308t290.5 118q97 0 181 -38.5t149.5 -114t103 -199.5t37.5 -283q0 -183 -42 -324.5t-114 -225t-162 -125.5t-194 -42q-207 0 -348 148l127 143q38 -44 94 -71t115 -27q64 0 116 25t94.5 79.5t67.5 150t29 226.5q-56 -69 -134 -110t-150 -41 q-173 0 -276 102.5t-103 300.5zM293 901q0 -114 54 -173.5t153 -59.5q60 0 121 37t112 114q-18 166 -82.5 247t-163.5 81q-83 0 -138.5 -66t-55.5 -180z" />
+<glyph unicode=":" horiz-adv-x="563" d="M129 135q0 69 44.5 114.5t109.5 45.5t108 -45.5t43 -114.5t-43 -114.5t-108 -45.5t-109.5 45.5t-44.5 114.5zM129 836q0 68 44.5 113.5t109.5 45.5t108 -45t43 -114t-43 -114.5t-108 -45.5t-109.5 45.5t-44.5 114.5z" />
+<glyph unicode=";" horiz-adv-x="563" d="M96 -244q98 38 152.5 104t54.5 144h-18q-63 0 -107.5 40t-44.5 106q0 64 46 104.5t112 40.5q83 0 129.5 -64t46.5 -178q0 -151 -84 -262t-236 -164zM129 836q0 68 44.5 113.5t109.5 45.5t108 -45t43 -114t-43 -114.5t-108 -45.5t-109.5 45.5t-44.5 114.5z" />
+<glyph unicode="<" d="M70 594v172l911 354v-198l-395 -140l-277 -98v-8l277 -98l395 -140v-198z" />
+<glyph unicode="=" d="M70 360v172h911v-172h-911zM70 819v172h911v-172h-911z" />
+<glyph unicode=">" d="M70 240v198l395 140l276 98v8l-276 98l-395 140v198l911 -354v-172z" />
+<glyph unicode="?" horiz-adv-x="909" d="M82 1219q151 178 358 178q171 0 275 -88.5t104 -251.5q0 -71 -33 -137t-78 -118t-89.5 -104.5t-71.5 -118.5t-19 -139h-206q-12 83 11 158t65 130.5t85 105.5t75 103t32 103q0 74 -44.5 119t-121.5 45q-116 0 -211 -106zM274 135q0 69 43.5 114.5t108.5 45.5t109.5 -45.5 t44.5 -114.5t-44.5 -114.5t-109.5 -45.5t-108.5 45.5t-43.5 114.5z" />
+<glyph unicode="@" horiz-adv-x="1792" d="M102 418q0 205 71.5 381t192.5 295t283 186.5t342 67.5q318 0 509.5 -195t191.5 -510q0 -106 -26.5 -198t-70.5 -156t-101 -109.5t-118.5 -67.5t-122.5 -22q-90 0 -151 40.5t-74 115.5h-4q-46 -62 -114.5 -101t-133.5 -39q-114 0 -186 81.5t-72 218.5q0 87 30 174.5 t82 157.5t129 113.5t163 43.5q106 0 159 -100h4l27 84h150l-88 -433q-52 -206 102 -206q101 0 180.5 110t79.5 285q0 119 -34 220t-101.5 179t-177 122t-250.5 44q-134 0 -261.5 -56t-226.5 -154.5t-159 -246t-60 -317.5q0 -147 47 -265t130 -193t191.5 -114.5t235.5 -39.5 q168 0 322 84l55 -131q-181 -103 -395 -103q-154 0 -288.5 48.5t-238 140t-163.5 237.5t-60 328zM700 420q0 -81 33 -120.5t92 -39.5q76 0 162 107l53 301q-45 71 -112 71t-121 -52t-80.5 -124t-26.5 -143z" />
+<glyph unicode="A" horiz-adv-x="1142" d="M-4 0l436 1339h279l436 -1339h-250l-104 362h-451l-104 -362h-242zM397 549h342l-47 164q-29 94 -121 442h-8q-67 -271 -119 -442z" />
+<glyph unicode="B" horiz-adv-x="1222" d="M170 0v1339h428q479 0 479 -329q0 -101 -58.5 -181.5t-170.5 -109.5v-8q299 -51 299 -318q0 -130 -68 -220t-181.5 -131.5t-264.5 -41.5h-463zM408 184h200q150 0 228.5 56.5t78.5 169.5q0 204 -307 204h-200v-430zM408 784h170q266 0 266 197q0 91 -64.5 132.5 t-197.5 41.5h-174v-371z" />
+<glyph unicode="C" horiz-adv-x="1179" d="M100 666q0 160 48.5 293t132 221t196.5 136t242 48q114 0 213 -48t168 -122l-133 -147q-110 110 -246 110q-168 0 -272.5 -131t-104.5 -354q0 -228 99.5 -359t269.5 -131q160 0 280 133l133 -145q-170 -195 -417 -195q-129 0 -239.5 46t-193 132t-129.5 218t-47 295z" />
+<glyph unicode="D" horiz-adv-x="1280" d="M170 0v1339h358q312 0 482 -168t170 -495q0 -329 -168.5 -502.5t-470.5 -173.5h-371zM408 193h104q206 0 315 120t109 363q0 471 -424 471h-104v-954z" />
+<glyph unicode="E" horiz-adv-x="1101" d="M170 0v1339h807v-200h-569v-342h481v-201h-481v-395h589v-201h-827z" />
+<glyph unicode="F" horiz-adv-x="1044" d="M170 0v1339h809v-200h-571v-379h487v-201h-487v-559h-238z" />
+<glyph unicode="G" horiz-adv-x="1286" d="M100 666q0 161 49 293.5t135 220.5t202.5 136t252.5 48q234 0 400 -170l-131 -147q-56 54 -117.5 82t-149.5 28q-180 0 -288.5 -130.5t-108.5 -354.5q0 -232 105.5 -361t304.5 -129q126 0 192 60v288h-254v195h467v-590q-73 -71 -187.5 -115.5t-246.5 -44.5 q-134 0 -248 46t-198 132.5t-131.5 218t-47.5 294.5z" />
+<glyph unicode="H" horiz-adv-x="1357" d="M170 0v1339h238v-538h542v538h238v-1339h-238v594h-542v-594h-238z" />
+<glyph unicode="I" horiz-adv-x="577" d="M170 0v1339h238v-1339h-238z" />
+<glyph unicode="J" horiz-adv-x="1011" d="M49 203l164 121q77 -142 209 -142q96 0 142 59.5t46 198.5v899h238v-919q0 -94 -23.5 -173t-70.5 -140.5t-125 -96.5t-180 -35q-272 0 -400 228z" />
+<glyph unicode="K" horiz-adv-x="1222" d="M170 0v1339h238v-608h6l477 608h264l-412 -522l482 -817h-262l-363 631l-192 -240v-391h-238z" />
+<glyph unicode="L" horiz-adv-x="1028" d="M170 0v1339h238v-1138h557v-201h-795z" />
+<glyph unicode="M" horiz-adv-x="1525" d="M170 0v1339h262l242 -659l88 -254h8l86 254l238 659h262v-1339h-223v612q0 118 30 426h-8l-108 -305l-232 -608h-110l-232 608l-106 305h-9q31 -318 31 -426v-612h-219z" />
+<glyph unicode="N" horiz-adv-x="1343" d="M170 0v1339h244l417 -753l138 -285h8q-3 39 -12 136.5t-14 175.5t-5 145v581h228v-1339h-244l-418 754l-137 284h-8q3 -42 11.5 -137.5t13.5 -171.5t5 -143v-586h-227z" />
+<glyph unicode="O" horiz-adv-x="1380" d="M100 676q0 319 162.5 503.5t427.5 184.5q266 0 429 -184t163 -504q0 -322 -163.5 -511.5t-428.5 -189.5q-264 0 -427 189.5t-163 511.5zM344 676q0 -226 94 -360t252 -134t252 134t94 360q0 223 -93.5 352t-252.5 129t-252.5 -129t-93.5 -352z" />
+<glyph unicode="P" horiz-adv-x="1212" d="M170 0v1339h451q509 0 509 -413q0 -144 -68 -243.5t-180.5 -145t-260.5 -45.5h-213v-492h-238zM408 682h194q295 0 295 244q0 122 -71.5 172.5t-223.5 50.5h-194v-467z" />
+<glyph unicode="Q" horiz-adv-x="1380" d="M100 676q0 319 162.5 503.5t427.5 184.5q266 0 429 -184t163 -504q0 -276 -122 -457t-329 -227q44 -76 126.5 -113t185.5 -37q70 0 145 23l43 -178q-83 -37 -215 -37q-193 0 -331 91t-205 245q-220 39 -350 221.5t-130 468.5zM344 676q0 -234 93.5 -370t252.5 -136 t252.5 136t93.5 370q0 223 -93.5 352t-252.5 129t-252.5 -129t-93.5 -352z" />
+<glyph unicode="R" horiz-adv-x="1226" d="M170 0v1339h453q491 0 491 -397q0 -148 -70.5 -244t-195.5 -139l319 -559h-266l-289 524h-204v-524h-238zM408 713h190q138 0 210.5 58t72.5 171q0 112 -70.5 159.5t-212.5 47.5h-190v-436z" />
+<glyph unicode="S" horiz-adv-x="1116" d="M78 172l139 162q74 -69 166 -110.5t182 -41.5q112 0 173 46.5t61 125.5q0 23 -6 43.5t-13 35t-25 30t-30 24.5t-40 22.5t-43 20t-50 21.5l-184 80q-271 114 -271 356q0 161 128 269t323 108q115 0 223.5 -45.5t187.5 -124.5l-120 -152q-137 115 -291 115 q-96 0 -153.5 -42.5t-57.5 -115.5q0 -22 7 -41.5t15 -33.5t28 -29t32 -23.5t41.5 -22t42 -19t47.5 -19.5l182 -76q130 -56 200 -140.5t70 -221.5q0 -169 -131 -283.5t-350 -114.5q-135 0 -261.5 51.5t-221.5 145.5z" />
+<glyph unicode="T" horiz-adv-x="1118" d="M53 1139v200h1012v-200h-387v-1139h-238v1139h-387z" />
+<glyph unicode="U" horiz-adv-x="1341" d="M164 588v751h237v-770q0 -208 70.5 -297.5t200.5 -89.5q132 0 205 90t73 297v770h228v-751q0 -613 -506 -613q-508 0 -508 613z" />
+<glyph unicode="V" horiz-adv-x="1097" d="M-8 1339h252l188 -673q19 -66 57 -209.5t62 -227.5h8q27 91 68 249.5t49 187.5l186 673h244l-416 -1339h-280z" />
+<glyph unicode="W" horiz-adv-x="1638" d="M37 1339h244l116 -675q45 -279 66 -428h8q10 47 27.5 134.5t32 159t28.5 134.5l164 675h207l164 -675q17 -75 46.5 -220.5t43.5 -207.5h8q11 75 32.5 218.5t30.5 209.5l117 675h227l-256 -1339h-294l-166 705q-40 179 -60 309h-8q-29 -164 -61 -309l-162 -705h-289z" />
+<glyph unicode="X" horiz-adv-x="1107" d="M27 0l381 690l-357 649h264l148 -297q18 -33 51.5 -101.5t50.5 -102.5h8q55 132 91 204l141 297h252l-357 -659l381 -680h-264l-164 315q-17 33 -52 105t-56 115h-8q-45 -106 -99 -220l-159 -315h-252z" />
+<glyph unicode="Y" horiz-adv-x="1026" d="M-8 1339h254l145 -342q66 -170 119 -295h8q106 252 123 295l145 342h248l-403 -841v-498h-238v498z" />
+<glyph unicode="Z" horiz-adv-x="1105" d="M82 0v143l647 996h-588v200h883v-143l-649 -995h653v-201h-946z" />
+<glyph unicode="[" horiz-adv-x="663" d="M184 -311v1761h402v-129h-224v-1503h224v-129h-402z" />
+<glyph unicode="\" horiz-adv-x="704" d="M43 1454h160l479 -1782h-160z" />
+<glyph unicode="]" horiz-adv-x="663" d="M78 -182h223v1503h-223v129h401v-1761h-401v129z" />
+<glyph unicode="^" d="M113 571l313 801h197l315 -801h-199l-112 310l-99 276h-8l-96 -276l-113 -310h-198z" />
+<glyph unicode="_" horiz-adv-x="1024" d="M25 -131h974v-141h-974v141z" />
+<glyph unicode="`" horiz-adv-x="1124" d="M295 1473h233l185 -299h-176z" />
+<glyph unicode="a" horiz-adv-x="1071" d="M106 270q0 161 141.5 250t450.5 123q-2 88 -44.5 142.5t-137.5 54.5q-119 0 -283 -99l-86 158q208 131 412 131q187 0 281 -110.5t94 -323.5v-596h-193l-18 111h-6q-161 -136 -311 -136q-133 0 -216.5 82t-83.5 213zM336 289q0 -65 38.5 -97t104.5 -32q58 0 109 27 t110 83v226q-196 -25 -279 -76.5t-83 -130.5z" />
+<glyph unicode="b" horiz-adv-x="1155" d="M150 0v1446h235v-373l-6 -168q142 125 291 125q187 0 292 -138t105 -372q0 -126 -35.5 -230.5t-96 -172.5t-137.5 -105t-161 -37q-145 0 -275 127h-6l-20 -102h-186zM385 254q99 -84 203 -84t169.5 90.5t65.5 255.5q0 320 -217 320q-105 0 -221 -113v-469z" />
+<glyph unicode="c" horiz-adv-x="946" d="M84 502q0 122 41 223.5t110.5 167t160.5 101.5t192 36q174 0 295 -117l-113 -149q-83 74 -170 74q-122 0 -198 -92.5t-76 -243.5q0 -150 74.5 -242t193.5 -92q102 0 207 86l98 -150q-70 -62 -156.5 -95.5t-173.5 -33.5q-212 0 -348.5 141.5t-136.5 385.5z" />
+<glyph unicode="d" horiz-adv-x="1155" d="M88 502q0 119 35.5 220t95 167.5t136.5 103.5t159 37q81 0 140.5 -27t123.5 -83l-8 161v365h236v-1446h-195l-16 109h-9q-134 -134 -284 -134q-191 0 -302.5 140t-111.5 387zM332 504q0 -162 59 -248t168 -86q112 0 211 113v469q-96 84 -205 84q-100 0 -166.5 -89 t-66.5 -243z" />
+<glyph unicode="e" horiz-adv-x="1038" d="M84 502q0 119 39 220t104 167.5t148 103.5t172 37q199 0 307.5 -130.5t108.5 -346.5q0 -65 -11 -111h-639q15 -135 94.5 -209.5t202.5 -74.5q119 0 234 73l80 -147q-166 -109 -344 -109q-215 0 -355.5 142t-140.5 385zM311 592h447q0 122 -52 189t-153 67q-93 0 -160 -67 t-82 -189z" />
+<glyph unicode="f" horiz-adv-x="649" d="M55 819v176l135 11v104q0 166 81.5 263t252.5 97q100 0 185 -34l-45 -176q-55 24 -111 24q-127 0 -127 -170v-108h197v-187h-197v-819h-236v819h-135z" />
+<glyph unicode="g" horiz-adv-x="1064" d="M82 -182q0 126 143 215v8q-90 58 -90 168q0 55 31.5 103.5t79.5 82.5v8q-56 42 -93.5 112.5t-37.5 154.5q0 166 115.5 263t281.5 97q77 0 147 -24h361v-175h-184q57 -67 57 -169q0 -162 -107.5 -252.5t-273.5 -90.5q-70 0 -137 27q-25 -22 -37 -43t-12 -53 q0 -45 37.5 -68.5t125.5 -23.5h179q185 0 276.5 -60t91.5 -188q0 -152 -147.5 -253t-388.5 -101q-122 0 -215 28t-148 88t-55 146zM279 -147q0 -67 69 -105.5t189 -38.5q119 0 195.5 48t76.5 114q0 56 -43.5 78t-134.5 22h-137q-80 0 -138 15q-77 -60 -77 -133zM336 670 q0 -94 50 -148.5t126 -54.5q75 0 124.5 54.5t49.5 148.5q0 91 -49 144.5t-125 53.5t-126 -53t-50 -145z" />
+<glyph unicode="h" horiz-adv-x="1142" d="M150 0v1446h235v-373l-8 -194q74 70 150.5 110.5t170.5 40.5q310 0 310 -399v-631h-236v600q0 123 -37 175t-121 52q-62 0 -111 -29t-118 -96v-702h-235z" />
+<glyph unicode="i" horiz-adv-x="536" d="M123 1315q0 60 41 97.5t104 37.5t104.5 -37.5t41.5 -97.5q0 -58 -41.5 -95.5t-104.5 -37.5t-104 37.5t-41 95.5zM150 0v1006h235v-1006h-235z" />
+<glyph unicode="j" horiz-adv-x="538" d="M-94 -395l45 176q57 -17 86 -17q65 0 90 44t25 137v1061h237v-1057q0 -371 -319 -371q-89 0 -164 27zM125 1315q0 59 41.5 97t103.5 38q64 0 106 -38t42 -97q0 -58 -42.5 -95.5t-105.5 -37.5q-62 0 -103.5 37.5t-41.5 95.5z" />
+<glyph unicode="k" horiz-adv-x="1069" d="M150 0v1446h231v-903h6l373 463h258l-344 -410l379 -596h-256l-258 436l-158 -180v-256h-231z" />
+<glyph unicode="l" horiz-adv-x="555" d="M150 258v1188h235v-1200q0 -40 15 -59t36 -19q19 0 37 4l31 -176q-51 -21 -125 -21q-121 0 -175 73t-54 210z" />
+<glyph unicode="m" horiz-adv-x="1726" d="M150 0v1006h194l16 -138h9q151 162 307 162q203 0 278 -180q81 86 158.5 133t165.5 47q157 0 234 -102.5t77 -296.5v-631h-237v600q0 122 -37 174.5t-117 52.5q-95 0 -211 -125v-702h-235v600q0 122 -37.5 174.5t-118.5 52.5q-95 0 -211 -125v-702h-235z" />
+<glyph unicode="n" horiz-adv-x="1146" d="M150 0v1006h194l16 -136h9q77 76 155.5 118t173.5 42q310 0 310 -399v-631h-236v600q0 123 -37 175t-121 52q-62 0 -111 -29t-118 -96v-702h-235z" />
+<glyph unicode="o" horiz-adv-x="1124" d="M84 502q0 122 39.5 223.5t105.5 167t152 101.5t180 36q95 0 181 -36t152.5 -101.5t106 -167t39.5 -223.5t-39.5 -223t-106 -166.5t-152.5 -101.5t-181 -36q-94 0 -180 36t-152 101.5t-105.5 166.5t-39.5 223zM326 502q0 -152 63 -243t172 -91q110 0 174 91t64 243 q0 153 -64 244.5t-174 91.5q-109 0 -172 -91t-63 -245z" />
+<glyph unicode="p" horiz-adv-x="1155" d="M150 -397v1403h194l16 -107h9q153 131 303 131q186 0 290.5 -138t104.5 -374q0 -101 -23 -188.5t-64 -151.5t-95.5 -110.5t-117.5 -69.5t-130 -23q-128 0 -258 111l6 -168v-315h-235zM385 254q102 -84 203 -84q104 0 169.5 90.5t65.5 255.5q0 320 -217 320 q-105 0 -221 -113v-469z" />
+<glyph unicode="q" horiz-adv-x="1148" d="M88 502q0 119 35.5 220t95 167.5t136.5 103.5t159 37q83 0 149 -29t130 -92h6l20 97h187v-1403h-236v329l8 166q-59 -56 -131 -89.5t-145 -33.5q-191 0 -302.5 140t-111.5 387zM332 504q0 -162 59 -248t168 -86q112 0 211 113v469q-96 84 -205 84q-100 0 -166.5 -89 t-66.5 -243z" />
+<glyph unicode="r" horiz-adv-x="763" d="M150 0v1006h194l16 -179h9q53 97 128.5 150t155.5 53q71 0 115 -20l-41 -205q-56 16 -104 16q-67 0 -131 -50.5t-107 -156.5v-614h-235z" />
+<glyph unicode="s" horiz-adv-x="882" d="M49 115l111 151q144 -112 278 -112q79 0 119.5 32.5t40.5 87.5q0 37 -33.5 68.5t-63.5 45.5t-101 41q-11 5 -17 7q-46 17 -81.5 33.5t-75 42.5t-65.5 55.5t-43.5 71.5t-17.5 90q0 134 100 217.5t267 83.5q177 0 334 -121l-109 -143q-118 86 -221 86q-72 0 -109.5 -30.5 t-37.5 -80.5q0 -22 10.5 -40.5t26 -31.5t43 -26.5t50 -22t58.5 -21.5q4 -1 5.5 -1.5l4.5 -1.5t5.5 -2t4.5 -2q51 -19 84 -33.5t76 -41.5t68 -56.5t43 -74.5t18 -99q0 -135 -103.5 -223.5t-287.5 -88.5q-100 0 -202.5 39t-178.5 101z" />
+<glyph unicode="t" horiz-adv-x="739" d="M41 819v176l156 11l28 274h197v-274h256v-187h-256v-479q0 -176 141 -176q52 0 105 22l41 -174q-113 -37 -205 -37q-320 0 -320 365v479h-143z" />
+<glyph unicode="u" horiz-adv-x="1138" d="M139 375v631h236v-600q0 -123 36 -175.5t119 -52.5q65 0 115.5 32t108.5 107v689h235v-1006h-192l-19 147h-6q-71 -84 -148.5 -128t-174.5 -44q-310 0 -310 400z" />
+<glyph unicode="v" horiz-adv-x="1013" d="M25 1006h239l160 -523q6 -22 37 -132.5t47 -170.5h8q10 35 27 96.5t31.5 112.5t27.5 94l160 523h227l-342 -1006h-272z" />
+<glyph unicode="w" horiz-adv-x="1531" d="M49 1006h238l121 -523q1 -4 53 -288h8q30 165 63 288l132 523h215l133 -523q15 -57 39 -164t28 -124h8q8 44 17 92t20 106t17 90l121 523h221l-256 -1006h-281l-117 469q-13 53 -33 154t-28 139h-8q-28 -163 -60 -295l-114 -467h-271z" />
+<glyph unicode="x" horiz-adv-x="985" d="M29 0l319 524l-299 482h254l113 -191q55 -105 92 -170h8q12 27 38.5 84.5t39.5 85.5l96 191h244l-297 -508l319 -498h-254l-122 199q-64 115 -103 178h-8q-51 -101 -88 -178l-107 -199h-245z" />
+<glyph unicode="y" horiz-adv-x="1013" d="M25 1006h239l174 -494q14 -43 43 -139t45 -144h9q11 40 36 137t39 146l152 494h227l-364 -1051q-68 -185 -160.5 -277t-247.5 -92q-66 0 -131 21l43 184q42 -14 72 -14q143 0 200 172l19 63z" />
+<glyph unicode="z" horiz-adv-x="907" d="M70 0v127l475 692h-422v187h717v-125l-473 -693h489v-188h-786z" />
+<glyph unicode="{" horiz-adv-x="663" d="M66 498v143q94 1 135 45.5t41 108.5q0 66 -9.5 181.5t-9.5 190.5q0 158 59.5 220.5t192.5 62.5h111v-129h-47q-73 0 -99 -35.5t-26 -128.5q0 -57 5 -171t5 -181q0 -107 -32 -160t-105 -72v-8q73 -19 105 -72t32 -159q0 -67 -5 -181t-5 -171q0 -93 26 -128.5t99 -35.5h47 v-129h-111q-133 0 -192.5 62t-59.5 220q0 75 9.5 190.5t9.5 180.5q0 66 -41 110.5t-135 45.5z" />
+<glyph unicode="|" horiz-adv-x="522" d="M182 -512v2048h158v-2048h-158z" />
+<glyph unicode="}" horiz-adv-x="663" d="M78 -182h47q73 0 99 35.5t26 128.5q0 57 -5 171t-5 181q0 106 32 159t105 72v8q-73 19 -105 72t-32 160q0 67 5 181t5 171q0 93 -26 128.5t-99 35.5h-47v129h110q133 0 192.5 -62.5t59.5 -220.5q0 -75 -9 -190.5t-9 -181.5q0 -64 41 -108.5t135 -45.5v-143 q-94 -1 -135 -45.5t-41 -110.5q0 -65 9 -180.5t9 -190.5q0 -158 -59.5 -220t-192.5 -62h-110v129z" />
+<glyph unicode="~" d="M66 645q124 199 282 199q46 0 89.5 -17t76.5 -41t64 -48t64.5 -41t64.5 -17q85 0 151 121l125 -96q-122 -197 -281 -197q-46 0 -89 17t-76.5 41t-64 48t-64 41t-64.5 17q-85 0 -151 -121z" />
+<glyph unicode="¡" horiz-adv-x="645" d="M170 872q0 67 44.5 112.5t109.5 45.5t108 -45.5t43 -112.5q0 -70 -43 -115.5t-108 -45.5t-109.5 45.5t-44.5 115.5zM205 -367l6 234l33 698h157l33 -698l8 -234h-237z" />
+<glyph unicode="¢" d="M125 631q0 209 118 340.5t308 161.5v206h135v-200q153 -8 262 -117l-110 -145q-71 62 -152 71v-631q89 8 180 84l99 -149q-119 -107 -279 -127v-201h-135v203q-196 25 -311 156.5t-115 347.5zM354 631q0 -114 51.5 -192.5t145.5 -106.5v600q-94 -31 -145.5 -109 t-51.5 -192z" />
+<glyph unicode="£" d="M104 0v145q100 51 159 140.5t59 199.5q0 19 -9 84h-204v142l137 10h24q-43 135 -43 209q0 182 113 289.5t297 107.5q202 0 336 -160l-131 -129q-84 97 -185 97q-95 0 -148.5 -57t-53.5 -160q0 -72 34 -197h316v-152h-281q6 -43 6 -86q0 -89 -25.5 -151.5t-82.5 -122.5v-8 h553v-201h-871z" />
+<glyph unicode="¤" d="M47 313l127 129q-72 101 -72 232q0 132 72 233l-127 129l121 123l139 -143q97 63 217 63t217 -63l142 143l121 -123l-130 -129q72 -101 72 -233q0 -131 -72 -232l130 -129l-121 -123l-142 144q-94 -64 -217 -64q-121 0 -215 64l-141 -144zM315 674q0 -104 60.5 -170 t148.5 -66q89 0 149 66t60 170q0 105 -60 171t-149 66q-88 0 -148.5 -66t-60.5 -171z" />
+<glyph unicode="¥" d="M37 1303h244l131 -310q110 -267 112 -272h8q39 92 113 272l131 310h238l-318 -627h271v-121h-324v-121h324v-123h-324v-311h-237v311h-322v123h322v121h-322v121h268z" />
+<glyph unicode="¦" horiz-adv-x="522" d="M182 428h158v-940h-158v940zM182 618v918h158v-918h-158z" />
+<glyph unicode="§" d="M84 684q0 81 45.5 149.5t124.5 114.5q-61 67 -61 168q0 128 88.5 209.5t246.5 81.5q181 0 344 -125l-110 -149q-110 96 -221 96q-68 0 -101.5 -28t-33.5 -75q0 -37 31 -68t80.5 -55.5t109 -50t119.5 -58.5t109.5 -73t80.5 -101.5t31 -137.5q0 -168 -170 -269 q53 -69 53 -163q0 -132 -98.5 -217t-264.5 -85q-112 0 -211.5 41.5t-164.5 118.5l139 123q106 -106 237 -106q70 0 109 31.5t39 82.5q0 40 -30.5 72t-79 56t-107 48.5t-117.5 56.5t-107.5 71.5t-79 101.5t-30.5 139zM287 700q0 -43 22.5 -78t66 -62t87.5 -47t106 -47.5 t101 -49.5q48 25 71 59.5t23 87.5q0 37 -17.5 68.5t-44 54t-67.5 45.5t-78.5 39t-88 38.5t-85.5 41.5q-96 -58 -96 -150z" />
+<glyph unicode="¨" horiz-adv-x="1124" d="M250 1309q0 51 35 86t88 35q52 0 86.5 -35t34.5 -86q0 -53 -34.5 -88t-86.5 -35q-54 0 -88.5 35t-34.5 88zM631 1309q0 52 34 86.5t87 34.5t87.5 -34.5t34.5 -86.5q0 -53 -34 -88t-88 -35q-53 0 -87 35t-34 88z" />
+<glyph unicode="©" horiz-adv-x="1529" d="M96 664q0 153 54 282t146 214t213.5 132t256.5 47q134 0 255 -47t213 -132t146 -214t54 -282t-54 -283t-145.5 -217t-213 -135.5t-255.5 -48.5q-135 0 -256.5 48.5t-213.5 135.5t-146 217t-54 283zM215 664q0 -127 43 -236t117 -183.5t175.5 -116.5t215.5 -42t214.5 42 t174.5 116.5t117 183.5t43 236t-43 234.5t-117 181t-174.5 114.5t-214.5 41q-115 0 -216 -41t-175 -114.5t-117 -181t-43 -234.5zM401 662q0 174 114.5 282.5t272.5 108.5q84 0 146.5 -31.5t118.5 -87.5l-92 -103q-79 76 -160 76q-102 0 -162.5 -68.5t-60.5 -176.5 q0 -118 58.5 -188.5t156.5 -70.5q54 0 96 20t90 60l80 -114q-134 -111 -273 -111q-168 0 -276.5 110t-108.5 294z" />
+<glyph unicode="ª" horiz-adv-x="720" d="M68 723q0 108 94.5 166.5t300.5 77.5q-3 59 -29.5 89.5t-85.5 30.5q-81 0 -194 -65l-62 113q143 90 285 90q126 0 191 -74t65 -217v-393h-137l-17 71h-8q-95 -88 -199 -88q-92 0 -148 56.5t-56 142.5zM233 737q0 -82 95 -82q61 0 135 68v143q-230 -24 -230 -129z" />
+<glyph unicode="«" horiz-adv-x="931" d="M96 430v172l277 305l94 -76l-236 -315l236 -317l-94 -74zM451 430v172l278 305l92 -76l-233 -315l233 -317l-92 -74z" />
+<glyph unicode="¬" d="M70 590v172h911v-559h-178v387h-733z" />
+<glyph unicode="­" horiz-adv-x="659" d="M86 430v172h487v-172h-487z" />
+<glyph unicode="®" horiz-adv-x="907" d="M57 1053q0 178 115 293.5t281 115.5q167 0 281 -115t114 -294q0 -178 -114 -293t-281 -115q-166 0 -281 115.5t-115 292.5zM154 1053q0 -141 84.5 -230.5t214.5 -89.5t214.5 89.5t84.5 230.5q0 143 -84.5 233t-214.5 90t-214.5 -90t-84.5 -233zM295 854v408h170 q73 0 118.5 -33t45.5 -101q0 -36 -20 -66.5t-56 -45.5l90 -162h-108l-68 133h-70v-133h-102zM397 1061h47q35 0 55.5 16.5t20.5 44.5t-18.5 45t-55.5 17h-49v-123z" />
+<glyph unicode="¯" horiz-adv-x="1124" d="M295 1221v155h534v-155h-534z" />
+<glyph unicode="°" horiz-adv-x="712" d="M82 1124q0 122 80 200.5t196 78.5t196.5 -78.5t80.5 -200.5t-80.5 -200t-196.5 -78t-196 78t-80 200zM213 1124q0 -69 40.5 -113t104.5 -44t105 44t41 113q0 71 -41 115.5t-105 44.5t-104.5 -44.5t-40.5 -115.5z" />
+<glyph unicode="±" d="M70 0v170h911v-170h-911zM70 612v170h366v367h178v-367h367v-170h-367v-319h-178v319h-366z" />
+<glyph unicode="²" horiz-adv-x="761" d="M68 1565q114 159 286 159q128 0 204.5 -69.5t76.5 -194.5q0 -41 -14.5 -84t-32 -75.5t-59 -83t-66 -78t-82.5 -88.5h289v-150h-572v98q99 85 155.5 136.5t110 109.5t76.5 102t23 85q0 68 -36 106.5t-99 38.5q-82 0 -158 -107z" />
+<glyph unicode="³" horiz-adv-x="761" d="M63 1036l111 86q74 -108 186 -108q59 0 98.5 32t39.5 87q0 60 -56.5 91t-162.5 31v105q88 0 138 33t50 90q0 47 -33 75.5t-88 28.5q-76 0 -147 -88l-103 90q61 69 127 102t152 33q112 0 189 -60t77 -159q0 -123 -127 -190q69 -23 113.5 -73.5t44.5 -121.5 q0 -107 -86.5 -175t-210.5 -68q-100 0 -181 42t-131 117z" />
+<glyph unicode="´" horiz-adv-x="1124" d="M412 1174l182 299h235l-243 -299h-174z" />
+<glyph unicode="µ" horiz-adv-x="1150" d="M150 -410v1416h235v-600q0 -123 37.5 -175.5t120.5 -52.5q64 0 113.5 31.5t109.5 107.5v689h235v-1006h-194l-16 147h-9q-98 -159 -254 -159q-54 0 -90.5 14t-64.5 51l12 -184v-279h-235z" />
+<glyph unicode="¶" horiz-adv-x="1226" d="M82 893q0 121 38.5 209t109.5 139t160 74.5t200 23.5h90v-905h-76q-112 0 -205.5 28.5t-165 84t-111.5 144t-40 202.5zM793 -164v1503h237v-1503h-237z" />
+<glyph unicode="·" horiz-adv-x="563" d="M129 657q0 69 44.5 114.5t109.5 45.5t108 -45.5t43 -114.5t-43 -114t-108 -45t-109.5 45.5t-44.5 113.5z" />
+<glyph unicode="¸" horiz-adv-x="1124" d="M377 -342q176 21 176 94q0 32 -29.5 54.5t-95.5 39.5l82 160h143l-47 -100q121 -43 121 -150q0 -62 -47.5 -106t-119 -66t-163.5 -28z" />
+<glyph unicode="¹" horiz-adv-x="761" d="M168 1503v111q72 12 118.5 31t94.5 55h141v-799h-178v602h-176z" />
+<glyph unicode="º" horiz-adv-x="755" d="M55 872q0 161 93.5 257t228.5 96t228 -96t93 -257q0 -159 -93.5 -253.5t-227.5 -94.5q-135 0 -228.5 94.5t-93.5 253.5zM229 872q0 -96 38.5 -153t109.5 -57q70 0 108.5 57t38.5 153q0 99 -38 157t-109 58t-109.5 -58t-38.5 -157z" />
+<glyph unicode="»" horiz-adv-x="931" d="M111 199l233 317l-233 315l92 76l278 -305v-172l-278 -305zM467 199l233 317l-233 315l92 76l277 -305v-172l-277 -305z" />
+<glyph unicode="¼" horiz-adv-x="1628" d="M111 1143v110q73 11 118.5 30.5t96.5 55.5h141v-798h-178v602h-178zM375 -25l731 1389h143l-729 -1389h-145zM946 195v90l311 514h211v-484h119v-120h-119v-195h-157v195h-365zM1116 315h195v113l10 231h-8l-92 -161z" />
+<glyph unicode="½" horiz-adv-x="1693" d="M111 1143v110q73 11 118.5 30.5t96.5 55.5h141v-798h-178v602h-178zM338 -25l731 1389h143l-729 -1389h-145zM999 664q118 159 287 159q129 0 206 -69.5t77 -194.5q0 -49 -17 -96.5t-54.5 -99t-72 -91.5t-93.5 -104q-11 -12 -17 -18h287v-150h-570v98q199 172 282 264 t83 168q0 67 -36.5 106.5t-98.5 39.5q-84 0 -160 -107z" />
+<glyph unicode="¾" horiz-adv-x="1652" d="M59 676l111 86q74 -109 184 -109q59 0 98.5 32t39.5 87q0 60 -56 91.5t-162 31.5v104q88 0 138.5 33t50.5 90q0 47 -34 76t-89 29q-74 0 -145 -88l-103 90q61 68 126.5 101.5t150.5 33.5q112 0 190 -60t78 -159q0 -123 -129 -191q70 -24 115 -73.5t45 -120.5 q0 -108 -87 -176t-210 -68q-99 0 -180.5 42.5t-131.5 117.5zM436 -25l731 1389h144l-731 -1389h-144zM969 195v90l311 514h213v-484h119v-120h-119v-195h-158v195h-366zM1139 315h196v113l11 231h-9l-92 -161z" />
+<glyph unicode="¿" horiz-adv-x="909" d="M92 -51q0 60 23.5 117.5t58 99.5t74 89.5t71.5 90t50.5 100t11.5 119.5h209q11 -83 -12.5 -158t-65.5 -130.5t-85.5 -105.5t-75.5 -103t-32 -103q0 -73 45 -118.5t123 -45.5q109 0 209 107l133 -121q-157 -178 -358 -178q-171 0 -275 88.5t-104 251.5zM332 872 q0 67 43 112.5t108 45.5t108.5 -45.5t43.5 -112.5q0 -70 -43.5 -115.5t-108.5 -45.5t-108 45.5t-43 115.5z" />
+<glyph unicode="À" horiz-adv-x="1142" d="M-4 0l436 1339h279l436 -1339h-250l-104 362h-451l-104 -362h-242zM266 1679h258l172 -237h-192zM397 549h342l-47 164q-29 94 -121 442h-8q-67 -271 -119 -442z" />
+<glyph unicode="Á" horiz-adv-x="1142" d="M-4 0l436 1339h279l436 -1339h-250l-104 362h-451l-104 -362h-242zM397 549h342l-47 164q-29 94 -121 442h-8q-67 -271 -119 -442zM438 1442l172 237h258l-239 -237h-191z" />
+<glyph unicode="Â" horiz-adv-x="1142" d="M-4 0l436 1339h279l436 -1339h-250l-104 362h-451l-104 -362h-242zM256 1442l197 237h229l197 -237h-185l-123 131h-8l-123 -131h-184zM397 549h342l-47 164q-29 94 -121 442h-8q-67 -271 -119 -442z" />
+<glyph unicode="Ã" horiz-adv-x="1142" d="M-4 0l436 1339h279l436 -1339h-250l-104 362h-451l-104 -362h-242zM244 1448q12 117 65 183.5t131 66.5q47 0 93.5 -25t85 -49.5t65.5 -24.5q65 0 82 99h123q-12 -116 -66 -183t-131 -67q-47 0 -92.5 25t-84 50t-66.5 25q-29 0 -50 -25.5t-30 -74.5h-125zM397 549h342 l-47 164q-29 94 -121 442h-8q-67 -271 -119 -442z" />
+<glyph unicode="Ä" horiz-adv-x="1142" d="M-4 0l436 1339h279l436 -1339h-250l-104 362h-451l-104 -362h-242zM254 1571q0 54 34.5 88.5t88.5 34.5t88.5 -34.5t34.5 -88.5q0 -53 -34.5 -87t-88.5 -34t-88.5 34t-34.5 87zM397 549h342l-47 164q-29 94 -121 442h-8q-67 -271 -119 -442zM635 1571q0 54 34.5 88.5 t88.5 34.5q53 0 87 -34.5t34 -88.5q0 -53 -34.5 -87t-86.5 -34q-54 0 -88.5 34t-34.5 87z" />
+<glyph unicode="Å" horiz-adv-x="1142" d="M-4 0l436 1339h279l436 -1339h-250l-104 362h-451l-104 -362h-242zM356 1620q0 86 58.5 138t152.5 52q93 0 152 -52t59 -138q0 -87 -58.5 -138.5t-152.5 -51.5q-95 0 -153 51.5t-58 138.5zM397 549h342l-47 164q-29 94 -121 442h-8q-67 -271 -119 -442zM475 1620 q0 -44 26 -70t66 -26q38 0 63 26t25 70q0 43 -25 69.5t-63 26.5q-39 0 -65.5 -26.5t-26.5 -69.5z" />
+<glyph unicode="Æ" horiz-adv-x="1708" d="M-6 0l670 1339h919v-200h-539v-342h453v-201h-453v-395h560v-201h-797v348h-393l-170 -348h-250zM504 535h303v622h-8q-34 -70 -97 -206.5t-94 -200.5z" />
+<glyph unicode="Ç" horiz-adv-x="1179" d="M100 666q0 160 48.5 293t132 221t196.5 136t242 48q114 0 213 -48t168 -122l-133 -147q-110 110 -246 110q-168 0 -272.5 -131t-104.5 -354q0 -228 99.5 -359t269.5 -131q160 0 280 133l133 -145q-144 -166 -346 -190l-35 -74q121 -43 121 -150q0 -62 -47 -106 t-118.5 -66t-163.5 -28l-21 102q176 21 176 94q0 32 -29.5 54.5t-95.5 39.5l68 134q-115 12 -212.5 63.5t-169.5 137t-112.5 210t-40.5 275.5z" />
+<glyph unicode="È" horiz-adv-x="1101" d="M170 0v1339h807v-200h-569v-342h481v-201h-481v-395h589v-201h-827zM287 1679h256l174 -237h-193z" />
+<glyph unicode="É" horiz-adv-x="1101" d="M170 0v1339h807v-200h-569v-342h481v-201h-481v-395h589v-201h-827zM457 1442l174 237h256l-238 -237h-192z" />
+<glyph unicode="Ê" horiz-adv-x="1101" d="M170 0v1339h807v-200h-569v-342h481v-201h-481v-395h589v-201h-827zM274 1442l197 237h229l197 -237h-184l-123 131h-8l-123 -131h-185z" />
+<glyph unicode="Ë" horiz-adv-x="1101" d="M170 0v1339h807v-200h-569v-342h481v-201h-481v-395h589v-201h-827zM274 1571q0 54 34.5 88.5t88.5 34.5q53 0 87 -34.5t34 -88.5q0 -53 -34 -87t-87 -34q-54 0 -88.5 34t-34.5 87zM655 1571q0 54 33.5 88.5t87.5 34.5t88.5 -34.5t34.5 -88.5q0 -53 -34.5 -87t-88.5 -34 t-87.5 34t-33.5 87z" />
+<glyph unicode="Ì" horiz-adv-x="577" d="M-12 1679h258l172 -237h-191zM170 0v1339h238v-1339h-238z" />
+<glyph unicode="Í" horiz-adv-x="577" d="M160 1442l172 237h258l-238 -237h-192zM170 0v1339h238v-1339h-238z" />
+<glyph unicode="Î" horiz-adv-x="577" d="M-23 1442l197 237h229l197 -237h-184l-123 131h-8l-123 -131h-185zM170 0v1339h238v-1339h-238z" />
+<glyph unicode="Ï" horiz-adv-x="577" d="M-23 1571q0 54 34 88.5t87 34.5q54 0 88.5 -34.5t34.5 -88.5q0 -53 -34.5 -87t-88.5 -34q-52 0 -86.5 34t-34.5 87zM170 0v1339h238v-1339h-238zM356 1571q0 54 34.5 88.5t88.5 34.5t88.5 -34.5t34.5 -88.5q0 -53 -34.5 -87t-88.5 -34t-88.5 34t-34.5 87z" />
+<glyph unicode="Ð" horiz-adv-x="1329" d="M61 637v113l158 8v581h356q314 0 484 -168t170 -495q0 -329 -169 -502.5t-472 -173.5h-369v637h-158zM457 193h104q205 0 314.5 120t109.5 363q0 471 -424 471h-104v-389h280v-121h-280v-444z" />
+<glyph unicode="Ñ" horiz-adv-x="1343" d="M170 0v1339h244l417 -753l138 -285h8q-3 39 -12 136.5t-14 175.5t-5 145v581h228v-1339h-244l-418 754l-137 284h-8q3 -42 11.5 -137.5t13.5 -171.5t5 -143v-586h-227zM352 1448q12 117 65.5 183.5t131.5 66.5q47 0 94 -25t85.5 -49.5t66.5 -24.5q62 0 79 99h125 q-12 -116 -65.5 -183t-130.5 -67q-37 0 -75 15.5t-63.5 34.5t-55 34.5t-52.5 15.5q-29 0 -50 -25.5t-30 -74.5h-125z" />
+<glyph unicode="Ò" horiz-adv-x="1380" d="M100 676q0 319 162.5 503.5t427.5 184.5q266 0 429 -184t163 -504q0 -322 -163.5 -511.5t-428.5 -189.5q-264 0 -427 189.5t-163 511.5zM344 676q0 -226 94 -360t252 -134t252 134t94 360q0 223 -93.5 352t-252.5 129t-252.5 -129t-93.5 -352zM389 1679h258l172 -237 h-190z" />
+<glyph unicode="Ó" horiz-adv-x="1380" d="M100 676q0 319 162.5 503.5t427.5 184.5q266 0 429 -184t163 -504q0 -322 -163.5 -511.5t-428.5 -189.5q-264 0 -427 189.5t-163 511.5zM344 676q0 -226 94 -360t252 -134t252 134t94 360q0 223 -93.5 352t-252.5 129t-252.5 -129t-93.5 -352zM561 1442l172 237h258 l-237 -237h-193z" />
+<glyph unicode="Ô" horiz-adv-x="1380" d="M100 676q0 319 162.5 503.5t427.5 184.5q266 0 429 -184t163 -504q0 -322 -163.5 -511.5t-428.5 -189.5q-264 0 -427 189.5t-163 511.5zM344 676q0 -226 94 -360t252 -134t252 134t94 360q0 223 -93.5 352t-252.5 129t-252.5 -129t-93.5 -352zM379 1442l196 237h230 l196 -237h-184l-123 131h-8l-123 -131h-184z" />
+<glyph unicode="Õ" horiz-adv-x="1380" d="M100 676q0 319 162.5 503.5t427.5 184.5q266 0 429 -184t163 -504q0 -322 -163.5 -511.5t-428.5 -189.5q-264 0 -427 189.5t-163 511.5zM344 676q0 -226 94 -360t252 -134t252 134t94 360q0 223 -93.5 352t-252.5 129t-252.5 -129t-93.5 -352zM369 1448q12 117 65 183.5 t131 66.5q46 0 92.5 -25t85 -49.5t66.5 -24.5q29 0 50 25t30 74h125q-12 -116 -66 -183t-131 -67q-37 0 -74.5 15.5t-63 34.5t-55 34.5t-51.5 15.5q-63 0 -81 -100h-123z" />
+<glyph unicode="Ö" horiz-adv-x="1380" d="M100 676q0 319 162.5 503.5t427.5 184.5q266 0 429 -184t163 -504q0 -322 -163.5 -511.5t-428.5 -189.5q-264 0 -427 189.5t-163 511.5zM344 676q0 -226 94 -360t252 -134t252 134t94 360q0 223 -93.5 352t-252.5 129t-252.5 -129t-93.5 -352zM379 1571q0 54 34 88.5 t87 34.5q54 0 88.5 -34.5t34.5 -88.5q0 -53 -34.5 -87t-88.5 -34q-52 0 -86.5 34t-34.5 87zM758 1571q0 54 34.5 88.5t88.5 34.5t88.5 -34.5t34.5 -88.5q0 -53 -34.5 -87t-88.5 -34t-88.5 34t-34.5 87z" />
+<glyph unicode="×" d="M100 367l303 307l-303 309l121 123l303 -311l305 311l121 -123l-305 -309l305 -307l-121 -123l-305 309l-303 -309z" />
+<glyph unicode="Ø" horiz-adv-x="1380" d="M92 25l141 180q-131 186 -131 471q0 320 163 504t429 184q213 0 359 -119l131 168l127 -98l-148 -189q121 -178 121 -450q0 -322 -163 -511.5t-427 -189.5q-203 0 -350 113l-127 -162zM348 676q0 -153 45 -268l520 661q-88 88 -219 88q-159 0 -252.5 -129t-93.5 -352z M485 266q84 -84 209 -84q158 0 252 134t94 360q0 140 -39 246z" />
+<glyph unicode="Ù" horiz-adv-x="1341" d="M164 588v751h237v-770q0 -208 70.5 -297.5t200.5 -89.5q132 0 205 90t73 297v770h228v-751q0 -613 -506 -613q-508 0 -508 613zM371 1679h256l174 -237h-193z" />
+<glyph unicode="Ú" horiz-adv-x="1341" d="M164 588v751h237v-770q0 -208 70.5 -297.5t200.5 -89.5q132 0 205 90t73 297v770h228v-751q0 -613 -506 -613q-508 0 -508 613zM541 1442l174 237h256l-238 -237h-192z" />
+<glyph unicode="Û" horiz-adv-x="1341" d="M164 588v751h237v-770q0 -208 70.5 -297.5t200.5 -89.5q132 0 205 90t73 297v770h228v-751q0 -613 -506 -613q-508 0 -508 613zM360 1442l197 237h229l197 -237h-184l-123 131h-8l-123 -131h-185z" />
+<glyph unicode="Ü" horiz-adv-x="1341" d="M164 588v751h237v-770q0 -208 70.5 -297.5t200.5 -89.5q132 0 205 90t73 297v770h228v-751q0 -613 -506 -613q-508 0 -508 613zM358 1571q0 54 34.5 88.5t88.5 34.5t87.5 -34.5t33.5 -88.5q0 -53 -33.5 -87t-87.5 -34t-88.5 34t-34.5 87zM739 1571q0 54 34 88.5t87 34.5 q54 0 88.5 -34.5t34.5 -88.5q0 -53 -34.5 -87t-88.5 -34q-52 0 -86.5 34t-34.5 87z" />
+<glyph unicode="Ý" horiz-adv-x="1026" d="M-8 1339h254l145 -342q66 -170 119 -295h8q106 252 123 295l145 342h248l-403 -841v-498h-238v498zM383 1442l174 237h256l-238 -237h-192z" />
+<glyph unicode="Þ" horiz-adv-x="1228" d="M170 0v1339h238v-213h213q509 0 509 -413q0 -109 -38.5 -193.5t-108 -136.5t-161 -78t-201.5 -26h-213v-279h-238zM408 469h194q295 0 295 244q0 121 -72 172t-223 51h-194v-467z" />
+<glyph unicode="ß" horiz-adv-x="1236" d="M150 0v1026q0 201 115 320.5t329 119.5q178 0 277.5 -92.5t99.5 -226.5q0 -56 -17.5 -105t-43 -83.5t-51 -66t-43 -65.5t-17.5 -67t21 -60.5t55 -48t74.5 -41.5t81.5 -48.5t75 -61.5t55 -86.5t21 -118.5q0 -138 -95.5 -229t-259.5 -91q-148 0 -299 97l86 161 q103 -79 207 -79q65 0 103.5 37.5t38.5 93.5q0 39 -21 71t-54.5 55t-74.5 44.5t-81.5 46t-74 54t-54.5 74.5t-21 101q0 47 16.5 89.5t40 75.5t47.5 65.5t40.5 73t16.5 85.5q0 71 -39 115.5t-110 44.5q-101 0 -156 -75t-55 -214v-991h-233z" />
+<glyph unicode="à" horiz-adv-x="1071" d="M106 270q0 161 141.5 250t450.5 123q-2 88 -44.5 142.5t-137.5 54.5q-119 0 -283 -99l-86 158q208 131 412 131q187 0 281 -110.5t94 -323.5v-596h-193l-18 111h-6q-161 -136 -311 -136q-133 0 -216.5 82t-83.5 213zM297 1473h233l185 -299h-176zM336 289q0 -65 38.5 -97 t104.5 -32q58 0 109 27t110 83v226q-196 -25 -279 -76.5t-83 -130.5z" />
+<glyph unicode="á" horiz-adv-x="1071" d="M106 270q0 161 141.5 250t450.5 123q-2 88 -44.5 142.5t-137.5 54.5q-119 0 -283 -99l-86 158q208 131 412 131q187 0 281 -110.5t94 -323.5v-596h-193l-18 111h-6q-161 -136 -311 -136q-133 0 -216.5 82t-83.5 213zM336 289q0 -65 38.5 -97t104.5 -32q58 0 109 27 t110 83v226q-196 -25 -279 -76.5t-83 -130.5zM412 1174l184 299h233l-241 -299h-176z" />
+<glyph unicode="â" horiz-adv-x="1071" d="M106 270q0 161 141.5 250t450.5 123q-2 88 -44.5 142.5t-137.5 54.5q-119 0 -283 -99l-86 158q208 131 412 131q187 0 281 -110.5t94 -323.5v-596h-193l-18 111h-6q-161 -136 -311 -136q-133 0 -216.5 82t-83.5 213zM272 1174l197 299h188l197 -299h-164l-123 174h-8 l-123 -174h-164zM336 289q0 -65 38.5 -97t104.5 -32q58 0 109 27t110 83v226q-196 -25 -279 -76.5t-83 -130.5z" />
+<glyph unicode="ã" horiz-adv-x="1071" d="M106 270q0 161 141.5 250t450.5 123q-2 88 -44.5 142.5t-137.5 54.5q-119 0 -283 -99l-86 158q208 131 412 131q187 0 281 -110.5t94 -323.5v-596h-193l-18 111h-6q-161 -136 -311 -136q-133 0 -216.5 82t-83.5 213zM250 1182q12 117 62 182.5t128 65.5q45 0 91.5 -25 t84 -49.5t62.5 -24.5q54 0 74 99h125q-12 -117 -62.5 -182.5t-128.5 -65.5q-36 0 -72.5 15.5t-61 33.5t-53 33.5t-50.5 15.5q-54 0 -74 -98h-125zM336 289q0 -65 38.5 -97t104.5 -32q58 0 109 27t110 83v226q-196 -25 -279 -76.5t-83 -130.5z" />
+<glyph unicode="ä" horiz-adv-x="1071" d="M106 270q0 161 141.5 250t450.5 123q-2 88 -44.5 142.5t-137.5 54.5q-119 0 -283 -99l-86 158q208 131 412 131q187 0 281 -110.5t94 -323.5v-596h-193l-18 111h-6q-161 -136 -311 -136q-133 0 -216.5 82t-83.5 213zM252 1309q0 52 34 86.5t87 34.5t88 -35t35 -86 q0 -53 -34.5 -88t-88.5 -35q-53 0 -87 35t-34 88zM336 289q0 -65 38.5 -97t104.5 -32q58 0 109 27t110 83v226q-196 -25 -279 -76.5t-83 -130.5zM631 1309q0 51 34.5 86t88.5 35q53 0 86.5 -34.5t33.5 -86.5q0 -53 -33.5 -88t-86.5 -35q-54 0 -88.5 35t-34.5 88z" />
+<glyph unicode="å" horiz-adv-x="1071" d="M106 270q0 161 141.5 250t450.5 123q-2 88 -44.5 142.5t-137.5 54.5q-119 0 -283 -99l-86 158q208 131 412 131q187 0 281 -110.5t94 -323.5v-596h-193l-18 111h-6q-161 -136 -311 -136q-133 0 -216.5 82t-83.5 213zM336 289q0 -65 38.5 -97t104.5 -32q58 0 109 27 t110 83v226q-196 -25 -279 -76.5t-83 -130.5zM352 1315q0 90 58.5 145.5t152.5 55.5t152.5 -55.5t58.5 -145.5q0 -89 -58.5 -144t-152.5 -55t-152.5 55t-58.5 144zM473 1315q0 -45 26 -75t64 -30t64 30t26 75q0 47 -25.5 76.5t-64.5 29.5t-64.5 -29.5t-25.5 -76.5z" />
+<glyph unicode="æ" horiz-adv-x="1607" d="M106 270q0 162 140.5 251.5t445.5 121.5q-7 197 -180 197q-115 0 -279 -99l-86 158q208 131 396 131q101 0 173 -47.5t111 -134.5q130 182 314 182q187 0 289 -132t102 -349q0 -69 -10 -111h-615q12 -128 89 -201t188 -73q104 0 227 78l84 -158q-166 -109 -342 -109 q-207 0 -350 172q-201 -172 -397 -172q-133 0 -216.5 82t-83.5 213zM336 289q0 -65 38.5 -97t104.5 -32q60 0 125 31.5t121 87.5q-30 70 -33 170l-4 47q-186 -25 -269 -76.5t-83 -130.5zM907 588h422q0 124 -49.5 192t-146.5 68q-88 0 -150.5 -69t-75.5 -191z" />
+<glyph unicode="ç" horiz-adv-x="946" d="M84 502q0 122 41 223.5t110.5 167t160.5 101.5t192 36q174 0 295 -117l-113 -149q-83 74 -170 74q-122 0 -198 -92.5t-76 -243.5q0 -150 74.5 -242t193.5 -92q102 0 207 86l98 -150q-111 -99 -260 -122l-35 -76q121 -43 121 -150q0 -62 -47.5 -106t-119 -66t-163.5 -28 l-20 102q176 21 176 94q0 32 -29.5 54.5t-95.5 39.5l70 134q-184 26 -298 163.5t-114 358.5z" />
+<glyph unicode="è" horiz-adv-x="1038" d="M84 502q0 119 39 220t104 167.5t148 103.5t172 37q199 0 307.5 -130.5t108.5 -346.5q0 -65 -11 -111h-639q15 -135 94.5 -209.5t202.5 -74.5q119 0 234 73l80 -147q-166 -109 -344 -109q-215 0 -355.5 142t-140.5 385zM281 1473h233l184 -299h-176zM311 592h447 q0 122 -52 189t-153 67q-93 0 -160 -67t-82 -189z" />
+<glyph unicode="é" horiz-adv-x="1038" d="M84 502q0 119 39 220t104 167.5t148 103.5t172 37q199 0 307.5 -130.5t108.5 -346.5q0 -65 -11 -111h-639q15 -135 94.5 -209.5t202.5 -74.5q119 0 234 73l80 -147q-166 -109 -344 -109q-215 0 -355.5 142t-140.5 385zM311 592h447q0 122 -52 189t-153 67q-93 0 -160 -67 t-82 -189zM397 1174l183 299h235l-244 -299h-174z" />
+<glyph unicode="ê" horiz-adv-x="1038" d="M84 502q0 119 39 220t104 167.5t148 103.5t172 37q199 0 307.5 -130.5t108.5 -346.5q0 -65 -11 -111h-639q15 -135 94.5 -209.5t202.5 -74.5q119 0 234 73l80 -147q-166 -109 -344 -109q-215 0 -355.5 142t-140.5 385zM258 1174l195 299h190l195 -299h-164l-123 174h-8 l-123 -174h-162zM311 592h447q0 122 -52 189t-153 67q-93 0 -160 -67t-82 -189z" />
+<glyph unicode="ë" horiz-adv-x="1038" d="M84 502q0 119 39 220t104 167.5t148 103.5t172 37q199 0 307.5 -130.5t108.5 -346.5q0 -65 -11 -111h-639q15 -135 94.5 -209.5t202.5 -74.5q119 0 234 73l80 -147q-166 -109 -344 -109q-215 0 -355.5 142t-140.5 385zM236 1309q0 51 34 86t86 35q54 0 88.5 -35t34.5 -86 q0 -53 -34.5 -88t-88.5 -35q-52 0 -86 35t-34 88zM311 592h447q0 122 -52 189t-153 67q-93 0 -160 -67t-82 -189zM614 1309q0 51 35 86t88 35t88 -35t35 -86q0 -53 -34.5 -88t-88.5 -35t-88.5 35t-34.5 88z" />
+<glyph unicode="ì" horiz-adv-x="536" d="M0 1473h236l182 -299h-174zM150 0v1006h235v-1006h-235z" />
+<glyph unicode="í" horiz-adv-x="536" d="M117 1174l184 299h234l-242 -299h-176zM150 0v1006h235v-1006h-235z" />
+<glyph unicode="î" horiz-adv-x="536" d="M-23 1174l195 299h190l195 -299h-162l-123 174h-8l-123 -174h-164zM150 0v1006h235v-1006h-235z" />
+<glyph unicode="ï" horiz-adv-x="536" d="M-45 1309q0 51 34.5 86t88.5 35t88.5 -35t34.5 -86q0 -53 -34.5 -88t-88.5 -35t-88.5 35t-34.5 88zM150 0v1006h235v-1006h-235zM336 1309q0 51 35 86t88 35q52 0 86.5 -35t34.5 -86q0 -53 -34.5 -88t-86.5 -35q-54 0 -88.5 35t-34.5 88z" />
+<glyph unicode="ð" horiz-adv-x="1130" d="M98 461q0 139 58 246t152.5 162t207.5 55q156 0 246 -111q-51 189 -197 332l-291 -148l-63 109l250 127q-77 57 -207 127l104 145q173 -90 283 -180l293 150l63 -111l-254 -129q277 -280 277 -698q0 -250 -126.5 -406t-338.5 -156q-91 0 -174 34.5t-146 96t-100 154 t-37 201.5zM315 461q0 -132 71.5 -212.5t174.5 -80.5q112 0 174 93.5t62 262.5q0 37 -4 103q-95 118 -234 118q-113 0 -178.5 -76t-65.5 -208z" />
+<glyph unicode="ñ" horiz-adv-x="1146" d="M150 0v1006h194l16 -136h9q77 76 155.5 118t173.5 42q310 0 310 -399v-631h-236v600q0 123 -37 175t-121 52q-62 0 -111 -29t-118 -96v-702h-235zM301 1182q12 117 62.5 182.5t128.5 65.5q45 0 91 -25t83.5 -49.5t62.5 -24.5q54 0 74 99h125q-12 -117 -62.5 -182.5 t-128.5 -65.5q-36 0 -72.5 15.5t-61 33.5t-53 33.5t-50.5 15.5q-54 0 -74 -98h-125z" />
+<glyph unicode="ò" horiz-adv-x="1124" d="M84 502q0 122 39.5 223.5t105.5 167t152 101.5t180 36q95 0 181 -36t152.5 -101.5t106 -167t39.5 -223.5t-39.5 -223t-106 -166.5t-152.5 -101.5t-181 -36q-94 0 -180 36t-152 101.5t-105.5 166.5t-39.5 223zM295 1473h233l185 -299h-176zM326 502q0 -152 63 -243 t172 -91q110 0 174 91t64 243q0 153 -64 244.5t-174 91.5q-109 0 -172 -91t-63 -245z" />
+<glyph unicode="ó" horiz-adv-x="1124" d="M84 502q0 122 39.5 223.5t105.5 167t152 101.5t180 36q95 0 181 -36t152.5 -101.5t106 -167t39.5 -223.5t-39.5 -223t-106 -166.5t-152.5 -101.5t-181 -36q-94 0 -180 36t-152 101.5t-105.5 166.5t-39.5 223zM326 502q0 -152 63 -243t172 -91q110 0 174 91t64 243 q0 153 -64 244.5t-174 91.5q-109 0 -172 -91t-63 -245zM412 1174l182 299h235l-243 -299h-174z" />
+<glyph unicode="ô" horiz-adv-x="1124" d="M84 502q0 122 39.5 223.5t105.5 167t152 101.5t180 36q95 0 181 -36t152.5 -101.5t106 -167t39.5 -223.5t-39.5 -223t-106 -166.5t-152.5 -101.5t-181 -36q-94 0 -180 36t-152 101.5t-105.5 166.5t-39.5 223zM272 1174l195 299h190l195 -299h-164l-123 174h-8l-123 -174 h-162zM326 502q0 -152 63 -243t172 -91q110 0 174 91t64 243q0 153 -64 244.5t-174 91.5q-109 0 -172 -91t-63 -245z" />
+<glyph unicode="õ" horiz-adv-x="1124" d="M84 502q0 122 39.5 223.5t105.5 167t152 101.5t180 36q95 0 181 -36t152.5 -101.5t106 -167t39.5 -223.5t-39.5 -223t-106 -166.5t-152.5 -101.5t-181 -36q-94 0 -180 36t-152 101.5t-105.5 166.5t-39.5 223zM250 1182q12 117 61 182.5t127 65.5q45 0 91.5 -25 t84.5 -49.5t62 -24.5q57 0 74 99h124q-12 -118 -61.5 -183t-128.5 -65q-44 0 -89.5 24.5t-84 49t-64.5 24.5q-54 0 -71 -98h-125zM326 502q0 -152 63 -243t172 -91q110 0 174 91t64 243q0 153 -64 244.5t-174 91.5q-109 0 -172 -91t-63 -245z" />
+<glyph unicode="ö" horiz-adv-x="1124" d="M84 502q0 122 39.5 223.5t105.5 167t152 101.5t180 36q95 0 181 -36t152.5 -101.5t106 -167t39.5 -223.5t-39.5 -223t-106 -166.5t-152.5 -101.5t-181 -36q-94 0 -180 36t-152 101.5t-105.5 166.5t-39.5 223zM250 1309q0 51 35 86t88 35q52 0 86.5 -35t34.5 -86 q0 -53 -34.5 -88t-86.5 -35q-54 0 -88.5 35t-34.5 88zM326 502q0 -152 63 -243t172 -91q110 0 174 91t64 243q0 153 -64 244.5t-174 91.5q-109 0 -172 -91t-63 -245zM631 1309q0 52 34 86.5t87 34.5t87.5 -34.5t34.5 -86.5q0 -53 -34 -88t-88 -35q-53 0 -87 35t-34 88z" />
+<glyph unicode="÷" d="M70 590v172h911v-172h-911zM385 307q0 58 40 95.5t99 37.5q60 0 100 -37.5t40 -95.5q0 -60 -39.5 -97.5t-100.5 -37.5q-59 0 -99 38t-40 97zM385 1044q0 58 40 96t99 38q60 0 100 -38t40 -96q0 -60 -39.5 -97.5t-100.5 -37.5q-59 0 -99 38t-40 97z" />
+<glyph unicode="ø" horiz-adv-x="1124" d="M84 502q0 122 39.5 223.5t105.5 167t152 101.5t180 36q157 0 279 -90l96 117l94 -74l-102 -127q112 -141 112 -354q0 -122 -39.5 -223t-106 -166.5t-152.5 -101.5t-181 -36q-155 0 -278 91l-95 -115l-94 74l103 125q-113 142 -113 352zM313 514q0 -104 29 -186l373 458 q-63 60 -154 60q-110 0 -179 -92t-69 -240zM408 221q61 -61 153 -61q111 0 180.5 91t69.5 238q0 107 -29 189z" />
+<glyph unicode="ù" horiz-adv-x="1138" d="M139 375v631h236v-600q0 -123 36 -175.5t119 -52.5q65 0 115.5 32t108.5 107v689h235v-1006h-192l-19 147h-6q-71 -84 -148.5 -128t-174.5 -44q-310 0 -310 400zM303 1473h236l182 -299h-174z" />
+<glyph unicode="ú" horiz-adv-x="1138" d="M139 375v631h236v-600q0 -123 36 -175.5t119 -52.5q65 0 115.5 32t108.5 107v689h235v-1006h-192l-19 147h-6q-71 -84 -148.5 -128t-174.5 -44q-310 0 -310 400zM420 1174l184 299h234l-242 -299h-176z" />
+<glyph unicode="û" horiz-adv-x="1138" d="M139 375v631h236v-600q0 -123 36 -175.5t119 -52.5q65 0 115.5 32t108.5 107v689h235v-1006h-192l-19 147h-6q-71 -84 -148.5 -128t-174.5 -44q-310 0 -310 400zM281 1174l194 299h191l194 -299h-162l-123 174h-8l-123 -174h-163z" />
+<glyph unicode="ü" horiz-adv-x="1138" d="M139 375v631h236v-600q0 -123 36 -175.5t119 -52.5q65 0 115.5 32t108.5 107v689h235v-1006h-192l-19 147h-6q-71 -84 -148.5 -128t-174.5 -44q-310 0 -310 400zM258 1309q0 51 35 86t88 35t88 -35t35 -86q0 -53 -34.5 -88t-88.5 -35t-88.5 35t-34.5 88zM639 1309 q0 51 34.5 86t88.5 35q52 0 86.5 -35t34.5 -86q0 -53 -34.5 -88t-86.5 -35q-54 0 -88.5 35t-34.5 88z" />
+<glyph unicode="ý" horiz-adv-x="1013" d="M25 1006h239l174 -494q14 -43 43 -139t45 -144h9q11 40 36 137t39 146l152 494h227l-364 -1051q-68 -185 -160.5 -277t-247.5 -92q-66 0 -131 21l43 184q42 -14 72 -14q143 0 200 172l19 63zM373 1174l182 299h236l-244 -299h-174z" />
+<glyph unicode="þ" horiz-adv-x="1155" d="M150 -397v1843h235v-373l-4 -158q139 115 278 115q192 0 300 -138t108 -374q0 -101 -23 -188.5t-64 -151.5t-95.5 -110.5t-117.5 -69.5t-130 -23q-131 0 -256 103l4 -160v-315h-235zM385 254q102 -84 203 -84q104 0 169.5 90.5t65.5 255.5q0 320 -217 320 q-105 0 -221 -113v-469z" />
+<glyph unicode="ÿ" horiz-adv-x="1013" d="M25 1006h239l174 -494q14 -43 43 -139t45 -144h9q11 40 36 137t39 146l152 494h227l-364 -1051q-68 -185 -160.5 -277t-247.5 -92q-66 0 -131 21l43 184q42 -14 72 -14q143 0 200 172l19 63zM211 1309q0 51 34.5 86t86.5 35q54 0 88.5 -35t34.5 -86q0 -53 -34.5 -88 t-88.5 -35q-52 0 -86.5 35t-34.5 88zM590 1309q0 51 35 86t88 35t88 -35t35 -86q0 -53 -34.5 -88t-88.5 -35t-88.5 35t-34.5 88z" />
+<glyph unicode="Œ" horiz-adv-x="1759" d="M100 676q0 324 180 493.5t492 169.5h862v-200h-536v-342h450v-201h-450v-395h557v-201h-895q-198 0 -345.5 75.5t-231 229t-83.5 371.5zM344 676q0 -243 115 -363t327 -120h74v954h-74q-442 0 -442 -471z" />
+<glyph unicode="œ" horiz-adv-x="1699" d="M84 502q0 123 37.5 224t101.5 166.5t148 101.5t178 36q110 0 199 -55.5t145 -157.5q60 100 148.5 156.5t187.5 56.5q189 0 293 -132t104 -349q0 -49 -10 -111h-621q12 -128 89 -201t190 -73q106 0 229 78l84 -158q-166 -109 -346 -109q-103 0 -194 56.5t-150 156.5 q-126 -213 -352 -213q-94 0 -177.5 36t-146.5 102t-100 166.5t-37 222.5zM324 502q0 -151 62 -242.5t163 -91.5q103 0 165 91.5t62 242.5q0 152 -62 244t-165 92q-101 0 -163 -92t-62 -244zM995 588h426q0 123 -51 191.5t-147 68.5q-90 0 -152.5 -69t-75.5 -191z" />
+<glyph unicode="Ÿ" horiz-adv-x="1026" d="M-8 1339h254l145 -342q66 -170 119 -295h8q106 252 123 295l145 342h248l-403 -841v-498h-238v498zM201 1571q0 54 34.5 88.5t88.5 34.5q53 0 86.5 -34.5t33.5 -88.5q0 -53 -34 -87t-86 -34q-54 0 -88.5 34t-34.5 87zM582 1571q0 54 33 88.5t87 34.5t88.5 -34.5 t34.5 -88.5q0 -53 -34.5 -87t-88.5 -34t-87 34t-33 87z" />
+<glyph unicode="ˆ" horiz-adv-x="1124" d="M272 1174l195 299h190l195 -299h-164l-123 174h-8l-123 -174h-162z" />
+<glyph unicode="˜" horiz-adv-x="1124" d="M250 1182q12 117 61 182.5t127 65.5q45 0 91.5 -25t84.5 -49.5t62 -24.5q57 0 74 99h124q-12 -118 -61.5 -183t-128.5 -65q-44 0 -89.5 24.5t-84 49t-64.5 24.5q-54 0 -71 -98h-125z" />
+<glyph unicode=" " horiz-adv-x="905" />
+<glyph unicode=" " horiz-adv-x="1810" />
+<glyph unicode=" " horiz-adv-x="905" />
+<glyph unicode=" " horiz-adv-x="1810" />
+<glyph unicode=" " horiz-adv-x="603" />
+<glyph unicode=" " horiz-adv-x="452" />
+<glyph unicode=" " horiz-adv-x="301" />
+<glyph unicode=" " horiz-adv-x="301" />
+<glyph unicode=" " horiz-adv-x="226" />
+<glyph unicode=" " horiz-adv-x="362" />
+<glyph unicode=" " horiz-adv-x="100" />
+<glyph unicode="‐" horiz-adv-x="659" d="M86 430v172h487v-172h-487z" />
+<glyph unicode="‑" horiz-adv-x="659" d="M86 430v172h487v-172h-487z" />
+<glyph unicode="‒" horiz-adv-x="659" d="M86 430v172h487v-172h-487z" />
+<glyph unicode="–" horiz-adv-x="983" d="M86 438v156h811v-156h-811z" />
+<glyph unicode="—" horiz-adv-x="1638" d="M86 438v156h1466v-156h-1466z" />
+<glyph unicode="‘" horiz-adv-x="563" d="M115 1010q0 268 254 401l57 -104q-88 -51 -129 -110.5t-41 -147.5q6 2 18 2q58 0 97 -34.5t39 -92.5q0 -64 -38.5 -103t-97.5 -39q-76 0 -117.5 60t-41.5 168z" />
+<glyph unicode="’" horiz-adv-x="563" d="M137 905q88 51 129 110.5t41 147.5q-6 -2 -18 -2q-56 0 -94.5 34.5t-38.5 92.5q0 64 37 103t96 39q78 0 120 -60t42 -168q0 -268 -256 -401z" />
+<glyph unicode="‚" horiz-adv-x="563" d="M137 -217q88 51 129 110.5t41 147.5q-6 -2 -18 -2q-56 0 -94.5 34.5t-38.5 92.5q0 64 37 102.5t96 38.5q78 0 120 -59.5t42 -167.5q0 -269 -256 -402z" />
+<glyph unicode="“" horiz-adv-x="987" d="M115 1010q0 268 254 401l57 -104q-88 -51 -129 -110.5t-41 -147.5q6 2 18 2q58 0 97 -34.5t39 -92.5q0 -64 -38.5 -103t-97.5 -39q-76 0 -117.5 60t-41.5 168zM539 1010q0 268 256 401l57 -104q-89 -51 -130.5 -110.5t-41.5 -147.5q6 2 20 2q56 0 95 -34.5t39 -92.5 q0 -64 -37.5 -103t-96.5 -39q-77 0 -119 60t-42 168z" />
+<glyph unicode="”" horiz-adv-x="987" d="M137 905q88 51 129 110.5t41 147.5q-6 -2 -18 -2q-56 0 -94.5 34.5t-38.5 92.5q0 64 37 103t96 39q78 0 120 -60t42 -168q0 -268 -256 -401zM561 905q88 51 129 110.5t41 147.5q-6 -2 -18 -2q-56 0 -94.5 34.5t-38.5 92.5q0 64 37 103t96 39q77 0 119 -60t42 -168 q0 -268 -256 -401z" />
+<glyph unicode="„" horiz-adv-x="987" d="M137 -217q88 51 129 110.5t41 147.5q-6 -2 -18 -2q-56 0 -94.5 34.5t-38.5 92.5q0 64 37 102.5t96 38.5q78 0 120 -59.5t42 -167.5q0 -269 -256 -402zM561 -217q88 51 129 110.5t41 147.5q-6 -2 -18 -2q-56 0 -94.5 34.5t-38.5 92.5q0 64 37 102.5t96 38.5 q78 0 119.5 -59.5t41.5 -167.5q0 -269 -256 -402z" />
+<glyph unicode="•" horiz-adv-x="665" d="M82 539q0 114 73 190t177 76q105 0 178.5 -76t73.5 -190q0 -115 -73 -191t-179 -76q-104 0 -177 76t-73 191z" />
+<glyph unicode="…" horiz-adv-x="1974" d="M174 135q0 69 44.5 114.5t109.5 45.5t108 -45.5t43 -114.5t-43 -114.5t-108 -45.5t-109.5 45.5t-44.5 114.5zM856 135q0 69 44.5 114.5t109.5 45.5t108 -45.5t43 -114.5t-43 -114.5t-108 -45.5t-109.5 45.5t-44.5 114.5zM1540 135q0 69 43.5 114.5t108.5 45.5t108 -45.5 t43 -114.5t-43 -114.5t-108 -45.5t-108.5 45.5t-43.5 114.5z" />
+<glyph unicode=" " horiz-adv-x="362" />
+<glyph unicode="‹" horiz-adv-x="577" d="M96 430v172l277 305l94 -76l-236 -315l236 -317l-94 -74z" />
+<glyph unicode="›" horiz-adv-x="577" d="M111 199l233 317l-233 315l92 76l278 -305v-172l-278 -305z" />
+<glyph unicode=" " horiz-adv-x="452" />
+<glyph unicode="€" d="M45 461v114l117 9q-2 20 -2 63q0 42 2 60h-117v114l129 8q41 235 180 366.5t342 131.5q91 0 176 -43t144 -117l-133 -129q-91 105 -193 105q-109 0 -181 -81.5t-97 -230.5h479v-124h-492q-2 -16 -2 -52q0 -46 2 -69h410v-125h-395q28 -144 98.5 -222.5t173.5 -78.5 q121 0 215 129l133 -123q-148 -191 -362 -191q-192 0 -324.5 127t-173.5 359h-129z" />
+<glyph unicode="™" horiz-adv-x="1351" d="M6 1239v145h543v-145h-193v-494h-159v494h-191zM641 745v639h190l87 -206l49 -150h8l49 150l84 206h190v-639h-155v238l18 225h-8l-127 -366h-113l-127 366h-8l19 -225v-238h-156z" />
+<glyph unicode="◼" horiz-adv-x="1003" d="M0 0v1004h1004v-1004h-1004z" />
+<glyph unicode="fi" horiz-adv-x="1220" d="M55 819v176l135 11v104q0 166 81.5 263t252.5 97q100 0 185 -34l-45 -176q-55 24 -111 24q-127 0 -127 -170v-108h197v-187h-197v-819h-236v819h-135zM809 1315q0 60 41 97.5t104 37.5t104.5 -37.5t41.5 -97.5q0 -58 -41.5 -95.5t-104.5 -37.5t-104 37.5t-41 95.5zM836 0 v1006h235v-1006h-235z" />
+<glyph unicode="fl" horiz-adv-x="1204" d="M55 819v176l135 11v104q0 166 81.5 263t252.5 97q100 0 185 -34l-45 -176q-55 24 -111 24q-127 0 -127 -170v-108h197v-187h-197v-819h-236v819h-135zM799 258v1188h235v-1200q0 -40 15 -59t36 -19q19 0 37 4l29 -176q-51 -21 -123 -21q-121 0 -175 73t-54 210z" />
+<hkern u1="/" u2="ï" k="-25" />
+<hkern u1="F" u2="™" k="-49" />
+<hkern u1="F" u2="ï" k="-70" />
+<hkern u1="F" u2="î" k="-31" />
+<hkern u1="F" u2="·" k="33" />
+<hkern u1="F" u2="®" k="-27" />
+<hkern u1="F" u2="x" k="63" />
+<hkern u1="F" u2="v" k="55" />
+<hkern u1="F" u2="X" k="53" />
+<hkern u1="F" u2="/" k="119" />
+<hkern u1="P" u2="·" k="10" />
+<hkern u1="P" u2="®" k="-47" />
+<hkern u1="P" u2="x" k="33" />
+<hkern u1="P" u2="X" k="53" />
+<hkern u1="P" u2="/" k="127" />
+<hkern u1="V" u2="™" k="-115" />
+<hkern u1="V" u2="ï" k="-119" />
+<hkern u1="V" u2="î" k="-82" />
+<hkern u1="V" u2="ì" k="-29" />
+<hkern u1="V" u2="·" k="14" />
+<hkern u1="V" u2="®" k="-106" />
+<hkern u1="V" u2="x" k="35" />
+<hkern u1="V" u2="v" k="18" />
+<hkern u1="V" u2="/" k="76" />
+<hkern u1="X" u2="™" k="-43" />
+<hkern u1="X" u2="·" k="82" />
+<hkern u1="X" u2="x" k="20" />
+<hkern u1="X" u2="v" k="43" />
+<hkern u1="X" u2="*" k="20" />
+<hkern u1="\" u2="v" k="41" />
+<hkern u1="\" u2="V" k="98" />
+<hkern u1="v" u2="™" k="-16" />
+<hkern u1="v" u2="®" k="-74" />
+<hkern u1="v" u2="V" k="12" />
+<hkern u1="v" u2="/" k="41" />
+<hkern u1="v" u2="*" k="10" />
+<hkern u1="x" u2="™" k="-16" />
+<hkern u1="x" u2="·" k="41" />
+<hkern u1="x" u2="®" k="-49" />
+<hkern u1="x" u2="X" k="20" />
+<hkern u1="x" u2="V" k="25" />
+<hkern u1="x" u2="*" k="20" />
+<hkern u1="¡" u2="V" k="86" />
+<hkern u1="£" u2="5" k="8" />
+<hkern u1="£" u2="3" k="8" />
+<hkern u1="·" u2="x" k="41" />
+<hkern u1="·" u2="X" k="63" />
+<hkern u1="·" u2="V" k="63" />
+<hkern u1="¿" u2="X" k="115" />
+<hkern u1="¿" u2="V" k="152" />
+<hkern u1="Þ" u2="™" k="53" />
+<hkern u1="Þ" u2="\" k="82" />
+<hkern u1="Þ" u2="/" k="90" />
+<hkern u1="Þ" u2="*" k="102" />
+<hkern u1="ß" u2="®" k="90" />
+<hkern u1="ß" u2="x" k="-8" />
+<hkern u1="ß" u2="v" k="43" />
+<hkern u1="ß" u2="\" k="63" />
+<hkern g1="exclam" g2="quoteright,quotedblright" k="86" />
+<hkern g1="exclamdown" g2="W" k="43" />
+<hkern g1="exclamdown" g2="Y,Yacute,Ydieresis" k="119" />
+<hkern g1="exclamdown" g2="j" k="-57" />
+<hkern g1="periodcentered" g2="T" k="135" />
+<hkern g1="periodcentered" g2="Y,Yacute,Ydieresis" k="152" />
+<hkern g1="periodcentered" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="53" />
+<hkern g1="periodcentered" g2="S" k="53" />
+<hkern g1="periodcentered" g2="Z" k="72" />
+<hkern g1="questiondown" g2="T" k="188" />
+<hkern g1="questiondown" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="96" />
+<hkern g1="questiondown" g2="W" k="96" />
+<hkern g1="questiondown" g2="Y,Yacute,Ydieresis" k="221" />
+<hkern g1="questiondown" g2="j" k="-106" />
+<hkern g1="questiondown" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="156" />
+<hkern g1="questiondown" g2="S" k="98" />
+<hkern g1="questiondown" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="133" />
+<hkern g1="questiondown" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="90" />
+<hkern g1="questiondown" g2="f,uniFB01,uniFB02" k="156" />
+<hkern g1="questiondown" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="57" />
+<hkern g1="slash" g2="g" k="20" />
+<hkern g1="slash" g2="j" k="-33" />
+<hkern g1="slash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="82" />
+<hkern g1="slash" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="53" />
+<hkern g1="slash" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="49" />
+<hkern g1="slash" g2="J" k="164" />
+<hkern g1="slash" g2="i,igrave,iacute,icircumflex,idieresis" k="-33" />
+<hkern g1="slash" g2="u,ugrave,uacute,ucircumflex,udieresis" k="41" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="T" k="82" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="27" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="Y,Yacute,Ydieresis" k="33" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="w" k="12" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="y,yacute,ydieresis" k="33" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="quoteright,quotedblright" k="139" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="Z" k="10" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="f,uniFB01,uniFB02" k="20" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="u,ugrave,uacute,ucircumflex,udieresis" k="8" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="asterisk" k="182" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="backslash" k="82" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="periodcentered" k="53" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="registered" k="178" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="trademark" k="127" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="V" k="33" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="question" k="63" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="quotedbl,quotesingle" k="127" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="quoteleft,quotedblleft" k="143" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="t" k="33" />
+<hkern g1="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" g2="v" k="33" />
+<hkern g1="B" g2="T" k="53" />
+<hkern g1="B" g2="W" k="12" />
+<hkern g1="B" g2="Y,Yacute,Ydieresis" k="33" />
+<hkern g1="B" g2="w" k="20" />
+<hkern g1="B" g2="y,yacute,ydieresis" k="33" />
+<hkern g1="B" g2="S" k="33" />
+<hkern g1="B" g2="Z" k="12" />
+<hkern g1="B" g2="J" k="37" />
+<hkern g1="B" g2="asterisk" k="61" />
+<hkern g1="B" g2="periodcentered" k="41" />
+<hkern g1="B" g2="trademark" k="41" />
+<hkern g1="B" g2="V" k="20" />
+<hkern g1="B" g2="t" k="20" />
+<hkern g1="B" g2="v" k="33" />
+<hkern g1="B" g2="X" k="12" />
+<hkern g1="B" g2="x" k="20" />
+<hkern g1="C,Ccedilla" g2="T" k="31" />
+<hkern g1="C,Ccedilla" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="33" />
+<hkern g1="C,Ccedilla" g2="W" k="12" />
+<hkern g1="C,Ccedilla" g2="Y,Yacute,Ydieresis" k="25" />
+<hkern g1="C,Ccedilla" g2="g" k="41" />
+<hkern g1="C,Ccedilla" g2="w" k="20" />
+<hkern g1="C,Ccedilla" g2="y,yacute,ydieresis" k="33" />
+<hkern g1="C,Ccedilla" g2="S" k="53" />
+<hkern g1="C,Ccedilla" g2="Z" k="20" />
+<hkern g1="C,Ccedilla" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="68" />
+<hkern g1="C,Ccedilla" g2="J" k="20" />
+<hkern g1="C,Ccedilla" g2="u,ugrave,uacute,ucircumflex,udieresis" k="20" />
+<hkern g1="C,Ccedilla" g2="periodcentered" k="127" />
+<hkern g1="C,Ccedilla" g2="registered" k="-18" />
+<hkern g1="C,Ccedilla" g2="trademark" k="-27" />
+<hkern g1="C,Ccedilla" g2="V" k="12" />
+<hkern g1="C,Ccedilla" g2="t" k="33" />
+<hkern g1="C,Ccedilla" g2="v" k="33" />
+<hkern g1="C,Ccedilla" g2="X" k="12" />
+<hkern g1="C,Ccedilla" g2="hyphen,uni00AD,endash,emdash" k="63" />
+<hkern g1="C,Ccedilla" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="G" g2="T" k="41" />
+<hkern g1="G" g2="W" k="12" />
+<hkern g1="G" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="12" />
+<hkern g1="G" g2="asterisk" k="51" />
+<hkern g1="G" g2="V" k="33" />
+<hkern g1="K" g2="T" k="43" />
+<hkern g1="K" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="33" />
+<hkern g1="K" g2="W" k="20" />
+<hkern g1="K" g2="Y,Yacute,Ydieresis" k="43" />
+<hkern g1="K" g2="j" k="20" />
+<hkern g1="K" g2="w" k="43" />
+<hkern g1="K" g2="y,yacute,ydieresis" k="55" />
+<hkern g1="K" g2="quoteright,quotedblright" k="70" />
+<hkern g1="K" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="K" g2="S" k="37" />
+<hkern g1="K" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="51" />
+<hkern g1="K" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="25" />
+<hkern g1="K" g2="u,ugrave,uacute,ucircumflex,udieresis" k="25" />
+<hkern g1="K" g2="asterisk" k="55" />
+<hkern g1="K" g2="periodcentered" k="104" />
+<hkern g1="K" g2="registered" k="29" />
+<hkern g1="K" g2="trademark" k="-20" />
+<hkern g1="K" g2="V" k="31" />
+<hkern g1="K" g2="question" k="25" />
+<hkern g1="K" g2="quotedbl,quotesingle" k="55" />
+<hkern g1="K" g2="quoteleft,quotedblleft" k="70" />
+<hkern g1="K" g2="t" k="63" />
+<hkern g1="K" g2="v" k="55" />
+<hkern g1="K" g2="x" k="43" />
+<hkern g1="K" g2="hyphen,uni00AD,endash,emdash" k="84" />
+<hkern g1="K" g2="guillemotleft,guilsinglleft" k="20" />
+<hkern g1="K" g2="z" k="33" />
+<hkern g1="L" g2="T" k="246" />
+<hkern g1="L" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="68" />
+<hkern g1="L" g2="W" k="119" />
+<hkern g1="L" g2="Y,Yacute,Ydieresis" k="166" />
+<hkern g1="L" g2="g" k="12" />
+<hkern g1="L" g2="w" k="74" />
+<hkern g1="L" g2="y,yacute,ydieresis" k="92" />
+<hkern g1="L" g2="quoteright,quotedblright" k="193" />
+<hkern g1="L" g2="S" k="51" />
+<hkern g1="L" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="63" />
+<hkern g1="L" g2="f,uniFB01,uniFB02" k="33" />
+<hkern g1="L" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="27" />
+<hkern g1="L" g2="u,ugrave,uacute,ucircumflex,udieresis" k="20" />
+<hkern g1="L" g2="asterisk" k="332" />
+<hkern g1="L" g2="backslash" k="164" />
+<hkern g1="L" g2="periodcentered" k="209" />
+<hkern g1="L" g2="registered" k="209" />
+<hkern g1="L" g2="trademark" k="233" />
+<hkern g1="L" g2="V" k="160" />
+<hkern g1="L" g2="question" k="86" />
+<hkern g1="L" g2="quotedbl,quotesingle" k="236" />
+<hkern g1="L" g2="quoteleft,quotedblleft" k="193" />
+<hkern g1="L" g2="t" k="49" />
+<hkern g1="L" g2="v" k="92" />
+<hkern g1="L" g2="hyphen,uni00AD,endash,emdash" k="100" />
+<hkern g1="L" g2="guillemotleft,guilsinglleft" k="59" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="T" k="41" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="W" k="8" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Y,Yacute,Ydieresis" k="41" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="Z" k="41" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="J" k="96" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="asterisk" k="59" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="registered" k="-8" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="trademark" k="63" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="slash" k="18" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="V" k="20" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="X" k="45" />
+<hkern g1="D,O,Q,Eth,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash" g2="z" k="25" />
+<hkern g1="R" g2="T" k="41" />
+<hkern g1="R" g2="Y,Yacute,Ydieresis" k="33" />
+<hkern g1="R" g2="g" k="20" />
+<hkern g1="R" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="20" />
+<hkern g1="R" g2="S" k="29" />
+<hkern g1="R" g2="Z" k="20" />
+<hkern g1="R" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="20" />
+<hkern g1="R" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="R" g2="J" k="31" />
+<hkern g1="R" g2="asterisk" k="20" />
+<hkern g1="R" g2="periodcentered" k="20" />
+<hkern g1="R" g2="registered" k="-18" />
+<hkern g1="R" g2="V" k="33" />
+<hkern g1="R" g2="X" k="20" />
+<hkern g1="R" g2="x" k="33" />
+<hkern g1="R" g2="hyphen,uni00AD,endash,emdash" k="72" />
+<hkern g1="R" g2="guillemotleft,guilsinglleft" k="61" />
+<hkern g1="R" g2="z" k="33" />
+<hkern g1="R" g2="guillemotright,guilsinglright" k="33" />
+<hkern g1="S" g2="T" k="41" />
+<hkern g1="S" g2="Y,Yacute,Ydieresis" k="25" />
+<hkern g1="S" g2="S" k="33" />
+<hkern g1="S" g2="J" k="33" />
+<hkern g1="S" g2="asterisk" k="31" />
+<hkern g1="S" g2="periodcentered" k="10" />
+<hkern g1="S" g2="z" k="14" />
+<hkern g1="T" g2="Y,Yacute,Ydieresis" k="33" />
+<hkern g1="T" g2="g" k="139" />
+<hkern g1="T" g2="w" k="59" />
+<hkern g1="T" g2="y,yacute,ydieresis" k="57" />
+<hkern g1="T" g2="comma,period,ellipsis" k="227" />
+<hkern g1="T" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="82" />
+<hkern g1="T" g2="S" k="66" />
+<hkern g1="T" g2="Z" k="100" />
+<hkern g1="T" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="53" />
+<hkern g1="T" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="139" />
+<hkern g1="T" g2="f,uniFB01,uniFB02" k="31" />
+<hkern g1="T" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="145" />
+<hkern g1="T" g2="J" k="254" />
+<hkern g1="T" g2="u,ugrave,uacute,ucircumflex,udieresis" k="90" />
+<hkern g1="T" g2="periodcentered" k="135" />
+<hkern g1="T" g2="registered" k="-41" />
+<hkern g1="T" g2="trademark" k="-59" />
+<hkern g1="T" g2="slash" k="160" />
+<hkern g1="T" g2="t" k="31" />
+<hkern g1="T" g2="v" k="57" />
+<hkern g1="T" g2="X" k="41" />
+<hkern g1="T" g2="x" k="66" />
+<hkern g1="T" g2="hyphen,uni00AD,endash,emdash" k="164" />
+<hkern g1="T" g2="guillemotleft,guilsinglleft" k="106" />
+<hkern g1="T" g2="m,n,p,r,ntilde" k="90" />
+<hkern g1="T" g2="s" k="121" />
+<hkern g1="T" g2="z" k="143" />
+<hkern g1="T" g2="guillemotright,guilsinglright" k="82" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="Y,Yacute,Ydieresis" k="33" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="g" k="20" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="comma,period,ellipsis" k="43" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="31" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="S" k="20" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="12" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="J" k="106" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="slash" k="49" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="V" k="20" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="X" k="20" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="x" k="25" />
+<hkern g1="U,Ugrave,Uacute,Ucircumflex,Udieresis" g2="s" k="12" />
+<hkern g1="W" g2="g" k="16" />
+<hkern g1="W" g2="comma,period,ellipsis" k="74" />
+<hkern g1="W" g2="S" k="8" />
+<hkern g1="W" g2="Z" k="8" />
+<hkern g1="W" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="8" />
+<hkern g1="W" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="29" />
+<hkern g1="W" g2="J" k="115" />
+<hkern g1="W" g2="registered" k="-66" />
+<hkern g1="W" g2="trademark" k="-74" />
+<hkern g1="W" g2="slash" k="37" />
+<hkern g1="W" g2="hyphen,uni00AD,endash,emdash" k="12" />
+<hkern g1="W" g2="guillemotleft,guilsinglleft" k="20" />
+<hkern g1="W" g2="z" k="20" />
+<hkern g1="W" g2="guillemotright,guilsinglright" k="43" />
+<hkern g1="Y,Yacute,Ydieresis" g2="T" k="33" />
+<hkern g1="Y,Yacute,Ydieresis" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="Y,Yacute,Ydieresis" g2="g" k="123" />
+<hkern g1="Y,Yacute,Ydieresis" g2="w" k="53" />
+<hkern g1="Y,Yacute,Ydieresis" g2="y,yacute,ydieresis" k="33" />
+<hkern g1="Y,Yacute,Ydieresis" g2="comma,period,ellipsis" k="209" />
+<hkern g1="Y,Yacute,Ydieresis" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="33" />
+<hkern g1="Y,Yacute,Ydieresis" g2="S" k="37" />
+<hkern g1="Y,Yacute,Ydieresis" g2="Z" k="49" />
+<hkern g1="Y,Yacute,Ydieresis" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="33" />
+<hkern g1="Y,Yacute,Ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="147" />
+<hkern g1="Y,Yacute,Ydieresis" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="98" />
+<hkern g1="Y,Yacute,Ydieresis" g2="J" k="205" />
+<hkern g1="Y,Yacute,Ydieresis" g2="u,ugrave,uacute,ucircumflex,udieresis" k="74" />
+<hkern g1="Y,Yacute,Ydieresis" g2="periodcentered" k="104" />
+<hkern g1="Y,Yacute,Ydieresis" g2="registered" k="-57" />
+<hkern g1="Y,Yacute,Ydieresis" g2="trademark" k="-90" />
+<hkern g1="Y,Yacute,Ydieresis" g2="slash" k="117" />
+<hkern g1="Y,Yacute,Ydieresis" g2="question" k="25" />
+<hkern g1="Y,Yacute,Ydieresis" g2="t" k="33" />
+<hkern g1="Y,Yacute,Ydieresis" g2="v" k="33" />
+<hkern g1="Y,Yacute,Ydieresis" g2="x" k="74" />
+<hkern g1="Y,Yacute,Ydieresis" g2="hyphen,uni00AD,endash,emdash" k="145" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotleft,guilsinglleft" k="131" />
+<hkern g1="Y,Yacute,Ydieresis" g2="m,n,p,r,ntilde" k="82" />
+<hkern g1="Y,Yacute,Ydieresis" g2="s" k="98" />
+<hkern g1="Y,Yacute,Ydieresis" g2="z" k="106" />
+<hkern g1="Y,Yacute,Ydieresis" g2="guillemotright,guilsinglright" k="119" />
+<hkern g1="Y,Yacute,Ydieresis" g2="colon,semicolon" k="61" />
+<hkern g1="Z" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="Z" g2="W" k="8" />
+<hkern g1="Z" g2="Y,Yacute,Ydieresis" k="33" />
+<hkern g1="Z" g2="g" k="25" />
+<hkern g1="Z" g2="w" k="29" />
+<hkern g1="Z" g2="y,yacute,ydieresis" k="29" />
+<hkern g1="Z" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="8" />
+<hkern g1="Z" g2="S" k="61" />
+<hkern g1="Z" g2="Z" k="20" />
+<hkern g1="Z" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="41" />
+<hkern g1="Z" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="29" />
+<hkern g1="Z" g2="f,uniFB01,uniFB02" k="41" />
+<hkern g1="Z" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="35" />
+<hkern g1="Z" g2="J" k="57" />
+<hkern g1="Z" g2="u,ugrave,uacute,ucircumflex,udieresis" k="37" />
+<hkern g1="Z" g2="periodcentered" k="123" />
+<hkern g1="Z" g2="registered" k="-41" />
+<hkern g1="Z" g2="trademark" k="-41" />
+<hkern g1="Z" g2="V" k="8" />
+<hkern g1="Z" g2="t" k="33" />
+<hkern g1="Z" g2="v" k="29" />
+<hkern g1="Z" g2="hyphen,uni00AD,endash,emdash" k="59" />
+<hkern g1="Z" g2="guillemotleft,guilsinglleft" k="59" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="T" k="53" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="W" k="12" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="Y,Yacute,Ydieresis" k="53" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="quoteright,quotedblright" k="43" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="asterisk" k="100" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="V" k="43" />
+<hkern g1="a,agrave,aacute,acircumflex,atilde,adieresis,aring" g2="question" k="45" />
+<hkern g1="c,ccedilla" g2="T" k="41" />
+<hkern g1="c,ccedilla" g2="Y,Yacute,Ydieresis" k="53" />
+<hkern g1="c,ccedilla" g2="g" k="20" />
+<hkern g1="c,ccedilla" g2="w" k="-8" />
+<hkern g1="c,ccedilla" g2="y,yacute,ydieresis" k="-8" />
+<hkern g1="c,ccedilla" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="20" />
+<hkern g1="c,ccedilla" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="49" />
+<hkern g1="c,ccedilla" g2="periodcentered" k="33" />
+<hkern g1="c,ccedilla" g2="registered" k="-27" />
+<hkern g1="c,ccedilla" g2="V" k="33" />
+<hkern g1="c,ccedilla" g2="v" k="-8" />
+<hkern g1="c,ccedilla" g2="hyphen,uni00AD,endash,emdash" k="55" />
+<hkern g1="colon,semicolon" g2="Y,Yacute,Ydieresis" k="63" />
+<hkern g1="colon,semicolon" g2="j" k="-8" />
+<hkern g1="colon,semicolon" g2="asterisk" k="78" />
+<hkern g1="comma,period,ellipsis" g2="T" k="227" />
+<hkern g1="comma,period,ellipsis" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="49" />
+<hkern g1="comma,period,ellipsis" g2="W" k="74" />
+<hkern g1="comma,period,ellipsis" g2="Y,Yacute,Ydieresis" k="209" />
+<hkern g1="comma,period,ellipsis" g2="j" k="-63" />
+<hkern g1="comma,period,ellipsis" g2="w" k="59" />
+<hkern g1="comma,period,ellipsis" g2="y,yacute,ydieresis" k="41" />
+<hkern g1="comma,period,ellipsis" g2="quoteright,quotedblright" k="256" />
+<hkern g1="comma,period,ellipsis" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="10" />
+<hkern g1="comma,period,ellipsis" g2="asterisk" k="315" />
+<hkern g1="comma,period,ellipsis" g2="V" k="168" />
+<hkern g1="comma,period,ellipsis" g2="quotedbl,quotesingle" k="229" />
+<hkern g1="comma,period,ellipsis" g2="quoteleft,quotedblleft" k="215" />
+<hkern g1="comma,period,ellipsis" g2="t" k="51" />
+<hkern g1="comma,period,ellipsis" g2="v" k="98" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="T" k="53" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="W" k="20" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="Y,Yacute,Ydieresis" k="63" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="g" k="20" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="quoteright,quotedblright" k="20" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="S" k="41" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="25" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="f,uniFB01,uniFB02" k="8" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="J" k="41" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="asterisk" k="59" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="backslash" k="55" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="periodcentered" k="12" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="registered" k="16" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="trademark" k="45" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="V" k="43" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="question" k="25" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="t" k="33" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="x" k="25" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="hyphen,uni00AD,endash,emdash" k="-8" />
+<hkern g1="e,ae,egrave,eacute,ecircumflex,edieresis,oe" g2="guillemotleft,guilsinglleft" k="16" />
+<hkern g1="f" g2="T" k="-90" />
+<hkern g1="f" g2="W" k="-90" />
+<hkern g1="f" g2="Y,Yacute,Ydieresis" k="-90" />
+<hkern g1="f" g2="g" k="25" />
+<hkern g1="f" g2="j" k="20" />
+<hkern g1="f" g2="quoteright,quotedblright" k="-59" />
+<hkern g1="f" g2="comma,period,ellipsis" k="117" />
+<hkern g1="f" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="41" />
+<hkern g1="f" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="f" g2="u,ugrave,uacute,ucircumflex,udieresis" k="20" />
+<hkern g1="f" g2="backslash" k="-94" />
+<hkern g1="f" g2="periodcentered" k="41" />
+<hkern g1="f" g2="registered" k="-127" />
+<hkern g1="f" g2="trademark" k="-152" />
+<hkern g1="f" g2="slash" k="18" />
+<hkern g1="f" g2="exclam" k="-18" />
+<hkern g1="f" g2="V" k="-115" />
+<hkern g1="f" g2="question" k="-49" />
+<hkern g1="f" g2="quotedbl,quotesingle" k="-82" />
+<hkern g1="f" g2="quoteleft,quotedblleft" k="-59" />
+<hkern g1="f" g2="v" k="-16" />
+<hkern g1="f" g2="X" k="-57" />
+<hkern g1="f" g2="x" k="12" />
+<hkern g1="f" g2="hyphen,uni00AD,endash,emdash" k="33" />
+<hkern g1="f" g2="s" k="12" />
+<hkern g1="f" g2="z" k="33" />
+<hkern g1="f" g2="parenright,bracketright,braceright" k="-86" />
+<hkern g1="g" g2="T" k="63" />
+<hkern g1="g" g2="Y,Yacute,Ydieresis" k="33" />
+<hkern g1="g" g2="j" k="-86" />
+<hkern g1="g" g2="w" k="12" />
+<hkern g1="g" g2="y,yacute,ydieresis" k="12" />
+<hkern g1="g" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="37" />
+<hkern g1="g" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="33" />
+<hkern g1="g" g2="asterisk" k="59" />
+<hkern g1="g" g2="periodcentered" k="10" />
+<hkern g1="g" g2="registered" k="-18" />
+<hkern g1="g" g2="slash" k="-78" />
+<hkern g1="g" g2="question" k="84" />
+<hkern g1="g" g2="v" k="12" />
+<hkern g1="g" g2="z" k="33" />
+<hkern g1="g" g2="parenright,bracketright,braceright" k="-18" />
+<hkern g1="k" g2="T" k="74" />
+<hkern g1="k" g2="Y,Yacute,Ydieresis" k="29" />
+<hkern g1="k" g2="g" k="20" />
+<hkern g1="k" g2="j" k="20" />
+<hkern g1="k" g2="quoteright,quotedblright" k="63" />
+<hkern g1="k" g2="comma,period,ellipsis" k="-18" />
+<hkern g1="k" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="20" />
+<hkern g1="k" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="47" />
+<hkern g1="k" g2="u,ugrave,uacute,ucircumflex,udieresis" k="33" />
+<hkern g1="k" g2="asterisk" k="18" />
+<hkern g1="k" g2="periodcentered" k="63" />
+<hkern g1="k" g2="registered" k="25" />
+<hkern g1="k" g2="trademark" k="41" />
+<hkern g1="k" g2="question" k="45" />
+<hkern g1="k" g2="t" k="33" />
+<hkern g1="k" g2="x" k="12" />
+<hkern g1="k" g2="hyphen,uni00AD,endash,emdash" k="133" />
+<hkern g1="k" g2="guillemotleft,guilsinglleft" k="63" />
+<hkern g1="k" g2="z" k="25" />
+<hkern g1="k" g2="guillemotright,guilsinglright" k="25" />
+<hkern g1="h,m,n,ntilde" g2="T" k="53" />
+<hkern g1="h,m,n,ntilde" g2="Y,Yacute,Ydieresis" k="43" />
+<hkern g1="h,m,n,ntilde" g2="asterisk" k="59" />
+<hkern g1="h,m,n,ntilde" g2="trademark" k="41" />
+<hkern g1="h,m,n,ntilde" g2="V" k="20" />
+<hkern g1="h,m,n,ntilde" g2="question" k="25" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="T" k="119" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="Y,Yacute,Ydieresis" k="104" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="w" k="12" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="y,yacute,ydieresis" k="12" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="quoteright,quotedblright" k="63" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="comma,period,ellipsis" k="20" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="25" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="f,uniFB01,uniFB02" k="8" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="backslash" k="63" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="registered" k="25" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="V" k="39" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="question" k="45" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="quoteleft,quotedblleft" k="18" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="v" k="12" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="X" k="12" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="x" k="45" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="hyphen,uni00AD,endash,emdash" k="-8" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="s" k="8" />
+<hkern g1="b,o,p,ograve,oacute,ocircumflex,otilde,odieresis,oslash,thorn" g2="z" k="20" />
+<hkern g1="quoteleft,quotedblleft" g2="g" k="57" />
+<hkern g1="quoteleft,quotedblleft" g2="comma,period,ellipsis" k="213" />
+<hkern g1="quoteleft,quotedblleft" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="139" />
+<hkern g1="quoteleft,quotedblleft" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="78" />
+<hkern g1="quoteleft,quotedblleft" g2="f,uniFB01,uniFB02" k="33" />
+<hkern g1="quoteleft,quotedblleft" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="57" />
+<hkern g1="quoteleft,quotedblleft" g2="exclamdown" k="98" />
+<hkern g1="quoteleft,quotedblleft" g2="questiondown" k="262" />
+<hkern g1="quoteleft,quotedblleft" g2="X" k="25" />
+<hkern g1="r" g2="g" k="20" />
+<hkern g1="r" g2="j" k="8" />
+<hkern g1="r" g2="w" k="-16" />
+<hkern g1="r" g2="y,yacute,ydieresis" k="-25" />
+<hkern g1="r" g2="quoteright,quotedblright" k="25" />
+<hkern g1="r" g2="comma,period,ellipsis" k="150" />
+<hkern g1="r" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="39" />
+<hkern g1="r" g2="Z" k="20" />
+<hkern g1="r" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="55" />
+<hkern g1="r" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="r" g2="J" k="131" />
+<hkern g1="r" g2="backslash" k="-16" />
+<hkern g1="r" g2="periodcentered" k="29" />
+<hkern g1="r" g2="registered" k="-94" />
+<hkern g1="r" g2="slash" k="59" />
+<hkern g1="r" g2="quoteleft,quotedblleft" k="-59" />
+<hkern g1="r" g2="v" k="-25" />
+<hkern g1="r" g2="hyphen,uni00AD,endash,emdash" k="53" />
+<hkern g1="r" g2="guillemotleft,guilsinglleft" k="41" />
+<hkern g1="r" g2="s" k="20" />
+<hkern g1="r" g2="z" k="20" />
+<hkern g1="s" g2="T" k="53" />
+<hkern g1="s" g2="Y,Yacute,Ydieresis" k="41" />
+<hkern g1="s" g2="quoteright,quotedblright" k="37" />
+<hkern g1="s" g2="asterisk" k="78" />
+<hkern g1="s" g2="V" k="20" />
+<hkern g1="s" g2="question" k="37" />
+<hkern g1="s" g2="hyphen,uni00AD,endash,emdash" k="-20" />
+<hkern g1="t" g2="T" k="33" />
+<hkern g1="t" g2="Y,Yacute,Ydieresis" k="12" />
+<hkern g1="t" g2="g" k="20" />
+<hkern g1="t" g2="comma,period,ellipsis" k="-18" />
+<hkern g1="t" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="31" />
+<hkern g1="t" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="t" g2="u,ugrave,uacute,ucircumflex,udieresis" k="8" />
+<hkern g1="t" g2="periodcentered" k="41" />
+<hkern g1="t" g2="registered" k="-59" />
+<hkern g1="t" g2="slash" k="-18" />
+<hkern g1="t" g2="question" k="63" />
+<hkern g1="t" g2="hyphen,uni00AD,endash,emdash" k="63" />
+<hkern g1="t" g2="guillemotleft,guilsinglleft" k="31" />
+<hkern g1="t" g2="colon,semicolon" k="-18" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="T" k="41" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="Y,Yacute,Ydieresis" k="61" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="asterisk" k="39" />
+<hkern g1="q,u,ugrave,uacute,ucircumflex,udieresis" g2="V" k="33" />
+<hkern g1="w" g2="T" k="53" />
+<hkern g1="w" g2="Y,Yacute,Ydieresis" k="37" />
+<hkern g1="w" g2="j" k="20" />
+<hkern g1="w" g2="comma,period,ellipsis" k="127" />
+<hkern g1="w" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="12" />
+<hkern g1="w" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="20" />
+<hkern g1="w" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="12" />
+<hkern g1="w" g2="J" k="61" />
+<hkern g1="w" g2="asterisk" k="10" />
+<hkern g1="w" g2="registered" k="-49" />
+<hkern g1="w" g2="trademark" k="-18" />
+<hkern g1="w" g2="slash" k="10" />
+<hkern g1="w" g2="V" k="12" />
+<hkern g1="w" g2="X" k="33" />
+<hkern g1="w" g2="z" k="45" />
+<hkern g1="y,yacute,ydieresis" g2="T" k="41" />
+<hkern g1="y,yacute,ydieresis" g2="Y,Yacute,Ydieresis" k="25" />
+<hkern g1="y,yacute,ydieresis" g2="j" k="20" />
+<hkern g1="y,yacute,ydieresis" g2="comma,period,ellipsis" k="98" />
+<hkern g1="y,yacute,ydieresis" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="41" />
+<hkern g1="y,yacute,ydieresis" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="12" />
+<hkern g1="y,yacute,ydieresis" g2="J" k="82" />
+<hkern g1="y,yacute,ydieresis" g2="registered" k="-74" />
+<hkern g1="y,yacute,ydieresis" g2="trademark" k="-16" />
+<hkern g1="y,yacute,ydieresis" g2="slash" k="18" />
+<hkern g1="y,yacute,ydieresis" g2="V" k="12" />
+<hkern g1="y,yacute,ydieresis" g2="X" k="12" />
+<hkern g1="y,yacute,ydieresis" g2="z" k="53" />
+<hkern g1="z" g2="T" k="49" />
+<hkern g1="z" g2="Y,Yacute,Ydieresis" k="12" />
+<hkern g1="z" g2="g" k="8" />
+<hkern g1="z" g2="y,yacute,ydieresis" k="12" />
+<hkern g1="z" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="37" />
+<hkern g1="z" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="20" />
+<hkern g1="z" g2="u,ugrave,uacute,ucircumflex,udieresis" k="20" />
+<hkern g1="z" g2="periodcentered" k="10" />
+<hkern g1="z" g2="registered" k="-33" />
+<hkern g1="z" g2="trademark" k="-16" />
+<hkern g1="z" g2="v" k="12" />
+<hkern g1="z" g2="hyphen,uni00AD,endash,emdash" k="43" />
+<hkern g1="F" g2="Y,Yacute,Ydieresis" k="12" />
+<hkern g1="F" g2="g" k="53" />
+<hkern g1="F" g2="w" k="43" />
+<hkern g1="F" g2="y,yacute,ydieresis" k="43" />
+<hkern g1="F" g2="comma,period,ellipsis" k="168" />
+<hkern g1="F" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="78" />
+<hkern g1="F" g2="S" k="49" />
+<hkern g1="F" g2="Z" k="61" />
+<hkern g1="F" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="F" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="74" />
+<hkern g1="F" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="33" />
+<hkern g1="F" g2="J" k="279" />
+<hkern g1="F" g2="u,ugrave,uacute,ucircumflex,udieresis" k="37" />
+<hkern g1="F" g2="t" k="20" />
+<hkern g1="F" g2="guillemotleft,guilsinglleft" k="41" />
+<hkern g1="F" g2="m,n,p,r,ntilde" k="41" />
+<hkern g1="F" g2="s" k="49" />
+<hkern g1="F" g2="z" k="84" />
+<hkern g1="J" g2="comma,period,ellipsis" k="53" />
+<hkern g1="J" g2="J" k="80" />
+<hkern g1="P" g2="T" k="39" />
+<hkern g1="P" g2="Y,Yacute,Ydieresis" k="20" />
+<hkern g1="P" g2="g" k="47" />
+<hkern g1="P" g2="comma,period,ellipsis" k="250" />
+<hkern g1="P" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="102" />
+<hkern g1="P" g2="S" k="20" />
+<hkern g1="P" g2="Z" k="131" />
+<hkern g1="P" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="78" />
+<hkern g1="P" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="45" />
+<hkern g1="P" g2="J" k="295" />
+<hkern g1="P" g2="hyphen,uni00AD,endash,emdash" k="33" />
+<hkern g1="P" g2="guillemotleft,guilsinglleft" k="41" />
+<hkern g1="P" g2="s" k="20" />
+<hkern g1="P" g2="z" k="41" />
+<hkern g1="V" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="V" g2="g" k="43" />
+<hkern g1="V" g2="w" k="18" />
+<hkern g1="V" g2="y,yacute,ydieresis" k="18" />
+<hkern g1="V" g2="comma,period,ellipsis" k="143" />
+<hkern g1="V" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="33" />
+<hkern g1="V" g2="S" k="29" />
+<hkern g1="V" g2="Z" k="39" />
+<hkern g1="V" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="V" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="59" />
+<hkern g1="V" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="35" />
+<hkern g1="V" g2="J" k="139" />
+<hkern g1="V" g2="u,ugrave,uacute,ucircumflex,udieresis" k="61" />
+<hkern g1="V" g2="hyphen,uni00AD,endash,emdash" k="39" />
+<hkern g1="V" g2="guillemotleft,guilsinglleft" k="43" />
+<hkern g1="V" g2="m,n,p,r,ntilde" k="41" />
+<hkern g1="V" g2="s" k="31" />
+<hkern g1="V" g2="z" k="47" />
+<hkern g1="V" g2="guillemotright,guilsinglright" k="47" />
+<hkern g1="X" g2="T" k="41" />
+<hkern g1="X" g2="U,Ugrave,Uacute,Ucircumflex,Udieresis" k="20" />
+<hkern g1="X" g2="w" k="33" />
+<hkern g1="X" g2="y,yacute,ydieresis" k="43" />
+<hkern g1="X" g2="quoteright,quotedblright" k="25" />
+<hkern g1="X" g2="S" k="33" />
+<hkern g1="X" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="45" />
+<hkern g1="X" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="20" />
+<hkern g1="X" g2="f,uniFB01,uniFB02" k="43" />
+<hkern g1="X" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="25" />
+<hkern g1="X" g2="J" k="20" />
+<hkern g1="X" g2="u,ugrave,uacute,ucircumflex,udieresis" k="20" />
+<hkern g1="X" g2="quotedbl,quotesingle" k="12" />
+<hkern g1="X" g2="quoteleft,quotedblleft" k="25" />
+<hkern g1="X" g2="t" k="43" />
+<hkern g1="X" g2="hyphen,uni00AD,endash,emdash" k="66" />
+<hkern g1="X" g2="guillemotleft,guilsinglleft" k="33" />
+<hkern g1="X" g2="z" k="33" />
+<hkern g1="X" g2="guillemotright,guilsinglright" k="25" />
+<hkern g1="parenleft,bracketleft,braceleft" g2="j" k="-164" />
+<hkern g1="parenleft,bracketleft,braceleft" g2="J" k="41" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="T" k="33" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="W" k="12" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="Y,Yacute,Ydieresis" k="145" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="Z" k="41" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="V" k="63" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="v" k="12" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="X" k="63" />
+<hkern g1="hyphen,uni00AD,endash,emdash" g2="x" k="33" />
+<hkern g1="germandbls" g2="w" k="33" />
+<hkern g1="germandbls" g2="y,yacute,ydieresis" k="43" />
+<hkern g1="germandbls" g2="quoteright,quotedblright" k="147" />
+<hkern g1="germandbls" g2="f,uniFB01,uniFB02" k="12" />
+<hkern g1="germandbls" g2="question" k="43" />
+<hkern g1="germandbls" g2="quotedbl,quotesingle" k="147" />
+<hkern g1="germandbls" g2="quoteleft,quotedblleft" k="123" />
+<hkern g1="germandbls" g2="t" k="37" />
+<hkern g1="guillemotleft,guilsinglleft" g2="T" k="82" />
+<hkern g1="guillemotleft,guilsinglleft" g2="W" k="45" />
+<hkern g1="guillemotleft,guilsinglleft" g2="Y,Yacute,Ydieresis" k="119" />
+<hkern g1="guillemotleft,guilsinglleft" g2="V" k="45" />
+<hkern g1="guillemotleft,guilsinglleft" g2="X" k="25" />
+<hkern g1="guillemotleft,guilsinglleft" g2="x" k="41" />
+<hkern g1="guillemotright,guilsinglright" g2="T" k="104" />
+<hkern g1="guillemotright,guilsinglright" g2="W" k="20" />
+<hkern g1="guillemotright,guilsinglright" g2="Y,Yacute,Ydieresis" k="131" />
+<hkern g1="guillemotright,guilsinglright" g2="S" k="61" />
+<hkern g1="guillemotright,guilsinglright" g2="Z" k="31" />
+<hkern g1="guillemotright,guilsinglright" g2="J" k="61" />
+<hkern g1="guillemotright,guilsinglright" g2="V" k="43" />
+<hkern g1="guillemotright,guilsinglright" g2="X" k="33" />
+<hkern g1="guillemotright,guilsinglright" g2="x" k="53" />
+<hkern g1="question" g2="quoteright,quotedblright" k="57" />
+<hkern g1="quotedbl,quotesingle" g2="comma,period,ellipsis" k="254" />
+<hkern g1="quotedbl,quotesingle" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="131" />
+<hkern g1="quotedbl,quotesingle" g2="X" k="12" />
+<hkern g1="quotedbl,quotesingle" g2="s" k="41" />
+<hkern g1="quoteright,quotedblright" g2="g" k="57" />
+<hkern g1="quoteright,quotedblright" g2="comma,period,ellipsis" k="291" />
+<hkern g1="quoteright,quotedblright" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="143" />
+<hkern g1="quoteright,quotedblright" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="74" />
+<hkern g1="quoteright,quotedblright" g2="f,uniFB01,uniFB02" k="29" />
+<hkern g1="quoteright,quotedblright" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="57" />
+<hkern g1="quoteright,quotedblright" g2="X" k="25" />
+<hkern g1="quoteright,quotedblright" g2="s" k="86" />
+<hkern g1="v" g2="T" k="41" />
+<hkern g1="v" g2="Y,Yacute,Ydieresis" k="25" />
+<hkern g1="v" g2="j" k="20" />
+<hkern g1="v" g2="comma,period,ellipsis" k="98" />
+<hkern g1="v" g2="A,Agrave,Aacute,Acircumflex,Atilde,Adieresis,Aring" k="25" />
+<hkern g1="v" g2="Z" k="12" />
+<hkern g1="v" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="41" />
+<hkern g1="v" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="12" />
+<hkern g1="v" g2="J" k="82" />
+<hkern g1="v" g2="hyphen,uni00AD,endash,emdash" k="25" />
+<hkern g1="v" g2="z" k="53" />
+<hkern g1="x" g2="T" k="57" />
+<hkern g1="x" g2="Y,Yacute,Ydieresis" k="49" />
+<hkern g1="x" g2="y,yacute,ydieresis" k="33" />
+<hkern g1="x" g2="S" k="12" />
+<hkern g1="x" g2="C,G,O,Q,Ccedilla,Ograve,Oacute,Ocircumflex,Otilde,Odieresis,Oslash,OE" k="20" />
+<hkern g1="x" g2="a,agrave,aacute,acircumflex,atilde,adieresis,aring,ae" k="20" />
+<hkern g1="x" g2="c,d,e,o,q,ccedilla,egrave,eacute,ecircumflex,edieresis,ograve,oacute,ocircumflex,otilde,odieresis,oslash,oe" k="45" />
+<hkern g1="x" g2="hyphen,uni00AD,endash,emdash" k="33" />
+<hkern g1="x" g2="guillemotleft,guilsinglleft" k="53" />
+<hkern g1="x" g2="guillemotright,guilsinglright" k="41" />
+</font>
+</defs></svg>
\ No newline at end of file
--- /dev/null
+#! /bin/bash
+convert='/usr/bin/convert'
+composite='/usr/bin/composite'
+
+for file in original/*
+do
+ temp=`basename $file`
+ $convert -scale '287>' $file resized/$temp
+ $convert -scale '210>' $file midsized/$temp
+ $convert -scale '120>' $file thumb/$temp
+
+ echo $temp
+done
+++ /dev/null
-<!doctype html>
-<html>
-<head>
-<meta charset="UTF-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<title>Cedarvill Marine</title>
-<link type="text/css" rel="stylesheet" href="core/css/responsive.css" />
-<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
-<script src="core/js/jquery.fittext.js"></script>
-<!--[if lt IE 9]>
-<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
-<![endif]-->
-</head>
-
-<body>
-<div id="container">
- <h1><span>Welcome to </span>Cedarville Marine</h1>
- <h2><span id="mobile_phone"><a class="tel" href="tel:9064842815">906.484.2815</a></span><span id="desktop_phone">906.484.2815</span></h2>
- <section>
- <p>Cedarville Marine is a full service marina and ship's store located on the waterfront in beautiful downtown Cedarville, Michigan. We're currently constructing a new Web site, so please check back this spring for a brand new look and additional information about our facility!</p>
- <p>If you're not already familiar with us, please see the following list for a sample of our service offerings:</p>
- <ul>
- <li>Mercury / Mercruiser and OMC motor services</li>
- <li>Mercury / Mercruiser, Evinrude BRP, & Arctic Cat sales and repair.</li>
- <li>Outboard & inboard boat motor repair</li>
- <li>Boat storage</li>
- <li>Boat shrink wrapping</li>
- <li>25 ton travel lift</li>
- <li>Seasonal dockage</li>
- <li>Transient dockage</li>
- <li>Gas & Diesel</li>
- <li>Pump-out station</li>
- <li>Trash disposal</li>
- </ul>
- <p>Give us a call at <a class="tel" href="tel:9064842815">(906)484-2815</a> if you'd like more information or wish to reserve a 2014 slip rental.</p>
- </section>
- <div id="logo" alt="cedarville marine anchor logo" ></div>
-</div><!-- container -->
-<script>
- $("h1").fitText(1.2, { minFontSize: '30px', maxFontSize: '72px' });
- $( document ).ready(function() {
- if($(window).width() > 481){
- $("#mobile_phone").hide();
- $("#desktop_phone").show();
- }else{
- $("#mobile_phone").show();
- $("#desktop_phone").hide();
- }
- });
- $( window ).resize(function() {
- if($(window).width() > 481){
- $("#mobile_phone").hide();
- $("#desktop_phone").show();
- }else{
- $("#mobile_phone").show();
- $("#desktop_phone").hide();
- }
- });
-</script>
-</body>
-</html>
\ No newline at end of file
--- /dev/null
+<?php
+$includeFunctions = false;
+require_once 'setup.phtml';
+if ($_REQUEST['siteMapXml'] == '1') {
+ // Generate the sitemap
+ $siteMapXml = new Toolkit_SiteMapXml(
+ Toolkit_Database::getInstance()
+ );
+ $xml = $siteMapXml->getXmlSitemap();
+
+ // Save the sitemap into the root of the site
+ $fp = fopen(BASE_PATH.'sitemap.xml', 'w');
+ fwrite($fp, $xml);
+ fclose($fp);
+
+ // Output the sitemap as XML and quit
+ header("content-type: text/xml");
+ header('Content-Length: '.strlen($xml));
+ header('Content-Disposition: attachment;filename="sitemap.xml"');
+ echo $xml;
+ exit;
+}
+$dbh = Toolkit_Database::getInstance();
+if ( defined("SHORT_URLS")
+ && SHORT_URLS
+ && isset($_GET['glmPage'])
+ && $_GET['glmPage']
+) {
+ $shortURL = new Toolkit_ShortURL($dbh);
+ if (!$catid = $shortURL->getShortUrlId($_GET['glmPage'])) {
+ $catid = HOME_ID;
+ }
+ $_REQUEST['catid'] = $_GET['catid'] = $catid;
+} elseif ($catid = filter_input(INPUT_GET, 'catid', FILTER_VALIDATE_INT)) {
+ // do nothing, catid set and filtered
+} else {
+ $catid = HOME_ID;
+}
+$qfKeys
+ = array_filter(
+ array_keys($_REQUEST),
+ create_function('$key', 'return preg_match("/_qf/", $key);')
+ );
+if ($catid != HOME_ID) {
+ require_once 'Text/CAPTCHA.php';
+ require_once 'Text/CAPTCHA/Driver/Image.php';
+} elseif (empty($qfKeys)) {
+ $_REQUEST['catid'] = $_GET['catid'] = $catid;
+}
+HTTP_Session2::useCookies(false);
+HTTP_Session2::start();
+
+if (isset($qfKeys) && !empty($qfKeys)) {
+ if (ctype_digit($_SESSION['_regWizard_container']['values']['page1']['catid'])) {
+ $catid = $_SESSION['_regWizard_container']['values']['page1']['catid'];
+ } elseif (ctype_digit($_REQUEST['catid'])) {
+ $catid = $_REQUEST['catid'];
+ }
+ $_REQUEST['catid'] = $_POST['catid'] = $_GET['catid'] = $catid;
+}
+require_once 'setup_functions.phtml';
+
+
+// If Ticketing is enabled, run ticket login
+if (defined('TICKETING') && TICKETING) {
+ require_once 'ticketing/ticket_login.inc';
+}
+
+// Create a new registry so we don't pollute the global namespace
+$registry = new Toolkit_Registry;
+
+$registry->cacheOptions = $GLOBALS['cacheOptions'];
+$registry->flexyOptions = $GLOBALS['flexyOptions'];
+$registry->catid = $catid;
+$registry->dbh = $dbh;
+$registry->logger = Toolkit_Logger::getLogger();
+
+if (defined('SHOP_PAGE_ID') && $catid == SHOP_PAGE_ID) {
+ // Initiate HTML_Template_Flexy.
+ $template = new HTML_Template_Flexy($registry->flexyOptions);
+ $keywordReplacement = new Toolkit_Template_KeywordReplacement(
+ new Toolkit_Toolbox_PageGatewayPublish(
+ $registry->dbh
+ )
+ );
+ $breadCrumbsFactory = new Toolkit_BreadCrumbsFactory(
+ new Toolkit_Toolbox_PageGatewayPublishFactory(
+ $registry->dbh
+ )
+ );
+ // Page object used for merging with the flexy template object.
+ // now using the page class from toolkit
+ $glmPage = new Toolkit_Page(
+ new Toolkit_Template_Page(),
+ $breadCrumbsFactory,
+ new Toolkit_Toolbox_PageGatewayPublishFactory(
+ $registry->dbh
+ ),
+ new Toolkit_Toolbox_ParagraphGatewayPublishFactory(
+ $registry->dbh
+ ),
+ new Toolkit_Template_Navigation_Factory(),
+ $keywordReplacement,
+ $registry->catid
+ );
+ $glmPage->fetchPage();
+ ob_start();
+ include 'shop.php';
+ $glmPage->toolboxContent = ob_get_contents();
+ ob_end_clean();
+
+ $glmPage->topScripts
+ = Toolkit_Common::getScripts($GLOBALS['topScripts']);
+ $glmPage->bottomScripts
+ = Toolkit_Common::getScripts($GLOBALS['bottomScripts']);
+ $glmPage->styles = Toolkit_Common::getStyleSheets();
+
+ // Compile the template.html from the templates directory.
+ $template->compile('template.html');
+ // Merge compiled template with the $glmPage object.
+ $template->outputObject($glmPage);
+} else {
+ // Create a router so we can get where we need to be.
+ $registry->router = new Toolkit_Router($registry);
+ $registry->router->setPath(BASE . 'Toolkit/Template');
+ $registry->router->setApplication('Template');
+
+ $registry->router->loader();
+}
--- /dev/null
+var SignUp =
+{
+ originalText: null,
+ targetBox: null,
+ verifyBox: null,
+
+ init: function()
+ {
+ SignUp.targetBox = $('#email-f');
+ SignUp.verifyBox = $('#email-h');
+ SignUp.originalText = SignUp.targetBox.val();
+ SignUp.targetBox.parent().bind('submit', SignUp.submit);
+ SignUp.targetBox.focus(SignUp.clear);
+ SignUp.targetBox.blur(SignUp.reset);
+ },
+
+ clear: function(event)
+ {
+ // Only clear the search string if the user
+ // has not previously entered anything.
+ if (this.value == SignUp.originalText) {
+ this.value = '';
+ }
+ },
+
+ reset: function(event)
+ {
+ // Only reset the search string if there was
+ // nothing entered into the search box.
+ if (!this.value) {
+ this.value = SignUp.originalText;
+ }
+ },
+
+ submit: function(event)
+ {
+ var signUpEmpty = !SignUp.targetBox.val(),
+ signUpTextIsOrig = (SignUp.targetBox.val() == SignUp.originalText);
+ if (signUpEmpty || signUpTextIsOrig) {
+ event.preventDefault();
+ alert('Please enter your email address!');
+ SignUp.targetBox.focus();
+ }
+
+ SignUp.verifyBox.val(SignUp.targetBox.val());
+ }
+};
+
+$(document).ready(SignUp.init);
--- /dev/null
+var SignUp={originalText:null,targetBox:null,verifyBox:null,init:function(){SignUp.targetBox=$("#email-f");SignUp.verifyBox=$("#email-h");SignUp.originalText=SignUp.targetBox.val();SignUp.targetBox.parent().bind("submit",SignUp.submit);SignUp.targetBox.focus(SignUp.clear);SignUp.targetBox.blur(SignUp.reset)},clear:function(a){if(this.value==SignUp.originalText){this.value=""}},reset:function(a){if(!this.value){this.value=SignUp.originalText}},submit:function(c){var b=!SignUp.targetBox.val(),a=(SignUp.targetBox.val()==SignUp.originalText);if(b||a){c.preventDefault();alert("Please enter your email address!");SignUp.targetBox.focus()}SignUp.verifyBox.val(SignUp.targetBox.val())}};$(document).ready(SignUp.init);
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Media Toolbox(R)
+ *
+ * Setup.phtml file includes the functions that were in the functions.inc
+ * and siteinfo.inc file into one file.
+ * All set up stuff is on the top of the page.
+ *
+ * PHP version 5
+ *
+ * @category Gaslight_Media_Website
+ * @package Gaslight_Media
+ * @header Gaslight Media Toolbox
+ * @author Jamie Kahgee <jamie.kahgee@gmail.com>
+ * @author Steve Sutton <steve@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @version $Id: setup.phtml,v 1.102 2010/08/10 17:43:11 jamie Exp $
+ * @release SVN: $Id: $
+ * @link http://www.gaslightmedia.com
+ */
+
+/**
+ * DO NOT EDIT THIS SECTION
+ */
+// Find where this file is located
+$BASE_PATH = dirname(__FILE__);
+$php_version = phpversion();
+// If php5 or above
+if (version_compare($php_version, '5.0.0', '>')) {
+ $CALLED_FROM_DIR = substr(dirname($_SERVER['SCRIPT_FILENAME']), strlen($BASE_PATH));
+ define('GLM_HOST_ID', $_ENV['GLM_HOST_ID']);
+ define('PHP5', true);
+} else {
+ $CALLED_FROM_DIR = substr(dirname($HTTP_SERVER_VARS['PATH_TRANSLATED']), strlen($BASE_PATH));
+ define('GLM_HOST_ID', $_SERVER['GLM_HOST_ID']);
+ define('PHP5', false);
+}
+
+if (($x = strlen($CALLED_FROM_DIR)) > 0) {
+ $base_url = $_SERVER['HTTP_HOST'] . substr(dirname($_SERVER['SCRIPT_NAME']), 0, -strlen($CALLED_FROM_DIR));
+} else {
+ $script_name_dir = dirname($_SERVER['SCRIPT_NAME']);
+ if ($script_name_dir == '/') {
+ $script_name_dir = '';
+ }
+ $base_url = $_SERVER['HTTP_HOST'] . $script_name_dir;
+}
+// Added to strip any trailing /'s to make sure we don't end up with many
+$base_url = preg_replace('|/*$|', '', $base_url);
+$BASE_URL = "http://$base_url";
+
+if (!isset($DEBUG)) {
+ $DEBUG = (isset($mysecretcode) && $mysecretcode == 1234);
+}
+$securePagesArray = array();
+define('SECURE_PAGES', serialize($securePagesArray));
+$nonMobilePagesArray = array();
+define('NON_MOBILE_PAGES', serialize($nonMobilePagesArray));
+/**
+ * URI used for the root of the site
+ */
+define('BASE_URL', "$BASE_URL/");
+/**
+ * Another way of calling the BASE_URL constant
+ */
+define('URL_BASE', "$BASE_URL/");
+/**
+ * root directory path of site in filesystem
+ */
+define('BASE_PATH', "$BASE_PATH/");
+/**
+ * Another way of calling the BASE_PATH constant
+ */
+define('BASE', "$BASE_PATH/");
+
+// GLM App repository config {{{
+switch ($_ENV['GLM_HOST_ID']) {
+case 'PRODUCTION' : // {{{
+ $glmAppBase = '/var/www/server/app.gaslightmedia.com/';
+ break; // }}}
+case 'DEVELOPMENT' : // {{{
+ $glmAppBase = '/var/www/server/app.gaslightmedia.com/';
+ break; // }}}
+case 'STEVE' : // {{{
+ $glmAppBase = '/var/www/server/app.gaslightmedia.com/';
+ break; // }}}
+case 'CHUCK' : // {{{
+ $glmAppBase = '/var/www/server/app.gaslightmedia.com/';
+ break; // }}}
+case 'JOHN' : // {{{
+ $glmAppBase = '/var/www/server/app.gaslightmedia.com/';
+ break; // }}}
+default : // {{{
+ die('<p>Your request could not be completed at this time, please try again later!</p>');
+ break; // }}}
+} // }}}
+/**
+ * Path to the common GLM application repository
+ */
+define('GLM_APP_BASE', $glmAppBase);
+// {{{ Path Configuration
+
+// explode the current include_path by forward slashes (/),
+// colons (:), or periods (.)
+$path = preg_split('(\/|:|\.)', get_include_path());
+if (!in_array(GLM_APP_BASE . 'glmPEAR', $path)) {
+ set_include_path(
+ GLM_APP_BASE . 'glmPEAR' . PATH_SEPARATOR . get_include_path()
+ );
+}
+
+if (!in_array(GLM_APP_BASE . 'glmZend', $path)) {
+ set_include_path(
+ GLM_APP_BASE . 'glmZend/1.10.2/library' . PATH_SEPARATOR . get_include_path()
+ );
+}
+
+// Include path to geocode API
+if (!in_array(GLM_APP_BASE . 'geocode', $path)) {
+ set_include_path(
+ GLM_APP_BASE . 'geocode' . PATH_SEPARATOR . get_include_path()
+ );
+}
+
+// }}}
+
+// {{{ autoloader
+// nullify any existing autoloads
+spl_autoload_register(null, false);
+// specify extensions that may be loaded
+spl_autoload_extensions();
+
+// {{{ classLoader()
+
+/**
+ * spl autoloader callback function
+ *
+ * @param string $className Name of the class to autoload
+ *
+ * @return false on error
+ */
+function classLoader($className)
+{
+ switch ($className) {
+ case 'GLM_DB' :
+ require_once BASE . 'classes/class_db.inc';
+ break;
+
+ case 'GLM_TOOLBOX' :
+ require_once BASE . 'classes/class_toolbox.inc';
+ break;
+
+ case 'GLM_TEMPLATE' :
+ require_once BASE . 'classes/class_template.inc';
+ break;
+
+ case 'GLM_EVENTS' :
+ require_once BASE . 'classes/class_events.inc';
+ break;
+
+ case 'guide' :
+ require_once BASE . 'classes/class_visitor_guide_form.inc';
+ break;
+
+ case 'event_form' :
+ require_once BASE . 'classes/class_event_form.inc';
+ break;
+
+ case 'html_quickform_rule_phone' :
+ case 'html_quickform_rule_email' :
+ case 'html_quickform_rule_zip' :
+ case 'html_quickform_rule_state' :
+ case 'html_quickform_rule_banwords' :
+ case 'html_quickform_rule_date' :
+ case 'html_quickform_rule_image' :
+ case 'html_quickform_rule_image2' :
+ case 'html_quickform_rule_memberimage' :
+ case 'html_quickform_rule_memberpackage' :
+ case 'html_quickform_rule_memberlogo' :
+ case 'html_quickform_rule_memberfile' :
+ case 'html_quickform_rule_amenity' :
+ case 'html_quickform_rule_banner' :
+ $path = explode('_', $className);
+ $className = ucfirst(end($path));
+ require_once GLM_APP_BASE . "glmPEAR/HTML/QuickForm/Rule/$className.php";
+ break;
+
+ default :
+ // Since our old naming conventions conflict w/ the pear
+ // naming conventions.
+ // Check to see what we're trying to call by checking if the
+ // file/class exits in the PEAR sturcture.
+ $class = implode('/', explode('_', $className));
+ if (file_exists(GLM_APP_BASE . "glmPEAR/$class.php")) {
+ require_once GLM_APP_BASE . "glmPEAR/$class.php";
+ } elseif (file_exists(GLM_APP_BASE . "glmZend/1.10.2/library/$class.php")) {
+ require_once GLM_APP_BASE . "glmZend/1.10.2/library/$class.php";
+ } elseif (file_exists(GLM_APP_BASE . "geocode/$class.php")) {
+ require_once GLM_APP_BASE . "geocode/$class.php";
+ } elseif (file_exists(GLM_APP_BASE . "$class.php")) {
+ require_once GLM_APP_BASE . "$class.php";
+ } elseif (file_exists(BASE . "$class.php")) {
+ require_once BASE . "$class.php";
+ } elseif (file_exists(BASE . "classes/$className.php")) {
+ require_once BASE . "classes/$className.php";
+ } else {
+ // Add check to search our entire search path for
+ // the desired class.
+ // fixes phpunit dying for missing classes.
+ $includePath = get_include_path();
+ if (strpos($includePath, PATH_SEPARATOR) !== false) {
+ if ( ($i = explode(PATH_SEPARATOR, $includePath))
+ && count($i) > 0
+ ) {
+ foreach ($i as $j) {
+ if (file_exists("{$j}/{$class}.php")) {
+ require_once "{$j}/{$class}.php";
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+ break;
+ }
+}
+
+// }}}
+
+// register the loader functions
+spl_autoload_register('classLoader');
+
+// }}}
+
+set_error_handler(array('Toolkit_Logger', 'errorHandler'));
+if (!date_default_timezone_set('America/Detroit')) {
+ $logger =& Toolkit_Logger::getLogger();
+ $logger->warning('Default time zone not getting set.');
+}
+
+$serverConfig = new Zend_Config_Ini(
+ BASE . 'config/server.ini',
+ strtolower($_ENV['GLM_HOST_ID'])
+);
+//$serverConfig = Toolkit_ServerConfig::getInstance();
+
+$siteConfig = new Zend_Config_Ini(
+ BASE . 'config/site.ini',
+ strtolower($_ENV['GLM_HOST_ID'])
+);
+//$siteConfig = Toolkit_SiteConfig::getInstance();
+
+$applicationConfig = new Zend_Config_Ini(
+ BASE . 'config/application.ini',
+ strtolower($_ENV['GLM_HOST_ID'])
+);
+//$applicationConfig = Toolkit_ApplicationConfig::getInstance();
+
+/**
+ * Home page id of site
+ */
+define('HOME_ID', $siteConfig->home_id);
+/**
+ * Name used in title tag, admin area and emails
+ */
+define('SITENAME', $siteConfig->sitename);
+/**
+ * DB library type
+ */
+define('DB_TYPE', $serverConfig->database->type);
+/**
+ * Default error message
+ */
+define('DB_ERROR_MSG', $serverConfig->database->error->message);
+/**
+ * Default per page number
+ */
+define('ENTRIES_PER_PAGE', $siteConfig->entries_per_page);
+/**
+ * Turn on/off short url
+ */
+define('SHORT_URLS', $siteConfig->short_urls);
+/**
+ * Site has banner ad application?
+ */
+define('BANNERS', $applicationConfig->bannerdb->application);
+/**
+ * Site has Shop application?
+ */
+define('RETAIL_SHOP', $applicationConfig->retailShop->application);
+/**
+ * Shop Application is set for this page
+ */
+define('SHOP_PAGE_ID', null);
+/**
+ * Site has contact db application?
+ */
+define('CONTACT_DB', $applicationConfig->contactdb->application);
+/**
+ * Sets the first year available in the year select lists in
+ */
+define('CONTACTS_FIRST_YEAR', $applicationConfig->contactdb->first_year);
+/**
+ * Used in the email out for contact DB
+ */
+define('PRODUCTION_MODE', $applicationConfig->contactdb->production_mode);
+/**
+ * Turn ON for html emails
+ */
+define('HTML_EMAIL', $applicationConfig->contactdb->html_email);
+/**
+ * Login Id for StreamSend account
+ */
+define('STREAMSEND_LOGIN_ID', $applicationConfig->contactdb->streamsend->login);
+/**
+ * key for StreamSend account
+ */
+define('STREAMSEND_KEY', $applicationConfig->contactdb->streamsend->key);
+/**
+ * StreamSend Account Name
+ */
+define('STREAMSEND_ACCOUNT_NAME', $applicationConfig->contactdb->streamsend->account_name);
+/**
+ * StreamSend Audience Number
+ */
+define('STREAMSEND_AUDIENCE', $applicationConfig->contactdb->streamsend->audience);
+/**
+ * Site uses streamsend module?
+ */
+define(
+ 'STREAMSEND_FORMS_API',
+ $applicationConfig->contactdb->streamsend->application
+);
+/**
+ * Enable the form to send data to constant contact
+ */
+define('CONSTANT_CONTACT', $applicationConfig->constantcontact->application);
+/**
+ * Login for API (required)
+ */
+define('CONSTANT_CONTACT_LOGIN', $applicationConfig->constantcontact->login);
+/**
+ * Password for API (required)
+ */
+define('CONSTANT_CONTACT_PASSWORD', $applicationConfig->constantcontact->password);
+/**
+ * API Key (required)
+ */
+define('CONSTANT_CONTACT_APIKEY', $applicationConfig->constantcontact->apikey);
+/**
+ * API Path (Required)
+ */
+define('CONSTANT_CONTACT_APIPATH', $applicationConfig->constantcontact->apipath);
+define(
+ 'CONSTANT_CONTACT_LIST',
+ serialize($applicationConfig->constantcontact->list->toArray())
+);
+/**
+ * Coupons Database Installed?
+ */
+define('COUPONS', $applicationConfig->coupons->application);
+/**
+ * Site has event db application?
+ */
+define('EVENT_DB', $applicationConfig->eventdb->application);
+/**
+ * Site has CommonApps EventCalendar application?
+ */
+define('COMMON_EVENTS', $applicationConfig->eventdb->commonEvents);
+/**
+ * Page for the event calendar
+ */
+define('EVENT_PAGE', $applicationConfig->eventdb->event_page);
+/**
+ * Site has home page Events?
+ */
+define('HOME_EVENTS', $applicationConfig->eventdb->home_events);
+/**
+ * Site has google search api key?
+ */
+define('GOOGLE_SEARCH', $applicationConfig->google->search->application);
+/**
+ * Site has CommonApps GLMSearch application?
+ */
+define('GLM_SEARCH', $applicationConfig->glmsearch->application);
+define('GLM_SEARCH_SITE', $applicationConfig->glmsearch->site);
+define('GLM_SEARCH_LOGIN', $applicationConfig->glmsearch->login);
+define('GLM_SEARCH_KEY', $applicationConfig->glmsearch->key);
+/**
+ * Site has home page Headlines?
+ */
+define('HOME_HEADLINES', $applicationConfig->headlines->application);
+/**
+ * Site has Event Management
+ */
+define('EVENT_MANAGEMENT', $applicationConfig->event_management->application);
+define('EVENT_MANAGEMENT_HOME_PAGE', $applicationConfig->event_management->home_page);
+define('EVENT_MANAGEMENT_MEMBERS_PAGE', $applicationConfig->event_management->members_only_page);
+/**
+ * Member Database Installed?
+ */
+define('MEMBERS_DB', $applicationConfig->memberdb->application);
+/**
+ * Members login page catid
+ */
+define('MEMBERS_CATEGORY', $applicationConfig->memberdb->login_page);
+/**
+ * Toolbox page id for splash page when members log into members only area
+ */
+define('MEMBERS_ONLY_HOME_PAGE', $applicationConfig->memberdb->members->home_page);
+/**
+ * Toolbox page id for edit profile form in members only area
+ */
+define('MEMBERS_PROFILE_FORM_PAGE', $applicationConfig->memberdb->members->profile_form_page);
+/**
+ * Toolbox page id for coupon module in members only area
+ */
+define('MEMBERS_COUPONS_PAGE', $applicationConfig->memberdb->members->coupons->page);
+/**
+ * Toolbox page id for coupon module in members only area
+ */
+define('MEMBERS_COUPON_NOTIFICATION_EMAIL', $applicationConfig->memberdb->members->coupons->notification_email);
+/**
+ * Toolbox page id for events module in members only area
+ */
+define('MEMBERS_EVENTS_PAGE', $applicationConfig->memberdb->members->events_page);
+define('MEMBERS_EVENTS_NOTIFICATION_EMAIL', $applicationConfig->memberdb->members->events->notification_email);
+/**
+ * Toolbox page id for reports module in members only area
+ */
+define('MEMBERS_REPORTS_PAGE', $applicationConfig->memberdb->members->reports_page);
+/**
+ * Toolbox page id for leads module in members only area
+ */
+define('MEMBERS_LEADS_PAGE', $applicationConfig->memberdb->members->leads_page);
+/**
+ * Toolbox page id for member trip planner page
+ */
+define('MEMBER_SESSION_LIST', $applicationConfig->memberdb->session->list);
+/**
+ * The id of the page for the planner output
+ */
+define('MEMBER_SESSION_PAGE', $applicationConfig->memberdb->session->page);
+/**
+ * The id of the page for the create account form
+ */
+define('MEMBER_SESSION_FORM', $applicationConfig->memberdb->session->form);
+/**
+ * Members uses streamsend module?
+ */
+define('MEMBER_STREAMSEND_API', $applicationConfig->memberdb->streamsend->application);
+/**
+ * Site has Press/Newsletter?
+ */
+define('PRESS_DB', $applicationConfig->news->application);
+/**
+ * Toolbox Page id for the news output
+ */
+define('PRESS_PAGE_ID', $applicationConfig->news->page);
+/**
+ * Site has home page news Press/Newsletter?
+ */
+define('HOME_NEWS', $applicationConfig->news->home);
+/**
+ * Site has photo gallery?
+ */
+define('PHOTO_GALLERY', $applicationConfig->photo_gallery->application);
+/*
+ * Site has rotating images application?
+ */
+define('ROTATING_IMAGES', $applicationConfig->rotating_images->application);
+/**
+ * Grab weather feed for site?
+ */
+define('WEATHER', $applicationConfig->weather->application);
+define('EMPLOYMENT', $applicationConfig->employment->application);
+define('VIDEOS', $applicationConfig->videos->application);
+define('SEASONS', $applicationConfig->seasons->application);
+define('GLM_BLOCKS', $applicationConfig->blocks->application);
+/**
+ * Grab weather feed for site?
+ */
+define('GIFT_CERTIFICATES', $applicationConfig->gift_certificates->application);
+/**
+ * Site is Mobile enabled
+ */
+define('MOBILE_SITE', $siteConfig->mobile_site);
+
+$pathParts = pathinfo($BASE_PATH);
+/**
+ * Server directory ie (www.gaslightmedia.com, demo.gaslightmedia.com)
+ */
+define('SERVER_DIRECTORY', $pathParts['basename']);
+
+$isSecurePage = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on');
+/**
+ * absolute url path for site
+ */
+define('SITE_URL', $serverConfig->site_url);
+/**
+ * coupon url used in printed PDF coupons
+ */
+define('COUPON_SITE_URL', $serverConfig->coupon_site_url);
+/**
+ * Url for the CDN-Hosted Javascript and css for Jquery
+ */
+$jqueryUrl = ($isSecurePage) ? 'https://' : 'http://';
+define(
+ 'JQUERY_CDN_JS',
+ $jqueryUrl . 'ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'
+);
+define(
+ 'JQUERY_UI_CDN_CSS',
+ $jqueryUrl . 'code.jquery.com/ui/1.8.13/themes/smoothness/jquery-ui.css'
+);
+define(
+ 'JQUERY_UI_CDN_JS',
+ $jqueryUrl . 'ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js'
+);
+/**
+ * Link URL to access mobile site home page
+ */
+define('MOBILE_LINK', $serverConfig->mobile->link);
+define('HAVE_MOBILE_HOSTNAME', $serverConfig->mobile->hostname);
+/**
+ * API key for google search AJAX
+ */
+define('GSEARCH_API', $serverConfig->google->search->key);
+/**
+ * site restriction to use for google searches
+*/
+define('GSEARCH_SITE_RESTRICTION', $serverConfig->google->search->site_restriction);
+/**
+ * API key for google maps
+ */
+define('GMAPS_API', $serverConfig->google->maps->key);
+/**
+ * URI to the common GLM application repository
+ */
+define('GLM_APP_BASE_URL', $serverConfig->app->base_url);
+define('GLM_APP_BASE_SECURE_URL', $serverConfig->app->base_secure_url);
+/**
+ * Who to send email address to on production servers when fatal error is encountered
+ */
+define('ERROR_EMAIL_ADDRESS', $serverConfig->error->email);
+if ($serverConfig->error->reporting instanceof Traversable) {
+
+ $values = array();
+ foreach ($serverConfig->error->reporting as $value) {
+ $values[] = $value;
+ }
+ $lambdaFunction = create_function('$a, $b', 'return $a ^ $b;');
+ $level = array_reduce($values, $lambdaFunction, 0);
+} else {
+ $level = $serverConfig->error->reporting;
+}
+/**
+ * Turn off all error reporting
+ */
+error_reporting($level);
+/**
+ * Don't print errors to the screen as part of output
+ */
+ini_set('display_errors', $serverConfig->error->display);
+$fileServerUrl = $isSecurePage
+ ? $serverConfig->file_server->secure
+ : $serverConfig->file_server->unsecure;
+/**
+ * URL of which file server to use
+ */
+define('FILE_SERVER_URL', $fileServerUrl);
+/**
+ * Type of Log subclass to use
+ */
+define('ERROR_LOG_TYPE', $serverConfig->error->type);
+/**
+ * Constant of log store to use
+ */
+define('ERROR_LOG_NAME', constant($serverConfig->error->name));
+/**
+ * Identity reported to the log system
+ */
+define('ERROR_LOG_IDENT', $serverConfig->error->ident);
+/**
+ * Log messages up to and including this level
+ */
+define('ERROR_LOG_LEVEL', constant($serverConfig->error->level));
+/**
+ * additional configuration for ERROR_LOG_TYPE subclass
+ */
+$ERROR_LOG_CONF = array(
+ 'destination' => $serverConfig->error->conf->path
+ . constant($serverConfig->error->conf->server)
+ . "/{$serverConfig->error->conf->file}",
+ 'lineFormat' => $serverConfig->error->conf->line_format,
+);
+
+$BASE_SECURE_URL = "https://$base_url";
+/**
+ * Url used for the secure site
+ *
+ * For some sites it is necessary to change BASE_URL when in secure mode
+ */
+define('BASE_SECURE_URL', "$BASE_SECURE_URL/");
+/**
+ * Media Url Base is https if $_SERVER['HTTPS'] is on
+ * http otherwise
+ */
+$mediaBaseUrl
+ = ($isSecurePage)
+ ? BASE_SECURE_URL
+ : BASE_URL;
+define('MEDIA_BASE_URL', $mediaBaseUrl);
+/**
+ * Media Url Base is https if $_SERVER['HTTPS'] is on
+ * http otherwise
+ */
+$mediaAppBaseUrl
+ = ($isSecurePage)
+ ? GLM_APP_BASE_SECURE_URL
+ : GLM_APP_BASE_URL;
+define('MEDIA_APP_BASE_URL', $mediaAppBaseUrl);
+define('CKEDITOR_JS', MEDIA_APP_BASE_URL . 'ckeditor/4.3.2/ckeditor.js');
+// This needs to be set to the real url ie. http://demo.gaslightmedia.com
+if ($isSecurePage) {
+ $BASE_URL = "http://$base_url";
+}
+
+// Set CURRENT_BASE_URL according to whether site is secure or not.
+if ($isSecurePage) {
+ define('CURRENT_BASE_URL', $BASE_SECURE_URL.'/');
+} else {
+ define('CURRENT_BASE_URL', $BASE_URL.'/');
+}
+
+/**
+ * Database Connection String
+ */
+define('CONN_STR', "host={$serverConfig->database->params->host} user={$serverConfig->database->params->username} dbname={$serverConfig->database->params->dbname}");
+/**
+ * DSN Connection String
+ */
+define('DSN', "{$serverConfig->database->adapter}://{$serverConfig->database->params->username}@{$serverConfig->database->params->host}/{$serverConfig->database->params->dbname}");
+/**
+ * Used for error reporting
+ *
+ * When in development mode, more info is displayed if errors occur.
+ */
+define('DEVELOPMENT', $serverConfig->development);
+/**
+ * Site owners email address
+ */
+define('OWNER_EMAIL', $serverConfig->email->owner);
+/**
+ * email for contact form
+ */
+define('CONTACT_EMAIL', $serverConfig->email->contact);
+/**
+ * Add Your Event Form Email
+ */
+define('ADD_EVENT_EMAIL', $serverConfig->email->addEventForm);
+/**
+ * email for enews signup
+ */
+define('ENEWS_EMAIL', $serverConfig->email->enews);
+/**
+ * email for visitor guide form
+ */
+define('VISITOR_GUIDE_EMAIL', $serverConfig->email->visitor_guide);
+/**
+ * email for Employment Application Form
+ */
+define('EMP_APP_EMAIL', $serverConfig->email->applicationForm);
+/**
+ * From header for admin/Contact mailout.
+ */
+define('FROM_NEWS_EMAIL', $serverConfig->email->from_news);
+/**
+ * From headers for admin/MContact
+ */
+define('FROM_MEMBER_NEWS_EMAIL', $serverConfig->email->from_member_news);
+/**
+ * Reply header for admin/MContact
+ */
+define('REPLY_MEMBER_NEWS_EMAIL', $serverConfig->email->reply_member_news);
+/**
+ * which email address should the notifications go to when a member
+ */
+define('MEMBER_RECORD_UPDATES_ADVISOR', $serverConfig->email->member_record_updates_advisor);
+/**
+ * Reply-To email used in the members forgot password email
+ */
+define('MEMBER_FORGOT_PASSWORD_EMAIL_REPLY_TO', $serverConfig->email->member_forgot_password_email_reply_to);
+/**
+ * This is where the first email goes.
+ * To notify the site owner that gift cert is ordered
+ */
+define('GIFTCERT_EMAIL', $serverConfig->email->giftcert);
+/**
+ * Used as the From address
+ */
+define('GIFTCERT_FROM_EMAIL', $serverConfig->email->giftcert_from);
+/**
+ * This email containes sensitive info and must be upnorth.net address
+ */
+define('GIFTCERT_SECURE_EMAIL', $serverConfig->email->giftcert_secure);
+/**
+ * in admin/Contact mailout.phtml file
+ * Reply-To: header
+ */
+define('REPLY_TO', $serverConfig->email->reply_to);
+/**
+ * Dead email address for forms w/ one-way communication
+ */
+define('DO_NOT_REPLY_EMAIL', $serverConfig->email->do_not_reply);
+/**
+ * The email address to send the banner reports to
+ * for the site admin
+ */
+define('BANNER_REPORTS_ADMIN_EMAIL', $serverConfig->email->banner_reports_admin);
+/**
+ * The email address to send banner expiration notices to
+ */
+define('EXPIRING_BANNER_NOTIFICATION_EMAIL', $serverConfig->email->expiring->banner_notification);
+/**
+ * Authorize.net processing parameters
+ * ALSO SEE "Authorize.Net Configuration" SECTION BELOW CONDITIONAL SETTINGS
+ */
+define('AUTH_TEST', $serverConfig->auth->test);
+define('AUTH_SEND_CONF', $serverConfig->auth->send_conf);
+define('AUTH_MERCHANT_EMAIL', $serverConfig->auth->merchant_email);
+define('AUTH_DEBUG', $serverConfig->auth->debug);
+/**
+ * Enable Ticketing System
+ */
+define('TICKETING', $applicationConfig->ticketing->available);
+define("TICKETS_CAT_ID", $applicationConfig->ticketing->catid);
+define("TICKETS_CAT_SEO", $applicationConfig->ticketing->cat_seo);
+
+define('LIBJS_ENV', $serverConfig->resources->environment->javascript);
+define('CSS_ENV', $serverConfig->resources->environment->css);
+
+if ($version = filter_var($serverConfig->resources->version, FILTER_VALIDATE_INT)) {
+ // do nothing - its already set
+} else {
+ $version = mt_rand();
+}
+/**
+ * Site Versioning for cachebusting
+ */
+define('VERSION', $version);
+
+$secureUrl = $isSecurePage ? BASE_SECURE_URL : BASE_URL;
+
+$forceCompile = false;//(DEVELOPMENT || $isSecurePage);
+
+$flexyOptions = array(
+ 'templateDir' => BASE . 'templates',
+ 'compileDir' => BASE . 'templates/compiled',
+ 'forceCompile' => $forceCompile,
+ 'url_rewrite' => "baseurl/::".BASE_URL.",basesecureurl/::$secureUrl,glmappbaseurl/::" . GLM_APP_BASE_URL,
+ 'allowPHP' => true,
+);
+
+$cacheOptions = array(
+ 'cacheDir' => BASE . 'cache/',
+ 'writeControl' => true,
+ 'lifeTime' => (DEVELOPMENT) ? 0 : null,
+ 'readControl' => true,
+ 'fileNameProtection' => false,
+ 'readControlType' => 'md5',
+);
+
+// Global arrays to store resources for apps.
+$topScripts = array();
+$bottomScripts = array();
+$styleSheets = array();
+
+// help guide base (depreciated)
+define('HELP_BASE', 'help/');
+// uploads directory path
+define('UP_BASE', BASE . 'uploads/');
+// the images url path
+define('IMG_BASE', MEDIA_BASE_URL . 'images/');
+
+// Toolbox image paths
+define('ORIGINAL_PATH', BASE . 'images/original/');
+define('RESIZED_PATH', BASE . 'images/resized/');
+define('MIDSIZED_PATH', BASE . 'images/midsized/');
+define('THUMB_PATH', BASE . 'images/thumb/');
+
+// Amenity icon path
+define('AMENITY_PATH', BASE . 'images/amenities/');
+
+$imageURLBase = $isSecurePage ? BASE_SECURE_URL : BASE_URL;
+
+// Toolbox image URLS
+// Now using new Image Server
+/**
+ * Now using new Image Server
+ * http://is0.gaslightmedia.com/admin
+ * setup new owner with owner_id and owner_pw
+ * MUST BE DONE BEFORE uploading any images
+ */
+/**
+* IS_OWNER_ID owner_id from image server config
+ */
+define('IS_OWNER_ID', $serverConfig->file_server->owner_id);
+/**
+ * IS_OWNER_PW owner_pw from image server config
+ */
+define('IS_OWNER_PW', $serverConfig->file_server->owner_password);
+/**
+ * Toolbox image URLS
+ * NOTE: these don't change
+ * There are 4 global "image styles"
+ * original = used for original images no processing
+ * tbs1 = used to be resized
+ * tbs2 = used to be midsized
+ * tbs3 = used to be thumb
+ * check on http://is0.gaslightmedia.com/admin under owner _SYSTEM_
+ * for their sizes
+ * if you need a different size you'll need to create image style for
+ * your owner with new sizes just use one of set style names
+ * tbs1,tbs2,tbs3 (do this before uploading the image will help)
+ */
+define('ORIGINAL', FILE_SERVER_URL.IS_OWNER_ID."/original/");
+define('RESIZED', FILE_SERVER_URL.IS_OWNER_ID."/tbs1/");
+define('MIDSIZED', FILE_SERVER_URL.IS_OWNER_ID."/tbs2/");
+define('THUMB', FILE_SERVER_URL.IS_OWNER_ID."/tbs3/");
+
+// Toolbox image rules
+define('TOOLBOX_ORIGINAL', ORIGINAL);
+define('TOOLBOX_RESIZED', RESIZED);
+define('TOOLBOX_MIDSIZED', MIDSIZED);
+define('TOOLBOX_THUMB', THUMB);
+
+/**
+ * These are defines for the photo gallery images
+ * NOTICE these are now on image server
+ * There are 2 global "image styles"
+ * pgs1 = used to be photo-large
+ * pgs2 = used to be photo-small
+ * check on http://is0.gaslightmedia.com/admin under owner _SYSTEM_
+ * for their sizes
+ */
+define('UPLOADED_FILES', FILE_SERVER_URL.IS_OWNER_ID.'/');
+
+define('PHOTO_LARGE_URL', FILE_SERVER_URL.IS_OWNER_ID."/pgs1/");
+define('PHOTO_SMALL_URL', FILE_SERVER_URL.IS_OWNER_ID."/pgs2/");
+
+/**
+ * Home page headlines thumbnail
+ */
+define('HOMEPAGE_HEADLINE_THUMB', FILE_SERVER_URL.IS_OWNER_ID."/homepageHeadlineThumb/");
+define('HEADLINE_THUMB', FILE_SERVER_URL.IS_OWNER_ID.'/headline/');
+
+// Coupon Image rules
+define('COUPON_THUMB', FILE_SERVER_URL.IS_OWNER_ID.'/couponThumb/');
+
+// Rotating Image rules
+define('ROTATING_IMAGE_THUMB', FILE_SERVER_URL.IS_OWNER_ID.'/rotatingImagesThumb/');
+define('ROTATING_IMAGE_RESIZED', FILE_SERVER_URL.IS_OWNER_ID.'/rotatingImagesResized/');
+
+// Member image rules
+define('MEMBER_ORIGINAL', FILE_SERVER_URL.IS_OWNER_ID."/original/");
+define('MEMBER_RESIZED', FILE_SERVER_URL.IS_OWNER_ID."/memberResized/");
+define('MEMBER_MIDSIZED', FILE_SERVER_URL.IS_OWNER_ID."/memberMidsized/");
+define('MEMBER_THUMB', FILE_SERVER_URL.IS_OWNER_ID."/memberThumb/");
+define('MEMBER_PHOTOS', FILE_SERVER_URL.IS_OWNER_ID."/memberPhotos/");
+define('MEMBER_PACKAGES', FILE_SERVER_URL.IS_OWNER_ID."/memberResized/");
+define('MEMBER_GOOGLE_MAP', FILE_SERVER_URL.IS_OWNER_ID."/memberGoogleMap/");
+define('MEMBER_UPLOADED_FILES', BASE . 'uploads/member_files/');
+define('TRIP_PLANNER_MAP_IMG', FILE_SERVER_URL.IS_OWNER_ID."/tripPlannerMapImg/");
+
+// Banner image rules
+define('BANNER_ORIGINAL', FILE_SERVER_URL.IS_OWNER_ID.'/original/');
+define('HORIZONTAL_BANNER', FILE_SERVER_URL.IS_OWNER_ID.'/horizontalBanner/');
+define('HORIZONTAL_BANNER_THUMB', FILE_SERVER_URL.IS_OWNER_ID.'/horizontalBannerThumb/');
+define('VERTICAL_BANNER', FILE_SERVER_URL.IS_OWNER_ID.'/verticalBanner/');
+define('VERTICAL_BANNER_THUMB', FILE_SERVER_URL.IS_OWNER_ID.'/verticalBannerThumb/');
+
+// Press image rules
+define('PRESS_ORIGINAL', TOOLBOX_ORIGINAL);
+define('PRESS_RESIZED', TOOLBOX_RESIZED);
+define('PRESS_MIDSIZED', TOOLBOX_MIDSIZED);
+define('PRESS_THUMB', TOOLBOX_THUMB);
+
+// Event image rules
+define('EVENT_ORIGINAL', TOOLBOX_ORIGINAL);
+define('EVENT_RESIZED', TOOLBOX_RESIZED);
+define('EVENT_MIDSIZED', TOOLBOX_MIDSIZED);
+define('EVENT_THUMB', TOOLBOX_THUMB);
+
+// Form image rules
+define('FORM_ORIGINAL', TOOLBOX_ORIGINAL);
+define('FORM_RESIZED', TOOLBOX_RESIZED);
+define('FORM_MIDSIZED', TOOLBOX_MIDSIZED);
+define('FORM_THUMB', TOOLBOX_THUMB);
+
+// CKImage image rules
+/**
+ * This is the rule used to create the Maximum Allowed Size image
+ * we allow for CKEditor Images, which is (700x500)
+ *
+ * If the user resizes (edits) the image, it can be smaller
+ */
+define('CKIMAGE', FILE_SERVER_URL.IS_OWNER_ID."/CKImage/");
+define('CKIMAGE_ORIGINAL', TOOLBOX_ORIGINAL);
+define('CKIMAGE_RESIZED', TOOLBOX_RESIZED);
+define('CKIMAGE_MIDSIZED', TOOLBOX_MIDSIZED);
+define('CKIMAGE_THUMB', TOOLBOX_THUMB);
+/**
+ * This is the thumbnail image used in the GLM Image Browser
+ * attached to the new CKEditor
+ */
+define('IMAGE_MANAGER', FILE_SERVER_URL.IS_OWNER_ID."/imgMgr/");
+
+// Amenity image URLS
+define('AMENITY_THUMB', "{$imageURLBase}images/amenities/");
+// Icon image URLS
+define('ICONS_URL', "{$imageURLBase}images/");
+
+//
+// Authorize.Net Configuration
+//
+
+/**
+ * Curl executable
+ */
+define('AUTH_CURL', '/usr/bin/curl');
+/**
+ * Authorization URL
+ */
+define('AUTH_URL', 'https://secure.authorize.net/gateway/transact.dll');
+/**
+ * "TRUE" (use Authorize.net test mode), "FALSE", "LOCAL_TEST", "LOCAL_TEST_ERROR"
+ * Must be "FALSE" for production! - When using "LOCAL_TEST" only approves card '0011001100110011'
+ */
+//define('SI_AUTH_TEST', 'TRUE');
+/**
+ * Authorize.Net Customer Login -- UNIQE FOR EACH CUSTOMER --
+ */
+define('AUTH_LOGIN', 'xxxxxxx');
+/**
+ * Authorize.Net Customer Transaction Key -- UNIQE FOR EACH CUSTOMER --
+ */
+define('AUTH_TRAN_KEY', 'xxxxxxxxxxxxx');
+/**
+ * TRUE to have customer's receive E-Mail confirmation
+ */
+//define('AUTH_SEND_CONF', 'FALSE');
+/**
+ * TRUE to have merchant receive E-Mail convirmation of customer charges
+ */
+//define('AUTH_MERCHANT_EMAIL', 'TRUE');
+/**
+ * MD5 Hash secret used by Authorize.Net to generate MD5 response verification data
+ * If empty - don't check MD5 response
+ */
+define('AUTH_SECRET', '');
+
+// Transaction status types
+
+/**
+ * Unknown state
+ */
+define('AUTH_STATUS_UNKNOWN', 0);
+/**
+ * Declined by Authorize.net
+ */
+define('AUTH_STATUS_DECLINED', 1);
+/**
+ * Authorize.Net error
+ */
+define('AUTH_STATUS_ERROR', 2);
+/**
+ * Approved by Authorize.Net
+ */
+define('AUTH_STATUS_APPROVED', 10);
+/**
+ * Card manually processed
+ */
+define('AUTH_STATUS_MANUAL', 11);
+/**
+ * Paid by Check
+ */
+define('AUTH_STATUS_CHECK', 12);
+/**
+ * On Account
+ */
+define('AUTH_STATUS_ACCOUNT', 13);
+/**
+ * Paid by Other means
+ */
+define('AUTH_STATUS_OTHER_PAID', 14);
+/**
+ * Comp, no charge
+ */
+define('AUTH_STATUS_COMP', 15);
+
+$auth_status_list
+ = AUTH_STATUS_UNKNOWN.'^Unknown Card Status~'
+ . AUTH_STATUS_DECLINED.'^Declined by AuthorizeNet~'
+ . AUTH_STATUS_ERROR.'^AuthorizeNet Approval Error~'
+ . AUTH_STATUS_APPROVED.'^Approved by AuthorizeNet~'
+ . AUTH_STATUS_MANUAL.'^Card Approved Manually~'
+ . AUTH_STATUS_CHECK.'^Paid by Check~'
+ . AUTH_STATUS_ACCOUNT.'^Applied to Account~'
+ . AUTH_STATUS_OTHER_PAID.'^Paid by other means~'
+ . AUTH_STATUS_COMP.'^Comp, no charge';
+
+/*
+ * Load other applications
+ */
+
+if (defined('TICKETING') && TICKETING) {
+ include_once 'ticketing/config.inc';
+}
+
+// [status_US] array of states and their abbr.
+$states_US[''] = '-- Select --';// {{{
+$states_US['AL'] = 'Alabama';
+$states_US['AK'] = 'Alaska';
+$states_US['AZ'] = 'Arizona';
+$states_US['AR'] = 'Arkansas';
+$states_US['CA'] = 'California';
+$states_US['CO'] = 'Colorado';
+$states_US['CT'] = 'Connecticut';
+$states_US['DE'] = 'Delaware';
+$states_US['DC'] = 'District of Columbia';
+$states_US['FL'] = 'Florida';
+$states_US['GA'] = 'Georgia';
+$states_US['HI'] = 'Hawaii';
+$states_US['ID'] = 'Idaho';
+$states_US['IL'] = 'Illinois';
+$states_US['IN'] = 'Indiana';
+$states_US['IA'] = 'Iowa';
+$states_US['KS'] = 'Kansas';
+$states_US['KY'] = 'Kentucky';
+$states_US['LA'] = 'Louisiana';
+$states_US['ME'] = 'Maine';
+$states_US['MD'] = 'Maryland';
+$states_US['MA'] = 'Massachusetts';
+$states_US['MI'] = 'Michigan';
+$states_US['MN'] = 'Minnesota';
+$states_US['MS'] = 'Mississppi';
+$states_US['MO'] = 'Missouri';
+$states_US['MT'] = 'Montana';
+$states_US['NE'] = 'Nebraska';
+$states_US['NV'] = 'Nevada';
+$states_US['NH'] = 'New Hampshire';
+$states_US['NJ'] = 'New Jersey';
+$states_US['NM'] = 'New Mexico';
+$states_US['NY'] = 'New York';
+$states_US['NC'] = 'North Carolina';
+$states_US['ND'] = 'North Dakota';
+$states_US['OH'] = 'Ohio';
+$states_US['OK'] = 'Oklahoma';
+$states_US['OR'] = 'Oregon';
+$states_US['PA'] = 'Pennsylvania';
+$states_US['RI'] = 'Rhode Island';
+$states_US['SC'] = 'South Carolina';
+$states_US['SD'] = 'South Dakota';
+$states_US['TN'] = 'Tennessee';
+$states_US['TX'] = 'Texas';
+$states_US['UT'] = 'Utah';
+$states_US['VT'] = 'Vermont';
+$states_US['VA'] = 'Virginia';
+$states_US['WA'] = 'Washington';
+$states_US['WV'] = 'West Virginia';
+$states_US['WI'] = 'Wisconsin';
+$states_US['WY'] = 'Wyoming';// }}}
+
+// [states] extended states array
+$states['AB'] = 'Alberta';// {{{
+$states['AS'] = 'American Samoa';
+$states['BC'] = 'British Columbia';
+$states['DC'] = 'District of Columbia';
+$states['FM'] = 'Federated States of Micronesia';
+$states['GU'] = 'Guam';
+$states['MB'] = 'Manitoba';
+$states['MH'] = 'Marshall Islands';
+$states['NB'] = 'New Brunswick';
+$states['NF'] = 'Newfoundland';
+$states['MP'] = 'Northern Mariana Islands';
+$states['NT'] = 'Northwest Territories';
+$states['NS'] = 'Nova Scotia';
+$states['ON'] = 'Ontario';
+$states['PW'] = 'Palau';
+$states['PE'] = 'Prince Edward Island';
+$states['PR'] = 'Puerto Rico';
+$states['QC'] = 'Quebec';
+$states['SK'] = 'Saskatchewan';
+$states['VI'] = 'Virgin Islands';
+$states['YT'] = 'Yukon';// }}}
+
+// Merge the 50 US states together with some of the extended
+// provinces / territories and then sort them on their keys
+// Then add the remaining countries and areas at the end
+// of the array.
+$states = $states_US + $states;
+ksort($states);
+$states = $states + array(// {{{
+ 'Asia' => 'Asia',
+ 'Australia' => 'Australia',
+ 'Bahamas' => 'Bahamas',
+ 'Caribbean' => 'Caribbean',
+ 'Costa Rica' => 'Costa Rica',
+ 'South America' => 'South America',
+ 'South Africa' => 'South Africa',
+ 'Europe' => 'Europe',
+ 'Mexico' => 'Mexico',
+);// }}}
+
+// Libraries
+// Replaced with the actual functions instead of includes (2001-12-14)
+
+$cp1252_map = array(
+ "\xc2\x80" => "\xe2\x82\xac", // EURO SIGN
+ "\xc2\x82" => "\xe2\x80\x9a", // SINGLE LOW-9 QUOTATION MARK
+ "\xc2\x83" => "\xc6\x92", // LATIN SMALL LETTER F WITH HOOK
+ "\xc2\x84" => "\xe2\x80\x9e", // DOUBLE LOW-9 QUOTATION MARK
+ "\xc2\x85" => "\xe2\x80\xa6", // HORIZONTAL ELLIPSIS
+ "\xc2\x86" => "\xe2\x80\xa0", // DAGGER
+ "\xc2\x87" => "\xe2\x80\xa1", // DOUBLE DAGGER
+ "\xc2\x88" => "\xcb\x86", // MODIFIER LETTER CIRCUMFLEX ACCENT
+ "\xc2\x89" => "\xe2\x80\xb0", // PER MILLE SIGN
+ "\xc2\x8a" => "\xc5\xa0", // LATIN CAPITAL LETTER S WITH CARON
+ "\xc2\x8b" => "\xe2\x80\xb9", // SINGLE LEFT-POINTING ANGLE QUOTATION
+ "\xc2\x8c" => "\xc5\x92", // LATIN CAPITAL LIGATURE OE
+ "\xc2\x8e" => "\xc5\xbd", // LATIN CAPITAL LETTER Z WITH CARON
+ "\xc2\x91" => "\xe2\x80\x98", // LEFT SINGLE QUOTATION MARK
+ "\xc2\x92" => "\xe2\x80\x99", // RIGHT SINGLE QUOTATION MARK
+ "\xc2\x93" => "\xe2\x80\x9c", // LEFT DOUBLE QUOTATION MARK
+ "\xc2\x94" => "\xe2\x80\x9d", // RIGHT DOUBLE QUOTATION MARK
+ "\xc2\x95" => "\xe2\x80\xa2", // BULLET
+ "\xc2\x96" => "\xe2\x80\x93", // EN DASH
+ "\xc2\x97" => "\xe2\x80\x94", // EM DASH
+
+ "\xc2\x98" => "\xcb\x9c", // SMALL TILDE
+ "\xc2\x99" => "\xe2\x84\xa2", // TRADE MARK SIGN
+ "\xc2\x9a" => "\xc5\xa1", // LATIN SMALL LETTER S WITH CARON
+ "\xc2\x9b" => "\xe2\x80\xba", // SINGLE RIGHT-POINTING ANGLE QUOTATION
+ "\xc2\x9c" => "\xc5\x93", // LATIN SMALL LIGATURE OE
+ "\xc2\x9e" => "\xc5\xbe", // LATIN SMALL LETTER Z WITH CARON
+ "\xc2\x9f" => "\xc5\xb8", // LATIN CAPITAL LETTER Y WITH DIAERESIS
+);
+
+if ($includeFunctions) {
+ /**
+ * all setup function in setup_functions.phtml
+ */
+ require_once BASE_PATH . "setup_functions.phtml";
+}
+
+/**
+ * Chuck and John H. have setup site monitoring script that will hit a
+ * file every so often and make a db connection to test if that database
+ * connection is good. The aim here it to monitor the sites to see if
+ * they go down and page Chuck/John and Dave We'll check for the setup
+ * script in the root of the site if it is not there and the database
+ * has been setup in this file it will create the file.
+ */
+$SiteCheckFile = BASE . 'GLM_site_check.phtml';
+if (!file_exists($SiteCheckFile) && $_ENV['GLM_HOST_ID'] == 'PRODUCTION') {
+ // get the dbname for the connection
+ $siteCheckArray = explode(" ", CONN_STR);
+ foreach ($siteCheckArray as $scaVar) {
+ parse_str($scaVar, $parsedSettings);
+ if ($parsedSettings['dbname']) {
+ $dbname = $parsedSettings['dbname'];
+ }
+ }
+ if ($dbname) {
+ // we're going to assume that the connection
+ // will be for ds3.gaslightmedia.com
+ $fileContent = "<?php \n"
+ . "/**\n"
+ . " * GLM Standard Site Monitoring Target\n"
+ . " */\n\n"
+ . "define('HOST', 'ds4.gaslightmedia.com');\n"
+ . "define('USER', 'nobody');\n"
+ . "define('DBNAME', '$dbname');\n"
+ . "\n"
+ . "// End of parameters to set for each site\n"
+ . "include '/var/www/templates/Global_site_check.phtml';\n"
+ . '?' . '>';
+ file_put_contents($SiteCheckFile, $fileContent);
+ }
+}
--- /dev/null
+<?php
+/** @header Gaslight Media Toolbox
+ functions that were in the functions.inc
+ */
+ // {{{ setSearchPath()
+
+ /**
+ * This is a copy from the DB singletons
+ * Toolkit_Database.php <-- Primary
+ * classes/class_db.inc <-- Secondary - soon to be removed
+ *
+ * the following packages depend on this function. after all are updated
+ * this function can/should be removed
+ *
+ * Admin/Postcards
+ */
+ function setSearchPath(&$dbh)
+ {
+ // Add schemas to search path.
+ $format = "
+ SELECT set_config(
+ 'search_path',
+ current_setting('search_path') || ',%s',
+ false
+ )";
+
+ $sql = sprintf($format, 'toolbox');
+ db_exec($dbh, $sql);
+
+ $sql = sprintf($format, 'ckimages');
+ db_exec($dbh, $sql);
+
+ if (defined('CONTACT_DB') && CONTACT_DB) {
+ // define banner search path
+ $sql = sprintf($format, 'contacts');
+ db_exec($dbh, $sql);
+ }
+
+ if (defined('BANNERS') && BANNERS) {
+ // define banner search path
+ $sql = sprintf($format, 'banners');
+ db_exec($dbh, $sql);
+ }
+
+ if (defined('ROTATING_IMAGES') && ROTATING_IMAGES) {
+ // define rotating images search path
+ $sql = sprintf($format, 'rotatingImages');
+ db_exec($dbh, $sql);
+ }
+
+ if (defined('PHOTO_GALLERY') && PHOTO_GALLERY) {
+ // define phot gallery search path
+ $sql = sprintf($format, 'photos');
+ db_exec($dbh, $sql);
+ }
+
+ if (defined('EVENT_DB') && EVENT_DB) {
+ // define members search path
+ $sql = sprintf($format, 'events');
+ db_exec($dbh, $sql);
+ }
+
+ if (defined('POSTCARD_DB') && POSTCARD_DB) {
+ // define members search path
+ $sql = sprintf($format, 'postcards');
+ db_exec($dbh, $sql);
+ }
+
+ if (defined('MEMBERS_DB') && MEMBERS_DB) {
+ // define members search path
+ $sql = sprintf($format, 'members');
+ db_exec($dbh, $sql);
+ }
+
+ if (defined('COUPONS') && COUPONS) {
+ // define coupon search path
+ $sql = sprintf($format, 'coupons');
+ db_exec($dbh, $sql);
+ }
+ }
+
+ // }}}
+
+ /**
+ * is_utf8
+ *
+ * @param mixed $string
+ * @access public
+ * @return void
+ */
+ function is_utf8($string)
+ {
+ return preg_match('/^([\x00-\x7f]|[\xc2-\xdf][\x80-\xbf]|\xe0[\xa0-\xbf][\x80-\xbf]|[\xe1-\xec][\x80-\xbf]{2}|\xed[\x80-\x9f][\x80-\xbf]|[\xee-\xef][\x80-\xbf]{2}|f0[\x90-\xbf][\x80-\xbf]{2}|[\xf1-\xf3][\x80-\xbf]{3}|\xf4[\x80-\x8f][\x80-\xbf]{2})*$/', $string) === 1;
+ }
+
+ /**
+ * cp1252_to_utf8
+ *
+ * @param mixed $str
+ * @access public
+ * @return void
+ */
+ function cp1252_to_utf8($str)
+ {
+ global $cp1252_map;
+ return strtr(utf8_encode($str), $cp1252_map);
+ }
+
+ /**
+ * myEncode
+ *
+ * @param mixed $string
+ * @access public
+ * @return void
+ */
+ function myEncode($string)
+ {
+ if (is_utf8($string)) {
+ return $string;
+ } else {
+ return cp1252_to_utf8($string);
+ }
+ }
+
+ /**
+ * CreditVal : CreditVal Checks for a valid credit card number doing Luhn check, if no
+ card type is given, attempts to guess. Then, if a list of
+ accepted types is given, determines whether or not we'll
+ accept it
+ * @param $Num: Credit Card Number
+ * @param $Name = '': Type of Card
+ * @param $Accepted='' : Accepted array
+ *
+ * @return bool
+ * @access
+ **/
+ function CreditVal($Num, $Name = '', $Accepted = '')
+ {
+ $Name = strtolower($Name);
+ $Accepted = strtolower($Accepted);
+ $GoodCard = 1;
+ $Num = preg_replace('/[^[:digit:]]/', '', $Num);
+ switch ($Name) {
+ case 'mastercard' :
+ $GoodCard = preg_match('/^5[1-5].{14}$/', $Num);
+ break;
+
+ case 'visa' :
+ $GoodCard = preg_match('/^4.{15}$|^4.{12}$/', $Num);
+ break;
+
+ case 'americanexpress' :
+ $GoodCard = preg_match('/^3[47].{13}$/', $Num);
+ break;
+
+ case 'discover' :
+ $GoodCard = preg_match('/^6011.{12}$/', $Num);
+ break;
+
+ case 'dinerscard' :
+ $GoodCard = preg_match('/^30[0-5].{11}$|^3[68].{12}$/', $Num);
+ break;
+
+ default:
+ if (preg_match('/^5[1-5].{14}$/', $Num)) {
+ $Name = 'mastercard';
+ }
+ if (preg_match('/^4.{15}$|^4.{12}$/', $Num)){
+ $Name = 'visa';
+ }
+ if (preg_match('/^3[47].{13}$/', $Num)) {
+ $Name = 'americanexpress';
+ }
+ if (preg_match('/^6011.{12}$/', $Num)) {
+ $Name = 'discover';
+ }
+ if (preg_match('/^30[0-5].{11}$|^3[68].{12}$/', $Num)) {
+ $Name = 'dinerscard';
+ }
+ break;
+ }
+
+ // If there's a limit on card types we accept, check for it here.
+ if ($Accepted) {
+ $type_verified = false;
+ $brands = explode_trim(',', $Accepted);
+ foreach ($brands as $brand) {
+ if ($Name == $brand)
+ $type_verified = true;
+ }
+
+ if (!$type_verified) {
+ return false;
+ }
+ }
+
+ $Num = strrev($Num);
+
+ $Total = 0;
+
+ for ($x = 0; $x < strlen($Num); ++$x) {
+ $digit = substr($Num, $x, 1);
+ if ($x / 2 != floor($x / 2)) {
+ $digit *= 2;
+ if (strlen($digit) == 2)
+ $digit = substr($digit, 0, 1) + substr($digit, 1, 1);
+ }
+ $Total += $digit;
+ }
+ return ($GoodCard && (($Total % 10) == 0)) ? true : false;
+ }
+ // DataBase Library
+
+ /**
+ * db_connect :Creates a connection to database specified $conn_str
+ * @param $conn="" : connection string
+ *
+ * @return index or bool
+ * @access
+ **/
+ function db_connect($conn = '')
+ {
+ switch (DB_TYPE) {
+ case 'postgres' :
+ if ($conn == '')
+ $conn = CONN_STR;
+ $ret = pg_connect($conn);
+ break;
+
+ default:
+ return 0;
+ break;
+ }
+ return $ret;
+ }
+
+ /**
+ * db_close :Closes the connection to database specified by the handle dbd
+ * @param $$dbd : database handle
+ *
+ * @return bool
+ * @access
+ **/
+ function db_close($dbd)
+ {
+ switch (DB_TYPE) {
+ case 'postgres' :
+ $ret = pg_close($dbd);
+ break;
+
+ default:
+ return 0;
+ break;
+ }
+ return $ret;
+ }
+
+ /**
+ NOTICE DON'T USE THIS
+ * db_pconnect :Creates a persistant connection to database specified in $conn_str
+ * @param $$conn="" : connection string
+ *
+ * @return
+ * @access
+ **/
+ function db_pconnect($conn = '')
+ {
+ return false;
+ switch (DB_TYPE) {
+ case 'postgres' :
+ if($conn == '')
+ $conn == CONN_STR;
+ $ret = pg_pconnect($conn);
+ break;
+
+ default:
+ return 0;
+ break;
+ }
+ return $ret;
+ }
+
+ /**
+ * db_exec : Execute an SQL query
+ * @param $dbd: database handle
+ * @param $$qs : Query
+ *
+ * @return int Returns a valid result index on success 0 on failure
+ * @access
+ **/
+ function db_exec($dbd, $qs)
+ {
+ switch (DB_TYPE) {
+ case 'postgres' :
+ $ret = pg_exec($dbd, $qs);
+ break;
+
+ default:
+ return 0;
+ break;
+ }
+ return $ret;
+ }
+
+ /**
+ * db_fetch_array :Stores the data in associative indices, using the field names as
+ * keys.
+ * @param $res: valid database result index
+ * @param $i: row number
+ * @param $$type : database type
+ *
+ * @return array Returns an associative array of key-value pairs
+ * @access
+ **/
+ function db_fetch_array($res, $i, $type)
+ {
+ switch (DB_TYPE) {
+ case 'postgres' :
+ $row = pg_fetch_array($res, $i, $type);
+ break;
+
+ default:
+ return 0;
+ break;
+ }
+ return $row;
+ }
+
+ /**
+ * db_freeresult :Free result memory.
+ * @param $$res : valid database result index
+ *
+ * @return bool - Returns 1 for success 0 for failure
+ * @access
+ **/
+ function db_freeresult($res)
+ {
+ switch (DB_TYPE) {
+ case 'postgres' :
+ $ret = pg_freeresult($res);
+ break;
+
+ default:
+ return 0;
+ break;
+ }
+ return $ret;
+ }
+
+ /**
+ * db_numrows :Determine number of rows in a result index
+ * @param $$res : valid database result index
+ *
+ * @return int - Returns number of rows
+ * @access
+ **/
+ function db_numrows($res)
+ {
+ switch (DB_TYPE) {
+ case 'postgres' :
+ $ret = pg_numrows($res);
+ break;
+
+ default:
+ return -1;
+ break;
+ }
+ return $ret;
+ }
+
+ /************************************************************************
+ * *
+ * BEGIN Auto functions *
+ * *
+ ***********************************************************************/
+
+ /**
+ * db_auto_array :The auto function for retrieving an array based soley on a query
+ * string. This function makes the connection, does the exec, fetches
+ * the array, closes the connection, frees memory used by the result,
+ * and then returns the array
+ * @param $qs: SQL query string
+ * @param $i: row number
+ * @param $$type : PGSQL_ASSOC or PGSQL_BOTH or PSQL_NUM
+ *
+ * @return array - Returns an associative array of key-value pairs
+ * @access
+ **/
+ function db_auto_array($qs, $i, $type)
+ {
+ $dbd = db_connect();
+ if (!$dbd) {
+ return 0;
+ }
+ $res = db_exec($dbd, $qs);
+ if (!$res) {
+ return 0;
+ }
+ $row = db_fetch_array($res, $i, $type);
+ if (!db_freeresult($res)) {
+ return 0;
+ }
+ db_close($dbd);
+ return $row;
+ }
+
+ /**
+ * db_auto_exec :The auto function for executing a query.
+ * This function makes the connection, does the exec, fetches
+ * the array, closes the connection, frees memory used by the result,
+ * and then returns success (not a valid result index)
+ * @param $qs: SQL query string
+ * @param $$conn="" : Connect String
+ *
+ * @return int - Returns 1 (or oid, if available) for success 0 for failure
+ * @access
+ **/
+ function db_auto_exec($qs, $conn = '')
+ {
+ if ($conn == ''){
+ $conn = CONN_STR;
+ }
+ $dbd = db_connect($conn);
+ if (!$dbd) {
+ return 0;
+ }
+ if (!db_exec($dbd, $qs)) {
+ db_close($dbd);
+ return 0;
+ } else {
+ db_close($dbd);
+ return 1;
+ }
+ }
+
+ /**
+ * db_auto_get_data :The auto function for retrieving an array based soley on a query
+ string. This function makes the connection, does the exec, fetches
+ the array, closes the connection, frees memory used by the result,
+ and then returns the array
+ * @param $qs: SQL query string
+ * @param $CONN_STR: Connect String
+ * @param $$fail_mode=0 : Failure Mode
+ *
+ * @return array Returns an associative array of key-value pairs
+ * @access
+ **/
+ function db_auto_get_data($qs, $conn = CONN_STR, $fail_mode = 0) {
+
+ if (!($dbd = db_connect($conn))) {
+ return false;
+ }
+
+ if (!($res = db_exec($dbd, $qs))) {
+ return false;
+ }
+
+ $totalrows = pg_NumRows($res);
+
+ for ($i = 0 ; $i < $totalrows; ++$i) {
+ $data[$i] = db_fetch_array($res, $i, PGSQL_ASSOC);
+ }
+
+ db_close($dbd);
+ return (isset($data) && $data != '') ? $data : 0;
+ }
+
+ // HTML Libraries
+
+ /**
+ * html_footer :Generates a footer table on the bottom of the page it's called on.
+ and closes out the body and html tags.
+ *
+ * @return void
+ * @access
+ **/
+ function html_footer()
+ {
+ $footer_table_width = '400';
+ $footer_table_align = 'center';
+ ?>
+ <hr>
+ <table width="<?php echo $footer_table_width?>"
+ align="<?php echo $footer_table_align?>"
+ summary="Footer Information" class="footertable" cellspacing="0">
+ <tr>
+ <td align="left" class="footertd">
+ <a href="mailto:<?php echo MASTER_EMAIL;?>"><?php echo MASTER;?></a>
+ </td>
+ <td align="right" class="footertd">
+ <a href="<?php echo FOOTER_URL;?>" target="new">
+ <img src="<?php echo FOOTER_IMG;?>" border=0 alt="FOOTER_IMG"></a>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ <?php
+ // We've got to terminate any more output
+ exit;
+ }
+
+ /**
+ * html_error :Generates a footer table on the bottom of the page it's called on.
+ and closes out the body and html tags.
+ * @param $msg: string error message to be displayed
+ * @param $$bail : bool whether or not to exit() after $msg
+ *
+ * @return void
+ * @access
+ **/
+ function html_error($msg, $bail)
+ {
+ ?>
+ <table summary="Error Information" class="errortable" cellspacing="0">
+ <tr class="errortr">
+ <td class="errortd">
+ <div class="errormsg"><?echo "<pre>$msg</pre>"?></div>
+ </td>
+ </tr>
+ </table>
+
+ <?php
+ if ($bail) {
+ html_footer();
+ }
+ }
+
+ /**
+ * html_nav_table :Generates a navigation table on the page it's called on.
+ * @param $nav: associative array with entries like:$nav[text][url]
+ * @param $$w : max width of table
+ *
+ * @return void
+ * @access
+ **/
+ function html_nav_table($nav, $w)
+ {
+ if (is_array($nav)) {
+ $out = '<ul class="admin_nav">';
+ foreach ($nav as $link => $url) {
+ if (is_array($url)) {
+ $out .= '<li><a href="'.$url[0].'" '.$url[1].'>'.$link.'</a></li>';
+ } else {
+ $out .= '<li><a href="'.$url.'">'.$link.'</a></li>';
+ }
+ }
+ $out .= '</ul>';
+ }
+ echo $out;
+ }
+
+ /**
+ * html_header :Opens up the html tags, and includes the style sheet link
+ generates a header table on the top of the page it's called on.
+ * @param $title: Page Title
+ * @param $msg: message to display
+ * @param $$img : image to display
+ *
+ * @return void
+ * @access
+ **/
+ function html_header($title, $msg, $img)
+ {
+ $header_table_width = '400';
+ $header_table_align = 'center';
+ ?>
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+ <html>
+ <head>
+ <title><?php echo $title?></title>
+ <link type="text/css" rel=stylesheet href="<?php echo STYLE;?>">
+ </head>
+ <body>
+ <table width="<?php echo $header_table_width?>"
+ align="<?echo $header_table_align?>"
+ summary="Header Information" class="headertable"
+ cellspacing="0" cellpadding="3">
+ <tr class="headertr">
+ <td class="headertd">
+ <?php if($img) : ?>
+ <img src="<?php echo IMG_BASE.$img;?>"
+ alt="<?php echo HEAD;?>" border="0">
+ <?php endif; ?>
+ </td>
+ </tr>
+ <tr>
+ <td class="headertd2" align="center">
+ <div class="headerh2" align="center">
+ <?php echo $msg;?>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <?php
+ }
+
+ /**
+ * form_header :Opens up the form tag, and includes the hidden assoc array as hidden
+ fields.
+ * @param $action: string form action string
+ * @param $method: string Method of form
+ * @param $$hidden = "" : assoc array with $hidden($name => $value)
+ *
+ * @return void
+ * @access
+ **/
+ function form_header($action, $method, $hidden = '')
+ {
+ echo '<form action="'.$action.'" method="'.$method.'"
+ enctype="multipart/form-data">';
+ if ($hidden != '' && is_array($hidden)) {
+ foreach ($hidden as $k => $v) {
+ echo '<input type="hidden" name="'.$k.'" value="'.$v.'">';
+ }
+ }
+ }
+
+ /**
+ * text_box :Creates a input box for text with 35 as default size
+ * @param $name: string name of text box
+ * @param $value: string value of text box
+ * @param $$size = 35 : string size of text box
+ *
+ * @return void
+ * @access
+ **/
+ function text_box($name, $value, $size = 35) {
+ echo '<td class="navtd2"><input type="text" name="'.$name.'"
+ value="'.htmlspecialchars($value).'" size="'.$size.'"></td>';
+ }
+
+ /**
+ * form_footer :Closes up the form tag, and includes the submit button
+ * @param $name: string form action string
+ * @param $$suppress = 0: string Method of form
+ * @param $$cs : int colspan for td
+ *
+ * @return void
+ * @access
+ **/
+ function form_footer($name, $suppress = 0, $cs)
+ {
+ echo '<tr><td colspan="'.$cs.'" align=center>
+ <input type="SUBMIT" name="Command" value="'.$name.'">';
+ if ($suppress == 1) {
+ echo '<input type="SUBMIT" name="Command" value="Delete">';
+ }
+ echo '</td>';
+ }
+
+ /**
+ * file_upload
+ * this will replace the older version and that of img_upload which calls this with extra
+ * restricted of true
+ *
+ * @param mixed $form_field
+ * @param mixed $file_name
+ * @param mixed $destination_path
+ * @access public
+ * @return string
+ */
+ function file_upload($form_field, $file_name, $destination_path, $restricted = false)
+ {
+ $file_name_in_use = false;
+ $file_name = preg_replace('/[!@#$%^&()+={};:\'\"\/ ]/', '-', $file_name);
+ if ($restricted) {
+ $size = getImageSize($form_field);
+ if (!in_array($size[2], array(1, 2, 3))) {
+ echo '<p style="background-color:red;color:white;">' .
+ 'The file you uploaded was of an incorect type,
+ please only upload .gif,.png or .jpg files' .
+ '<BR CLEAR=ALL>' .
+ '</p>' .
+ "Hit your browser's back button to continue" .
+ '<p>';
+ $error[0] = 'ERROR';
+ return $error;
+ }
+ }
+ if (file_exists($destination_path . $file_name)) {
+ $file_name_in_use = true;
+ }
+ if ($file_name_in_use == true) {
+ $new_file_name = mktime() . $file_name;
+ $new_file_location = $destination_path . $new_file_name;
+ copy($form_field, $new_file_location);
+ $file_upload = $new_file_name;
+ $file_upload_array = array( $new_file_name, $new_file_location);
+ } else {
+ $new_file_name = $file_name;
+ $new_file_location = $destination_path.$new_file_name;
+ copy($form_field, $new_file_location);
+ $file_upload = $new_file_name;
+ $file_upload_array = array($new_file_name, $new_file_location);
+ }
+ if (is_file($new_file_location)) {
+ chmod($new_file_location, 0666);
+ }
+ return ($restricted) ? $file_upload_array : $file_upload;
+ }
+
+ // Misc. Functions
+
+ /**
+ * http_strip :Strips the http:// part from start of string
+ * @param $&$string : $string
+ *
+ * @return string $stirng minus http:// in front
+ * @access
+ **/
+ function http_strip(&$string)
+ {
+ $test_string = strtolower($string);
+ if(substr($test_string, 0, 7) == 'http://') {
+ $string = substr($string, 7);
+ }
+ }
+
+ /**
+ * footer : used for admin page footer to close out the top function
+ *
+ * @return void
+ * @access
+ **/
+ function footer()
+ {
+ echo "\n\t</body>\n</html>";
+ }
+
+ /**
+ * top :Output the starting html and admin table tags
+ * @param $message: The title
+ * @param $hp: The help file to use
+ * @param $$hp2 = NULL : The help file to use (links to gaslightmedia.com)
+ *
+ * @return void
+ * @access
+ **/
+ function top($message, $hp, $hp2 = NULL)
+ {
+ if ($hp2 != '') {
+ $help_guide = '<div id="glm-manual">';
+ /*
+ $help_guide = '<div id="glm-manual"><a id="manual-html"
+ href="http://www.gaslightmedia.com/manuals/html/'.$hp2.'.html"
+ target="_blank">Online Help Guide</a> ';
+ */
+ $help_guide .= '<a id="manual-pdf"
+ href="http://www.gaslightmedia.com/manuals/pdf/'.$hp2.'.pdf"
+ target="_blank">Printable Help Guide</a></div>';
+ }
+ $out = '
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+ <html>
+ <head>
+ <title>Untitled</title>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <link rel="stylesheet" type="text/css" href="../main.css">
+ <script type="text/javascript" src="'.GLM_APP_BASE_URL.'libjs/jquery/jquery-1.4.2.min.js"></script>
+ </head>
+ <body>
+ <h1>'.$message.'</h1>
+ ' . $help_guide;
+ echo $out;
+ }
+
+ /**
+ * top2 : alias to top()
+ * @param $message: message title
+ * @param $hp: help file
+ * @param $$hp2 = NULL : gaslight help file
+ *
+ * @return
+ * @access
+ **/
+ function top2($message, $hp,$hp2 = NULL) {
+ // make this an alias to top()
+ // by calling top instead of adding extra code
+ top($message, $hp, $hp2);
+
+ }
+
+ /********************************************************************************
+ *
+ * DO NOT EDIT THIS SECTION
+ *
+ ********************************************************************************/
+
+ if ($DEBUG) {
+ echo '<CENTER>
+ <TABLE BORDER=0 CELLPADDING=3 CELLSPACING=1 WIDTH=600 BGCOLOR="#000000" ALIGN="CENTER">
+ <TR VALIGN="middle" BGCOLOR="#9999CC">
+ <TD COLSPAN="2" ALIGN="center"><H1>Portable Site Data - setup.phtml </H1></TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>CVS Version Id:</B></TD>
+ <TD ALIGN="left">$Id: setup_functions.phtml,v 1.7 2010/06/17 12:50:52 jamie Exp $</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>SITENAME</B></TD>
+ <TD ALIGN="left">'.SITENAME.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>BASE</B></TD>
+ <TD ALIGN="left">'.BASE.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>UP_BASE</B></TD>
+ <TD ALIGN="left">'.UP_BASE.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>HELP_BASE</B></TD>
+ <TD ALIGN="left">'.HELP_BASE.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>IMG_BASE</B></TD>
+ <TD ALIGN="left">'.IMG_BASE.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>URL_BASE</B></TD>
+ <TD ALIGN="left">'.URL_BASE.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>CONN_STR</B></TD>
+ <TD ALIGN="left">'.CONN_STR.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>STYLE</B></TD>
+ <TD ALIGN="left">'.STYLE.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>ORIGINAL_PATH</B></TD>
+ <TD ALIGN="left">'.ORIGINAL_PATH.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>RESIZED_PATH</B></TD>
+ <TD ALIGN="left">'.RESIZED_PATH.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>MIDSIZED_PATH</B></TD>
+ <TD ALIGN="left">'.MIDSIZED_PATH.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>THUMB_PATH</B></TD>
+ <TD ALIGN="left">'.THUMB_PATH.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>ORIGINAL</B></TD>
+ <TD ALIGN="left">'.ORIGINAL.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>RESIZED</B></TD>
+ <TD ALIGN="left">'.RESIZED.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>MIDSIZED</B></TD>
+ <TD ALIGN="left">'.MIDSIZED.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>THUMB</B></TD>
+ <TD ALIGN="left">'.THUMB.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>$CALLED_FROM_DIR</B></TD>
+ <TD ALIGN="left">'.$CALLED_FROM_DIR.' </TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>$BASE_PATH</B></TD>
+ <TD ALIGN="left">'.$BASE_PATH.'</TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>$BASE_URL</B></TD>
+ <TD ALIGN="left"><A HREF="'.$BASE_URL.'">'.$BASE_URL.'</A></TD>
+ </TR>
+ <TR VALIGN="baseline" BGCOLOR="#CCCCCC">
+ <TD BGCOLOR="#CCCCFF" ><B>$BASE_SECURE_URL</B></TD>
+ <TD ALIGN="left">'.$BASE_SECURE_URL.'</TD>
+ </TR>
+ </TABLE>
+
+ <P>
+ <HR WIDTH="600">
+ <P>
+ </CENTER>
+ ';
+ }
+
+ /**
+ * date_entry : Generate the select boxes for date entry
+ * month-day-year as drop down select
+ * @param $month:
+ * @param $day:
+ * @param $year:
+ * @param $month_name: name of select month
+ * @param $day_name: name of select day
+ * @param $$year_name : name of select year
+ *
+ * @return
+ * @access
+ **/
+ function date_entry($month, $day, $year, $month_name, $day_name, $year_name, $onChange = NULL)
+ {
+ $cur_date = getdate();
+
+ if ($month == '') {
+ $month = $cur_date['mon'];
+ }
+ if($day == '') {
+ $day = $cur_date['mday'];
+ }
+ if($year == '') {
+ $year = $cur_date['year'];
+ }
+ $date = '<select id="'.$month_name.'" name="'.$month_name.'" '.$onChange.'>';
+ for ($i = 1; $i < 13; ++$i) {
+ $date .= '<option value="';
+ if ($i < 10) {
+ $date .= '0';
+ }
+ $date .= $i.'"';
+ if ($i == $month) {
+ $date .= ' selected';
+ }
+ $date .= ">$i";
+ }
+ $date .= '</select>';
+ $date .= '<select id="'.$day_name.'" name="'.$day_name.'" '.$onChange.'>';
+ for ($i = 1; $i < 32; ++$i) {
+ $date .= '<option value="';
+ if ($i < 10) {
+ $date .= "0";
+ }
+ $date .= $i.'"';
+ if($i == $day) {
+ $date .= ' selected';
+ }
+ $date .= ">$i";
+ }
+ $date .= '</select>';
+ $date .= '<select id="'.$year_name.'" name="'.$year_name.'" '.$onChange.'>';
+ for ($i = 2000; $i < 2023; ++$i) {
+ $date .= '<option value="'.$i.'"';
+ if ($i == $year) {
+ $date .= ' selected';
+ }
+ $date .= ">$i";
+ }
+ $date .= '</select>';
+ return $date;
+ }
+
+ /**
+ * contact_date_entry : build select boxes for date entry going backwords in years
+ * @param $month:
+ * @param $day:
+ * @param $year:
+ * @param $month_name: name of select month
+ * @param $day_name: name of select day
+ * @param $$year_name : name of select year
+ *
+ * @return void
+ * @access
+ **/
+ function contact_date_entry($month, $day, $year, $month_name, $day_name, $year_name)
+ {
+ $cur_date = getdate();
+
+ if ($month == '') {
+ $month = $cur_date['mon'];
+ }
+ if ($day == '') {
+ $day = $cur_date['mday'];
+ }
+ if ($year == '') {
+ $year = $cur_date['year'];
+ }
+ $date = '<select name="'.$month_name.'">';
+ for ($i = 1; $i < 13; ++$i) {
+ $date .= '<option value="';
+ if ($i < 10) {
+ $date .= '0';
+ }
+ $date .= $i.'"';
+ if ($i == $month) {
+ $date .= ' selected';
+ }
+ $date .= ">$i";
+ }
+ $date .= '</select>';
+ $date .= '<select name="'.$day_name.'">';
+ for ($i = 1; $i < 32; ++$i) {
+ $date .= '<option value="';
+ if($i < 10) {
+ $date .= '0';
+ }
+ $date .= $i.'"';
+ if ($i == $day) {
+ $date .= ' selected';
+ }
+ $date .= ">$i";
+ }
+ $date .= '</select>';
+ $date .= '<select name="'.$year_name.'">';
+ $ystart = $cur_date['year'] - 10;
+ for ($i = $ystart; $i <= $year; ++$i) {
+ $date .= '<option value="'.$i.'"';
+ if ($i == $year) {
+ $date .= ' selected';
+ }
+ $date .= ">$i";
+ }
+ $date .= '</select>';
+ return $date;
+ }
+
+ /**
+ * time_entry : build select boxes for time entry
+ * @param $H:
+ * @param $m:
+ * @param $F:
+ * @param $H_name: name of select hour
+ * @param $m_name: name of select min
+ * @param $$F_name : name of select sec
+ *
+ * @return
+ * @access
+ **/
+ function time_entry($H, $m, $F, $H_name, $m_name, $F_name)
+ {
+ $cur_date = getdate();
+ if ($H == '') {
+ $H = $cur_date['hours'];
+ }
+ if ($m == '') {
+ $m = $cur_date['minutes'];
+ }
+ if ($H > 12) {
+ $F = 'PM';
+ $H = $H - 12;
+ }
+ $time = "Hr:<select name=\"$H_name\" size=\"1\">";
+ for ($i = 1; $i <= 12; ++$i) {
+ $time .= "<option value=\"";
+ if ($i < 10) {
+ $time .= "0";
+ }
+ $time .= "$i\"";
+ if ($i == $H) {
+ $time .= " selected";
+ }
+ $time .= ">$i\n";
+ }
+ $time .= "</select>\n";
+ $time .= "Min:<select name=\"$m_name\" size=\"1\">";
+ for ($i = 0; $i < 60; $i = $i + 15) {
+ $time .= "<Option value=\"";
+ if ($i < 10) {
+ $time .= "0";
+ }
+ $time .= "$i\"";
+ if ($i == $m) {
+ $time .= " selected";
+ }
+ $time .= ">";
+ if ($i < 10) {
+ $time .= "0";
+ }
+ $time .= "$i\n";
+ }
+ $time .= "</select>";
+ $time .= "<select name=\"$F_name\" size=\"1\">";
+ $time .= "<option value=\"AM\"";
+ if ($F == "AM") {
+ $time .= " selected";
+ }
+ $time .= ">AM\n";
+ $time .= "<option value=\"PM\"";
+ if ($F == "PM") {
+ $time .= " selected";
+ }
+ $time .= ">PM\n";
+ $time .= "</select>\n";
+ return $time;
+ }
+
+ /**
+ * get_parentid: get the (highest level) parent category for this id
+ * @param $id: id from bus_category table
+ *
+ * @return int parent
+ * @access
+ **/
+ function get_parentid($id)
+ {
+ static $parentshow;
+ if ($id == 0) {
+ return 0;
+ }
+ if (!is_array($parentshow)) {
+ $sql = "
+ SELECT parent
+ FROM bus_category
+ WHERE id = $id";
+ $parentrow = db_auto_get_data($qs);
+ }
+ if ($parentrow[0]['parent'] == 0) {
+ return $id;
+ } else {
+ return get_parentid($parentrow[0]['parent']);
+ }
+ }
+
+ /**
+ * build_picklist:Builds a pick list from an array
+ * @param $fieldname: fieldname field name for select
+ * @param $data: data array of data
+ * @param $selected: selected witch element is selected
+ * @param $$type = "standard": type Standard,multi
+ * @param $$auto = 0: auto
+ * @param $$width = NULL : width width controlled by css
+ *
+ * @return void
+ * @access
+ **/
+ function build_picklist( $fieldname, $data, $selected, $type = "standard",$auto = 0,$width = NULL ) {
+ if(!is_array($selected)) {
+ $sel[0] = $selected;
+ } else {
+ $sel = $selected;
+ }
+ if($auto == 1)
+ $autosubmit = "onChange=\"form.submit()\"";
+ if($width)
+ $autosubmit .= "style=\"width:".$width."px;\"";
+ switch( $type ) {
+ case "multiple":
+ $str = "<select name=\"".$fieldname."\" multiple size=\"10\" ".$autosubmit.">\n";
+ while( list($key, $val) = each($data) ) {
+ if( in_array($key,$sel) ) {
+ $select = " selected ";
+ }
+ else
+ $select = "";
+ $str .= " <option value=\"$key\"".$select.">$val\n";
+ }
+ break;
+ case "simple":
+ $str = "<select name=\"$fieldname\" ".$autosubmit.">\n";
+ for( $i=0 ; $i<count($data) ; $i++ ) {
+ $select = (in_array($data[$i],$sel)) ? " selected ":"";
+ $str .= " <option value=\"".$data[$i]."\"".$select.">".$data[$i]."\n";
+ }
+ break;
+
+ case "standard":
+ default:
+ $str = "<select name=\"$fieldname\" ".$autosubmit.">\n";
+ while( list($key, $val) = each($data) ) {
+ $select = (in_array($key,$sel)) ? " selected ":"";
+ $str .= " <option value=\"$key\"".$select.">$val\n";
+ }
+ break;
+ }
+ $str .= "</select>\n";
+
+ return $str;
+
+ }
+
+ /**
+ * create_page_links:Create prev and next links
+ * to page through the results.
+ * @param $totalnum: The total result of the query
+ * @param $num: The total result for the page
+ * @param $$start=0: The starting num defaults to 0
+ * @param $params: variables to add to the url
+ * @param $ENTRIES_PER_PAGE: number of items on page defaults to the ENTRIES_PER_PAGE
+ *
+ * @return string of links
+ * @access
+ **/
+ function create_page_links($totalnum,$num,$start=0,$params,$page_length=ENTRIES_PER_PAGE) {
+ // find out which page we're on.
+ if($totalnum!=0) {
+ $total_pages = floor($totalnum / $page_length); // total pages = the total result divided by page length rounded down
+ $total_pages++; // then add one
+ if($start == 0) { // if start is 0 then page is one {
+ $page = 1;
+ } else {
+ $page = ($start / $page_length) + 1;
+ }
+ }
+
+ if($totalnum > $page_length && ( $page != $totalpages ) ) {
+ $end = $page_length + $start;
+ } else {
+ $end = $totalnum;
+ }
+ $last = $start - $page_length;
+ if(($start - $page_length) < 0)
+ $prev = "";
+ else
+ $prev = "<span class=\"accenttext\">[</span><a class=\"small\"
+ href=\"$GLOBALS[PHP_SELF]?start=".$last."&$params\">PREVIOUS PAGE</a><span
+ class=\"accenttext\"> ]</span>";
+ if($end < $totalnum)
+ $next = "<span class=\"accenttext\">[</span><a class=\"small\"
+ href=\"$GLOBALS[PHP_SELF]?start=".$end."&$params\">NEXT PAGE</a><span
+ class=\"accenttext\"> ]</span>";
+ else
+ $next = "";
+ $starting = $start + 1;
+ $last_c = $start + $num;
+ $links = '<center><span class="pagetitle">Listings Displayed: </span><span
+ class="accenttext">'.$starting.' to '.$last_c.'</span>
+ <span class="pagetitle"> of '.$totalnum.'<br></span> '.$prev. ' <span
+ class="pagetitle"></span> '.$next.'<BR></span></center>';
+ return $links;
+ }
+?>
--- /dev/null
+@charset "UTF-8";
+a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, body, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt, em, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu, nav, object, ol, output, p, pre, q, ruby, s, samp, section, small, span, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr, tt, u, ul, var, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font: inherit;
+ vertical-align: baseline
+}
+article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
+ display: block
+}
+body {
+ line-height: 1
+}
+ol, ul {
+ list-style: none
+}
+blockquote, q {
+ quotes: none
+}
+blockquote:after, blockquote:before, q:after, q:before {
+ content: '';
+ content: none
+}
+table {
+ border-collapse: collapse;
+ border-spacing: 0
+}
+/********************************************************************** FONTS - minified */
+@font-face{font-family:source_sans_prosemibold;src:url(fonts/sourcesanspro-semibold-webfont.eot);src:url(fonts/sourcesanspro-semibold-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/sourcesanspro-semibold-webfont.woff) format('woff'),url(fonts/sourcesanspro-semibold-webfont.ttf) format('truetype'),url(fonts/sourcesanspro-semibold-webfont.svg#source_sans_prosemibold) format('svg');font-weight:400;font-style:normal}@font-face{font-family:source_sans_proregular;src:url(fonts/sourcesanspro-regular-webfont.eot);src:url(fonts/sourcesanspro-regular-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/sourcesanspro-regular-webfont.woff) format('woff'),url(fonts/sourcesanspro-regular-webfont.ttf) format('truetype'),url(fonts/sourcesanspro-regular-webfont.svg#source_sans_proregular) format('svg');font-weight:400;font-style:normal}@font-face{font-family:klinic_slabbold;src:url(fonts/klinicslabbold-webfont.eot);src:url(fonts/klinicslabbold-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/klinicslabbold-webfont.woff) format('woff'),url(fonts/klinicslabbold-webfont.ttf) format('truetype'),url(fonts/klinicslabbold-webfont.svg#klinic_slabbold) format('svg');font-weight:400;font-style:normal}@font-face{font-family:klinic_slabmedium;src:url(fonts/klinicslabmedium-webfont.eot);src:url(fonts/klinicslabmedium-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/klinicslabmedium-webfont.woff) format('woff'),url(fonts/klinicslabmedium-webfont.ttf) format('truetype'),url(fonts/klinicslabmedium-webfont.svg#klinic_slabmedium) format('svg');font-weight:400;font-style:normal}
+/********************************************************************** COMMON */
+body {
+ background-image: url(img/main_bg.jpg);
+}
+
+h1:empty, h2:empty, h3:empty {
+ display: none;
+}
+a img {
+ border: 0 none;
+ display: block;
+ margin: 0;
+ padding: 0;
+}
+#toolbox #category, #toolbox.listing {
+ display:block;
+ width:100%;
+ clear:both;
+}
+
+
+#toolbox #category img, #toolbox .listing img {
+ display: block;
+ border: 0;
+ max-width: 100%;
+ height: auto;
+}
+
+input[type="radio"], input[type="checkbox"] {
+ line-height: normal;
+}
+.webform table {
+ margin: 10px 0 0 0;
+ clear: both;
+}
+.req {
+ clear: both !important;
+}
+.tooltip {
+ padding: 0 0 0 5px;
+}
+.file-download {
+ padding: 0;
+ margin:0;
+}
+.avi { background-image: url(images/file-ext/avi.gif); }
+.doc { background-image: url(images/file-ext/doc.gif); }
+.gif { background-image: url(images/file-ext/gif.gif); }
+.html { background-image: url(images/file-ext/html.gif);}
+.jpg { background-image: url(images/file-ext/jpg.gif); }
+.mov { background-image: url(images/file-ext/mov.gif); }
+.mp3 { background-image: url(images/file-ext/mp3.gif); }
+.pdf { background-image: url(images/file-ext/pdf.png); }
+.ppt { background-image: url(images/file-ext/ppt.gif); }
+.txt { background-image: url(images/file-ext/txt.png); }
+.wmv { background-image: url(images/file-ext/wmv.gif); }
+.xls { background-image: url(images/file-ext/xls.gif); }
+.zip { background-image: url(images/file-ext/zip.png); }
+.download { background-image: url(images/file-ext/download.gif); clear: none;}
+*:focus {
+ outline: none;
+}
+.nobreak {
+ white-space: nowrap;
+}
+/********************************************************************** HEADER */
+header {
+ width: 100%;
+ height: 130px;
+ background-image: url(img/header_bg.gif);
+ background-repeat: repeat-x;
+}
+#header_wrap {
+ width: 1070px;
+ margin: 0 auto;
+ position: relative;
+}
+#logo {
+ position: absolute;
+}
+header h1 {
+ height: 85px;
+ margin: 0 0 0 200px;
+}
+header p {
+ position: absolute;
+ top: 10px;
+ right: 7px;
+ font-family: source_sans_proregular, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 22px;
+ color: rgb(126, 146, 166);
+}
+/****************************** main nav */
+#header_wrap>ul {
+ position: relative;
+ margin: 0 0 0 120px;
+ padding: 5px 0 0 0;
+}
+#header_wrap>ul>li {
+ float: left;
+ zoom: 1;
+ margin:0 0 0 50px;
+ position:relative;
+}
+
+#header_wrap>ul>li>ul {
+ display:none;
+ overflow:hidden;
+ position:absolute;
+}
+
+.subMenu {
+ display:block !important;
+ background:rgb(235, 235, 235);
+ width:250px;
+ border-bottom:2px solid #000;
+ border-left:2px solid #000;
+ border-right:2px solid #000;
+-webkit-box-shadow: 0px 5px 5px 0px rgba(50, 50, 50, 0.75);
+-moz-box-shadow: 0px 5px 5px 0px rgba(50, 50, 50, 0.75);
+box-shadow: 0px 5px 5px 0px rgba(50, 50, 50, 0.75);
+}
+.subMenu li {
+ margin:0;
+ padding:4px 10px;
+ border-bottom:1px dotted rgb(95, 105, 115);
+}
+.subMenu li:last-child {
+ border-bottom:0;
+}
+.subMenu li ul {
+ background-color:rgb(55, 73, 92);
+ display:block;
+ margin: 0 -10px;
+ padding: 0 0 0 10px;
+}
+header a:link {
+ font-family: klinic_slabmedium, Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif;
+ font-size: 22px;
+ color: rgb(40, 30, 30);
+ text-decoration: none;
+ font-weight:normal !important;
+ padding: 6px 0;
+ display: block;
+}
+header a:visited {
+ color: rgb(40, 30, 30);
+}
+header a:hover {
+ color: rgb(45, 150, 255);
+ text-shadow:0 0 1px rgb(45, 150, 255), 0 0 1px rgb(45, 150, 255), 0 0 1px rgb(45, 150, 255);
+}
+header a:active {
+ color: rgb(40, 30, 30);
+}
+.subMenu li ul a:link {
+ font-size: 20px;
+ color: rgb(255, 255, 255);
+ font-weight:lighter;
+}
+.subMenu li ul a:visited {
+ color: rgb(255, 255, 255);
+}
+.subMenu li ul a:hover {
+ color: rgb(45, 150, 255);
+ text-shadow:0 0 1px rgb(45, 150, 255), 0 0 1px rgb(45, 150, 255), 0 0 1px rgb(45, 150, 255);
+}
+.subMenu li ul a:active {
+ color: rgb(40, 30, 30);
+}
+.current, #current {
+ color: rgb(45, 150, 255);
+ text-shadow:0 0 1px rgb(45, 150, 255), 0 0 1px rgb(45, 150, 255), 0 0 1px rgb(45, 150, 255);
+}
+/********************************************************************** HERO */
+#hero {
+ width: 100%;
+ height: 525px;
+ background-image: url(img/hero_bg.jpg);
+}
+#hero_wrap {
+ width: 1070px;
+ margin: 0 auto;
+ position: relative;
+}
+#quicklink_wrap {
+ position: absolute;
+ top: 390px
+}
+.quicklink_block {
+ width: 227px;
+ padding: 10px;
+ margin: 0 18px 0 0;
+ border: 2px solid rgb(205, 205, 205);
+ background-image: url(img/debut_light.png);
+ min-height: 90px;
+ display:block;
+ float:left;
+}
+.last_q_block {
+ margin: 0;
+}
+.quicklink_block h2 {
+ font-family: klinic_slabbold, Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif;
+ font-size: 20px;
+ color: rgb(40, 30, 30);
+ padding: 0 0 4px 0;
+ margin: 0 0 5px 0;
+ border-bottom: 1px solid rgb(215, 215, 215);
+}
+.quicklink_block ul {
+ margin:0;
+ padding:0 0 0 15px;
+}
+.quicklink_block li {
+ font-family:klinic_slabbold, Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif;
+ line-height:1.1em;
+ list-style-type:disc;
+}
+/********************************************************************** MAIN CONTENT */
+#content {
+ width: 100%;
+ min-height: 400px;
+ margin: 0;
+ padding: 30px 0;
+ background-color: rgb(255,255,255);
+ border-bottom: 3px solid rgb(0,0,0);
+}
+#content_wrap {
+ width: 1070px;
+ margin: 0 auto;
+ position: relative;
+}
+#content_wrap p {
+ font-family: source_sans_proregular, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 16px;
+ color: rgb(60, 40, 40);
+}
+.hr_graphic {
+ width: 100%;
+ height: 17px;
+ display: block;
+ clear: both;
+ background-image:url(img/debut_light.png);
+ margin:10px 0;
+ padding:0;
+}
+#content_wrap section h2 {
+ display:none;
+}
+/******************** LEFT COLUMN */
+#left_col {
+ width: 797px;
+}
+#left_col ul {
+ font-family: source_sans_proregular, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 16px;
+ color: rgb(60, 40, 40);
+ margin:10px 0;
+ padding:0 0 0 20px;
+ list-style-type:disc;
+}
+#left_col ul li {
+ line-height:18px;
+}
+#toolbox .imageright {
+ display: block;
+ float: right;
+ margin: 15px0;
+ width: auto;
+ max-width: 50%;
+ position: relative;
+ border: 0;
+ padding: 10px;
+ background: #FFF;
+ overflow:hidden;
+}
+#toolbox .imageleft {
+ display: block;
+ float: left;
+ margin: 15px0;
+ width: auto;
+ max-width: 50%;
+ position: relative;
+ border: 0;
+ padding: 10px;
+ background: #FFF;
+ overflow:hidden;
+}
+.imagecaption {
+ font-family:source_sans_proregular, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size:12px;
+ padding: 5px 10px 10px 5px;
+}
+#hHlines {
+ margin:0;
+ display:block;
+ padding:0;
+ width:100%;
+ height:auto;
+ clear:both;
+}
+#hHlines ul {
+ padding:0;
+ margin:0;
+}
+#hHlines ul li {
+ list-style-type:none;
+ clear:both;
+ margin:10px 0;
+ padding:10px;
+ border:1px solid rgb(240, 240, 240);
+ overflow:hidden;
+}
+#hHlines img {
+ float:left;
+ width:33%;
+ margin:0;
+ padding:0 15px 0 0;
+}
+.hHlinesItem h3 a:link, .hHlinesItem h3 a:visited {
+ font-family:source_sans_prosemibold, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 18px;
+ color: rgb(40, 30, 30);
+ text-decoration:none;
+}
+.hHlinesItem h3 a:hover, .hHlinesItem h3 a:active {
+ color: rgb(45, 150, 255);
+ text-shadow:0 0 1px rgb(45, 150, 255), 0 0 1px rgb(45, 150, 255), 0 0 1px rgb(45, 150, 255);
+}
+.hHlinesMore a:link, .hHlinesMore a:visited {
+ font-family:source_sans_prosemibold, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 12px;
+ color: rgb(45, 150, 255);
+ text-decoration:underline;
+}
+
+.hHlinesMore a:hover, .hHlinesMore a:active {
+ color: rgb(45, 150, 255);
+ text-shadow:0 0 1px rgb(45, 150, 255), 0 0 1px rgb(45, 150, 255), 0 0 1px rgb(45, 150, 255);
+}
+.hHlinesMore:after {
+ content:" >>";
+ font-family:source_sans_prosemibold, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 9px;
+ letter-spacing:-.1em;
+ color: rgb(45, 150, 255);
+}
+/******************** RIGHT COLUMN */
+#right_col {
+ width: 251px;
+ position: absolute;
+ top: 0;
+ left: 819px;
+}
+
+#right_col a:link {
+ font-family: source_sans_proregular, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 18px;
+ color: rgb(126, 146, 166);
+ margin: 0 0 15px 0;
+ display: block;
+}
+/********************************************************************** FOOTER */
+footer {
+ width: 1070px;
+ height: 135px;
+ margin: 0 auto;
+ padding: 0;
+ position: relative;
+ background-image: url(img/footer.png);
+ text-align: center;
+ font-family: source_sans_proregular, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ color: rgb(76, 76, 76);
+}
+footer ul {
+ margin: 0;
+ padding: 75px 0 20px 0;
+}
+footer ul li {
+ display: inline;
+ font-size: 18px;
+ margin: 0 10px;
+}
+footer p.copyright {
+ font-size: 12px;
+}
--- /dev/null
+<div id="sitemap">
+ <ol>
+ <li flexy:foreach="nav,main">
+ <h2><a href="{main[url]:h}">{main[label]:h}</a></h2>
+ {if:main[subs]}
+ <?php
+ $t->chunks = array_chunk($main['subs'], 3, true);
+ ?>
+ <div class="row" flexy:foreach="chunks,chunky">
+ <ol>
+ <li flexy:foreach="chunky,chunk">
+ <a href="{chunk[url]:h}">{chunk[label]:h}</a>
+ {if:chunk[subs]}
+ <ol>
+ <li flexy:foreach="chunk[subs],subs,sChunk">
+ <a href="{sChunk[url]:h}">{sChunk[label]:h}</a>
+
+ {if:sChunk[subs]}
+ <ol>
+ <li flexy:foreach="sChunk[subs],subs2,sChunk2">
+ <a href="{sChunk2[url]:h}">{sChunk2[label]:h}</a>
+ </li>
+ </ol>
+ {end:}
+ </li>
+ </ol>
+ {end:}
+ </li>
+ </ol>
+ </div>
+ {end:}
+ </li>
+ </ol>
+</div>
\ No newline at end of file
--- /dev/null
+<!doctype html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>{pageTitle:h}</title>
+<link rel="stylesheet" href="styles.css" />
+<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
+{styles:h}
+{topScripts:h}
+</head>
+
+<body>
+<div id="container">
+ <header>
+ <div id="header_wrap"> <img id="logo" src="img/logo.png" width="140" height="165" alt="Cedarville Marine Logo" />
+ <h1><img src="img/wordmark.jpg" width="550" height="85" alt="Cedarville Marine - Serving the Les Cheneaux Islands recreational boating industry since 1984" /><!-- image is temporary - waiting for font from client --></h1>
+ <p class="tel">906.484.2815</p>
+ <ul>
+ <li><a href="#" title="Services">Services</a>
+ <ul>
+ <li><a href="#" title="Capabilities">Capabilities</a></li>
+ <li><a href="#" title="Service Forms">Service Forms</a>
+ <ul>
+ <li><a href="#" title="Service Request">Service Request</a></li>
+ <li><a href="#" title="Launch Request">Launch Request</a></li>
+ <li><a href="#" title="Temporary Storage">Temporary Storage</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Seaweed Removal">Seaweed Removal</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Store">Store</a>
+ <ul>
+ <li><a href="#" title="Summer Gear">Summer Gear</a>
+ <ul>
+ <li><a href="#" title="Apparel">Apparel</a></li>
+ <li><a href="#" title="Tubes & Rafts">Tubes & Rafts</a></li>
+ <li><a href="#" title="Boating Accessories">Boating Accessories</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Winter Gear">Winter Gear</a>
+ <ul>
+ <li><a href="#" title="Apparel">Apparel</a></li>
+ <li><a href="#" title="Snowmobile Accessories">Snowmobile Accessories</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Snowmobile & ATV's">Snowmobile & ATV's</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Facilities">Facilities</a>
+ <ul>
+ <li><a href="#" title="Marina">Marina</a></li>
+ <li><a href="#" title="Snow Shop">Snow Shop</a></li>
+ <li><a href="#" title="Rates">Rates</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Storage">Storage</a>
+ <ul>
+ <li><a href="#" title="Facility">Facility</a></li>
+ <li><a href="#" title="Storage Agreement">Storage Agreement</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Area Information">Area Information</a>
+ <ul>
+ <li><a href="#" title="Area Weather">Area Weather</a>
+ <ul>
+ <li><a href="#" title="Cedarville">Cedarville</a></li>
+ <li><a href="#" title="DeTour">DeTour</a></li>
+ <li><a href="#" title="Mackinac Island">Mackinac Island</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Local Attractions">Local Attractions</a></li>
+ <li><a href="#" title="Events">Events</a></li>
+ <li><a href="#" title="Organizations">Organizations</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="About Us">About Us</a>
+ <ul>
+ <li><a href="#" title="History">History</a></li>
+ <li><a href="#" title="Staff">Staff</a></li>
+ <li><a href="#" title="Hours of Operation">Hours of Operation</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Contact">Contact</a></li>
+ </ul>
+ </div><!-- header_wrap -->
+ {styles:h}
+{topScripts:h}
+</header>
+ <section id="hero">
+ <div id="hero_wrap">
+ <!-- slideshow -->
+ <div id="quicklink_wrap">
+ <div class="quicklink_block">
+ <h2>Summer Gear</h2>
+ <ul>
+ <li>Apparel</li>
+ <li>Tubes & Rafts</li>
+ <li>Boat Accessories</li>
+ </ul>
+ </div>
+ <div class="quicklink_block">
+ <h2>Docks Available</h2>
+ </div>
+ <div class="quicklink_block">
+ <h2>Seaweed Removal</h2>
+ </div>
+ <div class="quicklink_block last_q_block">
+ <h2>Boat & Engine Repair</h2>
+ </div>
+ </div><!-- quicklink_wrap -->
+ </div>
+ <!-- hero_wrap -->
+ </section>
+ <!-- hero -->
+ <section id="content">
+ <div id="content_wrap">
+ <div id="left_col">
+ <div id="toolbox">
+ <div id="category">
+ <p>Cedarville Marine is a full service marina and ship's store located on the waterfront in beautiful downtown Cedarville, Michigan. We offer:</p>
+ <ul>
+ <li>Mercury / Mercruiser and OMC motor services</li>
+ <li>Mercury / Mercruiser, Evinrude BRP, & Arctic Cat sales and repair</li>
+ <li>Outboard & inboard boat motor repair</li>
+ <li>Boat storage & boat shrink wrapping</li>
+ </ul>
+ <ul>
+ <li>25 ton travel lift</li>
+ <li>Seasonal & Transient dockage</li>
+ <li>Gas & Diesel</li>
+ <li>Pump-out station & Trash disposal</li>
+ </ul>
+ <div class="hr_graphic"></div><!-- hr_graphic -->
+
+ <div class="imageright" >
+ <img alt="is82-1354654029-02462.jpeg" title="Gaylord To Mackinaw Trail Ride" src="../../../Desktop/pic-spotlight-mackinac-island-8-09.jpg">
+ <div class="imagecaption">This is a caption for images</div>
+ </div><!-- imageright -->
+ </div><!-- category -->
+ </div><!-- toolbox -->
+
+ <!-- **************************************************************************** GLM Blocks from another web site... ******************************************* -->
+
+ <section flexy:if="hasHeadlines" id="hHlines">
+ <h2>Headlines</h2><!-- this is not needed and is set to display:none; in the css -->
+ <ul>
+
+ <li class="hHlinesItem">
+ <img src="http://www.viewsofthepast.com/photos/towns/Towns_C/to-cdrv-001.jpg" alt="Home page headline image">
+ <h3><a href="{v[href]:h}">the title</a></h3>
+ <p>This is a paragraph</p>
+ <p class="hHlinesMore"><a href="{v[href]:h}">Read More</a></p>
+ </li><!-- /.hHlinesItem -->
+
+ <li class="hHlinesItem">
+ <img src="http://www.viewsofthepast.com/photos/towns/Towns_C/to-cdrv-002.jpg" alt="Home page headline image">
+ <h3><a href="{v[href]:h}">the title</a></h3>
+ <p>This is a paragraph</p>
+ <p class="hHlinesMore"><a href="{v[href]:h}">Read More</a></p>
+ </li><!-- /.hHlinesItem -->
+
+ <li class="hHlinesItem">
+ <h3><a href="{v[href]:h}">the title</a></h3>
+ <p>This is a paragraph</p>
+ <p class="hHlinesMore"><a href="{v[href]:h}">Read More</a></p>
+ </li><!-- /.hHlinesItem -->
+ </ul>
+</section><!-- /#hHlines -->
+
+
+
+ </div><!-- left_col -->
+
+ <div id="right_col"> <a href="#" title="Get directions to our store" ><img src="img/google_maps.jpg" width="251" height="183" alt="Get directions to our store"/></a> <a href="#" title="Weather Widget"><!-- TEMPORARY :: Replace with actual weather widget --><img src="img/weather_temp.jpg" /></a> <a href="#" title="Great Lakes Lake Levels (USACE)">Great Lakes Lake Levels (USACE)</a> <a href="#" title="Find Us on Facebook"><img src="img/facebook.gif" width="251" height="82" alt="Find Us on Facebook" /></a> </div>
+ <!-- right_col -->
+ </div>
+ <!-- content_wrap -->
+ </section>
+ <footer>
+ <address>
+ <ul>
+ <li class="adr">Cedarville Marine, 100 E Hodeck St, Cedarville, MI 49719</li>
+ <li><img src="img/footer_elipse.png" alt="graphic element" /></li>
+ <li class="geo">45°59’41.68” — 84°21’33.97”</li>
+ <li><img src="img/footer_elipse.png" alt="graphic element" /></li>
+ <li class="tel">906.484.2815</li>
+ <li><img src="img/footer_elipse.png" alt="graphic element" /></li>
+ <li><a href="#" >Contact Us</a></li>
+ </ul>
+ </address>
+ <p class="copyright">Copyright ©2014, Cedarville Marine. Produced by Gaslight Media, All Rights Reserved</p>
+ </footer>
+</div>
+<!-- container -->
+<script>
+$("#header_wrap>ul>li").hover( function(){
+ console.log(this);
+ $(this).children("ul").addClass("subMenu");
+ $('li:has(> ul)').css("border-bottom","0");//remove bottom border from any li that has child ul
+}, function(){
+ $(this).children("ul").removeClass("subMenu");
+}
+
+
+);
+</script>
+{bottomScripts:h}
+</body>
+</html>
--- /dev/null
+<!doctype html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Cedarville Marine</title>
+<link rel="stylesheet" href="styles.css" />
+<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
+</head>
+
+<body>
+<div id="container">
+ <header>
+ <div id="header_wrap"> <img id="logo" src="img/logo.png" width="140" height="165" alt="Cedarville Marine Logo" />
+ <h1><img src="img/wordmark.jpg" width="550" height="85" alt="Cedarville Marine - Serving the Les Cheneaux Islands recreational boating industry since 1984" /><!-- image is temporary - waiting for font from client --></h1>
+ <p class="tel">906.484.2815</p>
+ <ul>
+ <li><a href="#" title="Services">Services</a>
+ <ul>
+ <li><a href="#" title="Capabilities">Capabilities</a></li>
+ <li><a href="#" title="Service Forms">Service Forms</a>
+ <ul>
+ <li><a href="#" title="Service Request">Service Request</a></li>
+ <li><a href="#" title="Launch Request">Launch Request</a></li>
+ <li><a href="#" title="Temporary Storage">Temporary Storage</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Seaweed Removal">Seaweed Removal</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Store">Store</a>
+ <ul>
+ <li><a href="#" title="Summer Gear">Summer Gear</a>
+ <ul>
+ <li><a href="#" title="Apparel">Apparel</a></li>
+ <li><a href="#" title="Tubes & Rafts">Tubes & Rafts</a></li>
+ <li><a href="#" title="Boating Accessories">Boating Accessories</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Winter Gear">Winter Gear</a>
+ <ul>
+ <li><a href="#" title="Apparel">Apparel</a></li>
+ <li><a href="#" title="Snowmobile Accessories">Snowmobile Accessories</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Snowmobile & ATV's">Snowmobile & ATV's</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Facilities">Facilities</a>
+ <ul>
+ <li><a href="#" title="Marina">Marina</a></li>
+ <li><a href="#" title="Snow Shop">Snow Shop</a></li>
+ <li><a href="#" title="Rates">Rates</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Storage">Storage</a>
+ <ul>
+ <li><a href="#" title="Facility">Facility</a></li>
+ <li><a href="#" title="Storage Agreement">Storage Agreement</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Area Information">Area Information</a>
+ <ul>
+ <li><a href="#" title="Area Weather">Area Weather</a>
+ <ul>
+ <li><a href="#" title="Cedarville">Cedarville</a></li>
+ <li><a href="#" title="DeTour">DeTour</a></li>
+ <li><a href="#" title="Mackinac Island">Mackinac Island</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Local Attractions">Local Attractions</a></li>
+ <li><a href="#" title="Events">Events</a></li>
+ <li><a href="#" title="Organizations">Organizations</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="About Us">About Us</a>
+ <ul>
+ <li><a href="#" title="History">History</a></li>
+ <li><a href="#" title="Staff">Staff</a></li>
+ <li><a href="#" title="Hours of Operation">Hours of Operation</a></li>
+ </ul>
+ </li>
+ <li><a href="#" title="Contact">Contact</a></li>
+ </ul>
+ </div><!-- header_wrap -->
+ </header>
+ <section id="hero">
+ <div id="hero_wrap">
+ <!-- slideshow -->
+ <div id="quicklink_wrap">
+ <div class="quicklink_block">
+ <h2>Summer Gear</h2>
+ <ul>
+ <li>Apparel</li>
+ <li>Tubes & Rafts</li>
+ <li>Boat Accessories</li>
+ </ul>
+ </div>
+ <div class="quicklink_block">
+ <h2>Docks Available</h2>
+ </div>
+ <div class="quicklink_block">
+ <h2>Seaweed Removal</h2>
+ </div>
+ <div class="quicklink_block last_q_block">
+ <h2>Boat & Engine Repair</h2>
+ </div>
+ </div><!-- quicklink_wrap -->
+ </div>
+ <!-- hero_wrap -->
+ </section>
+ <!-- hero -->
+ <section id="content">
+ <div id="content_wrap">
+ <div id="left_col">
+ <div id="toolbox">
+ <div id="category">
+ <p>Cedarville Marine is a full service marina and ship's store located on the waterfront in beautiful downtown Cedarville, Michigan. We offer:</p>
+ <ul>
+ <li>Mercury / Mercruiser and OMC motor services</li>
+ <li>Mercury / Mercruiser, Evinrude BRP, & Arctic Cat sales and repair</li>
+ <li>Outboard & inboard boat motor repair</li>
+ <li>Boat storage & boat shrink wrapping</li>
+ </ul>
+ <ul>
+ <li>25 ton travel lift</li>
+ <li>Seasonal & Transient dockage</li>
+ <li>Gas & Diesel</li>
+ <li>Pump-out station & Trash disposal</li>
+ </ul>
+ <div class="hr_graphic"></div><!-- hr_graphic -->
+
+ <div class="imageright" >
+ <img alt="is82-1354654029-02462.jpeg" title="Gaylord To Mackinaw Trail Ride" src="../../../Desktop/pic-spotlight-mackinac-island-8-09.jpg">
+ <div class="imagecaption">This is a caption for images</div>
+ </div><!-- imageright -->
+ </div><!-- category -->
+ </div><!-- toolbox -->
+
+ <!-- **************************************************************************** GLM Blocks from another web site... ******************************************* -->
+
+ <section flexy:if="hasHeadlines" id="hHlines">
+ <h2>Headlines</h2><!-- this is not needed and is set to display:none; in the css -->
+ <ul>
+
+ <li class="hHlinesItem">
+ <img src="http://www.viewsofthepast.com/photos/towns/Towns_C/to-cdrv-001.jpg" alt="Home page headline image">
+ <h3><a href="{v[href]:h}">the title</a></h3>
+ <p>This is a paragraph</p>
+ <p class="hHlinesMore"><a href="{v[href]:h}">Read More</a></p>
+ </li><!-- /.hHlinesItem -->
+
+ <li class="hHlinesItem">
+ <img src="http://www.viewsofthepast.com/photos/towns/Towns_C/to-cdrv-002.jpg" alt="Home page headline image">
+ <h3><a href="{v[href]:h}">the title</a></h3>
+ <p>This is a paragraph</p>
+ <p class="hHlinesMore"><a href="{v[href]:h}">Read More</a></p>
+ </li><!-- /.hHlinesItem -->
+
+ <li class="hHlinesItem">
+ <h3><a href="{v[href]:h}">the title</a></h3>
+ <p>This is a paragraph</p>
+ <p class="hHlinesMore"><a href="{v[href]:h}">Read More</a></p>
+ </li><!-- /.hHlinesItem -->
+ </ul>
+</section><!-- /#hHlines -->
+
+
+
+ </div><!-- left_col -->
+
+ <div id="right_col"> <a href="#" title="Get directions to our store" ><img src="img/google_maps.jpg" width="251" height="183" alt="Get directions to our store"/></a> <a href="#" title="Weather Widget"><!-- TEMPORARY :: Replace with actual weather widget --><img src="img/weather_temp.jpg" /></a> <a href="#" title="Great Lakes Lake Levels (USACE)">Great Lakes Lake Levels (USACE)</a> <a href="#" title="Find Us on Facebook"><img src="img/facebook.gif" width="251" height="82" alt="Find Us on Facebook" /></a> </div>
+ <!-- right_col -->
+ </div>
+ <!-- content_wrap -->
+ </section>
+ <footer>
+ <address>
+ <ul>
+ <li class="adr">Cedarville Marine, 100 E Hodeck St, Cedarville, MI 49719</li>
+ <li><img src="img/footer_elipse.png" alt="graphic element" /></li>
+ <li class="geo">45°59’41.68” — 84°21’33.97”</li>
+ <li><img src="img/footer_elipse.png" alt="graphic element" /></li>
+ <li class="tel">906.484.2815</li>
+ <li><img src="img/footer_elipse.png" alt="graphic element" /></li>
+ <li><a href="#" >Contact Us</a></li>
+ </ul>
+ </address>
+ <p class="copyright">Copyright ©2014, Cedarville Marine. Produced by Gaslight Media, All Rights Reserved</p>
+ </footer>
+</div>
+<!-- container -->
+<script>
+$("#header_wrap>ul>li").hover( function(){
+ console.log(this);
+ $(this).children("ul").addClass("subMenu");
+ $('li:has(> ul)').css("border-bottom","0");//remove bottom border from any li that has child ul
+}, function(){
+ $(this).children("ul").removeClass("subMenu");
+}
+
+
+);
+</script>
+</body>
+</html>