CI =& get_instance(); $this->CI->redis = new Redis(); if(!$this->CI->redis->connect('127.0.0.1', 6060, 2.5)) { die("
Redis: Bağlantı kurulamıyor.
"); } $this->CI->redis->select(5); $this->CI->_lang_ = $this->config->item('language_abbr'); $this->CI->_lang2_ = $this->config->item('language_abbr') == 'en' ? 'tr' : 'en'; $this->CI->_id_ = NULL; $this->CI->_type_ = NULL; $this->CI->_page_ = NULL; $this->CI->_user_slug_ = NULL; $this->CI->_editPost_ = FALSE; $this->CI->_category_ = NULL; $this->CI->_translate_ = FALSE; $this->CI->_aviable_ = FALSE; $this->CI->_change_ = FALSE; $this->CI->_m_ = FALSE; $this->CI->_unreadMessage_ = 0; $this->CI->_unreadMessages_ = array(); $this->CI->_facebook_page_ = 'javascript:;'; $this->CI->_twitter_page_ = 'javascript:;'; $this->CI->_youtube_page_ = 'javascript:;'; $this->CI->_feed_page_ = baseUrl('feed'); $this->CI->_favorite_ = false; $this->CI->_hot_ = false; $this->CI->_hotCount_ = 0; $this->CI->_first_name_ = ''; $this->CI->_last_name_ = ''; $this->CI->_email_ = ''; $this->CI->_login_ = false; $this->CI->_post_used_ = false; $this->CI->_post_used_text_ = null; if($this->session->userdata('user_id')) { $this->CI->_first_name_ = $this->session->userdata('first_name'); $this->CI->_last_name_ = $this->session->userdata('last_name'); $this->CI->_email_ = $this->session->userdata('email'); $this->CI->_login_ = true; $this->CI->_unreadMessage_ = $this->CI->redis->ZCOUNT('unreadMessageByUser:' . $this->session->userdata('user_id'), '-inf', '+inf'); $list = $this->CI->redis->ZREVRANGE('unreadMessageByUser:' . $this->session->userdata('user_id'), 0, 9); foreach($list as $item) { $message = $this->CI->redis->GET('messageById:' . $item); if($message) { $message = json_decode($message); $sender = $this->CI->redis->GET('userById:' . $message->sender); if($sender) { $sender = json_decode($sender); $sender->avatar = base_url('images/users/' . sprintf("%04s", $sender->id) . '/' . $sender->avatar); $userName = $sender->first_name . " " . $sender->last_name; $msg = mb_strlen($message->message) > 70 ? substr($message->message, 0, 70) . '...' : $message->message; $out = ''; $out .= '
'; $out .= '
'; $out .= '' . $userName . ', ' . $msg; $out .= '
'; $out .= '
'; $out .= '
'; $this->CI->_unreadMessages_[] = $out; } } } } $this->CI->_ga_ = ''; $this->CI->_logo_text_ = 'OH5.com'; $this->CI->_og_title_ = 'OH5.com'; $this->CI->_keywords_ = 'OH5.com'; $this->CI->_og_description_ = 'OH5.com'; $this->CI->_og_image_ = base_url('images/oh5-og.jpg'); $this->CI->_og_cur_url_ = current_url(); $opt = $this->CI->db->limit(1)->order_by('id')->get('options')->row(); if($opt) { $log = 'logo_text_' . $this->CI->_lang_; $tit = 'title_' . $this->CI->_lang_; $key = 'keywords_' . $this->CI->_lang_; $des = 'description_' . $this->CI->_lang_; $fbp = 'facebook_page_' . $this->CI->_lang_; $twp = 'twitter_page_' . $this->CI->_lang_; $this->CI->_og_logo_text_ = strip_tags($opt->$log); $this->CI->_og_title_ = strip_tags($opt->$tit); $this->CI->_og_keywords_ = strip_tags($opt->$key); $this->CI->_og_description_ = strip_tags($opt->$des); $this->CI->_facebook_page_ = $opt->$fbp; $this->CI->_twitter_page_ = $opt->$twp; $this->CI->_ga_ = $opt->google_analytics; } $this->CI->load->model('Header_model','headerModel'); $this->CI->mainMenu = $this->headerModel->get_menu(); $controller = $this->CI->router->fetch_class(); if($controller == 'create') { if ($this->green->is_login()) { } else { redirect(baseUrl('permission'), 'location'); } } elseif($controller == 'permission') { // die('22222'); } elseif($controller == 'ajax') { //die($this->session->userdata('user_id')); // die('22222'); } elseif($controller == 'messages') { if ($this->green->is_login()) { $this->CI->redis->DEL('unreadMessageByUser:' . $this->session->userdata('user_id')); $this->CI->_unreadMessage_ = 0; $this->CI->_unreadMessages_ = array(); } else { redirect(baseUrl('permission'), 'location'); } } elseif($controller == 'edit') { if ($this->green->is_login()) { if ($this->uri->segment(2) !== FALSE) { $q = $this->db->where('slug', $this->uri->segment(2))->where('lang',$this->CI->_lang_)->get('taxonomy'); // echo $this->CI->_lang_;die(); if($q->num_rows() > 0) { $row = $q->row(); $this->CI->_id_ = $row->pc_id; $this->CI->_type_ = $row->type; if(!$this->green->is_admin()) { // if($row->type === 'P') { $post = $this->db->select('author_id')->where('id', $row->pc_id)->get('posts')->row(); if($post) { if(intval($this->session->userdata('user_id')) !== intval($post->author_id)) redirect(baseUrl('permission'), 'location'); } // } } } } } else { redirect(baseUrl('permission'), 'location'); } } elseif($controller == 'editq') { if ($this->green->is_login()) { if ($this->uri->segment(2) !== FALSE) { $q = $this->db->where('slug', $this->uri->segment(2))->where('lang',$this->CI->_lang_)->get('taxonomy'); if($q->num_rows() > 0) { $row = $q->row(); $this->CI->_id_ = $row->pc_id; $this->CI->_type_ = $row->type; if(!$this->green->is_admin()) { if($row->type === 'P') { $post = $this->db->select('author_id')->where('id', $row->pc_id)->get('posts')->row(); if($post) { if(intval($this->session->userdata('user_id')) !== intval($post->author_id)) redirect(baseUrl('permission'), 'location'); } } } } } } else { redirect(baseUrl('permission'), 'location'); } } elseif($controller == 'user') { if ($this->uri->segment(2) !== FALSE) { $this->CI->_user_slug_ = $this->uri->segment(2); } else show_404(); } elseif($controller == 'search') { $q = urldecode($this->input->post('q',TRUE)); $q = urldecode($this->input->post('q',TRUE)); if(!empty($q)) { // $q = iconv( "UTF-8" ,"ISO-8859-9", urldecode($q)); $q = urldecode($q); // $q = preg_replace('/\s+/', '+', $q); $url = baseUrl('search/'.$q); // echo urldecode($url);die(); redirect($url, 'location'); } } elseif($controller == 'translate') { if ($this->green->is_login()) { if ($this->uri->segment(2) !== FALSE) { $q = $this->db->where('slug', $this->uri->segment(2))->get('taxonomy'); if($q->num_rows() > 0) { $row = $q->row(); if($row->lang != $this->CI->_lang_) { $sq = $this->db->where('post_id', $row->pc_id)->where('lang', $this->CI->_lang_)->get('posts'); if($sq->num_rows() > 0) { $srow = $sq->row(); redirect(base_url($this->CI->_lang_ . "/" . $srow->slug), 'location'); } } $this->CI->_id_ = $row->pc_id; $this->CI->_type_ = $row->type; } } } else { redirect(baseUrl('permission'), 'location'); } } else { if ($this->uri->segment(1) !== FALSE && !empty($this->uri->segment(1))) { $q = $this->db->where('slug', $this->uri->segment(1))->get('taxonomy'); if($q->num_rows() > 0) { $row = $q->row(); $cook = get_cookie('_qupo', true); if($cook) { $exp = explode('#',$cook); if(is_array($exp) && count($exp) === 2) if(intval($exp[0]) === intval($row->pc_id)) { $this->CI->_post_used_ = true; $this->CI->_post_used_text_ = $exp[1]; } } if($row->lang != $this->CI->_lang_) { $sq = $this->db->where('post_id', $row->pc_id)->where('lang', $this->CI->_lang_)->get('posts'); if($sq->num_rows() > 0) { $srow = $sq->row(); redirect(base_url($this->CI->_lang_ . "/" . $srow->slug), 'location'); } } $this->CI->_id_ = $row->pc_id; $this->CI->_type_ = $row->type; $time = strtotime(date('Y-m-d')); $hot = $this->CI->redis->ZSCORE('hotCountsByTime:' . $time, $row->pc_id); if($hot) { $this->CI->_hotCount_ = intval($hot) > 0 ? intval($hot) : 0; } if($this->session->userdata('user_id')) { if($this->CI->redis->SISMEMBER('userByFavoritesById:' . $this->session->userdata('user_id'), $row->pc_id)) { $this->CI->_favorite_ = TRUE; } if($this->CI->redis->SISMEMBER('userByHotsById:' . $this->session->userdata('user_id'), $row->pc_id)) { $this->CI->_hot_ = TRUE; } } } } } }}
Fatal error: Class 'MY_Controller' not found in /home/html/oh5.com/application/controllers/Main.php on line 4

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/html/oh5.com/application/core/MY_Controller.php:1)

Filename: core/Common.php

Line Number: 573

Backtrace:

A PHP Error was encountered

Severity: Error

Message: Class 'MY_Controller' not found

Filename: controllers/Main.php

Line Number: 4

Backtrace: