-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcreate_table.php
60 lines (49 loc) · 2.02 KB
/
create_table.php
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
<?php
/*~ create_table.php
.---------------------------------------------------------------------------.
| Software: eKomi |
| Version: 2.0.2 |
| Updated: 2010-10-19 |
| Contact: +49 30 2000 444 999 | [email protected] |
| Info: http://ekomi.de |
| Support: http://ekomi.de |
| ------------------------------------------------------------------------- |
| Author: Simon Becker | eKomi |
| Copyright: (c) 2008-2010, eKomi Ltd. All Rights Reserved. |
'--------------------------------------------------------------------------*/
require_once( 'includes/config.inc.php' );
require_once( 'includes/func.ekomi.php' );
require_once( 'includes/func.log.php' );
require_once( 'includes/class.phpmailer.php' );
require_once( 'includes/func.api.' . check_api_type() . '.php' );
startup();
mysql_query('
CREATE TABLE IF NOT EXISTS `'.EKOMI_DB_TABLE.'` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`order_id` VARCHAR( 64 ) NOT NULL ,
`first_name` VARCHAR( 64 ) NOT NULL ,
`last_name` VARCHAR( 64 ) NOT NULL ,
`email` VARCHAR( 128 ) NOT NULL ,
`product_ids` VARCHAR( 512 ) NOT NULL ,
`product_names` TEXT NOT NULL ,
`time_read` INT NOT NULL ,
`time_sent` INT NULL DEFAULT NULL ,
`flag` TINYINT NOT NULL ,
INDEX ( `time_read` , `flag` ) ,
UNIQUE (
`order_id`
)
) ENGINE = MYISAM
') or die(mysql_error());
mysql_query('INSERT INTO
`'.EKOMI_DB_TABLE.'`
SET
`order_id` = "ektest_'.rand(10000,99999).'",
`first_name` = "Max",
`last_name` = "Mustermann",
`email` = "[email protected]",
`time_read` = 0,
`product_names` = \'a:1:{s:10:"eKomi_test";s:18:"eKomi product test";}\';
') or die(mysql_error());
echo 'Erfolgreich ausgeführt. Bitte diese Datei jetzt löschen!';
?>