root/afridex/plugins/fresh-page/RCCWP_OptionsPage.php

Revision 21, 3.1 kB (checked in by admin, 18 years ago)
Line 
1<?php
2include_once('RCCWP_Options.php');
3
4class RCCWP_OptionsPage
5{
6
7function Main()
8{
9        $customWritePanels = RCCWP_Application::GetCustomWritePanels();
10        $customWritePanelOptions = RCCWP_Options::Get();
11        ?>
12       
13        <div class="wrap">
14
15        <h2>Fresh Post Options</h2>
16       
17        <form action="" method="post" id="custom-write-panel-options-form">
18       
19        <p class="submit" ><input name="update-custom-write-panel-options" type="submit" value="Update Options" /></p>
20       
21        <ul>
22        <li>
23                <label for="hide-write-post">
24                <input name="hide-write-post" id="hide-write-post" value="1" <?=RCCWP_OptionsPage::GetCheckboxState($customWritePanelOptions['hide-write-post'])?> type="checkbox">
25                Hide WordPress' Write Post panel.</label>
26        </li>
27        <li>
28                <label for="hide-write-page">
29                <input name="hide-write-page" id="hide-write-page" value="1" <?=RCCWP_OptionsPage::GetCheckboxState($customWritePanelOptions['hide-write-page'])?> type="checkbox">
30                Hide WordPress' Write Page panel.</label>
31        </li>
32        <li>
33                <label for="prompt-editing-post">
34                <input name="prompt-editing-post" id="prompt-editing-post" value="1" <?=RCCWP_OptionsPage::GetCheckboxState($customWritePanelOptions['prompt-editing-post'])?> type="checkbox">
35                Prompt when editing a Post not created with Custom Write Panel.</label>
36        </li>
37        <li>
38                <label for="assign-to-role">
39                <input name="assign-to-role" id="assign-to-role" value="1" <?=RCCWP_OptionsPage::GetCheckboxState($customWritePanelOptions['assign-to-role'])?> type="checkbox">
40                Assign custom write panels to a role. (Requires installing plugin "Role Manager" at http://www.im-web-gefunden.de/wordpress-plugins/role-manager/)</label>
41        </li>
42        <li>
43                <label for="use-snipshot">
44                <input name="use-snipshot" id="use-snipshot" value="1" <?=RCCWP_OptionsPage::GetCheckboxState($customWritePanelOptions['use-snipshot'])?> type="checkbox">
45                Use Snipshot services instead of cropper to edit photos.</label>
46        </li>
47        <li>
48                <label for="default-custom-write-panel">Default Custom Write Panel
49                <select name="default-custom-write-panel" id="default-custom-write-panel">
50                        <option value="">(None)</option>
51                <?php
52                $defaultCustomWritePanel = $customWritePanelOptions['default-custom-write-panel'];
53                foreach ($customWritePanels as $panel) :
54                        $selected = $panel->id == $defaultCustomWritePanel ? 'selected="selected"' : '';
55                ?>
56                        <option value="<?=$panel->id?>" <?=$selected?>><?=$panel->name?></option>
57                <?php
58                endforeach;
59                ?>
60                </select>
61                </label>
62        </li>
63        <li>
64                <label for="uninstall-custom-write-panel">
65                Type <strong>uninstall</strong> into the textbox, click <strong>Update Options</strong>, and all the tables created by this plugin will be deleted
66                <input type="text" id="uninstall-custom-write-panel" name="uninstall-custom-write-panel" size="25" />
67                </label>
68        </li>
69        </ul>
70       
71        <p class="submit" ><input name="update-custom-write-panel-options" type="submit" value="Update Options" /></p>
72       
73        </form>
74
75        </div>
76       
77        <?php
78}
79
80function GetCheckboxState($optionValue)
81{
82        if ($optionValue == '')
83                return '';
84        else 
85                return 'checked="checked"';
86}
87
88}
89
90?>
Note: See TracBrowser for help on using the browser.