init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
56
scripts/ajax/mafetch.php
Normal file
56
scripts/ajax/mafetch.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?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 mitarbeiter
|
||||
WHERE name LIKE '%".$search."%'
|
||||
OR handy LIKE '%".$search."%'
|
||||
OR ort LIKE '%".$search."%'
|
||||
OR gebname LIKE '%".$search."%'
|
||||
ORDER BY name";
|
||||
}
|
||||
else
|
||||
{
|
||||
$query = "
|
||||
SELECT * FROM mitarbeiter ORDER BY id DESC";
|
||||
}
|
||||
$result = mysqli_query($connect, $query);
|
||||
if(mysqli_num_rows($result) > 0)
|
||||
{
|
||||
$output .= '<table class="table-hover" style="font-size:13pt">
|
||||
';
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
if($ausgabe<30) {
|
||||
if($testnr!=$row["id"]) {
|
||||
$maid=$row["id"];
|
||||
$testnr=$row["id"]; $ausgabe++;
|
||||
if ($row["aktiv"]) { $output .='
|
||||
<tr>
|
||||
<td nowrap align="left" style="color: #115270" onclick="ma_wahl('.$maid.')">'.$row["name2"].' '.$row["name"].'</td>
|
||||
</tr>
|
||||
';
|
||||
} else {
|
||||
$output .='
|
||||
<tr>
|
||||
<td nowrap align="left" style="color: #666" onclick="ma_wahl('.$maid.')">'.$row["name2"].' '.$row["name"].'</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo $output;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'keine Mitarbeiter gefunden';
|
||||
}
|
||||
?>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue