Nog tips voor dit script?
<html>
<head>
<meta http-equiv="Content-Language" content="nl">
<meta http-equiv="Content-Type" content="text/html">
<meta name="Title" content="- WesselB.nl | The chat page! -">
<meta name="Author" content="Wessel B">
<meta name="Subject" content="Fun">
<meta name="Description" content="- WesselB.nl | The chat page! -">
<meta name="Keywords" content="wesselb, site, kids, wessel, fun, chat">
<meta name="Language" content="Dutch">
<meta name="Robots" content="All">
<link rel="shortcut icon" href="../Plaatjes/Favicon.ico">
<script type="text/javascript" language="JavaScript">
function Status_Run_1(run)
{
if (run == "run")
{
window.status = "WesselB.nl! | The chat page! News! - - ! !";
setTimeout("Status_Run_2('run')",10);
}
else
{
alert("Lock on status...");
}
}
function Status_Run_2(run)
{
if (run == "run")
{
window.status = "WesselB.nl! | The chat page! News! - - ! !";
setTimeout("Status_Run_1('run')",10);
}
else
{
alert("Lock on status...");
}
}
Status_Run_1('run');
function Titel_Run_1(run)
{
if (run == "run")
{
document.title = "WesselB.nl! | The chat page!";
setTimeout("Titel_Run_2('run')",1000);
}
else
{
alert("Lock on title...");
}
}
function Titel_Run_2(run)
{
if (run == "run")
{
document.title = "WesselB.nl! | The chat page!!";
setTimeout("Titel_Run_1('run')",1000);
}
else
{
alert("Lock on title...");
}
}
Titel_Run_1('run');
function goLoc(loc)
{
document.location = loc;
}
function ReLoad()
{
document.location = document.location;
}
function GoToTop()
{
document.location = "#topofthepage";
}
function GoToDown()
{
document.location = "#downofthepage";
}
</script>
<style type="text/css">
BODY
{
font-family: Arial, Sans Serif;
font-size: 15;
color: #000000;
scrollbar-arrow-color: #000000;
scrollbar-base-color: #969696;
scrollbar-dark-shadow-color: #FFFFFF;
scrollbar-face-color: #FFFFFFF;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #FFFFFF;
}
HR
{
color: #000000;
}
INPUT
{
font-family: Arial, Sans Serif;
font-size: 14;
border-color: #000000;
border-style: solid;
border-width: 1;
background-color: #FFFFFF;
color: #000000;
}
INPUT.knop
{
font-family: Arial, Sans Serif;
font-size: 12;
border-color: #000000;
border-style: solid;
border-width: 1;
background-color: #FFFFFF;
color: #000000;
}
A
{
text-decoration: none;
color: #000000;
}
A:hover
{
text-decoration: none;
color: #FF0000;
}
table.basis
{
border-width: 0;
background-color: #FFFFFF;
}
table.knop
{
border-width: 1;
background-color: #969696;
border-style: solid;
border-color: #000000;
}
</style>
<title>
- WesselB.nl | The chat page! -
</title>
</head>
<body>
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
$ipdat['fopen'] = fopen('IP/IPS.ips','a+');
fclose(fopen('IP/BlokIPS.ips','a+'));
$ipdatf = file('IP/BlokIPS.ips');
$ipdat['count'] = count($ipdatf);
for ($nr = 1; ($nr <= $ipdat['count']-1); $nr++)
{
$adressen = explode(';',$ipdatf[($nr-1)]);
if ($_SERVER['REMOTE_ADDR'] == $adressen[0])
{
echo '<script type="text/javascript" language="JavaScript">
document.location="IP/IP-Blok.php";</script>';
}
}
$paginas = fopen('IP/PaginaOphaal_Teller.ips','a+');
fwrite($paginas,'
');
fclose($paginas);
fwrite($ipdat['fopen'],'IP --> '.$_SERVER['REMOTE_ADDR'].'<-- om tijd --> '.date('H:i:s').' <-- en datum --> '.date('d-m-Y').' <--.<br />
');
fclose($ipdat['fopen']);
switch ($_GET['p'])
{
case 'h_home':
?>
$ipdat['fopen'] = fopen('IP/IPS.ips','a+');
fclose(fopen('IP/BlokIPS.ips','a+'));
$ipdatf = file('IP/BlokIPS.ips');
$ipdat['count'] = count($ipdatf);
for ($nr = 1; ($nr <= $ipdat['count']-1); $nr++)
{
$adressen = explode(';',$ipdatf[($nr-1)]);
if ($_SERVER['REMOTE_ADDR'] == $adressen[0])
{
echo '<script type="text/javascript" language="JavaScript">
document.location="IP/IP-Blok.php";</script>';
}
}
$paginas = fopen('IP/PaginaOphaal_Teller.ips','a+');
fwrite($paginas,'
');
fclose($paginas);
fwrite($ipdat['fopen'],'IP --> '.$_SERVER['REMOTE_ADDR'].'<-- om tijd --> '.date('H:i:s').' <-- en datum --> '.date('d-m-Y').' <--.<br />
');
fclose($ipdat['fopen']);
switch ($_GET['p'])
{
case 'h_home':
?>
<table class="basis" height="100%" width="100%">
<tr height="100%" width="100%">
<td height="100%" width="100%">
<div align="center">
Deze pagina wordt weergeven als een link niet werkt of de pagina bestaat niet.
<br />
Om terug te gaan klik
<a href="index.php">
hier<font color="#000000">.</font>
</a>
</div>
</td>
</tr>
</table>
Code (php)
<table class="basis" height="100%" width="100%">
<tr height="100%" width="100%">
<td height="100%" width="100%">
<div align="center">
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
echo 'Even wachten...<br /><br />';
$_file = file('Login/Logins.txt');
$us = $_POST['user'];
$ps[0] = $_POST['pas'];
$nr = 1;
while ($nr <= count($_file))
{
$pss = explode(';',$_file[($nr-1)]);
if (!($nr == count($_file)))
{
$ps[1] = substr($pss[1],0,(strlen($pss[1])-2));
}
else
{
$ps[1] = $pss[1];
}
if ($us == $pss[0] && $ps[0] == $ps[1])
{
$userfound = '';
$_SESSION['log'] = $pss[0];
echo 'User gevonden! <a href="index.php?p=user">Verder<font color="#000000">...</font></a>';
break;
}
$nr++;
}
if (!(isset($userfound)))
{
echo 'Geen user gevonden.<br /><a href="index.php">Terug<font color="#000000">...</font></a>';
unset($userfond);
}
break;
?>
echo 'Even wachten...<br /><br />';
$_file = file('Login/Logins.txt');
$us = $_POST['user'];
$ps[0] = $_POST['pas'];
$nr = 1;
while ($nr <= count($_file))
{
$pss = explode(';',$_file[($nr-1)]);
if (!($nr == count($_file)))
{
$ps[1] = substr($pss[1],0,(strlen($pss[1])-2));
}
else
{
$ps[1] = $pss[1];
}
if ($us == $pss[0] && $ps[0] == $ps[1])
{
$userfound = '';
$_SESSION['log'] = $pss[0];
echo 'User gevonden! <a href="index.php?p=user">Verder<font color="#000000">...</font></a>';
break;
}
$nr++;
}
if (!(isset($userfound)))
{
echo 'Geen user gevonden.<br /><a href="index.php">Terug<font color="#000000">...</font></a>';
unset($userfond);
}
break;
?>
</div>
</td>
</tr>
</table>
<a name="#topofthepage"></a>
<table class="base">
<tr>
<td>
<table class="knop">
<tr>
<td>
<a href="index.php?p=user">
Home
</a>
</td>
</tr>
</table>
</td>
<td>
<table class="knop">
<tr>
<td>
<a href="javascript:GoToDown()">
Down
</a>
</td>
</tr>
</table>
</td>
<td>
<table class="knop">
<tr>
<td>
<a href="index.php?p=user&p_id=algemeen_forum">
Algemeen forum
</a>
</td>
</tr>
</table>
</td>
<td>
<table class="knop">
<tr>
<td>
<a href="index.php?p=user&p_id=poll">
Poll
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<hr />
Code (php)
<b>
Algemeen forum
</b>
<br /><br />
Code (php)
<b>
Webbeheer
</b>
<br /><br />
<a href="index.php?p=user&p_id=html_editor">
[ Html editor ]
</a>
<br /><br />
Aantal pagina's opgehaald:
<input type="button" value="Reset" name="knop" class="knop" OnClick="javascript:goLoc('index.php?p=user&p_id=reset_ophaalteller');" />
<br /><br />
Alle bezoek met IP(server:remote_addr) en datum:
<br />
<input type="button" value="Reset" name="knop" class="knop" OnClick="javascript:goLoc('index.php?p=user&p_id=reset_ips');" />
<input type="button" value="Blok IP" name="knop" class="knop" OnClick="javascript:goLoc('index.php?p=user&p_id=webbeheer-voegtoe_blok_ip');" />
Code (php)
<b>
Poll
</b>
<br /><br />
Code (php)
Bezig...
<br />
<a href="index.php?p=user&p_id=webbeheer">[ Voltooi ]</a>
Code (php)
<b>
Html editor
</b>
- Open file
<br /><br />
<a href="index.php?p=user&p_id=html_editor-nieuws">
Een regel nieuws
</a>
<br />
<a href="index.php?p=user&p_id=html_editor-login_home">
Login home
</a>
<br /><br />
<a href="index.php?p=user&p_id=webbeheer">
Terug
</a>
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
}
if (isset($_GET['p']) && $_GET['p'] == 'user' && isset($_GET['p_id']) && $_GET['p_id'] == 'html_editor-nieuws' && $_SESSION['log'] == 'wesselb')
{
if (isset($_POST['text']) && ereg('^[a-zA-Z0-9_!.? ]{1,}$',$_POST['text']))
{
fclose(fopen('Text/News.txt','w'));
$dat = fopen('Text/News.txt','a+');
fwrite($dat,$_POST['text']);
fclose($dat);
}
else
{
echo 'Kan niet wijzigen...<br /><br />';
}
?>
}
if (isset($_GET['p']) && $_GET['p'] == 'user' && isset($_GET['p_id']) && $_GET['p_id'] == 'html_editor-nieuws' && $_SESSION['log'] == 'wesselb')
{
if (isset($_POST['text']) && ereg('^[a-zA-Z0-9_!.? ]{1,}$',$_POST['text']))
{
fclose(fopen('Text/News.txt','w'));
$dat = fopen('Text/News.txt','a+');
fwrite($dat,$_POST['text']);
fclose($dat);
}
else
{
echo 'Kan niet wijzigen...<br /><br />';
}
?>
<b>
Html editor
</b>
- Edit file - Een regel nieuws
<br />
<form action="index.php?p=user&p_id=html_editor-nieuws" method="POST">
<input type="text" value="" name="text" size="40" />
<br />
<input type="submit" value="Save">
</form>
<br />
<a href="index.php?p=user&p_id=html_editor">
Terug
</a>
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
}
if (isset($_GET['p']) && $_GET['p'] == 'user' && isset($_GET['p_id']) && $_GET['p_id'] == 'html_editor-login_home' && $_SESSION['log'] == 'wesselb')
{
if (isset($_POST['text']))
{
fclose(fopen('Text/Login_Home.txt','w'));
$dat = fopen('Text/Login_Home.txt','a+');
fwrite($dat,$_POST['text']);
fclose($dat);
}
else
{
echo 'Kan niet wijzigen...<br /><br />';
}
?>
}
if (isset($_GET['p']) && $_GET['p'] == 'user' && isset($_GET['p_id']) && $_GET['p_id'] == 'html_editor-login_home' && $_SESSION['log'] == 'wesselb')
{
if (isset($_POST['text']))
{
fclose(fopen('Text/Login_Home.txt','w'));
$dat = fopen('Text/Login_Home.txt','a+');
fwrite($dat,$_POST['text']);
fclose($dat);
}
else
{
echo 'Kan niet wijzigen...<br /><br />';
}
?>
<b>
Html editor
</b>
- Edit file - Login home
<br />
<form action="index.php?p=user&p_id=html_editor-login_home" method="POST">
<textarea name="text" cols="50" rows="7"></textarea>
<br />
<input type="submit" value="Save">
</form>
<br />
<a href="index.php?p=user&p_id=html_editor">
Terug
</a>
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
}
if (isset($_GET['p']) && $_GET['p'] == 'user' && isset($_GET['p_id']) && $_GET['p_id'] == 'webbeheer-voegtoe_blok_ip' && $_SESSION['log'] == 'wesselb')
{
if (isset($_POST['ip1']) && isset($_POST['ip2']) && $_POST['ip1'] == $_POST['ip2'] && !($_POST['ip1'] == ''))
{
$dat = fopen('IP/BlokIPS.ips','a+');
fwrite($dat,$_POST['ip1'].';
');
fclose($dat);
echo 'Geblokt!<br /><br />';
}
else
{
echo 'Kan niet toevoegen...<br /><br />';
}
?>
}
if (isset($_GET['p']) && $_GET['p'] == 'user' && isset($_GET['p_id']) && $_GET['p_id'] == 'webbeheer-voegtoe_blok_ip' && $_SESSION['log'] == 'wesselb')
{
if (isset($_POST['ip1']) && isset($_POST['ip2']) && $_POST['ip1'] == $_POST['ip2'] && !($_POST['ip1'] == ''))
{
$dat = fopen('IP/BlokIPS.ips','a+');
fwrite($dat,$_POST['ip1'].';
');
fclose($dat);
echo 'Geblokt!<br /><br />';
}
else
{
echo 'Kan niet toevoegen...<br /><br />';
}
?>
<b>
Blok IP
</b>
<br />
<form action="index.php?p=user&p_id=webbeheer-voegtoe_blok_ip" method="POST">
IP : <input type="text" name="ip1" size="10"><br />
Bevestiging IP : <input type="text" name="ip2" size="10">
<br />
<input type="submit" value="Blok">
</form>
<br />
<a href="index.php?p=user&p_id=webbeheer">
Terug
</a>
Code (php)
Bezig...
<br />
<a href="index.php?p=user&p_id=webbeheer">[ Voltooi ]</a>
Code (php)
<b>
Welkom op het forum!
</b>
<br /><br />
<a name="#downofthepage"></a>
<hr />
<table class="base">
<tr>
<td>
<table class="knop">
<tr>
<td>
<a href="index.php?p=logout">
Logout
</a>
</td>
</tr>
</table>
</td>
<td>
<table class="knop">
<tr>
<td>
<a href="javascript:ReLoad()">
Refresh
</a>
</td>
</tr>
</table>
</td>
<td>
<table class="knop">
<tr>
<td>
<a href="javascript:GoToTop()">
Top
</a>
</td>
</tr>
</table>
</td>
<td>
<table class="knop">
<tr>
<td>
<a href="index.php?p=user&p_id=webbeheer">
Webbeheer
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</tr>
</table>
Code (php)
<table class="basis" height="100%" width="100%">
<tr height="100%" width="100%">
<td height="100%" width="100%">
<div align="center">
<form action="index.php?p=login" method="POST">
<b>
Login
</b>
<br />
User :
<input name="user" type="text" value="" />
<br />
Pass :
<input name="pas" type="password" value="" />
<br />
<input type="submit" class="knop" name="knop" value="Login" />
<input type="button" class="knop" name="knop" value="Maak account"
OnClick="javascript:goLoc('index.php?p=m_account');" /><br /><br />
<input type="button" class="knop" name="knop" value="Waarom ben ik hier?"
OnClick="javascript:goLoc('index.php?p=h_home');" />
</form>
</div>
</td>
</tr>
</table>
</body>
</html>
- Voor de Javascript kun je dit ook overwegen.
- Begin je script met al je php-code en zet dan pas aan het einde je html-code. Daarin neem je dan alleen de benodigde echo's op, maar geen functies e.d. Deze staan aan het begin van je script.
- Begin al je scripts altijd met error_reporting(E_ALL);
- Ik ben niet in de Javascript gedoken, maar je webpagina mag daar (in mijn ogen) niet van afhankelijk zijn. Werkt jouw pagina ook zonder Javascript?
ja
en bedankt