admiin المدير العام
الأوسمة : الجنس : عدد مساهماتك معنا : 620 السٌّمعَة : 20 نقاط : 2147509308 تاريخ التسجيل : 13/05/2010 العمر : 34 هوايتي: : كيف تعرفت علينا : احلي منتدي المزاج : مبسوط
| موضوع: كود احسب عمرك الخميس نوفمبر 18, 2010 2:28 am | |
| السلام عليكم هذا الكود تضعه في المنتدى وهو كود احسب عمرك - الكود:
-
<!-- START HOME FREE HEADER CODE --> <meta content="Microsoft FrontPage 4.0" name="GENERATOR"> <meta content="FrontPage.Editor.Document" name="ProgId"> <!-- END HOME FREE HEADER CODE --> <p align="center" dir="rtl"><b> <font color="#AA0055" size="6">حساب عمرك بالثانية</font></b></p> <script language="JavaScript">
<!-- Begin function run() { with (document.agecalc) { dd = parseInt(day.selectedIndex) + 1; mm = parseInt(month.selectedIndex) + 1; yy = year.value; if (yy.length != 4 || isNaN(yy)) { document.agecalc.timealive.value = "فضلاً أدخل سنة ميلادك من 4 أرقام"; document.agecalc.year.select(); document.agecalc.year.focus(); return; } } days = new Date(); gdate = days.getDate(); gmonth = days.getMonth(); gyear = days.getYear(); if (gyear < 2000) gyear += 1900; age = gyear - yy; if ((mm == (gmonth + 1)) && (dd <= parseInt(gdate))) { age = age; } else { if (mm <= (gmonth)) { age = age; } else { age = age - 1; } } if (age == 0) age = age; document.agecalc.timealive.value = "عمرك " + age+ " سنة . . .nn"; if (mm <= (gmonth + 1)) age = age - 1; if ((mm == (gmonth + 1)) && (dd > parseInt(gdate))) age = age + 1; var m; var n; if (mm == 12) n = 31 - dd; if (mm == 11) n = 61 - dd; if (mm == 10) n = 92 - dd; if (mm == 9) n = 122 - dd; if (mm == n = 153 - dd; if (mm == 7) n = 184 - dd; if (mm == 6) n = 214 - dd; if (mm == 5) n = 245 - dd; if (mm == 4) n = 275 - dd; if (mm == 3) n = 306 - dd; if (mm == 2) { n = 334 - dd; if (leapyear(yy)) n++; } if (mm == 1) { n = 365 - dd; if (leapyear(yy)) n++; } if (gmonth == 1) m = 31; if (gmonth == 2) { m = 59; if (leapyear(gyear)) m++; } if (gmonth == 3) { m = 90; if (leapyear(gyear)) m++; } if (gmonth == 4) { m = 120; if (leapyear(gyear)) m++; } if (gmonth == 5) { m = 151; if (leapyear(gyear)) m++; } if (gmonth == 6) { m = 181; if (leapyear(gyear)) m++; } if (gmonth == 7) { m = 212; if (leapyear(gyear)) m++; } if (gmonth == { m = 243; if (leapyear(gyear)) m++; } if (gmonth == 9) { m = 273; if (leapyear(gyear)) m++; } if (gmonth == 10) { m = 304; if (leapyear(gyear)) m++; } if (gmonth == 11) { m = 334; if (leapyear(gyear)) m++; } if (gmonth == 12) { m = 365; if (leapyear(gyear)) m++; } months = age * 12; months += 12 - parseInt(mm); months += gmonth; totdays = (parseInt(age) * 365); totdays += age / 4; totdays = parseInt(totdays) + gdate + m + n; if (gmonth == 1) p = 31 + gdate; if (gmonth == 2) { p = 59 + gdate; if (leapyear(gyear)) m = m+1; } if (gmonth == 3) { p = 90 + gdate; if (leapyear(gyear)) p++; } if (gmonth == 4) { p = 120 + gdate; if (leapyear(gyear)) p++; } if (gmonth == 5) { p = 151 + gdate; if (leapyear(gyear)) p++; } if (gmonth == 6) { p = 181 + gdate; if (leapyear(gyear)) p++; } if (gmonth == 7) { p = 212 + gdate; if (leapyear(gyear)) p++; } if (gmonth == { p = 243 + gdate; if (leapyear(gyear)) p++; } if (gmonth == 9) { p = 273 + gdate; if (leapyear(gyear)) p++; } if (gmonth == 10) { p = 304 + gdate; if (leapyear(gyear)) p++; } if (gmonth == 11) { p = 334 + gdate; if (leapyear(gyear)) p++; } if (gmonth == 12) { p = 365 + gdate; if (leapyear(gyear)) p++; } weeks = (age * 365) + n + p; weeks = weeks / 7; etcdays = parseFloat(weeks) - parseInt(weeks); etcdays = Math.round(etcdays * 7); weeks = parseInt(weeks); etcdays += parseInt(age / 4); if (etcdays > 7) weeks += parseInt(etcdays / 7); document.agecalc.timealive.value += " = " + weeks + " أسبوعn"; document.agecalc.timealive.value += " = " + months + " شهرn"; document.agecalc.timealive.value += " = " + totdays + " يومn"; var time = new Date(); ghour = time.getHours(); gmin = time.getMinutes(); gsec = time.getSeconds(); hour = ((age * 365) + n + p) * 24; hour += (parseInt(age / 4) * 24); document.agecalc.timealive.value += " = " + hour + " ساعةn"; var min = (hour * 60) + gmin; document.agecalc.timealive.value += " = " + min + " دقيقةn"; sec = (min * 60) + gsec; document.agecalc.timealive.value += " = " + sec + " ثانية "; mm = mm - 1; var r; if (mm == 0) r = 0; if (mm == 1) r = 31; if (mm == 2) { r = 59; if (leapyear(gyear)) m++; } if (mm == 3) { r = 90; if (leapyear(gyear)) r++; } if (mm == 4) { r = 120; if (leapyear(gyear)) r++; } if (mm == 5) { r = 151; if (leapyear(gyear)) r++; } if (mm == 6) { r = 181; if (leapyear(gyear)) r++; } if (mm == 7) { r = 212; if (leapyear(gyear)) r++; } if (mm == { r = 243; if (leapyear(gyear)) r++; } if (mm == 9) { r = 273; if (leapyear(gyear)) r++; } if (mm == 10) { r = 304; if (leapyear(gyear)) r++; } if (mm == 11) { r = 334; if (leapyear(gyear)) r++; } mm = mm + 1; r = parseInt(r) + parseInt(dd);
if ((mm >= (gmonth + 1)) && (dd > gdate)) { bday = r - m - gdate; } else { if ((leapyear(gyear)) && ((mm > 2) && (dd < 29))) { a = 366; } else { a = 365; } bday = a + (r - m - gdate); } nhour = 24 - parseInt(ghour); nmin = 60 - parseInt(gmin); nsec = 60 - parseInt(gsec); while (bday > 366) bday -= 365; if (((bday == 366) && (leapyear(gyear)) || ((bday == 365) && (!leapyear(gyear))))) { document.agecalc.timealive.value += "nاليوم هو عيد ميلادك!"; } else { document.agecalc.timealive.value += "nالباقي لعيد ميلادك القادم:n" + bday + " يوم " + nhour + " ساعة " + nmin + " دقيقة " + nsec + " ثانية"; setTimeout("run()", 1000); } } function leapyear(a) { if (((a%4 == 0) && (a%100 != 0)) || (a%400 == 0)) return true; else return false; } // End --> </script> <form name="agecalc" dir="rtl"> <div align="center" dir="rtl"> <center dir="rtl"> <table border="1" width="590" height="388" dir="rtl" bordercolor="#D8C494" cellspacing="1"> <tr> <td align="middle" bgColor="#F1E7C5" width="300" height="19" dir="rtl"> <p dir="rtl"><b><font color="#003399">أدخل تاريخ ميلادك بالتاريخ الميلادى </font></b> </td> </span></span> </span> </span>
<tr> <td align="middle" width="300" height="361" dir="rtl"> <input onclick="run();" type="button" value="أحســب" name="start"> <select size="1" name="month"> <option selected dir="rtl">الشهر</option> <option dir="rtl">يناير</option> <option dir="rtl">فبراير</option> <option dir="rtl">مارس</option> <option dir="rtl">إبريل</option> <option dir="rtl">مايو</option> <option dir="rtl">يونيو</option> <option dir="rtl">يوليو</option> <option dir="rtl">أغسطس</option> <option dir="rtl">سبتمبر</option> <option dir="rtl">أكتوبر</option> <option dir="rtl">نوفمير</option> <option dir="rtl">ديسمبر</option> </select> <select size="1" name="day"> <option selected dir="rtl">اليوم</option> <option dir="rtl">1</option> <option dir="rtl">2</option> <option dir="rtl">3</option> <option dir="rtl">4</option> <option dir="rtl">5</option> <option dir="rtl">6</option> <option dir="rtl">7</option> <option dir="rtl">8</option> <option dir="rtl">9</option> <option dir="rtl">10</option> <option dir="rtl">11</option> <option dir="rtl">12</option> <option dir="rtl">13</option> <option dir="rtl">14</option> <option dir="rtl">15</option> <option dir="rtl">16</option> <option dir="rtl">17</option> <optiopleasen> <option dir="rtl">18</option> <option dir="rtl">19</option> <option dir="rtl">20</option> <option dir="rtl">21</option> <option dir="rtl">22</option> <option dir="rtl">23</option> <option dir="rtl">24</option> <option dir="rtl">25</option> <option dir="rtl">26</option> <option dir="rtl">27</option> <option dir="rtl">28</option> <option dir="rtl">29</option> <option dir="rtl">30</option> <option dir="rtl">31</option> </select> <input maxLength="4" size="4" value="السنة" name="year"> <br> <br> <textarea name="timealive" rows="12" cols="35"></textarea> <p align="center" dir="rtl"> <!-- START HOME FREE FOOTER CODE --> <!-- START OF WEBTRENDS LIVE TAG --> <!-- Copyright 1999-2000 WebTrends Corporation --> <!-- eCommerce Revenue Tracking (patent pending) --> <!-- Visit us at [ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط] --> <script language="JavaScript"> <!-- // You may customize the values of the variables below to suit your website. // Simply insert your own values between the double-quotes. // Here are some examples: // var ORDER= "D2,Business to Consumer,Pocket FM Radio,Audio Products,10,499.99;"; // var SERVER= "MyServerName"; // var CONTENTGROUP= "ContentGroupOfThisPage";
var ORDER= ""; var SERVER= ""; var CONTENTGROUP= ""; //--> </script> <script language="JavaScript"> <!-- // Modification of this code is not allowed and will permanently disable your account! // SiteName: d1d var W="tagver=3&SiteId=47868&Sid=0013-01-1-8-216676-47868&Tz=300&firstwkday=saturday&Edition=personal&Button=10"; W+="&server="+escape(SERVER); W+="&order="+escape(ORDER); W+="&Group="+escape(CONTENTGROUP); W+="&browserDate="+escape(new Date()); W+="&title="+escape(document.title); W+="&url="+window.document.URL; W+="&referrer="+window.document.referrer; W+="&appname="+escape(navigator.appName); W+="&appversion="+escape(navigator.appVersion); W+="&cookieOK="+(navigator.cookieEnabled?"Yes":"No"); W+="&userLanguage="+(navigator.appName=="Netscape"?navigator.language:navigator.userLanguage); W+="&platform="+navigator.platform; W+="&bgColor="+escape(document.bgColor); W+="&javaOK=Yes"; if(typeof(screen)=="object") { W+="&screenResolution="+screen.width+"x"+screen.height; W+="&colorDepth="+screen.colorDepth; W+="&NSpluginList="; for( var i=0; i< navigator.plugins.length; i++) W+=escape(navigator.plugins[i].name)+";"; } document.write('<A TARGET="_blank" HREF="http://www.webtrendslive.com/redirect.asp?siteID=47868">'); document.write('<IMG BORDER="0" WIDTH="0" HEIGHT="0" SRC="http://statse.webtrendslive.com/S0013-01-1-8-216676-47868/button3.asp?'+W+'">'); document.write('</A>'); //--> </script> <a href="http://www.webtrendslive.com/redirect.asp?siteID=47868" target="_blank" style="color: #00009c; text-decoration: none"> <img height="0" src="http://statse.webtrendslive.com/S0013-01-1-8-216676-47868/button3.asp?tagver=3&SiteId=47868&Sid=0013-01-1-8-216676-47868&Tz=300&firstwkday=saturday&Edition=personal&Button=10&server=&order=&Group=&browserDate=Wed%20Apr%2026%2017%3A07%3A12%20UTC+0200%202006&title=%u0645%u0648%u062C%u0627%u062A%20-%20%u0628%u0631%u0627%u0645%u062C%20%u062E%u062F%u0645%u064A%u0629&url=http://www.mojat.com/modules.php?name=4U&Get=YourOld&referrer=http://www.mojat.com/modules.php?name=4U&Get=Wilada&appname=Microsoft%20Internet%20Explorer&appversion=4.0%20%28compatible%3B%20MSIE%206.0%3B%20Windows%20NT%205.1%3B%20SV1%29&cookieOK=Yes&userLanguage=ar-sy&platform=Win32&bgColor=%23ffffff&javaOK=Yes&screenResolution=1024x768&colorDepth=32&NSpluginList=" width="0" border="0"></a> <noscript> <A href="http://www.webtrendslive.com/redirect.asp?siteID=47868" target=_blank> </A></noscript> <!-- END OF WEBTRENDS LIVE TAG --> <!-- END HOME FREE FOOTER CODE --> </optiopleasen> </td> طريقة تركيب الكود الكود يركب في البوابة او صفحات هتمل | |
|
بستان الحب عضو ذهبي
الأوسمة : الجنس : عدد مساهماتك معنا : 88 السٌّمعَة : 0 نقاط : 25728 تاريخ التسجيل : 14/11/2010 العمر : 44 هوايتي: : كيف تعرفت علينا : احلي منتدي المزاج : الحمد لله
| موضوع: رد: كود احسب عمرك الإثنين ديسمبر 20, 2010 12:31 pm | |
| | |
|