it still does not work
you try to see the php code I am using this
what should i edit to get CAPTCHA number 2 (not the default captcha)
and displays in groups 1 and 2
<?php
global $headerinclude, $header, $theme, $footer, $templates, $lang;
$lang->load('member');
$lang->load('messages');
$lang->load('datahandler_user');
$subject = htmlspecialchars_uni(trim($mybb->input['subject']));
$message = htmlspecialchars_uni(trim($mybb->input['message']));
if(!$mybb->user['uid'])
{
$name = htmlspecialchars_uni(trim($mybb->input['name']));
$email = htmlspecialchars_uni(trim($mybb->input['email']));
$usertemplate = '<div class="subject-before">
<label class="subject">{$lang->full_name}</label>:</div>
<div style="float:left;width:590px;font-size:12px;">
<label>
<input type="text" class="textbox" size="50" name="name" value="{$name}" style="width:400px;" />
</label>
</div>
<div style="clear:both;height:20px;"></div>
<div class="subject-before">
<label class="subject">{$lang->email_address}</label>:</div>
<div style="float:left;width:590px;font-size:12px;">
<label>
<input type="text" class="textbox" size="50" name="email" value="{$email}" style="width:400px;" />
</label>
</div>';
$usertemplate = str_replace("\'", "'", addslashes($usertemplate));
eval("\$usertemplate = \"" . $usertemplate . "\";");
}
else
{
$name = $mybb->user['username'];
$email = $mybb->user['email'];
eval("\$usertemplate = \"" . $templates->get('changeuserbox') . "\";");
}
if($mybb->input['action'] == 'do_email' && $mybb->request_method == 'post')
{
verify_post_check($mybb->input['my_post_key']);
if(empty($name))
{
$errors[] = $lang->userdata_missing_username;
}
elseif(strpos($name, '<') !== false || strpos($name, '>') !== false || strpos($name, '&') !== false || my_strpos($name, '\\') !== false || strpos($name, ';') !== false || strpos($name, ',') !== false)
{
$errors[] = $lang->userdata_bad_characters_username;
}
if(empty($email))
{
$errors[] = $lang->userdata_missing_email;
}
elseif(!validate_email_format($email))
{
$errors[] = $lang->userdata_invalid_email_format;
}
if(empty($subject))
{
$errors[] = $lang->error_no_email_subject;
}
if(empty($message))
{
$errors[] = $lang->error_no_email_message;
}
if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && !$mybb->user['uid'])
{
$imagehash = $db->escape_string($mybb->input['imagehash']);
$imagestring = $db->escape_string($mybb->input['imagestring']);
$query = $db->simple_select('captcha', '*', 'imagehash="' . $imagehash . '"');
$imgcheck = $db->fetch_array($query);
if(my_strtolower($imgcheck['imagestring']) != my_strtolower($imagestring) || !$imgcheck['imagehash'])
{
$errors[] = $lang->error_regimageinvalid;
}
$db->delete_query('captcha', 'imagehash="' . $imagehash . '"');
}
if(count($errors) == 0)
{
if($mybb->settings['mail_handler'] == 'smtp')
{
$from = $email;
}
else
{
$from = $name . ' <' . $email . '>';
}
my_mail($mybb->settings['adminemail'], '[' . $mybb->settings['bbname'] . ' ' . $pages['name'] . '] ' . $subject, $message, $from, '', '', false, 'text', '', $email);
redirect($mybb->settings['bburl'], $lang->redirect_emailsent);
}
else
{
$errors = inline_error($errors);
}
}
if($mybb->settings['captchaimage'] == 1 && function_exists('imagepng') && !$mybb->user['uid'])
{
$randomstr = random_str(5);
$imagehash = md5(random_str(12));
$imagearray= array(
'imagehash' => $imagehash,
'imagestring' => $randomstr,
'dateline' => TIME_NOW
);
$db->insert_query('captcha', $imagearray);
eval("\$captcha = \"" . $templates->get('post_captcha') . "\";");
}
$template = '<html>
<head>
<title>' . $pages['name'] . '</title>
<style>
.error {
background: none repeat scroll 0 0 #FF0000;
border: 1px solid transparent;
border-radius: 4px 4px 4px 4px;
color: #FFFFFF;
font-family: Arial,Helvetica,sans-serif;
font-size: 13px;
margin: 0 auto;
padding: 0 0 0 10px;
width: 30%;
}
.subject-before {
float: left;
margin: 3px 20px 0 0;
text-align: right;
width: 180px;
}
.subject {
font-weight: 700;
margin: 0 15px 0 0;
}
.button {
background-color: #F2F2F2;
background-image: -moz-linear-gradient(center top , #F2F2F2 0%, #CCCCCC 100%);
border: 1px solid #B2B2B2;
box-shadow: 0 1px 0 #B2B2B2, 0 1px 0 rgba(255, 255, 255, 0.5) inset;
color: #555555;
text-shadow: 1px 1px rgba(255, 255, 255, 0.5);
font-size: 12px;
height: 23px !important;
line-height: 23px;
padding: 0 15px;
width: auto;
border-radius: 3px 3px 3px 3px;
cursor: pointer;
display: inline-block;
font-family: Sans-serif;
font-weight: 700;
overflow: hidden;
position: relative;
text-decoration: none !important;
}
.button:hover, .button:focus {
background: none repeat scroll 0 0 #E5E5E5;
}
.button a {
text-decoration: none;
}
.button img {
border-right: 1px solid rgba(20, 20, 20, 0.125);
display: block;
float: left;
margin-left: -14px;
margin-right: 10px;
padding: 1px 5px 5px;
}
.con {
font-family: Arial,Helvetica,sans-serif;
font-size: 14px;
margin: 0 auto;
width: 860px;
}
.logo-con {
margin: 0 0 0 660px;
position: absolute;
}
.con-body {
-moz-border-radius:20px;
-webkit-border-radius:20px;
border-radius:20px;
background:#FFFFFF;
box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.3);
}
.con-head {
background-color:#6B8E23;
-moz-border-radius:20px 20px 0 0;
-webkit-border-radius:20px 20px 0 0;
border-radius:20px 20px 0 0;
padding:0px 20px 10px 20px;
}
.contact-us {
float: left;
margin: 0;
}
.contact-us h1 {
color: #FFFFFF;
font-size: 24px;
font-weight: 700;
margin: 0;
text-shadow: 1px 1px 0 #DA9707;
}
.notic {
float: left;
color: rgb(244, 183, 54);
line-height: 24px;
padding-left: 20px;
}
.notic h2 {
font-size: 16px;
margin: 0;
}
.foot {
background:#CCCCCC;
-moz-border-radius:0 0 20px 20px;
-webkit-border-radius:0 0 20px 20px;
border-radius: 0 0 20px 20px;
padding: 20px;
}
</style>
</head>
<body bgcolor="#eae5ce">
{$errors}
<form action="' . $_SERVER['REQUEST_URI'] . '" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<div class="con">
<div class="logo-con">
<a href="http://www.kampoeng.us">
<img width="200" height="140" border="0" src="http://www.kampoeng.us/images/logo-contact-us.png">
</a>
</div>
<div style="clear:both;height:90px;"></div>
<div class="con-body">
<div class="con-head">
<br>
<div class="contact-us">
<h1>Contact Us</h1>
</div>
<div style="clear:both;"></div>
</div>
<br>
<div>
<div class="subject-before"></div>
<div class="notic">
<h2>
Silakan lengkapi form di bawah ini untuk menghubungi tim Support Kampoeng
<br>
Kami akan menghubungi Anda dalam waktu 2 x 24 jam
</h2>
<i style="color:red;font-size:12px;display:block;"> Note : Jika dalam 2 x 24 jam anda belum mendapatkan balasan dari kami di email , periksa bagian SPAM dari email anda </i>
</div>
<div style="clear:both;height:20px;"></div>
{$usertemplate}
<div style="clear:both;height:20px;"></div>
<div class="subject-before">
<label class="subject">{$lang->email_subject}</label>:</div>
<div id="email_form" style="float:left;width:590px;font-size:12px;">
<label><input type="text" class="textbox" size="50" name="subject" value="{$subject}" style="width:400px;" /></label>
</div>
<div id="email_form" style="float:left;width:590px;font-size:12px;margin-left: 200px;">
<p style="color:#FF0000;"><b><em>Note: Gunakana Prefix pada kolom "Email Subject" untuk mempermudah Judul</em></b></p>
<ul>
<li><b>[General Question]</b></li>
<li><b>[Account (Aktivasi, Password atau sejenisnya)]</b></li>
<li><b>[Donatur]</b></li>
<li><b>[Kampoeng Advertising]</b></li>
<li><b>[Moderator]</b></li>
<li><b>[Pengaduan SARA / Pornografi / Penyalahgunaan Lainnya]</b></li>
<li><b>[Saran & Kritik]</b></li>
<li><b>[Kerjasama / Public Relation]</b></li>
</ul>
<p><em>Misal : </em><b>[Saran & Kritik] Penambahan Forum dan Subforum</b></p>
</div>
<div class="subject-before">
<label class="subject">{$lang->email_message}</label>:</div>
<div style="float:left;width:590px;font-size:12px;">
<label><textarea style="width:400px;" cols="50" rows="10" name="message">{$message}</textarea></label>
</div>
<div style="clear:both;height:20px;"></div>
{$captcha}
<div style="clear:both;height:20px;"></div>
<br />
<div class="foot">
<input type="hidden" name="action" value="do_email" />
<div align="center">
<input type="submit" class="button" value="{$lang->send_email}" />
</div>
</div>
<div style="clear:both;"></div>
</div>
</div>
</div>
</div>
</form>
<div style="clear:both;height:10px;"></div>
</body>
</html>';
$template = str_replace("\'", "'", addslashes($template));
eval("\$page = \"" . $template . "\";");
output_page($page);
?>