<?php

if (!defined('PARENT')) {
  msw403();
}

$data = array();

//=========================
// INSTALL USER
//=========================

$q = mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO `" . DB_PREFIX . "users` (
`id`, `ts`, `name`, `email`, `accpass`, `signature`, `notify`, `pageAccess`, `emailSigs`, `notePadEnable`, `delPriv`, `helplink`
) VALUES (
1, UNIX_TIMESTAMP(), '" . mswSafeImportString($_POST['user']) . "', '" . mswSafeImportString($_POST['email']) . "',
'" . mswEncrypt(SECRET_KEY . $_POST['pass']) . "', '', 'yes', '', 'no', 'yes', 'yes', 'yes'
)");

if (!$q) {
  $data[] = DB_PREFIX . 'users';
  mswlogDBError(DB_PREFIX . 'users', ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)), ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_errno($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_errno()) ? $___mysqli_res : false)), __LINE__, __FILE__, 'Insert');
}

?>