| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
*/
- session_start();
- include_once( 'config/global.inc.php' );
+ session_start();
+ include_once( 'config/global.inc.php' );
- $dbSql = new Bweb();
-
- // Enter your code here ...
-
- // Process and display the template
- $dbSql->tpl->display('client-report.tpl');
+ $dbSql = new Bweb();
+ $clientid = '';
+ $client = '';
+ $client_jobs = array();
+
+ $http_post = CHttpRequest::getRequestVars( $_POST );
+ $http_get = CHttpRequest::getRequestVars( $_GET );
+
+ if( isset( $http_post['client_id'] ) )
+ $clientid = $http_post['client_id'];
+ elseif( isset( $http_get['client_id'] ) )
+ $clientid = $http_get['client_id'];
+ else
+ die( "Application error: Client not specified " );
+
+ // Client informations
+ $client = $dbSql->getClientInfos($clientid);
+
+ $dbSql->tpl->assign( 'client_name', $client['name']);
+ $dbSql->tpl->assign( 'client_os', $client['os']);
+ $dbSql->tpl->assign( 'client_arch', $client['arch']);
+ $dbSql->tpl->assign( 'client_version', $client['version']);
+
+ // Process and display the template
+ $dbSql->tpl->display('client-report.tpl');
?>
<div class="box">
<p class="title">Client(s) Report</p>
+
+ <h4>Client informations</h4>
+ <table width="300px">
+ <tr>
+ <td width="100px" class="label"><b>Client name:</b></td> <td>{$client_name}</td>
+ </tr>
+ <tr>
+ <td class="label"><b>Client version:</b></td> <td>{$client_version}</td>
+ </tr>
+ <tr>
+ <td class="label"><b>Client os:</b></td> <td>{$client_os}</td>
+ </tr>
+ <tr>
+ <td class="label"><b>Client arch:</b></td> <td>{$client_arch}</td>
+ </tr>
+ </table>
</div> <!-- end div class=box -->
- <div id="main_center">
</div> <!-- end div id=main_center -->
{include file="footer.tpl"}