//
require_once "backend/functions.php";
dbconn();
loggedinonly();
if ($CURUSER["edit_users"] != "yes") {
    show_error_msg(T_("ACCESS_DENIED"), T_("YOU_DONT_HAVE_EDIT_USER_PERM"), 1);
}
$action = $_POST["action"];
if (!$action) {
    show_error_msg(T_("ERROR"), T_("TASK_NOT_FOUND"), 1);
}
if ($action == 'edituser') {
    $userid = $_POST["userid"];
    $title = sqlesc($_POST["title"]);
    $downloaded = strtobytes($_POST["downloaded"]);
    $uploaded = strtobytes($_POST["uploaded"]);
    $signature = sqlesc($_POST["signature"]);
    $avatar = strip_tags($_POST["avatar"]);
    $ip = sqlesc($_POST["ip"]);
    $class = (int) $_POST["class"];
    $donated = (double) $_POST["donated"];
    $password = $_POST["password"];
    $warned = sqlesc($_POST["warned"]);
    $forumbanned = sqlesc($_POST["forumbanned"]);
    $modcomment = sqlesc($_POST["modcomment"]);
    $enabled = sqlesc($_POST["enabled"]);
    $invites = (int) $_POST["invites"];
    $class = (int) $_POST["class"];
    $email = $_POST["email"];
    if (!is_valid_id($userid)) {
        show_error_msg(T_("EDITING_FAILED"), T_("INVALID_USERID"), 1);
Beispiel #2
0
function import_form()
{
    $max = ini_get('upload_max_filesize');
    echo '
<form name="ImportForm" id="ImportForm" action="index.php" method="post" onsubmit="return xoopsFormValidate_ImportForm();" enctype="multipart/form-data">
<div>' . _AM_PKG_FILEIMPORT . '
  <input name="MAX_FILE_SIZE" value="' . strtobytes($max) . '" type="hidden">
  <input name="file" id="file" type="file" size="30">
  <input class="formButton" name="import" id="import" value="' . _GO . '" type="submit">
  ' . _AM_IMPORT_FILE_MAX . ' ' . $max . ' ' . _AM_BYTES . '
</div>
</form>

<!-- Start Form Vaidation JavaScript //-->
<script type="text/javascript">
<!--//
function xoopsFormValidate_ImportForm() {
    myform = window.document.ImportForm;
    if (myform.file.value=="") {
        window.alert("ファイルを指定してください");
        myform.file.focus();
        return false;
    }
    return true;
}
//--></script>';
    return;
}