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

📄 admin_html.php

📁 BLOG HOSTER---PHP & MYSQL Create Blogs in seconds Installation of your BlogHoster system is easy.
💻 PHP
字号:
<?
$page = "admin_html.php";
include "admin_header.php"; 

if(isset($_POST['task'])) { $task = $_POST['task']; } else { $task = "main"; }




if($task == "dosave") {
$html_header = $_POST['html_header'];
$html_footer = $_POST['html_footer'];

$html_header = str_replace("&lt;", "<", $html_header);
$html_footer = str_replace("&lt;", "<", $html_footer);

mysql_query("UPDATE bhost_admin SET html_header='$html_header', html_footer='$html_footer'");

echo $head;
echo "
<h2>$admin_html1</h2>
$admin_html2
<br><br>
<form action='admin_html.php' method='POST'>
<input type='submit' class='button' value='$admin_html3'>
</form>
";
echo $foot;
exit();
}







if($task == "restore") {
echo $head;
echo "
<h2>$admin_html4</h2>
$admin_html5
<br><br>
<form action='admin_html.php' method='POST'>
<input type='submit' name='submit' class='button' value='$admin_html6'>
<input type='submit' name='submit' class='button' value='$admin_html7'>
<input type='hidden' name='task' value='dorestore'>
</form>
";
echo $foot;
exit();
}





if($task == "dorestore") {
$submit = $_POST['submit'];

if($submit == "$admin_html7") {
header("Location: admin_html.php");
exit();
} else {

$default_head = "
<html>
<head>
<title>Weblog Host</title>
<style type='text/css'>

/* PAGE WIDTH */
table.page { width: 100%; }

/* MENU */
td.item { background: #F5F5F5; font-size: 8pt; padding: 5px; padding-left: 4px; border-bottom: 1px solid #AAAAAA; }
td.item2 { background: #DDDDDD; font-size: 8pt; padding: 5px; padding-left: 4px; border-bottom: 1px solid #AAAAAA; }
td.itemcat { background: #666666; color: #FFFFFF; font-size: 8pt; padding: 5px; padding-left: 4px; border-bottom: 1px solid #AAAAAA; }
td.itemlogout { background: #F5F5F5; font-size: 8pt; padding: 5px; padding-left: 4px; }

/* GLOBAL */
body { font-size: 8pt; font-family: verdana, arial, tahoma; color: #333333; }
form { margin: 0px; }
td { font-size: 8pt; font-family: verdana, arial, tahoma; color: #333333; }
td.content { padding: 10px; padding-top: 2px; padding-right: 0px; line-height: 17px; color: #333333; }
td.list { background: #FFFFFF; padding: 7px; border: 1px solid #AAAAAA; border-top: none; }
td.header { border: 1px solid #AAAAAA; padding: 7px; padding-bottom: 7px; background: #DDDDDD; font-weight: bold; }
td.header2 { border: 1px solid #AAAAAA; border-right: none; padding: 7px; padding-bottom: 7px; background: #DDDDDD; font-weight: bold; }
td.announce { background: #F5F5F5; padding: 7px; border: 1px solid #CCCCCC; }
td.box { padding: 7px; line-height: 17px; padding-left: 0px; padding-top: 0px; }
td.empty { background: #F5F5F5; padding: 7px; border: 1px solid #AAAAAA; }
td.entry1 { border-right: 1px solid #DDDDDD; padding: 5px; padding-right: 10px; padding-bottom: 0px; }
td.entry2 { padding: 5px; padding-left: 10px; padding-bottom: 0px; }
td.advanced { padding: 5px; background: #EEEEEE; border-bottom: 1px solid #AAAAAA; }
div.float { float: left; padding-right: 1px; }
table.box { width: 130px; border: 1px solid #666666; border-bottom: 2px solid #666666; background: #F5F5F5; }

/* PROFILE PAGE */
img.avatar { border: 1px solid #666666; }
table.profile { border: 1px solid #AAAAAA; }
td.profile1 { background: #DDDDDD; font-weight: bold; border-bottom: 1px solid #AAAAAA; padding: 6px; padding-bottom: 0px; }
td.profile2 { background: #F5F5F5; padding: 6px; line-height: 17px; color: #333333; }
li { list-style-type: square; }

/* CHOOSE TEMPLATE PAGE */
img.template { border: 1px solid #AAAAAA; margin-top: 3px; }
div.templatebox { padding: 5px; background: #FFFFFF; border: 1px solid #666666; margin-top: 5px; margin-right: 15px; }

/* EDIT TEMPLATE PAGE */
textarea.edit_template { margin-top: 10px; width: 100%; font-family: \"Courier New\", courier, arial, tahoma; }

/* GENERAL SETTINGS PAGE */
textarea.settings { width: 413px; font-size: 9pt; font-family: \"Courier New\"; }

/* ALTERNATING LISTS */
td.list1a { background: #FFFFFF; padding: 7px; border: 1px solid #CCCCCC; border-top: none; border-right: none; }
td.list1b { background: #FFFFFF; padding: 7px; border: 1px solid #CCCCCC; border-top: none; }
td.list2a { background: #F5F5F5; padding: 7px; border: 1px solid #CCCCCC; border-top: none; border-right: none; }
td.list2b { background: #F5F5F5; padding: 7px; border: 1px solid #CCCCCC; border-top: none; }

/* FONTS */
h1 { margin-left: 3px; font-family: \"Trebuchet MS\", verdana, arial, tahoma; margin-bottom: 4px; font-size: 18pt; }
h2 { font-family: \"Trebuchet MS\", verdana, arial, tahoma; margin-bottom: 2px; font-size: 12pt; }
font.disabled { color: #666666; }
font.gray { color: #666666; }
font.stats { font-size: 7pt; font-family: arial, verdana, tahoma; }
font.url { font-size: 9pt; font-weight: normal; }

/* INPUT FIELDS */
input.button { background-color: #DDDDDD; padding: 3px; font-size: 9pt; font-weight: bold; font-family: verdana, arial, tahoma; }
input.sbutton { background-color: #DDDDDD; font-size: 8pt; font-weight: bold; font-family: verdana, arial, tahoma; }
input.text { font-family: arial, verdana, tahoma; }
textarea, select { font-family: arial, verdana, tahoma; margin-top: 1px; font-size: 10pt; }
select.small { font-size: 8pt; margin-left: 4px; }
input.status { border: none; background: clear; padding-left: 8px; font-size: 8pt; font-weight: bold; font-family: verdana, arial, tahoma; }

/* NORMAL LINKS */
a:link { color: #000066; }
a:visited { color: #000066; }
a:hover { color: #000066; }

/* MENU LINKS */
a.menu:link { color: #000000; text-decoration: none; }
a.menu:visited { color: #000000; text-decoration: none; }
a.menu:hover { color: #000000; text-decoration: underline; }

</style>
</head>
<body>

<!-- REPLACE WITH YOUR LOGO -->
<table width='300' cellpadding='7' cellspacing='0' style='border: 1px dashed #AAAAAA; background: #F5F5F5;'>
<tr><td><font style='font-size: 12pt;'><b>Your Logo/HTML Header Here</b></font><br>Replace this area in your admin control panel.</td></tr>
</table>

<br>
";

$default_foot = "
</body>
</html>
";

$default_head = str_replace("'", "\\'", $default_head);
$default_foot = str_replace("'", "\\'", $default_foot);

mysql_query("UPDATE bhost_admin SET html_header='$default_head', html_footer='$default_foot'");

echo $head;
echo "
<h2>$admin_html9</h2>
$admin_html10
<br><br>
<form action='admin_html.php' method='POST'>
<input type='submit' class='button' value='$admin_html3'>
</form>
";
echo $foot;
}
}






if($task == "main") {
echo $head;
$settings = mysql_fetch_assoc(mysql_query("SELECT * FROM bhost_admin"));

$html_header = str_replace("<", "&lt;", $settings[html_header]);
$html_footer = str_replace("<", "&lt;", $settings[html_footer]);

echo "
<h2>$admin_html1</h2>
$admin_html11
<br><br>
$admin_html12

<br><br>

<form action='admin_html.php' method='POST'>
<b>$admin_html13</b> - $admin_html14<br>
<textarea wrap='off' rows='25' cols='60' name='html_header' style='font-family: \"Courier New\", verdana, arial; width: 100%;'>$html_header</textarea>
<br>

<b>$admin_html15</b> - $admin_html16<br>
<textarea wrap='off' rows='25' cols='60' name='html_footer' style='font-family: \"Courier New\", verdana, arial; width: 100%;'>$html_footer</textarea>
<br>

<table cellpadding='0' cellspacing='0'>
<tr>
<td><input type='submit' class='button' value='$admin_html17'>&nbsp;</td>
<input type='hidden' name='task' value='dosave'>
</form>
<form action='admin_html.php' method='POST'>
<td><input type='submit' class='button' value='$admin_html6'></td>
<input type='hidden' name='task' value='restore'>
</form>
</tr>
</table>
</form>
";
echo $foot;
}
?>

⌨️ 快捷键说明

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