Add a missing file sip_profile_copy.php to the dev branch.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
//application details
|
||||
$apps[$x]['name'] = "Adminer";
|
||||
$apps[$x]['uuid'] = '214b9f02-547b-d49d-f4e9-02987d9581c5';
|
||||
$apps[$x]['category'] = 'System';
|
||||
$apps[$x]['subcategory'] = '';
|
||||
$apps[$x]['version'] = '3.2.2';
|
||||
$apps[$x]['license'] = 'http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0';
|
||||
$apps[$x]['url'] = 'http://www.adminer.org/';
|
||||
$apps[$x]['description']['en'] = 'Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. Adminer is available for MySQL, PostgreSQL, SQLite, MS SQL and Oracle.';
|
||||
|
||||
//menu details
|
||||
$apps[$x]['menu'][0]['title']['en'] = 'Adminer';
|
||||
$apps[$x]['menu'][0]['uuid'] = '1f59d07b-b4f7-4f9e-bde9-312cf491d66e';
|
||||
$apps[$x]['menu'][0]['parent_uuid'] = '594d99c5-6128-9c88-ca35-4b33392cec0f';
|
||||
$apps[$x]['menu'][0]['category'] = 'external';
|
||||
$apps[$x]['menu'][0]['path'] = '<!--{project_path}-->/app/adminer/index.php';
|
||||
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
|
||||
|
||||
//permission details
|
||||
$apps[$x]['permissions'][0]['name'] = 'adminer';
|
||||
$apps[$x]['permissions'][0]['groups'][] = 'superadmin';
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
|
||||
//check permission
|
||||
if (permission_exists('adminer')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//only allow users in the superadmin group to use this feature
|
||||
if (if_group("superadmin")) {
|
||||
//echo "access granted";
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
function adminer_object() {
|
||||
|
||||
class AdminerSoftware extends Adminer {
|
||||
|
||||
function name() {
|
||||
// custom name in title and heading
|
||||
return 'Adminer';
|
||||
}
|
||||
/*
|
||||
function permanentLogin() {
|
||||
// key used for permanent login
|
||||
return "7bebc76d8680196752c6b961ef13c360";
|
||||
}
|
||||
|
||||
function credentials() {
|
||||
global $db_host, $db_username, $db_password;
|
||||
// server, username and password for connecting to database
|
||||
return array($db_host.':'.$db_port, $db_username, $db_password);
|
||||
}
|
||||
|
||||
function database() {
|
||||
global $db_name;
|
||||
// database name, will be escaped by Adminer
|
||||
return $db_name;
|
||||
}
|
||||
|
||||
function login($login, $password) {
|
||||
// validate user submitted credentials
|
||||
return ($login == 'admin' && $password == '');
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
return new AdminerSoftware;
|
||||
}
|
||||
|
||||
// include original Adminer or Adminer Editor
|
||||
include "adminer.php";
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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 <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
// 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'] );
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user