dodanie wyswietlania planu

This commit is contained in:
User Kill3rs4 2022-02-01 09:00:34 +01:00
commit f3174a810f
6 changed files with 290 additions and 0 deletions

1
backend Symbolic link
View File

@ -0,0 +1 @@
backend/

1
logs/access Symbolic link
View File

@ -0,0 +1 @@
/usr/local/devil/logs/httpd/users/kill3rs4/backend.kill3rs4.usermd.net

1
public_html/.env Normal file
View File

@ -0,0 +1 @@
CORS_POLICY=.

144
public_html/index.html Normal file
View File

@ -0,0 +1,144 @@
<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" type="image/x-icon" href="https://www.mydevil.net/favicon.ico" />
<meta charset="UTF-8" />
<meta name="description" content="backend.kill3rs4.usermd.net - strona hostowana na MyDevil.net" />
<title>backend.kill3rs4.usermd.net - strona hostowana na MyDevil.net</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
border: 0;
}
html,
body {
width:100%;
height:100%;
margin:0;
padding:0;
}
body {
background: #fff;
font-family: 'Open Sans', Arial, Verdana;
font-size: 13px;
color: #737373;
}
html {display:table;}
body {
display:table-cell;
vertical-align:middle;
}
h1 {
color: #FFF;
font-size: 96px;
font-weight: normal;
margin-bottom: 20px;
float: left;
padding-top: 48px;
width: 300px;
height: 342px;
background: url('https://static.mydevil.net/logo5.png') no-repeat center center;
}
h2 {
color: #333;
font-size: 25px;
font-weight: normal;
margin-bottom: 20px;
}
h3 {
color: #444;
font-size: 18px;
font-weight: normal;
margin-bottom: 14px;
}
h1 span {
display: block;
margin-left: 88px;
margin-top: 65px;
width: 213px;
text-align: center;
}
p {
margin-top: 7px;
margin-bottom: 7px;
}
p:first-child {
margin-top: 0;
}
#mainwrapper {
width: 900px;
margin: 0 auto;
}
a {
color: #FF0000;
text-decoration: none;
}
a:hover, a:focus {
text-decoration: underline;
}
#footer {
/*border-top: 1px solid #DEDEDE;*/
text-align: right;
margin-top: 5px;
padding-top: 5px;
}
a.footer {
color: #333 !important;
}
a.footer strong {
color: #000;
}
a.footer span {
color: #ff0000;
}
#main {
float: right;
width: 520px;
padding-left: 50px;
background: url('https://static.mydevil.net/grad.png') no-repeat left center;
height: 230px;
padding-top: 30px;
margin-top: 65px;
}
span.grey {
color: #D9D9D9;
}
</style>
</head>
<body>
<div id="mainwrapper">
<h1><span>;)</span></h1>
<div id="main">
<h2>backend.kill3rs4.usermd.net</h2>
<h3>Strona dodana prawidłowo</h3>
<p>- Strona znajduje się w katalogu <b>/usr/home/kill3rs4/domains/backend.kill3rs4.usermd.net/public_html</b><br />
- Możesz usunąć ten plik (index.html),<br />
- Pliki możesz umieszczać na serwerze za pomocą protokołu <b>FTP</b>, lub <b>SFTP</b>.</p>
<p class="small">W razie wątpliwości bądź pytań prosimy o <a href="https://www.mydevil.net/kontakt.html" title="MyDevil.net - formularz kontaktowy">kontakt</a>.</p>
<div id="footer">
<a class="footer" href="https://www.mydevil.net">www.<strong>My<span>Devil</span></strong>.net</a><br />
</div>
</div>
</div>
</body>
</html>

87
public_html/plan.php Normal file
View File

@ -0,0 +1,87 @@
<?php header('Access-Control-Allow-Origin: *'); ?>
<!DOCTYPE html>
<html>
<head>
<style>
table {
<body style="background-color:powderblue;">
width: 100%;
border-collapse: collapse;
}
table, td, th {
border: 1px solid black;
padding: 5px;
color:white;
}
th {text-align: left;}
</style>
</head>
<body>
<?php
$q = intval($_GET['q']);
$con = mysqli_connect('mysql49.mydevil.net','m1344_dziennik','Julian2020!','m1344_dziennik');
if (!$con) {
die('Could not connect: ' . mysqli_error($con));
}
mysqli_select_db($con,"ajax_demo");
$sql = "SELECT h1.timestamp, l1.nameLesson as poniedzialek, l2.nameLesson as wtorek, l3.nameLesson as sroda, l4.nameLesson as czwartek, l5.nameLesson as piatek FROM hours as h1\n"
. "\n"
. "LEFT JOIN plan as p1 ON p1.id_day = 1 AND p1.id_hour = h1.id_hour AND p1.id_class = '".$q."'\n"
. "LEFT JOIN lessons AS l1 ON p1.id_lesson = l1.id_lesson\n"
. "LEFT JOIN plan as p2 ON p2.id_day = 2 AND p2.id_hour = h1.id_hour AND p2.id_class = '".$q."'\n"
. "LEFT JOIN lessons AS l2 ON p2.id_lesson = l2.id_lesson\n"
. "LEFT JOIN plan as p3 ON p3.id_day = 3 AND p3.id_hour = h1.id_hour AND p3.id_class = '".$q."'\n"
. "LEFT JOIN lessons AS l3 ON p3.id_lesson = l3.id_lesson\n"
. "LEFT JOIN plan as p4 ON p4.id_day = 4 AND p4.id_hour = h1.id_hour AND p4.id_class = '".$q."'\n"
. "LEFT JOIN lessons AS l4 ON p4.id_lesson = l4.id_lesson\n"
. "LEFT JOIN plan as p5 ON p5.id_day = 5 AND p5.id_hour = h1.id_hour AND p5.id_class = '".$q."'\n"
. "LEFT JOIN lessons AS l5 ON p5.id_lesson = l5.id_lesson\n"
. "\n"
. "ORDER BY h1.id_hour";
$result = mysqli_query($con,$sql);
echo "<table>
<tr>
<th>Godzina</th>
<th>Poniedziałek</th>
<th>Wtorek</th>
<th>Sroda</th>
<th>Czwartek</th>
<th>Piatek</th>
</tr>";
while($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['timestamp'] . "</td>";
echo "<td>" . $row['poniedzialek'] . "</td>";
echo "<td>" . $row['wtorek'] . "</td>";
echo "<td>" . $row['sroda'] . "</td>";
echo "<td>" . $row['czwartek'] . "</td>";
echo "<td>" . $row['piatek'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>
</body>
</html>

56
public_html/uwagi.php Normal file
View File

@ -0,0 +1,56 @@
<?php header('Access-Control-Allow-Origin: *'); ?>
<!DOCTYPE html>
<html>
<head>
<style>
table {
<body style="background-color:powderblue;">
width: 100%;
border-collapse: collapse;
}
table, td, th {
border: 1px solid black;
padding: 5px;
}
th {text-align: left;}
</style>
</head>
<body>
<?php
$q = intval($_GET['q']);
$con = mysqli_connect('mysql49.mydevil.net','m1344_dziennik','Julian2020!','m1344_dziennik');
if (!$con) {
die('Could not connect: ' . mysqli_error($con));
}
mysqli_select_db($con,"ajax_demo");
$sql = "SELECT a1.firstName as imie, a1.surName as nazwisko, u1.tresc as tresc FROM accounts as a1\n"
. "LEFT JOIN uwagi as u1 ON a1.id_account = u1.id_account";
$result = mysqli_query($con,$sql);
echo "<table>
<tr>
<th>Treść</th>
<th>Nazwisko</th>
<th>Treść></th>
</tr>";
while($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['imie'] . "</td>";
echo "<td>" . $row['nazwisko'] . "</td>";
echo "<td>" . $row['tresc'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>
</body>
</html>