Hi,
hier auf externer Link
gibts ja oben die leiste mit der Alphabetisch geordnet liste von A-Z.
Wie kann man das am besten bewerkstelligen.
oder
Wer kann mir da helfen sowas umzusetzen.
Mfg
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | <?php # Copyright by littlecrow # Support www.ilch.de # Games Content defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: Games'; $hmenu = 'Games'; $design = new design ( $title , $hmenu ); if ( !is_numeric($menu->get(1)) ) { $design->header(); $limit = $allgAr['Nlimit']; $page = ( $menu->getA(1) == 'p' ? $menu->getE(1) : 1 ); $MPL = db_make_sites ($page , "WHERE games_recht >= ".$_SESSION['authright'] , $limit , '?newgames' , 'newgames' ); $anfang = ($page - 1) * $limit; $tpl = new tpl ( 'newgames/newgames.htm' ); $abf = "SELECT a.games_title as title, a.games_id as id, DATE_FORMAT(a.games_time,'%d. %m. %Y') as datum, DATE_FORMAT(a.games_time,'%W') as dayofweek, a.games_text as text, a.games_entwickler as entwickler, a.games_vertrieb as vertrieb, a.games_genre as genre, a.games_hp as hp, a.games_release as rel, a.games_usk as usk, a.games_pc as pc, a.games_x360 as x360, a.games_ps2 as ps2, a.games_ps3 as ps3, a.games_cpumin as cpumin, a.games_cpumax as cpumax, a.games_rammin as rammin, a.games_rammax as rammax, a.games_gfxmin as gfxmin, a.games_gfxmax as gfxmax, a.games_sfxmin as sfxmin, a.games_sfxmax as sfxmax, a.games_hdmin as hdmin, a.games_hdmax as hdmax, a.games_bmin as bmin, a.games_bmax as bmax, a.games_screen as screen, b.name as username FROM prefix_newgames as a LEFT JOIN prefix_user as b ON a.user_id = b.id WHERE ".$_SESSION['authright']." <= a.games_recht OR a.games_recht = 0 ORDER BY games_title ASC LIMIT ".$anfang.",".$limit; #echo '<pre>'.$abf.'</pre>'; $erg = db_query($abf); echo mysql_error(); while ($row = db_fetch_assoc($erg)) { $k0m = db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = ".$row['id']." AND cat = 'newgames'"); $row['kom'] = db_result($k0m,0); $row['datum'] = $lang[$row['dayofweek']].' '.$row['datum']; if ( strpos ( $row['text'] , '[PREVIEWENDE]' ) !== FALSE ) { $a = explode('[PREVIEWENDE]' , $row['text']); $row['text'] = $a[0]; } $row['text'] = bbcode($row['text']); $tpl->set_ar_out($row,0); } $tpl->set_out('SITELINK', $MPL,1); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | $i = 0; $alphabetic = array ( 'A' , 'B' , 'C' , 'D' , 'E' , 'F' , 'G' , 'H' , 'I' , 'J' , 'K' , 'L' , 'M' , 'N' , 'O' , 'P' , 'Q' , 'R' , 'S' , 'T' , 'U' , 'V' , 'W' , 'X' ); $count = count ( $alphabetic ); foreach ( $alphabetic as $val ) { $i ++; echo '<a href="index.php?games&l=' . $val . '">' . $val . '</a>' .( $count == $i ? '' : ' | ' ) . "\n" ; } $letter = ( isset( $_GET [ 'l' ]) && in_array( $_GET [ 'l' ], $alphabetic ) ? $alphabetic [ array_search ( $_GET [ 'l' ], $alphabetic )] : 'A' ); $data = array (); $sql = sprintf( "SELECT `games_title` FROM `prefix_newgames` WHERE LOWER( RPAD(`games_title`,1,'?') ) = '%s'" , strtolower ( $letter ) ); $q = db_query( $sql ); while ( $row = db_fetch_row( $q ) ) { array_push ( $data , $row ); } echo '<pre>' ; print_r( $data ); echo '</pre>' ; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#F8F8F8"> <tr bgcolor="#F8F8F8"> <td colspan="2" width="90%"><a href="index.php?newgames-{id}" target="_self"><h2>» {title}</h2></a></td> <td colspan="2" width="10%"><img src="include/images/newgames/usk/{usk}" alt="" border="0" width="32" height="32"></td> </tr> </table> <table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#F8F8F8"> <tr bgcolor="#F8F8F8"> <td bgcolor="#F8F8F8" width="110" height="170"><p align="center"><img src="{screen}" alt="" border="0" width="130" height="180"></td> <td bgcolor="#F8F8F8" width="100%" valign="top" height="170"> <table border="0" width="100%" cellspacing="1" cellpadding="2"> <tr> <td width="30%"><a href="" target="_blank"></a></td> <td width="70%"></td> </tr> <tr> <td width="30%" style="border-bottom: 1px dashed #DEDEDE;" size="1">Genre:</td> <td width="70%" style="border-bottom: 1px dashed #DEDEDE;" size="1"><span style="color:red">{genre}</span></td> </tr> <tr> <td width="30%" style="border-bottom: 1px dashed #DEDEDE;" size="1">Enwickler:</td> <td width="70%" style="border-bottom: 1px dashed #DEDEDE;" size="1">{entwickler}</td> </tr> <tr> <td width="30%" style="border-bottom: 1px dashed #DEDEDE;" size="1">Vertrieb: <td width="70%" style="border-bottom: 1px dashed #DEDEDE;" size="1">{vertrieb}</td> </tr> <tr> <td width="30%" style="border-bottom: 1px dashed #DEDEDE;" size="1">Homepage:</td> <td width="70%" style="border-bottom: 1px dashed #DEDEDE;" size="1"><a href="{hp}" target="_blank">Website besuchen</a></td> </tr> <tr> <td width="30%" style="border-bottom: 1px dashed #DEDEDE;" size="1">Release:</td> <td width="70%" style="border-bottom: 1px dashed #DEDEDE;" size="1">{rel}</td> </tr> <tr> <td width="30%" style="border-bottom: 1px dashed #DEDEDE;" size="1">Plattform:</td> <td width="70%" style="border-bottom: 1px dashed #DEDEDE;" size="1"><img src="include/images/newgames/plattform/pc/{pc}.png" alt="" border="0" width="28" height="13"> <img src="include/images/newgames/plattform/x360/{x360}.png" alt="" border="0" width="28" height="13"> <img src="include/images/newgames/plattform/ps2/{ps2}.png" alt="" border="0" width="28" height="13"> <img src="include/images/newgames/plattform/ps3/{ps3}.png" alt="" border="0" width="28" height="13"></td> </tr> </table> <table border="0" width="100%" cellspacing="1" cellpadding="2"> <tr> <td width="40%" style="border-bottom: 1px dashed #DEDEDE;" size="1">Game wurde eingetragen von <b>{username}</b></td> </tr> <tr> <td align="right" style="padding-top: 30px;"><a href="index.php?newgames-{id}" target="_self">Mehr Details</a></td> </tr> </table> </td> </tr> <tr bgcolor="#F8F8F8"> <td bgcolor="#F8F8F8" width="110" colspan="2"></td> </tr> </table> <br /> <br /> {EXPLODE} <br /> <br /> <center>{SITELINK}</center> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | <?php # Copyright by littlecrow # Support www.ilch.de # Games Content defined ( 'main' ) or die ( 'no direct access' ); $title = $allgAr [ 'title' ]. ' :: Games' ; $hmenu = 'Games' ; $design = new design ( $title , $hmenu ); $design ->header(); $tpl = new tpl ( 'newgames/newgames.htm' ); $i = 0; $alphabetic = array ( 'A' , 'B' , 'C' , 'D' , 'E' , 'F' , 'G' , 'H' , 'I' , 'J' , 'K' , 'L' , 'M' , 'N' , 'O' , 'P' , 'Q' , 'R' , 'S' , 'T' , 'U' , 'V' , 'W' , 'X' ); $count = count ( $alphabetic ); $letter = ( in_array( $menu ->get(1), $alphabetic ) ? $alphabetic [ array_search ( $menu ->get(1), $alphabetic )] : 'A' ); $abc = '' ; foreach ( $alphabetic as $val ) { $i ++; $abc .= '<a href="?gamecheck-' . $val . '">' .( $val == $letter ? '<strong>' . $val . '</strong>' : $val ). '</a>' .( $count == $i ? '' : ' | ' ) . "\n" ; } $tpl ->set_out( 'ABC' , $abc , 0); $limit = 5; $page = ( $menu ->getA(2) == 'p' ? $menu ->getE(2) : 1 ); $MPL = db_make_sites ( $page , sprintf( "WHERE games_recht >= %s AND LOWER( RPAD(`games_title`,1,'?') ) = '%s'" , $_SESSION [ 'authright' ], strtolower ( $letter )) , $limit , '?newgames-' . $letter , 'newgames' ); $anfang = ( $page - 1) * $limit ; $abf = sprintf("SELECT a.games_title as title, a.games_id as id, DATE_FORMAT(a.games_time, '%%d. %%m. %%Y' ) as datum, DATE_FORMAT(a.games_time, '%%W' ) as dayofweek, a.games_text as text, a.games_entwickler as entwickler, a.games_vertrieb as vertrieb, a.games_genre as genre, a.games_hp as hp, a.games_release as rel, a.games_usk as usk, a.games_pc as pc, a.games_x360 as x360, a.games_ps2 as ps2, a.games_ps3 as ps3, a.games_cpumin as cpumin, a.games_cpumax as cpumax, a.games_rammin as rammin, a.games_rammax as rammax, a.games_gfxmin as gfxmin, a.games_gfxmax as gfxmax, a.games_sfxmin as sfxmin, a.games_sfxmax as sfxmax, a.games_hdmin as hdmin, a.games_hdmax as hdmax, a.games_bmin as bmin, a.games_bmax as bmax, a.games_screen as screen, b.name as username FROM prefix_newgames as a LEFT JOIN prefix_user as b ON a.user_id = b.id WHERE (%s <= a.recht OR a.games_recht = 0) AND (LOWER( RPAD(`a`.`games_title`,1, '?' ) ) = '%s' ) ORDER BY games_title ASC LIMIT %d,%d", $_SESSION [ 'authright' ], strtolower ( $letter ), $anfang , $limit ); $erg = db_query( $abf ); while ( $row = db_fetch_assoc( $erg )) { $k0m = db_query( "SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = " . $row [ 'id' ]. " AND cat = 'newgames'" ); $row [ 'kom' ] = db_result( $k0m ,0); $row [ 'datum' ] = $lang [ $row [ 'dayofweek' ]]. ' ' . $row [ 'datum' ]; if ( strpos ( $row [ 'text' ] , '[PREVIEWENDE]' ) !== FALSE ) { $a = explode ( '[PREVIEWENDE]' , $row [ 'text' ]); $row [ 'text' ] = $a [0]; } $row [ 'text' ] = bbcode( $row [ 'text' ]); $tpl ->set_ar_out( $row ,1); } $tpl ->set_out( 'SITELINK' , $MPL ,2); $design ->footer(); ?> |
1 2 | {ABC}<br /> {EXPLODE} |
1 | Warning: sprintf(): Too few arguments in /srv/www/htdocs/web26/html/testhp/include/contents/newgames/list.php on line 62 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /srv/www/htdocs/web26/html/testhp/include/includes/func/db/mysql.php on line 58 |
Geschlossen | ||
![]() |
Zurück zu HTML, PHP, SQL,... |