<?php   session_start();

if ( $_SESSION[ invcox ] == "" ) { header( "location:login.php?action=need" );} else { include( "config.php" );
   	?>

<!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"/>
      <title>Room Entry</title>
      <link href="style.css" rel="stylesheet" type="text/css"/>
      <?php include("calendar.php");
?>   
   </head>
   <body>
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="box-wrap">
         <tr>
            <td>   <?php include("top.php");
?></td>
         </tr>
         <tr>
            <td>
               <table width="100%" border="0" cellspacing="1" cellpadding="0">
                  <tr>
                     <td align="left" class="link2">&nbsp;
</td>
                  </tr>
            
                  <tr>
                     <td align="center">&nbsp;
</td>
                  </tr>
                  <tr>
                     <td>
                        <form action="update_room.php" method="post" enctype="multipart/form-data" name="form1" class="round_box" id="form1">
                           <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
                              <tr>
                                 <td height="40" colspan="2" align="center" bgcolor="#466c74">Edit Room Entry</td>
                              </tr>
                              <?php if($_GET[info]!=""){?>
                              <tr>
                                 <td height="40" colspan="2" align="center" bgcolor="#80E8F4"><?php echo $_GET[info];
 ?>   </td>
                              </tr>
                              <?php }
							   

$result=mysql_query("select * from hotel_room  where id='$_GET[id]' limit 1");
$row=mysql_fetch_array($result);
																					  
																					  
							   ?>
                              <tr>
                                 <td width="14%" height="30"> Room No :*</td>
                                 <td width="86%" class="input200"><input name="room_no" type="text" required="required" id="room_no" value="<?php echo $row[room_no];?>" />   </td>
                              </tr>
                              <tr>
                                 <td bordercolor="#CCCCCC"> Room Type:</td>
                                 <td bordercolor="#CCCCCC" class="input200"><label><input name="rtype" type="text" id="rtype"  value="<?php echo $row[rtype];?>" /></label>   </td>
                              </tr>
                              <tr>
                                 <td>Price (for Every Day) :<span class="red">*</span>   </td>
                                 <td class="input200"><input name="rprice" type="text" required="required" id="rprice" value="<?php echo $row[rprice];?>"/>   </td>
                              </tr>
                              <tr>
                                <td>Short Description</td>
                                <td class="input200"><?php 

  include_once "images/fckeditor/fckeditor.php";			
  $oFCKeditor = new FCKeditor('srt_description');
  $oFCKeditor->BasePath = "images/fckeditor/";
  $oFCKeditor->Value    = "$row[srt_description]";
  $oFCKeditor->Width    = 650;
  $oFCKeditor->Height   = 300;
  echo $oFCKeditor->CreateHtml();
  ?></td>
                              </tr>
                              <tr>
                                 <td>Description :<span class="input200">
                                   <input name="id" type="hidden" id="id" value="<?php echo $_GET[id];?>"/>
                                 </span></td>
                                 <td class="input200"> 
								  
								  
<?php 

  include_once "images/fckeditor/fckeditor.php";			
  $oFCKeditor = new FCKeditor('description');
  $oFCKeditor->BasePath = "images/fckeditor/";
  $oFCKeditor->Value    = "$row[description]";
  $oFCKeditor->Width    = 650;
  $oFCKeditor->Height   = 400;
  echo $oFCKeditor->CreateHtml();
  ?>

								  
								  
								  </td>
                              </tr>
                              <tr>
                                <td height="50" align="left">Images : </td>
                                <td height="50" align="left"> <input type="file" name="images[]" multiple>
									
									
<?php 
$aresult=mysql_query("select * from room_images  where room='$_GET[id]' order by id asc");
$arow=mysql_fetch_array($aresult);
 if($arow!=""){																				 
do{
?>	
	<img src="room/<?php echo $arow['image']?>" width="200" /> <a href="delete_hotel_images.php?id=<?php echo $arow[id];?>&mid=<?php echo $_GET[id];?>">Delete</a><?php 	
}while($arow=mysql_fetch_array($aresult));
	}	
									?>
                                 </td>
                             </tr>
                              <tr>
                                 <td height="50" align="center">&nbsp;
</td>
                                 <td height="50" align="left"><input type="submit" name="Submit23" value="Submit"/>   </td>
                              </tr>
                           </table>
                        </form>
                     </td>
                  </tr>
                 
                 
               </table>
            </td>
         </tr>
         <tr>
            <td height="28" align="center">&nbsp;</td>
         </tr>
         <tr>
            <td height="28"><?php include("bot.php");
?></td>
         </tr>
      </table>
   </body>
</html>
<?php }?>