Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Unknown column 'Teamspeak 2' in 'where clause'
<?
$search = $_POST["search"];
if (empty($search)) {
echo "
<tr><td><table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td>
<fieldset><legend>Download Suche</legend><form method='post' action='?page=searchdl'>
<input type='text' name='search' maxlength='100' size='30'><br>
Suche in:<br>
<input type='radio' name='searchin' value='autor'>Autor<br>
<input type='radio' name='searchin' value='datum'>Datum<br>
<input type='radio' name='searchin' value='title'>Titel<br>
<input type='radio' name='searchin' value='shorttext'>Kurzbeschreibung<br>
<input type='radio' name='searchin' value='text' checked>Beschreibung<br>
<input type='submit' name='suche' value='Suchen'>
<input type='reset' name='Löschen' value='Reset'>
</form></fieldset>
</td></tr></table></td></tr>";
} else {
#$suchein = $HTTP_POST_VARS["suchein"];
# $search = $_POST['search'];
$suchein = in_array($_POST['searchin'], array('autor', 'datum', 'title', 'shorttext', 'text'))
? $_POST['searchin']
: 'text';
function tokenizeQuoted( $string )
{
for( $tokens=array(), $nextToken=strtok($string, ' '); $nextToken!==false; $nextToken=strtok(' ') ) {
if( $nextToken{0}==chr(0x22) || $nextToken{0}==chr(0x27) ) {
$chr = $nextToken{0};
$nextToken = $nextToken{strlen($nextToken)-1} == $chr
? substr($nextToken, 1, -1)
: substr($nextToken, 1) . ' ' . strtok($chr);
}
$tokens[] = $nextToken;
}
return $tokens;
}
$query = '
SELECT
`id`,
`title`,
`autor`,
`datum`,
`image`
FROM
`downloads`
WHERE
`'.$suchein.'` LIKE "%' . implode('%" OR `'.$search.'` LIKE "%', array_map('mysql_real_escape_string', tokenizeQuoted($search))) . '%"
';
$result = mysql_query($query)
or die(mysql_error());
while( $row = mysql_fetch_array($result, MYSQL_ASSOC) ) {
echo "
<tr align='left'>
<td colspan='2'><hr><img align='left' src='$row[image]'>Titel: <b>$row[title]</b></td>
</tr>
<tr>
<td colspan='2' class='autor'>
<table width='100%' border='0' cellspacing='2' cellpadding='2'>
<tr>
<td class='autorblack'>Autor</td>
<td class='autorblack'>Datum</td>
</tr>
<tr>
<td class='autorblack'><b>$row[autor]</b></td>
<td class='autor'><b>$row[datum]</b></td>
</tr>
<tr>
<td>-- <a href='?page=selectdl&id=$row[id]'>Mehr (Download)</a></td>
</tr>
</table>
</td>
</tr>
";
}
$num_rows = mysql_num_rows($result);
echo "<fieldset><legend>Status</legend><center>$num_rows Ergebniss(e)\n</center></fieldset>";
}
?>