Esempio n. 1
0
 /**
  * @param \User $model
  */
 public static function formatUser(&$model)
 {
     if ($model->avatarInfo == '') {
         $model->avatarInfo = null;
         if ($model->avatar_id) {
             $model->avatarInfo = array('small' => $model->getAvatarUrl(24), 'medium' => $model->getAvatarUrl(40), 'big' => $model->getAvatarUrl(72));
         }
     } else {
         if (!is_array($model->avatarInfo)) {
             $model->avatarInfo = \CJSON::decode($model->avatarInfo, true);
         }
     }
 }
 /**
  * Delete Profile Avatar
  *
  * @param void
  * @return null
  */
 function delete_avatar()
 {
     if ($this->active_user->isNew()) {
         $this->httpError(HTTP_ERR_NOT_FOUND);
     }
     // if
     if (!$this->active_user->canEdit($this->logged_user)) {
         $this->httpError(HTTP_ERR_FORBIDDEN);
     }
     // if
     if ($this->request->isSubmitted()) {
         unlink($this->active_user->getAvatarPath());
         unlink($this->active_user->getAvatarPath(true));
         if ($this->request->isAsyncCall()) {
             $this->serveData(array('message' => lang('Icon successfully removed'), 'icon' => $this->active_user->getAvatarUrl(true)), 'delete', null, FORMAT_JSON);
         } else {
             $this->redirectToUrl($this->active_user->getEditAvatarUrl());
         }
     } else {
         $this->httpError(HTTP_ERR_BAD_REQUEST);
     }
     // if
 }
Esempio n. 3
0
require_once "__inc__.php";
require_once ROOT_PATH . "header.php";
// Lista svilupatori versione mobile
$devs = array("ghostmars919", "ale.gatti96", "qwertj", "Piero Tofy");
$username = join(',', array_map(function ($v) {
    return "'" . $v . "'";
}, $devs));
?>
	<div class="center">
		<img src="/images/eagle.jpg" alt="<?php 
echo SITE_VERSION;
?>
">
		<p><b><?php 
echo SITE_VERSION;
?>
</b></p>
		<p>Si ringrazia per il loro contributo:</p>

		<?php 
$query = exequery(User::SELECT_SQL . "WHERE nickname IN ({$username}) ORDER BY nickname");
while ($row = mysqli_fetch_array($query)) {
    $user_link = new User($row);
    echo "<img class='avatar small' src=" . $user_link->getAvatarUrl() . " alt='avatar'> ";
    echo $user_link->getProfileLink() . "<br/><br/>";
}
?>
	</div>
<?php 
require_once ROOT_PATH . "footer.php";
//var_dump($debug_queries_list);