Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/iws8/html/indem/icdp/
Upload File :
Current File : /var/www/html/mmishra/iws8/html/indem/icdp/icdp.sql

<?php

mysql_connect("localhost", "root", "mysql");
$con = mysql_select_db('icdp');

// Table structure for table `announcements`

$sql = "DROP TABLE IF EXISTS `announcements`";
echo $sql;
mysql_query($sql, $con);

$sql =  "CREATE TABLE `announcements` (
  `rowid` int(11) NOT NULL auto_increment,
  `subject` enum('advertisement','enquiry','event','information','notice','tender') default 'information',
  `message` varchar(255) default NULL,
  `description` varchar(255) default NULL,
  `weburl` varchar(255) default NULL,
  `dateupload` date default '0000-00-00',
  `dateexpiry` date default '0000-00-00',
  `visibility` enum('enable','disable') default 'enable',
  `counter` int(11) NOT NULL default '1',
  PRIMARY KEY  (`rowid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1";
echo $sql;
mysql_query($sql);

// Table structure for table `accesslogs`

$sql = "DROP TABLE IF EXISTS `accesslogs`";
echo $sql;
mysql_query($sql);

$sql = "CREATE TABLE `accesslogs` (
  `rowid` int(11) NOT NULL auto_increment,
  `user` varchar(50) default 'guest',
  `referer` varchar(255) default 'index.php',
  `url` varchar(255) default NULL,
  `ip` varchar(15) default NULL,
  `dated` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`rowid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1";
echo $sql;
mysql_query($sql);


// Table structure for table `parameters`

$sql = "DROP TABLE IF EXISTS `parameters`";
echo $sql;
mysql_query($sql);

$sql = "CREATE TABLE `parameters` (
  `rowid` int(11) NOT NULL auto_increment,
  `keyname` varchar(50) default NULL,
  `keyvalue` varchar(500) default NULL,
  `dated` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`rowid`),
  UNIQUE KEY `setup_key` (`keyname`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1";
echo $sql;
mysql_query($sql);

// Dumping data for table `parameters`

$sql = "LOCK TABLES `parameters` WRITE";
echo $sql;
mysql_query($sql);

$sql = "INSERT INTO `parameters` VALUES (1,'organization','',now()),(10,'counter','1',now()),(3,'address','',now()),(5,'webmaster','',NOW()),(7,'footer','<b>Disclaimer:</b>This site contains general information for guidance only andcontents provided here cannot be used for any legal purposes.<br>Copyright © I, All Rights Reserved.\r\n<br>Developed by: Mithilesh Kr. Mishra',NOW()),(8,'email','contact@',NOW()),(9,'telephone','91-011-1234567',NOW())";
echo $sql;
mysql_query($sql);

$sql = "UNLOCK TABLES";
echo $sql;
mysql_query($sql);


// Table structure for table `webprofiles`

$sql = "DROP TABLE IF EXISTS `profiles`";
echo $sql;
mysql_query($sql);

$sql = "CREATE TABLE `webprofiles` (
  `rowid` int(11) NOT NULL auto_increment,
  `login` varchar(30) NOT NULL,
  `passwd` varchar(50) default NULL,
  `title` enum('Mr.','Sri.','Ms.','Mrs.','Miss','Dr.','Prof.') NOT NULL default 'Mr.',
  `fullname` varchar(50) default NULL,
  `parents` varchar(100) default NULL,
  `designation` varchar(50) default NULL,
  `email` varchar(50) default NULL,
  `webpage` varchar(250) default NULL,
  `dob` date default NULL,
  `dojoining` date default NULL,
  `address` text,
  `phoneno` varchar(60) default NULL,
  `hobbies` text,
  `bloodgroup` char(3) default NULL,
  `languageknow` varchar(100) default NULL,
  `expertise` text,
  `achievements` text,
  `webmaster` enum('yes','no') default 'no',
  PRIMARY KEY  (`rowid`),
  UNIQUE KEY `login` (`login`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1";
echo $sql;
mysql_query($sql);


// Dumping data for table `profiles`

$sql = "LOCK TABLES `profiles` WRITE";
echo $sql;
mysql_query($sql);

$sql = "INSERT INTO `profiles` (NULL,'login',passwd,webmaster) VALUES (1,'test','*23AE809DDACAF96AF0FD78ED04B6A265E05AA257','yes')";
echo $sql;
mysql_query($sql);

$sql = "UNLOCK TABLES";
echo $sql;
mysql_query($sql);


// Table structure for table `webpages`

$sql = "DROP TABLE IF EXISTS `webpages`";
echo $sql;
mysql_query($sql);

$sql = "CREATE TABLE `webpages` (
  `rowid` int(11) NOT NULL auto_increment,
  `linktext` varchar(255) NOT NULL,
  `parentid` int(11) NOT NULL default '0',
  `pageid` varchar(50) NOT NULL default '',
  `pagetitle` varchar(255) default NULL,
  `pagetype` enum('menu','html','php','url','file') default 'html',
  `pageaccess` enum('public','admin') default 'public',
  `pagecontent` longtext,
  `keyword` varchar(255) default NULL,
  `datecreation` datetime default NULL,
  `dateupdation` datetime NOT NULL,
  `dateexpiry` datetime NOT NULL,
  `visibility` enum('enable','disable') default 'enable',
  `counter` int(11) NOT NULL default '1',
  PRIMARY KEY  (`rowid`),
  UNIQUE KEY `pageid` (`pageid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1";
echo $sql;
mysql_query($sql);

// Dumping data for table `webpages`

$sql = "LOCK TABLES `webpages` WRITE";
echo $sql;
mysql_query($sql);

$sql = "INSERT INTO `webpages` VALUES (NULL,'Sign In',999,'login','Sign IN','php','public','login.php','login, signin',now(),now(),'0000-00-00 00:00:00','disable',3),(NULL,'File Upload',999,'uploads','File Upload','php','admin','uploads.php','file, upload',now(),now(),'0000-00-00 00:00:00','enable',8),(NULL,'Webpage',999,'webpages','Webpage','php','admin','webpages.php','webpage, html, php',now(),now(),'0000-00-00 00:00:00','enable',52),(NULL,'Parameter',999,'parameters','Parameter','php','admin','parameters.php','setup, parameter',now(),now(),'0000-00-00 00:00:00','enable',36),(NULL,'Download',999,'downloads','Downloads','php','public','downloads.php','download, file',now(),now(),'0000-00-00 00:00:00','disable',2),(NULL,'Announcement',999,'announcements','Announcement','php','admin','announcements.php','tender, notice, advertisement',now(),now(),'0000-00-00 00:00:00','enable',54),(NULL,'Profile',999,'profile39','Profile','php','admin','profiles.php','profile, personnel, contact, email',now(),now(),'0000-00-00 00:00:00','enable',9),(NULL,'Gallery',999,'gallery','Gallery','php','admin','gallery.php','file, uploads, gallery',now(),now(),'0000-00-00 00:00:00','disable',2)";
echo $sql;
mysql_query($sql);

$sql = "UNLOCK TABLES";
echo $sql;

mysql_query($sql);

echo "\n\ndone";

?>