2 $logurl = $CFG->wwwroot
.
3 '/course/report/log/index.php?chooselog=1&showusers=1&showcourses=1&host_course='.$mnet_peer->id
.
6 '&modid=&modaction=0&logformat=showashtml';
8 admin_externalpage_print_header();
10 if (isset($mnet_peer->id
) && $mnet_peer->id
> 0) {
11 $tabs[] = new tabobject('mnetdetails', 'peers.php?step=update&hostid='.$mnet_peer->id
, $strmnetedithost, $strmnetedithost, false);
12 $tabs[] = new tabobject('mnetservices', 'mnet_services.php?step=list&hostid='.$mnet_peer->id
, $strmnetservices, $strmnetservices, false);
13 if ($mnet_peer->application
->name
== 'moodle') {
14 $tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
17 $tabs[] = new tabobject('mnetdetails', '#', $strmnetedithost, $strmnetedithost, false);
19 print_tabs(array($tabs), 'mnetdetails');
21 print_simple_box_start("center", "");
23 <form method=
"post" action=
"peers.php">
25 <input type=
"hidden" name=
"sesskey" value=
"<?php echo $USER->sesskey ?>" />
26 <input type
="hidden" name
="step" value
="commit" />
27 <input type
="hidden" name
="last_connect_time" value
="<?php echo $mnet_peer->last_connect_time; ?>" />
28 <input type
="hidden" name
="id" value
="<?php echo isset($mnet_peer->id)? $mnet_peer->id : '0' ; ?>" />
29 <input type
="hidden" name
="applicationid" value
="<?php echo isset($mnet_peer->applicationid)? $mnet_peer->applicationid : '0' ; ?>" />
30 <input type
="hidden" name
="applicationname" value
="<?php echo isset($mnet_peer->application->name)? $mnet_peer->application->name : '' ; ?>" />
31 <table cellpadding
="9" cellspacing
="0" width
="635">
34 <td align
="right" valign
="top"><?php
print_string('site'); ?>:
</td>
35 <td valign=
"top"><input type=
"text" name=
"name" size=
"30" value=
"<?php echo $mnet_peer->name; ?>" /></td
>
38 <td align
="right" valign
="top"><?php
print_string('hostname', 'mnet'); ?>:
</td>
39 <td valign=
"top"><input type=
"text" name=
"wwwroot" size=
"30" value=
"<?php echo $mnet_peer->wwwroot; ?>" /></td
>
42 if (empty($mnet_peer->public_key
)) $mnet_peer->public_key
= '';
45 <td align=
"right" valign=
"top"><?php
46 print_string('publickey', 'mnet');
48 helpbutton("publickey", get_string('publickey', 'mnet'), "mnet", true, true);
54 if (isset($mnet_peer->deleted
) && $mnet_peer->deleted
> 0) {
55 $key = mnet_get_public_key($mnet_peer->wwwroot
, $mnet_peer->application
->xmlrpc_server_url
);
56 $mnet_peer->public_key
= clean_param($key, PARAM_PEM
);
61 if (empty($mnet_peer->public_key
)) {
62 print_string('nopubkey', 'mnet');
65 <textarea rows=
"17" cols=
"65" name=
"public_key" style=
"font-size: 8px;"><?php echo $mnet_peer->public_key
; ?></textarea>
69 <td align=
"right" valign=
"top"><?php print_string('expires', 'mnet'); ?>:
</td>
72 if($mnet_peer->public_key_expires
< time()) {
73 print_string('expired', 'mnet');
76 echo userdate($mnet_peer->public_key_expires
);
82 if(!empty($currentkey)) {
85 <td align=
"right" valign=
"top"></td>
86 <td valign=
"top"><?php print_string('keymismatch', 'mnet'); ?></td>
89 <td align=
"right" valign=
"top"><?php print_string('currentkey', 'mnet'); ?>:
</td>
90 <td valign=
"top"><pre style=
"font-size: 8px;"><?php echo $currentkey;?></pre></td>
95 if (isset($mnet_peer->id
) && $mnet_peer->id
> 0) {
98 <td align=
"right" valign=
"top"><?php print_string('last_connect_time', 'mnet'); ?>:
</td>
99 <td valign=
"top"><?php echo ($mnet_peer->last_connect_time
== 0)?
get_string('never','mnet') : date('H:i:s d/m/Y',$mnet_peer->last_connect_time
);?></td>
104 if (isset($mnet_peer->deleted
) && $mnet_peer->deleted
> 0){
107 <td align=
"right" valign=
"top"><?php print_string('deleted'); ?>:
</td>
109 <input type=
"radio" name=
"deleted" value=
"0" checked=
"checked" /> <?php print_string('reenableserver','mnet'); ?><br />
110 <input type=
"radio" name=
"deleted" value=
"1" /> <?php print_string('yes'); ?><br />
116 if (isset($mnet_peer->ip_address
) && '' != $mnet_peer->ip_address
){
119 <td align=
"right" valign=
"top"><?php print_string('ipaddress', 'mnet');
121 helpbutton("ipaddress", get_string('ipaddress', 'mnet'), "mnet", true, true);
123 <td valign=
"top"><?php echo $mnet_peer->ip_address
; ?></td>
131 <td><input type=
"submit" value=
"<?php print_string("savechanges
"); ?>" /></td
>
137 print_simple_box_end();
138 admin_externalpage_print_footer();