$val) { if ($acs[$val] == 'UNCLASSIFIED/PENDING') { continue; } list($value, $log, $offset) = explode('_', $name); mysql_query('INSERT INTO windowclassifications (activity_id, log_id, wc_offset) VALUES ('. ((int) $val) . ', ' . ((int) $log) . ', ' . ((int) $offset) . ')'); } } if (isset($_POST['action'])) { $args = array(); $action = str_replace('.', '_', $_POST['action']) . '_'; foreach ($_POST as $k => $v) { if (substr($k, 0, strlen($action)) == $action) { $args[substr($k, strlen($action))] = $v; } } call_user_func('process_' . str_replace('.', '_', $_POST['action']), $args); header('Location: /android/admin.php'); exit; } # ------------------- End of form handling ---------------------- $acs = getActivityArray(); ?>

Activity management

Add an activity

/

Sample management

'; while ($row = mysql_fetch_assoc($res)) { $sql2 = 'SELECT wc_offset, activity_id FROM windowclassifications WHERE log_id = ' . $row['log_id']; $res2 = mysql_query($sql2); $wcs = array(); while ($row2 = mysql_fetch_assoc($res2)) { $wcs[(int) $row2['wc_offset']] = (int) $row2['activity_id']; } $points = 0; echo ''; foreach ($row as $k => $v) { echo ''; } echo '
', $k, '', $k == 'log_data' ? ($points = count(explode("\n", $v))) . ' line(s)' : nl2br(htmlentities($v)), '
'; echo ''; echo ''; echo '
    '; for ($i = 0; $i + 128 < $points; $i += 128) { echo '
  1. '; echo ''; echo '
  2. '; } echo '
'; echo '
'; echo ''; echo '
'; echo '
'; echo '
    '; for ($i = 64; $i + 128 < $points; $i += 128) { echo '
  1. '; echo ''; echo '
  2. '; } echo '
'; echo ''; echo ''; } echo ''; ?>