Permalink
Browse files

merged another version into the history

  • Loading branch information...
1 parent 636a7e4 commit 8cfd1a1e5ec8504a55ab3d97ea857b45da5a19b4 @hfase01 committed Apr 29, 2012
Showing with 630 additions and 75 deletions.
  1. +14 −5 CHANGES → CHANGES.txt
  2. +1 −3 CONTRIB → CONTRIB.txt
  3. 0 LICENSE → LICENSE.txt
  4. +48 −17 README → README.txt
  5. +6 −8 back/config.php
  6. +11 −0 back/date_lib.php
  7. +39 −7 back/db.php
  8. +18 −9 back/extract_home.php
  9. +8 −26 back/process_home.php
  10. +153 −0 default.css
  11. +94 −0 display.php
  12. +22 −0 footer.php
  13. +79 −0 header.php
  14. +137 −0 list.php
View
@@ -4,9 +4,7 @@
* Log of all major project changes (as many as we can document
* while retaining our sanity, at least ;-) )
*
- * Last modified 04/16/2005 by hpxchan
- *
- * Sage Folding@Home Stats System, version 1.0.7
+ * Last modified 04/17/2005 by hpxchan
*
* Copyright (C) 2005 SamuraiDev
*
@@ -18,7 +16,7 @@
0.01
-Sage comes into existence
+Sage comes into existence, and does a pretty poor job at it.
1.0.0 - 1.0.4
@@ -32,7 +30,8 @@ different way, circumventing many of the obstacles encountered by
0.01 in the process. We changed our numbering system to Linux kernel
version style, so 1.0.* was originally intended to be named 0.02.
Versions 1.0.0 to 1.0.4 specifically were partial releases of the Sage
-backend processing scripts.
+backend processing scripts. There's pretty much only one thing 0.01
+and 1.0.0 have in common - the name.
1.0.5
@@ -51,3 +50,13 @@ Another critical division by zero bug has been fixed, and the code for
processing points_per_wu has been moved out of the conditional blocks
and into the main part of the process_home function (since it is
processed the same way, regardless of the number of existing tables).
+
+ 1.1.0
+
+A frontend is introduced to the previous 1.0.* releases, making this
+the first complete version of Sage since 0.01. MD5 is used to make a
+checksum for a combination of the team number and user name for users,
+or a combination of the letter "t" and the team number for teams. This
+allows us to more easily locate fields in a table, and helps us work
+around those nasty duplicate usernames (under the same team). A few
+minor fixes and optimizations have been made to the backend code.
View
@@ -3,9 +3,7 @@
*
* List of major project contributors (developers, financial donors, etc.)
*
- * Last modified 04/16/2005 by hpxchan
- *
- * Sage Folding@Home Stats System, version 1.0.7
+ * Last modified 04/16/2005 by hpxchan
*
* Copyright (C) 2005 SamuraiDev
*
View
File renamed without changes.
View
@@ -5,8 +5,6 @@
*
* Last modified 04/16/2005 by hpxchan
*
- * Sage Folding@Home Stats System, version 1.0.7
- *
* Copyright (C) 2005 SamuraiDev
*
* This program is free software; you can redistribute it and/or
@@ -22,15 +20,20 @@
I. Table of Contents
II. Project Files List
- A. README
- B. CHANGES
- C. CONTRIB
- D. LICENSE
+ A. README.txt
+ B. CHANGES.txt
+ C. CONTRIB.txt
+ D. LICENSE.txt
E. config.php
F. date_lib.php
G. refresh.php
H. extract_home.php
I. process_home.php
+ J. display.php
+ K. list.php
+ L. header.php
+ M. footer.php
+ N. default.css
III. System Requirements
A. Server programming languages
@@ -50,23 +53,23 @@ VI. Project Management
* II. Project Files List
******************************/
- * A. README
+ * A. README.txt
Contains general project information, installation and operating guides,
system requirements, project management information (including contact
information).
- * B. CHANGES
+ * B. CHANGES.txt
A log of all significant changes made directly to the Sage project, organized
by release.
- * C. CONTRIB
+ * C. CONTRIB.txt
A list of all project contributors, including developers, beta-testers,
financial donors, particularly useful feedback-giving users, etc.
- * D. LICENSE
+ * D. LICENSE.txt
The full license under which the Sage Folding@Home Stats System is made
available to you, whoever you are.
@@ -100,7 +103,30 @@ process_home.php. Includes process_home.php.
Library of Sage-specific stats-processing functions included by other scripts
in Sage to process relevant information and insert it into the database.
+
+ * J. display.php
+
+Primary display script for the Sage frontend. Handles team and user summaries.
+
+ * K. list.php
+
+Secondary display script for the Sage frontend. Displays lists of users, teams.
+
+ * L. header.php
+
+Universal header for the Sage frontend; required by all frontend driver scripts
+(like display.php and list.php).
+
+ * M. footer.php
+
+Universal footer for the Sage frontend; required by all frontend driver scripts
+(like display.php and list.php).
+
+ * N. default.css
+
+Default external stylesheet for the Sage frontend pages.
+
/******************************
* III. System Requirements
******************************/
@@ -113,7 +139,11 @@ in Sage to process relevant information and insert it into the database.
* B. Server database system
* Database system with one of the following SQL-based database APIs:
* MySQL 3.? or later
- * PostgreSQL ? or later
+ * PostgreSQL 7.? or later
+ * MSSQL ? or later
+ * MS Access ? or later
+ * Oracle ? or later
+ * DB2 ? or later
* C. Client web browser
* Ummm... general W3C-compliant browser... preferably not IE...
@@ -197,29 +227,30 @@ If that page does not exist, the desired team is probably too low in the ranking
and Sage will /not/ work for that team.
Do /NOT/ run the Sage stats-refreshing script (refresh.php, unless something changes)
-more than once every three hours. Stanford updates approximately this often, and
+more than once every three hours. Stanford updates approximately every three hours, so
it would be (a) pointless, (b) hopefully resultless, and (c) rude to Stanford to try
and update your stats more often than the source the stats come from (Stanford).
Want to help with Sage? Contact us through one of the methods listed in ``Project
Management''. All contributions are appreciated!
Future features (tentative, of course... just cool things we'd like to see):
- * Graphical stats signatures, like those of LiquidNinjas and DinoSig (I think)
+ * Graphical stats signatures, like those of LiquidNinjas and DinoSig
* Dynamic graphs for the stats pages, like those of EOC (we can't stand to use
a trial version of a commercial dynamic image-generation program, so we're
holding graphs off until we (a) develop our own dynamic image-generation program,
- or (b) find an available open-source one.
+ or (b) find an available open-source one).
* Tetris. Probably based on Flash or Java. Can't wait for the next update, when your
team takes the number one spot from those sneaky Australians? Don't! Play Tetris!
- * Global stats (for all teams). This feature will be implemented in a branch of
- Sage separate from the primary individual team stats. We (the project management)
- will maintain both branches as long as there is need for them.
+ * Global stats (for all teams). This feature will be integrated into the primary
+ Sage release, and one will be able to toggle on or off through the configuration
+ file.
* More stats configuration. For example, the ability to toggle how long to keep stats
tables, or maybe even a conditional trigger system.
* An optional XML-based stats feed. I think EOC has already implemented something
like this.
* Pre-built style templates
+ * Graphical installer
/******************************
* VI. Project Management
View
@@ -3,9 +3,7 @@
/*
* config.php
*
- * Last modified 04/16/2005 by hpxchan
- *
- * Sage Folding@Home Stats System, version 1.0.7
+ * Last modified 04/17/2005 by hpxchan
*
* Copyright (C) 2005 SamuraiDev
*
@@ -21,14 +19,14 @@
$db_type = 'mysql';
-$db_host = 'database_hostname';
+$db_host = 'mysql-sage.example.com';
-$db_user = 'database_username';
+$db_user = 'example_database_user';
-$db_pass = 'database_password';
+$db_pass = 'example_database_password';
-$db_name = 'database_name';
+$db_name = 'example_database_name';
-$team_number = 1971;
+$team_number = 37941;
?>
View
@@ -396,4 +396,15 @@ function add_to_hour_24($base_hour, $add_hour)
return $base_hour;
}
+function extend_numeric_date( $numeric_date )
+{
+ $date_out = number_to_month( ( (int) substr( $numeric_date, 4, 2 ) ) );
+ $date_out .= ' ' . ( (int) substr( $numeric_date, 6, 2 ) );
+ $date_out .= ', ' . ( (int) substr( $numeric_date, 0, 4 ) );
+ $hour_array = hour_24_to_12( ( (int) substr( $numeric_date, 8, 2 ) ) );
+ $date_out .= '; ' . $hour_array[0] . ' ' . $hour_array[1];
+
+ return $date_out;
+}
+
?>
View
@@ -26,31 +26,31 @@
switch($db_type)
{
case 'mysql':
- include('db/mysql.php');
+ require('db/mysql.php');
break;
case 'mysql4':
- include('db/mysql4.php');
+ require('db/mysql4.php');
break;
case 'postgres':
- include('db/postgres7.php');
+ require('db/postgres7.php');
break;
case 'mssql':
- include('db/mssql.php');
+ require('db/mssql.php');
break;
case 'oracle':
- include('db/oracle.php');
+ require('db/oracle.php');
break;
case 'msaccess':
- include('db/msaccess.php');
+ require('db/msaccess.php');
break;
case 'mssql-odbc':
- include('db/mssql-odbc.php');
+ require('db/mssql-odbc.php');
break;
}
@@ -61,4 +61,36 @@
die('Could not connect to the database');
}
+function get_index_table( $db_object, $index_table_name, $mode = 1 )
+{
+
+ $index_table_select;
+
+ if( $mode == 0 ) {
+ $index_table_select = 'SELECT `rid` FROM `' . $index_table_name . '` WHERE `rid` = 1;';
+ } elseif( $mode == 1 ) {
+ $index_table_select = 'SELECT * FROM `' . $index_table_name . '`;';
+ }
+
+ $index_table_result = $db_object->sql_query( $index_table_select );
+
+ if( !$index_table_result ) {
+ return 0;
+ }
+
+ if( $mode == 1 ) {
+ $index_table_array = array();
+ $i = 0;
+ while( $current_row = $db_object->sql_fetchrow( $index_table_result ) )
+ {
+ $index_table_array[$i] = $current_row;
+ $i++;
+ }
+ return $index_table_array;
+ } elseif( $mode == 0 ) {
+ return 1;
+ }
+
+}
+
?>
Oops, something went wrong.

0 comments on commit 8cfd1a1

Please sign in to comment.