Friday, 10 October 2014

NAME TEXT ANIMATION

<style type="text/css">
/* Circle Text Styles */
#outerCircleText {
/* Optional - DO NOT SET FONT-SIZE HERE, SET IT IN THE SCRIPT */
font-style: italic;
font-weight: bold;
font-family: 'comic sans ms', verdana, arial;
color: RED;
/* End Optional */

/* Start Required - Do Not Edit */
position: absolute;top: 0;left: 0;z-index: 3000;cursor: default;}
#outerCircleText div {position: relative;}
#outerCircleText div div {position: absolute;top: 0;left: 0;text-align: center;}
/* End Required */
/* End Circle Text Styles */
</style>
<script type="text/javascript">

/* Circling text trail- Tim Tilton
   Website: http://www.tempermedia.com/
   Visit: http://www.dynamicdrive.com/ for Original Source and tons of scripts
   Modified Here for more flexibility and modern browser support
   Modifications as first seen in http://www.dynamicdrive.com/forums/
   username:jscheuer1 - This notice must remain for legal use
   */

;(function(){

// Your message here (QUOTED STRING)
var msg = "wEB dESINGING";

/* THE REST OF THE EDITABLE VALUES BELOW ARE ALL UNQUOTED NUMBERS */

// Set font's style size for calculating dimensions
// Set to number of desired pixels font size (decimal and negative numbers not allowed)



//change text size


var size = 75;










// Set both to 1 for plain circle, set one of them to 2 for oval
// Other numbers & decimals can have interesting effects, keep these low (0 to 3)
var circleY = 1.75; var circleX = 2;

// The larger this divisor, the smaller the spaces between letters
// (decimals allowed, not negative numbers)
var letter_spacing = 5;

// The larger this multiplier, the bigger the circle/oval
// (decimals allowed, not negative numbers, some rounding is applied)
var diameter = 10;

// Rotation speed, set it negative if you want it to spin clockwise (decimals allowed)
var rotation = 0.4;

// This is not the rotation speed, its the reaction speed, keep low!
// Set this to 1 or a decimal less than one (decimals allowed, not negative numbers)
var speed = 0.3;

////////////////////// Stop Editing //////////////////////

if (!window.addEventListener && !window.attachEvent || !document.createElement) return;

msg = msg.split('');
var n = msg.length - 1, a = Math.round(size * diameter * 0.208333), currStep = 20,
ymouse = a * circleY + 20, xmouse = a * circleX + 20, y = [], x = [], Y = [], X = [],
o = document.createElement('div'), oi = document.createElement('div'),
b = document.compatMode && document.compatMode != "BackCompat"? document.documentElement : document.body,

mouse = function(e){
 e = e || window.event;
 ymouse = !isNaN(e.pageY)? e.pageY : e.clientY; // y-position
 xmouse = !isNaN(e.pageX)? e.pageX : e.clientX; // x-position
},

makecircle = function(){ // rotation/positioning
 if(init.nopy){
  o.style.top = (b || document.body).scrollTop + 'px';
  o.style.left = (b || document.body).scrollLeft + 'px';
 };
 currStep -= rotation;
 for (var d, i = n; i > -1; --i){ // makes the circle
  d = document.getElementById('iemsg' + i).style;
  d.top = Math.round(y[i] + a * Math.sin((currStep + i) / letter_spacing) * circleY - 15) + 'px';
  d.left = Math.round(x[i] + a * Math.cos((currStep + i) / letter_spacing) * circleX) + 'px';
 };
},

drag = function(){ // makes the resistance
 y[0] = Y[0] += (ymouse - Y[0]) * speed;
 x[0] = X[0] += (xmouse - 20 - X[0]) * speed;
 for (var i = n; i > 0; --i){
  y[i] = Y[i] += (y[i-1] - Y[i]) * speed;
  x[i] = X[i] += (x[i-1] - X[i]) * speed;
 };
 makecircle();
},

init = function(){ // appends message divs, & sets initial values for positioning arrays
 if(!isNaN(window.pageYOffset)){
  ymouse += window.pageYOffset;
  xmouse += window.pageXOffset;
 } else init.nopy = true;
 for (var d, i = n; i > -1; --i){
  d = document.createElement('div'); d.id = 'iemsg' + i;
  d.style.height = d.style.width = a + 'px';
  d.appendChild(document.createTextNode(msg[i]));
  oi.appendChild(d); y[i] = x[i] = Y[i] = X[i] = 0;
 };
 o.appendChild(oi); document.body.appendChild(o);
 setInterval(drag, 25);
},

ascroll = function(){
 ymouse += window.pageYOffset;
 xmouse += window.pageXOffset;
 window.removeEventListener('scroll', ascroll, false);
};

o.id = 'outerCircleText'; o.style.fontSize = size + 'px';

if (window.addEventListener){
 window.addEventListener('load', init, false);
 document.addEventListener('mouseover', mouse, false);
 document.addEventListener('mousemove', mouse, false);
  if (/Apple/.test(navigator.vendor))
   window.addEventListener('scroll', ascroll, false);
}
else if (window.attachEvent){
 window.attachEvent('onload', init);
 document.attachEvent('onmousemove', mouse);
};

})();

</script>

<BODY BGCOLOR="BLACK">

Wednesday, 8 October 2014

facebook.com coding

function


<?php
session_start();
mysql_connect("localhost","root","");
mysql_select_db("login") or die("couldn't connect to db.");
?>




Index
<?php 

include_once("function.php");

if(isset($_POST['username']) && isset($_POST['password']))
{
$username = $_POST['username'];
$password = $_POST['password'];
$sql = "SELECT * FROM users WHERE username='$username' AND pass='$password'";
$query  = mysql_query($sql);
$num_rows = mysql_num_rows($query);
if($num_rows >= 1)
{
$_SESSION['registered'] = 'sdfds';
header("Location: dashboard.php");

}else
{
$_SESSION['dontexist'] = 'dsfds';
}
}


if(isset($_POST['user']))
{
$username = $_POST['user'];
$password = $_POST['password'];

$sql = "SELECT * FROM users WHERE username='$username'";
$query  = mysql_query($sql);
$num_rows = mysql_num_rows($query);
if($num_rows >= 1)
{
//alert('sdfsd');
$_SESSION['user_exist'] = 'dfds';
}else
{
$sql = "INSERT INTO users VALUES (NULL, '$username', '$password')";
mysql_query($sql);
$_SESSION['user_registerd'] = 'fg';
header("Location: dashboard.php");
}


}

?>


<form action="" method="post">
Email Address <input type="text" name="username">
    <span>Password</span>
    <input type="password" name="password" id="">
    <input type="submit" value="Login">
</form>
<?php

if(isset($_SESSION['dontexist']))
{
echo '<p style="color:red;">Please check Your user name and password.</p>';
unset($_SESSION['dontexist']);
}
 ?>



<h3>REgisration foerm</h3>
<table border="1" width="350">
<tr>
<form action="" method="post">
<td>Email</td><td>
<input type="text" name="user">
    </td>
</tr>
<tr>
<td>Password</td>
<td>

    <input type="password" name="password" id=""> <br>
    </td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="Submit">
</td>
</tr>
</form>
</table>
<?php

if(isset($_SESSION['user_exist']))
{
echo '<p style="color:red;">This username is aalready exit.</p>';
unset($_SESSION['user_exist']);
}
 ?>






Dashbord


<?php
include_once("function.php");


if(!isset($_SESSION['registered']))
{
header("Location: index.php");
}

if(isset($_SESSION['user_registerd']))
{
echo '<p style="color:red;">Thank you</p>';
unset($_SESSION['user_registerd']);
}
?>
User dashboard  <a href="logout.php">logout</a>




Logout
<?php
include_once("function.php");

unset($_SESSION['registered']);
header("Location: index.php");

Thursday, 2 October 2014

session_start and php

<?php
session_start();
echo "<h1>welcome to webpage";
$_SESSION["hello"]="college";
$_SESSION["web"]="Designing";
echo "<a href='new.php'>Next Page</a>";


?>



<?php
session_start();
echo "<h1>Page2</h1>";
if($_SESSION["computer"])
{
echo "Already Member";
}
else
{
echo "New User";
}
?>

include and include_once

<?php
include_once("header.php");
include("menu.php");
include("content.php");
include_once("header.php");


?>

Tuesday, 23 September 2014

index


<style>
.option
{
width:175px;
}
.question
{
font-size:20px;
font-weight:bold;
}
</style>
<script>
function abc()
{
rollno=document.forms["check"]["rollno"].value;
if(rollno=="")
{
alert("Please Fill Your Roll No.");
return false;
}
name=document.forms["check"]["name"].value;
if(name=="")
{
alert("Please Fill Your Name");
return false;
}
teacher=document.forms["check"]["teacher"].value;
if(teacher=="")
{
alert("Please Select Your Teacher Name");
return false;
}
timing=document.forms["check"]["timing"].value;
if(timing=="")
{
alert("Please Select Your Class Timing");
return false;
}
course=document.forms["check"]["course"].value;
if(course=="")
{
alert("Please Select Your Course Name");
return false;
}


upload=document.forms["check"]["upload"].value;
if(upload=="")
{
alert("Please Upload Your Picture");
return false;
}

}
</script>



<body bgcolor="white">
<form method="post" action="info.php" enctype="multipart/form-data" name="check">
<h1 align="center">Online Examination System</h1>
<table width="900" align="center">
<form action="info.php" method="POST">
<tr>
<td>Rollno</td>
<td>
<input type="text" name="rollno" size="40">
</td>
<td>Name</td>
<td>
<input type="text" name="name" size="40">
</td>
</tr>

<tr>
<td>Teacher</td>
<td>
<select name="teacher">
      <option value="">Select-Teacher</option>
      <option value="Sir Majid">Sir Majid</option>
      <option value="Sir Tahir">Sir Tahir</option>
      <option value="Sir Ali">Sir Ali</option>
      <option value="Sir Atif">Sir Atif</option>
      <option value="Sir Javed">Sir Javed</option>
</select>
</td>
<td>Timing</td>
<td>
<select name="timing">
      <option>Select-Paper-Timing</option>
      <option value="09:00 am">09:00 am</option>
      <option value="10:00 am">10:00 am</option>
      <option value="11:00 am">11:00 am</option>
      <option value="12:00 pm">12:00 pm</option>
      <option value="01:00 pm">01:00 pm</option>
</select>
</td>
</tr>

<tr>
<td>Select-Paper</td>
<td>
<select name="paper">
      <option>Select-Paper</option>
      <option value="Web designing">Web designing</option>
      <option value="Graphic designing">Graphic designing</option>
      <option value="Hardware">Hardware</option>
      <option value="IELTS">IELTS</option>
      <option value="JAVA">JAVA</option>
</select>
</td>
<td>Picture</td>
<td><input type="file" name="upload">
</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<table border="1" align="center" width="1000">
<tr>
<td>
<h1 align="left">Q1.What Is HTML???</h1>
<input type="radio" name="q1" value="10">Hypertext Markup Language
<br>
<br>
<input type="radio" name="q1" value="0">Hyper markup languages
<br>
<br>
<input type="radio" name="q1" value="0">text markup languages
<br>
<br>
<input type="radio" name="q1" value="0">markup languages

</td>
</tr>

<tr>
<td>
<h1 align="left">Q2.What Is Css???</h1>
<input type="radio" name="q2" value="10">Cascading Style Sheets
<br>
<br>
<input type="radio" name="q2" value="0">Computer Style Sheets
<br>
<br>
<input type="radio" name="q2" value="0">Camera Style Sheets
<br>
<br>
<input type="radio" name="q2" value="0">daynamic Style Sheets

</td>
</tr>

<tr>
<td>
<h1 align="left">Q3.What Is Flash???</h1>
<input type="radio" name="q3" value="10">multimedia
<br>
<br>
<input type="radio" name="q3" value="0">aminnatinon
<br>
<br>
<input type="radio" name="q3" value="">multimedia
<br>
<br>
<input type="radio" name="q3" value="0">multimedia

</td>
</tr>

<tr>
<td>
<h1 align="left">Q4.What Is Adobe Photoshop???</h1>
<input type="radio" name="q4" value="0">Hyper text markup languages
<br>
<br>
<input type="radio" name="q4" value="10">Adobe Photoshop is a raster graphics editor developed and published by Adobe Systems for Windows and OS X.
<br>
<br>
<input type="radio" name="q4" value="0">Hyper text markup languages
<br>
<br>
<input type="radio" name="q4" value="0">Hyper text markup languages

</td>
</tr>

<tr>
<td>
<h1 align="left">Q5.What Is PHP???</h1>
<input type="radio" name="q5" value="10">Hypertext Preprocessor
<br>
<br>
<input type="radio" name="q5" value="0">Preprocessor
<br>
<br>
<input type="radio" name="q5" value="0">text Preprocessor
<br>
<br>
<input type="radio" name="q5" value="0">Hyper Preprocessor

</td>
</tr>


<tr>
<td align="center">
<input type="Submit" value="Paper Complete">
</td>
</tr>
</form>
</table>






info


<!DOCTYPE html>
<html>
<head>
</head>
<body>


<?php
$server="localhost";
$user="root";
$password="";
$database="exam";
$con=mysql_connect($server,$user,$password);
mysql_select_db($database,$con);




$rollno=$_POST["rollno"];
$name=$_POST["name"];
$teacher=$_POST["teacher"];
$timing=$_POST["timing"];
$paper=$_POST["paper"];

$name1=$_FILES["upload"]["name"];
$type=$_FILES["upload"]["type"];
$size=$_FILES["upload"]["size"]/1024;
$path=$_FILES["upload"]["tmp_name"];
move_uploaded_file($path,"file/".$name1);





$q1=$_POST["q1"];
$q2=$_POST["q2"];
$q3=$_POST["q3"];
$q4=$_POST["q4"];
$q5=$_POST["q5"];

$obtainedmarks=($q1+$q2+$q3+$q4+$q5);
$totalmarks=50;
?>

<table align="center" border="1" width="700" height="330">
<tr>
<td colspan="3"><h1 align="center"> Result Card </h1></td>
</tr>
<tr>
<td width="150"><b>Roll No.</b></td>
<td width="350"><?php echo $rollno;?></td>
<td rowspan="7" width="100">
<?php echo '<img src="file/'.$name1.'" width="200" height="240"> ';?>
</td>
</tr>
<tr>
<td><b>Name</b></td>
<td><?php echo $name;?></td>

</tr>
<tr>
<td><b>Teacher</b></td>
<td><?php echo $teacher;?></td>
</tr>
<tr>
<td><b>Timing</b></td>
<td><?php echo $timing;?></td>
</tr>
<tr>
<td><b>Paper</b></td>
<td><?php echo $paper;?></td>
</tr>
<tr>
<td><b>Obtained Marks</b></td>
<td><?php echo $obtainedmarks;?></td>
</tr>

<tr>
<td><b>Total Marks</b></td>
<td><?php echo $totalmarks;?></td>
</tr>
</table>
<table align="center" border="1" width="700" height="300">
<tr>
<td colspan="2"><h2 align="center">Questions and Marks </h2></td>
</tr>

<tr>
<?php if($q1==10){ ?>
<td><b>Q1.What Is HTML???</b></td>
<?php } ?>
<?php if($q1==0){ ?>
<td><font color="red"><b>Q1.What Is HTML???</b></font></td>
<?php } ?>
<?php if($q1==10){ ?>
<td><?php echo $q1;?></td>
<?php } ?>
<?php if($q1==0){ ?>
<td><font color="red"><?php echo $q1;?></font></td>
<?php } ?>
</tr>


<tr>
<?php if($q2==10){ ?>
<td><b>Q2.What Is Css???</b></td>
<?php } ?>
<?php if($q2==0){ ?>
<td><font color="red"><b>Q2.What Is Css???</b></font></td>
<?php } ?>
<?php if($q2==10){ ?>
<td><?php echo $q2;?></td>
<?php } ?>
<?php if($q2==0){ ?>
<td><font color="red"><?php echo $q2;?></font></td>
<?php } ?>
</tr>

<tr>
<?php if($q3==10){ ?>
<td><b>Q3.What Is Flash???</b></td>
<?php } ?>
<?php if($q3==0){ ?>
<td><font color="red"><b>Q3.What Is Flash???</b></font></td>
<?php } ?>
<?php if($q3==10){ ?>
<td><?php echo $q3;?></td>
<?php } ?>
<?php if($q3==0){ ?>
<td><font color="red"><?php echo $q3;?></font></td>
<?php } ?>
</tr>

<tr>
<?php if($q4==10){ ?>
<td><b>Q4.What Is Adobe Photoshop???</b></td>
<?php } ?>
<?php if($q4==0){ ?>
<td><font color="red"><b>Q4.What Is Adobe Photoshop???</b></font></td>
<?php } ?>
<?php if($q4==10){ ?>
<td><?php echo $q4;?></td>
<?php } ?>
<?php if($q4==0){ ?>
<td><font color="red"><?php echo $q4;?></font></td>
<?php } ?>
</tr>

<tr>
<?php if($q5==10){ ?>
<td><b>Q5.What Is PHP???</b></td>
<?php } ?>
<?php if($q5==0){ ?>
<td><font color="red"><b>Q5.What Is PHP???</b></font></td>
<?php } ?>
<?php if($q5==10){ ?>
<td><?php echo $q5;?></td>
<?php } ?>
<?php if($q5==0){ ?>
<td><font color="red"><?php echo $q5;?></font></td>
<?php } ?>
</tr>

</table>
<?php

mysql_query("insert into data (rollno,name,teacher,timing,paper,picture,q1,q2,q3,q4,q5,obtainedmarks,totalmarks) values('$rollno','$name','$teacher','$timing','$paper','$name1','$q1','$q2','$q3','$q4','$q5','$obtainedmarks','$totalmarks')");

?>
</body>
</html>