<?php
/*BEGIN_INFO
This module the search form will be whit the types to search for.<br />
by jomasaco.
END_INFO*/
if(!defined("WCDDL_GUTS"))
exit;
$modEnabled = true; //Change to false if don't use
$showtype = true; //Show the drop down box whit type category
$showhost = false; // show the drop down box for file host
if($modEnabled) {
$searchtml = '<form action="'.$core->siteurl.'index.php" method="post" id="searchform">
<input type="text" name="q" id="s" value=""/ size="35">
';
if($showtype) {
$searchtml .= '<SELECT name="type" id="s">
<OPTION selected value="">All Types</option>';
foreach($core->allowed_types as $type)
{
$searchtml.= '<OPTION class="'.strtolower($type).'" value="'.$type.'">'.ucfirst($type).'</option>';
}
$searchtml.= '</select> ';
}
if($showhost) {
function gethost($m) {
global $mhosts,$titles;
$a=explode(',',$m);
$b=str_replace($mhosts,$titles,$a);
$count=count($a);
for($i=0;$i<count($a);$i++)
$html = $b[$i];
return $html;
}
$searchtml.= '<SELECT name="shost" id="s">
<OPTION selected value="">All Hosts</option>';
foreach ($mhosts as $title)
{
$searchtml.= '<OPTION class="'.$title.'" value="'.$title.'">'.gethost($title).'</option>';
}
$searchtml.= '</select> '; }
$searchtml.= '<input type="submit" id="sbutt" value="SEARCH" />';
$searchtml.= '</div></form>';
$core->setTemplateVar("search",$searchtml);
}
?>