Example #1
0
<?php

require_once "../../../Web/PHP/Models/General.php";
require "../Views/Admin.php";
require_once "../../../Web/PHP/Models/PDO.php";
require_once "../../../Web/PHP/Models/DB.php";
require_once "../Models/LB_DB.php";
require_once '../../../Web/PHP/Models/General.php';
$Inputs = filter_input_array(INPUT_GET);
$Query = "UPDATE `lbxxdb50`.`mgmt__ticket` SET bIs_Accepted = 0 WHERE Id = " . $Inputs['Ticket__Id'] . ";";
$MySQL = ccPDO::___GET("lbxxdb50", false, $Inputs['DB_Host']);
$bSuccess = ccDB::RUN__Query__INSERT(array($Query), $MySQL);
if ($bSuccess === true) {
    $File__Names = ccLB_Proc::crGET___Ticket__Pictures($Inputs);
    if ($Inputs['DB_Host'] === "localhost") {
        $bSuccess = ccLB_Proc__Ticket::MOVE__Files($File__Names, "WIP", "Deleted");
    } else {
        $bSuccess = ccLB_Proc__Ticket::MOVE__Files__FTP($File__Names, "WIP", "Deleted");
    }
}
echo json_encode(array($bSuccess));
Example #2
0
<?php

require_once "../Models/General.php";
require "../Views/Logged.php";
require_once "../Models/PDO.php";
require_once "../Models/DB.php";
$Inputs = filter_input_array(INPUT_GET);
$MySQL = ccPDO::___GET("lbxxdb50", false);
$SP = $MySQL->prepare("CALL vwTicket(:inUser__Id, :inTicket__Id);");
$SP->bindValue(':inUser__Id', $_SESSION['Id'], PDO::PARAM_INT);
$SP->bindValue(':inTicket__Id', $Inputs[Id], PDO::PARAM_INT);
$ResultsSets = ccDB::GET__ResultsSets($SP, PDO::FETCH_ASSOC);
echo json_encode($ResultsSets);
Example #3
0
} elseif ($Inputs['bIs_Accepted'] === "1") {
    $mail->Subject = 'Sus tickets han sido procesados con exito';
    $HTML->loadHTMLFile("../../HTML/Admin_Mail/Approved.html");
}
$Inputs['Name'] = $Inputs['Name'] . " (" . $Inputs['Email'] . ")";
if ($Inputs['Name'] !== null) {
    $HTML->getElementById('Name')->textContent = " " . $Inputs['Name'];
}
$HTML->getElementById('Amount')->textContent = $Inputs['Amount'];
$HTML_TXT = $HTML->saveHTML();
//$a = dirname(__FILE__);
$mail->msgHTML($HTML_TXT, dirname(__FILE__));
$mail->AltBody = $HTML->getElementById('Message')->textContent;
$Response = new stdClass();
$bSuccess = $mail->send();
if ($bSuccess === false) {
    //    echo '<pre>'; print_r($mail); echo '</pre>';
    //    $Response->Msg = $mail->ErrorInfo;
    $Response->Msg = '<pre>';
    print_r($mail);
    echo '</pre>';
    $Response->Error_Mailer = true;
} else {
    $Query = "UPDATE mgmt__ticket" . " INNER JOIN mgmt__user ON mgmt__ticket.User__Id = mgmt__user.Id" . " SET bIs_Notified = 1" . " WHERE" . "     mgmt__user.Id = '" . $Inputs['Id'] . "'" . "     AND bIs_Accepted = " . $Inputs['bIs_Accepted'] . ";";
    $MySQL = ccPDO::___GET("lbxxdb50", false, $Inputs['DB_Host']);
    $Response->Msg = ccDB::RUN__Query__NoResponse($Query, $MySQL);
    $Response->Error_DB = true;
    //    echo '<pre>MANDE EN TEORIA</pre>';
}
//echo '<pre>'; print_r($mail); echo '</pre>';
echo json_encode($Response);
Example #4
0
 public function GET___FKs__Names()
 {
     $Query = "SELECT FK__Class.Name AS FK__Class__Name\r\r\n                    FROM       lbxxdb50.proc__fact \r\r\n                    INNER JOIN lbxxdb50.proc__class              ON proc__fact.Class__Id     = proc__class.Id\r\r\n                    INNER JOIN lbxxdb50.proc__class AS FK__Class ON proc__fact.FK__Class__Id = FK__Class.Id\r\r\n                    WHERE \r\r\n                            FK__Class__Id IS NOT NULL \r\r\n                        AND proc__class.Name = :inClass_Name;";
     global $PDO;
     $SP = $PDO->prepare($Query);
     $SP->bindValue(":inClass_Name", $this->Name, PDO::PARAM_STR);
     $ResultsSets = ccDB::GET__ResultsSets__Merged($SP, PDO::FETCH_COLUMN);
     return $ResultsSets;
 }