echo "</td>";
         echo $tdWithClass;
         // -g-> Here, we need to put the ROWID in as the link for both the edit and delete.
         echo "<a href='" . PAGE . "?table=" . $table . "&action=row_editordelete&pk=" . $pk . "&type=edit'>edit</a>";
         echo "</td>";
         echo $tdWithClass;
         echo "<a href='" . PAGE . "?table=" . $table . "&action=row_editordelete&pk=" . $pk . "&type=delete' style='color:red;'>delete</a>";
         echo "</td>";
         for ($j = 0; $j < sizeof($result); $j++) {
             if ($result[$j][2] == "TEXT") {
                 echo $tdWithClassLeft;
             } else {
                 echo $tdWithClass;
             }
             // -g-> although the inputs do not interpret HTML on the way "in", when we print the contents of the database the interpretation cannot be avoided.
             echo $db->formatString($arr[$i][$j]);
             echo "</td>";
         }
         echo "</tr>";
     }
     echo "</table>";
     echo "<a onclick='checkAll()'>Check All</a> / <a onclick='uncheckAll()'>Uncheck All</a> <i>With selected:</i> ";
     echo "<select name='type'>";
     echo "<option value='edit'>Edit</option>";
     echo "<option value='delete'>Delete</option>";
     echo "</select> ";
     echo "<input type='submit' value='Go' name='massGo' class='btn'/>";
     echo "</form>";
 } else {
     if ($rowCount > 0) {
         echo "<br/><br/>There are no rows in the table for the range you selected.";
         echo "</td>";
         echo $tdWithClass;
         echo "<a href='" . PAGE . "?table=" . $table . "&action=row_editordelete&pk=" . $pk . "&type=delete' style='color:red;'>delete</a>";
         echo "</td>";
         for ($j = 0; $j < sizeof($result); $j++) {
             if (strtolower($result[$j][2]) == "integer" || strtolower($result[$j][2]) == "float" || strtolower($result[$j][2]) == "real") {
                 echo $tdWithClass;
             } else {
                 echo $tdWithClassLeft;
             }
             // -g-> although the inputs do not interpret HTML on the way "in", when we print the contents of the database the interpretation cannot be avoided.
             // di - i don't understand how SQLite returns null values. I played around with the conditional here and couldn't get empty strings to differeniate from actual null values...
             if ($arr[$i][$j] == NULL) {
                 echo "<i>NULL</i>";
             } else {
                 echo $db->formatString($arr[$i][$j]);
             }
             echo "</td>";
         }
         echo "</tr>";
     }
     echo "</table>";
     echo "<a onclick='checkAll()'>Check All</a> / <a onclick='uncheckAll()'>Uncheck All</a> <i>With selected:</i> ";
     echo "<select name='type'>";
     echo "<option value='edit'>Edit</option>";
     echo "<option value='delete'>Delete</option>";
     echo "</select> ";
     echo "<input type='submit' value='Go' name='massGo' class='btn'/>";
     echo "</form>";
 } else {
     if ($rowCount > 0) {
Example #3
0
         echo $tdWithClass;
         echo "<a href='" . PAGE . "?table=" . $table . "&action=row_editordelete&pk=" . $pk . "&type=delete' style='color:red;'>delete</a>";
         echo "</td>";
     }
     for ($j = 0; $j < sizeof($result); $j++) {
         if (strtolower($result[$j][2]) == "integer" || strtolower($result[$j][2]) == "float" || strtolower($result[$j][2]) == "real") {
             echo $tdWithClass;
         } else {
             echo $tdWithClassLeft;
         }
         // -g-> although the inputs do not interpret HTML on the way "in", when we print the contents of the database the interpretation cannot be avoided.
         // di - i don't understand how SQLite returns null values. I played around with the conditional here and couldn't get empty strings to differeniate from actual null values...
         if ($arr[$i][$j] == NULL) {
             echo "<i>NULL</i>";
         } else {
             echo $db->formatString($arr[$i][$j]);
         }
         echo "</td>";
     }
     echo "</tr>";
 }
 echo "</table>";
 if (!isset($_GET['view'])) {
     echo "<a onclick='checkAll()'>Check All</a> / <a onclick='uncheckAll()'>Uncheck All</a> <i>With selected:</i> ";
     echo "<select name='type'>";
     echo "<option value='edit'>Edit</option>";
     echo "<option value='delete'>Delete</option>";
     echo "</select> ";
     echo "<input type='submit' value='Go' name='massGo' class='btn'/>";
 }
 echo "</form>";