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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212
| <?php
/**
* user_profile VIEW
*
* ~/application/modules/members/views/user_profile.view.php
*
*/
debug_eon('user_profile.view.php','gpn');
if(ENV == 'dev'){
echo '<br /><br /> personal :';
print_r($personal);
}
?>
<?php if($_SESSION['nick'] == $_GET['user']){ ?>
<form id="modification_form" method="post" action="<?php echo URL_ROOT; ?>modify_profile">
<input type="hidden" name="id" value="<?php echo $_SESSION['id'];?>">
<?php }else{?>
<div id="modification_form">
<?php }?>
<h2>
<img id="avatar" src="<?php echo URL_AVATARS.urlencode($avatar); ?>" alt="<?php echo $username; ?>'s avatar" />
<?php echo $username; ?>
</h2>
<div id="profile">
<?php
// list the notifications with in a list :<ul class="notifications">
// and the errors in a list : <ul class="errors">
list_notifications();
?>
<!-- ========================= savage_datas ========================== -->
<dl id="savage_datas" class="profile_label">
<dt>eon title : </dt><dd><?php echo $eon_title; ?><br /></dd>
<?php if (!empty($element)){?>
<dt>element : </dt><dd><?php echo $element; ?><br /></dd>
<?php }?>
<?php
// visitor is the profile 's member :
if($_SESSION['nick'] == $_GET['user']){
?>
<dt id="active_player" class="modif_hover m_form">
<label for = "active_player">status : </label>
</dt>
<dd class="m_form">
<label for = "active_player"><span class="data">
<?php if($active_player){ ?>
<img src="<?php echo URL_ICONS;?>yes.png" alt="yes" title="active" class="active" /> player is active
<?php }else{ ?>
<img src="<?php echo URL_ICONS;?>no.png" alt="no" title="non active" class="active" /> player isn't active
<?php } ?>
</span></label>
</dd>
<dd class="checkbox_div m_modif">
<label for = "active_player" class="checkbox" >Switch :</label>
<?php if(!$active_player){ ?>
<input type="checkbox" name="active_player[<?php echo $_SESSION['id'];?>]" id="active_player" value="1" class="checkbox" title="Enable player, you can validate with Enter" />
<?php } else { ?>
<input type="checkbox" name="active_player[<?php echo $_SESSION['id'];?>]" id="active_player" value="0" class="checkbox" title="Disable player, you can validate with Enter" />
<?php } ?>
</dd>
</dl>
<?php
// visitor isn't the profile's member :
}else{
?>
<dt id="active_player" >status : </dt>
<dd>
<?php if($active_player){ ?>
<img src="<?php echo URL_ICONS;?>yes.png" alt="yes" title="active" class="active" /> player is active
<?php }else{ ?>
<img src="<?php echo URL_ICONS;?>no.png" alt="no" title="non active" class="active" /> player isn't active
<?php } ?>
</dd>
</dl>
<?php } ?>
<!-- fin savage_datas -->
<!-- ========================= personal_datas ========================== -->
<?php
// visitor is a member
if ((isset($_SESSION['rank']) && $_SESSION['rank'] < 25) && $_SESSION['nick'] != $_GET['user']) {
?>
<dl id="personal_datas" class="profile_label">
<?php
foreach($personal as $key => $value){
if (!empty($value)){
?>
<!-- list all the personal datas in this ul -->
<dt><?php echo $key;?> : </dt>
<dd><?php echo $value;?><br /></dd>
<?php
}
}
?>
</dl>
<?php
// visitor is the profile member
} else if ($_SESSION['nick'] == $_GET['user']) {
?>
<dl id="personal_datas" class="profile_label">
<?php
foreach($personal as $key => $value){
if (!empty($value)){
?>
<dt id="<?php echo $key;?>" class="m_form modify_form modif_hover">
<label for = "personal[<?php echo $key;?>]" >
<?php echo $key;?> :
</label>
</dt>
<dd class="m_form">
<label for = "personal[<?php echo $key;?>]" >
<span class="data"><?php echo $value;?></span>
</label>
</dd>
<dd class="m_modif">
<input type="text" name="personal[<?php echo $key;?>][<?php echo $_SESSION['id'];?>]" id="personal[<?php echo $key;?>]"
value="Your new <?php echo $key;?>..." title="Change your <?php echo $key;?>, you can validate with Enter" />
</dd>
<br />
<?php
}
}
?>
</dl>
<?php
}
?>
<!-- fin personal_datas -->
<!-- ========================= admin_datas ========================== -->
<?php
// visitor is an admin :
if (isset($_SESSION['rank']) && $_SESSION['rank'] <= 5) {
?>
<dl id="admin_datas" class="profile_label">
<dt>first email registered : </dt><dd><?php echo $email_first; ?><br /></dd>
<dt>rank : </dt><dd><?php echo $rank; ?><br /></dd>
<dt>last ip recorded: </dt><dd><?php echo $last_ip; ?><br /></dd>
<dt>date of the last visit : </dt><dd><?php echo $last_visit; ?><br /></dd>
<dt>subscription date : </dt><dd><?php echo $subscription; ?><br /></dd>
</dl>
<?php }?>
<!-- fin admin_datas -->
<!-- ========================= about ========================== -->
<dl id="about_dl">
<?php if(!empty($about)){?>
<?php if($_SESSION['nick'] == $_GET['user']){ ?>
<dt id="about_dt"><label for = "p_about" > about : </label></dt>
<?php }else{?>
<dt id="about_dt"><label for = "p_about" > about : </label></dt>
<?php }?>
<?php if(get_misc_byname($_GET['user'],'rank') == 25){ ?>
<dd><div id="p_about" class="data"><?php echo Security::html(stripslashes($about)); ?></div></dd>
<?php }else{?>
<dd><div id="p_about" class="data"><?php echo stripslashes($about); ?></div></dd>
<?php }?>
<?php }?>
<?php
if($_SESSION['nick'] == $_GET['user']){
if(!empty($about)){
?>
<dd>
<dt class="m_form modify_hover"><label for = "about" > Modify your presentation</label></dt>
<dd class="m_modif"><textarea id="about" name="about" title="Change your presentation"><?php echo stripslashes($about); ?></textarea></dd>
</dd>
<?php
}else{
?>
<dd>
<dt class="m_form modify_hover"><label for = "about" > Add a presentation</label></dt>
<dd class="m_modif"><textarea id="about" name="about" title="Change your presentation"><?php echo stripslashes($about); ?></textarea></dd>
</dd>
<?php
}
}
?>
</dl>
<!-- fin about -->
<?php if($_SESSION['nick'] == $_GET['user']){ ?>
<input type="submit" value="Modify your infos" />
<div class="spacer"> </div>
</div>
</form>
<?php }else{?>
<div class="spacer"> </div>
</div>
</div> <!-- fin div id="modification_form" -->
<?php }?> |
Partager