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

📄 edit.php

📁 Audio-visual system an online simulation of the film, when operations can be used by the
💻 PHP
字号:
<?php 

require ("../include/config.php"); 
require ("./global.php"); 

$cookie_user = $HTTP_COOKIE_VARS[$cookie_name.'_user']; 
$cookie_pass = $HTTP_COOKIE_VARS[$cookie_name.'_pass']; 

islogin($cookie_user,$cookie_pass); 

if (!$delete == ""): 
delrecord($delete); 
echo "<br><center><a href=list.php>Has been deleted</a><br>"; 
echo "<META HTTP-EQUIV=REFRESH CONTENT='0;URL=list.php'>"; 
exit; 
endif; 

if ($sendedit): 
editrecord($name,$sort2id,$brief,$pic,$rm,$asf,$flash,$rmzx,$asfzx,$flashzx); 
echo "<br><center><a href=list.php>have been amend</a><br>"; 
echo "<META HTTP-EQUIV=REFRESH CONTENT='0;URL=list.php'>"; 
exit; 
endif; 

if ($sendadd): 
editrecord($name,$sort2id,$brief,$pic,$rm,$asf,$flash,$rmzx,$asfzx,$flashzx); 
echo "<br><center><a href=list.php>have been add</a><br>"; 
echo "<META HTTP-EQUIV=REFRESH CONTENT='0;URL=edit.php'>"; 
exit; 
endif; 

include ("../include/header.php"); 

mysql_pconnect($dbhost,$dbuser,$dbpasswd); 

echo "<center>\n"; 
echo "<table border=0 cellspacing=0 style='border-collapse:collapse' width=735 height=233 cellpadding=3>\n"; 
echo "<tr>\n"; 

echo "<td width=185 valign=top>\n"; 
adminmenu(); 
echo "</td>\n"; 

echo "<td width=550 height=233 valign=top>\n"; 

if (!$id == ""): 
mysql_pconnect($dbhost,$dbuser,$dbpasswd); 
$sql = "SELECT * FROM $down_table WHERE id=$id"; 
$result = mysql_db_query($dbname, $sql); 
$row = mysql_fetch_array($result); 
$sendname = "sendedit"; 
else: 
$sendname = "sendadd"; 
endif; 

?> 

<center> 
<table  style="border-collapse: collapse" bordercolor="#111111" border=1 cellspacing=0 cellpadding=3 width=500><col width=100><col width=400> 
<tr> 
<form action="edit.php" method="POST"> 
<td align=right>serial number:</td> 
<? 
if (!$row[id] == ""): 
$row_id = $row[id]; 
else: 
$row_id = ""; 
endif; 
?> 
<td><input type=text name=id size=15 value="<? echo $row_id;?>" style='color:#000000; border:0px; background-color:#f7f7f7' readonly></td> 
</tr> 

<tr> 
<td align=right>choose type:</td> 
<? 
$typesql = "SELECT COUNT(*) AS rcnt FROM $down_sort2_table ORDER BY id"; 
$typeresult = mysql_db_query($dbname, $typesql); 
$typerow = mysql_fetch_array($typeresult); 

$typesql = "SELECT * FROM $down_sort2_table ORDER BY id"; 
$typeresult = mysql_db_query($dbname, $typesql); 
?> 
<td><select size=1 name=sort2id> 
<? 
while ($typerow=mysql_fetch_array($typeresult)) { 
if ($row[sort2id] == $typerow[id]): 
echo "<option value=".$typerow[id]." selected>".$typerow[sort2]."</option>\n"; 
else: 
echo "<option value=".$typerow[id].">".$typerow[sort2]."</option>\n"; 
endif; 
} 
?></td> 
</tr> 

<tr> 
<td align=right>Fill in name:</td> 
<td><input type=text name=name size=20 value="<? echo $row[name];?>"></td> 
</tr> 

<tr> 
<td align=right>picture address:</td> 
<td><input class=border type=text name=pic size=50 value='http://y888.net/k666/tt78/8/pic/my.gif' onFocus=this.value="<? echo $row[pic];?>"></td> 
</tr> 

<tr> 
<td width=131 valign=top valign=top align=right>introduction:</td> 
<td><input type=text name=brief size=50 value="<? echo $row[brief];?>"></td> 
</tr> 

<tr> 
<td align=right> rm  format address:</td> 
<td><input type=text name=rm size=50 value="<? echo $row[rm];?>"></td> 
</tr> 

<tr> 
<td align=right>asf  format address:</td> 
<td><input type=text name=asf size=50 value="<? echo $row[asf];?>"></td> 
</tr> 

<tr> 
<td align=right>flashformat address:</td> 
<td><input type=text name=flash size=50 value="<? echo $row[flash];?>"></td> 
</tr> 

<tr> 
<td width=492 colspan=2 align=center> 
<input type=submit value=submit name=<? echo $sendname;?>> 
<input type=reset value= refill></td> 
</form> 
</tr> 
</table> 
</center> 

<?php 

echo "</td>\n"; 

echo "</tr>\n"; 
echo "</table>\n"; 

include ("../include/footer.php"); 

?> 

⌨️ 快捷键说明

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