function _FORToString($name) { $u = new User($name); $p = new WpPerson(); $p->where('note6=' . $u->employeeid); $p->retrive(); return $p->otdel[0]; }
$behalf->sortBy('fio'); $behalf->tplComboboxInner('IOLIST', 'fio', 'note6'); } $activeBehalf = new WPBehalf(); $tab = $p->note6[0]; $activeBehalf->where("tab=\"{$tab}\" and typeIO=1"); $activeBehalf->retrive(); if ($activeBehalf->count > 0) { $tpl->assign('TABIO', $activeBehalf->tabio[0]); } else { $tpl->assign('TABIO', 0); } $activeio = ''; foreach ($userBehalf->tab as $f) { $r = new WpPerson(); $r->where("SAPR_VIEW_people.note6='{$f}'"); $r->retrive(); if ($r->count > 0) { $activeio .= '<BR>' . $r->fio[0]; } } $tpl->assign('ACTIVEIO', $activeio); $tpl->assign('URLSUFFIX', $user->urlSuffix); $tpl->parse('BODYSTART', '.floating'); $tpl->parse('BODYSTART', '.settings'); $tpl->parse('BODY', 'table'); } else { $tpl->assign('BODY', 'Нет данных в данном диапазоне'); } $tpl->assign('MESSAGE', $ses->msg()); $tpl->parse('PAGE', 'page');
$tst->orderBy('prnname'); } //$det = false; $cp[] = time(); if (isset($_GET['action']) && $_GET['action'] == 'userchoose') { $tpl->assign('TABLE_HEADER', ''); // $tpl->parse('TABLE_HEADER', '.tr_header_3'); if (($ulist = $cache->valueOf('PRINTJOB_ULIST')) === false) { //5.0.2 $tpl->assign(array('HEADER_1' => 'Имя', 'HEADER_2' => 'Имя', 'HEADER_3' => 'Имя')); $groups = new WpList(1); $groups->where("id_1=''"); $groups->retrive(); for ($i = 0; $i < $groups->count; $i++) { $group = new WpPerson(); $group->where("otdel='" . $groups->name[$i] . "'"); $group->retrive(); $users = new User5($group->lastname[0] . ' ' . $group->firstname[0], OUSER_CN); $users->toMulti(); $prevUserCN = $users->cn[0]; for ($j = 1; $j < $group->count; $j++) { $u = new User5($group->lastname[$j] . ' ' . $group->firstname[$j], OUSER_CN); if ($u->count > 0 && $u->cn != $prevUserCN) { $u->toMulti(); $users->push($u); } } $users->sortBy('cn'); $ulist = implode('\',\'username.', $users->samaccountname); // $cp[] = time(); $users->tpl3row('CALLS_LIST', '<INPUT TYPE="checkbox" onclick="chooseUser(Array(\'username.' . $ulist . '\'));">' . $groups->name[$i]);