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

📄 proj.php

📁 学校网站源码http://您的网址/admin/admin_login.asp 默认登录用户:admin 默认登录密码:admin
💻 PHP
字号:
<?php


include( "../config.inc.php" );
include( "../includes/SysGlobal.php" );
include( "language/".$aLan."_".$charset.".php" );
include( "../includes/version.php" );
include( "../includes/pro.php" );
include( "func/adm.inc.php" );
include( "func/common.inc.php" );
include( "func/db.inc.php" );
include( "func/nocatch.php" );
needauth( 17 );
echo "<html>\r\n<head >\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
echo $charset;
echo "\">\r\n<link id=\"style_sheet\" href=\"css/commonstyle.css\" type=\"text/css\" rel=\"stylesheet\">\r\n<title>";
echo $strAdminTitle;
echo "</title>\r\n</head>\r\n\r\n<body  class=\"NormalPage\">\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\" background=\"images/mu8.gif\" height=\"30\" >\r\n  <tr> \r\n    <td >&nbsp;&nbsp;<img src=\"images/bar.gif\">&nbsp;&nbsp;";
echo $strProjTitle;
echo "</td>\r\n    <td width=\"100\" >&nbsp; </td>\r\n  </tr>\r\n</table>\r\n";
$step = $_REQUEST['step'];
if ( $step == "add" && $_POST['project'] != "" && $_POST['project'] != " " )
{
	$project = $_POST['project'];
	$project = htmlspecialchars( $project );
	$intro = $_POST['intro'];
	$intro = htmlspecialchars( $intro );
	$msql->query( "insert into {$tbl_proj} values (0,'{$project}','{$intro}')" );
}
if ( $step == "del" )
{
	$id = $_GET['id'];
	$msql->query( "delete from {$tbl_proj} where id='{$id}'" );
}
if ( $step == "modi" )
{
	$id = $_GET['id'];
	$project = $_GET['project'];
	$intro = $_GET['intro'];
	$msql->query( "update {$tbl_proj} set project='{$project}',intro='{$intro}' where id='{$id}' " );
}
echo " \r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\" bgcolor=\"#FFFFFF\" align=\"center\" height=\"30\">\r\n  <tr> <form method=\"get\" action=\"proj.php\">\r\n   <td class=title >\r\n      \r\n        <input type=\"text\" name=\"key\" size=\"30\">\r\n        <input type=\"submit\" name=\"Submit2\" value=\"";
echo $strSearchTitle;
echo "\" class=button>\r\n     \r\n    </td> </form><form method=\"post\" action=\"proj.php\">\r\n      <td class=title align=\"right\" > <font color=\"#FFFFFF\">";
echo $strProjName;
echo "</font> \r\n        <input type=\"hidden\" name=\"step\" value=\"add\">\r\n        <input type=\"text\" name=\"project\" class=input size=\"18\">&nbsp;\r\n        ";
echo $strProjIntro;
echo " \r\n        &nbsp;<input type=\"text\" name=\"intro\" class=input size=\"39\">\r\n        &nbsp;<input type=\"submit\" name=\"Submit\" value=\"";
echo $strProjNew;
echo "\" class=button>\r\n      </td>\r\n      \r\n    </form>\r\n  </tr>\r\n</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" background=\"images/mu1.jpg\" height=\"5\">\r\n  <tr> \r\n    <td></td>\r\n  </tr>\r\n</table>\r\n\r\n";
$scl = "  id!='0' ";
if ( $key != "" )
{
	$scl .= " and (project regexp '{$key}' or intro regexp '{$key}') ";
}
$totalnums = tblcount( $tbl_proj, "id", $scl );
$pages = new pages( );
$pages->setvar( array(
	"key" => $key
) );
$pages->set( 10, $totalnums );
$pagelimit = $pages->limit( );
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\" align=\"center\">\r\n  <tr>\r\n    <td  class=\"title\" width=\"35\" align=\"center\"><font color=\"#FFFFFF\">";
echo $strNumber;
echo "</font></td>\r\n    <td  class=\"title\" width=\"100\" height=\"26\"><font color=\"#FFFFFF\">";
echo $strProjName;
echo " \r\n      </font></td>\r\n    <td  class=\"title\"><font color=\"#FFFFFF\">";
echo $strProjIntro;
echo "</font></td>\r\n    <td width=\"30\"  class=\"title\" align=\"center\">";
echo $strModify;
echo "</td>\r\n    <td width=\"30\" align=\"center\"  class=\"title\">";
echo $strDelete;
echo "</td>\r\n  </tr>\r\n  ";
$msql->query( "select * from {$tbl_proj} where {$scl} order by id desc limit {$pagelimit}" );
while ( $msql->next_record( ) )
{
	$id = $msql->f( "id" );
	$project = $msql->f( "project" );
	$intro = $msql->f( "intro" );
	echo " \r\n  <tr class=list>\r\n    <td  width=\"35\" align=\"center\">";
	echo "{$id}";
	echo "</td>\r\n    <form method=\"get\" action=\"proj.php\">\r\n      <td  width=\"100\" height=\"30\"> \r\n        <input type=\"text\" name=\"project\" size=\"25\" value=\"";
	echo "{$project}";
	echo "\" class=input>\r\n        <input type=\"hidden\" name=\"id\" value=\"";
	echo "{$id}";
	echo "\">\r\n        <input type=\"hidden\" name=\"step\" value=\"modi\">\r\n      </td>\r\n      <td  > \r\n        <input type=\"text\" name=\"intro\" size=\"90\" value=\"";
	echo "{$intro}";
	echo "\" class=input>\r\n      </td>\r\n      <td width=\"30\" align=\"center\"  > \r\n        <div align=\"CENTER\"> \r\n          <input type=\"image\" border=\"0\" name=\"imageField\" src=\"images/toolbar_modi_up.gif\" width=\"22\" height=\"20\">\r\n        </div>\r\n      </td>\r\n      <td width=\"30\" align=\"center\"  > <img src=\"images/toolbar_delete_up.gif\"  style=\"cursor:hand\" width=\"22\" height=\"20\"  onClick=\"self.location='proj.php?step";
	echo "=del&id=";
	echo $id;
	echo "'\"> \r\n      </td>\r\n    </form>\r\n  </tr>\r\n  ";
}
echo " \r\n</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"6\" bgcolor=\"#FFFFFF\" align=\"center\" background=\"images/mu1.jpg\" height=\"29\">\r\n  <tr> \r\n    <td class=pages>";
$pages->shownow( );
echo " </td>\r\n    <td class=pages width=\"325\" align=\"right\">";
$pages->output( $ShowPageList );
echo "</td>\r\n  </tr>\r\n</table>\r\n</body>\r\n</html>\r\n";
?>

⌨️ 快捷键说明

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