当前位置: 首页>>代码示例>>PHP>>正文


PHP mbTrace函数代码示例

本文整理汇总了PHP中mbTrace函数的典型用法代码示例。如果您正苦于以下问题:PHP mbTrace函数的具体用法?PHP mbTrace怎么用?PHP mbTrace使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了mbTrace函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: connect

 /**
  * Connect to a AS400 DB2 SQL server via ODBC driver
  * 
  * @throws Error on misconfigured or anavailable server
  * 
  * @return void
  */
 static function connect()
 {
     if (self::$dbh) {
         return;
     }
     $config = CAppUI::conf("sante400");
     if (null == ($dsn = $config["dsn"])) {
         trigger_error("Data Source Name not defined, please configure module", E_USER_ERROR);
         CApp::rip();
     }
     // Fake data source for chrono purposes
     CSQLDataSource::$dataSources[$dsn] = new CMySQLDataSource();
     $ds =& CSQLDataSource::$dataSources[$dsn];
     $ds->dsn = $dsn;
     self::$chrono =& CSQLDataSource::$dataSources[$dsn]->chrono;
     self::$chrono->start();
     $prefix = $config["prefix"];
     try {
         self::$dbh = new PDO("{$prefix}:{$dsn}", $config["user"], $config["pass"]);
         self::$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
     } catch (PDOException $e) {
         mbTrace("cauguht failure on first datasource");
         if (null == ($dsn = $config["other_dsn"])) {
             throw $e;
         }
         self::$dbh = new PDO("{$prefix}:{$dsn}", $config["user"], $config["pass"]);
         self::$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
     }
     self::$chrono->stop("connection");
     self::traceChrono("connection");
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:38,代码来源:CRecordSante400.class.php

示例2: build

 /**
  * Build LCH segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $entity = $this->entity;
     $code = $this->code;
     $primary_key = array_search(get_class($entity), CHL7v2EventMFN::$entities);
     $primary_key = $primary_key . $entity->_id;
     mbTrace($entity);
     // LCH-1: Primary Key Value -LCH - LCH (PL) (Requis)
     $data[] = $primary_key;
     // LCH-2: Segment Action Code - LCH (ID) (Optional)
     $data[] = null;
     // LCH-3: Segment Unique Key - LCH (EI) (Optional)
     $data[] = null;
     // LCH-4: Location Characteristic ID - LCH (CWE) (Requis)
     $HL7_value = CHL7v2TableEntry::mapTo("7878", $code);
     $data[] = array(array($HL7_value, CHL7v2TableEntry::getDescription("7878", $HL7_value), "L"));
     // if si dans la chaine tu as RSPNSBL
     // alors :
     // $user = $entity->loadRefUser();
     // $user->$code
     // else
     // $entity->$code
     // LCH-5: Location Characteristic Value - LCH (CWE) (Requis)
     $data[] = null;
     $this->fill($data);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:34,代码来源:CHL7v2SegmentLCH.class.php

示例3: testQ22

 /**
  * Test Q22 - Find Candidates
  *
  * @param CCnStep $step Step
  *
  * @throws CMbException
  *
  * @return void
  */
 static function testQ22(CCnStep $step)
 {
     $profil = "PDQ";
     $transaction = "ITI21";
     $message = "QBP";
     $code = "Q22";
     mbTrace($step);
     // PDQ_Multiple_Query
     switch ($step->number) {
         case '20':
             // PID.5.1.1 = MOO*
             break;
         default:
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:24,代码来源:CITI21Test.class.php

示例4: send

 /**
  * @see parent::send()
  */
 function send(CCompteRendu $docItem)
 {
     $object = $docItem->loadTargetObject();
     if ($object instanceof CConsultAnesth) {
         $object = $object->loadRefConsultation();
     }
     if ($object instanceof CPatient) {
         CAppUI::stepAjax("Impossible d'ajouter un document lié directement à un patient", UI_MSG_ERROR);
     }
     $receiver_hl7v3 = new CReceiverHL7v3();
     $receiver_hl7v3->actif = 1;
     $receiver_hl7v3->group_id = CGroups::loadCurrent()->_id;
     /** @var CReceiverHL7v3[] $receivers */
     $receivers = $receiver_hl7v3->loadMatchingList();
     foreach ($receivers as $_receiver) {
         $request = $_receiver->sendEventProvideAndRegisterDocumentSetRequest($docItem);
         mbTrace($request);
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:CDocumentSourceSender.class.php

示例5: log

 /**
  * Log shortcut to mbTrace
  *
  * @param string $label Add an optional label
  * @param bool   $log   Log to file or echo data
  *
  * @return int The size of the data written in the log file
  **/
 function log($label = null, $log = true)
 {
     return mbTrace($this->getPlainFields(), $label, $log);
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:12,代码来源:CModelObject.class.php

示例6: catch

                case "MLLP":
                    $server_class = "CMLLPServer";
                    break;
                default:
                    return;
            }
            $response = CSocketBasedServer::send("localhost", $port, $server_class::sampleMessage());
            echo "<pre class='er7'>{$response}</pre>";
            return;
        } catch (Exception $e) {
            CAppUI::displayAjaxMsg($e->getMessage(), UI_MSG_ERROR);
        }
        break;
    case "stats":
        try {
            mbTrace(json_decode(CSocketBasedServer::send("localhost", $port, "__" . strtoupper($action) . "__\n"), true));
        } catch (Exception $e) {
            CAppUI::stepAjax($e->getMessage(), UI_MSG_ERROR);
        }
        return;
    default:
        CAppUI::displayAjaxMsg("Unknown command '{$action}'", UI_MSG_ERROR);
}
$processes = CSocketBasedServer::getPsStatus();
$process_id = CValue::get("process_id");
if (!array_key_exists($process_id, $processes)) {
    return;
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("process_id", $process_id);
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:ajax_socket_server_action.php

示例7: CSejour

 * @version $Revision:$
 * @author SARL OpenXtrem
 * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 */
CCanDo::checkAdmin();
$action = CValue::post("action", "modify");
$sejour = new CSejour();
switch ($action) {
    case "modify":
        while (!$sejour->load(rand(1, 5000))) {
        }
        // randomize libelle
        $sejour->libelle = $sejour->libelle ? $sejour->libelle : "un libelle pour le mettre dans l'ordre";
        $libelle = str_split($sejour->libelle);
        shuffle($libelle);
        $sejour->libelle = implode("", $libelle);
        break;
    case "create":
        //$sejour->sample();
        $sejour->group_id = 1;
        $sejour->praticien_id = 73;
        $sejour->patient_id = rand(1, 5000);
        $sejour->entree_prevue = CMbDT::dateTime();
        $sejour->sortie_prevue = CMbDT::dateTime("+1 day");
        //$patient->updateFormFields();
        break;
}
CAppUI::displayMsg($sejour->store(), "CSejour-msg-{$action}");
mbTrace($sejour);
echo CAppUI::getMsg();
CApp::rip();
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:do_trigger_sejour_modification.php

示例8: CSmartyDP

    if ($sejour_intervention && !$intervention_ok) {
        $msg_error = "<strong>Impossible de sauvegarder l'intervention :</strong> " . $msg_error;
        // Création du template
        $smarty = new CSmartyDP();
        $smarty->assign("praticien_id", $praticien_id);
        $smarty->assign("patient", $patient);
        $smarty->assign("sejour", $sejour);
        $smarty->assign("intervention", $intervention);
        $smarty->assign("sejour_intervention", $sejour_intervention);
        $smarty->assign("msg_error", $msg_error);
        $smarty->display("dhe_externe.tpl");
        return;
    }
}
if ($patient_ok && !$sejour->libelle) {
    CAppUI::redirect("m=dPplanningOp&a=vw_edit_planning&chir_id={$praticien_id}&operation_id=0&pat_id=" . $patient->_id);
} elseif ($patient_ok && $sejour_ok && !$sejour_intervention) {
    CAppUI::redirect("m=dPplanningOp&tab=vw_edit_sejour&sejour_id=" . $sejour->_id);
} elseif ($patient_ok && $sejour_ok && $intervention_ok && $intervention->plageop_id) {
    CAppUI::redirect("m=dPplanningOp&tab=vw_edit_planning&operation_id=" . $intervention->_id);
} elseif ($patient_ok && $sejour_ok && $intervention_ok && !$intervention->plageop_id) {
    CAppUI::redirect("m=dPplanningOp&tab=vw_edit_urgence&operation_id=" . $intervention->_id);
} else {
    mbTrace("erreur indéfinie");
    $msg_error = "Erreur indéfinie";
    // Création du template
    $smarty = new CSmartyDP();
    $smarty->assign("praticien_id", $praticien_id);
    $smarty->assign("msg_error", $msg_error);
    $smarty->display("dhe_externe.tpl");
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:dhe_externe.php

示例9: trace

 /**
  * Trace value with given title
  * 
  * @param mixed  $value Value to trace
  * @param string $title Optional title
  *
  * @return void
  */
 function trace($value, $title = null)
 {
     if (self::$verbose) {
         mbTrace($value, $title);
     }
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:14,代码来源:CMouvement400.class.php

示例10: editJournal

 /**
  * Edition des journaux selon le type
  *
  * @param bool $read           lecture
  * @param bool $create_journal Création du journal
  *
  * @return void
  */
 function editJournal($read = true, $create_journal = true)
 {
     if ($create_journal) {
         $journal = new CJournalBill();
         $journal->type = $this->type_pdf;
         $journal->nom = "Journal_" . $this->type_pdf . "_" . CMbDT::date();
         $journal->_factures = $this->factures;
         if ($msg = $journal->store()) {
             mbTrace($msg);
         } else {
             $this->journal_id = $journal->_id;
         }
     }
     // Creation du PDF
     $this->pdf = new CMbPdf('l', 'mm');
     $this->pdf->setPrintHeader(false);
     $this->pdf->setPrintFooter(false);
     $this->font = "vera";
     $this->fontb = $this->font . "b";
     $this->pdf->setFont($this->font, '', 8);
     $this->page = 0;
     $this->editEntete();
     switch ($this->type_pdf) {
         case "paiement":
             $this->editPaiements();
             break;
         case "debiteur":
             $this->editDebiteur();
             break;
         case "rappel":
             $this->editRappel();
             break;
         case "checklist":
             $this->editCheckList();
             break;
     }
     if ($create_journal) {
         $file = new CFile();
         $file->file_name = $journal->nom . ".pdf";
         $file->file_type = "application/pdf";
         $file->author_id = CMediusers::get()->_id;
         $file->file_category_id = 1;
         $file->setObject($journal);
         $file->fillFields();
         $file->putContent($this->pdf->Output('Factures.pdf', "S"));
         if ($msg = $file->store()) {
             echo $msg;
         }
         if ($this->type_pdf == "checklist") {
             $user = CMediusers::get();
             $printer = new CPrinter();
             $printer->function_id = $user->function_id;
             $printer->label = "justif";
             $printer->loadMatchingObject();
             if (!$printer->_id) {
                 CAppUI::setMsg("Les imprimantes ne sont pas paramétrées", UI_MSG_ERROR);
                 echo CAppUI::getMsg();
                 return false;
             }
             $file = new CFile();
             $pdf = $this->pdf->Output('Factures.pdf', "S");
             $file_path = tempnam("tmp", "facture");
             $file->_file_path = $file_path;
             file_put_contents($file_path, $pdf);
             $printer->loadRefSource()->sendDocument($file);
             unlink($file_path);
         }
     }
     if ($read) {
         //Affichage du fichier pdf
         $this->pdf->Output('Factures.pdf', "I");
     }
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:81,代码来源:CEditJournal.class.php

示例11: CSejour

// Filtre sur les fonctions
if ($filterFunction) {
    $leftjoin["users_mediboard"] = "sejour.praticien_id = users_mediboard.user_id";
    $where["users_mediboard.function_id"] = " = '{$filterFunction}'";
}
$sejour = new CSejour();
$alerte = $sejour->countList($where, null, $leftjoin);
CApp::$chrono->stop("Patient à placer dans la semaine");
CApp::$chrono->start();
$affectation = new CAffectation();
$affectation->entree = CMbDT::addDateTime("08:00:00", $date);
$affectation->sortie = CMbDT::addDateTime("23:00:00", $date);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("services_ids", $services_ids);
$smarty->assign("affectation", $affectation);
$smarty->assign("date", $date);
$smarty->assign("demain", CMbDT::date("+ 1 day", $date));
$smarty->assign("heureLimit", $heureLimit);
$smarty->assign("mode", $mode);
$smarty->assign("emptySejour", $emptySejour);
$smarty->assign("filterFunction", $filterFunction);
$smarty->assign("totalLits", $totalLits);
$smarty->assign("services", $services);
$smarty->assign("alerte", $alerte);
$smarty->assign("prestations", CPrestation::loadCurrentList());
$smarty->assign("prestation_id", $prestation_id);
$smarty->display("inc_tableau_affectations_lits.tpl");
if (CAppUI::pref("INFOSYSTEM")) {
    mbTrace(CMbArray::pluck(CApp::$chrono->report, "total"), "Rapport uniquement visible avec les informations système");
}
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:31,代码来源:ajax_tableau_affectations_lits.php

示例12: store

 /**
  * @see parent::store()
  */
 function store()
 {
     $this->updatePlainFields();
     $this->completeField("chir_id", "spec_id");
     $old = new CPlageOp();
     if ($this->_id) {
         $old->load($this->_id);
         $old->loadRefsOperations();
     }
     // Pas de changement de date si on a déjà des interventions
     if ($this->fieldModified("date") && count($old->_ref_operations)) {
         return CAppUI::tr("CPlageOp-failed-change_date", count($old->_ref_operations));
     }
     // Erreur si on est en multi-praticiens, qu'il y a des interventions et qu'on veut mettre un praticien
     if ($this->fieldValued("chir_id") && !$this->unique_chir && $old->spec_id && count($old->_ref_operations)) {
         mbTrace("all the same to me");
     }
     if (null !== $this->chir_id && $this->_id && !$this->unique_chir) {
         if (count($old->_ref_operations) && $old->spec_id && $this->chir_id) {
             return CAppUI::tr("CPlageOp-failed-multi_chir", count($old->_ref_operations));
         }
     }
     // Si on change de praticien alors qu'il y a déjà des interventions
     if ($this->fieldAltered("chir_id") && count($old->_ref_operations)) {
         // Si certaines ne sont pas annulées, on sort
         if ($this->countOperationsAnnulees() != count($old->_ref_operations)) {
             return CAppUI::tr("CPlageOp-failed-change_chir", count($old->_ref_operations));
         }
         // Si toutes les interventions sont annulées, on les met hors plage
         $this->completeField("salle_id", "date");
         foreach ($old->_ref_operations as $_op) {
             $_op->plageop_id = "";
             $_op->date = $this->date;
             $_op->salle_id = $this->salle_id;
             $_op->store();
         }
     }
     // Erreur si on créé-modifie une plage sur une salle bloquée
     $salle = $this->loadRefSalle();
     if (count($salle->loadRefsBlocages($this->date))) {
         return CAppUI::tr("CPlageOp-failed-use_locked_room", $salle->_view);
     }
     // Modification du salle_id de la plage -> repercussion sur les interventions
     if ($this->fieldModified("salle_id")) {
         foreach ($old->_ref_operations as $_operation) {
             if ($_operation->salle_id == $old->salle_id) {
                 $_operation->salle_id = $this->salle_id;
                 $_operation->store(false);
             }
         }
     }
     // Modification du début de la plage ou des minutes entre les interventions
     $this->completeField("debut", "temps_inter_op");
     if ($this->fieldModified("debut") || $this->fieldModified("temps_inter_op")) {
         if ($this->fieldModified("temps_inter_op")) {
             $with_cancelled = CAppUI::conf("dPplanningOp COperation save_rank_annulee_validee");
             $this->loadRefsOperations($with_cancelled, "rank, rank_voulu, horaire_voulu", true);
         }
         $this->reorderOp();
     }
     if (!$this->_id || !$this->original_owner_id && !$this->original_function_id) {
         $this->original_owner_id = $this->chir_id;
         $this->original_function_id = $this->spec_id;
     }
     return parent::store();
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:69,代码来源:CPlageOp.class.php

示例13: mbTrace

<?php

/**
 * $Id: do_fichePaie_save.php 19621 2013-06-20 20:40:45Z phenxdesign $
 *
 * @package    Mediboard
 * @subpackage GestionCab
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 19621 $
 */
mbTrace("Start");
$do = new CDoObjectAddEdit("CFichePaie");
$do->redirect = null;
$do->doIt();
mbTrace("End");
$fichePaie = new CFichePaie();
$fichePaie->load($do->_obj->_id);
$fichePaie->loadRefsFwd();
$fichePaie->_ref_params_paie->loadRefsFwd();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("fichePaie", $fichePaie);
$fichePaie->final_file = $smarty->fetch("print_fiche.tpl");
mbTrace($fichePaie->store());
CApp::rip();
开发者ID:fbone,项目名称:mediboard4,代码行数:26,代码来源:do_fichePaie_save.php

示例14: array

$where = array();
CApp::setTimeLimit(300);
$loops = CValue::get("loops", 100);
$trunk = CValue::get("trunk", 100);
mbTrace($loops, "loops");
mbTrace($trunk, "trunk");
$problems = array();
for ($loop = 0; $loop < $loops; $loop++) {
    $starting = $loop * $trunk;
    $ds = $doc->_spec->ds;
    $query = "SELECT `compte_rendu`.`compte_rendu_id`, `contenthtml`.`content` \r\n    FROM compte_rendu, contenthtml\r\n    WHERE compte_rendu.content_id = contenthtml.content_id\r\n    ORDER BY compte_rendu_id DESC\r\n    LIMIT {$starting}, {$trunk}";
    $docs = $ds->loadHashList($query);
    foreach ($docs as $doc_id => $doc_source) {
        // Root node surrounding
        $source = utf8_encode("<div>{$doc_source}</div>");
        // Entity purge
        $source = preg_replace("/&\\w+;/i", "", $source);
        // Escape warnings, returns false if really invalid
        $doc = new CMbXMLDocument();
        if (false == ($validation = $doc->loadXML($source))) {
            $doc = new CCompteRendu();
            $doc->load($doc_id);
            $problems[$doc_id] = $doc;
        }
    }
}
mbTrace(count($problems), "Problems count");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("problems", $problems);
$smarty->display("check_document.tpl");
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:check_document.php

示例15: fetchAssoc

 function fetchAssoc($result, $read_lob = true)
 {
     if (CSQLDataSource::$trace) {
         $t = microtime(true);
     }
     $assoc = oci_fetch_assoc($result);
     if (CSQLDataSource::$trace) {
         $new_t = microtime(true);
         mbTrace(@$this->_queries[$result], "FETCH ASSOC in " . ($new_t - $t) * 1000 . " ms");
         $t = $new_t;
     }
     if ($read_lob) {
         $assoc = $this->readLOB($assoc);
         if (CSQLDataSource::$trace) {
             $new_t = microtime(true);
             mbTrace(@$this->_queries[$result], "READ LOB in " . ($new_t - $t) * 1000 . " ms");
             $t = $new_t;
         }
     }
     return $assoc;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:21,代码来源:COracleDataSource.class.php


注:本文中的mbTrace函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。