/[dtapublic]/to_be_filed/sf_code/esrgweba/htdocs/welcome.php
ViewVC logotype

Annotation of /to_be_filed/sf_code/esrgweba/htdocs/welcome.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 29 - (hide annotations) (download)
Sat Oct 8 07:08:47 2016 UTC (8 years, 2 months ago) by dashley
File size: 3873 byte(s)
Directories relocated.
1 dashley 23 <?php
2     //$Header: /cvsroot/esrg/sfesrg/esrgweba/htdocs/welcome.php,v 1.7 2003/04/28 08:53:39 dtashley Exp $
3     ?>
4     <html>
5    
6     <head>
7     <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
8     <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
9     <meta name="ProgId" content="FrontPage.Editor.Document">
10     <title>Welcome To The ESRG Tool Set</title>
11     <base target="_self">
12     <bgsound src="gensounds/carlin_pa/stupid_half.wav" loop="0">
13     </head>
14    
15     <body background="bkgnds/bk10.gif">
16    
17     <p align="center"><img border="0" src="genimages/welcome.gif" width="211" height="164"></p>
18    
19     <p align="center"><font size="6" face="Arial">To The ESRG Tool Set Home Page!</font></p>
20     <p align="center"><font face="Arial">(Generously hosted by </font><font size="6" face="Arial"> <A href="http://sourceforge.net">
21     <IMG src="http://sourceforge.net/sflogo.php?group_id=78227" border="0" align="middle" alt="SourceForge Logo"></A></font><font face="Arial">)</font></p>
22    
23     <hr>
24    
25     <p align="center">The navigation bar at the left provides an overview of our
26     open-source endeavors and their associated site content.&nbsp; Please use this
27     navigation bar to visit the desired pages.</p>
28     <hr>
29     <p align="center" style="margin-top: -3; margin-bottom: -1"><font size="1">This
30     web page is maintained by <a href="mailto:dtashley@users.sourceforge.net">David
31     T. Ashley</a>, and has been visited
32     <?php
33     /* Under the SourceForge schema, "apache" does not have write permission in
34     ** the directory where the hit counter goes. So, hit counters must be created
35     ** manually and given write permission to others. If the necessary file
36     ** does not exist, a hit count of one is assumed.
37     */
38    
39     $hit_count = 1; /* Will be reassigned if can find the file. */
40     $last_accessed = 1; /* Need some value if can't open the file. */
41     if (file_exists("hit_counter_01.txt"))
42     {
43     /* From this time forward we don't want to be interrupt by a lost
44     ** connection. Need to check semantics of this.
45     */
46     ignore_user_abort(1);
47    
48     /* Get the mtime on the hit counter. This will tell us when the
49     ** page was last accessed.
50     */
51     $last_accessed = filemtime("hit_counter_01.txt");
52    
53     /* Acquire a presumptive file pointer. */
54     $fptr = fopen("hit_counter_01.txt", "a+");
55    
56     //echo "Success was " . $ftpr . "<br>";
57    
58     /* Acquire an exclusive lock on the file. This may block. */
59     flock($fptr, LOCK_EX);
60    
61     /* Move to the beginning of the file. */
62     fseek($fptr, 0);
63    
64     /* Read in the contents of the hit counter file. */
65     $hit_count = Fread($fptr, 25);
66    
67     /* Increment the hit count. */
68     $hit_count++;
69    
70     /* Move back to the beginning of the file and truncate the file. */
71     fseek($fptr, 0);
72     ftruncate($fptr, 0);
73    
74     /* Write the updated hit counter to the file. */
75     Fputs($fptr, $hit_count);
76    
77     /* Flush the data to be sure it is back. */
78     fflush($fptr);
79    
80     /* Release the lock on the hit counter file. */
81     flock($fptr, LOCK_UN);
82    
83     /* Close the file. */
84     fclose($fptr);
85     }
86    
87     /* Format the hit counter with commas and all that. */
88     $hit_count = number_format($hit_count);
89    
90     /* Dump it out. */
91     echo " " . $hit_count . " ";
92     ?>
93     times since it was automatically refreshed
94     from <a href="http://www.cvshome.org" target="_blank">CVS</a> archives on
95     <?php
96     $welcome_date = date("F j, Y", filemtime("welcome.php"));
97     $last_accessed_time = date("g:i:s A", $last_accessed);
98     $last_accessed_zone = date("O", $last_accessed);
99     $last_accessed_date = date("l, F j, Y", $last_accessed);
100     echo " " . $welcome_date . ".&nbsp; The most recent previous access to this page was at " .
101     $last_accessed_time . " (GMT" . $last_accessed_zone . ") on " . $last_accessed_date . ".&nbsp; ";
102     ?>
103     Sound credit: George Carlin from <i>Parental Advisory</i>.<br>
104     $Header: /cvsroot/esrg/sfesrg/esrgweba/htdocs/welcome.php,v 1.7 2003/04/28 08:53:39 dtashley Exp $</font></p>
105     <hr noshade size="5">
106     </body>
107    
108     </html>

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25