Code:
// ############################## start add DAP #################################
if ($HTTP_POST_VARS['action']!='newthread' and $HTTP_POST_VARS['action']!='postthread') {
// start ap
$dapfield = 'field6';
switch ($forumid) {
case 19:
$dapadd = 4;
break;
case 2:
case 16:
case 40:
case 41:
$dapadd = 2;
break;
case 8:
case 20:
$dapadd = 1;
break;
case 21:
$dapadd = 5;
break;
}
$DB_site->query("UPDATE userfield SET $dapfield=$dapfield+$dapadd WHERE userid=$bbuserinfo[userid]");
}