<?php
    function get_mkurl($str){
			$sql = "SELECT url,id FROM mkinfo WHERE id='{$str}'";
			$result = mysql_query($sql); 
			if($result && mysql_num_rows($result)>0){
	        list($url,$id) = mysql_fetch_row($result);
			return $url;
			}else{
			return 'error/nofindpage.php';
			}
		}
function get_mkid($str){
			$sql = "SELECT url,id FROM mkinfo WHERE url='{$str}'";
			$result = mysql_query($sql); 
			if($result && mysql_num_rows($result)>0){
				list($url,$id) = mysql_fetch_row($result);
			return $id;
			}else{
				return 0;
			}
		}
		?>