public function new_ad_panel($cate, $sub) { $tax_list = \Lst::tax_list('ar'); $sub_spef = $tax_list[$cate][$sub]; $data = ["tax_list" => $tax_list, "sub" => $sub, "cate" => $cate, "models" => $sub_spef]; // dd($tax_list[$cate]); // dd($data); return view(get_location('spidro.ad_create._main'), $data); }
public function populate_movies() { ini_set('max_execution_time', 3600); $lists = \Lst::common('movies'); $movies = []; foreach ($lists as $year => $ms) { // if($year<2000 && $year>=1980) $movies = array_merge($ms,$movies); if ($year == 2014) { $movies = $ms; } // $final = []; // foreach($ms as $m){ // unset($m['year']); // $vals = array_values($m); // foreach($vals as $val){ // $final[] = $val; // } // } // $i = 0; // for($i;$i<100;$i++){ // $new_ar[$i]['rank'] = $final[0]; // $new_ar[$i]['link_id'] = $final[1]; // $new_ar[$i]['title'] = $final[2]; // $new_ar[$i]['studio'] = $final[3]; // $new_ar[$i]['gross1'] = $final[4]; // $new_ar[$i]['gross2'] = $final[5]; // $new_ar[$i]['opening1'] = $final[6]; // $new_ar[$i]['opening2'] = $final[7]; // $new_ar[$i]['open'] = $final[8]; // $new_ar[$i]['year'] = $year; // for($k=0;$k<=8;$k++){ // array_shift($final); // } // } // $fff = $new_ar; // } } // err($movies); foreach ($movies as $key => $m) { // if($key>1943 && $key<2100){ //4952 $data = ["title" => $m['title'], "rank" => $m['rank'], "link_id" => $m['link_id'], "studio" => $m['studio'], "year" => $m['year'], "gross1" => preg_replace("/[\$,.]/", "", $m['gross1']), "gross2" => preg_replace("/[\$,.]/", "", $m['gross2']), "opening1" => preg_replace("/[\$,.]/", "", $m['opening1']), "opening2" => preg_replace("/[\$,.]/", "", $m['opening2']), "open" => date(strtotime($m['year'] . "/" . $m['open']))]; // if(isset($m['close']) && (unslash($m['close'])) ) $data['close']=date(strtotime($m['year']."/".$m['close'])); if ($key != 1000) { $data = array_merge($data, $this->update_movie($m['link_id'])); } \movies_model::create($data); if ($key > 3) { die; } // } } }
public function currency() { $data = ["route_info" => \sr::projects("currency"), 'theme' => $this->themes[4], "currency_list" => \Lst::common("currency"), 'ng_app' => "myApp", 'ng_controller' => "googleCurrency"]; // die('hi'); return $this->get_view('Projects.currency.currency', $data); }
public function postal_codes_array() { $array = \Lst::common('postal_codes'); return $array; }