diff -u -r -N karmapools.orig/account.php karmapools/account.php --- karmapools.orig/account.php 1969-12-31 18:00:00.000000000 -0600 +++ karmapools/account.php 2004-09-11 15:07:37.065572920 -0500 @@ -0,0 +1,100 @@ + * + *****************************************************************************/ +if (basename($PHP_SELF) == basename(__FILE__)) { die("Access Denied"); } + +$title = DEFAULT_SITE_TITLE . "::Create Account"; +pageHeader(true,$title); +$cols = 2; +$cmo = $cols - 1; +$lo_url = "./?a=" . LOGOUT_QS; +$rules_url = "./?a=" . VIEW_RULES_QS; +$attribs = array('width'=>"600",'height'=>"550"); +$rules_lnk = popupLink("$rules_url","rules",$attribs); +$vhs_url = "./?a=" . VIEW_HOSHAME_QS; +if (!isLoggedIn()) { +?> +
+ + +500)); +?> + + + + + + + + + You are currently logged in with an existing account, + which implies that you are stupid, trying to cheat, + or that someone else is using your computer. If you + are not trying to cheat by creating more than one + account, log out + and come back. + + + + +   + + + + + +

+ To place pool entries a valid userid is required, as specified + in the . + To do so, enter your information and click on the + "Create User Account" button below. Cheating by creating + multiple accounts is frowned upon. You will be banned forever if + you are caught trying to cheat. +

+

+ Required fields are marked with an asterisk (*). + An email address is not required, but is used to reset + passwords. If you do not provide an email address and + forget your password, you are out of luck. No email + addresses will be given out to anyone for any reason. +

+ + + + + *Desired User Name + + + + + + + + *Password + + + + + + + + Email Address + + + + + + + + + + + + +
+ diff -u -r -N karmapools.orig/create.account.php karmapools/create.account.php --- karmapools.orig/create.account.php 2004-09-11 11:48:19.000000000 -0500 +++ karmapools/create.account.php 1969-12-31 18:00:00.000000000 -0600 @@ -1,98 +0,0 @@ - * - *****************************************************************************/ -if (basename($PHP_SELF) == basename(__FILE__)) { die("Access Denied"); } - -$title = DEFAULT_SITE_TITLE . "::Create Account"; -pageHeader(true,$title); -$cols = 2; -$cmo = $cols - 1; -$lo_url = "./?a=" . LOGOUT_QS; -$vr_url = "./?a=" . VIEW_RULES_QS; -$vhs_url = "./?a=" . VIEW_HOSHAME_QS; -if (!isLoggedIn()) { -?> -
- - -500)); -?> - - - - - - - - - You are currently logged in with an existing account, - which implies that you are stupid, trying to cheat, - or that someone else is using your computer. If you - are not trying to cheat by creating more than one - account, log out - and come back. - - - - -   - - - - - -

- To place pool entries a valid userid is required, as specified - in the rules. - To do so, enter your information and click on the - "Create User Account" button below. Cheating by creating - multiple accounts is frowned upon. You will be banned forever if - you are caught trying to cheat. -

-

- Required fields are marked with an asterisk (*). - An email address is not required, but is used to reset - passwords. If you do not provide an email address and - forget your password, you are out of luck. No email - addresses will be given out to anyone for any reason. -

- - - - - *Desired User Name - - - - - - - - *Password - - - - - - - - Email Address - - - - - - - - - - - - -
- diff -u -r -N karmapools.orig/includes/globals.php karmapools/includes/globals.php --- karmapools.orig/includes/globals.php 2004-09-11 11:48:23.000000000 -0500 +++ karmapools/includes/globals.php 2004-09-11 13:56:22.000000000 -0500 @@ -29,11 +29,23 @@ define(DEF_T_CS,"2"); define(DEF_T_CP,"3"); +// popup window defaults +define(DEF_P_TITLE,"infowindow"); +define(DEF_P_HEIGHT,"600"); +define(DEF_P_WIDTH,"500"); +define(DEF_P_LBAR,"no"); +define(DEF_P_SBAR,"yes"); +define(DEF_P_MBAR,"no"); +define(DEF_P_TBAR,"no"); +define(DEF_P_RESIZE,"yes"); +define(DEF_P_CLASS,"info"); + // action strings define(CREATE_ACCOUNT_QS,"ca"); define(CREATE_POOL_QS,"cp"); define(SELECT_DATE_QS,"sd"); define(VIEW_HOSHAME_QS,"vhs"); +define(VIEW_LEGEND_QS,"vl"); define(VIEW_POOL_QS,"vp"); define(VIEW_RULES_QS,"vr"); define(LOGIN_QS,"li"); diff -u -r -N karmapools.orig/includes/html.functions.php karmapools/includes/html.functions.php --- karmapools.orig/includes/html.functions.php 2004-09-11 11:48:23.000000000 -0500 +++ karmapools/includes/html.functions.php 2004-09-11 14:08:29.000000000 -0500 @@ -145,6 +145,55 @@ } /***************************************************************************** + * popupLink() + *****************************************************************************/ +function popupLink($url='',$linktext='',$specs='') { + +if ($url == '' or $linktext == '') { return "Bad Link"; } + +isset($specs['class']) ? $class = $specs['class'] : $class = DEF_P_CLASS; +isset($specs['title']) ? $title = $specs['title'] : $title = DEF_P_TITLE; +isset($specs['width']) ? $width = $specs['width'] : $width = DEF_P_WIDTH; +isset($specs['height']) ? $height = $specs['height'] : $height = DEF_P_HEIGHT; +isset($specs['lbar']) ? $lbar = $specs['lbar'] : $lbar = DEF_P_LBAR; +isset($specs['sbar']) ? $sbar = $specs['sbar'] : $sbar = DEF_P_SBAR; +isset($specs['mbar']) ? $mbar = $specs['mbar'] : $mbar = DEF_P_MBAR; +isset($specs['tbar']) ? $tbar = $specs['tbar'] : $tbar = DEF_P_TBAR; +isset($specs['resize']) ? $resize = $specs['resize'] : $resize = DEF_P_RESIZE; + +$attribs = array(); +isset($height) && $attribs[] = "height=$height"; +isset($width) && $attribs[] = "width=$width"; +isset($lbar) && $attribs[] = "location=$lbar"; +isset($sbar) && $attribs[] = "scrollbars=$sbar"; +isset($mbar) && $attribs[] = "menubar=$mbar"; +isset($tbar) && $attribs[] = "toolbar=$tbar"; +isset($resize) && $attribs[] = "resizeable=$resize"; + +$attrs = implode(",",$attribs); +if (!$js = popupJs("$url","$title","$attrs")) { + return "Bad Link"; + } +$lnk = ""; + +return "$lnk" . "$linktext"; + +} + +/****************************************************************************** + * popupJs() + ******************************************************************************/ +function popupJs($url='',$wintitle='',$attrs='') { + +if ($url == '' or $wintitle == '' or $attrs == '') { return false; } +$j_url = "javascript:nw=window.open('$url','$wintitle','$attrs');"; +$j_url .= "nw.opener=self;return false;"; + +return $j_url; + +} + +/***************************************************************************** * *****************************************************************************/ function selectNum($echo=true,$fieldname='',$start='',$end='',$selected='') { diff -u -r -N karmapools.orig/index.php karmapools/index.php --- karmapools.orig/index.php 2004-09-11 11:48:20.000000000 -0500 +++ karmapools/index.php 2004-09-11 15:00:46.230029416 -0500 @@ -22,7 +22,7 @@ $subtitle = "Account Creation Status"; die(include("message.php")); } else { - die(include("create.account.php")); + die(include("account.php")); } break; // create pool @@ -75,17 +75,21 @@ case VIEW_HOSHAME_QS: die("Ain't done yet"); break; + // view legend + case VIEW_LEGEND_QS: + die(include("legend.php")); + break; // view pool case VIEW_POOL_QS: if (!$_REQUEST['pid']) { die(include("list.pools.php")); } - die(include("view.pool.php")); + die(include("pool.php")); break; // view rules case VIEW_RULES_QS: die(include("rules.php")); break; default: - die(include("list.pools.php")); + die(include("list.php")); break; } ?> diff -u -r -N karmapools.orig/legend.php karmapools/legend.php --- karmapools.orig/legend.php 1969-12-31 18:00:00.000000000 -0600 +++ karmapools/legend.php 2004-09-11 14:55:27.651460720 -0500 @@ -0,0 +1,89 @@ + * + *****************************************************************************/ +if (basename($PHP_SELF) == basename(__FILE__)) { die("Access Denied"); } + +$title = DEFAULT_SITE_TITLE . "::Legend"; +$cols = 2; +pageHeader(true,$title); tableOpen(true,array('width'=>"100%")); +?> + + + + + + + Example + Description + + + + 1st + + + These dates are available for selection. Click on the number, + 1st in this example, to select the day. + + + + + 2nd
jobob + + + These dates have already been selected by the specified user, + joebob in this example. + + + + + 3rd
jobob + + + These dates have expired and have already been selected by + the specified user, joebob in this example. + + + + + 4th + + + This is the cutoff date for the pool. After this date, + the pool is closed and entries will no longer be available. + + + + + 5th + + + This is the actual winning date for the pool. + + + + + 6th
jobob + + + In the event nobody has selected the actual winning date, + this is the winner who was closest. + + + + + N/A + + + These cells are place holders which are used to line up the + calendar days. You can't click on them. + + + + + Close + + + diff -u -r -N karmapools.orig/list.php karmapools/list.php --- karmapools.orig/list.php 1969-12-31 18:00:00.000000000 -0600 +++ karmapools/list.php 2004-09-11 11:48:21.000000000 -0500 @@ -0,0 +1,40 @@ + * + *****************************************************************************/ +if (basename($PHP_SELF) == basename(__FILE__)) { die("Access Denied"); } +$cols = 6; +$title = DEFAULT_SITE_TITLE . "::List Pools"; +pageHeader(true,$title); tableOpen(true,array('width'=>'100%')); +?> + + + + + + + + Welcome to Badpenguins Karma Pools. For pure entertainment value, + take some wild guesses about when bad karma will finally catch + up to SCO Group and other various entities. Click on the + pool name from the list below to view the pool and possibly + add your entry. + + + + Pool + Prize + Dates + Entry Cutoff + Winner + T/E/R + + + + +   + + + diff -u -r -N karmapools.orig/list.pools.php karmapools/list.pools.php --- karmapools.orig/list.pools.php 2004-09-11 11:48:21.000000000 -0500 +++ karmapools/list.pools.php 1969-12-31 18:00:00.000000000 -0600 @@ -1,40 +0,0 @@ - * - *****************************************************************************/ -if (basename($PHP_SELF) == basename(__FILE__)) { die("Access Denied"); } -$cols = 6; -$title = DEFAULT_SITE_TITLE . "::List Pools"; -pageHeader(true,$title); tableOpen(true,array('width'=>'100%')); -?> - - - - - - - - Welcome to Badpenguins Karma Pools. For pure entertainment value, - take some wild guesses about when bad karma will finally catch - up to SCO Group and other various entities. Click on the - pool name from the list below to view the pool and possibly - add your entry. - - - - Pool - Prize - Dates - Entry Cutoff - Winner - T/E/R - - - - -   - - - diff -u -r -N karmapools.orig/pool.php karmapools/pool.php --- karmapools.orig/pool.php 1969-12-31 18:00:00.000000000 -0600 +++ karmapools/pool.php 2004-09-11 15:05:39.676418784 -0500 @@ -0,0 +1,164 @@ + * + *****************************************************************************/ +if (basename($PHP_SELF) == basename(__FILE__)) { die("Access Denied"); } +$cols = 7; +$title = DEFAULT_SITE_TITLE . "::View Pool"; + +$pool_ar = queryPoolInfo($pid); +if (!is_array($pool_ar)) { + $subtitle = "Query Pool Failure"; + $html = "Oops. Cannot locate information about the pool."; + $html .= "Try Again later."; + die(include("message.php")); + } + +$info_ar = $pool_ar['info']; +$entries_ar = $pool_ar['entries']; +$dates_ar = $pool_ar['dates']; +$start_date = $info_ar['pool_start'] . " 01:00:00"; +$end_date = $info_ar['pool_end'] . " 01:00:00"; +$start_ts = strtotime($start_date); +$end_ts = strtotime($end_date); +$cur_date = date('Y-m-d 01:00:00'); +$cur_ts = strtotime($cur_date); +$pool_desc = stripslashes($info_ar['pool_desc']); + +$first_day = date('l',$start_ts); +$first_mon = date('F',$start_ts); +$first_year = date('Y',$start_ts); +$last_year = $first_year; +$last_month = $first_mon; +$day_header = array("Monday","Tuesday","Wednesday","Thursday","Friday", + "Saturday","Sunday"); +// fix the calendar so that Monday is the first day +$pad_cells = 0; +for($j=0; $j < count($day_header); $j++) { + if ("$day_header[$j]" == "$first_day") { + $pad_cells = $j; + break; + } + } +$legend_url = "./?a=" . VIEW_LEGEND_QS; +$legend_lnk = popupLink("$legend_url","legend"); +$rules_url = "./?a=" . VIEW_RULES_QS; +$attribs = array('width'=>"600",'height'=>"550"); +$rules_lnk = popupLink("$rules_url","rules",$attribs); +pageHeader(true,$title); tableOpen(true,array('width'=>'100%')); +?> + + + + + + + +

+ Click on the numeric date to select that date for your + pool entry. Click on the Month/Year name to return to + the pool list. Colors of cells are explained in this + . Any questions? See the + . +

+ +

+ Pool Description: +

+ + + +"; +$html .= ""; +$html .= "$first_mon $first_year\n"; +$html .= "\n"; +foreach($day_header as $day) { + $html.= " $day\n"; + } +$html .= "\n"; +if ($pad_cells > 0) { + $td = " N/A\n"; + $html .= "\n"; + $html .= str_repeat($td,$pad_cells); + $col_ctr = $pad_cells; + } +echo $html; + +for($j=$start_ts; $j <= $end_ts; $j += (60*60*24)) { + $col_ctr++; + $cur_year = date('Y',$j); + $cur_month = date('F',$j); + $day_str = date('jS',$j); + + if ($cur_ts > $j) { $expired = true; } else { $expired = false; } + + if ("$cur_month" !== "$last_month" and $col_ctr == 1) { + $last_month = $cur_month; + $html = ""; + $html .= ""; + $html .= "$cur_month $cur_year\n"; + $html .= "\n"; + echo $html; + foreach($day_header as $day) { + echo " $day\n"; + } + echo "\n"; + } + if ("$cur_month" !== "$last_month") { + $day_str = substr($cur_month,0,3) . " $day_str"; + } + if ( $col_ctr == 1 ) { + echo "\n"; + } + $comp_date = date('Y-m-d',$j); + $username = false; + if (in_array($comp_date,$dates_ar)) { + $select_url = $day_str; + $username = $entries_ar["$comp_date"]['user_name']; + $picked = true; + } else { + $select_url = "$day_str"; + $picked = false; + } + if ($expired) { + $select_url = $day_str; + if ($picked) { + $td_class = "exptak"; + } else { + $td_class = "expire"; + } + } + if ($picked and !$expired) { $td_class = "taken"; } + if (!$picked and !$expired) { $td_class = "avail"; } + + $html = " $select_url"; + if ($username) { $html .= "
$username"; } + $html .= "\n"; + echo $html; + if ( $col_ctr == 7) { + echo "\n"; + $col_ctr = 0; + } + } +if ($col_ctr > 0 and $col_ctr <= 7) { + $td = " N/A\n"; + $html = str_repeat($td,(7 - $col_ctr)); + echo $html . "\n"; + } +?> + + + <-- + + + diff -u -r -N karmapools.orig/rules.php karmapools/rules.php --- karmapools.orig/rules.php 2004-09-11 11:48:19.000000000 -0500 +++ karmapools/rules.php 2004-09-11 14:58:53.689138232 -0500 @@ -7,7 +7,7 @@ if (basename($PHP_SELF) == basename(__FILE__)) { die("Access Denied"); } $title = DEFAULT_SITE_TITLE . "::Rules"; -pageHeader(true,$title); tableOpen(true,array('width'=>"800")); +pageHeader(true,$title); tableOpen(true,array('width'=>"100%")); ?> @@ -83,8 +83,8 @@ - -   + + Close diff -u -r -N karmapools.orig/style.css karmapools/style.css --- karmapools.orig/style.css 2004-09-11 11:48:19.000000000 -0500 +++ karmapools/style.css 2004-09-11 14:54:11.061104224 -0500 @@ -45,6 +45,9 @@ td.expire { font-size: 10.5px; background-color:#000000; color:#ffffff; } td.taken { font-size: 10.5px; background-color:#5b5bff; color:#000000; } td.exptak { font-size: 10.5px; background-color:#000000; color:#ffffff; } +td.cutoff { font-size: 10.5px; background-color:#aa1100; color:#ffffff; } +td.win { font-size: 10.5px; background-color:#00ff00; color:#ffffff; } +td.winner { font-size: 10.5px; background-color:#009900; color:#ffffff; } td.std { background-color:#CCCCFF; font-size:12pt; font-weight:normal; } td.col1 { background-color:#000000; font-size:10pt; diff -u -r -N karmapools.orig/view.pool.php karmapools/view.pool.php --- karmapools.orig/view.pool.php 2004-09-11 12:56:25.000000000 -0500 +++ karmapools/view.pool.php 1969-12-31 18:00:00.000000000 -0600 @@ -1,150 +0,0 @@ - * - *****************************************************************************/ -if (basename($PHP_SELF) == basename(__FILE__)) { die("Access Denied"); } -$cols = 7; -$title = DEFAULT_SITE_TITLE . "::View Pool"; - -$pool_ar = queryPoolInfo($pid); -if (!is_array($pool_ar)) { - $subtitle = "Query Pool Failure"; - $html = "Oops. Cannot locate information about the pool."; - $html .= "Try Again later."; - die(include("message.php")); - } - -$info_ar = $pool_ar['info']; -$entries_ar = $pool_ar['entries']; -$dates_ar = $pool_ar['dates']; -$start_date = $info_ar['pool_start'] . " 01:00:00"; -$end_date = $info_ar['pool_end'] . " 01:00:00"; -$start_ts = strtotime($start_date); -$end_ts = strtotime($end_date); -$cur_date = date('Y-m-d 01:00:00'); -$cur_ts = strtotime($cur_date); -$pool_desc = stripslashes($info_ar['pool_desc']); - -$first_day = date('l',$start_ts); -$first_mon = date('F',$start_ts); -$first_year = date('Y',$start_ts); -$last_year = $first_year; -$last_month = $first_mon; -$day_header = array("Monday","Tuesday","Wednesday","Thursday","Friday", - "Saturday","Sunday"); -// fix the calendar so that Monday is the first day -$pad_cells = 0; -for($j=0; $j < count($day_header); $j++) { - if ("$day_header[$j]" == "$first_day") { - $pad_cells = $j; - break; - } - } -pageHeader(true,$title); tableOpen(true,array('width'=>'100%')); -?> - - - - - - - - - - - - -"; -$html .= ""; -$html .= "$first_mon $first_year\n"; -$html .= "\n"; -foreach($day_header as $day) { - $html.= " $day\n"; - } -$html .= "\n"; -if ($pad_cells > 0) { - $td = " N/A\n"; - $html .= "\n"; - $html .= str_repeat($td,$pad_cells); - $col_ctr = $pad_cells; - } -echo $html; - -for($j=$start_ts; $j <= $end_ts; $j += (60*60*24)) { - $col_ctr++; - $cur_year = date('Y',$j); - $cur_month = date('F',$j); - $day_str = date('jS',$j); - - if ($cur_ts > $j) { $expired = true; } else { $expired = false; } - - if ("$cur_month" !== "$last_month" and $col_ctr == 1) { - $last_month = $cur_month; - $html = ""; - $html .= ""; - $html .= "$cur_month $cur_year\n"; - $html .= "\n"; - echo $html; - foreach($day_header as $day) { - echo " $day\n"; - } - echo "\n"; - } - if ("$cur_month" !== "$last_month") { - $day_str = substr($cur_month,0,3) . " $day_str"; - } - if ( $col_ctr == 1 ) { - echo "\n"; - } - $comp_date = date('Y-m-d',$j); - $username = false; - if (in_array($comp_date,$dates_ar)) { - $select_url = $day_str; - $username = $entries_ar["$comp_date"]['user_name']; - $picked = true; - } else { - $select_url = "$day_str"; - $picked = false; - } - if ($expired) { - $select_url = $day_str; - if ($picked) { - $td_class = "exptak"; - } else { - $td_class = "expire"; - } - } - if ($picked and !$expired) { $td_class = "taken"; } - if (!$picked and !$expired) { $td_class = "avail"; } - - $html = " $select_url"; - if ($username) { $html .= "
$username"; } - $html .= "\n"; - echo $html; - if ( $col_ctr == 7) { - echo "\n"; - $col_ctr = 0; - } - } -if ($col_ctr > 0 and $col_ctr <= 7) { - $td = " N/A\n"; - $html = str_repeat($td,(7 - $col_ctr)); - echo $html . "\n"; - } -?> - - - <-- - - -