本文整理汇总了PHP中Vtiger_Language类 的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Language类的具体用法?PHP Vtiger_Language怎么用?PHP Vtiger_Language使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Vtiger_Language类 的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: create_tables
//.........这里部分代码省略.........
$this->db->query("insert into vtiger_parenttab values (3,'Sales',3,0)");
$this->db->query("insert into vtiger_parenttab values (4,'Support',4,0)");
$this->db->query("insert into vtiger_parenttab values (5,'Analytics',5,0)");
$this->db->query("insert into vtiger_parenttab values (6,'Inventory',6,0)");
$this->db->query("insert into vtiger_parenttab values (7,'Tools',7,0)");
$this->db->query("insert into vtiger_parenttab values (8,'Settings',8,0)");
$this->db->query("insert into vtiger_parenttabrel values (1,9,2)");
$this->db->query("insert into vtiger_parenttabrel values (1,28,4)");
$this->db->query("insert into vtiger_parenttabrel values (1,3,1)");
$this->db->query("insert into vtiger_parenttabrel values (3,7,1)");
$this->db->query("insert into vtiger_parenttabrel values (3,6,2)");
$this->db->query("insert into vtiger_parenttabrel values (3,4,3)");
$this->db->query("insert into vtiger_parenttabrel values (3,2,4)");
$this->db->query("insert into vtiger_parenttabrel values (3,20,5)");
$this->db->query("insert into vtiger_parenttabrel values (3,22,6)");
$this->db->query("insert into vtiger_parenttabrel values (3,23,7)");
$this->db->query("insert into vtiger_parenttabrel values (3,19,8)");
$this->db->query("insert into vtiger_parenttabrel values (3,8,9)");
$this->db->query("insert into vtiger_parenttabrel values (4,13,1)");
$this->db->query("insert into vtiger_parenttabrel values (4,15,2)");
$this->db->query("insert into vtiger_parenttabrel values (4,6,3)");
$this->db->query("insert into vtiger_parenttabrel values (4,4,4)");
$this->db->query("insert into vtiger_parenttabrel values (4,8,5)");
$this->db->query("insert into vtiger_parenttabrel values (5,1,2)");
$this->db->query("insert into vtiger_parenttabrel values (5,25,1)");
$this->db->query("insert into vtiger_parenttabrel values (6,14,1)");
$this->db->query("insert into vtiger_parenttabrel values (6,18,2)");
$this->db->query("insert into vtiger_parenttabrel values (6,19,3)");
$this->db->query("insert into vtiger_parenttabrel values (6,21,4)");
$this->db->query("insert into vtiger_parenttabrel values (6,22,5)");
$this->db->query("insert into vtiger_parenttabrel values (6,20,6)");
$this->db->query("insert into vtiger_parenttabrel values (6,23,7)");
$this->db->query("insert into vtiger_parenttabrel values (7,24,1)");
$this->db->query("insert into vtiger_parenttabrel values (7,27,2)");
$this->db->query("insert into vtiger_parenttabrel values (7,8,3)");
$this->db->query("insert into vtiger_parenttabrel values (2,26,1)");
$this->db->query("insert into vtiger_parenttabrel values (2,6,2)");
$this->db->query("insert into vtiger_parenttabrel values (2,4,3)");
$this->db->query("insert into vtiger_parenttabrel values (2,28,4)");
$this->db->query("insert into vtiger_parenttabrel values (4,28,7)");
$this->db->query("insert into vtiger_parenttabrel values (2,7,5)");
$this->db->query("insert into vtiger_parenttabrel values (2,9,6)");
$this->db->query("insert into vtiger_parenttabrel values (4,9,8)");
$this->db->query("insert into vtiger_parenttabrel values (2,8,8)");
$this->db->query("insert into vtiger_parenttabrel values (3,9,11)");
//add settings page to database starts
$this->addEntriesForSettings();
//add settings page to database end
//Added to populate the default inventory tax informations
$vatid = $this->db->getUniqueID("vtiger_inventorytaxinfo");
$salesid = $this->db->getUniqueID("vtiger_inventorytaxinfo");
$serviceid = $this->db->getUniqueID("vtiger_inventorytaxinfo");
$this->db->query("insert into vtiger_inventorytaxinfo values({$vatid},'tax" . $vatid . "','VAT','4.50','0')");
$this->db->query("insert into vtiger_inventorytaxinfo values({$salesid},'tax" . $salesid . "','Sales','10.00','0')");
$this->db->query("insert into vtiger_inventorytaxinfo values({$serviceid},'tax" . $serviceid . "','Service','12.50','0')");
//After added these taxes we should add these taxes as columns in vtiger_inventoryproductrel table
$this->db->query("alter table vtiger_inventoryproductrel add column tax{$vatid} decimal(7,3) default NULL");
$this->db->query("alter table vtiger_inventoryproductrel add column tax{$salesid} decimal(7,3) default NULL");
$this->db->query("alter table vtiger_inventoryproductrel add column tax{$serviceid} decimal(7,3) default NULL");
//Added to handle picklist uniqueid for the picklist values
//$this->db->query("insert into vtiger_picklistvalues_seq values(1)");
//Added to populate the default Shipping & Hanlding tax informations
$shvatid = $this->db->getUniqueID("vtiger_shippingtaxinfo");
$shsalesid = $this->db->getUniqueID("vtiger_shippingtaxinfo");
$shserviceid = $this->db->getUniqueID("vtiger_shippingtaxinfo");
$this->db->query("insert into vtiger_shippingtaxinfo values({$shvatid},'shtax" . $shvatid . "','VAT','4.50','0')");
$this->db->query("insert into vtiger_shippingtaxinfo values({$shsalesid},'shtax" . $shsalesid . "','Sales','10.00','0')");
$this->db->query("insert into vtiger_shippingtaxinfo values({$shserviceid},'shtax" . $shserviceid . "','Service','12.50','0')");
//After added these taxes we should add these taxes as columns in vtiger_inventoryshippingrel table
$this->db->query("alter table vtiger_inventoryshippingrel add column shtax{$shvatid} decimal(7,3) default NULL");
$this->db->query("alter table vtiger_inventoryshippingrel add column shtax{$shsalesid} decimal(7,3) default NULL");
$this->db->query("alter table vtiger_inventoryshippingrel add column shtax{$shserviceid} decimal(7,3) default NULL");
//version file is included here because without including this file version cannot be get
include 'vtigerversion.php';
$this->db->query("insert into vtiger_version values(" . $this->db->getUniqueID('vtiger_version') . ",'" . $vtiger_current_version . "','" . $vtiger_current_version . "')");
//Register default language English
require_once 'vtlib/Vtiger/Language.php';
$vtlanguage = new Vtiger_Language();
// JFV - set Japanese language info into vtiger_language table and set it as default, during default data populator operation. Default user language becomes ja
// $vtlanguage->register('en_us','US English','English',true,true,true);
$vtlanguage->register('en_us', 'US English', 'English', false, true, true);
$vtlanguage->register('ja', 'Japanese (日本語)', 'Japanese', true, true, true);
// JFV END
$this->initWebservices();
/**
* Setup module sequence numbering.
*/
$modseq = array('Leads' => 'LEA', 'Accounts' => 'ACC', 'Campaigns' => 'CAM', 'Contacts' => 'CON', 'Potentials' => 'POT', 'HelpDesk' => 'TT', 'Quotes' => 'QUO', 'SalesOrder' => 'SO', 'PurchaseOrder' => 'PO', 'Invoice' => 'INV', 'Products' => 'PRO', 'Vendors' => 'VEN', 'PriceBooks' => 'PB', 'Faq' => 'FAQ', 'Documents' => 'DOC');
foreach ($modseq as $modname => $prefix) {
$this->addInventoryRows(array(array('semodule' => $modname, 'active' => '1', 'prefix' => $prefix, 'startid' => '1', 'curid' => '1')));
}
// Adding Sharing Types for Reports
$this->db->query("insert into vtiger_reportfilters values(1,'Private')");
$this->db->query("insert into vtiger_reportfilters values(2,'Public')");
$this->db->query("insert into vtiger_reportfilters values(3,'Shared')");
require 'modules/Utilities/Currencies.php';
foreach ($currencies as $key => $value) {
$this->db->query("insert into vtiger_currencies values(" . $this->db->getUniqueID("vtiger_currencies") . ",'{$key}','" . $value[0] . "','" . $value[1] . "')");
}
}
开发者ID:hbsman, 项目名称:vtigercrm-5.3.0-ja, 代码行数:101, 代码来源:DefaultDataPopulator.php
示例2: installVtlibModule
function installVtlibModule($packagename, $packagepath, $customized = false)
{
global $log;
require_once 'vtlib/Vtiger/Package.php';
require_once 'vtlib/Vtiger/Module.php';
$Vtiger_Utils_Log = true;
$package = new Vtiger_Package();
if ($package->isLanguageType($packagepath)) {
$package = new Vtiger_Language();
$package->import($packagepath, true);
return;
}
$module = $package->getModuleNameFromZip($packagepath);
$module_exists = false;
$module_dir_exists = false;
if ($module == null) {
$log->fatal("{$packagename} Module zipfile is not valid!");
} else {
if (Vtiger_Module::getInstance($module)) {
$log->fatal("{$module} already exists!");
$module_exists = true;
}
}
if ($module_exists == false) {
$log->debug("{$module} - Installation starts here");
$package->import($packagepath, true);
$moduleInstance = Vtiger_Module::getInstance($module);
if (empty($moduleInstance)) {
$log->fatal("{$module} module installation failed!");
}
}
}
开发者ID:latechdirect, 项目名称:vtiger, 代码行数:32, 代码来源:utils.php
示例3: VTTaskManager
$invWorkFlow->test = '[{"fieldname":"subject","operation":"does not contain","value":"`!`"}]';
$invWorkFlow->description = "UpdateInventoryProducts On Every Save";
$vtWorkFlow->save($invWorkFlow);
$tm = new VTTaskManager($adb);
$task = $tm->createTask('VTEntityMethodTask', $invWorkFlow->id);
$task->active = true;
$task->methodName = "UpdateInventory";
$tm->saveTask($task);
/* Support to track if a module is of CrmEntity type or not */
ExecuteQuery("ALTER TABLE vtiger_tab ADD COLUMN isentitytype INT NOT NULL DEFAULT 1");
ExecuteQuery("UPDATE vtiger_tab SET isentitytype=0 WHERE name IN ('Home','Dashboard','Rss','Reports','Portal','Users','Recyclebin')");
/* Support for different languages to be stored in database instead of config file - Vtlib */
ExecuteQuery("CREATE TABLE IF NOT EXISTS vtiger_language(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(50), " . "prefix VARCHAR(10), label VARCHAR(30), lastupdated DATETIME, sequence INT, isdefault INT(1), active INT(1)) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
/* Register default language English. This will automatically register all the other langauges from config file */
require_once 'vtlib/Vtiger/Language.php';
$vtlanguage = new Vtiger_Language();
$vtlanguage->register('en_us', 'US English', 'English', true, true, true);
/* To store relationship between the modules in a common table */
ExecuteQuery("CREATE TABLE IF NOT EXISTS vtiger_crmentityrel (crmid int(11) NOT NULL, module varchar(100) NOT NULL, relcrmid int(11) NOT NULL, relmodule varchar(100) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
/* To store the field to module relationship for uitype 10 */
ExecuteQuery("CREATE TABLE IF NOT EXISTS vtiger_fieldmodulerel (fieldid int(11) NOT NULL, module varchar(100) NOT NULL, relmodule varchar(100) NOT NULL,\n \t\t\t\t\tstatus varchar(10) default NULL, sequence int(11) default NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
/* Making users and groups depends on vtiger_users_seq */
$max_grp_id = $adb->query("SELECT MAX(groupid) as maxid from vtiger_groups");
$maxid = $adb->query_result($max_grp_id, 0, "maxid");
$user_result = $adb->query("select max(id) as userid from vtiger_users");
$inc_num = $adb->query_result($user_result, 0, "userid");
$adb->getUniqueId("vtiger_users");
//Creates vtiger_users_seq table if not exists.
$seq_id = $inc_num + $maxid;
$adb->pquery("UPDATE vtiger_users_seq SET id=?", array($seq_id));
$tab_info = array("vtiger_group2grouprel" => array("fk_2_vtiger_group2grouprel", "(groupid)", "vtiger_groups(groupid)"), "vtiger_users2group" => array("fk_1_vtiger_users2group", "(groupid)", "vtiger_groups(groupid)"), "vtiger_group2role" => array("fk_1_vtiger_group2role", "(groupid)", "vtiger_groups(groupid)"), "vtiger_group2rs" => array("fk_1_vtiger_group2rs", "(groupid)", "vtiger_groups(groupid)"), "vtiger_datashare_grp2grp" => array("fk_2_vtiger_datashare_grp2grp", "(share_groupid)", "vtiger_groups(groupid)"), "vtiger_datashare_grp2grp" => array("fk_3_vtiger_datashare_grp2grp", "(to_groupid)", "vtiger_groups(groupid)"), "vtiger_datashare_grp2role" => array("fk_2_vtiger_datashare_grp2role", "(share_groupid)", "vtiger_groups(groupid)"), "vtiger_datashare_role2group" => array("fk_2_vtiger_datashare_role2group", "(to_groupid)", "vtiger_groups(groupid)"), "vtiger_datashare_grp2rs" => array("fk_2_vtiger_datashare_grp2rs", "(share_groupid)", "vtiger_groups(groupid)"), "vtiger_datashare_rs2grp" => array("fk_2_vtiger_datashare_rs2grp", "(to_groupid)", "vtiger_groups(groupid)"), "vtiger_tmp_read_group_sharing_per" => array("fk_1_vtiger_tmp_read_group_sharing_per", "(sharedgroupid)", "vtiger_groups(groupid)"), "vtiger_tmp_write_group_sharing_per" => array("fk_1_vtiger_tmp_write_group_sharing_per", "(sharedgroupid)", "vtiger_groups(groupid)"));
开发者ID:sacredwebsite, 项目名称:vtigercrm, 代码行数:31, 代码来源:504_to_510rc.php
示例4: create_tables
//.........这里部分代码省略.........
$this->db->query("insert into vtiger_parenttab values (2,'Marketing',2,0)");
$this->db->query("insert into vtiger_parenttab values (3,'Sales',3,0)");
$this->db->query("insert into vtiger_parenttab values (4,'Support',4,0)");
$this->db->query("insert into vtiger_parenttab values (5,'Analytics',5,0)");
$this->db->query("insert into vtiger_parenttab values (6,'Inventory',6,0)");
$this->db->query("insert into vtiger_parenttab values (7,'Tools',7,0)");
$this->db->query("insert into vtiger_parenttab values (8,'Settings',8,0)");
$this->db->query("insert into vtiger_parenttabrel values (1,9,2)");
$this->db->query("insert into vtiger_parenttabrel values (1,28,4)");
$this->db->query("insert into vtiger_parenttabrel values (1,3,1)");
$this->db->query("insert into vtiger_parenttabrel values (3,7,1)");
$this->db->query("insert into vtiger_parenttabrel values (3,6,2)");
$this->db->query("insert into vtiger_parenttabrel values (3,4,3)");
$this->db->query("insert into vtiger_parenttabrel values (3,2,4)");
$this->db->query("insert into vtiger_parenttabrel values (3,20,5)");
$this->db->query("insert into vtiger_parenttabrel values (3,22,6)");
$this->db->query("insert into vtiger_parenttabrel values (3,23,7)");
$this->db->query("insert into vtiger_parenttabrel values (3,19,8)");
$this->db->query("insert into vtiger_parenttabrel values (3,8,9)");
$this->db->query("insert into vtiger_parenttabrel values (4,13,1)");
$this->db->query("insert into vtiger_parenttabrel values (4,15,2)");
$this->db->query("insert into vtiger_parenttabrel values (4,6,3)");
$this->db->query("insert into vtiger_parenttabrel values (4,4,4)");
$this->db->query("insert into vtiger_parenttabrel values (4,8,5)");
$this->db->query("insert into vtiger_parenttabrel values (5,1,2)");
$this->db->query("insert into vtiger_parenttabrel values (5,25,1)");
$this->db->query("insert into vtiger_parenttabrel values (6,14,1)");
$this->db->query("insert into vtiger_parenttabrel values (6,18,2)");
$this->db->query("insert into vtiger_parenttabrel values (6,19,3)");
$this->db->query("insert into vtiger_parenttabrel values (6,21,4)");
$this->db->query("insert into vtiger_parenttabrel values (6,22,5)");
$this->db->query("insert into vtiger_parenttabrel values (6,20,6)");
$this->db->query("insert into vtiger_parenttabrel values (6,23,7)");
$this->db->query("insert into vtiger_parenttabrel values (7,24,1)");
$this->db->query("insert into vtiger_parenttabrel values (7,27,2)");
$this->db->query("insert into vtiger_parenttabrel values (7,8,3)");
$this->db->query("insert into vtiger_parenttabrel values (2,26,1)");
$this->db->query("insert into vtiger_parenttabrel values (2,6,2)");
$this->db->query("insert into vtiger_parenttabrel values (2,4,3)");
$this->db->query("insert into vtiger_parenttabrel values (2,28,4)");
$this->db->query("insert into vtiger_parenttabrel values (4,28,7)");
$this->db->query("insert into vtiger_parenttabrel values (2,7,5)");
$this->db->query("insert into vtiger_parenttabrel values (2,9,6)");
$this->db->query("insert into vtiger_parenttabrel values (4,9,8)");
$this->db->query("insert into vtiger_parenttabrel values (2,8,8)");
$this->db->query("insert into vtiger_parenttabrel values (3,9,11)");
//add settings page to database starts
$this->addEntriesForSettings();
//add settings page to database end
//Added to populate the default inventory tax informations
$vatid = $this->db->getUniqueID("vtiger_inventorytaxinfo");
$salesid = $this->db->getUniqueID("vtiger_inventorytaxinfo");
$serviceid = $this->db->getUniqueID("vtiger_inventorytaxinfo");
$this->db->query("insert into vtiger_inventorytaxinfo values({$vatid},'tax" . $vatid . "','VAT','4.50','0')");
$this->db->query("insert into vtiger_inventorytaxinfo values({$salesid},'tax" . $salesid . "','Sales','10.00','0')");
$this->db->query("insert into vtiger_inventorytaxinfo values({$serviceid},'tax" . $serviceid . "','Service','12.50','0')");
//After added these taxes we should add these taxes as columns in vtiger_inventoryproductrel table
$this->db->query("alter table vtiger_inventoryproductrel add column tax{$vatid} decimal(7,3) default NULL");
$this->db->query("alter table vtiger_inventoryproductrel add column tax{$salesid} decimal(7,3) default NULL");
$this->db->query("alter table vtiger_inventoryproductrel add column tax{$serviceid} decimal(7,3) default NULL");
//Added to handle picklist uniqueid for the picklist values
//$this->db->query("insert into vtiger_picklistvalues_seq values(1)");
//Added to populate the default Shipping & Hanlding tax informations
$shvatid = $this->db->getUniqueID("vtiger_shippingtaxinfo");
$shsalesid = $this->db->getUniqueID("vtiger_shippingtaxinfo");
$shserviceid = $this->db->getUniqueID("vtiger_shippingtaxinfo");
$this->db->query("insert into vtiger_shippingtaxinfo values({$shvatid},'shtax" . $shvatid . "','VAT','4.50','0')");
$this->db->query("insert into vtiger_shippingtaxinfo values({$shsalesid},'shtax" . $shsalesid . "','Sales','10.00','0')");
$this->db->query("insert into vtiger_shippingtaxinfo values({$shserviceid},'shtax" . $shserviceid . "','Service','12.50','0')");
//After added these taxes we should add these taxes as columns in vtiger_inventoryshippingrel table
$this->db->query("alter table vtiger_inventoryshippingrel add column shtax{$shvatid} decimal(7,3) default NULL");
$this->db->query("alter table vtiger_inventoryshippingrel add column shtax{$shsalesid} decimal(7,3) default NULL");
$this->db->query("alter table vtiger_inventoryshippingrel add column shtax{$shserviceid} decimal(7,3) default NULL");
//version file is included here because without including this file version cannot be get
include 'vtigerversion.php';
$this->db->query("insert into vtiger_version values(" . $this->db->getUniqueID('vtiger_version') . ",'" . $vtiger_current_version . "','" . $vtiger_current_version . "')");
//Register default language English
require_once 'vtlib/Vtiger/Language.php';
$vtlanguage = new Vtiger_Language();
$vtlanguage->register('en_us', 'US English', 'English', true, true, true);
$this->insertUser2mergefields(0);
$this->insertUser2mergefields(1);
$this->db->query("update vtiger_user2mergefields set visible=1 where fieldid in(1,38,40,65,104,106,111,152,156,255)");
$this->initWebservices();
/**
* Setup module sequence numbering.
*/
$modseq = array('Leads' => 'LEA', 'Accounts' => 'ACC', 'Campaigns' => 'CAM', 'Contacts' => 'CON', 'Potentials' => 'POT', 'HelpDesk' => 'TT', 'Quotes' => 'QUO', 'SalesOrder' => 'SO', 'PurchaseOrder' => 'PO', 'Invoice' => 'INV', 'Products' => 'PRO', 'Vendors' => 'VEN', 'PriceBooks' => 'PB', 'Faq' => 'FAQ', 'Documents' => 'DOC');
foreach ($modseq as $modname => $prefix) {
$this->addInventoryRows(array(array('semodule' => $modname, 'active' => '1', 'prefix' => $prefix, 'startid' => '1', 'curid' => '1')));
}
// Adding Sharing Types for Reports
$this->db->query("insert into vtiger_reportfilters values(1,'Private')");
$this->db->query("insert into vtiger_reportfilters values(2,'Public')");
$this->db->query("insert into vtiger_reportfilters values(3,'Shared')");
require_once 'modules/Utilities/Currencies.php';
foreach ($currencies as $key => $value) {
$this->db->query("insert into vtiger_currencies values(" . $this->db->getUniqueID("vtiger_currencies") . ",'{$key}','" . $value[0] . "','" . $value[1] . "')");
}
}
开发者ID:vtiger-jp, 项目名称:vtigercrm-5.1.x-ja, 代码行数:101, 代码来源:DefaultDataPopulator.php
示例5: updateVtlibModule
function updateVtlibModule($module, $packagepath)
{
global $log, $_installOrUpdateVtlibModule;
if (!file_exists($packagepath)) {
return;
}
if (isset($_installOrUpdateVtlibModule[$module . $packagepath])) {
return;
}
$_installOrUpdateVtlibModule[$module . $packagepath] = 'update';
require_once 'vtlib/Vtiger/Package.php';
require_once 'vtlib/Vtiger/Module.php';
$Vtiger_Utils_Log = defined('INSTALLATION_MODE_DEBUG') ? INSTALLATION_MODE_DEBUG : true;
$package = new Vtiger_Package();
if ($package->isLanguageType($packagepath)) {
require_once 'vtlib/Vtiger/Language.php';
$languagePack = new Vtiger_Language();
$languagePack->update(null, $packagepath, true);
return;
}
if ($module == null) {
$log->fatal("Module name is invalid");
} else {
$moduleInstance = Vtiger_Module::getInstance($module);
if ($moduleInstance || $package->isModuleBundle($packagepath)) {
$log->debug("{$module} - Module instance found - Update starts here");
$package->update($moduleInstance, $packagepath);
} else {
$log->fatal("{$module} doesn't exists!");
}
}
}
开发者ID:yunter, 项目名称:crm, 代码行数:32, 代码来源:utils.php
示例6: updateVtlibModule
function updateVtlibModule($module, $packagepath)
{
global $log;
require_once 'vtlib/Vtiger/Package.php';
require_once 'vtlib/Vtiger/Module.php';
$Vtiger_Utils_Log = true;
$package = new Vtiger_Package();
if ($package->isLanguageType($packagepath)) {
require_once 'vtlib/Vtiger/Language.php';
$languagePack = new Vtiger_Language();
$languagePack->update(null, $packagepath, true);
return;
}
if ($module == null) {
$log->fatal("Module name is invalid");
} else {
$moduleInstance = Vtiger_Module::getInstance($module);
if ($moduleInstance || $package->isModuleBundle($packagepath)) {
$log->debug("{$module} - Module instance found - Update starts here");
$package->update($moduleInstance, $packagepath);
} else {
$log->fatal("{$module} doesn't exists!");
}
}
}
开发者ID:jgjermeni, 项目名称:corebos, 代码行数:25, 代码来源:utils.php
示例7: importManifest
/**
* Import Module from manifest.xml file. Other files should already be in place
* @param String manifest.xml file path
*/
function importManifest($manifestfile)
{
global $adb, $log;
if (!$this->loadManifestFromFile($manifestfile)) {
return false;
}
$module = (string) $this->_modulexml->name;
if ($module != null) {
if ($this->isLanguageType()) {
require_once 'vtlib/Vtiger/Language.php';
$languagePack = new Vtiger_Language();
@$languagePack->register((string) $this->_modulexml->prefix, (string) $this->_modulexml->label, $module);
} else {
$sql = "select tabid from vtiger_tab where name=?";
$result = $adb->pquery($sql, array($module));
if ($result and $adb->num_rows($result) > 0) {
return false;
// module already installed
}
$this->import_Module();
}
} else {
return false;
}
return true;
}
开发者ID:jaimeaga84, 项目名称:corebos, 代码行数:30, 代码来源:PackageImport.php
示例8: insertIntoEntityTable
//.........这里部分代码省略.........
$res = $adb->pquery($sql, array($this->id));
$pick_val = $adb->query_result($res, 0, $columname);
$fldvalue = $pick_val;
} else {
$fldvalue = $this->column_fields[$fieldname];
}
} elseif ($uitype == 5 || $uitype == 6 || $uitype == 23) {
if (isset($current_user->date_format)) {
$fldvalue = getValidDBInsertDateValue($this->column_fields[$fieldname]);
} else {
$fldvalue = $this->column_fields[$fieldname];
}
} elseif ($uitype == 33) {
if (is_array($this->column_fields[$fieldname])) {
$field_list = implode(' |##| ', $this->column_fields[$fieldname]);
} else {
$field_list = $this->column_fields[$fieldname];
}
$fldvalue = $field_list;
} elseif ($uitype == 99) {
$plain_text = $this->column_fields[$fieldname];
$fldvalue = $this->encrypt_password($plain_text, $crypt_type);
// Update the plain-text value with encrypted value and dependent fields
$this->column_fields[$fieldname] = $fldvalue;
$this->column_fields['crypt_type'] = $crypt_type;
$this->column_fields['user_hash'] = $this->get_user_hash($plain_text);
} else {
$fldvalue = $this->column_fields[$fieldname];
$fldvalue = stripslashes($fldvalue);
}
$fldvalue = from_html($fldvalue, $insertion_mode == 'edit' ? true : false);
} else {
$fldvalue = '';
}
if ($uitype == 31) {
$themeList = array_keys(Vtiger_Util_Helper::getAllSkins());
if (!in_array($fldvalue, $themeList) || $fldvalue == '') {
global $default_theme;
if (!empty($default_theme) && in_array($default_theme, $themeList)) {
$fldvalue = $default_theme;
} else {
$fldvalue = $themeList[0];
}
}
if ($current_user->id == $this->id) {
$_SESSION['vtiger_authenticated_user_theme'] = $fldvalue;
}
} elseif ($uitype == 32) {
$languageList = Vtiger_Language::getAll();
$languageList = array_keys($languageList);
if (!in_array($fldvalue, $languageList) || $fldvalue == '') {
$default_language = vglobal('default_language');
if (!empty($default_language) && in_array($default_language, $languageList)) {
$fldvalue = vglobal('default_language');
} else {
$fldvalue = $languageList[0];
}
}
if ($current_user->id == $this->id) {
$_SESSION['authenticated_user_language'] = $fldvalue;
}
}
if ($fldvalue == '') {
$fldvalue = $this->get_column_value($columname, $fldvalue, $fieldname, $uitype, $datatype);
//$fldvalue =null;
}
if ($insertion_mode == 'edit') {
if ($i == 0) {
$update = $columname . "=?";
} else {
$update .= ', ' . $columname . "=?";
}
array_push($update_params, $fldvalue);
} else {
$column .= ", " . $columname;
array_push($qparams, $fldvalue);
}
}
if ($insertion_mode == 'edit') {
//Check done by Don. If update is empty the the query fails
if (trim($update) != '') {
$sql1 = "update {$table_name} set {$update} where " . $this->tab_name_index[$table_name] . "=?";
array_push($update_params, $this->id);
$this->db->pquery($sql1, $update_params);
}
} else {
// Set the crypt_type being used, to override the DB default constraint as it is not in vtiger_field
if ($table_name == 'vtiger_users' && strpos('crypt_type', $column) === false) {
$column .= ', crypt_type';
$qparams[] = $crypt_type;
}
// END
if ($table_name == 'vtiger_users' && strpos('user_hash', $column) === false) {
$column .= ', user_hash';
$qparams[] = $this->column_fields['user_hash'];
}
$sql1 = "insert into {$table_name} ({$column}) values(" . generateQuestionMarks($qparams) . ")";
$this->db->pquery($sql1, $qparams);
}
}
开发者ID:Bergdahls, 项目名称:YetiForceCRM, 代码行数:101, 代码来源:Users.php
示例9: getAllLanguages
/**
* Function to returns all language information
* @return <Array>
*/
public static function getAllLanguages()
{
return Vtiger_Language::getAll();
}
开发者ID:nouphet, 项目名称:vtigercrm-6.0.0-ja, 代码行数:8, 代码来源:LanguageHandler.php
示例10: getOptionalModuleDetails
/**
*
* @param String $packagepath - path to the package file.
* @return Array
*/
static function getOptionalModuleDetails($package, $optionalModulesInfo)
{
global $optionalModuleStrings;
$moduleUpdateVersion = $package->getVersion();
$moduleForVtigerVersion = $package->getDependentVtigerVersion();
$moduleMaxVtigerVersion = $package->getDependentMaxVtigerVersion();
if ($package->isLanguageType()) {
$type = 'language';
} else {
$type = 'module';
}
$moduleDetails = null;
$moduleName = $package->getModuleName();
if ($moduleName != null) {
$moduleDetails = array();
$moduleDetails['description'] = $optionalModuleStrings[$moduleName . '_description'];
if (Vtiger_Version::check($moduleForVtigerVersion, '>=') && Vtiger_Version::check($moduleMaxVtigerVersion, '<')) {
$moduleDetails['selected'] = true;
$moduleDetails['enabled'] = true;
} else {
$moduleDetails['selected'] = false;
$moduleDetails['enabled'] = false;
}
$migrationAction = 'install';
if (!$package->isLanguageType()) {
$moduleInstance = null;
if (Vtiger_Utils::checkTable('vtiger_tab')) {
$moduleInstance = Vtiger_Module::getInstance($moduleName);
}
if ($moduleInstance) {
$migrationAction = 'update';
if (version_compare($moduleUpdateVersion, $moduleInstance->version, '>=')) {
$moduleDetails['enabled'] = false;
}
}
} else {
if (Vtiger_Utils::CheckTable(Vtiger_Language::TABLENAME)) {
$languageList = array_keys(Vtiger_Language::getAll());
$prefix = $package->getPrefix();
if (in_array($prefix, $languageList)) {
$migrationAction = 'update';
}
}
}
$optionalModulesInfo[$migrationAction][$type][$moduleName] = $moduleDetails;
}
return $optionalModulesInfo;
}
开发者ID:hbsman, 项目名称:vtigercrm-5.3.0-ja, 代码行数:53, 代码来源:utils.php
示例11: uninstallExtension
protected function uninstallExtension(Vtiger_Request $request)
{
$extensionName = $request->get('extensionName');
$extensionInstance = Settings_ExtensionStore_Extension_Model::getModuleFromExtnName($extensionName);
$extnType = $extensionInstance->get('extnType');
$response = new Vtiger_Response();
if ($extnType == 'module') {
$extensionInstance->delete();
//Remove extension files
global $root_directory;
$deletePaths = array();
$pathToExtensionLayouts = $root_directory . "layouts/vlayout/modules/{$extensionName}";
$layoutDirAccessible = isFileAccessible($pathToExtensionLayouts);
if ($layoutDirAccessible) {
$deletePaths['layouts'] = $pathToExtensionLayouts;
}
$pathToExtensionModule = $root_directory . "modules/{$extensionName}";
$moduleDirAccessible = isFileAccessible($pathToExtensionModule);
if ($moduleDirAccessible) {
$deletePaths['modules'] = $pathToExtensionModule;
}
foreach ($deletePaths as $dirName) {
$this->deleteRecursively($dirName);
}
$response->setResult(array('success' => true, 'message' => 'extension deleted'));
} else {
if ($extnType == 'language') {
$languageInstance = Settings_ExtensionStore_Extension_Model::getLanguageInstance($extensionName);
if ($languageInstance) {
$langPrefix = $languageInstance->get('prefix');
Vtiger_Language::deregister($langPrefix);
//remove files
$langDir = "languages/{$langPrefix}";
if (isFileAccessible($langDir)) {
$this->deleteRecursively($langDir);
}
}
$response->setResult(array('success' => true, 'message' => 'extension deleted'));
} else {
$response->setError('Error in deleting extension');
}
}
$response->emit();
}
开发者ID:cannking, 项目名称:vtigercrm-debug, 代码行数:44, 代码来源:Basic.php
示例12: create_tables
//.........这里部分代码省略.........
$this->db->query("insert into vtiger_parenttab values (7,'Tools',7,0)");
$this->db->query("insert into vtiger_parenttab values (8,'Settings',8,0)");
$this->db->query("insert into vtiger_parenttabrel values (1,9,2)");
$this->db->query("insert into vtiger_parenttabrel values (1,28,4)");
$this->db->query("insert into vtiger_parenttabrel values (1,3,1)");
$this->db->query("insert into vtiger_parenttabrel values (3,7,1)");
$this->db->query("insert into vtiger_parenttabrel values (3,6,2)");
$this->db->query("insert into vtiger_parenttabrel values (3,4,3)");
$this->db->query("insert into vtiger_parenttabrel values (3,2,4)");
$this->db->query("insert into vtiger_parenttabrel values (3,20,5)");
$this->db->query("insert into vtiger_parenttabrel values (3,22,6)");
$this->db->query("insert into vtiger_parenttabrel values (3,23,7)");
$this->db->query("insert into vtiger_parenttabrel values (3,19,8)");
$this->db->query("insert into vtiger_parenttabrel values (3,8,9)");
$this->db->query("insert into vtiger_parenttabrel values (4,13,1)");
$this->db->query("insert into vtiger_parenttabrel values (4,15,2)");
$this->db->query("insert into vtiger_parenttabrel values (4,6,3)");
$this->db->query("insert into vtiger_parenttabrel values (4,4,4)");
$this->db->query("insert into vtiger_parenttabrel values (4,8,5)");
$this->db->query("insert into vtiger_parenttabrel values (5,1,2)");
$this->db->query("insert into vtiger_parenttabrel values (5,25,1)");
$this->db->query("insert into vtiger_parenttabrel values (6,14,1)");
$this->db->query("insert into vtiger_parenttabrel values (6,18,2)");
$this->db->query("insert into vtiger_parenttabrel values (6,19,3)");
$this->db->query("insert into vtiger_parenttabrel values (6,21,4)");
$this->db->query("insert into vtiger_parenttabrel values (6,22,5)");
$this->db->query("insert into vtiger_parenttabrel values (6,20,6)");
$this->db->query("insert into vtiger_parenttabrel values (6,23,7)");
$this->db->query("insert into vtiger_parenttabrel values (7,24,1)");
$this->db->query("insert into vtiger_parenttabrel values (7,27,2)");
$this->db->query("insert into vtiger_parenttabrel values (7,8,3)");
// SalesPlatform.ru begin
$this->db->query("insert into vtiger_parenttabrel values (7,30,4)");
// SalesPlatform.ru end
$this->db->query("insert into vtiger_parenttabrel values (2,26,1)");
$this->db->query("insert into vtiger_parenttabrel values (2,6,2)");
$this->db->query("insert into vtiger_parenttabrel values (2,4,3)");
$this->db->query("insert into vtiger_parenttabrel values (2,28,4)");
$this->db->query("insert into vtiger_parenttabrel values (4,28,7)");
$this->db->query("insert into vtiger_parenttabrel values (2,7,5)");
$this->db->query("insert into vtiger_parenttabrel values (2,9,6)");
$this->db->query("insert into vtiger_parenttabrel values (4,9,8)");
$this->db->query("insert into vtiger_parenttabrel values (2,8,8)");
$this->db->query("insert into vtiger_parenttabrel values (3,9,11)");
//add settings page to database starts
$this->addEntriesForSettings();
//add settings page to database end
//Added to populate the default inventory tax informations
$vatid = $this->db->getUniqueID("vtiger_inventorytaxinfo");
$salesid = $this->db->getUniqueID("vtiger_inventorytaxinfo");
$serviceid = $this->db->getUniqueID("vtiger_inventorytaxinfo");
//vtiger-ru-fork 27.10.2010 Eugene Babiy
$this->db->query("insert into vtiger_inventorytaxinfo values({$vatid},'tax" . $vatid . "','НДС','18','0')");
//$this->db->query("insert into vtiger_inventorytaxinfo values($salesid,'tax".$salesid."','Sales','10.00','0')");
//$this->db->query("insert into vtiger_inventorytaxinfo values($serviceid,'tax".$serviceid."','Service','12.50','0')");
//After added these taxes we should add these taxes as columns in vtiger_inventoryproductrel table
$this->db->query("alter table vtiger_inventoryproductrel add column tax{$vatid} decimal(7,3) default NULL");
$this->db->query("alter table vtiger_inventoryproductrel add column tax{$salesid} decimal(7,3) default NULL");
$this->db->query("alter table vtiger_inventoryproductrel add column tax{$serviceid} decimal(7,3) default NULL");
//Added to handle picklist uniqueid for the picklist values
//$this->db->query("insert into vtiger_picklistvalues_seq values(1)");
//Added to populate the default Shipping & Hanlding tax informations
$shvatid = $this->db->getUniqueID("vtiger_shippingtaxinfo");
$shsalesid = $this->db->getUniqueID("vtiger_shippingtaxinfo");
$shserviceid = $this->db->getUniqueID("vtiger_shippingtaxinfo");
//vtiger-ru-fork 27.10.2010 Eugene Babiy
$this->db->query("insert into vtiger_shippingtaxinfo values({$shvatid},'shtax" . $shvatid . "','НДС','18','0')");
//$this->db->query("insert into vtiger_shippingtaxinfo values($shsalesid,'shtax".$shsalesid."','Sales','10.00','0')");
//$this->db->query("insert into vtiger_shippingtaxinfo values($shserviceid,'shtax".$shserviceid."','Service','12.50','0')");
//After added these taxes we should add these taxes as columns in vtiger_inventoryshippingrel table
$this->db->query("alter table vtiger_inventoryshippingrel add column shtax{$shvatid} decimal(7,3) default NULL");
$this->db->query("alter table vtiger_inventoryshippingrel add column shtax{$shsalesid} decimal(7,3) default NULL");
$this->db->query("alter table vtiger_inventoryshippingrel add column shtax{$shserviceid} decimal(7,3) default NULL");
//version file is included here because without including this file version cannot be get
include 'vtigerversion.php';
$this->db->query("insert into vtiger_version values(" . $this->db->getUniqueID('vtiger_version') . ",'" . $vtiger_current_version . "','" . $vtiger_current_version . "')");
//Register default language English
require_once 'vtlib/Vtiger/Language.php';
$vtlanguage = new Vtiger_Language();
$vtlanguage->register('en_us', 'US English', 'English', true, true, true);
// vtiger-ru-fork 2010-10-27 22:29:43 Eugene Babiy
$vtlanguage->register('ru_ru', 'RU Русский', 'Русский', true, true, true);
$this->initWebservices();
/**
* Setup module sequence numbering.
*/
$modseq = array('Leads' => 'ОБР_', 'Accounts' => 'КОНТР_', 'Campaigns' => 'КАМП_', 'Contacts' => 'КОНТАКТ_', 'Potentials' => 'СДЕЛКА_', 'HelpDesk' => 'ЗАЯВКА_', 'Quotes' => 'ПР_', 'SalesOrder' => '', 'PurchaseOrder' => 'ЗАК_', 'Invoice' => '', 'Products' => 'ТОВ_', 'Vendors' => 'ПОСТ_', 'PriceBooks' => 'КАТ_', 'Faq' => 'ЧаВо_', 'Documents' => 'ДОК_');
foreach ($modseq as $modname => $prefix) {
$this->addInventoryRows(array(array('semodule' => $modname, 'active' => '1', 'prefix' => $prefix, 'startid' => '1', 'curid' => '1')));
}
// Adding Sharing Types for Reports
$this->db->query("insert into vtiger_reportfilters values(1,'Private')");
$this->db->query("insert into vtiger_reportfilters values(2,'Public')");
$this->db->query("insert into vtiger_reportfilters values(3,'Shared')");
require 'modules/Utilities/Currencies.php';
foreach ($currencies as $key => $value) {
$this->db->query("insert into vtiger_currencies values(" . $this->db->getUniqueID("vtiger_currencies") . ",'{$key}','" . $value[0] . "','" . $value[1] . "')");
}
$this->addDefaultLeadMapping();
}
开发者ID:gitter-badger, 项目名称:openshift-salesplatform, 代码行数:101, 代码来源:DefaultDataPopulator.php
经常有很多初学者问到在delphi中如何调用SQL Server的存储过程?问题其实很好解决,但
阅读:483| 2022-07-18
PacktPublishing/Python-Machine-Learning-Second-Edition: Python Machine Learning
阅读:929| 2022-08-18
There are use-after-free vulnerabilities caused by timer handler in net/rose/ros
阅读:678| 2022-07-08
armancodv/building-energy-model-matlab: It is a small software which is develope
阅读:1112| 2022-08-17
win7系统电脑使用过程中有不少朋友表示遇到过win7系统USB驱动器RAM的状况,当出现win7
阅读:834| 2022-11-06
elipapa/markdown-cv: a simple template to write your CV in a readable markdown f
阅读:484| 2022-08-17
tboronczyk/localization-middleware: PSR-15 middleware to assist primarily with l
阅读:497| 2022-08-16
再的笔顺是什么?再的笔顺笔画顺序怎么写?还有再的拼音及意思是什么,好多初学练字者
阅读:510| 2022-07-30
Call Me Maybe 中英字幕 对于加拿大歌手卡莉·蕾·吉普森很多人有些陌生,她隶属于贾
阅读:574| 2022-11-06
Delphi xe7 android实现透明度可以调整的对话框 要实现对话框透明度可以调
阅读:1551| 2022-07-22
请发表评论