コード例 #1
0
 function remove_action($user_id, $action_id)
 {
     if (!$user_id || !$action_id) {
         return 0;
     }
     if ($user_id != he_wall::get_action_owner($action_id)) {
         return 0;
     }
     he_wall::delete_action_notify($action_id);
     $query = he_database::placeholder("DELETE FROM `se_actions` \r\n           WHERE `action_id`=?", $action_id);
     he_database::query($query);
     // delete music links
     $query = he_database::placeholder("DELETE FROM `se_he_wall_music_link`\r\n            WHERE `user_id`=? AND `action_id`=?", $user_id, $action_id);
     he_database::query($query);
     // delete media links
     $query = he_database::placeholder("DELETE FROM `se_he_wall_media_link`\r\n            WHERE `user_id`=? AND `action_id`=?", $user_id, $action_id);
     he_database::query($query);
     // delete group media links
     $query = he_database::placeholder("DELETE FROM `se_he_wall_group_media_link`\r\n            WHERE `user_id`=? AND `action_id`=?", $user_id, $action_id);
     he_database::query($query);
     // delete video links
     $query = he_database::placeholder("DELETE FROM `se_he_wall_video_link`\r\n            WHERE `user_id`=? AND `action_id`=?", $user_id, $action_id);
     he_database::query($query);
     // delete action likes
     $query = he_database::placeholder("DELETE FROM `se_he_wall_like`\r\n            WHERE `action_id`=?", $action_id);
     he_database::query($query);
     // delete action comments
     $query = he_database::placeholder("DELETE FROM `se_he_wall_comment`\r\n            WHERE `action_id`=?", $action_id);
     he_database::query($query);
     // delete action hides
     $query = he_database::placeholder("DELETE FROM `se_he_wall_hidden_action`\r\n            WHERE `action_id`=?", $action_id);
     he_database::query($query);
     return 1;
 }
コード例 #2
0
ファイル: wall_action.php プロジェクト: amitjoy/nitd-network
    include "footer.php";
}
$action_info = he_wall::get_action_info($action_id);
if (!$action_info) {
    he_wall::delete_action_notify($action_id);
}
if (!$wall_action) {
    $page = "error";
    $smarty->assign('error_header', 639);
    $smarty->assign('error_message', 690706081);
    $smarty->assign('error_submit', 641);
    include "footer.php";
}
$action_wall_owner = he_wall::get_wall_owner($action_info['action_object_owner'], $action_info['action_object_owner_id']);
if ($user->user_exists && ($user->user_info['user_id'] == $wall_action['action_user_id'] || $user->user_info['user_id'] == $action_wall_owner->user_info['user_id'])) {
    he_wall::delete_action_notify($action_id);
}
$wall_action['owner'] = new se_user(array($wall_action['action_user_id']));
$total_comments = he_wall::total_comments($action_id);
$per_click = $setting['setting_he_wall_comments_per_page'];
$result = he_wall::get_paging_comments($action_id, $total_comments - $per_click, $per_click);
$action_likes = he_wall::get_likes(array($action_id));
$count = $result['count'];
$action_comments = $result['action_comments'];
$per_click = $result['per_click'];
$actiontype = he_wall::get_actiontype($action_id);
$filename = he_wall::get_action_filename($action_id);
if ($actiontype == 'wallpostphoto' && !$filename && $action_info['action_object_owner'] == 'group') {
    $media_ext = he_wall::get_action_media_ext($action_id, 'group');
    $wall_action['action_media'][0]['actionmedia_path'] = str_replace('_thumb.jpg', ".{$media_ext}", $wall_action['action_media'][0]['actionmedia_path']);
    $group_info = he_wall::get_group_info($action_info['action_object_owner_id']);