Seite 1 von 1

Informationen zu der Datei

Verfasst: 04.09.2006 20:20
von Hugo
Hi!

Kann mir jemand sagen, um was für eine Datei es sich hierbei handelt? (Code ist gekürzt, weil das Posten sonst nicht richtig klappt.)

Code: Alles auswählen

<?php
@error_reporting(7);

function getTemplate($template) {
	return str_replace("\"","\\\"",implode("",file("admin/templates/install/".$template.".htm")));
	}

define('pkEXT','.php');
define('pkDIRROOT',dirname(__FILE__).'/');
define('pkDIRINC',pkDIRROOT.'inc/');
define('pkDIRCLASS',pkDIRINC.'class/');
define('pkDIRFUNC',pkDIRINC.'func/');
define('pkDIRLANG',pkDIRINC.'lang/');

require_once(pkDIRFUNC.'default'.pkEXT);
require_once(pkDIRCLASS.'sql'.pkEXT);

class DB extends pkSQL {

	function DB() {
		$this->pkSQL();
		$this->connect();
		}

	}


$lang=array();
$LANG=&$lang;
pkLoadLang();


$php_version=phpversion();
$php_versioncheck=intval(str_replace(".","",phpversion()));
if ($php_versioncheck<410) getpost410vars();
if (get_magic_quotes_gpc()) {
 if(is_array($_REQUEST)) $_REQUEST=stripslashes_array($_REQUEST);
 if(is_array($_POST)) $_POST=stripslashes_array($_POST);
 if(is_array($_GET)) $_GET=stripslashes_array($_GET);
 if(is_array($_COOKIE)) $_COOKIE=stripslashes_array($_COOKIE);
 set_magic_quotes_runtime(0);
 }

$ts=explode('/',$_SERVER['PHP_SELF']); $i=count($ts)-1; if ($ts[$i]!='install.php') exit();






$head='heads';
$body='left';
$navi='right';

$error='';
$install_body='';
$install_navi='';
$version_number='1.6.1';
$sqlfile_path='admin/config/inc.sql.php';
$chmod_list=array("admin/config",$sqlfile_path,"images/avatar","images/catimages","images/smilies","content/download","content/images","templates");

if (isset($_POST['action'])) $ACTION=$_POST['action'];
else $ACTION='view';

if ($ACTION==$_POST['refuse']) {header("location: http://www.phpkit.de"); exit();}
elseif ($ACTION==$_POST['cancel']) {header("location: install.php?step=welcome"); exit();}
elseif ($ACTION==$_POST['accept'] && $_POST['licence_accept']==1) {header("location: install.php?step=1"); exit();}
elseif ($_GET['step']=='welcome') {$step='licence'; eval ("\$install_body= \"".getTemplate("install_welcome")."\";");}
elseif ($_GET['step']=='licence') {$step='licence'; eval ("\$licence_text= \"".getTemplate("install_licence_text")."\";"); eval ("\$install_body= \"".getTemplate("install_licence")."\";");}
elseif ($_GET['step']=='finish') {
 @require($sqlfile_path);
 include("admin/config/inc.dbtabs.php");
 $DB=new DB();
 $DB->query("UPDATE ".$db_tab['config']." SET version_number='".$version_number."'");
 $step='finish';
 if ($_GET['admin']=='created') eval ("\$finish_msg= \"".getTemplate("install_finish_admin")."\";");
 eval ("\$install_body= \"".getTemplate("install_finish")."\";");
 }
elseif ($_GET['step']!='') {
 $step=$_GET['step'];
 if ($step>1 && $ACTION==$_POST['back']) {$step--; header("location: install.php?step=".$step.""); exit();}
 elseif ($step<=0) {$step=1;}

 if ($step==1) {
  if ($ACTION==$_POST['next']) {header("location: install.php?step=2"); exit();}
  else {
   $step_name=$lang['system_check'];
   $disable['back']='disabled';
   if (!($php_versioncheck<400)) $version_highlight='true';
   else {$version_highlight='false'; $error=TRUE;}
   if (get_cfg_var("safe_mode")) {$safemode_status=$lang['enabled']; $error=TRUE; $safemode_highlight='true';}
   else {$safemode_status=$lang['disabled']; $safemode_highlight='true';}
   foreach ($chmod_list as $dir) {
    if ($dir==$sqlfile_path) {@touch("$sqlfile_path");}
    @chmod($dir,0777);
    if (!is_writeable($dir)) {$error=TRUE; $status='false';
     if (!is_dir($dir) && !is_file($dir)) $dir_status=$lang['not_available'];
     else $dir_status=$lang['not_set'];
     }
    else {$status='true'; $dir_status=$lang['isset'];}
   eval ("\$chmod_check.= \"".getTemplate("install_step_1_chmods")."\";");
   }
  if ($error) eval ("\$chmod_check.= \"".getTemplate("install_step_1_error")."\";");
  else eval ("\$chmod_check.= \"".getTemplate("install_step_1_succes")."\";");
  }
 }
 elseif ($step==2) {
  $step_name=$lang['database_declaration'];

  if ($ACTION==$_POST['next']) {
    if ($_POST['sqlprefix']=="") {$sqlprefix="phpkit";}
    else {$sqlprefix=$_POST['sqlprefix'];}

    $database=$_POST['database'];
    $sqlhost=$_POST['sqlhost'];
    $sqluser=$_POST['sqluser'];
    $sqlpass=$_POST['sqlpass'];

   if (@touch("$sqlfile_path")) {
    $fp=fopen("$sqlfile_path","w");
    $vars="<?php
\$database=\"$database\";
\$sqlhost=\"$sqlhost\";
\$sqluser=\"$sqluser\";
\$sqlpass=\"$sqlpass\";
\$sqlprefix=\"$sqlprefix\";
?>";

    fwrite ($fp,$vars);
    fclose ($fp);
    header("location: install.php?step=3"); exit();
    }	
   else {eval ("\$declaration_msg= \"".getTemplate("install_step_2_error")."\";");}    	
   }
  else {
   @include("$sqlfile_path");
   if ($sqlprefix!="") $sqlprefix=$sqlprefix;
   else $sqlprefix='phpkit';
   eval ("\$declaration_msg= \"".getTemplate("install_step_2_msg")."\";");
   }
  }
 elseif ($step==3) {
  $step_name=$lang['database_creation_and_update'];
  @require($sqlfile_path);
  include("admin/config/inc.dbtabs.php");
  if ($ACTION==$_POST['next']) {header("location: install.php?step=4"); exit();}
  elseif ($DB=new DB()) {

//###########
   $thistable=$db_tab['adview'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    adview_id int(14) UNSIGNED NOT NULL auto_increment,
    adview_relation int(5) UNSIGNED NOT NULL default '1',
    adview_views int(14) UNSIGNED NOT NULL default '0',
    adview_time int(14) UNSIGNED NOT NULL,
    adview_code text NOT NULL,
    adview_status tinyint(1) NOT NULL default '0',
    adview_clicks int(14) UNSIGNED NOT NULL default '0',
    PRIMARY KEY (adview_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) {
      eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
      $DB->query("ALTER TABLE ".$db_tab['adview']." ADD adview_clicks int(14) UNSIGNED NOT NULL default '0'");
      }
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }


//###########
   $thistable=$db_tab['blacklist'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    blacklist_id int(14) UNSIGNED NOT NULL auto_increment,
    blacklist_userstatus varchar(10) NOT NULL default 'user',
    blacklist_url text NOT NULL,
    PRIMARY KEY (blacklist_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }


//###########
   $thistable=$db_tab['buddy'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    buddy_id int(14) UNSIGNED NOT NULL auto_increment,
    buddy_userid int(14) UNSIGNED NOT NULL,
    buddy_friendid int(14) UNSIGNED NOT NULL,
    PRIMARY KEY (buddy_id)	)"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }


//###########
   $thistable=$db_tab['calender'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    calender_id int(14) UNSIGNED NOT NULL auto_increment,
    calender_counter int(14) UNSIGNED NOT NULL default '0',
    calender_date int(14) UNSIGNED NOT NULL,
    calender_picount int(14) UNSIGNED NOT NULL,
    calender_versionnr char(9) NOT NULL,
    PRIMARY KEY (calender_id))")) {
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");

    $time1=time(); $time2=(time()-3600*24);
    $DB->query("INSERT INTO ".$thistable." (calender_date, calender_counter, calender_picount) VALUES ('$time1',1,0)");
    $DB->query("INSERT INTO ".$thistable." (calender_date, calender_counter, calender_picount) VALUES ('$time2',0,0)");
    }
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }


//###########
   $thistable=$db_tab['comment'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    comment_id int(14) UNSIGNED NOT NULL auto_increment,
    comment_cat varchar(5) NOT NULL,
    comment_subid int(20) UNSIGNED NOT NULL,
    comment_time int(14) UNSIGNED NOT NULL,
    comment_autor varchar(60) NOT NULL,
    comment_ip varchar(15) NOT NULL,
    comment_text text NOT NULL,
    comment_userid int(14) UNSIGNED NOT NULL default '0',
    PRIMARY KEY (comment_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) {
      $DB->query("ALTER TABLE ".$db_tab['comment']." ADD comment_userid int(14) UNSIGNED NOT NULL default '0'");
      $DB->query("ALTER TABLE ".$db_tab['comment']." DROP comment_uid");
      eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
      }
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }


//###########
   $thistable=$db_tab['config'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    profil_id int(14) UNSIGNED NOT NULL auto_increment,
    profil_name varchar(60) NOT NULL default 'PHPKIT Standard',
    profil_active tinyint(1) NOT NULL default '0',
    site_eod tinyint(1) NOT NULL default '1',
    site_message text NOT NULL,
    site_name text NOT NULL,
    site_title text NOT NULL,
    site_url text NOT NULL,
    site_urls text NOT NULL,
    site_email text NOT NULL,
    site_design char(60) NOT NULL default 'design/standard',
    site_layout char(60) NOT NULL,
    site_frontpage text NOT NULL,
    welcome_eod tinyint(1) NOT NULL default '1',
    welcome_title char(250) NOT NULL default 'Willkommen auf meiner Website',
    welcome_text text NULL,
    template_dir char(60) NOT NULL default 'templates',
    user_registry tinyint(1) NOT NULL default '1',
    user_activate tinyint(1) NOT NULL default '1',
    avatar_eod tinyint(1) NOT NULL default '1',
    avatar_size smallint(5) UNSIGNED NOT NULL default '10',
    avatar_height tinyint(3) UNSIGNED NOT NULL default '80',
    avatar_width tinyint(3) UNSIGNED NOT NULL default '80',
    member_epp tinyint(3) UNSIGNED NOT NULL default '12',
    member_gbook tinyint(1) NOT NULL default '0',
    member_infoshow char(10) default 'user',
    text_ubb tinyint(1) NOT NULL default '1',
    text_smilies tinyint(1) NOT NULL default '1',
    version_number char(9) NOT NULL default '0',
    PRIMARY KEY (profil_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }
   $DB->query("UPDATE ".$db_tab['config']." SET version_number='".$version_number."'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD text_images tinyint(1) NOT NULL default '1'");  
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD version_check tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD version_checked char(9) NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD version_lastcheck int(14) NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD site_width varchar(4) NOT NULL default '770'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD site_style int(14) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD site_mv_time int(14) NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD site_mv_count int(14) NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD site_mail_txt text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD site_mail_htm text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD site_logo varchar(250) NOT NULL default 'images/site/logo.gif'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD site_adview tinyint(1) NOT NULL default '1'");   
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD member_mailer tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD avatar_path varchar(250) NOT NULL default 'images/avatar'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_epp1 int(4) UNSIGNED NOT NULL default '10'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_epp2 int(4) UNSIGNED NOT NULL default '6'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_epp3 int(4) UNSIGNED NOT NULL default '12'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_epp4 int(4) UNSIGNED NOT NULL default '12'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_style1 tinyint(1) UNSIGNED NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_style2 tinyint(1) UNSIGNED NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_style3 tinyint(1) UNSIGNED NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_style4 tinyint(1) UNSIGNED NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_length1 int(4) UNSIGNED NOT NULL default '250'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_length2 int(4) UNSIGNED NOT NULL default '250'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_length3 int(4) UNSIGNED NOT NULL default '250'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_length4 int(4) UNSIGNED NOT NULL default '250'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_submit1 char(10) default 'user' NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_submit2 char(10) default 'user' NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_submit3 char(10) default 'user' NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_submit4 char(10) default 'user' NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_downloadpath char(50) NOT NULL default 'content/download'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_downloadstatus char(10) default 'guest' NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD content_downloadlicence char(50) NOT NULL default 'content/download'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD comment_bb tinyint(1) UNSIGNED NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD comment_smilies tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD comment_images tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD comment_register tinyint(1) NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD comment_order char(4) NOT NULL default 'DESC'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD comment_floodctrl int(6) NOT NULL default '5'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD comment_maxchars int(14) NOT NULL default '10000'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD gbook_epp tinyint(2) UNSIGNED NOT NULL default '8'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD gbook_eod tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD gbook_commenteod tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD gbook_welcome text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD gbook_ubb tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD gbook_smilies tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD gbook_images tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD gbook_floodctrl int(6) NOT NULL default '5'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD gbook_maxchars int(14) NOT NULL default '10000'");  
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_eod tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_standalone tinyint(1) NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_start char(60) NOT NULL default 'include.php?path=forum/main.php'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_button char(60) NOT NULL default 'images/button'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_ubb tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_smilies tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_images tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_maxfav tinyint(3) UNSIGNED NOT NULL default '15'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_searcheod tinyint(1) UNSIGNED NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_viewreply tinyint(2) UNSIGNED NOT NULL default '5'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_showmod tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_showrank tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_postorder char(4) NULL default 'ASC'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_structur tinyint(1) NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_doublepost tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_floodctrl int(14) UNSIGNED NOT NULL default '60'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_attach_dir varchar(250) NOT NULL default 'forum/attachments'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_attach_ext text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD forum_attach_size int(14) UNSIGNED NOT NULL default '10'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD user_disclaimer tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD user_delete tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD user_ghost tinyint(1) UNSIGNED NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD user_design tinyint(1) UNSIGNED NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD user_namemin tinyint(2) UNSIGNED NOT NULL default '3'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD user_namemax tinyint(2) UNSIGNED NOT NULL default '50'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD member_mailtext text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD member_mailtitle text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD referer_filter text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD referer_eod tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD referer_delete int(14) UNSIGNED NOT NULL default '168'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD time_gmtzone char(4) default '0' NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD time_offset char(4) default '0' NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD templatename tinyint(1) NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD censor_username text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD censor_email text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD censor_ip text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD censor_badword text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD notify_register_m text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD notify_register_i text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD notify_comment_m text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD notify_comment_i text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD notify_forum_m text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD notify_forum_i text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD notify_gbook_m text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD notify_gbook_i text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD notify_submit_m text NOT NULL"); 
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD notify_submit_i text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD smtp_server text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['config']." ADD site_copy text NOT NULL");

//###########
   $thistable=$db_tab['content'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    content_id int(14) UNSIGNED NOT NULL auto_increment,
    content_cat int(6) UNSIGNED NOT NULL,
    content_time int(14) UNSIGNED NOT NULL,
    content_title varchar(250) NOT NULL,
    content_autor varchar(60) NOT NULL,
    content_text text NOT NULL,
    content_altdat varchar(250) NOT NULL,
    content_option tinyint(1) NOT NULL default '1',
    content_status tinyint(1) NOT NULL default '1',
    content_subid int(14) NOT NULL default '0',
    PRIMARY KEY (content_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_expire int(14) UNSIGNED  NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_header text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_autorid int(14) UNSIGNED NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_themeid int(14) UNSIGNED NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_views int(6) UNSIGNED NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_rating double NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_rating_total int(14) UNSIGNED NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_comment_status tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_rating_status tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_ubb tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_html tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_smilies tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_filesize int(14) UNSIGNED NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_template varchar(250) NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_teaser text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['content']." ADD content_related text NOT NULL"); 


//###########
   $thistable=$db_tab['contentcat'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    contentcat_id int(6) UNSIGNED NOT NULL auto_increment,
    contentcat_name varchar(250) NOT NULL,
    contentcat_symbol varchar(250) NOT NULL,
    PRIMARY KEY (contentcat_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }
   $DB->query("ALTER TABLE ".$db_tab['contentcat']." ADD contentcat_type0 tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['contentcat']." ADD contentcat_type1 tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['contentcat']." ADD contentcat_type2 tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['contentcat']." ADD contentcat_type3 tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['contentcat']." ADD contentcat_type4 tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['contentcat']." ADD contentcat_rights varchar(10) NOT NULL default 'guest'");
   $DB->query("ALTER TABLE ".$db_tab['contentcat']." ADD contentcat_order tinyint(3) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['contentcat']." ADD contentcat_description text NOT NULL");


//###########
   $thistable=$db_tab['contenttheme'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    contenttheme_id int(14) UNSIGNED NOT NULL auto_increment,
    contenttheme_catid int(6) UNSIGNED NOT NULL,
    contenttheme_name varchar(250) NOT NULL,
    PRIMARY KEY (contenttheme_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }


//###########
   $thistable=$db_tab['content_submited'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    content_submited_id int(14) UNSIGNED NOT NULL auto_increment,
    content_submited_catid int(6) UNSIGNED NOT NULL,
    content_submited_title varchar(250) NOT NULL,
    content_submited_text text NOT NULL,
    content_submited_autorid int(14) UNSIGNED NOT NULL,
    content_submited_time int(14) UNSIGNED NOT NULL,
    PRIMARY KEY (content_submited_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    } 
   $DB->query("ALTER TABLE ".$db_tab['content_submited']." ADD content_submited_type tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['content_submited']." ADD content_submited_email varchar(250) NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['content_submited']." ADD content_submited_autor varchar(250) NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['content_submited']." ADD content_submited_altdat varchar(250) NOT NULL");


//###########
   $thistable=$db_tab['im'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    im_id int(14) UNSIGNED NOT NULL auto_increment,
    im_to int(14) UNSIGNED NOT NULL,
    im_title varchar(250) NOT NULL,
    im_autor int(14) UNSIGNED NOT NULL,
    im_text text NOT NULL,
    im_time int(14) UNSIGNED NOT NULL,
    im_view tinyint(1) NOT NULL default '0',
    im_del tinyint(1) NOT NULL default '0',
    im_delautor tinyint(1) NOT NULL default '0',
    im_viewtime int(14) UNSIGNED NOT NULL default '0',
    im_replyed tinyint(1) NOT NULL default '0',
    PRIMARY KEY (im_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }
   $DB->query("ALTER TABLE ".$db_tab['im']." ADD im_viewtime int(14) UNSIGNED NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['im']." ADD im_replyed tinyint(1) NOT NULL default '0'");



//###########
   $thistable=$db_tab['faq'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    faq_id int(14) UNSIGNED NOT NULL auto_increment,
    faq_catid int(6) UNSIGNED NOT NULL,
    faq_title text NULL,
    faq_time int(14) UNSIGNED NOT NULL,
    faq_question text NOT NULL,
    faq_answer text NOT NULL,
    faq_qautor varchar(250) NOT NULL,
    faq_qautorid int(14) UNSIGNED NOT NULL,
    faq_qautormail varchar(250) NOT NULL,
    faq_autor varchar(250) NOT NULL,
    faq_autorid int(14) UNSIGNED NOT NULL,
    faq_autormail varchar(250) NOT NULL,
    faq_order tinyint(3) UNSIGNED NOT NULL,
    PRIMARY KEY (faq_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }


//###########
   $thistable=$db_tab['faqcat'];
   if ($DB->query("CREATE TABLE ".$thistable." ( 
    faqcat_id int(14) UNSIGNED NOT NULL auto_increment,
    faqcat_title varchar(250) NOT NULL,
    faqcat_order tinyint(3) UNSIGNED NOT NULL,
    PRIMARY KEY (faqcat_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }


//###########
   $thistable=$db_tab['forumcat'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    forumcat_id int(14) UNSIGNED NOT NULL auto_increment,
    forumcat_subcat int(14) UNSIGNED NOT NULL default '0',
    forumcat_name varchar(250) NOT NULL,
    forumcat_threadcount int(14) UNSIGNED NULL default '0',
    forumcat_postcount int(14) UNSIGNED NULL default '0',
    forumcat_lastreply_time int(14) UNSIGNED NULL default '0',
    forumcat_lastreply_autor varchar(250) NOT NULL,
    forumcat_lastreply_autorid int(14) UNSIGNED NOT NULL,
    forumcat_order tinyint(2) NOT NULL default '1',
    forumcat_level tinyint(2) UNSIGNED NOT NULL default '1',
    forumcat_description text NOT NULL,
    forumcat_description_show int(1) UNSIGNED NOT NULL default '1',
    forumcat_status tinyint(1) NOT NULL default '1',
    forumcat_replys tinyint(3) UNSIGNED NOT NULL default '15',
    forumcat_views tinyint(3) UNSIGNED NOT NULL default '100',
    PRIMARY KEY (forumcat_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }

   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_posts tinyint(2) UNSIGNED NOT NULL default '12'");
   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_threads tinyint(2) UNSIGNED NOT NULL default '12'");
   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_threads_option tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_vote_option tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_rrights varchar(10) NOT NULL default 'guest'");
   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_wrights varchar(10) NOT NULL default 'guest'");
   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_trights varchar(10) NOT NULL default 'guest'");
   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_option tinyint(1) NOT NULL default '1'");
   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_voteoption tinyint(1) NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_attachments tinyint(1) NOT NULL default '0'");
   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_lastreply_threadid int(14) UNSIGNED NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_mods text NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['forumcat']." ADD forumcat_user text NOT NULL");


//###########
   $thistable=$db_tab['forumthread'];
   if ($DB->query("CREATE TABLE ".$thistable." (
    forumthread_id int(14) UNSIGNED NOT NULL auto_increment,
    forumthread_catid int(14) UNSIGNED NOT NULL,
    forumthread_status tinyint(1) NOT NULL default '1',
    forumthread_replycount int(14) UNSIGNED NOT NULL default '0',
    forumthread_viewcount int(14) UNSIGNED NOT NULL default '0',
    forumthread_lastreply_time int(14) UNSIGNED NOT NULL,
    forumthread_lastreply_autor varchar(250) NOT NULL,
    forumthread_lastreply_autorid int(14) UNSIGNED NOT NULL,
    forumthread_uid varchar(32) NOT NULL,
    PRIMARY KEY (forumthread_id))"))
    eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_created")."\";");
   else {
	if ($DB->table_exists($thistable)) eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_exists")."\";");
     else eval ("\$dbcreation_msg.= \"".getTemplate("install_step_3_failure")."\";");
    }
   $DB->query("ALTER TABLE ".$db_tab['forumthread']." ADD forumthread_title varchar(250) NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['forumthread']." ADD forumthread_icon char(250) NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['forumthread']." ADD forumthread_autor char(250) NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['forumthread']." ADD forumthread_autorid int(14) UNSIGNED NOT NULL");
   $DB->query("ALTER TABLE ".$db_tab['forumthread']." ADD forumthread_votetitle varchar(250) NOT NULL");

.
.
.

Verfasst: 04.09.2006 21:36
von area57
eine php datei die nicht zum orifinallen phpBB2 dazu gehört ;)

Verfasst: 04.09.2006 21:46
von Hugo
entimon - Danke! :D Und wozu gehört sie? :-?

Verfasst: 05.09.2006 00:01
von porfavor
Vielleicht das Index-File eines Mods?

Verfasst: 05.09.2006 00:07
von area57
Hugo hat geschrieben:entimon - Danke! :D Und wozu gehört sie? :-?
k.A. wo hast die denn her die datei

Verfasst: 05.09.2006 17:08
von Hugo
porfavor - Du meinst sicherlicher Install-File!? Das hatte ich wohl ganz vergessen zu erwähnen, die Datei heisst install.php. :roll: Ich vermute, die Datei ist von einem Template.

entimon - Lag bei 'nem Kumpel lose im html-Folder. :D

Ist das eigentlich ein Bug, dass man sehr langen Code nicht als solchen darstellen lassen kann?

Verfasst: 05.09.2006 18:00
von gloriosa
Hallo,
1. Templates beinhalten keine install.php denn sie sind gemäß >>> KB:install_template <<< zu installieren. :o

2. Diese Datei hat augenscheinlich nichts mit phpBB zu tun und demzufolge ist es hier uninteressant dazu Vermutungen anzustellen. :oops:

3. es gilt üblicherweise >>> KB:81 <<< ! :wink:

Verfasst: 05.09.2006 18:46
von Hugo
gloriosa - Danke für deine Antwort.

zu 1. Dachte an ein Template, das womöglich untypischerweise eine Installations-Datei mit sich bringt.

zu 2. Das ist doch schon eine interessante Information, danke.

zu 3. Ok. Aber das beantwortet nicht die Frage nach dem etwaigen Bug.