ALTER TABLE `cdb_threads` ADD `badge` tinyint(1) default '0' NOT NULL ;
'delete', 'move', 'highlight',
} elseif($operation == 'type') {
} elseif($operation == 'badge') {
if($single) {
$string = sprintf('%02d', $thread['badge']);
$stylestr = sprintf('%03b', $string[0]);
for($i = 1; $i <= 3; $i++) {
$stylecheck[$i] = $stylestr[$i - 1] ? 'checked' : '';
}
$colorcheck = array($string[1] => 'checked');
} else {
$stylecheck = array();
$colorcheck = array(0 => 'checked');
}
}elseif($operation == 'type') {
} elseif($operation == 'badge') {
$stylebin = '';
for($i = 1; $i <= 3; $i++) {
$stylebin .= empty($badge_style[$i]) ? '0' : '1';
}
$badge_style = bindec($stylebin);
$modaction = $badge_style + $badge_color ? 'BDG' : 'UBD';
if($badge_color < 0 || $badge_color > 9) {
showmessage('undefined_action', NULL, 'HALTED');
}
$db->query("UPDATE {$tablepre}threads SET badge='$badge_style$badge_color', moderated='1' WHERE tid IN ($moderatetids)", 'UNBUFFERED');
$forumselect = $forumjump ? forumselect() : '';
//badge hack Start by sai
$typearray = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
if($thread['badge']) {
$string = sprintf('%02d', $thread['badge']);
$stylestr = sprintf('%03b', $string[0]);
//$thread['badge'] .= $string[1];
} else {
$thread['badge'] = '';
}
//badge hack End by sai
<option value="highlight">{lang admin_highlight}</option>
<option value="badge">{lang admin_badge}</option>
<!--{elseif $operation == 'highlight'}-->
{lang admin_highlight}
<!--{elseif $operation == 'badge'}-->
{lang admin_badge}
<!--{elseif $operation == 'type'}-->
<tr>
<td class="altbg1">{lang admin_move_target}:</td>
<td class="altbg2">$typeselect</td>
</tr>