summer training report(sushil)
TRANSCRIPT
-
7/27/2019 Summer Training Report(Sushil)
1/23
1
Trainee RegistrationAnd
Management System
ADVANCED LEVEL TELECOMMUNICATION
TRAINING CENTER (BSNL TRAINING CENTER)
GHAZIABAD-201002
GUIDE: SUBMITTED BY:
MR. OMENDRA GOVIND, SUSHIL KUMAR,
SUB DIVISIONAL ENGINEER, 10103611,
ALTTC BSNL GHAZIABAD CSE DEPARTMENT,
JAYPEE INSTITUTE OF
6 WEEK TRAINING INFORMATION TECHNOLOGY
-
7/27/2019 Summer Training Report(Sushil)
2/23
2
INDEX
1) Acknowledgement 32) Declaration 43) Description of Organization 54) Project description 85) Project work breakdown 96) Database design 107) Frontend and backend development 158) Snapshots 169) Appendix 20
10) References 23
-
7/27/2019 Summer Training Report(Sushil)
3/23
3
Acknowledgement
It gives me immense pleasure to express my profound gratitude to Jaypee Institute of
Information Technology, Noida to encourage students to undergo industrial training to
gain valuable practical experiences from various industries and companies. First of all,
I would like to express my gratitude towards Mr. Omendra Govind, SDE(IT) who
encouraged me to undergo this training at BSNLs Advanced Level Telecom Training
Center, Ghaziabad. I also extend my thanks to all the faculties and teaching staff at
ALTTC for their valuable support and assistance.
-
7/27/2019 Summer Training Report(Sushil)
4/23
4
DECLARATION
Sushil Kumar(10103611), student of JIIT, Sector 62, NOIDA hereby declare that the project entitled
Trainee Registration and Management System was completed by me under the guidance of
Mr. Omendra Govind during the period w.e.f 3 June 2013 to 12 July 2013. The same is hereby
approved.
Sushil Kumar
10103611, CSE
-
7/27/2019 Summer Training Report(Sushil)
5/23
5
DESCRIPTION OF ORGANIZATION
Bharat Sanchar Nigam Ltd. was incorporated on 15th september 2000 . It took
over the business of providing of telecom services and network management
from the erstwhile Central Government Departments of Telecom Services (DTS)
and Telecom Operations (DTO), with effect from 1st October 2000 on going
concern basis. It is one of the largest & leading public sector units providing
comprehensive range of telecom services in India.
BSNL has installed Quality Telecom Network in the country & now focusing on improving it, expanding the
network, introducing new telecom services with ICT applications in villages & winning customer's confidence.Today, it has about 43.74 million line basic telephone capacity, 8.83 million WLL capacity, 72.60 million GSM
capacity, 37,885 fixed exchanges, 68,162 GSM BTSs, 12,071 CDMA Towers, 197 Satellite Stations, 6,86,644
RKm. of OFC, 50,430 RKm. of microwave network connecting 623 districts, 7330 cities/towns & 5.8 lakhs
villages .
BSNL is the only service provider, making focused efforts & planned initiatives to bridge the rural-urban
digital divide in ICT sector. In fact there is no telecom operator in the country to beat its reach with its wide
network giving services in every nook & corner of the country & operates across India except New Delhi &
Mumbai. Whether it is inaccessible areas of Siachen glacier or North-Eastern regions of the country, BSNL
serves its customers with a wide bouquet of telecom services namely Wireline, CDMA mobile, GSM mobile,
Internet, Broadband, Carrier service, MPLS-VPN, VSAT, VoIP, IN Services, FTTH, etc.
BSNL is numero uno of India in all services in its license area. The company offers wide ranging & most
transparent tariff schemes designed to suit every customer. BSNL has 90.09 million cellular & 5.06 million
WLL customers as on 31.07.2011. 3G Facility has been given to all 2G connections of BSNL. In basic services,
BSNL is miles ahead of its rivals, with 24.58 million wire-line phone subscribers i.e. 71.93% share of the wire-
line subscriber base.
BSNL has set up a world class multi-gigabit, multi-protocol convergent IP infrastructure that provides
convergent services like voice, data & video through the same Backbone & Broadband Access Network. At
present there are 8.09 million broadband customers.
The company has vast experience in planning, installation, network integration & maintenance of switching &
transmission networks & also has a world class ISO 9000 certified Telecom Training Institute.
During the 2010-11, turnover of BSNL is around Rs. 29,700 Crores.
-
7/27/2019 Summer Training Report(Sushil)
6/23
6
VISION:
Be the leading telecom service provider in India with global presence. Create a customer focused organization with excellence in customer care, sales and marketing. Leverage technology to provide affordable and innovative telecom. Services/products across customer
segments.
MISSION:
Be the leading telecom service provider in India with global presence.
Generating value for all stakeholders - employees, shareholders, vendors & business associates Maximizing return on existing assets with sustained focus on profitability Becoming the most trusted, preferred and admired telecom brand To explore International markets for Global presence
Creating a customer focused organization with excellence in customer care, sales & marketing.
Developing a marketing and sales culture that is responsive to customer needs mere care, sales&marketing
Excellence in customer service-friendly, reliable, time bound, convenient and courteous service
Leveraging technology to provide affordable and innovative products/ services across customer segments
Offering differentiated products/services tailored to different service segments Providing reliable telecom services that are value for money
Providing a conducive work environment with strong focus on performance
Attracting talent and keeping them motivated Enhancing employees skills and utilizing them effectively Encouraging and rewarding individual and team/group performance
Establishing efficient business processes enabled by IT
Changing policies and processes to enable transparent, quick and efficient decision making Building effective IT systems and tools
-
7/27/2019 Summer Training Report(Sushil)
7/23
7
OBJECTIVES:
To be the Leading Telecom Services provider by achieving higher rate of growth so as to become aprofitable enterprise.
To provide quality and reliable fixed telecom service to our customer and thereby increase customersconfidence.
To provide customer friendly mobile telephone service of high quality and play a leading role as GSMoperator in its area of operation.
Aspiration
Be the leading Telecom Service Provider in India with global presence. Create a customer focused organisation with excellence in sales, marketting and customer care. Leverage technology to provide affordable and innovative products/services across customer segments Provide a conducive work environment with strong focus on performance Establish efficient business processes enabled by IT
Strategy for:
Rightsizing the manpower Providing greater customer satisfaction>/li>
Contribute towards:
Broadband customers base of 20 Mn in India by the end of 2011-12 as per broadband policy 2004. Providing telephone connections in villages as per Government policy.
To leverage the existing infrastructure of BSNL for facilitating implementation of other government
programmes and initiatives particularly in the rural areas.
-
7/27/2019 Summer Training Report(Sushil)
8/23
8
Project Description
Abstract
During the course of this training I worked with fellow trainees to implement an Online Training
Registration and Management Module using which the substantial part of training registration
process can be done online and after complete registration student can take the print out of this
fully filled registration form and get registration done.
It provides the students a convenient way to register since those who are not local to the place
can get themselves register without presenting themselves in person at the ALTTC office.
Features
Online Registrat ion form: This was the core feature of the module. It was a form with all thenecessary fields.
This form can be reached at http://alttc.bsnl.co.in/registration/registration_form.php
Facility to download registration form in PDF form: Functionality using which student candownload the filled form after successful registration in an easy to carry PDF format.
Prototype of admin panel using which: A not so feature full panel using whichadministrators at ALTTC can keep a eye on the registration process. Cancel any registration,
can get the information of the registered students and can download filled forms in PDF (just in
case student didn't brought it ).
http://alttc.bsnl.co.in/registration/registration_form.phphttp://alttc.bsnl.co.in/registration/registration_form.php -
7/27/2019 Summer Training Report(Sushil)
9/23
9
Project Work Breakdown
This module used PHP and MySQL the existing infrastructure that ALTTC use for their own
website.
The entire module was divided into following 4 major components
1.) Database Design.
2.) UI Design.
3.) Front end development and integration.
4.) Integration with existing website.
I with fellow trainees worked on Database Design, Back-end development (PHP), client-side
scripting and integration with existing website. UI Design was done by other trainees.
-
7/27/2019 Summer Training Report(Sushil)
10/23
10
Database Design
A database having many relations having different purposes ranging from metadata to list ofcolleges in India to relations for storing student's permanent information was designed. A
complete ER diagram of the complete database is there in subsequent pages.
Following is the list of tables with their structures and description
1)AdminS.No. Attribute Name Datatype Size Constraints
1 Email varchar 50 Not nullPrimary key
2 password varchar 50 Not null
Description: This tables holds the details of all the administrators at ALTTC which can login
using this information and can control many aspects of registration process.
2)BranchS.No. Attribute Name Datatype Size Constraints
1 id int 11 Not null
Primary key
2 Branch_name varchar 50 Not null
Description: List of all branches / major ( we didn't implemented an exhaustive list )
3)Cities:S.No. Attribute Name Datatype Size Constraints
1 location varchar 100 Not null
Primary key(combined)
2 City_state varchar 100 Not null
Primary key(combined)
Description: List of cities and states so as to give an intutive option to user to select state and
then corresponding city.
-
7/27/2019 Summer Training Report(Sushil)
11/23
11
4)Course_masterS.No. Attribute Name Datatype Size Constraints
1 Course_id int 5 Not null
Primary key
2 Course_name varchar 100 Not null
3 Course_category_id Int 5 Not null
Reference from training_category
Description: List of the domains available for training at ALTTC.
5)DegreeS.No. Attribute Name Datatype Size Constraints
1 id int 11 Not null
Auto Increment
Primary key
2 degree varchar 10 Not null
Unique
Description: Degree the student is pursuing.
6)MetadataS.No. Attribute Name Datatype Size Constraints
1 email varchar 100 Not null
Primary key(combined)
2 Ip_address varchar 100 Not null
Unique(combined)
3 timestamp timestamp - Not null
Default current_timestamp
On update current_ timestamp
Description: A metadata table which records the IP address of the student when he/she
registers. It can be used to track the student in case of any fraudulent activity.
-
7/27/2019 Summer Training Report(Sushil)
12/23
12
7)student_details
S.No. Attribute Name Datatype Size Constraints
1 email varchar 50 Not null
Primary key
2 fname varchar 20 Not null
3 mname varchar 20 Default null
4 lname varchar 20 Not null
5 dob date - Not null
6 fathername varchar 70 Not null
7 paddress varchar 100 Not null
8 caddress varchar 100 Not null
9 phoneno varchar 11 Not null
Description: Holds the almost permanent information of the student. This table is separate so
that the information can be persisted even if registration details are deleted.
8)training_categoryS.No. Attribute Name Datatype Size Constraints
1 Category_code int 11 Not null
Primary key
2 Category_name varchar 50 Not null
Description: List of the categories available for training at ALTTC.
9)UniversitiesS.No. Attribute Name Datatype Size Constraints
1 Univ_id Int 11 Not null
Auto increment
Primary key
2 Name Varchar 200 Not null
Unique(combined)
3 Location Varchar 100 Not null
Unique(combined)
Description: List of all the colleges and universities with theri locations ( again this list is not
exhaustive )
-
7/27/2019 Summer Training Report(Sushil)
13/23
13
10) registration_detailsS.No. Attribute Name Datatype Size Constraints
1 Reg_id Int 11 Not null
Primary key
Auto_increment
2 Univ_id Int 11 Not null
Reference from universities
3 Degree_id Int 11 Not null
Reference from degree
4 Branch_id Int 11 Not null
Reference from branch
5 State varchar 100 Not null
Reference from cities
6 duration Int 11 Not null
7 Hostel_acc Int 11 Not null
8 Dd_no_main Int 11 Not null
9 Dd_amount_main Int 11 Not null
10 Dd_no_hostel Int 11 Default null
11 Dd_amount_hostel Int 11 Default null
12 Branch_name_main Varchar 100 Not null
13 Branch_name_hostel Varchar 100 Default null
14 Photo_sig Varchar 50 Default null15 Photo_id Varchar 50 Default null
16 Course_id int 5 Not null
Reference from course
17 Category_code int 5 Not null
Reference from training_category
18 email varchar 50 Not null
Reference from student_details
19 City Varchar 100 Not null
Reference from cities
Description: Registration related details of the students. Information specific to the
student is stored in student details table.
-
7/27/2019 Summer Training Report(Sushil)
14/23
-
7/27/2019 Summer Training Report(Sushil)
15/23
15
Frontend Development and Integration
Frontend part
An HTML form to submit the required user details is part of the front end. Complete formvalidation using JavaScript and AJAX form upload so as to create an nice UI.
Description of most significant scripts is given below
1. Main.js : This was the heart script of the form. It handled almost all the functionality of the
form. The main feature was AJAX form submission and form validation.
2. Some more script for other AJAX requests to update the form in real time as user
interacts with it.
Technologies Used : jQuery Form submission plugin, Select2 Drop down box pluginto unable search in drop down boxes.
See Appendix for some code exerpts.
Backend part
Several PHP scripts to with varying purposes were implemented. Description of some of the
main scripts is given below.
1. Register.php : This is the main script which is responsible for storing the information from
form to the database. It has all sort of sanity checks implemented so that it doesn't leave
the database in corrupt state. It checks for CAPTCHA, checks if user has uploaded photos
and if everything is fine then it stores all the information in the database in atomic fashion.
This script talks with the front end using JSON as the medium of information exchange.
2. A bunch of files required for post registration activities namely login, information
updation and download of PDF form.
Technologies Used: FPDF the PDF generation library for PHP, MySQLI extension for more
robust database interaction. See Appendix for some code exerpts.
-
7/27/2019 Summer Training Report(Sushil)
16/23
16
SNAPSHOTS
-
7/27/2019 Summer Training Report(Sushil)
17/23
17
-
7/27/2019 Summer Training Report(Sushil)
18/23
18
S
Trainee Login
-
7/27/2019 Summer Training Report(Sushil)
19/23
19
Admin
-
7/27/2019 Summer Training Report(Sushil)
20/23
20
Appendix
This appendix contains some of the code excerpts written in PHP and JavaScript.
1.) Optional File Upload scriptif( !empty ( $_FILES ) ) {
// upload logicif( !empty($_FILES["photo"]) ) {
if( $_FILES["photo"]["error"] >0) {// photo
} else {$target_path ="uploads/";
$name = $_FILES["photo"]["name"];$ext = end(explode(".", $name));
$exploded = explode("@" , $_POST["email"]);$fname1 = $exploded[0];$fname2 = $exploded[1];$photo_file_name = "photo_{$fname1}{$fname2}.{$ext}";
$target_path = $target_path . $photo_file_name ;if(!move_uploaded_file($_FILES["photo"]["tmp_name"],
$target_path)){}
}}
if( !empty($_FILES["signature"]) ) {
if( $_FILES["signature"]["error"] > 0 ) {// signature
} else {
$target_path ="uploads/";
$name = $_FILES["signature"]["name"];$ext = end(explode(".", $name));
$exploded = explode("@" , $_POST["email"]);$fname1 = $exploded[0];$fname2 = $exploded[1];$sig_file_name = "signature_{$fname1}{$fname2}.{$ext}";
$target_path = $target_path . $sig_file_name ;if(!move_uploaded_file($_FILES["signature"]["tmp_name"],
$target_path)){}
}
}}
2.) Generating PDF using FPDF
-
7/27/2019 Summer Training Report(Sushil)
21/23
21
3.) Client side Form validation using JavaScript
function validate ( formData, jqForm, options ) {var data = preSubmit();var regex_email = /[a-zA-Z0-9\._]+@[a-zA-Z]+(\.[a-zA-z]{2,4})+/;var regex_name = /[a-zA-Z]+/;var regex_mo = /[0-9]{10}/;var regex_dd = /[0-9]{6}/;var index = 1;
var array = Array();
for ( var key in data ){var id = "", error = "";if( data[key] == null || data[key] == "" || data[key] == undefined ) {
error = key + " can't be left empty.";id = "#" + key + "_id";if(key=="fname"){
id="#name_id";}$(id).show();
$(id).text(error);
index++;}
}var drop_down = Array();drop_down['degree'] = $("#degree option:selected").text();drop_down['branch'] = $("#branch option:selected").text();drop_down['course'] = $("#course option:selected").text();drop_down['category'] = $("#category option:selected").text();drop_down['states'] = $("#states option:selected").text();drop_down['cities'] = $("#cities option:selected").text();drop_down['college'] = $("#colleges option:selected").text();
for (var key in drop_down ){if( drop_down[key] == "Please select an option" ){error = "Please select a " + key ;
id = "#" + key + "_id";$(id).text(error);$(id).show();
index++;}}
if( !((data['email']=="") || (data['email']==null)||(data['email']==undefined)) &&!regex_email.test(data['email'])){error = "Invalid Email Address" ;
id = "#email_id";$(id).text(error);$(id).show();index++;
}
if( !((data['fname']=="") || (data['fname']==null)||(data['fname']==undefined)) &&!regex_name.test(data['fname']) ){error = "Invalid First Name" ;
id = "#name_id";$(id).text(error);$(id).show();index++;
}
if( !((data['mobile_no']=="") || (data['mobile_no']==null)||(data['mobile_no']==undefined)) &&!regex_mo.test(data['mobile_no']) ) {error = "Invalid Mobile No" ;
id = "#mobile_no_id";$(id).text(error);
-
7/27/2019 Summer Training Report(Sushil)
22/23
22
$(id).show();index++;
}if( !((data['dd-main-number']=="") || (data['dd-main-number']==null)||(data['dd-main-number']==undefined)) && !regex_dd.test(data['dd-main-number']) ){error = "Invalid DD Number" ;
id = "#dd-main-number_id";$(id).text(error);index++;
}
if( !((data['dd-hostel-number']=="") || (data['dd-hostel-number']==null)||(data['dd-hostel-number']==undefined)) && !regex_dd.test(data['dd-hostel-number']) ){error = "Invalid DD Number" ;
id = "#dd-hostel-number_id";$(id).text(error);$(id).show();index++;
}
if( index > 1) {return false;
}
return true;
}
4.) AJAX based login systemvar options = {
type : 'GET',url : 'trainee_login_validation.php',dataType : 'json',beforeSubmit : validation,success : function(obj){
if(obj.auth){window.location =
"trainee_account.php";} else {
alert("Wrong login");}
},error : function(request,error){
console.log(request);}
}
$("#trainee_login").ajaxForm(options);
function validation ( formData, jqForm, options ) {
var email = formData[0].value;if( email == null || email == "" || email ==
undefined ) {$("#email_id").text('email cant be
empty');
return false;}return true;
}
-
7/27/2019 Summer Training Report(Sushil)
23/23
23
References
1.) PHP MySQL Tutorial on W3Schools.http://www.w3schools.com/php/php_mysql_intro.asp
2.) Regular Expressions Cookbook by Jan Goyvaerts, Steven Levithan ISBN :1449319432
3.) jQuery AJAX form submission
http://www.phpeveryday.com/articles/jQuery-AJAX-Form-Submission-P973.html
4.) Submit a Form without Refreshing page with jQuery and Ajax by Srinivas Tamada
http://www.9lessons.info/2009/04/submit-form-jquery-and-ajax.html
5.) The Principles of Cross Browser coding by Louis Lazaris
http://coding.smashingmagazine.com/2010/06/07/the-principles-of-cross-browser-css-coding/
6.) Achieve cross-browser functionality with HTML5 and CSS3 by Kris Hadlock
http://www.ibm.com/developerworks/library/wa-crossbrowsertechniques/
7.) Cross-browser compatibility with CSS3 by Louis Gubitosi
http://interactiveblend.com/blog/online/cross-browser-compatibility-with-css3/
8.) jQuery Form plugin code samples
http://malsup.com/jquery/form/#ajaxForm
9.) JSON with PHP tutorial on Tutorials Point
http://www.tutorialspoint.com/json/json_php_example.htm
10.) PHP JSON Manual
http://php.net/manual/en/book.json.php
11.) Encoding and Decoding JSON Data in PHP by Anil Gupta
http://www.phptutorialforbeginners.com/2013/01/encoding-and-decoding-json-data-in-php.html
12.) CAPTCHA creation in PHP
http://www.slideshare.net/vmadan89/captcha-creation-using-php
http://www.w3schools.com/php/php_mysql_intro.asphttp://www.w3schools.com/php/php_mysql_intro.asphttp://www.phpeveryday.com/articles/jQuery-AJAX-Form-Submission-P973.htmlhttp://www.phpeveryday.com/articles/jQuery-AJAX-Form-Submission-P973.htmlhttp://www.9lessons.info/2009/04/submit-form-jquery-and-ajax.htmlhttp://www.9lessons.info/2009/04/submit-form-jquery-and-ajax.htmlhttp://coding.smashingmagazine.com/2010/06/07/the-principles-of-cross-browser-css-coding/http://coding.smashingmagazine.com/2010/06/07/the-principles-of-cross-browser-css-coding/http://www.ibm.com/developerworks/library/wa-crossbrowsertechniques/http://www.ibm.com/developerworks/library/wa-crossbrowsertechniques/http://interactiveblend.com/blog/online/cross-browser-compatibility-with-css3/http://interactiveblend.com/blog/online/cross-browser-compatibility-with-css3/http://malsup.com/jquery/form/%23ajaxFormhttp://malsup.com/jquery/form/%23ajaxFormhttp://www.tutorialspoint.com/json/json_php_example.htmhttp://www.tutorialspoint.com/json/json_php_example.htmhttp://php.net/manual/en/book.json.phphttp://php.net/manual/en/book.json.phphttp://www.phptutorialforbeginners.com/2013/01/encoding-and-decoding-json-data-in-php.htmlhttp://www.phptutorialforbeginners.com/2013/01/encoding-and-decoding-json-data-in-php.htmlhttp://www.slideshare.net/vmadan89/captcha-creation-using-phphttp://www.slideshare.net/vmadan89/captcha-creation-using-phphttp://www.slideshare.net/vmadan89/captcha-creation-using-phphttp://www.phptutorialforbeginners.com/2013/01/encoding-and-decoding-json-data-in-php.htmlhttp://php.net/manual/en/book.json.phphttp://www.tutorialspoint.com/json/json_php_example.htmhttp://malsup.com/jquery/form/%23ajaxFormhttp://interactiveblend.com/blog/online/cross-browser-compatibility-with-css3/http://www.ibm.com/developerworks/library/wa-crossbrowsertechniques/http://coding.smashingmagazine.com/2010/06/07/the-principles-of-cross-browser-css-coding/http://www.9lessons.info/2009/04/submit-form-jquery-and-ajax.htmlhttp://www.phpeveryday.com/articles/jQuery-AJAX-Form-Submission-P973.htmlhttp://www.w3schools.com/php/php_mysql_intro.asp