Viewing file: --install.php (1.82 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/***********************************************************************
- MemHT Portal -
Copyright (c) 2007 by Miltenovik Manojlo
http://www.memht.com
License:
Creative Commons Attribution-ShareAlike 3.0 License
http://creativecommons.org/licenses/by-sa/3.0/
***********************************************************************/
//======================================================================
// MySQL Database Installer: MemHT Calendar of Events
//======================================================================
//===========================================
//Database: Connect
//===========================================
require_once("../../inc/inc_config.php");
require_once("../../inc/inc_database.php");
$dblink = new database();
$dblink->connect();
require_once("../../inc/inc_functions.php");
require_once("../../inc/inc_login.php");
if (isAdmin($admin)) {
$dblink->query("CREATE TABLE `memht_calendar_events` (
`id` int(10) NOT NULL auto_increment,
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`title` varchar(255) NOT NULL default '',
`text` text NOT NULL,
`author` varchar(255) NOT NULL default '',
`ip` varchar(15) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM;");
$dblink->query("INSERT INTO `memht_pagine` (`id`,`nome`,`titolo`,`fullscreen`,`rank`,`enabled`) VALUES (NULL ,'calendar','Calendar of events','1','0','1');");
echo "<b>Finished!</b><br><font color='#990000'>Do not forget to delete the install.php file!</font>";
} else {
die("<b>Access Denied!</b><br>You must be logged as administrator to execute this file");
}
//===========================================
//Database: Disconnect
//===========================================
$dblink->disconnect();
?>
|