This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <div class="modal fade" id="changeDB" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> |
||
2 | <div class="modal-dialog"> |
||
3 | <div class="modal-content"> |
||
4 | <div class="modal-header"> |
||
5 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
||
6 | <h4 class="modal-title"><i class="fa fa-pencil"></i> |
||
7 | Switch Database |
||
8 | </h4> |
||
9 | </div> |
||
10 | <section class="task-panel tasks-widget"> |
||
11 | <div class="panel-heading"> |
||
12 | <div class="pull-left"><h5><i class="fa fa-tasks"></i> <?php echo $lang['database'].'s' ?></h5></div> |
||
13 | <br> |
||
14 | </div> |
||
15 | <div class="panel-body"> |
||
16 | <div class="task-content"> |
||
17 | <ul id="sortable" class="task-list ui-sortable"> |
||
18 | <?php |
||
19 | $sql = 'SELECT `sid`,`dbid`,`type`,`name` FROM `servers`;'; |
||
20 | $result_of_query = $db_connection->query($sql); |
||
21 | |||
22 | View Code Duplication | if ($result_of_query->num_rows > 1) { |
|
0 ignored issues
–
show
|
|||
23 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
||
24 | if ($row['type'] == 'life') { |
||
25 | ?> |
||
26 | <li class="list-primary"> |
||
27 | <i class=" fa fa-ellipsis-v"></i> |
||
28 | |||
29 | <div class="task-title"> |
||
30 | <span class="task-title-sp"><?php echo $row['name']; ?></span> |
||
31 | <span class="badge bg-theme">Life</span> |
||
32 | |||
33 | <div class="pull-right hidden-phone"> |
||
34 | <form method="post" action="<?php echo $settings['url'] ?>dashboard"> |
||
35 | <input type="hidden" name="type" |
||
36 | value="<?php echo $row['type']; ?>"> |
||
37 | <input type="hidden" name="dbid" |
||
38 | value="<?php echo $row['dbid']; ?>"> |
||
39 | <button class="btn btn-success btn-sm fa fa-eye" |
||
40 | type="submit" style="margin-right: 8px; margin-bottom: 15px;"></button> |
||
41 | </form> |
||
42 | </div> |
||
43 | </div> |
||
44 | </li> |
||
45 | <?php |
||
46 | |||
47 | } elseif ($row['type'] == 'waste') { |
||
48 | ?> |
||
49 | <li class="list-danger"> |
||
50 | <i class=" fa fa-ellipsis-v"></i> |
||
51 | |||
52 | <div class="task-title"> |
||
53 | <span class="task-title-sp"><?php echo $row['name']; ?></span> |
||
54 | <span class="badge bg-important">Wasteland</span> |
||
55 | |||
56 | <div class="pull-right hidden-phone"> |
||
57 | <form method="post" action="<?php echo $settings['url'] ?>dashboard"> |
||
58 | <input type="hidden" name="type" |
||
59 | value="<?php echo $row['type']; ?>"> |
||
60 | <input type="hidden" name="dbid" |
||
61 | value="<?php echo $row['dbid']; ?>"> |
||
62 | <button class="btn btn-success btn-sm fa fa-eye" |
||
63 | type="submit" style="margin-right: 8px; margin-bottom: 15px;"></button> |
||
64 | </form> |
||
65 | </div> |
||
66 | </li> |
||
67 | <?php |
||
68 | |||
69 | } |
||
70 | } |
||
71 | echo '</select>'; |
||
72 | } |
||
73 | ?> |
||
74 | </ul> |
||
75 | </div> |
||
76 | </div> |
||
77 | </section> |
||
78 | </div> |
||
79 | </div> |
||
80 | </div> |
||
81 | <script async src="<?php echo $settings['url'] ?>assets/js/main.min.js"></script> |
||
82 | <?php if (isset($_SESSION['forum_lang'])) { |
||
83 | echo '<script async type="text/javascript" src="'.$settings['url'].'assets/js/language/'.$_SESSION['forum_lang'].'.js"></script>'; |
||
84 | } ?> |
||
85 | <script> |
||
86 | function searchpage() { |
||
87 | sn = document.getElementById('searchText').value; |
||
88 | redirecturl = '<?php echo $settings['url'].$currentPage?>/' + sn; |
||
89 | document.location.href = redirecturl; |
||
90 | } |
||
91 | </script> |
||
92 | <script type="text/javascript"> |
||
93 | $('#myTab a').click(function (e) { |
||
94 | if ($(this).parent('li').hasClass('active')) { |
||
95 | var target_pane = $(this).attr('href'); |
||
96 | $(target_pane).toggle(!$(target_pane).is(":visible")); |
||
97 | } |
||
98 | }); |
||
99 | </script> |
||
100 | <?php |
||
101 | if ($page == 'views/life/dashboard.php' && $settings['lifeVersion'] == 4 || $settings['lifeVersion'] == 5) { |
||
102 | ?> |
||
103 | <!--Load the AJAX API--> |
||
104 | <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> |
||
105 | <script type="text/javascript"> |
||
106 | // Load the Visualization API and the corechart package. |
||
107 | google.charts.load('current', {'packages':['corechart']}); |
||
108 | |||
109 | // Set a callback to run when the Google Visualization API is loaded. |
||
110 | google.charts.setOnLoadCallback(drawChart); |
||
111 | |||
112 | // Callback that creates and populates a data table, |
||
113 | // instantiates the pie chart, passes in the data and |
||
114 | // draws it. |
||
115 | function drawChart() { |
||
116 | |||
117 | // Create the data table. |
||
118 | var data = new google.visualization.DataTable(); |
||
119 | data.addColumn('string', 'Date'); |
||
120 | data.addColumn('number', 'New Players'); |
||
121 | data.addRows([ |
||
122 | <?php |
||
123 | $sql = 'SELECT DATE(`players`.`insert_time`) AS `date`, COUNT(`players`.`uid`) AS `count` FROM `players` GROUP BY `date` ORDER BY `date`'; |
||
124 | $result_of_query = $db_link->query($sql); |
||
125 | $total_records = mysqli_num_rows($result_of_query); |
||
126 | $i = 1; |
||
127 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
||
128 | if ($i < $total_records) { |
||
129 | echo "['".$row['date']."', ".$row['count'].'],'; |
||
130 | } else { |
||
131 | echo "['".$row['date']."', ".$row['count'].']'; |
||
132 | } |
||
133 | ++$i; |
||
134 | } ?> |
||
135 | ]); |
||
136 | |||
137 | // Set chart options |
||
138 | var options = { |
||
139 | 'title':'', |
||
140 | 'width':document.getElementById('player_data_chart').offsetWidth, |
||
141 | 'height':document.getElementById('player_data_chart').offsetheight |
||
142 | }; |
||
143 | |||
144 | // Instantiate and draw our chart, passing in some options. |
||
145 | var chart = new google.visualization.BarChart(document.getElementById('player_data_chart')); |
||
146 | chart.draw(data, options); |
||
147 | } |
||
148 | </script> |
||
149 | <?php |
||
150 | |||
151 | } |
||
152 | ?> |
||
153 | <?php |
||
154 | View Code Duplication | foreach ($settings['plugins'] as &$plugin) { |
|
0 ignored issues
–
show
This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
155 | if (file_exists('plugins/'.$plugin.'/assets/scripts.js')) { |
||
156 | echo '<script type="text/javascript" src="'.$settings['url'].'plugins/'.$plugin.'/assets/scripts.js"></script>'; |
||
157 | } |
||
158 | } |
||
0 ignored issues
–
show
|
|||
159 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.