本文整理汇总了PHP中getSettingsBlockId函数 的典型用法代码示例。如果您正苦于以下问题:PHP getSettingsBlockId函数的具体用法?PHP getSettingsBlockId怎么用?PHP getSettingsBlockId使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getSettingsBlockId函数 的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: vtlib_handler
/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
*/
function vtlib_handler($module_name, $event_type)
{
//require_once('include/utils/utils.php');
global $adb;
$module = Vtiger_Module::getInstance($module_name);
if ($event_type == 'module.postinstall') {
//************* Set access right for all profiles ***********************//
//Don't display module name in menu
$adb->pquery("UPDATE vtiger_profile2tab SET permissions=? WHERE tabid=?", array(1, $module->id));
//Don't allow action on the module
$adb->pquery("UPDATE vtiger_profile2standardpermissions SET permissions=? WHERE tabid=?", array(1, $module->id));
//Add link to the module in the Setting Panel
$fieldid = $adb->getUniqueID('vtiger_settings_field');
$blockid = getSettingsBlockId('LBL_MODULE_MANAGER');
$seq_res = $adb->query("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid =1");
$seq = 1;
if ($adb->num_rows($seq_res) > 0) {
$cur_seq = $adb->query_result($seq_res, 0, 'max_seq');
if ($cur_seq != null) {
$seq = $cur_seq + 1;
}
}
$adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence,active) VALUES (?,?,?,?,?,?,?,?)', array($fieldid, 3, $module_name, 'layouts/vlayout/modules/Settings/' . $module_name . '/assets/images/' . $module_name . '.png', 'LBL_' . strtoupper($module_name) . '_DESCRIPTION', 'index.php?module=' . $module_name . '&view=Index&parent=Settings', $seq, 0));
} else {
if ($event_type == 'module.disabled') {
// TODO Handle actions when this module is disabled.
} else {
if ($event_type == 'module.enabled') {
// TODO Handle actions when this module is enabled.
} else {
if ($event_type == 'module.preuninstall') {
$adb->pquery('DELETE FROM vtiger_settings_field WHERE name = ?', array($module_name));
} else {
if ($event_type == 'module.preupdate') {
// TODO Handle actions before this module is updated.
} else {
if ($event_type == 'module.postupdate') {
$query = "SELECT * FROM vtiger_settings_field WHERE name = ?";
$result = $adb->pquery($query, array($module_name));
if ($adb->num_rows($result) == 0) {
$seq_res = $adb->query("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid =1");
$seq = 1;
if ($adb->num_rows($seq_res) > 0) {
$cur_seq = $adb->query_result($seq_res, 0, 'max_seq');
if ($cur_seq != null) {
$seq = $cur_seq + 1;
}
}
$adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence,active) VALUES (?,?,?,?,?,?,?,?)', array($fieldid, 3, $module_name, 'layouts/vlayout/modules/Settings/' . $module_name . '/assets/images/' . $module_name . '.png', 'LBL_' . strtoupper($module_name) . '_DESCRIPTION', 'index.php?module=' . $module_name . '&view=Index&parent=Settings', $seq, 0));
}
}
}
}
}
}
}
}
开发者ID:jmangarret, 项目名称:vtigercrm, 代码行数:62, 代码来源:ModuleDesigner.php
示例2: vtlib_handler
/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type
*/
function vtlib_handler($moduleName, $eventType)
{
require_once 'include/utils/utils.php';
global $adb, $mod_strings;
if ($eventType == 'module.postinstall') {
$portalModules = array("HelpDesk", "Faq", "Products", "Services", "Documents", "Contacts", "Accounts", "Project", "ProjectTask", "ProjectMilestone", "Assets");
$query = "SELECT max(sequence) AS max_tabseq FROM vtiger_customerportal_tabs";
$res = $adb->pquery($query, array());
$tabseq = $adb->query_result($res, 0, 'max_tabseq');
$i = ++$tabseq;
foreach ($portalModules as $module) {
$tabIdResult = $adb->pquery('SELECT tabid FROM vtiger_tab WHERE name=?', array($module));
$tabId = $adb->query_result($tabIdResult, 0, 'tabid');
if ($tabId) {
++$i;
$adb->query("INSERT INTO vtiger_customerportal_tabs (tabid,visible,sequence) VALUES ({$tabId},1,{$i})");
$adb->query("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES ({$tabId},'showrelatedinfo',1)");
}
}
$adb->query("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES (0,'userid',1)");
$adb->query("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES (0,'defaultassignee',1)");
// Mark the module as Standard module
$adb->pquery('UPDATE vtiger_tab SET customized=0 WHERE name=?', array($moduleName));
$fieldid = $adb->getUniqueID('vtiger_settings_field');
$blockid = getSettingsBlockId('LBL_OTHER_SETTINGS');
$seq_res = $adb->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array($blockid));
if ($adb->num_rows($seq_res) > 0) {
$cur_seq = $adb->query_result($seq_res, 0, 'max_seq');
if ($cur_seq != null) {
$seq = $cur_seq + 1;
}
}
$adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence)
VALUES (?,?,?,?,?,?,?)', array($fieldid, $blockid, 'LBL_CUSTOMER_PORTAL', 'portal_icon.png', 'PORTAL_EXTENSION_DESCRIPTION', 'index.php?module=CustomerPortal&action=index&parenttab=Settings', $seq));
} else {
if ($eventType == 'module.disabled') {
// TODO Handle actions when this module is disabled.
} else {
if ($eventType == 'module.enabled') {
// TODO Handle actions when this module is enabled.
} else {
if ($eventType == 'module.preuninstall') {
// TODO Handle actions when this module is about to be deleted.
} else {
if ($eventType == 'module.preupdate') {
// TODO Handle actions before this module is updated.
} else {
if ($eventType == 'module.postupdate') {
// TODO Handle actions after this module is updated.
}
}
}
}
}
}
}
开发者ID:nikdejan, 项目名称:YetiForceCRM, 代码行数:61, 代码来源:CustomerPortal.php
示例3: vtlib_handler
/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type
*/
function vtlib_handler($moduleName, $eventType)
{
require_once 'include/utils/utils.php';
global $adb;
if ($eventType == 'module.postinstall') {
$fieldid = $adb->getUniqueID('vtiger_settings_field');
$blockid = getSettingsBlockId('LBL_MODULE_MANAGER');
$seq_res = $adb->query("SELECT max(sequence) AS max_seq FROM vtiger_settings_field");
$seq = 1;
if ($adb->num_rows($seq_res) > 0) {
$cur_seq = $adb->query_result($seq_res, 0, 'max_seq');
if ($cur_seq != null) {
$seq = $cur_seq + 1;
}
}
$adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence)
VALUES (?,?,?,?,?,?,?)', array($fieldid, $blockid, 'LBL_FIELDFORMULAS', 'modules/FieldFormulas/resources/FieldFormulas.png', 'LBL_FIELDFORMULAS_DESCRIPTION', 'index.php?module=FieldFormulas&action=index&parenttab=Settings', $seq));
$tabid = getTabid('FieldFormulas');
if (isset($tabid) && $tabid != '') {
$adb->pquery('DELETE FROM vtiger_profile2tab WHERE tabid = ?', array($tabid));
}
// Mark the module as Standard module
$adb->pquery('UPDATE vtiger_tab SET customized=0 WHERE name=?', array($moduleName));
} else {
if ($eventType == 'module.disabled') {
$em = new VTEventsManager($adb);
$em->setHandlerInActive('VTFieldFormulasEventHandler');
} else {
if ($eventType == 'module.enabled') {
$em = new VTEventsManager($adb);
$em->setHandlerActive('VTFieldFormulasEventHandler');
} else {
if ($eventType == 'module.preuninstall') {
// TODO Handle actions when this module is about to be deleted.
} else {
if ($eventType == 'module.preupdate') {
// TODO Handle actions before this module is updated.
} else {
if ($eventType == 'module.postupdate') {
// TODO Handle actions after this module is updated.
}
}
}
}
}
}
}
开发者ID:hbsman, 项目名称:vtigercrm-5.3.0-ja, 代码行数:52, 代码来源:FieldFormulas.php
示例4: vtlib_handler
/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type
*/
function vtlib_handler($moduleName, $eventType)
{
global $adb, $currentModule;
$modtrackerModule = Vtiger_Module::getInstance($currentModule);
$otherModuleNames = $this->getModTrackerEnabledModules();
if ($eventType == 'module.postinstall') {
$adb->pquery('UPDATE vtiger_tab SET customized=0 WHERE name=?', array($moduleName));
$fieldid = $adb->getUniqueID('vtiger_settings_field');
$blockid = getSettingsBlockId('LBL_OTHER_SETTINGS');
$seq_res = $adb->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array($blockid));
if ($adb->num_rows($seq_res) > 0) {
$cur_seq = $adb->query_result($seq_res, 0, 'max_seq');
if ($cur_seq != null) {
$seq = $cur_seq + 1;
}
}
$adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence)
VALUES (?,?,?,?,?,?,?)', array($fieldid, $blockid, 'ModTracker', 'set-IcoLoginHistory.gif', 'LBL_MODTRACKER_DESCRIPTION', 'index.php?module=ModTracker&action=BasicSettings&parenttab=Settings&formodule=ModTracker', $seq));
} else {
if ($eventType == 'module.disabled') {
$em = new VTEventsManager($adb);
$em->setHandlerInActive('ModTrackerHandler');
// De-register Common Javascript
$modtrackerModule->deleteLink('HEADERSCRIPT', 'ModTrackerCommon_JS');
} else {
if ($eventType == 'module.enabled') {
$em = new VTEventsManager($adb);
$em->setHandlerActive('ModTrackerHandler');
// Register Common Javascript
$modtrackerModule->addLink('HEADERSCRIPT', 'ModTrackerCommon_JS', 'modules/ModTracker/ModTrackerCommon.js');
} else {
if ($eventType == 'module.preuninstall') {
// TODO Handle actions when this module is about to be deleted.
} else {
if ($eventType == 'module.preupdate') {
// TODO Handle actions before this module is updated.
} else {
if ($eventType == 'module.postupdate') {
// TODO Handle actions after this module is updated.
}
}
}
}
}
}
}
开发者ID:nouphet, 项目名称:vtigercrm-6.0.0-ja, 代码行数:51, 代码来源:ModTracker.php
示例5: vtlib_handler
/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type
*/
function vtlib_handler($moduleName, $eventType)
{
require_once 'include/utils/utils.php';
global $adb, $mod_strings;
if ($eventType == 'module.postinstall') {
$fieldid = $adb->getUniqueID('vtiger_settings_field');
$blockid = getSettingsBlockId('LBL_OTHER_SETTINGS');
$seq_res = $adb->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array($blockid));
if ($adb->num_rows($seq_res) > 0) {
$cur_seq = $adb->query_result($seq_res, 0, 'max_seq');
if ($cur_seq != null) {
$seq = $cur_seq + 1;
}
}
$adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence)
VALUES (?,?,?,?,?,?,?)', array($fieldid, $blockid, 'Scheduler', 'Cron.png', 'Allows you to Configure Cron Task', 'index.php?module=CronTasks&action=ListCronJobs&parenttab=Settings', $seq));
}
}
开发者ID:casati-dolibarr, 项目名称:corebos, 代码行数:23, 代码来源:CronTasks.php
示例6: updateSettings
function updateSettings()
{
global $adb;
$fieldid = $adb->getUniqueID('vtiger_settings_field');
$blockid = getSettingsBlockId('LBL_OTHER_SETTINGS');
$seq_res = $adb->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array($blockid));
if ($adb->num_rows($seq_res) > 0) {
$cur_seq = $adb->query_result($seq_res, 0, 'max_seq');
if ($cur_seq != null) {
$seq = $cur_seq + 1;
}
}
$result = $adb->pquery('SELECT 1 FROM vtiger_settings_field WHERE name=?', array($this->LBL_WEBFORMS));
if (!$adb->num_rows($result)) {
$adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence)
VALUES (?,?,?,?,?,?,?)', array($fieldid, $blockid, $this->LBL_WEBFORMS, 'modules/Webforms/img/Webform.png', 'Allows you to manage Webforms', 'index.php?module=Webforms&action=index&parenttab=Settings', $seq));
}
}
开发者ID:casati-dolibarr, 项目名称:corebos, 代码行数:18, 代码来源:Webforms.php
示例7: checkSettingsField
public function checkSettingsField()
{
global $adb;
$sql = "SELECT * FROM vtiger_settings_field WHERE linkto = 'index.php?module=SwVtTools&view=Index&parent=Settings'";
$result = $adb->query($sql);
if ($adb->num_rows($result) == 0) {
$fieldid = $adb->getUniqueID('vtiger_settings_field');
$blockid = getSettingsBlockId('LBL_OTHER_SETTINGS');
$seq_res = $adb->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array($blockid));
if ($adb->num_rows($seq_res) > 0) {
$cur_seq = $adb->query_result($seq_res, 0, 'max_seq');
if ($cur_seq != null) {
$cur_seq = $cur_seq + 1;
}
}
$adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence)
VALUES (?,?,?,?,?,?,?)', array($fieldid, $blockid, 'Vtiger Tools', '', 'Enhance your CRM', 'index.php?module=SwVtTools&view=Index&parent=Settings', $cur_seq));
}
}
开发者ID:Neodracir, 项目名称:VtigerCRM-Tools, 代码行数:19, 代码来源:SwVtTools.php
示例8: vtlib_handler
/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type
*/
function vtlib_handler($moduleName, $eventType)
{
require_once 'include/utils/utils.php';
require_once 'vtlib/Vtiger/Module.php';
global $adb, $mod_strings;
if ($eventType == 'module.postinstall') {
// Mark the module as Standard module
$adb->pquery('UPDATE vtiger_tab SET customized=0 WHERE name=?', array($moduleName));
$name = 'LBL_TOOLTIP_MANAGEMENT';
$blockname = 'LBL_MODULE_MANAGER';
$icon = 'quickview.png';
$description = 'LBL_TOOLTIP_MANAGEMENT_DESCRIPTION';
$links = 'index.php?module=Tooltip&action=QuickView&parenttab=Settings';
$adb->query("INSERT INTO vtiger_settings_field (fieldid, blockid, name, iconpath, description, linkto) \n\t\t\t\t\t\t\tVALUES (" . $adb->getUniqueID('vtiger_settings_field') . ", " . getSettingsBlockId($blockname) . ", '{$name}', '{$icon}', '{$description}', '{$links}')");
} else {
if ($eventType == 'module.disabled') {
// TODO Handle actions when this module is disabled.
$moduleInstance = Vtiger_Module::getInstance('Tooltip');
$moduleInstance->deleteLink('HEADERSCRIPT', 'ToolTip_HeaderScript', 'modules/Tooltip/TooltipHeaderScript.js');
} else {
if ($eventType == 'module.enabled') {
// TODO Handle actions when this module is enabled.
$moduleInstance = Vtiger_Module::getInstance('Tooltip');
$moduleInstance->addLink('HEADERSCRIPT', 'ToolTip_HeaderScript', 'modules/Tooltip/TooltipHeaderScript.js');
} else {
if ($eventType == 'module.preuninstall') {
// TODO Handle actions when this module is about to be deleted.
} else {
if ($eventType == 'module.preupdate') {
// TODO Handle actions before this module is updated.
} else {
if ($eventType == 'module.postupdate') {
// TODO Handle actions after this module is updated.
}
}
}
}
}
}
}
开发者ID:casati-dolibarr, 项目名称:corebos, 代码行数:45, 代码来源:Tooltip.php
示例9: updateSettings
function updateSettings()
{
$image = 'modules/ListViewColors/images/colored_listview.gif';
$description = 'Edit your filter...';
$linkto = 'index.php?module=ITS4YouAllFilter&parent=Settings&view=List';
$result1 = $this->db->pquery('SELECT 1 FROM vtiger_settings_field WHERE name=?', array($this->LBL_MODULE_NAME_OLD));
if ($this->db->num_rows($result1)) {
$this->db->pquery('UPDATE vtiger_settings_field SET name=?, iconpath=?, description=?, linkto=? WHERE name=?', array($this->LBL_MODULE_NAME, $image, $description, $linkto, $this->LBL_MODULE_NAME_OLD));
}
$result2 = $this->db->pquery('SELECT 1 FROM vtiger_settings_field WHERE name=?', array($this->LBL_MODULE_NAME));
if (!$this->db->num_rows($result2)) {
$fieldid = $this->db->getUniqueID('vtiger_settings_field');
$blockid = getSettingsBlockId('LBL_OTHER_SETTINGS');
$seq_res = $this->db->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array($blockid));
if ($this->db->num_rows($seq_res) > 0) {
$cur_seq = $this->db->query_result($seq_res, 0, 'max_seq');
if ($cur_seq != null) {
$seq = $cur_seq + 1;
}
}
$this->db->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence) VALUES (?,?,?,?,?,?,?)', array($fieldid, $blockid, $this->LBL_MODULE_NAME, $image, $description, $linkto, $seq));
}
}
开发者ID:Wasage, 项目名称:werpa, 代码行数:23, 代码来源:ITS4YouAllFilter.php
示例10: vtlib_handler
/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
*/
function vtlib_handler($modulename, $event_type)
{
$db = PearDatabase::getInstance();
if ($event_type == 'module.postinstall') {
//nadanie numeracji w module
$modfocus = CRMEntity::getInstance($modulename);
$modfocus->setModuleSeqNumber('configure', $modulename, $req_str = '', $req_no = '1');
$sql = "INSERT INTO vtiger_osspdf_config (`conf_id`,`name`,`value`) VALUES ('GENERALCONFIGURATION','ifsave','no'),('GENERALCONFIGURATION','ifattach','no')";
$wykonaj = $db->query($sql, true);
include_once 'vtlib/Vtiger/Module.php';
$names = array('Emails', 'PBXManager', 'ModComments', 'SMSNotifier', 'OSSPdf');
foreach ($names as $id) {
$in .= "'" . $id . "',";
}
$in = trim($in, ',');
$wynik = $db->query("select tabid,name from vtiger_tab where isentitytype='1' and presence<> '2' and name not in ( {$in} )", true);
for ($i = 0; $i < $db->num_rows($wynik); $i++) {
$name = $db->query_result($wynik, $i, "name");
$sql = "INSERT INTO vtiger_osspdf_config (`conf_id`,`name`,`value`) VALUES ('GENERALCONFIGURATION','{$name}','default')";
$wyn = $db->query($sql, true);
if ($name != 'OSSPdf') {
$modCommentsModule = Vtiger_Module::getInstance($name);
$mod = '$MODULE$';
$cat = '$CATEGORY$';
$record = '$RECORD$';
$tekst = "PDFselectedRecords('{$mod}','{$cat}');";
$tekst = "javascript:QuickGenerate('{$mod}','{$cat}','{$record}');";
$modCommentsModule->addLink('DETAILVIEWBASIC', 'Generate default PDF', $tekst, 'Smarty/templates/modules/OSSPdf/gen_domysle_dok.png');
$tekst = "javascript:QuickGenerateMail('{$mod}','{$cat}','{$record}');";
$modCommentsModule->addLink('DETAILVIEWSIDEBARWIDGET', 'Pdf', 'module=OSSPdf&view=ExportPDFRecords&fromdetailview=true');
$modCommentsModule->addLink('LISTVIEWSIDEBARWIDGET', 'Pdf', 'module=OSSPdf&view=ListViewExportPDFRecords&usingmodule=' . $name);
}
}
$fieldid = $db->getUniqueID('vtiger_settings_field');
$blockid = getSettingsBlockId('LBL_OTHER_SETTINGS');
$seq_res = $db->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array($blockid), true);
if ($db->num_rows($seq_res) > 0) {
$cur_seq = $db->query_result($seq_res, 0, 'max_seq');
if ($cur_seq != null) {
$seq = $cur_seq + 1;
}
}
$db->pquery("INSERT INTO vtiger_settings_field ( fieldid, blockid, name, iconpath, description, linkto, sequence ) VALUES ( ?,?,?,?,?,?,? )", array($fieldid, $blockid, 'PDF', 'Smarty/templates/modules/OSSValidation/currency_update_mini.png', "LBL_OSSPDF_INFO", "index.php?module=OSSPdf&view=Index&parent=Settings", $seq), true);
$mods = Vtiger_Module::getInstance("OSSPdf");
$mods->addLink('HEADERSCRIPT', 'PDFUtils', "layouts/vlayout/modules/{$modulename}/resources/PDFUtils.js");
// block export of module
$sql = "UPDATE vtiger_tab SET customized=0 WHERE name='{$modulename}' LIMIT 1;";
$db->query($sql, true);
// TODO Handle post installation actions
} else {
if ($event_type == 'module.disabled') {
// TODO Handle actions when this module is disabled.
$mods = Vtiger_Module::getInstance("OSSPdf");
$mods->deleteLink('HEADERSCRIPT', 'PDFUtils', "layouts/vlayout/modules/{$modulename}/resources/PDFUtils.js");
} else {
if ($event_type == 'module.enabled') {
// TODO Handle actions when this module is enabled.
$mods = Vtiger_Module::getInstance("OSSPdf");
$mods->addLink('HEADERSCRIPT', 'PDFUtils', "layouts/vlayout/modules/{$modulename}/resources/PDFUtils.js");
} else {
if ($event_type == 'module.preuninstall') {
// TODO Handle actions when this module is about to be deleted.
} else {
if ($event_type == 'module.preupdate') {
// TODO Handle actions before this module is updated.
} else {
if ($event_type == 'module.postupdate') {
// TODO Handle actions after this module is updated.
$db->query("UPDATE vtiger_field SET sequence = '16' WHERE columnname = 'osspdf_enable_numbering'");
$res = $db->query("SHOW FULL FIELDS FROM vtiger_osspdf_constraints WHERE FIELD = 'relid'");
if ($db->num_rows($res) == 0) {
$db->query("DROP TABLE vtiger_osspdf_constraints");
$db->query("DROP TABLE vtiger_osspdf_constraints_records");
$db->query("CREATE TABLE `vtiger_osspdf_constraints` (\n\t\t\t\t\t\t\t `id` int(19) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\t `relid` int(19) NOT NULL,\n\t\t\t\t\t\t\t `fieldname` varchar(255) NOT NULL,\n\t\t\t\t\t\t\t `comparator` varchar(255) NOT NULL,\n\t\t\t\t\t\t\t `val` varchar(255) NOT NULL,\n\t\t\t\t\t\t\t `required` tinyint(19) NOT NULL,\n\t\t\t\t\t\t\t `field_type` varchar(100) NOT NULL,\n\t\t\t\t\t\t\t PRIMARY KEY (`id`)\n\t\t\t\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8");
}
}
}
}
}
}
}
}
开发者ID:rcrrich, 项目名称:UpdatePackages, 代码行数:87, 代码来源:OSSPdf.php
示例11: addEntriesForSettings
/**
* this function adds the entries for settings page
* it assumes entries as were present on 10-12-208
*/
function addEntriesForSettings()
{
global $adb;
//icons for all fields
$icons = array("ico-users.gif", "ico-roles.gif", "ico-profile.gif", "ico-groups.gif", "shareaccess.gif", "orgshar.gif", "audit.gif", "set-IcoLoginHistory.gif", "vtlib_modmng.gif", "picklist.gif", "ViewTemplate.gif", "mailmarge.gif", "notification.gif", "inventory.gif", "company.gif", "ogmailserver.gif", "backupserver.gif", "assign.gif", "currency.gif", "taxConfiguration.gif", "system.gif", "proxy.gif", "announ.gif", "set-IcoTwoTabConfig.gif", "terms.gif", "settingsInvNumber.gif", "mailScanner.gif", "settingsWorkflow.png");
//labels for blocks
$blocks = array('LBL_MODULE_MANAGER', 'LBL_USER_MANAGEMENT', 'LBL_STUDIO', 'LBL_COMMUNICATION_TEMPLATES', 'LBL_OTHER_SETTINGS');
//field names
$names = array('LBL_USERS', 'LBL_ROLES', 'LBL_PROFILES', 'USERGROUPLIST', 'LBL_SHARING_ACCESS', 'LBL_FIELDS_ACCESS', 'LBL_AUDIT_TRAIL', 'LBL_LOGIN_HISTORY_DETAILS', 'VTLIB_LBL_MODULE_MANAGER', 'LBL_PICKLIST_EDITOR', 'EMAILTEMPLATES', 'LBL_MAIL_MERGE', 'NOTIFICATIONSCHEDULERS', 'INVENTORYNOTIFICATION', 'LBL_COMPANY_DETAILS', 'LBL_MAIL_SERVER_SETTINGS', 'LBL_BACKUP_SERVER_SETTINGS', 'LBL_ASSIGN_MODULE_OWNERS', 'LBL_CURRENCY_SETTINGS', 'LBL_TAX_SETTINGS', 'LBL_SYSTEM_INFO', 'LBL_PROXY_SETTINGS', 'LBL_ANNOUNCEMENT', 'LBL_DEFAULT_MODULE_VIEW', 'INVENTORYTERMSANDCONDITIONS', 'LBL_CUSTOMIZE_MODENT_NUMBER', 'LBL_MAIL_SCANNER', 'LBL_LIST_WORKFLOWS');
$name_blocks = array('LBL_USERS' => 'LBL_USER_MANAGEMENT', 'LBL_ROLES' => 'LBL_USER_MANAGEMENT', 'LBL_PROFILES' => 'LBL_USER_MANAGEMENT', 'USERGROUPLIST' => 'LBL_USER_MANAGEMENT', 'LBL_SHARING_ACCESS' => 'LBL_USER_MANAGEMENT', 'LBL_FIELDS_ACCESS' => 'LBL_USER_MANAGEMENT', 'LBL_AUDIT_TRAIL' => 'LBL_USER_MANAGEMENT', 'LBL_LOGIN_HISTORY_DETAILS' => 'LBL_USER_MANAGEMENT', 'VTLIB_LBL_MODULE_MANAGER' => 'LBL_STUDIO', 'LBL_PICKLIST_EDITOR' => 'LBL_STUDIO', 'EMAILTEMPLATES' => 'LBL_COMMUNICATION_TEMPLATES', 'LBL_MAIL_MERGE' => 'LBL_COMMUNICATION_TEMPLATES', 'NOTIFICATIONSCHEDULERS' => 'LBL_COMMUNICATION_TEMPLATES', 'INVENTORYNOTIFICATION' => 'LBL_COMMUNICATION_TEMPLATES', 'LBL_COMPANY_DETAILS' => 'LBL_COMMUNICATION_TEMPLATES', 'LBL_MAIL_SERVER_SETTINGS' => 'LBL_OTHER_SETTINGS', 'LBL_BACKUP_SERVER_SETTINGS' => 'LBL_OTHER_SETTINGS', 'LBL_ASSIGN_MODULE_OWNERS' => 'LBL_OTHER_SETTINGS', 'LBL_CURRENCY_SETTINGS' => 'LBL_OTHER_SETTINGS', 'LBL_TAX_SETTINGS' => 'LBL_OTHER_SETTINGS', 'LBL_SYSTEM_INFO' => 'LBL_OTHER_SETTINGS', 'LBL_PROXY_SETTINGS' => 'LBL_OTHER_SETTINGS', 'LBL_ANNOUNCEMENT' => 'LBL_OTHER_SETTINGS', 'LBL_DEFAULT_MODULE_VIEW' => 'LBL_OTHER_SETTINGS', 'INVENTORYTERMSANDCONDITIONS' => 'LBL_OTHER_SETTINGS', 'LBL_CUSTOMIZE_MODENT_NUMBER' => 'LBL_OTHER_SETTINGS', 'LBL_MAIL_SCANNER' => 'LBL_OTHER_SETTINGS', 'LBL_LIST_WORKFLOWS' => 'LBL_OTHER_SETTINGS');
//description for fields
$description = array('LBL_USER_DESCRIPTION', 'LBL_ROLE_DESCRIPTION', 'LBL_PROFILE_DESCRIPTION', 'LBL_GROUP_DESCRIPTION', 'LBL_SHARING_ACCESS_DESCRIPTION', 'LBL_SHARING_FIELDS_DESCRIPTION', 'LBL_AUDIT_DESCRIPTION', 'LBL_LOGIN_HISTORY_DESCRIPTION', 'VTLIB_LBL_MODULE_MANAGER_DESCRIPTION', 'LBL_PICKLIST_DESCRIPTION', 'LBL_EMAIL_TEMPLATE_DESCRIPTION', 'LBL_MAIL_MERGE_DESCRIPTION', 'LBL_NOTIF_SCHED_DESCRIPTION', 'LBL_INV_NOTIF_DESCRIPTION', 'LBL_COMPANY_DESCRIPTION', 'LBL_MAIL_SERVER_DESCRIPTION', 'LBL_BACKUP_SERVER_DESCRIPTION', 'LBL_MODULE_OWNERS_DESCRIPTION', 'LBL_CURRENCY_DESCRIPTION', 'LBL_TAX_DESCRIPTION', 'LBL_SYSTEM_DESCRIPTION', 'LBL_PROXY_DESCRIPTION', 'LBL_ANNOUNCEMENT_DESCRIPTION', 'LBL_DEFAULT_MODULE_VIEW_DESC', 'LBL_INV_TANDC_DESCRIPTION', 'LBL_CUSTOMIZE_MODENT_NUMBER_DESCRIPTION', 'LBL_MAIL_SCANNER_DESCRIPTION', 'LBL_LIST_WORKFLOWS_DESCRIPTION');
$links = array('index.php?module=Administration&action=index&parenttab=Settings', 'index.php?module=Settings&action=listroles&parenttab=Settings', 'index.php?module=Settings&action=ListProfiles&parenttab=Settings', 'index.php?module=Settings&action=listgroups&parenttab=Settings', 'index.php?module=Settings&action=OrgSharingDetailView&parenttab=Settings', 'index.php?module=Settings&action=DefaultFieldPermissions&parenttab=Settings', 'index.php?module=Settings&action=AuditTrailList&parenttab=Settings', 'index.php?module=Settings&action=ListLoginHistory&parenttab=Settings', 'index.php?module=Settings&action=ModuleManager&parenttab=Settings', 'index.php?module=PickList&action=PickList&parenttab=Settings', 'index.php?module=Settings&action=listemailtemplates&parenttab=Settings', 'index.php?module=Settings&action=listwordtemplates&parenttab=Settings', 'index.php?module=Settings&action=listnotificationschedulers&parenttab=Settings', 'index.php?module=Settings&action=listinventorynotifications&parenttab=Settings', 'index.php?module=Settings&action=OrganizationConfig&parenttab=Settings', 'index.php?module=Settings&action=EmailConfig&parenttab=Settings', 'index.php?module=Settings&action=BackupServerConfig&parenttab=Settings', 'index.php?module=Settings&action=ListModuleOwners&parenttab=Settings', 'index.php?module=Settings&action=CurrencyListView&parenttab=Settings', 'index.php?module=Settings&action=TaxConfig&parenttab=Settings', 'index.php?module=System&action=listsysconfig&parenttab=Settings', 'index.php?module=Settings&action=ProxyServerConfig&parenttab=Settings', 'index.php?module=Settings&action=Announcements&parenttab=Settings', 'index.php?module=Settings&action=DefModuleView&parenttab=Settings', 'index.php?module=Settings&action=OrganizationTermsandConditions&parenttab=Settings', 'index.php?module=Settings&action=CustomModEntityNo&parenttab=Settings', 'index.php?module=Settings&action=MailScanner&parenttab=Settings', 'index.php?module=com_vtiger_workflow&action=workflowlist&parenttab=Settings');
//insert settings blocks
$count = count($blocks);
for ($i = 0; $i < $count; $i++) {
$adb->query("insert into vtiger_settings_blocks values (" . $adb->getUniqueID('vtiger_settings_blocks') . ", '{$blocks[$i]}', {$i}+1)");
}
$count = count($icons);
//insert settings fields
for ($i = 0, $seq = 1; $i < $count; $i++, $seq++) {
if ($i == 8 || $i == 12 || $i == 18) {
$seq = 1;
}
$adb->query("insert into vtiger_settings_field (fieldid, blockid, name, iconpath, description, linkto, sequence) values (" . $adb->getUniqueID('vtiger_settings_field') . ", " . getSettingsBlockId($name_blocks[$names[$i]]) . ", '{$names[$i]}', '{$icons[$i]}', '{$description[$i]}', '{$links[$i]}', {$seq})");
}
// for Workflow in settings page of every module
$module_manager_id = getSettingsBlockId('LBL_MODULE_MANAGER');
$result = $adb->pquery("SELECT max(sequence) AS maxseq FROM vtiger_settings_field WHERE blockid = ?", array($module_manager_id));
$maxseq = $adb->query_result($result, 0, 'maxseq');
if ($maxseq < 0 || $maxseq == NULL) {
$maxseq = 1;
}
$adb->pquery("INSERT INTO vtiger_settings_field (fieldid, blockid, name, iconpath, description, linkto, sequence) VALUES (?,?,?,?,?,?,?)", array($adb->getUniqueID('vtiger_settings_field'), $module_manager_id, 'LBL_WORKFLOW_LIST', 'settingsWorkflow.png', 'LBL_AVAILABLE_WORKLIST_LIST', 'index.php?module=com_vtiger_workflow&action=workflowlist', $maxseq));
//hide the system details tab for now
$adb->query("update vtiger_settings_field set active=1 where name='LBL_SYSTEM_INFO'");
}
开发者ID:vtiger-jp, 项目名称:vtigercrm-5.1.x-ja, 代码行数:41, 代码来源:DefaultDataPopulator.php
示例12: checkSettingsField
public function checkSettingsField()
{
${"GLOBALS"}["gievctbisul"] = "sql";
global $adb;
${${"GLOBALS"}["gievctbisul"]} = "DELETE FROM vtiger_settings_field WHERE linkto = \"index.php?module=Workflow2&action=admin&parenttab=Settings\"";
$adb->query(${${"GLOBALS"}["wpvlkaycsb"]});
${${"GLOBALS"}["wpvlkaycsb"]} = "SELECT * FROM vtiger_settings_field WHERE linkto = 'index.php?module=Workflow2&view=Index&parent=Settings'";
${"GLOBALS"}["cbiayvpw"] = "sql";
${${"GLOBALS"}["bcibcujqqmt"]} = $adb->query(${${"GLOBALS"}["cbiayvpw"]});
if ($adb->num_rows(${${"GLOBALS"}["bcibcujqqmt"]}) == 0) {
$btgrjv = "blockid";
${"GLOBALS"}["nnotsyhy"] = "blockid";
${${"GLOBALS"}["jlbeukitbbt"]} = $adb->getUniqueID("vtiger_settings_field");
${${"GLOBALS"}["stmfnngagn"]} = getSettingsBlockId("LBL_OTHER_SETTINGS");
${"GLOBALS"}["ufqcolrptz"] = "fieldid";
$zglcajxlru = "seq_res";
${${"GLOBALS"}["rkvgkge"]} = $adb->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array(${${"GLOBALS"}["nnotsyhy"]}));
if ($adb->num_rows(${$zglcajxlru}) > 0) {
${"GLOBALS"}["soeitd"] = "seq_res";
$ufltelyb = "cur_seq";
$rlxbnlux = "cur_seq";
$bzvtcasyp = "cur_seq";
${$ufltelyb} = $adb->query_result(${${"GLOBALS"}["soeitd"]}, 0, "max_seq");
if (${$bzvtcasyp} != null) {
${$rlxbnlux} = ${${"GLOBALS"}["bohnerpymlw"]} + 1;
}
}
$adb->pquery("INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence)\n VALUES (?,?,?,?,?,?,?)", array(${${"GLOBALS"}["ufqcolrptz"]}, ${$btgrjv}, "Workflow Designer", "Smarty/templates/modules/Workflow2/settings.png", "Design your Workflows", "index.php?module=Workflow2&view=Index&parent=Settings", ${${"GLOBALS"}["bohnerpymlw"]}));
}
}
开发者ID:cin-system, 项目名称:vtigercrm-cin, 代码行数:30, 代码来源:Workflow2.php
示例13: addSettingsField
public function addSettingsField()
{
$ropvgdj = "result";
${"GLOBALS"}["qkwreata"] = "fieldRows";
${"GLOBALS"}["wsmmcoikr"] = "result";
$jjgngbfd = "adb";
${"GLOBALS"}["zfqgzb"] = "fieldRows";
${$jjgngbfd} = PearDatabase::getInstance();
${${"GLOBALS"}["ytonekkqj"]} = "SELECT * FROM vtiger_settings_field WHERE name = 'Colorizer'";
${${"GLOBALS"}["wsmmcoikr"]} = $adb->pquery(${${"GLOBALS"}["ytonekkqj"]});
${${"GLOBALS"}["zfqgzb"]} = $adb->num_rows(${$ropvgdj});
if (${${"GLOBALS"}["fmufepx"]} > 1) {
$ntyymwmpcf = "sql";
$ueiotqwu = "sql";
$uobrpqoqw = "fieldRows";
${$ntyymwmpcf} = "DELETE FROM vtiger_settings_field WHERE name = 'Colorizer'";
$adb->pquery(${$ueiotqwu});
${$uobrpqoqw} = 0;
}
if (${${"GLOBALS"}["qkwreata"]} == 0) {
${"GLOBALS"}["vwdevuuu"] = "maxfieldidRST";
${"GLOBALS"}["srtehntof"] = "fieldid";
${"GLOBALS"}["vpersdd"] = "maxfieldidRST";
${"GLOBALS"}["ydegusyv"] = "seq_res";
${${"GLOBALS"}["srtehntof"]} = $adb->getUniqueID("vtiger_settings_field");
${"GLOBALS"}["gsamwsglse"] = "blockid";
${${"GLOBALS"}["vwdevuuu"]} = $adb->pquery("SELECT max(fieldid) AS fieldid FROM vtiger_settings_field");
${"GLOBALS"}["cdbnnrscoc"] = "maxFieldId";
$sonjqf = "blockid";
${"GLOBALS"}["xlewwb"] = "fieldid";
${"GLOBALS"}["lxtdlbyiftt"] = "blockid";
${${"GLOBALS"}["ofdmgvgy"]} = $adb->query_result(${${"GLOBALS"}["vpersdd"]}, 0, "fieldid");
if (${${"GLOBALS"}["xlewwb"]} < ${${"GLOBALS"}["cdbnnrscoc"]}) {
${"GLOBALS"}["emldgllbaoe"] = "fieldid";
${"GLOBALS"}["akhcywjrbbrc"] = "sql";
${${"GLOBALS"}["emldgllbaoe"]} = ${${"GLOBALS"}["ofdmgvgy"]} + 1;
${${"GLOBALS"}["akhcywjrbbrc"]} = "UPDATE vtiger_settings_field_seq SET id = " . ${${"GLOBALS"}["bqeusk"]};
$adb->pquery(${${"GLOBALS"}["ytonekkqj"]});
}
${$sonjqf} = getSettingsBlockId("LBL_OTHER_SETTINGS");
${${"GLOBALS"}["ydegusyv"]} = $adb->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array(${${"GLOBALS"}["lxtdlbyiftt"]}));
if ($adb->num_rows(${${"GLOBALS"}["aktpogfnlslz"]}) > 0) {
$hujyujt = "seq";
${"GLOBALS"}["nqsbwkewfny"] = "seq_res";
${"GLOBALS"}["fxnmpcoopwk"] = "cur_seq";
${${"GLOBALS"}["dkxraf"]} = $adb->query_result(${${"GLOBALS"}["nqsbwkewfny"]}, 0, "max_seq");
if (${${"GLOBALS"}["fxnmpcoopwk"]} != null) {
${$hujyujt} = ${${"GLOBALS"}["dkxraf"]} + 1;
}
}
$adb->pquery("INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence)\n VALUES (?,?,?,?,?,?,?)", array(${${"GLOBALS"}["bqeusk"]}, ${${"GLOBALS"}["gsamwsglse"]}, "Colorizer", "Smarty/templates/modules/Colorizer/settings.png", "The module to colorize single fields", "index.php?module=Colorizer&view=Index&parent=Settings", ${${"GLOBALS"}["umennrtj"]}), true);
}
}
开发者ID:Wasage, 项目名称:werpa, 代码行数:53, 代码来源:Colorizer.php
示例14: getSettingsFields
/**
* this function returns the fields for the settings page
*/
function getSettingsFields()
{
global $adb;
$sql = "select * from vtiger_settings_field where blockid!=? and active=0 order by blockid,sequence";
$result = $adb->pquery($sql, array(getSettingsBlockId('LBL_MODULE_MANAGER')));
$count = $adb->num_rows($result);
$fields = array();
if ($count > 0) {
for ($i = 0; $i < $count; $i++) {
$blockid = $adb->query_result($result, $i, "blockid");
$iconpath = $adb->query_result($result, $i, "iconpath");
$description = $adb->query_result($result, $i, "description");
$linkto = $adb->query_result($result, $i, "linkto");
$action = getPropertiesFromURL($linkto, "action");
$module = getPropertiesFromURL($linkto, "module");
$name = $adb->query_result($result, $i, "name");
$fields[$blockid][] = array("icon" => $iconpath, "description" => $description, "link" => $linkto, "name" => $name, "action" => $action, "module" => $module);
}
//add blanks for 4-column layout
foreach ($fields as $blockid => &$field) {
if (count($field) > 0 && count($field) < 4) {
for ($i = count($field); $i < 4; $i++) {
$field[$i] = array();
}
}
}
}
return $fields;
}
开发者ID:jgjermeni, 项目名称:corebos, 代码行数:32, 代码来源:utils.php
1. 首先现在matlab2014a,http://pan.baidu.com/s/1pJGF5ov [Matlab2014a(密码:en52
阅读:547| 2022-07-18
bradtraversy/iweather: Ionic 3 mobile weather app
阅读:1650| 2022-08-30
** REJECT ** DO NOT USE THIS CANDIDATE NUMBER. ConsultIDs: none. Reason: This ca
阅读:1573| 2022-07-08
joaomh/curso-de-matlab
阅读:1211| 2022-08-17
魔兽世界怀旧服已经开启两个多月了,但作为一个猎人玩家,抓到“断牙”,已经成为了一
阅读:1066| 2022-11-06
rugk/mastodon-simplified-federation: Simplifies following and interacting with r
阅读:1134| 2022-08-17
Tangshitao/Dense-Scene-Matching: Learning Camera Localization via Dense Scene Ma
阅读:821| 2022-08-16
天字笔顺怎么写?天字笔顺笔画顺序是什么?讲述天字的笔画顺序怎么写了解到好多的写字朋
阅读:467| 2022-07-30
相信不少果粉在对自己的设备进行某些操作时,都会碰到Respring,但这个 Respring 到底
阅读:388| 2022-11-06
ccyrowski/cm-kernel: CyanogenMod Linux Kernel
阅读:746| 2022-08-15
请发表评论