Worker Management';
if ($err != '')
$pg .= "$err
";
$pg .= makeForm('workmgt');
$pg .= "
\n";
return $pg;
}
#
function doworkmgt($data, $user)
{
$err = '';
$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 = 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($page, $menu, $name, $user)
{
gopage(NULL, 'doworkmgt', $page, $menu, $name, $user);
}
#
?>