=0&&fi>=0){var xs,xf;xs=(st-x0)/(x1-x0);xf=(fi-x0)/(x1-x0);gfs(c,'$fs');gbe(c,xs,0);gln(c,xs,1);gln(c,xf,1);gln(c,xf,0);gle(c);gfl(c);gfz(c,xs,1,0,2,'Last 5Nd Reward \u279c','$ff','left')}}} function gdrw(c,d,cbx){gc(c);ghrs(c);gopt(c,cbx); gfs(c,'white');gss(c,'#0000c0');glw(c,2);gbd(c); var rows=d['rows'],ymin=-1,ymax=0,xmin=-1,xmax=0,tda=[]; var w=d['arp'].split(',');var cols=d['cols'].split(','); gsh(c,w); for(var j=1;js){xmin=s}if(xmaxths){ymin=ths}if(ths>ymax)ymax=ths;document.getElementById('worker'+j).value=d[pre+'worker']} } for(var j=1;j1){w+=','}w+=e.value.trim()}}if(w){scnv('workers',w)}}"; return $g; } # function dousperf($data, $user) { global $fld_sep, $val_sep; // This also defines how many worker fields there are $cols = array('#0000c0', '#00dd00', '#e06020', '#b020e0'); $nc = count($cols); $workers = 'all'; if (isset($_COOKIE['workers'])) { $w = substr(trim($_COOKIE['workers']), 0, 1024); if ($w !== false) { $wa = explode(',', $w, $nc+1); if (count($wa) > $nc) { $w = ''; for ($i = 0; $i < $nc; $i++) $w .= (($i == 0) ? '' : ',').$wa[$i]; } $workers = $w; } } $ans = getShiftData($user, $workers); $iCrap = strpos($_SERVER['HTTP_USER_AGENT'],'iP'); if ($iCrap) $vlines = false; else $vlines = true; $pg = '

User Shift Reward Performance


'; if ($ans['STATUS'] == 'ok' and $ans['DATA'] != '') { addGBase(); addTips(); $cbx = array('skey' => 'shift key', 'slines' => 'shift lines', 'tkey' => 'time key', 'tlines' => 'time lines', 'over' => 'key overlap', 'smooth' => 'smooth', 'zerob' => 'zero based', 'utc' => 'utc'); $xon = array('skey' => 1, 'utc' => 1); if ($vlines === true) $xon['slines'] = 1; $pg .= '
'; $tt = "
  • all = all workers
  • noname = worker with no workername
  • "; $tt .= "
  • or full workername without the username i.e. .worker or _worker
  • "; $tt .= "
  • add a '*' on the end to match multiple workers e.g. .S3*
"; $pg .= "?"; $pg .= "$tt"; $i = 0; $datacols = ''; $onch = " onchange='wch()'"; foreach ($cols as $col) { $i++; $pg .= " Worker$i"; $pg .= ":"; $pg .= " "; if ($i > 1) $datacols .= ','; $datacols .= $col; } $oncl = "wch();location.href=\"".makeURL('usperf')."\""; $pg .= "
"; foreach ($cbx as $nam => $txt) { $pg .= ' '; $pg .= ""; $pg .= "$txt "; } $pg .= '
'; $pg .= '
'; $pg .= 'A graph will show here if your browser supports html5/canvas'; $pg .= "
\n"; $data = str_replace(array("\\","'"), array("\\\\","\\'"), $ans['DATA']); $data .= $fld_sep . 'cols' . $val_sep . $datacols; $pg .= "\n"; } return $pg; } # function show_usperf($info, $page, $menu, $name, $user) { gopage($info, NULL, 'dousperf', $page, $menu, $name, $user); } # ?>