diff --git a/registration-system/index.php b/registration-system/index.php index 86f637df1032d2e37f648f1ddf3b6d9608050c4d..b1d7c38e9a95bee270abe5ec94e8bee0c212df34 100644 --- a/registration-system/index.php +++ b/registration-system/index.php @@ -48,7 +48,10 @@ function index_show_content(){ comm_verbose(1,"Formular bekommen"); $data = index_check_form(); if(!is_null($data)) + { index_form_to_db($data); + echo 'Anmeldung erfolgreich.'; + } } /*elseif(isset($_REQUEST['bid'])){ // Änderungsformular anzeigen, Anmeldung noch offen? index_show_formular($fid, $_REQUEST['bid']); } */ else { // leeres Formular anzeigen @@ -362,7 +365,8 @@ function index_show_formular_helper_input($name, $id, $value, $subtext){ function index_show_alleFahrten(){ global $index_db; comm_verbose(2,"Liste aller Fahrten (Jahr, Ziel, Zeitraum, Anz. Mitfahrer)"); - $foos = $index_db->select("fahrten",array('fahrt_id','titel','ziel','von','bis','beschreibung','leiter','kontakt')); + echo '<h2>Anmeldung zur Fachschaftsfahrt</h2>'; + $foos = $index_db->select("fahrten",array('fahrt_id','titel','ziel','von','bis','beschreibung','leiter','kontakt'), "ORDER BY fahrt_id DESC"); foreach($foos as $foo){ index_show_fahrtHeader($foo); } diff --git a/registration-system/view/captcha.php b/registration-system/view/captcha.php new file mode 100644 index 0000000000000000000000000000000000000000..db38a233f86676decd251911d0369d90b4865730 --- /dev/null +++ b/registration-system/view/captcha.php @@ -0,0 +1,36 @@ +<?php + +function captchaForCode($code) +{ + $img = imagecreatetruecolor(320,96); + + $bgcol = imagecolorallocate($img, 0, 0, rand(0, 40)); + $code_len = strlen($code); + if ($code_len < 1) { + die("Not OK"); + } + imagefill($img, 0, 0, $bgcol); + for($x = 0; $x < $code_len; $x++){ + $col = imagecolorallocate($img, rand(80, 255), rand(80, 255), rand(80, 255)); + imagettftext($img, 40, 0, 20 + (45 * $x), 64, $col, "km.ttf", substr($code, $x, 1)); + } + + header('Content-Type: image/png'); + header('Cache-control: no-cache, no-store'); + + // Send image + imagepng($img); + imagedestroy($img); +} +function generateRandomString($length = 6) { + $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; // abcdefghijklmnopqrstuvwxyz + $randomString = ''; + for ($i = 0; $i < $length; $i++) { + $randomString .= $characters[rand(0, strlen($characters) - 1)]; + } + return $randomString; +} + +captchaForCode(generateRandomString()); + +?> diff --git a/registration-system/view/default_index.php b/registration-system/view/default_index.php index 9f9ead8367fb009391f52b3fd8ed86693c54a6fa..6d2b2e8fd31e2261e063942a6f4fad1db2026794 100644 --- a/registration-system/view/default_index.php +++ b/registration-system/view/default_index.php @@ -27,7 +27,7 @@ </div> -<div id="footerbox">© 2014 Fachschaftsinitiative Informatik der Humboldt Universität zu Berlin.</div> +<div id="footerbox">©<?php echo date("Y"); ?> Fachschaftsinitiative Informatik der Humboldt Universität zu Berlin.</div> <img src="view/graphics/studityp_5.gif" style="position: fixed;bottom: 5px;left:0px" /> </div> diff --git a/registration-system/view/js/story.js b/registration-system/view/js/story.js index 9c9f1db36a3eb74cec99b38631e97bc5bcd804dc..0c49084fab91f5ad92421870c4a9d974d38a1eba 100644 --- a/registration-system/view/js/story.js +++ b/registration-system/view/js/story.js @@ -156,7 +156,7 @@ Story.prototype.next = function(bGoBack) } Story.prototype.initBeginButton = function() { - this.storyhead.append('<div style="cursor:pointer; text-decoration: underline" onclick="story.next()">Anmeldung starten (Story mode)</a>'); + this.storyhead.append('<div style="text-align: center; cursor:pointer; text-decoration: underline" onclick="story.next()">Anmeldung starten (Story mode)</a>'); } Story.prototype.initTravelStartAnimation = function() { diff --git a/registration-system/view/km.ttf b/registration-system/view/km.ttf new file mode 100644 index 0000000000000000000000000000000000000000..b4d2c19bbcd1062674cf1341c48126268ab12cfe Binary files /dev/null and b/registration-system/view/km.ttf differ diff --git a/registration-system/view/style.css b/registration-system/view/style.css index d07843e47eaca45af80e781c047b7db2ee5c618a..d88c82565c894dff6d9ad3b63bedf4ab0dd60d77 100644 --- a/registration-system/view/style.css +++ b/registration-system/view/style.css @@ -41,6 +41,7 @@ div#headerbox { } div#menubox { + padding-top:5px; border-bottom: 1px solid black; -webkit-box-shadow: inset 0px 6px 6px 0px rgba(150, 150, 150, 0.75); -moz-box-shadow: inset 0px 6px 6px 0px rgba(150, 150, 150, 0.75);