what is joomla?
Joomla is the content management system.It is all ready develop software. A lot of menu and tools provided by this system.A developer or a owner of that site can change our contents with the help of tools or menu.It is winner of content management award of 2007.
- Joomla is the extented version of Mambo.
Joomla is famous Content Management system based on MVC (Model view controller) architecture.
Joomla! came into being as the result of the fork of Mambo by the development team on August 17, 2005. ---Open Source ---Customize modules ---Built-in modules & plugins ---Develop by PHP ---MySql Support ---Admin & User Section ---User Management ---Media Manager ---Language Manager ---Banner Management & many more............
Q.1 What is joomla in php?
ANSWER: Joomla is an open source content management system.
Q.2 What is zend engine?
ANSWER: Zend engine is used internally by php as a compiler and runtime engine...
Q.3 Joomla! Features:
ANSWER *
Completely database driven site engines
*
News, products or services sections fully editable and manageable
*
Topics sections can be added to by contributing authors
*
Fully customizable layouts including left, center and right menu boxes
*
Browser upload of images to your own library for use anywhere in the site
*
Dynamic Forum/Poll/Voting booth for on-the-spot results
*
Runs on Linux, FreeBSD, MacOSX server, Solaris and AIX
Q.4 What are some real world examples of what Joomla! can do?
ANSWER:
Joomla is used all over the world to power Web sites of all shapes and sizes. For example:
* Corporate Web sites or portals
* Corporate intranets and extranets
* Online magazines, newspapers, and publications
* E-commerce and online reservations
* Government applications
* Small business Web sites
* Non-profit and organizational Web sites
* Community-based portals
* School and church Web sites
* Personal or family homepages
\\\\\\\\form validation using php\\\\\\\\\\\\\\
<?php
if(isset($_POST['name'],$_POST['age'],$_POST['email']))
{
$name=$_POST['name'];
$age=$_POST['age'];
$email=$_POST['email'];
$error=array();
if(empty($name) || empty($age) || empty($email))
{
$error[]="all fields are empty";
}
else
{
if(strlen($name)>20)
{
$error[]="name is long";
}
if(!is_numeric($age))
{
$error[] = "age must be numeric";
}
else
{
if($age<=0)
{
$error[]= "Age must be positive";
}
}
if(filter_var($email,FILTER_VALIDATE_EMAIL)===FALSE)
{
$error[]="Enter the valid email address";
}
}
if(!empty($error))
{
foreach($error as $errors)
{ echo "<strong>",$errors,"</strong><br />";
}
}else{
header("Location:in.php ");
echo "ur login in";}
}
?>
<form action="form.php" method="POST">
<p>
name<input type="text" name="name" /><br>
age<input type="text" name="age" /><br>
email<input type="text" name="email" /><br>
<input type="submit"></form>
\\\\\\\\\\\\\\\\\\\\\check form from database and insert\\\\\\\\\\\\\\\\\\
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$('#feedback').load('check.php').show();
$('#name').keyup(function()
{
$.post('check.php', { name:form.name.value},
function(result)
{
$('#feedback').html(result).show();
});
});
});
</script>
<style type="text/css">
#feedback
{display:inline}
</style>
</head>
<body>
</body>
<form name="form" action="insert.php" method="post">
Name
<input type="text" id="name" name="name" /> <div id="feedback"></div><br>
city
<input type="text" name="city" id="city" /><br>
phno
<input type="text" name="phno" id="phno" /><br>
Email
<input type="text" name="email" id="email" /><div id="f">hhh</div><br>
<input type="submit" />
</form>
</html>
\\\\\\\\\\\\\\\\\\\\\\check.php\\\\\\\\\\\\\\\\\\\\\\\\\
<?php
mysql_connect("localhost","","") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());
$uname=mysql_real_escape_string($_POST['name']);
//$email=mysql_real_escape_string($_POST['email']);
$check=mysql_query("select * from tab1 where name='$uname'");
$chck_rows=mysql_num_rows($check);
if($uname=="")
echo "choose name";
else if(strlen($uname)<=4)
echo "Too low";
else
{
if($chck_rows==0)
echo "sucess";
else
echo "loserrrrrrrrrrrrr";
}
?>
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\login program\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
<?php
include 'oop.php';
if(logi())
{
header("Location:output.php");
}
if(isset($_POST['login']))
{
$name=$_POST['name'];
$pass=$_POST['pass'];
if(isset($_POST['rembr']))
$rembr=$_POST['rembr'];
else
echo "";
if($name&&$pass)
{
$login=mysql_query("select * from log where name='$name'");
while($row=mysql_fetch_assoc($login))
{
$dbp=$row['id'];
if($pass==$dbp)
$loginok=TRUE;
else
$loginok=FALSE;
if($loginok==TRUE)
{
if($rembr=="on")
setcookie("name",$name,time()+7200);
else if($rembr=="")
$_SESSION['uname']=$name;
header("Location:output.php");
exit();
}
else
{die("incorre password ");}
}
}
else
die("incorrect user name/password");
}
?>
<form action="in.php" method="POST">
name<input type="text" name="name" /><br>
pass<input type="password" name="pass" /><br>
<input type="checkbox" name="rembr" /><br>
<input type="submit" name="login" value="submit"/><br>
</form>
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\output.php\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
<?php
include 'oop.php';
if(!logi())
{
header("Location:in.php");
exit();
}
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\diffrence of dates\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
$date1 = "2009-03-24";
$date2 = "2009-06-24";
$diff = abs(strtotime($date2) - strtotime($date1));
$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
printf("<br>%d years, %d months, %d days\n", $years, $months, $days);
?>
u r log in<p />
<a href="function.php">logout</a>
\\\\\\\\\\\\\\\\\\\function.php\\\\\\\\\\\\\\
<?php
session_start();
session_destroy();
setcookie("name","",time()-7200);
header("Location:in.php");
?>
\\\\\\\\\\\\\\\\\\\\\\\oop.php\\\\\\\\\\\\\\\\\\\\\\
<?php
session_start();
mysql_connect("localhost","","") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());
//login check function
function logi()
{
if(isset($_SESSION['uname'])||isset($_COOKIE['name']))
{
$logi=TRUE;
return $logi;
}
}
\\\\\\\\\\\\\\\\\\\\\insert.php\\\\\\\\\\\\\\\
<?php
$con=mysql_connect("localhost","","") or die(mysql_error());
mysql_select_db("test",$con) or die(mysql_error());
$name=$_POST['name'];
$city=$_POST['city'];
$phno=$_POST['phno'];
$email=$_POST['email'];
$ins=mysql_query("insert into tab1(name,city,phno,email) values ('$name','$city','$phno','$email')");
if($ins)
{
echo "sucessfully inserted";
}
else
{
echo "it will not insert";
}
?>
No comments:
Post a Comment