📄 style.php
字号:
<?php
include("fun_check.php");
include("../includes/fun_data.php");
include("../includes/inc_var.php");
DB($g_db_host, $g_db_name, $g_db_user, $g_db_password);
$db = new DBReader;
$db->execute("SELECT * FROM `".$g_db_prefix."style`");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../includes/main.css">
<title>星雨留言板</title>
</head>
<body>
<table width="100%" border="0">
<tr>
<th height="25" colspan="3">样式模板管理</th>
</tr>
<tr><form action="s_add.php" method="post" name="style" id="style">
<td height="25" colspan="3">
名称:
<input name="name" type="text" id="name" maxlength="32" class="textbox">
路径:
<input name="path" type="text" class="textbox" id="path" value="style/" maxlength="255">
<input type="submit" name="Submit" value="添加" class="button">
</td></form>
</tr>
<tr>
<td height="25" colspan="3">
<?php
if($db->count() == 0)
{
echo "没有模板!</td></tr></table></body></html>";
exit();
}
if(isset($_GET["page"]))
$page = (int)$_GET["page"];
else
$page = 1;
$getpage = new Page($page, $db->count(), 30);
echo "共 <font class=\"pagefont\">".$getpage->count()."</font> 页 ";
echo "<a href=\"style.php?page=".$getpage->begin()."\">|<</a> <a href=\"style.php?page=".$getpage->pre()."\"><<</a> ";
if($getpage->getpage() < 10)
{
$k = 1;
$j = $getpage->count();
}
else
{
$k = $getpage->getpage() - 9;
$j = $getpage->getpage() + 9;
}
for($i = $k; $i <= $j; $i++)
if($i==$page)
echo " <a href=\"style.php?id=".$u_id."&page=$i\"><font class=\"pagefont\">$i</font></a> ";
else
echo " <a href=\"style.php?page=$i\">$i</a> ";
echo " <a href=\"style.php?page=".$getpage->next()."\">>></a> <a href=\"style.php?page=".$getpage->end()."\">>|</a>";
$db->execute("SELECT * FROM ".$g_db_prefix."style ORDER BY s_ID DESC LIMIT ".$getpage->start().", 30");
?>
</td>
</tr>
<tr>
<td width="150" height="25" align="center">名称</td>
<td width="500" align="center">路径</td>
<td align="center">操作
<SCRIPT language="javascript">
function delcheck(name, id)
{
if(confirm("是否删除样式:"+name))
self.location="s_del.php?id="+id+"&name="+name;
}
</SCRIPT>
</td>
</tr>
<?php
while($dbrow = $db->reader())
{
?>
<tr>
<td height="25" align="center"><?php echo $dbrow["s_name"]?></td>
<td><?php echo $dbrow["s_path"]?></td>
<td align="center"><a href="#" onclick="javascript:delcheck('<?php echo $dbrow["s_name"]?>','<?php echo $dbrow["s_ID"]?>')">删除</a></td>
</tr>
<?php }?>
<tr>
<td height="25" colspan="3">
<?php
echo "共 <font class=\"pagefont\">".$getpage->count()."</font> 页 ";
echo "<a href=\"style.php?page=".$getpage->begin()."\">|<</a> <a href=\"style.php?page=".$getpage->pre()."\"><<</a> ";
if($getpage->getpage() < 10)
{
$k = 1;
$j = $getpage->count();
}
else
{
$k = $getpage->getpage() - 9;
$j = $getpage->getpage() + 9;
}
for($i = $k; $i <= $j; $i++)
if($i==$page)
echo " <a href=\"style.php?id=".$u_id."&page=$i\"><font class=\"pagefont\">$i</font></a> ";
else
echo " <a href=\"style.php?page=$i\">$i</a> ";
echo " <a href=\"style.php?page=".$getpage->next()."\">>></a> <a href=\"style.php?page=".$getpage->end()."\">>|</a>";
?>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -