-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbosstracking.php
92 lines (81 loc) · 4.2 KB
/
bosstracking.php
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
<?php
/***************************************************************************
* bosstracking.php
* -------------------
* begin : Monday, June 8, 2009
* copyright : (C) 2007-2009 Douglas Wagner
* email : [email protected]
*
***************************************************************************/
/***************************************************************************
*
* WoW Raid Manager - Raid Management Software for World of Warcraft
* Copyright (C) 2007-2009 Douglas Wagner
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
****************************************************************************/
// commons
define("IN_PHPRAID", true);
require_once('./common.php');
// page authentication
define("PAGE_LVL","anonymous");
require_once("includes/authentication.php");
// Form Display
if($_GET['mode'] == 'view')
{
$sql = "SELECT * FROM " . $phpraid_config['db_prefix'] . "boss_kill_type WHERE def='1'";
$result = $db_raid->sql_query($sql) or print_error($sql, $db_raid->sql_error(), 1);
$data = $db_raid->sql_fetchrow($result, true);
isset($_GET['boss_kill_type']) ? $boss_kill_type_id = scrub_input($_GET['boss_kill_type']) : $boss_kill_type_id = $data['boss_kill_type_id'];
isset($_GET['event_type_id']) ? $event_type_id = scrub_input($_GET['event_type_id']) : $event_type_id = $data['event_type_id'];
isset($_GET['max']) ? $max = scrub_input($_GET['max']) : $max = $data['max'];
// Setup Event Type Select Box.
$bosskillselect = '<select name="boss_kill_type" id="boss_kill_type" class="post" onChange="MM_jumpMenu(\'parent\',this,0)">
<option value=""></option>';
$sql = "SELECT * FROM " . $phpraid_config['db_prefix'] . "boss_kill_type";
$result = $db_raid->sql_query($sql) or print_error($sql, $db_raid->sql_error(), 1);
while($data = $db_raid->sql_fetchrow($result, true))
{
// Event Type for WoW Calendar
if ($boss_kill_type_id != '' && $data['boss_kill_type_id'] == $boss_kill_type_id)
$bosskillselect .= '<option value="bosstracking.php?mode=view&boss_kill_type='.$data['boss_kill_type_id'].'&event_type_id='.$data['event_type_id'].'&max='.$data['max'].'" selected>' . $phprlang[$data['boss_kill_type_lang_id']] . '</option>';
elseif ($boss_kill_type_id == '' && $data['boss_kill_type_id'] == 1)
$bosskillselect .= '<option value="bosstracking.php?mode=view&boss_kill_type='.$data['boss_kill_type_id'].'&event_type_id='.$data['event_type_id'].'&max='.$data['max'].'" selected>' . $phprlang[$data['boss_kill_type_lang_id']] . '</option>';
else
$bosskillselect .= '<option value="bosstracking.php?mode=view&boss_kill_type='.$data['boss_kill_type_id'].'&event_type_id='.$data['event_type_id'].'&max='.$data['max'].'">' . $phprlang[$data['boss_kill_type_lang_id']] . '</option>';
}
$bosskillselect .= '</select>';
// End Event Type Setup
// Create the Instance List Dropdown
$sql = sprintf("SELECT * FROM " . $phpraid_config['db_prefix'] . "events WHERE event_type_id=%s AND max LIKE %s", quote_smart($event_type_id), quote_smart($max));
$result = $db_raid->sql_query($sql) or print_error($sql, $db_raid->sql_error(), 1);
while($data = $db_raid->sql_fetchrow($result, true))
{
//Fill in dropdown that again refreshes page.
}
}
$wrmsmarty->assign('bosstracking_new',
array(
'newbosskill_header' => $phprlang['bosskill_header'],
'bosskill_type' => $bosskillselect,
)
);
//
// Start output of page
//
require_once('includes/page_header.php');
$wrmsmarty->display('bosstracking.html');
require_once('includes/page_footer.php');
?>