Просмотр файла wu-engine/wu-actions/acc_avatar_del.php

Размер файла: 504B
<?php
require_once('../wu_init.php');
if (!wu_token()) { exit('wu-error'); }
if (!USER_LOGGED) { exit('wu-error'); }

$nav = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT uid,av FROM ".DB_PREFIX."_users WHERE uid='$u_id' LIMIT 1"));
unlink('../../wu-uploads/avatars/full/'.$nav['av']);
unlink('../../wu-uploads/avatars/thumbs/'.$nav['av']);
wu_log_act(1, 'Удалил аватар');
mysqli_query($connect_db, "UPDATE `".DB_PREFIX."_users` SET `av` = '' WHERE uid='$u_id' LIMIT 1");
exit('1');
?>