hallo...
ich hab da schon eine kleine Javasript suche drin, aber nicht das was ich mir wünnsche, mehr in PHP um nach A.b oder C zu suchen oder mit einbezogen ob der User ein Foto, Hompage oder E-Mail hat sowie nach Geburtsdatum...
Wie macht man eine Suche nach Objekten oder ABC die dann Angezeigt wird... versuch eine Userliste mit Suche zu machen...
Alles anzeigen
kann mir einer da weiterhelfen???
ich hab da schon eine kleine Javasript suche drin, aber nicht das was ich mir wünnsche, mehr in PHP um nach A.b oder C zu suchen oder mit einbezogen ob der User ein Foto, Hompage oder E-Mail hat sowie nach Geburtsdatum...
Wie macht man eine Suche nach Objekten oder ABC die dann Angezeigt wird... versuch eine Userliste mit Suche zu machen...
Quellcode
- <?php
- // Load headers
- require(TEMPLATEPATH."/all_header.tpl.php");
- ?>
- <html><head>
- <TITLE><?=$lng['memberlist']?></TITLE>
- <?=$css?>
- <head>
- <link rel="stylesheet" href="css/css2.css">
- </head>
- <body onload="window.focus();">
- <?
- if($total_pages>0){
- for($i=1; $i<=$total_pages; $i++){
- if($i==$page){
- }else{
- ?>
- <a href="main.php?include=11&session_id=<?=$session_id?>&page=<?=$i?>&orderby=<?=$orderby?>&edit=<?=$edit?>&kick=<?=$kick?>&ban=<?=$ban?>"><b><?=$i?></b></a>
- <?
- }
- }
- }
- ?>
- <script language="JavaScript">
- var NS4 = (!document.all);
- var IE4 = (document.all);
- var zaehler = 0;
- function suchen(suchtext) {
- var txt, i, found;
- if (suchtext == "")
- return false;
- if (NS4) {
- if (!this.find(suchtext))
- while(this.find(suchtext, false, true))
- zaehler++;
- else
- zaehler++;
- if (zaehler == 0) alert(suchtext + " was not found on this page.");
- }
- if (IE4) {
- txt = this.document.body.createTextRange();
- for (i = 0; i <= zaehler && (found = txt.findText(suchtext)) != false; i++) {
- txt.moveStart("character", 1);
- txt.moveEnd("textedit");
- }
- if (found) {
- txt.moveStart("character", -1);
- txt.findText(suchtext);
- txt.select();
- txt.scrollIntoView();
- zaehler++;
- }
- else {
- if (zaehler > 0) {
- zaehler = 0;
- suchen(suchtext);
- }
- else { alert("Der Text \"" + suchtext + "\" wurde nicht gefunden."); }
- }
- }
- return false;
- }
- </script>
- <td height="583" align="left" > <div align="center">
- <p>
- <form name=search onSubmit="return suchen(this.suchtexting.value);">
- Auf dieser Seite suchen nach:
- <input name=suchtexting type=text size=20 onChange="n = 0;">
- <strong>
- <input type="submit" name="Submit" value="OK">
- </strong>
- </form>
- <div align="center">
- <table class="dforeground" border="0" cellspacing="1" cellpadding="6" width="50%">
- <tr valign="center">
- <td align="left"><center>
- <b><?=$lng["username"]?></b>
- </center></td>
- <td align="left"><center>
- <B>Homepage</B>
- </center></td>
- <td align="left"><center>
- <B><?=$lng["email"]?></B>
- </center></td>
- <td align="left"><center>
- <b>Bild</b>
- <td align="left"><center>
- <b>Geburtstag</b>
- </center></td>
- <td align="left"><center>
- <b>Jahrgang</b>
- </center></TD>
- <td align="left"><center>
- <b>Alter</b>
- </center></TD>
- </td>
- <td align="left">
- </td>
- </tr>
- <?
- for($i=0;$i<$userlist_count;$i++){
- // Get user's session ID
- $session2=NEW session($session->getUsersSession($userlist[$i][id]));
- // IP address
- if($show_ip){
- if($session2->ip){
- $ip=" [<a href=\"\" class=\"links\" onClick=\"window.open('http://network-tools.com/default.asp?prog=trace&Netnic=whois.arin.net&host=".$session2->ip."', 'whois', 'width=800, height=600, resizable=yes, scrollbars=yes'); return false;\">".$session2->ip."</A>]";
- }else{
- $ip="[?]";
- }
- }else{
- $ip="";
- }
- ?>
- <tr>
- <td align="left">
- <?
- if (strpos($userlist[$i][statusa], "1") === 0) {
- ?>
- <img src="<?=IMAGEPATH?>/Moderator.gif" width="12" height="12" border="0" alt="Moderator">
- <?
- } else {
- ?>
- <?
- if (strpos($userlist[$i][statusa], "2") === 0) {
- ?>
- <img src="<?=IMAGEPATH?>/Supermoderator.gif" width="12" height="12" border="0" alt="Supermoderator">
- <?
- } else {
- ?>
- <?
- if (strpos($userlist[$i][statusa], "3") === 0) {
- ?>
- <img src="<?=IMAGEPATH?>/Standesamt.gif" width="12" height="12" border="0" alt="Standesamt">
- <?
- } else {
- ?>
- <?
- if (strpos($userlist[$i][statusa], "4") === 0) {
- ?>
- <img src="<?=IMAGEPATH?>/Admin.gif" width="12" height="12" border="0" alt="Admin">
- <?
- } else {
- ?>
- <img src="<?=IMAGEPATH?>/clearpixel.gif" width="12" height="12" border="0" alt="">
- <?
- }
- }
- }
- }
- IF($user->sex){
- ?>
- <img src="<?=IMAGEPATH?>/sex_<?=$userlist[$i][sex]?>.gif" border="0" alt="">
- <?
- }else{
- ?>
- <img src="<?=IMAGEPATH?>/clearpixel.gif" width="0" height="0" border="0" alt="">
- <?
- }
- ?>
- <A href="" onClick="window.open('main.php?session_id=<?=$session_id?>&include=41&profile_user_id=<?=$userlist[$i][id]?>','pr<?=$userlist[$i][id]?>','width=500,height=500,top=1,resizable=yes,scrollbars=yes'); return false;"><FONT color="#<?=$userlist[$i][color]?>"><?=$userlist[$i][login]?></FONT></A>
- </td>
- <td align="left"><center>
- <?
- if (strpos($userlist[$i][name], "http://") === 0) {
- ?>
- <img src="<?=IMAGEPATH?>/roterbuntstift.gif" title="angezeigt" border="0" width="16" height="16"></td>
- <?
- } else {
- ?>
- <?
- if (strpos($userlist[$i][name], "www") === 0) {
- ?>
- <img src="<?=IMAGEPATH?>/roterbuntstift.gif" title="angezeigt" border="0" width="16" height="16"></td>
- <?
- } else {
- ?>
- <img src="<?=IMAGEPATH?>/leer.gif" title="angezeigt" border="0" width="16" height="16"></td>
- <?
- }
- }
- ?>
- </center>
- </TD>
- <center>
- <?
- if(!$userlist[$i][hide_email]||$edit&&$current_user->level&8){
- ?>
- <td align="center"><img src="<?=IMAGEPATH?>/roterbuntstift.gif" title="angezeigt" border="0" width="16" height="16"></td>
- <?
- }else{
- ?>
- <td align="center"><img src="<?=IMAGEPATH?>/leer.gif" title="angezeigt" border="0" width="16" height="16"></td>
- <?
- }
- ?>
- </center>
- <td align="left"><center>
- <?
- if (empty ($userlist[$i][photo])){
- ?>
- <img src="<?=IMAGEPATH?>/leer.gif" title="angezeigt" border="0" width="16" height="16"></td>
- <?
- } else {
- ?>
- <img src="<?=IMAGEPATH?>/roterbuntstift.gif" title="angezeigt" border="0" width="16" height="16"></td>
- <?
- }
- ?>
- <td align="left"><center>
- <?
- if (strpos($userlist[$i][hha], "0") === 0) {
- ?>
- <?
- } else {
- ?>
- <?
- if (strpos($userlist[$i][hha], "3") === 0) {
- ?>
- <?=$userlist[$i][date_birth_dd]?>.<?=$userlist[$i][date_birth_mm]?>
- <?
- } else {
- }
- }
- ?>
- </td>
- <TD align="left"><center>
- <?
- if (strpos($userlist[$i][hhb], "0") === 0) {
- ?>
- <?
- } else {
- ?>
- <?
- if (strpos($userlist[$i][hhb], "4") === 0) {
- ?>
- <?=$userlist[$i][date_birth_yyyy];?>
- <?
- } else {
- }
- }
- ?>
- </td>
- <td align="left"><center>
- <?
- if (strpos($userlist[$i][age], "0") === 0) {
- ?>
- <?
- } else {
- ?>
- <?
- if (strpos($userlist[$i][age], "5") === 0) {
- ?>
- <?php
- $jahr = $userlist[$i][date_birth_yyyy];
- $mon = $userlist[$i][date_birth_mm];
- $tag = $userlist[$i][date_birth_dd];
- $alter = (date('Y') - $jahr) - intval((date('j') < $tag) AND (date('n' ) <= $mon) );
- echo $alter ;
- ?>
- <?
- } else {
- }
- }
- ?>
- </td>
- </td>
- <td align="left">
- </td>
- <?
- if($edit){
- ?>
- <td align="center">
- <?
- if($session->user_id<>$userlist[$i]['id'] && $userlist[$i]['level']<131071){
- ?>
- <input type="button" class="buttons" value="<?=$lng["edit"]?>" onclick="window.location.href='main.php?session_id=<?=$session_id?>&include=18&profile_user_id=<?=$userlist[$i][id]?>';">
- <input type="button" class="buttons" value="<?=$lng["delete"]?>" onclick="if(confirm('<?=STR_REPLACE("'","\\'",STR_REPLACE("{USER}",$userlist[$i][login],$lng["confirmdeleteuser"]))?>')){window.location.href='main.php?session_id=<?=$session_id?>&include=18&profile_user_id=<?=$userlist[$i][id]?>&delete=1';}">
- <input type="button" class="buttons" value="Standesamt" onclick="window.location.href='main.php?session_id=<?=$session_id?>&include=46&profile_user_id=<?=$userlist[$i][id]?>';">
- </td>
- <?
- }else{
- }
- ?>
- <td align="center">
- <?
- if($session->user_id<>$userlist[$i]['id'] && $userlist[$i]['level']<4096){
- ?>
- <input type="button" class="buttons" value="<?=$lng["edit"]?>" onclick="window.location.href='main.php?session_id=<?=$session_id?>&include=18&profile_user_id=<?=$userlist[$i][id]?>';">
- <input type="button" class="buttons" value="<?=$lng["delete"]?>" onclick="if(confirm('<?=STR_REPLACE("'","\\'",STR_REPLACE("{USER}",$userlist[$i][login],$lng["confirmdeleteuser"]))?>')){window.location.href='main.php?session_id=<?=$session_id?>&include=18&profile_user_id=<?=$userlist[$i][id]?>&delete=1';}">
- </td>
- <?
- }else{
- }
- ?>
- <?
- }elseif($kick&&$userlist[$i]['online'] && $userlist[$i]['id']<>$session->user_id && $userlist[$i]['level']<131071){
- if(!$session2->kicked){
- ?>
- <td align="center">
- <input type="button" class="buttons" value="<?=$lng["kick"]?>" onclick="if(confirm('<?=STR_REPLACE("'","\\'",STR_REPLACE("{USER}",$userlist[$i][login],$lng["confirmkickuser"]))?>')){window.location.href='main.php?session_id=<?=$session_id?>&include=19&profile_user_id=<?=$userlist[$i][id]?>';}">
- <br>
- <input type="button" class="buttons" value="<?=$lng["ban"]?>" onclick="window.location.href='main.php?session_id=<?=$session_id?>&include=20&profile_user_id=<?=$userlist[$i][id]?>';">
- </td>
- <?
- }else{
- ?>
- <TD> </TD>
- <?
- }
- }elseif($ban && $userlist[$i]['id']<>$session->user_id && $userlist[$i]['level']<131071){
- ?>
- <td align="center">
- <input type="button" class="buttons" value="<?=$lng["ban"]?>" onclick="window.location.href='main.php?session_id=<?=$session_id?>&include=20&profile_user_id=<?=$userlist[$i][id]?>';">
- </td>
- <?
- }elseif(!$admin&&$userlist[$i][online]&&$session->getUsersRoom($userlist[$i][id])>0&&$session->room_id>0&&$session->room_id<>$session->getUsersRoom($userlist[$i][id])){
- ?>
- <td align="center">
- <a href="" onClick="window.open('main.php?session_id=<?=$session_id?>&include=12&user_id=<?=$userlist[$i][id]?>','invitation_<?=$userlist[$i][id]?>','width=300,height=200'); return false;"><?=$lng["invite"]?></A>
- <br>
- <A href="" onClick="window.open('main.php?session_id=<?=$session_id?>&include=5&profile_user_id=<?=$userlist[$i][id]?>','pr<?=$userlist[$i][id]?>','width=500,height=500,top=1,resizable=yes,scrollbars=yes'); return false;"><?=$lng["profile"]?></A>
- </td>
- <?
- }else{
- }
- }
- ?>
- </table>
- </div>
- <?
- // var_dump($user);
- IF($total_pages>1){
- FOR($i=1; $i<=$total_pages; $i++){
- IF($i==$page){
- }else{
- ?>
- <a href="main.php?include=11&session_id=<?=$session_id?>&page=<?=$i?>&orderby=<?=$orderby?>&edit=<?=$edit?>&kick=<?=$kick?>&ban=<?=$ban?>"><b><?=$i?></b></a>
- <?
- }
- }
- }
- ?>
- </body></html>
kann mir einer da weiterhelfen???