Ejemplo n.º 1
0
function display_elements($v)
{
    if ($v == 'zone') {
        $zone_result = mysql_query("select DISTINCT(zone_id) from zone_network");
        while ($z_result = mysql_fetch_assoc($zone_result)) {
            $zone_network_result = mysql_query("select * from zone_network where zone_id='" . $z_result['zone_id'] . "'");
            echo "<tr><td colspan=2><span class='table_heading' style='font-weight:900;'>" . tellZoneName($z_result['zone_id']) . "</span></td></tr>";
            while ($row = mysql_fetch_assoc($zone_network_result)) {
                echo "<tr><td>" . tellNetworkName($row['network_id']) . "</td><td>" . tellType($row['type_available']) . "</td><tr>";
            }
        }
    } else {
        if ($v == 'network') {
            $network_result = mysql_query("select DISTINCT(network_id) from zone_network");
            while ($n_result = mysql_fetch_assoc($network_result)) {
                $zone_network_result = mysql_query("select * from zone_network where network_id='" . $n_result['network_id'] . "'");
                echo "<tr><td colspan=3><span class='table_heading' style='font-weight:900;'>" . tellNetworkName($n_result['network_id']) . "</span></td></tr>";
                while ($row = mysql_fetch_assoc($zone_network_result)) {
                    echo "<tr><td>" . tellZoneName($row['zone_id']) . "</td><td>" . tellType($row['type_available']) . "</td><td><input type='button' onClick='delZoneNetwork(" . $row['id'] . ")' /></td></tr>";
                }
            }
        }
    }
}
Ejemplo n.º 2
0
			<th>Zone</th>
			<th>PostPaid/PrePaid</th>
			<th>Category of Plan</th>
			<th>Amount</th>
			<th>TalkTime</th>
			<th>2G Data</th>
			<th>3G Data</th>
			<th>Validity</th>
			<th>Messages</th>
			<th>Other</th>
			<th>Comments</th>
		</tr>
		<?php 
$i = 1;
while ($row = mysql_fetch_assoc($plan_result)) {
    echo "<tr>\n\t\t\t\t\t<td>{$i}</td>\n\t\t\t\t\t<td>" . tellNetworkName($row['network_id']) . "</td>\n\t\t\t\t\t<td>" . tellZoneName($row['zone_id']) . "</td>\n\t\t\t\t\t<td>" . tellType($row['type']) . "\n\t\t\t\t\t<td>" . tellPlanCat($row['plan_cat']) . "</td>\n\t\t\t\t\t<td>" . $row['amt'] . "</td>\n\t\t\t\t\t<td>" . $row['talktime'] . "</td>\n\t\t\t\t\t<td>" . $row['data2g'] . "</td>\n\t\t\t\t\t<td>" . $row['data3g'] . "</td>\n\t\t\t\t\t<td>" . $row['validity'] . "</td>\n\t\t\t\t\t<td>" . $row['msgs'] . "</td>\n\t\t\t\t\t<td>" . $row['other'] . "</td>\n\t\t\t\t\t<td>" . $row['comment'] . "</td>\n\t\t\t\t\t<td style='padding: 4px 5px'> <input type='button' onClick='plan_del(" . $row['sno'] . ")' value='DELETE'>\n\t\t\t\t\t</tr>";
    $i++;
}
?>
	</table>
</div>
<br><br>
<div id='plan_entry'>
	<div id='form_holder'>
		<form name='plan_form'>
			<table class='form_table'>
				<tr>
					<td>
						<select name='network' onChange="loadZones()">
							<option value=''>Select Network...</option>						
							<?php