Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions includes/form_table_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,30 +56,32 @@
}
</style>
<?php

class FormTable {


function FormTable()
public function __construct()
{
$this->i = 0;
}

function start_form($action, $method = "post", $extra = "")
public function start_form($action, $method = "post", $extra = "")
{
echo "<div align='center'>";
echo "<form action='".$action."' method='".$method."' $extra >";
}
function start_table()

public function start_table()
{
echo "<table class='center'>";
}

function add_field_hidden($name, $value)
public function add_field_hidden($name, $value)
{
echo "<input type='hidden' name='".$name."' value='".@$value."'/>";
}

function add_field($type, $name, $value, $size = 50, $extra = "")
public function add_field($type, $name, $value, $size = 50, $extra = "")
{
echo "<tr><td align='right'><label for='".$name."'>".get_lang($name).":</label></td>";
echo "<td align='left'>";
Expand Down Expand Up @@ -132,7 +134,7 @@ function add_field($type, $name, $value, $size = 50, $extra = "")
}
}

function add_custom_field($name,$data,$td_extra = "")
public function add_custom_field($name,$data,$td_extra = "")
{
echo "<tr><td align='right' $td_extra><label for='".$name."'>".get_lang($name).":</label></td>";
echo "<td align='left'>".$data."</td>\n";
Expand All @@ -148,17 +150,17 @@ function add_custom_field($name,$data,$td_extra = "")
}
}

function end_table()
public function end_table()
{
echo "</table>";
}

function add_button($type,$name,$value)
public function add_button($type,$name,$value)
{
echo "<p class='center'><input type='$type' name='$name' value='$value' /></p>";
}

function end_form()
public function end_form()
{
echo "</form>";
echo "</div>";
Expand Down
14 changes: 6 additions & 8 deletions includes/lib_remote.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class OGPRemoteLibrary
private $enc;
private $timeout;

function __construct($host,$port,$encryption_key,$timeout = 2)
public function __construct($host,$port,$encryption_key,$timeout = 5)
{
$this->host = $host;
$this->port = $port;
Expand All @@ -48,7 +48,7 @@ function __construct($host,$port,$encryption_key,$timeout = 2)
$this->timeout = $timeout;
}

function __destruct()
public function __destruct()
{
}

Expand Down Expand Up @@ -486,12 +486,10 @@ public function remote_dirlistfm($args)
return -2;
if ( $response == 1 )
return array();

function base_64_decode_filename(&$item, $key){
if( $key == 'filename' ) $item = base64_decode($item);
}

array_walk_recursive($response, 'base_64_decode_filename');

array_walk_recursive($response, function (&$item, $key) {
if ($key == 'filename')$item = base64_decode($item);
});

return $response;
}
Expand Down
2 changes: 1 addition & 1 deletion includes/refreshed.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class refreshed
private $url;
private $pos;

public function refreshed()
public function __construct()
{
$this->url = array();
$this->pos = 0;
Expand Down
4 changes: 2 additions & 2 deletions includes/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ function printView($cleared = false, $dataType = "html") {
// Attempt to automatically delete the install file only if an admin user has already been created and exists
if(is_object($db)){
$admins = $db->getAdmins();
if(isset($admins) && is_array($admins) && count($admins) > 0){
@unlink($filename);
if (file_exists($filename) && is_array($admins) && !empty($admins)) {
unlink($filename);
}
}

Expand Down
2 changes: 2 additions & 0 deletions lang/English/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,6 @@
define('admin_dsi', "DSi Settings");
define('user_dsi', "DSi");
define('list_dsi', "DSi List");
define('no_remote_servers', "There is no known remote servers! Add a server to use this function.");

?>
1 change: 1 addition & 0 deletions lang/English/modules/TS3Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,5 @@
define('unassign_from_subuser', "Unassign from subuser.");
define('assign_to_subuser', "Assign to subuser.");
define('select_subuser', "Select subuser.");
define('no_ts3_servers_assigned_to_account', "You have no servers assigned to your account.");
?>
258 changes: 129 additions & 129 deletions lang/English/modules/settings.php

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lang/English/modules/status.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@
define('storage_used', "Used");
define('storage_free', "Free Space");
define('process_monitor', "Process Monitor");
define('status_extension_required', "Extension Required");
define('gd_info', "PHP Extension <a href=\"http://php.net/manual/en/image.installation.php\">GD</a> is required to generate these bar images!");
?>
37 changes: 22 additions & 15 deletions modules/TS3Admin/TS3Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,28 @@ function exec_ogp_module()
if( isset( $_GET['changevServer'] ) OR !isset( $_SESSION['ts3_ip'] ))
{
$remote_servers = $db->getRemoteServers();
echo "<form action='home.php?m=TS3Admin' method='GET'>
<input type='hidden' name='m' value='". $_GET['m'] . "' />
<table class='center'>
<tr>
<td class='left'>
<select onchange=".'"this.form.submit()"'." name='rserver_id'>
<option></option>\n";
foreach ( $remote_servers as $server )
{
echo "<option value='".$server['remote_server_id']."'>".
$server['remote_server_name']." (".$server['agent_ip'].")</option>\n";

if ($remote_servers !== false) {
echo "<form action='home.php?m=TS3Admin' method='GET'>
<input type='hidden' name='m' value='". $_GET['m'] . "' />
<table class='center'>
<tr>
<td class='left'>
<select onchange=".'"this.form.submit()"'." name='rserver_id'>
<option></option>\n";
foreach ( $remote_servers as $server )
{
echo "<option value='".$server['remote_server_id']."'>".
$server['remote_server_name']." (".$server['agent_ip'].")</option>\n";
}
echo "</select>
</form>
</td></tr></table>";

} else {
echo get_lang('no_remote_servers');

}
echo "</select>
</form>
</td></tr></table>";
}

if( isset( $_GET['rserver_id'] ) )
Expand Down Expand Up @@ -112,7 +119,7 @@ function exec_ogp_module()
}
else
{
echo "There are no TS3 servers assigned to your account.";
echo get_lang('no_ts3_servers_assigned_to_account');
return;
}
}
Expand Down
Loading