📄 css.php
字号:
<?php
require "function.php";
$cookie_user = $HTTP_COOKIE_VARS[$cookie_name.'_user'];
$cookie_pass = $HTTP_COOKIE_VARS[$cookie_name.'_pass'];
// check cookie
islogin($cookie_user,$cookie_pass);
if($id=="" and $lyj=="1"){
$quer=mysql_query("insert into xydwcss set name='$name',temp='$temp',style='$style'");
if($quer)
echo "<font color=red>添加成功</font>";
else
echo "数据库忙,失败";
}
if(!$id=="" and $del=="0"){
$quer=mysql_query("update xydwcss set name='$name',temp='$temp',style='$style' where id='$id'");
if($quer)
echo "<font color=red>修改成功</font>";
else
echo "数据库忙,修改失败";
}
if(!$id=="" and $del=="1"){
$quer=mysql_query("delete from xydwcss where id='$id'");
if($quer)
echo "<font color=red>删除成功</font>";
else
echo "数据库忙,删除失败";
}
?>
<html>
<head>
<title>风格</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="1.css" type=text/css rel=stylesheet>
</head>
<script language=JavaScript>
function Fjump(value)
{
if(value!= '') {
window.location=('css.php?xid='+value);
}
}
</script>
<table><tr><td>添加新风格:<br>
<form action="css.php" method="post"><input type=hidden name=id><input type=hidden name=lyj value="1">名称:
<input type="text" name="name" value=""><br>html文件夹名: <input type="text" name="temp">
<br>图片文件夹名:
<input type=text name='style'>
<br><input type="submit" name="submit" value="提交">
</form>
</td></tr><tr>
<td>修改连接<br>
<form action="css.php" method="post">
<input type=hidden name=del value="0">
<select name=id class=input onchange=Fjump(this.options[this.selectedIndex].value)>
<option value="">选择风格</option>
<?
$query=mysql_query("select * from xydwcss");
while($array=mysql_fetch_array($query))
echo "<option value=$array[id]>$array[name]</option>";
?>
</select><br>
<?
if($xid!=""){
$query=mysql_query("select * from xydwcss where id=$xid");
$array=mysql_fetch_array($query);
echo"风格名称: <input type=text name='name' value=$array[name]><br>html文件夹名: <input type=text name='temp' value=$array[temp]>
<br>图片文件夹名: <input type=text name='style' value=$array[style]><br>
<input type=hidden name='id' value=$xid>";
}
?>
<br><input type="submit" name="submit" value="提交">
</form>
</td></tr>
<tr>
<td>删除风格<br>
<form action="css.php" method="post">
<select name=id class=input>
<option value="">选择风格</option>
<?
$query=mysql_query("select * from xydwcss");
while($array=mysql_fetch_array($query))
echo "<option value=$array[id]>$array[name]</option>";
?>
</select>
<br><input type=hidden name=del value="1"><input type="submit" name="submit" value="提交">
</form>
</td></tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -