<? 
require_once('../include/configure.php');
require_once('../include/database.php');
require_once "../include/function.php"; 


if($btnAdd){
	if($val){
		$search="sType=$sType&sReferral=$sReferral&classification=$classification&type=$type&industry=$industry&country=$country";
		$sql="INSERT INTO `pinmenu` (pin_name,pin_search,pin_type,pin_user) values ";
		$sql.=" ('".strtoupper($val)."','$search','$fld','".$_SESSION["egoUser"]."')";
		@mysql_query($sql) or die(mysql_error());
		print("<SCRIPT LANGUAGE=JavaScript>window.close()</SCRIPT>");
	}else echo "<font color='#ff0000'>Please key in name</font>";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="../sddm.css" >
<title>Search</title>
<script src="../include/validation.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {
	background-color: #CCCCCC;
}
-->
</style></head>

<body>
<form name="form" method="post" action="<?=$PHP_SELF ?>" >
<table border="0" cellpadding="1" width="100%" cellspacing="2" class="small">
  <tr>
    <td width="553" height="17" ><table width="100%" border="0" cellspacing="2" cellpadding="2">
        <tr>
          <td width="82%" height="25"><span class="TextH1">
            Save Name as  
                <input name="sType" type="hidden" id="sType" value="<? echo $sType ?>" />
               
            <input name="val" type="text" id="val" value="<? echo $val ?>" size="40" maxlength="50" />
            </span></td>
        </tr>
        <tr>
          <td><input name="btnAdd" type="submit" class="btn" id="btnAdd" value="ADD" onclick="getMemberList()"/>
            <span class="TextH1">
            <input name="sReferral" type="hidden" id="sReferral" value="<? echo $sReferral ?>" />
            <input name="classification" type="hidden" id="classification" value="<? echo $classification ?>" />
            <input name="type" type="hidden" id="type" value="<? echo $type ?>" />
            <input name="industry" type="hidden" id="industry" value="<? echo $industry ?>" />
            <input name="country" type="hidden" id="country" value="<? echo $country ?>" />
            <input name="fld" type="hidden" id="fld" value="<? echo $fld ?>" />
            </span></td>
        </tr>
        <tr>
          <td class="TextH1">&nbsp;</td>
        </tr>
        
      </table></td>
  </tr>
  <tr>
    <td height="15"><span class="Footer">
      <input name="Button" type="button" class="btn" value="Close Window" onclick="window.close();"/>
    </span></td>
  </tr>
</table>
</form>
</body>
</html>
