Initial Version
This commit is contained in:
7
include/all.php
Normal file
7
include/all.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
include $_SERVER['DOCUMENT_ROOT']."/include/constants.inc.php";
|
||||
include $_SERVER['DOCUMENT_ROOT']."/include/db_connect.inc.php";
|
||||
include $_SERVER['DOCUMENT_ROOT']."/include/function.inc.php";
|
||||
include $_SERVER['DOCUMENT_ROOT']."/include/modal_wait.html";
|
||||
?>
|
||||
|
||||
15
include/constants.inc copy.php
Normal file
15
include/constants.inc copy.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
//CONSTANT
|
||||
$BaseUrl = "http://".$_SERVER['SERVER_NAME'];
|
||||
$root = $_SERVER['DOCUMENT_ROOT'];
|
||||
$bdnuss = "http://web-bdnuss-sys-dev.appliarmony.net";
|
||||
$wsUrl = "http://wsinfra.appliarmony.net";
|
||||
|
||||
//Servers
|
||||
$dcArmony = "dun-dom-s1dcb";
|
||||
$dcADArmony = "dun-dcp-r02";
|
||||
$uxDNS = "dun-com-uxdns01";
|
||||
$sSCOM = "dun-prd-x1scom";
|
||||
$sVMM = "dun-sup-s1vmmsv";
|
||||
|
||||
?>
|
||||
8
include/constants.inc.php
Normal file
8
include/constants.inc.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
//CONSTANT
|
||||
$BaseUrl = "http://".$_SERVER['SERVER_NAME'];
|
||||
$root = $_SERVER['DOCUMENT_ROOT'];
|
||||
$bdnuss = "http://web-bdnuss-sys-dev.appliarmony.net";
|
||||
|
||||
|
||||
?>
|
||||
168
include/db_connect.inc.php
Normal file
168
include/db_connect.inc.php
Normal file
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
//Web-Self-Infra sur DUN-PRD-R1SCOM\OPS
|
||||
function Invoke_WebSelfInfra($request)
|
||||
{
|
||||
$user = "Scom-Write";
|
||||
$pwd = "Grant@ccess";
|
||||
$server = "DUN-PRD-R1SCOM.armony.net\OPS";
|
||||
$database = "web-self-infra";
|
||||
$conn = odbc_connect("Driver={SQL Server};Server=$server;Database=$database;", $user, $pwd);
|
||||
if (!($conn)) {
|
||||
echo "Pas de connexion";
|
||||
}
|
||||
$rs = odbc_exec($conn, $request);
|
||||
if (instr(strtoupper($request), "SELECT")) {
|
||||
while ($row = odbc_fetch_array($rs)) {
|
||||
$answer[] = $row;
|
||||
}
|
||||
}
|
||||
if (isset($answer)) {
|
||||
return $answer;
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke_SCOMInfra($request)
|
||||
{
|
||||
$user = "Scom-Write";
|
||||
$pwd = "Grant@ccess";
|
||||
$server = "DUN-PRD-R1SCOM.armony.net\OPS";
|
||||
$database = "infra";
|
||||
$conn = odbc_connect("Driver={SQL Server};Server=$server;Database=$database;", $user, $pwd);
|
||||
if (!($conn)) {
|
||||
echo "Pas de connexion";
|
||||
}
|
||||
$rs = odbc_exec($conn, $request);
|
||||
if (instr(strtoupper($request), "SELECT")) {
|
||||
while ($row = odbc_fetch_array($rs)) {
|
||||
$answer[] = $row;
|
||||
}
|
||||
}
|
||||
if (isset($answer)) {
|
||||
return $answer;
|
||||
}
|
||||
}
|
||||
|
||||
//MySQL sur DUN-SUP-ENTRY01
|
||||
function Invoke_Entry01($request)
|
||||
{
|
||||
$user = "infra";
|
||||
$pwd = "infra";
|
||||
$server = "dun-sup-entry01:3306";
|
||||
$database = "infra";
|
||||
$conn = new mysqli($server, $user, $pwd, $database);
|
||||
if (!($conn)) {
|
||||
echo "Pas de connexion";
|
||||
}
|
||||
$rs = $conn->query($request);
|
||||
while ($row = mysqli_fetch_array($rs)) {
|
||||
$answer[] = $row;
|
||||
}
|
||||
if (isset($answer)) {
|
||||
return $answer;
|
||||
}
|
||||
}
|
||||
|
||||
// MySQL web-infra-tools sur DUN-SUP-S2ENTRY
|
||||
function Invoke_WebInfraTools($request)
|
||||
{
|
||||
$user = "admin";
|
||||
$pwd = "Arth3m1s&*0";
|
||||
$server = "dun-sup-s2entry.armony.net:3306";
|
||||
$database = "webinfratools";
|
||||
$conn = new mysqli($server, $user, $pwd, $database);
|
||||
if (!($conn)) {
|
||||
echo "Pas de connexion";
|
||||
}
|
||||
$rs = $conn->query($request);
|
||||
while ($row = mysqli_fetch_array($rs)) {
|
||||
$answer[] = $row;
|
||||
}
|
||||
if (isset($answer)) {
|
||||
return $answer;
|
||||
}
|
||||
}
|
||||
|
||||
//INFRA sur DUN-PRD-R1MSSQL\PRD
|
||||
function Invoke_Infra($request)
|
||||
{
|
||||
error_reporting(E_ALL ^ E_WARNING);
|
||||
$user = "INFRA_dbo";
|
||||
$pwd = "Q3pUz2x9YL2r6k";
|
||||
$server = "DUN-PRD-R1MSSQL.armony.net\PRD";
|
||||
$database = "INFRA";
|
||||
$conn = odbc_connect("Driver={SQL Server};Server=$server;Database=$database;", $user, $pwd);
|
||||
if (!($conn)) {
|
||||
echo "Pas de connexion";
|
||||
}
|
||||
$rs = odbc_exec($conn, $request);
|
||||
if (instr(strtoupper($request), "SELECT")) {
|
||||
while ($row = odbc_fetch_array($rs)) {
|
||||
$answer[] = $row;
|
||||
}
|
||||
}
|
||||
if (isset($answer)) {
|
||||
return $answer;
|
||||
} else {
|
||||
if ($rs) {
|
||||
return "OK";
|
||||
} else {
|
||||
error_reporting(E_ALL);
|
||||
return "ERROR : " . odbc_errormsg($conn);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// aixcmdb
|
||||
function Invoke_aixcmdb($request)
|
||||
{
|
||||
error_reporting(E_ALL ^ E_WARNING);
|
||||
$conn_string = "DRIVER={IBM DB2 ODBC DRIVER};" .
|
||||
"DATABASE=AIXCMDB; " .
|
||||
"HOSTNAME=db2_aixcmdb.appliarmony.net;" .
|
||||
"PORT=50000; " .
|
||||
"PROTOCOL=TCPIP; " .
|
||||
"UID=aixcmdb;" .
|
||||
"AUTHENTICATION=SERVER;" .
|
||||
"PWD=aixcmdb;";
|
||||
$conn = odbc_connect($conn_string, "", "");
|
||||
if (!($conn)) {
|
||||
echo "Pas de connexion";
|
||||
}
|
||||
$rs = odbc_exec($conn, $request);
|
||||
if (instr(strtoupper($request), "SELECT")) {
|
||||
while ($row = odbc_fetch_array($rs)) {
|
||||
$answer[] = $row;
|
||||
}
|
||||
}
|
||||
if (isset($answer)) {
|
||||
return $answer;
|
||||
} else {
|
||||
if ($rs) {
|
||||
return "OK";
|
||||
} else {
|
||||
error_reporting(E_ALL);
|
||||
return "ERROR : " . odbc_errormsg($conn);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function Invoke_GLPI($request)
|
||||
{
|
||||
$user="glpi_lect_seule";
|
||||
$pwd="glpi_lect_seule";
|
||||
$server="srvv-n4glpi-aim.process.dkm";
|
||||
$database="glpi";
|
||||
$conn = new mysqli($server, $user, $pwd, $database);
|
||||
if (!($conn)) {
|
||||
echo "Pas de connexion";
|
||||
}
|
||||
$rs = $conn->query($request);
|
||||
while ($row = mysqli_fetch_array($rs)) {
|
||||
$answer[] = $row;
|
||||
}
|
||||
if (isset($answer)) {
|
||||
return $answer;
|
||||
}
|
||||
}
|
||||
62
include/db_connect.php
Normal file
62
include/db_connect.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
function DB_SCCM(){
|
||||
$user = "infra";
|
||||
$pwd = "infra";
|
||||
global $conn ;
|
||||
$conn = odbc_connect("Driver={SQL Server};Server=DUN-SMS-SRV01;Database=CM_SV1;", $user, $pwd);
|
||||
if(!($conn)){echo "Pas de connexion";}
|
||||
}
|
||||
|
||||
function DB_GLPI() {
|
||||
$username="glpi_lect_seule";
|
||||
$password="glpi_lect_seule";
|
||||
$dbserver="srvv-n4glpi-aim.process.dkm";
|
||||
$database="glpi";
|
||||
global $conn ;
|
||||
$conn = new mysqli($dbserver,$username,$password,$database);
|
||||
if (!$conn) {
|
||||
echo "No connection to the database: " ;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
function DB_ENTRY01() {
|
||||
$username="infra";
|
||||
$password="infra";
|
||||
$dbserver="dun-sup-entry01.armony.net";
|
||||
$database="infra";
|
||||
global $conn ;
|
||||
$conn = new mysqli($dbserver,$username,$password,$database);
|
||||
if (!$conn) {
|
||||
echo "No connection to the database: " ;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
function DB_ENTRY02() {
|
||||
$username="admin";
|
||||
$password="Arth3m1s&*0";
|
||||
$dbserver="dun-sup-s2entry.armony.net";
|
||||
$database="web-infra-reports";
|
||||
global $conn ;
|
||||
$conn = new mysqli($dbserver,$username,$password,$database);
|
||||
if (!$conn) {
|
||||
echo "No connection to the database: " ;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
function DB_EPO(){
|
||||
$user = "epo_db_read_bdnorth_admin";
|
||||
$pwd = 'Qs$PeBtg5nPJ7J';
|
||||
global $conn ;
|
||||
$conn = odbc_connect("Driver={SQL Server};Server=CORP1PWSR001EDB.agd.agn;Database=epo_ARMEOSDDC001;", $user, $pwd);
|
||||
if(!($conn)){echo "Pas de connexion";}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
BIN
include/favicon-32x32.png
Normal file
BIN
include/favicon-32x32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 851 B |
37
include/function.inc copy.php
Normal file
37
include/function.inc copy.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
function instr($string, $search){
|
||||
if (strpos($string, $search) !== false) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function PostJson($url, $content){
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
$retour = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
return $retour;
|
||||
}
|
||||
|
||||
function Read_HTML($url){
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
$retour = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
return $retour;
|
||||
}
|
||||
if($_SERVER['REMOTE_USER'] != ""){$source = explode("\\",$_SERVER['REMOTE_USER'])[1];}
|
||||
|
||||
?>
|
||||
25
include/function.inc.php
Normal file
25
include/function.inc.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
function instr($string, $search){
|
||||
if (strpos($string, $search) !== false) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function PostJson($url, $content){
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
$retour = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
return $retour;
|
||||
}
|
||||
|
||||
?>
|
||||
17
include/modal_wait.html
Normal file
17
include/modal_wait.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!-- MODAL WAIT -->
|
||||
<div class="modal fade bs-example-modal-sm" id="wait" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="padding-top: 15%;">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title mb-1 text-dark text-uppercase">
|
||||
<center><i class="bi bi-hourglass-split"></i><br> Work in progress ...</center>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-secondary progress-bar-striped progress-bar-animated" style="width: 100%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
15
include/preloader.inc copy.html
Normal file
15
include/preloader.inc copy.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="preloader">
|
||||
<br>
|
||||
<h1><span style="color: white"><b>Loading Data</b></h1>
|
||||
<h3><span style="color: white"><b>Please wait ...</b></h3>
|
||||
<div class="loader">
|
||||
<div class="loader-outter"></div>
|
||||
<div class="loader-inner"></div>
|
||||
<div class="indicator">
|
||||
<svg width="16px" height="12px">
|
||||
<polyline id="back" points="1 6 4 6 6 11 10 1 12 6 15 6"></polyline>
|
||||
<polyline id="front" points="1 6 4 6 6 11 10 1 12 6 15 6"></polyline>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
15
include/preloader.inc.html
Normal file
15
include/preloader.inc.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="preloader">
|
||||
<br>
|
||||
<h1><span style="color: white"><b>Loading Data</b></h1>
|
||||
<h3><span style="color: white"><b>Please wait ...</b></h3>
|
||||
<div class="loader">
|
||||
<div class="loader-outter"></div>
|
||||
<div class="loader-inner"></div>
|
||||
<div class="indicator">
|
||||
<svg width="16px" height="12px">
|
||||
<polyline id="back" points="1 6 4 6 6 11 10 1 12 6 15 6"></polyline>
|
||||
<polyline id="front" points="1 6 4 6 6 11 10 1 12 6 15 6"></polyline>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user