16 | | if ($_POST['kill_points'] == "on") |
17 | | { |
18 | | $killpoints = 1; |
19 | | } |
20 | | else |
21 | | { |
22 | | $killpoints = 0; |
23 | | } |
24 | | if ($_POST['least_active'] == "on") |
25 | | { |
26 | | $leastactive = 1; |
27 | | } |
28 | | else |
29 | | { |
30 | | $leastactive = 0; |
31 | | } |
32 | | $config->setKillPoints($killpoints); |
33 | | $config->setLeastActive($leastactive); |
34 | | if ($_POST['comments'] == "on") |
| 16 | |
| 17 | // new function checkCheckbox, checks $_POST[arg] and inserts 0 if != 'on' |
| 18 | $config->checkCheckbox('kill_points'); |
| 19 | $config->checkCheckbox('ship_values'); |
| 20 | $config->checkCheckbox('least_active'); |
| 21 | |
| 22 | if ($config->checkCheckbox('comments')) |
38 | | $config->setConfig('comments', '1'); |
39 | | } |
40 | | else |
41 | | { |
42 | | $config->setConfig('comments', '0'); |
43 | | } |
44 | | if ($_POST['comments_pw'] == "on") |
45 | | { |
46 | | $config->setConfig('comments_pw', '1'); |
47 | | } |
48 | | else |
49 | | { |
50 | | $config->setConfig('comments_pw', '0'); |
51 | | } |
52 | | if ($_POST['comments_count'] == "on") |
53 | | { |
54 | | $config->setConfig('comments_count', '1'); |
55 | | } |
56 | | else |
57 | | { |
58 | | $config->setConfig('comments_count', '0'); |
59 | | } |
| 26 | } |
| 27 | $config->checkCheckbox('comments_pw'); |
| 28 | $config->checkCheckbox('comments_count'); |
| 29 | |