<?php
$sql="SELECT usr.*, profile.company, profile.city, profile.street, profile.tel, profile.fax, profile.icq, profile.website, profile.describt, profile.skills, profile.birthday, profile.initial FROM ".TABLE."_user AS usr, ".TABLE."_profile AS profile WHERE usr.userid = profile.userid AND usr.userid = '".$aid."'";
$author = mysql_fetch_object(mysql_query($sql));
if(!empty($aid)) {
$tel = $author->tel;
$fax = $author->fax;
$icq = $author->icq;
if(empty($tel)) { $tel = "-"; }
if(empty($fax)) { $fax = "-"; }
if(empty($icq)) { $icq = "/"; }
$profileData = array(
"NAME" => $author->fullname,
"MAIL" => $author->email,
"COMP" => $author->company,
"HOME" => $author->city,
"ADDR" => $author->street,
"TEL" => $tel,
"FAX" => $fax,
"ICQ" => $icq,
"HTTP" => $author->website,
"DESC" => nl2br($author->describt),
"SKILLS" => nl2br($author->skills)
);
$tpl->assign("profileData", $profileData);
$tpl->assign("profileSet", "1");
} else {
$error[] = "No valid User ID";
$tpl->assign("profileError", $error);
$tpl->assign("profileErrorSet", "1");
$tpl->assign("profileSet", "0");
}
$tpl->display("profile.template");
?>