Antworten: 2
Seite [1] |
|||||
Popeye1001 Beginner Beiträge: 11 |
# Thema - 24.04.2009 um 12:33 Uhr
I want create the slider with squads, but i have a problem with load variables. Variables: $data['squads']['name'] = cs_secure($cs_squads['squads_name']); $data['squads']['info'] = cs_url('squads','view','id=' . $cs_squad_id); navlist.php <?php $cs_lang = cs_translate('squads'); $data = array(); $clan_id = 4; $cs_squad_id = 4; //squads $select = 'sqd.squads_name AS squads_name, cln.clans_id AS clans_id'; $from = "squads sqd INNER JOIN {pre}_clans cln ON sqd.clans_id = '" . $clan_id . "'"; $where = "sqd.squads_id = '" . $cs_squad_id . "'"; $cs_squads = cs_sql_select(__FILE__,$from,$select,$where); $data['squads']['name'] = cs_secure($cs_squads['squads_name']); $data['squads']['info'] = cs_url('squads','view','id=' . $cs_squad_id); //members $select = 'mem.users_id AS users_id, usr.users_picture AS users_picture, usr.users_nick AS users_nick'; $from = 'members mem INNER JOIN {pre}_users usr ON mem.users_id = usr.users_id '; $where = "mem.squads_id = '" . $cs_squad_id . "'"; $order = 'mem.members_order ASC, usr.users_nick ASC'; $cs_members = cs_sql_select(__FILE__,$from,$select,$where,$order,0,0); $nopic = cs_html_img('uploads/board/nopic.jpg', 50, 50); if(!empty($cs_members)) { $data = array(); $run = 0; foreach ($cs_members AS $members) { $data['squads'][$run]['link'] = cs_url('users','view','id=' . $cs_members[$run]['users_id']); $data['squads'][$run]['nick'] = cs_secure($cs_members[$run]['users_nick']); $data['squads'][$run]['picture'] = empty($cs_members[$run]['users_picture']) ? $nopic : cs_html_img('uploads/users/' . $cs_members[$run]['users_picture'] , 50 , 50); $run++; } } echo cs_subtemplate(__FILE__,$data,'squads','navlist'); ?> Zuletzt editiert von Popeye1001 am 24.04.2009 um 13:19 Uhr (2x Editiert)
|
||||
Inaktiv |
|
||||
Fr33z3m4n Medal of Honor Herkunft: Hamm Beiträge: 11094 |
# Antwort: 1 - 24.04.2009 um 15:49 Uhr
you must change first index of your array. you use the same index for squads, and after for lsiting images.
change to
at tpl use {squad:name} {squad:info} sorry for my bad english ------------------ mfg Patrick "Fr33z3m4n" Jaskulski Antoine de Saint-Exupéry: Wenn Du ein Schiff bauen willst, so trommle nicht Männer zusammen, um Holz zu beschaffen, Aufgaben zu verteilen, sondern lehre die Männer die Sehnsucht nach dem endlosen weiten Meer. |
||||
Inaktiv |
|||||
Popeye1001 Thread-Ersteller Beginner Beiträge: 11 |
# Antwort: 2 - 24.04.2009 um 17:00 Uhr
work, thx for you! |
||||
Inaktiv |
|||||
Antworten: 2
Seite [1] |
Sie müssen sich registrieren, um zu antworten. |