if ($i != 0 && $i % 12 == 0) { $rowTrack++; print new_row($rowTrack); } print $mainMenuArrayImage[$i]; } print $closeWordArea; $selectedSubButton = 0; for ($i = 0; $i < $tableNo; $i++) { print new_word_area($i + 2, "sub"); $rowTrack = 1; for ($j = 1; $j < $subMenuWordImageTotal[$i]; $j++) { print $subMenuArrayImage[$selectedSubButton]; if ($j % 12 == 0) { $rowTrack++; print new_row($rowTrack); } $selectedSubButton++; } print $closeWordArea; } ?> </div> <script> //--- Table 1 Point Scanning --- var mainButtons = <?php print count($mainMenuArrayImage); ?> ; var totalMainPhrase = <?php
$user = @$_SESSION['myemail']; if ($user != "admin") { header("location: ./../index.php"); die; } require './../config.php'; require './../src/security.php'; $action = @$_POST['action']; if ($action == 'show_table') { show_table(); } if ($action == 'delete_row') { delete_row(); } if ($action == 'new_row') { new_row(); } if (preg_match('/change/', $action)) { change($action); } function show_table() { $data = $GLOBALS['DB']->query("SELECT * FROM user"); echo json_encode($data); } function delete_row() { $id = (int) @$_POST['id']; $GLOBALS['DB']->query("DELETE FROM user WHERE id=?", array($id)); } function change($action)