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
90f68bc9
Commit
90f68bc9
authored
Jul 18, 2016
by
Markus Bergt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://git@git.ivaya.de/BA_SST/PHP-Chat.git
parents
dc14f0fa
761de0d1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
15 deletions
+41
-15
index.php
index.php
+41
-15
No files found.
index.php
View file @
90f68bc9
<?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,40 @@ 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>404 Not Found</h1>
</div>
<div class="panel panel-default">
<div class="panel-body">
Die Seite konnte leider nicht gefunden werden :-(
</div>
</div>'
;
}
else
{
// Startseite
$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>'
;
}
?>
<!DOCTYPE html>
<html>
...
...
@@ -134,9 +171,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 +199,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