1<?php 2 3# perm check 4$User->check_module_permissions ("circuits", 1, true, false); 5 6# title 7print "<h4>"._('Provider details')."</h4>"; 8print "<hr>"; 9 10# circuit 11print "<table class='ipaddress_subnet table-condensed table-auto'>"; 12 13 print '<tr>'; 14 print " <th>". _('Provider').'</th>'; 15 print " <td><a href='".create_link("tools","circuits","providers",$provider->id)."'>$provider->name</a></td>"; 16 print "</tr>"; 17 18 print '<tr>'; 19 print " <th>". _('Description').'</th>'; 20 print " <td>$provider->description </td>"; 21 print "</tr>"; 22 23 print '<tr>'; 24 print " <th>". _('Provider contact').'</a></th>'; 25 print " <td>$provider->contact</td>"; 26 print "</tr>"; 27 28 if(sizeof($custom_provider_fields) > 0) { 29 30 print "<tr>"; 31 print " <td colspan='2'><hr></td>"; 32 print "</tr>"; 33 34 foreach($custom_provider_fields as $field) { 35 36 # fix for boolean 37 if($field['type']=="tinyint(1)" || $field['type']=="boolean") { 38 if($provider->{$field['name']}=="0") { $provider->{$field['name']} = "false"; } 39 elseif($provider->{$field['name']}=="1") { $provider->{$field['name']} = "true"; } 40 else { $provider->{$field['name']} = ""; } 41 } 42 43 # create links 44 $provider->{$field['name']} = $Result->create_links ($provider->{$field['name']}); 45 46 print "<tr>"; 47 print "<th>".$Tools->print_custom_field_name ($field['name'])."</th>"; 48 print "<td>".$provider->{$field['name']}."</d>"; 49 print "</tr>"; 50 } 51 } 52 53print "</table>";