user_syndicate page, use tag and add action to set it
[raven.git] / apps / gacksadmin / user_syndicate.php
1 <?php
2
3 // this must occur before linetabs.php, or linetabs won't work. I have no idea why.
4 drupal_add_js("misc/popup.js");
5
6 // Require login
7 require_once 'plc_login.php';
8
9 // Get session and API handles
10 require_once 'plc_session.php';
11 global $plc, $api, $adm;
12
13 // Common functions
14 require_once 'plc_functions.php';
15 require_once 'plc_peers.php';
16 require_once 'gacks_functions.php';
17 require_once 'gacksclient.php';
18 require_once 'linetabs.php';
19 require_once 'table.php';
20 require_once 'details.php';
21 require_once 'toggle.php';
22 require_once 'form.php';
23 require_once 'nifty.php';
24
25 // find person roles
26 $_person= $plc->person;
27 $_person_id = $plc->person['person_id'];
28 $_roles= $_person['role_ids'];
29
30 // Print header
31 require_once 'plc_drupal.php';
32 drupal_set_title('Manage Slivers: Syndicate Shared Filesystem');
33 include 'plc_header.php';
34
35 $tabs = manage_slivers_tabs();
36 $_GET['active_line_tab'] = "Shared Filesystem";
37 plekit_linetabs($tabs);
38
39 $nifty=new PlekitNifty ('sliceimage','objects-list','big');
40 $nifty->start();
41 print '<div style="width: 640px; margin-left: auto; margin-right: auto;">';
42
43 //print "<br>";
44 $account_name = get_account_name($api, $_person_id);
45
46 if ($account_name != NULL) {
47     $gacksapi = new GACKSAPI();
48
49     $form = new PlekitForm(l_gacks_actions(), array("action"=>"set-syndicate",
50                                                     "account_name"=> $account_name));
51     $form->start();
52
53     if (get_slice_tag($api, $account_name, "enable_syndicate")) {
54         $syndicate_options=array('checked'=>'checked');
55     } else {
56         $syndicate_options=array();
57     }
58
59     print "<br>";
60     print $form->checkbox_html('enable_syndicate', '1', $syndicate_options);
61     print "Enable Syndicate Shared Filesystem<br><br>";
62
63     print $form->submit_html("submit", "submit");
64
65     $form->end();
66 }
67
68 print "</div>";
69 $nifty->end();
70
71 include 'plc_footer.php';
72
73 ?>
74
75