public function facebook_order($type = null, $plan = null) { $this->load->config('pricing'); $fD = $this->config->item('facebook'); if($this->input->post()) { $url = $this->input->post('facebook_url'); $url_end = @explode('/', $url);//[5] $url_end = end($url_end); $url_end = preg_replace("/[^a-zA-Z0-9]+/", '', $url_end); $fb_uid = $this->input->post('facebook_user_id'); $cartDate = array(); if($this->input->post('chk_mentions')) { $ex = explode('!!', $this->input->post('mentions')); $price = 0; $giv_price = 0; if(array_key_exists($ex[1], $fD['mentions'])) { $price += $fD['mentions'][$ex[1]]['price']; $tempData = array( 'id' => 'f_mentions_'.$ex[1].'_'.$fb_uid, 'qty' => 1, 'price' => $price, 'giv_price' => $fD['mentions'][$ex[1]]['giv_price'], 'type' => 'facebook', 'name' => 'Facebook mentions', 'options' => array( // 'url' => $tw_uid, 'facebook_user_id' => $fb_uid, 'facebook_user_name' => $this->input->post('facebook_user_name'), 'desc' => 'Facebook '.$fD['mentions'][$ex[1]]['name'] ) ); array_push($cartDate, $tempData); } } if( sizeof($cartDate) ) { $this->addToCart($cartDate); $this->session->set_flashdata('status','Facebook mentions'); $this->session->set_flashdata('trackback','facebook-mentions/order'); redirect('cart'); } redirect('facebook/order'); } $PD['plan'] = $plan; $PD['type'] = $type; $PD['facebook'] = $fD; $PD['title'] = 'Facebook mentions order | '.SITE_NAME; $this->load->view('facebook-mentions-order-form',$PD); }