<?php // faPASS 3.52.1 Code: ----------------------------------------------->
include("/srv/www/httpd/phost/w/de/pytalhost/webradio/web/shared/class/class.config.php");
$conf_pass= new Config("/srv/www/httpd/phost/w/de/pytalhost/webradio/web/shared/config/pass_conf.php");
include $conf_pass->pfad_ums_class;
$fa_ums= new fa_ums(1); //Change here the access level (0= free for all)
?>
<?php /*** FA-PASS Code-Generator für Listen ***/
// Datenbank laden
include_once ($conf_pass->shared_dir."class/class.fa_db.php");
if ($faDB->class_id != "fa_db") {
$faDB = new db($conf_pass->db_host, $conf_pass->db_user, $conf_pass->db_pass, $conf_pass->db_name);
}
// Abfrage
function listpages($items,$limit){
$pages=ceil($items/$limit);
for($i=0;$i<$pages;$i++){
if($_POST["page"]==$i or (!$_POST["page"] and $i==0)){
$res.=sprintf(" [%d] ",$i+1);
}else{
$res.=sprintf(" [<a href=\"%s?page=%d&%s\">%d</a> ]",$PHP_SELF,$i,SID,$i+1);
}
}
return $res;
}
function nextpage($items,$limit){
$pages=ceil($items/$limit);
if($items<=$limit or $_POST["page"]>=($pages-1))return "";
return sprintf("<a href=\"%s?page=%d&%s\">Next Page</a>",$PHP_SELF,$_POST["page"]+1,SID);
}
function prevpage(){
if($_POST["page"]<1)return "";
return sprintf("<a href=\"%s?page=%d&%s\">Prev Page</a>",$PHP_SELF,$_POST["page"]-1,SID);
}
$max=30;
$min=intval($_POST['page'])*$max;
$limit="$min,$max";
$count=$faDB->fobject("SELECT COUNT(*) as summe FROM $conf_pass->db_user_login as t1 JOIN $conf_pass->db_user_data as t2 ON t1.user_id=t2.user_id WHERE t1.nic = '%s' OR t1.level = '%s' OR t2.Vorname = '%s' C t2.Nachname = '%s' OR t2.DD = '%s' OR t2.MM = '%s' OR t2.JJJJ = '%s' OR t2.plz = '%s' OR t2.sex = '%s'" , $_POST["t1nic"], $_POST["t1level"], $_POST["t2Vorname"], $_POST["t2Nachname"], $_POST["t2DD"], $_POST["t2MM"], $_POST["t2JJJJ"], $_POST["t2plz"], $_POST["t2sex"]);
$res=$faDB->fobject("SELECT t1.user_id, t1.nic, t1.level, t2.Vorname, t2.Nachname, t2.DD, t2.MM, t2.JJJJ, t2.plz, t2.sex FROM $conf_pass->db_user_login as t1 JOIN $conf_pass->db_user_data as t2 ON t1.user_id=t2.user_id WHERE t1.nic = '%s' OR t1.level = '%s' OR t2.Vorname = '%s' OR t2.Nachname = '%s' OR t2.DD = '%s' OR t2.MM = '%s' OR t2.JJJJ = '%s' OR t2.plz = '%s' OR t2.sex = '%s' LIMIT $limit" , $_POST["t1nic"], $_POST["t1level"], $_POST["t2Vorname"], $_POST["t2Nachname"], $_POST["t2DD"], $_POST["t2MM"], $_POST["t2JJJJ"], $_POST["t2plz"], $_POST["t2sex"]);
?>
<html><head><title>FA-PASS Userliste</title></head>
<body>
<b>Userliste</b><br><form action="<?=$PHP_SELF?>" method="POST">
<table align="center" bgcolor="#f2f2f2"><tr><td>t1.nic:
<input type="text" name="t1nic" value="<?=htmlspecialchars($_POST["t1nic"])?>" size="10" maxlength="10"/></td></tr><tr><td>t1.level:
<input type="text" name="t1level" value="<?=htmlspecialchars($_POST["t1level"])?>" size="10" maxlength="10"/></td></tr><tr><td>t2.Vorname:
<input type="text" name="t2Vorname" value="<?=htmlspecialchars($_POST["t2Vorname"])?>" size="10" maxlength="10"/></td></tr><tr><td>t2.Nachname:
<input type="text" name="t2Nachname" value="<?=htmlspecialchars($_POST["t2Nachname"])?>" size="10" maxlength="10"/></td></tr><tr><td>t2.DD:
<input type="text" name="t2DD" value="<?=htmlspecialchars($_POST["t2DD"])?>" size="10" maxlength="10"/></td></tr><tr><td>t2.MM:
<input type="text" name="t2MM" value="<?=htmlspecialchars($_POST["t2MM"])?>" size="10" maxlength="10"/></td></tr><tr><td>t2.JJJJ:
<input type="text" name="t2JJJJ" value="<?=htmlspecialchars($_POST["t2JJJJ"])?>" size="10" maxlength="10"/></td></tr><tr><td>t2.plz:
<input type="text" name="t2plz" value="<?=htmlspecialchars($_POST["t2plz"])?>" size="10" maxlength="10"/></td></tr><tr><td>t2.sex:
<input type="text" name="t2sex" value="<?=htmlspecialchars($_POST["t2sex"])?>" size="10" maxlength="10"/></td></tr> <tr><td>
<input type="submit" name="fapasssuche" value="suchen"/>
</td></tr>
</table></form><br>
<?=$count[0]->summe?> User! <br><table bgcolor="#f2f2f2" align="center">
<?php if(!$res): ?>
<tr><td>Sorry keine Treffer</td><tr>
<?php else: ?><tr bgcolor="#c0c0c0"><td>user_id</td><td>nic</td><td>level</td><td>Vorname</td><td>Nachname</td><td>DD</td><td>MM</td><td>JJJJ</td><td>plz</td><td>sex</td></tr>
<?php
$x=0;
foreach($res as $user){
//Farbe:
$color="#f8f8f8";
if($x%2)$color="#BDB76B";
$x++;
?>
<tr>
<td bgcolor="<?=$color?>"><?=htmlspecialchars($user->user_id)?></td><td bgcolor="<?=$color?>"><a href="public_profil.php?user_id=<?=$user->user_id?>&<?=SID?>">
<?=htmlspecialchars($user->nic)?>
</a></td>
<td bgcolor="<?=$color?>"><?=htmlspecialchars($user->level)?></td>
<td bgcolor="<?=$color?>"><?=htmlspecialchars($user->Vorname)?></td>
<td bgcolor="<?=$color?>"><?=htmlspecialchars($user->Nachname)?></td>
<td bgcolor="<?=$color?>"><?=htmlspecialchars($user->DD)?></td>
<td bgcolor="<?=$color?>"><?=htmlspecialchars($user->MM)?></td>
<td bgcolor="<?=$color?>"><?=htmlspecialchars($user->JJJJ)?></td>
<td bgcolor="<?=$color?>"><?=htmlspecialchars($user->plz)?></td>
<td bgcolor="<?=$color?>"><?=htmlspecialchars($user->sex)?></td>
</tr>
<?php
} ?>
<?php endif; ?>
</table><table align="center" width="70%">
<tr><td><?=prevpage()?></td>
<td align=center>Seite <?=listpages($count[0]->summe,$max)?></td>
<td align="right"><?=nextpage($count[0]->summe,$max)?></td>
</tr>
</table>
</body>
</html>