home; $impressum=$row->impressum; $websuche=$row->websuche; $suche=$row->suche; $weiter=$row->weiter; $zurueck=$row->zurueck; $seite=$row->seite; } $smarty->assign('impressum',$impressum); $smarty->assign('home',$home); $smarty->assign('websuche',$websuche); $smarty->assign('suche',$suche); $smarty->assign('weiter',$weiter); $smarty->assign('zurueck',$zurueck); $smarty->assign('seite',$seite); $page=(int)$_GET['page']; if ($q != "") { $start=$page*10; $stop=$start+10; switch (strtoupper($land)) { case 'DE': $land="de-DE"; break; case 'CH': $land="de-DE"; break; case 'AT': $land="de-DE"; break; case 'RU': $land="ru-RU"; break; case 'UA': $land="uk-UA"; break; case 'ES': $land="es-ES"; break; case 'JA': $land="ja-JP"; break; case 'IT': $land="it-IT"; break; case 'FR': $land="fr-FR"; break; case 'CN': $land="zh-CN"; break; case 'PL': $land="pl-PL"; break; default: $land="en-US"; } //$result=make_http_request("http://api.search.live.net/xml.aspx?Appid=31B1F4A660BEEDA1B11F1B44192719A5576403FF&query=".$q."&sources=web&market=".$land."&adult=strict&web.count=10&web.offset=".$start); $result=make_http_request("http://blekko.com/ws/?q=".$q."/json&auth=e2af18ae&&p=$page&ps=11"); $array = json_decode($result,true); //echo print_r($array); //$array=xml2array($result); $count_akt=$array["total_num"]; //$count_e=$array["universal_total_results"]; $count_e = 1000; $pages_n=ceil($count_e/10); $zur=1; $vor=1; if ($page<7) { $start=0; if ($page==0) {$zur=0;} } else { $i=0; $start=$page-3; } $i=$pages_n-$page; if (($i>3) & ($page>6) ) {$i=4;} $stop=$page+$i; if (($page<7) & ($page+$i>7)) {$stop=8;} if ($page+1==$pages_n) {$vor=0;} if (count($id)==0) { $smarty->assign('empty','1'); } // //$count_result=count($array["SearchResponse"]["web:Web"]["web:Results"]["web:WebResult"]); $count_result=10; for($count = 0; $count < $count_result; $count++) { $text=$array["RESULT"][$count]["url_title"]; array_push($ergebnis_titel,$text); $text=$array["RESULT"][$count]["snippet"]; array_push($abstract,$text); $text=$array["RESULT"][$count]["url"]; array_push($clickurl,$text); $text=$array["RESULT"][$count]["url"]; array_push($dispurl,$text); $text="1"; array_push($size,$text); $text=""; array_push($date,$text); } if ($sprache=="GERMANY") {$adcode_de = get_adcode();} //print_r($array); $smarty->assign('ergebnis_titel',$ergebnis_titel); $smarty->assign('abstract',$abstract); $smarty->assign('clickurl',$clickurl); $smarty->assign('dispurl',$dispurl); $smarty->assign('size',$size); $smarty->assign('aufl',$aufl); $smarty->assign('date',$date); $smarty->assign('thumb_url',$thumb_url); $smarty->assign('type',$type); $smarty->assign('count_akt',$count_akt); $smarty->assign('q1',$q1); $smarty->assign('q',$q); $smarty->assign('start',$start); $smarty->assign('stop',$stop); $smarty->assign('page',$page); $smarty->assign('zur',$zur); $smarty->assign('vor',$vor); $smarty->assign('pages_n',$pages_n); $smarty->assign('s_count',$s_count); $smarty->assign('land',$land); $smarty->assign('hl',$hl); $smarty->assign('adcode_de',$adcode_de); $smarty->display('ergebnis.tpl'); } else { header ("Location: http://iron-start.com"); exit(); }