Example #1
0
 public static function __setwebsite($value=null) {
   static $websiteIndex = 0;
   if(!$value) $value['label'] = 'URL';
   else $value['label'] = OBM_Contact::labelToString($value['label'], null, false, '_');
   $return = '
     <table class="coordinate websites" id="websites['.$websiteIndex.']">
     <tbody>
     <tr>
       <th><select  name="websites['.$websiteIndex.'][label]">';
   foreach($GLOBALS['l_website_labels'] as $label => $locale) {
     if($value['label'] == $label) $return .= '<option selected="selected" value="'.$label.'">'.$locale.'</option>';
     else $return .= '<option value="'.$label.'">'.$locale.'</option>';
   }
   $return .= '
       </select></th>
       <th><input type="text" name="websites['.$websiteIndex.'][url]" alt="'.__('Website').'" title="'.__('Website').'" value="'.$value['url'].'"/></th>
     </tr>
     </tbody>
     </table>';    
   $websiteIndex++;
   return $return;
 }