$query = mysql_query("UPDATE data_transmitted SET data_left=" . $datarem . " WHERE id=" . $pos); } if ($check <= 0) { echo "<td class=\"sim used\" style=\"width:" . $tdsize . "px\"></td>"; } else { echo "<td class=\"sim collided\" style=\"width:" . $tdsize . "px\"></td>"; //Add data to collision log table $collider = mysql_query("INSERT INTO `crsimula_db`.`collision_log` (`id`, `timestamp`, `puser_collided`, `suser_collided`, `band`, `channel`, `frame`, `slot`,`cycle`) VALUES (NULL, '" . $date . "', 'P" . $i . "', '" . $susrid . "', '1', '" . $i . "', '" . $i . "', '" . $j . "','" . $_GET['cycle'] . "')"); } } else { //add value usage table $query = mysql_query("INSERT INTO `crsimula_db`.`usage` (`uid`, `usrid`, `bandid`, `chanid`, `framid`, `slotid`, `cycle`, `used`, `timestamp`) VALUES (NULL, '" . $i . "', '1', '" . $i . "', '" . $i . "', '" . $j . "', '" . $_GET['cycle'] . "', 'N', '" . $date . "')"); echo "<td class=\"sim notused\" style=\"width:" . $tdsize . "px\"></td>"; } } else { $datarem = $datarem - cal_size($_GET['datype']); //add value usage table $query = mysql_query("INSERT INTO `crsimula_db`.`usage` (`uid`, `usrid`, `bandid`, `chanid`, `framid`, `slotid`, `cycle`, `used`, `timestamp`) VALUES (NULL, '" . $i . "', '1', '" . $i . "', '" . $i . "', '" . $j . "', '" . $_GET['cycle'] . "', 'Y', '" . $date . "')"); $query = mysql_query("UPDATE data_transmitted SET data_left=" . $datarem . " WHERE id=" . $pos); if ($check <= 0) { echo "<td class=\"sim used\" style=\"width:" . $tdsize . "px\"></td>"; } else { echo "<td class=\"sim collided\" style=\"width:" . $tdsize . "px\"></td>"; //Add data to collision log table $collider = mysql_query("INSERT INTO `crsimula_db`.`collision_log` (`id`, `timestamp`, `puser_collided`, `suser_collided`, `band`, `channel`, `frame`, `slot`,`cycle`) VALUES (NULL, '" . $date . "', 'P" . $i . "', '" . $susrid . "', '1', '" . $i . "', '" . $i . "', '" . $j . "','" . $_GET['cycle'] . "')"); } } $cont = $cont + 1; $pos = $pos + 1; } echo "</tr>";
<div class="reglayout"><strong>Simulation Setup Summary</strong><hr /> <?php if ($_GET['simtype'] == "Single") { echo "<p>Single secondary user will be simulated</p>"; } else { echo "<p>Multiple secondary user will be simulated</p>\n\t\t\t\t\t\t\t\t\t \t\t<p>Number of users to simulate: <strong>" . $_GET['numusers'] . "</strong></p>"; } ?> <p>Simulation Frame Size: <strong><?php echo $GLOBALS['frsize']; ?> bytes</strong></p> <p>Packet Size for selected protocol: <strong><?php $prot = cal_size($_GET['datatype']); echo $prot; ?> </strong></p> <p>How much data will be sent: <strong><?php echo $_GET['datasize'] * 1000; ?> bytes</strong></p> <p>Number of channels for the simulation: <strong><?php echo mysql_num_rows(mysql_query("SELECT * FROM channels")); ?> </strong></p> <p>Oportunistic Algorithm to be used: <strong><?php echo $_GET['algorithm']; ?> </strong></p>