Mysql database & config.php

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Paul

Paul

11/06/2006 20:28:00
Quote Anchor link
Ik heb een probleem,

hij maakt de database's maar niet aan:

Hij werkt met een _include-config.php en Mysql.txt

Moeten _include-config.php en mysql.txt niet bij elkaar in worden gezet?

In ieder geval, ik weet er geen dronder van, die dingen bij elkaar inzetten..:

_include-config.php :

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?php /* ------------------------- */

  if(!(@mysql_pconnect("localhost","gebruikersnaam","wachtwoord") && @mysql_select_db("database"))) {
    print <<<ENDHTML
<html>


<head>
<title>[( Criminals )]</title>
<link rel="stylesheet" type="text/css" href="css-v1.css">

</head>


<body style="background: #AA3C3C; margin: 0px;">
  <table width=100%>
    <tr><td class="subTitle"><b>Database Error</b></td></tr>
    <tr><td class="mainTxt">
    Er is een fout opgetreden in de database
    </td></tr>
  </table>
</body>

</html>
ENDHTML
;
    exit;
  }



  session_start();
  include("_include-funcs.php");
  if(isset($_SESSION['login'])) {
    $dbres                = mysql_query("SELECT *,UNIX_TIMESTAMP(`signup`) AS `signup`,UNIX_TIMESTAMP(`online`) AS `online` FROM `[users]` WHERE `login`='{$_SESSION['login']}'");
    $data                = mysql_fetch_object($dbres);
  }


  if(((count($_POST) > 0 && !isset($_POST['omnilog'])) || ($_POST['omnilog'] == 1 && count($_GET) > 1)) && isset($OMNILOG)) {
    $forwardedFor            = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['HTTP_CLIENT_IP'];
    $forwardedFor            = preg_replace('/, .+/','',$forwardedFor);
    $postVars                = addslashes(var_export($_POST,TRUE));
    if($postVars == "array (\n)" || (count($_POST) == 1 && isset($_POST['omnilog'])))
      $postVars                = "";
    $getVars                = addslashes(var_export($_GET,TRUE));
    if($getVars == "array (\n)")
      $getVars                = "";
    mysql_query("INSERT INTO `[omnilog]` VALUES(NOW(),'{$_COOKIE['login']}','{$_SERVER['REMOTE_ADDR']}','$forwardedFor','{$_SERVER['PHP_SELF']}','$postVars','$getVars')");
  }


  foreach($_POST as $key => $value) {
    if(gettype($_POST[$key]) == "array")
      foreach($_POST[$key] as $key2 => $value2)
        $_POST[$key][$key2]        = addslashes($_POST[$key][$key2]);
    else
      $_POST[$key]            = addslashes($_POST[$key]);
  }

  foreach($_GET as $key => $value) {
    if(gettype($_GET[$key]) == "array")
      foreach($_GET[$key] as $key2 => $value2)
        $_GET[$key][$key2]        = addslashes($_GET[$key][$key2]);
    else
      $_GET[$key]            = addslashes($_GET[$key]);
  }

  foreach($_COOKIE as $key => $value) {
    if(gettype($_COOKIE[$key]) == "array")
      foreach($_COOKIE[$key] as $key2 => $value2)
        $_COOKIE[$key][$key2]        = addslashes($_COOKIE[$key][$key2]);
    else
      $_COOKIE[$key]            = addslashes($_COOKIE[$key]);
  }




  $clientIP                = $_SERVER['REMOTE_ADDR'];
  $forwardedFor                = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['HTTP_CLIENT_IP'];
  $forwardedFor                = preg_replace('/, .+/','',$forwardedFor);
  $dbres                = mysql_query("SELECT `id` FROM `[users]` WHERE `level`='-1' AND (`IP`='$clientIP' OR `IP`='$forwardedFor')");
  if(mysql_num_rows($dbres) != 0) {
    print <<<ENDHTML
<html>


<head>
<title>[( Criminals )]</title>
<link rel="stylesheet" type="text/css" href="css-v1.css">

</head>


<body style="background: #AA3C3C; margin: 0px;">
  <table width=100% height=100%>
    <tr><td class="subTitle"><b>Ban</b></td></tr>
    <tr><td class="mainTxt">
    Het IP waarmee je speelt is geband
    </td></tr>
  </table>
</body>

</html>
ENDHTML
;
    exit;
  }




  if(isset($UPDATE_DB)) {
    $dbres                = mysql_query("SELECT UNIX_TIMESTAMP(`time`) AS `time`,`name` FROM `[cron]`");
    while($x = mysql_fetch_object($dbres))
      $update[$x->name]        = $x->time;

    if(floor($update['hour']/3600) != floor(time()/3600)) {
      $dbres                = mysql_query("SELECT GET_LOCK('hour_update',0)");
      if(mysql_result($dbres,0) == 1) {
        $cron_pass            = "secretcronpassword";
        mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='hour'");
        include("_cron_hour.php");
        mysql_query("SELECT RELEASE_LOCK('hour_update')");
      }
    }


    if(floor($update['day']/86400) != floor(time()/86400)) {
      $dbres                = mysql_query("SELECT GET_LOCK('day_update',0)");
      if(mysql_result($dbres,0) == 1) {
        $cron_pass            = "secretcronpassword";
        mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='day'");
        include("_cron_day.php");
        mysql_query("SELECT RELEASE_LOCK('day_update')");
      }
    }


    if(floor($update['week']/604800) != floor(time()/604800)) {
      $dbres                = mysql_query("SELECT GET_LOCK('week_update',0)");
      if(mysql_result($dbres,0) == 1) {
        $cron_pass            = "secretcronpassword";
        mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='week'");
        include("_cron_week.php");
        mysql_query("SELECT RELEASE_LOCK('week_update')");
      }
    }


    if(date('n',$update['month']) != date('n',time())) {
      $dbres                = mysql_query("SELECT GET_LOCK('month_update',0)");
      if(mysql_result($dbres,0) == 1) {
        $cron_pass            = "secretcronpassword";
        mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='month'");
        include("_cron_month.php");
        mysql_query("SELECT RELEASE_LOCK('month_update')");
      }
    }


    if((date('G',time()) >= 16 && date('z',time()) != date('z',$update['horserace'])) || (date('G',time()) >= 21 && date('G',$update['horserace']) < 21)) {
      $dbres                = mysql_query("SELECT GET_LOCK('horserace_update',0)");
      if(mysql_result($dbres,0) == 1) {
        $cron_pass            = "secretcronpassword";
        mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='horserace'");
        include("_cron_horserace.php");
        mysql_query("SELECT RELEASE_LOCK('horserace_update')");
      }
    }
  }


/* ------------------------- */ ?>


mysql.txt :



DROP TABLE IF EXISTS [clans];
CREATE TABLE [clans] (
name varchar(16) NOT NULL default '',
owner varchar(16) NOT NULL default '',
started datetime NOT NULL default '0000-00-00 00:00:00',
type int(1) NOT NULL default '0',
info text NOT NULL,
clicks int(5) NOT NULL default '0',
clickstoday int(3) NOT NULL default '0',
cash int(9) NOT NULL default '0',
bank int(9) NOT NULL default '10000',
bankleft int(2) NOT NULL default '10',
bankmax int(5) NOT NULL default '10000',
attwins int(6) NOT NULL default '0',
attlosses int(6) NOT NULL default '0',
defwins int(6) NOT NULL default '0',
deflosses int(6) NOT NULL default '0',
land int(6) NOT NULL default '1000',
homes int(3) NOT NULL default '2',
money_lvl1 int(3) NOT NULL default '0',
money_lvl2 int(3) NOT NULL default '0',
money_lvl3 int(3) NOT NULL default '0',
def_lvl1 int(3) NOT NULL default '0',
def_lvl2 int(3) NOT NULL default '0',
def_lvl3 int(3) NOT NULL default '0',
IPs text NOT NULL,
PRIMARY KEY (name)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Tabel structuur voor tabel `[cron]`
#

DROP TABLE IF EXISTS [cron];
CREATE TABLE [cron] (
time datetime default NULL,
name varchar(16) NOT NULL default '',
PRIMARY KEY (name)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Tabel structuur voor tabel `[handdruk]`
#

DROP TABLE IF EXISTS [handdruk];
CREATE TABLE [handdruk] (
id int(255) NOT NULL auto_increment,
naam varchar(255) NOT NULL default '',
inzet int(255) NOT NULL default '0',
wanneer datetime NOT NULL default '0000-00-00 00:00:00',
land int(10) NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Tabel structuur voor tabel `[logs]`
#

DROP TABLE IF EXISTS [logs];
CREATE TABLE [logs] (
time datetime default NULL,
IP varchar(32) default NULL,
forwardedFor varchar(32) default NULL,
login varchar(16) default NULL,
person varchar(16) default NULL,
code int(10) default NULL,
area varchar(32) default NULL
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Tabel structuur voor tabel `[messages]`
#

DROP TABLE IF EXISTS [messages];
CREATE TABLE [messages] (
id int(9) NOT NULL auto_increment,
IP varchar(32) NOT NULL default '',
forwardedFor varchar(32) default NULL,
time datetime default NULL,
from varchar(16) default NULL,
to varchar(16) default NULL,
subject varchar(50) NOT NULL default '',
message text NOT NULL,
read int(1) NOT NULL default '0',
inbox int(1) default '1',
outbox int(1) default '1',
PRIMARY KEY (id)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Tabel structuur voor tabel `[omnilog]`
#

DROP TABLE IF EXISTS [omnilog];
CREATE TABLE [omnilog] (
time datetime default NULL,
login varchar(16) default NULL,
IP varchar(32) default NULL,
forwardedFor varchar(32) default NULL,
file varchar(64) default NULL,
$_POST text,
$_GET text
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Tabel structuur voor tabel `[online]`
#

DROP TABLE IF EXISTS [online];
CREATE TABLE [online] (
time datetime default NULL,
IP varchar(32) default NULL,
login varchar(16) NOT NULL default '',
validate varchar(32) default NULL,
PRIMARY KEY (login),
KEY IP (IP)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Tabel structuur voor tabel `[temp]`
#

DROP TABLE IF EXISTS [temp];
CREATE TABLE [temp] (
id int(16) NOT NULL auto_increment,
time datetime default NULL,
login varchar(16) default NULL,
IP varchar(32) default NULL,
forwardedFor varchar(32) default NULL,
code int(10) unsigned NOT NULL default '0',
area varchar(32) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Tabel structuur voor tabel `[users]`
#

DROP TABLE IF EXISTS [users];
CREATE TABLE [users] (
id int(4) NOT NULL auto_increment,
signup datetime default NULL,
login varchar(16) default NULL,
pass varchar(32) default NULL,
level int(3) NOT NULL default '1',
IP varchar(32) default NULL,
email varchar(64) default NULL,
type int(1) default NULL,
url varchar(128) NOT NULL default '',
info text NOT NULL,
cash int(9) NOT NULL default '500',
bank int(9) NOT NULL default '500',
bankleft int(1) NOT NULL default '5',
bankmax int(4) NOT NULL default '2500',
clicks int(4) NOT NULL default '0',
clickstoday int(3) NOT NULL default '0',
attack int(6) NOT NULL default '0',
defence int(6) NOT NULL default '0',
attwins int(6) NOT NULL default '0',
attlosses int(6) NOT NULL default '0',
defwins int(6) NOT NULL default '0',
deflosses int(6) NOT NULL default '0',
clan varchar(26) NOT NULL default '',
clanlevel int(3) NOT NULL default '0',
bonus text NOT NULL,
turns int(3) NOT NULL default '100',
showonline int(1) NOT NULL default '1',
online datetime NOT NULL default '0000-00-00 00:00:00',
activated int(1) NOT NULL default '1',
Mes int(5) NOT NULL default '0',
Walter P99 int(5) NOT NULL default '0',
Uzi int(5) NOT NULL default '0',
MP5k int(5) NOT NULL default '0',
Flashbang int(5) NOT NULL default '0',
Granaat int(5) NOT NULL default '0',
Shotgun int(5) NOT NULL default '0',
G36C int(5) NOT NULL default '0',
SIG 552 int(5) NOT NULL default '0',
Ak47 int(5) NOT NULL default '0',
Ak Beta int(5) NOT NULL default '0',
Scherpschut geweer int(5) NOT NULL default '0',
M4 int(5) NOT NULL default '0',
Granaat Lanceerder int(5) NOT NULL default '0',
Bazooka int(5) NOT NULL default '0',
Kogelvrij vest int(5) NOT NULL default '0',
Bulldog int(5) NOT NULL default '0',
Camera int(5) NOT NULL default '0',
Hek int(5) NOT NULL default '0',
Muur int(5) NOT NULL default '0',
Bunker int(5) NOT NULL default '0',
Mobieltje int(1) NOT NULL default '0',
FN P90 int(5) NOT NULL default '0',
Chip int(5) NOT NULL default '0',
Helm int(5) NOT NULL default '0',
Politie wagen int(5) NOT NULL default '0',
IPs text NOT NULL,
blocklist text NOT NULL,
autocrime int(2) NOT NULL default '2',
Wiet int(5) NOT NULL default '0',
Xtc int(5) NOT NULL default '0',
Spuit int(5) NOT NULL default '0',
Hasj int(5) NOT NULL default '0',
auto int(5) NOT NULL default '0',
motor int(5) NOT NULL default '0',
f16 int(5) NOT NULL default '0',
tank int(5) NOT NULL default '0',
speedboot int(5) NOT NULL default '0',
smstegoed int(5) NOT NULL default '20',
kruisboog int(5) NOT NULL default '0',
lotto int(2) NOT NULL default '2',
rn varchar(20) NOT NULL default 'Nee',
wp varchar(10) NOT NULL default 'Nee',
lt int(2) NOT NULL default '0',
allie varchar(255) NOT NULL default '',
enemy varchar(255) NOT NULL default '',
avaurl varchar(255) NOT NULL default 'http://www.landen-criminals.nl/nopicture.gif',
harnas int(5) NOT NULL default '0',
pepperspray int(5) NOT NULL default '0',
bodyguard int(5) NOT NULL default '0',
ge varchar(9) NOT NULL default 'Man/Vrouw',
kettingzaag int(5) NOT NULL default '0',
bodyarmor int(5) NOT NULL default '0',
redeemer int(5) NOT NULL default '0',
grenadelauncher int(5) NOT NULL default '0',
sniperrifle int(5) NOT NULL default '0',
linkgun int(5) NOT NULL default '0',
minelayer int(5) NOT NULL default '0',
autoshop int(1) NOT NULL default '0',
weedplant int(1) NOT NULL default '0',
legim int(1) NOT NULL default '0',
herderh int(1) NOT NULL default '0',
Bankpas int(1) NOT NULL default '0',
Boksbeugel int(5) NOT NULL default '0',
Zwaard int(5) NOT NULL default '0',
land int(2) NOT NULL default '1',
leven int(5) default '100',
orgtime datetime NOT NULL default '0000-00-00 00:00:00',
gstart int(2) NOT NULL default '0',
opdruktijd datetime NOT NULL default '0000-00-00 00:00:00',
opdruktijd1 int(255) NOT NULL default '0',
HS tinyint(255) NOT NULL default '0',
huur datetime NOT NULL default '0000-00-00 00:00:00',
huur1 int(255) NOT NULL default '0',
change int(1) NOT NULL default '2',
werken1 int(5) NOT NULL default '0',
werken datetime NOT NULL default '0000-00-00 00:00:00',
gijzel int(2) NOT NULL default '10',
kogels int(8) NOT NULL default '50',
land varchar(32) NOT NULL default 'Nederland',


PRIMARY KEY (id),
UNIQUE KEY login (login)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Tabel structuur voor tabel `[weapons]`
#

DROP TABLE IF EXISTS [weapons];
CREATE TABLE [weapons] (
id int(4) NOT NULL auto_increment,
name varchar(30) NOT NULL default '',
area int(2) default NULL,
costs int(7) default NULL,
url varchar(40) default NULL,
attack int(5) default NULL,
defence int(5) default NULL,
max text,
eval text,
error text,
extra text,
PRIMARY KEY (id)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Tabel structuur voor tabel `garage`
#

DROP TABLE IF EXISTS garage;
CREATE TABLE garage (
id int(11) NOT NULL auto_increment,
login varchar(255) NOT NULL default '',
naam varchar(255) NOT NULL default '',
auto varchar(255) NOT NULL default '',
waarde varchar(25) NOT NULL default '',
verkoop varchar(100) NOT NULL default '',
UNIQUE KEY id (id)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Tabel structuur voor tabel `hogerlager`
#

DROP TABLE IF EXISTS hogerlager;
CREATE TABLE hogerlager (
id int(11) NOT NULL auto_increment,
login varchar(16) NOT NULL default '',
number varchar(32) default NULL,
round varchar(32) default NULL,
PRIMARY KEY (id),
UNIQUE KEY id (id)
) TYPE=MyISAM;





Groet

Paul
 
PHP hulp

PHP hulp

26/11/2024 23:04:39
 
Arjan Kapteijn

Arjan Kapteijn

11/06/2006 20:30:00
Quote Anchor link
Die mysql.txt hoeft helemaal nergens te staan, de inhoud daarvan zul je moeten importeren in je MySQL database, bijvoorbeeld doormiddel van PhpMyAdmin
 
Mebus  Hackintosh

Mebus Hackintosh

11/06/2006 20:32:00
Quote Anchor link
pfff criminals weer hoor natuurlijk ga met dit soort problemen naar:

http://www.criminalsfanaat.nl !

zo hebben wij geen last van onnodige criminals topics!

GR. mebus!
 
Paul

Paul

12/06/2006 16:09:00
Quote Anchor link
Sorry hoor,
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.