Worker Management'; if ($err != '') $pg .= "$err

"; $ans = getWorkers($user, 'N'); if ($ans['STATUS'] == 'ok') { if (isset($ans['oldworkers']) && $ans['oldworkers'] == '0') $chk = ''; else $chk = ' checked'; $pg .= makeForm('workmgt'); $pg .= 'Active workers (7 days)'; $pg .= ""; $pg .= ''; $pg .= '

'; } $pg .= makeForm('workmgt'); $pg .= "\n"; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $offset = 0; if ($ans['STATUS'] == 'ok') { $count = $ans['rows']; for ($i = 0; $i < $count; $i++) { if ((($offset) % 2) == 0) $row = 'even'; else $row = 'odd'; $pg .= ""; $wn = htmlspecialchars($ans['workername:'.$i]); $wnv = urlencode($ans['workername:'.$i]); $pg .= ''; $md = intval($ans['difficultydefault:'.$i]); $pg .= '"; $pg .= "\n"; $offset++; } } $pg .= ''; $pg .= "
Worker NameMinimum Diff
'; $pg .= ""; $pg .= $wn.''; $pg .= ""; $pg .= ""; $pg .= "
*'; $pg .= ' A value of 0, less than the pool minimum,
'; $pg .= 'or less than the pool calculated value for you,
'; $pg .= 'will use the pool calculated value
\n"; return $pg; } # function doworkmgt($data, $user) { $err = ''; $S = getparam('S', false); $chk = getparam('seven', false); if ($S == 'Update') { $settings = array(); if ($chk == 'on') $settings['oldworkers'] = '7'; else $settings['oldworkers'] = '0'; $ans = workerSet($user, $settings); if ($ans['STATUS'] != 'ok') $err = $ans['ERROR']; } else { $OK = getparam('OK', false); $count = getparam('rows', false); if ($OK == 'OK' && !nuem($count)) { if ($count > 0 && $count < 9999) { $settings = array(); for ($i = 0; $i < $count; $i++) { $wn = urldecode(getparam('workername:'.$i, false)); $md = getparam('difficultydefault:'.$i, false); if (!nuem($wn) && !nuem($md)) { $settings['workername:'.$i] = $wn; $settings['difficultydefault:'.$i] = $md; } } $ans = workerSet($user, $settings); if ($ans['STATUS'] != 'ok') $err = $ans['ERROR']; } } } $pg = workmgtuser($data, $user, $err); return $pg; } # function show_workmgt($info, $page, $menu, $name, $user) { gopage($info, NULL, 'doworkmgt', $page, $menu, $name, $user); } # ?>