コード例 #1
0
<?php

include_once "_common.php";
if (!$bo_table) {
    die("데이터가 없습니다.");
}
include_once "{$board_skin_path}/mw.lib/mw.skin.basic.lib.php";
if ($is_admin != "super") {
    die("접근 권한이 없습니다.");
}
$sql = "select * from {$write_table} where ca_name = '{$ca_name}' and wr_is_comment = 0 ";
$qry = sql_query($sql);
$cnt = 0;
while ($write = sql_fetch_array($qry)) {
    mw_delete_row($board, $write);
    //echo "$row[wr_subject]\n";
    $cnt++;
}
echo "{$ca_name}분류의 게시물 {$cnt}건을 삭제했습니다.";
exit;
コード例 #2
0
    include_once $mw_syndi_path . '/_config.php';
    include_once $mw_syndi_path . '/_lib.php';
}
if ($is_all_delete or $is_all_move) {
    $all_board_sql = "select * from {$g4['board_table']} ";
    $all_board_qry = sql_query($all_board_sql);
    while ($all_board_row = sql_fetch_array($all_board_qry)) {
        if ($is_ip) {
            $all_write_sql = "select * from {$g4['write_prefix']}{$all_board_row['bo_table']} where mb_id = '' and wr_ip = '{$mb_id}' order by wr_num";
        } else {
            $all_write_sql = "select * from {$g4['write_prefix']}{$all_board_row['bo_table']} where mb_id = '{$mb_id}' order by wr_num";
        }
        $all_write_qry = sql_query($all_write_sql);
        while ($all_write_row = sql_fetch_array($all_write_qry)) {
            if ($is_all_delete or $all_write_row[wr_is_comment]) {
                mw_delete_row($all_board_row, $all_write_row, "no");
            } elseif ($is_all_move) {
                if ($all_board_row['bo_table'] == $move_table) {
                    continue;
                }
                mw_move($all_board_row, $all_write_row[wr_id], $move_table, 'move');
            }
            if ($intercept_ip and !strstr($config[cf_intercept_ip], $all_write_row[wr_ip])) {
                $config[cf_intercept_ip] = trim($config[cf_intercept_ip]) . "\n{$all_write_row['wr_ip']}";
                sql_query("update {$g4['config_table']} set cf_intercept_ip = '{$config['cf_intercept_ip']}'");
            }
            if (function_exists('mw_syndi_set_feed')) {
                mw_syndi_set_feed($all_board_row['bo_table'], $all_write_row['wr_id'], '', 'd');
            }
        }
        // write row
コード例 #3
0
ファイル: delete_all.skin.php プロジェクト: l2zeo/miwit-pack5
                $mb = get_member($write[mb_id]);
                if ($member[mb_id] == $board[bo_admin]) {
                    // 자신이 관리하는 게시판인가?
                    if ($member[mb_level] >= $mb[mb_level]) {
                        // 자신의 레벨이 크거나 같다면 통과
                    } else {
                        continue;
                    }
                } else {
                    continue;
                }
            } else {
                if ($member[mb_id] && $member[mb_id] == $write[mb_id]) {
                } else {
                    if ($wr_password && !$write[mb_id] && sql_password($wr_password) == $write[wr_password]) {
                    } else {
                        continue;
                    }
                }
            }
        }
    }
    // 나머지는 삭제 불가
    $w = 'd';
    include $board_skin_path . '/mw.proc/naver_syndi.php';
    mw_delete_row($board, $write, "no");
}
@(include_once "{$board_skin_path}/delete_all.tail.skin.php");
//goto_url($g4['bbs_path']."/board.php?bo_table=$bo_table&page=$page" . $qstr);
goto_url(mw_seo_url($bo_table, 0, "&page={$page}" . $qstr));
exit;
コード例 #4
0
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
include_once "_common.php";
header("Content-Type: text/html; charset={$g4['charset']}");
if (!$bo_table) {
    die("bo_table 이 없습니다.");
}
if (!$is_admin) {
    die("관리자만 실행할 수 있습니다.");
}
if (!$token or get_session("ss_delete_token") != $token) {
    die("토큰 에러로 실행 불가합니다.");
}
include_once "{$board_skin_path}/mw.lib/mw.skin.basic.lib.php";
$chk_comment_id = explode(",", $comment_id);
for ($i = 0, $m = count($chk_comment_id); $i < $m; $i++) {
    $write = sql_fetch(" select * from {$write_table} where wr_id = '{$chk_comment_id[$i]}' ");
    if ($write[wr_id]) {
        mw_delete_row($board, $write, 'no');
    }
}
echo "ok";
exit;
//goto_url("$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id&sfl=$sfl&stx=$stx&page=$page");