コード例 #1
0
ファイル: write_update.php プロジェクト: najinsu/nsle
            //if (!preg_match("/[^0-9]{0,1}{$wr_id}[\r]{0,1}/",$board['bo_notice']))
            if (!in_array((int)$wr_id, $notice_array)) {
                $bo_notice = $wr_id . ',' . $board['bo_notice'];
                sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
            }
        } else {
            $bo_notice = '';
            for ($i=0; $i<count($notice_array); $i++)
                if ((int)$wr_id != (int)$notice_array[$i])
                    $bo_notice .= $notice_array[$i] . ',';
            $bo_notice = trim($bo_notice);
            //$bo_notice = preg_replace("/^".$wr_id."[\n]?$/m", "", $board['bo_notice']);
            sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
        }
        */
        $bo_notice = board_notice($board['bo_notice'], $wr_id, $notice);
        sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
    }
}
// 게시판그룹접근사용을 하지 않아야 하고 비회원 글읽기가 가능해야 하며 비밀글이 아니어야 합니다.
if (!$group['gr_use_access'] && $board['bo_read_level'] < 2 && !$secret) {
    naver_syndi_ping($bo_table, $wr_id);
}
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
// FTP 업로드 시작
// 이상윤 시작
//$ftp = ftp_connect("서버주소 또는 도메인명", 21);
//$ftplogin = ftp_login($ftp, "$ftp_user_name", "$ftp_user_pass");
//
//$mkdier = ftp_mkdir($ftp, "만들 디렉토리명");
//$chmod = ftp_chmod($ftp_stream, $i, $sql_ip);       // 어떻게 쓰란거지..
コード例 #2
0
ファイル: delete_all.php プロジェクト: peb317/gbamn
    // 내글반응 삭제
    sql_query(" delete from {$g5['apms_response']} where bo_table = '{$bo_table}' and wr_id = '{$write['wr_id']}' ", false);
    // 태그로그 삭제
    sql_query(" delete from {$g5['apms_tag_log']} where bo_table = '{$bo_table}' and wr_id = '{$write['wr_id']}' ", false);
    // 이벤트 삭제
    sql_query(" delete from {$g5['apms_event']} where bo_table = '{$bo_table}' and wr_id = '{$write['wr_id']}' ", false);
    // 설문 삭제
    sql_query(" delete from {$g5['apms_poll']} where bo_table = '{$bo_table}' and wr_id = '{$write['wr_id']}' ", false);
    // 플레이목록
    sql_query(" delete from {$g5['apms_playlist']} where bo_table = '{$bo_table}' and wr_id = '{$write['wr_id']}' ", false);
    /*
    // 공지사항 삭제
    $notice_array = explode(',', trim($board['bo_notice']));
    $bo_notice = "";
    for ($k=0; $k<count($notice_array); $k++)
        if ((int)$write['wr_id'] != (int)$notice_array[$k])
            $bo_notice .= $notice_array[$k].',';
    $bo_notice = trim($bo_notice);
    */
    $bo_notice = board_notice($board['bo_notice'], $write['wr_id']);
    sql_query(" update {$g5['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
    $board['bo_notice'] = $bo_notice;
}
// 글숫자 감소
if ($count_write > 0 || $count_comment > 0) {
    sql_query(" update {$g5['board_table']} set bo_count_write = bo_count_write - '{$count_write}', bo_count_comment = bo_count_comment - '{$count_comment}' where bo_table = '{$bo_table}' ");
}
// 4.11
@(include_once $board_skin_path . '/delete_all.tail.skin.php');
delete_cache_latest($bo_table);
goto_url('./board.php?bo_table=' . $bo_table . '&amp;page=' . $page . $qstr);