@@ -29,19 +29,19 @@ discard block |
||
29 | 29 | // parameter represents the DataTables column identifier. In this case simple |
30 | 30 | // indexes |
31 | 31 | $columns = array( |
32 | - array( 'db' => 'id', 'dt' => 0 ), |
|
33 | - array( 'db' => 'firstname', 'dt' => 1 ), |
|
34 | - array( 'db' => 'surname', 'dt' => 2 ), |
|
35 | - array( 'db' => 'zip', 'dt' => 3 ), |
|
36 | - array( 'db' => 'country', 'dt' => 4 ) |
|
32 | + array( 'db' => 'id', 'dt' => 0 ), |
|
33 | + array( 'db' => 'firstname', 'dt' => 1 ), |
|
34 | + array( 'db' => 'surname', 'dt' => 2 ), |
|
35 | + array( 'db' => 'zip', 'dt' => 3 ), |
|
36 | + array( 'db' => 'country', 'dt' => 4 ) |
|
37 | 37 | ); |
38 | 38 | |
39 | 39 | // SQL server connection information |
40 | 40 | $sql_details = array( |
41 | - 'user' => '', |
|
42 | - 'pass' => '', |
|
43 | - 'db' => '', |
|
44 | - 'host' => '' |
|
41 | + 'user' => '', |
|
42 | + 'pass' => '', |
|
43 | + 'db' => '', |
|
44 | + 'host' => '' |
|
45 | 45 | ); |
46 | 46 | |
47 | 47 | |
@@ -53,6 +53,6 @@ discard block |
||
53 | 53 | require( '../../../../examples/server_side/scripts/ssp.class.php' ); |
54 | 54 | |
55 | 55 | echo json_encode( |
56 | - SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns ) |
|
56 | + SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns ) |
|
57 | 57 | ); |
58 | 58 |
@@ -29,11 +29,11 @@ discard block |
||
29 | 29 | // parameter represents the DataTables column identifier. In this case simple |
30 | 30 | // indexes |
31 | 31 | $columns = array( |
32 | - array( 'db' => 'id', 'dt' => 0 ), |
|
33 | - array( 'db' => 'firstname', 'dt' => 1 ), |
|
34 | - array( 'db' => 'surname', 'dt' => 2 ), |
|
35 | - array( 'db' => 'zip', 'dt' => 3 ), |
|
36 | - array( 'db' => 'country', 'dt' => 4 ) |
|
32 | + array('db' => 'id', 'dt' => 0), |
|
33 | + array('db' => 'firstname', 'dt' => 1), |
|
34 | + array('db' => 'surname', 'dt' => 2), |
|
35 | + array('db' => 'zip', 'dt' => 3), |
|
36 | + array('db' => 'country', 'dt' => 4) |
|
37 | 37 | ); |
38 | 38 | |
39 | 39 | // SQL server connection information |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | * server-side, there is no need to edit below this line. |
51 | 51 | */ |
52 | 52 | |
53 | -require( '../../../../examples/server_side/scripts/ssp.class.php' ); |
|
53 | +require('../../../../examples/server_side/scripts/ssp.class.php'); |
|
54 | 54 | |
55 | 55 | echo json_encode( |
56 | - SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns ) |
|
56 | + SSP::simple($_GET, $sql_details, $table, $primaryKey, $columns) |
|
57 | 57 | ); |
58 | 58 |
@@ -27,22 +27,22 @@ |
||
27 | 27 | |
28 | 28 | if (!empty($_POST)) |
29 | 29 | { |
30 | - foreach ( $_POST as $key => $value ) |
|
31 | - { |
|
32 | - if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) ) |
|
33 | - continue; |
|
30 | + foreach ( $_POST as $key => $value ) |
|
31 | + { |
|
32 | + if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) ) |
|
33 | + continue; |
|
34 | 34 | |
35 | - if ( get_magic_quotes_gpc() ) |
|
36 | - $value = htmlspecialchars( stripslashes((string)$value) ); |
|
37 | - else |
|
38 | - $value = htmlspecialchars( (string)$value ); |
|
35 | + if ( get_magic_quotes_gpc() ) |
|
36 | + $value = htmlspecialchars( stripslashes((string)$value) ); |
|
37 | + else |
|
38 | + $value = htmlspecialchars( (string)$value ); |
|
39 | 39 | ?> |
40 | 40 | <tr> |
41 | 41 | <th style="vertical-align: top"><?php echo htmlspecialchars( (string)$key ); ?></th> |
42 | 42 | <td><pre class="samples"><?php echo $value; ?></pre></td> |
43 | 43 | </tr> |
44 | 44 | <?php |
45 | - } |
|
45 | + } |
|
46 | 46 | } |
47 | 47 | ?> |
48 | 48 | </table> |
@@ -27,18 +27,18 @@ |
||
27 | 27 | |
28 | 28 | if (!empty($_POST)) |
29 | 29 | { |
30 | - foreach ( $_POST as $key => $value ) |
|
30 | + foreach ($_POST as $key => $value) |
|
31 | 31 | { |
32 | - if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) ) |
|
32 | + if ((!is_string($value) && !is_numeric($value)) || !is_string($key)) |
|
33 | 33 | continue; |
34 | 34 | |
35 | - if ( get_magic_quotes_gpc() ) |
|
36 | - $value = htmlspecialchars( stripslashes((string)$value) ); |
|
35 | + if (get_magic_quotes_gpc()) |
|
36 | + $value = htmlspecialchars(stripslashes((string) $value)); |
|
37 | 37 | else |
38 | - $value = htmlspecialchars( (string)$value ); |
|
38 | + $value = htmlspecialchars((string) $value); |
|
39 | 39 | ?> |
40 | 40 | <tr> |
41 | - <th style="vertical-align: top"><?php echo htmlspecialchars( (string)$key ); ?></th> |
|
41 | + <th style="vertical-align: top"><?php echo htmlspecialchars((string) $key); ?></th> |
|
42 | 42 | <td><pre class="samples"><?php echo $value; ?></pre></td> |
43 | 43 | </tr> |
44 | 44 | <?php |
@@ -29,14 +29,16 @@ |
||
29 | 29 | { |
30 | 30 | foreach ( $_POST as $key => $value ) |
31 | 31 | { |
32 | - if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) ) |
|
33 | - continue; |
|
32 | + if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) ) { |
|
33 | + continue; |
|
34 | + } |
|
34 | 35 | |
35 | - if ( get_magic_quotes_gpc() ) |
|
36 | - $value = htmlspecialchars( stripslashes((string)$value) ); |
|
37 | - else |
|
38 | - $value = htmlspecialchars( (string)$value ); |
|
39 | -?> |
|
36 | + if ( get_magic_quotes_gpc() ) { |
|
37 | + $value = htmlspecialchars( stripslashes((string)$value) ); |
|
38 | + } else { |
|
39 | + $value = htmlspecialchars( (string)$value ); |
|
40 | + } |
|
41 | + ?> |
|
40 | 42 | <tr> |
41 | 43 | <th style="vertical-align: top"><?php echo htmlspecialchars( (string)$key ); ?></th> |
42 | 44 | <td><pre class="samples"><?php echo $value; ?></pre></td> |