t_log; if ($con->execute($delReq) !== false) { $_GET['msg'] = __('Logs have been cleared'); } } buffer::str( '

'.__('DotClear "syslog"').'

' ); # Récupération des logs $rs = $con->select('SELECT count(*) FROM '.$blog->t_log); $nb_log = $rs->f(0); $max_pages = ceil($nb_log/$nb_per_page); $env = (!empty($_GET['env']) && $_GET['env'] <= $max_pages) ? $_GET['env'] : 1; $strReq = 'SELECT `user_id`,`table`,`key`,`date`,`ip`,`log` '. 'FROM '.$blog->t_log.' '. 'ORDER BY `date` DESC '. 'LIMIT '.(($env-1)*$nb_per_page).','.$nb_per_page; $rs = $con->select($strReq); $lum = new multipage($env,'log_line',$rs->getData(),$nb_log,$nb_per_page); $lum->setOption('html_block',''. ''. '%s
'.__('Date').''.__('User').''.__('IP').''.__('Log').''.__('Table').''.__('Key').'
'); $lum->setOption('html_row','%s'); $lum->setOption('html_cell','%s'); $lum->setOption('html_links','

'.__('Page(s)').' : %s

'); $lum->setOption('html_cur_page','%s'); $lum->setOption('html_prev','<'.__('prev. page')); $lum->setOption('html_next',__('next page').'>'); $lum->setOption('html_prev_grp','...'); $lum->setOption('html_next_grp','...'); $lum->setOption('html_empty','

'.__('No log yet.').'

'); buffer::str( $lum->getLinks(). $lum->getPage(). $lum->getLinks() ); if (!$rs->isEmpty()) { buffer::str( '

'.__('Clear logs').'

' ); } # Fonction d'affichage des log function log_line($data,$i) { $style = ($i%2 == 0) ? ' style="background:#eee;"' : ''; return ''.$data['date'].''. ''.$data['user_id'].''. ''.$data['ip'].''. ''.$data['log'].''. ''.$data['table'].''. ''.$data['key'].''; } ?>