コード例 #1
0
ファイル: index.php プロジェクト: kapai69/fl-ru-damp
             exit;
         }
     } else {
         if ($project['kind'] == 7 && !$project['is_blocked'] && $project['closed'] != 't') {
             if ($_POST['comment'] || $_POST['files']) {
                 if ($uid == $contest->offer['user_id'] || hasPermissions('projects')) {
                     $comm_blocked = $contest->is_pro || $contest->is_moder ? $_POST['comm_blocked'] : $contest->offer['comm_blocked'] == 't';
                     $comment = change_q_x(antispam(substr($_POST['comment'], 0, 30000)), false, true, 'b|br|i|p|ul|li|cut|h[1-6]{1}', false, false);
                     if (!$contest->ChangeOffer($contest->offer['id'], $comment, $_POST['files'], $comm_blocked)) {
                         header('Location: ' . getFriendlyURL('project', $project['id']) . "?offer={$contest->offer['id']}");
                         exit;
                     }
                 }
             }
         } else {
             $obj_offer->ChangeOfferKon($uid, $project['id'], $_POST['ps_work_pict'], $_POST['ps_work_prev_pict']);
             header('Location: ' . getFriendlyURL('project', $project['id']) . '?' . intval($project['id']) . $from_prm_s);
         }
     }
     break;
 case 'buy':
     if (!($error = $answers->BuyByFM($_SESSION['uid'], $_POST['ammount']))) {
         header('Location: ' . getFriendlyURL('project', $project['id']));
         exit;
     }
     break;
 case 'payed_is_color':
     $offer_id = __paramInit('int', null, 'id_offers');
     $account = new account();
     $transaction_id = $account->start_transaction(get_uid());
     $project_id = $obj_offer->getProjectIDByOfferID($offer_id);