Pomoże mi ktoś to wstawić w kod?
Bo tak wstawione nie działa...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Wyszukiwarka Produktów</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="language" content="pl" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" />
<script>
<!-- PopUp Link JavaScript Code Provided By: <a href="http://www.DesignerWiz.com" target="_blank">http://www.DesignerWiz.com</a> - Development Resource & JavaScript Public Archive Center -->
function popUp(page,PWidth,PHeight,id) {
eval("designerwiz"+id+"=window.open('"+page+"','designerwiz1','toolbar=1,scrollbars=1,location=1,status=1,menubars=1,resizable=0,width="+PWidth+",height="+PHeight+"')")
}
</SCRIPT>
<script type="text/javascript">
function loadXMLDoc()
{
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("menu").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","selector.php",true);
xmlhttp.send();
}
</script>
</head>
<body>
<div id="header"><img src="images/head.jpg"/></div>
<div id="menu">
<?php
//require_once('debug.php');
$serwer = ""; // nazwa serwera mysql
$login = ""; // login do bazy
$haslo = ""; // haslo do bazy
$baza = ""; // nazwa bazy
$tabela = ""; // nazwa tabeli
function simpleCheckbox($name , $value , $label)
{
?>
<input onchange="this.form.submit();"
<?php echo (isset($_POST[$name]) && in_array($value , $_POST[$name]))?
'checked="checked"' : ''; ?> type="checkbox" name="
<?php echo $name; ?>[]" value="
<?php echo $value; ?>" />
<?php
}
function printFilters
(array $data , array $columns) {
echo '<div id="left"><table border="0" width="240">';
foreach($columns as $column => $columnName)
{
if(count($data[$column])) {
echo '<tr border=1 style="background-color: #8EC23C" align="left"><td>'.$columnName.'</td><td>';
foreach($data[$column] as $value => $label)
simpleCheckbox($column , $value , $label);
}
}
}
function getFilters
($table , array $columns) {
$notNull = '`' . join('` IS NOT NULL OR`' , $columns) . '` IS NOT NULL'; $groupBy = join(',' , $columns); $sql = 'SELECT DISTINCT `'.join('`,`' , $columns).'` FROM `'.$table.'` WHERE ' . $notNull . ' GROUP BY '.$groupBy; //echo $sql;
//debug(mysql_fetch_array($result)); debug(mysql_fetch_array($result)); debug(mysql_fetch_array($result)); exit();
{
{
if(!isset($return[$column])) $return[$column] = array();
if($row[$column] && !in_array($row[$column] , $return[$column])) $return[$column][$row[$column]] = $row[$column];
}
}
return $return;
}
function secure($value)
{
return $value;
}
function getRowset
($table , array $columnsInTheTable) {
$sql = 'SELECT * FROM `'.$table.'`';
$where = ' WHERE ';
$i = 0;
while($column = current($columnsInTheTable)) {
$separator = ($where != ' WHERE ' ? ' AND ' : '');
if(isset($_POST[$column])) {
{
while(list
($key, $val) = each($_POST[$column])) {
$_POST[$column][$key] = secure($val);
}
$where .= $separator . '`' . $column . '`' . 'IN("' . join('","' , $_POST[$column]) . '")'; } else
{
$where .= $separator . '`' . $column . '` = "'. secure($_POST['column']) . '"';
}
}
next($columnsInTheTable); $i++;
}
$sql .= ($where != ' WHERE ' ? $where : '');
//echo $sql;
{
$return[] = $row;
}
return $return;
}
function printRowset
(array $data , array $columns) {
echo '<div id="right"><table border="0" frame="box" width="750">'; foreach($columns as $name)
{
echo '<th style="background-color: #778899; ">'.$name.'</th>'; }
foreach($data as $row)
{
echo '<tr style="background-color: #C0C0C0">'; foreach($columns as $columnKey => $columnName)
{
echo '<td>'.$row[$columnKey].'</td>'; }
}
echo '</table></div><div id="footer"><font color="#ffffff">test</font></div>'; }