Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
CONTENT MANAGEMENT SYSTEM
1. 1
CHAPTER 1
INTRODUCTION OF PHP
What is PHP?
The PHP Hypertext Preprocessor (PHP) is a programming language that allows web developers to
create dynamic content that interacts with databases. PHP is basically used for developing web
based software applications. It is a widely-used, open source scripting language and executed on
the server.PHP started out as a small open source project that evolved as more and more people
found out how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in 1994.
PHP is a server side scripting language that is embedded in HTML. It is used to manage
dynamic content, databases, session tracking, even build entire e-commerce sites.
It is integrated with a number of popular databases, including MySQL, PostgreSQL,
Oracle, Sybase, Informix, and Microsoft SQL Server.
PHP is pleasingly zippy in its execution, especially when compiled as an Apache module
on the Unix side. The MySQL server, once started, executes even very complex queries
with huge result sets in record-setting time.
PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4
added support for Java and distributed object architectures (COM and CORBA), making
n-tier development a possibility for the first time.
PHP is forgiving: PHP language tries to be as forgiving as possible.
PHP Syntax is C-Like.
Why PHP?
PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
PHP is compatible with almost all servers used today (Apache, IIS, etc.)
2. 2
PHP supports a wide range of databases
PHP is free. Download it from the official PHP resource: www.php.net
PHP is easy to learn and runs efficiently on the server side.
Installation
What Do I Need?
1. Browser
2. Server ( Wampserver , Xampp)
3. Editor (Dreamweaver, notepad++,notepad )
Set Up PHP on Your Own PC
1. Step 1: download the files. Download the latest PHP 5 ZIP package from
www.php.net/downloads.php. ...
2. Step 2: extract the files. ...
3. Step 3: configure php.ini. ...
4. Step 4: add C:php to the path environment variable. ...
5. Step 5: configure PHP as an A
6. pache module. ...
7. Step 6: test a PHP file.
3. 3
CHAPTER 2
INTRODUCTION OF THE PROJECT
1.1 The Definition of a CMS
A web site's "content" is a combination of different components: text, graphics, images,
scripts, included files such as Flash animations, audio/video streams or downloadable files.
All of these may be components of one page, included in an HTML page using links or
sometimes integrated in the HTML page itself. But even the text shown in the HTML page
itself is regarded as "content". Content management systems organize and classify these
components by dividing the content from the layout. In more concrete terms, the content is
stored in content files, the layout is stored in layout files (i.e. document templates).
Using this approach, a CMS provides the means for treating content and layout in separate
ways. This also allows using the same content in different documents and formatted for
different media ("crossmedia publishing"); think of an HTML page as it shows in the browser
and the printer-friendly display of the same page,
for example. A content management system is a software package specifically designed to
manage a website. It is installed by the web designers, but intended to be used by you. First
off, it provides you with a simple, non-technical way of updating your content. This is
typically (but not always) done via a web-based interface that works much like Word does.
Just point-and-click, type in the new words, and hit save. The site is instantly updated. Equally
easy is adding new pages, deleting old ones, or restructuring the site to match your new
business model.
The index page or the Blog page of this website consists of the images that user wants to upload
and manage on his website which consists of its category ,time when its uploaded and the and
other user can comments on his site too .
4. 4
CHAPTER 3
REQUIREMENTS, FEASIBILITY AND SCOPE
3.1 SOFTWAREREQUIREMNETS
Browser
Server(Wampserver ,XAMPP)
PHP
Database (MySQL suggested)
Editor(Notepad, Notepad++,Dreamweaver)
3.2 HARWARE REQUIREMENTS
Minimum 350MB Hard Disk spacefor installation.
4GB HD spacerequired for a typical live system with 1000-2000 events.
Recommended minimum CPU - Pentium 4, 3.2GHz.
Recommended 1GB RAM for a Central Server with 3 Nodes.
Network card.
3.3 FEASIBILITY AND SCOPE
This project is feasible as all modules are working on the local server or wamp server.
This project can be used to develop any educational website. This website can be used to
promote the school and colleges on web.
The mail containing the order information reaches the to the responsible person within a
second.
After receiving the mail the school staff can contact the person who has fill the contact
from and mail can be send to the mailer person.
5. 5
CHAPTER 4
Introduction to bootstrap
Bootstrap is a sleek, intuitive, and powerful mobile first front-end framework for faster
and easier web development.
It uses HTML,CSS and Javascript.
History
Bootstrap was developed by Mark Otto and Jacob Thornton at Twitter.
Mobile first approach: Since Bootstrap 3, the framework consists of Mobile first styles
Throught the entire library instead of in separate files.
Browser Support: It is supported by all popular browsers..
Easy to get started: With just the knowledge of HTML and CSS anyone can get started
With bootstrap. Also the bootstap also the bootstrap official site has a good
documentation.
Responsive design: Bootstrap's responsive CSS adjusts to Desktops, Tablets and Mobiles.
Provides a clean and uniform solution for building an interface for developers.
It contains beautiful and functional built-in components which are easy to customize.
Scaffolding: Bootstrap provides a basic structure with Grid System, link styles, background.
CSS: Bootstrap comes with feature of global CSS settings, fundamental HTML elements
Components: Bootstrap contains over a dozen reusable components built to provide
dropdowns, navigation, alerts, popovers, and much more.
JavaScript Plugins: Bootstrap contains over a dozen custom jQuery plugins. You can easily
include them all, or one by one. This is covered in details in the section Bootstrap Plugins.
Customize: You can customize Bootstrap's components, LESS variables, and jQuery plugins to
get your very own version.
6. 6
CHAPTER 5
CODING, DESIGN AND DATA FLOW DIGRAM
5.1 Include Folder
5.1.1 Database Connection:
<?php
$con= mysqli_connect("localhost","root","","phpcms");
?>
5.1.2 Functions:-
<?php
require_once("include/db.php");
require_once("include/session.php");
require_once("include/function.php");
?>
<?php
function redirect_to($newlocation){
header("Location:".$newlocation);
exit;
}
function login_attempt($username, $password){
global $con;
$query="select * from registration where username='$username' and
password='$password'";
$execute=mysqli_query($con,$query);
23. 23
echo successmessage();?>
</div> <!--blog header!-->
<div class="rowcontent">
<div class="col-sm-6" >
<?php
global $con; if(isset($_GET['searchbutton'])){
$search=$_GET['search'];
$query= "select * from admin where datetime like '%$search%'
or title like '%$search%'
or category like '%$search%'
or postlike '%$search%'
"; }
else{
$query="select * from admin order by datetime desc";
}
$execute=mysqli_query($con,$query);
while($data=mysqli_fetch_array($execute)){
$id= $data['id'];
$date=$data['datetime'];
30. 30
<div class="row">
<div class="col-sm-12">
<h2 align="center">What we collect</h2>
<p align="center">We may collect the following information:</p>
<ul >
<li type="disc">
<div>name and full name</div>
</li>
<li type="disc">
<div>contact information including email address</div>
</li>
<li type="disc">
<div>demographic information such as postcode, preferences </div>
</li>
<li type="disc">
<div>other information relevant to customer surveys and/or offers</div>
</li>
</ul>
<h2 align="center">What we do with the information we gather</h2>
<p align="center">We require this information to understand your needs and provide you with a
better service, and in particular for the following reasons:</p>
<ul>
<li type="disc">
<div>Internal record keeping.</div>
</li>
31. 31
<li type="disc">
<div>We may use the information to improve our technical discussion service.</div>
</li>
</ul>
<h2 align="center">Security</h2>
<p align="justify">We are committed to ensuring that your information is secure. In order to
prevent unauthorised access or disclosure we have put in place suitable physical, electronic and
managerial procedures to safeguard and secure the information we collect online.</p>
<h2 align="center">How we use cookies</h2>
<p align="center">A cookie is a small file which asks permission to be placed on your
computer’s hard drive. Once you agree, the file is added and the cookie helps analyse web traffic
or lets you know when you visit a particular site. Cookies allow web applications to respond to
you as an individual. The web application can tailor its operations to your needs, likes and
dislikes by gathering and remembering information about your preferences.We use traffic log
cookies to identify which pages are being used. This helps us analyse data about webpage traffic
and improve our website in order to tailor it to customer needs. We only use this information for
statistical analysis purposes and then the data is removed from the system.Overall, cookies help
us provide you with a better website, by enabling us to monitor which pages you find useful and
which you do not. A cookie in no way gives us access to your computer or any information about
you, other than the data you choose to share with us.You can choose to accept or decline cookies.
Most web browsers automatically accept cookies, but you can usually modify your browser
setting to decline cookies if you prefer. This may prevent you from taking full advantage of the
website.</p>
<h2 align="center">Controlling your personal information</h2>
<p align="center">You may choose to restrict the collection or use of your personal information
in the following ways:</p>
<ul>
<li type="disc">
<div>whenever you are asked to fill in a form on the website, look for the box that you can click
to indicate that you do not want the information to be used by anybody for direct marketing
purposes</div>
</li>
<li type="disc">
32. 32
<div>if you have previously agreed to us using your personal information for direct asking
question answer purpose, you may change your mind at any time by <strong>writing to
us</strong><strong>.</strong></div>
</li>
</ul>
<p align="center">We will not sell, distribute or lease your personal information to third parties
unless we have your permission or are required by law to do so. We may use your personal
information to send you promotional information about third parties which we think you may
find interesting if you tell us that you wish this to happen.You may request details of personal
information which we hold about you under the Data Protection Act . A small fee will be
payable. If you would like a copy of the information held on you please <a
href="contactus.php"><strong>contact us.</strong></a>If you believe that any information we
are holding on you is incorrect or incomplete, please write to or email us as soon as possible, at
the above address. We will promptly correct any information found to be incorrect.</p>
<h2 align="center">Privacy Policy</h2>
<p align="center">This privacy policy sets out how <b>Technical Discussion Forum</b> uses
and protects any information that you give TDF when you use this website. TDF is committed to
ensuring that your privacy is protected. Should we ask you to provide certain information by
which you can be identified when using this website, then you can be assured that it will only be
used in accordance with this privacy statement. TDF may change this policy from time to time
by updating this page. You should check this page from time to time to ensure that you are happy
with any changes. This policy is effective from 31th of March, 2012.</p>
</div>
</div><!-- this div is for row !-->
</div><!-- this div for the body part of main class container!-->
<?php include'footer.php'; ?> </body>
</html>
84. 84
Full post page
Codeing of full post:
<?php
require_once("include/db.php");
require_once("include/session.php");
require_once("include/function.php");
?>
<?php
if(isset($_POST["submit"]))
{
$name=$_POST["name"];
$email=$_POST["email"];
$comment=$_POST["comment"];
$getidpost=$_GET['id'];
date_default_timezone_set("Asia/kolkata");
$currenttime=time();
$datetime=strftime("%B-%d-%Y %H:%M:%S",$currenttime); //more at
php.net/manual/en/function.date.php//
$datetime;
//more at http://php.net/manual/en/timezones.php
if(empty($name)||empty($email)||empty($comment))
85. 85
{
$_SESSION["ERROR MESSAGE"]= "fields Can't be Blank";
}
elseif(strlen($name)<3||strlen($email)<3)
{
$_SESSION["ERROR MESSAGE"]= "either name or mail you
entered is less Than 3 Character";
}
elseif(strlen($comment)>300)
{
$_SESSION["ERROR MESSAGE"]= "comments must be less than
300 character";
}
else
{ $postidfromurl=$_GET['id'];
global $con;
$query="insert into comment
values('','$datetime','$name','$email','$comment','pending','OFF','$postidfromurl')";
$execute=mysqli_query($con,$query);
if($execute)
{ $_SESSION["SUCCESS MESSAGE"]= "Comment added successfully";
redirect_to("fullpost.php?id= {$getidpost}");
}
else{
88. 88
<div class="blog-header">
<h3>
Hello Bloggers </h3>
</div> <!--blog header!-->
<div class="row">
<div class="col-sm-12">
<?php
global $con;
if(isset($_GET['searchbutton'])){
$search=$_GET['search'];
$query= "select * from admin where datetime like '%$search%'
or title like '%$search%'
or category like '%$search%'
or post like '%$search%'
";
}
else{
$getidpost=$_GET['id'];
$query="select * from admin where id='$getidpost' order by datetime desc";}
$execute=mysqli_query($con,$query); while($data=mysqli_fetch_array($execute)){
$id= $data['id'];
$date=$data['datetime'];
$title=$data['title'];
$category=$data['category'];
$admin=$data['author'];
91. 91
<input class="btn btn-primary " type="submit" name="submit" value="submit"/>
</fieldset>
</img>
</form>
</div>
</div><!--sm-10-wala!-->
</div><!-- this div is for row !-->
</div><!-- this div for the body part of main class container!-->
<?php include ‘footer.php’; ?> <a
</body>
</html>
98. 98
Chapter 9
FUTURE SCOPE OF THE PROJECT
In addition to the emails, we can send contact information on the counsellor mobile phone in the
form of message .then it will become more secure and easy to give quick reply.
We have to add the user login .
We have to add the more interesting news or articles.
We have to add the online free submission of the particular blog.
We can add one more page to celebrate and wishing upcoming birthday of our Bloggers.
We can send email to a large number of people and can also store the information of the bloggers
in the database.
We can enhance the look of the website using more css code.
99. 99
CONCLUSIONS
Now, we can conclude our project. This project is divided into modules.
Each module is working fine and plays an important role.
The website is totally dynamic, we can easily update our data of the Blog.
Local host functionality allows the viewers to see the full website or information about the
CONTANT MANAGEMENT SYSTEM (CMS).
The authorise person can easily delete and update in all the important section.
After submitting the contact from and registration from the receiver will receive the information,
personal information in database.
After coming of the main admin authoriser person can see it and contact the person and convey
the message to that person.