$uid)); $name = $puser->name; $picture = $puser->picture; $kasutaja = $puser->name; $eesnimi = $puser->profile_eesnimi; $perenimi = $puser->profile_perenimi; $staatus = $puser->profile_staatus; $haridus = $puser->profile_haridus; $peidaharidus = $puser->profile_peidaharidus; $vanus = $puser->profile_vanus; $peidavanus = $puser->profile_peidavanus; $sugu = $puser->profile_sugu; $peidasugu = $puser->profile_peidasugu; $asukoht = $puser->profile_asukoht; $peidaasukoht = $puser->profile_peidaasukoht; $veebileht = $puser->profile_webpage; $peidaveebileht = $puser->profile_peidawebpage; $lugemispaevik = $puser->profile_blogrss; $peidalugemispaevik = $puser->profile_peidablogrss; //$minust = $puser->profile_about; } $block_content .= '
'; $block_content .= '
'; $block_content .= '
'; if($picture==""){ $block_content .= '
'; if($uid==$user->uid){ $block_content .= '
[ lisa pilt ]
'; } } else { $block_content .= '
'; if($uid==$user->uid){ $block_content .= '
[ muuda pilti ]
'; } } $block_content .= '
'; $mituArvamustParing = db_query("SELECT c.uid FROM {comments} c WHERE c.uid=%d", $uid); $arvamusi = mysql_num_rows($mituArvamustParing); if($arvamusi!=""){ $block_content .= '
Kommentaare: '.$arvamusi; } $liitunudParing = db_query("SELECT u.created FROM {users} u WHERE status=1 AND u.uid=%d LIMIT %d", $uid, 1); $liitunud = db_fetch_object($liitunudParing); $block_content .= '
Liitus: '.date('d.m.Y', $liitunud->created); $nimi = $eesnimi.' '.$perenimi; $kasAutorParing = db_query("SELECT n.nid, n.title FROM {node} n WHERE type='author' AND title='".$nimi."' AND n.uid=%d", $uid); while($kasAutor = db_fetch_object($kasAutorParing)){ if(mysql_num_rows($kasAutorParing)!=0){ $block_content .= '
Kasutaja on autor,
loe lisa!
'; } } /*$block_content .= '
Natukene minust
'; $block_content .= $minust; $block_content .= '
';*/ $block_content .= '
'; $block_content .= '
'; $block_content .= '
'; if($staatus!=""){ $block_content .= '
'.$staatus.'
'; } if($vanus!="" && $peidavanus!=1){ $time = strtotime($vanus); $oigevanus = (time()-$time)/60/60/24/365.25; $block_content .= '
Vanus: '.floor($oigevanus).'
'; } if($sugu!="" && $peidasugu!=1){ $block_content .= '
Sugu: '.$sugu.'
'; } if($haridus!="" && $peidaharidus!=1){ $block_content .= '
Haridus: '.$haridus.'
'; } if($veebileht!="" && $peidaveebileht!=1){ if(preg_match("/http:\/\//i", $veebileht)) { $block_content .= '
Koduleht: '.$veebileht.'
'; } else { $block_content .= '
Koduleht: '.$veebileht.'
'; } } if($asukoht!="" && $peidaasukoht!=1){ $block_content .= '
Asukoht: '.$asukoht.'
'; } if($lugemispaevik!="" && $peidalugemispaevik!=1){ $block_content .= '
Lugemispäevik
'; } $block_content .= '
'; if ($block_content == '') { $block['subject'] = ''; $block['content'] = ''; return $block; } if($eesnimi!='' || $perenimi!=''){ $block['subject'] = $eesnimi.' '.$perenimi; } else { $block['subject'] = $kasutaja; } if($user->name!=$name){ $kasSoberParing = db_query("SELECT ur.rid FROM {user_relationships} ur WHERE ur.requestee_id=%d AND ur.requester_id=%d AND approved=1",$user->uid, $uid); $kasSober = db_fetch_object($kasSoberParing); if($kasSober->rid==""){ $block['subject'] .= ' [ Lisa sõbraks! ] '; } } else { $block['subject'] .= ' (Muuda)'; } $block['content'] = '
'.$block_content.'
'; return $block; } }