Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cabeae0
)
added even/odd enc type
author
Jason Woofenden
<jason183@herkamire.com>
Mon, 22 Oct 2007 22:19:40 +0000
(18:19 -0400)
committer
Jason Woofenden
<jason183@herkamire.com>
Mon, 22 Oct 2007 22:19:40 +0000
(18:19 -0400)
encode.php
patch
|
blob
|
history
diff --git
a/encode.php
b/encode.php
index
ca33c59
..
fd00b97
100644
(file)
--- a/
encode.php
+++ b/
encode.php
@@
-253,4
+253,19
@@
function enc_provinces($str) {
return encode_options($str, $provinces_assoc, PULLDOWN_HASH);
}
+# returns "odd", then "even", then "odd" etc.
+function enc_evenodd($values, $name) {
+ if(!isset($GLOBALS['wfpl_even_odds'])) {
+ $GLOBALS['wfpl_even_odds'] = array();
+ }
+
+ if($GLOBALS['wfpl_even_odds'][$name]) {
+ $GLOBALS['wfpl_even_odds'][$name] = false;
+ return 'even';
+ } else {
+ $GLOBALS['wfpl_even_odds'][$name] = true;
+ return 'odd';
+ }
+}
+
?>