Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
1 2 3 4 5 6 7 8 9 | function profilefields_show_spez_az1($value, $uid) { $output = ''; $sql = db_query("SELECT a.platz, a.text, a.wofur, a.team, a.bild, DATE_FORMAT(a.`time`, '%d.%m.%Y') AS time FROM `prefix_az1` a INNER JOIN prefix_user b ON a.team = b.name WHERE b.id = $uid ORDER BY `time` DESC"); while($row = db_fetch_assoc($sql) ) { $output .= '<div>'.(!empty($row['bild']) ? '<img src="'.$row['bild'].'" [u]alt="'.$row['wofur'].'" title="'.$row['wofur'].'"/>' : $row['wofur']).'<br /><font class="smalfont">'.$row['time'].'</font></div>';[/u] } $output = '<div id="profil_az1">'.$output.'</div>'; return profilefields_show_echo_standart( 'Auszeichnungen', $output); } |
1 2 | #profil_az1 div {float:left; margin: 0px 2px;} .profil_az1 {width:100px;} |
1 2 3 4 | $erg10 = db_query("SELECT platz, text, wofur, team, bild, DATE_FORMAT(time, '%d.%m.%Y') as time FROM `prefix_az1` WHERE team = BINARY '{$row['name']}' ORDER BY time DESC"); . . 'AZ1'=>$row['az1'], |
1 2 | #profil_az1 {width:100px;} #profil_az1 div {float:left; margin: 0px 2px;} |
1 2 3 4 5 6 7 8 9 | function genAwards($uid) { $output = ''; $sql = db_query("SELECT a.platz, a.text, a.wofur, a.team, a.bild, DATE_FORMAT(a.`time`, '%d.%m.%Y') AS time FROM `prefix_az1` a INNER JOIN prefix_user b ON a.team = b.name WHERE b.id = $uid ORDER BY `time` DESC"); while($row = db_fetch_assoc($sql) ) { $output .= '<div>'.(!empty($row['bild']) ? '<img src="'.$row['bild'].'" [u]alt="'.$row['wofur'].'" title="'.$row['wofur'].'"/>' : $row['wofur']).'<br /><font class="smalfont">'.$row['time'].'</font></div>';[/u] } $output = '<div id="profil_az1">'.$output.'</div>'; return $output; } |
1 | $tpl->set('awards', genAwards($uid)); |
1 | INSERT INTO ic1_profilefields (`show`, `pos`, `func`) SELECT 'awards', MAX(pos) + 1, 3 FROM ic1_profilefields; |
1 2 3 4 5 6 7 8 | function profilefields_show_spez_awards($value, $uid) { $output = ''; $sql = db_query("SELECT a.platz, a.text, a.wofur, a.team, a.bild, DATE_FORMAT(a.`time`, '%d.%m.%Y') AS time FROM `prefix_awards` a INNER JOIN prefix_user b ON a.team = b.name WHERE b.id = $uid ORDER BY `time` DESC"); while($row = db_fetch_assoc($sql) ) { $output .= (!empty($row['bild']) ? '<img src="'.$row['bild'].'" alt="'.$row['wofur'].'" title="'.$row['wofur'].'"/>' : $row['wofur']).'<br /><font class="smalfont">'.$row['time'].'</font><br />'; } return profilefields_show_echo_standart( 'Awards', $output); } |
1 | $output .= (!empty($row['bild']) ? '<img src="'.$row['bild'].'" alt="'.$row['wofur'].'" title="'.$row['wofur'].'"/>' : $row['wofur']).'<br /><font class="smalfont">'.$row['time'].'</font><br />'. $row['text'] . '<br />'; |
1 | UPDATE ic1_awards SET team = 'neuer Name' WHERE team = 'alter Name'; |
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 81 82 83 84 85 86 | <?php # Copyright by: Manuel Staechele # Support: www.ilch.de defined ( 'main' ) or die ( 'no direct access' ); defined ( 'admin' ) or die ( 'only admin access' ); $design = new design ( 'Admins Area' , 'Admins Area' , 2 ); $design ->header(); ##### F u n k t i o n e n function getteam () { $squads = '' ; $erg1 = db_query( "SELECT name, id FROM prefix_groups ORDER BY pos" ); while ( $row = db_fetch_assoc( $erg1 ) ) { $squads .= '<option>' . $row [ 'name' ]. '</option>' ; } return ( $squads ); } ##### A k t i o n e n #Löschen if ( $menu ->getA(1) == 'd' AND is_numeric ( $menu ->getE(1))) { db_query( 'DELETE FROM `prefix_az1` WHERE id = "' . $menu ->getE(1). '" LIMIT 1' ); } #Eintragen if (isset( $_POST [ 'ins' ])) { $datum = get_datum ( $_POST [ 'datum' ]); $wofur = escape( $_POST [ 'wofur' ], 'string' ); $text = escape( $_POST [ 'text' ], 'string' ); $platz = escape( $_POST [ 'platz' ], 'string' ); $bild = get_homepage(escape( $_POST [ 'bild' ], 'string' )); if ( $_POST [ 'atype' ] == 'user' ) { $team = escape( $_POST [ 'name' ], 'string' ); } else { $team = escape( $_POST [ 'team' ], 'string' ); } if ( $menu ->getA(1) == 'e' AND is_numeric ( $menu ->getE(1))) { $id = $menu ->getE(1); db_query("UPDATE `prefix_az1` SET time = '$datum' , platz = '$platz' , team = '$team' , wofur = '$wofur' , bild = '$bild' , text = '$text' WHERE id = $id "); echo mysql_error(); $menu ->set_url(1, '' ); } else { db_query("INSERT INTO `prefix_az1` (time, platz, team, wofur, bild, text) VALUES ( '".$datum."' , '".$platz."' , '".$team."' , '".$wofur."' , '".$bild."' , '".$text."' )"); } } #Ändern/Ausgabearray füllen if ( $menu ->getA(1) == 'e' AND is_numeric ( $menu ->getE(1))) { $r = db_fetch_assoc(db_query( "SELECT * FROM `prefix_az1` WHERE id = " . $menu ->getE(1))); $r [ 'id' ] = '-e' . $r [ 'id' ]; $t = explode ( '-' , $r [ 'time' ]); $r [ 'datum' ] = $t [2]. '.' . $t [1]. '.' . $t [0]; } else { $r = array ( 'id' => '' , 'datum' => date ( 'd.m.Y' ), 'platz' => '' , 'wofur' => '' , 'bild' => '' , 'text' => '' , 'teams' => getteam()); } #Ausgabe $tpl = new tpl( 'az1' , 1); $tpl ->set_ar_out( $r ,0); if ( empty ( $r [ 'team' ])) $tpl ->set_ar_out( $r ,1); else $tpl ->set_ar_out( $r ,2); $tpl ->set_ar_out( $r ,3); $erg = db_query( 'SELECT * FROM `prefix_az1` ORDER BY time DESC' ); while ( $row = db_fetch_assoc( $erg )) { $t = explode ( '-' , $row [ 'time' ]); $row [ 'datum' ] = $t [2]. '.' . $t [1]. '.' . $t [0]; $tpl ->set_ar_out( $row ,4); } $tpl ->out(5); $design ->footer(); ?> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | $limit = 15; // Limit $page = ( $menu ->getA(1) == 'p' ? $menu ->getE(1) : 1 ); $MPL = db_make_sites ( $page , "WHERE name LIKE '" . $q . "'" , $limit , '?user' , 'user' ); $anfang = ( $page - 1) * $limit ; $class = '' ; $q = "SELECT name,recht,id,spezrank FROM `prefix_user` WHERE name LIKE '" . $q . "' ORDER by recht,posts DESC LIMIT " . $anfang . "," . $limit ; $erg = db_query( $q ); while ( $row = db_fetch_object( $erg )) { if ( $class == 'Cmite' ) { $class = 'Cnorm' ; } else { $class = 'Cmite' ; } $ar = array ( 'name' => $row ->name, 'class' => $class , 'id' => $row ->id, 'grouplist' => user_get_group_list( $row ->id), 'recht' => dblistee( $row ->recht, "SELECT id,name FROM prefix_grundrechte ORDER BY id ASC" ), 'spezrank' => '<option></option>' .dblistee( $row ->spezrank, "SELECT id,bez FROM prefix_ranks WHERE spez = 1" ), 'modslist' => user_get_mod_change_list( $row ->id), ); $tpl ->set_ar_out( $ar ,1); } $tpl ->set_out( 'MPL' , $MPL ,2); |
Geschlossen | ||
![]() |
Zurück zu Fehlersuche und Probleme |