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 $tabs[] = new tabobject('mnetthemes', 'mnet_themes.php?step=list&hostid='.$mnet_peer->id
, $strmnetthemes, $strmnetthemes, false);
14 if ($mnet_peer->application
->name
== 'moodle') {
15 $tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
18 $tabs[] = new tabobject('mnetdetails', '#', $strmnetedithost, $strmnetedithost, false);
20 print_tabs(array($tabs), 'mnetdetails');
22 print_simple_box_start("center", "");
24 <form method=
"post" action=
"peers.php">
26 <input type=
"hidden" name=
"sesskey" value=
"<?php echo $USER->sesskey ?>" />
27 <input type
="hidden" name
="step" value
="commit" />
28 <input type
="hidden" name
="last_connect_time" value
="<?php echo $mnet_peer->last_connect_time; ?>" />
29 <input type
="hidden" name
="id" value
="<?php echo isset($mnet_peer->id)? $mnet_peer->id : '0' ; ?>" />
30 <input type
="hidden" name
="applicationid" value
="<?php echo isset($mnet_peer->applicationid)? $mnet_peer->applicationid : '0' ; ?>" />
31 <input type
="hidden" name
="applicationname" value
="<?php echo isset($mnet_peer->application->name)? $mnet_peer->application->name : '' ; ?>" />
32 <table cellpadding
="9" cellspacing
="0" width
="635">
35 <td align
="right" valign
="top"><?php
print_string('site'); ?>:
</td>
36 <td valign=
"top"><input type=
"text" name=
"name" size=
"30" value=
"<?php echo $mnet_peer->name; ?>" /></td
>
39 <td align
="right" valign
="top"><?php
print_string('hostname', 'mnet'); ?>:
</td>
40 <td valign=
"top"><input type=
"text" name=
"wwwroot" size=
"30" value=
"<?php echo $mnet_peer->wwwroot; ?>" /></td
>
43 if (empty($mnet_peer->public_key
)) $mnet_peer->public_key
= '';
46 <td align=
"right" valign=
"top"><?php
47 print_string('publickey', 'mnet');
49 helpbutton("publickey", get_string('publickey', 'mnet'), "mnet", true, true);
55 if (isset($mnet_peer->deleted
) && $mnet_peer->deleted
> 0) {
56 $key = mnet_get_public_key($mnet_peer->wwwroot
, $mnet_peer->application
->xmlrpc_server_url
);
57 $mnet_peer->public_key
= clean_param($key, PARAM_PEM
);
62 if (empty($mnet_peer->public_key
)) {
63 print_string('nopubkey', 'mnet');
66 <textarea rows=
"17" cols=
"65" name=
"public_key" style=
"font-size: 8px;"><?php echo $mnet_peer->public_key
; ?></textarea>
70 <td align=
"right" valign=
"top"><?php print_string('expires', 'mnet'); ?>:
</td>
73 if($mnet_peer->public_key_expires
< time()) {
74 print_string('expired', 'mnet');
77 echo userdate($mnet_peer->public_key_expires
);
83 if(!empty($currentkey)) {
86 <td align=
"right" valign=
"top"></td>
87 <td valign=
"top"><?php print_string('keymismatch', 'mnet'); ?></td>
90 <td align=
"right" valign=
"top"><?php print_string('currentkey', 'mnet'); ?>:
</td>
91 <td valign=
"top"><pre style=
"font-size: 8px;"><?php echo $currentkey;?></pre></td>
96 if (isset($mnet_peer->id
) && $mnet_peer->id
> 0) {
99 <td align=
"right" valign=
"top"><?php print_string('last_connect_time', 'mnet'); ?>:
</td>
100 <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>
105 if (isset($mnet_peer->deleted
) && $mnet_peer->deleted
> 0){
108 <td align=
"right" valign=
"top"><?php print_string('deleted'); ?>:
</td>
110 <input type=
"radio" name=
"deleted" value=
"0" checked=
"checked" /> <?php print_string('reenableserver','mnet'); ?><br />
111 <input type=
"radio" name=
"deleted" value=
"1" /> <?php print_string('yes'); ?><br />
117 if (isset($mnet_peer->ip_address
) && '' != $mnet_peer->ip_address
){
120 <td align=
"right" valign=
"top"><?php print_string('ipaddress', 'mnet');
122 helpbutton("ipaddress", get_string('ipaddress', 'mnet'), "mnet", true, true);
124 <td valign=
"top"><?php echo $mnet_peer->ip_address
; ?></td>
132 <td><input type=
"submit" value=
"<?php print_string("savechanges
"); ?>" /></td
>
138 print_simple_box_end();
139 admin_externalpage_print_footer();