查看文件: pro_welcome_add.php
大小: 2.1 KB
类型: application/octet-stream
<?php require('system/login.php'); ?> <?php if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO fixnews (title, idate, doc, link ) VALUES (%s, %s, %s, %s )", GetSQLValueString($_POST['title'], "text"), GetSQLValueString($_POST['idate'], "text"), GetSQLValueString($_POST['doc'], "text"), GetSQLValueString($_POST['link'], "text")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($insertSQL, $BE2) or die(mysql_error()); $insertGoTo = "main.php?act=pro_welcome"; header(sprintf("Location: %s", $insertGoTo)); } ?> <form action="" method="post" name="form1" id="form1" > <table width="100%" align="center"> <tr valign="baseline"> <td colspan="2" align="right" valign="top"><label></label></td> </tr> <tr valign="baseline"> <th width="6%" align="right" valign="top" nowrap="nowrap">標題/</th> <td width="94%" valign="middle" class="font3"><input name="title" type="text" id="title" value="" size="50" /> <input type="hidden" name="link" value="" size="50" /></td> </tr> <tr valign="baseline"> <th align="right" valign="top" nowrap="nowrap">發佈日期/</th> <td valign="middle" class="font3"><input name="idate" type="text" id="idate" value="<? echo date('Y-m-d') ;?>" size="12" class="seldate" > 例 2010-01-31 <input type="hidden" name="tmpdate" id="tmpdate" /></td> </tr> <tr valign="baseline"> <th align="right" valign="top" nowrap="nowrap">內文/</th> <td valign="baseline"><textarea name="doc" cols="50" rows="12" id="doc"></textarea></td> </tr> <tr valign="baseline"> <td height="40" align="center" valign="middle" nowrap="nowrap"></td> <td align="center" valign="middle"><input type="hidden" name="MM_insert" value="form1" /> <input type="submit" value="新增資料" /></td> </tr> </table> </form> <div id="showcalendardiv" style="display:none" ><? // include "free_date.php" ;?></div>
保存
取消
返回文件列表