Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 2
Seite [1]
VooDooAlex


Poststar




Herkunft: Coburg
Beiträge: 691
# Thema - 07.01.2009 um 20:48 Uhr
Hab mir unter Forenübersicht anstehende Geburtstage zusammengestellt.
Bekomme es jetzt nicht hin die anstehenden Geburtstagsnamen als Link auf deren Profil zu setzen.
So sieht es im Augenblick aus: http://voodoogaming.de/index.php?mod=board

hier die statisik.php:
mehr... +-
 
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.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
1. / 2. / ... 
<?php
// ClanSphere 2007 - www.clansphere.net
// $

$cs_lang cs_translate('board');


// Statistik Start
$data = array();

$all_threads cs_sql_count(__FILE__,'threads');
$all_comment cs_sql_count(__FILE__,'comments',"comments_mod = 'board'");

$data['stats']['threads'] = cs_html_big(1) . $all_threads cs_html_big(0);
$data['stats']['comments'] = cs_html_big(1) . $all_comment cs_html_big(0);

$select 'users_id, users_nick, users_register, users_active';
$order 'users_register DESC';
$cs_users cs_sql_select(__FILE__,'users',$select,0,$order,0,1);

$secure_name cs_secure($cs_users['users_nick']);
$data['user']['newest'] = cs_user($cs_users['users_id'],$cs_users['users_nick'], $cs_users['users_active']);
// Statistik End

// All Users Start
$data['user']['all'] = cs_sql_count(__FILE__,'users');
// All Users End

// Online Users Start
$five_min cs_time() - 300;
$select 'users_id, users_nick, users_country, users_active, users_invisible';
$upcome "users_laston > '" $five_min "' AND users_invisible = '0'";
$order 'users_laston DESC';
$users_count cs_sql_count(__FILE__,'users',$upcome);
$data['stats']['online'] = sprintf($cs_lang['user_online'], $users_count);
$where 'count_time > \'' $five_min '\'';
$visitor_online cs_sql_count(__FILE__,'count',$where) - $users_count;
if(
$visitor_online 0) { $visitor_online 0; }
$data['stats']['online'] .= sprintf($cs_lang['visitor_online'], $visitor_online);
$cs_users cs_sql_select(__FILE__,'users',$select,$upcome,$order,0,0);

if(empty(
$cs_users)) {
    
$data['users'][0]['nick'] = $cs_lang['no_data'];
} else {
  for(
$run 0$run count($cs_users); $run++) {
    
$data['users'][$run]['nick'] .= cs_html_img('symbols/countries/' $cs_users[$run]['users_country'] . '.png') . ' ';
    
$data['users'][$run]['nick'] .= cs_user($cs_users[$run]['users_id'], $cs_users[$run]['users_nick'], $cs_users[$run]['users_active']).'  ';
  }
}
// Online Users End
$data['if']['list'] = false;
$data['if']['listcat'] = false;
if(empty(
$_GET['action']) OR $_GET['action'] == 'list') { $data['if']['list'] = true; }
if(!empty(
$_GET['action']) AND $_GET['action'] == 'listcat') { $data['if']['listcat'] = true; }

// kommende geburtstag start
// Wieviele sollen angezeigte werden
$max_users 10;

$month cs_datereal('m'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 > '2'";
$where .= " AND users_age > '%-" $month "-%'";
$cs_users cs_sql_select(__FILE__,'users',$select,$where,"users_age DESC",0,0);
$users_count count($cs_users);

if(empty(
$users_count)) {
    echo 
$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) {
        
$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'];
  }
  
array_multisort($columnSORT_ASC$column2SORT_ASC$data);
  
$new_count count($data);

  for(
$run 0$run $new_count$run++) {
    
$max_users $max_users 1;
    if(
$run <= $max_users) {
    
$age cs_datereal('Y') - $data[$run]['users_year'];
    
$data['geb']['nextbirth'] .= cs_html_img('symbols/countries/' $cs_users[$run]['users_country'] . '.png') . ' ';
    
$data['geb']['nextbirth'] .= cs_user($data[$run]['users_id'], $data[$run]['users_nick'], $data[$run]['users_active']).' (' $age ')  ';
      }
  }
}
// kommende geburtstag ende

// geburtstag start
$select 'users_id, users_nick, users_age, users_active, users_country, access_id ';
$where "users_age LIKE '%-" cs_datereal('m') . "-" .  cs_datereal('d') . "' AND users_hidden NOT LIKE '%users_age%' AND users_active = '1' AND access_id > '2'";
$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,'board','statistik');
?>


Ich weiß das ich das hier ändern muß:
 
1.
1. / 2. / ... 
 $data['geb']['nextbirth'] .= cs_user($data[$run]['users_id'], $data[$run]['users_nick'], $data[$run]['users_active']).' (' $age ')  ';


Aber wie?

Kann mir einer bitte helfen?

Gruß Alex


------------------


Inaktiv
Jam2 ClanSphere Team


Highlander





Beiträge: 3291
# Antwort: 1 - 07.01.2009 um 21:13 Uhr
 
1.
1. / 2. / ... 
 $data['geb']['nextbirth'] .= cs_user($cs_users['users_id'], $cs_users['users_nick'], $cs_users['users_active']).' (' $age ')  ';


------------------
Gruß/ Best regards
Jam2

Nützliche Forumbeiträge/Codepastes: (Useful comments in our board / codepastes)
Template Switch for index.php
Board Navlist last posts

Edi: könnte man denn auch hier eine erweiterung einfügen?
Jam2: das web ist wie toyota.....
Edi: hö ?
Jam2: nichts ist unmöglich!


Inaktiv
|
VooDooAlex
Thread-Ersteller


Poststar




Herkunft: Coburg
Beiträge: 691
# Antwort: 2 - 07.01.2009 um 21:24 Uhr
Danke schon mal für die Hilfe.
Das hab ich auch schon ausprobiert. Wenn ich das so mache, zeigt er mir keine Namen mehr an.

Noch eine Idee?

Edit:
Hab es geschafft, hatte wohl noch einen kleinen Fehler drin.
So muß es heißen:
 
1.
1. / 2. / ... 
     $data['geb']['nextbirth'] .= cs_user($data[$run]['users_id'], $data[$run]['users_nick'], $cs_users[$run]['users_active']).' (' $age ')  ';


Trozdem Danke für die Hilfe.

Gruß Alex


------------------




Zuletzt editiert von Alex1631 am 07.01.2009 um 22:02 Uhr (1x Editiert)
Inaktiv
|
Antworten: 2
Seite [1]


Sie müssen sich registrieren, um zu antworten.