<?php

$search_engine = array();

$search_engine['google'] = array(
	"name" => "谷歌",
	"url" => "http://www.google.com.hk/search?hl=zh-CN&source".ceil($_REQUEST["start"])."&q=",
);

$search_engine['baidu'] = array(
	"name" => "百度",
	"url" => "http://www.baidu.com/s?pn=".ceil($_REQUEST["start"])."&wd=",
);

$search_engine['youdao'] = array(
	"name" => "有道",
	"url" => "http://www.youdao.com/search?start=".ceil($_REQUEST["start"])."&q=",
);

$search_engine['sogou'] = array(
	"name" => "搜狗",
	"url" => "http://www.sogou.com/web?page=".ceil((abs($_REQUEST["start"])/10)+1)."&query=",
);

$search_engine['qq'] = array(
	"name" => "搜搜",
	"url" => "http://www.soso.com/q?sc=&ch=w.q&ty=1&kw=&proto=4&pg=".ceil((abs($_REQUEST["start"])/10)+1)."&w=",
);


$search_engine['bing'] = array(
	"name" => "必应",
	"url" => "http://cn.bing.com/search?first=".ceil(abs($_REQUEST["start"])+1)."&q=",
);


$search_engine['115'] = array(
	"name" => "115聚搜",
	"url" => "http://115.com/s?page_no=".ceil((abs($_REQUEST["start"])/10)+1)."&q=",
);

$search_engine['yahoo'] = array(
	"name" => "雅虎",
	"url" => "http://search.cn.yahoo.com/search?b=".ceil($_REQUEST["start"])."&p=",
);

$search_engine['zhongsou'] = array(
	"name" => "中搜",
	"url" => "http://p.zhongsou.com/p?b=".ceil((abs($_REQUEST["start"])/10)+1)."&w=",
);

function se_option($select="")
{
	global $search_engine;
	$html = "";
	foreach ($search_engine AS $key => $val)
	{
		$html .= "<option value=\"".$key."\"";
		$html .= ($key == $select) ? "selected" : "";
		$html .= ">".$val['name']."</option>";
	}
	return $html;
}	
?>