$value) { if($name!="page") $pageURL .= $name.'='.$value.'&'; } $total_pages = ($total_articles - ($total_articles %$itemsPerPage)) / $itemsPerPage; if ($total_articles%$itemsPerPage>0) $total_pages+=1; echo 'Page: '; if($page-2>1){ echo anchor($pageURL.'page=1',1);echo ' '; } if($page-3>1){ echo ' .. '; } for($i=$page-2;$i<=$page+2;$i++){ if($i>0&&$i<=$total_pages){ echo anchor($pageURL.'page='.$i,$i).' '; }; } if($page+3<$total_pages){ echo ' .. '; } if($page+2<$total_pages){ echo ' '.anchor($pageURL.'page='.$total_pages,$total_pages); } echo '
'; if($total_articles>0){ echo ($startItem+1).'-'; if ($page*$itemsPerPage>$total_articles) echo $total_articles; else echo ($page*$itemsPerPage); echo ' from '.$total_articles.' article(s)'; } else { echo 'no result found'; } echo ''; }load->library('image_lib'); $newpath = dirname(FCPATH).'/asset/public/articles/images/'.$post['title'].$upload['file_ext']; $config['image_library'] = 'gd2'; $config['source_image'] = $upload['full_path']; $config['new_image'] = $newpath; $config['maintain_ratio'] = TRUE; $config['width'] = 600; $config['height'] = 400; $this->image_lib->initialize($config); if ( ! $this->image_lib->resize()) { echo $this->image_lib->display_errors(); } $newpath_thumb = dirname(FCPATH).'/assets/shop/thumbs/'.$post['title'].$upload['file_ext']; unset($config); $this->image_lib->clear(); $this->make_thumb($upload['full_path']); } function make_thumb($tempimage) { $configthumb['image_library'] = 'gd2'; $configthumb['source_image'] = $tempimage; $configthumb['maintain_ratio'] = TRUE; $configthumb['create_thumb'] = TRUE; $configthumb['thumb_marker'] = "_thumb"; $configthumb['quality'] = '100'; $configthumb['width'] = 120; $configthumb['height'] = 120; $this->image_lib->initialize($configthumb); if ( ! $this->image_lib->resize()) { echo $this->image_lib->display_errors(); } unset($configthumb); } //ddhewitte //create thumbnail image from event function select_thumb_img($id_event){ $CI = get_instance(); $CI->load->model('fotovideo_model'); $img_list = $CI->fotovideo_model->select_thumb_img($id_event); foreach($img_list->result() as $row){ echo ''; } } //check user session menu member function menu_member(){ $CI = get_instance(); $CI->load->library('session'); if($CI->session->userdata('logged_in')) { echo 'My Profile | Logout'; }else{ echo ' Login |Register'; } } function check_login() { $CI = get_instance(); $CI->load->library('session'); if($CI->session->userdata('logged_in')) { return TRUE; }else{ redirect('fotovideo/login'); } } //img kategori function img_kategori($category){ $CI = get_instance(); $CI->load->model('fotovideo_model'); $cat = explode("," , $category); foreach($cat as $row => $val){ $img_cat = $CI->fotovideo_model->get_f_fotovideo_category_by_id($val); $cat_val = $img_cat->row(); if($cat_val){ echo $cat_val->category_name; echo ','; } } } //profile pic function profile_pic($id_user){ $CI = get_instance(); $CI->load->model('fotovideo_model'); $member_detail = $CI->fotovideo_model->get_member_detail_by_id($id_user); if($member_detail->num_rows()>0) $img = $member_detail->row()->profile_picture; else $img = NULL; if(!empty($img)){ echo ''; }else{ echo ''; } } //profile pic function get_user($id_user){ $CI = get_instance(); $CI->load->model('fotovideo_model'); $member_detail = $CI->fotovideo_model->get_member_detail_by_id($id_user); if($member_detail->num_rows()>0) $username = $member_detail->row()->user_name; else $username = 'Anonymous'; echo $username; } //profile pic function participant_pic($id_user){ $CI = get_instance(); $CI->load->model('fotovideo_model'); $img = $CI->fotovideo_model->get_member_detail_by_id($id_user)->row()->chip_user_pic; if(!empty($img)){ echo ''; }else{ echo ''; } } function set_status_nominee_winner($exist){ if($exist == 0){ $stat =' '; }elseif($exist == 1){ $stat =' '; }else{ $stat =' '; } return $stat; } ?> Profile: Eko Lannueardy - CHIP ONLINE ID row(); echo ''; echo ' '; echo ''; } else { echo '
'; echo ''; } ?> num_rows()>0) { foreach($article_tag->result() as $tag){ $keywords .= url_title($tag->tag_ind,'dash',TRUE).', '; } } } ?>
Advertisement
row(); $folder_profile_pic = base_url()."asset/public/profiles/images/"; if($user->profile_picture==NULL) $profile_pic = $folder_profile_pic.'default.JPG'; else $profile_pic = $folder_profile_pic.$user->profile_picture; ?>
user_name==$this->session->userdata('user_name')) { ?>
Edit Profile
in
f: | t: | e:
*/?>
num_rows()>0) { ?>
Recent Photos:
'; echo '
'; foreach ($recent_photo->result() as $key => $member_photo) { $image_id = 'member_photo_'.$key; ?>
'; ?>
num_rows()>0) { ?>
Recent Posts:
result() as $key => $row) { // Get Section and Categories and image folder if($row->article_version == 1){ $section = 'news'; $folder_thumbnail = base_url()."public/images/chip/hotnews/"; $category = 'general'; } else { $section = str_replace(' ','',strtolower($this->section_model->get_section_by_id($row->section_id)->row()->section_name)); $folder_thumbnail = base_url()."asset/public/articles/thumbnails/"; $category = ''; $query = $this->article_category_model->get_category_by_article($row->article_id); foreach($query->result() as $key => $row2){ if($key>0) $category = $category.'-'; $category = $category.url_title($this->category_model->get_category_by_id($row2->category_id)->row()->category_name,'_',TRUE); } } if($category == '') $category = 'general'; // Get date and month $date = date('d F Y',strtotime($row->date_publish)); ?>
result() as $row_photo_list){ echo ''; } */?>
ads_model->get_ads_by_name('Bottom Banner')->row()->ads_code); ?>
*/ ?>
© 2012-2016 CHIP ONLINE. PT Prima Info Sarana. All Rights Reserved.