Ejemplo n.º 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 '../Z_Dev/Dev.php';
$Inputs = filter_input_array(INPUT_GET);
$PDO = ccPDO::___GET("lbxxdb50", false, $Inputs['DB_Host']);
$bSuccess = ccLB_Proc::CREATE_NEW__Ticket($Inputs);
$JSON = json_encode(array($bSuccess));
echo $JSON;
Ejemplo n.º 2
0
Archivo: TXT.php Proyecto: elemenofi/lb
 public function SEARCH_AT_DB__Value()
 {
     $TXT = ccTXT__Value::CLEAN_FOR__DB($this->Value);
     if (strlen($TXT) > 255) {
         $this->SET__State("Unsupported");
         return;
     }
     return ccLB_Proc::SEARCH__TXT(array("TXT__Value" => $TXT));
 }
Ejemplo n.º 3
0
<?php

require_once "../../../Web/PHP/Models/General.php";
require "../Views/Admin.php";
require_once "../../../Web/PHP/Models/PDO.php";
require_once "../Models/LB_DB.php";
$Inputs = filter_input_array(INPUT_GET);
$PDO = ccPDO::___GET("lbxxdb50", false, $Inputs['DB_Host']);
$Result = ccLB_Proc::vwAdmin_Main__WIP();
echo json_encode($Result);
Ejemplo n.º 4
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));
Ejemplo n.º 5
0
 public static function CREATE_NEW__Ticket($Inputs)
 {
     $Queries = array();
     $Queries['Ticket'] = ccTicket::GET__Query__Finalize($Inputs);
     if (array_key_exists('Ticket_Discount', $Inputs) === true) {
         $Queries['Ticket_Discount'] = ccLB_Proc::GET__Query__Finalize($Inputs, "Ticket_Discount");
     }
     if (array_key_exists('Ticket_Loyalty', $Inputs) === true) {
         $Queries['Ticket_Loyalty'] = ccLB_Proc::GET__Query__Finalize($Inputs, "Ticket_Loyalty");
     }
     $Queries['Ticket_Product'] = ccLB_Proc::GET__Query__Finalize($Inputs, "Ticket_Product");
     if (array_key_exists('Ticket_Product_Discount', $Inputs) === true) {
         $Queries['Ticket_Product_Discount'] = ccLB_Proc::GET__Query__Finalize($Inputs, "Ticket_Product_Discount");
     }
     $Queries['Ticket_Info'] = ccTicket_Info::GET__Query__Finalize($Inputs);
     global $PDO;
     $Query = null;
     try {
         $PDO->setAttribute(PDO::ATTR_AUTOCOMMIT, 0);
         $PDO->beginTransaction();
         foreach ($Queries as $Query) {
             $PDO->exec($Query);
         }
         $File__Names = array($Inputs['Ticket_Info']['File_Pic']);
         //        ccTicket_Info::MOVE__Ticket_Files($Inputs['Ticket_Info'][File_Name], "WIP", "Ready");
         if ($Inputs['DB_Host'] === "localhost") {
             $bSuccess = ccLB_Proc__Ticket::MOVE__Files($File__Names, "WIP", "Ready");
         } else {
             $bSuccess = ccLB_Proc__Ticket::MOVE__Files__FTP($File__Names, "WIP", "Ready");
         }
         if ($bSuccess === false) {
             $PDO->rollBack();
             throw new Exception();
         }
         //            $bSuccess = ccDB::RUN__Query__INSERT($Queries, $PDO);
         $PDO->commit();
     } catch (Exception $e) {
         $PDO->rollBack();
         echo "ERROR: An error occured while executing, please review.\r\n";
         echo $Query . "\r\n";
         ccGeneral::EXCEPTION___Process($e, debug_backtrace());
     }
     return $bSuccess;
 }