Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PHP-Chat
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BA_SST
PHP-Chat
Commits
6f432c63
Commit
6f432c63
authored
Jul 18, 2016
by
Nico Schallehn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Impressum hinzugefügt, und Möglichkeit weitere Seiten einzubinden
parent
0550d85d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
15 deletions
+34
-15
index.php
index.php
+34
-15
No files found.
index.php
View file @
6f432c63
<?php
// Weiterleitung auf HTTPS:
if
(
empty
(
$_SERVER
[
'HTTPS'
])
||
$_SERVER
[
'HTTPS'
]
==
"off"
){
$redirect
=
'https://'
.
$_SERVER
[
'HTTP_HOST'
]
.
$_SERVER
[
'REQUEST_URI'
];
header
(
'HTTP/1.1 301 Moved Permanently'
);
...
...
@@ -8,9 +9,11 @@ if(empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "off"){
include
(
"config.php"
);
$result
=
mysql_query
(
"SELECT * FROM user WHERE name = '
{
$_SESSION
[
'chatuserid'
]
}
'"
);
$users
=
mysql_fetch_array
(
$result
);
//
$result = mysql_query("SELECT * FROM user WHERE name = '{$_SESSION['chatuserid']}'");
//
$users = mysql_fetch_array($result);
// Falls ein Formular bermittelt wurde:
if
(
isset
(
$_POST
[
'ok'
]))
{
if
(
$_POST
[
'ok'
]
==
"Anmelden"
){
...
...
@@ -63,6 +66,33 @@ if(isset($_POST['ok']))
}
// Aufbau der Verschiedenen Seiten:
if
(
$_GET
[
"action"
]
==
"impressum"
){
$content
=
'<div class="page-header">
<h1>Impressum</h1>
</div>
<div class="panel panel-default">
<div class="panel-body">
Dieser Chat wurde im Rahmen des Moduls SST an der BA-Leipzig entwickelt.<br>
Entwickler: Markus B., Markus T., Stanley S., Nico S.
</div>
</div>'
;
}
else
if
(
isset
(
$_GET
[
"action"
])){
$content
=
'<div class="page-header">
<h1>Startseite</h1>
</div>
<div class="panel panel-default">
<div class="panel-body">
'
.
BBcode
(
file_get_contents
(
"
$yourFile
"
))
.
'<br>
<small>Es sind schon '
.
$Useranzahl
.
' an Bord! Es sind '
.
$Useronline
.
' Online!</small><br><br><br>
</div>
</div>'
;
}
else
{
// Startseite
}
?>
<!DOCTYPE html>
<html>
...
...
@@ -134,9 +164,6 @@ if(isset($_POST['ok']))
<button
type=
"submit"
class=
"btn btn-default"
name=
"ok"
value=
"Anmelden"
>
Anmelden
</button>
</form>
</div>
<!-- <div class="panel-footer">
<a href="#" id="showRegBtn" role="button" class="btn btn-info btn-xs">Zur Registrierung wechseln...</a>
</div> -->
</div>
</div>
<div
class=
"col-xs-12"
id=
"registerCol"
style=
"display:none;"
>
...
...
@@ -165,15 +192,7 @@ if(isset($_POST['ok']))
</div>
</div>
<div
class=
"row"
>
<div
class=
"page-header"
>
<h1>
Startseite
</h1>
</div>
<div
class=
"panel panel-default"
>
<div
class=
"panel-body"
>
<?php
echo
BBcode
(
file_get_contents
(
"
$yourFile
"
));
?>
<br>
<small>
<?php
echo
"Es sind schon "
.
$Useranzahl
.
" an Bord! Es sind "
.
$Useronline
.
" Online!"
;
?>
</small><br><br><br>
</div>
</div>
<?php
echo
$content
;
?>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment