السبت، 23 يوليو 2016

نص يومض في أسفل الصفحة

<script>

/*
Always-on-top message Script-
Dynamic Drive (www.dynamicdrive.com)
// Visit http://www.star28.com/ for more code
// Translated By http://www.star28.com/
*/

// ضع النص الذي تريده و يمكنك التعديل في أكواد HTML
var message='<b><font face=Arial color=000000 size=5>ضع النص هنا</font></b>';

// ضع لون الخلفية الأول
var backgroundcolor="yellow";

//enter 0 for always display, 1 for a set period, 2 for random display mode
var displaymode=0;

//if displaymode is set to display for a set period, enter the period below (1000=1 sec)
var displayduration=10000;

// اذا أردت أن لا يومض النص غير القيمة الى 0
var flashmode=1;
// ضع لون الخلفية الآخر
var flashtocolor="LIME";


///////////////do not edit below this line////////////////////////////////////////

function regenerate(){
window.location.reload();
}

var which=0;

function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",400);
}


function display2(){
if (document.layers){
if (topmsg.visibility=="show")
topmsg.visibility="hide";
else
topmsg.visibility="show";
}
else if (document.all){
if (topmsg.style.visibility=="visible")
topmsg.style.visibility="hidden";
else
topmsg.style.visibility="visible";
setTimeout("display2()",Math.round(Math.random()*10000)+10000);
}
}

function flash(){
if (which==0){
if (document.layers)
topmsg.bgColor=flashtocolor;
else
topmsg.style.backgroundColor=flashtocolor;
which=1;
}
else{
if (document.layers)
topmsg.bgColor=backgroundcolor;
else
topmsg.style.backgroundColor=backgroundcolor;
which=0;
}
}


if (document.all){
document.write('<span id="topmsg" style="position:absolute;visibility:hidden">'+message+'</span>');
}


function logoit(){
document.all.topmsg.style.left=document.body.scrollLeft+document.body.clientWidth/2-document.all.topmsg.offsetWidth/2;
document.all.topmsg.style.top=document.body.scrollTop+document.body.clientHeight-document.all.topmsg.offsetHeight-4;
}


function logoit2(){
topmsg.left=pageXOffset+window.innerWidth/2-topmsg.document.width/2;
topmsg.top=pageYOffset+window.innerHeight-topmsg.document.height-5;
setTimeout("logoit2()",90);
}

function setmessage(){
document.all.topmsg.style.left=document.body.scrollLeft+document.body.clientWidth/2-document.all.topmsg.offsetWidth/2;
document.all.topmsg.style.top=document.body.scrollTop+document.body.clientHeight-document.all.topmsg.offsetHeight-4;
document.all.topmsg.style.backgroundColor=backgroundcolor;
document.all.topmsg.style.visibility="visible";
if (displaymode==1)
setTimeout("topmsg.style.visibility='hidden'",displayduration);
else if (displaymode==2)
display2();
if (flashmode==1)
setInterval("flash()",1000);
window.onscroll=logoit;
window.onresize=new Function("window.location.reload()");
}


function setmessage2(){
topmsg=new Layer(window.innerWidth);
topmsg.bgColor=backgroundcolor;
regenerate2();
topmsg.document.write(message);
topmsg.document.close();
logoit2();
topmsg.visibility="show";
if (displaymode==1)
setTimeout("topmsg.visibility='hide'",displayduration);
else if (displaymode==2);
display2();
if (flashmode==1)
setInterval("flash()",1000);
}


if (document.layers)
window.onload=setmessage2;
else if (document.all)
window.onload=setmessage;

</script>

الخميس، 14 يوليو 2016

العاب نارية داخل صفحات الموقع بطريقة جميله ومتحركة ومتعددة الألوان

<body bgcolor='#000000' >
<!-- Start of Fireworks -->
<script language="JavaScript">
<!--  IE4+, NS4+, NS6 Fireworks script by kurt.grigg@virgin.net
CL=new Array('#ff0000','#00ff00','#ffffff','#ff00ff','#ffa500','#ffff00','#00ff00','#ffffff','#ff00ff')
CL2=new Array('#ffa500','#00ff00','#FFAAFF','#fff000','#fffffF')
Xpos=130;
Ypos=130;
I='#00ff00';
C=0;
S=5;
H=null;
W=null;
Y=null;
NS4=(document.layers);
NS6=(document.getElementById&&!document.all);
IE4=(document.all);
A=14;
E=120;
L=null;
if (NS4){
for (i=0; i < A; i++)
document.write('<LAYER NAME="nsstars'+i+'" TOP=0 LEFT=0 BGCOLOR='+I+' CLIP="0,0,2,2"></LAYER>');
}
if (NS6){
window.document.body.style.overflow='hidden';
for (i=0; i < A; i++)
document.write('<div id="ns6stars'+i+'" style="position:absolute;top:0px;left:0px;height:2px;width:2px;font-size:2px;background:'+I+'"></div>');
}
if (IE4){
document.write('<div id="ie" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < A; i++)
document.write('<div id="iestars" style="position:absolute;top:0;left:0;width:2px;height:2px;background:'+I+';font-size:2px"></div>');
document.write('</div></div>');
}
function Fireworks(){
H=(NS4||NS6)?window.innerHeight:window.document.body.clientHeight;
W=(NS4||NS6)?window.innerWidth:window.document.body.clientWidth;
Y=(NS4||NS6)?window.pageYOffset:window.document.body.scrollTop;
for (i=0; i < A; i++){
if (IE4)L=iestars[i].style;
if (NS4)L=document.layers["nsstars"+i];
if (NS6)L=document.getElementById("ns6stars"+i).style;
var F = CL[Math.floor(Math.random()*CL.length)];
var RS=Math.round(Math.random()*2);
L.top = Ypos + E*Math.sin((C+i*5)/3)*Math.sin(C/100)
L.left= Xpos + E*Math.cos((C+i*5)/3)*Math.sin(C/100)
if (C < 110){
 if (NS4){L.bgColor=I;L.clip.width=1;L.clip.height=1}
 if (IE4||document.getElementById)
 {L.background=I;L.width=1;L.height=1;L.fontSize=1}
 }
else{
 if (NS4){L.bgColor=F;L.clip.width=RS;L.clip.height=RS}
 if (IE4||document.getElementById){L.background=F;L.width=RS;L.height=RS;L.fontSize=RS}
 }
}
if (C > 220){
 C=0;
 var NC = CL2[Math.floor(Math.random()*CL2.length)];
 I=NC;
 E=Math.round(100+Math.random()*90);
 Ypos = E+Math.round(Math.random()*(H-(E*2.2)))+Y;
 Xpos = E+Math.round(Math.random()*(W-(E*2.2)));
}
C+=S;
setTimeout("Fireworks()",10);
}
Fireworks();
// -->
</script>

محرك بحث بسيط جميل الشكل للبحث داخل نفس الصفحة

<SCRIPT language=JavaScript>
var NS4 = (document.layers);    
var IE4 = (document.all);
var win = window;    
var n   = 0;
function findInPage(str) {
  var txt, i, found;
  if (str == "")
    return false;
  if (NS4) {
    if (!win.find(str))
      while(win.find(str, false, true))
        n++;
    else
      n++;
    if (n == 0)
      alert("Not found.");
  }
  if (IE4) {
    txt = win.document.body.createTextRange();
    for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
      txt.moveStart("character", 1);
      txt.moveEnd("textedit");
    }
    if (found) {
      txt.moveStart("character", -1);
      txt.findText(str);
      txt.select();
      txt.scrollIntoView();
      n++;
    }
    else {
      if (n > 0) {
        n = 0;
        findInPage(str);
      }
      else
        alert("Sorry, we couldn't find.Try again");
   }
  }
  return false;
}
</SCRIPT>

<FORM name=search onsubmit="return findInPage(this.string.value);">
<P align=center><FONT size=3>
<INPUT 
style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid" 
onchange="n = 0;" size=16 name=string></FONT><BR><INPUT style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #aaaaaa" type=submit value=Search in page ><center><font size=2pt;><font family=Times New Roman;><b>




<BR> 
</P></FORM></DIV><BR>

الأحد، 3 يوليو 2016

إنشاء صفحة تسجيل الدخول في موقعك

الصفحة الاولى

<html> <head> <meta charset="utf-8" /> <title>صفحة دخول</title> </head> <body> <center><br> ادخل اسم المستخدم <form action="login.php" method="post"> <input type="text" name="user"><br> ادخل كلمة المرور <br> <input type="password" name="pass"><br><br> <input type="submit"> </form> </center> </body> </html>

ملف login.php



كود:
<html>
<head>
<meta charset="utf-8" />
    <title>صفحة الدخول</title>
</head>
<body>
<?
$user = $_POST['user'];
$pass = $_POST['pass'];

if($user == "linux" && $pass == "123"){
    echo "كلمة المرور صحيحه";        
}else{    
    echo "كلمة المرور خاطئة انتظر لاحظات لكي ننقلك لصفحة الدخول من جديد";
    echo "<META HTTP-EQUIV='Refresh' CONTENT='3; url=login.htm'>";
}
?>
</body>
</html>

كود اضافة خرائط كوكل لموقعك

<iframe frameborder="0" height="450" src="https://www.google.com/maps/embed?pb=!1m10!1m8!1m3!1d130738366.7210043!2d0!3d0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2sus!4v1406632224957" style="border: 0;" width="850"></iframe></div>

كود عمل محرر html


كود:
[HTM]<html>
<head>
<script type="text/javascript">
function ************************On(){
richTextField.document.designMode = 'On';
}
function iBold(){
richTextField.document.execCommand('bold',false,null); 
}
</script>
</head>
<body onLoad="************************On();">
<h2>اضافه موضوع</h2>
<form action="my_parse_file.php" name="myform" id="myform" method="post">
<p>عنوان : <input name="title" id="title" type="text" size="80" maxlength="80" /></p>
<p>الموضوع :<br>
<div id="wysiwyg_cp" style="padding:8px; width:700px;">
<input type="button" onClick="iBold()" value="B"> 
</div>


<textarea style="display:none;" name="myTextArea" id="myTextArea" cols="100" rows="14"></textarea>
<************************ name="richTextField" id="richTextField" style="border:#000000 1px solid; width:700px; height:300px;"></************************>


</p>
<br /><br /><input name="myBtn" type="button" value="Submit Data" onClick="javascript:submit_form();"/>
</form>
</body>
</html>




<?php 
echo '<h2>You posted:</h2><hr />'. $_POST['title'] . '<hr />' . stripslashes($_POST['myTextArea']);
?>[/HTM]

كود حساب عدد الزوار




<?php

if (file_exists('count_file.txt')) 
{
$fil fopen('count_file.txt'r);
$dat fread($filfilesize('count_file.txt')); 
echo $dat+1;
fclose($fil);
$fil fopen('count_file.txt'w);
fwrite($fil$dat+1);
}

else
{
$fil fopen('count_file.txt'w);
fwrite($fil1);
echo '1';//هنا عدد الزوار الي زاروا الصفحة
fclose($fil);
}
?> 


ط