Coldcut Site Admin


Anmeldungsdatum: Jun 16, 2005 Beiträge: 876 Wohnort: Austria
|
Verfasst am: Fr Dez 28, 2007 11:02 am Titel: Bunte Security-Code Grafik |
|
|
Eine Securtiy-Code Grafik die Bunt ist? Kein Problem!
Die Farbe ändert sich bei jedem Refresh der Seite neu, also ist nie der selbe Hintergrund zu sehen.
Dazu müsst Ihr in der modules/Your_Account/index.php nach function gfx($random_num) suchen und diese Funktion mit der folgenden ersetzen:
| Code: | function gfx($random_num) {
global $prefix, $db;
require("config.php");
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
$circles=5;
$width=100;
$height=40;
$font=5;
$fontwidth = ImageFontWidth($font) * strlen($string);
$fontheight = ImageFontHeight($font);
$im = @imagecreate ($width,$height);
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, rand(0,100), rand(0,100),rand(0,100)); // Random Text
for ($i=1;$i<=$circles;$i++) {
$randomcolor = imagecolorallocate ($im , rand(100,255),rand(100,255),rand(100,255));
imagefilledellipse($im,rand(0,$width-10),rand(0,$height-3),rand(20,70),rand(20,70),$randomcolor);
}
imagerectangle($im,0,0,$width-1,$height-1,$text_color);
imagestring ($im, $font, 12, 12,$code,$text_color);
header ("Content-type: image/jpeg");
imagejpeg ($im,'',80);
ImageDestroy($im);
die();
} |
Diese Grafik wird auch bei der Neuregistrierung angezeigt. Der Admineinlogbereich bleibt davon befreit. _________________ CiroxX©™ Development Team
----------
"Dann klappts auch mit der Nachbarin!"
- - - - - - - - - - -
-> Hinweis: Nur registrierte Benutzer haben die Möglichkeit in diesem Forum "Links" zu sehen! Bitte Registrieren oder Einloggen - Danke! | <- |
|