Skip to content

Commit d65f3ae

Browse files
authored
Upload files 1.
1 parent 87cbd34 commit d65f3ae

File tree

18 files changed

+1549
-0
lines changed

18 files changed

+1549
-0
lines changed

config/components.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
//Különösen fontos, hogy 0 értéke legyen:
3+
//ha bármely fiók funkció crash-el, így nem írja ki a felhasználók adatait.
4+
ini_set('display_errors', 0);
5+
ini_set('display_startup_errors', 0);
6+
7+
//Alapvető komponensek
8+
require '../languages/languages.php';
9+
require '../src/realip.php';
10+
require '../src/waf.class.php';
11+
require '../src/sql.class.php';
12+
13+
//Időzóna a naplózáshoz
14+
date_default_timezone_set('Europe/Budapest');
15+
16+
?>

config/dbconnect.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
//EN: Database connection details
4+
5+
$dbhostname = 'localhost'; //IP address or hostname of SQL server
6+
$dbusername = 'root'; //SQL server username
7+
$dbpassword = ''; //User password
8+
$dbname = 'nextcaligo'; //Database name
9+
10+
?>

config/mailconfig.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
use PHPMailer\PHPMailer\PHPMailer;
4+
use PHPMailer\PHPMailer\SMTP;
5+
use PHPMailer\PHPMailer\Exception;
6+
7+
require '../vendor/phpmailer/phpmailer/src/PHPMailer.php';
8+
require '../vendor/phpmailer/phpmailer/src/SMTP.php';
9+
10+
$mail = new PHPMailer;
11+
$mail->isSMTP();
12+
$mail->SMTPAuth = true;
13+
$mail->SMTPDebug = 0;
14+
$mail->Host = ""; //SMTP server ip address or hostname
15+
$mail->Port = 587; //SMTP port
16+
$mail->SMTPSecure = "tls"; //Encryption type
17+
$mail->isHTML(true);
18+
$mail->CharSet = "UTF-8";
19+
20+
$mail->Username = ''; //address - name@domain.tld
21+
$mail->Password = ''; //SMTP account password
22+
$mail->setFrom('', 'Support'); //Sender email address, sender name
23+
24+
?>

includes/footer.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<footer class="footer container-fluid bg-white shadow py-3">
2+
<div class="text-center">
3+
<img src="/theme/img/logo.png" class="d-inline">
4+
<?php echo date("Y"); ?> &#169; NextCaligo - <?php echo $lang['Slogen']; ?>
5+
</div>
6+
<hr>
7+
<div class="container py-3">
8+
<div class="clearfix d-inline">
9+
<p class="float-left">Stütz Erik szakdolgozata</p>
10+
<p class="float-right">
11+
<a href="/about" target="_blank">
12+
<?php echo $lang['ProjectInfo']; ?>
13+
<i class="fas fa-chevron-right"></i>
14+
</a>
15+
</p>
16+
</div>
17+
18+
</div>
19+
</footer>

includes/header.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!-- HTML META -->
2+
<meta charset="UTF-8">
3+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
4+
<meta name="description" content="Távoli és helyi Linux szerverek menedzselő szoftvere">
5+
<meta name="keywords" content="linux, szerverek, menedzsment, szakdolgozat">
6+
<meta name="author" content="Stütz Erik">
7+
8+
<!-- Favicon -->
9+
<link rel="icon" type="image/x-icon" href="/theme/img/favicon.png">
10+
11+
<!-- Saját css -->
12+
<link rel="stylesheet" href="/theme/app.css">
13+
14+
<!-- Material Bootstrap 4 CSS & JS -->
15+
<link rel="stylesheet" href="/theme/mdbootstrap/css/bootstrap.min.css">
16+
<link rel="stylesheet" href="/theme/mdbootstrap/css/mdb.min.css">
17+
<script type="text/javascript" src="/theme/mdbootstrap/js/jquery.min.js"></script>
18+
<script type="text/javascript" src="/theme/mdbootstrap/js/popper.min.js"></script>
19+
<script type="text/javascript" src="/theme/mdbootstrap/js/bootstrap.min.js"></script>
20+
<script type="text/javascript" src="/theme/mdbootstrap/js/mdb.min.js"></script>
21+
22+
<!-- FontAwesome 5 -->
23+
<link rel="stylesheet" href="/theme/fontawesome/css/all.min.css">
24+
25+
<!-- Ország zászlók -->
26+
<link rel="stylesheet" href="/theme/flag-icons/css/flag-icons.min.css">
27+
28+
<!-- ApexCharts -->
29+
<link rel="stylesheet" href="/theme/apexcharts/apexcharts.css">
30+
<script type="text/javascript" src="/theme/apexcharts/apexcharts.min.js"></script>
31+
32+
<!-- Datatables 1 -->
33+
<script src="/theme/datatables/jquery.dataTables.min.js"></script>
34+
<script src="/theme/datatables/dataTables.bootstrap4.min.js"></script>
35+
<link rel="stylesheet" href="/theme/datatables/dataTables.bootstrap4.min.css">
36+
37+
<!-- OS logók -->
38+
<link rel="stylesheet" href="/theme/font-logos/assets/font-logos.css">

includes/integrated_fw.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
//Tűzfal beállítások lekérdezése
4+
$enabled = $db->query('SELECT status FROM firewall WHERE id = ?',
5+
array('1'))->fetchArray();
6+
$fw_enabled = $enabled['status'];
7+
8+
//Ha az értéke 1 akkor meghívja a tűzfal osztályát
9+
if($fw_enabled == 1)
10+
{
11+
$waf = new WebAppFirewall();
12+
$waf->anti_proxy($enabled == TRUE);
13+
}
14+
15+
?>

includes/navbar.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<nav class="navbar navbar-expand-lg navbar-dark primary-color shadow">
2+
<a class="navbar-brand" href="/">
3+
NextCaligo
4+
</a>
5+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#notLoggedNavbar"
6+
aria-controls="notLoggedNavbar" aria-expanded="false" aria-label="Toggle navigation">
7+
<span class="navbar-toggler-icon"></span>
8+
</button>
9+
<div class="collapse navbar-collapse" id="notLoggedNavbar">
10+
<ul class="navbar-nav ml-auto">
11+
<li class="nav-item dropdown">
12+
<a class="nav-link dropdown-toggle" id="langChoose" data-toggle="dropdown"
13+
aria-haspopup="true" aria-expanded="false"><i class="fas fa-language"></i> Languages</a>
14+
<div class="dropdown-menu dropdown-primary" aria-labelledby="langChoose">
15+
<a class="dropdown-item" href="?lang=hu"><span class="fi fi-hu"></span> Magyar</a>
16+
<a class="dropdown-item" href="?lang=en"><span class="fi fi-us"></span> English</a>
17+
</div>
18+
</li>
19+
<?php if(isset($_SESSION['username']))
20+
{ ?>
21+
<li class="nav-item">
22+
<a class="nav-link" href="/account/my">
23+
<i class="fas fa-user"></i>
24+
<?php echo $lang['Welcome']; echo htmlspecialchars($_SESSION['username']); ?>!
25+
</a>
26+
</li>
27+
<li class="nav-item">
28+
<a class="nav-link" href="/logout">
29+
<i class="fas fa-sign-out-alt"></i>
30+
<?php echo $lang['Logout']; ?>
31+
</a>
32+
</li>
33+
<?php } ?>
34+
</ul>
35+
</div>
36+
</nav>

includes/sidebar.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<div class="sidenav">
2+
<?php
3+
$account = $db->query('SELECT * FROM accounts LEFT JOIN permissions
4+
ON accounts.id = permissions.user_id WHERE accounts.username = ?',
5+
array($_SESSION['username']))->fetchArray();
6+
$permission = $account['role'];
7+
?>
8+
<a href="/dashboard"><i class="fas fa-tachometer-alt"></i> <?php echo $lang['Dashboard']; ?></a>
9+
<a href="/servers"><i class="fas fa-server"></i> <?php echo $lang['Servers']; ?></a>
10+
<?php if($permission == 1) { ?>
11+
<a href="/server/connect"><i class="fas fa-plug"></i> <?php echo $lang['Addserver']; ?></a>
12+
<a href="/rootpasswd"><i class="fas fa-key"></i> <?php echo $lang['RootPwd']; ?></a>
13+
<a href="/changehostname"><i class="fas fa-network-wired"></i> <?php echo $lang['ChangeHostname']; ?></a>
14+
<?php } ?>
15+
<a href="/stats"><i class="fas fa-signal"></i> <?php echo $lang['Stats']; ?></a>
16+
<?php if($permission == 1) { ?>
17+
<a href="/reboot"><i class="fas fa-power-off"></i> <?php echo $lang['Reboot']; ?></a>
18+
<?php } ?>
19+
<a href="/machines"><i class="fas fa-cloud"></i> <?php echo $lang['VMs']; ?></a>
20+
<?php if($permission == 1) { ?>
21+
<a href="/firewall"><i class="fas fa-fingerprint"></i> <?php echo $lang['Firewall']; ?></a>
22+
<a href="/logs"><i class="fas fa-list-ul"></i> <?php echo $lang['Logs']; ?></a>
23+
<a href="/accounts"><i class="fas fa-users"></i> <?php echo $lang['Users']; ?></a>
24+
<?php } ?>
25+
<a href="/account/my"><i class="fas fa-user"></i> <?php echo $lang['MyAccount']; ?></a>
26+
</div>

installer/000-default.conf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<VirtualHost *:80>
2+
# The ServerName directive sets the request scheme, hostname and port that
3+
# the server uses to identify itself. This is used when creating
4+
# redirection URLs. In the context of virtual hosts, the ServerName
5+
# specifies what hostname must appear in the request's Host: header to
6+
# match this virtual host. For the default virtual host (this file) this
7+
# value is not decisive as it is used as a last resort host regardless.
8+
# However, you must set it for any further virtual host explicitly.
9+
#ServerName www.example.com
10+
11+
ServerAdmin webmaster@localhost
12+
DocumentRoot /var/www/public
13+
14+
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
15+
# error, crit, alert, emerg.
16+
# It is also possible to configure the loglevel for particular
17+
# modules, e.g.
18+
#LogLevel info ssl:warn
19+
20+
ErrorLog ${APACHE_LOG_DIR}/error.log
21+
CustomLog ${APACHE_LOG_DIR}/access.log combined
22+
23+
# For most configuration files from conf-available/, which are
24+
# enabled or disabled at a global level, it is possible to
25+
# include a line for only one particular virtual host. For example the
26+
# following line enables the CGI configuration for this host only
27+
# after it has been globally disabled with "a2disconf".
28+
#Include conf-available/serve-cgi-bin.conf
29+
</VirtualHost>
30+
31+
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

0 commit comments

Comments
 (0)