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

Revision 213, 2.6 KB (checked in by ralle030583, 13 years ago)

All files (i hope i havent forgott something) was modified to use the the config in this way:
- config::get($key)
- config::del($key)
- config::set($key,value)

Exception Templates/Smarty?:
The templates still uses $config->get($key) and $config->set($key,$value) cause
it seems that smarty dont like the :: notification

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