Fixes bug MDL-8234, "New groups code & AS keyword"
[moodle-pu.git] / admin / mnet / peers.html
blob56a311d34b93bb8bd02142a3dc5130827b60bf53
1 <?php
2 admin_externalpage_print_header($adminroot);
4 if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
5 print_box(get_string('mnetdisabled','mnet'));
7 ?>
8 <center>
9 <form method="post" action="peers.php">
10 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
11 <input type="hidden" name="updateregisterall" value="1" />
12 <table cellspacing="0" cellpadding="5" width="500" id="hosts" class="generaltable generalbox" >
13 <tr>
14 <th class="header c0" nowrap="nowrap" colspan="2"><?php print_string('registerallhosts', 'mnet'); ?></th>
15 </tr>
16 <tr>
17 <td class="cell c1" colspan="2"><?php print_string('registerallhostsexplain', 'mnet'); ?></td>
18 </tr>
19 <tr>
20 <td class="cell c1"><input type="checkbox" name="registerallhosts" <?php if (!empty($CFG->mnet_register_allhosts)) echo 'checked="checked" '; ?>/></td>
21 <td class="cell c1"> <?php print_string('registerallhosts', 'mnet'); ?> </td>
22 </tr>
23 <tr>
24 <td align="right" colspan="2"><input type="submit" name="submit" value="<?php print_string('savechanges'); ?>" /></td>
25 </tr>
26 </table>
27 </form>
28 <table cellspacing="0" cellpadding="5" id="hosts" class="generaltable generalbox" >
29 <tr>
30 <th class="header c0" nowrap="nowrap"><?php print_string('site'); ?></th>
31 <th class="header c1" nowrap="nowrap"><?php print_string('system','mnet'); ?></th>
32 <th class="header c2" nowrap="nowrap"><?php print_string('last_connect_time', 'mnet'); ?></th>
33 <th class="header c3" nowrap="nowrap"></th>
34 </tr>
35 <?php
37 foreach($hosts as $host):
39 if ($host->last_connect_time == 0) {
40 $last_connect = get_string('never');
41 } else {
42 $last_connect = date('H:i:s d/m/Y', $host->last_connect_time);
46 <tr>
47 <td class="cell c0"><a href="peers.php?step=update&amp;hostid=<?php echo $host->id; ?>"><?php echo $host->name; ?></a></td>
48 <td class="cell c1"><a href="peers.php?step=update&amp;hostid=<?php echo $host->id; ?>"><?php echo $host->wwwroot; ?></a></td>
49 <td class="cell c2" nowrap="nowrap"><?php if ($host->id != $CFG->mnet_all_hosts_id) echo $last_connect; ?></td>
50 <td class="cell c3">
51 <?php if ($host->id != $CFG->mnet_all_hosts_id): ?>
52 <form method="post" action="delete.php">
53 <input type="hidden" name="hostid" value="<?php echo $host->id; ?>" />
54 <input type="hidden" name="step" value="verify" />
55 <input type="submit" name="submit" value="<?php print_string('delete'); ?>"/>
56 </form>
57 <?php endif; ?>
58 </td>
59 </tr>
60 <?php
61 endforeach;
63 <tr>
64 <td class="cell c4" colspan="4">&nbsp;</td>
65 </tr>
66 <form method="post" action="peers.php">
67 <tr>
68 <th class="header c4" nowrap="nowrap" colspan="4">
69 <?php print_string('addnewhost', 'mnet'); ?>
70 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
71 <input type="hidden" name="step" value="input" />
72 </th>
73 </tr>
74 <tr>
75 <td class="cell c0"></td>
76 <td class="cell c1"><input type="text" name="wwwroot" value="" /></td>
77 <td class="cell c2"></td>
78 <td class="cell c3"></td>
79 </tr>
80 <tr>
81 <td class="cell c4" align="right" colspan="4"><input type="submit" value="<?php print_string('addhost','mnet'); ?>" /></td>
82 </tr>
83 </form>
84 </table>
85 </center>
86 <?php
87 admin_externalpage_print_footer($adminroot);