Professional Documents
Culture Documents
DEPARTMENT OF: LOVELY SCHCHOOL OF TECHNOLOGY AND SCIECNE (LHST-CA) LOVELY PROFESSIONAL UNIVERSITY PHAGWARA
FACULTY ADVISOR
INTERNAL FACULTY
KAUR
Declaration
I hereby declare that the project work entitled News Era is an authentic record of my own work carried out at lovely InfoTech as requirements of industry internship project for the award of degree of MCA Lovely Professional University, Phagwara, under the guidance of Mr. Gurinder Singh Bajwa (Industry coordinator) and Ms. Mandeep kaur (Faculty coordinator), during January to May 2012. Group-5 Date: 11-05-2012
It is certified that the above statement made by the student is correct to the best of our knowledge and belief.
ACKNOWLEDGEMENT
2
The satisfaction that accompanies the successful completion of the task would be incomplete without the mention of the people whose Ceaseless cooperation made it possible, whose constant guidance and encouragement crown all efforts with success. We are grateful to our Project Guide Mr. Gurinder Singh Bajwa for the inspiration and the constructive suggestions that helped us in preparation of the project News Era.
Table of Contents
1
2. PROFILE OF THE PROBLEM (NEWS ERA) --------------------------------1. System profile 3. EXISTING SYSTEM -----------------------------------------------------------------I. Problem in the system II. major objectives not fulfilled in existing system III. solution we provide in new system
9- 11
4 PROBLEM ANALYSIS -------------------------------------------------------------- 12- 13 I. Feasibility Study Technical Feasibility Economical Feasibility Operational Feasibility 5. SOFTWARE REQUIREMENT SPECIFICATION (SRS) ------------------- 14- 19 6. DESIGN ----------------------------------------------------------------------------------- 19- 33 a) b) c) d) e) Database Diagram DFD ER-Diagram Flow Chart Class Diagram
7. TESTING ----------------------------------------------------------------------------------34-38 7.1 UNIT TESTING 7.2 INTEGRATION TESTING 7.3 SYSTEM TESTING 7.4 BLACK BOX TESTING 7.5 WHITE BOX TESTING 7.6 PERFORMANCE TESTING
7.7 SECURITY TESTING 8. TEST CASES------------------------------------------------------------------------------ 38-65 8.1 TEST CASES FOR LOGIN FORM 8.2 TEST CASES FOR REGISTRATION FORM 8.3 TEST CASES FOR CONTACT US FORM 8.4 TEST CASES FOR FORGET PASSWORD FORM 8.5 TEST CASES FOR SELECT CATEGORY FORM 8.6 TEST CASES FOR UNREGISTER FORM 8.7 TEST CASES FOR CHANGE PASSWORD 8.8 TEST CASES FOR MANAGE YOUR PROFILE FORM 8.9 TEST CASES FOR ADD CATEGORY BY ADMIN 9. IMPLEMENTATION------------------------------------------------------------------ 66-69 9.1. CONVERSION PLAN: 9.2. POST IMPLEMENTATION & MAINTENANCE 9.2.1 POST IMPLEMENTATION 9.2.2 MAINTENANCE 9.2.2.1 CORRECTIVE 9.2.2.2 PERFECTIVE 9.2.2.3 ADAPTIVE 9.2.2.4 PREVENTATIVE 10. PROJECT LEGACY------------------------------------------------------------------- 69-71 10.1 CURRENT STATUS OF THE PROJECT 10.2 FUTURE SCOPE AND FUTURE ENHANCEMENT 10.3 TECHNICAL AND MANAGERIAL SKILLS LEARNT 11. USER MANUAL (HELP GUIDE) ----------------------------------------------------72-80 10.1 USER MODULE 10.1.1 HOME PAGE 10.1.2 USER REGISTRATION 10.1.3 LOGIN
5
10.1.4 FORGET PASSWORD 10.1.5 CHANGE PASSWORD 10.1.6 UPDATE PROFILE 10.1.7 FEEDBACK 12. SOURCE CODE -------------------------------------------------------------------------- 81-103 12.1 SOURCE CODE OF LOGIN PAGE 12.2 SOURCE CODE OF REGISTERATION FORM 12.3 SOURCE CODE OF FEEDBACK FORM 12.4 SOURCE CODE OF FORGET PASSWORD 12.5 SOURCE CODE FOR USER PROFILE 12.6 SOURCE CODE FOR USER HOME 13. ROLE ASSIGN ---------------------------------------------------------------------------- 104 14. BIBLIOGRAPHY-------------------------------------------------------------------------- 105
1. ORGANIZATION OVERVIEW
Introduction
LPU is one of the few Indian universities, which can have abundance of computing resources and network across the campus. LPU believes in utilizing technology to the fullest, and to retain its position as one of the best IT-enabled universities. IT Enabled Campus
Complete Wi-Fi Campus supported on the technology from RUCKUS and CISCO
All blocks and buildings are connected through ultra-high speed fibre optic backbone from MOLEX Most powerful servers from HP/IBM for 100% redundancy and efficient data management Most sophisticated surveillance and access control system for complete security High end Biometric systems for attendance of faculty 40 servers 150 workstations 5000 clients that are a mix of latest Core 2 Duo, Dual Core and Quad Core computers Dedicated and secured Data center with powerful Blade Servers Cisco catalyst 6509E core switch to provide the needed scalability and traffic control Internet facility with 500 Mbps dedicated leased line Secured network using high end firewall security feature
Lovely InfoTech
Lovely InfoTech is the software arm of the university that is providing the much needed IT support to make the entire system of LPU efficient and reliable. Lovely InfoTech is involved in the development and implementation of IT projects for LPU. These projects also provide hands on experience to the students in handling technology. A special wing of Lovely InfoTech employs promising LPU Computer Science students, for software development work. This department also plays a vital role in developing and maintaining the University Management System (UMS).
Department of Software Development (using Technology asp.net ,C#,vb.net) Department of Website Development (php, css design, etc.) Department of IT Data Center Department of Training Center
Browsing through the News Era to see the News Categories that are there in each category of News like Business, Politics, Sports, Education news etc. Creating a Session so that users can see there own categories and a guest cannot visit the administrator profile. Use of technologies like RSS and Ajax. Users should be able to mail to the news which he/she see on the page to their friends. Guest Users can send the feedback to the administrator. Updating the news categories for users, profile updation, content management.
Present top news in each category of news in the home page like Business, Education, Entertainment, and health news etc. Strategic data for Administrators and users about the news those are popular in each category. Showing the friends affected by the news. Showing the news liked by the users.
8
Administrator are responsible for content management, representing news, user's feedback, updating news status and answering client's queries through messages. . Initial non functional requirements: Secure access of confidential data (users details). 24 X 7 availability Better component design to get better performance at peak time Flexible service based architecture will be highly desirable for future extension
3. EXISTING SYSTEM
In current competitive scenario every business establishment needs quality processes to increase their efficiency as well as improve their productivity. It is of vital importance that manual, time consuming & monotonous operations are automated so as to streamline the working of an organization. Since, the existing system (manual work) takes more time and manpower for processing. It is keeping in mind this business philosophy (mantra) that we propose a News Era. Our system deals with all the news which a user needs to see. This website Provides a platform from where a user can see any news categories which he or she wants to see and also see who are affected by the news.. We can compare our website with an existing news website like indiatimes.com which only provides news of various categories in an unorganized way but on the other hand News Era provides user specific news along with their facebook friends who are affected by the various news events. Through this API we can locate our friends easily and aware them about the nearest news events occurring at their residing areas.
PROBLEMS/ NEED
Data Maintenance: It is difficult to maintain the Details, i.e the news that has been completed and the number of news not completed at all will be stored centrally.
Different websites for different news: User has to visit different websites for different Time consuming search for news: It is difficult for anybody to search all the news of
User's CHOICE: Users
different categories. can't visit their own choice of news so to overcome this we need to develop News Era user can add their own categories and can see the news.
Effected friends: by which news which friends are effected user Listing Users details: all the details
can't check.
PROBLEM OF HANDLING NUMBER OF NEWS BOTH LARGE AND SMALL: All news are
SOLUTIONS/APPROACH
These steps will be considered to solve above mentioned problems: Online registration
Flexibility among user and Administrator. Users can manage news categories and their profiles Search option is available for administrator Easy to maintain the news content Administration module for assigning roles, creating, deleting and updating users
10
Screen
Shot:
4. PROBLEM ANALYSIS
11
3 News category module 4 Facebook module 7 Help and support 8 Database management
a) Fetch User Information b) Provide News according to Interest of User. c) Show News of their friend Location. Will be accessible for all users and Clients. Store all the records in the relevant Tables Easy maintenance of the database
FEASIBILITY
STUDY
Feasibility study is the process of determination of whether or not a project is worth doing. Feasibility studies are undertaken within tight time constraints and normally culminate in a written and oral feasibility report.
12
1.1.
ASSUMPTIONS
1. It is assumed that system will provide a user friendly interface which is easy to understand and manage. 2. User need to have basic knowledge of computers and internet. 3. Administrator has the complete right of accessing database and profiles of Administrator user and guest. 4. Administrator has the permission to add new News Category or modify existing Category. 5. Administrator has also the permission to add or delete the users and also restrict the user for any permission.
1.2.
RISK ASSESSMENTS
Network failure can interrupt the communication among users/Client/ Administrator. The availability of required number of users may affect the system, during the online communication process. There can be Unavailability of the Facebook Information.
which is an online News Website and connecting with friends and family members. This Software Requirements Specification provides a complete description of all the functions and General description of News Era website.
Requirements elicitation Requirements analysis and negotiation Requirements specification System modeling Requirements validation Requirements management
14
with a database, investing the time required to learn the principles of good design makes sense. In the end, you are much more likely to end up with a database that meets your needs and can easily accommodate change. When you create a database, you store your data in tablesSubject-based lists of rows and columns. For instance, you might create a Contacts table to store a list of names, addresses and telephone numbers, or a products table to store information about products. You should always start the design of a database by first creating its tableseven before you create any other database objects. Ms. SQL server provides several tools that you can use to familiarize yourself with the structure of a particular database. Within a SQL Server database file, you can use: 1. Tables to store your data. 2. Queries to find and retrieve just the data you want. 3. Forms to view, add, and update data in tables. 4. Reports to analyze or print data in a specific layout.
Specific Requirements
Hardware Requirements: TYPE Processor Speed RAM MONITOR Hard Disk Input Device SPECIFICATIONS Pentium IV or above 266 MHz or above (used 1.6 GHz) 1 GB VGA Color 5 GB or more (used 120 GB) Mouse and Keyboard
Software Requirements:
15
Technical Requirements:
TRID 1 Description Microsoft Visual Studio 2008 Imp 1 Details It is used to add controls. Tool that provide overall environment for development of 2 3 4 5 6 7 8 9 NET Framework 3.5 Microsoft SQL Server 2008 Ajax Cascading Style Sheets J Query C# HTML Java script 1 1 1 1 2 1 1 1 survey expert. Used to support no. of languages For the back end database of the website To implement dynamic Toolbox controls It is used to apply designs. It is used to apply visual Effects. It is used to code actions to take place. It is used to add visual effects and data. It is used to add Effects .
Legend:
TRID = Technical Requirement Identifier Imp = Importance 1 = Essential Included in this release 2 = Beneficial (but not essential)
ecommerce market. The Software Requirements Specifications intends to identify the flaws in the current existing system and propose an alternative or a solution to them.
Website Functions:
It consists of three modules 1) User module 2) Administrator module 3) Facebook API module A user should have account to use for advance functionality of website. Feedback will be available only to the users and guest users. User has to select from the list of categories to available to his/her account User can add the categories to view the news User with that help of facebook account can connect with the friends.
Administrator also manages the news that will be properly managed on the basis of following parameters: 1. Location based news and friends 2. Like based news 3. Home town based news
Must maintain the website and update the same making necessary changes at times. They must take care of the security issues involved in the users accounts. They must inform the users about their news categories status and keep them updated.
They must receive feedbacks from their users or any users about their system and act upon the relevant ones. Look up at all the legal issues involved with the business.
17
Registered Users: They are the genuine users of the website. They can see the news categories, add the new categories, can remove the categories, can update their profile and categories. Guest Users: Guest user can view the website can use the different website options and a facility has been provided to give their feedback to the administrator. Users don't have permission to access the advance features of website like they can't add their favorite categories to view the news. To access these types of features user need to be registered in this website. 1. ADMINISTRATION (AUTHENTICATION AND AUTHORIZATION) This module belongs to higher authority people will have full right to access and change staff, users, members of website, news resources and other module contents. Main responsibilities of the administrator are given below: 1. Create/Edit Roles 2. Access Rights 3. Create/Edit Menus/Links 4. User Profile Management 5. Database Management 6. News Categories Management 2. REGISTRATION: User profile registration User categories registration This module will include the registration of the Customer as well as Restaurant.
3. USER MANAGEMENT: user Details friends Details user like location region based details This module will contain all details of registered users, registered categories and this module can be accessed by the administrator and those staff members which are assigned to handle this module. 4. News MANAGEMENT: This module will contain all details of News, Categories, RSS news resources etc.. 5. Categories MANAGEMENT: This module will contain all details of all special categories and sub categories which add by the
18
users like new categories, update the categories, remove the categories . 6. SEARCHING: In this module the user can search rapidly and efficiently for news. 7. FEEDBACK: In this module customer should be able to comment about their experience at any restaurant and give them between one and five stars. Other users should be able to view these comments.
6. DESIGN
DATABASE
DIAGRAM
Tables :
172.19.2.81>Group5>Tables
19
Columns
Columns
21
c. [dbo].[SubCat]
172.19.2.81> group5 > Tables > dbo. Subcat
Columns
22
Columns
23
f.
[dbo].[feedback]
Columns
24
DFD
Level 0:
25
Level 1:
It includes various modules with different functionality and each user can access these modules according to his/her rights.
26
27
ENTITY-RELATIONSHIP DIAGRAMS E-R diagrams represent the different entities and their relationships it also defines the attributes associated with each entity. Entities are represented in rectangle ( ), attributes are represented in ovals ( ) and relationships are represented by diamonds ( ). There are two types of E-R diagrams: General ER diagrams And Crow-Foot Notations
28
ER
29
30
CLASS DIAGRAM:
31
Main Modules
32
Home Page
Login Register Contact News About Us
News Information
Category wise News Live score Board Videos
User Account
Account Setting Managing News Category
Admin Account
Account Setting Managing User Account Managing News Show Feedback
Facebook
Login Fetching Friends
33
7. TESTING
Software testing is an investigation conducted to provide information about the quality of the product or service under test. Software testing also provides an objective, independent view of the software to allow the business to appreciate and understand the risks at implementation of the software. Software testing is any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results Software Testing is the process of executing a program or system with the intent of finding errors. Software testing can also be stated as the process of validating and verifying that a software program/application/product:
FUNCTIONALITY (EXTERIOR QUALITY) CORRECTNESS EFFICIENCY FLEXIBILITY RELIABILITY ENGINEERING (INTERIOR QUALITY) TESTABILITY REUSABILITY USABILITY ADAPTABILITY (FUTURE QUALITY) DOCUMENTATION MAINTAINABILITY INTEGRITY STRUCTURE
4. The tests are independent to detect possible errors. 5. The software more or less confirms to the quality and reliable standards
Integration Testing: Deals with testing when several program units are integrated. Regression testing : Change of behavior due to modification or addition is called Incremental Integration Testing: Checks out for bugs which encounter when a module has been integrated to the existing. Smoke Testing: It is the battery of test which checks the basic functionality of program. If fails then the program is not sent for further testing.
System Testing - Deals with testing the whole program system for its intended purpose. Recovery Testing: System is forced to fail and is checked out how well the system recovers the failure. Security Testing: Checks the capability of system to defend itself from hostile attack on programs and data. Load & Stress Testing: The system is tested for max load and extreme stress points are figured out. Performance Testing: Used to determine the processing speed. Installation Testing: Installation & uninstallation is checked out in the target platform.
35
7.5. WHITE-BOX TEST DESIGN It allows one to peek inside the "box, and it focuses specifically on using internal knowledge of the software to guide the selection of test data. Testing plans are made according to the details of the Software implementation such as programming language, logic and styles. Test cases are derived from the program structure. White-box testing is also called glass-box testing, logic-driven testing.
Resource usage Throughput Stimulus-response time Queue length: Detailing the average or maximum number of tasks waiting to be serviced by selected resources. Typical resources that needs to be considered include Network bandwidth Requirements CPU cycles Disk space Disk access operations Memory usage
36
7.7 SECURITY TESTING Flaws in software can be exploited by intruders to open security holes. With the development of the Internet, software security problems are becoming even more severe. The purpose of security testing of these systems includes identifying and removing software flaws that may potentially lead to security violations and validating the effectiveness of security measures.
7.8ACCEPTANCE TESTING
UAT ensures that the project satisfies the customer requirements. Alpha Testing: It is the test done by the client at the developers site. Beta Testing: This is the test done by the end-users at the clients site. Long Term Testing: Checks out for faults occurrence in a long term usage of the
product.
transition.
(a)
Alpha Testing:
Alpha testing is testing of an application when development is nearing completion. Minor design changes can still be made as a result of alpha testing. Alpha testing is typically performed by a group that is independent of the design team, but still within the company, e.g. in-house software test engineers, or software QA engineers.
Another Definition Alpha testing is final testing before the software is released to the general public. First, (and this is called the first phase of alpha testing), the software is tested by in-house developers. They use either debugger software, or hardware-assisted debuggers. The goal is to catch bugs quickly. Then, (and this is called second stage of alpha testing), the software is handed over to us, the software QA staff, for additional testing in an environment that is similar to the intended use.
37
(b)
Beta Testing:
Beta testing is testing an application when development and testing are essentially completed and final bugs and problems need to be found before the final release. Beta testing is typically performed by end-users or others, not programmers, software engineers, or test engineers Another Definition: Following alpha testing, "beta versions" of the software are released to a group of people, and limited public tests are performed, so that further testing can ensure the product has few bugs. Other times, beta versions are made available to the general public, in order to receive as much feedback as possible. The goal is to benefit the maximum number of future users
8. TEST CASES
Test cases for Login Form
TEST SUITE ID ::-LOGIN FORM IMPLEMENTED BY:: -SUNIL JOSHI CREATED BY:: -NEERAJ ANAND DATE OF CREATION::-MARCH-09-2012
DATE OF CREATION::-MARCH-09-2012
Prerequisites:- Visual studio 2008,MS SQL Server 2008,Mozilla Firefox , Internet explorer Required Field Validation on User Name Required Field Validatio Password Text Box Range Field Validation Password Text Box max. length is 18 Valid user id Vinay Password user123
38
Valid admin user id Vicky Password 789 Test case ID TCL01 Description On click submit button when no data input is given in any of the fields Expected result It should show the list of validations that have been violated i.e. required field validation It should show the validations that have been violated i.e. pls fill the password field It should show the validations that have been violated i.e. pls fill the user ID field. It should show the forget password form Actual result It displays all the validation alert(Wro ng User Name and Password Login Again) Remar ks PASS Regression NA
TCL02
PASS
NA
TCL03
On click submit button when no data input is given in user ID field but password field is fill.
PASS
NA
TCL04
PASS
NA
39
TCL05
TCL06
Input any special character in user name field like $#@! etc When user enter the wrong password
It should not show the validation It should show the message i.e. user name or password incorrect. than all the field in login button i.e. user name and password should clear or reset
PASS
NA
TCL07
TCL08
When user enter wrong data into the required fields and click on login button than it will show the message box with ok button when user click on ok button than all the field in login button i.e. user name password will clear or reset When user enter the password.
It displays all the validation alert (user name or password incorrect). It doesnt clear or reset
PASS
NA
PASS
TCL09
TCL10
It should displays in ** form not in the real text. It should display the user profile
It display the password in *** form It display the user profile It display
PASS
NA
PASS
NA
PASS
NA
40
TCL11
TCL12
TCL13
vinay and password user123. Enter admin user id Vicky___ and password 789___ . Enter admin user id Vicky and password 789 . When user open the form in Mozilla Firefox
display the user profile It should display the admin profile It should display the admin profile
the user profile It display the admin profile It display the admin profile It display the form PASS NA
PASS
NA
TCL14
It should display the form without any error When user It should open the form display the in internet form explorer without any error
PASS
NA
PASS
NA
DATE OF CREATION::-MARCH-15-2012
Prerequisites:- Visual studio 2008,MS SQL Server 2008, Mozilla Firefox , Internet explorer. Required Field Validation in User Name Text box Required Field Validation in Password Text Box Range Field Validation in Password Text Box length is 20
41
Required Field Validation in Confirm Password Tex Box Required Field Validation in First Name Text Box Range Field Validation in Name Text Box Max length is 20 Required Field Validation in E-Mail Text Box Required Field Validation in City Text Box Range Field Validation in Mobile Number Text Box Max. length is 14 Required Field Validation in Security Question Drop Down Required Field Validation in Security Answer Text Box Range Field Validation in Security Answer Text Box Max. length is 50 Test case ID TCR01 Descriptio n On click submit button when no data input is given in any of the fields Expected result It should show the list of validations that have been violated i.e. required field validation It should show the validations that have been violated i.e. pls fill the password field It should show the validations that have been violated i.e. pls fill the user name field. It should show the validations Actual result It displays all the validation alert(********) Rem arks PASS Regressio n NA
TCR02
PASS
NA
TCR03
On click submit button when no data input is given in user name On click submit button
It displays the validation alert (pls fill the user name field)
PASS
NA
TCR04
PASS
NA
42
TCR07
TCR08
TCR09
that have been violated i.e. pls fill the email id field. On click It should submit show the button validation when no that have data input is been given in violated i.e. confirm pls fill the password confirm field password field On click It should submit show the button validations when no that have data input is been given in violated i.e. select select your gender gender field On click It should submit show the button validations when no that have data input is been given in violated i.e. DOB field select your DOB On click It should submit show the button validations when that have country been name is not violated i.e. fill select your country On click submit button It should show the validations
email id field)
It displays the validation alert (pls fill the confirm password field)
PASS
NA
PASS
NA
PASS
NA
PASS
After correction it displays the validation alert (select your country.) PASS
TCS10
PASS
43
TCR12
TCR13
TCR14
that have been violated i.e. enter your city On click It should submit show the button validations when that have question is been not select in violated i.e. question pls select dropdown you list field. question. On click It should submit show the button validations when no that have data input is been given in violated i.e. answer field pls enter your answer On click It should submit show the button validation when no that has data input is been given in violated i.e. contact pls enter number your contact field. number. Input any It should not character or accept the special character or character special DOB text character box field value Input any character or special character in contact number It should not accept the character or special character value
city)
PASS
After correction it displays the validation alert (pls select you question.) PASS
PASS
PASS
PASS
TCR15
After correction it doesnt accept the character or special character value After correction it doesnt accept the character or special
44
TCR16
It should show the range of the password i.e. 6 to 12 It should accept the any types of value It should not accept the numeric value or special character value It should not numeric value the character or special
PASS
character value After correction it accept the password in between the range of 6 to 12 .
TCR17
TCR18
TCR19
TCR20
Input any special character on email id text box field Input any numeric value or special character in user name text box field Input any numeric value or special character in city text box field On click reset button
PASS
PASS
It should It doesnt reset clear or reset or clear all the all the fields. field It should display the form without any error It should display the form without any error It display the form
PASS
TCR21
TCR22
When user open the form in Mozilla Firefox When user open the form in internet explorer
PASS
PASS
NA
45
Prerequisites:- Visual studio 2008,MS SQL Server 2008, Mozilla Firefox , Internet explorer Required Field Validation in Name Text Box Required Field Validation in E-Mail Text Box Required Field Validation in Contact Number Text Box Range Field Validation in Phone number Text Box Max. length is 14 Required Field Validation in Comment Text Box Regular expression validation on E-mail Id text box Test case ID TCC01 Description Expected result On click send It should button when show the list no data input of is given in validations any of the that have fields been violated i.e. required field validation On click send button when no data input is given in name field It should show the validations that have been violated i.e. pls fill the Actual Remar result ks It displays all PASS the validation alert(******* *) Regressio n NA
TCC02
PASS
NA
46
name field TCC04 On click send button when no data input is given in email id field It should show the validations that have been violated i.e. pls fill the email id field. On click send It should button when show the no data input validations is given in that have phone been number field. violated i.e. pls enter your contact number. Input any It should not character or accept the special character or character in special name text character box field value Input any type of value on email id text box field On click reset button It should accept the any type of value. It should clear or reset all the fields. It should show the map of our company. It should show the It displays the validation alert (pls fill the email id field) PASS NA
TCC05
PASS
NA
TCC06
TCC07
PASS
TCC08
Form doesnt PASS have any reset button. It show the address map It show the home page PASS
TCC09
TCC10
PASS
NA
47
TCC11
On click on about us button On click on register button On click on login button On click on news button
TCC12
TCC13 TCC14
TCC15
TCC16
When user open the page in Mozilla Firefox When user open the page in internet explorer
home page It should show the about us page It should show the register form. It should show the login form It should show the news links or various news categories. It should display the page without any error It should display the page without any error
It show the about us page. It shows the register form. It shows the login form. It shows the list of various categories. It display the page
PASS
NA
PASS
NA
PASS PASS
NA NA
PASS
NA
PASS
NA
DATE OF IMPLEMENTED::-MARCH-30-2012
48
Prerequisites:- Visual studio 2008,MS SQL Server 2008, Mozilla Firefox , Internet explorer Required Field Validation in E-Mail Text Box Regular expression validation on E-mail Id text box Test case ID TCFP01 Description On click send button when no data input is given in email text box Expected result It should show the list of validations that have been violated i.e. required field validation It should show the validations that have been violated i.e. pls fill the valid email ID. It should remove the forget password form It should display the form without any error It should display the form without Actual result It displays all the validation alert Remark s PASS Regressi on NA
TCFP02
On click submit button when user input the wrong email id in text box field.
It displays PASS the validation alert pls fill the valid email ID .
NA
TCFP03
PASS
NA
TCFP04
TCFP05
When user open the form in Mozilla Firefox When user open the form in
PASS
NA
PASS
NA
49
internet explorer
any error
Prerequisites:- Visual studio 2008,MS SQL Server 2008, Mozilla Firefox , Internet explorer Required Field Validation in select category list box Total no of category select by a single user is 5 No of list boxes 2( category and subcategory)
Description On click Add cat button when no category select in select category list box.
Expected result It should show the list of validations that have been violated i.e. required field validation It should add in the text box1
Remark s PASS
Regressi on NA
TCSC02
PASS
NA
50
TCSC03
TCSC04
TCSC05
TCSC06
TCSC07
TCSC08
list box and after click on add button When user select sports category from the category list box When user select 2nd category from the list box and after click on add button When user select 3rd category from the list box and after click on add button When user select 4th category from the list box and after click on add button When user select 5th category from the list box and after click on add button When your click on reset button When user select 6h category
Than subcategor y list box show the no of subcategor y of sports. It should add in the text box2
PASS
NA
PASS
NA
PASS
NA
PASS
NA
PASS
NA
TCSC09
It should clear or reset all the textboxes It should show the validation
PASS
NA
PASS
NA
51
from the list box and after click on add button TCSC10 When user again select the same category that have been already available in the text box
alert i.e. sorry you cant select any more. It should show the validation alert that has been violated i.e. item is already selected. It should show the home page with new category like sports. It should show message (your profile successfully updated) It should show the user home page. It should display the form without any error It should display the form without any error
alert (sorry you cant select any more) It displays the validation alert (item is already selected.) PASS NA
TCSC11
TCSC12
When user select category like sports and after submit it than user click on home button When user click on submit button
PASS
PASS
TCSC13
When user click on cancel button When user open the form in Mozilla Firefox When user open the form in internet explorer
PASS
NA
TCSC14
PASS
NA
TCSC15
PASS
NA
52
Prerequisites:- Visual studio 2008,MS SQL Server 2008, Mozilla Firefox , Internet explorer Required Field Validation in Password Textbox Password user123 Test case ID TCU01 Description On click unregister button when no data input is given in Password field. Expected result It should show the list of validations alerts that have been violated i.e. required field validation It should unregister the user. Actual result It displays the validation alert i.e. error of the fields that are required Remarks PASS Regress ion NA
TCU02
PASS
NA
53
TCU03
It should show the validation alert i.e. fill the correct password.
PASS
NA
Prerequisites:- Visual studio 2008,MS SQL Server 2008, Mozilla Firefox , Internet explorer Required Field Validation in Current Password Textbox. Required Field Validation in New Password Textbox. Required Field Validation in Confirm Password Textbox. Compare Field validation on confirm password textbox Password user123 Test case ID TCU01 Description On click change password button when no data input is given in any of the field. Expected result It should show the list of validations that have been violated i.e. required field validation Actual result It displays all the validation alert i.e. (******) Remarks PASS Regress ion NA
54
TCU02
TCU03
TCU04
When users enter current password user123, new password 456 , and confirm password 456. When user enter current password 789, new password 456 and confirm password 456 When user enter current password user123, new password 456 and confirm password 111
PASS
NA
TCU06
It should show the validation alert that has been violated i.e. current password is not correct. It should show the validation alert that have been violated i.e. password and confirm password should be same On click It should submit button show the when no data validations input is given that have in current been password violated i.e. field fill the current password field On click It should
NA
It display the validation alert (password and confirm password should be same)
PASS
NA
It displays PASS the validation alert (fill the current password field)
NA
TCU07
It displays
PASS
NA
55
show the validations that have been violated i.e. fill the new password field It should show the validations that have been violated i.e. fill the confirm password field. It should display the form without any error It should display the form without any error
TCU08
On click submit button when no data input is given in confirm password field.
It displays PASS the validation alert (fill the confirm password field.)
NA
TCU09
TCU10
When user open the form in Mozilla Firefox When user open the form in internet explorer
PASS
NA
PASS
NA
DATE OF IMPLEMENTED::
56
APRIL-10-2012
Prerequisites:- Visual studio 2008,MS SQL Server 2008, Mozilla Firefox , Internet explorer Required Field Validation in cat Name Required Field Validation in cat url Required Field Validation in sub category Required Field Validation in url Regular expression validation on cat url Regular expression validation on url Test case ID TCAC01 Description On click category radio button. Expected result It should show the list of fields that have been i.e. cat name and cat url, save and cancel. It should show the list of fields that have been i.e. sub category and url, save and cancel. It should show the error message that has been Actual result It displays all the fields. Remarks PASS Regress ion NA
TCAC02
PASS
NA
TCAC03
On click save button of category form when no data input is given in any
It displays all the error messages i.e. error of the fields that are
PASS
NA
57
of the fields
violated i.e. required field validation It should clear or reset both the fields.
required .
TCAC04
TCAC05
On click cancel button of category form when data input is given in both of the fields. On click submit button when no data input is given in cat name field
PASS
NA
It should show the validations that have been violated i.e. pls fill the cat name field It should show the validations that have been violated i.e. pls fill the cat url field It should show the error message that has been violated i.e. required field It should clear or
PASS
NA
TCAC06
On click submit button when no data input is given in cat url field
PASS
NA
TCAC07
On click save button of Subcategory form when no data input is given in any of the fields On click cancel button
It displays all the error messages i.e. error of the fields that are required It clear or reset both
PASS
NA
TCAC08
PASS
NA
58
TCAC09
of category form when data input is given in both of the fields. On click submit button when no data input is given in cat url field
fields.
It should show the validations that have been violated i.e. pls fill the cat url field It should show the validations that have been violated i.e. pls fill the cat name field It should save the category and show that category in the dropdown list box of subcategor y form It should save the category
PASS
NA
TCAC10
On click submit button when no data input is given in cat name field
PASS
NA
TCAC11
On click save button of category form when data input is given in both of the fields.
PASS
NA
TCAC12
TCAC13
On click save button of subcategory form when data input is given in both of the fields. When user
PASS
NA
It should
It display
PASS
NA
59
TCAC14
open the form in Mozilla Firefox When user open the form in internet explorer
display the form without any error It should display the form without any error
the form
PASS
NA
9. IMPLEMENTATION
Implementation is the process of having professional checkpoints and put new equipments into user, trained user, install, the new application and constructs any files or data needed to use it. This phase is less creative then system design. Its mainly concerned with user training site preparation and file conversions. Depending on the size of the organization that will involve in using the application the risks involved in its use. System developers may choose to test the operation in only one area of the firm with only one or two persons. Sometimes they may run an old or new system in parallel way to compare the results. In other situation system developers stop using the old system one-way and start using the old system the other way. During the final step user acceptations is tested followed by user training depending upon the nature of the system extensive user training may be required. Conversion usually takes place at about the same time the user is being trained or later. System testing checks the readiness and accuracy of the system to access update and retrieve data from new files. Once the program becomes available, test data are used for testing. If successful the program are run with actual live data.
9.1. CONVERSION PLAN: The process of changing the old system into a new one is the conversion Plan. There are various methods of conversion. However the pros and cons of each method should be evaluated before deciding upon the final approach. The methods of conversion are:
60
DIRECT CONVERSION:
In this Conversion all the users stop using the old system at the same time, then being using the new system, this option is fast and disruptive so is not feasible in our case as large no of Process will be carried out simultaneously, so to stop the running system and start using new one will be difficult to use.
PHASED CONVERSION:
Users in this start using the new system component by component. This option works only with the system that are compartmentalized
PILOT CONVERSION:
Personal single site uses the new system then the entire organization makes the switch. Although this approach takes the more time than the other type of conversions, it gives opportunity to test user response to the system thoroughly.
PARALLEL CONVERSION:
Users continue to use the old system while an increasing amount of data is processed through the old system .The Outputs from the two systems are compared. If they agree then the switch is made which is further used for the testing of the new system.
system evaluation and maintenance starts. Like any other system, this is an aging process that requires periodic maintenance of hardware and software. If the new information is inconsistent with the design specification maintenance to keep it tuned with the design specification. The importance of the maintenance is to continue, to bring the new system to the standards. User priority changes in the organizational programs or the environmental factors also caught for the system analysis. Maintenance is necessary to eliminate errors in the working system. During its working live tune to the system to any variations in its working environment. Often small system is brought to the operation and changes are made to remove them. System planners must always plan them for resources availability to carry out their maintenance function. The importance of maintenance is to continue to bring new system to standard
9.2.2 MAINTENANCE:
Computer software programmers and engineers perform various software maintenance functions to keep software running with as few problems as possible. Programmers and engineers also constantly seek to improve the reliability and functionality of software through maintenance activities. Many businesses rely on various software programs to manage their finances, inventory, employees, security systems, and other facets of business activity.
9.2.2.1 CORRECTIVE
Corrective software maintenance involves developing and deploying solutions to problems ("bugs") that arise during use of a software program. Computer users will notice performance problems with software, such as error messages coming on the screen or the program freezing or crashing, meaning corrective software maintenance is needed. Often these fixes permanently solve the problem, but not always. Some fixes act as a temporary solution while computer programmers work on a more permanent solution. 9.2.2.2 PERFECTIVE
62
No software program contains zero flaws or areas for improvement. Perfective software maintenance involves computer programmers working to improve the way software program functions or how quickly it processes requests. Programmers may also engage in perfective software maintenance to improve the software's menu layouts and command interfaces. Sometimes programmers need to conduct perfective maintenance on software because of outside influences, such as new government regulations that affect how a business operates.
9.2.2.3 ADAPTIVE The field of technology constantly changes through both hardware and software developments. Adaptive software maintenance addresses these changes. A change in a processor's speed, for example, will affect how the software performs on a single computer. Software interacts with other software programs on a computer or network, meaning changes in one program can require changes in other programs 9.2.2.4 PREVENTATIVE When computer programmers engage in preventative software maintenance they try to prevent problems with software programs before they occur. Programmers seek to prevent corrective maintenance as much as possible while also anticipating adaptive maintenance needs before users experience problems. Computer programmers test software, as automotive companies test the vehicles they make, to make sure the software can handle high data loads and other stressful operations without problems. Computer programmers also test the software with other programs users likely will use on their computers, making sure compatibility issues do not arise.
63
In our project we have implemented all the important features that are required for placing News on the website. Our project consists of the following features: We have created Modules for the three types of Users i.e.
Register User Guest User Administrator. The Register user cannot only see the News he/she can also add news category in there profile also they have the facility to update their News category as they required. The Administrator has the full access to all the modules of the software. The User can change Password and update his profile when required. The Passwords are saved in the encrypted form in the databases for the security concerns. Feedback Options is Provide for all type of Users. Administrator has the right to add new News and Sub News Category. Addition and deletion of News is also provide to the Administrator Admin has also the privilege of Delete or view the user Information. User has the facility to unregister there account. User can also fetch the Facebook user according to the News displayed in there Profile. Only the Register user can access the Facebook Application.
10.2 FUTURE SCOPE AND FUTURE ENHANCEMENT News Era project can be modified and enhanced for performing more complex tasks related to news and article management. The project is aimed at creating a Web based process that enables a user to manage and track the news and of their friends. Application provides a work flow modeled to track the various states of news i.e. new, old. The project also aims at locating friends a more efficient interaction between the various users by using the notifications and feedback related to news.
64
News Era project is a powerful application for various organizations to keep up to date information about the world that what happening around us? This can be implemented in organization for locating their friends, about their likes or dislikes. Effective use of a News Era will lead to a more structured approach towards the world of up to date news with the corresponding affected users on the basis of locations, technologies, likes and their home town. Users can expand their friend circle after having awareness about persons related to the news of particular locations
10.3 TECHNICAL AND MANAGERIAL SKILLS LEARNT: We Have Learnt about ASP.net, SQL Server 2008 In SQL Server we have Learned about Stored Procedures Normalizing Data Query handling Functions some new features of SQL Server 2008 In ASP.net we have learned
Session Handling Telerik Radcontrols Ajax Controls Case cladding Style sheet In JavaScript we have learned Applying Encryption and Decryption validating Data jquery
65
In managerial Skills we have learned about team work Group effort Coordination in Group The way to Work on the live Projects.
66
67
11.1.2 USER REGISTRATION: FORM NAME: SIGNUP FORM PURPOSE: FORM FOR REGISTER A NEW USER
68
DESIGN:
DESCRIPTION: This is a Sign Up form for a User. User fill all the fields in the form and Press on submit button to save the data. If user wants to Reset the Form or Clear the form then click on Reset Button.
11.1.3 LOGIN: FORM NAME: LOGIN PURPOSE: FORM FOR LOGIN IN THE WEBSITE
69
DESIGN:
DESCRIPTION: A user Fill the User Name and Password in the textbox and Click on Login Button to login and redirect on the User Home Page. In Case if any user forgets the password then user clicks on the Forget Password link and redirect to on the forget Password page. If User has no any account then click on Sign Up link and Redirect on the Customer Registration Page.
11.1.4 FORGET PASSWORD: FORM NAME: FORGET PURPOSE: FORM FOR RETRIEVE THE PASSWORS
70
DESIGN:
DESCRIPTION: In this form user fill the Email Address i.e. register to the website and click on the send code to your Email the code will be sent to the user Email. And the Exit button will be take you back to the Home page of the website.
11.1.5 CHANGE PASSWORD: FORM NAME: USERPROFILE PURPOSE: FORM FOR UPDATE CURRENT PASSWORD
71
DESIGN:
DESCRIPTION: In this form the user can change the Password of his/her account for this purpose he will provide the current Password, New Password and confirm password and click on the reset button.
11.1.6 UPDATE PROFILE: FORM NAME: USERPROFILE PURPOSE: FORM FOR UPDATE THE USER PROFILE
72
DESIGN:
DESCRIPTION: In this form the user can update his/her account for this purpose he will provide all the information that is required and click on the update button.
11.1.7 FEEDBACK FORM NAME: FEEDBACK PURPOSE: FORM FOR TAKE FEEDBACK
73
DESIGN:
DESCRIPTION: In this form guest and register user can provide the feedback to the website that will be only shown to the administrator of the website. 11.1.8. USER HOME FORM NAME: User home PURPOSE: To view selected news
74
DESIGN:
DESCRIPTION: User can view his/her selected news categories on their own home page of personal accounts and there will be no need for a long search to view their preferred news. 11.1.9. Facebook API FORM NAME: User Frame PURPOSE: To view news article and related friends
75
DESIGN:
DESCRIPTION: User can view the full articles related to the news of his/her choice and along with that user can also view friends related to that specific news article based on the locations match with the news locations.
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.Security; using System.Web.UI.WebControls.WebParts; using System.Data.SqlClient; using System.Data; using System.Configuration; using Microsoft.ApplicationBlocks.Data; public partial class login : System.Web.UI.Page { String Constr = Convert.ToString(ConfigurationManager.ConnectionStrings["group5ConnectionString2"].Connect ionString); protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { System.Threading.Thread.Sleep(1000); using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["group5ConnectionString2"].Connectio nString)) { SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@strUserName", username.Text); param[1] = new SqlParameter("@strPassword", passwd.Text);
77
DataSet ds = SqlHelper.ExecuteDataset(con, CommandType.StoredProcedure, "pauthenticateuser", param); //int i = ds.Tables.Count; if (ds.Tables[0].Rows.Count==1) { bool admin = Convert.ToBoolean(ds.Tables[0].Rows[0]["isAdmin"].ToString()); string user = ds.Tables[0].Rows[0]["UserName"].ToString(); if (admin == true) { Session["usr"] = user; Session["Admin"] = "true"; Response.Redirect("admin.aspx");
ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Unauthorized Login Attempt!');", true); infolb.Text = "Wrong User Name and Password Login Again"; infolb.ForeColor = System.Drawing.Color.Red; }
using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration; using Microsoft.ApplicationBlocks.Data; public partial class signup : System.Web.UI.Page { String constr = Convert.ToString(ConfigurationManager.ConnectionStrings["group5ConnectionString2"].Connect ionString); protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e)
79
{ String gndr; SqlConnection con = new SqlConnection(constr); if (con.State == ConnectionState.Closed) con.Open(); SqlCommand cmd = new SqlCommand(); if (RadioButtonList1.Text == "Male") { gndr = "Male"; } else gndr = "Female";
cmd.Connection = con; cmd.CommandText = "RegisterUser2"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@Firstname", SqlDbType.NVarChar).Value = TextBox4.Text.Trim(); cmd.Parameters.Add("@Lastname", SqlDbType.NVarChar).Value = TextBox5.Text.Trim(); cmd.Parameters.Add("@Username", SqlDbType.NVarChar).Value = TextBox2.Text.Trim(); cmd.Parameters.Add("@Emailid", SqlDbType.NVarChar).Value = TextBox3.Text.Trim(); cmd.Parameters.Add("@Password", SqlDbType.NVarChar).Value = TextBox7.Text.Trim(); cmd.Parameters.Add("@Gender", SqlDbType.NChar).Value = gndr.Trim(); cmd.Parameters.Add("@Birthdate", SqlDbType.NVarChar).Value = TextBox1.Text.Trim(); cmd.Parameters.Add("@Country", SqlDbType.NVarChar).Value = DropDownList4.Text.Trim(); cmd.Parameters.Add("@City", SqlDbType.NVarChar).Value = Textcity.Text.Trim(); cmd.Parameters.Add("@Question", SqlDbType.NVarChar).Value =
80
cmd.Parameters.Add("@results", SqlDbType.Int, 4); cmd.Parameters["@results"].Direction = ParameterDirection.Output; try { cmd.ExecuteNonQuery(); String rest = cmd.Parameters["@results"].Value.ToString(); if (rest == "0") { infolb.Text = "Email id already exists"; ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Register with a unique Email Id');", true); TextBox3.Text = " "; } else if (rest == "1") { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('You are registered now !');", true); TextBox4.Text = " "; TextBox5.Text = " "; TextBox1.Text = " "; TextBox3.Text = " "; TextBox7.Text = " ";
81
TextBox8.Text = " "; TextBox2.Text = " "; Textcity.Text = " "; RadioButtonList1.Text = " "; infolb.Text = " "; DropDownList4.Text = ""; lblError.Text = " "; Textanswer.Text = " "; TextBox9.Text = " "; }
} protected void TextBox2_TextChanged(object sender, EventArgs e) { using (SqlConnection con = new SqlConnection(constr)) { System.Threading.Thread.Sleep(1000);
82
SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@username", TextBox2.Text); int check = int.Parse(SqlHelper.ExecuteScalar(con, CommandType.StoredProcedure, "pcheckuser", param).ToString()); if (check == 1) { lblError.Text = "Not Available"; lblError.ForeColor = System.Drawing.Color.Red; } else if (check == 0) { lblError.Text = "Available"; lblError.ForeColor = System.Drawing.Color.Green; } } } protected void Button2_Click(object sender, EventArgs e) { Response.Redirect("~/Default.aspx"); } }
14.3 SOURCE CODE OF FEEDBACK FORM using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data;
83
using System.Data.SqlClient; using System.Configuration; public partial class feedback : System.Web.UI.Page { String constr = Convert.ToString(ConfigurationManager.ConnectionStrings["group5ConnectionString2"].Connect ionString); protected void Page_Load(object sender, EventArgs e) { } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { SqlConnection con = new SqlConnection(constr); con.Open(); SqlCommand cmd = new SqlCommand();
84
14.4 SOURCE CODE OF FORGET PASSWORD using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.Security; using System.Web.UI.WebControls.WebParts; using System.Data.SqlClient; using System.Data; using System.Configuration; using Microsoft.ApplicationBlocks.Data; using System.Net; using System.Net.Mail; using System.Threading; public partial class Forget : System.Web.UI.Page { String Constr =
85
Convert.ToString(ConfigurationManager.ConnectionStrings["group5ConnectionString2"].Connect ionString); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Label1.Text = "<b><h2>Get your Password through Mail</h2></b>"; Label1.ForeColor = System.Drawing.Color.Green; Button1.Visible = false; } } protected void Button1_Click(object sender, EventArgs e) { SqlConnection newcon = new SqlConnection(Constr); SqlCommand sqlcmd = new SqlCommand(); sqlcmd.CommandType = CommandType.StoredProcedure;
newcon.Open(); sqlcmd.Connection = newcon; sqlcmd.CommandText = "select dbo.fn_email('" + txtemailpass.Text + "') as functionresult"; sqlcmd.CommandType = CommandType.Text; string str = sqlcmd.ExecuteScalar().ToString(); SqlParameter p1 = new SqlParameter("@plantext", txtemailpass.Text); string to = txtemailpass.Text;
msg.Subject = ""; msg.Body = " your password is :"+str; System.Net.NetworkCredential n = new System.Net.NetworkCredential("newsera.infotech@gmail.com", "infotech2007"); SmtpClient s = new SmtpClient(); s.EnableSsl = true; s.UseDefaultCredentials = false; s.Credentials = n; s.Host = "smtp.gmail.com"; s.Port = 587; try { s.Send(msg); lblstatus.Text = "Password has been sent successfully, check your Mail"; lblerror.Text = ""; txtemailpass.Text = ""; Response.Write("<p><strong> The Mail has been sent to: </strong></p>"); Response.Write("• To: " + msg.To + "</br>"); } catch (Exception ex) { lblstatus.Text = ex.Message; } } protected void txtemailpass_TextChanged(object sender, EventArgs e)
87
{ click.Visible = true; using (SqlConnection newcon = new SqlConnection(Constr)) { SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@Email", txtemailpass.Text); int check = int.Parse(SqlHelper.ExecuteScalar(newcon, CommandType.StoredProcedure, "EmailAuthent", param).ToString()); if (check == 0) { lblerror.Text = "Not Registered"; lblerror.ForeColor = System.Drawing.Color.Red; lblerror1.Text = "sorry you can not change the password,You are not Authorized"; lblerror1.ForeColor = System.Drawing.Color.Red; Button1.Visible = false; Button2.Visible = true; click.Visible = false; } else if (check == 1) { lblerror.Text = "Available"; lblerror.ForeColor = System.Drawing.Color.Green; Button1.Visible = true; lblerror1.Visible = false; Button2.Visible = true; click.Visible = false; } } }
88
14.5 SOURCE CODE FOR USER PROFILE using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; public partial class Default2 : System.Web.UI.Page { String constr = Convert.ToString(ConfigurationManager.ConnectionStrings["group5ConnectionString2"].Connect ionString); protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { userinfo(); if (!IsPostBack)
89
{ if (Session["usr"] == null && Session["admin"] == null) { Response.Redirect("Default.aspx"); } } string un = Session["usr"].ToString(); if (!Page.IsPostBack) { SqlConnection con = new SqlConnection(constr); if (con.State == ConnectionState.Closed) { con.Open(); } SqlCommand cmd = new SqlCommand("selctunregister", con); cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@UserName", SqlDbType.NVarChar).Value = un; SqlDataReader dr1 = cmd.ExecuteReader(); if (dr1.Read()) { Txtname.Text = Convert.ToString(dr1["UserName"]); Txtemail.Text = Convert.ToString(dr1["EmailId"]); Hdnpass.Text = Convert.ToString(dr1["Password"]);
90
} } private void userinfo() { SqlConnection con = new SqlConnection(constr); if (con.State == ConnectionState.Closed) { con.Open(); } SqlCommand cmd = new SqlCommand("SelectSiteuser", con); cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Clear(); cmd.Dispose(); con.Close(); } protected void Btnupdate_Click(object sender, EventArgs e) { string un = Session["usr"].ToString(); SqlConnection con = new SqlConnection(constr); if (con.State == ConnectionState.Closed) { con.Open(); } SqlCommand cmd = new SqlCommand("updateuserprofile", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@UserName", SqlDbType.NVarChar).Value = un; cmd.Parameters.Add("@country", SqlDbType.NVarChar).Value = Txtcntry.Text; cmd.Parameters.Add("@city ", SqlDbType.NVarChar).Value = TxtCity.Text; cmd.Parameters.Add("@phone", SqlDbType.NVarChar).Value = TxtPhone.Text; cmd.ExecuteNonQuery(); con.Close(); TabContainer1.ActiveTabIndex = 0;
92
protected void BtnReset_Click(object sender, EventArgs e) { string un = Session["usr"].ToString(); SqlConnection newcon = new SqlConnection(constr); SqlCommand sqlcmd = new SqlCommand(); sqlcmd.CommandType = CommandType.StoredProcedure;
sqlcmd.Connection = newcon; sqlcmd.CommandText = "ResetPassword"; SqlParameter p1 = new SqlParameter("@username",un); SqlParameter p2 = new SqlParameter("@Oldpass",TxtCurrentPswd.Text); SqlParameter p3 = new SqlParameter("@Newpass", TxtNewpaswd.Text); SqlParameter p4 = new SqlParameter("@Cmpass", TxtConfirmPswd.Text); sqlcmd.Parameters.Add(p1); sqlcmd.Parameters.Add(p2); sqlcmd.Parameters.Add(p3); sqlcmd.Parameters.Add(p4); sqlcmd.Parameters.Add("@results", SqlDbType.Int, 4); sqlcmd.Parameters["@results"].Direction = ParameterDirection.Output; try {
93
newcon.Open(); sqlcmd.ExecuteNonQuery(); String rest = sqlcmd.Parameters["@results"].Value.ToString(); if (rest == "1") { LblMsg.Text = "Your Password Changed successfully"; } else { LblMsg.Text = "Please make sure you are entering valid username or password"; } } catch (SqlException ex) { LblMsg.Text = ex.Message; } }
protected void Btnunregister_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(constr); if (con.State == ConnectionState.Closed) {
94
con.Open(); } SqlCommand cmd = new SqlCommand("usrunregist", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@username", SqlDbType.NVarChar).Value = Txtname.Text; cmd.Parameters.Add("@password", SqlDbType.NVarChar).Value =txtpass.Text; if (txtpass.Text == Hdnpass.Text) { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Account deactivated successfully');", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Please Enter correct password');", true); }
} }
95
14.6 SOURCE CODE FOR USER HOME using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration; using Microsoft.ApplicationBlocks.Data; public partial class Userhome : System.Web.UI.Page { String Constr = Convert.ToString(ConfigurationManager.ConnectionStrings["group5ConnectionString2"].Connect ionString); protected void Page_Load(object sender, EventArgs e) { Label4.Text = Convert.ToString("Welcome " + (Session["usr"])); if (Session["usr"].ToString() != null) { if (!IsPostBack) { SqlConnection con = new SqlConnection(Constr); if (con.State == ConnectionState.Closed) { con.Open(); }
96
string un = Session["usr"].ToString(); SqlCommand cmd = new SqlCommand("SPNewsFetch1", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@usrname", Session["usr"].ToString()); DataSet ds = SqlHelper.ExecuteDataset(con, CommandType.StoredProcedure, "SPNewsFetch1", param); for (int i=0; i < ds.Tables[0].Rows.Count; i++) { switch (i) { case 0: Label1.Text = Convert.ToString(ds.Tables[0].Rows[i]["SubName"]); RssDataSource1.Url = ds.Tables[0].Rows[i]["SubUrl"].ToString(); DataList1.DataSource = RssDataSource1; DataList1.DataBind(); break; case 1: Label2.Text = Convert.ToString(ds.Tables[0].Rows[i]["SubName"]); RssDataSource1.Url = ds.Tables[0].Rows[i]["SubUrl"].ToString(); DataList2.DataSource = RssDataSource1; DataList2.DataBind(); break; case 2: Label3.Text = Convert.ToString(ds.Tables[0].Rows[i]["SubName"]); RssDataSource1.Url = ds.Tables[0].Rows[i]["SubUrl"].ToString(); DataList3.DataSource = RssDataSource1; DataList3.DataBind(); break; case 3: Label4.Text = Convert.ToString(ds.Tables[0].Rows[i]["SubName"]);
97
MAIN RESPONSIBILITIES:
1. CODING 2. DATABASE HANDLING 3. DESIGNING
ADDITIONAL RESPONSIBILITIES: Design of Signup form, User Home, Main home page, News Page
QUALITY AND ASSURANCE (TESTING)
98
14. BIBLIOGRAPHY
Below is the list of websites that we have gone through for the development of our project website:
99
Internet
100