DLM to PowerDownload Converter

 
Zum convertieren muss Powerdownload bereits installiert sein.
Es dürfen keine Einträge in Powerdownload eingetragen sein. Dies führt zu Fehlern.
An der DLM Datenbank werden keinerlei veränderungen vorgenommen.
Als Uploader wird der Hauptadmin eingetragen. Die User werden nicht mitconvertiert.
Comments werden gelöscht.
Start (Convertiervorgang kann je nach Datenbankgröße sehr lang dauern) sql_query("SELECT * FROM dlm_files WHERE kategorie='$dlm_id'"); while($files_row = $db_handler->sql_fetch_array($files)) { $text = $files_row[description]."\r\n".$files_row[moreinfos]; if($files_row[link1] || $files_row[link2] || $files_row[link3] || $files_row[link4] || $files_row[link5]) { $text .= "\r\n\r\nRelated Links:\r\n"; } if($files_row[link1] && $files_row[ltitle1]) { $text .= "$files_row[ltitle1]\r\n"; } if($files_row[link2] && $files_row[ltitle2]) { $text .= "$files_row[ltitle2]\r\n"; } if($files_row[link3] && $files_row[ltitle3]) { $text .= "$files_row[ltitle3]\r\n"; } if($files_row[link4] && $files_row[ltitle4]) { $text .= "$files_row[ltitle4]\r\n"; } if($files_row[link5] && $files_row[ltitle5]) { $text .= "$files_row[ltitle5]\r\n"; } $db_handler->sql_query("INSERT INTO $sql_table[files] (name, text, timestamp, size, url, ordner_id, uploader, author, votes, vote, loads, views) VALUES ('$files_row[title]', '$text', '$files_row[added]', '$files_row[size]', '$files_row[url]', '$pdl_id', '1', '-1', '$files_row[rater]', '$files_row[rating]', '$files_row[downloads]', '$files_row[views]')"); $pdl_file_id = mysql_insert_id($db_handler->handler); echo "\r\n"; if($files_row[mirror1] && $files_row[mtitle1]) { addmirror($files_row[mirror1],$files_row[mtitle1],$pdl_file_id); $pdl_mirror_id = mysql_insert_id($db_handler->handler); echo "\r\n"; } if($files_row[mirror2] && $files_row[mtitle2]) { addmirror($files_row[mirror2],$files_row[mtitle2],$pdl_file_id); $pdl_mirror_id = mysql_insert_id($db_handler->handler); echo "\r\n"; } if($files_row[mirror3] && $files_row[mtitle3]) { addmirror($files_row[mirror3],$files_row[mtitle3],$pdl_file_id); $pdl_mirror_id = mysql_insert_id($db_handler->handler); echo "\r\n"; } if($files_row[mirror4] && $files_row[mtitle4]) { addmirror($files_row[mirror4],$files_row[mtitle4],$pdl_file_id); $pdl_mirror_id = mysql_insert_id($db_handler->handler); echo "\r\n"; } if($files_row[mirror5] && $files_row[mtitle5]) { addmirror($files_row[mirror5],$files_row[mtitle5],$pdl_file_id); $pdl_mirror_id = mysql_insert_id($db_handler->handler); echo "\r\n"; } } ############### Ordner ################ $subordner = $db_handler->sql_query("SELECT * FROM dlm_categories WHERE under='$dlm_id'"); while($dlm_ordner = $db_handler->sql_fetch_array($subordner)) { adddir($dlm_ordner[title],$dlm_ordner[discription],$pdl_id,0); $pdl_id_new = mysql_insert_id($db_handler->handler); echo "\r\n"; convert_subdirs($dlm_ordner[id],$pdl_id_new); } } $hauptordner = $db_handler->sql_query("SELECT * FROM dlm_categories WHERE under='0'"); while($dlm_ordner = $db_handler->sql_fetch_array($hauptordner)) { adddir($dlm_ordner[title],$dlm_ordner[discription],0,0); $pdl_id = mysql_insert_id($db_handler->handler); echo "\r\n"; convert_subdirs($dlm_ordner[id],$pdl_id); } echo "done
\r\n"; break; } ?>