From: <abe...@us...> - 2015-08-06 15:39:32
|
Revision: 7183 http://sourceforge.net/p/astlinux/code/7183 Author: abelbeck Date: 2015-08-06 15:39:29 +0000 (Thu, 06 Aug 2015) Log Message: ----------- web interface, PhoneProv tab, add an HTTP external link for the Phone Web Admin using the status info data Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/phoneprov.php Modified: branches/1.0/package/webinterface/altweb/admin/phoneprov.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2015-08-06 04:05:40 UTC (rev 7182) +++ branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2015-08-06 15:39:29 UTC (rev 7183) @@ -133,6 +133,19 @@ return($info); } +// Function: addSpecialInfo +// +function addSpecialInfo($label, $field) { + $str = ''; + + if (strtolower($label) === 'addr->ip') { + if (preg_match('/^([0-9]+[.][0-9]+[.][0-9]+[.][0-9]+).*$/', $field, $ips)) { + $str = ' <a href="http://'.$ips[1].'/" class="headerText" title="Phone Web Admin" target="_blank">Admin</a>'; + } + } + return($str); +} + // Function: isMACreload // function isMACreload($mac, $sql, $map) { @@ -823,7 +836,7 @@ echo '<tr ', ($i % 2 == 0) ? 'class="dtrow0"' : 'class="dtrow1"', '>'; echo '<td style="text-align: right;">'.htmlspecialchars($info_label).':</td>'; echo '<td colspan="6">'; - echo htmlspecialchars($info_field); + echo htmlspecialchars($info_field).addSpecialInfo($info_label, $info_field); echo '</td>'; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |