?> <label><?php echo $kga['lang']['pct']; ?> </label> <?php $last_pct = pct_get_data($kga['usr']['lastProject']); echo "<b>" . $last_pct['pct_name'] . "</b>"; ?> <label><?php echo $kga['lang']['evt']; ?> </label> <?php $last_evt = evt_get_data($kga['usr']['lastEvent']); echo "<b>" . $last_evt['evt_name'] . "</b>"; ?> <br/> <form method="post"> <input type="submit" name="stopRecord" value="<?php echo $kga['lang']['stop']; ?> "/> </form> <b><?php echo $kga['lang']['comment']; ?>
$tpl->assign('id', 0); } $tpl->display("add_edit_pct.tpl"); break; /** * Display the dialog to add or edit an event. */ /** * Display the dialog to add or edit an event. */ case 'add_edit_evt': if (isset($kga['customer']) || $kga['usr']['usr_sts'] == 2) { die; } if ($id) { $data = evt_get_data($id); if ($data) { $tpl->assign('evt_name', $data['evt_name']); $tpl->assign('evt_comment', $data['evt_comment']); $tpl->assign('evt_visible', $data['evt_visible']); $tpl->assign('evt_filter', $data['evt_filter']); $tpl->assign('evt_default_rate', $data['evt_default_rate']); $tpl->assign('evt_my_rate', $data['evt_my_rate']); $tpl->assign('grp_selection', evt_get_grps($id)); $tpl->assign('pct_selection', evt_get_pcts($id)); $tpl->assign('id', $id); } } // Create a <select> element to chosse the groups. $sel = makeSelectBox("grp", $kga['usr']['usr_grp']); $tpl->assign('sel_grp_names', $sel[0]);
$zefData['comment'] = $zefData['zef_comment']; $zefData['comment_type'] = $zefData['zef_comment_type']; $zefData['rate'] = $zefData['zef_rate']; $zefData['cleared'] = $zefData['zef_cleared']; $newZefId = zef_create_record($kga['usr']['usr_ID'], $zefData); $usrData = array(); $usrData['lastRecord'] = $newZefId; $usrData['lastProject'] = $zefData['pct_ID']; $usrData['lastEvent'] = $zefData['evt_ID']; usr_edit($kga['usr']['usr_ID'], $usrData); $pctdata = pct_get_data($zefData['zef_pctID']); $return = 'pct_name = "' . $pctdata['pct_name'] . '"; '; $return .= 'knd = "' . $pctdata['pct_kndID'] . '"; '; $knddata = knd_get_data($pctdata['pct_kndID']); $return .= 'knd_name = "' . $knddata['knd_name'] . '"; '; $evtdata = evt_get_data($zefData['zef_evtID']); $return .= 'evt_name = "' . $evtdata['evt_name'] . '"; '; echo $return; // TODO return false if error break; // ================== // = stop recording = // ================== // ================== // = stop recording = // ================== case 'stop': if (isset($kga['customer'])) { die; } stopRecorder($kga['usr']['usr_ID']);