Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
<html>
2
<head>
3
<title>DC-shout installer+Upgrader</title>
4
<link rel="stylesheet" type="text/css" href="http://codez.darkdevils.co.uk/css.css">
5
</head>
6
<body>
7
<?php
8
include "admin/config.php";
9
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
10
//installer (C)Devil Coderz 2004-2005 v1.1
11
//Dc-shout 2.0 upgrader+installer
12
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
13
 
14
if ($action=="")
15
{
16
?>
17
<center><b>Dc-Shout</b></center>
18
<br>
19
<br>
20
<a href="install.php?action=new">New install</a><br>
21
<a href="install.php?action=upgrade">Upgrade</a>
22
<?
23
}
24
 
25
//New install
26
 
27
if ($action =="new")
28
{
29
print "<center><b>Installing</b></center>";
30
print"<br><br>";
31
 
32
mysql_query("CREATE TABLE `dc_admin` (
33
  `id` bigint(20) NOT NULL auto_increment,
34
  `user` varchar(130) NOT NULL default '',
35
  `password` longtext NOT NULL,
36
  PRIMARY KEY  (`id`)
37
) TYPE=MyISAM AUTO_INCREMENT=2 ") or die("error adding table");
38
 
39
 
40
 
41
mysql_query("INSERT INTO `dc_admin` VALUES (1, 'admin', '098f6bcd4621d373cade4e832627b4f6')");
42
print "Added table1<br>";
43
 
44
mysql_query("CREATE TABLE `dc_setings` (
45
  `id` int(11) NOT NULL auto_increment,
46
  `shout` varchar(10) default 'y',
47
  `bbcode` varchar(10) default 'y',
48
  `word` varchar(10) default 'y',
49
  PRIMARY KEY  (`id`)
50
) TYPE=MyISAM COMMENT='Dc_sshout setings' AUTO_INCREMENT=2 ") or die("error adding table");
51
 
52
mysql_query("INSERT INTO `dc_setings` VALUES (1, 'y', 'y', 'y')");
53
print "Added table2<br>";
54
 
55
mysql_query("CREATE TABLE `dc_shoutbox` (
56
  `id` int(11) NOT NULL auto_increment,
57
  `name` longtext NOT NULL,
58
  `text` longtext NOT NULL,
59
  `ip` longtext NOT NULL,
60
  PRIMARY KEY  (`id`,`id`)
61
) TYPE=MyISAM COMMENT='Devil coderz shoutbox' ") or die ("error adding table");
62
print"Added table3<br>";
63
 
64
mysql_query("CREATE TABLE `dc_word` (
65
  `id` int(120) NOT NULL auto_increment,
66
  `word` text NOT NULL,
67
  PRIMARY KEY  (`id`)
68
) TYPE=MyISAM") or die ("error adding table");
69
print "Added table 4<br><br>";
70
 
71
print "All database stuff added now delete this file";
72
}
73
 
74
 
75
//upgrade dc-shout to 2.0
76
if ($action == "upgrade")
77
{
78
print "<center><b>Upgrading</b></center>";
79
print"<br><br>";
80
 
81
mysql_query("DROP TABLE IF EXISTS `dc_admin`;
82
CREATE TABLE `dc_admin` (
83
  `id` bigint(20) NOT NULL auto_increment,
84
  `user` varchar(130) NOT NULL default '',
85
  `password` longtext NOT NULL,
86
  PRIMARY KEY  (`id`)
87
) TYPE=MyISAM AUTO_INCREMENT=2") ;
88
 
89
mysql_query("INSERT INTO `dc_admin` VALUES (1, 'admin', '098f6bcd4621d373cade4e832627b4f6')");
90
print "upgrade part1 done <br>";
91
 
92
mysql_query("DROP TABLE IF EXISTS `dc_setings`;
93
CREATE TABLE `dc_setings` (
94
  `id` int(11) NOT NULL auto_increment,
95
  `shout` varchar(10) default 'y',
96
  `bbcode` varchar(10) default 'y',
97
  `word` varchar(10) default 'y',
98
  PRIMARY KEY  (`id`)
99
) TYPE=MyISAM COMMENT='Dc_sshout setings' AUTO_INCREMENT=2 ") ;
100
 
101
mysql_query("
102
INSERT INTO `dc_setings` VALUES (1, 'y', 'y', 'y')");
103
print "upgrade part2 done <br>";
104
 
105
mysql_query("DROP TABLE IF EXISTS `dc_word`;
106
CREATE TABLE `dc_word` (
107
  `id` int(120) NOT NULL auto_increment,
108
  `word` text NOT NULL,
109
  PRIMARY KEY  (`id`)
110
) TYPE=MyISAM ") ;
111
print "upgrade part3 done <br><br>";
112
print "updating done:) now delete this file";
113
}
114
?>
115
 
116
</body>
117
</html>
118
 
119
 
120
 
121
 
122
 
123
 
124
 
125
 
126
 
127