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

Changeset 11114


Ignore:
Timestamp:
Mar 23, 2009, 8:22:41 PM (13 years ago)
Author:
nagasawa
Message:

#3723:指定したメンバーの書き込みを全て削除する機能の修正

Location:
OpenPNE/trunk
Files:
6 edited

Legend:

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

    r11026 r11114  
    15751575.footer div.declaration a { margin: 0 3px;}
    15761576
     1577/** admin_c_member_write_all_confirm **/
     1578#admin_page_delete_c_member_write_all_confirm ul.cautionList {padding: 0 0 0 0}
     1579#admin_page_delete_c_member_write_all_confirm ul.cautionList li {
     1580  color: #FF0000;
     1581  float: left;
     1582  list-style-type: circle;
     1583  margin-left: 20px;
     1584}
     1585
  • OpenPNE/trunk/webapp/lib/db/album.php

    r8996 r11114  
    687687}
    688688
     689/**
     690 * メンバーのアルバムを削除する
     691 *
     692 * @params int $c_member_id
     693 */
     694function db_album_delete4c_member_id($c_member_id)
     695{
     696    $sql = 'SELECT c_album_id FROM c_album WHERE c_member_id = ?';
     697    $params = array(intval($c_member_id));
     698    $c_album_id_list = db_get_col($sql, $params, 'main');
     699    foreach ($c_album_id_list as $c_album_id) {
     700        db_album_delete_c_album($c_album_id);
     701    }
     702}
     703
    689704?>
  • OpenPNE/trunk/webapp/lib/db/diary.php

    r10991 r11114  
    13071307}
    13081308
     1309/**
     1310 * メンバーの日記とコメントを削除
     1311 *
     1312 * @param  int    $c_member_id
     1313 *
     1314 */
     1315function db_diary_delete4c_member_id($c_member_id)
     1316{
     1317    $sql = 'SELECT * FROM c_diary WHERE c_member_id = ?';
     1318    $single = array(intval($c_member_id));
     1319    $c_diary_list = db_get_all($sql, $params, 'main');
     1320    foreach ($c_diary_list as $c_diary) {
     1321        db_image_data_delete($c_diary['image_filename_1']);
     1322        db_image_data_delete($c_diary['image_filename_2']);
     1323        db_image_data_delete($c_diary['image_filename_3']);
     1324
     1325        // c_diary_comment
     1326        $sql = 'SELECT * FROM c_diary_comment WHERE c_diary_id = ?';
     1327        $params = array(intval($c_diary['c_diary_id']));
     1328        $c_diary_comment_list = db_get_all($sql, $params, 'main');
     1329        foreach ($c_diary_comment_list as $c_diary_comment) {
     1330            db_image_data_delete($c_diary_comment['image_filename_1']);
     1331            db_image_data_delete($c_diary_comment['image_filename_2']);
     1332            db_image_data_delete($c_diary_comment['image_filename_3']);
     1333        }
     1334
     1335        $sql = 'DELETE FROM c_diary_comment WHERE c_diary_id = ?';
     1336        db_query($sql, $params);
     1337    }
     1338    $sql = 'DELETE FROM c_diary WHERE c_member_id = ?';
     1339    db_query($sql, $single);
     1340}
     1341
    13091342?>
  • OpenPNE/trunk/webapp/lib/db/etc.php

    r11110 r11114  
    501501
    502502    ///日記関連
    503     // c_diary (画像)
    504     $sql = 'SELECT * FROM c_diary WHERE c_member_id = ?';
    505     $c_diary_list = db_get_all($sql, $single, 'main');
    506     foreach ($c_diary_list as $c_diary) {
    507         db_image_data_delete($c_diary['image_filename_1']);
    508         db_image_data_delete($c_diary['image_filename_2']);
    509         db_image_data_delete($c_diary['image_filename_3']);
    510 
    511         // c_diary_comment
    512         $sql = 'SELECT * FROM c_diary_comment WHERE c_diary_id = ?';
    513         $params = array(intval($c_diary['c_diary_id']));
    514         $c_diary_comment_list = db_get_all($sql, $params, 'main');
    515         foreach ($c_diary_comment_list as $c_diary_comment) {
    516             db_image_data_delete($c_diary_comment['image_filename_1']);
    517             db_image_data_delete($c_diary_comment['image_filename_2']);
    518             db_image_data_delete($c_diary_comment['image_filename_3']);
    519         }
    520 
    521         $sql = 'DELETE FROM c_diary_comment WHERE c_diary_id = ?';
    522         db_query($sql, $params);
    523     }
    524     $sql = 'DELETE FROM c_diary WHERE c_member_id = ?';
    525     db_query($sql, $single);
    526 
    527     ///アルバム関連
    528     $sql = 'SELECT c_album_id FROM c_album WHERE c_member_id = ?';
    529     $c_album_id_list = db_get_col($sql, $single, 'main');
    530     foreach ($c_album_id_list as $c_album_id) {
    531         db_album_delete_c_album($c_album_id);
    532     }
     503    db_diary_delete4c_member_id($c_member_id);
     504
     505    // アルバム
     506    db_album_delete4c_member_id($c_member_id);
    533507
    534508    ///メンバー関連
     
    986960 * ・アルバム
    987961 *
    988  * @param int $c_member_id
     962 * @params int $c_member_id
    989963 */
    990964function db_common_delete_c_member_write_all($c_member_id)
     
    1010984
    1011985    ///日記関連
    1012     $sql = 'SELECT * FROM c_diary WHERE c_member_id = ?';
    1013     $c_diary_list = db_get_all($sql, $params, 'main');
    1014     foreach ($c_diary_list as $c_diary) {
    1015         db_image_data_delete($c_diary['image_filename_1']);
    1016         db_image_data_delete($c_diary['image_filename_2']);
    1017         db_image_data_delete($c_diary['image_filename_3']);
    1018 
    1019         // c_diary_comment
    1020         $sql = 'SELECT * FROM c_diary_comment WHERE c_diary_id = ?';
    1021         $dc_params = array(intval($c_diary['c_diary_id']));
    1022         $c_diary_comment_list = db_get_all($sql, $dc_params, 'main');
    1023         foreach ($c_diary_comment_list as $c_diary_comment) {
    1024             db_image_data_delete($c_diary_comment['image_filename_1']);
    1025             db_image_data_delete($c_diary_comment['image_filename_2']);
    1026             db_image_data_delete($c_diary_comment['image_filename_3']);
    1027         }
    1028 
    1029         $sql = 'DELETE FROM c_diary_comment WHERE c_diary_id = ?';
    1030         db_query($sql, $params);
    1031     }
    1032     $sql = 'DELETE FROM c_diary WHERE c_member_id = ?';
    1033     db_query($sql, $params);
    1034 
    1035     // 日記コメント
    1036     $sql = 'SELECT * FROM c_diary_comment WHERE c_member_id = ?';
    1037     $c_diary_comment_list = db_get_all($sql, $params, 'main');
    1038     foreach ($c_diary_comment_list as $c_diary_comment) {
    1039         db_image_data_delete($c_diary_comment['image_filename_1']);
    1040         db_image_data_delete($c_diary_comment['image_filename_2']);
    1041         db_image_data_delete($c_diary_comment['image_filename_3']);
    1042     }
    1043     $sql = 'DELETE FROM c_diary_comment WHERE c_member_id = ?';
    1044     db_query($sql, $params);
    1045    
    1046     ///アルバム関連
    1047     $sql = 'SELECT c_album_id FROM c_album WHERE c_member_id = ?';
    1048     $c_album_id_list = db_get_col($sql, $params, 'main');
    1049     foreach ($c_album_id_list as $c_album_id) {
    1050         db_album_delete_c_album($c_album_id);
    1051     }
     986    db_diary_delete4c_member_id($c_member_id);
     987
     988    // アルバム
     989    db_album_delete4c_member_id($c_member_id);
    1052990
    1053991    //送信メッセージ関連
  • OpenPNE/trunk/webapp/modules/admin/templates/delete_c_member_write_all_confirm.tpl

    r11026 r11114  
    1212<div class="contents">
    1313<p class="caution" id="c01">本当にこのメンバーの書き込みを全て削除してもよろしいですか?</p>
     14
     15<p class="caution"><strong>※以下の投稿が削除対象になります</strong></p>
    1416<ul class="cautionList">
    15     <li class="caution" ><strong>※以下の投稿が削除対象になります<</strong></li>
    16     <li class="caution" >&nbsp;&nbsp;&nbsp;日記、日記コメント、トピック・イベント、トピック・イベントのコメント、送信メッセージ、アルバム</li>
     17    <li>日記</li>
     18    <li>日記コメント</li>
     19    <li>トピック・イベント</li>
     20    <li>トピック・イベントのコメント</li>
     21    <li>送信メッセージ</li>
     22    <li>アルバム</li>
    1723</ul>
     24<div style="clear: both"></div>
    1825
    1926<form action="./" method="post">
  • OpenPNE/trunk/webapp/modules/admin/validate/page/delete_c_member_write_all_confirm.ini

    r11026 r11114  
    11[target_c_member_id]
    22type = "int"
     3min = 1
    34required = 1
Note: See TracChangeset for help on using the changeset viewer.