Skip to content

Commit

Permalink
Update to 1.3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
lgund committed Oct 13, 2017
1 parent a2ed7b4 commit e1da50d
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 66 deletions.
26 changes: 23 additions & 3 deletions iframeServerBanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
$tsAdmin->selectServer($port, "port");
$serverinfo = $tsAdmin->serverInfo();
$clients = $tsAdmin->clientList("-ip");
$ts3clients = array();

if(!empty($clients['data']))
{
Expand All @@ -109,9 +110,13 @@
$ts3clients[htmlentities($client['connection_client_ip'])] = htmlentities($client['client_nickname']);
};
};
$clientcache = fopen('./images/ts_banner/'.$instanz.'_'.$port.'_clients.php', 'w+');
fwrite($clientcache, '<?php $nicklist = json_decode(\''.str_replace("'", "\'", json_encode($ts3clients, 1)).'\',1);');
fclose($clientcache);

if(!empty($ts3clients))
{
$clientcache = fopen('./images/ts_banner/'.$instanz.'_'.$port.'_clients.php', 'w+');
fwrite($clientcache, '<?php $nicklist = json_decode(\''.str_replace("'", "\'", json_encode($ts3clients, 1)).'\',1);');
fclose($clientcache);
};
};
};

Expand Down Expand Up @@ -145,6 +150,21 @@
paintText($image, $textInfos['fontsize'], $textInfos['x'], $textInfos['y'], $textInfos['color'], $textInfos['fontfile'], $text);
};

foreach ($packetmanager['custom'] AS $text=>$textInfos)
{
if (!file_exists($textInfos['fontfile']))
{
throw new Exception ('Font File not found! Searched at '.$textInfos['fontfile'].PHP_EOL.'You may need to set the absolute path (from root directory /var/www/...)');
};

if (strpos($text, '%nickname%') !== FALSE)
{
continue;
};

paintText($image, $textInfos['fontsize'], $textInfos['x'], $textInfos['y'], $textInfos['color'], $textInfos['fontfile'], $textInfos['text']);
};

/*
Clearing
*/
Expand Down
8 changes: 6 additions & 2 deletions php/admin/web_admin_logs.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,16 @@
</div>
<div class="card-block">
<?php
$logAvalible = explode("|", $systemLogs[0]);
if(empty($systemLogs))
{
echo "<p style=\"text-align: center;\">".$language['no_entrys']."</p>";
}
else if(count($logAvalible) != 3)
else
{
$logAvalible = explode("|", $systemLogs[0]);
};

if(count($logAvalible) != 3)
{
echo "<p style=\"text-align: center;\">".$language['log_not_possible']."</p>";
}
Expand Down
2 changes: 1 addition & 1 deletion php/functions/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/*
Installed Webinterface version
*/
define("INTERFACE_VERSION", "1.3.12-OPEN-BETA");
define("INTERFACE_VERSION", "1.3.13-OPEN-BETA");

/*
Anti XSS
Expand Down
2 changes: 1 addition & 1 deletion php/functions/functionsTeamspeakPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@
{
if(isSet($_POST['instanz']))
{
echo json_encode(getTeamspeakslots($_POST['instanz'], $_POST['force']));
echo json_encode(getTeamspeakslots($_POST['instanz'], (isset($_POST['force'])) ? $_POST['force'] : false));
}
else
{
Expand Down
46 changes: 24 additions & 22 deletions php/main/web_main_main.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,32 +65,34 @@
$time = str_replace(".json", "", $datei);
$cont = array();
$json = file_get_contents("../../files/news/".$datei);
$cont = json_decode($json, true); ?>
$cont = json_decode($json, true);

<div class="card" id="<?php xssEcho($time); ?>">
<div class="card-block card-block-header">
<div style="float:left;">
<h4 class="card-title"><i class="fa fa-newspaper-o"></i> <?php xssEcho($cont['title']); ?></h4>
if(ctype_digit($time) != null) { ?>

<div class="card" id="<?php xssEcho($time); ?>">
<div class="card-block card-block-header">
<div style="float:left;">
<h4 class="card-title"><i class="fa fa-newspaper-o"></i> <?php xssEcho($cont['title']); ?></h4>
</div>
<div style="float:right;">
<?php echo date("d.m.Y (G:i)", $time); ?>
</div>
<h6 style="clear:both;" class="card-subtitle text-muted"><?php xssEcho($cont['subtitle']); ?></h6>
</div>
<div style="float:right;">
<?php echo date("d.m.Y (G:i)", $time); ?>
<div class="card-block">
<p style="font-style:normal;">
<?php echo $cont['content']; ?>
</p>
<?php if($LoggedIn && $user_right['right_hp_main'] == $mysql_keys['right_hp_main']) { ?>
<div style="width:20%;float:right;">
<button onClick="AreYouSure('<?php echo $language['delete_news']; ?>', 'deleteNews(\'<?php echo $time; ?>\');');" style="width:100%;" class="btn btn-danger btn-sm"><i class="fa fa-trash" aria-hidden="true"></i> <font class="hidden-xs-down"><?php echo $language['delete']; ?></font></button>
</div>
<div style="clear:both;"></div>
<?php }; ?>
</div>
<h6 style="clear:both;" class="card-subtitle text-muted"><?php xssEcho($cont['subtitle']); ?></h6>
</div>
<div class="card-block">
<p style="font-style:normal;">
<?php echo $cont['content']; ?>
</p>
<?php if($LoggedIn && $user_right['right_hp_main'] == $mysql_keys['right_hp_main']) { ?>
<div style="width:20%;float:right;">
<button onClick="AreYouSure('<?php echo $language['delete_news']; ?>', 'deleteNews(\'<?php echo $time; ?>\');');" style="width:100%;" class="btn btn-danger btn-sm"><i class="fa fa-trash" aria-hidden="true"></i> <font class="hidden-xs-down"><?php echo $language['delete']; ?></font></button>
</div>
<div style="clear:both;"></div>
<?php }; ?>
</div>
</div>

<?php };
<?php };
};
};
}
else if(CUSTOM_NEWS_PAGE == "true")
Expand Down
2 changes: 1 addition & 1 deletion php/teamspeak/web_teamspeak_server.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@

foreach($servers['data'] AS $number => $server)
{
if(strpos($user_right['right_web_server_view'][$instanz], $server['virtualserver_port']) !== false || $user_right['right_web_global_server']['key'] == $mysql_keys['right_web_global_server'])
if(isPortPermission($user_right, $instanz, $server['virtualserver_port'], 'right_web_server_view') || $user_right['right_web_global_server']['key'] == $mysql_keys['right_web_global_server'])
{
$globalServers[$instanz][$number] = $server;
$globalServerCount++;
Expand Down
23 changes: 13 additions & 10 deletions php/teamspeak/web_teamspeak_server_requests.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,19 @@
{
if($datei != "." && $datei != "..")
{
$information = explode("_", $datei);
$information[1] = str_replace(".txt", "", $information[1]);
echo '<tr>
<td>'.xssSafe($information[0]).'</td>
<td>'.xssSafe($information[1]).'</td>
<td>
<button class="btn btn-success btn-sm mini-left-right-margin" onClick="showServerRequest(\''.$datei.'\');"><i class="fa fa-edit"></i> <font class="hidden-md-down">'.$language['edit'].'</font>
<button class="btn btn-danger btn-sm mini-left-right-margin" onClick="deleteWantServer(\''.$datei.'\');"><i class="fa fa-trash"></i> <font class="hidden-md-down">'.strtolower($language['delete']).'</font>
</td>
</tr>';
$information = explode("_", $datei);
if(count($information) >= 2)
{
$information[1] = str_replace(".txt", "", $information[1]);
echo '<tr>
<td>'.xssSafe($information[0]).'</td>
<td>'.xssSafe($information[1]).'</td>
<td>
<button class="btn btn-success btn-sm mini-left-right-margin" onClick="showServerRequest(\''.$datei.'\');"><i class="fa fa-edit"></i> <font class="hidden-md-down">'.$language['edit'].'</font>
<button class="btn btn-danger btn-sm mini-left-right-margin" onClick="deleteWantServer(\''.$datei.'\');"><i class="fa fa-trash"></i> <font class="hidden-md-down">'.strtolower($language['delete']).'</font>
</td>
</tr>';
};
};
};
}; ?>
Expand Down
56 changes: 30 additions & 26 deletions php/teamspeak/web_teamspeak_serverfilelist.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,41 +95,45 @@ function getChannelFiles($filelist, $cid, $path = "/")
global $tsAdmin;

$returnFilelist = array();
foreach($filelist AS $file)

if(!empty($filelist))
{
if(empty($file['path']))
{
$file['path'] = $path;
};

if($file['size'] == 0)
foreach($filelist AS $file)
{
foreach(getChannelFiles($tsAdmin->getElement('data', $tsAdmin->ftGetFileList($cid, "", $path.$file['name'])), $cid, $path.$file['name']."/") AS $subFile)
if(empty($file['path']))
{
$file['path'] = $path;
};

if($file['size'] == 0)
{
if(empty($subFile['cid']))
foreach(getChannelFiles($tsAdmin->getElement('data', $tsAdmin->ftGetFileList($cid, "", $path.$file['name'])), $cid, $path.$file['name']."/") AS $subFile)
{
$subFile['cid'] = $cid;
if(empty($subFile['cid']))
{
$subFile['cid'] = $cid;
};

if(substr($subFile['path'], -1) != "/")
{
$subFile['path'] .= "/";
};
$returnFilelist[] = $subFile;
};
}
else
{
if(empty($file['cid']))
{
$file['cid'] = $cid;
};

if(substr($subFile['path'], -1) != "/")
if(substr($file['path'], -1) != "/")
{
$subFile['path'] .= "/";
$file['path'] .= "/";
};
$returnFilelist[] = $subFile;
};
}
else
{
if(empty($file['cid']))
{
$file['cid'] = $cid;
};

if(substr($file['path'], -1) != "/")
{
$file['path'] .= "/";
$returnFilelist[] = $file;
};
$returnFilelist[] = $file;
};
};

Expand Down

0 comments on commit e1da50d

Please sign in to comment.