本文整理汇总了PHP中G::LoadThirdParty方法的典型用法代码示例。如果您正苦于以下问题:PHP G::LoadThirdParty方法的具体用法?PHP G::LoadThirdParty怎么用?PHP G::LoadThirdParty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类G
的用法示例。
在下文中一共展示了G::LoadThirdParty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: minify
public function minify()
{
if ($this->contentType != 'text/css') {
G::LoadThirdParty('jsmin', 'jsmin');
$this->content = JSMin::minify($this->content);
}
}
示例2: install
function install($file)
{
G::LoadThirdParty("pear/Archive", "Tar");
$result = array();
$status = 1;
try {
//Extract
$tar = new Archive_Tar($file);
$swTar = $tar->extract(PATH_OUTTRUNK);
//true on success, false on error. //directory for extract
//$swTar = $tar->extract(PATH_PLUGINS);
if (!$swTar) {
throw new Exception("Could not extract file.");
}
//Upgrade
$option = array("http" => array("method" => "POST"));
// Proxy settings
$sysConf = System::getSystemConfiguration();
if (isset($sysConf['proxy_host'])) {
if ($sysConf['proxy_host'] != '') {
if (!is_array($option['http'])) {
$option['http'] = array();
}
$option['http']['request_fulluri'] = true;
$option['http']['proxy'] = 'tcp://' . $sysConf['proxy_host'] . ($sysConf['proxy_port'] != '' ? ':' . $sysConf['proxy_port'] : '');
if ($sysConf['proxy_user'] != '') {
if (!isset($option['http']['header'])) {
$option['http']['header'] = '';
}
$option['http']['header'] .= 'Proxy-Authorization: Basic ' . base64_encode($sysConf['proxy_user'] . ($sysConf['proxy_pass'] != '' ? ':' . $sysConf['proxy_pass'] : ''));
}
}
}
$context = stream_context_create($option);
///////
$fileData = @fopen(EnterpriseUtils::getUrlServerName() . "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/enterprise/services/processMakerUpgrade", "rb", false, $context);
if ($fileData === false) {
throw new Exception("Could not open services url.");
}
$resultAux = G::json_decode(stream_get_contents($fileData));
if ($resultAux->status == "OK") {
$result["status"] = $resultAux->status;
//OK
$result["message"] = $resultAux->message;
} else {
throw new Exception($resultAux->message);
}
} catch (Exception $e) {
$result["message"] = $e->getMessage();
$status = 0;
}
if ($status == 0) {
$result["status"] = "ERROR";
}
return $result;
}
示例3: define
define("SYS_LANG", "en");
require_once PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths.php";
require_once PATH_TRUNK . "framework" . PATH_SEP . "src" . PATH_SEP . "Maveriks" . PATH_SEP . "Util" . PATH_SEP . "ClassLoader.php";
//Class Loader - /ProcessMaker/BusinessModel
$classLoader = \Maveriks\Util\ClassLoader::getInstance();
$classLoader->add(PATH_TRUNK . "framework" . PATH_SEP . "src" . PATH_SEP, "Maveriks");
$classLoader->add(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "src" . PATH_SEP, "ProcessMaker");
$classLoader->add(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "src" . PATH_SEP);
//Add vendors to autoloader
//$classLoader->add(PATH_TRUNK . "vendor" . PATH_SEP . "luracast" . PATH_SEP . "restler" . PATH_SEP . "vendor", "Luracast");
//$classLoader->add(PATH_TRUNK . "vendor" . PATH_SEP . "bshaffer" . PATH_SEP . "oauth2-server-php" . PATH_SEP . "src" . PATH_SEP, "OAuth2");
$classLoader->addClass("Bootstrap", PATH_TRUNK . "gulliver" . PATH_SEP . "system" . PATH_SEP . "class.bootstrap.php");
$classLoader->addModelClassPath(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP);
//Load classes
G::LoadThirdParty("pear/json", "class.json");
G::LoadThirdParty("smarty/libs", "Smarty.class");
G::LoadSystem("error");
G::LoadSystem("dbconnection");
G::LoadSystem("dbsession");
G::LoadSystem("dbrecordset");
G::LoadSystem("dbtable");
G::LoadSystem("rbac");
G::LoadSystem("publisher");
G::LoadSystem("templatePower");
G::LoadSystem("xmlDocument");
G::LoadSystem("xmlform");
G::LoadSystem("xmlformExtension");
G::LoadSystem("form");
G::LoadSystem("menu");
G::LoadSystem("xmlMenu");
G::LoadSystem("dvEditor");
示例4: DBConnection
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
$unitFilename = $_SERVER['PWD'] . '/test/bootstrap/unit.php';
require_once $unitFilename;
require_once PATH_THIRDPARTY . '/lime/lime.php';
require_once PATH_THIRDPARTY . 'lime/yaml.class.php';
require_once PATH_CORE . "config/databases.php";
require_once "propel/Propel.php";
Propel::init(PATH_CORE . "config/databases.php");
G::LoadThirdParty('smarty/libs', 'Smarty.class');
G::LoadSystem('error');
G::LoadSystem('xmlform');
G::LoadSystem('xmlDocument');
G::LoadSystem('form');
G::LoadSystem('dbconnection');
G::LoadSystem('dbsession');
G::LoadSystem('dbrecordset');
G::LoadSystem('dbtable');
G::LoadSystem('testTools');
G::LoadClass('appDelegation');
require_once PATH_CORE . '/classes/model/AppDelegation.php';
$dbc = new DBConnection();
$ses = new DBSession($dbc);
$obj = new AppDelegation($dbc);
$t = new lime_test(1, new lime_output_color());
示例5: switch
switch ($_REQUEST['action']) {
case 'searchUsers':
require_once 'classes/model/Users.php';
$criteria = new Criteria('workflow');
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
$criteria->add(UsersPeer::USR_STATUS, array('CLOSED'), Criteria::NOT_IN);
$dataset = UsersPeer::DoSelectRs($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$pmUsers = array();
while ($row = $dataset->getRow()) {
$pmUsers[] = $row['USR_USERNAME'];
$dataset->next();
}
$aFields = $RBAC->getAuthSource($_POST['sUID']);
G::LoadThirdParty('pear/json', 'class.json');
$oJSON = new Services_JSON();
$i = 0;
$oUser = new Users();
$aAux = $RBAC->searchUsers($_POST['sUID'], $_POST['sKeyword']);
$aUsers = array();
// note added by gustavo cruz gustavo-at-colosa.com
// changed the user data showed to accept FirstName and LastName variables
$aUsers[] = array('Checkbox' => 'char', 'Username' => 'char', 'FullName' => 'char', 'FirstName' => 'char', 'LastName' => 'char', 'Email' => 'char', 'DistinguishedName' => 'char');
foreach ($aAux as $aUser) {
if (!in_array($aUser['sUsername'], $pmUsers)) {
// add replace to change D'Souza to D*Souza by krlos
$sCheckbox = '<div align="center"><input type="checkbox" name="aUsers[' . $i . ']" id="aUsers[' . $i . ']" value=\'' . str_replace("\\'", "*", addslashes($oJSON->encode($aUser))) . '\' /></div>';
$i++;
} else {
$sCheckbox = G::LoadTranslation('ID_USER_REGISTERED') . ':<br />(' . $aUser['sUsername'] . ')';
示例6: handleMail
/**
* handle and compose the email content and parameters
*
* @param none
* @return none
*/
private function handleMail ()
{
if (count( $this->fileData['envelope_to'] ) > 0) {
if (array_key_exists('MESS_ENGINE',$this->config)) {
switch ($this->config['MESS_ENGINE']) {
case 'MAIL':
case 'PHPMAILER':
G::LoadThirdParty( 'phpmailer', 'class.phpmailer' );
switch ($this->config['MESS_ENGINE']) {
case 'MAIL':
$oPHPMailer = new PHPMailer();
$oPHPMailer->Mailer = 'mail';
break;
case 'PHPMAILER':
$oPHPMailer = new PHPMailer( true );
$oPHPMailer->Mailer = 'smtp';
break;
}
$oPHPMailer->SMTPAuth = (isset( $this->config['SMTPAuth'] ) ? $this->config['SMTPAuth'] : '');
switch ($this->config['MESS_ENGINE']) {
case 'MAIL':
break;
case 'PHPMAILER':
//Posible Options for SMTPSecure are: "", "ssl" or "tls"
if (isset( $this->config['SMTPSecure'] ) && preg_match( '/^(ssl|tls)$/', $this->config['SMTPSecure'] )) {
$oPHPMailer->SMTPSecure = $this->config['SMTPSecure'];
}
break;
}
$oPHPMailer->CharSet = "UTF-8";
$oPHPMailer->Encoding = "8bit";
$oPHPMailer->Host = $this->config['MESS_SERVER'];
$oPHPMailer->Port = $this->config['MESS_PORT'];
$oPHPMailer->Username = $this->config['MESS_ACCOUNT'];
$oPHPMailer->Password = $this->config['MESS_PASSWORD'];
$oPHPMailer->From = $this->fileData['from_email'];
$oPHPMailer->FromName = utf8_decode( $this->fileData['from_name'] );
if (isset($this->fileData['reply_to'])) {
if ($this->fileData['reply_to'] != '') {
$oPHPMailer->AddReplyTo($this->fileData['reply_to'], $this->fileData['reply_to_name']);
}
}
$msSubject = $this->fileData['subject'];
if (! (mb_detect_encoding( $msSubject, "UTF-8" ) == "UTF-8")) {
$msSubject = utf8_encode( $msSubject );
}
$oPHPMailer->Subject = $msSubject;
$msBody = $this->fileData['body'];
if (! (mb_detect_encoding( $msBody, "UTF-8" ) == "UTF-8")) {
$msBody = utf8_encode( $msBody );
}
$oPHPMailer->Body = $msBody;
$attachment = @unserialize($this->fileData['attachments']);
if ($attachment === false) {
$attachment = $this->fileData['attachments'];
}
if (is_array($attachment)) {
foreach ($attachment as $key => $fileAttach) {
if (file_exists( $fileAttach )) {
$oPHPMailer->AddAttachment( $fileAttach, is_int( $key ) ? '' : $key );
}
}
}
foreach ($this->fileData['envelope_to'] as $sEmail) {
if (strpos( $sEmail, '<' ) !== false) {
preg_match( $this->longMailEreg, $sEmail, $matches );
$sTo = trim( $matches[3] );
$sToName = trim( $matches[1] );
$oPHPMailer->AddAddress( $sTo, $sToName );
} else {
$oPHPMailer->AddAddress( $sEmail );
}
}
//CC
foreach ($this->fileData['envelope_cc'] as $sEmail) {
if (strpos( $sEmail, '<' ) !== false) {
preg_match( $this->longMailEreg, $sEmail, $matches );
$sTo = trim( $matches[3] );
$sToName = trim( $matches[1] );
$oPHPMailer->AddCC( $sTo, $sToName );
} else {
//.........这里部分代码省略.........
示例7: hotfixInstall
public static function hotfixInstall($file)
{
$result = array();
$dirHotfix = PATH_DATA . "hotfixes";
$arrayPathInfo = pathinfo($file);
$f = ($arrayPathInfo["dirname"] == ".")? $dirHotfix . PATH_SEP . $file : $file;
$swv = 1;
$msgv = "";
if (!file_exists($dirHotfix)) {
G::mk_dir($dirHotfix, 0777);
}
if (!file_exists($f)) {
$swv = 0;
$msgv = $msgv . (($msgv != "")? "\n": null) . "- The file \"$f\" does not exist";
}
if ($arrayPathInfo["extension"] != "tar") {
$swv = 0;
$msgv = $msgv . (($msgv != "")? "\n": null) . "- The file extension \"$file\" is not \"tar\"";
}
if ($swv == 1) {
G::LoadThirdParty("pear/Archive", "Tar");
//Extract
$tar = new Archive_Tar($f);
$swTar = $tar->extractModify(PATH_TRUNK, "processmaker"); //true on success, false on error
if ($swTar) {
$result["status"] = 1;
$result["message"] = "- Hotfix installed successfully \"$f\"";
} else {
$result["status"] = 0;
$result["message"] = "- Could not extract file \"$f\"";
}
} else {
$result["status"] = 0;
$result["message"] = $msgv;
}
return $result;
}
示例8: array
$aTriggers[0] = $_SESSION['TRIGGER_DEBUG'];
}
//print_r($aTriggers);die;
$triggersList = array();
$i = 0;
foreach ($aTriggers as $aTrigger) {
if ($aTrigger['NUM_TRIGGERS'] != 0) {
foreach ($aTrigger['TRIGGERS_NAMES'] as $index => $name) {
$triggersList[$i]['name'] = $name;
$triggersList[$i]['execution_time'] = strtolower($aTrigger['TIME']);
//$t_code = $aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'];
//$t_code = str_replace('"', '\'',$t_code);
//$t_code = addslashes($t_code);
//$t_code = Only1br($t_code);
//highlighting the trigger code using the geshi third party library
G::LoadThirdParty('geshi', 'geshi');
$geshi = new GeSHi($aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'], 'php');
$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 2);
$geshi->set_line_style('background: #f0f0f0;');
$triggersList[$i]['code'] = $geshi->parse_code();
//$aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'];
$i++;
}
} else {
}
}
//print_r($_SESSION['TRIGGER_DEBUG']['ERRORS']); die;
$DEBUG_ERRORS = array_unique($_SESSION['TRIGGER_DEBUG']['ERRORS']);
foreach ($DEBUG_ERRORS as $error) {
if (isset($error['ERROR']) and $error['ERROR'] != '') {
$triggersList[$i]['name'] = 'Error';
示例9: testConnectionByStep
/**
* Test connection by step
*
* @param array $arrayData Data
* @param int $step Step
*
* return array Return array with result of test connection by step
*/
public function testConnectionByStep(array $arrayData, $step = 0)
{
try {
\G::LoadClass("net");
\G::LoadThirdParty("phpmailer", "class.smtp");
//MAIL
if ($arrayData["MESS_ENGINE"] == "MAIL") {
$arrayDataMail = array();
$eregMail = "/^[0-9a-zA-Z]+(?:[._][0-9a-zA-Z]+)*@[0-9a-zA-Z]+(?:[._-][0-9a-zA-Z]+)*\\.[0-9a-zA-Z]{2,3}\$/";
$arrayDataMail["FROM_EMAIL"] = $arrayData["MESS_FROM_MAIL"] != "" && preg_match($eregMail, $arrayData["MESS_FROM_MAIL"]) ? $arrayData["MESS_FROM_MAIL"] : "";
$arrayDataMail["FROM_NAME"] = $arrayData["MESS_FROM_NAME"] != "" ? $arrayData["MESS_FROM_NAME"] : \G::LoadTranslation("ID_MESS_TEST_BODY");
$arrayDataMail["MESS_ENGINE"] = "MAIL";
$arrayDataMail["MESS_SERVER"] = "localhost";
$arrayDataMail["MESS_PORT"] = 25;
$arrayDataMail["MESS_ACCOUNT"] = $arrayData["MAIL_TO"];
$arrayDataMail["MESS_PASSWORD"] = "";
$arrayDataMail["TO"] = $arrayData["MAIL_TO"];
$arrayDataMail["MESS_RAUTH"] = true;
$arrayTestMailResult = array();
try {
$arrayTestMailResult = $this->sendTestMail($arrayDataMail);
} catch (Exception $e) {
$arrayTestMailResult["status"] = false;
$arrayTestMailResult["message"] = $e->getMessage();
}
$arrayResult = array("result" => $arrayTestMailResult["status"], "message" => "");
if ($arrayTestMailResult["status"] == false) {
$arrayResult["message"] = \G::LoadTranslation("ID_SENDMAIL_NOT_INSTALLED");
}
//Return
return $arrayResult;
}
//PHPMAILER
$server = $arrayData["MESS_SERVER"];
$user = $arrayData["MESS_ACCOUNT"];
$passwd = $arrayData["MESS_PASSWORD"];
$fromMail = $arrayData["MESS_FROM_MAIL"];
$passwdHide = $arrayData["MESS_PASSWORD"];
if (trim($passwdHide) != "") {
$passwd = $passwdHide;
$passwdHide = "";
}
$passwdDec = \G::decrypt($passwd, "EMAILENCRYPT");
$auxPass = explode("hash:", $passwdDec);
if (count($auxPass) > 1) {
if (count($auxPass) == 2) {
$passwd = $auxPass[1];
} else {
array_shift($auxPass);
$passwd = implode("", $auxPass);
}
}
$arrayData["MESS_PASSWORD"] = $passwd;
$port = (int) $arrayData["MESS_PORT"];
$auth_required = (int) $arrayData["MESS_RAUTH"];
$useSecureCon = $arrayData["SMTPSECURE"];
$sendTestMail = (int) $arrayData["MESS_TRY_SEND_INMEDIATLY"];
$mailTo = $arrayData["MAIL_TO"];
$smtpSecure = $arrayData["SMTPSECURE"];
$serverNet = new \NET($server);
$smtp = new \SMTP();
$timeout = 10;
$hostinfo = array();
$srv = $arrayData["MESS_SERVER"];
$arrayResult = array();
switch ($step) {
case 1:
$arrayResult["result"] = $serverNet->getErrno() == 0;
$arrayResult["message"] = $serverNet->error;
break;
case 2:
$serverNet->scannPort($port);
$arrayResult["result"] = $serverNet->getErrno() == 0;
$arrayResult["message"] = $serverNet->error;
break;
case 3:
//Try to connect to host
if (preg_match("/^(.+):([0-9]+)\$/", $srv, $hostinfo)) {
$server = $hostinfo[1];
$port = $hostinfo[2];
} else {
$host = $srv;
}
$tls = strtoupper($smtpSecure) == "tls";
$ssl = strtoupper($smtpSecure) == "ssl";
$arrayResult["result"] = $smtp->Connect(($ssl ? "ssl://" : "") . $server, $port, $timeout);
$arrayResult["message"] = $serverNet->error;
break;
case 4:
//Try login to host
if ($auth_required == 1) {
try {
//.........这里部分代码省略.........
示例10: workspaceRestore
function workspaceRestore($backupFilename, $targetWorkspace, $overwrite)
{
$tempDirectory = tempnam(__FILE__, '');
if (file_exists($tempDirectory)) {
unlink($tempDirectory);
}
if (file_exists($tempDirectory)) {
G::rm_dir($tempDirectory);
}
G::mk_dir($tempDirectory);
G::LoadThirdParty('pear/Archive', 'Tar');
$tar = new Archive_Tar($backupFilename);
$res = $tar->extract($tempDirectory);
$metadataFilename = $tempDirectory . PATH_SEP . 'metadata.txt';
if (!file_exists($metadataFilename)) {
/* Look for legacy backups, where metadata was stored as a file with the
* workspace name, such as workflow.txt
* This means the backup filename must be the same as the metadata file.
*/
$info = pathinfo($backupFilename);
/* Check if it's a compressed backup, in which case we need to remove
* both the gz and the tar extensions.
*/
if ($info['extension'] == "gz") {
$info = pathinfo(basename($backupFilename, '.' . $info['extension']));
}
$wsNameFromTar = basename($backupFilename, '.' . $info['extension']);
$metadataFilename = $tempDirectory . PATH_SEP . $wsNameFromTar . '.txt';
if (!file_exists($metadataFilename)) {
throw new Exception("Metadata file was not found in backup");
}
}
$metadata = unserialize(file_get_contents($metadataFilename));
$backupWorkspace = $metadata['WORKSPACE_NAME'];
$changeWorkspace = isset($targetWorkspace);
if (!$changeWorkspace) {
$targetWorkspace = $backupWorkspace;
} else {
echo "Restoring from workspace: " . pakeColor::colorize($backupWorkspace, 'INFO') . "\n";
}
echo "Restoring to workspace: " . pakeColor::colorize($targetWorkspace, 'INFO') . "\n";
//moving the site files
$backupWorkspaceDir = $tempDirectory . PATH_SEP . $backupWorkspace;
$targetWorkspaceDir = PATH_DATA . 'sites' . PATH_SEP . $targetWorkspace;
if (!$overwrite && file_exists($targetWorkspaceDir)) {
$overwrite = strtolower(prompt('Workspace already exists, do you want to overwrite? [Y/n]'));
if (array_search(trim($overwrite), array("y", "")) === false) {
die;
}
$overwrite = true;
}
printf("Moving files to %s \n", pakeColor::colorize($targetWorkspaceDir, 'INFO'));
/* We already know we will be overwriting the new workspace if we reach this
* point, so remove the workspace directory if it exists.
*/
if (file_exists($targetWorkspaceDir)) {
G::rm_dir($targetWorkspaceDir);
}
if (!rename($backupWorkspaceDir, $targetWorkspaceDir)) {
throw new Exception("There was an error moving from {$backupWorkspaceDir} to {$targetWorkspaceDir}");
}
$dbOpt = @explode(SYSTEM_HASH, G::decrypt(HASH_INSTALLATION, SYSTEM_HASH));
$dbHostname = $dbOpt[0];
/* TODO: Check if database exists after updateDBfile */
$config = updateDBfile($targetWorkspaceDir, $targetWorkspace, $dbHostname, $changeWorkspace);
G::LoadSystem('dbMaintenance');
$oDbMaintainer = new DataBaseMaintenance($dbOpt[0], $dbOpt[1], $dbOpt[2]);
$dbName = $config['DB_NAME'];
$dbUser = $config['DB_USER'];
$dbPass = $config['DB_PASS'];
restoreDB($dbHostname, $oDbMaintainer, $metadata['DB_NAME'], $dbName, $dbUser, $dbPass, $tempDirectory, $overwrite);
$dbName = $config['DB_RBAC_NAME'];
$dbUser = $config['DB_RBAC_USER'];
$dbPass = $config['DB_RBAC_PASS'];
restoreDB($dbHostname, $oDbMaintainer, $metadata['DB_RBAC_NAME'], $dbName, $dbUser, $dbPass, $tempDirectory, $overwrite);
$dbName = $config['DB_REPORT_NAME'];
$dbUser = $config['DB_REPORT_USER'];
$dbPass = $config['DB_REPORT_PASS'];
restoreDB($dbHostname, $oDbMaintainer, $metadata['DB_REPORT_NAME'], $dbName, $dbUser, $dbPass, $tempDirectory, $overwrite);
echo "\n";
$wsInfo = getSysInfo();
$wsInfo['WORKSPACE_NAME'] = $targetWorkspace;
$wsInfo = array_merge($wsInfo, $config);
printInfoSites($metadata, $wsInfo);
return true;
}
示例11: packPlugin
function packPlugin($pluginName, $version)
{
$pathBase = PATH_DATA . 'skins' . PATH_SEP . $pluginName . PATH_SEP;
$pathHome = PATH_DATA . 'skins' . PATH_SEP . $pluginName;
$fileTar = PATH_DATA . 'skins' . PATH_SEP . $pluginName . '-' . $version . '.tar';
G::LoadSystem('templatePower');
/*
$pluginDirectory = PATH_PLUGINS . $pluginName;
$pluginOutDirectory = PATH_OUTTRUNK . 'plugins' . PATH_SEP . $pluginName;
$pluginHome = PATH_OUTTRUNK . 'plugins' . PATH_SEP . $pluginName;
//verify if plugin exists,
$pluginClassFilename = PATH_PLUGINS . $pluginName . PATH_SEP . 'class.' . $pluginName . '.php';
if ( !is_file ( $pluginClassFilename ) ) {
printf("The plugin %s doesn't exist in this file %s \n", pakeColor::colorize( $pluginName, 'ERROR'), pakeColor::colorize( $pluginClassFilename, 'INFO') );
die ;
}
*/
G::LoadThirdParty('pear/Archive', 'Tar');
$tar = new Archive_Tar($fileTar);
$tar->_compress = false;
//$tar->createModify( $pathHome . PATH_SEP . $pluginName . '.php' ,'', $pathHome);
addTarFolder($tar, $pathBase, $pathHome);
$aFiles = $tar->listContent();
return $fileTar;
}
示例12: array
<?php
/**
* @author Hugo Loza <hugo@colosa.com>
*
* This class Helps registering and implementing Wizard for Triggers
*/
G::LoadThirdParty('html2ps_pdf/classes', 'include');
G::LoadThirdParty('html2ps_pdf/classes/org/active-link/doc', 'PHPClass');
/**
* @package workflow.engine.ProcessMaker
*/
class triggerLibrary
{
private $_aTriggerClasses_ = array();
private static $instance = NULL;
/**
* __construct
*
* @return void
*/
function __construct()
{
//Initialize the Library and register the Default
$this->registerFunctionsFileToLibrary(PATH_CORE . "classes" . PATH_SEP . "class.pmFunctions.php", "ProcessMaker Functions");
//Register all registered PLugin Functions
if (class_exists('folderData')) {
//$folderData = new folderData($sProUid, $proFields['PRO_TITLE'], $sAppUid, $Fields['APP_TITLE'], $sUsrUid);
$oPluginRegistry =& PMPluginRegistry::getSingleton();
$aAvailablePmFunctions = $oPluginRegistry->getPmFunctions();
foreach ($aAvailablePmFunctions as $key => $class) {
示例13: session_start
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (isset($_POST['form']['USER_ENV'])) {
session_start();
$_SESSION['sysLogin'] = $_POST['form'];
G::header('location: /sys' . $_POST['form']['USER_ENV'] . '/' . SYS_LANG . '/' . SYS_SKIN . '/login/sysLoginVerify');
die;
}
@session_destroy();
session_start();
session_regenerate_id();
//Required classes for dbArray work
require_once "propel/Propel.php";
require_once "creole/Creole.php";
G::LoadThirdParty("pake", "pakeColor.class");
Propel::init(PATH_CORE . "config/databases.php");
Creole::registerDriver('dbarray', 'creole.contrib.DBArrayConnection');
function getLangFiles()
{
$dir = PATH_LANGUAGECONT;
$filesArray = array();
if (file_exists($dir)) {
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
$fileParts = explode(".", $file);
if ($fileParts[0] == "translation") {
$filesArray[$fileParts[1]] = $file;
}
}
closedir($handle);
示例14: BugsOpenByUser
function BugsOpenByUser()
{
G::LoadThirdParty("libchart/classes", "libchart");
$chart = new VerticalBarChart(430, 220);
$dataSet = $this->getBugsOpenByUser();
$dataPostSet = new XYDataSet();
$dataTopicSet = new XYDataSet();
foreach ($dataSet['label'] as $key => $label) {
$dataPostSet->addPoint(new Point($label, $dataSet['data'][$key]));
}
$chart->setDataSet($dataPostSet);
//$chart->setTitle( " Posts by User" );
$chart->render();
}
示例15: die
}
require_once 'classes/model/AddonsStore.php';
AddonsStore::checkLicenseStore();
$licenseManager =& pmLicenseManager::getSingleton();
AddonsStore::updateAll(false);
$message = G::loadTranslation('ID_ENTERPRISE_INSTALLED') . ' ' . G::loadTranslation('ID_LOG_AGAIN');
G::SendMessageText($message, "INFO");
$licenseManager =& pmLicenseManager::getSingleton();
die('<script type="text/javascript">parent.parent.location = "../login/login";</script>');
}
}
if (!$_FILES['form']['type']['PLUGIN_FILENAME'] == 'application/octet-stream') {
$pluginFilename = $_FILES['form']['type']['PLUGIN_FILENAME'];
throw new Exception(G::loadTranslation('ID_FILES_INVALID_PLUGIN_FILENAME', SYS_LANG, array("pluginFilename" => $pluginFilename)));
}
G::LoadThirdParty('pear/Archive', 'Tar');
$tar = new Archive_Tar($path . $filename);
$sFileName = substr($filename, 0, strrpos($filename, '.'));
$sClassName = substr($filename, 0, strpos($filename, '-'));
$sClassName = !empty($sClassName) ? $sClassName : $sFileName;
$aFiles = $tar->listContent();
$bMainFile = false;
$bClassFile = false;
if (!is_array($aFiles)) {
throw new Exception(G::loadTranslation('ID_FAILED_IMPORT_PLUGINS', SYS_LANG, array("filename" => $filename)));
}
foreach ($aFiles as $key => $val) {
if (trim($val['filename']) == $sClassName . '.php') {
$bMainFile = true;
}
if (trim($val['filename']) == $sClassName . PATH_SEP . 'class.' . $sClassName . '.php') {