Ejemplo n.º 1
0
            $replace_arr = array($user->user_info['user_username'], $user->user_displayname, $text, $video_player, $video_info, he_wall::get_wall_link($wall_object, $wall_object_id));
            $actions->actions_add($user, 'wallpostvideo', $replace_arr, array(), 0, false, $action_object_owner, $wall_object_id, $action_privacy_level);
            he_wall::new_post_notify($wall_object, $wall_object_id, $new_action_id);
            $result = he_wall_actions_display($wall_object, $wall_object_id, $first_action_id);
            $result['result'] = 1;
        } else {
            $result = $upload_result;
        }
    }
} elseif ($task == 'paging') {
    $action_id = $_GET['action_id'];
    $count = $_GET['count'];
    $total_comments = he_wall::total_comments($action_id);
    $per_click = $setting['setting_he_wall_comments_per_page'];
    $per_click = $total_comments - $count - $per_click < 0 ? $total_comments - $count : $setting['setting_he_wall_comments_per_page'];
    $result_2 = he_wall::get_paging_comments($action_id, $total_comments - $count - $per_click, $per_click);
    $count = $result_2['count'];
    $action_comments = $result_2['action_comments'];
    ksort($action_comments);
    $smarty->assign('action_comments', $action_comments);
    $smarty->assign('action_id', $action_id);
    $result = array('action_id' => $action_id, 'count' => $count, 'html' => he_wall_include_footer_logic('he_wall_comments.tpl'));
}
// CONSTRUCT AND OUTPUT JSON
if (!$headers_sent) {
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    // Date in the past
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    // always modified
    header("Cache-Control: no-cache, must-revalidate");
    // HTTP/1.1