本文整理汇总了PHP中Vtiger_Package类的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Package类的具体用法?PHP Vtiger_Package怎么用?PHP Vtiger_Package使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Vtiger_Package类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: Vtiger_Package
<?php
require_once 'vtlib/Vtiger/Package.php';
require_once 'vtlib/Vtiger/Module.php';
$package = new Vtiger_Package();
$package->export(Vtiger_Module::getInstance('Deliverynote'), 'test/vtlib', 'Deliverynote.zip', true);
开发者ID:semdinsp,项目名称:vtiger-delivery-notes,代码行数:6,代码来源:vtlib.download.php
示例2: url
?>
<!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['modulename'])) {
echo '<br><br><b>Necessary Parameter {modulename} not present</b><br>';
} else {
$modulename = vtlib_purify($_REQUEST['modulename']);
$module = Vtiger_Module::getInstance($modulename);
if ($module) {
$pkg = new Vtiger_Package();
$pkg->export($module, 'build', $modulename . '.zip', $dl);
if ($dl) {
die;
}
echo "<b>Package should be exported to the build directory of your install.</b><br>";
} else {
echo "<b>Failed to find " . $modulename . " module.</b><br>";
}
}
?>
</body>
</html>
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:export_package_database.php
示例3: applyChange
function applyChange()
{
if ($this->hasError()) {
$this->sendError();
}
if ($this->isApplied()) {
$this->sendMsg('Changeset cbupdate_example already applied!');
} else {
// do your magic here
$this->ExecuteQuery('select 1 from vtiger_cbupdater');
$this->ExecuteQuery('select 1 from vtiger_cbupder');
$package = new Vtiger_Package();
ob_start();
$rdo = $package->importManifest('build/French/manifest.xml');
$out = ob_get_contents();
ob_end_clean();
$this->sendMsg($out);
if ($rdo) {
$this->sendMsg('french installed!');
} else {
$this->sendMsg('NO french!');
}
$this->sendMsg('Changeset cbupdate_example applied!');
$this->markApplied();
}
$this->finishExecution();
}
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:27,代码来源:cbupdateexample.php
示例4: updateUserModuleStep3
public function updateUserModuleStep3(Vtiger_Request $request)
{
$importModuleName = $request->get('module_import_name');
$uploadFile = $request->get('module_import_file');
$uploadDir = Settings_ModuleManager_Extension_Model::getUploadDirectory();
$uploadFileName = "{$uploadDir}/{$uploadFile}";
checkFileAccess($uploadFileName);
$importType = $request->get('module_import_type');
if (strtolower($importType) == 'language') {
$package = new Vtiger_Language();
} else {
if (strtolower($importType) == 'layout') {
$package = new Vtiger_Layout();
} else {
$package = new Vtiger_Package();
}
}
if (strtolower($importType) == 'language' || strtolower($importType) == 'layout') {
$package->import($uploadFileName);
} else {
$package->update(Vtiger_Module::getInstance($importModuleName), $uploadFileName);
}
checkFileAccessForDeletion($uploadFileName);
unlink($uploadFileName);
$result = array('success' => true, 'importModuleName' => $importModuleName);
$response = new Vtiger_Response();
$response->setResult($result);
$response->emit();
}
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:29,代码来源:Basic.php
示例5: getPackage
/**
* Function to get package of this instance
* @return <Vtiger_Package> package object
*/
public function getPackage() {
$packageModel = new Vtiger_Package();
$moduleName = $packageModel->getModuleNameFromZip(self::getUploadDirectory(). '/' .$this->getFileName());
if ($moduleName) {
return $packageModel;
}
return false;
}
开发者ID:Wasage,项目名称:werpa,代码行数:12,代码来源:Extension.php
示例6: applyChange
function applyChange()
{
if ($this->hasError()) {
$this->sendError();
}
if ($this->isApplied()) {
$this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
} else {
$module = 'Mobile';
if ($this->isModuleInstalled($module)) {
//Update module
$package = new Vtiger_Package();
$moduleInstance = Vtiger_Module::getInstance($module);
$package->loadManifestFromFile('modules/' . $module . '/manifest.xml');
$rdo = $package->update_Module($moduleInstance);
$this->sendMsg('Module updated: ' . $module);
} else {
$this->installManifestModule($module);
}
$this->sendMsg('Changeset ' . get_class($this) . ' applied!');
$this->markApplied();
}
$this->finishExecution();
}
开发者ID:kduqi,项目名称:corebos,代码行数:24,代码来源:updateMobileModuleToCrmNow.php
示例7: importUserModuleStep2
public function importUserModuleStep2(Vtiger_Request $request)
{
$viewer = $this->getViewer($request);
$uploadDir = Settings_ModuleManager_Extension_Model::getUploadDirectory();
$qualifiedModuleName = $request->getModule(false);
$uploadFile = 'usermodule_' . time() . '.zip';
$uploadFileName = "{$uploadDir}/{$uploadFile}";
checkFileAccess($uploadDir);
if (!move_uploaded_file($_FILES['moduleZip']['tmp_name'], $uploadFileName)) {
$viewer->assign('MODULEIMPORT_FAILED', true);
} else {
$package = new Vtiger_Package();
$importModuleName = $package->getModuleNameFromZip($uploadFileName);
$importModuleDepVtVersion = $package->getDependentVtigerVersion();
if ($importModuleName == null) {
$viewer->assign('MODULEIMPORT_FAILED', true);
$viewer->assign("MODULEIMPORT_FILE_INVALID", true);
checkFileAccessForDeletion($uploadFileName);
unlink($uploadFileName);
} else {
// We need these information to push for Update if module is detected to be present.
$moduleLicence = vtlib_purify($package->getLicense());
$viewer->assign("MODULEIMPORT_FILE", $uploadFile);
$viewer->assign("MODULEIMPORT_TYPE", $package->type());
$viewer->assign("MODULEIMPORT_NAME", $importModuleName);
$viewer->assign("MODULEIMPORT_DEP_VTVERSION", $importModuleDepVtVersion);
$viewer->assign("MODULEIMPORT_LICENSE", $moduleLicence);
if (!$package->isLanguageType() && !$package->isModuleBundle()) {
$moduleInstance = Vtiger_Module::getInstance($importModuleName);
$moduleimport_exists = $moduleInstance ? "true" : "false";
$moduleimport_dir_name = "modules/{$importModuleName}";
$moduleimport_dir_exists = is_dir($moduleimport_dir_name) ? "true" : "false";
$viewer->assign("MODULEIMPORT_EXISTS", $moduleimport_exists);
$viewer->assign("MODULEIMPORT_DIR", $moduleimport_dir_name);
$viewer->assign("MODULEIMPORT_DIR_EXISTS", $moduleimport_dir_exists);
}
}
}
$viewer->view('ImportUserModuleStep2.tpl', $qualifiedModuleName);
}
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:40,代码来源:ModuleImport.php
示例8: mkdir
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", "themes/{$theme}/images/");
global $modulemanager_uploaddir;
// Defined in modules/Settings/ModuleManager.php
if ($module_import_step == 'Step2') {
if (!is_dir($modulemanager_uploaddir)) {
mkdir($modulemanager_uploaddir);
}
$uploadfile = "usermodule_" . time() . ".zip";
$uploadfilename = "{$modulemanager_uploaddir}/{$uploadfile}";
checkFileAccess($modulemanager_uploaddir);
if (!move_uploaded_file($_FILES['module_zipfile']['tmp_name'], $uploadfilename)) {
$smarty->assign("MODULEIMPORT_FAILED", "true");
} else {
$package = new Vtiger_Package();
$moduleimport_name = $package->getModuleNameFromZip($uploadfilename);
if ($moduleimport_name == null) {
$smarty->assign("MODULEIMPORT_FAILED", "true");
$smarty->assign("MODULEIMPORT_FILE_INVALID", "true");
} else {
if (!$package->isLanguageType()) {
$moduleInstance = Vtiger_Module::getInstance($moduleimport_name);
$moduleimport_exists = $moduleInstance ? "true" : "false";
$moduleimport_dir_name = "modules/{$moduleimport_name}";
$moduleimport_dir_exists = is_dir($moduleimport_dir_name) ? "true" : "false";
$smarty->assign("MODULEIMPORT_EXISTS", $moduleimport_exists);
$smarty->assign("MODULEIMPORT_DIR", $moduleimport_dir_name);
$smarty->assign("MODULEIMPORT_DIR_EXISTS", $moduleimport_dir_exists);
}
$moduleimport_dep_vtversion = $package->getDependentVtigerVersion();
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:Import.php
示例9: vtlib_purify
include_once 'vtlib/Vtiger/Module.php';
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['modulename'])) {
echo '<br><br><b>Necessary Parameter {modulename} not present</b><br>';
} else {
$modulename = vtlib_purify($_REQUEST['modulename']);
Vtiger_Package::packageFromFilesystem($modulename, false, $dl);
if ($dl) {
die;
}
echo "<b>Package should be exported to the packages/optional directory of your install.</b><br>";
}
?>
</body>
</html>
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:export_package_filesystem.php
示例10: installCurrentVersion
public function installCurrentVersion()
{
$this->connect();
$updateURL = $this->getUpdateUrl();
$filename = sys_get_temp_dir() . "/autoupdater." . md5($updateURL) . ".zip";
global $root_directory;
if (!is_writeable(sys_get_temp_dir()) && is_writeable($root_directory . "/test/")) {
$filename = $root_directory . "/test/autoupdater.zip";
}
if (!is_writeable(sys_get_temp_dir()) && !is_writeable($root_directory . "/test/")) {
echo "<strong style='color:red;'>ERROR</strong> - You need to make the <b>test</b> directory inside vtiger root writable for webserver user!";
return;
}
$data = $this->_client->call("downloadVersion", array(base64_encode($updateURL), sha1(base64_encode($updateURL) . "ASD,.2#*")));
if (!empty($_REQUEST["stefanDebug"])) {
/* ONLY DEBUG*/
echo "<pre>";
var_dump($this->_client->debug_str);
}
$data = base64_decode($data);
file_put_contents($filename, $data);
$package = new \Vtiger_Package();
$package->update(\Vtiger_Module::getInstance($this->_extension), $filename);
}
开发者ID:Neodracir,项目名称:VtigerCRM-Tools,代码行数:24,代码来源:AutoUpdate.php
示例11: putMsg
$taskManager->saveTask($task);
$task = $taskManager->createTask('VTEntityMethodTask', $helpDeskWorkflow->id);
$task->active = true;
$task->summary = 'Notify Related Customer on Ticket Change, which is not done from Portal';
$task->methodName = "NotifyParentOnTicketChange";
$taskManager->saveTask($task);
putMsg('Workflow "' . $helpDeskWorkflow->description . '" created!');
$delmods = array('EmailTemplates', 'Google');
foreach ($delmods as $module) {
$mod = Vtiger_Module::getInstance($module);
if ($mod) {
$mod->deleteRelatedLists();
$mod->deleteLinks();
$mod->deinitWebservice();
$mod->delete();
echo "<b>Module {$module} EXTERMINATED!</b><br>";
}
}
$delmods = array('ar_ae', 'sv_se', 'tr_tr', 'pl_pl', 'ro_ro', 'ru_ru');
require_once 'vtlib/Vtiger/Language.php';
foreach ($delmods as $prefix) {
$languagePack = new Vtiger_Language();
@$languagePack->deregister($prefix);
}
$insmods = array('CronTasks', 'ConfigEditor', 'PBXManager', 'cbupdater');
foreach ($insmods as $module) {
$package = new Vtiger_Package();
$rdo = $package->importManifest("modules/{$module}/manifest.xml");
}
$mod = Vtiger_Module::getInstance('ModTracker');
$mod->addLink('HEADERSCRIPT', 'ModTrackerCommon_JS', 'modules/ModTracker/ModTrackerCommon.js');
开发者ID:kduqi,项目名称:corebos,代码行数:31,代码来源:migrate_from_vt60.php
示例12: vtlib_purify
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
********************************************************************************/
$module_export = vtlib_purify($_REQUEST['module_export']);
require_once "vtlib/Vtiger/Package.php";
require_once "vtlib/Vtiger/Module.php";
$package = new Vtiger_Package();
$module = Vtiger_Module::getInstance($module_export);
if ($module) {
if (isset($_REQUEST['manifestfs'])) {
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");
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:Export.php
示例13: Vtiger_Package
<?php
@error_reporting(0);
@ini_set('display_errors', 'off');
@set_time_limit(0);
@ini_set('memory_limit', '1024M');
if (count($argv) == 3) {
$module = $argv[1];
$type = $argv[2];
require_once 'vtlib/Vtiger/Module.php';
require_once 'vtlib/Vtiger/Package.php';
global $current_user, $adb;
$Vtiger_Utils_Log = false;
// Turn off debugging level
$current_user = Users::getActiveAdminUser();
$package = new Vtiger_Package();
$tabrs = $adb->pquery('select count(*) from vtiger_tab where name=?', array($module));
if ($tabrs and $adb->query_result($tabrs, 0, 0) == 1) {
// it exists already so we are updating
if (strtolower($type) == 'language') {
// just copy files and activate
vtlib_toggleModuleAccess($module, true);
} else {
$moduleInstance = Vtiger_Module::getInstance($module);
$package->loadManifestFromFile('modules/' . $module . '/manifest.xml');
$rdo = $package->update_Module($moduleInstance);
}
echo "Module updated: {$module} \n";
} else {
if (strtolower($type) == 'language') {
$rdo = $package->importManifest('include/language/' . $module . '.manifest.xml');
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:composerinstallmodule.php
示例14: Vtiger_Package
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
//5.1.0 RC to 5.1.0 database changes
//we have to use the current object (stored in PatchApply.php) to execute the queries
$adb = $_SESSION['adodb_current_object'];
$conn = $_SESSION['adodb_current_object'];
$migrationlog->debug("\n\nDB Changes from 5.1.0 RC to 5.1.0 -------- Starts \n\n");
require_once 'vtlib/Vtiger/Package.php';
require_once 'vtlib/Vtiger/Module.php';
$package = new Vtiger_Package();
ExecuteQuery("DELETE vtiger_cvcolumnlist FROM vtiger_cvcolumnlist INNER JOIN vtiger_customview WHERE vtiger_cvcolumnlist.columnname LIKE '%vtiger_notes:filename%' AND vtiger_customview.cvid = vtiger_cvcolumnlist.cvid AND vtiger_customview.entitytype='HelpDesk'");
ExecuteQuery("DELETE vtiger_cvcolumnlist FROM vtiger_cvcolumnlist INNER JOIN vtiger_customview WHERE (vtiger_cvcolumnlist.columnname LIKE '%parent_id%' OR vtiger_cvcolumnlist.columnname LIKE '%vtiger_contactdetails%') AND vtiger_customview.cvid = vtiger_cvcolumnlist.cvid AND vtiger_customview.entitytype='Documents'");
ExecuteQuery("DELETE vtiger_cvadvfilter FROM vtiger_cvadvfilter INNER JOIN vtiger_customview WHERE vtiger_cvadvfilter.columnname LIKE '%vtiger_notes:filename%' AND vtiger_customview.cvid = vtiger_cvadvfilter.cvid AND vtiger_customview.entitytype='HelpDesk'");
ExecuteQuery("DELETE vtiger_cvadvfilter FROM vtiger_cvadvfilter INNER JOIN vtiger_customview WHERE (vtiger_cvadvfilter.columnname LIKE '%parent_id%' OR vtiger_cvadvfilter.columnname LIKE '%vtiger_contactdetails%') AND vtiger_customview.cvid = vtiger_cvadvfilter.cvid AND vtiger_customview.entitytype='Documents'");
// Update PBXManager module files
$moduleInstance = Vtiger_Module::getInstance('PBXManager');
$package->initUpdate($moduleInstance, 'packages/5.1.0/mandatory/PBXManager.zip', true);
// Update ServiceContracts module files
$moduleInstance = Vtiger_Module::getInstance('ServiceContracts');
$package->initUpdate($moduleInstance, 'packages/5.1.0/mandatory/ServiceContracts.zip', true);
// Update Services module files
$moduleInstance = Vtiger_Module::getInstance('Services');
$package->initUpdate($moduleInstance, 'packages/5.1.0/mandatory/Services.zip', true);
// Install/Update Optional modules
require_once 'include/utils/installVtlibSelectedModules.php';
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:31,代码来源:510rc_to_510.php
示例15: installSelectedOptionalModules
public static function installSelectedOptionalModules($selected_modules, $source_directory = '', $destination_directory = '')
{
require_once 'vtlib/Vtiger/Package.php';
require_once 'vtlib/Vtiger/Module.php';
require_once 'include/utils/utils.php';
$selected_modules = explode(":", $selected_modules);
$languagePacks = array();
if ($handle = opendir('packages/vtiger/optional')) {
while (false !== ($file = readdir($handle))) {
$filename_arr = explode(".", $file);
if ($filename_arr[count($filename_arr) - 1] != 'zip') {
continue;
}
$packagename = $filename_arr[0];
$packagepath = "packages/vtiger/optional/{$file}";
$package = new Vtiger_Package();
$module = $package->getModuleNameFromZip($packagepath);
if (!empty($packagename) && in_array($module, $selected_modules)) {
if ($package->isLanguageType($packagepath)) {
$languagePacks[$module] = $packagepath;
continue;
}
if ($module != null) {
if ($package->isModuleBundle()) {
$unzip = new Vtiger_Unzip($packagepath);
$unzip->unzipAllEx($package->getTemporaryFilePath());
$moduleInfoList = $package->getAvailableModuleInfoFromModuleBundle();
foreach ($moduleInfoList as $moduleInfo) {
$moduleInfo = (array) $moduleInfo;
$packagepath = $package->getTemporaryFilePath($moduleInfo['filepath']);
$subModule = new Vtiger_Package();
$subModuleName = $subModule->getModuleNameFromZip($packagepath);
$moduleInstance = Vtiger_Module::getInstance($subModuleName);
if ($moduleInstance) {
updateVtlibModule($subModuleName, $packagepath);
} else {
installVtlibModule($subModuleName, $packagepath);
}
}
} else {
$moduleInstance = Vtiger_Module::getInstance($module);
if ($moduleInstance) {
updateVtlibModule($module, $packagepath);
} else {
installVtlibModule($module, $packagepath);
}
}
}
}
}
closedir($handle);
}
foreach ($languagePacks as $module => $packagepath) {
installVtlibModule($module, $packagepath);
continue;
}
}
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:57,代码来源:utils.php
示例16: Vtiger_Package
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
********************************************************************************/
$module_export = $_REQUEST['module_export'];
require_once "vtlib/Vtiger/Package.php";
require_once "vtlib/Vtiger/Module.php";
$package = new Vtiger_Package();
$package->export(Vtiger_Module::getInstance($module_export), '', "{$module_export}.zip", true);
exit;
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:16,代码来源:Export.php
示例17: set_time_limit
<?php
// Turn on debugging level
$Vtiger_Utils_Log = true;
require_once 'vtlib/Vtiger/Module.php';
require_once 'vtlib/Vtiger/Package.php';
global $current_user, $adb;
set_time_limit(0);
ini_set('memory_limit', '1024M');
$current_user = new Users();
$current_user->retrieveCurrentUserInfoFromFile(1);
// admin
$package = new Vtiger_Package();
//$rdo = $package->importManifest('modules/cbupdater/manifest.xml');
//$rdo = $package->importManifest('modules/Webforms/manifest.xml');
//$package->initImport('TSEmail_540.zip', true);
$rdo = $package->importManifest('include/language/it_it.manifest.xml');
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:17,代码来源:installmodule.php
示例18: installModules
/**
* Function installs all the available modules
*/
public static function installModules()
{
require_once 'vtlib/Vtiger/Package.php';
require_once 'vtlib/Vtiger/Module.php';
require_once 'include/utils/utils.php';
$moduleFolders = array('packages/vtiger/mandatory', 'packages/vtiger/optional');
foreach ($moduleFolders as $moduleFolder) {
if ($handle = opendir($moduleFolder)) {
while (false !== ($file = readdir($handle))) {
$packageNameParts = explode(".", $file);
if ($packageNameParts[count($packageNameParts) - 1] != 'zip') {
continue;
}
array_pop($packageNameParts);
$packageName = implode("", $packageNameParts);
if (!empty($packageName)) {
$packagepath = "{$moduleFolder}/{$file}";
$package = new Vtiger_Package();
$module = $package->getModuleNameFromZip($packagepath);
if ($module != null) {
$moduleInstance = Vtiger_Module::getInstance($module);
if ($moduleInstance) {
updateVtlibModule($module, $packagepath);
} else {
installVtlibModule($module, $packagepath);
}
}
}
}
closedir($handle);
}
}
}
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:36,代码来源:Utils.php
示例19: 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
示例20: putMsg
echo '
<tr width="100%">
<td width="25%">' . $status . '</td>
<td width="5%"><font color="red"> F </font></td>
<td width="70%">' . $query . '</td>
</tr>';
$failure_query_array[$failure_query_count++] = $query;
$log->debug("Query Failed ==> {$query} \n Error is ==> [" . $adb->database->ErrorNo() . "]" . $adb->database->ErrorMsg());
}
}
function putMsg($msg)
{
echo '<tr width="100%"><td colspan=3>' . $msg . '</td></tr>';
}
echo "<table width=80% align=center border=1>";
$package = new Vtiger_Package();
ob_start();
$rdo = $package->importManifest("modules/cbupdater/manifest.xml");
$out = ob_get_contents();
ob_end_clean();
putMsg($out);
if ($rdo) {
putMsg("{$module} installed: <a href='index.php?module=cbupdater&action=getupdates'>proceed to the rest of the updates by clicking here</a>");
} else {
putMsg("ERROR installing {$module}!");
}
?>
</table>
<br /><br />
<b style="color:#FF0000">Failed Queries Log</b>
<div id="failedLog" style="border:1px solid #666666;width:90%;position:relative;height:200px;overflow:auto;left:5%;top:10px;">
开发者ID:kduqi,项目名称:corebos,代码行数:31,代码来源:installupdater.php
注:本文中的Vtiger_Package类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论