include "./parameter/class/depart.php"; $db = new DataOperat(); $re = $db->fetch_depart_info(); $num = count($re); ?> </head> <body > <div class="container"> <div class="page-header"> <h3><strong>部门信息</strong></h3> </div> <div class="col-lg-8"> <div class="panel-group" id="accordion"><!-- 整个版面--> <?php $row = new depart(); for ($i = 0; $i < $num; $i++) { $row->initDepart($re[$i]); ?> <div class="panel panel-default"><!-- 单个伸缩项--> <div class="panel-heading"> <h4 class="panel-title"> <a data-toggle="collapse" data-parent="#accordion" href="#panel<?php echo $i + 1; ?> "> <?php echo $row->getName(); ?> </a>
$mydb = new DataOperat(); $re = $mydb->fetch_depart_info(); $num = count($re); ?> <body> <div class="container"> <div class="page-header"> <h3><strong>转移该部门的所有员工</strong></h3> </div> <form method="post" action="deal_del_depart_request.php" class="form col-md-8" > <div class="form-group "> <label> 选择部门:</label> <select class="form-control" id="depart" name="depart"> <?php $row = new depart(); for ($i = 0; $i < $num; $i++) { $row->initDepart($re[$i]); if ($row->getId() != $id) { ?> <option value="<?php echo $row->getId(); ?> "><?php echo $row->getName(); ?> </option> <?php } } ?>
<div class="container"> <div class="page-header"> <h3><strong>更多操作</strong></h3> </div> <table class="table table-striped"> <caption> 部门信息一览</caption> <tr> <th>部门名称</th> <th>部门编码</th> <th>部门人数</th> <th>相关操作</th> </tr> <?php $row = new depart(); for ($i = 0; $i < $num; $i++) { $row->initDepart($re[$i]); ?> <tr> <td><?php echo $row->getName(); ?> </td> <td><?php echo $row->getId(); ?> </td> <td><?php $counter[$i] = $mydb->fetch_depart_num($row->getId()); echo $counter[$i];