-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbpa_set.php
More file actions
44 lines (37 loc) · 1.49 KB
/
Copy pathbpa_set.php
File metadata and controls
44 lines (37 loc) · 1.49 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
<?
/***************************************************************************
* bpa_set.php
* -------------------
* begin : Monday, Apr 7, 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";
if(is_array($_POST['bpa_priority'])) {
foreach($_POST['bpa_priority'] as $bpa_id=>$bpa_priority) {
$statement = "update bpa set bpa_priority = '$bpa_priority'
where team_id = '".$_SESSION["selected_team_id"]."' and bpa_id = '$bpa_id'";
mysql_query($statement);
}
}
// Delete any?
if (is_array($_POST['delete'])) {
foreach($_POST['delete'] as $bpa_id) {
$statement = "delete from bpa where team_id = '".$_SESSION["selected_team_id"]."' and bpa_id = '$bpa_id'";
mysql_query($statement);
}
}
// Process the queue
process_pick_queue();
$_SESSION['message'] = "Priority set successfully.";
header("Location: ".$_SESSION["origURL"]);
?>