RE: BUG: Wrong file on package
"xaplo" <[email protected]> Tue, 10 Sep 2002 09:35:21 +0100
| Newsgroups | gmane.comp.web.envolution.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C258AD.62E97A10 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Here they are: File fix.php is intended for the correction package. Needs to be changed as its is right now a self-fix file. Files Encompass, pn714 and update_functions. These replace the actual ones on the package. They go on directory "/install" Saludos, Marino Carlos (aka xaplo) http://www.postnuke-espanol.org > -----Mensaje original----- > De: [email protected] > [mailto:[email protected]] En nombre de Brook Humphrey > Enviado el: lunes, 09 de septiembre de 2002 18:11 > Para: [email protected] > Asunto: Re: [envdev] BUG: Wrong file on package > > > On Monday 09 September 2002 09:32 am, xaplo wrote: > > Will send it tonight, as soon as I am at home. > > > cool thanks > > > -- > > -~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~ > `'~-~`'~-~`'~- > Brook Humphrey > Mobile PC Medic, 420 1st, Cheney, WA 99004, > 509-235-9107 > http://www.webmedic.net, [email protected], [email protected] > Holiness unto the Lord > > -~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~ > `'~-~`'~-~`'~- > > > _______________________________________________ > Envdev mailing list > [email protected] > http://www.madhatt.info/mailman/listinfo/envdev> _madhatt.info > ------=_NextPart_000_0001_01C258AD.62E97A10 Content-Type: application/octet-stream; name="Encompass.php" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Encompass.php" <?php // // Upgrade script for module Emcompass used with Postnuke to Encompass = Theme Engine used in // Envolution 1.0 // // Version: 1.0.0 // Date: 2002/09/02 // Author: Marino Carlos //=20 include_once("install/update_functions.php"); function UpdateEncompass() { $dbconn =3D $GLOBALS[dbconn]; $prefix =3D $GLOBALS[prefix]; $numthemes =3D 7; // number of new themes with Envolution =20 // Check for previuos installed version of Encompass if (CheckTableExists("theme_config")) { $result =3D $dbconn->Execute("RENAME TABLE ".$prefix."_theme_config = to tempup_theme_config" ); } if (CheckTableExists("theme_zones")){ $result =3D $dbconn->Execute("RENAME TABLE ".$prefix."_theme_zones = to tempup_theme_zones" ); } =20 if (!CheckTableExists("theme_layout")) { $result =3D $dbconn->Execute("CREATE TABLE ".$prefix."_theme_layout = ( skin_id int(3) NOT NULL default '0', zone_label varchar(20) NOT NULL default '', tpl_file varchar(20) NOT NULL default '', KEY (skin_id))") ; } =20 if (!CheckTableExists("theme_skins")) { $result =3D $dbconn->Execute("CREATE TABLE ".$prefix."_theme_skins ( skin_id int(3) NOT NULL auto_increment, name varchar(60) NOT NULL default '', is_active int(1) NOT NULL default '0', is_multicolor int(1) NOT NULL default '0', bgcolor1 varchar(12) NOT NULL default '#FFFFFF', bgcolor2 varchar(12) NOT NULL default '#FFFFFF', bgcolor3 varchar(12) NOT NULL default '#FFFFFF', bgcolor4 varchar(12) NOT NULL default '#FFFFFF', bgcolor5 varchar(12) NOT NULL default '#FFFFFF', bgcolor6 varchar(12) NOT NULL default '#FFFFFF', sepcolor varchar(12) NOT NULL default '#000000', textcolor1 varchar(12) NOT NULL default '#000000', textcolor2 varchar(12) NOT NULL default '#000000', PRIMARY KEY (skin_id))"); } =20 // Try to create the table. Will fail if it exists. Not the most = elegant, but does the work. $result =3D $dbconn->Execute("CREATE TABLE ".$prefix."_theme_config ( name varchar(20) NOT NULL default '', skin_id int(3) NOT NULL NOT NULL default '1', description varchar(60) NOT NULL default '', setting varchar(10) NOT NULL default '', data varchar(150) NOT NULL default '', KEY (skin_id))"); =20 =20 // Try to create the table. Will fail if it exists. Not the most = elegant, but does the work. $result =3D $dbconn->Execute("CREATE TABLE ".$prefix."_theme_zones ( zone_id int(3) NOT NULL auto_increment, skin_id int(3) NOT NULL default '1', name varchar(40) NOT NULL default 'No Name', label varchar(20) NOT NULL default 'addon', type int(1) NOT NULL default '1', is_active int(1) NOT NULL default '0', PRIMARY KEY (zone_id), KEY (skin_id))"); =20 // Get all the skins already installed on the system. // If there are previously installed skins, insert the config and = zones on their tables, // asigning the correct skin_id =20 $result =3D $dbconn->Execute("SELECT DISTINCT skin_id from = ".$prefix."_theme_skins"); while (!$result->EOF) { list($skinid) =3D $result->fields; $dbconn->Execute("INSERT INTO ".$prefix."_theme_config = (name,skin_id,description,setting,data) SELECT = name,$skinid,description,setting,data FROM tempup_theme_config"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (zone_id,skin_id,name,label,type,is_active) SELECT = zone_id,$skinid,name,label,type,is_active FROM tempup_theme_zones"); $result->MoveNext(); } // We don need old config and zones tables any more. Data should be = converted in the new tables at this point $dbconn->Execute("DROP TABLE tempup_theme_config"); $dbconn->Execute("DROP TABLE tempup_theme_zones"); =20 // Get the max number for skin_id. We will insert new skins from that = number + 1 $result =3D $dbconn->Execute("SELECT MAX(skin_id) FROM = ".$prefix."_theme_skins"); if (!$result->EOF) { list($maxskinid) =3D $result->fields; } else { $maxskinid =3D 0; } //Insert skin LogicII $dbconn->Execute("INSERT INTO ".$prefix."_theme_skins VALUES (".($maxskinid + 1).", 'LogicII', 1, 0, '#EFEFEF', '#C1C2C3', '#CFCFBB', '#F7F7F0', '#FFFFFF', '#000066', '#D1CDD2', '#000000', '#000000')"); // Insert skin Envolved $dbconn->Execute("INSERT INTO ".$prefix."_theme_skins VALUES (".($maxskinid + 2).", 'Envolved', 1, 0, '#415E74', '#415E74', '#415E74', '#415E74', '#99B7CC', '#415E74', '#415E74', '#FFFFFF', '#FFFFFF')"); // Insert skin LiquidLogic $dbconn->Execute("INSERT INTO ".$prefix."_theme_skins VALUES (".($maxskinid + 3).", 'LiquidLogic', 1, 0, '#999999', '#0066CC', '#999999', '#CCCCCC', '#FFFFFF', '#0066CC', '#D1CDD2', '#000000', '#000000')"); // Insert skin DuskyBlue $dbconn->Execute("INSERT INTO ".$prefix."_theme_skins VALUES (".($maxskinid + 4).", 'DuskyBlue', 1, 0, '#FFFFFF', '#CFD5E9', '#A5B4C4', '#778899', '#333333', '#000000', '#000000', '#000000', '#FFFFFF')"); // Insert skin X-Indus $dbconn->Execute("INSERT INTO ".$prefix."_theme_skins VALUES (".($maxskinid + 5).", 'X-Indus', 1, 0, '#FFFFFF', '#D9D9FC', '#999999', '#D9D9FC', '#FFFFFF', '#0066CC', '#D1CDD2', '#000000', '#000000')"); // Insert skin PiterpanV2 =09 $dbconn->Execute("INSERT INTO ".$prefix."_theme_skins VALUES (".($maxskinid + 6).", 'PiterpanV2', 1, 0, '#FEFEFE', '#FEFEFE', '#E9EDF5', '#E9EDF5', '#003058', '#000066', '#505050', '#505050', '#505050')"); =20 // Insert configuration, zones and layout for the newly inserted = skins. // $maxskinid still has the max skin_id that was on the table prior to = the insertion // of new themes. Just insert a copy of settings for all the new = skins. =20 for ($i=3D1;$i<$numthemes;$i++) { $maxskinid ++; $dbconn->Execute("INSERT INTO ".$prefix."_theme_config VALUES = ('pagewidth',$maxskinid,'"._ENPAGEWIDTH."','100%','')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_config VALUES = ('lcolwidth',$maxskinid,'"._ENLCOLWIDTH."','140','')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_config VALUES = ('rcolwidth',$maxskinid,'"._ENRCOLWIDTH."','170','')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_config VALUES = ('indexcol',$maxskinid,'"._ENINDEXCOL."','1','')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_config VALUES = ('righton',$maxskinid,'"._ENRIGHTON."','0','')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_config VALUES = ('iblkwidth',$maxskinid,'"._ENINBLKWIDTH."','145','')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES = ($maxskinid,'master1','master1.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES = ($maxskinid,'master2','master2.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES = ($maxskinid,'lsblock','lsblock.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES = ($maxskinid,'rsblock','rsblock.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES = ($maxskinid,'table1','table1.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES = ($maxskinid,'table2','table2.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES = ($maxskinid,'News-index','News-index.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES = ($maxskinid,'News-article','News-article.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES = ($maxskinid,'News-index2','News-index2.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES ($maxskinid, 'topcenter', = 'topcenter2.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES ($maxskinid, 'tcblock', = 'tcblock.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES ($maxskinid, 'botcenter', = 'botcenter.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES ($maxskinid, 'bcblock', = 'bcblock.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES ($maxskinid, 'inblock', = 'inblock.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES ($maxskinid, 'isblock', = 'isblock.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES ($maxskinid, 'dsblock', = 'dsblock.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout VALUES ($maxskinid, 'mainmenu', = 'mainmenu.tpl')"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, '"._ENMASTER1."', = 'master1', 0, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, '"._ENMASTER2."', = 'master2', 0, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, '"._ENOPENTABLE1."', = 'table1', 0, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, '"._ENOPENTABLE2."', = 'table2', 0, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, '"._ENLEFTSIDEB."', = 'lsblock', 0, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, '"._ENRIGHTSIDEB."', = 'rsblock', 0, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, '"._ENNEWSINDEX."', = 'News-index', 0, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, '"._ENNEWSART."', = 'News-article', 0, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, '"._ENNEWSINDEX2."', = 'News-index2', 1, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, = '"._ENTOPCENTERBLOCK."', 'topcenter', 1, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, = '"._ENTOPCENTERBOX."', 'tcblock', 1, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, = '"._ENBOTCENTERBLOCK."', 'botcenter', 1, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, = '"._ENBOTCENTERBOX."', 'bcblock', 1, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, '"._ENINNER."', = 'inblock', 1, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, = '"._ENDEFAULTSIDEB."', 'isblock', 1, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, = '"._ENDEFAULTSIDE."', 'dsblock', 1, 1)"); $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active) VALUES ($maxskinid, '"._ENMAINMENUB."', = 'mainmenu', 1, 1)"); } // That's all folks } ?> ------=_NextPart_000_0001_01C258AD.62E97A10 Content-Type: application/octet-stream; name="pn714.php" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="pn714.php" <?php // $Id: pn71-2.php,v 1.0.1 2002/09/03 13:19:19 xaplo Exp $ // Upgrade from PostNuke .714 and .72 to Envolution 1.0 // // Note that this is upgrade script uses ADODB instead // of raw mysql // // Adapted by xaplo from Postnuke. // // Log: // - Make upgradable from .72 // - Clean code // - New function (in update_functions) SaveConfigValue global $dbconn, $pntable, $prefix; include_once("install/Encompass.php"); // Save / upgrade module vars SaveConfigValue('/PNConfig','allowuserdelete',0,0); SaveConfigValue('/PNConfig','senddeleteemail',0,0); SaveConfigValue('/PNConfig','sendaddemail',0,0); SaveConfigValue('/PNConfig','allowuserpass',0,0); SaveConfigValue('/PNConfig','blkusrreg',0,0); SaveConfigValue('/PNConfig','senduserpass',0,0); SaveConfigValue('/PNConfig','pncuaver','1.2',1); SaveConfigValue('/PNConfig','pncuaadvreg',0,0); SaveConfigValue('/PNConfig','Default_Theme','Envolved',1); SaveConfigValue('/PNConfig','Version_ID','Envolution',1); SaveConfigValue('/PNConfig','Version_Num','1.0.0',1); SaveConfigValue('/PNConfig','Version_Sub','Resolve',1); SaveConfigValue('/PNConfig','UseCompression',0,0); SaveConfigValue('/PNConfig','htmlentities',1,0); =20 SaveConfigValue('/PNConfig','collapseable',1,0); =09 // Change permissions for 'Mail users' to 'MailUsers' in user = permissions $upcolumn =3D $pntable['user_perms_column']; $result =3D $dbconn->Execute("SELECT $upcolumn[pid], $upcolumn[component] FROM $pntable[user_perms]"); $foundrecords =3D !$result->EOF; while(list($pid, $component) =3D $result->fields) { $result->MoveNext(); if (preg_match('/Mail users/', $component)) { $component =3D preg_replace('/Mail users/', 'MailUsers', = $component); $dbconn->Execute("UPDATE $pntable[user_perms] SET $upcolumn[component] =3D '" . = addslashes($component) . "' WHERE $upcolumn[pid] =3D $pid"); } } if ($foundrecords) { $result->Close(); } // Add in reminder to remove the install.php file $bcolumn =3D $pntable['blocks_column']; $dbconn->Execute("INSERT INTO $pntable[blocks] ($bcolumn[bid], $bcolumn[bkey], $bcolumn[title], $bcolumn[content], $bcolumn[url], $bcolumn[mid], $bcolumn[position], $bcolumn[weight], $bcolumn[active], $bcolumn[refresh], $bcolumn[last_update], $bcolumn[language]) VALUES (0, 'html', 'Reminder', 'Please remember to remove the following files from = your Envolution directory <p> ·<b>install.php</b> file <p> ·<b>install</b> directory <p> If you do not remove these files then users can = obtain the password to your database!', '', 0, 'l', 0.5, 1, 0, 0, '')"); =20 UpdateEncompass(); // // User Points table // if (!CheckTableExists("user_points")) { $dbconn->Execute("DROP TABLE ".$prefix."_user_points"); } // Create User Points table $result =3D $dbconn->Execute("CREATE TABLE ".$prefix."_user_points ( uid int(11) NOT NULL default '0', uname varchar(25) NOT NULL default '', stories int(11) NOT NULL default '0', comments int(11) NOT NULL default '0', pollcomm int(11) NOT NULL default '0', downloads int(11) NOT NULL default '0', dloadvotes int(11) NOT NULL default '0', links int(11) NOT NULL default '0', linkvotes int(11) NOT NULL default '0', reviews int(11) NOT NULL default '0', reviewcomm int(11) NOT NULL default '0', posts int(11) NOT NULL default '0', points int(13) NOT NULL default '0', PRIMARY KEY (uid) )"); $dbconn->Execute("INSERT INTO ".$prefix."_user_points VALUES ('-1', = '0000000000', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"); // Create User delete request table $result =3D $dbconn->Execute("CREATE TABLE ".$prefix."_users_delrequest = ( pn_uid int(11) NOT NULL default '0', pn_name varchar(60) NOT NULL default '', pn_uname varchar(25) NOT NULL default '', pn_email varchar(60) NOT NULL default '', pn_pass varchar(40) NOT NULL default '', PRIMARY KEY (pn_uid) )"); $result =3D $dbconn->Execute("SELECT MAX(pn_id) FROM = ".$prefix."_modules"); list($maxpnid) =3D $result->fields; $maxpnid++; // Update modules $result =3D $dbconn->Execute("SELECT pn_name FROM ".$prefix."_modules = where pn_name=3D'Encompass'"); $foundrecords =3D !$result->EOF; =20 if ($foundrecords) { $result =3D $dbconn->Execute("DELETE FROM ".$prefix."_modules WHERE = pn_name=3D'Encompass'"); } $result =3D $dbconn->Execute("INSERT INTO ".$prefix."_modules=20 VALUES ($maxpnid, 'Encompass', 2, 'Encompass', 'Encompass Theme Engine', 43, 'Encompass', '0.926', 1, 0, 3)") or die("<b>"._NOTUPDATED.$prefix."_modules (Encompass)</b>"); $maxpnid++; $result =3D $dbconn->Execute("SELECT pn_name FROM ".$prefix."_modules = where pn_name=3D'Frontpage'"); $foundrecords =3D !$result->EOF; =20 if ($foundrecords) { $result =3D $dbconn->Execute("DELETE FROM ".$prefix."_modules WHERE = pn_name=3D'Frontpage'"); }$result =3D $dbconn->Execute("INSERT INTO ".$prefix."_modules=20 VALUES ($maxpnid, 'Frontpage', 2, 'Frontpage', 'Encompass FrontPage Module', 44, 'Frontpage', '0.91-1a', 0, 1, 3)") or die("<b>"._NOTUPDATED.$prefix."_modules (Frontpage)</b>"); $maxpnid++; $result =3D $dbconn->Execute("SELECT pn_name FROM ".$prefix."_modules = where pn_name=3D'User_Points'"); $foundrecords =3D !$result->EOF; =20 if ($foundrecords) { $result =3D $dbconn->Execute("DELETE FROM ".$prefix."_modules WHERE = pn_name=3D'User_Points'"); } $result =3D $dbconn->Execute("INSERT INTO ".$prefix."_modules=20 VALUES ($maxpnid, 'User_Points', 2, 'User Points', 'Member Points Module', 45, 'NS-User_Points', '0.22a-1', 1, 0, 3)") or die("<b>"._NOTUPDATED.$prefix."_modules (User_Points)</b>"); $maxpnid++; $result =3D $dbconn->Execute("SELECT pn_name FROM ".$prefix."_modules = where pn_name=3D'Your_Account'"); $foundrecords =3D !$result->EOF; =20 if ($foundrecords) { $result =3D $dbconn->Execute("DELETE FROM ".$prefix."_modules WHERE = pn_name=3D'Your_Account'"); } $result =3D $dbconn->Execute("INSERT INTO ".$prefix."_modules=20 VALUES ($maxpnid, 'Your_Account', 2, 'Your Account', 'User options', 0, 'NS-Your_Account', '0.8', 0, 0, 3)") or die("<b>"._NOTUPDATED.$prefix."_modules (Your_Account)</b>"); $maxpnid++; $result =3D $dbconn->Execute("SELECT pn_name FROM ".$prefix."_modules = where pn_name=3D'Past_Nuke'"); $foundrecords =3D !$result->EOF; =20 if ($foundrecords) { $result =3D $dbconn->Execute("DELETE FROM ".$prefix."_modules WHERE = pn_name=3D'Past_Nuke'"); } $result =3D $dbconn->Execute("INSERT INTO ".$prefix."_modules=20 VALUES ($maxpnid, 'Past_Nuke', 1, 'Past Nuke', 'Old Postnuke Admin compatibility', 0, 'NS-Past_Nuke', '1.0', 1, 0, 1)") or die("<b>"._NOTUPDATED.$prefix."_modules (Past_Nuke)</b>"); $maxpnid++; $result =3D $dbconn->Execute("SELECT pn_name FROM ".$prefix."_modules = where pn_name=3D'NewUser'"); $foundrecords =3D !$result->EOF; =20 if ($foundrecords) { $result =3D $dbconn->Execute("DELETE FROM ".$prefix."_modules WHERE = pn_name=3D'NewUser'"); } $result =3D $dbconn->Execute("INSERT INTO ".$prefix."_modules=20 VALUES ($maxpnid, 'NewUser', 1, 'NewUser', 'New User for Envolution.', 21, 'NS-NewUser', '0.5', 0, 0, 3)") or die("<b>"._NOTUPDATED.$prefix."_modules (NewUser)</b>"); $maxpnid++; $result =3D $dbconn->Execute("SELECT pn_name FROM ".$prefix."_modules = where pn_name=3D'postbbcode'"); $foundrecords =3D !$result->EOF; =20 if ($foundrecords) { $result =3D $dbconn->Execute("DELETE FROM ".$prefix."_modules WHERE = pn_name=3D'postbbcode'"); } $result =3D $dbconn->Execute("INSERT INTO ".$prefix."_modules=20 VALUES ($maxpnid, 'postbbcode', 1, 'postbbcode', 'BBcode for use in Envolution.', 46, 'postbbcode', '0.1', 0, 1, 3)") or die("<b>"._NOTUPDATED.$prefix."_modules (postbbcode)</b>"); // Check there is at least 1 story $result =3D $dbconn->Execute("SELECT * FROM ".$prefix."_stories"); if ($result->EOF) { // Insert at least a new $dbconn->Execute("INSERT INTO ".$prefix."_stories VALUES (1, 1, '1', '"._ENCOREF8."', '2002-05-31 09:07:11', '"._ENCOREF9.".', '', 0, 0, 1, '"._VOC60."', '', 0, '', '', 0, 0)"); =20 } ?> ------=_NextPart_000_0001_01C258AD.62E97A10 Content-Type: application/octet-stream; name="update_functions.php" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="update_functions.php" <?php=0A= // File: $Id: Exp $ $Name: $=0A= // = -------------------------------------------------------------------------= ---=0A= // Envolution Content Management System=0A= // Copyright (C) 2002 by the Envolution Development Team.=0A= // http://www.envolution.com/=0A= // = -------------------------------------------------------------------------= ---=0A= // Based on:=0A= // Postnuke Content Management System - www.postnuke.com=0A= // PHP-NUKE Web Portal System - http://phpnuke.org/=0A= // = -------------------------------------------------------------------------= ---=0A= // LICENSE=0A= //=0A= // This program is free software; you can redistribute it and/or=0A= // modify it under the terms of the GNU General Public License (GPL)=0A= // as published by the Free Software Foundation; either version 2=0A= // of the License, or (at your option) any later version.=0A= //=0A= // This program is distributed in the hope that it will be useful,=0A= // but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= // GNU General Public License for more details.=0A= //=0A= // To read the license please visit http://www.gnu.org/copyleft/gpl.html=0A= // = -------------------------------------------------------------------------= ---=0A= // Original Author of file:=0A= // Purpose of file: Include the functions needed for the table validation=0A= // = -------------------------------------------------------------------------= ---=0A= =0A= /************************************************************************= /=0A= /* Function: CheckForField = */=0A= /* Purpose: Returns true if field exists, false otherwise = */=0A= /************************************************************************= /=0A= function CheckForField($field_name, $table_name)=0A= {=0A= $result =3D mysql_query("desc $GLOBALS[prefix]_$table_name");=0A= while ($row =3D mysql_fetch_array($result)) {=0A= if ($row[Field] =3D=3D $field_name) {=0A= return (true);=0A= }=0A= }=0A= =0A= return(false);=0A= }=0A= =0A= /***********************************************************************/=0A= /* Function: GetFieldType */=0A= /* Purpose: Returns a string containing the datatype, false on error */=0A= /***********************************************************************/=0A= function GetFieldType($field_name, $table_name)=0A= {=0A= $result =3D mysql_query("desc $GLOBALS[prefix]_$table_name");=0A= while ($row =3D mysql_fetch_array($result)) {=0A= if ($row[Field] =3D=3D $field_name) {=0A= return ($row[Type]);=0A= }=0A= }=0A= return (false);=0A= }=0A= =0A= /************************************************************************= /=0A= /* Function: CheckTableExists = */=0A= /* Purpose: Returns true if the table exists. False if not = */=0A= /************************************************************************= /=0A= function CheckTableExists($table_name)=0A= {=0A= $result =3D mysql_list_tables($GLOBALS[dbname]);=0A= while ($row =3D mysql_fetch_row($result))=0A= {=0A= if ($row[0] =3D=3D "$GLOBALS[prefix]_$table_name")=0A= {=0A= return true;=0A= }=0A= }=0A= return false;=0A= }=0A= =0A= /************************************************************************= /=0A= /* Function: GetFields = */=0A= /* Purpose: Returns an array of the fields = */=0A= /************************************************************************= /=0A= function GetFields($table_name)=0A= {=0A= $result =3D mysql_list_fields($GLOBALS[dbname], = "$GLOBALS[prefix]_$table_name");=0A= $total =3D mysql_num_fields($result);=0A= for ($i =3D 0; $i < $total; $i++)=0A= {=0A= // name=0A= $field_name =3D mysql_field_name($result, $i);=0A= // type & size=0A= $result2 =3D mysql_query("desc $GLOBALS[prefix]_$table_name");=0A= while ($row =3D mysql_fetch_array($result2))=0A= {=0A= if ($row[Field] =3D=3D $field_name)=0A= {=0A= $field_type =3D $row[Type];=0A= $field_default =3D $row['Default'];=0A= }=0A= }=0A= if (strstr($field_type, '('))=0A= {=0A= $data =3D explode('(', $field_type);=0A= $data2 =3D explode(')', $data[1]);=0A= $field_type =3D $data[0];=0A= $field_size =3D $data2[0];=0A= } else {=0A= $field_size =3D mysql_field_len($result, $i);=0A= }=0A= // flags=0A= $field_flags =3D '';=0A= $flags =3D explode(' ',mysql_field_flags($result, $i));=0A= foreach ($flags as $k=3D>$v)=0A= { // just makes things easer :-)=0A= $field_flags[$v] =3D true;=0A= }=0A= // put it all together=0A= $fields[$field_name] =3D array (=0A= 'type' =3D> $field_type,=0A= 'def' =3D> $field_default,=0A= 'auto_increment' =3D> $field_flags[auto_increment],=0A= 'binary' =3D> $field_flags[binary],=0A= 'blob' =3D> $field_flags[blob],=0A= 'enum' =3D> $field_flags[enum],=0A= 'multiple_key' =3D> $field_flags[multiple_key],=0A= 'not_null' =3D> $field_flags[not_null],=0A= 'primary_key' =3D> $field_flags[primary_key],=0A= 'timestamp' =3D> $field_flags[timestamp],=0A= 'unique_key' =3D> $field_flags[unique_key],=0A= 'unsigned' =3D> $field_flags[unsigned],=0A= 'zerofill' =3D> $field_flags[zero_fill]=0A= );=0A= switch ($field_type)=0A= { // need to add enum/set code someday=0A= case 'float':=0A= case 'decimal':=0A= $fsize =3D explode(',',$field_size);=0A= $fields[$field_name][size] =3D $fsize[0];=0A= $fields[$field_name][fraction] =3D $fsize[1];=0A= break;=0A= default:=0A= $fields[$field_name][size] =3D $field_size;=0A= break;=0A= }=0A= }=0A= return $fields;=0A= }=0A= =0A= function SaveConfigValue($module, $name, $value, $overwrite) {=0A= $dbconn =3D $GLOBALS[dbconn];=0A= $prefix =3D $GLOBALS[prefix];=0A= =0A= $result =3D $dbconn->Execute("SELECT pn_value from = ".$prefix."_module_vars WHERE pn_name=3D'".$name."' AND = pn_modname=3D'".$module."'");=0A= if ($result->EOF) {=0A= $dbconn->Execute("INSERT INTO ".$prefix."_module_vars = (pn_modname,pn_name,pn_value) VALUES = ('".$module."','".$name."','".serialize($value)."')");=0A= } else {=0A= if ($overwrite) {=0A= $dbconn->Execute("UPDATE ".$prefix."_module_vars SET = pn_value=3D'".serialize($value)."' WHERE pn_modname=3D'".$module."' AND = pn_name=3D'".$name."'" );=0A= }=0A= }=0A= =0A= }=0A= ?> ------=_NextPart_000_0001_01C258AD.62E97A10 Content-Type: application/octet-stream; name="fix.php" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fix.php" <?php=0A= =0A= // functions for the db abstraction layer=0A= define('ADODB_DIR', 'pnadodb');=0A= require_once ("pnadodb/adodb.inc.php");=0A= =0A= =0A= function SaveConfigValue($module, $name, $value, $overwrite) {=0A= $dbconn =3D $GLOBALS[dbconn];=0A= $prefix =3D $GLOBALS[prefix];=0A= =0A= $result =3D $dbconn->Execute("SELECT pn_value from = ".$prefix."_module_vars WHERE pn_name=3D'".$name."' AND = pn_modname=3D'".$module."'");=0A= if ($result->EOF) {=0A= $dbconn->Execute("INSERT INTO ".$prefix."_module_vars = (pn_modname,pn_name,pn_value) VALUES = ('".$module."','".$name."','".serialize($value)."')");=0A= } else {=0A= if ($overwrite) {=0A= $dbconn->Execute("UPDATE ".$prefix."_module_vars SET = pn_value=3D'".serialize($value)."' WHERE pn_modname=3D'".$module."' AND = pn_name=3D'".$name."'" );=0A= }=0A= }=0A= =0A= }=0A= =0A= function CheckTableExists($table_name)=0A= {=0A= $result =3D mysql_list_tables($GLOBALS[dbname]);=0A= while ($row =3D mysql_fetch_row($result))=0A= {=0A= if ($row[0] =3D=3D "$GLOBALS[prefix]_$table_name")=0A= {=0A= return true;=0A= }=0A= }=0A= return false;=0A= }=0A= =0A= function CheckForField($field_name, $table_name)=0A= {=0A= $result =3D mysql_query("desc $GLOBALS[prefix]_$table_name");=0A= while ($row =3D mysql_fetch_array($result)) {=0A= if ($row[Field] =3D=3D $field_name) {=0A= return (true);=0A= }=0A= }=0A= =0A= return(false);=0A= }=0A= function dbconnect($dbhost, $dbuname, $dbpass, $dbname, = $dbtype=3D'mysql') {=0A= =0A= $connectString =3D "$dbtype://$dbuname:$dbpass@$dbhost/$dbname";=0A= =0A= GLOBAL $ADODB_FETCH_MODE;=0A= $dbconn =3D &ADONewConnection($dbtype);=0A= $dbh =3D $dbconn->Connect($dbhost, $dbuname, $dbpass, $dbname);=0A= $ADODB_FETCH_MODE =3D ADODB_FETCH_NUM;=0A= =0A= // if we get an error, log it and die=0A= if ($dbh =3D=3D=3D false) {=0A= error_log ("connect string: $connectString");=0A= error_log ("error: " . $dbconn->ErrorMsg());=0A= // show error and die=0A= PN_DBMsgError($dbconn, __FILE__ , __LINE__, "Error connecting to = db");=0A= } else {=0A= return $dbconn;=0A= }=0A= }=0A= =0A= =0A= /** Error message due a ADODB SQL error and die (copied from = mainfile.php because it is not included */=0A= function PN_DBMsgError($db=3D'',$prg=3D'',$line=3D0,$message=3D'Error = accessing the database') {=0A= $lcmessage =3D $message . "<br>" .=0A= "Program: " . $prg . " - " . "Line N.: " . $line . "<br>" .=0A= "Database: " . $db->database . "<br> ";=0A= =0A= if($db->ErrorNo()<>0) {=0A= $lcmessage .=3D "Error (" . $db->ErrorNo() . ") : " . = $db->ErrorMsg() . "<br>";=0A= }=0A= die($lcmessage);=0A= }=0A= if(!isset($prefix)) {=0A= include_once 'config.php';=0A= =0A= $prefix =3D $pnconfig['prefix'];=0A= $dbtype =3D $pnconfig['dbtype'];=0A= $dbhost =3D $pnconfig['dbhost'];=0A= $dbuname =3D $pnconfig['dbuname'];=0A= $dbpass =3D $pnconfig['dbpass'];=0A= $dbname =3D $pnconfig['dbname'];=0A= $system =3D $pnconfig['system'];=0A= $encoded =3D $pnconfig['encoded'];=0A= }=0A= =0A= if (!empty($encoded)) {=0A= // Decode username and password=0A= $dbuname =3D base64_decode($dbuname);=0A= $dbpass =3D base64_decode($dbpass);=0A= }=0A= =0A= $pnconfig['prefix'] =3D $prefix;=0A= =0A= =0A= echo "=0A= <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">=0A= <html><head><title>Envolution 1.0.0 Upgrade Fix</title>=0A= <META HTTP-EQUIV=3D\"Content-Type\" CONTENT=3D\"text/html; = charset=3D'ISO-8859-1'\">=0A= <META NAME=3D\"AUTHOR\" CONTENT=3D\"Envolution Staff\">=0A= <META NAME=3D\"GENERATOR\" CONTENT=3D\"Envolution -- = http://www.envolution.com\">=0A= <style>=0A= /*TD, P, DIV, INPUT, TEXTAREA, FORM {=0A= font-family: Arial, Helvetica; =0A= font: x-small;=0A= COLOR: #ffffff;=0A= LINE-HEIGHT: 15px=0A= }*/=0A= =0A= INPUT, TEXTAREA, FORM, SELECT {=0A= font-family: Arial, Helvetica; =0A= font: x-small;=0A= COLOR: #ffffff;=0A= background-color: #415E74;=0A= LINE-HEIGHT: 15px=0A= }=0A= =0A= body {=0A= margin: 0px;=0A= padding: 0px;=0A= background-color: #000000;=0A= font-family: Arial, Helvetica;=0A= font-size: x-small;=0A= font-weight: medium;=0A= color: #ffffff;=0A= scrollbar-face-color: #000000; =0A= scrollbar-shadow-color: #ffffff; =0A= scrollbar-highlight-color: #ffffff; =0A= scrollbar-3dlight-color: #99B7CC; =0A= scrollbar-darkshadow-color: #99B7CC; =0A= scrollbar-track-color: #ffffff; =0A= scrollbar-arrow-color: #ffffff;=0A= }=0A= =0A= A:link {=0A= COLOR: #99B7CC;=0A= FONT-SIZE: x-small;=0A= FONT-FAMILY: Arial, Helvetica;=0A= TEXT-DECORATION: none;=0A= }=0A= A:visited {=0A= COLOR: #ffffff;=0A= FONT-SIZE: x-small;=0A= FONT-FAMILY: Arial, Helvetica;=0A= TEXT-DECORATION: none;=0A= }=0A= A:hover {=0A= COLOR: #ffffff;=0A= FONT-SIZE: x-small;=0A= FONT-FAMILY: Arial, Helvetica;;=0A= TEXT-DECORATION: none; =0A= }=0A= A:active {=0A= COLOR: #ffffff;=0A= FONT-SIZE: x-small;=0A= FONT-FAMILY: Arial, Helvetica;=0A= TEXT-DECORATION: none; =0A= }=0A= .pn-pagetitle { =0A= font-family: Arial, Helvetica; =0A= font-size: medium; =0A= font-weight: bold; =0A= color: #ffffff; =0A= }=0A= .pn-sub { =0A= font-family: Arial, Helvetica; =0A= font-size: xx-small; =0A= font-weight: small; =0A= color: #ffffff; =0A= </style> =0A= </head>=0A= <!-- Page Header -->=0A= <body bgcolor=3D\"#000000\">=0A= <br /><br />=0A= <!-- Main Content -->=0A= <table width=3D\"760\" border=3D\"0\" cellpadding=3D\"0\" = cellspacing=3D\"0\" align=3D\"center\" bgcolor=3D\"#000000\">=0A= <tr>=0A= <td bgcolor=3D\"#415E74\"><img src=3D\"install/images/spacer.gif\" = width=3D\"15\" /></td>=0A= <td width=3D\"730\" bgcolor=3D\"#415E74\" align=3D\"center\" = valign=3D\"top\">=0A= <font class=3D\"pn-pagetitle\"><center>Envolution 1.0.0 Upgrade = Fix</center></font>=0A= <br /><br />";=0A= =0A= if ($accept !=3D 'on') {=0A= echo "<h2>--- WARNING --- WARNING ---</h2> <br>=0A= This fix will <b>DELETE</b> your current settings for Encompass themes = already installed.=0A= After running this script, your Encompass themes available will be = <b>only</b> the ones packaged with Envolution 1.0.0=0A= Also, your default theme will be set to Envolved, so please be sure to = have needed themes files installed.=0A= Available Encompass themes after fix will be:<br><br>=0A= DuskyBlue<br>=0A= Envolved (default theme after fix)<br>=0A= LiquidLogic<br>=0A= LogicII<br>=0A= PiterpanV2<br>=0A= X-Indus<br><br><br>=0A= =0A= After running this script, you can install back any theme you had = previously.<br><br>=0A= =0A= If you agree with those terms, please check your database connection = info and press the button below.<br><br>=0A= =0A= <h2>--- AVISO --- AVISO ---</h2>=0A= Este parche <b>BORRAR=C1</b> tus preferencias, zonas y disposiciones = actuales para themes que ya tengas instalados. Tras=0A= la ejecuci=F3n de este script, Los themes disponibles ser=E1n = <b>solo</b> los distribuidos con Envolution 1.0.0=0A= El theme por defecto ser=E1 puesto como Envolved, as=ED que aseg=FArate = de que tienes instalados los ficheros necesarios del theme=0A= Los themes de Encompass disponibles tras la actualizaci=F3n = ser=E1n:<br><br>=0A= DuskyBlue<br>=0A= Envolved (theme por defecto tras el parche)<br>=0A= LiquidLogic<br>=0A= LogicII<br>=0A= PiterpanV2<br>=0A= X-Indus<br><br><br>=0A= =0A= Puedes volver a instalar los themes que ten=EDas una vez hayas = ejecutado este script.<br><br>=0A= =0A= Si aceptas estos t=E9rminos, por favor comprueba la informaci=F3n de = conexi=F3n a tu base de datos y pulsa el bot=F3n.<br><br>";=0A= =0A= echo "=0A= <font class=3D\"pn-title\">Change Info</font><font = class=3D\"pn-normal\">"._CHANGE_INFO_1."<br /><br />=0A= <form action=3D\"fix.php\" method=3D\"post\"><center>=0A= <input type=3D'hidden' name=3D'accept' value=3D'on'>=0A= =0A= =0A= <table cellspacing=3D\"0\" cellpadding=3D\"1\" border=3D\"0\">=0A= <tr><td align=3D\"left\"><font class=3D\"pn-normal\">Database = hostname</font></td>=0A= <td><input type=3D\"text\" NAME=3D\"dbhost\" SIZE=3D20 = maxlength=3D80 value=3D\"$dbhost\"></td></tr>=0A= <tr><td align=3D\"left\"><font class=3D\"pn-normal\">Database = user</font></td>=0A= <td><input type=3D\"text\" NAME=3D\"dbuname\" SIZE=3D20 = maxlength=3D80 value=3D\"$dbuname\"></td></tr>=0A= <tr><td align=3D\"left\"><font class=3D\"pn-normal\">Database = user password</font></td>=0A= <td><input type=3D\"text\" NAME=3D\"dbpass\" SIZE=3D20 = maxlength=3D80 value=3D\"$dbpass\"></td></tr>=0A= <tr><td align=3D\"left\"><font class=3D\"pn-normal\">Database = name</font></td>=0A= <td><input type=3D\"text\" NAME=3D\"dbname\" SIZE=3D20 = maxlength=3D80 value=3D\"$dbname\"></td></tr>=0A= <tr><td align=3D\"left\"><font = class=3D\"pn-normal\">Prefix</font></td>=0A= <td><input type=3D\"text\" NAME=3D\"prefix\" SIZE=3D20 = maxlength=3D80 value=3D\"$prefix\"></td></tr>=0A= <tr><td align=3D\"left\"><font class=3D\"pn-normal\">Database = type</font></td>=0A= <td><select name=3D\"dbtype\"><option value=3D\"mysql\" = selected> MySQL </option>=0A= </select></td></tr>=0A= </table>=0A= =0A= <input type=3D\"hidden\" name=3D\"op\" value=3D\"Submit\">=0A= <input type=3D\"submit\" value=3D\"Go\"></center></form></font>";=0A= }=0A= =0A= switch(@$op) {=0A= =0A= case "Submit":=0A= echo "Connecting to database ... ";=0A= $dbconn =3D dbconnect($dbhost, $dbuname, $dbpass, $dbname, = $dbtype); =0A= echo "OK<br>";=0A= echo "Deleting table ".$prefix."_theme_skins ... ";=0A= $dbconn->Execute("DROP TABLE ".$prefix."_theme_skins");=0A= echo "OK<br>";=0A= echo "Deleting table ".$prefix."_theme_zones ... ";=0A= $dbconn->Execute("DROP TABLE ".$prefix."_theme_zones");=0A= echo "OK<br>";=0A= echo "Deleting table ".$prefix."_theme_layout ... ";=0A= $dbconn->Execute("DROP TABLE ".$prefix."_theme_layout");=0A= echo "OK<br>";=0A= echo "Deleting table ".$prefix."_theme_config ... ";=0A= $dbconn->Execute("DROP TABLE ".$prefix."_theme_config");=0A= echo "OK<br>";=0A= echo "<br>Checking that tables are deleted ...<br>";=0A= echo $prefix."_theme_skins ... ";=0A= $allok =3D 0;=0A= if (CheckTableExists("theme_skins")) {=0A= $allok =3D 1;=0A= echo "<b>Error.</b> It still exists. It seems you dont have delete = permissions. Don't panic, will try B-Plan<br>";=0A= } else echo "OK<br>";=0A= echo $prefix."_theme_zones ... ";=0A= if (CheckTableExists("theme_zones")) {=0A= $allok =3D $allok + 2;=0A= echo "<b>Error.</b> It still exists. It seems you dont have delete = permissions. Don't panic, will try B-Plan<br>";=0A= } else echo "OK<br>";=0A= echo $prefix."_theme_layout ... ";=0A= if (CheckTableExists("theme_layout")) {=0A= $allok =3D $allok + 4;=0A= echo "<b>Error.</b> It still exists. It seems you dont have delete = permissions. Don't panic, will try B-Plan<br>";=0A= } else echo "OK<br>";=0A= echo $prefix."_theme_config ... ";=0A= if (CheckTableExists("theme_config")) {=0A= $allok =3D $allok + 8;=0A= echo "<b>Error.</b> It still exists. It seems you dont have delete = permissions. Don't panic, will try B-Plan<br>";=0A= } else echo "OK<br>";=0A= =0A= echo "<br>";=0A= =0A= if ($allok > 0) { // Let's try B-Plan=0A= echo "Trying to modify current tables<br>";=0A= echo "First, we will empty them, then we will to modify the table = structure. Let's go.<br>";=0A= echo "Deleting data from ".$prefix."_theme_layout ... ";=0A= $result =3D $dbconn->Execute("DELETE FROM = ".$prefix."_theme_layout");=0A= echo "OK<br>";=0A= echo "Deleting data from ".$prefix."_theme_skins ... ";=0A= $result =3D $dbconn->Execute("DELETE FROM ".$prefix."_theme_skins");=0A= echo "OK<br>";=0A= echo "Deleting data from ".$prefix."_theme_config ... ";=0A= $result =3D $dbconn->Execute("DELETE FROM = ".$prefix."_theme_config");=0A= echo "OK<br>";=0A= echo "Deleting data from ".$prefix."_theme_zones ... ";=0A= $result =3D $dbconn->Execute("DELETE FROM ".$prefix."_theme_zones");=0A= echo "OK<br>";=0A= // OK, tables are empty. Now will try to create new fields if they = doesnt exists=0A= if (!CheckForField("skin_id","theme_zones")) {=0A= $dbconn->Execute("ALTER TABLE ".$prefix."_theme_zones ADD skin_id = int(3) NOT NULL default '0'");=0A= }=0A= if (!CheckForField("skin_id","theme_config")) {=0A= $dbconn->Execute("ALTER TABLE ".$prefix."_theme_config ADD = skin_id int(3) NOT NULL default '0'");=0A= }=0A= $lestpray =3D 0;=0A= =0A= if (CheckForField("skin_id","theme_zones")) {=0A= if (CheckForField("skin_id","theme_config")) {=0A= echo "B Plan worked. Proceeding with the rest of the script<br>";=0A= } else $letspray =3D 1;=0A= } else $letspray =3D 1;=0A= =0A= if ($letspray) {=0A= die ("B plan failed and there isnt C Plan. This script hasnt been = able to delete required tables neither to add required fields. This can = be a problem with your user permissions on the database. You need to = delete by hand the next tables and run this script = again:<br>".$prefix."_theme_skins,".$prefix."_theme_layout,".$prefix."_th= eme_zones and ".$prefix."_theme_config.");=0A= }=0A= =0A= } else { //Everything went ok. Just create new tables=0A= echo "Making table ".$prefix."_theme_layout ... ";=0A= $result =3D $dbconn->Execute("CREATE TABLE = ".$prefix."_theme_layout (=0A= skin_id int(3) NOT NULL default '0',=0A= zone_label varchar(20) NOT NULL default '',=0A= tpl_file varchar(20) NOT NULL default '',=0A= KEY (skin_id))") ; =0A= if (CheckTableExists("theme_layout")) {=0A= echo "OK<br>";=0A= } else {=0A= die ("Unable to create table ".$prefix."_theme_layout. It seems = there is something wrong with your permissions or your database");=0A= }=0A= echo "Making table ".$prefix."_theme_config ... ";=0A= $result =3D $dbconn->Execute("CREATE TABLE ".$prefix."_theme_config (=0A= name varchar(20) NOT NULL default '',=0A= skin_id int(3) NOT NULL NOT NULL default '1',=0A= description varchar(60) NOT NULL default '',=0A= setting varchar(10) NOT NULL default '',=0A= data varchar(150) NOT NULL default '',=0A= KEY (skin_id))"); =0A= if (CheckTableExists("theme_config")) {=0A= echo "OK<br>";=0A= } else {=0A= die ("Unable to create table ".$prefix."_theme_config. It seems = there is something wrong with your permissions or your database");=0A= }=0A= echo "Making table ".$prefix."_theme_zones ... ";=0A= $result =3D $dbconn->Execute("CREATE TABLE ".$prefix."_theme_zones = (=0A= zone_id int(3) NOT NULL auto_increment,=0A= skin_id int(3) NOT NULL default '1',=0A= name varchar(40) NOT NULL default 'No Name',=0A= label varchar(20) NOT NULL default 'addon',=0A= type int(1) NOT NULL default '1',=0A= is_active int(1) NOT NULL default '0',=0A= PRIMARY KEY (zone_id),=0A= KEY (skin_id))"); =0A= if (CheckTableExists("theme_zones")) {=0A= echo "OK<br>";=0A= } else {=0A= die ("Unable to create table ".$prefix."_theme_zones. It seems = there is something wrong with your permissions or your database");=0A= }=0A= echo "Making table ".$prefix."_theme_skins ... ";=0A= $result =3D $dbconn->Execute("CREATE TABLE ".$prefix."_theme_skins = (=0A= skin_id int(3) NOT NULL auto_increment,=0A= name varchar(60) NOT NULL default '',=0A= is_active int(1) NOT NULL default '0',=0A= is_multicolor int(1) NOT NULL default '0',=0A= bgcolor1 varchar(12) NOT NULL default '#FFFFFF',=0A= bgcolor2 varchar(12) NOT NULL default '#FFFFFF',=0A= bgcolor3 varchar(12) NOT NULL default '#FFFFFF',=0A= bgcolor4 varchar(12) NOT NULL default '#FFFFFF',=0A= bgcolor5 varchar(12) NOT NULL default '#FFFFFF',=0A= bgcolor6 varchar(12) NOT NULL default '#FFFFFF',=0A= sepcolor varchar(12) NOT NULL default '#000000',=0A= textcolor1 varchar(12) NOT NULL default '#000000',=0A= textcolor2 varchar(12) NOT NULL default '#000000',=0A= PRIMARY KEY (skin_id))");=0A= if (CheckTableExists("theme_skins")) {=0A= echo "OK<br>";=0A= } else {=0A= die ("Unable to create table ".$prefix."_theme_skins. It seems = there is something wrong with your permissions or your database");=0A= }=0A= }=0A= =0A= //At this poing all tables should be made and empty. Just = insert data.=0A= echo "<br>";=0A= echo "Inserting data ... <br>";=0A= echo "skins ... ";=0A= //Insert skin LogicII=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_skins=0A= VALUES (1,=0A= 'LogicII',=0A= 1,=0A= 0,=0A= '#EFEFEF',=0A= '#C1C2C3',=0A= '#CFCFBB',=0A= '#F7F7F0',=0A= '#FFFFFF',=0A= '#000066',=0A= '#D1CDD2',=0A= '#000000',=0A= '#000000')");=0A= =0A= // Insert skin Envolved=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_skins=0A= VALUES (2,=0A= 'Envolved',=0A= 1,=0A= 0,=0A= '#415E74',=0A= '#415E74',=0A= '#415E74',=0A= '#415E74',=0A= '#99B7CC',=0A= '#415E74',=0A= '#415E74',=0A= '#FFFFFF',=0A= '#FFFFFF')");=0A= // Insert skin LiquidLogic=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_skins=0A= VALUES (3,=0A= 'LiquidLogic',=0A= 1,=0A= 0,=0A= '#999999',=0A= '#0066CC',=0A= '#999999',=0A= '#CCCCCC',=0A= '#FFFFFF',=0A= '#0066CC',=0A= '#D1CDD2',=0A= '#000000',=0A= '#000000')");=0A= // Insert skin DuskyBlue=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_skins=0A= VALUES (4,=0A= 'DuskyBlue',=0A= 1,=0A= 0,=0A= '#FFFFFF',=0A= '#CFD5E9',=0A= '#A5B4C4',=0A= '#778899',=0A= '#333333',=0A= '#000000',=0A= '#000000',=0A= '#000000',=0A= '#FFFFFF')");=0A= // Insert skin X-Indus=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_skins=0A= VALUES (5,=0A= 'X-Indus',=0A= 1,=0A= 0,=0A= '#FFFFFF',=0A= '#D9D9FC',=0A= '#999999',=0A= '#D9D9FC',=0A= '#FFFFFF',=0A= '#0066CC',=0A= '#D1CDD2',=0A= '#000000',=0A= '#000000')");=0A= =0A= // Insert skin PiterpanV2 =0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_skins=0A= VALUES (6,=0A= 'PiterpanV2',=0A= 1,=0A= 0,=0A= '#FEFEFE',=0A= '#FEFEFE',=0A= '#E9EDF5',=0A= '#E9EDF5',=0A= '#003058',=0A= '#000066',=0A= '#505050',=0A= '#505050',=0A= '#505050')");=0A= =0A= echo "OK<br>";=0A= echo "Inserting layout, zones and config ... ";=0A= for ($i=3D1;$i<7;$i++) {=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_config=0A= VALUES = ('pagewidth',$i,'"._ENPAGEWIDTH."','100%','')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_config=0A= VALUES = ('lcolwidth',$i,'"._ENLCOLWIDTH."','140','')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_config=0A= VALUES = ('rcolwidth',$i,'"._ENRCOLWIDTH."','170','')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_config=0A= VALUES = ('indexcol',$i,'"._ENINDEXCOL."','1','')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_config=0A= VALUES = ('righton',$i,'"._ENRIGHTON."','0','')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_config=0A= VALUES = ('iblkwidth',$i,'"._ENINBLKWIDTH."','145','')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i,'master1','master1.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i,'master2','master2.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i,'lsblock','lsblock.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i,'rsblock','rsblock.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i,'table1','table1.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i,'table2','table2.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES = ($i,'News-index','News-index.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES = ($i,'News-article','News-article.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES = ($i,'News-index2','News-index2.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i, 'topcenter', = 'topcenter2.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i, 'tcblock', 'tcblock.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i, 'botcenter', = 'botcenter.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i, 'bcblock', 'bcblock.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i, 'inblock', 'inblock.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i, 'isblock', 'isblock.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i, 'dsblock', 'dsblock.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_layout=0A= VALUES ($i, 'mainmenu', = 'mainmenu.tpl')");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENMASTER1."', 'master1', = 0, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENMASTER2."', 'master2', = 0, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENOPENTABLE1."', = 'table1', 0, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENOPENTABLE2."', = 'table2', 0, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENLEFTSIDEB."', = 'lsblock', 0, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENRIGHTSIDEB."', = 'rsblock', 0, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENNEWSINDEX."', = 'News-index', 0, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENNEWSART."', = 'News-article', 0, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENNEWSINDEX2."', = 'News-index2', 1, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENTOPCENTERBLOCK."', = 'topcenter', 1, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENTOPCENTERBOX."', = 'tcblock', 1, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENBOTCENTERBLOCK."', = 'botcenter', 1, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENBOTCENTERBOX."', = 'bcblock', 1, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENINNER."', 'inblock', = 1, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENDEFAULTSIDEB."', = 'isblock', 1, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENDEFAULTSIDE."', = 'dsblock', 1, 1)");=0A= $dbconn->Execute("INSERT INTO ".$prefix."_theme_zones = (skin_id,name,label,type,is_active)=0A= VALUES ($i, '"._ENMAINMENUB."', = 'mainmenu', 1, 1)");=0A= =0A= }=0A= echo "OK<br><br>";=0A= =0A= echo "Making Envolved default theme ... ";=0A= SaveConfigValue ('/PNConfig','Default_Theme','Envolved',1);=0A= echo "OK<br><br>";=0A= =0A= echo "If everything was ok (no errors/warnings shown), then the last = step is just to delete this file and go to your site. Now you can insert = back any theme you want<br><br>";=0A= =0A= echo "The Envolution Team wants to thank you for your patience and = comprenssion and wants to apologize for any inconvenience this bug = made.<br><br><br>";=0A= =0A= echo "Si todo ha sido correcto (no se han mostrado errores o avisos), = el =FAltimo paso que queda es borrar este fichero e ir a tu sitio. Ahora = puedes instalar cualquier theme que desees<br><br>";=0A= =0A= echo "El Equipo de Envolution quiere agradecerte tu paciencia y = comprensi=F3n y te pide disculpas por cualquier inconveniente que te = haya podido producir este error.<br><br><br>";=0A= =0A= echo "<b>Remember to delete this file / Recuerda borrar este = fichero</b>";=0A= break;=0A= }=0A= =0A= echo "=0A= <center><font class=3D\"pn-sub\">Thank you for trying Envolution = 1.0.0. The Envolution Team</font></center>=0A= <center><font class=3D\"pn-sub\">Gracias por utilizar Envolution = 1.0.0. El equipo de Envolution</font></center><br>=0A= </td><td bgcolor=3D\"#415E74\"></td>=0A= </tr>=0A= </table>=0A= =0A= </body>=0A= </html>";=0A= =0A= =0A= =0A= =0A= =0A= ?> ------=_NextPart_000_0001_01C258AD.62E97A10--