--- /dev/null
+<?php
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Revised BSD License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ Revised BSD License for more details.
+
+ Copyright 2004-2009 iDB Support - http://idb.berlios.de/
+ Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/
+
+ $FileInfo: sqlite.php - Last Update: 12/14/2009 SVN 406 - Author: cooldude2k $
+*/
+$File3Name = basename($_SERVER['SCRIPT_NAME']);
+if ($File3Name=="sqlite.php"||$File3Name=="/sqlite.php") {
+ require('index.php');
+ exit(); }
+
+if($_SESSION['UserGroup']==$Settings['GuestGroup']||$GroupInfo['HasAdminCP']=="no") {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
+if($Settings['sqltype']!="pgsql") {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
+ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
+if(!isset($_GET['outtype'])) { $_GET['outtype'] = "UTF-8"; }
+header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
+header("Cache-Control: private",false);
+header("Content-Description: File Transfer");
+$fname = str_replace("_","", $Settings['sqltable']);
+header("Content-Disposition: attachment; filename=".$fname.".sql");
+header("Content-Type: application/octet-stream");
+header("Content-Transfer-Encoding: binary");
+$SQLDumper = "SQL Dumper";
+function GetAllRows($table) { $rene_j = 0; $trowout = null;
+global $SQLStat;
+$tresult = sql_query("SELECT * FROM \"".$table."\"",$SQLStat);
+while ($trow = sql_fetch_assoc($tresult)) {
+$trowout[$rene_j] = $trow;
+++$rene_j; }
+sql_free_result($tresult);
+return $trowout; }
+$TablePreFix = $Settings['sqltable'];
+function add_prefix($tarray) {
+global $TablePreFix;
+return $TablePreFix.$tarray; }
+$TableChCk = array("categories", "catpermissions", "events", "forums", "groups", "members", "messenger", "permissions", "posts", "restrictedwords", "sessions", "smileys", "topics", "wordfilter");
+$TableChCk = array_map("add_prefix",$TableChCk);
+if(!isset($_GET['outtype'])||$_GET['outtype']=="UTF-8") {
+header("Content-Type: text/plain; charset=UTF-8"); }
+if($_GET['outtype']=="latin1") {
+header("Content-Type: text/plain; charset=ISO-8859-15"); }
+if($_GET['outtype']=="latin15") {
+header("Content-Type: text/plain; charset=ISO-8859-15"); }
+$sli = 0; $slnum = count($TableChCk);
+while ($sli < $slnum) {
+$FullTable[$sli] = "CREATE TABLE \"".$TableChCk[$sli]."\" (";
+$tabsta = sql_query("select * from information_schema.columns where table_name='".$TableChCk[$sli]."';",$SQLStat);
+$zli = 0; $zlnum = sql_num_rows($tabsta);
+$UniKeyRow = null;
+while ($zli < $zlnum) {
+$SQL['column_name'] = sql_result($tabsta,$zli,"column_name");
+$SQL['column_default'] = sql_result($tabsta,$zli,"column_default");
+$PSQL = null;
+$PSQL = explode("::", $SQL['column_default']);
+if(count($PSQL)>1) { $SQL['column_default'] = $PSQL[0]; }
+if (preg_match("/nextval(.*)\_seq/i", $SQL['column_default'])) {
+$SQL['udt_name'] = "SERIAL"; $SQL['column_default'] = null;
+} else { $SQL['column_default'] = " DEFAULT ".$SQL['column_default'];
+$SQL['udt_name'] = sql_result($tabsta,$zli,"udt_name"); }
+if($SQL['udt_name']=="text") { $SQL['column_default'] = null; }
+$SQL['character_maximum_length'] = sql_result($tabsta,$zli,"character_maximum_length");
+if($SQL['udt_name']=="varchar") {
+ $SQL['udt_name'] = $SQL['udt_name']."(".$SQL['character_maximum_length'].")"; }
+$pristats = null; $PriKeyRow = " ";
+$prista = sql_query("SELECT * FROM information_schema.key_column_usage WHERE table_name = '".$TableChCk[$sli]."' and column_name = '".$SQL['column_name']."';",$SQLStat);
+$pristats = @pg_fetch_result($prista,0,"\"constraint_name\"");
+if (preg_match("/(.*)\_pkey/i", $pristats)) {
+$PriKeyRow = " PRIMARY KEY ";
+} else {
+if (preg_match("/(.*)\_key/i", $pristats)) {
+$UniKeyRow = $UniKeyRow.",\n UNIQUE (\"".$SQL['column_name']."\")";
+} else {
+/*Nothing*/ } }
+if($pristats==$SQL['column_name']) { $PriKeyRow = " PRIMARY KEY "; }
+$FullTable[$sli] .= "\n \"".$SQL['column_name']."\" ".$SQL['udt_name'].$PriKeyRow."NOT NULL".$SQL['column_default'];
+if($zli+1 < $zlnum) { $FullTable[$sli] .= ","; }
+++$zli; }
+$FullTable[$sli] .= $UniKeyRow."\n);\n";
+++$sli; }
+$TableNames = $TableChCk;
+$num = count($TableNames); $renee_s = 0;
+echo "-- ".$OrgName." ".$SQLDumper."\n";
+echo "-- version ".$VerInfo['iDB_Ver_SVN']."\n";
+echo "-- ".$iDBHome."support/\n";
+echo "--\n";
+echo "-- Host: ".$Settings['sqlhost']."\n";
+echo "-- Generation Time: ".GMTimeGet('F d, Y \a\t h:i A',$_SESSION['UserTimeZone'],0,$_SESSION['UserDST'])."\n";
+echo "-- Server version: ".sql_server_info($SQLStat)."\n";
+echo "-- PHP Version: ".phpversion()."\n\n";
+echo "--\n";
+echo "-- Database: \"".$Settings['sqldb']."\"\n";
+echo "--\n\n";
+echo "-- --------------------------------------------------------\n\n";
+while ($renee_s < $num) { $tnum = $num - 1;
+$trow = GetAllRows($TableNames[$renee_s]);
+$numz = count($trow); $kazuki_p = 0;
+echo "--\n";
+echo "-- Table structure for table \"".$TableNames[$renee_s]."\"\n";
+echo "--\n\n";
+echo $FullTable[$renee_s]."\n";
+while ($kazuki_p < $numz) { $tnumz = $numz - 1;
+$srow = null; $srowvalue = null;
+$trownew = $trow[$kazuki_p];
+$trowname = array_keys($trownew);
+$nums = count($trownew); $il = 0;
+while ($il < $nums) { $tnums = $nums - 1;
+$trowrname = sql_escape_string($trowname[$il],$SQLStat);
+$trowrvalue = sql_escape_string($trownew[$trowrname],$SQLStat);
+if($_GET['outtype']=="UTF-8"&&$Settings['charset']!="UTF-8") {
+$trowrvalue = utf8_encode($trowrvalue); }
+$trowrvalue = str_replace( array("\n", "\r"), array('\n', '\r'), $trowrvalue);
+if($kazuki_p===0) {
+if($il===0) { $srow = "INSERT INTO \"".$TableNames[$renee_s]."\" ("; }
+if($il<$tnums&&$il!=$tnums) { $srow .= "\"".$trowrname."\", "; }
+if($il==$tnums) { $srow .= "\"".$trowrname."\") VALUES"; } }
+if($il===0) { $srowvalue = "("; }
+if(!is_numeric($trowrvalue)) { $trowrvalue = "'".$trowrvalue."'"; }
+if($il<$tnums) { $srowvalue .= $trowrvalue.", "; }
+if($il==$tnums) { $srowvalue .= $trowrvalue;
+if($kazuki_p<$tnumz) { $srowvalue .= "),"; }
+if($kazuki_p==$tnumz) { $srowvalue .= ");"; } }
+++$il; }
+if($kazuki_p===0) {
+echo "--\n";
+echo "-- Dumping data for table \"".$TableNames[$renee_s]."\"\n";
+echo "--\n\n";
+echo $srow."\n"; }
+echo $srowvalue."\n";
+if($kazuki_p==$tnumz&&$renee_s<$tnum) {
+echo "\n-- --------------------------------------------------------\n"; }
+++$kazuki_p; }
+if($numz===0) {
+echo "--\n";
+echo "-- Dumping data for table \"".$TableNames[$renee_s]."\"\n";
+echo "--\n\n";
+echo "\n-- --------------------------------------------------------\n"; }
+echo "\n";
+++$renee_s; }
+fix_amp($Settings['use_gzip'],$GZipEncode['Type']);
+?>
Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/
iDB Installer made by Game Maker 2k - http://idb.berlios.net/
- $FileInfo: pgsql.php - Last Update: 12/13/2009 SVN 404 - Author: cooldude2k $
+ $FileInfo: pgsql.php - Last Update: 12/14/2009 SVN 406 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="pgsql.php"||$File3Name=="/pgsql.php") {
*/
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."categories\" (\n".
" \"id\" SERIAL PRIMARY KEY NOT NULL,\n".
-" \"OrderID\" int NOT NULL default '0',\n".
+" \"OrderID\" int4 NOT NULL default '0',\n".
" \"Name\" varchar(150) NOT NULL default '',\n".
" \"ShowCategory\" varchar(5) NOT NULL default '',\n".
" \"CategoryType\" varchar(15) NOT NULL default '',\n".
" \"SubShowForums\" varchar(5) NOT NULL default '',\n".
-" \"InSubCategory\" int NOT NULL default '0',\n".
-" \"PostCountView\" int NOT NULL default '0',\n".
-" \"KarmaCountView\" int NOT NULL default '0',\n".
+" \"InSubCategory\" int4 NOT NULL default '0',\n".
+" \"PostCountView\" int4 NOT NULL default '0',\n".
+" \"KarmaCountView\" int4 NOT NULL default '0',\n".
" \"Description\" text NOT NULL\n".
");", array(null));
sql_query($query,$SQLStat);
sql_query($query,$SQLStat);
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."catpermissions\" (\n".
" \"id\" SERIAL PRIMARY KEY NOT NULL,\n".
-" \"PermissionID\" int NOT NULL default '0',\n".
+" \"PermissionID\" int4 NOT NULL default '0',\n".
" \"Name\" varchar(150) NOT NULL default '',\n".
-" \"CategoryID\" int NOT NULL default '0',\n".
+" \"CategoryID\" int4 NOT NULL default '0',\n".
" \"CanViewCategory\" varchar(5) NOT NULL default ''\n".
");", array(null));
sql_query($query,$SQLStat);
sql_query($query,$SQLStat);
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."events\" (\n".
" \"id\" SERIAL PRIMARY KEY NOT NULL,\n".
-" \"UserID\" int NOT NULL default '0',\n".
+" \"UserID\" int4 NOT NULL default '0',\n".
" \"GuestName\" varchar(150) NOT NULL default '',\n".
" \"EventName\" varchar(150) NOT NULL default '',\n".
" \"EventText\" text NOT NULL,\n".
-" \"TimeStamp\" int NOT NULL default '0',\n".
-" \"TimeStampEnd\" int NOT NULL default '0',\n".
-" \"EventMonth\" int NOT NULL default '0',\n".
-" \"EventMonthEnd\" int NOT NULL default '0',\n".
-" \"EventDay\" int NOT NULL default '0',\n".
-" \"EventDayEnd\" int NOT NULL default '0',\n".
-" \"EventYear\" int NOT NULL default '0',\n".
-" \"EventYearEnd\" int NOT NULL default '0'\n".
+" \"TimeStamp\" int4 NOT NULL default '0',\n".
+" \"TimeStampEnd\" int4 NOT NULL default '0',\n".
+" \"EventMonth\" int4 NOT NULL default '0',\n".
+" \"EventMonthEnd\" int4 NOT NULL default '0',\n".
+" \"EventDay\" int4 NOT NULL default '0',\n".
+" \"EventDayEnd\" int4 NOT NULL default '0',\n".
+" \"EventYear\" int4 NOT NULL default '0',\n".
+" \"EventYearEnd\" int4 NOT NULL default '0'\n".
");", array(null));
sql_query($query,$SQLStat);
$query = sql_pre_query("INSERT INTO \"".$_POST['tableprefix']."events\" (\"UserID\", \"GuestName\", \"EventName\", \"EventText\", \"TimeStamp\", \"TimeStampEnd\", \"EventMonth\", \"EventMonthEnd\", \"EventDay\", \"EventDayEnd\", \"EventYear\", \"EventYearEnd\") VALUES\n".
sql_query($query,$SQLStat);
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."forums\" (\n".
" \"id\" SERIAL PRIMARY KEY NOT NULL,\n".
-" \"CategoryID\" int NOT NULL default '0',\n".
-" \"OrderID\" int NOT NULL default '0',\n".
+" \"CategoryID\" int4 NOT NULL default '0',\n".
+" \"OrderID\" int4 NOT NULL default '0',\n".
" \"Name\" varchar(150) NOT NULL default '',\n".
" \"ShowForum\" varchar(5) NOT NULL default '',\n".
" \"ForumType\" varchar(15) NOT NULL default '',\n".
-" \"InSubForum\" int NOT NULL default '0',\n".
+" \"InSubForum\" int4 NOT NULL default '0',\n".
" \"RedirectURL\" text NOT NULL,\n".
-" \"Redirects\" int NOT NULL default '0',\n".
-" \"NumViews\" int NOT NULL default '0',\n".
+" \"Redirects\" int4 NOT NULL default '0',\n".
+" \"NumViews\" int4 NOT NULL default '0',\n".
" \"Description\" text NOT NULL,\n".
" \"PostCountAdd\" varchar(15) NOT NULL default '',\n".
-" \"PostCountView\" int NOT NULL default '0',\n".
-" \"KarmaCountView\" int NOT NULL default '0',\n".
+" \"PostCountView\" int4 NOT NULL default '0',\n".
+" \"KarmaCountView\" int4 NOT NULL default '0',\n".
" \"CanHaveTopics\" varchar(5) NOT NULL default '',\n".
-" \"HotTopicPosts\" int NOT NULL default '0',\n".
-" \"NumPosts\" int NOT NULL default '0',\n".
-" \"NumTopics\" int NOT NULL default '0'\n".
+" \"HotTopicPosts\" int4 NOT NULL default '0',\n".
+" \"NumPosts\" int4 NOT NULL default '0',\n".
+" \"NumTopics\" int4 NOT NULL default '0'\n".
");", array(null));
sql_query($query,$SQLStat);
$query = sql_pre_query("INSERT INTO \"".$_POST['tableprefix']."forums\" (\"CategoryID\", \"OrderID\", \"Name\", \"ShowForum\", \"ForumType\", \"InSubForum\", \"RedirectURL\", \"Redirects\", \"NumViews\", \"Description\", \"PostCountAdd\", \"PostCountView\", \"KarmaCountView\", \"CanHaveTopics\", \"HotTopicPosts\", \"NumPosts\", \"NumTopics\") VALUES\n".
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."groups\" (\n".
" \"id\" SERIAL PRIMARY KEY NOT NULL,\n".
" \"Name\" varchar(150) NOT NULL default '',\n".
-" \"PermissionID\" int NOT NULL default '0',\n".
+" \"PermissionID\" int4 NOT NULL default '0',\n".
" \"NamePrefix\" varchar(150) NOT NULL default '',\n".
" \"NameSuffix\" varchar(150) NOT NULL default '',\n".
" \"CanViewBoard\" varchar(5) NOT NULL default '',\n".
" \"CanAddEvents\" varchar(5) NOT NULL default '',\n".
" \"CanPM\" varchar(5) NOT NULL default '',\n".
" \"CanSearch\" varchar(5) NOT NULL default '',\n".
-" \"FloodControl\" int NOT NULL default '0',\n".
-" \"SearchFlood\" int NOT NULL default '0',\n".
-" \"PromoteTo\" int NOT NULL default '0',\n".
-" \"PromotePosts\" int NOT NULL default '0',\n".
-" \"PromoteKarma\" int NOT NULL default '0',\n".
+" \"FloodControl\" int4 NOT NULL default '0',\n".
+" \"SearchFlood\" int4 NOT NULL default '0',\n".
+" \"PromoteTo\" int4 NOT NULL default '0',\n".
+" \"PromotePosts\" int4 NOT NULL default '0',\n".
+" \"PromoteKarma\" int4 NOT NULL default '0',\n".
" \"HasModCP\" varchar(5) NOT NULL default '',\n".
" \"HasAdminCP\" varchar(5) NOT NULL default '',\n".
" \"ViewDBInfo\" varchar(5) NOT NULL default '',\n".
" \"UserPassword\" varchar(250) NOT NULL default '',\n".
" \"HashType\" varchar(50) NOT NULL default '',\n".
" \"Email\" varchar(150) NOT NULL default '',\n".
-" \"GroupID\" int NOT NULL default '0',\n".
+" \"GroupID\" int4 NOT NULL default '0',\n".
" \"Validated\" varchar(20) NOT NULL default '',\n".
" \"HiddenMember\" varchar(20) NOT NULL default '',\n".
-" \"WarnLevel\" int NOT NULL default '0',\n".
+" \"WarnLevel\" int4 NOT NULL default '0',\n".
" \"Interests\" varchar(150) NOT NULL default '',\n".
" \"Title\" varchar(150) NOT NULL default '',\n".
-" \"Joined\" int NOT NULL default '0',\n".
-" \"LastActive\" int NOT NULL default '0',\n".
-" \"LastPostTime\" int NOT NULL default '0',\n".
-" \"BanTime\" int NOT NULL default '0',\n".
-" \"BirthDay\" int NOT NULL default '0',\n".
-" \"BirthMonth\" int NOT NULL default '0',\n".
-" \"BirthYear\" int NOT NULL default '0',\n".
+" \"Joined\" int4 NOT NULL default '0',\n".
+" \"LastActive\" int4 NOT NULL default '0',\n".
+" \"LastPostTime\" int4 NOT NULL default '0',\n".
+" \"BanTime\" int4 NOT NULL default '0',\n".
+" \"BirthDay\" int4 NOT NULL default '0',\n".
+" \"BirthMonth\" int4 NOT NULL default '0',\n".
+" \"BirthYear\" int4 NOT NULL default '0',\n".
" \"Signature\" text NOT NULL,\n".
" \"Notes\" text NOT NULL,\n".
" \"Avatar\" varchar(150) NOT NULL default '',\n".
" \"AvatarSize\" varchar(10) NOT NULL default '',\n".
" \"Website\" varchar(150) NOT NULL default '',\n".
" \"Gender\" varchar(15) NOT NULL default '',\n".
-" \"PostCount\" int NOT NULL default '0',\n".
-" \"Karma\" int NOT NULL default '0',\n".
-" \"KarmaUpdate\" int NOT NULL default '0',\n".
-" \"RepliesPerPage\" int NOT NULL default '0',\n".
-" \"TopicsPerPage\" int NOT NULL default '0',\n".
-" \"MessagesPerPage\" int NOT NULL default '0',\n".
+" \"PostCount\" int4 NOT NULL default '0',\n".
+" \"Karma\" int4 NOT NULL default '0',\n".
+" \"KarmaUpdate\" int4 NOT NULL default '0',\n".
+" \"RepliesPerPage\" int4 NOT NULL default '0',\n".
+" \"TopicsPerPage\" int4 NOT NULL default '0',\n".
+" \"MessagesPerPage\" int4 NOT NULL default '0',\n".
" \"TimeZone\" varchar(5) NOT NULL default '0',\n".
" \"DST\" varchar(5) NOT NULL default '0',\n".
" \"UseTheme\" varchar(26) NOT NULL default '0',\n".
sql_query($query,$SQLStat);
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."messenger\" (\n".
" \"id\" SERIAL PRIMARY KEY NOT NULL,\n".
-" \"SenderID\" int NOT NULL default '0',\n".
-" \"ReciverID\" int NOT NULL default '0',\n".
+" \"SenderID\" int4 NOT NULL default '0',\n".
+" \"ReciverID\" int4 NOT NULL default '0',\n".
" \"GuestName\" varchar(150) NOT NULL default '',\n".
" \"MessageTitle\" varchar(150) NOT NULL default '',\n".
" \"MessageText\" text NOT NULL,\n".
" \"Description\" text NOT NULL,\n".
-" \"DateSend\" int NOT NULL default '0',\n".
-" \"Read\" int NOT NULL default '0'\n".
+" \"DateSend\" int4 NOT NULL default '0',\n".
+" \"Read\" int4 NOT NULL default '0'\n".
");", array(null));
sql_query($query,$SQLStat);
$query = sql_pre_query("INSERT INTO \"".$_POST['tableprefix']."messenger\" (\"SenderID\", \"ReciverID\", \"GuestName\", \"MessageTitle\", \"MessageText\", \"Description\", \"DateSend\", \"Read\") VALUES\n".
sql_query($query,$SQLStat);
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."permissions\" (\n".
" \"id\" SERIAL PRIMARY KEY NOT NULL,\n".
-" \"PermissionID\" int NOT NULL default '0',\n".
+" \"PermissionID\" int4 NOT NULL default '0',\n".
" \"Name\" varchar(150) NOT NULL default '',\n".
-" \"ForumID\" int NOT NULL default '0',\n".
+" \"ForumID\" int4 NOT NULL default '0',\n".
" \"CanViewForum\" varchar(5) NOT NULL default '',\n".
" \"CanMakeTopics\" varchar(5) NOT NULL default '',\n".
" \"CanMakeReplys\" varchar(5) NOT NULL default '',\n".
sql_query($query,$SQLStat);
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."posts\" (\n".
" \"id\" SERIAL PRIMARY KEY NOT NULL,\n".
-" \"TopicID\" int NOT NULL default '0',\n".
-" \"ForumID\" int NOT NULL default '0',\n".
-" \"CategoryID\" int NOT NULL default '0',\n".
-" \"UserID\" int NOT NULL default '0',\n".
+" \"TopicID\" int4 NOT NULL default '0',\n".
+" \"ForumID\" int4 NOT NULL default '0',\n".
+" \"CategoryID\" int4 NOT NULL default '0',\n".
+" \"UserID\" int4 NOT NULL default '0',\n".
" \"GuestName\" varchar(150) NOT NULL default '',\n".
-" \"TimeStamp\" int NOT NULL default '0',\n".
-" \"LastUpdate\" int NOT NULL default '0',\n".
-" \"EditUser\" int NOT NULL default '0',\n".
+" \"TimeStamp\" int4 NOT NULL default '0',\n".
+" \"LastUpdate\" int4 NOT NULL default '0',\n".
+" \"EditUser\" int4 NOT NULL default '0',\n".
" \"EditUserName\" varchar(150) NOT NULL default '',\n".
" \"Post\" text NOT NULL,\n".
" \"Description\" text NOT NULL,\n".
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."sessions\" (\n".
" \"session_id\" varchar(150) PRIMARY KEY NOT NULL default '',\n".
" \"session_data\" text NOT NULL,\n".
-" \"expires\" int NOT NULL default '0'\n".
+" \"expires\" int4 NOT NULL default '0'\n".
");", array(null));
sql_query($query,$SQLStat);
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."smileys\" (\n".
/*
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."tagboard\" (\n".
" \"id\" SERIAL PRIMARY KEY NOT NULL,\n".
-" \"UserID\" int NOT NULL default '0',\n".
+" \"UserID\" int4 NOT NULL default '0',\n".
" \"GuestName\" varchar(150) NOT NULL default '',\n".
-" \"TimeStamp\" int NOT NULL default '0',\n".
+" \"TimeStamp\" int4 NOT NULL default '0',\n".
" \"Post\" text NOT NULL,\n".
" \"IP\" varchar(20) NOT NULL default ''
");", array(null));
*/
$query=sql_pre_query("CREATE TABLE \"".$_POST['tableprefix']."topics\" (\n".
" \"id\" SERIAL PRIMARY KEY NOT NULL,\n".
-" \"ForumID\" int NOT NULL default '0',\n".
-" \"CategoryID\" int NOT NULL default '0',\n".
-" \"OldForumID\" int NOT NULL default '0',\n".
-" \"OldCategoryID\" int NOT NULL default '0',\n".
-" \"UserID\" int NOT NULL default '0',\n".
+" \"ForumID\" int4 NOT NULL default '0',\n".
+" \"CategoryID\" int4 NOT NULL default '0',\n".
+" \"OldForumID\" int4 NOT NULL default '0',\n".
+" \"OldCategoryID\" int4 NOT NULL default '0',\n".
+" \"UserID\" int4 NOT NULL default '0',\n".
" \"GuestName\" varchar(150) NOT NULL default '',\n".
-" \"TimeStamp\" int NOT NULL default '0',\n".
-" \"LastUpdate\" int NOT NULL default '0',\n".
+" \"TimeStamp\" int4 NOT NULL default '0',\n".
+" \"LastUpdate\" int4 NOT NULL default '0',\n".
" \"TopicName\" varchar(150) NOT NULL default '',\n".
" \"Description\" text NOT NULL,\n".
-" \"NumReply\" int NOT NULL default '0',\n".
-" \"NumViews\" int NOT NULL default '0',\n".
-" \"Pinned\" int NOT NULL default '0',\n".
-" \"Closed\" int NOT NULL default '0'\n".
+" \"NumReply\" int4 NOT NULL default '0',\n".
+" \"NumViews\" int4 NOT NULL default '0',\n".
+" \"Pinned\" int4 NOT NULL default '0',\n".
+" \"Closed\" int4 NOT NULL default '0'\n".
");", array(null));
sql_query($query,$SQLStat);
$query = sql_pre_query("INSERT INTO \"".$_POST['tableprefix']."topics\" (\"ForumID\", \"CategoryID\", \"OldForumID\", \"OldCategoryID\", \"UserID\", \"GuestName\", \"TimeStamp\", \"LastUpdate\", \"TopicName\", \"Description\", \"NumReply\", \"NumViews\", \"Pinned\", \"Closed\") VALUES\n".