1515 require "lgsl_language.php " ;
1616 $ lang = new Lang ($ _COOKIE ['lgsl_lang ' ] ?? Lang::EN );
1717 global $ output ;
18+ $ config = new Config ();
1819
1920 $ type = $ _GET ['type ' ] ?? '' ;
2021 $ game = $ _GET ['game ' ] ?? '' ;
2122 $ mode = $ _GET ['mode ' ] ?? '' ;
22- $ sort = $ _GET ['sort ' ] ?? '' ;
23+ $ sort = $ _GET ['sort ' ] ?? $ config [ ' sort ' ][ ' servers ' ] ;
2324 $ order = (isset ($ _GET ['order ' ]) ? $ _GET ['order ' ] == "ASC " ? "DESC " : 'ASC ' : "ASC " );
2425
25- $ page = ($ lgsl_config ['pagination_mod ' ] && isset ($ _GET ['page ' ]) ? (int )$ _GET ['page ' ] : 1 );
26+ $ page = ($ config ['pagination_mod ' ] && isset ($ _GET ['page ' ]) ? (int )$ _GET ['page ' ] : 1 );
2627
2728 $ uri = $ _SERVER ['REQUEST_URI ' ];
2829
29- if ($ lgsl_config ['preloader ' ]) {
30+ if ($ config ['preloader ' ]) {
3031 $ uri = $ _SERVER ['HTTP_REFERER ' ];
3132 }
3233
4748 <table id='server_list_table'>
4849 <tr id='server_list_table_top'>
4950 <th class='status_cell'> {$ lgsl_config ['text ' ]['sts ' ]}:</th>
50- <th class='connectlink_cell'><a href=' {$ ipsort }'> {$ lgsl_config ['text ' ]['adr ' ]}:</a></th>
51- <th class='servername_cell'><a href=' {$ namesort }'> {$ lgsl_config ['text ' ]['tns ' ]}:</a></th>
52- <th class='map_cell'><a href=' {$ mapsort }'> {$ lgsl_config ['text ' ]['map ' ]}:</a></th>
53- <th class='players_cell'><a href=' {$ playersort }'> {$ lgsl_config ['text ' ]['plr ' ]}:</a></th>
54- <th class='details_cell'> {$ lgsl_config ['text ' ]['dtl ' ]}:</th>
51+ <th class='connectlink_cell'><a href=' {$ ipsort }'> {$ config ['text ' ]['adr ' ]}:</a></th>
52+ <th class='servername_cell'><a href=' {$ namesort }'> {$ config ['text ' ]['tns ' ]}:</a></th>
53+ <th class='map_cell'><a href=' {$ mapsort }'> {$ config ['text ' ]['map ' ]}:</a></th>
54+ <th class='players_cell'><a href=' {$ playersort }'> {$ config ['text ' ]['plr ' ]}:</a></th>
55+ <th class='details_cell'> {$ config ['text ' ]['dtl ' ]}:</th>
5556 </tr> " ;
5657
5758 foreach ($ server_list as $ server ) {
6263 <tr class='server_ {$ server ->getStatus ()}'>
6364
6465 <td class='status_cell'>
65- <span title=' {$ lgsl_config ['text ' ][$ server ->getStatus ()]} | {$ lgsl_config ['text ' ]['lst ' ]}: {$ lastupd }' class='status_icon_ {$ server ->getStatus ()}'></span>
66+ <span title=' {$ config ['text ' ][$ server ->getStatus ()]} | {$ config ['text ' ]['lst ' ]}: {$ lastupd }' class='status_icon_ {$ server ->getStatus ()}'></span>
6667 <a href=' {$ gamelink }'>
6768 <img alt=' {$ server ->getName ()}' src=' {$ server ->addUrlPath ($ server ->getGameIcon ())}' title=' {$ server ->getGameFormatted ()}' class='game_icon' />
6869 </a>
6970 </td>
7071
71- <td title=' {$ lgsl_config ['text ' ]['slk ' ]}' class='connectlink_cell'>
72+ <td title=' {$ config ['text ' ]['slk ' ]}' class='connectlink_cell'>
7273 <a href=' {$ server ->getConnectionLink ()}'>
7374 {$ server ->getAddress ()}
7475 </a>
117118 $ output .= "
118119 </table> " ;
119120
120- if ($ lgsl_config ['pagination_mod ' ] && ((int )($ servers / $ lgsl_config ['pagination_lim ' ]) > 0 || $ page > 1 )) {
121+ if ($ config ['pagination_mod ' ] && ((int )($ servers / $ config ['pagination_lim ' ]) > 0 || $ page > 1 )) {
121122 $ output .= "
122123 <div id='pages'>
123124 " . ($ page > 1 ? "<a href=' " . LGSL ::buildLink ($ uri , ["page " => $ page - 1 ]) . "'> < </a> " : "" ) . "
124- <span> {$ lgsl_config ['text ' ]['pag ' ]} {$ page }</span>
125- " . ($ servers < $ lgsl_config ['pagination_lim ' ] ?
125+ <span> {$ config ['text ' ]['pag ' ]} {$ page }</span>
126+ " . ($ servers < $ config ['pagination_lim ' ] ?
126127 "" :
127128 (isset ($ _GET ['page ' ]) ?
128129 "<a href=' " . LGSL ::buildLink ($ uri , ["page " => $ page + 1 ]) . "'> > </a> " :
136137
137138 $ output .= "
138139 <div id='totals'>
139- <div> {$ lgsl_config ['text ' ]['tns ' ]}: {$ total ['servers ' ]} </div>
140- <div> {$ lgsl_config ['text ' ]['tnp ' ]}: {$ total ['players ' ]} </div>
141- <div> {$ lgsl_config ['text ' ]['tmp ' ]}: {$ total ['playersmax ' ]} </div>
140+ <div> {$ config ['text ' ]['tns ' ]}: {$ total ['servers ' ]} </div>
141+ <div> {$ config ['text ' ]['tnp ' ]}: {$ total ['players ' ]} </div>
142+ <div> {$ config ['text ' ]['tmp ' ]}: {$ total ['playersmax ' ]} </div>
142143 </div> " ;
143144 }
144145
147148//------ WANNA BE HERE? https://github.com/tltneon/lgsl/wiki/Who-uses-LGSL -> LET CREDITS STAY :P --------------------------------------------------------------------------------------------------+
148149 $ output .= "<div style='text-align:center; font-family:tahoma; font-size:9px; padding: 33px 0px 11px 0px;'><a href='https://github.com/tltneon/lgsl' style='text-decoration:none'> " .lgsl_version ()."</a></div> " ;
149150//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
150- if ($ lgsl_config ['preloader ' ])
151+ if ($ config ['preloader ' ])
151152 echo $ output ;
0 commit comments