Bläddra i källkod

Merge pull request #3 from fusionpbx/master

Remove apps/flashphoner better options exist.
blackc2004 9 år sedan
förälder
incheckning
c2250856f2

+ 0 - 14
flashphoner/README

@@ -1,14 +0,0 @@
-This Module brought to you by the Letters Ken Rice <krice at tollfreegateway dot com> 
-and the Number 42.
-
-This Module REQUIRES the use of FlashPhoner ( flashphoner.com ) and 
-Wowza Media Server ( www.wowzamedia.com ) to Function Properly.
-
-Both of these are commercial Products however you can get a 
-demo/developers version to test it out Please see their websites
-for specific licensing details. 
-
-This Module Also requires that the FlashPhone Flash Client Software 
-be installed in /flashphoner on your webserver.
-
-See the Wiki for more information.

+ 0 - 65
flashphoner/flashphoner.php

@@ -1,65 +0,0 @@
-<?php
-/* $Id$ */
-/*
-	flashphoner.php
-	Copyright (C) 2008, 2009 Ken Rice
-	All rights reserved.
-
-	Redistribution and use in source and binary forms, with or without
-	modification, are permitted provided that the following conditions are met:
-
-	1. Redistributions of source code must retain the above copyright notice,
-	   this list of conditions and the following disclaimer.
-
-	2. Redistributions in binary form must reproduce the above copyright
-	   notice, this list of conditions and the following disclaimer in the
-	   documentation and/or other materials provided with the distribution.
-
-	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-	POSSIBILITY OF SUCH DAMAGE.
-*/
-include "root.php";
-require_once "resources/require.php";
-require_once "resources/check_auth.php";
-if (permission_exists('flashphoner_view')) {
-	//access granted
-}
-else {
-	echo "access denied";
-	exit;
-}
-require_once "resources/header.php";
-
-unset ($prep_statement);
-
-if (count($_SESSION['user']['extension']) > 0) {
-	$key = uuid();
-	$client_ip = $_SERVER['REMOTE_ADDR'];
-	$sql = sprintf("INSERT INTO v_flashphone_auth (auth_key, hostaddr, createtime, username) values ('%s', '%s', now(), '%s')",
-			$key, $client_ip, $_SESSION["username"]);
-	$db->exec(check_sql($sql));
-}
-
-// Abort here if we dont have an extension for them and tell them to get one assigned
-if (count($_SESSION['user']['extension']) < 1) {
-	echo "This user does not have an extension assigned, please Contact your system adminstrator if you feel this is in error<br />\n";
-} else if (count($_SESSION['user']['extension']) == 1) {
-	// DISPLAY THE PHONE HERE
-	$extension = $_SESSION['user']['extension'][0]['user'];
-	$extension_uuid = $_SESSION['user']['extension'][0]['extension_uuid'];
-	include "phone_html.php";
-} else {
-	include "phone_choices_html.php";
-}
-
-//show the footer
-require_once "resources/footer.php";
-?>

BIN
flashphoner/phone.jpg


+ 0 - 32
flashphoner/phone_choices_html.php

@@ -1,32 +0,0 @@
-<script type="text/javascript">
-function submitform()
-{
-	if(document.flashform.onsubmit &&
-	!document.flashform.onsubmit())
-	{
-		return;
-	}
-	document.flashform.submit();
-}
-
-function start_phone()
-{
-	var testvar = document.getElementById("extension_uuid").value; 
-	window.open("/flashphoner/phone.php?extension_uuid="+testvar+"&key=<?php echo $key;?>&username=<?php echo $_SESSION['username'] ?>", 
-		"FlashPhoner", "height=300, width=230");
-}
-
-</script>
-
-<div>
-<form action="/flashphoner/phone.php" name="flashform">
-<select id="extension_uuid">
-<?php 
-foreach($extension_array as $row)
-printf('<option value="%s">%s</option>'."\n", $row['extension_uuid'], $row['extension']);
-?>
-</select>
-</form>
-<a href='javascript:start_phone();'>
-<img src="phone.jpg" /><br /> Click here to Open Your Phone</a>
-<div>

+ 0 - 12
flashphoner/phone_html.php

@@ -1,12 +0,0 @@
-<script type="text/javascript">
-
-function start_phone()
-{
-	window.open("/flashphoner/phone.php?key=<?php echo $key;?>&extension_uuid=<?php echo $extension_uuid;?>&username=<?php echo $_SESSION['username'] ?>", "FlashPhoner", "height=300, width=230, location=0, menubar=0");
-}
-
-</script>
-<div>
-<a href='javascript:start_phone();'>
-<img src="phone.jpg" /><br /> Click here to Open Your Phone</a>
-<div>

+ 0 - 120
flashphoner/request_credentials.php

@@ -1,120 +0,0 @@
-<?php
-/* $Id$ */
-/*
-	call.php
-	Copyright (C) 2008, 2009 Mark J Crane
-	All rights reserved.
-
-	Redistribution and use in source and binary forms, with or without
-	modification, are permitted provided that the following conditions are met:
-
-	1. Redistributions of source code must retain the above copyright notice,
-	   this list of conditions and the following disclaimer.
-
-	2. Redistributions in binary form must reproduce the above copyright
-	   notice, this list of conditions and the following disclaimer in the
-	   documentation and/or other materials provided with the distribution.
-
-	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-	POSSIBILITY OF SUCH DAMAGE.
-*/
-
-include "root.php";
-require_once "resources/require.php";
-/*
- require_once "resources/check_auth.php";
-if (permission_exists('flashphoner_view')) {
-	//access granted
-}
-else {
-	echo "access denied";
-	exit;
-} */
-$extension_uuid = $_REQUEST['extension_uuid'];
-$key = $_REQUEST['key'];
-$username = $_REQUEST['username'];
-
-// make sure they atleast have a KEY from before
-$sql = sprintf("select * from v_flashphone_auth where auth_key = '%s' and hostaddr = '%s' and username = '%s';",
-		urldecode($key),
-		$_SERVER['REMOTE_ADDR'],
-		$username);
-	
-$prep_statement = $db->prepare(check_sql($sql));
-if (!$prep_statement) {
-	echo "\nPDO::errorInfo():\n";
-	print_r($db->errorInfo());
-}
-
-$prep_statement->execute();
-$x = 0;
-$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
-
-// There is probably a better way to do this but this will work on anything
-foreach ($result as &$row) {
-	$auth_array[$x] = $row;
-	$x++;
-}
-if ($x < 1) {
-	die("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<ERROR>UNAUTHORIZED ACCESS</ERROR>");
-}
-unset ($prep_statement);
-
-//get a list of assigned extensions for this user
-$sql = "";
-$sql .= " select * from v_extensions ";
-$sql .= "where domain_uuid = '$domain_uuid' ";
-$sql .= "and enabled = 'true' ";
-if (count($_SESSION['user']['extension']) > 0) {
-	$sql .= "and (";
-	$x = 0;
-	foreach($_SESSION['user']['extension'] as $row) {
-		if ($x > 0) { $sql .= "or "; }
-		$sql .= "extension = '".$row['user']."' ";
-		$x++;
-	}
-	$sql .= ")";
-}
-else {
-	//hide any results when a user has not been assigned an extension
-	$sql .= "and extension = 'disabled' ";
-}
-$sql .= "order by extension asc ";
-$prep_statement = $db->prepare(check_sql($sql));
-$prep_statement->execute();
-$x = 0;
-$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
-foreach ($result as &$row) {
-	$extension_array[$x]['extension_uuid'] = $row["extension_uuid"];
-	$extension_array[$x]['extension'] = $row["extension"];
-	$extension_array[$x]['password'] = $row["password"];
-	$extension_array[$x]['user_context'] = $row["user_context"];
-	$x++;
-}
-
-unset ($prep_statement);
-
-if ($x == 1) {
-header('Content-Type: text/xml');
-
-?>
-<?xml version="1.0" encoding="utf-8" ?>
-<fusionpbx version="1.0">
-	<flashphoner>
-		<login><?php echo $extension_array[0]['extension']; ?></login>
-		<password><?php echo $extension_array[0]['password']; ?></password>
-		<proxy><?php echo $extension_array[0]['user_context']; ?></proxy>
-		<port>5060</port>
-	</flashphoner>
-</fusionpbx>
-<?php
-} 
-?>

+ 0 - 50
flashphoner/root.php

@@ -1,50 +0,0 @@
-<?php
-/*
-	FusionPBX
-	Version: MPL 1.1
-
-	The contents of this file are subject to the Mozilla Public License Version
-	1.1 (the "License"); you may not use this file except in compliance with
-	the License. You may obtain a copy of the License at
-	http://www.mozilla.org/MPL/
-
-	Software distributed under the License is distributed on an "AS IS" basis,
-	WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-	for the specific language governing rights and limitations under the
-	License.
-
-	The Original Code is FusionPBX
-
-	The Initial Developer of the Original Code is
-	Mark J Crane <[email protected]>
-	Portions created by the Initial Developer are Copyright (C) 2008-2012
-	the Initial Developer. All Rights Reserved.
-
-	Contributor(s):
-	Mark J Crane <[email protected]>
-*/
-
-// make sure the PATH_SEPARATOR is defined
-	if (!defined("PATH_SEPARATOR")) {
-		if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); }
-	}
-
-// make sure the document_root is set
-	$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]);
-	$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
-	$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
-	//echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."<br />\n";
-	//echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."<br />\n";
-	//echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."<br />\n";
-
-// if the project directory exists then add it to the include path otherwise add the document root to the include path
-	if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
-		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
-		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
-	}
-	else {
-		if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
-		set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
-	}
-
-?>

+ 0 - 53
flashphoner/v_config.php

@@ -1,53 +0,0 @@
-<?php
-	//application details
-		$apps[$x]['name'] = "FlashPhoner";
-		$apps[$x]['uuid'] = 'fe45c76c-1a6e-0f0e-73dd-5b542aed2dd5';
-		$apps[$x]['category'] = '';
-		$apps[$x]['subcategory'] = '';
-		$apps[$x]['version'] = '';
-		$apps[$x]['license'] = 'Mozilla Public License 1.1';
-		$apps[$x]['url'] = 'http://www.fusionpbx.com';
-		$apps[$x]['description']['en'] = 'Allow User to Open a Flash Phone for his Extension.';
-
-	//menu details
-		$apps[$x]['menu'][0]['title']['en'] = 'FlashPhoner';
-		$apps[$x]['menu'][0]['uuid'] = '55e19438-63b9-da36-415b-b0219f304426';
-		$apps[$x]['menu'][0]['parent_uuid'] = 'fd29e39c-c936-f5fc-8e2b-611681b266b5';
-		$apps[$x]['menu'][0]['category'] = 'internal';
-		$apps[$x]['menu'][0]['path'] = '/app/flashphoner/flashphoner.php';
-
-	//permission details
-		$apps[$x]['permissions'][0]['name'] = 'flashphoner_view';
-		$apps[$x]['permissions'][0]['groups'][] = 'user';
-		$apps[$x]['permissions'][0]['groups'][] = 'admin';
-		$apps[$x]['permissions'][0]['groups'][] = 'superadmin';
-
-	//schema details
-		$y = 0; //table array index
-		$z = 0; //field array index
-		$apps[$x]['db'][$y]['table'] = 'v_flashphone_auth';
-		$apps[$x]['db'][$y]['fields'][$z]['name'] = 'auth_serial';
-		$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'serial';
-		$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'integer';
-		$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'INT NOT NULL AUTO_INCREMENT';
-		$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
-		$z++;
-		$apps[$x]['db'][$y]['fields'][$z]['name'] = 'auth_key';
-		$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
-		$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
-		$z++;
-		$apps[$x]['db'][$y]['fields'][$z]['name'] = 'hostaddr';
-		$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
-		$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
-		$z++;
-		$apps[$x]['db'][$y]['fields'][$z]['name'] = 'createtime';
-		$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamp';
-		$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
-		$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'timestamp';
-		$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
-		$z++;
-		$apps[$x]['db'][$y]['fields'][$z]['name'] = 'username';
-		$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
-		$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
-
-?>