本文整理匯總了PHP中CAppUI::requireLibraryFile方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::requireLibraryFile方法的具體用法?PHP CAppUI::requireLibraryFile怎麽用?PHP CAppUI::requireLibraryFile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CAppUI
的用法示例。
在下文中一共展示了CAppUI::requireLibraryFile方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: prepare
/**
* Préparation de dompdf pour la conversion
*
* @param string $format format de la page
* @param string $orientation orientation de la page
*
* @return void
*/
function prepare($format, $orientation)
{
CAppUI::requireModuleFile("dPcompteRendu", "dompdf_config");
CAppUI::requireLibraryFile("dompdf/dompdf_config.inc");
$this->dompdf = new dompdf();
$this->dompdf->set_base_path(realpath(dirname(__FILE__) . "/../../../../"));
$this->dompdf->set_paper($format, $orientation);
if (CAppUI::conf("dPcompteRendu CCompteRendu dompdf_host")) {
$this->dompdf->set_protocol(isset($_SERVER["HTTPS"]) ? "https://" : "http://");
$this->dompdf->set_host($_SERVER["SERVER_NAME"]);
}
}
示例2: getPassword
function getPassword($pwd = null, $iv_field = "iv")
{
if (is_null($pwd)) {
$pwd = $this->password;
if (!$this->password) {
return "";
}
}
try {
$master_key_filepath = CAppUI::conf("master_key_filepath");
$master_key_filepath = rtrim($master_key_filepath, "/");
if (CExchangeSource::checkMasterKeyFile($master_key_filepath)) {
CAppUI::requireLibraryFile("phpseclib/phpseclib/Crypt/AES");
CAppUI::requireLibraryFile("phpseclib/phpseclib/Crypt/Random");
$cipher = new Crypt_AES(CRYPT_AES_MODE_CTR);
$cipher->setKeyLength(256);
$keyAB = file($master_key_filepath . "/.mediboard.key");
if (count($keyAB) == 2) {
$cipher->setKey($keyAB[0] . $keyAB[1]);
$ivToUse = $this->{$iv_field};
if (!$ivToUse) {
$clear = $pwd;
$this->store();
return $clear;
}
$cipher->setIV($ivToUse);
$decrypted = rtrim(base64_decode($pwd), "");
$decrypted = $cipher->decrypt($decrypted);
if ($decrypted) {
return $decrypted;
}
}
}
} catch (Exception $e) {
return $pwd;
}
return $pwd;
}
示例3: array
<?php
/**
* $Id$
*
* @category
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
* @link http://www.mediboard.org
*/
CAppUI::requireLibraryFile("PDFMerger/PDFMerger");
/**
* Classe de gestion de fusion de pdf héritant de PDFMerger
*/
class CMbPDFMerger extends PDFMerger
{
static $temp_files = array();
function addPDF($file_path)
{
// Suppression de l'autoprint et travail sur copie temporaire (afin de ne pas altérer le document original)
@mkdir("./tmp/pdfmerge");
$temp_file = tempnam("./tmp/pdfmerge", "pdfmerge");
$temp_files[] = $temp_file;
$content = file_get_contents($file_path);
$content = CWkHtmlToPDFConverter::removeAutoPrint($content);
file_put_contents($temp_file, $content);
self::$temp_files[] = $temp_file;
parent::addPDF($temp_file);
}
示例4:
<?php
/* $Id$ */
/**
* @package Mediboard
* @subpackage webservices
* @version $Revision$
* @author SARL OpenXtrem
*/
CAppUI::requireLibraryFile("NuSOAP/nusoap", false);
if (!class_exists("nusoap_client", false)) {
return;
}
/**
* The CNuSOAPClient class
*/
class CNuSOAPClient extends nusoap_client
{
public $wsdl_url;
public $type_echange_soap;
public $soap_client_error = false;
public $flatten;
public $loggable;
public $encoding;
/**
* The constructor
*
* @param string $rooturl The URL of the wsdl file
* @param string $type The type of exchange
* @param array $options An array of options
* @param boolean $loggable True if you want to log all the exchanges with the web service
示例5: CResultatsLaboGraph
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage Labo
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CAppUI::requireLibraryFile("jpgraph/src/mbjpgraph");
CAppUI::requireLibraryFile("jpgraph/src/jpgraph_line");
CAppUI::requireLibraryFile("jpgraph/src/jpgraph_plotband");
class CResultatsLaboGraph extends Graph
{
public $maxValues = 10;
public $resultats;
function CResultatsLaboGraph($patient, $examen, $resultats)
{
$resultats = array_reverse($resultats, true);
if ($examen->type != "num") {
JpGraphError::raise("Le type d'examen doit être numérique pour être affiché");
}
// Prepare values
// Value plot
$ydata = array();
$xlabels = array();
$min = $examen->min;
$max = $examen->max;
foreach ($resultats as $resultat) {
示例6: filesize
<?php
/**
* $Id$
*
* @category Files
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
* @link http://www.mediboard.org
*/
$user = CUser::get();
CAppUI::requireLibraryFile("phpThumb/phpthumb.class");
include_once "lib/phpThumb/phpThumb.config.php";
//require_once("./lib/phpThumb/phpthumb.class.php");
//trigger_error("Source is $file->_file");
ob_clean();
// Direct acces needs Administrator rights
$file_path = CValue::get("file_path");
if ($file_path) {
$file_size = filesize($file_path);
$file_type = "text/xml";
$file_name = basename($file_path);
if ($user->user_type == 1) {
// BEGIN extra headers to resolve IE caching bug (JRP 9 Feb 2003)
// [http://bugs.php.net/bug.php?id=16173]
header("Pragma: ");
header("Cache-Control: ");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
示例7: loadLibrary
/**
* Load the library
*
* @return void
*/
static function loadLibrary()
{
CAppUI::requireLibraryFile("cron-expression-1.0.3/src/Cron/FieldInterface");
CAppUI::requireLibraryFile("cron-expression-1.0.3/src/Cron/AbstractField");
CAppUI::requireLibraryFile("cron-expression-1.0.3/src/Cron/CronExpression");
CAppUI::requireLibraryFile("cron-expression-1.0.3/src/Cron/DayOfMonthField");
CAppUI::requireLibraryFile("cron-expression-1.0.3/src/Cron/DayOfWeekField");
CAppUI::requireLibraryFile("cron-expression-1.0.3/src/Cron/FieldFactory");
CAppUI::requireLibraryFile("cron-expression-1.0.3/src/Cron/SecondsField");
CAppUI::requireLibraryFile("cron-expression-1.0.3/src/Cron/HoursField");
CAppUI::requireLibraryFile("cron-expression-1.0.3/src/Cron/MinutesField");
CAppUI::requireLibraryFile("cron-expression-1.0.3/src/Cron/MonthField");
CAppUI::requireLibraryFile("cron-expression-1.0.3/src/Cron/YearField");
}
示例8: CMediusers
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage dPstats
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CAppUI::requireLibraryFile("jpgraph/src/mbjpgraph");
CAppUI::requireLibraryFile("jpgraph/src/jpgraph_bar");
$debut = CValue::get("debut", CMbDT::date("-1 YEAR"));
$fin = CValue::get("fin", CMbDT::date());
$prat_id = CValue::get("prat_id", 0);
$service_id = CValue::get("service_id", 0);
$pratSel = new CMediusers();
$pratSel->load($prat_id);
$service = new CSalle();
$service->load($service_id);
$datax = array();
for ($i = $debut; $i <= $fin; $i = CMbDT::date("+1 MONTH", $i)) {
$datax[] = CMbDT::transform("+0 DAY", $i, "%m/%Y");
}
$sql = "SELECT * FROM service WHERE";
if ($service_id) {
$sql .= "\nAND id = '{$service_id}'";
}
$ds = CSQLDataSource::get("std");
$services = $ds->loadlist($sql);
示例9: highlightCode
/**
* Apply syntax highlighting
*
* @param String $language Code language
* @param String $code Code to format
* @param bool $enable_classes Enable the CSS class
* @param string $style CSS class to apply
*
* @return mixed
*/
static function highlightCode($language, $code, $enable_classes = true, $style = "max-height: 100%; white-space:pre-wrap;")
{
if (!class_exists("GeSHi", false)) {
CAppUI::requireLibraryFile("geshi/geshi");
}
$geshi = new GeSHi($code, $language);
$geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
$geshi->set_overall_style($style);
$geshi->set_overall_class("geshi");
if ($enable_classes) {
$geshi->enable_classes();
}
return $geshi->parse_code();
}
示例10: spancate
/**
* Truncate a string, with a full string titled span if actually truncated
* Example: {$value|spancate}
*
* @param string $string The string to truncate
* @param int $length The maximum string length
* @param string $etc The ellipsis
* @param bool $break_words Break words
* @param bool $middle Put the ellipsis at the middle of the string instead of at the end
*
* @return string
*/
function spancate($string, $length = 80, $etc = '...', $break_words = true, $middle = false)
{
CAppUI::requireLibraryFile("smarty/libs/plugins/modifier.truncate");
$string = html_entity_decode($string);
$truncated = smarty_modifier_truncate($string, $length, $etc, $break_words, $middle);
$truncated = CMbString::nl2bull($truncated);
$string = CMbString::htmlEntities($string);
return strlen($string) > $length ? "<span title=\"{$string}\">{$truncated}</span>" : $truncated;
}
示例11: convertTifPagesToPDF
/**
* Convert tif files to pdf
*
* @param array[] $tif_files array of tif files
*
* @return bool
*/
static function convertTifPagesToPDF($tif_files)
{
if (!class_exists("FPDF")) {
CAppUI::requireLibraryFile("PDFMerger/fpdf/fpdf");
}
$pngs = array();
foreach ($tif_files as $tif) {
$pngs[] = self::convertTifToPng($tif);
// "C:\\ImageMagick6.6.0-Q16\\"
}
$pdf = new FPDF();
foreach ($pngs as $png) {
$pdf->AddPage();
$pdf->Image($png, 5, 5, 200);
// millimeters
}
$out = $pdf->Output("", 'S');
foreach ($pngs as $png) {
unlink($png);
}
return $out;
}
示例12: setTitle
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage Cabinet
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
global $can, $m;
CAppUI::requireLibraryFile("jpgraph/src/mbjpgraph");
CAppUI::requireLibraryFile("jpgraph/src/jpgraph_line");
class AudiogrammeTympano extends Graph
{
/** @var self */
public static $gauche = null;
/** @var self */
public static $droite = null;
function setTitle($title)
{
$this->title->Set($title);
}
function AudiogrammeTympano()
{
$pressions = CExamAudio::$pressions;
// Setup the graph.
$this->Graph(280, 160, "auto");
$this->SetScale("textlin", 0, 15);
$this->SetMarginColor("lightblue");
示例13:
<?php
/**
* $Id$
*
* @category Classes
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
* @link http://www.mediboard.org
*/
CAppUI::requireLibraryFile("phpseclib/phpseclib/Net/SFTP");
$root = CAppUI::conf("root_dir");
/**
* PHPseclib test the inclusion of file with a relatif path
*/
set_include_path(get_include_path() . PATH_SEPARATOR . $root . '/lib/phpseclib/phpseclib');
/**
* Class SFTP
*/
class CSFTP
{
public $hostname;
public $port;
public $timeout;
public $username;
public $userpass;
public $loggable;
public $fileextension;
public $fileextension_end;
示例14: getSpec
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage System
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CAppUI::requireLibraryFile("phpmailer/class.phpmailer");
CAppUI::requireLibraryFile("phpmailer/class.smtp");
class CSourceSMTP extends CExchangeSource
{
// DB Table key
public $source_smtp_id;
// DB Fields
public $port;
public $email;
public $auth;
public $ssl;
public $timeout;
public $debug;
public $_mail;
public $_to;
function getSpec()
{
$spec = parent::getSpec();
$spec->table = 'source_smtp';
$spec->key = 'source_smtp_id';
示例15: xPseudoAxisFormatCb
/**
* $Id: inc_graph_audio_vocal.php 20068 2013-07-26 13:21:27Z rhum1 $
*
* @package Mediboard
* @subpackage Cabinet
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 20068 $
*/
global $can, $m;
CAppUI::requireModuleFile("dPcabinet", "jpgraph_bezier");
CAppUI::requireLibraryFile("jpgraph/src/mbjpgraph");
CAppUI::requireLibraryFile("jpgraph/src/jpgraph_line");
CAppUI::requireLibraryFile("jpgraph/src/jpgraph_scatter");
CAppUI::requireLibraryFile("jpgraph/src/jpgraph_regstat");
function xPseudoAxisFormatCb($value)
{
$value -= 50;
$value *= 100;
// Prevents rounding errors intrinsic to float values...
$value = round($value);
$value *= 10;
return sprintf("%d", $value);
}
class AudiogrammeVocal extends Graph
{
/** @var self */
public static $graph = null;
function AudiogrammeVocal()
{