Merge pull request #155 from BNoiZe/master
simplexml check, admin_index-information and more
This commit is contained in:
@@ -26,6 +26,10 @@ if(isset($_POST['action'])) {
|
||||
}
|
||||
|
||||
if ($action == "newsfeed") {
|
||||
if (function_exists("simplexml_load_file") == false) {
|
||||
die();
|
||||
}
|
||||
|
||||
$news = simplexml_load_file('http://froxlor.org/feed.rss.php', null, LIBXML_NOCDATA);
|
||||
|
||||
if ($news !== false) {
|
||||
@@ -36,7 +40,7 @@ if ($action == "newsfeed") {
|
||||
$link = (string)$item->link;
|
||||
$content = preg_replace("/[\r\n]+/", "", strip_tags($item->description));
|
||||
|
||||
echo "<div class=\"newsitem\"><a href=\"" . $link . "\" target=\"_blank\"><b>" . $title . "</b>" . $content . "</a></div>";
|
||||
echo "<div class=\"newsitem\"><a href=\"" . $link . "\" target=\"_blank\"><b>" . $title . "</b><br />" . $content . "</a></div>";
|
||||
}
|
||||
} else {
|
||||
echo "";
|
||||
|
||||
@@ -1976,3 +1976,4 @@ $lng['panel']['available'] = "available";
|
||||
$lng['customer']['services'] = "Services";
|
||||
$lng['serversettings']['phpfpm_settings']['ipcdir']['title'] = 'FastCGI IPC directory';
|
||||
$lng['serversettings']['phpfpm_settings']['ipcdir']['description'] = 'The directory where the php-fpm sockets will be stored by the webserver.<br />This directory has to be readable for the webserver';
|
||||
$lng['panel']['news'] = "News";
|
||||
@@ -1702,3 +1702,4 @@ $lng['panel']['available'] = "verfügbar";
|
||||
$lng['customer']['services'] = "Dienste";
|
||||
$lng['serversettings']['phpfpm_settings']['ipcdir']['title'] = 'FastCGI IPC Verzeichnis';
|
||||
$lng['serversettings']['phpfpm_settings']['ipcdir']['description'] = 'In dieses Verzeichnis werden die php-fpm Sockets vom Webserver abgelegt.<br />Das Verzeichnis muss für den Webserver lesbar sein.';
|
||||
$lng['panel']['news'] = "Neuigkeiten";
|
||||
23
templates/Sparkle/admin/index/index.tpl
vendored
23
templates/Sparkle/admin/index/index.tpl
vendored
@@ -4,10 +4,7 @@ $header
|
||||
<img src="templates/{$theme}/assets/img/icons/domains_big.png" alt="" />
|
||||
{$lng['panel']['dashboard']}
|
||||
</h2>
|
||||
<div class="dboarditemfull bradius" id="newsfeed" style="display: none"></div>
|
||||
<br />
|
||||
<br />
|
||||
<div class="canvasitems" id="statsbox">
|
||||
<section class="dboardcanvas" id="statsbox">
|
||||
<div class="canvasbox">
|
||||
<input type="hidden" id="customers" class="circular" data-used="{$overview['number_customers']}" data-available="{$userinfo['customers']}">
|
||||
<canvas id="customers-canvas" width="120" height="76"></canvas><br/>
|
||||
@@ -196,15 +193,25 @@ $header
|
||||
</div>
|
||||
</if>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section class="dboarditem bradius" id="newsfeed" style="display: none">
|
||||
<table>
|
||||
<tr>
|
||||
<th>News</th>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="newsfeeditems"></div>
|
||||
</section>
|
||||
|
||||
<section class="dboarditem bradius">
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="2">{$lng['admin']['systemdetails']}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%">{$lng['admin']['serversoftware']}:</td>
|
||||
<td>{$lng['admin']['serversoftware']}:</td>
|
||||
<td>{$_SERVER['SERVER_SOFTWARE']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -212,7 +219,7 @@ $header
|
||||
<td><a href="{$linker->getLink(array('section' => 'settings', 'page' => 'phpinfo'))}">$phpversion</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lng['admin']['mysqlserverversion']}:</td>
|
||||
<td class="nowrap">{$lng['admin']['mysqlserverversion']}:</td>
|
||||
<td>$mysqlserverversion</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
13
templates/Sparkle/assets/css/main.css
vendored
13
templates/Sparkle/assets/css/main.css
vendored
@@ -920,12 +920,16 @@ label.nobr {
|
||||
background: url(../img/top.png) no-repeat;
|
||||
}
|
||||
|
||||
.nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* CANVAS STUFF */
|
||||
.canvasitems {
|
||||
position:relative;
|
||||
overflow:hidden;
|
||||
width:100%;
|
||||
margin-top:10px;
|
||||
margin-top:0px;
|
||||
margin-bottom:10px;
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
@@ -939,15 +943,16 @@ label.nobr {
|
||||
}
|
||||
.canvasbox canvas {
|
||||
width: 120px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* NEWSFEED */
|
||||
.newsitem {
|
||||
border-bottom: 1px solid #f1f2f3;
|
||||
padding: 6px 10px 8px 10px;
|
||||
height: 16px;
|
||||
padding: 6px 5px 8px 5px;
|
||||
height: 36px;
|
||||
line-height: 20px;
|
||||
margin: 0 10px;
|
||||
margin: 0 5px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
|
||||
4
templates/Sparkle/assets/js/main.js
vendored
4
templates/Sparkle/assets/js/main.js
vendored
@@ -34,8 +34,8 @@ $(document).ready(function() {
|
||||
|
||||
// Load Newsfeed
|
||||
var ajax_load = "<div id='newsitem'>Loading newsfeed...</div>";
|
||||
$("#newsfeed").html(ajax_load).load("lib/ajax.php?action=newsfeed", function() {
|
||||
if ($("#newsfeed").html() != "") {
|
||||
$("#newsfeeditems").html(ajax_load).load("lib/ajax.php?action=newsfeed", function() {
|
||||
if ($("#newsfeeditems").html() != "") {
|
||||
$("#newsfeed").slideDown();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user