#30 New theme based on Bootstrap3

This commit is contained in:
Ulrich Block 2014-08-17 22:33:31 +02:00
parent 9cc4f4be70
commit e12c293846
11 changed files with 199 additions and 88 deletions

View File

@ -130,6 +130,9 @@ if ($ui->smallletters('w', 9, 'get') == 'datatable') {
}
}
// When searching a table combination that should provide a server and user´s loginname, firstname, lastname. First do a search at usertable and get IDs.
// This IDs should be used for doing a `ID` IN (implode(',', $foundIDs)) as it will be faster.
die(json_encode($array));
} else if (isset($admin_id) and $pa['dedicatedServer'] and $ui->smallletters('d', 7, 'get') == 'freeips' and $reseller_id == 0) {
@ -178,23 +181,6 @@ if ($ui->smallletters('w', 9, 'get') == 'datatable') {
die;
} else if (isset($user_id) and $pa['voiceserverStats'] and $ui->smallletters('d', 14, 'get') == 'uservoicestats' and $ui->st('w', 'get')) {
$data = array();
if ($ui->st('w', 'get') == 'se') {
$query = $sql->prepare("SELECT v.`id`,v.`ip`,v.`port`,v.`dns`,m.`usedns` FROM `voice_server` v INNER JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`userid`=? AND v.`resellerid`=? AND v.`active`='Y' AND m.`active`='Y' ORDER BY v.`ip`,v.`port`");
$query->execute(array($user_id, $resellerLockupID));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$data[] = '<option value=' . $row['id'] . '>' . $row['ip'] . ':' . $row['port'] . '</option>';
}
}
require_once IncludeTemplate($template_to_use,'ajax_userpanel_voice_stats.tpl', 'ajax');
die;
} else if (isset($admin_id) and $pa['voiceserverStats'] and $ui->smallletters('d', 15, 'get') == 'adminvoicestats' and $ui->st('w', 'get')) {
$data = array();
@ -226,7 +212,53 @@ if ($ui->smallletters('w', 9, 'get') == 'datatable') {
require_once IncludeTemplate($template_to_use,'ajax_admin_voice_stats.tpl', 'ajax');
die;
} else if (isset($user_id) and $pa['voiceserverStats'] and $ui->smallletters('d', 14, 'get') == 'uservoicestats' and $ui->st('w', 'get')) {
$data = array();
if ($ui->st('w', 'get') == 'se') {
$query = $sql->prepare("SELECT v.`id`,v.`ip`,v.`port`,v.`dns`,m.`usedns` FROM `voice_server` v INNER JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`userid`=? AND v.`resellerid`=? AND v.`active`='Y' AND m.`active`='Y' ORDER BY v.`ip`,v.`port`");
$query->execute(array($user_id, $resellerLockupID));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$data[] = '<option value=' . $row['id'] . '>' . $row['ip'] . ':' . $row['port'] . '</option>';
}
}
require_once IncludeTemplate($template_to_use,'ajax_userpanel_voice_stats.tpl', 'ajax');
die;
} else if (isset($user_id) and $pa['usertickets'] and $ui->w('d', 20, 'get') == 'userTicketCategories' and $ui->id('topicName', 10, 'get')) {
$table = array();
$query = $sql->prepare("SELECT * FROM `ticket_topics` WHERE `maintopic`=? AND `maintopic`!=`id` AND `resellerid`=? ORDER BY `id`");
$query2 = $sql->prepare("SELECT `text` FROM `translations` WHERE `type`='ti' AND `lang`=? AND `transID`=? AND `resellerID`=? LIMIT 1");
$query->execute(array($ui->id('topicName', 10, 'get'), $reseller_id));
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
$query2->execute(array($user_language, $row['id'], $reseller_id));
$topic = $query2->fetchColumn();
if (empty($topic)) {
$query2->execute(array($default_language, $row['id'], $reseller_id));
$topic = $query2->fetchColumn();
if (empty($topic)) {
$topic = $row['topic'];
}
}
$table[$row['id']] = $topic;
}
require_once IncludeTemplate($template_to_use,'ajax_userpanel_ticket_category.tpl', 'ajax');
die;
}
die('No Access');
die('No Access:'.$ui->smallletters('d', 200, 'get'));

View File

@ -52,4 +52,55 @@ function getdetails(file, str, id) {
xmlhttp2.open("GET", file, true);
xmlhttp2.send();
}
function SwitchShowHideRows (Element, change, showNotIfEmpty) {
var TheRest = document.getElementsByTagName('div');
var amount = TheRest.length;
var ElementLenght = Element.length;
var foundAmount = 0;
if(typeof(change)==='undefined') {
change = 'switch';
}
for(var x=0; x<amount; x++) {
var TheClass = TheRest[x].getAttribute('class');
if (TheClass != null) {
if (Element == 'init_ready') {
if (TheClass.indexOf("display_none") != '-1') {
TheRest[x].style.display = 'none';
} else {
TheRest[x].style.display = '';
}
} else {
if (TheClass.indexOf(change)!= -1) {
foundElement=TheClass.substring(0, ElementLenght);
if (foundElement == Element) {
foundAmount++;
}
if (foundElement == Element && TheRest[x].style.display == 'none') {
TheRest[x].style.display = '';
} else if (foundElement != Element && TheRest[x].style.display != 'none') {
TheRest[x].style.display = 'none';
}
}
}
}
}
if (Element != 'init_ready' && foundAmount == 0 && showNotIfEmpty != 1) {
for(x=0; x<amount; x++) {
TheClass = TheRest[x].getAttribute('class');
if (TheClass != null) {
if (TheClass.indexOf(change)!= -1) {
TheRest[x].style.display = '';
}
}
}
}
}

View File

@ -765,7 +765,7 @@ if (!function_exists('passwordgenerate')) {
if ($key != 'server' and $key != 'title' and $key != 'username' and $key != 'shorten' and $key != 'date' and $key != 'emailregards' and $key != 'emailfooter') {
if ($template == 'emailnewticket' and $key == 'topic') {
$value = $sprache->topic . ' #' . $shorten;
$value = $sprache['topic'] . ' #' . $shorten;
$topic = $value;
}

View File

@ -172,7 +172,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
$default_language = $rSA['language'];
$query = $sql->prepare("SELECT * FROM `tickets` WHERE `id`=? AND `userid`=? AND `resellerid`=? LIMIT 1");
$query2 = $sql->prepare("SELECT t.*,u.`cname`,u.`name`,u.`vname` FROM `tickets_text` t LEFT JOIN `userdata` u ON t.`userID`=u.`id` WHERE t.`ticketID`=? AND t.`resellerID`=? ORDER BY t.`writeDate`");
$query2 = $sql->prepare("SELECT t.*,u.`cname`,u.`name`,u.`vname` FROM `tickets_text` t LEFT JOIN `userdata` u ON t.`userID`=u.`id` WHERE t.`ticketID`=? AND t.`resellerID`=? ORDER BY t.`writeDate` DESC");
$query3 = $sql->prepare("SELECT `text` FROM `translations` WHERE `type`='ti' AND `lang`=? AND `transID`=? AND `resellerID`=? LIMIT 1");
$query4 = $sql->prepare("SELECT `topic` FROM `ticket_topics` WHERE `id`=? AND `resellerid`=? LIMIT 1");
@ -181,7 +181,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
$userPriority = $row['userPriority'];
$query2->execute(array($id,$reseller_id));
$query2->execute(array($id, $reseller_id));
foreach ($query2->fetchAll(PDO::FETCH_ASSOC) as $row2) {
$table[] = array('writedate' => ($user_language == 'de') ? date('d.m.Y H:i:s',strtotime($row2['writeDate'])) : $row2['writeDate'], 'ticket' => nl2br(htmlspecialchars(stripslashes($row2['message']))),'writer' => (trim($row2['vname'] . ' ' . $row2['name']) != '') ? trim($row2['vname'] . ' ' . $row2['name']) : $row2['cname']);
}

View File

@ -95,7 +95,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
$query = $sql->prepare("SELECT v.`id`,v.`ip`,v.`port`,v.`dns`,m.`usedns` FROM `voice_server` v INNER JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`id`=? AND v.`userid`=? AND v.`resellerid`=? LIMIT 1");
$query->execute(array($ui->id('serverID', 30, 'post'), $user_id, $reseller_id));
foreach ($query->fetchall(PDO::FETCH_ASSOC) as $row) {
$display = $sprache->server . ' ' . $row['ip'] . ':' . $row['port'];
$display = $row['ip'] . ':' . $row['port'];
}
$query = $sql->prepare("SELECT v.`id`,v.`ip`,v.`port`,v.`dns`,m.`usedns` FROM `voice_server` v INNER JOIN `voice_masterserver` m ON v.`masterserver`=m.`id` WHERE v.`userid`=? AND v.`resellerid`=? ORDER BY v.`ip`,v.`port`");

View File

@ -0,0 +1,3 @@
<?php foreach($table as $k=>$v){ ?>
<option value="<?php echo $k;?>" ><?php echo $v;?></option>>
<?php } ?>

View File

@ -0,0 +1,7 @@
<section class="content">
<div class="box box-info">
<div class="box-body">
<?php if (isset($template_file))echo $template_file; ?>
</div>
</div>
</section>

View File

@ -1,7 +1,7 @@
<section class="content-header">
<h1><?php echo $gsprache->template.' '.$gsprache->add;?></h1>
<ol class="breadcrumb">
<li><a href="userpanel.php"><i class="fa fa-home"></i> Home</a></li>
<li><a href="userpanel.php"><i class="fa fa-home"></i> Home</a></li>
<li><a href="<?php echo $targetFile;?>?w=gt"><?php echo $gsprache->gameserver.' '.$gsprache->file.' '.$gsprache->template;?></a></li>
<li class="active"><?php echo $gsprache->add;?></li>
</ol>
@ -12,36 +12,43 @@
<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">
<input type="hidden" name="token" value="<?php echo token();?>">
<input type="hidden" name="action" value="ad">
<div class="control-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;?>">
<?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>
<div id="mods" class="control-group<?php if(isset($errors['servertype'])) echo ' error';?>">
<label for="inputServertype"><?php echo $sprache->game;?></label>
<?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">
<input type="hidden" name="token" value="<?php echo token();?>">
<input type="hidden" name="action" value="ad">
<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;?>">
</div>
<div id="mods" class="form-group<?php if(isset($errors['servertype'])) echo ' error';?>">
<label for="inputServertype"><?php echo $sprache->game;?></label>
<select class="form-control" id="inputServertype" name="servertype">
<?php foreach ($table as $k=>$v) { ?>
<option value="<?php echo $k;?>" <?php if($k==$servertype) echo 'selected="selected"'; ?>><?php echo $v;?></option>
<?php } ?>
</select>
</div>
<br/>
<div class="input-group<?php if(isset($errors['content'])) echo ' error';?>">
<label class="input-group-addon" for="inputContent"><?php echo $gsprache->template;?></label>
<textarea class="form-control" id="inputContent" rows="20" name="content"><?php echo $content;?></textarea>
</div>
</div>
</div>
<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>
</div>
<div class="form-group">
<label class="control-label" for="inputEdit"></label>
<button class="btn btn-primary" id="inputEdit" type="submit"><i class="fa fa-plus"> <?php echo $gsprache->add;?></i></button>
</div>
</form>
</div>
</div>
<label class="control-label" for="inputEdit"></label>
<button class="btn btn-primary" id="inputEdit" type="submit"><i class="fa fa-plus"> <?php echo $gsprache->add;?></i></button>
</form>
</section>

View File

@ -1,7 +1,7 @@
<section class="content-header">
<h1><?php echo $gsprache->template.' '.$gsprache->del;?></h1>
<ol class="breadcrumb">
<li><a href="userpanel.php"><i class="fa fa-home"></i> Home</a></li>
<li><a href="userpanel.php"><i class="fa fa-home"></i> Home</a></li>
<li><a href="<?php echo $targetFile;?>?w=im"><?php echo $gsprache->template;?></a></li>
<li><?php echo $gsprache->del;?></li>
<li class="active"><?php echo $name;?></li>
@ -10,18 +10,23 @@
<!-- Main Content -->
<section class="content">
<div class="box box-info">
<div class="box-body">
<form role="form" action="<?php echo $targetFile;?>?w=gt&amp;d=dl&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();?>">
<input type="hidden" name="action" value="dl">
<div class="input-group">
<label class="input-group-addon"><i class="fa fa-file"></i></label>
<span class="form-control"><?php echo $name;?></span>
</div>
<div class="box box-info">
<div class="box-body">
<form role="form" action="<?php echo $targetFile;?>?w=gt&amp;d=dl&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();?>">
<input type="hidden" name="action" value="dl">
<div class="form-group">
<label for="inputName"><?php echo $sprache->description;?></label>
<input class="form-control" id="inputName" type="text" name="name" value="<?php echo $name;?>" disabled="disabled">
</div>
<div class="form-group">
<label class="control-label" for="inputEdit"></label>
<button class="btn btn-danger" id="inputEdit" type="submit"><i class="fa fa-trash-o"> <?php echo $gsprache->del;?></i></button>
</div>
</form>
</div>
</div>
<label class="control-label" for="inputEdit"></label>
<button class="btn btn-danger" id="inputEdit" type="submit"><i class="fa fa-trash-o"> <?php echo $gsprache->del;?></i></button>
</form>
</section>

View File

@ -8,7 +8,7 @@
<!-- 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></span></a>
<?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">

View File

@ -1,7 +1,7 @@
<section class="content-header">
<h1><?php echo $gsprache->template.' '.$gsprache->mod;?></h1>
<ol class="breadcrumb">
<li><a href="userpanel.php"><i class="fa fa-home"></i> Home</a></li>
<li><a href="userpanel.php"><i class="fa fa-home"></i> Home</a></li>
<li><a href="<?php echo $targetFile;?>?w=gt"><?php echo $gsprache->gameserver.' '.$gsprache->file.' '.$gsprache->template;?></a></li>
<li><?php echo $gsprache->mod;?></li>
<li class="active"><?php echo $name;?></li>
@ -13,36 +13,42 @@
<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();?>">
<input type="hidden" name="action" value="md">
<div class="control-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;?>">
<?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>
<div id="mods" class="control-group<?php if(isset($errors['servertype'])) echo ' error';?>">
<label for="inputServertype"><?php echo $sprache->game;?></label>
<?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();?>">
<input type="hidden" name="action" value="md">
<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;?>">
</div>
<div id="mods" class="form-group<?php if(isset($errors['servertype'])) echo ' error';?>">
<label for="inputServertype"><?php echo $sprache->game;?></label>
<select class="form-control" id="inputServertype" name="servertype">
<?php foreach ($table as $k=>$v) { ?>
<option value="<?php echo $k;?>" <?php if($k==$servertype) echo 'selected="selected"'; ?>><?php echo $v;?></option>
<?php } ?>
</select>
</div>
<br/>
<div class="input-group<?php if(isset($errors['content'])) echo ' error';?>">
<label class="input-group-addon" for="inputContent"><?php echo $gsprache->template;?></label>
<textarea class="form-control" id="inputContent" rows="20" name="content"><?php echo $content;?></textarea>
</div>
</div>
</div>
<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>
</div>
<div class="form-group">
<label class="control-label" for="inputEdit"></label>
<button class="btn btn-primary" id="inputEdit" type="submit"><i class="fa fa-edit"> <?php echo $gsprache->mod;?></i></button>
</div>
</form>
</div>
</div>
<label class="control-label" for="inputEdit"></label>
<button class="btn btn-primary" id="inputEdit" type="submit"><i class="fa fa-plus"> <?php echo $gsprache->mod;?></i></button>
</form>
</section>