OSDN Git Service

Update main.php
[idb/iDB.git.git] / inc / endpage.php
1 <?php
2 /*
3     This program is free software; you can redistribute it and/or modify
4     it under the terms of the Revised BSD License.
5
6     This program is distributed in the hope that it will be useful,
7     but WITHOUT ANY WARRANTY; without even the implied warranty of
8     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9     Revised BSD License for more details.
10
11     Copyright 2004-2017 iDB Support - http://idb.berlios.de/
12     Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
13
14     $FileInfo: endpage.php - Last Update: 01/26/2017 SVN 810 - Author: cooldude2k $
15 */
16 $File3Name = basename($_SERVER['SCRIPT_NAME']);
17 if ($File3Name=="endpage.php"||$File3Name=="/endpage.php") {
18         require('index.php');
19         exit(); }
20 if(!isset($_GET['time'])) { $_GET['time'] = true; }
21 if($_GET['time']=="show"||$_GET['time']==true) {
22 $MyDST = $usercurtime->format("P");
23 $MyTimeNow = $usercurtime->format($_SESSION['iDBTimeFormat']);
24 $MyFullTimeNow = $usercurtime->format($_SESSION['iDBDateFormat'].", ".$_SESSION['iDBTimeFormat']);
25 if(!isset($TimeSign)) { $TimeSign = ""; }
26 $endpagevar=$endpagevar."<br />The time now is <span class=\"ctimenow\" title=\"".$MyFullTimeNow."\">".$MyTimeNow."</span> ".$ThemeSet['LineDivider']." All times are UTC ".$TimeSign." ".$MyDST; }
27 if(function_exists("bcsub")==False) {
28 function bcsub($left_operand, $right_operand, $scale = 0) {
29 $lof = floatval($left_operand);
30 $rof = floatval($right_operand);
31 return sprintf("%0.".$scale."f", $lof - $rof); } }
32 function execution_time($starttime) {
33 list($uetime, $etime) = explode(" ", microtime());
34 $endtime = $uetime + $etime;
35 return bcsub($endtime, $starttime, 4); }
36 if($_GET['debug']=="true"||$_GET['debug']=="on") {
37         $endpagevar=$endpagevar."<br />\nNumber of Queries: ".$NumQueries." ".$ThemeSet['LineDivider']." Execution Time: ".execution_time($starttime).$ThemeSet['LineDivider']."<a href=\"http://validator.w3.org/check/referer?verbose=1\" title=\"Validate HTML\" onclick=\"window.open(this.href);return false;\">HTML</a>".$ThemeSet['LineDivider']."<a href=\"http://jigsaw.w3.org/css-validator/check/referer?profile=css3\" title=\"Validate CSS\" onclick=\"window.open(this.href);return false;\">CSS</a>"; }
38         $endpagevar=$endpagevar."</div><div class=\"DivEndPage\">&nbsp;</div>\n";
39 echo $endpagevar;
40 session_write_close();
41 //session_write_close();
42 ?>