ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 11026


Ignore:
Timestamp:
Mar 16, 2009, 4:30:42 PM (12 years ago)
Author:
nakasone
Message:

#3723:書き込み一括削除機能の取り込み

Location:
OpenPNE/trunk
Files:
3 edited
5 copied

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/public_html/modules/admin/default.css

    r9127 r11026  
    635635#admin_page_delete_c_member_confirm table.userDetailTable td { padding: 5px; border-left: 1px #A3A3A6 solid;}
    636636#admin_page_delete_c_member_confirm ul.cautionList { padding: 10px 0 0 0;}
     637
     638/** admin_page_delete_c_member_write_all_confirm **/
     639#admin_page_delete_c_member_write_all_confirm p.caution#c01 strong { font-weight: bold; line-height: 170%;}
     640#admin_page_delete_c_member_write_all_confirm p#userImg { padding: 20px 0 10px 0;}
     641#admin_page_delete_c_member_write_all_confirm p#userImg img { margin: 0 10px;}
     642#admin_page_delete_c_member_write_all_confirm table.userDetailTable { clear: both; width: 960px; border: 1px #A3A3A6 solid; border-collapse: collapse; line-height: 100%;}
     643#admin_page_delete_c_member_write_all_confirm table.userDetailTable th { padding: 5px; width: 10%; border-left: 1px #A3A3A6 solid; background: #58585C; white-space: pre; text-align: right; font-weight: normal; color: #fff;}
     644#admin_page_delete_c_member_write_all_confirm table.userDetailTable td { padding: 5px; border-left: 1px #A3A3A6 solid;}
     645#admin_page_delete_c_member_write_all_confirm ul.cautionList { padding: 10px 0 0 0;}
    637646
    638647/** admin_page_c_member_detail **/
  • OpenPNE/trunk/webapp/lib/db/etc.php

    r11025 r11026  
    990990}
    991991
     992/**
     993 * 指定メンバーの書き込み一括削除
     994 * 以下の書き込みが削除対象
     995 * ・日記、日記コメント
     996 * ・トピック・イベント、トピック・イベントのコメント
     997 * ・送信メッセージ
     998 * ・アルバム
     999 *
     1000 * @param int $c_member_id
     1001 */
     1002function db_common_delete_c_member_write_all($c_member_id)
     1003{
     1004    $params = array(intval($c_member_id));
     1005
     1006    ///コミュニティ関連
     1007    // トピック・イベント削除
     1008    $sql = 'SELECT c_commu_topic_id FROM c_commu_topic WHERE c_member_id = ?';
     1009    $c_topic_list = db_get_all($sql, $params, 'main');
     1010    foreach ($c_topic_list as $c_topic) {
     1011        // 削除
     1012        db_commu_delete_c_commu_topic($c_topic['c_commu_topic_id']);
     1013    }
     1014
     1015    // トピック・イベントのコメント削除
     1016    $sql = 'SELECT c_commu_topic_comment_id FROM c_commu_topic_comment WHERE c_member_id = ?';
     1017    $c_topic_comment_list = db_get_all($sql, $params, 'main');
     1018    foreach ($c_topic_comment_list as $c_topic_comment) {
     1019        //削除
     1020        db_commu_delete_c_commu_topic_comment($c_topic_comment['c_commu_topic_comment_id']);
     1021    }
     1022
     1023    ///日記関連
     1024    $sql = 'SELECT * FROM c_diary WHERE c_member_id = ?';
     1025    $c_diary_list = db_get_all($sql, $params, 'main');
     1026    foreach ($c_diary_list as $c_diary) {
     1027        db_image_data_delete($c_diary['image_filename_1']);
     1028        db_image_data_delete($c_diary['image_filename_2']);
     1029        db_image_data_delete($c_diary['image_filename_3']);
     1030
     1031        // c_diary_comment
     1032        $sql = 'SELECT * FROM c_diary_comment WHERE c_diary_id = ?';
     1033        $dc_params = array(intval($c_diary['c_diary_id']));
     1034        $c_diary_comment_list = db_get_all($sql, $dc_params, 'main');
     1035        foreach ($c_diary_comment_list as $c_diary_comment) {
     1036            db_image_data_delete($c_diary_comment['image_filename_1']);
     1037            db_image_data_delete($c_diary_comment['image_filename_2']);
     1038            db_image_data_delete($c_diary_comment['image_filename_3']);
     1039        }
     1040
     1041        $sql = 'DELETE FROM c_diary_comment WHERE c_diary_id = ?';
     1042        db_query($sql, $params);
     1043    }
     1044    $sql = 'DELETE FROM c_diary WHERE c_member_id = ?';
     1045    db_query($sql, $params);
     1046
     1047    // 日記コメント
     1048    $sql = 'SELECT * FROM c_diary_comment WHERE c_member_id = ?';
     1049    $c_diary_comment_list = db_get_all($sql, $params, 'main');
     1050    foreach ($c_diary_comment_list as $c_diary_comment) {
     1051        db_image_data_delete($c_diary_comment['image_filename_1']);
     1052        db_image_data_delete($c_diary_comment['image_filename_2']);
     1053        db_image_data_delete($c_diary_comment['image_filename_3']);
     1054    }
     1055    $sql = 'DELETE FROM c_diary_comment WHERE c_member_id = ?';
     1056    db_query($sql, $params);
     1057   
     1058    ///アルバム関連
     1059    $sql = 'SELECT c_album_id FROM c_album WHERE c_member_id = ?';
     1060    $c_album_id_list = db_get_col($sql, $params, 'main');
     1061    foreach ($c_album_id_list as $c_album_id) {
     1062        db_album_delete_c_album($c_album_id);
     1063    }
     1064
     1065    //送信メッセージ関連
     1066    $sql = 'SELECT * FROM c_message WHERE c_member_id_from = ?';
     1067    $c_message_list = db_get_all($sql, $params, 'main');
     1068    foreach ($c_message_list as $c_message) {
     1069        db_image_data_delete($c_message['image_filename_1']);
     1070        db_image_data_delete($c_message['image_filename_2']);
     1071        db_image_data_delete($c_message['image_filename_3']);
     1072    }
     1073    $sql = 'DELETE FROM c_message WHERE c_member_id_from = ?';
     1074    db_query($sql, $params);
     1075}
     1076
    9921077?>
  • OpenPNE/trunk/webapp/modules/admin/templates/list_c_member.tpl

    r10989 r11026  
    9898<div class="listControlTop">
    9999<p class="display">({$pager.total_num}) 人中 ({$pager.start_num}) - ({$pager.end_num})人目を表示しています</p>
    100 <p id="controlIcon"><img src="./modules/admin/img/icn_withdrawal.gif" alt="強制退会のアイコン" class="withdraw" />:強制退会 <img src="modules/admin/img/icn_rejected.gif" alt="ログイン停止のアイコン" />:ログイン停止 <img src="modules/admin/img/icn_permit.gif" alt="ログイン停止解除" />:ログイン停止解除 <img src="modules/admin/img/icn_passwd.gif" alt="パスワード再発行のアイコン" />:パスワード再発行 <img src="modules/admin/img/icn_blacklist.gif" alt="ブラックリストに追加" />:携帯個体識別番号をブラックリストに追加</p>
     100({/if})
     101<p id="controlIcon"><img src="./modules/admin/img/icn_withdrawal.gif" alt="強制退会のアイコン" class="withdraw" />:強制退会 <img src="modules/admin/img/icn_rejected.gif" alt="ログイン停止のアイコン" />:ログイン停止 <img src="modules/admin/img/icn_permit.gif" alt="ログイン停止解除" />:ログイン停止解除 <img src="modules/admin/img/icn_passwd.gif" alt="パスワード再発行のアイコン" />:パスワード再発行 <img src="modules/admin/img/icn_blacklist.gif" alt="ブラックリストに追加" />:携帯個体識別番号をブラックリストに追加 <img src="modules/admin/img/icn_stop_receive_mail.gif" alt="メール受信の停止のアイコン" />:メール受信の停止 <img src="./modules/admin/img/icn_delete_all.gif" alt="書き込み一括削除のアイコン" class="widthraw" />:書き込み一括削除</p>
    101102<p class="listMove">
    102103({if $pager.prev_page})<a href="?m=({$module_name})&amp;a=page_({$hash_tbl->hash('list_c_member')})&amp;page=({$pager.prev_page})&amp;page_size=({$pager.page_size})&amp;order=({$requests.order})({$cond})">前へ</a>({/if})
     
    118119                <tr>
    119120                        <th class="cell01" rowspan="3">&nbsp;</th>
    120                         <th class="cell02" colspan="4" rowspan="3">操作パネル</th>
     121                        <th class="cell02" colspan="6" rowspan="3">操作パネル</th>
    121122                        <th class="cell03" rowspan="3"><a href="?m=({$module_name})&amp;a=page_({$hash_tbl->hash('list_c_member')})&amp;page_size=({$pager.page_size})&amp;order=c_member_id-1({$cond})">▲</a>ID<a href="?m=({$module_name})&amp;a=page_({$hash_tbl->hash('list_c_member')})&amp;page_size=({$pager.page_size})&amp;order=c_member_id-2({$cond})">▼</a></th>
    122123                        ({if $smarty.const.OPENPNE_AUTH_MODE != 'email'})
     
    227228                <tr>
    228229                        <th class="cell01" rowspan="3">&nbsp;</th>
    229                         <th class="cell02" colspan="4" rowspan="2">操作パネル</th>
     230                        <th class="cell02" colspan="6" rowspan="2">操作パネル</th>
    230231                        <th class="cell03" rowspan="2">ID</th>
    231232                        ({if $smarty.const.OPENPNE_AUTH_MODE != 'email'})
     
    270271                        <td class="cell02C"><a href="?m=({$module_name})&amp;a=page_({$hash_tbl->hash('passwd')})&amp;target_c_member_id=({$item.c_member_id})"><img src="modules/admin/img/icn_passwd.gif" alt="パスワード再発行" /></a></td>
    271272                        <td class="cell02D"><a href="?m=({$module_name})&amp;a=page_({$hash_tbl->hash('blacklist_add')})&amp;easy_access_id=({$item.secure.easy_access_id})"><img src="modules/admin/img/icn_blacklist.gif" alt="ブラックリストに追加" /></a></td>
     273                        <td class="cell02A"><a href="?m=({$module_name})&amp;a=page_({$hash_tbl->hash('delete_c_member_write_all_confirm')})&amp;target_c_member_id=({$item.c_member_id})"><img src="modules/admin/img/icn_delete_all.gif" alt="書き込み一括削除" /></a></td>
    272274                        <td class="cell03">({$item.c_member_id})</td>
    273275                        ({if $smarty.const.OPENPNE_AUTH_MODE != 'email'})
Note: See TracChangeset for help on using the changeset viewer.