1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
|
<?php
// ************************************************************************************//
// * WoltLab Burning Board 2
// ************************************************************************************//
// * Copyright (c) 2001-2004 WoltLab GmbH
// * Web http://www.woltlab.de/
// * License http://www.woltlab.de/products/burning_board/license_en.php
// * http://www.woltlab.de/products/burning_board/license.php
// ************************************************************************************//
// * WoltLab Burning Board 2 is NOT free software.
// * You may not redistribute this package or any of it's files.
// ************************************************************************************//
// * $Date: 2006-01-23 14:56:30 +0100 (Mon, 23 Jan 2006) $
// * $Author: Burntime $
// * $Rev: 1689 $
// ************************************************************************************//
require('./global.php');
$lang->load('REGISTER,ACP_USERS,POSTINGS,MEMBERS');
if (isset($_REQUEST['action'])) $action = $_REQUEST['action'];
else $action = "find";
function daynumber($time) {
global $wbbuserdata;
$daynumber = intval(date('w', $time)) - $wbbuserdata['startweek'];
if ($daynumber < 0) $daynumber = 7 + $daynumber;
return $daynumber;
}
/* add a new useraccount */
if ($action == "add") {
checkAdminPermissions("a_can_users_add", 1);
// form has been sent
if (isSet($_POST['send'])) {
// most important data
if (isSet($_POST['username'])) $username = $_POST['username'];
else $username = '';
if (isSet($_POST['email'])) $email = $_POST['email'];
else $email = '';
if (isSet($_POST['password'])) $password = $_POST['password'];
else $password = '';
if (isSet($_POST['groupids']) && is_array($_POST['groupids'])) $groupids = intval_array($_POST['groupids']);
else $groupids = array();
$username = preg_replace("/\s{2,}/", " ", $username);
// other data
if (isSet($_POST['field'])) $field = $_POST['field'];
else $field = array();
if (isSet($_POST['dayfield'])) $dayfield = $_POST['dayfield'];
else $dayfield = array();
if (isSet($_POST['monthfield'])) $monthfield = $_POST['monthfield'];
else $monthfield = array();
if (isSet($_POST['yearfield'])) $yearfield = $_POST['yearfield'];
else $yearfield = array();
// signature options
if (isSet($_POST['disablesmilies'])) $disablesmilies = $_POST['disablesmilies'];
else $disablesmilies = 0;
if (isSet($_POST['disablehtml'])) $disablehtml = $_POST['disablehtml'];
else $disablehtml = 0;
if (isSet($_POST['disablebbcode'])) $disablebbcode = $_POST['disablebbcode'];
else $disablebbcode = 0;
if (isSet($_POST['disableimages'])) $disableimages = $_POST['disableimages'];
else $disableimages = 0;
if (isSet($_POST['title'])) $title = $_POST['title'];
else $title = '';
if (isSet($_POST['homepage'])) $homepage = $_POST['homepage'];
else $homepage = '';
if (isSet($_POST['icq'])) $icq = intval(str_replace("-", "", wbb_trim($_POST['icq'])));
else $icq = '';
if (isSet($_POST['aim'])) $aim = $_POST['aim'];
else $aim = '';
if (isSet($_POST['msn'])) $msn = $_POST['msn'];
else $msn = '';
if (isSet($_POST['yim'])) $yim = $_POST['yim'];
else $yim = '';
if (isSet($_POST['day'])) $day = intval($_POST['day']);
else $day = '';
if (isSet($_POST['month'])) $month = intval($_POST['month']);
else $month = '';
if (isSet($_POST['year'])) $year = intval($_POST['year']);
else $year = '';
if (isSet($_POST['gender'])) $gender = intval($_POST['gender']);
else $gender = 0;
if (isSet($_POST['usertext'])) $usertext = $_POST['usertext'];
else $usertext = '';
if (isSet($_POST['signature'])) $signature = $_POST['signature'];
else $signature = '';
if (isSet($_POST['rankgroupid'])) $rankgroupid = intval($_POST['rankgroupid']);
else $rankgroupid = 0;
if (isSet($_POST['useronlinegroupid'])) $useronlinegroupid = intval($_POST['useronlinegroupid']);
else $useronlinegroupid = 0;
|