コード例 #1
0
ファイル: view.php プロジェクト: Nikitian/fl-ru-damp
     $attachedfiles = new attachedfiles($_POST['attachedfiles_session']);
     $asid = $_POST['attachedfiles_session'];
 }
 $attachedfiles_info = $attachedfiles->calcFiles();
 $ctrl_msg = $msg;
 $ctrl_msg = preg_replace("#&\\w+;#si", "", $msg);
 if (!$ctrl_msg && !count($files) && !$yt_link && !$attachedfiles_info['count']) {
     $error_flag = 1;
     $alert[1] = "Поле заполнено некорректно";
 }
 if (!$error_flag && is_empty_html($msg)) {
     $msg = '';
 }
 if (!$error_flag && !$f_name) {
     $blogs = new blogs();
     $last_id = $blogs->Add($uid, $reply, $thread, $msg, $msg_name, $files, getRemoteIP(), $err, 0, $yt_link);
     $attachedfiles_files = $attachedfiles->getFiles();
     $blogs->addAttachedFiles($attachedfiles_files, $last_id, NULL);
     $attachedfiles->clear();
     //$nStopWordsCnt = $stop_words->calculate( $msg, $msg_name );
     //$blogs->insertIntoModeration( $last_id, $nStopWordsCnt, ($reply ? 1 : 0) ); // больше не модерируем
     if ($err == 403) {
         header("Location: /403.php");
         exit;
     }
     //$ret = $blogs->GetMsgInfo($last_id, $err, $perm); че это вообще такое?
     if (is_array($err) && !isNulArray($err)) {
         $error_flag = 1;
         $alert = $err;
     }
     if ($ret['base'] == 3 || $ret['base'] == 5) {