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


PHP System::getVersion方法代码示例

本文整理汇总了PHP中System::getVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP System::getVersion方法的具体用法?PHP System::getVersion怎么用?PHP System::getVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System的用法示例。


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

示例1: __construct

 public function __construct($prjUid)
 {
     $this->prjUid = $prjUid;
     $this->bpmnProject = Project\Bpmn::load($prjUid);
     $this->projectData = $this->bpmnProject->getProject();
     $this->metadata = array("vendor_version" => \System::getVersion(), "vendor_version_code" => "Michelangelo", "export_timestamp" => date("U"), "export_datetime" => date("Y-m-d\\TH:i:sP"), "export_server_addr" => isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] . ":" . $_SERVER["SERVER_PORT"] : "Unknown", "export_server_os" => PHP_OS, "export_server_php_version" => PHP_VERSION_ID);
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:7,代码来源:Exporter.php

示例2: isApplicable

 public static function isApplicable()
 {
     patch::$isPathchable = false;
     $con = Propel::getConnection("workflow");
     $stmt = $con->prepareStatement("describe TASK;");
     $rs = $stmt->executeQuery();
     $rs->next();
     while ($row = $rs->getRow()) {
         if ($row['Field'] == "TAS_GROUP_VARIABLE") {
             $version = System::getVersion();
             $version = explode('-', $version);
             if ($version[0] == '2.5.1') {
                 echo "Version " . $version[0] . " Patch\n";
                 patch::$isPathchable = true;
             }
             break;
         }
         $rs->next();
     }
     return patch::$isPathchable;
 }
开发者ID:ralpheav,项目名称:processmaker,代码行数:21,代码来源:class.patch.php

示例3: isset

    $oHeadPublisher->assign("license_expires", $licenseManager->expireIn);
    $oHeadPublisher->assign("license_message", $licenseManager->status["message"]);
    $oHeadPublisher->assign("licensed", false);
} else {
    $oHeadPublisher->assign("license_user", "");
    $oHeadPublisher->assign("license_name", "<b>Unlicensed</b>");
    $oHeadPublisher->assign("license_server", "<b>no server</b>");
    $oHeadPublisher->assign("license_expires", "");
    $currentLicenseStatus = $licenseManager->getCurrentLicenseStatus();
    $oHeadPublisher->assign("license_message", $currentLicenseStatus["message"]);
    $oHeadPublisher->assign("license_start_date", "");
    $oHeadPublisher->assign("license_end_date", "");
    $oHeadPublisher->assign("license_span", "");
    $oHeadPublisher->assign("licensed", false);
}
$oHeadPublisher->assign("license_serial", isset($licenseManager->licenseSerial) ? $licenseManager->licenseSerial : '');
$oHeadPublisher->assign("SUPPORT_FLAG", isset($licenseManager->supportStartDate) && $licenseManager->supportStartDate == '' || !isset($licenseManager->supportStartDate) ? true : false);
$oHeadPublisher->assign("supportStartDate", isset($licenseManager->supportStartDate) ? $licenseManager->supportStartDate : '');
$oHeadPublisher->assign("supportEndDate", isset($licenseManager->supportEndDate) ? $licenseManager->supportEndDate : '');
G::LoadClass("system");
$oHeadPublisher->assign("PROCESSMAKER_VERSION", System::getVersion());
$oHeadPublisher->assign("PROCESSMAKER_URL", "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN);
$oHeadPublisher->assign("SYS_SKIN", SYS_SKIN);
$oHeadPublisher->assign("URL_PART_LOGIN", substr(SYS_SKIN, 0, 2) == "ux" && SYS_SKIN != "uxs" ? "main/login" : "login/login");
$oHeadPublisher->assign("URL_PART_SETUP", EnterpriseUtils::getUrlPartSetup());
$oHeadPublisher->assign("PATH_PLUGINS_WRITABLE", is_writable(PATH_PLUGINS) ? 1 : 0);
$oHeadPublisher->assign("PATH_PLUGINS_WRITABLE_MESSAGE", "The directory " . PATH_PLUGINS . " have not writable.");
$oHeadPublisher->assign("SKIN_IS_UX", EnterpriseUtils::skinIsUx());
$oHeadPublisher->assign("INTERNET_CONNECTION", EnterpriseUtils::getInternetConnection());
$oHeadPublisher->addExtJsScript("enterprise/addonsStore", true);
G::RenderPage("publish", "extJs");
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:addonsStore.php

示例4: export

 /**
  * Export PM tables
  *
  * @author : Erik Amaru Ortiz <aortiz.erik@gmail.com>
  */
 public function export($httpData)
 {
     require_once 'classes/model/AdditionalTables.php';
     $at = new AdditionalTables();
     $tablesToExport = G::json_decode(stripslashes($httpData->rows));
     try {
         G::LoadCLass('net');
         $net = new NET(G::getIpAddress());
         G::LoadClass("system");
         $META = " \n-----== ProcessMaker Open Source Private Tables ==-----\n" . " @Ver: 1.0 Oct-2009\n" . " @Processmaker version: " . System::getVersion() . "\n" . " -------------------------------------------------------\n" . " @Export Date: " . date("l jS \\of F Y h:i:s A") . "\n" . " @Server address: " . getenv('SERVER_NAME') . " (" . getenv('SERVER_ADDR') . ")\n" . " @Client address: " . $net->hostname . "\n" . " @Workspace: " . SYS_SYS . "\n" . " @Export trace back:\n\n";
         $EXPORT_TRACEBACK = array();
         $c = 0;
         foreach ($tablesToExport as $table) {
             $tableRecord = $at->load($table->ADD_TAB_UID);
             $tableData = $at->getAllData($table->ADD_TAB_UID, null, null, false);
             $table->ADD_TAB_NAME = $tableRecord['ADD_TAB_NAME'];
             $rows = $tableData['rows'];
             $count = $tableData['count'];
             array_push($EXPORT_TRACEBACK, array('uid' => $table->ADD_TAB_UID, 'name' => $table->ADD_TAB_NAME, 'num_regs' => $tableData['count'], 'schema' => $table->_SCHEMA ? 'yes' : 'no', 'data' => $table->_DATA ? 'yes' : 'no'));
         }
         $sTrace = "TABLE UID                        TABLE NAME\tREGS\tSCHEMA\tDATA\n";
         foreach ($EXPORT_TRACEBACK as $row) {
             $sTrace .= "{$row['uid']}\t{$row['name']}\t\t{$row['num_regs']}\t{$row['schema']}\t{$row['data']}\n";
         }
         $META .= $sTrace;
         ///////////////EXPORT PROCESS
         $PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'public' . PATH_SEP;
         $filenameOnly = strtolower('SYS-' . SYS_SYS . "_" . date("Y-m-d") . '_' . date("Hi") . ".pmt");
         $filename = $PUBLIC_ROOT_PATH . $filenameOnly;
         $fp = fopen($filename, "wb");
         $bytesSaved = 0;
         $bufferType = '@META';
         $fsData = sprintf("%09d", strlen($META));
         $fsbufferType = sprintf("%09d", strlen($bufferType));
         $bytesSaved += fwrite($fp, $fsbufferType);
         //writing the size of $oData
         $bytesSaved += fwrite($fp, $bufferType);
         //writing the $oData
         $bytesSaved += fwrite($fp, $fsData);
         //writing the size of $oData
         $bytesSaved += fwrite($fp, $META);
         //writing the $oData
         foreach ($tablesToExport as $table) {
             if ($table->_SCHEMA) {
                 $oAdditionalTables = new AdditionalTables();
                 $aData = $oAdditionalTables->load($table->ADD_TAB_UID, true);
                 $bufferType = '@SCHEMA';
                 $SDATA = serialize($aData);
                 $fsUid = sprintf("%09d", strlen($table->ADD_TAB_UID));
                 $fsData = sprintf("%09d", strlen($SDATA));
                 $fsbufferType = sprintf("%09d", strlen($bufferType));
                 $bytesSaved += fwrite($fp, $fsbufferType);
                 //writing the size of $oData
                 $bytesSaved += fwrite($fp, $bufferType);
                 //writing the $oData
                 $bytesSaved += fwrite($fp, $fsUid);
                 //writing the size of xml file
                 $bytesSaved += fwrite($fp, $table->ADD_TAB_UID);
                 //writing the xmlfile
                 $bytesSaved += fwrite($fp, $fsData);
                 //writing the size of xml file
                 $bytesSaved += fwrite($fp, $SDATA);
                 //writing the xmlfile
             }
             if ($table->_DATA) {
                 //export data
                 $oAdditionalTables = new additionalTables();
                 $tableData = $oAdditionalTables->getAllData($table->ADD_TAB_UID, null, null, false);
                 $SDATA = serialize($tableData['rows']);
                 $bufferType = '@DATA';
                 $fsbufferType = sprintf("%09d", strlen($bufferType));
                 $fsTableName = sprintf("%09d", strlen($table->ADD_TAB_NAME));
                 $fsData = sprintf("%09d", strlen($SDATA));
                 $bytesSaved += fwrite($fp, $fsbufferType);
                 //writing type size
                 $bytesSaved += fwrite($fp, $bufferType);
                 //writing type
                 $bytesSaved += fwrite($fp, $fsTableName);
                 //writing the size of xml file
                 $bytesSaved += fwrite($fp, $table->ADD_TAB_NAME);
                 //writing the xmlfile
                 $bytesSaved += fwrite($fp, $fsData);
                 //writing the size of xml file
                 $bytesSaved += fwrite($fp, $SDATA);
                 //writing the xmlfile
             }
         }
         fclose($fp);
         $filenameLink = "pmTables/streamExported?f={$filenameOnly}";
         $size = round($bytesSaved / 1024, 2) . " Kb";
         $meta = "<pre>" . $META . "</pre>";
         $filename = $filenameOnly;
         $link = $filenameLink;
         $result->success = true;
         $result->filename = $filenameOnly;
//.........这里部分代码省略.........
开发者ID:ralpheav,项目名称:processmaker,代码行数:101,代码来源:pmTablesProxy.php

示例5: services

 $template->assign('processUid', $sPRO_UID);
 $template->assign('dynaformUid', $sDYNAFORM);
 $template->assign('taskUid', $sTASKS);
 $template->assign('wsUser', $sWS_USER);
 $template->assign('wsPass', Bootstrap::hashPassword($sWS_PASS, '', true));
 $template->assign('wsRoundRobin', $sWS_ROUNDROBIN);
 G::auditLog('WebEntry', 'Generate web entry with web services (' . $dynTitle . '.php) in process "' . $resultProcess['PRO_TITLE'] . '"');
 if ($sWE_USR == "2") {
     $template->assign('USR_VAR', "\$cInfo = ws_getCaseInfo(\$caseId);\n\t  \$USR_UID = \$cInfo->currentUsers->userId;");
 } else {
     $template->assign('USR_VAR', '$USR_UID = -1;');
 }
 $template->assign('dynaform', $dynTitle);
 $template->assign('timestamp', date('l jS \\of F Y h:i:s A'));
 $template->assign('ws', SYS_SYS);
 $template->assign('version', System::getVersion());
 $fileName = $pathProcess . $dynTitle . 'Post.php';
 file_put_contents($fileName, $template->getOutputContent());
 //creating the third file, only if this wsClient.php file doesn't exist.
 $fileName = $pathProcess . 'wsClient.php';
 $pluginTpl = PATH_CORE . "templates" . PATH_SEP . "processes" . PATH_SEP . "wsClient.php";
 if (file_exists($fileName)) {
     if (filesize($fileName) != filesize($pluginTpl)) {
         @copy($fileName, $pathProcess . 'wsClient.php.bck');
         @unlink($fileName);
         $template = new TemplatePower($pluginTpl);
         $template->prepare();
         file_put_contents($fileName, $template->getOutputContent());
     }
 } else {
     $template = new TemplatePower($pluginTpl);
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:processes_webEntryGenerate.php

示例6: export

 public function export()
 {
     G::LoadSystem('i18n_po');
     G::LoadClass("system");
     //get labels MichelangeloFE
     try {
         $oTranslation = new Translation();
         $MichelangeloFE = PATH_HOME . "../workflow/public_html/lib/js";
         if (file_exists($MichelangeloFE)) {
             $labels = self::readLabelsDirectory($MichelangeloFE, true);
             foreach ($labels as $label) {
                 $oTranslation->addTranslation('LABEL', 'ID_MAFE_' . G::encryptOld($label), 'en', $label);
             }
         }
     } catch (Exception $e) {
         error_log($e->getMessage());
     }
     //creating the .po file
     $sPOFile = PATH_CORE . 'content' . PATH_SEP . 'translations' . PATH_SEP . MAIN_POFILE . '.' . $_GET['LOCALE'] . '.po';
     $poFile = new i18n_PO($sPOFile);
     $poFile->buildInit();
     $language = new Language();
     $locale = $_GET['LOCALE'];
     $_TARGET_LANG = $_GET['LOCALE'];
     $_BASE_LANG = 'en';
     if (strpos($locale, Translation::$localeSeparator) !== false) {
         list($LAN_ID, $IC_UID) = explode(Translation::$localeSeparator, $_GET['LOCALE']);
         $iCountry = new IsoCountry();
         $iCountryRecord = $iCountry->findById($IC_UID);
         if (!isset($iCountryRecord['IC_UID'])) {
             throw new Exception("Country Target ID '{$_GET['LAN_ID']}' doesn't exist!");
         }
         $sCountry = $iCountryRecord['IC_NAME'];
     } else {
         $LAN_ID = $locale;
         $sCountry = $IC_UID = '';
     }
     $langRecord = $language->findById($LAN_ID);
     if (!isset($langRecord['LAN_NAME'])) {
         throw new Exception("Language Target ID \"{$LAN_ID}\" doesn't exist!");
     }
     $sLanguage = $langRecord['LAN_NAME'];
     //setting headers
     $poFile->addHeader('Project-Id-Version', 'ProcessMaker ' . System::getVersion());
     $poFile->addHeader('POT-Creation-Date', '');
     $poFile->addHeader('PO-Revision-Date', date('Y-m-d H:i:s'));
     $poFile->addHeader('Last-Translator', '');
     $poFile->addHeader('Language-Team', 'Colosa Developers Team <developers@colosa.com>');
     $poFile->addHeader('MIME-Version', '1.0');
     $poFile->addHeader('Content-Type', 'text/plain; charset=utf-8');
     $poFile->addHeader('Content-Transfer_Encoding', '8bit');
     $poFile->addHeader('X-Poedit-Language', ucwords($sLanguage));
     $poFile->addHeader('X-Poedit-Country', ucwords($sCountry));
     $poFile->addHeader('X-Poedit-SourceCharset', 'utf-8');
     $poFile->addHeader('Content-Transfer-Encoding', '8bit');
     $aLabels = array();
     $aMsgids = array('' => true);
     // selecting all translations records of base language 'en' on TRANSLATIONS table
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(TranslationPeer::TRN_CATEGORY);
     $oCriteria->addSelectColumn(TranslationPeer::TRN_ID);
     $oCriteria->addSelectColumn(TranslationPeer::TRN_VALUE);
     $oCriteria->add(TranslationPeer::TRN_LANG, 'en');
     $oDataset = TranslationPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $targetLangRecords = array();
     // retrieve the translation for the target language
     if ($LAN_ID != 'en') {
         // only if it is different language than base language 'en'
         $c = new Criteria('workflow');
         $c->addSelectColumn(TranslationPeer::TRN_CATEGORY);
         $c->addSelectColumn(TranslationPeer::TRN_ID);
         $c->addSelectColumn(TranslationPeer::TRN_VALUE);
         $c->add(TranslationPeer::TRN_LANG, $_GET['LOCALE']);
         $ds = TranslationPeer::doSelectRS($c);
         $ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         while ($ds->next()) {
             $row = $ds->getRow();
             $targetLangRecords[$row['TRN_CATEGORY'] . '/' . $row['TRN_ID']] = $row['TRN_VALUE'];
         }
     }
     // get the respective translation for each english label
     while ($oDataset->next()) {
         $aRow1 = $oDataset->getRow();
         $trnCategory = trim($aRow1['TRN_CATEGORY']);
         # Validation, validate that the TRN_CATEGORY contains valid characteres
         preg_match("/^[0-9a-zA-Z_-]+/", $trnCategory, $sTestResult);
         // IF the translations id "TRN_ID" has invalid characteres or has not accepted categories
         if ($sTestResult[0] !== $trnCategory || $trnCategory != 'LABEL' && $trnCategory != 'JAVASCRIPT') {
             $oTranslation = new Translation();
             $oTranslation->remove($aRow1['TRN_CATEGORY'], $aRow1['TRN_ID'], 'en');
             //remove not accepted translations
             continue;
             //jump to next iteration
         }
         // retrieve the translation for the target language
         if ($LAN_ID != 'en') {
             // only if it is different language than base language 'en'
             if (isset($targetLangRecords[$aRow1['TRN_CATEGORY'] . '/' . $aRow1['TRN_ID']])) {
                 $msgstr = $targetLangRecords[$aRow1['TRN_CATEGORY'] . '/' . $aRow1['TRN_ID']] != '' ? $targetLangRecords[$aRow1['TRN_CATEGORY'] . '/' . $aRow1['TRN_ID']] : $aRow1['TRN_VALUE'];
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:Language.php

示例7: switch

 $sSubject = G::LoadTranslation('ID_RESET_PASSWORD') . ' - ProcessMaker';
 $msg = '<h3>ProcessMaker Forgot password Service</h3>';
 $msg .= '<p>' . G::LoadTranslation('ID_YOUR_USERMANE_IS') . ' :  <strong>' . $userData['USR_USERNAME'] . '</strong></p>';
 $msg .= '<p>' . G::LoadTranslation('ID_YOUR_PASSWORD_IS') . ' :  <strong>' . $newPass . '</strong></p>';
 switch ($aSetup['MESS_ENGINE']) {
     case 'MAIL':
         $engine = G::LoadTranslation('ID_MESS_ENGINE_TYPE_1');
         break;
     case 'PHPMAILER':
         $engine = G::LoadTranslation('ID_MESS_ENGINE_TYPE_2');
         break;
     case 'OPENMAIL':
         $engine = G::LoadTranslation('ID_MESS_ENGINE_TYPE_3');
         break;
 }
 $sBody = "\n  <table style=\"background-color: white; font-family: Arial,Helvetica,sans-serif; color: black; font-size: 11px; text-align: left;\" cellpadding='10' cellspacing='0' width='100%'>\n  <tbody><tr><td><img id='logo' src='http://" . $_SERVER['SERVER_NAME'] . "/images/processmaker.logo.jpg' /></td></tr>\n  <tr><td style='font-size: 14px;'>{$msg}</td></tr>\n  <tr><td style='vertical-align:middel;'>\n  <br /><hr><b>This Business Process is powered by ProcessMaker ver. " . System::getVersion() . ".<b><br />\n  <a href='http://www.processmaker.com' style='color:#c40000;'>www.processmaker.com</a><br /></td>\n  </tr></tbody></table>";
 G::LoadClass('spool');
 $oSpool = new spoolRun();
 if ($aSetup['MESS_RAUTH'] == false || is_string($aSetup['MESS_RAUTH']) && $aSetup['MESS_RAUTH'] == 'false') {
     $aSetup['MESS_RAUTH'] = 0;
 } else {
     $aSetup['MESS_RAUTH'] = 1;
 }
 $oSpool->setConfig(array('MESS_ENGINE' => $aSetup['MESS_ENGINE'], 'MESS_SERVER' => $aSetup['MESS_SERVER'], 'MESS_PORT' => $aSetup['MESS_PORT'], 'MESS_ACCOUNT' => $aSetup['MESS_ACCOUNT'], 'MESS_PASSWORD' => $aSetup['MESS_PASSWORD'], 'SMTPAuth' => $aSetup['MESS_RAUTH'], 'SMTPSecure' => $aSetup['SMTPSecure']));
 $passwd = $oSpool->config['MESS_PASSWORD'];
 $passwdDec = G::decrypt($passwd, 'EMAILENCRYPT');
 $auxPass = explode('hash:', $passwdDec);
 if (count($auxPass) > 1) {
     if (count($auxPass) == 2) {
         $passwd = $auxPass[1];
     } else {
开发者ID:ralpheav,项目名称:processmaker,代码行数:31,代码来源:retrivePassword.php

示例8: str_ireplace

 $sContent = str_ireplace('PATH_PLUGINS', "'" . $path . "'", $sContent);
 $sContent = preg_replace("/\\\$oPluginRegistry\\s*=\\s*&\\s*PMPluginRegistry::getSingleton\\s*\\(\\s*\\)\\s*;/i", null, $sContent);
 $sContent = preg_replace("/\\\$oPluginRegistry->registerPlugin\\s*\\(\\s*[\"\\']" . $sClassName . "[\"\\']\\s*,\\s*__FILE__\\s*\\)\\s*;/i", null, $sContent);
 //header('Content-Type: text/plain');var_dump($sClassName, $sContent);die;
 file_put_contents($path . $pluginFile, $sContent);
 $sAux = $sAux . '_';
 include $path . $pluginFile;
 $oClass = new $sAux($sClassName);
 $fVersionNew = $oClass->iVersion;
 if (!isset($oClass->iPMVersion)) {
     $oClass->iPMVersion = 0;
 }
 if ($oClass->iPMVersion > 0) {
     G::LoadClass("system");
     if (System::getVersion() > 0) {
         if ($oClass->iPMVersion > System::getVersion()) {
             //throw new Exception('This plugin needs version ' . $oClass->iPMVersion . ' or higher of ProcessMaker');
         }
     }
 }
 if (!isset($oClass->aDependences)) {
     $oClass->aDependences = null;
 }
 if (!empty($oClass->aDependences)) {
     foreach ($oClass->aDependences as $aDependence) {
         if (file_exists(PATH_PLUGINS . $aDependence['sClassName'] . '.php')) {
             require_once PATH_PLUGINS . $aDependence['sClassName'] . '.php';
             if (!$oPluginRegistry->getPluginDetails($aDependence['sClassName'] . '.php')) {
                 $sDependence = $aDependence['sClassName'];
                 throw new Exception(G::loadTranslation('ID_PLUGIN_DEPENDENCE_PLUGIN', SYS_LANG, array("Dependence" => $sDependence)));
             }
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:pluginsImportFile.php

示例9: save

 function save($params)
 {
     require_once 'classes/model/Event.php';
     global $G_FORM;
     $sPRO_UID = $params->pro_uid;
     $sEVN_UID = $params->evn_uid;
     $sDYNAFORM = $params->initDyna;
     $sWS_USER = trim($params->username);
     $sWS_PASS = trim($params->password);
     $sWS_ROUNDROBIN = '';
     $sWE_USR = '';
     $xDYNA = $params->dynaform;
     if ($xDYNA != '') {
         $pro_uid = $params->pro_uid;
         $filename = $xDYNA;
         $filename = $filename . '.php';
         unlink(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $pro_uid . PATH_SEP . $filename);
         unlink(PATH_DATA . "sites" . PATH_SEP . SYS_SYS . PATH_SEP . "public" . PATH_SEP . $pro_uid . PATH_SEP . str_replace(".php", "Post", $filename) . ".php");
     }
     //return $params;
     G::LoadClass("system");
     $pathProcess = PATH_DATA_SITE . 'public' . PATH_SEP . $sPRO_UID . PATH_SEP;
     G::mk_dir($pathProcess, 0777);
     $oEvent = new Event();
     $oEvent->load($sEVN_UID);
     $sTASKS = $oEvent->getEvnTasUidTo();
     $oTask = new Task();
     $oTask->load($sTASKS);
     $tas_title = $oTask->getTasTitle();
     if (G::is_https()) {
         $http = 'https://';
     } else {
         $http = 'http://';
     }
     $sContent = '';
     $SITE_PUBLIC_PATH = '';
     if (file_exists($SITE_PUBLIC_PATH . '')) {
     }
     require_once 'classes/model/Dynaform.php';
     $oDynaform = new Dynaform();
     $aDynaform = $oDynaform->load($sDYNAFORM);
     $dynTitle = str_replace(' ', '_', str_replace('/', '_', $aDynaform['DYN_TITLE']));
     $sContent = "<?php\n";
     $sContent .= "global \$_DBArray;\n";
     $sContent .= "if (!isset(\$_DBArray)) {\n";
     $sContent .= "  \$_DBArray = array();\n";
     $sContent .= "}\n";
     $sContent .= "\$_SESSION['PROCESS'] = '" . $sPRO_UID . "';\n";
     $sContent .= "\$_SESSION['CURRENT_DYN_UID'] = '" . $sDYNAFORM . "';\n";
     $sContent .= "\$G_PUBLISH = new Publisher;\n";
     $sContent .= "\$G_PUBLISH->AddContent('dynaform', 'xmlform', '" . $sPRO_UID . '/' . $sDYNAFORM . "', '', array(), '" . $dynTitle . 'Post.php' . "');\n";
     $sContent .= "G::RenderPage('publish', 'blank');";
     file_put_contents($pathProcess . $dynTitle . '.php', $sContent);
     //creating the second file, the  post file who receive the post form.
     $pluginTpl = PATH_CORE . 'templates' . PATH_SEP . 'processes' . PATH_SEP . 'webentryPost.tpl';
     $template = new TemplatePower($pluginTpl);
     $template->prepare();
     $template->assign('wsdlUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2');
     $template->assign('wsUploadUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/upload');
     $template->assign('processUid', $sPRO_UID);
     $template->assign('dynaformUid', $sDYNAFORM);
     $template->assign('taskUid', $sTASKS);
     $template->assign('wsUser', $sWS_USER);
     $template->assign('wsPass', 'md5:' . md5($sWS_PASS));
     $template->assign('wsRoundRobin', $sWS_ROUNDROBIN);
     if ($sWE_USR == "2") {
         $template->assign('USR_VAR', "\$cInfo = ws_getCaseInfo(\$caseId);\n\t  \$USR_UID = \$cInfo->currentUsers->userId;");
     } else {
         $template->assign('USR_VAR', '$USR_UID = -1;');
     }
     $template->assign('dynaform', $dynTitle);
     $template->assign('timestamp', date('l jS \\of F Y h:i:s A'));
     $template->assign('ws', SYS_SYS);
     $template->assign('version', System::getVersion());
     $fileName = $pathProcess . $dynTitle . 'Post.php';
     file_put_contents($fileName, $template->getOutputContent());
     //creating the third file, only if this wsClient.php file doesn't exists.
     $fileName = $pathProcess . 'wsClient.php';
     $pluginTpl = PATH_CORE . 'test' . PATH_SEP . 'unit' . PATH_SEP . 'ws' . PATH_SEP . 'wsClient.php';
     if (file_exists($fileName)) {
         if (filesize($fileName) != filesize($pluginTpl)) {
             @copy($fileName, $pathProcess . 'wsClient.php.bck');
             @unlink($fileName);
             $template = new TemplatePower($pluginTpl);
             $template->prepare();
             file_put_contents($fileName, $template->getOutputContent());
         }
     } else {
         $template = new TemplatePower($pluginTpl);
         $template->prepare();
         file_put_contents($fileName, $template->getOutputContent());
     }
     require_once 'classes/model/Event.php';
     $oEvent = new Event();
     $aDataEvent = array();
     $aDataEvent['EVN_UID'] = $sEVN_UID;
     $aDataEvent['EVN_RELATED_TO'] = 'MULTIPLE';
     $aDataEvent['EVN_ACTION'] = $sDYNAFORM;
     $aDataEvent['EVN_CONDITIONS'] = $sWS_USER;
     $output = $oEvent->update($aDataEvent);
//.........这里部分代码省略.........
开发者ID:nshong,项目名称:processmaker,代码行数:101,代码来源:webEntryProxy.php

示例10: ini_get

            die;
            break;
        default:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
    }
}
//calculating the max upload file size;
$POST_MAX_SIZE = ini_get('post_max_size');
$mul = substr($POST_MAX_SIZE, -1);
$mul = $mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1));
$postMaxSize = (int) $POST_MAX_SIZE * $mul;
$UPLOAD_MAX_SIZE = ini_get('upload_max_filesize');
$mul = substr($UPLOAD_MAX_SIZE, -1);
$mul = $mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1));
$uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
if ($postMaxSize < $uploadMaxSize) {
    $uploadMaxSize = $postMaxSize;
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'setup';
$G_ID_MENU_SELECTED = 'SETUP';
$G_ID_SUB_MENU_SELECTED = 'UPGRADE';
G::LoadClass("system");
$Fields['PM_VERSION'] = System::getVersion();
$Fields['MAX_FILE_SIZE'] = $uploadMaxSize . " (" . $UPLOAD_MAX_SIZE . ") ";
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'setup/upgrade', '', $Fields, 'upgrade_System');
G::RenderPage('publishBlank', 'blank');
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:upgrade.php

示例11: restore

 /**
  * restore an archive into a workspace
  *
  * Restores any database and files included in the backup, either as a new
  * workspace, or overwriting a previous one
  *
  * @param string $filename the backup filename
  * @param string $newWorkspaceName if defined, supplies the name for the
  * workspace to restore to
  */
 public static function restore($filename, $srcWorkspace, $dstWorkspace = null, $overwrite = true, $lang = 'en')
 {
     G::LoadThirdParty('pear/Archive', 'Tar');
     $backup = new Archive_Tar($filename);
     //Get a temporary directory in the upgrade directory
     $tempDirectory = PATH_DATA . "upgrade/" . basename(tempnam(__FILE__, ''));
     $parentDirectory = PATH_DATA . "upgrade";
     if (is_writable($parentDirectory)) {
         mkdir($tempDirectory);
     } else {
         throw new Exception("Could not create directory:" . $parentDirectory);
     }
     //Extract all backup files, including database scripts and workspace files
     if (!$backup->extract($tempDirectory)) {
         throw new Exception("Could not extract backup");
     }
     //Search for metafiles in the new standard (the old standard would contain
     //txt files).
     $metaFiles = glob($tempDirectory . "/*.meta");
     if (empty($metaFiles)) {
         $metaFiles = glob($tempDirectory . "/*.txt");
         if (!empty($metaFiles)) {
             return workspaceTools::restoreLegacy($tempDirectory);
         } else {
             throw new Exception("No metadata found in backup");
         }
     } else {
         CLI::logging("Found " . count($metaFiles) . " workspaces in backup:\n");
         foreach ($metaFiles as $metafile) {
             CLI::logging("-> " . basename($metafile) . "\n");
         }
     }
     if (count($metaFiles) > 1 && !isset($srcWorkspace)) {
         throw new Exception("Multiple workspaces in backup but no workspace specified to restore");
     }
     if (isset($srcWorkspace) && !in_array("{$srcWorkspace}.meta", array_map(BASENAME, $metaFiles))) {
         throw new Exception("Workspace {$srcWorkspace} not found in backup");
     }
     $version = System::getVersion();
     $version = explode('-', $version);
     $versionPresent = isset($version[0]) ? $version[0] : '';
     CLI::logging(CLI::warning("\n            Note.- If you try to execute a restore from a generated backup on a recent version of Processmaker\n            than version you are using currently to restore it, it may be occur errors on the restore process,\n            it shouldn't be restaured generated backups on later versions than version when the restore is executed") . "\n");
     foreach ($metaFiles as $metaFile) {
         $metadata = G::json_decode(file_get_contents($metaFile));
         if ($metadata->version != 1) {
             throw new Exception("Backup version {$metadata->version} not supported");
         }
         $backupWorkspace = $metadata->WORKSPACE_NAME;
         if (isset($dstWorkspace)) {
             $workspaceName = $dstWorkspace;
             $createWorkspace = true;
         } else {
             $workspaceName = $metadata->WORKSPACE_NAME;
             $createWorkspace = false;
         }
         if (isset($srcWorkspace) && strcmp($metadata->WORKSPACE_NAME, $srcWorkspace) != 0) {
             CLI::logging(CLI::warning("> Workspace {$backupWorkspace} found, but not restoring.") . "\n");
             continue;
         } else {
             CLI::logging("> Restoring " . CLI::info($backupWorkspace) . " to " . CLI::info($workspaceName) . "\n");
         }
         $workspace = new workspaceTools($workspaceName);
         if ($workspace->workspaceExists()) {
             if ($overwrite) {
                 CLI::logging(CLI::warning("> Workspace {$workspaceName} already exist, overwriting!") . "\n");
             } else {
                 throw new Exception("Destination workspace already exist (use -o to overwrite)");
             }
         }
         if (file_exists($workspace->path)) {
             G::rm_dir($workspace->path);
         }
         foreach ($metadata->directories as $dir) {
             CLI::logging("+> Restoring directory '{$dir}'\n");
             if (file_exists("{$tempDirectory}/{$dir}" . "/ee")) {
                 G::rm_dir("{$tempDirectory}/{$dir}" . "/ee");
             }
             if (file_exists("{$tempDirectory}/{$dir}" . "/plugin.singleton")) {
                 G::rm_dir("{$tempDirectory}/{$dir}" . "/plugin.singleton");
             }
             if (!rename("{$tempDirectory}/{$dir}", $workspace->path)) {
                 throw new Exception("There was an error copying the backup files ({$tempDirectory}/{$dir}) to the workspace directory {$workspace->path}.");
             }
         }
         CLI::logging("> Changing file permissions\n");
         $shared_stat = stat(PATH_DATA);
         if ($shared_stat !== false) {
             workspaceTools::dirPerms($workspace->path, $shared_stat['uid'], $shared_stat['gid'], $shared_stat['mode']);
         } else {
             CLI::logging(CLI::error("Could not get the shared folder permissions, not changing workspace permissions") . "\n");
//.........这里部分代码省略.........
开发者ID:bqevin,项目名称:processmaker,代码行数:101,代码来源:class.wsTools.php

示例12: Configurations

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * 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.
 */
//$oHeadPublisher = & headPublisher::getSingleton();
global $RBAC;
$RBAC->requirePermissions('PM_FACTORY');
G::loadClass('configuration');
$conf = new Configurations();
$pmVersion = preg_match("/^([\\d\\.]+).*\$/", System::getVersion(), $arrayMatch) ? $arrayMatch[1] : "";
//Otherwise: Branch master
$arrayFlagImportFileExtension = array("pm", "pmx", "bpmn");
$arrayFlagMenuNewOption = array("pm" => true, "bpmn" => true);
if ($pmVersion != "") {
    $arrayFlagImportFileExtension = version_compare($pmVersion . "", "3", ">=") ? $arrayFlagImportFileExtension : array("pm");
    $arrayFlagMenuNewOption = version_compare($pmVersion . "", "3", ">=") ? array("bpmn" => true) : array("pm" => true);
}
$pluginRegistry =& PMPluginRegistry::getSingleton();
$arrayMenuNewOptionPlugin = array();
$arrayContextMenuOptionPlugin = array();
foreach ($pluginRegistry->getDesignerMenu() as $value) {
    if (file_exists($value->file)) {
        require_once $value->file;
        $className = "DesignerMenu" . $value->pluginName;
        if (class_exists($className)) {
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:mainInit.php

示例13: phpversion

    $Fields['DATABASE'] = $dbNetView->dbName(DB_ADAPTER) . ' (Version ' . $sMySQLVersion . ')';
    $Fields['DATABASE_SERVER'] = DB_HOST;
    $Fields['DATABASE_NAME'] = DB_NAME;
    $Fields['AVAILABLE_DB'] = $availdb;
} else {
    $Fields['DATABASE'] = "Not defined";
    $Fields['DATABASE_SERVER'] = "Not defined";
    $Fields['DATABASE_NAME'] = "Not defined";
    $Fields['AVAILABLE_DB'] = "Not defined";
}
$eeT = "";
if (class_exists('pmLicenseManager')) {
    $eeT = " - Enterprise Edition";
}
$Fields['PHP'] = phpversion();
$Fields['FLUID'] = System::getVersion() . $eeT;
$Fields['IP'] = lookup($ip);
$Fields['ENVIRONMENT'] = defined("SYS_SYS") ? SYS_SYS : "Not defined";
$Fields['SERVER_SOFTWARE'] = getenv('SERVER_SOFTWARE');
$Fields['SERVER_NAME'] = getenv('SERVER_NAME');
$Fields['SERVER_PROTOCOL'] = getenv('SERVER_PROTOCOL');
$Fields['SERVER_PORT'] = getenv('SERVER_PORT');
$Fields['REMOTE_HOST'] = getenv('REMOTE_HOST');
$Fields['SERVER_ADDR'] = getenv('SERVER_ADDR');
$Fields['HTTP_USER_AGENT'] = getenv('HTTP_USER_AGENT');
$Fields['TIME_ZONE'] = defined('TIME_ZONE') ? TIME_ZONE : "Unknown";
if (!defined('SKIP_RENDER_SYSTEM_INFORMATION')) {
    $G_PUBLISH = new Publisher();
    $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/dbInfo', '', $Fields, 'appNew2');
    G::RenderPage('publish', 'raw');
}
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:dbInfo.php

示例14: Configurations

 *
 * 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.
 */

//$oHeadPublisher = & headPublisher::getSingleton();
global $RBAC;
$RBAC->requirePermissions( 'PM_FACTORY' );

G::loadClass( 'configuration' );
$conf = new Configurations();

$pmVersion = (preg_match("/^([\d\.]+).*$/", System::getVersion(), $arrayMatch))? $arrayMatch[1] : ""; //Otherwise: Branch master

$arrayFlagImportFileExtension = array("pm", "pmx", "bpmn");
$arrayFlagMenuNewOption       = array("pm" => true, "bpmn" => true);

if ($pmVersion != "") {
    $arrayFlagImportFileExtension = (version_compare($pmVersion . "", "3", ">="))? $arrayFlagImportFileExtension : array("pm");
    $arrayFlagMenuNewOption       = (version_compare($pmVersion . "", "3", ">="))? array("bpmn" => true) : array("pm" => true);
}

$pluginRegistry = &PMPluginRegistry::getSingleton();

$arrayMenuNewOptionPlugin     = array();
$arrayContextMenuOptionPlugin = array();

foreach ($pluginRegistry->getDesignerMenu() as $value) {
开发者ID:nhenderson,项目名称:processmaker,代码行数:31,代码来源:mainInit.php

示例15: enterprisePlugin

 public function enterprisePlugin($sNamespace, $sFilename = null)
 {
     $pathPluginTrunk = PATH_CORE . "enterprise";
     $VERSION = System::getVersion();
     $res = parent::PMPlugin($sNamespace, $sFilename);
     $this->sFriendlyName = "ProcessMaker Enterprise Core Edition";
     $this->sDescription = "ProcessMaker Enterprise Core Edition {$VERSION}";
     $this->sPluginFolder = "enterprise";
     $this->sSetupPage = "../enterprise/addonsStore.php";
     $this->iVersion = $VERSION;
     $this->iPMVersion = "2.0.31";
     $this->aDependences = null;
     $this->aWorkspaces = null;
     $this->database = "workflow";
     $this->table = array("ADDONS_STORE", "ADDONS_MANAGER", "LICENSE_MANAGER");
     if (!isset($_SESSION["__EE_INSTALLATION__"])) {
         $_SESSION["__EE_INSTALLATION__"] = 0;
     }
     if (!isset($_SESSION["__EE_SW_PMLICENSEMANAGER__"])) {
         $_SESSION["__EE_SW_PMLICENSEMANAGER__"] = 1;
     }
     $sw = 1;
     $msgf = null;
     $msgd = null;
     if (file_exists(PATH_CORE . "plugins" . PATH_SEP . "pmLicenseManager.php")) {
         $_SESSION["__EE_INSTALLATION__"] = 1;
         $_SESSION["__EE_SW_PMLICENSEMANAGER__"] = 0;
         $plugin = "pmLicenseManager";
         $this->pluginUninstall($plugin);
         if (file_exists(PATH_CORE . "plugins" . PATH_SEP . $plugin . ".php") || file_exists(PATH_CORE . "plugins" . PATH_SEP . $plugin)) {
             $msgf = $msgf . ($msgf != null ? ", " : null) . $plugin . ".php";
             $msgd = $msgd . ($msgd != null ? ", " : null) . $plugin;
             $sw = 0;
         }
         $plugin = "enterprise";
         $this->pluginUninstall($plugin);
         if (file_exists(PATH_CORE . "plugins" . PATH_SEP . $plugin . ".php") || file_exists(PATH_CORE . "plugins" . PATH_SEP . $plugin)) {
             $msgf = $msgf . ($msgf != null ? ", " : null) . $plugin . ".php";
             $msgd = $msgd . ($msgd != null ? ", " : null) . $plugin;
             $sw = 0;
         }
         $this->uninstall();
     } else {
         $_SESSION["__EE_INSTALLATION__"] = $_SESSION["__EE_INSTALLATION__"] + 1;
     }
     if ($sw == 0) {
         unset($_SESSION["__EE_INSTALLATION__"]);
         unset($_SESSION["__EE_SW_PMLICENSEMANAGER__"]);
         ///////
         $js = "window.open(\"/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/main?s=PLUGINS\", \"_top\", \"\");";
         if (substr(SYS_SKIN, 0, 2) == "ux" && SYS_SKIN != "uxs") {
             //$js = "parent.window.location.href = \"/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/main_init?s=PLUGINS\";";
             //$js = "window.location.href = \"/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/pluginsImport\";";
             $js = "window.open(\"/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/main\", \"_top\", \"\");";
         }
         ///////
         G::SendMessageText("ProcessMaker Enterprise plug-in can't delete the files \"{$msgf}\" and directories \"{$msgd}\" of \"" . (PATH_CORE . "plugins") . "\". Before proceeding with the installation of the plug-in must remove them.", "INFO");
         echo "<script type=\"text/javascript\">" . $js . "</script>";
         exit(0);
     }
     if ($_SESSION["__EE_SW_PMLICENSEMANAGER__"] == 0 && $_SESSION["__EE_INSTALLATION__"] == 2) {
         unset($_SESSION["__EE_INSTALLATION__"]);
         unset($_SESSION["__EE_SW_PMLICENSEMANAGER__"]);
         $this->install();
     }
     ///////
     return $res;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:68,代码来源:enterprise.php


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