<?php if (!defined('BASEPATH')) { exit('No direct script access allowed'); } ?> <?php if ($status->num_rows() == 0) { } else { $row = $status->row(); $user = get_setting_user(); ?> <span class='ns_name'><?php echo $user['nama']; ?> </span> <span class='ns_desc'><?php echo character_limiter($row->wall_content, 130); ?> </span><br /> <span class='ns_time small dark99'><?php echo $this->fungsi->fixtime($row->wall_time); ?> </span> <?php }
function do_post() { restrict(); $this->load->library('form_validation'); $this->form_validation->set_rules('message', 'Message', 'trim|required|prep_for_form|encode_php_tags'); if ($this->form_validation->run() == FALSE) { return false; } else { $post = $this->input->post('message'); $media = get_url($post); $wall_contain_media = 0; $extra = array(); if (count($media[0]) > 0) { for ($i = 0; $i < count($media[0]); $i++) { $rep[] = ''; } $pure_content = str_replace($media[0], $rep, $post); // get info media $media = analyze_media($media[0]); $wall_contain_media = 1; $extra['wall_contain_media'] = $wall_contain_media; $extra['wall_media_info'] = $media; $post = $pure_content; } $id = $this->wallmodel->insert($post, $extra); if ($id == false) { return false; } $user = get_setting_user(); $data = array('id' => $id, 'user' => $user, 'post' => array('content' => $post, 'time' => time(), 'contain_media' => $wall_contain_media, 'media' => $media), 'include_comments' => true); echo "<div class='li status_" . $id . "' style='display:none;'>"; echo $this->load->view('wall/status_list', $data, true); echo "</div>"; } }