-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathusers_run.php
More file actions
52 lines (47 loc) · 2.02 KB
/
Copy pathusers_run.php
File metadata and controls
52 lines (47 loc) · 2.02 KB
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
<?
/***************************************************************************
* users_run.php
* -------------------
* begin : Monday, Mar 31, 2008
* copyright : (C) 2008 J. David Baker
* email : me@jdavidbaker.com
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
include "includes/classes.inc.php";
// Admin only!
if ($login->is_admin()) {
if (is_array($_POST['team_id'])) {
foreach($_POST['team_id'] as $team_id) {
$team = new team($team_id);
if ($_POST['has_password'][$team_id]) {
$team->set_has_password();
} else {
$team->clear_password();
}
$team->set_autopick($_POST['team_autopick'][$team_id]);
$team->set_autopick_method($_POST['pick_method_id'][$team_id]);
$team->set_clock_adj($_POST['team_clock_adj'][$team_id]);
$team->set_draft_admin($_POST['draft_admin'][$team_id]);
if (strlen(trim($_POST['team_email'][$team_id]))>3 && preg_match("/[a-zA-Z0-9._%-]+@[a-zA-Z0-9._%-]+\.[a-zA-Z]{2,4}/", $_POST['team_email'][$team_id])) {
$team->set_team_email($_POST['team_email'][$team_id]);
}
$team->set_team_owner($_POST['team_owner'][$team_id]);
if ( strlen($_POST['team_user_link'][$team_id])>3 )
$team->set_team_user_link($_POST['team_user_link'][$team_id]);
else
$team->set_team_user_link(' ');
}
}
}
// May have updated the pick list by turning autopick on
process_pick_queue();
header("Location: users.php");
?>