Kavalero's personal page
<?php include LOCALE.LOCALESET."members-profile.php";
include LOCALE.LOCALESET."user_fields.php";
include LOCALE.LOCALESET."photogallery.php";
$result = dbquery("SELECT * FROM ".$dbprefix."users WHERE userid=2304");
if (dbrows($result)) { $data = dbarray($result); } else { redirect("index.php"); }
opentable("Досье ".$data['username'].". <a target="blank" href="http://www.forum.newgalaxy.ru/index.php?act=Profile&CODE=showuser&MID=8570">[Data ".$data1['username']." on the forum]");
$comment = dbcount("(commentid)", "comments", "commentname='".$data['userid']."'");
$screens = dbresult(dbquery("SELECT COUNT(photoid) FROM ".$dbprefix."photos WHERE userid='".$data['userid']."' AND albumid<>'10'"),0);
if ($screens == "") $screens = 0;
$blueprints = dbresult(dbquery("SELECT COUNT(photoid) FROM ".$dbprefix."photos WHERE userid='".$data['userid']."' AND albumid='10'"),0);
$rating = dbcount("(ratingid)", "ratings", "ratinguser='".$data['userid']."'");
$vote = dbcount("(voteid)", "pollvotes", "voteuser='".$data['user_id']."'");
$votesum = $vote + $rating;
include INCLUDES."levels.php";
echo "
";echo "
";
echo "
| ";
if ($data['usergroups'] != "") { echo ($data['useravatar'] ? "<img src='".IMAGES."avatars/".$data[' useravatar alt='".$locale[' u017>" : " echo " if (!isset($userdata['userid']) || $data['userid'] != $userdata['userid']) { echo " "; } echo "
echo " | "; echo " Nickname: ".$data['username']." Rank: ".$level." ".$locale['u009']." ".($data['userlocation'] ? $data['userlocation'] : $locale['u048'])." ".$locale['u010']." ";if ($data['userbirthdate'] != "0000-00-00") { $months = explode("|", $locale['months']); $userbirthdate = explode("-", $data['userbirthdate']); echo $months[numberformat($userbirthdate['1'])]." ".numberformat($userbirthdate['2'])." ".$userbirthdate['0']; } else { echo $locale['u048']; } echo " ".$locale['u040']." ".showdate("longdate", $data['userjoined'])." ".$locale['u044']." ".($data['userlastvisit'] != 0 ? showdate("longdate", $data['userlastvisit']) : $locale['u049'])." ".$locale['u042']." ".$comment."";if (checkrights("C")) if ($comment != "0") echo " <a href='administration/usercomments.php?userid=".$data[' userid target="blank">(all comments)"; echo " Votes cast: ".$votesum."";echo " Screenshots submitted: ".$screens."";if ($screens != "0") echo " (<a href='usersreenshots.php?userid=".$data[' userid target="blank">view all)"; if ($data['userworks'] != "0") echo " Works submitted: ".$data['userworks']."";if ($blueprints != "") echo " Blueprints submitted: ".$blueprints."";echo " n"; echo " Total ANR: ".$data['usersum']."";if (iADMIN) echo " (<a href='".ADMIN."userreports.php?userid=".$data[' userid target="blank">report)"; echo " Wins: 1st place in the "NFS-Tuning" contest (season 1-Carbon) 2nd place in the "NFS-Tuning" contest (season 1-Carbon) 1st place in the "NFS-Tuning" contest (season 2-Carbon)"; echo " n"; echo " echo " |
echo "";
echo "";
echo "";
if ($data['userworks'] != "0") {
echo "
| User's most downloaded works |
echo "";
$result2 = dbquery("SELECT downloadid,downloadcount,downloadtitle,downloadcat FROM ".DBPREFIX."downloads WHERE downloaduser='".$data[2484]."' ORDER BY downloadcount DESC LIMIT 5");
while ($data2 = dbarray($result2)) {
$cattitle = dbresult(dbquery("SELECT downloadcatname FROM ".$dbprefix."downloadcats WHERE downloadcatid=".$data2['downloadcat'].""),0);
echo "
";
}
echo "
<a href='downloads.php?view=".$data2[' downloadid target="blank">".$data2['downloadtitle']." | ".$cattitle." | (".$data2['downloadcount'].")" |
}
opentable("Me and NFS");
echo "";
echo "";
echo "
I don't know what to write about, I'll probably write about what I'd like to see in a new NFS. I'll say right away that I'm not exactly a hardcore fan of the series. But racing simulators are one of my favorite genres of computer games. I started getting friendly with the PC relatively recently, about two years ago, but in that time I've managed to play a pretty decent number of racing games, from simulators like GTR to the simplest arcades. And every more or less decent game had its own thing: some won you over with realism, others with beautiful scenery... others with tuning. So I thought, wouldn't it be great if someday a game came out that combined all the best from other games! In principle I've already written about what I'd like to see in a new NFS, about why people love the old parts and don't much care for the new ones. Right now I'm playing the fourth part of this already cult series
|
closetable();
opentable("Files from ".$data['username'].". <a target="blank" href="nfsmaster.php?cat=userworks&id=2304">[All files ".$data['username']."]");
if ($data['userworks'] != "0") {
echo "
| The user's most downloaded works |
echo "";
$result2 = dbquery("SELECT downloadid,downloadcount,downloadtitle,downloadcat FROM ".DBPREFIX."downloads WHERE downloaduser='".$data['userid']."' ORDER BY downloadcount DESC LIMIT 10");
while ($data2 = dbarray($result2)) {
$cattitle = dbresult(dbquery("SELECT downloadcatname FROM ".$dbprefix."downloadcats WHERE downloadcatid=".$data2['downloadcat'].""),0);
echo "
";
}
echo "
".$data2['downloadtitle']." |
".$cattitle." | (".$data2['download_count'].") |
} else {
echo "
No files from the user
";
}
closetable();
opentable("Wallpapers from ".$data['user_name'].".");
echo "
|
closetable();
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if (isset($photo) && !isNum($photo)) fallback(FUSIONSELF);
if (isset($album) && !isNum($album)) fallback(FUSIONSELF);
function checkImageExists($imagefile) {
if(fileexists($imagefile)) {
return $imagefile;
}else{
return IMAGES."imagenotfound.jpg";
}
}
$result1 = dbquery("SELECT userid,username FROM ".$dbprefix."users WHERE userid=2304");
$data1 = dbarray($result1);
opentable("Screenshots from ".$data1['username'].". <a target="blank" href="usersreenshots.php?userid=2304">[All screenshots ".$data1['username']."]");
echo "
";
$screens = dbresult(dbquery("SELECT COUNT(photoid) FROM ".$dbprefix."photos WHERE userid='".$data1['userid']."' AND albumid<>'10'"),0);
if ($screens > "0") {
$data=dbarray(dbquery(
"SELECT ta.*, COUNT(photoid) as photocount, MAX(photodate) as maxdate, username
FROM ".$dbprefix."photoalbums AS ta
LEFT JOIN ".$dbprefix."photos USING (albumid)
LEFT JOIN ".$dbprefix."users USING (userid)
WHERE ta.albumid='".$album."' AND ta.albumid<>'10' GROUP BY albumid"
));
$piccnt=$screens;
$result = dbquery(
"SELECT tp.*, COUNT(commentitemid) AS commentcount
FROM ".$dbprefix."photos AS tp LEFT JOIN ".$dbprefix."comments
ON photoid = commentitemid AND commenttype='P'
WHERE userid=2304 AND albumid<>'10' GROUP BY photoid
ORDER BY photodate DESC LIMIT ".$rowstart.",4"
);
if(dbrows($result)>0){
echo "nn";
$imgcnt=0;
while($data=dbarray($result)){
$totvotes = dbresult(dbquery("SELECT COUNT(ratingitemid) FROM ".$dbprefix."ratings WHERE ratingitemid='".$data['photoid']."' AND ratingtype='S'"),0);
$sumvote = dbresult(dbquery("SELECT SUM(ratingvote) FROM ".$dbprefix."ratings WHERE ratingitemid='".$data['photoid']."' AND ratingtype='S'"),0);
if($totvotes){
$pcrating = sprintf("%.1f", $sumvote/$totvotes);
$pctrating = "<span title="Оценка скриншота: $pcrating/$totvotes">
}else {
$pctrating = "
}
$username = $data[2304];
$result2 = dbquery("SELECT * FROM ".$dbprefix."users WHERE userid=2304");
$data2 = dbarray($result2);
$data['phototitle'] = stripslashes($data['phototitle']);
echo "<td width='".round(100/$settings[' thumbsperrow align="center" valign="top">
<a href="pictura.php?screen=$data[photoid]" class="gallery" target="blank">
<img src='".checkImageExists(PHOTOS.$data[' photoid width='".$settings[' thumbimagew height='".$settings[' thumbimageh title='".$data[' phototitle alt='".$locale['>
".$locale['414']."".($data['photoviews']==0?$locale['412']:$data['photoviews'])."
".($data['commentcount']==0?$locale['415']:"".$data['commentcount']." ".($data['commentcount']==1?$locale['416']:$locale['417']))."
".$pctrating." Total score: ".$data['photosum']."
";
if(++$imgcnt%$settings['thumbsperrow']==0) echo "
nn";
}
echo "n
}else{
echo "
".$locale['418']."
}
if ($piccnt != 0) echo "
} else {
echo "
}
echo "
";
$screens = dbresult(dbquery("SELECT COUNT(photoid) FROM ".$dbprefix."photos WHERE userid='".$data1['userid']."' AND albumid<>'10'"),0);
if ($screens > "0") {
$data=dbarray(dbquery(
"SELECT ta.*, COUNT(photoid) as photocount, MAX(photodate) as maxdate, username
FROM ".$dbprefix."photoalbums AS ta
LEFT JOIN ".$dbprefix."photos USING (albumid)
LEFT JOIN ".$dbprefix."users USING (userid)
WHERE ta.albumid='".$album."' AND ta.albumid<>'10' GROUP BY albumid"
));
$piccnt=$screens;
$result = dbquery(
"SELECT tp.*, COUNT(commentitemid) AS commentcount
FROM ".$dbprefix."photos AS tp LEFT JOIN ".$dbprefix."comments
ON photoid = commentitemid AND commenttype='P'
WHERE userid=2304 AND albumid<>'10' GROUP BY photoid
ORDER BY photosum DESC LIMIT ".$rowstart.",4"
);
if(dbrows($result)>0){
echo "nn";
$imgcnt=0;
while($data=dbarray($result)){
$totvotes = dbresult(dbquery("SELECT COUNT(ratingitemid) FROM ".$dbprefix."ratings WHERE ratingitemid='".$data['photoid']."' AND ratingtype='S'"),0);
$sumvote = dbresult(dbquery("SELECT SUM(ratingvote) FROM ".$dbprefix."ratings WHERE ratingitemid='".$data['photoid']."' AND ratingtype='S'"),0);
if($totvotes){
$pcrating = sprintf("%.1f", $sumvote/$totvotes);
$pctrating = "<span title="Оценка скриншота: $pcrating/$totvotes">
}else {
$pctrating = "
}
$username = $data[2304];
$result2 = dbquery("SELECT * FROM ".$dbprefix."users WHERE userid=2304");
$data2 = dbarray($result2);
$data['phototitle'] = stripslashes($data['phototitle']);
echo "<td width='".round(100/$settings[' thumbsperrow align="center" valign="top">
<a href="pictura.php?screen=$data[photoid]" class="gallery" target="blank">
<img src='".checkImageExists(PHOTOS.$data[' photoid width='".$settings[' thumbimagew height='".$settings[' thumbimageh title='".$data[' phototitle alt='".$locale['>
".$locale['414']."".($data['photoviews']==0?$locale['412']:$data['photoviews'])."
".($data['commentcount']==0?$locale['415']:"".$data['commentcount']." ".($data['commentcount']==1?$locale['416']:$locale['417']))."
".$pctrating." Total score: ".$data['photosum']."
";
if(++$imgcnt%$settings['thumbsperrow']==0) echo "
nn";
}
echo "n
}else{
echo "
".$locale['418']."
}
if ($piccnt != 0) echo "
} else {
echo "
}
closetable();
closetable();
?>

")."
Private: