Blassen
Armádní generál (Admin)


Registrace: 1.1. 1970
Příspěvky: 2087
|
 Zaslal:
pá 14. březen, 2008 18:20 Předmět: Downloads to BW_Downloads |
  |
Převede tabulky z Downloads modulu do BW_Downloads modulu
{Kód}:  
 <?php
 
 require_once("mainfile.php");
 
 $result = $db->sql_query("SELECT * FROM ".$prefix."_downloads_categories");
 while ($row = $db->sql_fetchrow($result)) {
 $db->sql_query("insert into ".$prefix."_downloads_categories_bw values ('".$row['cid']."', '".$row['title']."', '".$row['cdescription']."', '".$row['parentid']."')");
 }
 echo "<br>ubdate table......".$prefix."_downloads_categories_bw....<br>\n";
 $db->sql_freeresult($result);
 
 $result = $db->sql_query("SELECT * FROM ".$prefix."_downloads_downloads");
 while ($row = $db->sql_fetchrow($result)) {
 $row['title'] = str_replace("'", "", $row['title']);
 $db->sql_query("INSERT INTO ".$prefix."_downloads_downloads_bw values ('".$row['lid']."', '".$row['cid']."', '".$row['sid']."', '".$row['title']."', '".$row['url']."', '".$row['description']."', '".$row['date']."', '".$row['name']."', '".$row['email']."', '".$row['hits']."', '".$row['submitter']."', '".$row['downloadratingsummary']."', '".$row['totalvotes']."', '".$row['totalcomments']."', '".$row['filesize']."', '".$row['version']."', '".$row['homepage']."')");
 }
 echo "<br>ubdate table......".$prefix."_downloads_downloads_bw....<br>\n";
 $db->sql_freeresult($result);

 $result = $db->sql_query("SELECT * FROM ".$prefix."_downloads_editorials");
 while ($row = $db->sql_fetchrow($result)) {
 $db->sql_query("INSERT INTO ".$prefix."_downloads_editorials_bw values ('".$row['downloadid']."', '".$row['adminid']."', '".$row['editorialtimestamp']."', '".$row['editorialtext']."', '".$row['editorialtitle']."')");
 }
 echo "<br>ubdate table......".$prefix."_downloads_editorials_bw....<br>\n";
 $db->sql_freeresult($result);
 
 $result = $db->sql_query("SELECT * FROM ".$prefix."_downloads_modrequest");
 while ($row = $db->sql_fetchrow($result)) {
 $db->sql_query("INSERT INTO ".$prefix."_downloads_modrequest_bw values ('".$row['requestid']."', '".$row['lid']."', '".$row['cid']."', '".$row['sid']."', '".$row['title']."', '".$row['url']."', '".$row['description']."', '".$row['modifysubmitter']."', '".$row['brokendownload']."', '".$row['name']."', '".$row['email']."', '".$row['filesize']."', '".$row['version']."', '".$row['homepage']."')");
 }
 echo "<br>ubdate table......".$prefix."_downloads_modrequest_bw....<br>\n";
 $db->sql_freeresult($result);
 
 $result = $db->sql_query("SELECT * FROM ".$prefix."_downloads_newdownload");
 while ($row = $db->sql_fetchrow($result)) {
 $db->sql_query("INSERT INTO ".$prefix."_downloads_newdownload_bw values ('".$row['lid']."', '".$row['cid']."', '".$row['sid']."', '".$row['title']."', '".$row['url']."', '".$row['description']."', '".$row['name']."', '".$row['email']."', '".$row['submitter']."', '".$row['filesize']."', '".$row['version']."', '".$row['homepage']."')");
 }
 echo "<br>ubdate table......".$prefix."_downloads_newdownload_bw....<br>\n";
 $db->sql_freeresult($result);
 
 $result = $db->sql_query("SELECT * FROM ".$prefix."_downloads_votedata");
 while ($row = $db->sql_fetchrow($result)) {
 $db->sql_query("INSERT INTO ".$prefix."_downloads_votedata_bw values ('".$row['ratingdbid']."', '".$row['ratinglid']."', '".$row['ratinguser']."', '".$row['rating']."', '".$row['ratinghostname']."', '".$row['ratingcomments']."', '".$row['ratingtimestamp']."')");
 }
 echo "<br>ubdate table......".$prefix."_downloads_votedata_bw....<br>\n";
 $db->sql_freeresult($result);
 
 
 echo "Upgrade from Downloads to BW_Downloads finished!<br><br>You should now delete this upgrade file from your server.";
 
 ?>
  |
_________________ Blassen,
Altruista, Redaktor, Programátor, Designér a Majitel
Hello IT. Have you tried turning it off and on again ? Are you sure it's plugged in ? |
|