mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
parent
2f22b9d66d
commit
066ebfc930
29
web/ajax.php
29
web/ajax.php
@ -91,15 +91,25 @@ if ($ui->smallletters('w', 9, 'get') == 'datatable') {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_joblog.php');
|
||||
|
||||
// ipbans
|
||||
// IP bans
|
||||
} else if ($ui->smallletters('d', 6, 'get') =='ipbans' and isset($admin_id) and isset($reseller_id) and $reseller_id == 0 and $pa['ipBans']) {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_ipbans.php');
|
||||
|
||||
// App server
|
||||
} else if ($ui->smallletters('d', 9, 'get') =='appserver' and isset($admin_id) and isset($reseller_id) and isset($resellerLockupID) and $pa['roots']) {
|
||||
// custom module
|
||||
} else if ($ui->smallletters('d', 12, 'get') =='custommodule' and isset($admin_id) and isset($reseller_id) and $reseller_id == 0 and $pa['root']) {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_appserver.php');
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_custommodule.php');
|
||||
|
||||
// List of imported news feeds
|
||||
} else if ($ui->smallletters('d', 16, 'get') =='feedsnewsentries' and isset($admin_id) and isset($reseller_id) and isset($resellerLockupID) and $pa['addons']) {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_feedsnewsentries.php');
|
||||
|
||||
// List of feeds
|
||||
} else if ($ui->smallletters('d', 5, 'get') =='feeds' and isset($admin_id) and isset($reseller_id) and isset($resellerLockupID) and $pa['addons']) {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_feeds.php');
|
||||
|
||||
// App (GS + Tools) masterserver
|
||||
} else if ($ui->smallletters('d', 15, 'get') =='appmasterserver' and isset($admin_id) and isset($reseller_id) and isset($resellerLockupID) and $pa['masterServer']) {
|
||||
@ -116,15 +126,10 @@ if ($ui->smallletters('w', 9, 'get') == 'datatable') {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_gameaddons.php');
|
||||
|
||||
// List of imported news feeds
|
||||
} else if ($ui->smallletters('d', 16, 'get') =='feedsnewsentries' and isset($admin_id) and isset($reseller_id) and isset($resellerLockupID) and $pa['addons']) {
|
||||
// App server
|
||||
} else if ($ui->smallletters('d', 9, 'get') =='appserver' and isset($admin_id) and isset($reseller_id) and isset($resellerLockupID) and $pa['roots']) {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_feedsnewsentries.php');
|
||||
|
||||
// List of feeds
|
||||
} else if ($ui->smallletters('d', 5, 'get') =='feeds' and isset($admin_id) and isset($reseller_id) and isset($resellerLockupID) and $pa['addons']) {
|
||||
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_feeds.php');
|
||||
require_once(EASYWIDIR . '/stuff/ajax/datatable_appserver.php');
|
||||
|
||||
// Code wise it seems odd, but this way we can get plausible userIDs for following queries up front
|
||||
} else {
|
||||
|
@ -48,12 +48,12 @@ $logusername = getusername($admin_id);
|
||||
$logusertype = 'admin';
|
||||
$logreseller = 0;
|
||||
$logsubuser = 0;
|
||||
$sprache = getlanguagefile('modules',$user_language,$reseller_id);
|
||||
$sprache = getlanguagefile('modules', $user_language, $reseller_id);
|
||||
|
||||
unset($name);
|
||||
|
||||
# array with easy-wi core modules to prevent legacy issues and users from removing
|
||||
$table = array(
|
||||
$coreModules = array(
|
||||
1 => array('id' => 1, 'active' => 'Y', 'name' => $gsprache->gameserver, 'sub' => 'gs', 'type' => $sprache->type_core),
|
||||
2 => array('id' => 2, 'active' => 'Y', 'name' => 'Easy Anti Cheat', 'sub' => 'ea', 'type' => $sprache->type_core),
|
||||
3 => array('id' => 3, 'active' => 'Y', 'name' => 'MySQL', 'sub' => 'my', 'type' => $sprache->type_core),
|
||||
@ -66,6 +66,24 @@ $table = array(
|
||||
10 => array('id' => 10, 'active' => 'Y', 'name' => $gsprache->webspace, 'sub' => 'ws', 'type' => $sprache->type_core)
|
||||
);
|
||||
|
||||
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `modules` WHERE `type`='C' AND `get`=? LIMIT 1");
|
||||
$query2 = $sql->prepare("INSERT INTO `modules` (`file`,`get`,`sub`,`type`,`active`) VALUES ('',?,?,'C',?) ON DUPLICATE KEY UPDATE `active`=VALUES(`active`)");
|
||||
$query3 = $sql->prepare("INSERT INTO `translations` (`type`,`transID`,`lang`,`text`,`resellerID`) VALUES ('mo',?,?,?,?) ON DUPLICATE KEY UPDATE `text`=VALUES(`text`)");
|
||||
|
||||
foreach ($coreModules as $module) {
|
||||
|
||||
$query->execute(array($module['sub']));
|
||||
|
||||
if ((int) $query->fetchColumn() == 0) {
|
||||
|
||||
$query2->execute(array($module['sub'], $module['sub'], 'Y'));
|
||||
|
||||
$instertedID = $sql->lastInsertId();
|
||||
|
||||
$query3->execute(array($instertedID, $user_language, $module['name'], 0));
|
||||
}
|
||||
}
|
||||
|
||||
if ($ui->st('action', 'post') and !token(true)) {
|
||||
|
||||
unset($header, $text);
|
||||
@ -82,29 +100,7 @@ if ($ui->st('action', 'post') and !token(true)) {
|
||||
$active = ($ui->active('active', 'post')) ? $ui->active('active', 'post') : 'Y';
|
||||
$langAvailable = getlanguages($template_to_use);
|
||||
|
||||
// Easy-WI core modules should only be (de)activated
|
||||
if ($ui->st('d', 'get') == 'md' and $ui->st('action', 'post') == 'md' and $id < 1001) {
|
||||
|
||||
$query = $sql->prepare("INSERT INTO `modules` (`id`,`file`,`get`,`sub`,`type`,`active`) VALUES (?,'',?,'','C',?) ON DUPLICATE KEY UPDATE `active`=VALUES(`active`)");
|
||||
$query->execute(array($id, (isset($table[$id]['sub'])) ? $table[$id]['sub'] : '', $active));
|
||||
|
||||
$template_file = ($query->rowCount() == 0) ? $spracheResponse->error_table : $spracheResponse->table_add;
|
||||
|
||||
} else if ($ui->st('d', 'get') == 'md' and !$ui->st('action', 'post') and $id < 1001) {
|
||||
|
||||
$name = (isset($table[$id]['name'])) ? $table[$id]['name'] : '';
|
||||
$query = $sql->prepare("SELECT `active` FROM `modules` WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($id));
|
||||
$active = $query->fetchColumn();
|
||||
|
||||
if ($query->rowCount() == 0) {
|
||||
$active = 'Y';
|
||||
}
|
||||
|
||||
$template_file = (isset($table[$id])) ? 'admin_modules_md.tpl' : 'admin_404.tpl';
|
||||
|
||||
// Custom Modules
|
||||
} else if ($id > 1000 or $ui->st('d', 'get') == 'ad') {
|
||||
if ($ui->st('d', 'get') == 'ad' or $ui->st('d', 'get') == 'md') {
|
||||
|
||||
$dbSuccess = false;
|
||||
$file = $ui->config('file', 'post');
|
||||
@ -126,6 +122,8 @@ if ($ui->st('action', 'post') and !token(true)) {
|
||||
|
||||
if ($ui->st('action', 'post')) {
|
||||
|
||||
$coreModuleFound = false;
|
||||
|
||||
if (!$sub or !in_array($sub, array('gs', 'pa', 'mo', 'my', 'ro', 'ti', 'us', 'vo','ws')) ) {
|
||||
$errors['sub'] = $sprache->sub;
|
||||
}
|
||||
@ -156,11 +154,27 @@ if ($ui->st('action', 'post') and !token(true)) {
|
||||
$errors['file'] = $sprache->file;
|
||||
}
|
||||
|
||||
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `modules` WHERE `type`='C' AND `id`=? LIMIT 1");
|
||||
$query->execute(array($id));
|
||||
|
||||
if ($query->fetchColumn() == 1) {
|
||||
|
||||
$errors = array();
|
||||
|
||||
$coreModuleFound = true;
|
||||
}
|
||||
|
||||
if (count($errors) == 0) {
|
||||
|
||||
if ($ui->st('action', 'post') == 'md') {
|
||||
|
||||
if ($coreModuleFound) {
|
||||
$query = $sql->prepare("UPDATE `modules` SET `active`=? WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($active, $id));
|
||||
} else {
|
||||
$query = $sql->prepare("UPDATE `modules` SET `get`=?,`file`=?,`sub`=?,`active`=?,`type`=? WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($get, $file, $sub, $active, $type, $id));
|
||||
}
|
||||
|
||||
if ($query->rowCount() > 0) {
|
||||
$dbSuccess = true;
|
||||
@ -177,6 +191,7 @@ if ($ui->st('action', 'post') and !token(true)) {
|
||||
$id = $sql->lastInsertId();
|
||||
}
|
||||
|
||||
if (!$coreModuleFound) {
|
||||
if ($ui->smallletters('lang', 2, 'post')) {
|
||||
$array = (array) $ui->smallletters('lang', 2, 'post');
|
||||
|
||||
@ -216,6 +231,7 @@ if ($ui->st('action', 'post') and !token(true)) {
|
||||
$dbSuccess = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($dbSuccess === true) {
|
||||
$loguseraction = ($ui->st('d', 'get') == 'md') ? '%mod% %modules% ' . $file : '%add% %modules% ' . $file;
|
||||
@ -237,13 +253,16 @@ if ($ui->st('action', 'post') and !token(true)) {
|
||||
$query = $sql->prepare("SELECT * FROM `modules` WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($id));
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
$active = $row['active'];
|
||||
$file = $row['file'];
|
||||
$sub = $row['sub'];
|
||||
$get = $row['get'];
|
||||
$type = $row['type'];
|
||||
$found = true;
|
||||
}
|
||||
|
||||
$languageTexts = array();
|
||||
|
||||
foreach ($langAvailable as $lg) {
|
||||
$languageTexts[$lg] = '';
|
||||
}
|
||||
@ -277,11 +296,15 @@ if ($ui->st('action', 'post') and !token(true)) {
|
||||
$template_file = 'admin_404.tpl';
|
||||
}
|
||||
|
||||
} else if ($ui->st('d', 'get') == 'dl' and $ui->id('id',10, 'get')) {
|
||||
} else if ($ui->st('d', 'get') == 'dl' and $ui->id('id', 10, 'get')) {
|
||||
|
||||
$id = $ui->id('id',10, 'get');
|
||||
|
||||
if ($id < 1001) {
|
||||
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `modules` WHERE `type`='C' AND `id`=? LIMIT 1");
|
||||
$query->execute(array($id));
|
||||
|
||||
if ($query->fetchColumn() == 1) {
|
||||
|
||||
$template_file = $sprache->error_core;
|
||||
|
||||
} else {
|
||||
@ -315,41 +338,7 @@ if ($ui->st('action', 'post') and !token(true)) {
|
||||
}
|
||||
} else {
|
||||
|
||||
$query = $sql->prepare("SELECT * FROM `modules`");
|
||||
$query2 = $sql->prepare("SELECT `text` FROM `translations` WHERE `type`='mo' AND `transID`=? AND `lang`=? LIMIT 1");
|
||||
$query->execute();
|
||||
|
||||
foreach ($query->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
if (isset($table[$row['id']])) {
|
||||
$table[$row['id']]['active'] = $row['active'];
|
||||
} else {
|
||||
|
||||
$query2->execute(array($row['id'], $user_language));
|
||||
$name = $query2->fetchColumn();
|
||||
|
||||
if (strlen($name) == 0) {
|
||||
$query2->execute(array($row['id'], $rSA['language']));
|
||||
$name = $query2->fetchColumn();
|
||||
}
|
||||
|
||||
if (strlen($name) == 0) {
|
||||
$name = $row['file'];
|
||||
}
|
||||
|
||||
$type = '';
|
||||
|
||||
if ($row['type'] == 'A') {
|
||||
$type = $sprache->type_admin;
|
||||
} else if ($row['type'] == 'P') {
|
||||
$type = $sprache->type_cms;
|
||||
} else if ($row['type'] == 'U') {
|
||||
$type = $sprache->type_user;
|
||||
}
|
||||
|
||||
$table[$row['id']] = array('id' => $row['id'], 'active' => $row['active'], 'name' => $name, 'type' => $type);
|
||||
}
|
||||
}
|
||||
configureDateTables('-1', '1, "asc"', 'ajax.php?w=datatable&d=custommodule');
|
||||
|
||||
$template_file = 'admin_modules_list.tpl';
|
||||
|
||||
}
|
103
web/stuff/ajax/datatable_custommodule.php
Normal file
103
web/stuff/ajax/datatable_custommodule.php
Normal file
@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* File: datatable_custommodule.php.
|
||||
* Author: Ulrich Block
|
||||
* Date: 21.09.14
|
||||
* Contact: <ulrich.block@easy-wi.com>
|
||||
*
|
||||
* This file is part of Easy-WI.
|
||||
*
|
||||
* Easy-WI is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Easy-WI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Easy-WI. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Diese Datei ist Teil von Easy-WI.
|
||||
*
|
||||
* Easy-WI ist Freie Software: Sie koennen es unter den Bedingungen
|
||||
* der GNU General Public License, wie von der Free Software Foundation,
|
||||
* Version 3 der Lizenz oder (nach Ihrer Wahl) jeder spaeteren
|
||||
* veroeffentlichten Version, weiterverbreiten und/oder modifizieren.
|
||||
*
|
||||
* Easy-WI wird in der Hoffnung, dass es nuetzlich sein wird, aber
|
||||
* OHNE JEDE GEWAEHELEISTUNG, bereitgestellt; sogar ohne die implizite
|
||||
* Gewaehrleistung der MARKTFAEHIGKEIT oder EIGNUNG FUER EINEN BESTIMMTEN ZWECK.
|
||||
* Siehe die GNU General Public License fuer weitere Details.
|
||||
*
|
||||
* Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
|
||||
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('AJAXINCLUDED')) {
|
||||
die('Do not access directly!');
|
||||
}
|
||||
|
||||
$sprache = getlanguagefile('modules', $user_language, $resellerLockupID);
|
||||
|
||||
$types = array('A' => $sprache->type_admin, 'P' => $sprache->type_cms, 'U' => $sprache->type_user, 'C' => $sprache->type_core);
|
||||
|
||||
$query = $sql->prepare("SELECT COUNT(`id`) AS `amount` FROM `modules`");
|
||||
$query->execute();
|
||||
|
||||
$array['iTotalRecords'] = $query->fetchColumn();
|
||||
|
||||
if ($sSearch) {
|
||||
|
||||
$translationIDs = array();
|
||||
|
||||
$query = $sql->prepare("SELECT `transID` FROM `translations` WHERE `type`='mo' AND `lang`=:lang AND `text` LIKE :search");
|
||||
$query->execute(array(':lang' => $user_language, ':search' => '%' . $sSearch . '%'));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$translationIDs[] = $row['transID'];
|
||||
}
|
||||
|
||||
$translationInQuery = (count($translationIDs) > 0) ? ' OR m.`id` IN (' . implode(',', $translationIDs) . ')' : '';
|
||||
|
||||
$translationTypeKeys = array();
|
||||
|
||||
foreach ($types as $key => $value) {
|
||||
if (strpos(strtolower($value), strtolower($sSearch)) !== false) {
|
||||
$translationTypeKeys[] = $key;
|
||||
}
|
||||
}
|
||||
|
||||
$translationInQuery .= (count($translationTypeKeys) > 0) ? ' OR m.`type` IN (\'' . implode("','", $translationTypeKeys) . '\')' : '';
|
||||
|
||||
$query = $sql->prepare("SELECT COUNT(`id`) AS `amount` FROM `modules` AS m WHERE `id` LIKE :search $translationInQuery");
|
||||
$query->execute(array(':search' => '%' . $sSearch . '%'));
|
||||
|
||||
$array['iTotalDisplayRecords'] = $query->fetchColumn();
|
||||
} else {
|
||||
$array['iTotalDisplayRecords'] = $array['iTotalRecords'];
|
||||
}
|
||||
|
||||
$orderFields = array(0 => '`name`', 1 => 'm.`id`', 2 => 'm.`active`', 3 => 'm.`type`');
|
||||
|
||||
if (isset($orderFields[$iSortCol]) and is_array($orderFields[$iSortCol])) {
|
||||
$orderBy = implode(' ' . $sSortDir . ', ', $orderFields[$iSortCol]) . ' ' . $sSortDir;
|
||||
} else if (isset($orderFields[$iSortCol]) and !is_array($orderFields[$iSortCol])) {
|
||||
$orderBy = $orderFields[$iSortCol] . ' ' . $sSortDir;
|
||||
} else {
|
||||
$orderBy = 'm.`id` ASC';
|
||||
}
|
||||
|
||||
if ($sSearch) {
|
||||
$query = $sql->prepare("SELECT m.*,(SELECT `text` FROM `translations` WHERE `type`='mo' AND `transID`=m.`id` AND `lang`=:lang LIMIT 1) AS `name` FROM `modules` AS m WHERE m.`id` LIKE :search $translationInQuery ORDER BY $orderBy LIMIT {$iDisplayStart},{$iDisplayLength}");
|
||||
$query->execute(array(':lang' => $user_language, ':search' => '%' . $sSearch . '%'));
|
||||
} else {
|
||||
$query = $sql->prepare("SELECT m.*,(SELECT `text` FROM `translations` WHERE `type`='mo' AND `transID`=m.`id` AND `lang`=? LIMIT 1) AS `name` FROM `modules` AS m ORDER BY $orderBy LIMIT {$iDisplayStart},{$iDisplayLength}");
|
||||
$query->execute(array($user_language));
|
||||
}
|
||||
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$array['aaData'][] = array($row['name'], $row['id'], returnButton($template_to_use, 'ajax_admin_show_status.tpl', '', '', ($row['active'] == 'N') ? 2 : 4, ''), (string) $types[$row['type']], returnButton($template_to_use, 'ajax_admin_buttons_dl.tpl', 'mo', 'dl', $row['id'], $gsprache->del) . ' ' . returnButton($template_to_use, 'ajax_admin_buttons_md.tpl', 'mo', 'md', $row['id'], $gsprache->mod));
|
||||
}
|
@ -641,7 +641,7 @@ $query = "CREATE TABLE IF NOT EXISTS `modules` (
|
||||
`active` enum('Y','N') DEFAULT 'Y',
|
||||
`type` enum('A','C','P','U') DEFAULT 'A',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1001;";
|
||||
) ENGINE=InnoDB;";
|
||||
$add = $sql->prepare($query);
|
||||
$add->execute();
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-info">
|
||||
<div class="box box-danger">
|
||||
|
||||
<form role="form" action="admin.php?w=im&d=dl&id=<?php echo $id;?>&r=im" onsubmit="return confirm('<?php echo $gsprache->sure;?>');" method="post">
|
||||
|
||||
|
@ -15,18 +15,18 @@
|
||||
<table id="dataTable" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $sprache->haupt_ip;?></a></th>
|
||||
<th>ID</a></th>
|
||||
<th><?php echo $sprache->desc;?></a></th>
|
||||
<th><?php echo $sprache->haupt_ip;?></th>
|
||||
<th>ID</th>
|
||||
<th><?php echo $sprache->desc;?></th>
|
||||
<th><?php echo $gsprache->master;?></th>
|
||||
<th><?php echo $gsprache->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th><?php echo $sprache->haupt_ip;?></a></th>
|
||||
<th>ID</a></th>
|
||||
<th><?php echo $sprache->desc;?></a></th>
|
||||
<th><?php echo $sprache->haupt_ip;?></th>
|
||||
<th>ID</th>
|
||||
<th><?php echo $sprache->desc;?></th>
|
||||
<th><?php echo $gsprache->master;?></th>
|
||||
<th><?php echo $gsprache->action;?></th>
|
||||
</tr>
|
||||
|
@ -7,23 +7,31 @@
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main Content -->
|
||||
<section class="content">
|
||||
|
||||
<div class="box box-info">
|
||||
<div class="box-body">
|
||||
|
||||
<?php if (count($errors)>0){ ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><?php echo $gsprache->errors;?></h4>
|
||||
<?php echo implode(', ',$errors);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-success">
|
||||
|
||||
<form role="form" action="admin.php?w=mo&d=ad&r=mo" 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="box-body">
|
||||
|
||||
<div class="form-group<?php if(isset($errors['active'])) echo ' error';?>">
|
||||
<label for="inputActive"><?php echo $sprache->active;?></label>
|
||||
<select class="form-control" id="inputActive" name="active">
|
||||
@ -31,6 +39,7 @@
|
||||
<option value="N" <?php if ($active=='N') echo 'selected="selected"'; ?>><?php echo $gsprache->no;?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['type'])) echo ' error';?>">
|
||||
<label for="inputType"><?php echo $sprache->type;?></label>
|
||||
<select class="form-control" id="inputType" name="type">
|
||||
@ -39,6 +48,7 @@
|
||||
<option value="U" <?php if ($type=='U') echo 'selected="selected"'; ?>><?php echo $sprache->type_user;?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['sub'])) echo ' error';?>">
|
||||
<label for="inputSub"><?php echo $sprache->sub;?></label>
|
||||
<select class="form-control" id="inputSub" name="sub">
|
||||
@ -53,6 +63,7 @@
|
||||
<option value="pa" <?php if ($sub=='pa') echo 'selected="selected"'; ?>>CMS</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['file'])) echo ' error';?>">
|
||||
<label for="inputFile"><?php echo $sprache->file;?></label>
|
||||
<select class="form-control" id="inputFile" name="file">
|
||||
@ -61,23 +72,35 @@
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['get'])) echo ' error';?>">
|
||||
<label for="inputGet"><?php echo $sprache->get;?></label>
|
||||
<input class="form-control" id=inputGet type="text" name="get" value="<?php echo $get;?>">
|
||||
</div>
|
||||
|
||||
<h3><?php echo $sprache->description;?></h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputDescription"><?php echo $sprache->description;?></label>
|
||||
<?php foreach ($langAvailable as $lg) echo '<label class="checkbox inline"><input type="checkbox" checked="checked" name="lang[]" value="'.$lg.'" onclick="textdrop('."'".$lg."'".');"><img src="images/flags/'.$lg.'.png" alt="Flag: '.$lg.'.png"/></label>';?>
|
||||
<?php foreach ($langAvailable as $lg){ ?>
|
||||
<label class="checkbox-inline">
|
||||
<input name="language[]" value="<?php echo $lg;?>" onclick="textdrop('<?php echo $lg;?>');" type="checkbox" checked="checked"> <img src="images/flags/<?php echo $lg;?>.png" alt="Flag: 16_<?php echo $lg;?>'.png"/>
|
||||
</label>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php foreach ($langAvailable as $lg) { ?>
|
||||
<div id="<?php echo $lg;?>" class="form-group <?php echo $array['display'];?>">
|
||||
<div id="<?php echo $lg;?>" class="form-group">
|
||||
<label for="inputLangs-<?php echo $lg;?>"><img src="images/flags/<?php echo $lg;?>.png" alt="Flag: 16_<?php echo $lg;?>'.png"/></label>
|
||||
<input class="form-control" id="inputLangs-<?php echo $lg;?>" type="text" name="translation[<?php echo $lg;?>]" value="<?php echo $ui->description('translation', 'post', $lg);?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<button class="btn btn-success" id="inputEdit" type="submit"><i class="fa fa-plus-circle"> <?php echo $gsprache->add;?></i></button>
|
||||
</div>
|
||||
<label for="inputEdit"></label>
|
||||
<button class="btn btn-primary" id="inputEdit" type="submit"><i class="icon-plus-sign icon-white"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@ -8,30 +8,28 @@
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main Content -->
|
||||
<section class="content">
|
||||
<div class="col-md-6">
|
||||
<div class="box box-info">
|
||||
<div class="box-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt><?php echo $sprache->file;?></dt>
|
||||
<dd><?php echo $moduleFile;?></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-danger">
|
||||
|
||||
<form role="form" action="admin.php?w=mo&d=dl&id=<?php echo $id;?>&r=mo" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="box box-info">
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" action="admin.php?w=mo&d=dl&id=<?php echo $id;?>&r=mo" 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="box-body">
|
||||
<div class="form-group">
|
||||
<label for="inputFile"><?php echo $sprache->file;?></label>
|
||||
<div class="controls"><input type="text" class="form-control" id="inputFile" name="file" value="<?php echo $moduleFile;?>" disabled="disabled"></div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label" for="inputEdit"></label>
|
||||
|
||||
<div class="box-footer">
|
||||
<button class="btn btn-danger" id="inputEdit" type="submit"><i class="fa fa-trash-o"></i> <?php echo $gsprache->del;?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@ -1,39 +1,47 @@
|
||||
<section class="content-header">
|
||||
<h1><?php echo $gsprache->logs;?></h1>
|
||||
<h1><?php echo $gsprache->modules;?></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
|
||||
<li class="active"><?php echo $gsprache->modules;?></li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main Content -->
|
||||
<section class="content">
|
||||
<div class="form-group">
|
||||
<?php echo $gsprache->modules;?> <a href="admin.php?w=mo&d=ad"><span class="btn btn-primary btn-sm"><i class="fa fa-plus"></i></span></a>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo $gsprache->modules;?> <a href="admin.php?w=mo&d=ad"><span class="btn btn-success btn-sm"><i class="fa fa-plus-circle"></i> <?php echo $gsprache->add;?></span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-info">
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-bordered table-hover">
|
||||
<div class="box-body table-responsive">
|
||||
<table id="dataTable" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $sprache->name;?></th>
|
||||
<th>ID</th>
|
||||
<th><?php echo $gsprache->active;?></th>
|
||||
<th><?php echo $sprache->type;?></th>
|
||||
<th><?php echo $gsprache->del;?></a></th>
|
||||
<th><?php echo $gsprache->mod;?></a></th>
|
||||
<th><?php echo $gsprache->action;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($table as $table_row) { ?>
|
||||
<tr class="<?php if($table_row['active']=='Y') echo 'success'; else echo 'error';?>">
|
||||
<td><?php echo $table_row['name'];?></td>
|
||||
<td><?php echo $table_row['type'];?></td>
|
||||
<td><?php if($table_row['id']>1000) { ?><a href="admin.php?w=mo&d=dl&id=<?php echo $table_row['id'];?>" ><span class="btn btn-sm btn-danger"><i class="fa fa-trash-o"></i></span></a><?php } ?></td>
|
||||
<td><a href="admin.php?w=mo&d=md&id=<?php echo $table_row['id'];?>" ><span class="btn btn-sm btn-primary"><i class="fa fa-edit"></i></span></a></td>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th><?php echo $sprache->name;?></th>
|
||||
<th>ID</th>
|
||||
<th><?php echo $gsprache->active;?></th>
|
||||
<th><?php echo $sprache->type;?></th>
|
||||
<th><?php echo $gsprache->action;?></th>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@ -8,31 +8,45 @@
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main Content -->
|
||||
<section class="content">
|
||||
|
||||
<div class="box box-info">
|
||||
<div class="box-body">
|
||||
|
||||
<?php if (count($errors)>0){ ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-error">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<h4><?php echo $gsprache->errors;?></h4>
|
||||
<?php echo implode(', ',$errors);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-info">
|
||||
|
||||
<form role="form" action="admin.php?w=mo&d=md&id=<?php echo $id;?>&r=mo" 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="box-header">
|
||||
<h3 class="box-title"><?php echo $name;?></h3>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<div class="form-group<?php if(isset($errors['active'])) echo ' error';?>">
|
||||
<label for="inputActive"><?php echo $sprache->active;?></label>
|
||||
<select class="form-control" id="inputActive" name="active">
|
||||
<option value="Y"><?php echo $gsprache->yes;?></option>
|
||||
<option value="N" <?php if ($active=='N') echo 'selected="selected"'; ?>><?php echo $gsprache->no;?></option>
|
||||
<option value="N" <?php if ($active=='N') echo 'selected="selected"';?>><?php echo $gsprache->no;?></option>
|
||||
</select>
|
||||
</div>
|
||||
<?php if($id>1000){ ?>
|
||||
|
||||
<?php if($type!='C'){ ?>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['type'])) echo ' error';?>">
|
||||
<label for="inputType"><?php echo $sprache->type;?></label>
|
||||
<select class="form-control" id="inputType" name="type">
|
||||
@ -41,6 +55,7 @@
|
||||
<option value="U" <?php if ($type=='U') echo 'selected="selected"'; ?>><?php echo $sprache->type_user;?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['sub'])) echo ' error';?>">
|
||||
<label for="inputSub"><?php echo $sprache->sub;?></label>
|
||||
<select class="form-control" id="inputSub" name="sub">
|
||||
@ -55,6 +70,7 @@
|
||||
<option value="pa" <?php if ($sub=='pa') echo 'selected="selected"'; ?>>CMS</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['file'])) echo ' error';?>">
|
||||
<label for="inputFile"><?php echo $sprache->file;?></label>
|
||||
<select class="form-control" id="inputFile" name="file">
|
||||
@ -63,27 +79,37 @@
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group<?php if(isset($errors['get'])) echo ' error';?>">
|
||||
<label for="inputGet"><?php echo $sprache->get;?></label>
|
||||
<input class="form-control" id=inputGet type="text" name="get" value="<?php echo $get;?>">
|
||||
</div>
|
||||
|
||||
<h3><?php echo $sprache->description;?></h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputDescription"><?php echo $sprache->description;?></label>
|
||||
<?php foreach ($langAvailable as $lg) { ?>
|
||||
<label class="checkbox inline">
|
||||
<input class="form-control" type="checkbox" name="lang[]" value="<?php echo $lg;?>" onclick="textdrop('<?php echo $lg;?>');" <?php if(isset($lg) and isset($languageTexts[$lg])) echo 'checked="checked"';?>><img src="images/flags/<?php echo $lg;?>.png" alt="Flag: <?php echo $lg;?>.png"/></label>
|
||||
<?php foreach ($langAvailable as $lg){ ?>
|
||||
<label class="checkbox-inline">
|
||||
<input name="lang[]" value="<?php echo $lg;?>" onclick="textdrop('<?php echo $lg;?>');" type="checkbox" <?php if(in_array($lg, $langAvailable)) echo 'checked';?>> <img src="images/flags/<?php echo $lg;?>.png" alt="Flag: 16_<?php echo $lg;?>'.png"/>
|
||||
</label>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php foreach ($langAvailable as $lg) { ?>
|
||||
<div id="<?php echo $lg;?>" class="form-group <?php echo $array['display'];?>">
|
||||
<label for="inputLangs-<?php echo $lg;?>"><img src="images/flags/<?php echo $lg;?>.png" alt="Flag: 16_<?php echo $lg;?>'.png"/></label>
|
||||
<input class="form-control" type="text" id="inputLangs-<?php echo $lg;?>" name="translation[<?php echo $lg;?>]" value="<?php echo $languageTexts[$lg];?>">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<label for="inputEdit"></label>
|
||||
|
||||
<div class="box-footer">
|
||||
<button class="btn btn-primary" id="inputEdit" type="submit"><i class="fa fa-save"> <?php echo $gsprache->save;?></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
Loading…
x
Reference in New Issue
Block a user