Witam poniższy kod daje możliwość używania bazy zgromadzonych i używanych plików multimedialnych w wersji Kroax 4,7x a po nadpisaniu plików na serwerze i wykonaniu poniższego podglądu w panelu admina w zakładce dodatkowe strony (strony informacyjne) do nowych wersji Kroax 5,x.
Uwaga! Podgląd wykonujemy tylko jeden raz.
<?php
$result = dbquery("ALTER TABLE ".$db_prefix."kroax_kategori CHANGE kroax_id_cat cid smallint(5)");
$result = dbquery("ALTER TABLE ".$db_prefix."kroax_kategori CHANGE kroax_namn_cat1 title varchar(40)");
$result = dbquery("ALTER TABLE ".$db_prefix."kroax_kategori CHANGE kroax_namn_access access varchar(10)");
$result = dbquery("ALTER TABLE ".$db_prefix."kroax_kategori CHANGE kroaX_cat_img image varchar(30)");
$result = dbquery("SELECT * FROM ".$db_prefix."kroax_kategori");
while ($data = dbarray($result)) {
$update = dbquery("UPDATE ".$db_prefix."kroax SET kroax_cat='".$data['cid']."' WHERE kroax_cat='".$data['title']."'");
$update2 = dbquery("ALTER TABLE ".$db_prefix."kroax_kategori ADD parentid int(10) NOT NULL AFTER image");
$update3 = dbquery("ALTER TABLE ".$db_prefix."kroax_kategori ADD status int(10) NOT NULL AFTER parentid");
$update4 = dbquery("UPDATE ".$db_prefix."kroax_kategori SET status='1'");
$result = dbquery("ALTER TABLE ".$db_prefix."kroax CHANGE kroax_spare3 kroax_lastplayed int(10)");
$result = dbquery("ALTER TABLE ".$db_prefix."kroax CHANGE kroax_date kroax_date int(10)");
$result = dbquery("ALTER TABLE ".$db_prefix."kroax CHANGE kroax_spare2 kroax_embed text");
$result = dbquery("ALTER TABLE ".$db_prefix."kroax CHANGE kroax_spare4 kroax_downloads int(10)");
$result = dbquery("UPDATE ".$db_prefix."kroax set kroax_date ='".time()."'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_thumbs_per_row int(10) NOT NULL default '0' AFTER kroax_set_thumb");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_thumbs_per_row='4'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_thumbs_per_page int(10) NOT NULL default '0' AFTER kroax_set_thumbs_per_row");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_thumbs_per_page='16'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_ffmpeg int(10) NOT NULL default '0' AFTER kroax_set_thumbs_per_page");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_ffmpeg='0'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_favorites int(10) NOT NULL default '0' AFTER kroax_set_ffmpeg");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_favorites ='1'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_recommend int(10) NOT NULL default '0' AFTER kroax_set_favorites");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_recommend ='1'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_ratings int(10) NOT NULL default '0' AFTER kroax_set_recommend");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_ratings ='1'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_comments int(10) NOT NULL default '0' AFTER kroax_set_ratings");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_comments ='1'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_keepalive int(10) NOT NULL default '0' AFTER kroax_set_comments");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_keepalive ='1'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_playingnow int(10) NOT NULL default '0' AFTER kroax_set_keepalive");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_playingnow ='1'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_bannerimg VARCHAR(100) NOT NULL default '0' AFTER kroax_set_playingnow");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_bannerimg ='img/logo.gif'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_related int(10) NOT NULL default '0' AFTER kroax_set_bannerimg");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_related ='1'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_report int(10) NOT NULL default '0' AFTER kroax_set_related");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_report ='1'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_allowembed int(10) NOT NULL default '0' AFTER kroax_set_report");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_allowembed ='1'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_allowdownloads int(10) NOT NULL default '0' AFTER kroax_set_allowembed");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_allowdownloads ='1'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_allowplaylist int(10) NOT NULL default '0' AFTER kroax_set_allowdownloads");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_allowplaylist ='1'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_allowuploads int(10) NOT NULL default '0' AFTER kroax_set_allowplaylist");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_allowuploads ='1'");
$upgrade = dbquery("ALTER TABLE ".$db_prefix."kroax_set ADD kroax_set_version varchar(10) NOT NULL default '0' AFTER kroax_set_allowuploads");
$result = dbquery("CREATE TABLE ".DB_PREFIX."kroax_favourites (
`fav_id` int(30) NOT NULL default '0',
`fav_user` int(30) NOT NULL default '0',
`fav_date` int(10) NOT NULL default '0'
) TYPE=MyISAM; ");
$result = dbquery("CREATE TABLE ".DB_PREFIX."kroax_active (
`movie_id` int(10) NOT NULL default '0',
`title` varchar(50) NOT NULL default '0',
`icon` varchar(50) NOT NULL default '0',
`lastactive` int(10) unsigned NOT NULL default '0'
) TYPE=MyISAM; ");
$result = dbquery("CREATE TABLE ".DB_PREFIX."kroax_activeusr (
`movie_id` int(10) NOT NULL default '0',
`member` int(10) NOT NULL default '0',
`user_ip` varchar(20) NOT NULL default '0',
`lastactive` int(10) unsigned NOT NULL default '0'
) TYPE=MyISAM; ");
$upgrade = dbquery("UPDATE ".$db_prefix."kroax_set SET kroax_set_version='5.1'");
$upgrade = dbquery("UPDATE ".$db_prefix."infusions SET inf_version='5.1' WHERE inf_title='Kroax'");
$result = dbquery("UPDATE ".$db_prefix."admin SET admin_link='../infusions/the_kroax/admin/admin.php' WHERE admin_image='../../infusions/the_kroax/img/the_kroax.jpg'");
$result = dbquery("UPDATE ".$db_prefix."admin SET admin_link='../infusions/the_kroax/admin/admin.php' WHERE admin_image='the_kroax.jpg'");
?>
Edytowane przez rafnal dnia 23.02.2008 16:34:45
It Is Risky Not To Take Risk.
If You Dont Take Risk,
Risk Will Take You...
|