Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Negerai su headeriais

Parašė jutas· 2012 Geg. 21 17:05:34
#19


 
<?php
ob_start();
?>
<script type='text/javascript'>
 
function getterm(){
 
	return document.getElementById('term').value;
 
}
 
function getcat(){
 
	return document.getElementById('category').selectedIndex;
 
}
 
function search(){
 
	window.location = "search.php?term=" + getterm() + "&cat=" + getcat();
 
}
 
</script>
 
<div class='userpanel'>
 
<div class='paneltop' style='margin-bottom: 1px;'><b><? echo $lang["searchpanel"]["search"]; ?></b></div>
 
<?php
 
	if(isset($_SESSION['lid'])){
 
		echo "<select id='category' name='category' style='width: 180px;'>";
 
			echo "<option value='0'>".$lang["searchpanel"]["news"]."</option>";
 
			echo "<option value='1'>".$lang["searchpanel"]["downloads"]."</option>";
 
			echo "<option value='2'>".$lang["searchpanel"]["users"]."</option>";
 
		echo "</select>";
 
		echo "<input id='term' type='text' style='width: 180px;' /><input type='button' onclick='nojavascript...search();' value='".$lang["searchpanel"]["dosearch"]."' />";
 
	}else{
 
		echo $lang["searchpanel"]["err"];
 
	}
 
?>
 
</div>
<?php
ob_end_flush();
?>