コード例 #1
0
function _execute_db_update($KG_Path, $KG_Thumb)
{
    global $super_array;
    global $database_table;
    printc("Updating Database ...");
    mysql_query("TRUNCATE TABLE {$database_table}");
    $files = array();
    if (is_dir($KG_Path)) {
        if ($dh = opendir($KG_Path)) {
            while (($file = readdir($dh)) !== false) {
                if ($file != "." and $file != "..") {
                    $type = filetype("{$KG_Path}/" . $file);
                    if ($type == 'dir') {
                        _get_contents_indir($KG_Path, $KG_Thumb, $file);
                    }
                }
            }
            closedir($dh);
        }
    }
    //print_r($super_array);
    _insert_to_sql($super_array);
    printc("Updating Database Complete");
}
コード例 #2
0
function _execute_db_update($KG_Path, $KG_Thumb)
{
    echo "<table border='1' class='center'>";
    _process_text_in_form("Updating Database ...");
    echo "</table> ";
    echo "<table border='1' class='center'>";
    $files = array();
    if (is_dir($KG_Path)) {
        if ($dh = opendir($KG_Path)) {
            while (($file = readdir($dh)) !== false) {
                if ($file != "." and $file != "..") {
                    $type = filetype("{$KG_Path}/" . $file);
                    if ($type == 'dir') {
                        _get_contents_indir($KG_Path, $KG_Thumb, $file);
                    }
                }
            }
            closedir($dh);
        }
    }
    echo "</table> ";
    echo "<table border='1' class='center'>";
    _process_text_in_form("Updating Database Complete");
    echo "</table> ";
}