Example #1
0
<?php

//user.php v5.0.0
setlocale(LC_ALL, 'ru_RU');
require_once 'config.php';
require_once OLIB_PATH . '/class.ad.php';
require_once OLIB_PATH . '/class.session.php';
$tpl =& initFastTemplate();
$tpl->define(array('pc_table' => 'body.pc.table_head.tpl'));
$ses = new Session(TRUE);
$tpl->assign('MESSAGE', $ses->msg());
if (isset($_GET['sort'])) {
    $sort = $_GET['sort'];
} else {
    $sort = 'cn';
}
$tpl->parse('TABLE_TEXT', 'pc_table');
$users = new User('*');
//$users->fieldUpper('cn');
$users->sortBy($sort);
$users->tplTableInner('TABLE_TEXT', array('cn', 'telephonenumber', 'mail'), array(FALSE, FALSE, FALSE), array(FALSE, FALSE, FALSE));
$tpl->parse('BODY', 'table');
$tpl->parse('PAGE', 'page');
$tpl->FastPrint();
Example #2
0
     $tpl->assign(array('DISPLAY_PAGE' => $_GET['page'], 'DISPLAY_FROM' => $rowFrom, 'DISPLAY_COUNT' => $reqData->count, 'DISPLAY_TO' => $rowFrom + $reqData->count, 'DISPLAY_NEXT' => $_GET['page'] + 1, 'DISPLAY_PREV' => $_GET['page'] - 1 < 0 ? 0 : $_GET['page'] - 1, 'FILTER_USER' => $ses->valueOf('filter.user')));
     if ($u = $cache->valueOf('LOGIN_USERLIST')) {
         $tpl->assign('SELECT_LIST', $u);
     } else {
         $users = new User(OUSER_ALL);
         //    $users->removeDisabled();
         $users->sortBy('cn');
         $users->tplComboboxInner('SELECT_LIST', 'cn', 'samaccountname');
         $cache->valueOf('LOGIN_USERLIST', $tpl->get_assigned('SELECT_LIST'), USERLIST_TTL);
     }
     if ($u = $cache->valueOf('LOGIN_USERLIST')) {
         $tpl->assign('SELECT_LIST', $u);
     } else {
         $users = new User(OUSER_ALL);
         //    $users->removeDisabled();
         $users->sortBy('cn');
         $users->tplComboboxInner('SELECT_LIST', 'cn', 'samaccountname');
         $cache->valueOf('LOGIN_USERLIST', $tpl->get_assigned('SELECT_LIST'), USERLIST_TTL);
     }
     $reqData->_tpl_tr = 'tr';
     $tpl->parse('TABLE_HEADER', 'header2');
     $reqData->tplTableInner('CALLS_LIST', array('rid', 'time', 'targetname', 'text', 'result'), array(false, 'rid', false, false, false), array(false, '?pid=', false, false, false));
     $tpl->parse('BODY', 'list');
 } else {
     $reqActions = new Request5();
     $reqActions->retrive($rid);
     $reqRoot = new Request5($rid);
     $reqActions->delete(0);
     $tpl->assign('TITLE', $reqRoot->rid[0] . ' - Requests - TO');
     if ($groupWebSAPR->isMember($ses->login()) && $reqRoot->result[0] != OREQ_DONE) {
         $tpl->parse('TABLE_HEADER', 'header1');