<td align="left">District <label id="district" name="district" ><?php echo $dist_cd . " - " . $district; ?> </label></td> </tr><input type="hidden" id="hid_subdivision_code" name="hid_subdivision_code" /> <tr> <td align="left" colspan="3"> </td></tr> <tr> <td colspan="3" align="center"><input type="submit" name="submit" id="submit" value="Save" class="button" onclick="javascript:return validate();" /></td> </tr> <tr><td colspan="3" align="left"><div id="form1_errorloc" class="error"></div></td></tr> <tr><td colspan="3" align="center"> <?php //include_once('function/training_fun.php'); $rsSubDiv = fatch_subdivision_master('', $dist_cd); $num_rows = rowCount($rsSubDiv); if ($num_rows > 0) { echo "<table width='100%' cellpadding='0' cellspacing='0' border='0' id='table1'>\n"; echo "<tr height='30px'><th align='center'>Subdivision Code</th><th align='left'>Subdivision Name</th><th>Edit</th><th>Delete</th></tr>\n"; for ($i = 1; $i <= $num_rows; $i++) { $rowSubDiv = getRows($rsSubDiv); $subdivision_cd = '"' . encode($rowSubDiv['subdivisioncd']) . '"'; echo "<tr><td align='center' width='30%'>{$rowSubDiv['subdivisioncd']}</td><td width='50%' align='left'>{$rowSubDiv['subdivision']}</td>"; echo "<td align='center' width='10%'><img src='images/edit.png' alt='' height='20px' onclick='javascript:edit_subdivision({$subdivision_cd});' /></td>\n"; echo "<td align='center' width='10%'><img src='images/delete.png' alt='' height='20px' onclick='javascript:delete_subdivision({$subdivision_cd});' /></td></tr>\n"; } echo "</table>\n"; } else { echo "<div id='table1' style='border: 1px solid;'>No records found</div>"; }
include_once '../function/master_fun.php'; $rsDist = fatch_district_master($dist_cd); $num_rows = rowCount($rsDist); $rowDist = getRows($rsDist); $dist = $rowDist['districtcd']; ?> <tr> <th align='left' width='30%'>District</th><th align='left'><?php echo $rowDist['district']; ?> </th> </tr> <tr><td colspan='2' align='center'> <table width='100%' class='table'> <?php $rsSubdiv = fatch_subdivision_master($subdiv_cd, $dist); $num_rowsSubdiv = rowCount($rsSubdiv); if ($num_rowsSubdiv > 0) { for ($k = 1; $k <= $num_rowsSubdiv; $k++) { $rowSubDiv = getRows($rsSubdiv); $sub_div = $rowSubDiv['subdivisioncd']; ?> <tr> <th align='left' width='30%'>Subdivision</th><th align='left'><?php echo $rowSubDiv['subdivision']; ?> </th> </tr> <tr><td colspan='2' align='left'> <table width='100%' class='table1'> <tr><td align="center">Post Status</td><td align="center">Central Government</td>
<?php session_start(); extract($_GET); include_once 'inc/db_trans.inc.php'; include_once 'function/master_fun.php'; $sub_cd = isset($_GET['sub_cd']) ? decode($_GET['sub_cd']) : ""; $act = isset($_GET['act']) ? $_GET['act'] : ""; $opn = isset($_GET['opn']) ? $_GET['opn'] : ""; //====================== District ========================= if ($opn == 'subdiv') { echo "<select name='Subdivision' id='Subdivision' style='width:240px;'>\n"; $dist = $_GET['dist']; $rsSubdiv = fatch_subdivision_master('', $dist); $num_rows = rowCount($rsSubdiv); if ($num_rows > 0) { echo "<option value='0'>-Select Subdivision-</option>\n"; for ($i = 1; $i <= $num_rows; $i++) { $rowSubDiv = getRows($rsSubdiv); echo "<option value='{$rowSubDiv['subdivisioncd']}'>{$rowSubDiv['subdivision']}</option>\n"; unset($rowSubDiv); } } echo "</select>\n"; unset($rsSubdiv, $num_rows); } //======================== Subdivision ========================== if ($sub_cd != '' && $act == 'del') { echo "<img src='images/loading.gif' alt='' />"; $cnt = check_subdivision_delete($sub_cd); if ($cnt == 0) {