-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdevice.php
More file actions
82 lines (66 loc) · 2.37 KB
/
Copy pathdevice.php
File metadata and controls
82 lines (66 loc) · 2.37 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
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
<?php
// 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.
//
// File: device.php
include ("config/config.php");
include ("languages/$langdir/lang_report.inc");
include ("languages/$langdir/lang_device.inc");
$title = $l_device_title;
if (checklogin() or $tournament_setup_access == 1)
{
$template_object->enable_gzip = 0;
include ("footer.php");
die();
}
$templatename = "master_template/";
include ("header.php");
$template_object->assign("title", $title);
$template_object->assign("templatename", $templatename);
$template_object->assign("l_device_expl", $l_device_expl);
$template_object->assign("l_device", $l_device);
$template_object->assign("l_qty", $l_qty);
$template_object->assign("l_usage", $l_usage);
$template_object->assign("l_mines", $l_mines);
$template_object->assign("dev_torps", NUMBER($shipinfo['torps']));
$template_object->assign("l_fighters", $l_fighters);
$template_object->assign("dev_fighters", NUMBER($shipinfo['fighters']));
$devicename = array();
$deviceamount = array();
$deviceclass = array();
$deviceprogram = array();
$count = 0;
foreach ($shipdevice as $key => $data)
{
if($data['class'] == "dev_probes" && $allow_probes == 0)
{
//
}
else
{
$deviceprogram[$count] = $data['program'];
$deviceclass[$count] = $data['class'];
$deviceamount[$count] = NUMBER($data['amount']);
$device_type = $deviceclass[$count];
if(!class_exists($device_type)){
include ("class/devices/" . $device_type . ".inc");
}
$deviceobject = new $device_type();
$deviceamount[$count] = $deviceobject->device_code();
$devicename[$count] = $deviceobject->classname;
$count++;
}
}
$template_object->assign("deviceprogram", $deviceprogram);
$template_object->assign("deviceclass", $deviceclass);
$template_object->assign("devicename", $devicename);
$template_object->assign("deviceamount", $deviceamount);
$template_object->assign("l_yes", $l_yes);
$template_object->assign("l_no", $l_no);
$template_object->assign("title", $title);
$template_object->assign("gotomain", $l_global_mmenu);
$template_object->display("master_template/device.tpl");
include ("footer.php");
?>