<?php
 /***************************************  top      *****************************/
 require("header.php");

 /***************************************  数据处理      *****************************/

 InitGP(array('id','action','title','str',),'GP',false);

 $web_name = channel_site_title(0);

 $title_1 = '网络工具';

 $channel_site = '<a href="/'.$self_template.'.php">'.$title_1.'</a>';

 if ($action && $str) $outStr = webTool($action,$str);
 
 if ($title) {
 	$channel_site .=   ' >>> '.$title ;
 	$title .= ' - '.$title_1 ;
 }else $title = $title_1;
 
 $web_name = $title.$web_name;
 
 $header_Keywords =  $title_1.','. $header_Keywords;

 //DELETE FROM qhouse_rental WHERE r_intermediary_offon='0' AND r_audit='0' AND r_uptimes<'1211990400';
 /***************************************  开始替换       *****************************/


 $html_content = html_exp('{action}', $action ,$html_content);
 $html_content = html_exp('{title}', $title ,$html_content);
 $html_content = html_exp('{Content}', $outStr ,$html_content);


 /***************************************  FOOT       *****************************/

 require(R_P."footer.php");


$sql = "DELETE FROM ".$db_tablepre."content WHERE content_title='0'";
//$db->sql_reture($sql);
 /***************************************   function       *****************************/
 function webTool($action,$str){
 	switch ($action){
 		case 'sql-date':
 			$sql = "SELECT * FROM ".$db_rental_spider_count."  WHERE r_c_url='".$str."' ";
 			//$query = $db->GetRow($sql);
 			$query && $outStr = date('Y-m-d',$query['r_c_uptimes']);
 			$outStr = '本功能暂时关闭';
 			break;

 		case 'strlan':
 			$outStr = strlen($str);
 			break;

 		case 'date':
 			$outStr = date('Y-m-d',$str);
 			break;

 		case 'jurl':
 			$outStr =  '<head><meta http-equiv="REFRESH" content="0; url='.urldecode($str).'hml"></head> ';
 			break;

 		case 'md5':
 			$outStr = md5($str);
 			break;

 	}
 	return $outStr = str_repeat('+',60).'<br><br>查询结果:<br><br>'.$outStr ;
 }
?>