Initial commit: legacy WOPS PHP application
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
#requires php-gd and reload apache
|
||||
session_name('wportal');
|
||||
session_start();
|
||||
unset($_SESSION['captcha_spam']);
|
||||
|
||||
function randomString($len) {
|
||||
function make_seed(){
|
||||
list($usec , $sec) = explode (' ', microtime());
|
||||
return (float) $sec + ((float) $usec * 100000);
|
||||
}
|
||||
srand(make_seed());
|
||||
|
||||
//Der String $possible enthält alle Zeichen, die verwendet werden sollen
|
||||
$possible="ABCDEFGHJKLMNPRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789";
|
||||
$str="";
|
||||
while(strlen($str)<$len) {
|
||||
$str.=substr($possible,(rand()%(strlen($possible))),1);
|
||||
}
|
||||
return($str);
|
||||
}
|
||||
|
||||
$text = randomString(5); //Die Zahl bestimmt die Anzahl stellen
|
||||
$_SESSION['captcha_spam'] = $text;
|
||||
|
||||
header('Content-type: image/png');
|
||||
$img = ImageCreateFromPNG("captcha.PNG"); //Backgroundimage
|
||||
$color = ImageColorAllocate($img, 0, 0, 0); //Farbe
|
||||
$ttf = "./XFILES.TTF"; //Schriftart
|
||||
$ttfsize = 25; //Schriftgrösse
|
||||
$angle = rand(0,5);
|
||||
$t_x = rand(5,30);
|
||||
$t_y = 35;
|
||||
imagettftext($img, $ttfsize, $angle, $t_x, $t_y, $color, $ttf, $text);
|
||||
imagepng($img);
|
||||
imagedestroy($img);
|
||||
?>
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ACCESS DENIED!</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="author" content="Maximilian Wieser">
|
||||
<!--[if lte IE 8]><script src="js/html5shiv.js"></script><![endif]-->
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="js/skel.min.js"></script>
|
||||
<script src="js/skel-layers.min.js"></script>
|
||||
<script src="js/init.js"></script>
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="css/skel.css" />
|
||||
<link rel="stylesheet" href="css/style.css" />
|
||||
<link rel="stylesheet" href="css/style-xlarge.css" />
|
||||
<link rel="stylesheet" href="css/font-awesome.min.css">
|
||||
</noscript>
|
||||
<link rel="stylesheet" href="css/superslides.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>ACCESS DENIED!</h1>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user