function main() { echo "In main\n"; _make_conf(); // read conf $conf_file = './my_first.conf'; $conf = read_conf($conf_file); print "got conf\n"; // db connect //$dbh = db_connect($conf['database']); $dbh = new DBHandler($conf['database']); if ($dbh) { print "Connected to " . $dbh->get_host() . "\n"; } insert_department($dbh); get_all_departments($dbh); update_department($dbh); get_specific_departments($dbh); get_one_department($dbh); get_all_departments_two($dbh); delete_department($dbh); get_departments_keyed($dbh); }
$Email = $_POST['Email']; $Distance = $_POST['Distance']; $BSSalary = $_POST['BSSalary']; $PoF = $_POST['PoF']; $pwd = sha1($EId . $_POST['pwd']); add_user($EId, $DoB, $Name, $Sex, $Email, $Distance, $BSSalary, $PoF, $pwd); include '/view/add_user.php'; break; case 'add_department': $Name = $_POST['Name']; $Info = $_POST['Info']; add_department($Name, $Info); include 'view/department.php'; break; case 'delete_department': delete_department($_POST['DId']); include 'view/department.php'; break; case 'show_project': include 'view/project.php'; break; case 'Delete_EP': $PId = $_POST["PId"]; $EId = $_POST["EId"]; Delete_EP($PId, $EId); include 'view/project.php'; break; case 'AddEmpPro': $EId = $_POST['EId']; $PId = $_POST['PId']; $Position = $_POST['Position'];
</th> <th><?php echo get_text('Manager'); ?> </th> <th><?php echo get_text('Action'); ?> </th> </tr> </thead> </table> <?php if (isset($_POST['delete'])) { $id = $_POST['department_id']; delete_department($id); } else { if (isset($_POST['edit'])) { $id = $_POST['department_id']; $department = get_department_by_id($id); $managers = get_managers_info(); ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?> " method="post" class="users"> <table> <tbody> <tr> <td><?php echo $id;