$mfadd[‘ms‘] = " LEFT JOIN ".DB::table(‘common_member_status‘)." ms ON m.uid=ms.uid";
$fields[] = ‘ms.‘.$field;break;
case substr($field, 0, 5) == ‘field‘:
$mfadd[‘mp‘] = " LEFT JOIN ".DB::table(‘common_member_profile‘)." mp ON m.uid=mp.uid";
$fields[] = ‘mp.field‘.intval(substr($field, 5));
$profilefields[] = $field;break;
}
}
$memberformula = array();
if($_G[‘uid‘]) {
$memberformula = DB::fetch_first("SELECT ".implode(‘,‘, $fields)." FROM ".DB::table(‘common_member‘)." m ".implode(‘‘, $mfadd)." WHERE m.uid=‘$_G[uid]‘");
$mfadd[‘ms‘] = " LEFT JOIN ".DB::table(‘common_member_status‘)." ms ON m.uid=ms.uid";
$fields[] = ‘ms.‘.$field;break;
case substr($field, 0, 5) == ‘field‘:
$mfadd[‘mp‘] = " LEFT JOIN ".DB::table(‘common_member_profile‘)." mp ON m.uid=mp.uid";
$fields[] = ‘mp.field‘.intval(substr($field, 5));
$profilefields[] = $field;break;
}
}
$memberformula = array();
if($_G[‘uid‘]) {
$memberformula = DB::fetch_first("SELECT ".implode(‘,‘, $fields)." FROM ".DB::table(‘common_member‘)." m ".implode(‘‘, $mfadd)." WHERE m.uid=‘$_G[uid]‘");
DB::query("UPDATE ".DB::table(‘forum_modwork‘)." SET count=count+1, posts=posts+‘$posts‘ WHERE uid=‘$_G[uid]‘ AND modaction=‘$modaction‘ AND dateline=‘$today‘");
$levelid = DB::result_first("SELECT levelid FROM ".DB::table(‘forum_grouplevel‘)." WHERE creditshigher<=‘$forum[commoncredits]‘ AND ‘$forum[commoncredits]‘<creditslower LIMIT 1");
$forum[‘level‘] = $levelid;
DB::query("UPDATE ".DB::table(‘forum_forum‘)." SET level=‘$levelid‘ WHERE fid=‘$fid‘");