advanced profile
This commit is contained in:
parent
30a88a41e5
commit
b9bbe0cec2
|
@ -98,6 +98,11 @@ function profile_content(&$a) {
|
|||
require_once("include/bbcode.php");
|
||||
require_once('include/security.php');
|
||||
|
||||
$tab = 'posts';
|
||||
|
||||
if(x($_GET,'tab'))
|
||||
$tab = notags(trim($_GET['tab']));
|
||||
|
||||
// $tpl = file_get_contents('view/profile_tabs.tpl');
|
||||
|
||||
|
||||
|
@ -111,7 +116,12 @@ function profile_content(&$a) {
|
|||
$contact_id = $r[0]['id'];
|
||||
}
|
||||
|
||||
if($tab == 'profile') {
|
||||
|
||||
require_once('view/profile_advanced.php');
|
||||
|
||||
return $o;
|
||||
}
|
||||
if(can_write_wall($a,$a->profile['profile_uid'])) {
|
||||
$tpl = file_get_contents('view/jot-header.tpl');
|
||||
|
||||
|
|
216
view/profile_advanced.php
Normal file
216
view/profile_advanced.php
Normal file
|
@ -0,0 +1,216 @@
|
|||
<?php
|
||||
|
||||
$o .= '';
|
||||
|
||||
$o .= <<< EOT
|
||||
|
||||
<h2>Profile</h2>
|
||||
|
||||
|
||||
EOT;
|
||||
|
||||
if($a->profile['name']) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-name-wrapper" >
|
||||
<div id="advanced-profile-name-text">Full Name:</div>
|
||||
<div id="advanced-profile-name">{$a->profile['name']}</div>
|
||||
</div>
|
||||
<div id="advanced-profile-name-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($a->profile['gender']) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-gender-wrapper" >
|
||||
<div id="advanced-profile-gender-text">Gender:</div>
|
||||
<div id="advanced-profile-gender">{$a->profile['gender']}</div>
|
||||
</div>
|
||||
<div id="advanced-profile-gender-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($a->profile['dob']) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-dob-wrapper" >
|
||||
<div id="advanced-profile-dob-text">Birthday:</div>
|
||||
EOT;
|
||||
$o .= '<div id="advanced-profile-dob">'
|
||||
. ((intval($a->profile['dob']))
|
||||
? datetime_convert('UTC',date_default_timezone_get(),$a->profile['dob'],'j F, Y')
|
||||
: datetime_convert('UTC',date_default_timezone_get(),substr($a->profile['dob'],6),'j F'))
|
||||
. "</div>\r\n</div>";
|
||||
|
||||
$o .= '<div id="advanced-profile-dob-end"></div>';
|
||||
|
||||
}
|
||||
|
||||
if($age = age($a->profile['dob'],$a->profile['timezone'],'')) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-age-wrapper" >
|
||||
<div id="advanced-profile-age-text">Age:</div>
|
||||
<div id="advanced-profile-age">$age</div>
|
||||
</div>
|
||||
<div id="advanced-profile-age-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($a->profile['marital']) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-marital-wrapper" >
|
||||
<div id="advanced-profile-marital-text">Status:</div>
|
||||
<div id="advanced-profile-marital">{$a->profile['marital']}</div>
|
||||
</div>
|
||||
<div id="advanced-profile-marital-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($a->profile['sexual']) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-sexual-wrapper" >
|
||||
<div id="advanced-profile-sexual-text">Sexual Preference:</div>
|
||||
<div id="advanced-profile-sexual">{$a->profile['sexual']}</div>
|
||||
</div>
|
||||
<div id="advanced-profile-sexual-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($a->profile['homepage']) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-homepage-wrapper" >
|
||||
<div id="advanced-profile-homepage-text">Homepage:</div>
|
||||
<div id="advanced-profile-homepage">{$a->profile['homepage']}</div>
|
||||
</div>
|
||||
<div id="advanced-profile-homepage-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($a->profile['politic']) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-politic-wrapper" >
|
||||
<div id="advanced-profile-politic-text">Political Leaning:</div>
|
||||
<div id="advanced-profile-politic">{$a->profile['politic']}</div>
|
||||
</div>
|
||||
<div id="advanced-profile-politic-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($a->profile['religion']) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-religion-wrapper" >
|
||||
<div id="advanced-profile-religion-text">Religion:</div>
|
||||
<div id="advanced-profile-religion">{$a->profile['religion']}</div>
|
||||
</div>
|
||||
<div id="advanced-profile-religion-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($txt = bbcode($a->profile['about'])) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-about-wrapper" >
|
||||
<div id="advanced-profile-about-text">About:</div>
|
||||
<br />
|
||||
<div id="advanced-profile-about">$txt</div>
|
||||
</div>
|
||||
<div id="advanced-profile-about-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($txt = bbcode($a->profile['interest'])) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-interest-wrapper" >
|
||||
<div id="advanced-profile-interest-text">Interests/Hobbies:</div>
|
||||
<br />
|
||||
<div id="advanced-profile-interest">$txt</div>
|
||||
</div>
|
||||
<div id="advanced-profile-interest-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($txt = bbcode($a->profile['contact'])) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-contact-wrapper" >
|
||||
<div id="advanced-profile-contact-text">Contact:</div>
|
||||
<br />
|
||||
<div id="advanced-profile-contact">$txt</div>
|
||||
</div>
|
||||
<div id="advanced-profile-contact-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($txt = bbcode($a->profile['music'])) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-music-wrapper" >
|
||||
<div id="advanced-profile-music-text">Music:</div>
|
||||
<br />
|
||||
<div id="advanced-profile-music">$txt</div>
|
||||
</div>
|
||||
<div id="advanced-profile-music-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($txt = bbcode($a->profile['book'])) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-book-wrapper" >
|
||||
<div id="advanced-profile-book-text">Books:</div>
|
||||
<br />
|
||||
<div id="advanced-profile-book">$txt</div>
|
||||
</div>
|
||||
<div id="advanced-profile-book-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($txt = bbcode($a->profile['tv'])) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-tv-wrapper" >
|
||||
<div id="advanced-profile-tv-text">Television:</div>
|
||||
<br />
|
||||
<div id="advanced-profile-tv">$txt</div>
|
||||
</div>
|
||||
<div id="advanced-profile-tv-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($txt = bbcode($a->profile['film'])) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-film-wrapper" >
|
||||
<div id="advanced-profile-film-text">Film:</div>
|
||||
<br />
|
||||
<div id="advanced-profile-film">$txt</div>
|
||||
</div>
|
||||
<div id="advanced-profile-film-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($txt = bbcode($a->profile['romance'])) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-romance-wrapper" >
|
||||
<div id="advanced-profile-romance-text">Romance:</div>
|
||||
<br />
|
||||
<div id="advanced-profile-romance">$txt</div>
|
||||
</div>
|
||||
<div id="advanced-profile-romance-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($txt = bbcode($a->profile['work'])) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-work-wrapper" >
|
||||
<div id="advanced-profile-work-text">work:</div>
|
||||
<br />
|
||||
<div id="advanced-profile-work">$txt</div>
|
||||
</div>
|
||||
<div id="advanced-profile-work-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
||||
if($txt = bbcode($a->profile['education'])) {
|
||||
$o .= <<< EOT
|
||||
<div id="advanced-profile-education-wrapper" >
|
||||
<div id="advanced-profile-education-text">Education:</div>
|
||||
<br />
|
||||
<div id="advanced-profile-education">$txt</div>
|
||||
</div>
|
||||
<div id="advanced-profile-education-end"></div>
|
||||
EOT;
|
||||
}
|
||||
|
103
view/style.css
103
view/style.css
|
@ -548,3 +548,106 @@ input#dfrn-url {
|
|||
background: #FFCCCC;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
|
||||
#advanced-profile-name-wrapper,
|
||||
#advanced-profile-gender-wrapper,
|
||||
#advanced-profile-dob-wrapper,
|
||||
#advanced-profile-age-wrapper,
|
||||
#advanced-profile-marital-wrapper,
|
||||
#advanced-profile-sexual-wrapper,
|
||||
#advanced-profile-homepage-wrapper,
|
||||
#advanced-profile-politic-wrapper,
|
||||
#advanced-profile-religion-wrapper,
|
||||
#advanced-profile-about-wrapper,
|
||||
#advanced-profile-interest-wrapper,
|
||||
#advanced-profile-contact-wrapper,
|
||||
#advanced-profile-music-wrapper,
|
||||
#advanced-profile-book-wrapper,
|
||||
#advanced-profile-tv-wrapper,
|
||||
#advanced-profile-film-wrapper,
|
||||
#advanced-profile-romance-wrapper,
|
||||
#advanced-profile-work-wrapper,
|
||||
#advanced-profile-education-wrapper {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#advanced-profile-name-text,
|
||||
#advanced-profile-gender-text,
|
||||
#advanced-profile-dob-text,
|
||||
#advanced-profile-age-text,
|
||||
#advanced-profile-marital-text,
|
||||
#advanced-profile-sexual-text,
|
||||
#advanced-profile-homepage-text,
|
||||
#advanced-profile-politic-text,
|
||||
#advanced-profile-religion-text,
|
||||
#advanced-profile-about-text,
|
||||
#advanced-profile-interest-text,
|
||||
#advanced-profile-contact-text,
|
||||
#advanced-profile-music-text,
|
||||
#advanced-profile-book-text,
|
||||
#advanced-profile-tv-text,
|
||||
#advanced-profile-film-text,
|
||||
#advanced-profile-romance-text,
|
||||
#advanced-profile-work-text,
|
||||
#advanced-profile-education-text {
|
||||
width: 250px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#advanced-profile-name-end,
|
||||
#advanced-profile-gender-end,
|
||||
#advanced-profile-dob-end,
|
||||
#advanced-profile-age-end,
|
||||
#advanced-profile-marital-end,
|
||||
#advanced-profile-sexual-end,
|
||||
#advanced-profile-homepage-end,
|
||||
#advanced-profile-politic-end,
|
||||
#advanced-profile-religion-end {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#advanced-profile-about-end,
|
||||
#advanced-profile-interest-end,
|
||||
#advanced-profile-contact-end,
|
||||
#advanced-profile-music-end,
|
||||
#advanced-profile-book-end,
|
||||
#advanced-profile-tv-end,
|
||||
#advanced-profile-film-end,
|
||||
#advanced-profile-romance-end,
|
||||
#advanced-profile-work-end,
|
||||
#advanced-profile-education-end {
|
||||
|
||||
|
||||
}
|
||||
|
||||
#advanced-profile-name,
|
||||
#advanced-profile-gender,
|
||||
#advanced-profile-dob,
|
||||
#advanced-profile-age,
|
||||
#advanced-profile-marital,
|
||||
#advanced-profile-sexual,
|
||||
#advanced-profile-homepage,
|
||||
#advanced-profile-politic,
|
||||
#advanced-profile-religion {
|
||||
float: left;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#advanced-profile-about,
|
||||
#advanced-profile-interest,
|
||||
#advanced-profile-contact,
|
||||
#advanced-profile-music,
|
||||
#advanced-profile-book,
|
||||
#advanced-profile-tv,
|
||||
#advanced-profile-film,
|
||||
#advanced-profile-romance,
|
||||
#advanced-profile-work,
|
||||
#advanced-profile-education {
|
||||
margin-top: 10px;
|
||||
margin-left: 50px;
|
||||
margin-right: 20px;
|
||||
padding: 10px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
Loading…
Reference in a new issue