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 | | PHP-Quelltext <?PHP
if( $USER['id'] ){
$stat=$DB->fetch_array($DB->query('SELECT COUNT(`profile_visitor`) AS SUM_VISITOR,SUM(`profile_visits`) AS SUM_VISITS FROM `'.$sqlprefix.'_profile_visits` WHERE `profile_owner`='.$USER['id'].' ;'));
$res=$DB->query('SELECT * FROM `'.$sqlprefix.'_profile_visits` v LEFT JOIN `'.$db_tab['user'].'` u ON v.`profile_visitor` = u.`user_id` WHERE v.`profile_owner`='.$USER['id'].' ORDER BY `timestamp` DESC;');
$profile_visitor_row='';
if( !function_exists('mysql_to_unix') ){
function mysql_to_unix($t){
if( strpos($t,'-') !== false ){
return array(
'year'=>intval(substr($t,0,4)),
'month'=>intval(substr($t,5,2)),
'day'=>intval(substr($t,8,2)),
'hour'=>intval(substr($t,11,2)),
'minute'=>intval(substr($t,14,2)),
'second'=>intval(substr($t,17,2))
);
}
return array(
'year'=>intval(substr($t,0,4)),
'month'=>intval(substr($t,4,2)),
'day'=>intval(substr($t,6,2)),
'hour'=>intval(substr($t,8,2)),
'minute'=>intval(substr($t,10,2)),
'second'=>intval(substr($t,12,2))
);
}
}
while( $userinfo=$DB->fetch_array($res) ){
if( isonline($userinfo['user_id']) ){
eval ("\$info_os= \"".getTemplate("member_os_online")."\";");
}else{
eval ("\$info_os= \"".getTemplate("member_os_offline")."\";");
}
$row=rowcolor($row);
if ($userinfo['user_sex']=="m") {
eval("\$info_profile= \"".getTemplate("member_showprofil_iconlink_m")."\";");
}else if( $userinfo['user_sex']=="w" ){
eval("\$info_profile= \"".getTemplate("member_showprofil_iconlink_w")."\";");
}else{
eval ("\$info_profile= \"".getTemplate("member_showprofil_iconlink","")."\";");
}
$a=mysql_to_unix($userinfo['timestamp']);
$timestamp=$a['day'].'.'.$a['month'].'.'.$a['year'].' - '.$a['hour'].':'.$a['minute'];
eval ("\$profile_visitor_row.= \"".getTemplate("profile_visitor_row")."\";");
}
$stat['SUM_VISITOR'] = intval($stat['SUM_VISITOR']);
$stat['SUM_VISITS'] = intval($stat['SUM_VISITS']);
eval ("\$site_body= \"".getTemplate("profile_visitor")."\";");
}
?>
|