<?php
	include("vars.php");
	include("db.php");

	$page_status = "no";
	$msg = "";
	if($user_id != "" && $active_code != "")
	{
		$result = mysql_query("SELECT * FROM register WHERE id = '$user_id' AND active_code = '$active_code'",$db);
		if($myrow = mysql_fetch_array($result))
		{
			$page_status = "yes";
		}
		if($page_status == "yes" && $_SERVER['REQUEST_METHOD'] == "POST" && $sms_user != "")
		{
			mysql_query("DELETE FROM sms_user WHERE user_id = '$user_id' AND id = '$sms_user'");
			$msg = "nomeri waSlilia";

			echo('<script>'."\n");
			echo('parent.second.location = "book.php?user_id='.$user_id.'&active_code='.$active_code.'&u_secure='.$u_secure.'&u_event=sms"');
			echo('</script>'."\n");
		}
	}
mysql_close();
?>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title></title>
<link href="../js_css/iframe.css" rel="stylesheet">
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#1AB9F1">
<script language="javascript" src="../js_css/javascript.js"></script>
<form name="form1" action="<?=$_SERVER['REQUEST_URI']?>" method="POST">
<table border="0" width="297" id="table1" cellspacing="0" cellpadding="0">
	<tr>
		<td height="19" colspan="2" width="297">
		<img border="0" src="../img/title/delete_number.jpg" width="196" height="19"></td>
	</tr>
	<tr>
		<td width="10">&nbsp;</td>
		<td width="287" class="geo">&nbsp;</td>
	</tr>
	<tr>
		<td width="10">&nbsp;</td>
		<td width="287" class="geo">&nbsp;</td>
	</tr>
<?php
if($page_status == "yes")
{
?>
	<tr>
		<td width="10">&nbsp;</td>
		<td width="287" class="geo"><select name="sms_user" class="in_geo3">
		<option value="00">nomrebis wignaki</option>
		<?php
		$result = mysql_query("SELECT * FROM sms_user WHERE user_id = '$user_id' ORDER by your_name ASC",$db);
		if($myrow = mysql_fetch_array($result))
		{
			do{ 
				$plus = "in_geo2b";
				if($myrow['bd_year']=="0000" || $myrow['bd_year']=="")
				{
					$plus = "in_geo3";
				}
				//
				$preff = "995";
				if($myrow['nstyle'] == 2)
				{
					$preff = $myrow['startnumber'];
				}
				//
				echo('<option value="'.$myrow['id'].'" class="'.$plus.'">'.$myrow['your_name'].' '.$myrow['your_surname'].' - +'.$preff.$myrow['user_mobile'].'</option>'."\n");
			}
			while($myrow = mysql_fetch_array($result));
		}
		?>
		</select>&nbsp;&nbsp;<input type=button class="bu_geo3" name="send" value="  waSla" style="cursor:hand;" onclick="delete_number();"></td>
	</tr>
	<tr>
		<td width="10">&nbsp;</td>
		<td width="287" class="geo">&nbsp;&nbsp;<a href="home_book.php?user_id=<?=$user_id?>&active_code=<?=$active_code?>&u_event=sms&u_secure=<?=$u_secure?>" class="link_geo4" target="_self">ukan dabruneba</a>&nbsp;
		<input type="hidden" name="sms_geo_result" value="">
		<input type="hidden" name="active_code" value="<?=$active_code?>">
		<input type="hidden" name="sta_geo" id="sta_geo" value="geo">
		<input type="hidden" name="u_event" value="sms">
		<input type="hidden" name="u_secure" value="<?=$u_secure?>">
		<input type="hidden" name="user_id" value="<?=$user_id?>">
		</td>
	</tr>
	<tr>
		<td width="10">&nbsp;</td>
		<td width="287" class="geo"></td>
	</tr>
	<tr>
		<td width="10">&nbsp;</td>
		<td width="287" class="geo">wiTeli feriT aris moniSnulis is nomrebi, romlebic aris Seyvanili dabadebis TariRTan erTad.</td>
	</tr>
<?}?>
	<tr>
		<td width="10">&nbsp;</td>
		<td width="287" class="geo_s" align="center">&nbsp;<?=@$msg?></td>
	</tr>
</table>
</form>
</body>

</html>