-- http://www.phpmyadmin.net
--




--
-- Database: `bhartitek`
--
CREATE DATABASE IF NOT EXISTS `bhartitek` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `bhartitek`;

-- --------------------------------------------------------

--
-- Table structure for table `absent`
--

CREATE TABLE IF NOT EXISTS `absent` (
  `sl` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `roll` int(11) NOT NULL,
  `date` date NOT NULL,
  `update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`sl`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;

--
-- Dumping data for table `absent`
--

INSERT INTO `absent` (`sl`, `roll`, `date`, `update`) VALUES
(2, 201701, '2017-08-09', '2017-08-09 14:16:12'),
(4, 202009, '2017-08-09', '2017-08-09 18:05:26'),
(5, 202009, '2017-08-10', '2017-08-10 15:09:35'),
(6, 201702, '2017-08-11', '2017-08-11 13:37:57'),
(7, 201701, '2017-08-11', '2017-08-11 13:38:11'),
(8, 201721, '2017-08-11', '2017-08-11 16:08:03'),
(9, 201722, '2017-08-11', '2017-08-11 16:08:11');

-- --------------------------------------------------------

--
-- Table structure for table `asignment`
--

CREATE TABLE IF NOT EXISTS `asignment` (
  `batch` varchar(20) NOT NULL,
  `detail` varchar(100) CHARACTER SET utf8 NOT NULL,
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `file` varchar(100) CHARACTER SET utf8 NOT NULL,
  `type` varchar(10) CHARACTER SET utf8 NOT NULL,
  `size` int(11) NOT NULL,
  `updatedon` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `asignment`
--

INSERT INTO `asignment` (`batch`, `detail`, `id`, `file`, `type`, `size`, `updatedon`) VALUES
('2017IIT12_1', 'test', 2, '94082-smartp.pdf', 'applicatio', 33, '2017-08-01 14:40:43');

-- --------------------------------------------------------

--
-- Table structure for table `batch`
--

CREATE TABLE IF NOT EXISTS `batch` (
  `bid` int(11) NOT NULL AUTO_INCREMENT,
  `SessionSYear` int(11) NOT NULL,
  `Type` varchar(20) NOT NULL,
  `class` varchar(10) NOT NULL,
  `Bname` varchar(50) NOT NULL,
  `Bdetail` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`bid`),
  UNIQUE KEY `Bname` (`Bname`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `batch`
--

INSERT INTO `batch` (`bid`, `SessionSYear`, `Type`, `class`, `Bname`, `Bdetail`) VALUES
(1, 2017, 'IIT', '11', '2017IIT11_1', 'For class 11'),
(2, 2017, 'IIT', '12', '2017IIT12_1', 'For class 12'),
(4, 2017, 'Medical', 'Passout', '2017MedicalPassout_1', 'For Passouts'),
(5, 2017, 'IIT', '11', '', ''),
(6, 2018, 'Medical', 'Passout', 'test1234', 'test1234');

-- --------------------------------------------------------

--
-- Stand-in structure for view `batch1`
--
CREATE TABLE IF NOT EXISTS `batch1` (
`batch` varchar(50)
,`total` bigint(21)
);
-- --------------------------------------------------------

--
-- Table structure for table `bclass`
--

CREATE TABLE IF NOT EXISTS `bclass` (
  `BclassID` int(11) NOT NULL AUTO_INCREMENT,
  `Bclass` varchar(10) NOT NULL,
  PRIMARY KEY (`BclassID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `bclass`
--

INSERT INTO `bclass` (`BclassID`, `Bclass`) VALUES
(1, '11'),
(2, '12'),
(3, 'Passout');

-- --------------------------------------------------------

--
-- Table structure for table `btype`
--

CREATE TABLE IF NOT EXISTS `btype` (
  `BTypeID` int(11) NOT NULL AUTO_INCREMENT,
  `BType` varchar(10) NOT NULL,
  PRIMARY KEY (`BTypeID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `btype`
--

INSERT INTO `btype` (`BTypeID`, `BType`) VALUES
(1, 'IIT'),
(2, 'Medical');

-- --------------------------------------------------------

--
-- Table structure for table `cdownload`
--

CREATE TABLE IF NOT EXISTS `cdownload` (
  `Bname` varchar(50) NOT NULL,
  `detail` varchar(100) CHARACTER SET utf8 NOT NULL,
  `id` int(10) NOT NULL DEFAULT '0',
  `file` varchar(100) CHARACTER SET utf8 NOT NULL,
  `type` varchar(10) CHARACTER SET utf8 NOT NULL,
  `size` int(11) NOT NULL,
  `updatedon` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cdownload`
--

INSERT INTO `cdownload` (`Bname`, `detail`, `id`, `file`, `type`, `size`, `updatedon`) VALUES
('5514', 'Name List Details', 2, '98221-name-list.pdf', 'applicatio', 33, '2017-06-11 06:48:01'),
('5514', 'Bill Form', 3, '50065-bill1.pdf', 'applicatio', 45, '2017-06-11 07:29:34'),
('5537', 'Smart Prep Bill', 4, '25393-smartp.pdf', 'applicatio', 33, '2017-06-15 12:15:48');

-- --------------------------------------------------------

--
-- Table structure for table `cuser`
--

CREATE TABLE IF NOT EXISTS `cuser` (
  `sid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `Name` varchar(50) NOT NULL,
  `Address` varchar(200) NOT NULL,
  `City` varchar(50) NOT NULL,
  `phone` varchar(10) NOT NULL,
  `Email` varchar(50) NOT NULL,
  `DOB` date NOT NULL,
  `Pass` varchar(50) NOT NULL,
  PRIMARY KEY (`sid`),
  UNIQUE KEY `Email` (`Email`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `defaulters`
--

CREATE TABLE IF NOT EXISTS `defaulters` (
  `sl` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `roll` int(11) NOT NULL,
  `amount` int(11) NOT NULL,
  `duedate` date NOT NULL,
  `upadte` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`sl`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Stand-in structure for view `dues`
--
CREATE TABLE IF NOT EXISTS `dues` (
`sl` int(11)
,`name` varchar(50)
,`dues` decimal(33,0)
);
-- --------------------------------------------------------

--
-- Table structure for table `feesubmit`
--

CREATE TABLE IF NOT EXISTS `feesubmit` (
  `sl` int(11) NOT NULL AUTO_INCREMENT,
  `stu_sl` int(11) NOT NULL,
  `amount` int(11) NOT NULL DEFAULT '0',
  `date` date DEFAULT NULL,
  PRIMARY KEY (`sl`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=29 ;

--
-- Dumping data for table `feesubmit`
--

INSERT INTO `feesubmit` (`sl`, `stu_sl`, `amount`, `date`) VALUES
(1, 2, 1000, '2017-07-01'),
(2, 2, 2000, '2107-07-05'),
(3, 3, 5000, '2107-07-01'),
(4, 4, 1000, '2017-07-01'),
(5, 3, 5000, '2017-07-10'),
(6, 2, 1000, '2017-07-17'),
(7, 2, 1000, '2017-07-17'),
(8, 2, 1000, '2017-07-16'),
(9, 3, 1000, '2017-07-17'),
(10, 3, 500, '2017-07-01'),
(11, 3, 500, '2017-07-01'),
(12, 15, 0, NULL),
(14, 2, 3000, '2017-07-01'),
(15, 2, 1000, '2017-07-07'),
(16, 16, 0, NULL),
(20, 16, 1000, '2017-07-24'),
(21, 16, 1000, '2017-07-24'),
(22, 16, 1000, '2017-07-24'),
(23, 16, 1000, '2017-07-24'),
(24, 16, 1000, '2017-07-24'),
(25, 17, 0, NULL),
(26, 18, 0, NULL),
(27, 21, 0, NULL),
(28, 22, 0, NULL);

-- --------------------------------------------------------

--
-- Stand-in structure for view `report`
--
CREATE TABLE IF NOT EXISTS `report` (
`rno` int(11)
,`name` varchar(50)
,`roll` int(11)
,`amount` int(11)
,`date` date
);

-- --------------------------------------------------------

--
-- Table structure for table `smsdues`
--

CREATE TABLE IF NOT EXISTS `smsdues` (
  `sl` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `roll` int(11) NOT NULL,
  `amount` int(11) NOT NULL,
  `duedate` date NOT NULL,
  `update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`sl`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;

--
-- Dumping data for table `smsdues`
--

INSERT INTO `smsdues` (`sl`, `roll`, `amount`, `duedate`, `update`) VALUES
(1, 201711, 500, '2017-08-17', '2017-08-11 17:23:13'),
(4, 201701, 5000, '2017-08-25', '2017-08-12 07:53:44'),
(5, 201711, 5000, '2017-08-25', '2017-08-12 07:53:54'),
(6, 201721, 5000, '2017-08-25', '2017-08-12 07:54:12'),
(7, 201722, 5000, '2017-08-25', '2017-08-12 10:31:48');

-- --------------------------------------------------------

--
-- Table structure for table `smshistory`
--

CREATE TABLE IF NOT EXISTS `smshistory` (
  `sl` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `usl` int(11) NOT NULL,
  `mobile` varchar(13) NOT NULL,
  `type` varchar(20) NOT NULL,
  `sms` text NOT NULL,
  `status` varchar(200) NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`sl`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=46 ;

--
-- Dumping data for table `smshistory`
--

INSERT INTO `smshistory` (`sl`, `usl`, `mobile`, `type`, `sms`, `status`, `date`) VALUES
(2, 3, '9470365020', 'Notice', 'This is a test SMS\r\n', '\r\nsent,success,112943094,16832766,+919470365020\n\n', '2017-08-03 18:01:26'),
(3, 3, '9470365020', 'Notice', 'This is a test SMS\r\n', '\r\nsent,success,816163253,1381758285,+919470365020\n\n', '2017-08-03 18:08:34'),
(7, 2, '8981381881', 'Notice', 'This is a Test Group SMS\r\n', '\r\nsent,success,153679154,1977460699,+918981381881\n\n', '2017-08-03 18:44:22'),
(8, 2, '8981381881', 'Notice', 'This is a Test Group SMS\r\n', '\r\nsent,success,387756627,239944826,+918981381881\n\n', '2017-08-03 18:47:50'),
(9, 3, '9470365020', 'Notice', 'This is a Test Group SMS\r\n', '\r\nsent,success,105964809,1039303859,+919470365020\n\n', '2017-08-03 18:47:51'),
(10, 15, '8051048001', 'Notice', 'This is a Test Group SMS\r\n', '\r\nsent,success,416942868,2032274549,+918051048001\n\n', '2017-08-03 18:47:51'),
(11, 16, '8877458272', 'Notice', 'This is a Test Group SMS\r\n', '\r\nsent,success,193041476,1055879420,+918877458272\n\n', '2017-08-03 18:47:52'),
(12, 2, '8617215668', 'Notice', 'Please come to your room\r\n', '\r\nsent,success,362845707,1326643853,+918617215668\n\n', '2017-08-06 07:50:33'),
(13, 2, '8981381881', 'Notice', '\r\ntest SMS \r\n\r\n\r\nTest Line', '\r\nsent,success,388434626,1455602996,+918981381881\n\n', '2017-08-06 07:51:45'),
(14, 3, '9470365020', 'Notice', '\r\ntest SMS \r\n\r\n\r\nTest Line', '\r\nsent,success,236999075,1480526415,+919470365020\n\n', '2017-08-06 07:51:45'),
(15, 15, '8051048001', 'Notice', '\r\ntest SMS \r\n\r\n\r\nTest Line', '\r\nsent,success,394196427,859314241,+918051048001\n\n', '2017-08-06 07:51:46'),
(16, 16, '8877458272', 'Notice', '\r\ntest SMS \r\n\r\n\r\nTest Line', '\r\nsent,success,190155032,2134515420,+918877458272\n\n', '2017-08-06 07:51:46'),
(17, 2, '8981381881', 'Notice', '\r\nTest 1234', '', '2017-08-06 08:35:48'),
(18, 3, '9470365020', 'Notice', '\r\nTest 1234', '', '2017-08-06 08:35:48'),
(19, 15, '8051048001', 'Notice', '\r\nTest 1234', '', '2017-08-06 08:35:48'),
(20, 16, '8877458272', 'Notice', '\r\nTest 1234', '', '2017-08-06 08:35:48'),
(21, 2, '8981381881', 'Absent', 'Dear Parents, Your ward Arunoday Kumar Choudhary is absent in school on 2017-08-09.', '\r\nsent,success,110972833,1540402777,+918981381881\n\n', '2017-08-11 12:17:58'),
(22, 17, '9879879876', 'Absent', 'Dear Parents, Your ward a is absent in school on 2017-08-09.', '\r\nsent,success,762879163,1168783405,+919879879876\n\n', '2017-08-11 12:17:59'),
(23, 17, '9879879876', 'Absent', 'Dear Parents, Your ward a is absent in school on 2017-08-10.', '\r\nsent,success,454930233,210726616,+919879879876\n\n', '2017-08-11 12:17:59'),
(24, 2, '8981381881', 'Absent', 'Dear Parents, Your ward Arunoday Kumar Choudhary is absent in school on 2017-08-09.', '\r\nsent,success,420779044,2138414272,+918981381881\n\n', '2017-08-11 12:18:12'),
(25, 17, '9879879876', 'Absent', 'Dear Parents, Your ward a is absent in school on 2017-08-09.', '\r\nsent,success,731892031,502068489,+919879879876\n\n', '2017-08-11 12:18:13'),
(26, 17, '9879879876', 'Absent', 'Dear Parents, Your ward a is absent in school on 2017-08-10.', '\r\nsent,success,184788460,1417231354,+919879879876\n\n', '2017-08-11 12:18:13'),
(27, 2, '8981381881', 'Absent', 'Dear Parents, Your ward Arunoday Kumar Choudhary is absent in school on 2017-08-11.', '\r\nsent,success,355388180,1979975006,+918981381881\n\n', '2017-08-11 15:56:34'),
(28, 3, '9470365020', 'Absent', 'Dear Parents, Your ward Akhililesh is absent in school on 2017-08-11.', '\r\nsent,success,205133250,1551804358,+919470365020\n\n', '2017-08-11 15:56:34'),
(29, 21, '8083144718', 'Absent', 'Dear Parents, Your ward Saket Kumar is absent in school on 2017-08-11.', '\r\nsent,success,532602320,636950969,+918083144718\n\n', '2017-08-11 16:08:21'),
(30, 22, '8943335126', 'Absent', 'Dear Parents, Your ward Sachin Kumar is absent in school on 2017-08-11.', '\r\nsent,success,632866578,372055206,+918943335126\n\n', '2017-08-11 16:08:21'),
(31, 18, '9835313220', 'Notice', 'Jai Ho\r\n\r\nThis is a Test SMS\r\n', '\r\nsent,success,184914730,1216586573,+919835313220\n\n', '2017-08-11 16:11:19'),
(32, 21, '8083144718', 'Notice', 'Jai Ho\r\n\r\nThis is a Test SMS\r\n', '\r\nsent,success,203421257,113542822,+918083144718\n\n', '2017-08-11 16:11:20'),
(33, 22, '8943335126', 'Notice', 'Jai Ho\r\n\r\nThis is a Test SMS\r\n', '\r\nsent,success,140674294,831783365,+918943335126\n\n', '2017-08-11 16:11:20'),
(41, 18, '9835313220', 'Fee Dues', 'Dear Parents, Fee dues of your ward is 500. Plz pay it before2017-08-17.', '\r\nsent,success,240451354,1175272126,+919835313220\n\n', '2017-08-12 10:32:24'),
(42, 2, '8981381881', 'Fee Dues', 'Dear Parents, Fee dues of your ward is 5000. Plz pay it before2017-08-25.', '\r\nsent,success,511497348,1231658833,+918981381881\n\n', '2017-08-12 10:32:27'),
(43, 18, '9835313220', 'Fee Dues', 'Dear Parents, Fee dues of your ward is 5000. Plz pay it before2017-08-25.', '\r\nsent,success,400353646,636512450,+919835313220\n\n', '2017-08-12 10:32:27'),
(44, 21, '8083144718', 'Fee Dues', 'Dear Parents, Fee dues of your ward is 5000. Plz pay it before2017-08-25.', '\r\nsent,success,240909771,1363572888,+918083144718\n\n', '2017-08-12 10:32:28'),
(45, 22, '8943335126', 'Fee Dues', 'Dear Parents, Fee dues of your ward is 5000. Plz pay it before2017-08-25.', '\r\nsent,success,327031191,1147246832,+918943335126\n\n', '2017-08-12 10:32:28');

-- --------------------------------------------------------

--
-- Stand-in structure for view `smssend`
--
CREATE TABLE IF NOT EXISTS `smssend` (
`roll` int(11)
,`date` date
,`name` varchar(50)
,`sl` int(11)
,`mobile` decimal(10,0)
,`sms` varchar(109)
);
-- --------------------------------------------------------

--
-- Stand-in structure for view `smssend1`
--
CREATE TABLE IF NOT EXISTS `smssend1` (
`roll` int(11)
,`date` date
,`amount` int(11)
,`name` varchar(50)
,`sl` int(11)
,`mobile` decimal(10,0)
,`sms` varchar(81)
);
-- --------------------------------------------------------

--
-- Table structure for table `stdbatch`
--

CREATE TABLE IF NOT EXISTS `stdbatch` (
  `SBid` int(11) NOT NULL AUTO_INCREMENT,
  `sid` int(10) unsigned NOT NULL,
  `Bname` varchar(50) NOT NULL,
  PRIMARY KEY (`SBid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `students`
--

CREATE TABLE IF NOT EXISTS `students` (
  `Sl` int(11) NOT NULL AUTO_INCREMENT,
  `roll` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `fname` varchar(50) NOT NULL,
  `mname` varchar(50) NOT NULL,
  `address` varchar(200) NOT NULL,
  `mobile` decimal(10,0) NOT NULL,
  `email` varchar(50) NOT NULL,
  `dob` date NOT NULL,
  `batch` varchar(50) NOT NULL,
  `fee` int(11) NOT NULL,
  `active` char(1) NOT NULL DEFAULT 'Y',
  PRIMARY KEY (`Sl`),
  UNIQUE KEY `roll` (`roll`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ;

--
-- Dumping data for table `students`
--

INSERT INTO `students` (`Sl`, `roll`, `name`, `fname`, `mname`, `address`, `mobile`, `email`, `dob`, `batch`, `fee`, `active`) VALUES
(2, 201701, 'Arunoday Kumar Choudhary', 'Hari Shankar Choudhary', 'Mira Choudhary', '1291, 12/A', '8981381881', 'saket.bokaro@gmail.com', '1983-03-11', '2017IIT12_1', 20000, 'Y'),
(3, 201702, 'Akhililesh', 'Shilanand Thakur', 'Nirmala Thakur', 'Liluah', '9470365020', 'akhil.12345678@gmail.com', '1982-03-11', '2017IIT12_1', 15000, 'Y'),
(4, 201712, 'Anupam', 'Shilanand Thakur', 'N Thakur', '1291, Sec-12', '8981381881', 'anupam.a.choudhary2501@gmail.com', '1991-12-12', '2017MedicalPassout_1', 15000, 'Y'),
(15, 201814, 't', 't', 't', 't', '8051048001', 'ajay.kumar.bokaro@gmail.com', '2001-01-01', '2017IIT12_1', 15000, 'Y'),
(16, 201815, 't', 't', 't', 't', '8877458272', 'ajaykumarbokaro@gmail.com', '2001-01-01', '2017IIT12_1', 15000, 'Y'),
(17, 202009, 'a', 'a', 'a', 'a', '9879879876', 'a@aaa.com', '2001-07-29', '2017MedicalPassout_1', 15000, 'Y'),
(18, 201711, 'Saket', 'H S Choudhary', 'Mira Choudhary', 'Bokaro', '9835313220', 'saket@bhartitek.in', '1982-03-11', 'test1234', 0, 'Y'),
(21, 201721, 'Saket Kumar', 'H S Choudhary', 'Mira Choudhary', 'Bokaro', '8083144718', 'saket@hmiitsolution.co.in', '1982-03-11', 'test1234', 0, 'Y'),
(22, 201722, 'Sachin Kumar', 'T P Singh', 'NA', 'Bokaro', '8943335126', 'sachin_257953@yahoo.com', '1982-03-11', 'test1234', 0, 'Y');

-- --------------------------------------------------------

--
-- Table structure for table `studentsdel`
--

CREATE TABLE IF NOT EXISTS `studentsdel` (
  `Sl` int(11) NOT NULL DEFAULT '0',
  `roll` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `fname` varchar(50) NOT NULL,
  `mname` varchar(50) NOT NULL,
  `address` varchar(200) NOT NULL,
  `mobile` decimal(10,0) NOT NULL,
  `email` varchar(50) NOT NULL,
  `dob` date NOT NULL,
  `batch` varchar(50) NOT NULL,
  `fee` int(11) NOT NULL,
  `active` char(1) NOT NULL DEFAULT 'Y'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `studentsdel`
--

INSERT INTO `studentsdel` (`Sl`, `roll`, `name`, `fname`, `mname`, `address`, `mobile`, `email`, `dob`, `batch`, `fee`, `active`) VALUES
(9, 201801, 'a', 'a', 'a', 'a', '9999999999', 'ajay.kumar.bokaro@gmail.com', '2000-01-01', 'test', 15000, 'Y'),
(10, 201802, 's', 's', 's', 's', '9999999999', 'aditya@bhartitek.in', '2000-01-01', 'test', 15000, 'Y'),
(5, 201801, 'a', 'a', 'a', 'a', '9999999999', 'ajay.kumar.bokaro@gmail.com', '2000-01-01', 'test', 50000, 'Y'),
(6, 201802, 'a', 'a', 'a', 'a', '9999999999', 'aditya@bhartitek.in', '2000-01-01', 'test', 50000, 'Y');

-- --------------------------------------------------------

--
-- Table structure for table `tbl_docs`
--

CREATE TABLE IF NOT EXISTS `tbl_docs` (
  `CID` int(11) DEFAULT NULL,
  `detail` varchar(100) CHARACTER SET utf8 NOT NULL,
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `file` varchar(100) CHARACTER SET utf8 NOT NULL,
  `type` varchar(10) CHARACTER SET utf8 NOT NULL,
  `size` int(11) NOT NULL,
  `updatedon` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `tbl_docs`
--

INSERT INTO `tbl_docs` (`CID`, `detail`, `id`, `file`, `type`, `size`, `updatedon`) VALUES
(5514, 'Name List Details', 2, '98221-name-list.pdf', 'applicatio', 33, '2017-06-11 06:48:01'),
(5514, 'Bill Form', 3, '50065-bill1.pdf', 'applicatio', 45, '2017-06-11 07:29:34'),
(5537, 'Smart Prep Bill', 4, '25393-smartp.pdf', 'applicatio', 33, '2017-06-15 12:15:48');

-- --------------------------------------------------------

--
-- Table structure for table `tbl_imuploads`
--

CREATE TABLE IF NOT EXISTS `tbl_imuploads` (
  `CID` int(11) DEFAULT NULL,
  `detail` varchar(100) CHARACTER SET utf8 NOT NULL,
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `file` varchar(100) CHARACTER SET utf8 NOT NULL,
  `type` varchar(10) CHARACTER SET utf8 NOT NULL,
  `size` int(11) NOT NULL,
  `updatedon` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;

--
-- Dumping data for table `tbl_imuploads`
--

INSERT INTO `tbl_imuploads` (`CID`, `detail`, `id`, `file`, `type`, `size`, `updatedon`) VALUES
(5514, 'Indian National Flag', 7, '12855-flag.gif', 'image/gif', 31, '2017-06-10 12:36:22'),
(5523, 'My Photo', 8, '28230-scan0004.jpg', 'image/jpeg', 40, '2017-06-10 14:46:58'),
(5523, 'My 2nd Photo', 9, '66637-scan0005.jpg', 'image/jpeg', 36, '2017-06-10 14:47:38'),
(5534, 'Ashok Stambh', 10, '9698-ashoka_pillar.gif', 'image/gif', 3, '2017-06-10 17:56:29'),
(5535, 'Kohinoor Logo', 11, '65806-kohinoor-logo.gif', 'image/gif', 37, '2017-06-11 02:10:04'),
(5536, 'Test Image', 12, '82390-_scn0838.jpg', 'image/jpeg', 730, '2017-06-11 02:12:25'),
(5514, 'Ashok Stambh', 13, '32185-ashoka_pillar.gif', 'image/gif', 3, '2017-06-11 05:16:44'),
(5537, 'Ashok Stambh', 14, '82459-ashoka_pillar.gif', 'image/gif', 3, '2017-06-15 12:14:26'),
(5537, 'Test123', 15, '4199-wding1.png', 'image/png', 17, '2017-06-15 12:14:57');

-- --------------------------------------------------------

--
-- Stand-in structure for view `totalfee`
--
CREATE TABLE IF NOT EXISTS `totalfee` (
`stu_sl` int(11)
,`sum(amount)` decimal(32,0)
);

-- --------------------------------------------------------

--
-- Structure for view `batch1`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`bhartitek`@`localhost` SQL SECURITY DEFINER VIEW `batch1` AS select `students`.`batch` AS `batch`,count(`students`.`batch`) AS `total` from `students` group by `students`.`batch`;

-- --------------------------------------------------------

--
-- Structure for view `dues`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`bhartitek`@`localhost` SQL SECURITY DEFINER VIEW `dues` AS select `students`.`Sl` AS `sl`,`students`.`name` AS `name`,(`students`.`fee` - `totalfee`.`sum(amount)`) AS `dues` from (`students` join `totalfee`) where (`students`.`Sl` = `totalfee`.`stu_sl`);

-- --------------------------------------------------------

--
-- Structure for view `report`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`bhartitek`@`localhost` SQL SECURITY DEFINER VIEW `report` AS select `f`.`sl` AS `rno`,`s`.`name` AS `name`,`s`.`roll` AS `roll`,`f`.`amount` AS `amount`,`f`.`date` AS `date` from (`feesubmit` `f` join `students` `s`) where (`s`.`Sl` = `f`.`stu_sl`);

-- --------------------------------------------------------

--
-- Structure for view `smssend`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`bhartitek`@`localhost` SQL SECURITY DEFINER VIEW `smssend` AS select `a`.`roll` AS `roll`,`a`.`date` AS `date`,`s`.`name` AS `name`,`s`.`Sl` AS `sl`,`s`.`mobile` AS `mobile`,concat('Dear Parents, Your ward ',`s`.`name`,' is absent in school on ',`a`.`date`,'.') AS `sms` from (`absent` `a` join `students` `s`) where (`a`.`roll` = `s`.`roll`);

-- --------------------------------------------------------

--
-- Structure for view `smssend1`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`bhartitek`@`localhost` SQL SECURITY DEFINER VIEW `smssend1` AS select `a`.`roll` AS `roll`,`a`.`duedate` AS `date`,`a`.`amount` AS `amount`,`s`.`name` AS `name`,`s`.`Sl` AS `sl`,`s`.`mobile` AS `mobile`,concat('Dear Parents, Fee dues of your ward is ',`a`.`amount`,'. Plz pay it before ',`a`.`duedate`,'.') AS `sms` from (`smsdues` `a` join `students` `s`) where (`a`.`roll` = `s`.`roll`);

-- --------------------------------------------------------

--
-- Structure for view `totalfee`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`bhartitek`@`localhost` SQL SECURITY DEFINER VIEW `totalfee` AS select `feesubmit`.`stu_sl` AS `stu_sl`,sum(`feesubmit`.`amount`) AS `sum(amount)` from `feesubmit` group by `feesubmit`.`stu_sl`;

