Antworten: 4
Seite [1] |
|
Tress13 Highlander Herkunft: Lüdenscheid Beiträge: 3048 |
# Thema - 01.09.2009 um 11:24 Uhr
Die Geburtstage die kommen, werden angezeigt. Aber die am heutigen Tag, die nicht ! gebtoday.php <?php // ClanSphere 2009 - www.clansphere.net // $Id: statistik.php 2346 2009-03-22 19:43:56Z hajo $ $cs_lang = cs_translate('birthday'); empty($_REQUEST['start']) ? $start = 0 : $start = $_REQUEST['start']; $birthday_options = cs_sql_option(__FILE__,'birthday'); $access_level = $birthday_options['access_level']; $select = 'users_id, users_nick, users_age, users_active, users_country, access_id '; $where = "users_age LIKE '%-" . cs_datereal('n') . "-" . cs_datereal('j') . "' AND users_hidden NOT LIKE '%users_age%' AND users_active = '1' AND access_id >= '3'"; $order = 'users_nick ASC'; $cs_users = cs_sql_select(__FILE__,'users',$select,$where,$order,0,0); $data['geb']['birth'] = ""; $users_count = count($cs_users); $data = array(); if(empty($users_count)) { $data['gebtoday']['flag'] = ''; $data['gebtoday']['name'] = ''; $data['gebtoday']['date'] = ''; $data['gebtoday']['age'] = ''; } else { for($run=0; $run < $users_count; $run++) { if(!empty($cs_users[$run]['users_age'])) { $birth = explode('-', $cs_users[$run]['users_age']); $data[$run]['users_id'] = $cs_users[$run]['users_id']; $data[$run]['users_nick'] = $cs_users[$run]['users_nick']; $data[$run]['users_day'] = $birth[2]; $data[$run]['users_month'] = $birth[1]; $data[$run]['users_year'] = $birth[0]; } } $gebtoday_loop = count($data); for($run=0; $run<$gebtoday_loop; $run++) { $data['gebtoday'][$run]['flag'] = cs_html_img('symbols/countries/' . $cs_users[$run]['users_country'] . '.png'); $data['gebtoday'][$run]['nick'] = cs_user($data[$run]['users_id'], $data[$run]['users_nick'], $cs_users[$run]['users_active']); $data['gebtoday'][$run]['date'] = $data[$run]['users_day'] . '.' . $data[$run]['users_month']. '.' . $data[$run]['users_year']; $data['gebtoday'][$run]['age'] = cs_datereal('Y') - $data[$run]['users_year']; } } echo cs_subtemplate(__FILE__,$data,'birthday','gebtoday'); ?> birthday.php <?php // ClanSphere 2009 - www.clansphere.net // $Id: statistik.php 2346 2009-03-22 19:43:56Z hajo $ $cs_lang = cs_translate('birthday'); // kommende geburtstag start $birthday_options = cs_sql_option(__FILE__,'birthday'); $max_users = $birthday_options['max_users']; $max_users = $max_users - 1; $day = cs_datereal('j',cs_time()); $month = cs_datereal('n', cs_time()); $select = 'users_id, users_nick, users_age, users_active, users_country, access_id '; $where = "users_hidden NOT LIKE '%users_age%' AND users_age != '0' AND users_active = '1' AND (access_id >= " . $birthday_options['access_level'] . ")"; $where .= " AND users_age > '%-" . $month . "-%'"; $cs_users = cs_sql_select(__FILE__,'users',$select,$where,"users_age DESC",0,0); $users_count = count($cs_users); $data = array(); if(empty($users_count)) { $data['geb']['nextbirth'] = $cs_lang['no_data']; } else { for($run=0; $run < $users_count; $run++) { if(!empty($cs_users[$run]['users_age'])) { $birth = explode('-', $cs_users[$run]['users_age']); if($birth[1] == $month and $birth[2] > $day or $birth[1] >= ($month + 1)) { $data[$run]['users_id'] = $cs_users[$run]['users_id']; $data[$run]['users_nick'] = $cs_users[$run]['users_nick']; $data[$run]['users_day'] = $birth[2]; $data[$run]['users_month'] = $birth[1]; $data[$run]['users_year'] = $birth[0]; } } } foreach($data as $sortarray) { $column[] = $sortarray['users_month']; $column2[] = $sortarray['users_day']; } if(empty($data)) { $data['geb']['nextbirth'] = $cs_lang['no_data']; } else { array_multisort($column, SORT_ASC, $column2, SORT_ASC, $data); $new_count = count($data); for($run = 0; $run < $new_count; $run++) { if($run <= $max_users) { $age = cs_datereal('Y') - $data[$run]['users_year']; isset($data['geb']['nextbirth']) ? $data['geb']['nextbirth'] .= cs_user($data[$run]['users_id'], $data[$run]['users_nick'], $cs_users[$run]['users_active']).' (' . $age . ') ' : $data['geb']['nextbirth'] = cs_user($data[$run]['users_id'], $data[$run]['users_nick'], $cs_users[$run]['users_active']).' (' . $age . ') '; isset($data['geb']['nextbirth']) ? $data['geb']['nextbirth'] .= ' (' . $data[$run]['users_day'] . '.' . $data[$run]['users_month']. ') '. ' ' : $data['geb']['nextbirth'] = ' (' . $data[$run]['users_day'] . '.' . $data[$run]['users_month']. ') '. ' '; } } } // kommende geburtstag ende // geburtstag start $select = 'users_id, users_nick, users_age, users_active, users_country, access_id '; $where = "users_age LIKE '%-" . cs_datereal('n') . "-" . cs_datereal('j') . "' AND users_hidden NOT LIKE '%users_age%' AND users_active = '1' AND (access_id >= " . $birthday_options['access_level'] . ")"; $order = 'users_nick ASC'; $cs_users = cs_sql_select(__FILE__,'users',$select,$where,$order,0,4); $data['geb']['birth'] = ""; if(empty($cs_users)) { $data['geb']['birth'] = "niemand Geburtstag."; $data['geb']['birth1'] = ""; } else { foreach ($cs_users AS $users) { $birth = explode ('-', $users['users_age']); $age = cs_datereal('Y') - $birth[0]; $data['geb']['birth'] .= cs_html_img('symbols/countries/' . $users['users_country'] . '.png') . ' '; $data['geb']['birth'] .= cs_user($users['users_id'], $users['users_nick'], $users['users_active']).' (' . $age . ') '; $data['geb']['birth1'] = " Geburtstag. Herzlichen Glückwunsch!"; } } } // geburtstag ende echo cs_subtemplate(__FILE__,$data,'birthday','birthday'); ?> Jemand ne Idee ??? ------------------ www.iv-gaming.de | www.iv-artwork.de |
Inaktiv |
|
VooDooAlex Poststar Herkunft: Coburg Beiträge: 691 |
# Antwort: 1 - 12.09.2009 um 10:13 Uhr
Das Problem hatte letzens schon einer. Habe es gefixt. Modul einfoch neu runterladen. Gruß Alex ------------------ |
Inaktiv |
|
Tress13 Thread-Ersteller Highlander Herkunft: Lüdenscheid Beiträge: 3048 |
# Antwort: 2 - 12.09.2009 um 14:22 Uhr
Hab mal nur die neuen mods installiert. Müsste doch reichen,oder ??? ------------------ www.iv-gaming.de | www.iv-artwork.de |
Inaktiv |
|
VooDooAlex Poststar Herkunft: Coburg Beiträge: 691 |
# Antwort: 3 - 12.09.2009 um 14:29 Uhr
Ja, dass reicht. Gruß Alex ------------------ |
Inaktiv |
|
Tress13 Thread-Ersteller Highlander Herkunft: Lüdenscheid Beiträge: 3048 |
# Antwort: 4 - 12.09.2009 um 14:37 Uhr
THX Alex ! ------------------ www.iv-gaming.de | www.iv-artwork.de |
Inaktiv |
|
Antworten: 4
Seite [1] |
Sie müssen sich registrieren, um zu antworten. |