Changeset 4008
- Timestamp:
- 06/08/07 00:04:05 (6 years ago)
- Files:
-
- modules/branches/2.3 (modified) (1 prop)
- modules/branches/2.3/asteriskinfo/module.xml (modified) (2 diffs)
- modules/branches/2.3/asteriskinfo/page.asteriskinfo.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.3
- Property svnmerge-integrated changed from /modules/branches/2.2:1-3588,3615-3635,3637-3638,3640,3674,3680,3686,3692,3702,3706,3710,3716,3758,3760,3762-3765,3767-3785,3787-3789,3801,3810,3828,3831,3839,3860,3866,3875,3877,3887,3899,3911,3913,3943,3982-3983,3990,3998 to /modules/branches/2.2:1-3588,3615-3635,3637-3638,3640,3674,3680,3686,3692,3702,3706,3710,3716,3758,3760,3762-3765,3767-3785,3787-3789,3801,3810,3828,3831,3839,3860,3866,3875,3877,3887,3899,3911,3913,3943,3982-3983,3990,3998,4007
modules/branches/2.3/asteriskinfo/module.xml
r3986 r4008 2 2 <rawname>asteriskinfo</rawname> 3 3 <name>Asterisk Info</name> 4 <version>0. 1.0</version>4 <version>0.2.0</version> 5 5 <type>tool</type> 6 6 <category>System Administration</category> … … 11 11 <asteriskinfo>Asterisk Info</asteriskinfo> 12 12 </menuitems> 13 <depends> 14 <engine>asterisk</engine> 15 </depends> 13 16 <changelog> 14 17 *0.1.0* Initial release 18 *0.2.0* Add depends asterisk xml tag, proper error checking for manager connection, center table titles 15 19 </changelog> 16 20 <location>release/2.3/asteriskinfo-0.1.0.tgz</location> modules/branches/2.3/asteriskinfo/page.asteriskinfo.php
r3985 r4008 94 94 <?php 95 95 foreach ($modes as $mode => $value) { 96 echo "<li><a id=\"".($extdisplay==$mode)."\" href=\"config.php?&type=".urlencode("tool")."&display=".urlencode($dispnum)."&extdisplay=".urlencode($mode)."\">"._($value)."</a></li>";96 echo "<li><a id=\"".($extdisplay==$mode)."\" href=\"config.php?&type=".urlencode("tool")."&display=".urlencode($dispnum)."&extdisplay=".urlencode($mode)."\">"._($value)."</a></li>"; 97 97 } 98 98 ?> … … 109 109 <table class="box"> 110 110 <?php 111 if ($extdisplay != "summary") { 112 $arr="arr_".$extdisplay; 113 foreach ($$arr as $key => $value) { 114 ?> 115 <tr class="boxheader"> 116 <td colspan="2"><h5><?php echo _("$key")?><hr></h5></td> 117 </tr> 111 if (!$astman) { 112 ?> 113 <tr class="boxheader"> 114 <td colspan="2" align="center"><h5><?php echo _("ASTERISK MANAGER ERROR")?><hr></h5></td> 115 </tr> 118 116 <tr class="boxbody"> 119 117 <td> 120 118 <table border="0" > 121 119 <tr> 122 <td> 123 <pre> 120 <td align="left"> 124 121 <?php 125 $response = $astman->send_request('Command',array('Command'=>$value)); 126 $new_value = $response['data']; 127 /* 128 $new_value = explode("\n",$new_value); 129 array_shift($new_value); 130 $new_value = implode("\n",$new_value); 131 */ 132 echo ltrim($new_value,'Privilege: Command'); 122 echo "<br>The module was unable to connect to the asterisk manager.<br>Make sure Asterisk is running and your manager.conf settings are proper.<br><br>"; 133 123 ?> 134 </pre>135 </td>136 </tr>137 </table>138 </td>139 </tr>140 <?php141 }142 } else {143 ?>144 <tr class="boxheader">145 <td colspan="2"><h5><?php echo _("Summary")?><hr></h5></td>146 </tr>147 <tr class="boxbody">148 <td>149 <table border="0">150 <tr>151 <td>152 <?php echo buildAsteriskInfo(); ?>153 124 </td> 154 125 </tr> … … 157 128 </tr> 158 129 <?php 159 } 160 ?> 161 </table> 130 } else { 131 if ($extdisplay != "summary") { 132 $arr="arr_".$extdisplay; 133 foreach ($$arr as $key => $value) { 134 ?> 135 <tr class="boxheader"> 136 <td colspan="2" align="center"><h5><?php echo _("$key")?><hr></h5></td> 137 </tr> 138 <tr class="boxbody"> 139 <td> 140 <table border="0" > 141 <tr> 142 <td> 143 <pre> 144 <?php 145 $response = $astman->send_request('Command',array('Command'=>$value)); 146 $new_value = $response['data']; 147 echo ltrim($new_value,'Privilege: Command'); 148 ?> 149 </pre> 150 </td> 151 </tr> 152 </table> 153 </td> 154 </tr> 155 <?php 156 } 157 } else { 158 ?> 159 <tr class="boxheader"> 160 <td colspan="2" align="center"><h5><?php echo _("Summary")?><hr></h5></td> 161 </tr> 162 <tr class="boxbody"> 163 <td> 164 <table border="0"> 165 <tr> 166 <td> 167 <?php echo buildAsteriskInfo(); ?> 168 </td> 169 </tr> 170 </table> 171 </td> 172 </tr> 173 <?php 174 } 175 } 176 ?> 177 </table> 162 178 <tr> 163 179 <td colspan="2"><h6><input name="Submit" type="submit" value="<?php echo _("Refresh")?>"></h6></td>
