File: D:/HostingSpaces/PvdBoogaard/indoorski.nl/backup/oude-site/cms/includes/sections/advancedsearch.php
<?php
/**
* This file contains the iwp_section_advancedsearch class.
*
* @author Jordie <jordie+code@interspire.com>
*
* @package IWP
* @subpackage IWP_API
*/
/**
* This class extends upon the base iwp_base class.
* This file deals specifically with the style guide for themes
*
* @package IWP
* @subpackage IWP_API
*
* @see iwp_base
*/
class iwp_section_advancedsearch {
public function ProcessBlock($styleGuideObj, $domElement, $attributes){
$thisElement = iwp_domhelper::GetElementByClass($domElement, 'tplflag-search-contenttypelist');
iwp_domhelper::replaceInnerHTML($thisElement, '{$searchableContentTypesOptions}');
$thisElement = iwp_domhelper::GetElementByClass($domElement, 'tplflag-search-categorylist');
iwp_domhelper::replaceInnerHTML($thisElement, '{$searchableCategoriesOptions}');
iwp_domhelper::modifyTagByClassName($domElement, 'tplflag-search-fromadvanced', '{if $searchAdvanced}1{/if}');
iwp_domhelper::modifyTagByClassName($domElement, 'tplvar-search-submitbuttonaction', 'return CheckSearchForm();');
iwp_domhelper::modifyTagByClassName($domElement, 'tplvar-search-query', '{$searchQuery}');
iwp_domhelper::modifyTagByClassName($domElement, 'tplvar-search-showadvanced', '{if $searchAdvanced}display:none;{/if}');
iwp_domhelper::modifyTagByClassName($domElement, 'tplvar-search-hideadvanced', '{if !$searchAdvanced}display:none;{/if}');
iwp_domhelper::modifyTagByClassName($domElement, 'tplvar-search-startdate', '{$searchStartDate}');
iwp_domhelper::modifyTagByClassName($domElement, 'tplvar-search-enddate', '{$searchEndDate}');
iwp_domhelper::ReplaceAttributeByClass($domElement, 'tplcond-search-titlecheckbox', 'checked', 'title');
iwp_domhelper::ReplaceAttributeByClass($domElement, 'tplcond-search-contentcheckbox', 'checked', 'content');
iwp_domhelper::ReplaceAttributeByClass($domElement, 'tplcond-search-authorcheckbox', 'checked', 'author');
iwp_domhelper::AppendAttributeByClass($domElement, 'tplcond-search-showifresults', 'style', 'display: none;');
iwp_domhelper::modifyTagByClassName($domElement, 'tplvar-search-message', '{$searchMessage}');
iwp_domhelper::modifyTagByClassName($domElement, 'tplflag-search-results', '{$searchResults}');
iwp_domhelper::modifyTagByClassName($domElement, 'tplflag-search-paging', '{$searchPaging}');
$search_html = iwp_domhelper::outerHTML($domElement);
// Yucky I know... but its the only way it could be done
$search_html = str_replace("checked='title'", '{if $searchTitleChecked}checked=\'checked\'{/if}', $search_html);
$search_html = str_replace("checked='content'", '{if $searchContentChecked}checked=\'checked\'{/if}', $search_html);
$search_html = str_replace("checked='author'", '{if $searchAuthorChecked}checked=\'checked\'{/if}', $search_html);
return $search_html;
}
}