⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addroomrevel.php

📁 酒店管理系统
💻 PHP
字号:
<?
require_once('../include/connectionadmin.php'); 
include('../include/admin_or_user.php');
require_once('../include/sqlfuns.php');
?>
<? 
if(isset($_POST['add'])&&$_POST['add']=="增加"){
if(findindb($conn,"room_level","roomlevel",$_POST['room_level'],"int"))
{ ?>
<script>
alert("房间星级已在数据库中!");
window.history.back();
</script>
<? exit; 
}
$insertsql = sprintf("INSERT INTO roomlevel (room_level, room_prise, room_introduction) VALUES(%s, %s, %s)",
	                   GetSQLValueString($_POST['room_level'], "int"),
                       GetSQLValueString($_POST['room_prise'], "int"),
                       GetSQLValueString($_POST['room_introduction'], "text"));
   
$result=odbc_exec($conn,$insertsql);
$go="roomlevel.php";
header("Location: ".$go);
exit;	
  }                			  				  
$selectsql="select room_level from roomlevel order by room_level";
$selectresult=odbc_exec($conn,$selectsql);
?>


<!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=gb2312" />
<title>无标题文档</title>
</head>
<link href="../css/hotel.css" rel="stylesheet" type="text/css" />
<? require('../include/check.inc');?>

<body>
<table width="100%" border="1">

<tr>
<td>
<form id="form" name="form" method="post" action="" onSubmit="return (empty(room_level)&&numbercheck(room_level)&&numbercheck(room_prise))">
  <table width="60%" border="0" align="left">
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>增加房间星级 </td>
    </tr>
   
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><div align="right">房间星级:</div></td>
      
      <td><label>
         
            <input name="room_level" type="text" id="room_level" size="4" maxlength="10" />
        *
      (现有房间星级:<? if(!odbc_fetch_row($selectresult,"1")) echo "暂无记录!"; 
	  do{
	  echo odbc_result($selectresult,'room_level');echo "&nbsp;&nbsp;"; 
	    }while(odbc_fetch_row($selectresult)); ?>)</label></td>
    </tr>
	
    <tr>
      <td><div align="right">房间价格:</div></td>
      <td><label>
            <span class="redclore">¥</span>
            <input name="room_prise" type="text" id="room_prise" size="4" maxlength="10" />
      /天</label></td>
    </tr>
   
    <tr>
      <td><div align="right">房间介绍:</div></td>
      <td><label>&nbsp;&nbsp;
        <textarea name="room_introduction" cols="26" rows="6" id="room_introduction"></textarea>
      </label></td>
    </tr>
    
   
    <tr>
      <td>&nbsp;</td>
      <td height="60"><label>
        <input name="add" type="submit" id="add" value="增加"  />
        </label>
        <label> &nbsp;
          <input type="reset" name="Submit2" value="重置" />
        </label></td>
    </tr>
  </table>
</form>
</td>
</tr>
</table>
<p \>
 <script src="../copyright.inc">
</script>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -