Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // DB table to use
- $table = 'players';
- // Table's primary key
- $primaryKey = 'ID';
- $columns = array(
- array( 'db' => 'ID', 'dt' => 0 ),
- array(
- 'db' => 'uid',
- 'dt' => 1,
- 'formatter' => function( $d, $row ) {
- $uidLink = '<a target="_blank" href="www.steamcommunity.com/profiles/'.$row['1'].'">'.$row['1'].'</a>';
- return $uidLink;
- }
- ),
- array(
- 'db' => 'name',
- 'dt' => 2,
- 'formatter' => function( $d, $row ) {
- $nameLink = '<a href=player-details.php?id='.$row[0].'>'.$row[2].'</a>';
- return $nameLink;
- }
- ),
- array( 'db' => 'cash', 'dt' => 3 ),
- array( 'db' => 'bank', 'dt' => 4 ),
- array( 'db' => 'faction', 'dt' => 5 )
- );
- // SQL server connection information
- $sql_details = array(
- 'user' => '',
- 'pass' => '',
- 'db' => '',
- 'host' => ''
- );
- require('ssp.class.php');
- echo json_encode(
- SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns )
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement