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

📄 c_manage.php

📁 一个很不错的oa系统,简单好用,数据库是用mysql5,所以大家要注意,不要因为数据导入而带来问题
💻 PHP
字号:
<?php
	session_start();
	include "../inc/chec.php";
	include "../conn/conn.php";
	include "../inc/func.php";
	$sqlstr = "select * from tb_company";
	$result = mysql_query($sqlstr,$conn);
?>
<link href="../css/style.css" rel="stylesheet" />
<script src="../js/client_js.js"></script>
<table width="765" border="1" cellpadding="0" cellspacing="0" class="big_td">
	<tr>
		<td height="33" background="../images/list.jpg" id="list">企业管理</td>
	</tr>
</table>
<table width="768" height="200" border="1" cellpadding="0" cellspacing="0" bgcolor="#DEEBEF" class="big_td">
  <tr>
    <td width="100" align="center" valign="top">
	<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
<?php
	while($rows = mysql_fetch_row($result)){
		echo "<tr>";
		echo "<td height=30 align=center valign=middle><a href='?id=".$rows[0]."'>".$rows[1]."</a></td>";
		echo "</tr>";
	}
?>
	</table>	</td>
    <th rowspan="2" align="center" valign="top">
	<?php
		if(!isset($_GET[id])){
	?>
	<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
	<form name="r_add" id="r_add" action="c_manage_chk.php" method="post">
	<tr>
		<td width="75" height="25">标题:</td>
		<td><input type="text" name="u_title" id="u_title"></td>
	</tr>
	<tr>
		<td>内容:</td>
		<td><textarea name="u_content" cols="60" rows="23"></textarea></td>
	</tr>
	<tr>
		<td colspan="2" align="center" valign="middle">
		<input type="hidden" name="action" value="add" />
		<input name="add" type="submit" id="add" value="添加" onclick="return add_rule();">&nbsp;
		<input name="reset" type="reset" id="reset" value="重置"></td>
	</tr>
	</form>
	</table>
	<?php
		}else{
		$f_sql = "select * from tb_company where id = ".$_GET[id];
		$f_rst = mysql_query($f_sql,$conn);
		$f_rows = mysql_fetch_row($f_rst);
		?>
		<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
	<form name="r_add" id="r_add" action="c_manage_chk.php" method="post">
	<tr>
		<td height="25">标题:</td>
		<td><input type="text" name="u_title" value=<?php echo $f_rows[1]; ?>>
		</td>
	</tr>
	<tr>
		<td>内容:</td>
		<td>
		<textarea name="u_content" cols="60" rows="23"><?php echo $f_rows[2]; ?></textarea>		</td>
	</tr>
	<tr>
		<td colspan="2" align="center" valign="middle">
		<input type="hidden" name="action" value="modify" />
		<input type="hidden" name="id" value="<?php echo $f_rows[0]; ?>" />
		<input name="add" type="submit" id="add" value="修改" onclick="return add_rule();">&nbsp;
		<input name="reset" type="reset" id="reset" value="重置">&nbsp;
		<label id="s_del"><a href="c_manage_chk.php?action=del&id=<?php echo $f_rows[0]; ?>" class="tmpa" onclick="return del_mess();">删除</a></label>
		</td>
	</tr>
	</form>
	</table>
		
	<?php
		}
	?>	</th>
  </tr>
  <tr>
  	<td height="25" align="center" valign="bottom"><a href="?">添加新制度</a></td>
  </tr>
</table>

⌨️ 快捷键说明

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