echo Language::string(124); ?> </b></td> </tr> </table> </legend> <select id="formTableSelectMySQLTable" class="fullWidth ui-widget-content ui-corner-all"> <option value="0"><<?php echo Language::string(73); ?> ></option> <?php $sql = "SHOW TABLES"; $z = mysql_query($sql); while ($r = mysql_fetch_array($z)) { if (in_array($r[0], Ini::get_system_tables()) || strpos($r[0], Table::get_table_prefix()) !== false && strpos($r[0], Table::get_table_prefix()) == 0) { continue; } ?> <option value="<?php echo $r[0]; ?> "><?php echo $r[0]; ?> </option> <?php } ?> </select> </fieldset>
public static function create_db_structure($simulate = false) { foreach (Ini::get_system_tables() as $table) { $sql = sprintf("SHOW TABLES LIKE '%s'", $table); $z = mysql_query($sql); if (mysql_num_rows($z) == 0) { if ($simulate) { return true; } else { if (!$table::create_db()) { return json_encode(array("result" => 1, "param" => $table)); } } } } if ($simulate) { return false; } return json_encode(array("result" => 0)); }