clipbucket/upload/plugins/global_announcement/install_global_announcement.php

23 lines
570 B
PHP
Raw Normal View History

2009-08-25 12:16:42 +00:00
<?php
require_once('../includes/common.php');
//Creating Table for anncoument if not exists
function install_global_announcement()
{
global $db;
$db->Execute(
'CREATE TABLE IF NOT EXISTS `'.tbl("global_announcement").'` (
2009-08-25 12:16:42 +00:00
`announcement` text NOT NULL
) ENGINE=MyISAM;'
);
//inserting new announcment
$db->Execute("INSERT INTO ".tbl('global_announcement')." (announcement) VALUES ('')");
2009-08-25 12:16:42 +00:00
}
//This will first check if plugin is installed or not, if not this function will install the plugin details
install_global_announcement();
?>