コード例 #1
0
ファイル: my.inc.php プロジェクト: hcd2008/destoon
 }
 if ($MG['add_limit']) {
     $last = $db->get_one("SELECT addtime FROM {$table} WHERE {$sql} ORDER BY itemid DESC");
     if ($last && $DT_TIME - $last['addtime'] < $MG['add_limit']) {
         dalert(lang($L['add_limit'], array($MG['add_limit'])));
     }
 }
 $msg = captcha($captcha, $need_captcha, true);
 if ($msg) {
     dalert($msg);
 }
 $msg = question($answer, $need_question, true);
 if ($msg) {
     dalert($msg);
 }
 if ($do->pass($post)) {
     $CAT = get_cat($post['catid']);
     if (!$CAT || !check_group($_groupid, $CAT['group_add'])) {
         dalert(lang($L['group_add'], array($CAT['catname'])));
     }
     $post['addtime'] = $post['level'] = $post['fee'] = 0;
     $post['style'] = $post['template'] = $post['note'] = $post['filepath'] = '';
     if (!$IMVIP && $MG['uploadpt']) {
         $post['thumb1'] = $post['thumb2'] = '';
     }
     $need_check = $MOD['check_add'] == 2 ? $MG['check'] : $MOD['check_add'];
     $post['status'] = get_status(3, $need_check);
     $post['hits'] = 0;
     $post['username'] = $_username;
     if ($could_color && $color && $_credit > $MOD['credit_color']) {
         $post['style'] = $color;