Академический Документы
Профессиональный Документы
Культура Документы
2013
PROJECT REPORT ON
By
DEPARTMENT OF COMPUTER APPLICATION FUTURE INSTITUTE OF ENGINEERING AND MANAGEMENT KOLKATA 700150 DEPARTMENT OF COMPUTER APPLICATION
1
2013
CERTIFICATION
This is to certify that the project work titled ONLIVE ONLINE CHATTING (in PHP) submitted by CHANDAN ROY, BISWAJIT DEY, BIKRAMJIT DUTTA, RAHUL KUMAR SINGH, andSUBHAMAY CHAKRABORTY, the student of Future Institute of Engineering and Management college. This candidate have completed the total parameters and requirements of the entire project. This project has not been submitted in any other examination and does not form a part of any other course undergone by the candidate.
2013
ACKNOWLEDGEMENT
It is understandable that software of this volume is not easy to develop alone, especially without any sort of help or suggestion from anybody. I tried my best to mention all of them appropriately. First of all I would like to thank to all those at my home including my parents to put up with our hectic schedule. I acknowledge my sincere thanks to my Principal,Dr.Aloke Kumar Ghosh and my HOD,Mr.AnirbanChakraborty, for their constructive ideas and valuable notes. I am really indebted to my respected project guide Mr.Arindam Roy, without whose consent and guidance and untiring help, continuous monitoring and critics, the concepts and materialization would have been just a distant dream. So I am very thankful to all of them who helped me a lot throughout the training period in order to fully grasp the matter.
Table of Contents
3
2013
[7] [8] -
[6]
[9]
[ 10 ] [ 11 ] [12-14] [ 22 28 ]
FEASIBILITY STUDY -
ENTITY RELATIONSHIP DIAGRAM [ 15 21 ] DATA FLOW DIAGRAM FLOWCHART USE CASE TESTING -
[ 29 ] [ 30 ]
[31-35] [36]
[ 37 86 ] [ 87 92 ] [94 ] [ 93
OVERVIEW
BIBLIOGRAPHY
[ 97 ]
2013
PROJECT ANALYSIS
2013
INTRODUCTION
This report details the work done towards the project "Online chatting". This particular project is a solution developed to communicate between the users across worldwide through Internet. The concept of sending letters and telegraphs has been reduced due to the new era of Internet Mailing. One such facility is being provided by the Chat Server. A message or information can be sent via many Medias, such as it can be telephonic, telegrams, fax etc to the recipient. Each such information requires a high level of security. To maintain such security and smooth completion of any communication it requires more time and human effort in manual system. "Online chatting" automates all the aspects stated above related to a communication in a highly secure environment. This project has been developed to receive instant and urgent messages and to provide total user satisfaction. The entire process has been automated using PHP technology and MYSQL SERVER to smoothen the flow of information in a highly secure environment across the network. The solution has been deployed, tested and validated thoroughly. While designing the system, care has been taken in efficiency, maintenance and reusability of the software for the present and future changes in the system.
2013
Chatting is a method of using technology to bring people and ideas together despite of the geographical barriers. The main reason behind choosing this topic is to let people conduct meetings with others in different locations such that it crosses time zones, can reach many people, and reduce the paper flood.Chat Application project report attempts to attach the computers which are on the different locations within the network and by this project any user can send the message to the other without moving physically. It provides the platform to send messages online and display the list of all online users, which are currently connected to chat server.This has been a small and sincere part of our side in helping users to be more efficient as well as effective with respect to exchange information.
2013
OBJECTIVE
This particular project is a solution developed to communicate between the users across worldwide through Internet. The concept of sending letters and telegraphs has been reduced due to the new era of Internet Mailing. One such facility is being provided by the Chat Server. "Online chatting" automates all the aspects stated above related to a communication in a highly secure environment. This project has been developed to receive instant messages and to provide total user satisfaction.
2013
TECHNICAL DETAILS
To complete the entire project, in the front end I used PHP, CSS, and HTML5 and in the back end I used Mysql serverto maintain the database.I designed my page by using HTML5 and CSS. For design purpose, I have used Dreamweaver software. The project is developed in a single window. Reasons for choosing php: PHP is Powerful, Robust and Scalable. It is a general-purpose server-side scripting language originally designed for web application and website development. PHP runs on all most popular web servers and many different operating systems, which helps to create large and complex web applications or websites.
Because of its rich features in manipulating, securing and managing data. Faster and better transactions. Scalability and flexibility. Web and data warehouse strengths. Comprehensive application development.
9
2013
SOFTWARE USED
Front End
Back End
MYSQL server
Operating System
Microsoft Windows 7
10
2013
HARDWARE USED
Processor :
2.31 GHz [AMD 8650 TRIPLE CORE]
Memory
2GB
Disk
250GB
11
2013
Feasibility study
12
2013
FEASIBILITY STUDY
Feasibility is the determination of whether a project worth nothing. Once preliminary area of application has been defined its subject to a more rigorous examination in a feasibility study. In conducting the feasibility study three types of feasibility can be considered. These are Technical feasibility, Economical feasibility and Operational feasibility.
TECHNICAL FEASIBILITY
Technical feasibility is concerned with specifying equipment and software that will meet the requirement and goals. The analyst must find out whether current technical resources can be upgraded or added to in manner that fulfills the requests under consideration. However add-ones, to existing systems are costly and not worth wide simply because they must need inefficiently. If existing systems cannot be added onto, then the next question becomes whether there is technology in existence that needs the specification.
ECONOMICAL FEASIBILITY
13
2013
Economical feasibility is the second part of the resource determination. The basic resources to consider are, the time and that of system analysis team, the cost of doing a full system study, estimated cost of hardware, and estimates cost of software and/or software development.
OPERATIONAL FEASIBILITY
For a moment that technical and economical resources are both judged adequate. The systems analyst must still consider the operational feasibility of the requested project. Operational feasibility is dependent on human resources available for the project and projecting whether the system will operate and used once its installed. If users are virtually wed to the present system see on problems with it, and generally are not involved in requesting a new system, resistance to implementing the new system will be strong.
CONCLUSION
From the observation made in the feasibility study desired above, it was recommended that the purpose system is feasible and justified and that the feasibility study could be followed by the system analysis and design phase.
14
2013
15
2013
2013
Double lines, which includes total participation of an entity in a relationship set. Double rectangle, which represent weak entity sets.
ENTITY
An entity is a thing or object in the real world that is distinguishable from all other objects. For example, each person in the enterprise is an entity. An entity has set of properties, and the values for some set of properties may uniquely identify an entity.
ENTITY SETS
An entity set is a set of entities of the same type that share the same properties, or an attributes. The set of all people who are customer at a given bank, for example, can be defined as entity set customer.
ATTRIBUTES
An attribute is a property of an entity. Each entity may have many attributes. A particular entity will have a value for each of its attributes. The attributes values that describes each entity become a major part of the data stored in the database. Attributes can be of following types: Simple Composite Single-Valued
17
2013
CARDINALITY CONSTRAINTS
Cardinality defines the maximum number of objects that can participate in a relationship. One-to-One 1:1, exists when one occurrence of 1st entity is related to one entity of 2nd entity One-to-Many
18
2013
1: M, exists when one occurrence of 1st entity is related with many occurrence of 2nd entity, but each occurrence of 2nd entity is related with one occurrence of 1st entity. Many-to-One M: 1, exists when many occurrence of 1st entity is related with one occurrence of 2nd entity, but each occurrence of 2nd entity is related with any one occurrence of 1st entity. Many-to-Many M: N, exists when one occurrence of 1st entity is related with many occurrence of 2nd entity, and one occurrence of 2nd entity is related with many occurrence of 1st entity.
ERD OF USER
EMAIL_I D
PHONE_ NO
D_O_B USER_I D
NAME
USER
ERD OF REGISTRATION
19
IMAGE
2013
REGISTRATION
EDIT PROFILE
OLD PASSWORD
CHANGE PASSWORD
NEW PASSWORD
D_O_B USER_I D
NAME
IMAGE
NAME
PHONE_ NO
ONLINE USER
USER_I D EMAIL_I D
20
2013
NAME
USER_I D
ONLINE USER
PHONE_ NO
EMAIL_I D
NAM E USER
IMAGE
M
MESSAGI NG
OFFLINE MEMBERS
MM
21 EMAIL_I D
USER _ID
PHONE_ NO
CHATTING
2013
EDIT
NAM E
ONLINE MEMBERS
1
REGISTRATION
M 1
CREAT E
M
PHONE_ NO
NEW MEMBERS
EDIT PROFILE
EDIT PASSWORD
USER _ID
EMAIL_I D
D_O_ B
IMAG E
OLD PASSWORD
NEW PASSWORD
NAM E
2013
ABOUT DFD
A data-flow diagram (DFD) is a graphical representation of the "flow" of data through an information system. DFDs can also be used for the visualization of data processing (structured design). On a DFD, data items flow from an external data source or an internal data store to an internal data store or an external data sink, via an internal process.
23
2013
Registration System
Context Level
Store Into DB
24
2013
First Level
Databas e
base Input
User Username
Password
Checkin g
Access Granted
Show Profile
Create d
Second Level
Databas e
Input
User
Check
Valid
Registration System
Rejec t
2013
Granted
Third Level
Databa se
Use r
Input
Checki Username ng
Invalid
Valid
Unique Userna me
Enter Password
Reject
View Profile
IdGene rate
Login Process
Context Level
User
0.1 LoginSyst 26 em
2013
Input Granted
Access
First Level
Datab ase
Input
User
Id and Password
LoginPro cess
Valid
Invalid
MatchNo t Found
Chatting
Context Level
27
2013
Input
User
User Messege
First Level
Databa se
Input
User
Syste m
Input
Checkin g
Access Granted
Chat
Second Level
28
2013
Databa se
Input
User
Syste m
Input
Checkin g
Valid
Invalid
Chat
FLOWCHART
START
29
ID_CHECKIN G
REGISTRATIO N
2013
NO
MEMBERS
MESS AGE
CHATTI NG
OFFLINE MEMBERS
ONLINE MEMBERS
EXI T
In software and systems engineeringa use case is a list of steps, typically defining interactions between a role (known in UML as an "actor") and a system, to achieve a goal. The actor can be a human or an external system.
30
2013
In systems engineering, use cases are used at a higher level than within software engineering, often representing missions or stakeholder goals. Casual use case structure Title (goal) Primary Actor
Scope Level (Story): the body of the use case is simply a paragraph or two of text, informally describing what happens.
Register Messag e
View profile
User
Chatting Edit profile <<Extend >> Member s
Offline user
Chatting
Online user
31
2013
TESTING
INTRODUCTION
Testing is a process of executing a program with the indent of finding an error. Testing is a crucial element of software quality
32
2013
assurance and presents ultimate review of specification, design and coding. System Testing is an important phase. Testing represents an interesting anomaly for the software. Thus a series of testing are performed for the proposed system before the system is ready for user acceptance testing. A good test case is one that has a high probability of finding an as undiscovered error. A successful test is one that uncovers an as undiscovered error. TESTING OBJECTIVES 1.Testing is a process of executing a program with the intent of finding an error 2.A good test case is one that has a probability of finding an as yet undiscovered error 3.A successful test is one that uncovers an undiscovered error
OBJECTIVE
33
2013
The primary objective for test case design is to derive a set of tests that has the highest livelihood for uncovering defects in software. To accomplish this objective two different categories of test case design techniques are used. They are White box testing. Black box testing. WHITE-BOX TESTING White box testing focus on the program control structure. Test cases are derived to ensure that all statements in the program have been executed at least once during testing and that all logical conditions have been executed. BLACK-BOX TESTING Black box testing is designed to validate functional requirements without regard to the internal workings of a program. Black box testing mainly focuses on the information domain of the software, deriving test cases by partitioning input and output in a manner that provides through test coverage. Incorrect and missing functions, interface errors, errors in data structures, error in functional logic are the errors falling in this category.
34
2013
TESTING STRATEGIES A strategy for software testing must accommodate low-level tests that are necessary to verify that all small source code segments has been correctly implemented as well as high-level tests that validate major system functions against customer requirements. TESTING FUNDAMENTALS Testing is a process of executing program with the intent of finding error. A good test case is one that has high probability of finding an undiscovered error. If testing is conducted successfully it uncovers the errors in the software. Testing cannot show the absence of defects, it can only show that software defects present. UNIT TESTING Unit testing is essential for the verification of the code produced during the coding phase and hence the goal is to test the internal logic of the modules. Using the detailed design description as a guide, important paths are tested to uncover errors within the boundary of the modules. These tests were carried out during the programming stage itself.
35
2013
INTEGRATION TESTING Integration testing focuses on unit tested modules and build the program structure that is dictated by the design phase.
SYSTEM TESTING: System testing tests the integration of each module in the system. It also tests to find discrepancies between the system and its original objective, current specification and system documentation. The primary concern is the compatibility of individual modules. Entire system is working properly or not will be tested here, and specified path ODBC connection will correct or not, and giving output or not are tested here these verifications and validations are done by giving input values to the system and by comparing with down testing implementing here. ACCEPTANCE TESTING: This testing is done to verify the readiness of the system for the implementation. Acceptance testing begins when the system is
36
2013
complete. Its purpose is to provide the end user with the confidence that the system is ready for use. It involves planning and execution of functional tests, performance tests and stress tests in order to demonstrate that the implemented system satisfies its requirements.
PROJECT SCHEDULING
GNATT CHART
37
2013
Requirement Analysis Feasibility Study Designing Coding Testing & Modifying Implements Days
CODING
38
2013
/*********************************************** * Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
39
2013
* This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code ***********************************************/ </script> <link rel="stylesheet" type="text/css" href="css/style1.css" /> <script language="javascript" src="js/jquery.js"></script> <script language="javascript" src="js/jquery.easing.js"></script> <script language="javascript" src="js/script.js"></script> <script type="text/javascript"> $(document).ready( function(){ var buttons = { previous:$('#lofslidecontent45 .lof-previous') , next:$('#lofslidecontent45 .lof-next') }; $obj = $('#lofslidecontent45').lofJSidernews( { interval : 4000, direction easing duration auto : 'opacitys', : 'easeInOutExpo', : 1200, : false, type="text/javascript" type="text/javascript" type="text/javascript"
maxItemDisplay : 4,
40
2013
navPosition
: 'horizontal', // horizontal
navigatorHeight : 32, navigatorWidth : 80, mainWidth:940, buttons }); </script> </head> <body> <div id="templatemo_wrapper"> : buttons} );
<div id="templatemo_slider"> <div id="lofslidecontent45" style="width:940px; height:340px;"> <div class="preload"><div></div></div> <!-- MAIN CONTENT --> <div class="lof-main-outer" style="width:940px; height:340px;"> <ul class="lof-main-wapper"> <li> <imgsrc="images/img1.jpg" title="" alt="Slider 01" /> </li>
41
class="lof-slidecontent"
2013
<li> <imgsrc="images/img3.jpg" title="" alt="Slider 02" /> </li> <li> <imgsrc="images/img4.jpg" title="" alt="Slider 03" /> </li> <li> <imgsrc="images/img9.jpeg" title="" alt="Slider 04" /> </li> <li> <imgsrc="images/img6.jpg" title="" alt="Slider 05" /> </li> <li> <imgsrc="images/img5.jpg" title="" alt="Slider 06" /> </li> <li> <imgsrc="images/img2.jpg" title="" alt="Slider 07" /> </li> <li> <imgsrc="images/img11.jpg" title="" alt="Slider 08" /> </li>
42
2013
</ul> </div> <!-- END MAIN CONTENT --> <!-- NAVIGATOR --> <div class="lof-navigator-wapper"> <div onClick="return false" class="lof-next">Next</div> <div class="lof-navigator-outer"> <ul class="lof-navigator"> <li><imgsrc="images/slider/img1.jpg" alt="Image 01" /></li> <li><imgsrc="images/slider/img3.jpg" alt="Image 01" /></li> <li><imgsrc="images/slider/img4.jpg" alt="Image 02" /></li> <li><imgsrc="images/slider/img9.jpeg" alt="Image 03" /></li> <li><imgsrc="images/slider/img6.jpg" alt="Image 04" /></li> <li><imgsrc="images/slider/img5.jpg" alt="Image 05" /></li> <li><imgsrc="images/slider/img2.jpg" alt="Image 06" /></li> <li><imgsrc="images/slider/img11.jpg" alt="Image 07" /></li> </ul> </div> <div onClick="return false" class="lof-previous">Previous</div> </div> </div>
43
2013
Registration code
<?php include("config.php"); ?> <?php if(isset($_POST['ok'])) { $name=$_POST['name']; $email=$_POST['email']; $phno=$_POST['phno']; $pwd=$_POST['pwd']; $sex=$_POST['sex']; $sq=$_POST['s_question']; $answer=$_POST['ans'];
44
2013
$status="registered"; $img=$_FILES['img']['name']; $type=$_FILES['img']['type']; $imgurl="user_img/".$img; if($type=="image/jpeg") { move_uploaded_file($_FILES['img']['tmp_name'],$imgurl); $sql="INSERT INTO `reg`(`name`,`email`,`pwd`,`phno`,`sex`,`imgurl`,`sq_question`,`answer `,`status`) VALUES('$name','$email','$pwd','$phno','$sex','$imgurl','$sq','$answer', '$status')"; mysql_query($sql); $_SESSION['msg']="You are Successfully REGISTER !!!!!!enjoy"; header('location:index.php'); exit; } else { $_SESSION['msg']="please select a JPEG image format"; header('location:index.php'); exit;
45
2013
} } ?> <!DOCTYPE html Transitional//EN" transitional.dtd"> PUBLIC "-//W3C//DTD XHTML 1.0 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> .tab{ border:2px solid #99FF33; color:#999999; font-size:18px; font-weight:bold; } .td{ background-color:#000000; border:1px ridge #00CCFF; color:#FFFFFF; padding:1px;
46
2013
} </style> </head> <body> <p></p> <div align="center"> <h1>Chat Zone[Onlive.com]</h1> </div> <div><?php include("slider.php"); ?></div> <div> <h1><font color="#00FF00">Free Registration color="#FF0000">HERE !!!</font></h1> <p><font color="#FFFF00"><b><?php echo $_SESSION['msg']=""; ?></b></font></p> </font><font
$_SESSION['msg'];
<form name="frm" action="" method="post" enctype="multipart/formdata"> <table cellpadding="4" cellspacing="5" class="tab"> <tr> <td>Name :-</td> <td><input type="text" name="name" size="30" class="td" /></td> </tr> <tr>
47
2013
<td>Email :-</td> <td><input type="text" name="email" size="30" class="td" /></td> </tr> <tr> <td>Password :-</td> <td><input type="password" name="pwd" size="30" class="td" /></td> </tr> <tr> <td>Security Question :-</td> <td><select name="s_question" class="td"><option value="Select any one">Select any one</option> <option value="What is your pet name?">What is your pet name? </option> <option value="What is your birth place">What is your birth place</option> <option value="Who is your favourite author?">Who is your favourite author?</option> <option value="What is your first phone no.?">What is your first phone no.?</option></td> </tr> <tr> <td>Answer :-</td>
48
2013
<td><input type="text" name="ans" size="30" class="td" /></td> </tr> <tr> <td>Phone no :-</td> <td><input type="text" name="phno" size="30" class="td" /></td> </tr> <tr> <td>Sex :-</td> <td><input type="radio" name="sex" value="Male" />Male <input type="radio" name="sex" value="Female" />Female </td> </tr> <tr> <td colspan="2">Upload Image :-</td> </tr> <tr> <td colspan="2"><input class="td" /></td> </tr> <tr> <td colspan="2" align="center" bgcolor="#990000"><input type="submit" name="ok" value="Register Me" /></td> </tr>
49
type="file"
name="img"
size="35"
2013
<tr> <td colspan="2" align="center">Members href="login.php">Login</a>Here !!!!</td> </tr> </table> </form> </div> </body></html> <a
Login code
<?php include("config.php"); ?> <?php if(isset($_POST['ok'])) { if(!empty($_SESSION['user_info'])) { header('location:user_acc.php'); exit; } $email=$_POST['email']; $pwd=$_POST['pwd'];
50
2013
$sql="SELECT * FROM `reg` WHERE `email`='$email' AND `pwd`='$pwd'"; $res=mysql_query($sql); if(mysql_num_rows($res)) { $row=mysql_fetch_array($res); $_SESSION['user_info']=$row; $up="UPDATE `reg` SET `status`='login' WHERE `email`='$email' AND `pwd`='$pwd'"; mysql_query($up); header('location:user_acc.php'); exit; } else { $_SESSION['msg']="Your Email and password incorrect"; header('location:login.php'); exit; } }
?>
51
2013
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> .tab{ border:2px solid #99FF33; color:#999999; font-size:18px; font-weight:bold; } .td{ background-color:#000000; border:1px ridge #00CCFF; color:#FFFFFF; padding:1px; } </style> </head>
52
2013
<body> <p></p> <div align="center"> <h1>Chart Zone[Onlive.com]</h1> </div> <div><?php include("slider.php"); ?></div> <div> <h1><font color="#00FF00">Member's color="#FF0000">HERE !!!</font></h1> <p><font color="#FFFF00"><b><?php echo $_SESSION['msg']=""; ?></b></font></p> <form name="frm" action="" method="post"> <table cellpadding="4" cellspacing="5" class="tab"> <tr> <td>Email :-</td> <td><input type="text" name="email" size="30" class="td" /></td> </tr> <tr> <td>Password :-</td> <td><input type="password" name="pwd" size="30" class="td" /></td> </tr> <tr>
53
Login---></font><font $_SESSION['msg'];
2013
<td colspan="2" align="center" bgcolor="#990000"><input type="submit" name="ok" value="Login Now" /></td> </tr> <tr> <td colspan="2" align="center">Members href="index.php">Registration</a>Here !!!!</td> </tr> <tr> <td colspan="2" align="center"><a href="forgot_pwd.php">Forgot your password?</a></td> </tr> </table> </form> </div> </body> </html> <a
54
2013
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> .box{ width:100px; height:120px;
55
2013
padding:4px; border:2px ridge #0000FF; background-color:#333333; border-radius:10px; -moz-border-radius:10px; -webkit-border-radius:10px; box-shadow:0px 0px 40px BLUE; -moz-border-shadow:0px 0px 40px BLUE; -webkit-border-shadow:0px 0px 40px BLUE; text-align:center; } .lb{ color:#CCCCCC; font-weight:bold; } .lb2{ color:#00FF00; font-weight:bold; } </style> </head>
56
2013
<body> <p></p> <div align="center"> <h1>Chart Zone[Onlive.Com]</h1> </div> <div><?php include("slider.php"); ?></div> <div> <h1><font color="#FF0000"><?php ></font></h1> </div> <div align="left"> <imgsrc="<?php echo $_SESSION['user_info']['imgurl'] ?>" width="120" height="100" border="2" style="padding:4px; background-color:#333333; border:1px solid #00FFFF;" /><br/> <?php if(isset($_GET['msg1'])) { echo "<font color='GREEN'>".$_GET['msg1']."</font>"; } else {
57
2013
if(isset($_GET['err1'])) { echo "<font color='Red'>".$_GET['err1']."</font>"; } } ?> <?php if(isset($_GET['msg'])) { echo "<font color='GREEN'>".$_GET['msg']."</font>"; } else { if(isset($_GET['err'])) { echo "<font color='RED'>".$_GET['err']."</font>"; } } ?> <div align="right"><a href="edit_acc.php?id=2">Edit Profile</a> <a href="change_pwd.php?id=1">Change
58
2013
<a
href="logout.php?info=Loggout">Secure
<table cellpadding="5" cellspacing="5"> <tr> <?php $src="SELECT * FROM $_SESSION['user_info']['id']."'"; $res=mysql_query($src); if(mysql_num_rows($res)) { while($row=mysql_fetch_array($res)) { ?> <td class="box"> <a href="send_msg.php?id=<?php echo $row['id']; ?>"> <imgsrc="<?php echo $row['imgurl']; ?>" width="80" height="84" border="1" /></a><br/> <label class="lb"><?php echo $row['name']; ?></label><br/> <?php
59
`reg`
WHERE
`id`!='".
2013
if($row['status']=='login') { ?> <label class="lb2">Online</label> <?php } ?> </td> <?php } ?> </tr> <?php } else { ?> <tr> <td align="center"><h1>NoBodyFor Chatting</h1></td> </tr> <?php
60
2013
2013
$from_imgurl=$_SESSION['user_info']['imgurl']; $to_id=$row['id']; $to_name=$row['name']; $to_imgurl=$row['imgurl']; $ins="INSERT INTO `msg_tab`(`msg`,`dt`,`from_name`,`from_imgurl`,`from_id`,`to_name`, `to_imgurl`,`to_id`) VALUES('$msg','$dt','$from_name','$from_imgurl','$from_id','$to_nam e','$to_imgurl','$to_id')"; mysql_query($ins); $_SESSION['msg']="Your messege successfully send"; header('location:send_msg.php?id='.$get_id); exit; } ?> <!DOCTYPE html Transitional//EN" transitional.dtd"> PUBLIC "-//W3C//DTD XHTML 1.0 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css">
62
2013
#chat_panel{ position:absolute; top:480px; left:50%; width:400px; height:240px; background-color:#FFFFFF; color:#000000; padding:3px; overflow-y:auto; border:1px solid #666666; box-shadow:0px 0px 30px RED; -moz-box-shadow:0px 0px 30px RED; -webkit-box-shadow:0px 0px 30px RED; } </style> </head>
2013
<h1>Chat Zone[Onlive.com]</h1> </div> <div><?php include("slider.php"); ?></div> <div> <h1><font color="#00FF00">Hello :</font><font color="#FF0000"><?php echo $_SESSION['user_info']['name'] ? ></font></h1> <div> <p><font color="#00FF00" size="+1"><?php echo $_SESSION['msg']; $_SESSION['msg']=""; ?></font></p> <form name="frm" action="" method="post"> <table cellpadding="5" cellspacing="6" color:#333333; padding:2px; border:2px color:#CCCCCC; font-weight:bold;"> <tr> <td>Type Your Messege</td> </tr> <tr> <td><textarea name="msg" cols="30" rows="5"></textarea></td> </tr> <tr> <td bgcolor="#333333" align="center"><input name="post" value="SEND" /></td>
64
style="backgroundsolid #FFFF00;
type="submit"
2013
</tr> </table> </form> </div> <ahref="user_acc.php"><b>BACK</b></a> <?php $src1="SELECT * FROM $_SESSION['user_info']['id']."' ORDER BY `id` DESC"; $res1=mysql_query($src1); if(mysql_num_rows($res1)) { ?> <div id="chat_panel"> <table cellpadding="4" cellspacing="4"> <?php while($rx=mysql_fetch_array($res1)) { ?> <tr> <td align="center">
65
2013
<label style="color:#999999; font-size:10px;"><?php echo $rx['dt']; ? ></label><br/> <imgsrc="<?php echo $rx['from_imgurl'] ?>" width="50" height="50" border="1" /><br/> <label style="color:#999999; $rx['from_name']; ?></label> </td> <td align="center"><?php echo $rx['msg']; ?></td> </tr> <?php } ?> </table> </div> <?php } ?> </body> </html> font-size:10px;"><?php echo
66
2013
2013
{ $sql="UPDATE `reg` SET `name`='$ed_name',`phno`='$ed_ph',`imgurl`='$imgurl',`sq_question`=' $sq',`answer`='$ans' WHERE `email`='".$_SESSION['user_info'] ['email']."'"; $res= mysql_query($sql); if($res==1) { move_uploaded_file($_FILES['img']['tmp_name'],$imgurl); header('location:user_acc.php?msg1=Your profile information changed sucessfully!!Enjoy'); exit; } else { header('location:user_acc.php?err1=Try again!!!'); exit; } } else { header('location:user_acc.php?err1=fff!!!');
68
2013
exit; } } ?> <?php include("config.php"); ?> <?php include("session.php"); ?> <!DOCTYPE html Transitional//EN" transitional.dtd"> PUBLIC "-//W3C//DTD XHTML 1.0 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso8859-1" /> <title>Untitled Document</title> <style type="text/css"> /* #panel1 { top:60px; height:265px; width:400px; padding:10px; border:2px ridge #FFFFFF;
69
2013
background-color:#666666; color:#FFFFFF; border-radius:30px; -moz-border-radius:30px; -webkit-border-radius:30px; box-shadow:0px 0px 40px BLUE; -moz-border-shadow:0px 0px 40px BLUE; -webkit-border-shadow:0px 0px 40px BLUE; }*/ .tab{ border:2px solid #99FF33; color:#999999; box-shadow:0px 0px 40px BLUE; font-size:18px; font-weight:bold; } .td{ background-color:#000000; border:1px ridge #00CCFF; color:#FFFFFF; padding:1px;
70
2013
</style> </head> <body> <p></p> <div align="center"> <h1>Chat Zone[Onlive.Com]</h1> </div> <div><?php include("slider.php"); ?></div> <div> <h1><font color="#00FF00">Welcome :</font><font color="#FF0000"><?php echo $_SESSION['user_info']['name'] ? ></font></h1> </div> <div align="left"> <imgsrc="<?php echo $_SESSION['user_info']['imgurl'] ?>" width="120" height="100" border="2" style="padding:4px; background-color:#333333; border:1px solid #00FFFF;" /><br/><div align="right"><a href="user_acc.php?id=2">Edit Profile</a> <a href="user_acc.php?id=1">Change Password</a> <a href="logout.php?info=Loggout">Secure Logout</a></div> <hr />
71
2013
<?php if($_GET['id']==2) { ?> <div align="center"> <div id="panel1"> <form name="frm2" action="edit_profile.php" enctype="multipart/form-data"> <table cellpadding="6" cellspacing="8" class="tab"> <tr> <td align="right" colspan="4"> <div align="right"><a href="user_acc.php"><imgsrc="images/action_delete.gif" /></a></div> </td> </tr> <tr> <td>Name:-</td> <td><input type="text" name="edit_name" size="32" class="td"></td> </tr> <tr> <td>Phone no:-</td> <td><input type="text" name="edit_ph" size="32" class="td" ></td>
72
method="post"
2013
</tr> <tr> <td>Profile Picture:</td> <td><input type="file" name="img" class="td" /></td> </tr> <tr> <td>Security Question :-</td> <td><select name="s_question" class="td" ><option value="Select any one">Select any one</option> <option value="What is your pet name?">What is your pet name? </option> <option value="What is your birth place">What is your birth place</option> <option value="Who is your favourite author?">Who is your favourite author?</option> <option value="What is your first phone number?">What is your first phone number?</option></td> </tr><tr> <td>Answer :-</td> <td><input type="text" name="ans" size="32" class="td" /></td> </tr> <tr align="right">
73
2013
<td colspan="4"><input type="submit" name="ok" value="Change" /> </tr></table></form> </div></div> <?php } ?> </div></body></html>
2013
if($result==1) { header('location:user_acc.php?msg=Password changed'); exit; } else { header('location:user_acc.php?err=Try again!!'); exit; } } else { header('location:user_acc.php?err=Password do not match'); exit; } } else { header('location:user_acc.php?err=Password mismatch');
75
changed
successfully
2013
exit; } ?> <?php include("config.php"); ?> <?php include("session.php"); ?> <!DOCTYPE html Transitional//EN" transitional.dtd"> PUBLIC "-//W3C//DTD XHTML 1.0 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso8859-1" /> <title>Untitled Document</title> <style type="text/css"> /*#panel1 { top:40px; height:200px; width:350px; padding:10px; border:2px ridge #FFFFFF; background-color:#666666;
76
2013
color:#FFFFFF; border-radius:30px; -moz-border-radius:30px; -webkit-border-radius:30px; box-shadow:0px 0px 40px BLUE; -moz-border-shadow:0px 0px 40px BLUE; -webkit-border-shadow:0px 0px 40px BLUE; }*/ /*#panel2 { margin:10px 20px 0 0; height:300px; width:250px; padding:10px; border:2px ridge #FFFFFF; background-color:#666666; color:#FFFFFF; border-radius:30px; -moz-border-radius:30px; -webkit-border-radius:30px; box-shadow:0px 0px 40px BLUE;
77
2013
-moz-border-shadow:0px 0px 40px BLUE; -webkit-border-shadow:0px 0px 40px BLUE; }*/ .tab{ border:2px solid #99FF33; color:#999999; box-shadow:0px 0px 40px BLUE; font-size:18px; font-weight:bold; } .td{ background-color:#000000; border:1px ridge #00CCFF; color:#FFFFFF; padding:1px; </style> </head> <body> <p></p> <div align="center"> <h1>Chat Zone[Onlive.Com]</h1>
78
2013
</div> <div><?php include("slider.php"); ?></div> <div> <h1><font color="#00FF00">Welcome :</font><font color="#FF0000"><?php echo $_SESSION['user_info']['name'] ? ></font></h1> </div> <div align="left"> <imgsrc="<?php echo $_SESSION['user_info']['imgurl'] ?>" width="120" height="100" border="2" style="padding:4px; background-color:#333333; border:1px solid #00FFFF;" /><br/><div align="right"><a href="user_acc.php?id=2">Edit Profile</a> <a href="user_acc.php?id=1">Change Password</a> <a href="logout.php?info=Loggout">Secure Logout</a></div> <hr /> </div> <?php if($_GET['id']==1) { ?> <div align="center"> <div id="panel1"> <form name="frm1" action="change.php" method="post">
79
2013
<table cellpadding="4" cellspacing="6" class="tab"> <tr> <td align="right" colspan="4"> <div align="right"><a href="user_acc.php"><imgsrc="images/action_delete.gif" /></a></div> </td> </tr> <tr> <td>Old Password:</td> <td><input type="password" name="old_pwd" class="td" /></td> </tr> <tr> <td>New Password:</td> <td><input type="password" name="new_pwd" class="td" /></td> </tr> <tr> <td>Confirm Password:</td> <td><input type="password" name="cnew_pwd" class="td"/></td> </tr> <tr> <td colspan="2" align="right"><input type="submit" name="ok" value="Change" /></td>
80
2013
2013
header('location:forgot_pwd.php?msg=Your password is:' .$rx['pwd']); exit; } } else { header('location:forgot_pwd.php?err=Try again!!'); exit; } } else { header('location:forgot_pwd.php?err=Try again!!'); exit; } ?> ?> <?php include("config.php"); ?> <!DOCTYPE html Transitional//EN" transitional.dtd"> PUBLIC "-//W3C//DTD XHTML 1.0 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
<html xmlns="http://www.w3.org/1999/xhtml">
82
2013
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso8859-1" /> <title>Untitled Document</title> <style type="text/css"> .tab{ border:2px solid #99FF33; color:#999999; font-size:18px; font-weight:bold; } .td{ background-color:#000000; border:1px ridge #00CCFF; color:#FFFFFF; padding:1px; } </style> </head> <body> <p></p>
83
2013
<div align="center"> <h1>Chat Zone[Onlive.com]</h1> </div> <div><?php include("slider.php"); ?></div> <div> <h1><font color="#00FF00">Recover your password </font><font color="#FF0000">HERE !!!</font></h1> <?php if(isset($_GET['msg'])) { echo "<font color='#99FF33'>".$_GET['msg']."</font>"; } else { if(isset($_GET['err'])) { echo "<font color='RED'>".$_GET['err']."</font>"; } } ?> <form name="frm" action="forgot.php" method="post">
84
2013
<table cellpadding="4" cellspacing="5" class="tab"> <tr> <td>Security Question :-</td> <td><select name="s_question" class="td"><option value="Select any one">Select any one</option> <option value="What is your pet name?">What is your pet name? </option> <option value="What is your birth place">What is your birth place</option> <option value="Who is your favourite author?">Who is your favourite author?</option> <option value="What is your first phone no.?">What is your first phone no.?</option></td> </tr> <tr> <td>Answer :-</td> <td><input type="text" name="ans" size="28" class="td" /></td> </tr> <tr> <td colspan="2" align="center" bgcolor="#990000"><input type="submit" name="ok" value="Submit" /></td> </tr> </table>
85
2013
Session code
<?php if(empty($_SESSION['user_info'])) { header('location:login.php'); exit; } ?>
86
2013
Logout code
<?php include("config.php"); ?> <?php $up="UPDATE `reg` SET `status`='logout' $_SESSION['user_info']['id']."'"; mysql_query($up); session_destroy(); session_start(); $_SESSION['msg']="You are Successfully Logout"; header('location:login.php'); exit; ?> WHERE `id`='".
87
2013
OVERVIEW
88
2013
Registration
Login page
89
2013
2013
Change password
2013
Chat screen
Forgot password
92
2013
DATABASE 1
DATABASE 2
93
2013
2013
smooth completion of any communication it requires more time and human effort in manual systems. This project has been developed to receive instant formatted test and graphical messages and to provide total user satisfaction.
Future Scope
I will definitely try to add some new lineaments over the coming months so that it fulfill our every need and gives the users the best chat experience. I am planning to include video chat option. I have an idea to come up with features like the wall, picture navigation and how messages be shown in inbox.
95
2013
LIMITATION
In this project there are some limitations which can be dissolved if i get more time: 1. Due to shortage of time-span, I was unable to add the video-chat feature. 2. The desired look and feel are not up to the benchmark, there is a need to focus on visual aspects. 3. I will be looking at a new way to show when you have a new message or friend request. 4. The purpose of this project is to guide and facilitate more and more online users. So, the site should be very well backedup and it is very
96
2013
necessary to have anclose eye as far as security measures are concerned i.e, these need to be updated more often than not.
Conclusion
Since its inception, the internet has become a more and more relied upon medium in peoples' everyday lives. People love to get engaged in communication via realtime conversation.In an on-the-go society, the role of online chatting system is very appealing and beneficial. My project is only a humble venture to bring back the personal touch at the time of social interaction. Several user friendly coding have also adopted. It is easy to use and the installation technique is so simple thatwill have you up and running in minutes. Although, I have tried my level best to make this error-free and enjoyable to the users, there are still ways to improve. I am trying to implement some innovative thoughts, several bugs and glitches have
97
2013
been fixed while doing this. But, things do not happen overnight, as they say,the sky's the limit, development must roll on.
BIBLIOGRAPHY
A project means a set of works done in a specific period of time. During this time of the project I have taken help from several books, documents, papers, journals, websites etc. The helpful books are:
1) Luke Welling, PHP and MySQL Web Development, Developer's
Library
2) RasmusLerdorf,Programming PHP,Paperback 3) Larry Ullman, PHP for the World Wide Web, Visual Quick Start
2013
99