當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Vtiger_Package::languageFromFilesystem方法代碼示例

本文整理匯總了PHP中Vtiger_Package::languageFromFilesystem方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vtiger_Package::languageFromFilesystem方法的具體用法?PHP Vtiger_Package::languageFromFilesystem怎麽用?PHP Vtiger_Package::languageFromFilesystem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Vtiger_Package的用法示例。


在下文中一共展示了Vtiger_Package::languageFromFilesystem方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: vtlib_purify

global $current_user, $adb;
$dl = vtlib_purify($_REQUEST['download']);
$dl = !empty($dl);
if (!$dl) {
    header('Content-Type: text/html; charset=UTF8');
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><title><?php 
    echo $title;
    ?>
</title>
<style type="text/css">@import url("themes/softed/style.css");br { display: block; margin: 2px; }</style>
</head><body class=small style="font-size: 12px; margin: 2px; padding: 2px;">
<?php 
}
set_time_limit(0);
ini_set('memory_limit', '1024M');
if (empty($_REQUEST['languagecode']) or empty($_REQUEST['languagename'])) {
    echo '<br><br><b>Necessary Parameters {languagecode} or {languagename} not present</b><br>';
} else {
    $languagecode = vtlib_purify($_REQUEST['languagecode']);
    $languagename = vtlib_purify($_REQUEST['languagename']);
    Vtiger_Package::languageFromFilesystem($languagecode, $languagename, $dl);
    if ($dl) {
        die;
    }
    echo "<b>Language Package should be exported to the packages/optional directory of your install.</b><br>";
}
?>
</body>
</html>
開發者ID:casati-dolibarr,項目名稱:corebos,代碼行數:31,代碼來源:export_language_filesystem.php

示例2: array

        Vtiger_Package::packageFromFilesystem($module_export, false, true);
    } else {
        $package->export($module, '', "{$module_export}.zip", true);
    }
} else {
    global $adb, $vtiger_current_version;
    $lngrs = $adb->pquery('select * from vtiger_language where prefix=?', array($module_export));
    if ($lngrs and $adb->num_rows($lngrs) == 1) {
        // we have a language file
        $lnginfo = $adb->fetch_array($lngrs);
        $lngxml = 'include/language/' . $lnginfo['prefix'] . '.manifest.xml';
        if (!file_exists($lngxml)) {
            $mnf = fopen($lngxml, 'w');
            fwrite($mnf, "<?xml version='1.0'?>\n");
            fwrite($mnf, "<module>\n");
            fwrite($mnf, "<type>language</type>\n");
            fwrite($mnf, "<name>" . $lnginfo['name'] . "</name>\n");
            fwrite($mnf, "<label>" . $lnginfo['label'] . "</label>\n");
            fwrite($mnf, "<prefix>" . $lnginfo['prefix'] . "</prefix>\n");
            fwrite($mnf, "<version>" . $vtiger_current_version . "</version>\n");
            fwrite($mnf, "<dependencies>\n");
            fwrite($mnf, "  <vtiger_version>" . $vtiger_current_version . "</vtiger_version>\n");
            fwrite($mnf, "  <vtiger_max_version>" . $vtiger_current_version . "</vtiger_max_version>\n");
            fwrite($mnf, "</dependencies>\n");
            fwrite($mnf, "</module>\n");
            fclose($mnf);
        }
        $package->languageFromFilesystem($lnginfo['prefix'], $lnginfo['name'], true);
    }
}
exit;
開發者ID:casati-dolibarr,項目名稱:corebos,代碼行數:31,代碼來源:Export.php


注:本文中的Vtiger_Package::languageFromFilesystem方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。