<?php
require_once('../../include/class.inc.php');

if (!$_POST["check_img"]) {
include("up.php");
} else {
$fname=$_POST["check_img"];
}


$id=htmlspecialchars($_GET["id"]);  
$url=htmlspecialchars($_POST["url"]);
$webname=htmlspecialchars($_POST["webname"]); 
$phone=htmlspecialchars($_POST["phone"]); 
$Email=htmlspecialchars($_POST["Email"]); 
$ICP=htmlspecialchars($_POST["ICP"]); 
$title=htmlspecialchars($_POST["title"]); 
$keywords=htmlspecialchars($_POST["keywords"]); 
$description=htmlspecialchars($_POST["description"]); 
if($title!="" && $keywords!="" && $description!="" && $url!= "") {
    $sql="update webinfo set title='$title',keywords='$keywords',description='$description',url='$url',logo='$fname',webname='$webname',phone='$phone',Email='$Email',ICP='$ICP'  where id=$id";

	$result=mysql_query($sql);
		if($result)
		{
			echo "<script>alert('ÐÞ¸Ä³É¹¦£¡');location.href='webinfo.php'</script>";
		}
		else
		{
			echo "<script>alert('ÐÞ¸ÄÊ§°Ü£¡');location.href='webinfo.php?id=".$id."'</script>";	
		}

}

?>