echo Language::string(124);
?>
</b></td>
            </tr>
        </table>
    </legend>
    <select id="formTableSelectMySQLTable" class="fullWidth ui-widget-content ui-corner-all">
        <option value="0">&lt;<?php 
echo Language::string(73);
?>
&gt;</option>
        <?php 
$sql = "SHOW TABLES";
$z = mysql_query($sql);
while ($r = mysql_fetch_array($z)) {
    if (in_array($r[0], Ini::get_user_system_tables()) || $r[0] == $table->name) {
        continue;
    }
    ?>
            <option value="<?php 
    echo $r[0];
    ?>
"><?php 
    echo $r[0];
    ?>
</option>
        <?php 
}
?>
    </select>
</fieldset>
Ejemplo n.º 2
0
 public static function create_db_structure($simulate = false)
 {
     foreach (Ini::get_master_system_tables() as $table) {
         $sql = sprintf("SHOW TABLES IN `%s` LIKE '%s'", Ini::$db_master_name, $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));
                 }
             }
         }
     }
     foreach (User::get_all_db() as $db_name) {
         foreach (Ini::get_user_system_tables() as $table) {
             $sql = sprintf("SHOW TABLES IN `%s` LIKE '%s'", $db_name, $table);
             $z2 = mysql_query($sql);
             if (mysql_num_rows($z2) == 0) {
                 if ($simulate) {
                     return true;
                 } else {
                     if (!$table::create_db($db_name)) {
                         return json_encode(array("result" => 1, "param" => $table));
                     }
                 }
             }
         }
     }
     if ($simulate) {
         return false;
     }
     return json_encode(array("result" => 0));
 }