Location: PHPKode > projects > MyOWNSpace > MyOWNspace_v8.2/www/myowntime.php
<?php
/// AUTHENTICATE
include "login.inc.php";
include "config.php";
////verifie quon adresse bien un ID pour designer la page
if(isset($_GET['go'])&&($_GET['go']!="")){$go=$_GET['go'];}
else 
if(isset($_POST['go'])&&($_POST['go']!="")){$go=$_POST['go'];}
else echo "BAD !!";

////trouve le fichier de conf adequat
$conf_file="myowntime/time.".$go.".php";
if (file_exists($conf_file)) {include $conf_file; }  // LIRE LA CONF
else  @fopen($conf_file, "w"); /// sinon CREATION DU FICHIER DE CONF
$i=$go;
////acces a la page seulement si le user est loggué et proprietaire de la page ID
if(checklogin()&&$myspace[$i]['owner']==$rawuser) {
include("header.php");
  // EDITION DU BLOG
loged($rawuser);
echo'<style>
.text {
width:100%;
text-align:right;
display:block;
padding:2.2pt;
}
.bars {
width:100%;
text-align:right;
display:block;
padding:3px;
}

.bgBar1 {
background: #0066FF;
#border: 1px solid #99CCFF;
color: #ffffff;
font-weight : bold;
font-style : italic;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
}</style>
<script language="javascript" src="timepercent/percent_bar.js">
</script>

<script language="Javascript"> 
/**
 * ProgressBar.html - DHTML Progress Bar Widget demo
 *
 * @version 19 Apr 2005
 * @author  Joseph Oster, wingo.com
 */

var startTime;
var finishTime = null;
var timerID;

var totPct1 ;
var totPct2 ;
var totPct3 ;
var totPct4 ;
var totPct5 ;
var totPct6 ;
var fetchInterval = 0.01;
var pctIncr  = 0.05;

var pb1;
var pb2;
var pb3;
var pb4;
var pb5;
var pb6;

function setProgress() {
  //clearTimeout(timerID);
  
  pb1.setPercent(totPct1);
  pb2.setPercent(totPct2);
  pb3.setPercent(totPct3);
  pb4.setPercent(totPct4);
  pb5.setPercent(totPct5);
  pb6.setPercent(totPct6);
  pb7.setPercent(totPct7);
  if (totPct1 < 1.0) timerID = setTimeout("setProgress()", fetchInterval);
  else if (finishTime == null) {
    finishTime = new Date();
    //document.getElementById("elapsedMsg").innerHTML = finishTime - startTime;
    }
  }



var timerID = null
var timerRunning = false

function stopclock()
{
	if(timerRunning)
		clearTimeout(timerID)
	timerRunning = false
}

function startclock()
{
	stopclock()

	showtime()
}

function initPage() {
// create three widgets
pb1 = new jt_ProgressBar(document.getElementById("widget1Here"), 250, 10, "bgBar1");
pb2 = new jt_ProgressBar(document.getElementById("widget2Here"), 250, 10, "bgBar2");
pb3 = new jt_ProgressBar(document.getElementById("widget3Here"), 250, 10, "bgBar3");
pb4 = new jt_ProgressBar(document.getElementById("widget4Here"), 250, 10, "bgBar4");
pb5 = new jt_ProgressBar(document.getElementById("widget5Here"), 250, 10, "bgBar5");
pb6 = new jt_ProgressBar(document.getElementById("widget6Here"), 250, 10, "bgBar6");
pb7 = new jt_ProgressBar(document.getElementById("widget7Here"), 250, 10, "bgBar7");

  showtime(); // start timer
  }
function showtime()
{


/// LOCAL DATE&TIME
//	var beat = getBeat()

	var day = now.getDay()
	var hours = now.getHours()

	var offset = parseFloat(document.PAGEFORM.offset.value)

	if ( offset > 23 || offset == null || offset < -23) offset=0

switch(month)
{
case 1:
  dayinmonth=31
  break    
case 2:
  dayinmonth=28
  break
case 3:
  dayinmonth=30
  break
case 4:
  dayinmonth=31
  break
case 5:
  dayinmonth=30
  break
case 6:
  dayinmonth=31
  break
case 7:
  dayinmonth=30
  break
case 8:
  dayinmonth=31
  break
case 9:
  dayinmonth=30
  break
case 10:
  dayinmonth=31
  break
case 11:
  dayinmonth=30
  break
case 12:
  dayinmonth=31
  break
  }

/// CALCULATE %

	var p_minute = ((seconds*1000) + milliseconds) * 0.00166
	var p_hours = ((minutes*60) + seconds ) * .027
	var p_day = (((hours + offset) * 3600) + (minutes * 60) + seconds ) * .0012
	var p_week = (day * 1440 + ((hours + offset) * 60) + minutes ) * .0099
  var p_month = ((day * 24) + (hours + offset)  ) * (100 / (dayinmonth*24))
	var p_year = month * 8.33
	var p_century = year - 100
	

/// DRAW


totPct1 = p_minute*.01;
totPct2 = p_hours*.01;
totPct3 = p_day*.01;
totPct4 = p_week*.01;
totPct5 = p_month*.01;
totPct6 = p_year*.01;
totPct7 = p_century*.01;
startTime = new Date();
finishTime = null;
setProgress();
  
timerID = setTimeout("showtime()", 86)
timerRunning = true
}
</script><body onload="initPage()"> 
<FORM name="PAGEFORM" method="GET" action="myowntime.php">
<input type="hidden" name="go" value="'.$go.'">
<select id="GMT" name="gmt">
<option value="0">UTC / GMT</option><option value="113">Afghanistan - Kabul</option><option value="284">Albania - Tirane</option><option value="14">Algeria - Algiers</option><option value="686">Andorra - Andorra La Vella</option><option value="138">Angola - Luanda</option><option value="688">Antigua and Barbuda - Saint John\'s</option><option value="51">Argentina - Buenos Aires</option><option value="370">Armenia - Yerevan</option><option value="57">Australia - Australian Capital Territory - Canberra</option><option value="240">Australia - New South Wales - Sydney</option><option value="72">Australia - Northern Territory - Darwin</option><option value="47">Australia - Queensland - Brisbane</option><option value="5">Australia - South Australia - Adelaide</option><option value="396">Australia - Tasmania - Hobart</option><option value="152">Australia - Victoria - Melbourne</option><option value="196">Australia - Western Australia - Perth</option><option value="259">Austria - Vienna</option><option value="369">Azerbaijan - Baku</option><option value="173">Bahamas - Nassau</option><option value="15">Bahrain - Manama</option><option value="73">Bangladesh - Dhaka</option><option value="46">Barbados - Bridgetown</option><option value="285">Belarus - Minsk</option><option value="48">Belgium - Brussels</option><option value="36">Belize - Belmopan</option><option value="203">Benin - Porto Novo</option><option value="690">Bhutan - Thimphu</option><option value="124">Bolivia - La Paz</option><option value="691">Bosnia-Herzegovina - Sarajevo</option><option value="86">Botswana - Gaborone</option><option value="144">Brazil - Amazonas - Manaus</option><option value="222">Brazil - Bahia - Salvador</option><option value="45">Brazil - Distrito Federal - Brasilia</option><option value="209">Brazil - Pernambuco - Recife</option><option value="213">Brazil - Rio de Janeiro - Rio de Janeiro</option><option value="233">Brazil - São Paulo - Sao Paulo</option><option value="693">Brunei - Bandar Seri Begawan</option><option value="238">Bulgaria - Sofia</option><option value="186">Burkina Faso - Ouagadougou</option><option value="52">Burundi - Bujumbura</option><option value="199">Cambodia - Phnom Penh</option><option value="267">Cameroon - Yaoundé</option><option value="55">Canada - Alberta - Calgary</option><option value="80">Canada - Alberta - Edmonton</option><option value="256">Canada - British Columbia - Vancouver</option><option value="265">Canada - Manitoba - Winnipeg</option><option value="175">Canada - Newfoundland and Labrador - St. John\'s</option><option value="678">Canada - Northwest Territories - Yellowknife</option><option value="286">Canada - Nova Scotia - Halifax</option><option value="188">Canada - Ontario - Ottawa</option><option value="250">Canada - Ontario - Toronto</option><option value="165">Canada - Quebec - Montreal</option><option value="189">Canada - Quebec - Québec</option><option value="210">Canada - Saskatchewan - Regina</option><option value="679">Canada - Yukon Territory - Whitehorse</option><option value="685">Cape Verde - Praia</option><option value="694">Central African Republic - Bangui</option><option value="174">Chad - Ndjamena</option><option value="232">Chile - Santiago</option><option value="33">China - Beijing</option><option value="102">China - Hong Kong</option><option value="237">China - Shanghai</option><option value="1232">China - Shenzhen</option><option value="41">Colombia - Bogota</option><option value="696">Comoros - Moroni</option><option value="926">Congo - Brazzaville</option><option value="121">Congo Dem.Rep. - Kinshasa</option><option value="279">Cook Islands - Rarotonga</option><option value="225">Costa Rica - San Jose</option><option value="935">Cote d\'Ivoire (Ivory Coast) - Yamoussoukro</option><option value="281">Croatia - Zagreb</option><option value="99">Cuba - Havana</option><option value="680">Cyprus - Nicosia</option><option value="204">Czech Republic - Prague</option><option value="69">Denmark - Copenhagen</option><option value="697">Djibouti - Djibouti</option><option value="698">Dominica - Roseau</option><option value="230">Dominican Republic - Santo Domingo</option><option value="93">Ecuador - Guayaquil</option><option value="190">Ecuador - Quito</option><option value="53">Egypt - Cairo</option><option value="228">El Salvador - San Salvador</option><option value="699">Equatorial Guinea - Malabo</option><option value="700">Eritrea - Asmera</option><option value="242">Estonia - Tallinn</option><option value="7">Ethiopia - Addis Ababa</option><option value="673">F.Y.R.O. Macedonia - Skopje</option><option value="82">Fiji - Suva</option><option value="101">Finland - Helsinki</option><option value="278">France - Tahiti - Papeete</option><option value="195">France - Paris</option><option value="129">Gabon - Libreville</option><option value="30">Gambia - Banjul</option><option value="371">Georgia - Tbilisi</option><option value="37">Germany - Berlin - Berlin</option><option value="83">Germany - Hesse - Frankfurt</option><option value="4">Ghana - Accra</option><option value="26">Greece - Athens</option><option value="706">Grenada - Saint George\'s</option><option value="94">Guatemala - Guatemala</option><option value="67">Guinea - Conakry</option><option value="40">Guinea-Bissau - Bissau</option><option value="88">Guyana - Georgetown</option><option value="709">Haiti - Port-au-Prince</option><option value="245">Honduras - Tegucigalpa</option><option value="50">Hungary - Budapest</option><option value="211">Iceland - Reykjavik</option><option value="1046">India - Agra</option><option value="438">India - Bangalore</option><option value="1042">India - Bhubaneshwar</option><option value="553">India - Chennai</option><option value="771">India - Delhi</option><option value="1041">India - Indore</option><option value="54">India - Kolkata</option><option value="1043">India - Ludhiana</option><option value="1047">India - Madurai</option><option value="44">India - Mumbai</option><option value="176">India - New Delhi</option><option value="1040">India - Patna</option><option value="1038">India - Pune</option><option value="1039">India - Surat</option><option value="1045">India - Varanasi</option><option value="1044">India - Vishakhapatnam</option><option value="761">Indonesia - Bali - Denpasar</option><option value="437">Indonesia - Java - Bandung</option><option value="108">Indonesia - Java - Jakarta</option><option value="631">Indonesia - Java - Surabaya</option><option value="434">Indonesia - Kalimantan - Balikpapan</option><option value="759">Indonesia - Papua - Jayapura</option><option value="555">Indonesia - Sulawesi - Manado</option><option value="246">Iran - Tehran</option><option value="27">Iraq - Baghdad</option><option value="78">Ireland - Dublin</option><option value="110">Israel - Jerusalem</option><option value="676">Israel - Tel Aviv</option><option value="215">Italy - Rome</option><option value="120">Jamaica - Kingston</option><option value="540">Japan - Kobe</option><option value="538">Japan - Kyoto</option><option value="565">Japan - Nagoya</option><option value="671">Japan - Osaka</option><option value="622">Japan - Sapporo</option><option value="248">Japan - Tokyo</option><option value="667">Japan - Yokohama</option><option value="11">Jordan - Amman</option><option value="921">Kazakstan - Astana</option><option value="170">Kenya - Nairobi</option><option value="274">Kiribati - Christmas Islands - Kiritimati</option><option value="123">Kuwait - Kuwait City</option><option value="384">Kyrgyzstan - Bishkek</option><option value="260">Laos - Vientiane</option><option value="602">Latvia - Riga</option><option value="34">Lebanon - Beirut</option><option value="147">Lesotho - Maseru</option><option value="161">Liberia - Monrovia</option><option value="252">Libya - Tripoli</option><option value="714">Liechtenstein - Vaduz</option><option value="660">Lithuania - Vilnius</option><option value="534">Luxembourg - Luxembourg</option><option value="20">Madagascar - Antananarivo</option><option value="130">Malawi - Lilongwe</option><option value="122">Malaysia - Kuala Lumpur</option><option value="715">Maldives - Male</option><option value="29">Mali - Bamako</option><option value="255">Malta - Valletta</option><option value="717">Marshall Islands - Majuro</option><option value="183">Mauritania - Nouakchott</option><option value="201">Mauritius - Port Louis</option><option value="3">Mexico - Acapulco</option><option value="9">Mexico - Aguascalientes</option><option value="128">Mexico - Leon</option><option value="148">Mexico - Mazatlan</option><option value="154">Mexico - Mexicali</option><option value="155">Mexico - Mexico City</option><option value="247">Mexico - Tijuana</option><option value="258">Mexico - Veracruz</option><option value="1072">Micronesia - Ponape - Palikir</option><option value="177">Moldova - Kishinev</option><option value="674">Monaco - Monaco</option><option value="720">Mongolia - Ulaanbaatar</option><option value="744">Montenegro - Podgorica</option><option value="60">Morocco - Casablanca</option><option value="146">Mozambique - Maputo</option><option value="208">Myanmar - Yangon</option><option value="266">Namibia - Windhoek</option><option value="276">Nauru - Makwa</option><option value="117">Nepal - Kathmandu</option><option value="16">Netherlands - Amsterdam</option><option value="22">New Zealand - Auckland</option><option value="63">New Zealand - Chatham Island</option><option value="264">New Zealand - Wellington</option><option value="143">Nicaragua - Managua</option><option value="180">Niger - Niamey</option><option value="125">Nigeria - Lagos</option><option value="724">Niue - Alofi</option><option value="205">North Korea - Pyongyang</option><option value="187">Norway - Oslo</option><option value="169">Oman - Muscat</option><option value="106">Pakistan - Islamabad</option><option value="757">Pakistan - Karachi</option><option value="756">Pakistan - Lahore</option><option value="726">Palau - Koror</option><option value="192">Panama - Panama</option><option value="193">Papua New Guinea - Port Moresby</option><option value="21">Paraguay - Asuncion</option><option value="131">Peru - Lima - Lima</option><option value="145">Philippines - Manila</option><option value="262">Poland - Warsaw</option><option value="271">Portugal - Azores</option><option value="133">Portugal - Lisbon</option><option value="226">Puerto Rico - San Juan</option><option value="8">Qatar - Doha</option><option value="216">Reunion (French) - Saint-Denis</option><option value="49">Romania - Bucharest</option><option value="17">Russia - Anadyr</option><option value="373">Russia - Chelyabinsk</option><option value="114">Russia - Kamchatka</option><option value="354">Russia - Kazan</option><option value="372">Russia - Krasnoyarsk</option><option value="166">Russia - Moscow</option><option value="167">Russia - Murmansk</option><option value="353">Russia - Novgorod</option><option value="375">Russia - Novosibirsk</option><option value="374">Russia - Omsk</option><option value="357">Russia - Perm</option><option value="352">Russia - Saint-Peterburg</option><option value="355">Russia - Samara</option><option value="356">Russia - Ufa</option><option value="261">Russia - Vladivostok</option><option value="358">Russia - Yekaterinburg</option><option value="119">Rwanda - Kigali</option><option value="728">Saint Kitts and Nevis - Basseterre</option><option value="729">Saint Lucia - Castries</option><option value="731">Saint Vincent and Grenadines - Kingstown</option><option value="282">Samoa - Apia</option><option value="732">San Marino - San Marino</option><option value="733">Sao Tome and Principe - São Tomé</option><option value="151">Saudi Arabia - Makkah</option><option value="214">Saudi Arabia - Riyadh</option><option value="74">Senegal - Dakar</option><option value="35">Serbia - Belgrade</option><option value="734">Seychelles - Victoria</option><option value="85">Sierra Leone - Freetown</option><option value="236">Singapore - Singapore</option><option value="735">Slovakia - Bratislava</option><option value="736">Slovenia - Ljubljana</option><option value="273">Solomon Islands - Honiara</option><option value="160">Somalia - Mogadishu</option><option value="56">South Africa - Cape Town</option><option value="111">South Africa - Johannesburg</option><option value="269">South Africa - Pretoria</option><option value="235">South Korea - Seoul</option><option value="31">Spain - Barcelona</option><option value="141">Spain - Madrid</option><option value="191">Spain - Majorca - Palma</option><option value="389">Sri Lanka - Colombo</option><option value="118">Sudan - Khartoum</option><option value="194">Suriname - Paramaribo</option><option value="149">Swaziland - Mbabane</option><option value="239">Sweden - Stockholm</option><option value="270">Switzerland - Bern</option><option value="87">Switzerland - Geneva</option><option value="268">Switzerland - Zürich</option><option value="487">Syria - Damascus</option><option value="241">Taiwan - Taipei</option><option value="385">Tajikistan - Dushanbe</option><option value="71">Tanzania - Dar es Salaam</option><option value="28">Thailand - Bangkok</option><option value="768">Timor-Leste - Dili</option><option value="135">Togo - Lome</option><option value="277">Tonga - Nukualofa</option><option value="588">Trinidad and Tobago - Port of Spain</option><option value="253">Tunisia - Tunis</option><option value="19">Turkey - Ankara</option><option value="107">Turkey - Istanbul</option><option value="387">Turkmenistan - Ashgabat</option><option value="272">Tuvalu - Funafuti</option><option value="38">U.K. - Bermuda - Hamilton</option><option value="136">U.K. - England - London</option><option value="89">U.K. - Gibraltar - Gibraltar</option><option value="919">U.K. - Northern Ireland - Belfast</option><option value="90">U.K. - Scotland - Glasgow</option><option value="298">U.K. - Wales - Cardiff</option><option value="407">U.S.A. - Alabama - Montgomery</option><option value="18">U.S.A. - Alaska - Anchorage</option><option value="197">U.S.A. - Arizona - Phoenix</option><option value="134">U.S.A. - Arkansas - Little Rock</option><option value="137">U.S.A. - California - Los Angeles</option><option value="217">U.S.A. - California - Sacramento</option><option value="770">U.S.A. - California - San Diego</option><option value="224">U.S.A. - California - San Francisco</option><option value="283">U.S.A. - California - San Jose</option><option value="75">U.S.A. - Colorado - Denver</option><option value="98">U.S.A. - Connecticut - Hartford</option><option value="1029">U.S.A. - Delaware - Dover</option><option value="263">U.S.A. - District of Columbia - Washington DC</option><option value="156">U.S.A. - Florida - Miami</option><option value="867">U.S.A. - Florida - Orlando</option><option value="944">U.S.A. - Florida - Pensacola</option><option value="25">U.S.A. - Georgia - Atlanta</option><option value="103">U.S.A. - Hawaii - Honolulu</option><option value="42">U.S.A. - Idaho - Boise</option><option value="64">U.S.A. - Illinois - Chicago</option><option value="105">U.S.A. - Indiana - Indianapolis</option><option value="76">U.S.A. - Iowa - Des Moines</option><option value="249">U.S.A. - Kansas - Topeka</option><option value="413">U.S.A. - Kentucky - Louisville</option><option value="178">U.S.A. - Louisiana - New Orleans</option><option value="23">U.S.A. - Maine - Augusta</option><option value="419">U.S.A. - Maryland - Baltimore</option><option value="43">U.S.A. - Massachusetts - Boston</option><option value="77">U.S.A. - Michigan - Detroit</option><option value="159">U.S.A. - Minnesota - Minneapolis</option><option value="219">U.S.A. - Minnesota - St. Paul</option><option value="515">U.S.A. - Mississippi - Jackson</option><option value="605">U.S.A. - Missouri - St. Louis</option><option value="448">U.S.A. - Montana - Billings</option><option value="132">U.S.A. - Nebraska - Lincoln</option><option value="127">U.S.A. - Nevada - Las Vegas</option><option value="68">U.S.A. - New Hampshire - Concord</option><option value="861">U.S.A. - New Jersey - Newark</option><option value="394">U.S.A. - New Mexico - Albuquerque</option><option value="179">U.S.A. - New York - New York</option><option value="207">U.S.A. - North Carolina - Raleigh</option><option value="39">U.S.A. - North Dakota - Bismarck</option><option value="805">U.S.A. - Ohio - Columbus</option><option value="184">U.S.A. - Oklahoma - Oklahoma City</option><option value="221">U.S.A. - Oregon - Salem</option><option value="198">U.S.A. - Pennsylvania - Philadelphia</option><option value="878">U.S.A. - Rhode Island - Providence</option><option value="66">U.S.A. - South Carolina - Columbia</option><option value="627">U.S.A. - South Dakota - Sioux Falls</option><option value="171">U.S.A. - Tennessee - Nashville</option><option value="70">U.S.A. - Texas - Dallas</option><option value="104">U.S.A. - Texas - Houston</option><option value="220">U.S.A. - Utah - Salt Lake City</option><option value="164">U.S.A. - Vermont - Montpelier</option><option value="212">U.S.A. - Virginia - Richmond</option><option value="234">U.S.A. - Washington - Seattle</option><option value="142">U.S.A. - Wisconsin - Madison</option><option value="778">U.S.A. - Wyoming - Cheyenne</option><option value="115">Uganda - Kampala</option><option value="367">Ukraine - Kyiv</option><option value="366">Ukraine - Odesa</option><option value="2">United Arab Emirates - Abu Dhabi</option><option value="776">United Arab Emirates - Dubai</option><option value="163">Uruguay - Montevideo</option><option value="244">Uzbekistan - Tashkent</option><option value="280">Vanuatu - Vila</option><option value="710">Vatican City State - Vatican City</option><option value="58">Venezuela - Caracas</option><option value="95">Vietnam - Hanoi</option><option value="218">Vietnam - Ho Chi Minh</option><option value="741">Western Sahara - El Aaiún</option><option value="6">Yemen - Aden</option><option value="672">Yemen - Sana</option><option value="140">Zambia - Lusaka</option><option value="96">Zimbabwe - Harare</option></select> 
<div CLASS="bars" id="widget1Here"></div>
<div style="position:relative;text-align:right" ><B style="background:white;font-size:15px;font-family:verdana"> 
MyOwnTIME:
<select name="offset" style="font-size:15px;">
<option value="-23">-23</option><option value="-22">-22</option><option value="-21">-21</option><option value="-20">-20</option><option value="-19">-19</option><option value="-18">-18</option><option value="-17">-17</option><option value="-16">-15</option><option value="-15">-14</option><option value="-14">-13</option><option value="-13">-12</option><option value="-12">-12</option><option value="-11">-11</option><option value="-10">-10</option><option value="-9">-9</option><option value="-8">-8</option><option value="-7">-7</option><option value="-6">-6</option><option value="-5">-5</option><option value="-4">-4</option><option value="-3">-3</option><option value="-2">-2</option><option value="-1">-1</option><option value="0"selected="selected">0</option><option value="1">+1</option><option value="2">+2</option><option value="3">+3</option><option value="4">+4</option><option value="5">+5</option><option value="6">+6</option><option value="7">+7</option><option value="8">+8</option><option value="9">+9</option><option value="10">+10</option><option value="11">+11</option><option value="12">+12</option><option value="12">+13</option><option value="12">+14</option><option value="12">+15</option><option value="12">+16</option><option value="12">+17</option><option value="12">+18</option><option value="12">+19</option><option value="12">+20</option><option value="12">+21</option><option value="12">+22</option><option value="12">+23</option>
</select>
</div>
</FORM>';

}


?>



Return current item: MyOWNSpace