/[dtapublic]/to_be_filed/webprojs/php_libraries/php_library/e3ft_com/stdnwpstyle.inc
ViewVC logotype

Annotation of /to_be_filed/webprojs/php_libraries/php_library/e3ft_com/stdnwpstyle.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 35 - (hide annotations) (download)
Sat Oct 8 23:35:33 2016 UTC (7 years, 5 months ago) by dashley
File size: 3704 byte(s)
Initial commit.
1 dashley 35 <?php
2     if (!$CPUUSAGESTATCLOCK_INCLUDED)
3     {
4     include("cpuusagestatclock.inc");
5     $CPUUSAGESTATCLOCK_INCLUDED=1;
6     }
7     ?>
8     <?php
9     //********************************************************************************
10     //Copyright (C) 2003 David T. Ashley
11     //********************************************************************************
12     //This program or source file is free software; you can redistribute it and/or
13     //modify it under the terms of the GNU General Public License as published by
14     //the Free Software Foundation; either version 2 of the License, or (at your
15     //option) any later version.
16     //
17     //This program or source file is distributed in the hope that it will
18     //be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
19     //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20     //GNU General Public License for more details.
21     //
22     //You may have received a copy of the GNU General Public License
23     //along with this program; if not, write to the Free Software
24     //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25     //********************************************************************************
26     //
27     //Dave Ashley, 01/03
28     //
29     //This class defines standard styles (HTML styles, ways of doing things)
30     //for numerical and calculation oriented web pages. This class helps
31     //to ensure that any changes to the way of thinking about style are
32     //centralized in one place.
33     //
34     class Stdnwpstyle
35     {
36     var $cpu_time_clock;
37     //Used to remember snapshots to calculate CPU time.
38    
39     //The constructor function. Among other things, collects CPU usage
40     //statistics for later display.
41     function Stdnwpstyle()
42     {
43     $this->cpu_time_clock = new Cpuusagestatclock;
44     $this->cpu_time_clock->start();
45     }
46    
47     //Dumps out the standard header. The page title is what is displayed by the
48     //browser, while the HTML title is what goes in big letters at the top of the
49     //page. Size and alignment should be set here, italics if necessary can be
50     //put in the passed string. The description is text below the header to
51     //say a little bit more about the page.
52     function header_title($Pagetitle, $Htmltitle, $Desc)
53     {
54     echo "<html>\n";
55     echo "<head>\n";
56     echo "<title>" . $Pagetitle . "</title>\n";
57     echo "</head>\n";
58     echo "<body background=\"/bkgnds/bk_garlic.jpg\">\n";
59     echo "<p align=\"center\"><b><font size=\"6\">" . $Htmltitle . "</font></b></p>\n";
60     if (strlen($Desc))
61     {
62     echo "<p align=\"center\"><b><font size=\"5\">(" . $Desc . ")</font></b></p>\n";
63     }
64     $this->hrule_std();
65     }
66    
67     //This function tallies up the used CPU time and prints out the standard footer which
68     //includes this information.
69     function footer_std()
70     {
71     $this->hrule_std();
72     echo "<p align=\"center\" style=\"margin-top: -2; margin-bottom: 0\"><font size=\"2\">This web page is maintained by <a href=\"mailto:dashley@e-collab.com\">David T. Ashley</a>.<br>\n";
73    
74     //Stop the cpu clock.
75     $this->cpu_time_clock->stop();
76    
77     //echo "<p align=\"center\">";
78     echo $this->cpu_time_clock->std_web_page_cpu_time_usage_footer();
79     echo "</font></p>\n";
80     echo "<hr noshade size=\"5\">\n";
81     echo "</body>\n";
82     echo "</html>\n";
83     }
84    
85    
86     //Dumps out the standard horizontal rule for separating sections. The rule for
87     //hacking up functionality is that the page application is responsible to use these
88     //rules except first after the header and last before the footer.
89     function hrule_std()
90     {
91     echo "<hr>\n";
92     }
93     }
94     ?>

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25