root/dev/mods/known_members/settings.php @ 150

Revision 61, 2.6 KB (checked in by knifee, 14 years ago)

Updated both files, settings now describes correctly what it does, as well as now lets you turn on/off columns.
columns displayed now are, image, name, points, dmg done, dmg recived efficiency. All but name can be toggles on/off.

Line 
1<?php
2require_once("common/class.page.php");
3require_once("common/admin_menu.php");
4
5if ($_POST['submit'])
6{
7if($_POST['known_members_own']){
8        $config->setConfig('known_members_own', '1');
9        }
10        else
11        {
12        $config->setConfig('known_members_own', '0');
13        }
14
15$clmn = "";
16if($_POST['img']) {$clmn .=",img";}
17if($_POST['kll_pnts']) {$clmn .=",kll_pnts";}   
18if($_POST['dmg_dn']) {$clmn .=",dmg_dn";}       
19if($_POST['dmg_rcd']) {$clmn .=",dmg_rcd";}     
20if($_POST['eff']) {$clmn .=",eff";}
21if($_POST['lst_sn']) {$clmn .=",lst_sn";}
22$config->setConfig('known_members_clmn', $clmn);       
23       
24        $html .= "Setting Saved";
25}
26
27$page = new Page("Settings - known members");
28
29$html .= "<div class=block-header2>Global options</div>";
30$html .= "<form id=options name=options method=post action=>";
31$html .= "<table class=kb-subtable>";
32$html .= "<tr><td><b>Remove Known Members page for board owner:</b></td><td><input type=checkbox name=known_members_own id=known_members_own";
33if ($config->getConfig('known_members_own'))
34{
35    $html .= " checked=\"checked\"";
36}
37$html .= "></td></tr></table>";
38
39
40$html .= "<div class=block-header2>Show Columns</div>";
41$html .= "<table class=kb-subtable>";
42$clmn = $config->getConfig('known_members_clmn');
43
44$html .= "<tr><td><b>Add Char. Portrait:</b></td><td><input type=checkbox name=img id=img";
45if (strpos($clmn,"img"))
46{
47    $html .= " checked=\"checked\"";
48}
49$html .= "></td></tr>";
50$html .= "<tr><td><b>Add Kill Points:</b></td><td><input type=checkbox name=kll_pnts id=kll_pnts";
51if (strpos($clmn,"kll_pnts"))
52{
53    $html .= " checked=\"checked\"";
54}
55$html .= "></td></tr>";
56$html .= "<tr><td><b>Add Damage Done(isk):</b></td><td><input type=checkbox name=dmg_dn id=dmg_dn";
57if (strpos($clmn,"dmg_dn"))
58{
59    $html .= " checked=\"checked\"";
60}
61$html .= "></td></tr>";
62$html .= "<tr><td><b>Add Damage Recived(isk):</b></td><td><input type=checkbox name=dmg_rcd id=dmg_rcd";
63if (strpos($clmn,"dmg_rcd"))
64{
65    $html .= " checked=\"checked\"";
66}
67$html .= "></td></tr>";
68$html .= "<tr><td><b>Add Efficency:</b></td><td><input type=checkbox name=eff id=eff";
69if (strpos($clmn,"eff"))
70{
71    $html .= " checked=\"checked\"";
72}
73$html .= "></td></tr>";
74$html .= "<tr><td><b>Add Last Seen In:</b></td><td><input type=checkbox name=lst_sn id=lst_sn";
75if (strpos($clmn,"lst_sn"))
76{
77    $html .= " checked=\"checked\"";
78}
79$html .= "></td></tr>";
80$html .= "<tr><td width=120></td><td colspan=3 ><input type=submit name=submit value=\"Save\"></td></tr>";
81$html .= "</table>";
82
83$html .= "</form>";
84
85$page->setContent($html);
86$page->addContext($menubox->generate());
87$page->generate();
88?>
Note: See TracBrowser for help on using the browser.