$user = $_SERVER['PHP_AUTH_USER']; ?> <?php /* session display stuff */ require_once 'TableEditor.php'; $editor = new TableEditor($conn, 'rautor_sessions'); #$editor->setConfig('allowCSV', false); $editor->setConfig('allowView', false); $editor->setConfig('allowAdd', false); $editor->setConfig('allowEdit', false); $editor->setConfig('allowCopy', false); $editor->setConfig('allowDelete', false); $editor->setConfig('title', 'Rautor Sessions\' Listing'); $editor->setConfig('footerfile', 'footer.html'); $editor->setConfig('perPage', 50); $editor->setDisplayNames(array('path' => 'Full Path where files were saved && PC Name', 'node' => 'Terminal', 'domain' => 'Domain', 'username' => 'Login Name', 'starttime' => 'Session Start Time', 'lastping' => 'Session Last Update', 'clearedtime' => 'Session Stop Time')); $editor->setSearchableFields('username', 'node', 'starttime', 'domain'); $editor->setRequiredFields('username', 'node', 'domain', 'timestamp', 'status', 'clearedtime', 'sessionid', 'ipadress', 'port'); $editor->noDisplay('node'); $editor->noDisplay('ipaddress'); $editor->noDisplay('clearedtime'); #$editor->noDisplay('status'); $editor->setDefaultOrderby('username'); $editor->display(); ?>
<?php /* session display stuff */ require_once 'TableEditor.php'; $editor = new TableEditor($conn, 'sesview'); $editor->setConfig('allowCSV', false); $editor->setConfig('allowView', false); $editor->setConfig('allowAdd', false); $editor->setConfig('allowEdit', false); $editor->setConfig('allowCopy', false); $editor->setConfig('allowDelete', false); $editor->setConfig('title', 'Live Sessions Monitor'); $editor->setConfig('footerfile', 'footer.html'); $editor->setConfig('perPage', 30); $editor->setDisplayNames(array('node' => 'Domain:Terminal', 'username' => 'Login Name', 'timestamp' => 'Sess. Start Time', 'Screen' => 'Live')); $editor->setSearchableFields('username', 'node', 'timestamp'); $editor->setRequiredFields('username', 'node', 'domain', 'timestamp', 'status', 'clearedtime', 'sessionid', 'ipadress', 'port'); $editor->noDisplay('sessionid'); $editor->noDisplay('ipaddress'); $editor->noDisplay('port'); $editor->noDisplay('clearedtime'); $editor->noDisplay('lastping'); #$editor->noDisplay('status'); $editor->setDefaultOrderby('username'); $editor->display(); ?>
* ) TYPE=MyISAM; */ require_once 'TableEditor.php'; $editor = new TableEditor($conn, 'rautor'); // $editor->setConfig('allowView', false); // $editor->setConfig('allowAdd', false); // $editor->setConfig('allowEdit', false); // $editor->setConfig('allowCopy', false); // $editor->setConfig('allowDelete', false); $editor->setConfig('perPage', 30); $editor->setDisplayNames(array('te_id' => 'ID', 'te_name' => 'Name', 'te_password' => 'Password', 'te_email' => 'Email', 'te_datetime' => 'Date Added', 'te_age' => 'Age', 'te_live' => 'Live', 'te_desc' => 'Description')); // $editor->noDisplay('te_password'); $editor->noEdit('te_live'); $editor->setInputType('te_password', 'password'); $editor->setInputType('te_email', 'email'); $editor->setSearchableFields('te_name', 'te_age', 'te_id', 'te_desc', 'te_live'); $editor->setRequiredFields('te_name', 'te_email', 'te_datetime', 'te_age', 'te_desc'); $editor->setDefaultOrderby('te_id'); $editor->setDefaultValues(array('te_id' => '0', 'te_live' => 'NOT LIVE')); //$editor->addAdditionCallback(create_function('$data', 'foreach($data as $k => $v) {$body[] = "$k => $v";} mail("*****@*****.**", "Row added", implode("\n", $body));')); //$editor->addEditCallback(create_function('$data', 'foreach($data as $k => $v) {$body[] = "$k => $v";} mail("*****@*****.**", "Row edited", implode("\n", $body));')); //$editor->addCopyCallback(create_function('$data', 'foreach($data as $k => $v) {$body[] = "$k => $v";} mail("*****@*****.**", "Row copied", implode("\n", $body));')); //$editor->addDeleteCallback(create_function('$data', 'foreach($data as $k => $v) {$body[] = "$k => $v";} mail("*****@*****.**", "Row deleted", implode("\n", $body));')); function validateAge(&$obj, $data) { $data = (int) $data; if ($data < 18 or $data > 80) { $obj->addError('Invalid age! Please enter an age between 18 and 80'); } return $data; }