for ($i = 0; $i < $rowListAllDepartment; $i++) { if ($i % 2 == 0) { $bgc = "#F7F7F7"; } else { $bgc = "#F1F1F1"; } ?> <tr bgcolor="<?php echo $bgc; ?> "> <td align="left" valign="top"><?php echo $listAllDepartment["{$i}"]["department_name"]; $departmentID = $listAllDepartment["{$i}"]["department_id"]; $department_office_id = $listAllDepartment["{$i}"]["department_office_id"]; $officeNameByDep = $objOffice->GetOfficesByID($department_office_id); ?> </td> <td align="left" valign="top"> <?php if ($department_office_id == 0) { echo "Primary"; } else { echo $officeNameByDep["0"]["office_name"]; } ?> </td> <td align="center"><a href="includes/contents/update/edit_department_info.php?width=500&height=300&depid=<?php echo $departmentID; ?> " class="thickbox" title="Update Department">Edit</a></td>
<?php require_once "../../../lib/office.class.php"; $officeid = $_GET['officeid']; $objOffice = new Office(); $officeInfo = $objOffice->GetOfficesByID($officeid); ?> <form id="OfficeInfo" name="OfficeInfo" method="post" action="includes/model/office_update_actions.php" > <div id="note"> </div> <div class="vertical_form"> <p> <label>Office Name:</label> <input name="officeName" type="text" value="<?php echo $officeInfo[0]['office_name']; ?> " id="txtMname" class="inventori_txtfield" /> </p> <p> <label>Office Address:</label> <textarea name="address" class="inventori_txtfield"><?php echo $officeInfo[0]['office_address']; ?> </textarea> </p>