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

📄 move.php

📁 某自制区政府网站源代码.数据库为Access,包含完整的数据库.
💻 PHP
字号:
<?php

// ------------------------------ -------- ------------------------------ //

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

// ------------------------------ -------- ------------------------------ //

mysql_connect($dbhost,$dbuser,$dbpasswd) or die ("数据库连接失败");

// check cookie
islogin($HTTP_COOKIE_VARS[$cookie_name][1],$HTTP_COOKIE_VARS[$cookie_name][2]);

$cookie_user = $HTTP_COOKIE_VARS[$cookie_name][1];


// get groupid

$sql = "SELECT groupid FROM $ym_article_user_table WHERE username='$cookie_user'";
$result = mysql_db_query($dbname, $sql);
$objresult = mysql_fetch_object($result);
$mygroupid = $objresult->groupid;

if ($mygroupid == "1"):

echo "<title>控制面板</title>\n";
echo "<center><br>\n";


// 搜索跳转

echo "<center><br>\n";

echo "<br><table border=0 cellpadding=3 cellspacing=0 style='border-collapse:collapse' bordercolor=#efefef width=735>\n";
echo "<tr>\n";
echo "<td class=shadow2 width=190 valign=bottom>\n";


// 本类/总数

all_and_this();


// 搜索表单

$typesql = "SELECT COUNT(*) AS rcnt FROM $ym_article_sort_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
$typerow = mysql_fetch_array($typeresult);

$typesql = "SELECT * FROM $ym_article_sort_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);


echo "</td>\n";
echo "<form method=POST action=list.php>\n";
echo "<td width=405 align=center valign=bottom>\n";
echo "<img src='../images/search.gif' width=16 heigth=16> ";

echo "标题<input type=checkbox name=title value='1' ";
echo ($name == 0 ? '' : checked);
echo ">\n";

echo "内容<input type=checkbox name=text value='1' ";
echo ($brief == 0 ? '' : checked);
echo ">\n";

echo "<input class=border type=text name=keyword size=12 style='color:#000000; background-color:#efefef'>\n";

echo "<select size=1 name=searchtype style='color:#000000; border-style:solid; border-width:1; background-color:#efefef'>\n";
echo "<option value=0 selected>所有文章</option>\n";
while ($typerow=mysql_fetch_array($typeresult)) {
echo "<option value=".$typerow[id].">".$typerow[name]."</option>\n";
}
echo "</select> \n";

echo "<input class=border type=submit value=搜索 name=search style='color: #000000; background-color: #efefef'>\n";
echo "</td></form>";


// 跳转分类

goto($type);

echo "</tr>\n";
echo "</table>\n";
echo "<br>\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 ($search):
search($keyword,$searchtype,$title,$text);
end;
else:


// 转到转移

if ($move):
move($srcsortid,$dstsortid);
end;
else:


// 批量转移

echo "<center><br><br><br><br><br>";
echo "<b>批量转移</b>";
echo "<form method=POST action=move.php>\n";
echo " 将 ";

$typesql = "SELECT COUNT(*) AS rcnt FROM $ym_article_sort_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
$typerow = mysql_fetch_array($typeresult);

$typesql = "SELECT * FROM $ym_article_sort_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);

echo "<select size=1 name=srcsortid style='color:#000000; border-style:solid; border-width:1; background-color:#efefef'>\n";
echo "<option value='' selected>原属分类</option>\n";
while ($typerow=mysql_fetch_array($typeresult)) {
echo "<option value=".$typerow[id].">".$typerow[name]."</option>\n";
}
echo "</select> \n";


echo " 下的所有文章转移到 ";

$typesql = "SELECT COUNT(*) AS rcnt FROM $ym_article_sort_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
$typerow = mysql_fetch_array($typeresult);

$typesql = "SELECT * FROM $ym_article_sort_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);

echo "<select size=1 name=dstsortid style='color:#000000; border-style:solid; border-width:1; background-color:#efefef'>\n";
echo "<option value='' selected>目的分类</option>\n";
while ($typerow=mysql_fetch_array($typeresult)) {
echo "<option value=".$typerow[id].">".$typerow[name]."</option>\n";
}
echo "</select> \n";

echo "<input type=submit value=转移 name=move class=border style='color: #000000; background-color: #efefef'>\n";

echo "</form>";

echo "<br>\n";



endif; // if move

// end move


endif; // if search

echo "</td>\n";

echo "</tr>\n";
echo "</table>\n";
echo "<br><hr width=735>\n";


else:

echo "<p><center><a href=javascript:history.back(1)>您不是超级管理员, 点击这里返回.</a></p>\n";

endif;

mysql_close();

// ------------------------------ -------- ------------------------------ //

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

// ------------------------------ -------- ------------------------------ //

?>

⌨️ 快捷键说明

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