52 lines
No EOL
1.4 KiB
PHP
52 lines
No EOL
1.4 KiB
PHP
<?php
|
|
header('Content-Type: text/html; charset=utf-8');
|
|
$connect = mysqli_connect(CONFIG_MYSQL_HOST,CONFIG_MYSQL_USER,CONFIG_MYSQL_PW,CONFIG_MYSQL_DB);
|
|
mysqli_set_charset($connect, 'utf8');
|
|
$output = ''; $testnr = 0; $ausgabe = 0;
|
|
if(isset($_POST["query"]))
|
|
{
|
|
$search = mysqli_real_escape_string($connect, $_POST["query"]);
|
|
$query = "
|
|
SELECT * FROM fazs
|
|
WHERE name LIKE '%".$search."%'
|
|
OR name2 LIKE '%".$search."%'
|
|
OR strasse LIKE '%".$search."%'
|
|
OR ort LIKE '%".$search."%'
|
|
OR plz LIKE '%".$search."%'
|
|
OR auftragnr LIKE '%".$search."%'
|
|
OR kdnr LIKE '%".$search."%'
|
|
ORDER BY auftragnr";
|
|
}
|
|
else
|
|
{
|
|
$query = "
|
|
SELECT * FROM fazs ORDER BY auftragnr";
|
|
}
|
|
$result = mysqli_query($connect, $query);
|
|
if(mysqli_num_rows($result) > 0)
|
|
{
|
|
$output .= '<table class="table-hover" style="font-size:10pt">
|
|
';
|
|
while($row = mysqli_fetch_array($result))
|
|
{
|
|
if($ausgabe<30) {
|
|
if($testnr!=$row["auftragnr"]) {
|
|
$testnr=$row["auftragnr"]; $ausgabe++;
|
|
$output .='
|
|
<tr>
|
|
<td nowrap align="left" style="width: 60px">
|
|
<a href="https://jb-data.de/index.php?s=ifazs&edit=3&iabo='.$row["auftragnr"].'">'.$row["auftragnr"].'</td>
|
|
<td nowrap align="left" style="width:235px">'.$row["name2"].' '.$row["name"].'</td>
|
|
<td nowrap align="right" style="width:225px">'.$row["strasse"].' '.$row["hnr"].' '.$row["hnrz"].' '.$row["plz"].' '.$row["ort"].'</td>
|
|
</tr>
|
|
';
|
|
}
|
|
}
|
|
}
|
|
echo $output;
|
|
}
|
|
else
|
|
{
|
|
echo 'keine Abonnenten gefunden';
|
|
}
|
|
?>
|