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

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

if(isset($_POST['usr']) && isset($_POST['login']) && isset($_POST['tomail'])){
if(!empty($_POST['login'])){
$usr = intval($_POST['usr']);
$tomail = intval($_POST['tomail']);
$login = mysqli_real_escape_string($connect_db, trim($_POST['login']));
$mail = mysqli_real_escape_string($connect_db, trim($_POST['mail']));
if($_POST['mailver'] == 'true') { $mailver = 1; } else { $mailver = 0; }

mysqli_query($connect_db, "UPDATE `".DB_PREFIX."_users` SET `log` = '$login', `mail` = '$mail', `mailver` = '$mailver', `tomail` = '$tomail' WHERE uid = '$usr' LIMIT 1");

exit('1');
} else { exit('0'); }
} else { exit('wu-error'); }
?>