Changeset 11361

Show
Ignore:
Timestamp:
02/13/11 10:35:36 (2 years ago)
Author:
mickecarlsson
Message:

Extension settings, first release, read-only, just display the setting of each extension

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.9/extensionsettings/module.xml

    r10851 r11361  
    1313  </menuitems> 
    1414  <changelog> 
    15     *2.9.0.0* Work In Progress, no release, just a repository for the code 
     15    *2.9.0.0* First release, display all settings 
    1616  </changelog> 
    1717  <md5sum>edabe051394a01e3e342e07200c0d2ea</md5sum> 
  • modules/branches/2.9/extensionsettings/page.extensionsettings.php

    r11346 r11361  
    11<?php /* $Id */ 
    22// Copyright (C) 2008 Philippe Lindheimer & Bandwidth.com (plindheimer at bandwidth dot com) 
    3 // Copyright (C) 2010 Mikael Carlsson (mickecarlsson at gmail dot com) 
     3// Copyright (C) 2011 Mikael Carlsson (mickecarlsson at gmail dot com) 
    44// 
    55// This program is free software; you can redistribute it and/or 
     
    1616// Localization 
    1717// get all settings from astdb for extensions - DONE 
    18 // make all toggles clickable so they can be changed here 
    19 // like, click on CW ON or OFF to toggle state, perhaps an image? 
    20 // same for VmX, enable or disable, or if time permits, change destinations, who knows, time is the limit 
    21 // Change the table so it has colors, perhaps make it scrollable with the headers intact?? 
    22 // and a dozen other things that I can think of. 
    23 // 
    24 // Make columns selectable as in printextensions, selection for VmX, Follow-Me and Call status 
     18// click on bulltest/checks toggle state 
     19// same for VmX, enable or disable, or if time permits, change destinations 
     20// make table scrollable with the headers intact 
    2521 
    2622$dispnum = 'extensionsettings'; 
     
    142138    $html_txt_arr[$sub_heading] .= "<td align=\"center\">".$vmxstate."</td>"; 
    143139    $html_txt_arr[$sub_heading] .= "<td align=\"center\">".$vmxbusy."</td>"; 
    144     // $html_txt_arr[$sub_heading] .= "<td align=\"center\">".$vmxunavail."</td>"; 
    145     $html_txt_arr[$sub_heading] .= "<td align=\"center\"><input type=\"image\" src=\"".$vmxunavail."\" id=\"vmxu".$exten."\" onClick=\"return confirm('Clicked button')\"></td>"; 
    146     // $html_txt_arr[$sub_heading] .= "<td align=\"center\">".$vmxoperator."</td>"; 
    147     $html_txt_arr[$sub_heading] .= "<td align=\"center\"><input type=\"image\" src=\"".$vmxoperator."\" id=\"vmxop".$exten."\" onClick=\"return confirm('Clicked button')\"></td>"; 
    148     $html_txt_arr[$sub_heading] .= "<td><input type=\"text\" id=\"vmxz".$exten."\" name=\"vmxz".$exten."\" size=\"12\" value=\"".$vmxzero."\" style=\"color:".$vmxcolor."></td>"; 
    149     $html_txt_arr[$sub_heading] .= "<td><input type=\"text\" name=\"vmxo".$exten."\" size=\"12\" value=\"".$vmxone."\" style=\"color:".$vmxcolor."></td>"; 
    150     $html_txt_arr[$sub_heading] .= "<td><input type=\"text\" name=\"vmxt".$exten."\" size=\"12\" value=\"".$vmxtwo."\" style=\"color:".$vmxcolor."></td>"; 
     140    $html_txt_arr[$sub_heading] .= "<td align=\"center\"><img src=\"".$vmxunavail."\"></td>"; 
     141    $html_txt_arr[$sub_heading] .= "<td align=\"center\"><img src=\"".$vmxoperator."\"></td>"; 
     142    $html_txt_arr[$sub_heading] .= "<td>".$vmxzero."</td>"; 
     143    $html_txt_arr[$sub_heading] .= "<td>".$vmxone."</td>"; 
     144    $html_txt_arr[$sub_heading] .= "<td>".$vmxtwo."</td>"; 
    151145    // Has the extension followme enabled? 
    152146    $fm = "<img src=\"images/bullet.png\" alt=\"Off\" title=\"Off\"/>"; 
     
    164158    // If follow-me is enabled, get the follow-me list 
    165159    if($fmstate) { 
    166       $fmlist = str_replace("-","\n",$ampuser['/AMPUSER/'.$exten.'/followme/grplist']); 
    167       $rows = count($fmlist)+1; 
    168       ($rows < 3) ? 2 : (($rows > 20) ? 20 : $rows); 
     160      $fmlist = str_replace("-","<br>",$ampuser['/AMPUSER/'.$exten.'/followme/grplist']); 
    169161    } else { 
    170162    $fmlist = ""; 
    171     $rows   = "1"; 
    172163    } 
    173     $html_txt_arr[$sub_heading] .= "<td align=\"center\"><textarea id=\"fm".$exten."\" cols=\"12\" rows=\"".$rows."\" name=\"fm".$exten."\">".$fmlist."</textarea></td>"; 
     164    $html_txt_arr[$sub_heading] .= "<td>".$fmlist."</td>"; 
    174165    $fmlist = ""; // Empty the list 
    175166    // Now get CW, CF, CFB and CFU if set 
     
    201192    $html_txt_arr[$sub_heading] .= "<td align=\"center\">".$cw."</td>"; 
    202193    $html_txt_arr[$sub_heading] .= "<td align=\"center\">".$dnd."</td>"; 
    203     $html_txt_arr[$sub_heading] .= "<td align=\"center\"><input type=\"text\" name=\"cf".$exten."\" size=\"12\" value=\"".$cf."\"</td>"; 
    204     $html_txt_arr[$sub_heading] .= "<td align=\"center\"><input type=\"text\" name=\"cfb".$exten."\" size=\"12\" value=\"".$cfb."\"</td>"; 
    205     $html_txt_arr[$sub_heading] .= "<td align=\"center\"><input type=\"text\" name=\"cfu".$exten."\" size=\"12\" value=\"".$cfu."\"</td>"; 
     194    $html_txt_arr[$sub_heading] .= "<td>".$cf."</td>"; 
     195    $html_txt_arr[$sub_heading] .= "<td>".$cfb."</td>"; 
     196    $html_txt_arr[$sub_heading] .= "<td>".$cfu."</td>"; 
    206197    $html_txt_arr[$sub_heading] .= "</tr>\n"; 
    207198  }