Upgrade-Script Contenido 4.2 -> 4.4 [ALPHA!]

timo
Beiträge: 6284
Registriert: Do 15. Mai 2003, 18:32
Wohnort: Da findet ihr mich nie!
Kontaktdaten:

Upgrade-Script Contenido 4.2 -> 4.4 [ALPHA!]

Beitrag von timo » Do 13. Nov 2003, 12:38

Disclaimer vorweg: Keine Garantie für dieses Script.

Vorraussetzungen:
- Mut
- PHP-Kenntnisse

Vorgehensweise:

- Datenbank Backup erstellen
- Bisherige 4.2-Installation sichern
- Contenido 4.4.1-Dateien inkl. Patch über die alte 4.2 installieren (mit Setup ausführen, damit das Config-File erstellt wird)
- Die alte Datenbank von der 4.2 einspielen und die neu installierte Datenbank vorher entfernen
- Das Update-Script in das Verzeichnis "contenido" legen
- NEU: Das SQL-File als "base.sql" in dasselbe Verzeichnis wie das upgrade-Script legen
- Die Variablen im Update-Script anpassen
- Das Script ausführen
- Meldungen ignorieren oder in eine Textdatei zur Referenz kopieren.

Das Script updated die Datenbankstruktur der alten 4.2 auf die 4.4, ändert Felder (z.b. idside zu idart) und kümmert sich um die Konvertiertung der Module (ist noch nicht perfekt). Weiterhin wird der Sysadmin-Account angelegt.

Bekannte Probleme:
- Die Texte einiger Module fehlen. Dies kann umgangen werden, indem in der Datei cfg_language_de.inc.php sämtliche Arrays auf global gesetzt werden

Wie auch immer: Teste, wer mag, aber bitte sachliches Feedback (bitte kein "Das Upgrade-Script ist $!%#!$!!, nichts hat funktioniert", sondern was genau nicht geklappt hat).

Das Script:

Code: Alles auswählen

<?php

/*****************************************
* File      :   upgrade.php
* Project   :   Contenido
* Descr     :   Contenido upgrade script
*
* Authors   :   Timo A. Hummel
*
* © four for business AG, www.4fb.de
******************************************/

$cfg["path"]["classes"] = getcwd() . "/classes/";
$cfg["path"]["includes"] = getcwd() . "/includes/";
$cfg["path"]["conlib"] = getcwd() . "/../conlib/";

$cfg['sql']['sqlprefix'] = 'con';


$setup_host = "<host>";
$setup_database = "<database>";
$setup_user = "<username>";
$setup_password = "<password>";



$prefix = "con";
$cfg["tab"]["sequence"] = "con_sequence";
$cfg["tab"]["mod"] = "con_mod";




/* The host where your database runs on */
$contenido_host = $setup_host;

/* The database name which you use */
$contenido_database = $setup_database;

/* The username to access the database */
$contenido_user = $setup_user;

/* The password to access the database */
$contenido_password = $setup_password;

include_once ($cfg["path"]["conlib"] . 'prepend.php3');
include_once ($cfg["path"]["includes"] . 'cfg_sql.inc.php');
include_once ($cfg["path"]["includes"] . 'api/functions.api.general.php');
include_once ($cfg["path"]["includes"] . 'functions.general.php');
include_once ($cfg["path"]["includes"] . 'functions.mod.php');
include_once ($cfg["path"]["includes"] . 'functions.str.php');
include_once ($cfg["path"]["includes"] . 'functions.con.php');
include_once ($cfg["path"]["includes"] . 'functions.database.php');
include_once ($cfg["path"]["conlib"] . 'local.php');




		global $PHP_SELF, $SERVER_NAME;

		if ($SERVER_NAME == "")
		{
			$SERVER_NAME = $_SERVER["SERVER_NAME"];
		}
		
		if ($PHP_SELF == "")
		{
			$PHP_SELF = $_SERVER["PHP_SELF"];
		}
		
		//make pathvariables for the configfile
        $root_path = str_replace ('\\', '/contenido', dirname(__FILE__) );
		$root_path = str_replace('/setup/', '', $root_path);
		$root_http_path = "http://" . $SERVER_NAME . str_replace('contenido/upgrade42_44.php', '', $PHP_SELF);


class DB_Upgrade extends DB_Sql {

  var $Host;
  var $Database;
  var $User;
  var $Password;

  var $Halt_On_Error = "report";

  //Konstruktor
  function DB_Upgrade()
  {
  	  global $setup_host, $setup_database, $setup_user, $setup_password;
      $this -> Host = $setup_host;
      $this -> Database = $setup_database;
      $this -> User = $setup_user;
      $this -> Password = $setup_password;
  }

  function haltmsg($msg) {
    $fp = fopen("logs/install.log.txt", "a+");
    
    if (!$fp)
    {
    	die("Could not open file install.log.txt in directory ".getcwd());
	}
    $msg = sprintf("%s: error %s (%s) - %s\n",
      date("Y-M-D H:i:s"),
      $this->Errno,
      $this->Error,
      $msg);
     echo $msg;
    fputs($fp, $msg);
    fclose($fp);
  }
  
  function copyResultToArray ()
  {
  		$values = array();
  		
  		$metadata = $this->metadata();
		
		if (!is_array($metadata))
		{
			return false;
		}
		
		foreach ($metadata as $entry)
		{
			$values[$entry['name']] = $this->f($entry['name']);
		}
		
		return $values;
  }
}



$db = new DB_Upgrade;

$db->query("ALTER TABLE con_side RENAME con_art");
$db->query("ALTER TABLE con_side_lang RENAME con_art_lang");
$db->query("ALTER TABLE con_cat_side RENAME con_cat_art");

$db->query("ALTER TABLE con_art CHANGE idside idart INT(6) NOT NULL");
$db->query("ALTER TABLE con_art DROP PRIMARY KEY");

$db->query("ALTER TABLE con_art_lang CHANGE idsidelang idartlang INT(10) NOT NULL DEFAULT '0'");
$db->query("ALTER TABLE con_art_lang CHANGE idside idart INT(10) NOT NULL DEFAULT '0'");
$db->query("ALTER TABLE con_art_lang DROP PRIMARY KEY");

$db->query("ALTER TABLE con_cat DROP PRIMARY KEY");

$db->query("ALTER TABLE con_cat_art CHANGE idside idart INT(6) NOT NULL");
$db->query("ALTER TABLE con_content CHANGE idsidelang idartlang INT(6) NOT NULL");
$db->query("ALTER TABLE con_cat_art CHANGE idcatside idcatart INT(10) NOT NULL DEFAULT '0'");
$db->query("ALTER TABLE con_cat_art DROP PRIMARY KEY");

$db->query("ALTER TABLE con_cat_tree DROP PRIMARY KEY");
$db->query("ALTER TABLE con_cat_lang DROP PRIMARY KEY");
$db->query("ALTER TABLE con_clients DROP PRIMARY KEY");
$db->query("ALTER TABLE con_code DROP PRIMARY KEY");
$db->query("ALTER TABLE con_content DROP PRIMARY KEY");
$db->query("ALTER TABLE con_clients_lang DROP PRIMARY KEY");
$db->query("ALTER TABLE con_lang DROP PRIMARY KEY");
$db->query("ALTER TABLE con_lay DROP PRIMARY KEY");
$db->query("ALTER TABLE con_mod DROP PRIMARY KEY");

$db->query("ALTER TABLE con_news DROP PRIMARY KEY");
$db->query("ALTER TABLE con_news_rcp DROP PRIMARY KEY");

$db->query("ALTER TABLE con_stat DROP PRIMARY KEY");
$db->query("ALTER TABLE con_status DROP PRIMARY KEY");
$db->query("ALTER TABLE con_type DROP PRIMARY KEY");
$db->query("ALTER TABLE con_upl DROP PRIMARY KEY");
$db->query("ALTER TABLE con_phplib_active_sessions DROP PRIMARY KEY");
$db->query("ALTER TABLE con_phplib_auth_user_md5 DROP PRIMARY KEY");


# Create Contenido classes
//$notification = new Contenido_Notification;

dbUpgradeTable($prefix."_art", 'idart', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_art", 'idclient', 'int(10)', '', '', '0', '','');

dbUpgradeTable($prefix."_art_lang", 'idartlang', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_art_lang", 'idart', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_art_lang", 'idlang', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_art_lang", 'idtplcfg', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_art_lang", 'title', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'pagetitle', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'summary', 'text', 'YES', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_art_lang", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_art_lang", 'author', 'varchar(32)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'modifiedby', 'varchar(32)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'online', 'tinyint(1)', '', '', '0', '','');
dbUpgradeTable($prefix."_art_lang", 'redirect', 'int(6)', '', '', '0', '','');
dbUpgradeTable($prefix."_art_lang", 'redirect_url', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'artsort', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_art_lang", 'timemgmt', 'tinyint(1)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'datestart', 'datetime', 'YES', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'dateend', 'datetime', 'YES', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'status', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_art_lang", 'free_use_01', 'mediumint(7)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'free_use_02', 'mediumint(7)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'free_use_03', 'mediumint(7)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'time_move_cat', 'mediumint(7)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'time_target_cat', 'mediumint(7)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'time_online_move', 'mediumint(7)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'external_redirect', 'char(1)', '', '', '', '','');
dbUpgradeTable($prefix."_art_lang", 'locked', 'int(1)', '', '', '0', '','');

dbUpgradeTable($prefix."_cat", 'idcat', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_cat", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat", 'parentid', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat", 'preid', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat", 'postid', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat", 'status', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_cat", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_cat", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');

dbUpgradeTable($prefix."_cat_art", 'idcatart', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_cat_art", 'idcat', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat_art", 'idart', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat_art", 'is_start', 'tinyint(1)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat_art", 'status', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat_art", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_cat_art", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_cat_art", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_cat_art", 'createcode', 'tinyint(1)', '', '', '1', '','');

dbUpgradeTable($prefix."_cat_tree", 'idtree', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_cat_tree", 'idcat', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat_tree", 'level', 'int(2)', '', '', '0', '','');

dbUpgradeTable($prefix."_cat_lang", 'idcatlang', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_cat_lang", 'idcat', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat_lang", 'idlang', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat_lang", 'idtplcfg', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat_lang", 'name', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_cat_lang", 'visible', 'tinyint(1)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat_lang", 'public', 'tinyint(1)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat_lang", 'status', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_cat_lang", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_cat_lang", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_cat_lang", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');

dbUpgradeTable($prefix."_clients", 'idclient', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_clients", 'name', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_clients", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_clients", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_clients", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_clients", 'path', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_clients", 'frontendpath', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_clients", 'htmlpath', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_clients", 'errsite_cat', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_clients", 'errsite_art', 'int(10)', '', '', '0', '','');

dbUpgradeTable($prefix."_clients_lang", 'idclientslang', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_clients_lang", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_clients_lang", 'idlang', 'int(10)', '', '', '0', '','');

dbUpgradeTable($prefix."_code", 'idcode', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_code", 'idcatart', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_code", 'idlang', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_code", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_code", 'code', 'text', '', '', '', '','');

dbUpgradeTable($prefix."_content", 'idcontent', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_content", 'idartlang', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_content", 'idtype', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_content", 'typeid', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_content", 'value', 'text', '', '', '', '','');
dbUpgradeTable($prefix."_content", 'version', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_content", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_content", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_content", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');

dbUpgradeTable($prefix."_lang", 'idlang', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_lang", 'name', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_lang", 'active', 'tinyint(1)', '', '', '0', '','');
dbUpgradeTable($prefix."_lang", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_lang", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_lang", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_lang", 'encoding', 'varchar(32)', '', '', '', '','');

dbUpgradeTable($prefix."_lay", 'idlay', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_lay", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_lay", 'name', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_lay", 'description', 'text', 'YES', '', '', '','');
dbUpgradeTable($prefix."_lay", 'deletable', 'tinyint(1)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_lay", 'code', 'text', '', '', '', '','');dbUpgradeTable($prefix."_lay", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_lay", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_lay", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');

dbUpgradeTable($prefix."_mod", 'idmod', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_mod", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_mod", 'name', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_mod", 'description', 'text', 'YES', '', '', '','');
dbUpgradeTable($prefix."_mod", 'deletable', 'tinyint(1)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_mod", 'input', 'longtext', '', '', '', '','');
dbUpgradeTable($prefix."_mod", 'output', 'longtext', '', '', '', '','');
dbUpgradeTable($prefix."_mod", 'template', 'text', '', '', '', '','');
dbUpgradeTable($prefix."_mod", 'static', 'tinyint(1)', '', '', '0', '','');
dbUpgradeTable($prefix."_mod", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_mod", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_mod", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');

dbUpgradeTable($prefix."_news", 'idnews', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_news", 'idart', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_news", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_news", 'idlang', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_news", 'name', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_news", 'subject', 'text', 'YES', '', '', '','');
dbUpgradeTable($prefix."_news", 'message', 'text', 'YES', '', '', '','');
dbUpgradeTable($prefix."_news", 'newsfrom', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_news", 'newsdate', 'datetime', 'YES', '', '', '','');
dbUpgradeTable($prefix."_news", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_news", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_news", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');

dbUpgradeTable($prefix."_news_rcp", 'idnewsrcp', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_news_rcp", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_news_rcp", 'idlang', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_news_rcp", 'email', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_news_rcp", 'name', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_news_rcp", 'deactivated', 'int(1)', '', '', '0', '','');
dbUpgradeTable($prefix."_news_rcp", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_news_rcp", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_news_rcp", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');

dbUpgradeTable($prefix."_stat", 'idstat', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_stat", 'idcatart', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_stat", 'idlang', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_stat", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_stat", 'visited', 'int(6)', '', '', '0', '','');
dbUpgradeTable($prefix."_stat", 'visitdate', 'timestamp(14)', 'YES', '', '', '','');

dbUpgradeTable($prefix."_stat_archive", 'idstatarch', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_stat_archive", 'archived', 'varchar(6)', '', '', '', '','');
dbUpgradeTable($prefix."_stat_archive", 'idcatart', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_stat_archive", 'idlang', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_stat_archive", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_stat_archive", 'visited', 'int(6)', '', '', '0', '','');
dbUpgradeTable($prefix."_stat_archive", 'visitdate', 'timestamp(14)', 'YES', '', '', '','');

dbUpgradeTable($prefix."_status", 'idstatus', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_status", 'description', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_status", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_status", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_status", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');

dbUpgradeTable($prefix."_template", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_template", 'idlay', 'int(10)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_template", 'idtpl', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_template", 'idtplcfg', 'int(10)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_template", 'name', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_template", 'description', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_template", 'deletable', 'tinyint(1)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_template", 'status', 'int(10)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_template", 'author', 'varchar(32)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_template", 'created', 'timestamp(14)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_template", 'lastmodified', 'timestamp(14)', 'YES', '', '', '','');

dbUpgradeTable($prefix."_template_conf", 'idtplcfg', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_template_conf", 'idtpl', 'int(10)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_template_conf", 'status', 'int(10)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_template_conf", 'author', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_template_conf", 'created', 'timestamp(14)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_template_conf", 'lastmodified', 'timestamp(14)', 'YES', '', '', '','');

dbUpgradeTable($prefix."_type", 'idtype', 'int(6)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_type", 'type', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_type", 'code', 'text', '', '', '', '','');
dbUpgradeTable($prefix."_type", 'description', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_type", 'status', 'int(11)', '', '', '0', '','');
dbUpgradeTable($prefix."_type", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_type", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_type", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '',''); 

dbUpgradeTable($prefix."_upl", 'idupl', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_upl", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_upl", 'filename', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_upl", 'dirname', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_upl", 'filetype', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_upl", 'size', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_upl", 'description', 'text', '', '', '', '','');
dbUpgradeTable($prefix."_upl", 'status', 'int(11)', '', '', '0', '','');
dbUpgradeTable($prefix."_upl", 'author', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_upl", 'created', 'datetime', '', '', '0000-00-00 00:00:00', '','');
dbUpgradeTable($prefix."_upl", 'lastmodified', 'datetime', '', '', '0000-00-00 00:00:00', '','');

dbUpgradeTable($prefix."_keywords", 'idkeyword', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_keywords", 'keyword', 'varchar(50)', '', '', '', '','');
dbUpgradeTable($prefix."_keywords", 'exp', 'text', '', '', '', '','');
dbUpgradeTable($prefix."_keywords", 'auto', 'text', '', '', '', '','');
dbUpgradeTable($prefix."_keywords", 'self', 'text', '', '', '', '','');
dbUpgradeTable($prefix."_keywords", 'idlang', 'int(10)', '', '', '0', '','');

dbUpgradeTable($prefix."_area", 'idarea', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_area", 'parent_id', 'varchar(255)', '', '', '0', '','');
dbUpgradeTable($prefix."_area", 'name', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_area", 'relevant', 'tinyint(1)', '', '', '0', '','');
dbUpgradeTable($prefix."_area", 'online', 'tinyint(1)', '', '', '0', '','');

dbUpgradeTable($prefix."_actions", 'idaction', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_actions", 'idarea', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_actions", 'alt_name', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_actions", 'name', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_actions", 'code', 'text', '', '', '', '','');
dbUpgradeTable($prefix."_actions", 'location', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_actions", 'relevant', 'tinyint(1)', '', '', '0', '','');

dbUpgradeTable($prefix."_nav_main", 'idnavm', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_nav_main", 'location', 'varchar(255)', '', '', '', '','');

dbUpgradeTable($prefix."_nav_sub", 'idnavs', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_nav_sub", 'idnavm', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_nav_sub", 'idarea', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_nav_sub", 'level', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_nav_sub", 'location', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_nav_sub", 'online', 'tinyint(1)', '', '', '0', '','');

dbUpgradeTable($prefix."_rights", 'idright', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_rights", 'user_id', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_rights", 'idarea', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_rights", 'idaction', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_rights", 'idcat', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_rights", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_rights", 'idlang', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_rights", 'type', 'tinyint(1)', '', '', '0', '','');

dbUpgradeTable($prefix."_container", 'idcontainer', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_container", 'idtpl', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_container", 'number', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_container", 'idmod', 'int(10)', 'YES', '', '', '','');

dbUpgradeTable($prefix."_container_conf", 'idcontainerc', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_container_conf", 'idtplcfg', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_container_conf", 'number', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_container_conf", 'container', 'text', 'YES', '', '', '','');

dbUpgradeTable($prefix."_files", 'idfile', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_files", 'idarea', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_files", 'filename', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_files", 'filetype', 'varchar(4)', '', '', 'main', '','');

dbUpgradeTable($prefix."_frame_files", 'idframefile', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_frame_files", 'idarea', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_frame_files", 'idframe', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_frame_files", 'idfile', 'int(10)', '', '', '0', '','');

dbUpgradeTable($prefix."_plugins", 'idplugin', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_plugins", 'idclient', 'int(10)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_plugins", 'name', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_plugins", 'description', 'text', '', '', '', '','');
dbUpgradeTable($prefix."_plugins", 'path', 'varchar(255)', '', '', '', '','');
dbUpgradeTable($prefix."_plugins", 'installed', 'tinyint(1)', '', '', '0', '','');
dbUpgradeTable($prefix."_plugins", 'active', 'tinyint(1)', 'YES', '', '', '','');

dbUpgradeTable($prefix."_phplib_active_sessions", 'sid', 'varchar(32)', '', 'PRI', '', '','');
dbUpgradeTable($prefix."_phplib_active_sessions", 'name', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_phplib_active_sessions", 'val', 'longblob', 'YES', '', '', '','');
dbUpgradeTable($prefix."_phplib_active_sessions", 'changed', 'varchar(14)', '', '', '', '','');

dbUpgradeTable($prefix."_phplib_auth_user_md5", 'user_id', 'varchar(32)', '', 'PRI', '', '','');
dbUpgradeTable($prefix."_phplib_auth_user_md5", 'username', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_phplib_auth_user_md5", 'password', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_phplib_auth_user_md5", 'perms', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_phplib_auth_user_md5", 'realname', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_phplib_auth_user_md5", 'email', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_phplib_auth_user_md5", 'telephone', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_phplib_auth_user_md5", 'address_street', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_phplib_auth_user_md5", 'address_zip', 'varchar(10)', '', '', '', '','');
dbUpgradeTable($prefix."_phplib_auth_user_md5", 'address_city', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_phplib_auth_user_md5", 'address_country', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_phplib_auth_user_md5", 'wysi', 'tinyint(2)', 'YES', '', '', '','');

dbUpgradeTable($prefix."_actionlog", 'idlog', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_actionlog", 'user_id', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_actionlog", 'idclient', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_actionlog", 'idlang', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_actionlog", 'idaction', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_actionlog", 'idcatart', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_actionlog", 'logtimestamp', 'datetime', 'YES', '', '0000-00-00 00:00:00', '','');

dbUpgradeTable($prefix."_link", 'idlink', 'int(6)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_link", 'idartlang', 'int(10)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_link", 'idcat', 'int(10)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_link", 'idart', 'int(10)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_link", 'linkpath', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_link", 'internal', 'tinyint(1)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_link", 'active', 'tinyint(1)', 'YES', '', '', '','');

dbUpgradeTable($prefix."_meta_type", 'idmetatype', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_meta_type", 'metatype', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_meta_type", 'fieldtype', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_meta_type", 'maxlength', 'int(11)', '', '', '0', '','');

dbUpgradeTable($prefix."_meta_tag", 'idmetatag', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_meta_tag", 'idartlang', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_meta_tag", 'idmetatype', 'int(10)', '', '', '0', '','');
dbUpgradeTable($prefix."_meta_tag", 'metavalue', 'text', '', '', '', '','');

dbUpgradeTable($prefix."_groups", 'group_id', 'varchar(32)', '', 'PRI', '', '','');
dbUpgradeTable($prefix."_groups", 'groupname', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_groups", 'perms', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_groups", 'description', 'varchar(255)', 'YES', '', '', '','');

dbUpgradeTable($prefix."_group_prop", 'idgroupprop', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_group_prop", 'group_id', 'varchar(32)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_group_prop", 'type', 'varchar(32)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_group_prop", 'name', 'varchar(32)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_group_prop", 'value', 'text', 'YES', '', '', '','');
dbUpgradeTable($prefix."_group_prop", 'idcatlang', 'int(11)', '', '', '0', '','');

dbUpgradeTable($prefix."_groupmembers", 'idgroupuser', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_groupmembers", 'group_id', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_groupmembers", 'user_id', 'varchar(32)', '', '', '', '','');

dbUpgradeTable($prefix."_config", 'idconfig', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_config", 'abs_path', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_config", 'url_path', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_config", 'css_path', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_config", 'js_path', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_config", 'filename', 'varchar(127)', 'YES', '', '', '','');

dbUpgradeTable($prefix."_config_client", 'idconfc', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_config_client", 'idclient', 'int(10)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_config_client", 'abs_path', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_config_client", 'url_path', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_config_client", 'css_path', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_config_client", 'js_path', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_config_client", 'filename', 'varchar(127)', 'YES', '', '', '','');

dbUpgradeTable($prefix."_data", 'iddata', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_data", 'idclient', 'int(10)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_data", 'abs_path', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_data", 'url_path', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_data", 'dir_hide', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_data", 'dir_not', 'varchar(255)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_data", 'ext_not', 'varchar(255)', 'YES', '', '', '','');

dbUpgradeTable($prefix."_lang_bereich", 'idbereich', 'int(4)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_lang_bereich", 'brvalue', 'char(40)', '', '', '', '','');
dbUpgradeTable($prefix."_lang_bereich", 'expanded', 'int(1)', '', '', '1', '','');
dbUpgradeTable($prefix."_lang_bereich", 'client', 'int(4)', '', '', '0', '','');

dbUpgradeTable($prefix."_lang_key", 'idkey', 'int(4)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_lang_key", 'valuekey', 'text', '', '', '', '','');
dbUpgradeTable($prefix."_lang_key", 'idbereich', 'int(4)', '', '', '0', '','');

dbUpgradeTable($prefix."_lang_value", 'idlangvalue', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_lang_value", 'idlangfile', 'int(4)', '', '', '0', '','');
dbUpgradeTable($prefix."_lang_value", 'value', 'text', '', '', '', '','');
dbUpgradeTable($prefix."_lang_value", 'idkey', 'int(4) unsigned', '', '', '0', '','');
dbUpgradeTable($prefix."_lang_value", 'idlang', 'int(4)', '', '', '0', '','');
dbUpgradeTable($prefix."_lang_value", 'idbereich', 'int(4)', '', '', '0', '','');

dbUpgradeTable($prefix."_sequence", 'seq_name', 'varchar(127)', '', 'PRI', '', '','');
dbUpgradeTable($prefix."_sequence", 'nextid', 'int(10)', '', '', '0', '','');

dbUpgradeTable($prefix."_user_prop", 'iduserprop', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_user_prop", 'user_id', 'varchar(32)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_user_prop", 'type', 'varchar(32)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_user_prop", 'name', 'varchar(32)', 'YES', '', '', '','');
dbUpgradeTable($prefix."_user_prop", 'value', 'text', 'YES', '', '', '','');
dbUpgradeTable($prefix."_user_prop", 'idcatlang', 'int(11)', '', '', '0', '','');

dbUpgradeTable($prefix."_inuse", 'idinuse', 'int(10)', '', 'PRI', '0', '','');
dbUpgradeTable($prefix."_inuse", 'type', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_inuse", 'objectid', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_inuse", 'session', 'varchar(32)', '', '', '', '','');
dbUpgradeTable($prefix."_inuse", 'userid', 'varchar(32)', '', '', '', '','');



$db->query("DELETE FROM ".$prefix."_area");
$db->query("DELETE FROM ".$prefix."_actions");
$db->query("DELETE FROM ".$prefix."_files");
$db->query("DELETE FROM ".$prefix."_frame_files");
$db->query("DELETE FROM ".$prefix."_nav_sub");
$db->query("DELETE FROM ".$prefix."_nav_main");
$db->query("DELETE FROM ".$prefix."_type");

$sql_data = implode("",(file('base.sql')));
$sql_data = str_replace("!PREFIX!",$prefix,$sql_data);
$sql_data = str_replace("<!--{contenido_root}-->",$root_path,$sql_data);
$sql_data = str_replace("<!--{contenido_web}-->", $root_http_path,$sql_data);

$sql_data = remove_remarks($sql_data);
$sql_pieces = split_sql_file($sql_data, ';');

$sql_count = count($sql_pieces);

for($i = 0; $i < $sql_count; $i++)
		{

			$sql = trim($sql_pieces[$i]);

			if(!empty($sql))
			{

				$db->query($sql);

				//DEBUGGING
				if($this -> debug){
					if(mysql_error() != ''){
						echo  $i+1 . ":  <font color='darkred'><b>FEHLER</b></font>  -->  " . mysql_error() . "<br>" . $sql . '<br><br>';
					}
					else{
						echo  $i+1 . ":   <font color= 'darkgreen'><b>AUSGEFÜHRT</b></font><br>". $sql . '<br><br>';
					}
				}

			}
		}
		
$db->query("UPDATE con_lang SET encoding='ISO-8859-1'");

$db->query("UPDATE con_phplib_auth_user_md5 SET perms='admin[1]' WHERE perms='admin'");

$db2 = new DB_Upgrade;

/* Convert old stuff to new one */
$db->query("SELECT * FROM con_tpl");

$db3 = new DB_Upgrade;

while ($db->next_record())
{
	$idtpl = $db->f("idtpl");

	$idclient = $db->f("idclient");
	$name = $db->f("name");
	$description = $db->f("description");
	$idlay = $db->f("idlay");
		
	$db3->query("INSERT INTO con_template (idclient, idlay, idtpl, name, description) ".
				"VALUES ('$idclient', '$idlay', '$idtpl', '$name', '$description')");

	
	for ($container = 1; $container < 21; $container++)
	{
		$idcontainer = $db3->nextid("con_container");
		$idmod = $db->f("c".$container);
		$db3->query("INSERT INTO con_container (idcontainer, idtpl, number, idmod) ".
					"VALUES ('$idcontainer', '$idtpl', '$container', '$idmod')");
	}
	
	$db2->query("SELECT * FROM con_tpl_conf WHERE idtpl = '$idtpl'");
	
	while ($db2->next_record())
	{
		/* Create new idtplcfg entry */
		$idtplcfg = $db3->nextid("con_template_conf");
		$db3->query("INSERT INTO con_template_conf (idtplcfg, idtpl) ".
					"VALUES ('$idtplcfg', '$idtpl')");
		echo "doing ".$db2->f("idtplconf")."<br>";			
		if ($db2->f("idside") != "0")
		{
			$idside = $db2->f("idside");
			$idlang = $db2->f("idlang");
			
			echo "updating idart $idside and idlang $idlang with $idtplcfg<br>";
			
			$db3->query("UPDATE con_art_lang SET idtplcfg = '$idtplcfg' WHERE idart = '$idside' AND idlang = '$idlang'");
		} else {
			$idcat = $db2->f("idcat");
			$idlang = $db2->f("idlang");
			echo "updating idcat $idcat and idlang $idlang with $idtplcfg<br>";
			$db3->query("UPDATE con_cat_lang SET idtplcfg = '$idtplcfg' WHERE idcat = '$idcat' AND idlang = '$idlang'");			
		}
		
		
    	for ($container = 1; $container < 21; $container++)
    	{
    		$conf = $db2->f("c".$container);
    		$idcontainerc = $db3->nextid("con_container_conf");
    		
    		$db3->query("INSERT INTO con_container_conf (idcontainerc, idtplcfg, number, container) ".
    					"VALUES ('$idcontainerc', '$idtplcfg', '$container', '$conf')");
    	}		
		

		
	}
	
}

/* Client update */
$sql = "SELECT * FROM con_clients";
$db2->query($sql);

while ($db2->next_record())
{
	$name = $db2->f("name");
	$idclient = $db2->f("idclient");
	$rwpath = $root_http_path .$name."/";
	$sql = "UPDATE con_clients SET frontendpath='$root_path/$name/', htmlpath='$rwpath' WHERE idclient='$idclient'";
	$db->query($sql);	
}

/* Module update */

$sql = "SELECT * FROM con_mod";
$db2->query($sql);

while ($db2->next_record())
{
	$output = addslashes($db2->f("output")) . "\\n";
	
	$output = str_replace('$cfgTab_side_lang','".$cfg["tab"]["art_lang"]."',$output);
	$output = str_replace('$cfgTab_cat_side', '".$cfg["tab"]["cat_art"]."',$output);
	$output = str_replace('$cfgTab_cat_tree', '".$cfg["tab"]["cat_tree"]."',$output);
	$output = str_replace('$cfgTab_cat', '".$cfg["tab"]["cat"]."',$output);
	$output = str_replace('$cfgTab_side','".$cfg["tab"]["art"]."',$output);
	
	$output = str_Replace("idside","idart",$output);
	
	
	
	$idmod = $db2->f("idmod");
	$name = $db2->f("name");
	$description = $db2->f("description");
	$input = addslashes($db2->f("input"));
	$template = $db2->f("template");
	
	modEditModule($idmod, $name, $description, $input, $output, $template);

}

$sql = "UPDATE con_cat_art SET createcode='1'";
$db->query($sql);




function remove_remarks($sql)
	{
		$lines = explode("\n", $sql);

		// try to keep mem. use down
		$sql = "";

		$linecount = count($lines);
		$output = "";

		for ($i = 0; $i < $linecount; $i++)
		{
			if (($i != ($linecount - 1)) || (strlen($lines[$i]) > 0))
			{
					if ($lines[$i][0] != "#")
					{
						$output .= $lines[$i] . "\n";
					}
					else
					{
						$output .= "\n";
					}
				// Trading a bit of speed for lower mem. use here.
				$lines[$i] = "";
			}
		}
		return $output;
	}

	/**
	* Splits sql- statements into handy pieces.
	* This function was original developed for the phpbb 2.01
	* (C) 2001 The phpBB Group http://www.phpbb.com
	*
	* @return array sql_pieces
	*/
	function split_sql_file($sql, $delimiter)
	{
		// Split up our string into "possible" SQL statements.
		$tokens = explode($delimiter, $sql);

		// try to save mem.
		$sql = "";
		$output = array();

		// we don't actually care about the matches preg gives us.
		$matches = array();

		// this is faster than calling count($oktens) every time thru the loop.
		$token_count = count($tokens);
		for ($i = 0; $i < $token_count; $i++)
		{
			// Dont wanna add an empty string as the last thing in the array.
			if (($i != ($token_count - 1)) || (strlen($tokens[$i] > 0)))
			{
				// This is the total number of single quotes in the token.
				$total_quotes = preg_match_all("/'/", $tokens[$i], $matches);
				// Counts single quotes that are preceded by an odd number of backslashes,
				// which means they're escaped quotes.
				$escaped_quotes = preg_match_all("/(?<!\\\\)(\\\\\\\\)*\\\\'/", $tokens[$i], $matches);

				$unescaped_quotes = $total_quotes - $escaped_quotes;

				// If the number of unescaped quotes is even, then the delimiter did NOT occur inside a string literal.
				if (($unescaped_quotes % 2) == 0)
				{
					// It's a complete sql statement.
					$output[] = $tokens[$i];
					// save memory.
					$tokens[$i] = "";
				}
				else
				{
					// incomplete sql statement. keep adding tokens until we have a complete one.
					// $temp will hold what we have so far.
					$temp = $tokens[$i] . $delimiter;
					// save memory..
					$tokens[$i] = "";

					// Do we have a complete statement yet?
					$complete_stmt = false;

					for ($j = $i + 1; (!$complete_stmt && ($j < $token_count)); $j++)
					{
						// This is the total number of single quotes in the token.
						$total_quotes = preg_match_all("/'/", $tokens[$j], $matches);
						// Counts single quotes that are preceded by an odd number of backslashes,
						// which means theyre escaped quotes.
						$escaped_quotes = preg_match_all("/(?<!\\\\)(\\\\\\\\)*\\\\'/", $tokens[$j], $matches);

						$unescaped_quotes = $total_quotes - $escaped_quotes;

						if (($unescaped_quotes % 2) == 1)
						{
							// odd number of unescaped quotes. In combination with the previous incomplete
							// statement(s), we now have a complete statement. (2 odds always make an even)
							$output[] = $temp . $tokens[$j];

							// save memory.
							$tokens[$j] = "";
							$temp = "";

							// exit the loop.
							$complete_stmt = true;
							// make sure the outer loop continues at the right point.
							$i = $j;
						}
						else
						{
							// even number of unescaped quotes. We still dont have a complete statement.
							// (1 odd and 1 even always make an odd)
							$temp .= $tokens[$j] . $delimiter;
							// save memory.
							$tokens[$j] = "";
						}

					} // for..
				} // else
			}
		}
		return $output;
	}
	

//$result = $notification->returnNotification("info", "Datenbankstruktur ist jetzt up-to-date.");

?>

timo
Beiträge: 6284
Registriert: Do 15. Mai 2003, 18:32
Wohnort: Da findet ihr mich nie!
Kontaktdaten:

Beitrag von timo » Do 4. Dez 2003, 20:04

Code: Alles auswählen

# phpMyAdmin MySQL-Dump
# version 2.3.2
# http://www.phpmyadmin.net/ (download page)
#
# Host: localhost
# Erstellungszeit: 20. Juni 2003 um 15:58
# Server Version: 3.23.49
# PHP-Version: 4.1.2
# Datenbank: `Contenido base`


ALTER TABLE !PREFIX!_actions add KEY idarea (idarea);
ALTER TABLE !PREFIX!_actions add FULLTEXT KEY name (name);
ALTER TABLE !PREFIX!_actions add KEY name_2 (name);

ALTER TABLE !PREFIX!_area add KEY idarea (idarea,name,online);
ALTER TABLE !PREFIX!_area add FULLTEXT KEY name (name);
ALTER TABLE !PREFIX!_area add KEY idarea_2 (idarea);
ALTER TABLE !PREFIX!_area add KEY name_2 (name);

ALTER TABLE !PREFIX!_art add KEY idart (idart);
ALTER TABLE !PREFIX!_art add KEY idclient (idclient);

ALTER TABLE !PREFIX!_art_lang ADD INDEX idart (idart);
ALTER TABLE !PREFIX!_art_lang ADD INDEX idlang (idlang);
ALTER TABLE !PREFIX!_art_lang ADD INDEX idtplcfg (idtplcfg, idart);
ALTER TABLE !PREFIX!_art_lang ADD INDEX idart_2 (idart, idlang);


ALTER TABLE !PREFIX!_cat ADD INDEX idclient (idclient);
ALTER TABLE !PREFIX!_cat ADD INDEX idcat (idcat);
ALTER TABLE !PREFIX!_cat ADD INDEX idclient_2 (idclient, parentid);
ALTER TABLE !PREFIX!_cat ADD INDEX parentid (parentid, preid);

ALTER TABLE !PREFIX!_cat_art ADD INDEX is_start_2 (is_start, idcat);
ALTER TABLE !PREFIX!_cat_art ADD INDEX idart (idart);
ALTER TABLE !PREFIX!_cat_art ADD INDEX idcat (idcat);
ALTER TABLE !PREFIX!_cat_art ADD INDEX idcatart (idcatart);

ALTER TABLE !PREFIX!_cat_lang ADD INDEX idcat (idcat);
ALTER TABLE !PREFIX!_cat_lang ADD INDEX idcatlang (idcatlang);
ALTER TABLE !PREFIX!_cat_lang ADD INDEX idlang (idlang);
ALTER TABLE !PREFIX!_cat_lang ADD INDEX idtplcfg (idtplcfg);
ALTER TABLE !PREFIX!_cat_lang ADD INDEX idlang_2 (idlang, visible);
ALTER TABLE !PREFIX!_cat_lang ADD INDEX idlang_3 (idlang, idcat);

ALTER TABLE !PREFIX!_cat_tree ADD INDEX idcat (idcat);

ALTER TABLE !PREFIX!_code ADD INDEX idcatart (idcatart);
ALTER TABLE !PREFIX!_code ADD INDEX idlang (idlang);
ALTER TABLE !PREFIX!_code ADD INDEX idclient (idclient);

ALTER TABLE !PREFIX!_container ADD INDEX idtpl (idtpl);
ALTER TABLE !PREFIX!_container ADD INDEX number (number);

ALTER TABLE !PREFIX!_container_conf ADD INDEX idtpl (idtpl);
ALTER TABLE !PREFIX!_container_conf ADD INDEX idtplcfg (idtplcfg);

ALTER TABLE !PREFIX!_content ADD INDEX idartlang (idartlang);
ALTER TABLE !PREFIX!_content ADD INDEX idtype (idtype);
ALTER TABLE !PREFIX!_content ADD INDEX typeid (typeid);

ALTER TABLE !PREFIX!_frame_files add KEY idarea (idarea,idframe,idfile);

ALTER TABLE !PREFIX!_keywords add KEY keyword (keyword);
ALTER TABLE !PREFIX!_keywords add KEY idlang (idlang);
ALTER TABLE !PREFIX!_keywords add KEY idlang2 (idlang, keyword);

ALTER TABLE !PREFIX!_mod add KEY idclient (idclient);
ALTER TABLE !PREFIX!_mod add KEY idclient_2 (idmod, idclient);

ALTER TABLE !PREFIX!_template add KEY idclient (idclient);
ALTER TABLE !PREFIX!_template add KEY idlay (idlay);
ALTER TABLE !PREFIX!_template add KEY idtpl (idtpl);
ALTER TABLE !PREFIX!_template add KEY idtplcfg (idtplcfg);

ALTER TABLE !PREFIX!_template_conf add KEY idtpl (idtpl);
ALTER TABLE !PREFIX!_template_conf add KEY idtplcfg (idtplcfg);

ALTER TABLE !PREFIX!_upl add KEY idclient (idclient);


#
# Daten für Tabelle `!PREFIX!_type`
#

INSERT INTO !PREFIX!_type VALUES (1, 'CMS_HTMLHEAD', '/**\r\n * CMS_HTMLHEAD\r\n */\r\n$tmp = $a_content[\'CMS_HTMLHEAD\'][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = AddSlashes(AddSlashes($tmp));\r\n$tmp = str_replace("\\\\\\\'","\'",$tmp);\r\nif ($edit) {\r\n\r\n$before="<div id=\\"HTMLHEAD_".$db->f("idtype")."_".$val."\\" onFocus=\\"this.style.border=\'1px solid #bb5577\'\\"".\r\n       " onBlur=\\"this.style.border=\'1px dashed #bfbfbf\'\\" style=\\"border:1px dashed #bfbfbf\\" contentEditable=\\"true\\">";\r\n$editbutton = "</div><a href=\\"javascript:setcontent(\'$idartlang\',\'".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTMLHEAD&typenr=$val")."\')\\">\r\n<img src=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithead.gif\\" border=\\"0\\"></a>\r\n<a href=\\"javascript:setcontent(\'$idartlang\',\'0\')\\"><img src=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_speichern.gif\\" border=\\"0\\"></a>";\r\n$editbutton = AddSlashes(AddSlashes($editbutton));\r\n$editbutton = str_replace("\\\\\\\'","\'",$editbutton);\r\n$before= AddSlashes(AddSlashes($before));\r\n$before = str_replace("\\\\\\\'","\'",$before);\r\nif ($tmp == "") {\r\n$tmp = "&nbsp;";\r\n}\r\n$tmp = $before.$tmp.$editbutton;}', 'Headline / HTML', 0, '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
INSERT INTO !PREFIX!_type VALUES (2, 'CMS_HTML', '/**\r\n * CMS_HTML\r\n */\r\n$tmp = $a_content[\'CMS_HTML\'][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = AddSlashes(AddSlashes($tmp));\r\n$tmp = str_replace("\\\\\\\'","\'",$tmp);\r\nif ($edit) {\r\n\r\n$before="<div id=\\"HTML_".$db->f("idtype")."_".$val."\\" onFocus=\\"this.style.border=\'1px solid #bb5577\'\\"".\r\n       " onBlur=\\"this.style.border=\'1px dashed #bfbfbf\'\\" style=\\"border:1px dashed #bfbfbf\\" contentEditable=\\"true\\" >";\r\n$editbutton = "</div><a href=\\"javascript:setcontent(\'$idartlang\',\'".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTML&typenr=$val&lang=$lang")."\')\\">\r\n<img src=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithtml.gif\\" border=\\"0\\"></a>\r\n<a href=\\"javascript:setcontent(\'$idartlang\',\'0\')\\"><img src=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_speichern.gif\\" border=\\"0\\">   </a>";\r\n$editbutton = AddSlashes(AddSlashes($editbutton));\r\n$editbutton = str_replace("\\\\\\\'","\'",$editbutton);\r\n$before= AddSlashes(AddSlashes($before));\r\n$before = str_replace("\\\\\\\'","\'",$before);\r\nif ($tmp == "") {\r\n$tmp = "&nbsp;";\r\n}\r\n$tmp = $before.$tmp.$editbutton;}', 'Text / HTML', 0, '', '2002-05-13 19:04:13', '2002-05-13 19:04:13');
INSERT INTO !PREFIX!_type VALUES (3, 'CMS_TEXT', '/**\r\n * CMS_TEXT\r\n */\r\n$tmp = $a_content["CMS_TEXT"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = nl2br($tmp);\r\n$tmp = str_replace("\'", "\\\'", $tmp);\r\n$tmp = str_replace("<br />","<br>", $tmp);\r\nif ($edit) {$editbutton = "<A HREF=\\"".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_TEXT&typenr=$val&lang=$lang")."\\"><IMG SRC=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edittext.gif\\" border=0></A>";\r\n$editbutton = AddSlashes(AddSlashes($editbutton));\r\n$tmp = $tmp.$editbutton;}', 'Text / Standard', 0, '', '2002-05-13 19:04:13', '2002-05-13 19:04:13');
INSERT INTO !PREFIX!_type VALUES (4, 'CMS_IMG', '/**\r\n * CMS_IMG\r\n */\r\n \r\n$tmp = $a_content["CMS_IMG"][$val];\r\n$tmp = urldecode($tmp);\r\nif($tmp==""||$tmp=="0"){\r\n$tmp="";\r\n\r\n}else{\r\n\r\n$sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=\'".$client."\' AND idupl=\'".$tmp."\'";\r\n\r\n$db2 = new DB_Contenido;\r\n$db2->query($sql);\r\n\r\nif ( $db2->next_record() ) {\r\n\r\n        $tmp = $cfgClient[$client]["path"]["htmlpath"].$cfgClient[$client]["upload"].$db2->f("dirname").$db2->f("filename");\r\n    }\r\n\r\n    $tmp = htmlspecialchars($tmp);\r\n$tmp = urldecode($tmp);\r\n    $tmp = str_replace("\'", "\\\'", $tmp);\r\n}', 'Image', 0, '', '2002-05-13 19:04:21', '2002-05-13 19:04:21');
INSERT INTO !PREFIX!_type VALUES (5, 'CMS_IMGDESCR', '/**\r\n * CMS_IMGDESCR\r\n */\r\n$tmp = $a_content["CMS_IMGDESCR"][$val];\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = urldecode($tmp);\r\n$tmp = str_replace("\'", "\\\'", $tmp);\r\nif ($edit) {$editbutton = "<A HREF=\\"".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_IMG&typenr=$val&lang=$lang")."\\"><IMG SRC=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif\\" border=0></A>";\r\n$editbutton = addslashes($editbutton);\r\n$editbutton = addslashes($editbutton);\r\n$tmp = $tmp.$editbutton;}', 'Description', 0, '', '2002-05-13 19:04:28', '2002-05-13 19:04:28');
INSERT INTO !PREFIX!_type VALUES (6, 'CMS_LINK', '/**\r\n * CMS_LINK\r\n */\r\nglobal $cfgClient;\r\nglobal $client;\r\n\r\n$tmp = urldecode($a_content["CMS_LINK"][$val]);\r\n\r\n/* internal link */\r\nif ( is_numeric($tmp) ) {\r\n\r\n   if ($contenido)\r\n   {\r\n      $tmp = $sess->url("front_content.php?idcatart=$tmp");\r\n   } else {\r\n     $tmp = "front_content.php?idcatart=$tmp";\r\n   }\r\n\r\n} else {\r\nif ((substr($tmp,0,6) != "mailto") && (substr($tmp,0,4) != "http"))\r\n{\r\n$tmp = $cfgClient[$client]["path"]["htmlpath"].$tmp;\r\n}\r\n\r\n}', 'Link', 0, '', '2002-05-13 19:04:36', '2002-05-13 19:04:36');

# Removed old CMS_LINK
#INSERT INTO !PREFIX!_type VALUES (6, 'CMS_LINK', 'CMS_LINK', '/**\r\n * CMS_LINK\r\n */\r\n$tmp = urldecode($a_content["CMS_LINK"][$val]);\r\n\r\n/* internal link */\r\nif ( is_numeric($tmp) ) {\r\n\r\n   if ($contenido)\r\n   {\r\n      $tmp = $sess->url("front_content.php?idcatart=$tmp");\r\n   } else {\r\n     $tmp = "front_content.php?idcatart=$tmp";\r\n   }\r\n\r\n} elseif ( substr($tmp,0,6) == "mailto" ) {\r\n} elseif ( substr($tmp,0,6) != "mailto" ) {\r\n    if (substr($tmp,0,7)=="http://") {\r\n\r\n    } elseif ( substr($tmp,0,7) != "http://" ) {\r\n        $tmp = "http://$tmp";\r\n    }\r\n}', 'Link', 0, '', '2002-05-13 19:04:36', '2002-05-13 19:04:36');
INSERT INTO !PREFIX!_type VALUES (7, 'CMS_LINKTARGET', '/**\r\n * CMS_LINKTARGET\r\n */\r\n$tmp = $a_content["CMS_LINKTARGET"][$val];\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("\'", "\\\'", $tmp);\r\n$tmp = urldecode($tmp);', 'Frame', 0, '', '2002-05-13 19:04:43', '2002-05-13 19:04:43');
INSERT INTO !PREFIX!_type VALUES (8, 'CMS_LINKDESCR', '/**\r\n * CMS_LINKDESCR\r\n */\r\n$tmp = $a_content["CMS_LINKDESCR"][$val];\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = urldecode($tmp);\r\n$tmp = str_replace("\'", "\\\'", $tmp);\r\nif ($edit) {\r\n    $editbutton = \'<a href="\'.$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_LINK&typenr=$val").\'"><img src="\'.$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"].\'but_editlink.gif" border=0></a>\';\r\n    $editbutton = addslashes($editbutton);\r\n$editbutton = addslashes($editbutton);\r\n    $tmp = $tmp.$editbutton;\r\n}', 'Description', 0, '', '2002-05-13 19:05:00', '2002-05-13 19:05:00');
INSERT INTO !PREFIX!_type VALUES (9, 'CMS_HEAD', '/**\r\n * CMS_HEAD\r\n */\r\n$tmp = $a_content["CMS_HEAD"][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("\'", "\\\'", $tmp);\r\n\r\nif ($edit) {$editbutton = "<A HREF=\\"".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HEAD&typenr=$val&lang=$lang")."\\"><IMG SRC=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithead.gif\\" border=0></A>";\r\n$editbutton = AddSlashes(AddSlashes($editbutton));\r\n$tmp = $tmp.$editbutton;}', 'Headline / Standard', 0, '', '2002-05-13 19:02:34', '2002-05-13 19:02:34');
INSERT INTO !PREFIX!_type VALUES (10, 'CMS_SWF', '/**\r\n * CMS_SWF\r\n */\r\n\r\nif ( !is_object($db2) ) $db2 = new DB_Contenido;\r\n\r\nif ( $edit ) {\r\n\r\n    $tmp_id = $a_content[\'CMS_SWF\'][$val];\r\n\r\n    $sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=\'".$client."\' AND idupl=\'".$tmp_id."\' AND filetype = \'swf\'";\r\n\r\n    $db2->query($sql);\r\n\r\n    if ( $db2->next_record() ) {\r\n\r\n        $tmp_swf = $cfgClient[$client]["upload"] . $db2->f("dirname") . $db2->f("filename");\r\n        \r\n        $aImgSize = @getimagesize($tmp_swf);\r\n\r\n        $width  = $aImgSize[0];\r\n        $height = $aImgSize[1];\r\n\r\n        $tmp = \'<table cellspacing="0" cellpadding="0" border="0">\r\n\r\n                    <tr>\r\n                        <td>\r\n                            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\r\n                               codebase="http://download.macromedia.com\r\n                               /pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"\r\n                               width="\'.$width.\'" height="\'.$height.\'" id="movie" align="">\r\n                               <param name="movie" value="\'.$tmp_swf.\'">\r\n                               <embed src="\'.$tmp_swf.\'" quality="high" width="\'.$width.\'"\r\n                                  height="\'.$height.\'" name="movie" align="" type="application/x-shockwave-flash"\r\n                                  plug inspage="http://www.macromedia.com/go/getflashplayer">\r\n                            </object>\r\n                        </td>\r\n                    </tr>\r\n\r\n                    <tr>\r\n                        <td><a href="\'.$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SWF&typenr=$val").\'"><img src="\'.$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"].\'but_editswf.gif" border="0"></a></td>\r\n                    </tr>\r\n\r\n                </table>\';\r\n\r\n    } else {\r\n\r\n        $tmp = \'<a href="\'.$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SWF&typenr=$val").\'"><img src="\'.$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"].\'but_editswf.gif" border="0"></a>\';\r\n\r\n    }\r\n    \r\n} else {\r\n\r\n    $tmp_id = $a_content[\'CMS_SWF\'][$val];\r\n\r\n    $sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=\'".$client."\' AND idupl=\'".$tmp_id."\' AND filetype = \'swf\'";\r\n\r\n    $db2->query($sql);\r\n\r\n    if ( $db2->next_record() ) {\r\n\r\n        $tmp_swf = $cfgClient[$client]["upload"] . $db2->f("dirname") . $db2->f("filename");\r\n\r\n        $aImgSize = @getimagesize($tmp_swf);\r\n\r\n        $width  = $aImgSize[0];\r\n        $height = $aImgSize[1];\r\n\r\n        $tmp = \'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\r\n                   codebase="http://download.macromedia.com\r\n                   /pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"\r\n                   width="\'.$width.\'" height="\'.$height.\'" id="movie" align="">\r\n                   <param name="movie" value="\'.$tmp_swf.\'">\r\n                   <embed src="\'.$tmp_swf.\'" quality="high" width="\'.$width.\'"\r\n                      height="\'.$height.\'" name="movie" align="" type="application/x-shockwave-flash"\r\n                      plug inspage="http://www.macromedia.com/go/getflashplayer">\r\n                </object>\';\r\n\r\n    } else {\r\n\r\n        $tmp = "";\r\n\r\n    }\r\n\r\n}', 'Flash Movie', 0, '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');

#INSERT INTO !PREFIX!_type VALUES (1, 'CMS_HTMLHEAD', '/**\r\n * CMS_HTMLHEAD\r\n */\r\n$tmp = $a_content[\'CMS_HTMLHEAD\'][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = AddSlashes(AddSlashes($tmp));\r\n$tmp = str_replace("\\\\\\\'","\'",$tmp);\r\nif ($edit) {\r\n\r\n$before="<div id=\\"HTMLHEAD_".$db->f("idtype")."_".$val."\\" onFocus=\\"this.style.border=\'1px solid #bb5577\'\\"".\r\n       " onBlur=\\"this.style.border=\'1px dashed #bfbfbf\'\\" style=\\"border:1px dashed #bfbfbf\\" contentEditable=\\"true\\">";\r\n$editbutton = "</div><a href=\\"javascript:setcontent(\'$idartlang\',\'".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTMLHEAD&typenr=$val")."\')\\">\r\n<img src=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithead.gif\\" border=\\"0\\"></a>\r\n<a href=\\"javascript:setcontent(\'$idartlang\',\'0\')\\"><img src=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_speichern.gif\\" border=\\"0\\"></a>";\r\n$editbutton = AddSlashes(AddSlashes($editbutton));\r\n$editbutton = str_replace("\\\\\\\'","\'",$editbutton);\r\n$before= AddSlashes(AddSlashes($before));\r\n$before = str_replace("\\\\\\\'","\'",$before);\r\nif ($tmp == "") {\r\n$tmp = "&nbsp;";\r\n}\r\n$tmp = $before.$tmp.$editbutton;}', 'Headline / HTML', 0, '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
#INSERT INTO !PREFIX!_type VALUES (2, 'CMS_HTML', '/**\r\n * CMS_HTML\r\n */\r\n$tmp = $a_content[\'CMS_HTML\'][$val];\r\n$tmp = urldecode($tmp);\r\n$tmp = AddSlashes(AddSlashes($tmp));\r\n$tmp = str_replace("\\\\\\\'","\'",$tmp);\r\nif ($edit) {\r\n\r\n$before="<div id=\\"HTML_".$db->f("idtype")."_".$val."\\" onFocus=\\"this.style.border=\'1px solid #bb5577\'\\"".\r\n       " onBlur=\\"this.style.border=\'1px dashed #bfbfbf\'\\" style=\\"border:1px dashed #bfbfbf\\" contentEditable=\\"true\\" >";\r\n$editbutton = "</div><a href=\\"javascript:setcontent(\'$idartlang\',\'".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTML&typenr=$val&lang=$lang")."\')\\">\r\n<img src=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithtml.gif\\" border=\\"0\\"></a>\r\n<a href=\\"javascript:setcontent(\'$idartlang\',\'0\')\\"><img src=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_speichern.gif\\" border=\\"0\\">   </a>";\r\n$editbutton = AddSlashes(AddSlashes($editbutton));\r\n$editbutton = str_replace("\\\\\\\'","\'",$editbutton);\r\n$before= AddSlashes(AddSlashes($before));\r\n$before = str_replace("\\\\\\\'","\'",$before);\r\nif ($tmp == "") {\r\n$tmp = "&nbsp;";\r\n}\r\n$tmp = $before.$tmp.$editbutton;}', 'Text / HTML', 0, '', '2002-05-13 19:04:13', '2002-05-13 19:04:13');
#INSERT INTO !PREFIX!_type VALUES (3, 'CMS_TEXT', '/**\r\n * CMS_TEXT\r\n */\r\n$tmp = $a_content["CMS_TEXT"][$val];\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = nl2br($tmp);\r\n$tmp = str_replace("\'", "\\\'", $tmp);\r\n$tmp = str_replace("<br />","<br>", $tmp);\r\nif ($edit) {$editbutton = "<A HREF=\\"".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_TEXT&typenr=$val&lang=$lang")."\\"><IMG SRC=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edittext.gif\\" border=0></A>";\r\n$editbutton = AddSlashes(AddSlashes($editbutton));\r\n$tmp = $tmp.$editbutton;}', 'Text / Standard', 0, '', '2002-05-13 19:04:13', '2002-05-13 19:04:13');
#INSERT INTO !PREFIX!_type VALUES (4, 'CMS_IMG', '/**\r\n * CMS_IMG\r\n */\r\n \r\n$tmp = $a_content["CMS_IMG"][$val];\r\nif($tmp==""||$tmp=="0"){\r\n$tmp="";\r\n\r\n}else{\r\n\r\n$sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=\'".$client."\' AND idupl=\'".$tmp."\'";\r\n\r\n$db2 = new DB_Contenido;\r\n$db2->query($sql);\r\n\r\nif ( $db2->next_record() ) {\r\n\r\n        $tmp = $cfgClient[$client]["path"]["htmlpath"].$cfgClient[$client]["upload"].$db2->f("dirname").$db2->f("filename");\r\n    }\r\n\r\n    $tmp = htmlspecialchars($tmp);\r\n    $tmp = str_replace("\'", "\\\'", $tmp);\r\n}', 'Image', 0, '', '2002-05-13 19:04:21', '2002-05-13 19:04:21');
#INSERT INTO !PREFIX!_type VALUES (5, 'CMS_IMGDESCR', '/**\r\n * CMS_IMGDESCR\r\n */\r\n$tmp = $a_content["CMS_IMGDESCR"][$val];\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("\'", "\\\'", $tmp);\r\nif ($edit) {$editbutton = "<A HREF=\\"".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_IMG&typenr=$val&lang=$lang")."\\"><IMG SRC=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_editimage.gif\\" border=0></A>";\r\n$editbutton = addslashes($editbutton);\r\n$editbutton = addslashes($editbutton);\r\n$tmp = $tmp.$editbutton;}', 'Description', 0, '', '2002-05-13 19:04:28', '2002-05-13 19:04:28');
#INSERT INTO !PREFIX!_type VALUES (6, 'CMS_LINK', '/**\r\n * CMS_LINK\r\n */\r\n$tmp = $a_content["CMS_LINK"][$val];\r\n\r\n/* internal link */\r\nif ( is_numeric($tmp) ) {\r\n    $tmp = $sess->url("front_content.php?idcatart=$tmp");\r\n} elseif ( substr($tmp,0,6) == "mailto" ) {\r\n} elseif ( substr($tmp,0,6) != "mailto" ) {\r\n    if (substr($tmp,0,7)=="http://") {\r\n\r\n    } elseif ( substr($tmp,0,7) != "http://" ) {\r\n        $tmp = "http://$tmp";\r\n    }\r\n}', 'Link', 0, '', '2002-05-13 19:04:36', '2002-05-13 19:04:36');
#INSERT INTO !PREFIX!_type VALUES (7, 'CMS_LINKTARGET', '/**\r\n * CMS_LINKTARGET\r\n */\r\n$tmp = $a_content["CMS_LINKTARGET"][$val];\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("\'", "\\\'", $tmp);', 'Frame', 0, '', '2002-05-13 19:04:43', '2002-05-13 19:04:43');
#INSERT INTO !PREFIX!_type VALUES (8, 'CMS_LINKDESCR', '/**\r\n * CMS_LINKDESCR\r\n */\r\n$tmp = $a_content["CMS_LINKDESCR"][$val];\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("\'", "\\\'", $tmp);\r\nif ($edit) {\r\n    $editbutton = \'<a href="\'.$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_LINK&typenr=$val").\'"><img src="\'.$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"].\'but_editlink.gif" border=0></a>\';\r\n    $editbutton = addslashes($editbutton);\r\n$editbutton = addslashes($editbutton);\r\n    $tmp = $tmp.$editbutton;\r\n}', 'Description', 0, '', '2002-05-13 19:05:00', '2002-05-13 19:05:00');
#INSERT INTO !PREFIX!_type VALUES (9, 'CMS_HEAD', '/**\r\n * CMS_HEAD\r\n */\r\n$tmp = $a_content["CMS_HEAD"][$val];\r\n$tmp = htmlspecialchars($tmp);\r\n$tmp = str_replace("\'", "\\\'", $tmp);\r\nif ($edit) {$editbutton = "<A HREF=\\"".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HEAD&typenr=$val&lang=$lang")."\\"><IMG SRC=\\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithead.gif\\" border=0></A>";\r\n$editbutton = AddSlashes(AddSlashes($editbutton));\r\n$tmp = $tmp.$editbutton;}', 'Headline / Standard', 0, '', '2002-05-13 19:02:34', '2002-05-13 19:02:34');
#INSERT INTO !PREFIX!_type VALUES (10, 'CMS_SWF', '/**\r\n * CMS_SWF\r\n */\r\n\r\nif ( !is_object($db2) ) $db2 = new DB_Contenido;\r\n\r\nif ( $edit ) {\r\n\r\n    $tmp_id = $a_content[\'CMS_SWF\'][$val];\r\n\r\n    $sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=\'".$client."\' AND idupl=\'".$tmp_id."\' AND filetype = \'swf\'";\r\n\r\n    $db2->query($sql);\r\n\r\n    if ( $db2->next_record() ) {\r\n\r\n        $tmp_swf = $cfgClient[$client]["upload"] . $db2->f("dirname") . $db2->f("filename");\r\n        \r\n        $aImgSize = @getimagesize($tmp_swf);\r\n\r\n        $width  = $aImgSize[0];\r\n        $height = $aImgSize[1];\r\n\r\n        $tmp = \'<table cellspacing="0" cellpadding="0" border="0">\r\n\r\n                    <tr>\r\n                        <td>\r\n                            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\r\n                               codebase="http://download.macromedia.com\r\n                               /pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"\r\n                               width="\'.$width.\'" height="\'.$height.\'" id="movie" align="">\r\n                               <param name="movie" value="\'.$tmp_swf.\'">\r\n                               <embed src="\'.$tmp_swf.\'" quality="high" width="\'.$width.\'"\r\n                                  height="\'.$height.\'" name="movie" align="" type="application/x-shockwave-flash"\r\n                                  plug inspage="http://www.macromedia.com/go/getflashplayer">\r\n                            </object>\r\n                        </td>\r\n                    </tr>\r\n\r\n                    <tr>\r\n                        <td><a href="\'.$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SWF&typenr=$val").\'"><img src="\'.$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"].\'but_editswf.gif" border="0"></a></td>\r\n                    </tr>\r\n\r\n                </table>\';\r\n\r\n    } else {\r\n\r\n        $tmp = \'<a href="\'.$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_SWF&typenr=$val").\'"><img src="\'.$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"].\'but_editswf.gif" border="0"></a>\';\r\n\r\n    }\r\n    \r\n} else {\r\n\r\n    $tmp_id = $a_content[\'CMS_SWF\'][$val];\r\n\r\n    $sql = "SELECT * FROM ".$cfg["tab"]["upl"]." WHERE idclient=\'".$client."\' AND idupl=\'".$tmp_id."\' AND filetype = \'swf\'";\r\n\r\n    $db2->query($sql);\r\n\r\n    if ( $db2->next_record() ) {\r\n\r\n        $tmp_swf = $cfgClient[$client]["upload"] . $db2->f("dirname") . $db2->f("filename");\r\n\r\n        $aImgSize = @getimagesize($tmp_swf);\r\n\r\n        $width  = $aImgSize[0];\r\n        $height = $aImgSize[1];\r\n\r\n        $tmp = \'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\r\n                   codebase="http://download.macromedia.com\r\n                   /pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"\r\n                   width="\'.$width.\'" height="\'.$height.\'" id="movie" align="">\r\n                   <param name="movie" value="\'.$tmp_swf.\'">\r\n                   <embed src="\'.$tmp_swf.\'" quality="high" width="\'.$width.\'"\r\n                      height="\'.$height.\'" name="movie" align="" type="application/x-shockwave-flash"\r\n                      plug inspage="http://www.macromedia.com/go/getflashplayer">\r\n                </object>\';\r\n\r\n    } else {\r\n\r\n        $tmp = "";\r\n\r\n    }\r\n\r\n}', 'Flash Movie', 0, '', '0000-00-00 00:00:00', '0000-00-00 00:00:00');

    

#
# Daten für Tabelle `!PREFIX!_actions`
#

INSERT INTO !PREFIX!_actions VALUES (63, 1, '10', 'con_makestart', 'conMakeStart ($idcatart, !$is_start);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (2, 1, '33', 'con_makeonline', 'conMakeOnline ($idart, $lang);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (3, 1, '41', 'con_deleteart', 'conDeleteArt ($idart);\r\n$tmp_notification = $notification->returnNotification("info", i18n("Article deleted"));', '', 1);
INSERT INTO !PREFIX!_actions VALUES (4, 1, '50', 'con_expand', 'conExpand ($idcat, $lang, $expanded);', '', 0);
INSERT INTO !PREFIX!_actions VALUES (5, 3, '30', 'con_edit', '// Nothing', '', 1);
INSERT INTO !PREFIX!_actions VALUES (9, 6, '11', 'str_newtree', 'strNewTree($treename); strRemakeTreeTable();', '', 1);
INSERT INTO !PREFIX!_actions VALUES (10, 6, '21', 'str_newcat', 'strNewCategory($idcat, $categoryname);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (11, 6, '31', 'str_renamecat', 'strRenameCategory($idcat, $lang, $newcategoryname);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (12, 6, '40', 'str_makevisible', 'strMakeVisible($idcat, $lang, !$visible);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (13, 6, '50', 'str_makepublic', 'strMakePublic($idcat, $lang, !$public);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (14, 6, '61', 'str_deletecat', '$errno = strDeleteCategory($idcat);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (15, 6, '70', 'str_moveupcat', 'strMoveUpCategory($idcat); strRemakeTreeTable();', '', 1);
INSERT INTO !PREFIX!_actions VALUES (16, 6, '81', 'str_movesubtree', 'strMoveSubtree($idcat, $parentid_new); strRemakeTreeTable();', '', 1);
INSERT INTO !PREFIX!_actions VALUES (17, 7, '31', 'upl_mkdir', '$errno = uplmkdir($path,$foldername);  \r\n', '', 1);
INSERT INTO !PREFIX!_actions VALUES (61, 7, '31', 'upl_upload', '$userfile = $HTTP_POST_FILES[\'userfile\'][\'tmp_name\'];$userfile_name = $HTTP_POST_FILES[\'userfile\'][\'name\'];$userfile_size = $HTTP_POST_FILES[\'userfile\'][\'size\'];$errno = uplupload($path,$userfile,$userfile_name,$userfile_size);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (62, 7, '31', 'upl_delete', 'upldelete($path,$del);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (18, 9, '20', 'lay_edit', '$idlay = layEditLayout($idlay, $layname, $description, $code);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (19, 8, '31', 'lay_delete', '$errno = layDeleteLayout($idlay);\r\n', '', 1);
INSERT INTO !PREFIX!_actions VALUES (20, 11, '20', 'mod_edit', '$idmod = modEditModule($idmod, $name, $descr, $input, $output, $template);        ', '', 1);
INSERT INTO !PREFIX!_actions VALUES (21, 10, '31', 'mod_delete', 'modDeleteModule($idmod);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (22, 12, '31', 'tpl_delete', '$tmp_notification =  tplDeleteTemplate($idtpl);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (23, 13, '20', 'tpl_edit', '$idtpl = tplEditTemplate($changelayout, $idtpl, $tplname, $description, $idlay, $c);        ', '', 1);
INSERT INTO !PREFIX!_actions VALUES (347, 31, '', 'style_create', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (348, 31, '', 'style_delete', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (349, 32, '', 'js_delete', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (337, 16, '', 'news_editnewsletter', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (338, 16, '', 'news_createnewsletter', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (339, 16, '', 'news_delete', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (340, 19, '', 'news_send', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (341, 50, '', 'recipients_editrecipient', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (342, 50, '', 'recipients_createrecipient', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (343, 50, '', 'recipients_delete', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (345, 32, '', 'js_create', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (346, 11, '', 'mod_new', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (351, 20, '', 'stat_show', '', '', 0);
INSERT INTO !PREFIX!_actions VALUES (350, 49, '', 'log_show', '', '', 0);
INSERT INTO !PREFIX!_actions VALUES (35, 22, '10', 'lang_newlanguage', 'if (!is_numeric($targetclient)) { $targetclient = $client; } $errno = langNewLanguage("-- ".i18n("New language")." --",$targetclient);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (36, 22, '21', 'lang_renamelanguage', '$errno = langRenameLanguage($idlang, $name);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (37, 22, '31', 'lang_deletelanguage', '$errno = langDeleteLanguage($idlang);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (38, 22, '40', 'lang_activatelanguage', 'langActivateDeactivateLanguage($idlang, 1);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (39, 22, '41', 'lang_deactivatelanguage', 'langActivateDeactivateLanguage($idlang, 0);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (328, 13, '', 'tpl_new', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (48, 26, '20', '20', 'include($cfgPathInc."con_edittpl.inc.php");', '', 0);
INSERT INTO !PREFIX!_actions VALUES (44, 25, '12', 'user_saverightsarea', 'saverightsarea();  ', '', 0);
INSERT INTO !PREFIX!_actions VALUES (327, 9, '', 'lay_new', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (47, 40, '10', 'user_edit', '//fake action => edit frontenduser', '', 1);
INSERT INTO !PREFIX!_actions VALUES (352, 12, '', 'tpl_duplicate', 'tplDuplicateTemplate($idtpl);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (53, 28, '10', '10', 'if ( $installed == 0 ) {\r\n   installplugin();\r\n} else {\r\n   deinstallplugin();\r\n}', '', 1);
INSERT INTO !PREFIX!_actions VALUES (320, 7, '51', '51', 'uplrename($path,$edit,$newfile); ', '', 0);
INSERT INTO !PREFIX!_actions VALUES (317, 29, '10', '10', '//fake action for editing whole langfile', '', 1);
DELETE FROM !PREFIX!_actions WHERE idaction = '318';

INSERT INTO !PREFIX!_actions VALUES (316, 29, '21', '21', 'langnew ($idbereich);', '', 0);
INSERT INTO !PREFIX!_actions VALUES (314, 29, '50', '50', 'langfileExpand ($expbereich,$expanded);', '', 0);
INSERT INTO !PREFIX!_actions VALUES (315, 29, '20', '20', 'bereichnew ();', '', 0);
INSERT INTO !PREFIX!_actions VALUES (313, 29, '44', '44', 'langDelete ($idkey);', '', 0);
INSERT INTO !PREFIX!_actions VALUES (312, 29, '41', '41', 'bereichDelete ($idbereich);', '', 0);
INSERT INTO !PREFIX!_actions VALUES (7, 2, '41', '41', 'bereichDelete ($idbereich);', '', 0);
INSERT INTO !PREFIX!_actions VALUES (58, 1, '', 'con_makepublic', 'conMakePublic($idcat, $lang, $public);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (321, 30, '', 'tplcfg_edit', '// include ($cfg["path"]["includes"] . "include.tplcfg_edit_form.php");', '', 0);
INSERT INTO !PREFIX!_actions VALUES (57, 1, '', 'con_tplcfg_edit', 'include ($cfg["path"]["includes"] . "include.tplcfg_edit_form.php");', '', 1);
INSERT INTO !PREFIX!_actions VALUES (322, 31, '', 'style_edit', 'styleEdit($file, $code);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (323, 32, '', 'js_edit', 'jsEdit($file, $code);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (59, 1, '', 'con_makecatonline', 'conMakeCatOnline($idcat, $lang, $online);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (60, 1, '', 'con_changetemplate', 'if ($perm->have_perm_area_action("con","con_changetemplate") ||\r\n  $perm->have_perm_area_action_item("con","con_changetemplate",$idcat))\r\n{\r\nconChangeTemplateForCat($idcat, $idtpl);\r\n} else {\r\n$notification->displayNotification("error", i18n("Permission denied"));\r\n}', '', 1);
INSERT INTO !PREFIX!_actions VALUES (325, 39, '', 'user_createuser', '', '', 0);
INSERT INTO !PREFIX!_actions VALUES (326, 21, '', 'user_delete', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (0, 0, '', 'fake_permission_action', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (329, 45, '', 'mycontenido_editself', '', '', 0);
INSERT INTO !PREFIX!_actions VALUES (330, 24, '', 'login', '//fake login action', '', 1);
INSERT INTO !PREFIX!_actions VALUES (353, 30, '', 'str_tplcfg', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (334, 48, '', 'client_new', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (335, 48, '', 'client_edit', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (336, 46, '', 'client_delete', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (40, 22, '', 'lang_editlanguage', '\r\n\r\nlangEditLanguage($idlang, $langname, $sencoding, $active);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (354, 54, '', 'group_delete', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (355, 60, '', 'group_create', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (356, 61, '', 'group_edit', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (357, 63, '', 'group_deletemember', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (358, 63, '', 'group_addmember', '', '', 1);
INSERT INTO !PREFIX!_actions VALUES (359, 6, '', 'front_allow', '// fake action', '', 1);
INSERT INTO !PREFIX!_actions VALUES (56, 2, '', 'con_editart', '/* Action für \'con_editart\' */\r\n$path = $cfgClient[$client]["path"]["htmlpath"];\r\n\r\n$url = $sess->url("front_content.php?changeview=$changeview&action=$action&idartlang=$idartlang&type=$type&typenr=$typenr&idart=$idart&idcat=$idcat&idcatart=$idcatart&lang=$lang");\r\nheader("location: $path$url");\r\n', 'rights/content/article/edit', 1);
INSERT INTO !PREFIX!_actions VALUES (55, 3, '', 'con_saveart', 'if (isset($title)) {\r\n\r\n	if (1 == $tmp_firstedit) {	\r\n	\r\n        $idart = conEditFirstTime($idcat, $idcatnew, $idart, $is_start, $idtpl, $idartlang, $idlang, $title, $summary, $created, $lastmodified, $author, $online, $datestart, $dateend, $artsort);\r\n        $tmp_notification = $notification->returnNotification("info", i18n("Changes saved"));\r\n\r\n        if ( !isset($idartlang) ) {\r\n            $sql = "SELECT idartlang FROM ".$cfg["tab"]["art_lang"]." WHERE idart = $idart AND idlang = $lang";\r\n            $db->query($sql);\r\n            $db->next_record();\r\n            $idartlang = $db->f("idartlang");\r\n        }\r\n\r\n        if ( in_array($idcat, $idcatnew) ) {\r\n\r\n            $sql = "SELECT idcatart FROM ".$cfg["tab"]["cat_art"]." WHERE idcat = \'".$idcat."\' AND idart = \'".$idart."\'";\r\n\r\n            $db->query($sql);\r\n            $db->next_record();\r\n\r\n            $tmp_idcatart = $db->f("idcatart");\r\n\r\n            if ( $is_start == 1 ) {\r\n                conMakeStart($tmp_idcatart, $is_start);\r\n            }\r\n\r\n        }\r\n        \r\n        if ( is_array($idcatnew) ) {\r\n            if ( is_array($idcatnew) ) {\r\n\r\n                foreach ( $idcatnew as $idcat ) {\r\n\r\n                    $sql = "SELECT idcatart FROM ".$cfg["tab"]["cat_art"]." WHERE idcat = $idcat AND idart = $idart";\r\n\r\n                    $db->query($sql);\r\n                    $db->next_record();\r\n\r\n                    conSetCodeFlag( $db->f("idcatart") );\r\n\r\n                }\r\n            }\r\n        }\r\n\r\n\r\n\r\n    } else {\r\n\r\n        conEditArt($idcat, $idcatnew, $idart, $is_start, $idtpl, $idartlang, $idlang, $title, $summary, $created, $lastmodified, $author, $online, $datestart, $dateend, $artsort);\r\n        $tmp_notification = $notification->returnNotification("info", i18n("Changes saved"));\r\n\r\n        if ( !isset($idartlang) ) {\r\n            $sql = "SELECT idartlang FROM ".$cfg["tab"]["art_lang"]." WHERE idart = $idart AND idlang = $lang";\r\n            $db->query($sql);\r\n            $db->next_record();\r\n            $idartlang = $db->f("idartlang");\r\n        }\r\n\r\n        if ( is_array($idcatnew) ) {\r\n            if ( in_array($idcat, $idcatnew) ) {\r\n\r\n                $sql = "SELECT idcatart FROM ".$cfg["tab"]["cat_art"]." WHERE idcat = \'".$idcat."\' AND idart = \'".$idart."\'";\r\n\r\n                $db->query($sql);\r\n                $db->next_record();\r\n\r\n                $tmp_idcatart = $db->f("idcatart");\r\n\r\n                if ( $is_start == 1 ) {\r\n                    conMakeStart($tmp_idcatart, $is_start);\r\n                }\r\n\r\n            }\r\n        }\r\n\r\n        if ( is_array($idcatnew) ) {\r\n\r\n            foreach ( $idcatnew as $idcat ) {\r\n\r\n                $sql = "SELECT idcatart FROM ".$cfg["tab"]["cat_art"]." WHERE idcat = $idcat AND idart = $idart";\r\n\r\n                $db->query($sql);\r\n                $db->next_record();\r\n\r\n                conSetCodeFlag( $db->f("idcatart") );\r\n\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\n', '', 0);
INSERT INTO !PREFIX!_actions VALUES (54, 3, '', 'con_newart', '/* Code for action\r\n   \'con_newart\' */\r\n$sql = "SELECT\r\n            a.idtplcfg,\r\n            a.name\r\n        FROM\r\n            ".$cfg["tab"]["cat_lang"]." AS a,\r\n            ".$cfg["tab"]["cat"]." AS b\r\n        WHERE\r\n            a.idlang    = \'".$lang."\' AND\r\n            b.idclient  = \'".$client."\' AND\r\n            a.idcat     = \'".$idcat."\' AND\r\n            b.idcat     = a.idcat";\r\n\r\n$db->query($sql);\r\n$db->next_record();\r\n\r\nif ( $db->f("idtplcfg") != 0 ) {\r\n$newart = true;\r\n \r\n\r\n} else {\r\n\r\n    $noti_html = \'<table cellspacing="0" cellpadding="2" border="0">\r\n\r\n                    <tr class="text_medium">\r\n                        <td colspan="2">\r\n                            <b>Fehler bei der Erstellung des Artikels</b><br><br>\r\n                            Der Kategorie ist kein Template zugewiesen.\r\n                        </td>\r\n                    </tr>\r\n\r\n                    <tr>\r\n                        <td colspan="2">&nbsp;</td>\r\n                    </tr>\r\n\r\n                  </table>\';\r\n\r\n    $code = \'\r\n            <html>\r\n                <head>\r\n                    <title>Error</title>\r\n                    <link rel="stylesheet" type="text/css" href="\'.$cfg["path"]["contenido_fullhtml"].$cfg["path"]["styles"].\'contenido.css"></link>\r\n                </head>\r\n                <body style="margin: 10px">\'.$notification->returnNotification("error", $noti_html).\'</body>\r\n            </html>\';\r\n\r\n    echo $code;\r\n\r\n}', '', 1);
INSERT INTO !PREFIX!_actions VALUES (378, 1, '', 'con_lock', 'conLock ($idart, $lang);', '', 1);
INSERT INTO !PREFIX!_actions VALUES (379, 65, '', 'emptyLog', '$tmp_notification = emptyLogFile();', '', 0);
INSERT INTO !PREFIX!_actions VALUES (380, 66, '', 'sendMail', '$tmpReturnVar = sendBugReport();', '', 0);
INSERT INTO !PREFIX!_actions VALUES (381, 7, '', 'upl_rmdir', '', '', 1);


#
# Daten für Tabelle `!PREFIX!_area`
#

INSERT INTO !PREFIX!_area VALUES (3, 'con', 'con_editart', 1, 1);
INSERT INTO !PREFIX!_area VALUES (2, 'con', 'con_editcontent', 1, 1);
INSERT INTO !PREFIX!_area VALUES (1, '0', 'con', 1, 1);
INSERT INTO !PREFIX!_area VALUES (6, '0', 'str', 1, 1);
INSERT INTO !PREFIX!_area VALUES (7, '0', 'upl', 1, 1);
INSERT INTO !PREFIX!_area VALUES (8, '0', 'lay', 1, 1);
INSERT INTO !PREFIX!_area VALUES (9, 'lay', 'lay_edit', 1, 1);
INSERT INTO !PREFIX!_area VALUES (10, '0', 'mod', 1, 1);
INSERT INTO !PREFIX!_area VALUES (11, 'mod', 'mod_edit', 1, 1);
INSERT INTO !PREFIX!_area VALUES (12, '0', 'tpl', 1, 1);
INSERT INTO !PREFIX!_area VALUES (13, 'tpl', 'tpl_edit', 1, 1);
INSERT INTO !PREFIX!_area VALUES (16, '0', 'news', 1, 1);
INSERT INTO !PREFIX!_area VALUES (17, 'news', 'news_edit', 1, 1);
INSERT INTO !PREFIX!_area VALUES (53, '0', 'symbolhelp', 0, 1);
INSERT INTO !PREFIX!_area VALUES (19, 'news', 'news_send', 1, 1);
INSERT INTO !PREFIX!_area VALUES (20, '0', 'stat', 1, 1);
INSERT INTO !PREFIX!_area VALUES (33, 'tpl', 'tpl_cfg', 1, 1);
INSERT INTO !PREFIX!_area VALUES (21, '0', 'user', 1, 1);
INSERT INTO !PREFIX!_area VALUES (22, '0', 'lang', 1, 1);
INSERT INTO !PREFIX!_area VALUES (24, '0', 'login', 0, 1);
INSERT INTO !PREFIX!_area VALUES (25, 'user', 'user_areas', 1, 1);
INSERT INTO !PREFIX!_area VALUES (26, 'news', 'news_edittpl', 1, 1);
INSERT INTO !PREFIX!_area VALUES (27, 'news', 'news_editcontent', 1, 1);
INSERT INTO !PREFIX!_area VALUES (28, '0', 'plug', 1, 1);
INSERT INTO !PREFIX!_area VALUES (5, 'con', 'con_tplcfg', 1, 1);
INSERT INTO !PREFIX!_area VALUES (29, '0', 'langfile', 1, 0);
INSERT INTO !PREFIX!_area VALUES (4, 'con', 'con_preview', 0, 1);
INSERT INTO !PREFIX!_area VALUES (30, 'str', 'str_tplcfg', 1, 1);
INSERT INTO !PREFIX!_area VALUES (31, '0', 'style', 1, 1);
INSERT INTO !PREFIX!_area VALUES (32, '0', 'js', 1, 1);
INSERT INTO !PREFIX!_area VALUES (40, 'user', 'user_overview', 1, 1);
INSERT INTO !PREFIX!_area VALUES (34, 'user', 'user_layout', 1, 1);
INSERT INTO !PREFIX!_area VALUES (35, 'user', 'user_content', 1, 1);
INSERT INTO !PREFIX!_area VALUES (36, 'user', 'user_module', 1, 1);
INSERT INTO !PREFIX!_area VALUES (37, 'user', 'user_template', 1, 1);
INSERT INTO !PREFIX!_area VALUES (38, 'user', 'user_structure', 1, 1);
INSERT INTO !PREFIX!_area VALUES (39, 'user', 'user_create', 1, 1);
INSERT INTO !PREFIX!_area VALUES (52, '0', 'info', 0, 1);
INSERT INTO !PREFIX!_area VALUES (42, '0', 'mycontenido', 0, 1);
INSERT INTO !PREFIX!_area VALUES (43, 'mycontenido', 'mycontenido_overview', 0, 1);
INSERT INTO !PREFIX!_area VALUES (44, 'mycontenido', 'mycontenido_tasks', 0, 1);
INSERT INTO !PREFIX!_area VALUES (45, 'mycontenido', 'mycontenido_settings', 0, 1);
INSERT INTO !PREFIX!_area VALUES (46, '0', 'client', 1, 1);
INSERT INTO !PREFIX!_area VALUES (47, 'lang', 'lang_edit', 1, 1);
INSERT INTO !PREFIX!_area VALUES (48, 'client', 'client_edit', 1, 1);
INSERT INTO !PREFIX!_area VALUES (49, '0', 'logs', 1, 1);
INSERT INTO !PREFIX!_area VALUES (50, '0', 'recipients', 1, 1);
INSERT INTO !PREFIX!_area VALUES (54, '0', 'groups', 1, 1);
INSERT INTO !PREFIX!_area VALUES (55, 'groups', 'groups_layout', 1, 1);
INSERT INTO !PREFIX!_area VALUES (56, 'groups', 'groups_content', 1, 1);
INSERT INTO !PREFIX!_area VALUES (57, 'groups', 'groups_module', 1, 1);
INSERT INTO !PREFIX!_area VALUES (58, 'groups', 'groups_template', 1, 1);
INSERT INTO !PREFIX!_area VALUES (59, 'groups', 'groups_structure', 1, 1);
INSERT INTO !PREFIX!_area VALUES (60, 'groups', 'groups_create', 1, 1);
INSERT INTO !PREFIX!_area VALUES (61, 'groups', 'groups_overview', 1, 1);
INSERT INTO !PREFIX!_area VALUES (62, 'groups', 'groups_areas', 1, 1);
INSERT INTO !PREFIX!_area VALUES (63, 'groups', 'groups_members', 1, 1);
INSERT INTO !PREFIX!_area VALUES (64, '0', 'debug', 0, 0);
INSERT INTO !PREFIX!_area VALUES (66, 'system', 'syserrorreport', 1, 1);
INSERT INTO !PREFIX!_area VALUES (65, '0', 'system', 1, 1);

#
# Daten für Tabelle `!PREFIX!_files`
#

INSERT INTO !PREFIX!_files VALUES (1, 10, 'include.mod_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (2, 11, 'include.mod_edit_form.php', 'main');
INSERT INTO !PREFIX!_files VALUES (3, 11, 'functions.mod.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (4, 8, 'include.lay_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (5, 9, 'include.lay_edit_form.php', 'main');
INSERT INTO !PREFIX!_files VALUES (6, 10, 'include.mod_new.php', 'main');
INSERT INTO !PREFIX!_files VALUES (7, 9, 'functions.lay.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (8, 10, 'functions.mod.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (9, 1, 'include.con_str_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (10, 1, 'include.con_left_top.php', 'main');
INSERT INTO !PREFIX!_files VALUES (11, 1, 'include.con_art_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (12, 1, 'include.con_subnav.php', 'main');
INSERT INTO !PREFIX!_files VALUES (13, 8, 'include.lay_new.php', 'main');
INSERT INTO !PREFIX!_files VALUES (14, 8, 'functions.lay.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (15, 12, 'include.tpl_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (16, 13, 'include.tpl_edit_form.php', 'main');
INSERT INTO !PREFIX!_files VALUES (17, 13, 'functions.tpl.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (18, 12, 'include.tpl_new.php', 'main');
INSERT INTO !PREFIX!_files VALUES (19, 12, 'functions.tpl.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (20, 7, 'functions.upl.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (21, 7, 'include.upl_files_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (22, 1, 'functions.con.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (23, 6, 'functions.str.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (24, 6, 'include.str_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (25, 7, 'include.upl_dirs_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (26, 7, 'include.upl_left_top.php', 'main');
INSERT INTO !PREFIX!_files VALUES (27, 22, 'functions.lang.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (28, 22, 'include.lang_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (29, 30, 'include.tplcfg_edit.php', 'main');
INSERT INTO !PREFIX!_files VALUES (30, 30, 'include.tplcfg_edit_form.php', 'main');
INSERT INTO !PREFIX!_files VALUES (31, 3, 'functions.con.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (32, 31, 'functions.style.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (33, 31, 'include.style_files_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (34, 31, 'include.style_edit_form.php', 'main');
INSERT INTO !PREFIX!_files VALUES (35, 32, 'functions.js.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (36, 32, 'include.js_files_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (37, 32, 'include.js_edit_form.php', 'main');
INSERT INTO !PREFIX!_files VALUES (38, 20, 'functions.stat.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (39, 20, 'include.stat_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (40, 20, 'include.stat_menu.php', 'main');
INSERT INTO !PREFIX!_files VALUES (41, 31, 'include.style_left_top.php', 'main');
INSERT INTO !PREFIX!_files VALUES (42, 32, 'include.js_left_top.php', 'main');
INSERT INTO !PREFIX!_files VALUES (43, 12, 'include.tpl_subnav.php', 'main');
INSERT INTO !PREFIX!_files VALUES (45, 31, 'include.right_top_blank.php', 'main');
INSERT INTO !PREFIX!_files VALUES (46, 32, 'include.right_top_blank.php', 'main');
INSERT INTO !PREFIX!_files VALUES (47, 8, 'include.right_top_blank.php', 'main');
INSERT INTO !PREFIX!_files VALUES (48, 10, 'include.right_top_blank.php', 'main');
INSERT INTO !PREFIX!_files VALUES (49, 7, 'include.right_top_blank.php', 'main');
INSERT INTO !PREFIX!_files VALUES (50, 20, 'include.right_top_blank.php', 'main');
INSERT INTO !PREFIX!_files VALUES (51, 6, 'include.right_top_blank.php', 'main');
INSERT INTO !PREFIX!_files VALUES (52, 22, 'include.subnav_blank.php', 'main');
INSERT INTO !PREFIX!_files VALUES (53, 33, 'include.pretplcfg_edit.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (54, 33, 'include.pretplcfg_edit_form.php', 'main');
INSERT INTO !PREFIX!_files VALUES (55, 33, 'functions.tpl.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (56, 20, 'include.stat_left_top.php', 'main');
INSERT INTO !PREFIX!_files VALUES (57, 40, 'include.rights_overview.php', 'main');
INSERT INTO !PREFIX!_files VALUES (58, 21, 'include.rights_left_top.php', 'main');
INSERT INTO !PREFIX!_files VALUES (59, 21, 'include.rights_menu.php', 'main');
INSERT INTO !PREFIX!_files VALUES (60, 21, 'include.rights_subnav.php', 'main');
INSERT INTO !PREFIX!_files VALUES (61, 40, 'functions.forms.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (62, 25, 'functions.forms.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (63, 25, 'rights_area.inc.php', 'main');
INSERT INTO !PREFIX!_files VALUES (64, 25, 'rights.inc.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (65, 34, 'rights_lay.inc.php', 'main');
INSERT INTO !PREFIX!_files VALUES (66, 34, 'rights.inc.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (67, 35, 'rights_con.inc.php', 'main');
INSERT INTO !PREFIX!_files VALUES (68, 35, 'rights.inc.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (69, 36, 'rights_mod.inc.php', 'main');
INSERT INTO !PREFIX!_files VALUES (70, 36, 'rights.inc.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (71, 37, 'rights_tpl.inc.php', 'main');
INSERT INTO !PREFIX!_files VALUES (72, 37, 'rights.inc.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (73, 38, 'rights_str.inc.php', 'main');
INSERT INTO !PREFIX!_files VALUES (74, 38, 'rights.inc.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (75, 30, 'functions.con.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (76, 30, 'functions.tpl.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (77, 39, 'include.rights_create.php', 'main');
INSERT INTO !PREFIX!_files VALUES (78, 39, 'functions.forms.php', 'inc');
INSERT INTO !PREFIX!_files VALUES (79, 39, 'include.rights_subnav.php', 'main');
INSERT INTO !PREFIX!_files VALUES (80, 24, 'main.login.php', 'main');
INSERT INTO !PREFIX!_files VALUES (81, 16, 'include.newsletter_left_top.php', 'main');
INSERT INTO !PREFIX!_files VALUES (82, 42, 'include.mycontenido_lastarticles.php', 'main');
INSERT INTO !PREFIX!_files VALUES (83, 42, 'include.mycontenido_subnav.php', 'main');
INSERT INTO !PREFIX!_files VALUES (84, 45, 'include.mycontenido_settings.php', 'main');
INSERT INTO !PREFIX!_files VALUES (85, 45, 'functions.forms.php', 'inc');
INSERT INTO !PREFIX!_files V

tzwenny
Beiträge: 1
Registriert: Mo 22. Dez 2003, 15:42
Kontaktdaten:

sql unvollständig

Beitrag von tzwenny » Mo 22. Dez 2003, 15:49

hallo,

ich würde das alpha-update-script gerne (an einer etwas komplexeren installation) testen - nur sieht es so aus, als wäre das SQL-File im vorherigen post nicht vollständig (es endet mitten in einem SQL-Statement).

Gibt es irgendwo eine vollständige Version?

Danke,
Sven

timo
Beiträge: 6284
Registriert: Do 15. Mai 2003, 18:32
Wohnort: Da findet ihr mich nie!
Kontaktdaten:

Beitrag von timo » Fr 26. Dez 2003, 18:22

danke für den hinweis - ich werde so bald wie möglich das volle SQL-Script posten (warum auch immer es abgeschnitten wurde :))

jhl
Beiträge: 7
Registriert: Mi 7. Mai 2003, 07:57
Kontaktdaten:

Beitrag von jhl » Fr 26. Dez 2003, 21:13

Wäre echt super dringend. Tzwenny gehört zu mir ;) und wir müssen endlich das Update machen. Ein Report über die Bugs folgt dann selbstverständlich. Bitte schnell das Skript posten.

Gruß Jan

timo
Beiträge: 6284
Registriert: Do 15. Mai 2003, 18:32
Wohnort: Da findet ihr mich nie!
Kontaktdaten:

Beitrag von timo » Mo 29. Dez 2003, 17:47

Ich habe es hier hochgeladen:

http://www.contenido.de/temp/base.sql

Das mit dem "dringend" würde ich aber nochmal überdenken - die Wahrscheinlichkeit, daß nichts funktioniert, ist hoch bis sehr hoch. An die Backups denken - und auf fröhliches Testen :)

jhl
Beiträge: 7
Registriert: Mi 7. Mai 2003, 07:57
Kontaktdaten:

Beitrag von jhl » Mo 29. Dez 2003, 19:12

Hallo Timo,

mit dringend war auch mehr gemeint, dass wir jetzt dringend damit anfangen müssen. Wir haben, denke ich, schon ausreichend Vorsorge getroffen und arbeiten für die Umstellung mit einer 2. Datenbank. Erst wenn die neue Version richtig läuft wird auf die neue umgeschaltet.

Danke für das Skript. Der Testbericht folgt dann!

Gruß Jan

enduser
Beiträge: 36
Registriert: Di 22. Okt 2002, 23:22
Wohnort: Pfalz
Kontaktdaten:

Beitrag von enduser » Mo 26. Jan 2004, 13:04

Wollte mal höflichst nachfragen: Wie steht's denn mit dem Testbericht? Oder seid Ihr noch am Updaten?

Gruß, Enduser

jhl
Beiträge: 7
Registriert: Mi 7. Mai 2003, 07:57
Kontaktdaten:

Beitrag von jhl » Di 27. Jan 2004, 01:03

Ich habe leider das Update abgebrochen und mich entschlossen, die Webseite von Hand in die neue Version zu übertragen und dabei gleich einige Dinge zu korrigieren.

Die Fehler waren doch recht zahlreich und es wäre sehr viel Handarbeit notwendig gewesen.
Hatte Timo auch eine PN geschickt, aber keine Antwort bekommen.

Das Interesse an dem Update-Script scheint wohl auch hier im Forum sehr gering zu sein.

Gruß Jan

roman
Beiträge: 127
Registriert: Fr 25. Apr 2003, 15:36
Kontaktdaten:

update währe schon schön

Beitrag von roman » Fr 30. Jan 2004, 12:03

Interesse ist schon noch da, aber ich frage mich ob das Script auch neben den 4.2 Modulen auch div. 4.2 Erweiterungen berücksichtigt. Ich habe einfach keine Lust meine aktuellen Einträge zu zerschießen, aber auch keine Zeit alles neu mit 4.4 aufzubauen. Tja so ist das...

Gruß Roman

timo
Beiträge: 6284
Registriert: Do 15. Mai 2003, 18:32
Wohnort: Da findet ihr mich nie!
Kontaktdaten:

Beitrag von timo » Fr 30. Jan 2004, 12:26

welche div. erweiterungen?

nach wie vor gilt: wenn mir keiner sagt, was geht und was nicht, kann ich euch nicht weiterhelfen.

roman
Beiträge: 127
Registriert: Fr 25. Apr 2003, 15:36
Kontaktdaten:

Update

Beitrag von roman » Do 5. Feb 2004, 23:41

Na wie hießen die?
Mip Forms (für das Modul: der Artikel) oder so, außerdem eine Erweiterung welche Bilder den Artikel direkt zuordnet... Außerdem viele Module.

Was ist mit div. Modulen für die auch SQL Tabellen manuell angelgt wurden...

Timo was und wie hast Du denn das update durchgezogen, mit einem laufenden mit vielen Artikeln gefüllten CMS. Oder nur eine nackt installierte Version?.

timo
Beiträge: 6284
Registriert: Do 15. Mai 2003, 18:32
Wohnort: Da findet ihr mich nie!
Kontaktdaten:

Beitrag von timo » Fr 6. Feb 2004, 10:49

standard 4.2 beispielsite, weil ich keine Seiten für die 4.2 zur Verfügung hatte.

detlev
Beiträge: 156
Registriert: Mi 18. Sep 2002, 08:05
Wohnort: Bochum
Kontaktdaten:

Beitrag von detlev » Mi 18. Feb 2004, 15:07

Da ich mehrere Installationen von 4.2 laufen habe, darunter auch eine Intranet-Site, bei der Datenbank-Dump mittlerweile 50MB umfasst, bin ich hochgradig an einem Upgrade interessiert.
gibt es ungefähre Angaben, wann eine stabile Upgrade-Version kommt?

Danke
Detlev

timo
Beiträge: 6284
Registriert: Do 15. Mai 2003, 18:32
Wohnort: Da findet ihr mich nie!
Kontaktdaten:

Beitrag von timo » Mi 18. Feb 2004, 18:11

eine stabile version kommt dann, wenn ich endlich mal feedback von euch erhalte! Testet doch mal! Solange es niemand ausprobiert, kann ich auch nichts dran ändern. Auch wenn ihr 10000mal die gleiche Frage stellt.

Gesperrt