|
From: <abe...@us...> - 2010-12-28 17:56:10
|
Revision: 4693
http://astlinux.svn.sourceforge.net/astlinux/?rev=4693&view=rev
Author: abelbeck
Date: 2010-12-28 17:56:03 +0000 (Tue, 28 Dec 2010)
Log Message:
-----------
Web interface, phone-dir.php script, added XML directory support for Yealink Phones (thanks Rob Hillis) and made name-sort case insensitive
Modified Paths:
--------------
branches/0.7/package/webinterface/altweb/common/header.php
branches/0.7/package/webinterface/altweb/common/license-packages.txt
branches/0.7/package/webinterface/altweb/common/version.php
branches/0.7/package/webinterface/altweb/phone-dir.php
Modified: branches/0.7/package/webinterface/altweb/common/header.php
===================================================================
--- branches/0.7/package/webinterface/altweb/common/header.php 2010-12-26 17:46:06 UTC (rev 4692)
+++ branches/0.7/package/webinterface/altweb/common/header.php 2010-12-28 17:56:03 UTC (rev 4693)
@@ -1,6 +1,6 @@
<?php session_manual_gc();
-// Copyright (C) 2008-2010 Lonnie Abelbeck
+// Copyright (C) 2008-2011 Lonnie Abelbeck
// This is free software, licensed under the GNU General Public License
// version 3 as published by the Free Software Foundation; you can
// redistribute it and/or modify it under the terms of the GNU
@@ -57,7 +57,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<!-- Copyright (C) 2008-2010 Lonnie Abelbeck -->
+<!-- Copyright (C) 2008-2011 Lonnie Abelbeck -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate" />
<meta http-equiv="Expires" content="0" />
Modified: branches/0.7/package/webinterface/altweb/common/license-packages.txt
===================================================================
--- branches/0.7/package/webinterface/altweb/common/license-packages.txt 2010-12-26 17:46:06 UTC (rev 4692)
+++ branches/0.7/package/webinterface/altweb/common/license-packages.txt 2010-12-28 17:56:03 UTC (rev 4693)
@@ -6,7 +6,7 @@
## 3) Lines beginning with a '#' are treated as comments
##
libSRTP~Copyright (c) 2001-2005 Cisco Systems, Inc. All rights reserved.
-Web Interface~Copyright (c) 2008-2010 Lonnie Abelbeck.
+Web Interface~Copyright (c) 2008-2011 Lonnie Abelbeck.
Asterisk~Copyright (c) 1999-2010 Digium, Inc.
DAHDI~Copyright (c) 2001-2010 Digium, Inc.
libPRI~Copyright (c) 2001-2010 Digium, Inc.
Modified: branches/0.7/package/webinterface/altweb/common/version.php
===================================================================
--- branches/0.7/package/webinterface/altweb/common/version.php 2010-12-26 17:46:06 UTC (rev 4692)
+++ branches/0.7/package/webinterface/altweb/common/version.php 2010-12-28 17:56:03 UTC (rev 4693)
@@ -1,6 +1,6 @@
<?php
// version.php for AstLinux Alternate Web Interface
-$GUI_VERSION = '1.7.09';
+$GUI_VERSION = '1.7.10';
?>
Modified: branches/0.7/package/webinterface/altweb/phone-dir.php
===================================================================
--- branches/0.7/package/webinterface/altweb/phone-dir.php 2010-12-26 17:46:06 UTC (rev 4692)
+++ branches/0.7/package/webinterface/altweb/phone-dir.php 2010-12-28 17:56:03 UTC (rev 4693)
@@ -1,6 +1,6 @@
<?php
-// Copyright (C) 2008-2009 Lonnie Abelbeck
+// Copyright (C) 2008-2011 Lonnie Abelbeck
// This is free software, licensed under the GNU General Public License
// version 3 as published by the Free Software Foundation; you can
// redistribute it and/or modify it under the terms of the GNU
@@ -8,10 +8,12 @@
// phone-dir.php for AstLinux
// 08-06-2008
-// 12-08-2008, Added XML spoort for Aastra Phones
+// 12-08-2008, Added XML support for Aastra Phones
+// 21-12-2010, Added XML support for Yealink Phones - Rob Hillis
+// 28-12-2010, Make Sort by Name case insensitive
//
// Usage: https://pbx/phone-dir.php?type=generic
-// type= generic, polycom, aastra
+// type= generic, polycom, aastra, yealink
$familyname = "sysdialname";
$myself = $_SERVER['PHP_SELF'];
@@ -47,6 +49,10 @@
buildData('<?xml version="1.0" encoding="ISO-8859-1"?>');
buildData('<AastraIPPhoneDirectory type="string">');
buildData('<Title>'.getTITLEname($global_prefs).'</Title>');
+} elseif ($opts['type'] === 'yealink') {
+ buildData('<?xml version="1.0" encoding="UTF-8"?>');
+ buildData('<YealinkIPPhoneDirectory clearlight="true">');
+ buildData('<Title>'.getTITLEname($global_prefs).'</Title>');
} else {
buildData('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
buildData('<html>');
@@ -61,7 +67,7 @@
// Sort by Name
if (($n = count($db['data'])) > 0) {
foreach ($db['data'] as $key => $row) {
- $name[$key] = $row['value'];
+ $name[$key] = strtolower($row['value']);
}
array_multisort($name, SORT_ASC, SORT_STRING, $db['data']);
}
@@ -75,6 +81,11 @@
buildData('<Prompt>'.$value.'</Prompt>');
buildData('<URI>'.$number.'</URI>');
buildData('</MenuItem>');
+ } elseif ($opts['type'] === 'yealink') {
+ buildData('<DirectoryEntry>');
+ buildData('<Name>'.$value.'</Name>');
+ buildData('<Telephone>'.$number.'</Telephone>');
+ buildData('</DirectoryEntry>');
} elseif ($opts['type'] === 'polycom') {
buildData('<p><a href="tel://'.$number.'">'.$number.'</a> '.$value.'</p>');
} else {
@@ -92,6 +103,9 @@
if ($opts['type'] === 'aastra') {
buildData('</AastraIPPhoneDirectory>');
header('Content-Type: text/xml');
+} elseif ($opts['type'] === 'yealink') {
+ buildData('</YealinkIPPhoneDirectory>');
+ header('Content-Type: text/xml');
} else {
buildData('</body>');
buildData('</html>');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|