#30 New theme bashed on Bootstrap3

This commit is contained in:
Ulrich Block 2014-08-18 20:39:46 +02:00
parent 03495bdd73
commit 54a3460e27
9 changed files with 167 additions and 115 deletions

View File

@ -12,6 +12,17 @@
<columns>Custom Columns</columns>
<comments>Kommentare</comments>
<databases>DB</databases>
<dataTablesEmpty>Keine Einträge zum anzeigen</dataTablesEmpty>
<dataTablesEmptyTable>Keine Daten in der Tabelle verfügbar</dataTablesEmptyTable>
<dataTablesFiltered> (aus _MAX_ Einträgen insgesamt)</dataTablesFiltered>
<dataTablesFirst>Erste</dataTablesFirst>
<dataTablesInfo>Zeige _START_ bis _END_ von _TOTAL_ Einträgen</dataTablesInfo>
<dataTablesLast>Letzte</dataTablesLast>
<dataTablesMenu>_MENU_ Einträge je Seite</dataTablesMenu>
<dataTablesNext>Nächste</dataTablesNext>
<dataTablesNoRecords>Keine Einträge zum anzeigen</dataTablesNoRecords>
<dataTablesPrevious>Vorherige</dataTablesPrevious>
<dataTablesSearch>Suche: </dataTablesSearch>
<datetime>Datum/Uhrzeit</datetime>
<dedicated>Dedizierte</dedicated>
<del>Löschen</del>

View File

@ -12,6 +12,17 @@
<columns>Custom columns</columns>
<comments>Comments</comments>
<databases>Databases</databases>
<dataTablesFirst>First</dataTablesFirst>
<dataTablesEmpty>No entries to show</dataTablesEmpty>
<dataTablesEmptyTable>No data available in table</dataTablesEmptyTable>
<dataTablesFiltered> (filtered from _MAX_ total entries)</dataTablesFiltered>
<dataTablesInfo>Showing _START_ to _END_ of _TOTAL_ entries</dataTablesInfo>
<dataTablesLast>Last</dataTablesLast>
<dataTablesMenu>_MENU_ records per page</dataTablesMenu>
<dataTablesNext>Next</dataTablesNext>
<dataTablesNoRecords>No records to display</dataTablesNoRecords>
<dataTablesPrevious>Previous</dataTablesPrevious>
<dataTablesSearch>Search: </dataTablesSearch>
<datetime>Date/time</datetime>
<dedicated>Dedicated</dedicated>
<del>Delete</del>

View File

@ -283,62 +283,56 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
} else {
$o = $ui->st('o', 'get');
if ($ui->st('o', 'get') == 'di') {
$orderby = '`id` DESC';
} else if ($ui->st('o', 'get') == 'ai') {
$orderby = '`id` ASC';
} else if ($ui->st('o', 'get') == 'dt') {
$orderby = '`servertype` DESC';
} else if ($ui->st('o', 'get') == 'at') {
$orderby = '`servertype` ASC';
} else if ($ui->st('o', 'get') == 'dn') {
$orderby = '`name` DESC';
} else {
$orderby = '`name` ASC';
$o = 'as';
}
if (isset($adminInclude)) {
$query = $sql->prepare("SELECT COUNT(`templateID`) AS `amount` FROM `gserver_file_templates` WHERE `userID` IS NULL AND `resellerID`=?");
$query->execute(array($resellerLockupID));
} else {
$query = $sql->prepare("SELECT COUNT(`templateID`) AS `amount` FROM `gserver_file_templates` WHERE `userID`=? AND `resellerID`=?");
$query->execute(array($user_id, $resellerLockupID));
}
$colcount = $query->fetchColumn();
$start = (isset($start) and $start < $colcount) ? $start : 0;
$amount = (isset($amount)) ? $amount : 20;
$next = $start + $amount;
$vor = ($colcount > $next) ? $start + $amount : $start;
$back = $start - $amount;
$zur = ($back >= 0) ? $start - $amount : $start;
$pageamount = ceil($colcount / $amount);
if (isset($adminInclude)) {
$query = $sql->prepare("SELECT `templateID`,`name`,`servertype` FROM `gserver_file_templates` WHERE `userID` IS NULL AND `resellerID`=? ORDER BY $orderby LIMIT $start,$amount");
$query->execute(array($resellerLockupID));
} else {
$query = $sql->prepare("SELECT `templateID`,`name`,`servertype` FROM `gserver_file_templates` WHERE `userID`=? AND `resellerID`=? ORDER BY $orderby LIMIT $start,$amount");
$query->execute(array($user_id, $resellerLockupID));
}
$table = array();
if (isset($adminInclude)) {
$query = $sql->prepare("SELECT `templateID`,`name`,`servertype` FROM `gserver_file_templates` WHERE `userID` IS NULL AND `resellerID`=?");
$query->execute(array($resellerLockupID));
} else {
$query = $sql->prepare("SELECT `templateID`,`name`,`servertype` FROM `gserver_file_templates` WHERE `userID`=? AND `resellerID`=?");
$query->execute(array($user_id, $resellerLockupID));
}
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$table[] = array('id' => $row['templateID'], 'name' => $row['name'], 'servertype' => $row['servertype']);
}
$link = '<a href="' . $targetFile . '?w=gt&amp;o=' . $o . '&amp;a=';
$link .= (!isset($amount)) ? 20 : $amount;
$link .= ($start == 0) ? '&p=0" class="bold">1</a>' : '&p=0">1</a>';
$pages[] = $link;
$i = 2;
while ($i <= $pageamount) {
$selectpage = ($i - 1) * $amount;
$pages[] = ($start == $selectpage) ? '<a href="' . $targetFile . '?w=gt&amp;a=' . $amount . '&p=' . $selectpage . '&amp;o=' . $o . '" class="bold">' . $i . '</a>' : '<a href="' . $targetFile . '?w=gt&amp;a=' . $amount . '&p=' . $selectpage . '&amp;o=' . $o . '">' . $i . '</a>';
$i++;
}
$pages = implode(', ', $pages);
$htmlExtraInformation['css'][] = '<link href="css/adminlte/datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css">';
$htmlExtraInformation['js'][] = '<script src="js/adminlte/plugins/datatables/jquery.datatables.js" type="text/javascript"></script>';
$htmlExtraInformation['js'][] = '<script src="js/adminlte/plugins/datatables/datatables.bootstrap.js" type="text/javascript"></script>';
$htmlExtraInformation['js'][] = '<script type="text/javascript">
$(function() {
$(\'#dataTable\').dataTable({
"bPaginate": true,
"bLengthChange": true,
"bFilter": true,
"bSort": true,
"aoColumnDefs": [{
"bSortable": false,
"aTargets": [-1, -2]
}],
"bInfo": true,
"bAutoWidth": false,
"iDisplayLength" : 10,
"aaSorting": [[0,\'asc\']],
"oLanguage": {
"oPaginate": {
"sFirst": "' . $gsprache->dataTablesFirst . '",
"sLast": "' . $gsprache->dataTablesLast . '",
"sNext": "' . $gsprache->dataTablesNext . '",
"sPrevious": "' . $gsprache->dataTablesPrevious . '"
},
"sEmptyTable": "' . $gsprache->dataTablesEmptyTable . '",
"sInfo": "' . $gsprache->dataTablesInfo . '",
"sInfoEmpty": "' . $gsprache->dataTablesEmpty . '",
"sInfoFiltered": "' . $gsprache->dataTablesFiltered . '",
"sLengthMenu": "' . $gsprache->dataTablesMenu . '",
"sSearch": "' . $gsprache->dataTablesSearch . '",
"sZeroRecords": "' . $gsprache->dataTablesNoRecords . '"
}
});
});
</script>';
$template_file = 'global_gserver_file_template_list.tpl';
}

View File

@ -57,7 +57,22 @@ $(function() {
"bServerSide" : true,
"iDisplayLength" : 10,
"aaSorting": [[0,\'desc\']],
"sAjaxSource": "ajax.php?w=datatable&d=userlog"
"sAjaxSource": "ajax.php?w=datatable&d=userlog",
"oLanguage": {
"oPaginate": {
"sFirst": "' . $gsprache->dataTablesFirst . '",
"sLast": "' . $gsprache->dataTablesLast . '",
"sNext": "' . $gsprache->dataTablesNext . '",
"sPrevious": "' . $gsprache->dataTablesPrevious . '"
},
"sEmptyTable": "' . $gsprache->dataTablesEmptyTable . '",
"sInfo": "' . $gsprache->dataTablesInfo . '",
"sInfoEmpty": "' . $gsprache->dataTablesEmpty . '",
"sInfoFiltered": "' . $gsprache->dataTablesFiltered . '",
"sLengthMenu": "' . $gsprache->dataTablesMenu . '",
"sSearch": "' . $gsprache->dataTablesSearch . '",
"sZeroRecords": "' . $gsprache->dataTablesNoRecords . '"
}
});
});
</script>';

View File

@ -55,6 +55,8 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
$slotUsage = array();
$trafficUsage = array();
$menuStart = 6;
$display = $sprache->total;
$dateRange = ($ui->escaped('dateRange', 'post')) ? $ui->escaped('dateRange', 'post') : date('m/d/Y', strtotime("-6 days")) . ' - ' . date('m/d/Y');
@ -66,6 +68,8 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
if ($endYear > 2000 and $startYear > 2000) {
$menuStart = round((strtotime("{$endYear}-{$endMonth}-{$endDay}") - strtotime("{$startYear}-{$startMonth}-{$startDay}")) / 86400);
$extractOrNormal = ($accuracy == 'mo') ? "CONCAT(EXTRACT(YEAR FROM `date`),'-',EXTRACT(MONTH FROM `date`))" : '`date`';
$startDateFormatted = date('Y-m-d', strtotime($startYear . '-' . $startMonth . '-' . $startDay));
@ -123,7 +127,7 @@ $(function() {
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
},
startDate: moment().subtract('days', 6),
startDate: moment().subtract('days', {$menuStart}),
endDate: moment(),
opens: 'right'
},

View File

@ -10,15 +10,23 @@
<!-- Main Content -->
<section class="content">
<?php if (count($errors)>0){ ?>
<div class="box box-danger">
<div class="box-header">
<i class="fa fa-warning"></i>
<h3 class="box-title"><?php echo $gsprache->errors;?></h3>
</div><!-- /.box-header -->
<div class="box-body">
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<b><?php echo $gsprache->errors;?>:</b> <?php echo implode(', ',$errors);?>
</div>
</div>
</div>
<?php }?>
<div class="box box-info">
<div class="box-body">
<?php if (count($errors)>0){ ?>
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4><?php echo $gsprache->errors;?></h4>
<?php echo implode(', ',$errors);?>
</div>
<?php }?>
<form role="form" action="<?php echo $targetFile;?>?w=gt&amp;d=ad&amp;r=gt" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">
@ -27,7 +35,7 @@
<div class="form-group<?php if(isset($errors['name'])) echo ' error';?>">
<label for="inputName"><?php echo $sprache->description;?></label>
<input class="form-control" id="inputName" type="text" name="name" value="<?php echo $name;?>">
<input class="form-control" id="inputName" type="text" name="name" value="<?php echo $name;?>" required>
</div>
<div id="mods" class="form-group<?php if(isset($errors['servertype'])) echo ' error';?>">
@ -41,7 +49,7 @@
<div class="form-group<?php if(isset($errors['content'])) echo ' error';?>">
<label for="inputContent"><?php echo $gsprache->template;?></label>
<textarea class="form-control" id="inputContent" rows="20" name="content"><?php echo $content;?></textarea>
<textarea class="form-control" id="inputContent" rows="20" name="content" required><?php echo $content;?></textarea>
</div>
<div class="form-group">

View File

@ -8,43 +8,45 @@
<!-- Main Content -->
<section class="content">
<?php echo $gsprache->template;?> <a href="<?php echo $targetFile;?>?w=gt&amp;d=ad"<span class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> <?php echo $gsprache->add;?></span></a>
<div class="box-footer clearfix">
<ul class="pagination pagination-sm no-margin pull-right">
<li><a href="userpanel.php?w=lo&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $zur; ?>"><i class="fa fa-step-backward"></i></a></li>
<li><a href="userpanel.php?w=lo&amp;a=20&amp;p=<?php echo $start; ?>">20</a></li>
<li><a href="userpanel.php?w=lo&amp;a=50&amp;p=<?php echo $start; ?>">50</a></li>
<li><a href="userpanel.php?w=lo&amp;a=100&amp;p=<?php echo $start; ?>">100</a></li>
<li><a href="userpanel.php?w=lo&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $vor; ?>"><i class="fa fa-step-forward"></i></a></li>
</ul>
</div>
<br/>
<div class="box box-info">
<div class="box-body table-responsive no-padding">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th data-class="expand"><a href="<?php echo $targetFile;?>?w=gt&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $start;?>&amp;o=<?php if ($o=='an') { echo 'dn'; } else { echo 'an'; } ?>"><?php echo $sprache->abkuerz;?></a></th>
<th data-hide="phone"><a href="<?php echo $targetFile;?>?w=gt&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $start;?>&amp;o=<?php if ($o=='di') { echo 'ai'; } else { echo 'di'; } ?>">ID</a></th>
<th data-hide="phone"><a href="<?php echo $targetFile;?>?w=gt&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $start;?>&amp;o=<?php if ($o=='at') { echo 'dt'; } else { echo 'at'; } ?>"><?php echo $sprache->game;?></a></th>
<th><?php echo $gsprache->del;?></a></th>
<th><?php echo $gsprache->mod;?></a></th>
</tr>
</thead>
<tbody>
<?php foreach ($table as $table_row) { ?>
<tr>
<td><?php echo $table_row['name'];?></td>
<td><?php echo $table_row['id'];?></td>
<td><?php echo $table_row['servertype'];?></td>
<td><a href="<?php echo $targetFile;?>?w=gt&amp;d=dl&amp;id=<?php echo $table_row['id'];?>" ><span class="btn btn-sm btn-danger"><i class="fa fa-trash-o"></i></span></a></td>
<td><a href="<?php echo $targetFile;?>?w=gt&amp;d=md&amp;id=<?php echo $table_row['id'];?>" ><span class="btn btn-sm btn-primary"><i class="fa fa-edit"></i></span></a></td>
</tr>
<?php } ?>
</tbody>
</table>
<div class="box-body">
<div>
<?php echo $gsprache->template;?> <a href="<?php echo $targetFile;?>?w=gt&amp;d=ad"<span class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> <?php echo $gsprache->add;?></span></a>
</div>
<hr>
<div class="table-responsive">
<table id="dataTable" class="table table-bordered table-striped">
<thead>
<tr>
<th><?php echo $sprache->abkuerz;?></th>
<th>ID</th>
<th><?php echo $sprache->game;?></th>
<th><?php echo $gsprache->del;?></th>
<th><?php echo $gsprache->mod;?></th>
</tr>
</thead>
<tbody>
<?php foreach ($table as $table_row) { ?>
<tr>
<td><?php echo $table_row['name'];?></td>
<td><?php echo $table_row['id'];?></td>
<td><?php echo $table_row['servertype'];?></td>
<td><a href="<?php echo $targetFile;?>?w=gt&amp;d=dl&amp;id=<?php echo $table_row['id'];?>" ><span class="btn btn-sm btn-danger"><i class="fa fa-trash-o"></i></span></a></td>
<td><a href="<?php echo $targetFile;?>?w=gt&amp;d=md&amp;id=<?php echo $table_row['id'];?>" ><span class="btn btn-sm btn-primary"><i class="fa fa-edit"></i></span></a></td>
</tr>
<?php } ?>
</tbody>
<tfoot>
<tr>
<th><?php echo $sprache->abkuerz;?></th>
<th>ID</th>
<th><?php echo $sprache->game;?></th>
<th><?php echo $gsprache->del;?></th>
<th><?php echo $gsprache->mod;?></th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</section>

View File

@ -11,16 +11,23 @@
<!-- Main Content -->
<section class="content">
<?php if (count($errors)>0){ ?>
<div class="box box-danger">
<div class="box-header">
<i class="fa fa-warning"></i>
<h3 class="box-title"><?php echo $gsprache->errors;?></h3>
</div><!-- /.box-header -->
<div class="box-body">
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<b><?php echo $gsprache->errors;?>:</b> <?php echo implode(', ',$errors);?>
</div>
</div>
</div>
<?php }?>
<div class="box box-info">
<div class="box-body">
<?php if (count($errors)>0){ ?>
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4><?php echo $gsprache->errors;?></h4>
<?php echo implode(', ',$errors);?>
</div>
<?php }?>
<form role="form" action="<?php echo $targetFile;?>?w=gt&amp;d=md&amp;id=<?php echo $id;?>&amp;r=gt" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">
<input type="hidden" name="token" value="<?php echo token();?>">
@ -28,7 +35,7 @@
<div class="form-group<?php if(isset($errors['name'])) echo ' error';?>">
<label for="inputName"><?php echo $sprache->description;?></label>
<input class="form-control" id="inputName" type="text" name="name" value="<?php echo $name;?>">
<input class="form-control" id="inputName" type="text" name="name" value="<?php echo $name;?>" required>
</div>
<div id="mods" class="form-group<?php if(isset($errors['servertype'])) echo ' error';?>">
@ -42,7 +49,7 @@
<div class="form-group<?php if(isset($errors['content'])) echo ' error';?>">
<label for="inputContent"><?php echo $gsprache->template;?></label>
<textarea class="form-control" id="inputContent" rows="20" name="content"><?php echo $content;?></textarea>
<textarea class="form-control" id="inputContent" rows="20" name="content" required><?php echo $content;?></textarea>
</div>
<div class="form-group">
<label class="control-label" for="inputEdit"></label>

View File

@ -31,7 +31,7 @@
<div class="box box-info">
<div class="box-body table-responsive no-padding">
<table class="table table-hover table-bordered">
<thead>
<thead>
<tr>
<th><a href="<?php echo $ticketLinks['all'];?>&amp;o=<?php if ($o=='at') { echo 'dt'; } else { echo 'at'; } ?>"><?php echo $sprache->subject;?></a></th>
<th><a href="<?php echo $ticketLinks['all'];?>&amp;o=<?php if ($o=='ai') { echo 'di'; } else { echo 'ai'; } ?>">ID</a></th>
@ -41,9 +41,9 @@
<th><a href="<?php echo $ticketLinks['all'];?>&amp;o=<?php if ($o=='ad') { echo 'dd'; } else { echo 'ad'; } ?>"><?php echo $sprache->date;?></a></th>
<th><?php echo $gsprache->mod;?></th>
</tr>
</thead>
<tbody>
<?php foreach ($table as $table_row) { ?>
</thead>
<tbody>
<?php foreach ($table as $table_row) { ?>
<tr class="<?php echo $table_row['statusClass']; ?>">
<td><?php echo $table_row['subject']; ?></td>
<td><?php echo $table_row['id']; ?></td>
@ -53,8 +53,8 @@
<td><?php echo $table_row['writedate']; ?></td>
<td><a href="userpanel.php?w=ti&amp;d=md&amp;id=<?php echo $table_row['id'];?>" alt="modify"><span class="btn btn-primary btn-sm"><i class="fa fa-edit"></i></span></a></td>
</tr>
<?php } ?>
</tbody>
<?php } ?>
</tbody>
</table>
</div><!-- /.box-body -->
</div><!-- /.box -->