-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinstall.php
More file actions
25 lines (21 loc) · 727 Bytes
/
install.php
File metadata and controls
25 lines (21 loc) · 727 Bytes
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
<?php
/*
THIS SCRIPT WILL SELF-DESTRUCT AFTER EXECUTION!
The purpose of this script is clear: create table `updates` inside your RDBMS.
Everyone loves auto-installers, right?
(Make sure your DB data are VALID before executing this script.)
*/
$db = include_once(__DIR__."/include/use_db.php");
$db->pdo->query(
"CREATE TABLE IF NOT EXISTS `updates` (
`update_id` bigint(20) NOT NULL,
`message_id` bigint(20) NOT NULL,
`from_id` bigint(20) NOT NULL,
`from_username` varchar(255),
`date` bigint(20) NOT NULL,
`text` text NOT NULL,
PRIMARY KEY (`update_id`,`message_id`)
)");
class SelfDestroy{function __destruct(){unlink(__FILE__);}}
$installation_finished = new SelfDestroy();
?>