$gray = imagecolorallocate($img, 102, 102, 102); imagefill($img, 0, 0, $gray); imagestring($img, 3, 14, 3, $key, $black); imagegif($img); imagedestroy($img); } elseif (function_exists('imagepng')) { header('Content-type: image/png'); $img = imagecreate(69, 20); $black = imagecolorallocate($img, 255, 255, 255); $gray = imagecolorallocate($img, 102, 102, 102); imagefill($img, 0, 0, $gray); imagestring($img, 3, 14, 3, $key, $black); imagepng($img); imagedestroy($img); } elseif (function_exists('imagewbmp')) { header('Content-type: image/vnd.wap.wbmp'); $img = imagecreate(69, 20); $black = imagecolorallocate($img, 255, 255, 255); $gray = imagecolorallocate($img, 102, 102, 102); imagefill($img, 0, 0, $gray); imagestring($img, 3, 14, 3, $key, $black); imagewbmp($img); imagedestroy($img); } else { $set = esetcookie('checkkey', 'ebak'); @(include 'class/functions.php'); echo ReadFiletext('images/ebak.jpg'); } } ShowKey();
} } //返回变量名 function ecmsReturnKeyVarname($v) { if ($v == 'login') { $name = 'checkloginkey'; } elseif ($v == 'reg') { $name = 'checkregkey'; } elseif ($v == 'info') { $name = 'checkinfokey'; } elseif ($v == 'spacefb') { $name = 'checkspacefbkey'; } elseif ($v == 'spacegb') { $name = 'checkspacegbkey'; } elseif ($v == 'gbook') { $name = 'checkgbookkey'; } elseif ($v == 'feedback') { $name = 'checkfeedbackkey'; } elseif ($v == 'getpassword') { $name = 'checkgetpasskey'; } elseif ($v == 'regsend') { $name = 'checkregsendkey'; } else { $name = 'checkplkey'; } return $name; } $v = $_GET['v']; ShowKey($v);