本文整理汇总了PHP中Settings_Vtiger_Module_Model::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings_Vtiger_Module_Model::getInstance方法的具体用法?PHP Settings_Vtiger_Module_Model::getInstance怎么用?PHP Settings_Vtiger_Module_Model::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Settings_Vtiger_Module_Model
的用法示例。
在下文中一共展示了Settings_Vtiger_Module_Model::getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
public function process(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$recordId = $request->get('record');
$roleName = $request->get('rolename');
$allowassignedrecordsto = $request->get('allowassignedrecordsto');
$moduleModel = Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName);
if (!empty($recordId)) {
$recordModel = Settings_Roles_Record_Model::getInstanceById($recordId);
} else {
$recordModel = new Settings_Roles_Record_Model();
}
if ($request->get('profile_directly_related_to_role') == '1') {
$profileId = $request->get('profile_directly_related_to_role_id');
$profileName = $request->get('profilename');
if (empty($profileName)) {
$profileName = $roleName . '+' . vtranslate('LBL_PROFILE', $qualifiedModuleName);
}
if ($profileId) {
$profileRecordModel = Settings_Profiles_Record_Model::getInstanceById($profileId);
} else {
$profileRecordModel = Settings_Profiles_Record_Model::getInstanceByName($profileName, true);
if (empty($profileRecordModel)) {
$profileRecordModel = new Settings_Profiles_Record_Model();
}
}
$profileRecordModel->set('directly_related_to_role', '1');
$profileRecordModel->set('profilename', $profileName)->set('profile_permissions', $request->get('permissions'));
$profileRecordModel->set('viewall', $request->get('viewall'));
$profileRecordModel->set('editall', $request->get('editall'));
$savedProfileId = $profileRecordModel->save();
$roleProfiles = array($savedProfileId);
} else {
$roleProfiles = $request->get('profiles');
}
$parentRoleId = $request->get('parent_roleid');
if ($recordModel && !empty($parentRoleId)) {
$parentRole = Settings_Roles_Record_Model::getInstanceById($parentRoleId);
$recordModel->set('change_owner', $request->get('change_owner'))->set('searchunpriv', $request->get('searchunpriv'))->set('clendarallorecords', $request->get('clendarallorecords'));
if (!empty($allowassignedrecordsto)) {
$recordModel->set('allowassignedrecordsto', $allowassignedrecordsto);
}
// set the value of assigned records to
if ($parentRole && !empty($roleName) && !empty($roleProfiles)) {
$recordModel->set('rolename', $roleName);
$recordModel->set('profileIds', $roleProfiles);
$parentRole->addChildRole($recordModel);
}
//After role updation recreating user privilege files
if ($roleProfiles) {
foreach ($roleProfiles as $profileId) {
$profileRecordModel = Settings_Profiles_Record_Model::getInstanceById($profileId);
$profileRecordModel->recalculate(array($recordId));
}
}
}
$redirectUrl = $moduleModel->getDefaultUrl();
header("Location: {$redirectUrl}");
}
示例2: process
public function process(Vtiger_Request $request)
{
${"GLOBALS"}["okyyokvqbc"] = "qualifiedModuleName";
$vwyjlnmsxsex = "adb";
global $current_user;
${"GLOBALS"}["ehbgpokeq"] = "settingsModel";
$dfmdljadpv = "request";
global $root_directory;
${$vwyjlnmsxsex} = PearDatabase::getInstance();
${${"GLOBALS"}["vvpygtj"]} = $request->getModule();
${${"GLOBALS"}["okyyokvqbc"]} = $request->getModule(false);
${"GLOBALS"}["tetlgrqblfvi"] = "qualifiedModuleName";
${${"GLOBALS"}["swtibvqegzq"]} = $this->getViewer(${$dfmdljadpv});
${${"GLOBALS"}["ehbgpokeq"]} = Settings_Vtiger_Module_Model::getInstance(${${"GLOBALS"}["tetlgrqblfvi"]});
echo " <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\" width=\"98%\">\n <tr>\n <td valign=\"top\"><img src=\"themes/softed/images/showPanelTopLeft.gif\"></td>\n <td width=\"100%\" valign=\"top\" style=\"padding: 10px;\" class=\"showPanelBg\">\n <br>\n <div class=\"settingsUI\" style=\"width:95%;padding:10px;margin-left:10px;\">\n <h2>Workflow Designer DB Check</h2>\n <div style=\"padding:20px;border:1px solid #ccc;\">\n ";
${${"GLOBALS"}["buxyjljnes"]} = new Workflow2();
echo "<strong>Step 1 / 4 - Check Database Structure</strong><br>";
$objWorkflow->checkDB(true);
echo "ok<br/>";
echo "<strong>Step 2 / 4 - Check Links</strong>";
$objWorkflow->addLinks();
echo " - ok<br/>";
echo "<strong>Step 3 / 4 - check external Extensions</strong>";
$objWorkflow->installExtensions();
echo " - ok<br/>";
echo "<strong>Step 4 / 4 - check custom inventory fields</strong><br/>";
$objWorkflow->checkCustomInventoryFields();
echo "ok<br/>";
echo "<p style='text-align:center;font-weight:bold;'><a href='index.php?module=Workflow2&view=Index&parent=Settings'>« Back to Workflow Designer Settings</a></p>";
echo " </div>\n </div>\n </td>\n </tr>\n </table>\n ";
}
示例3: preProcessSettings
public function preProcessSettings(Vtiger_Request $request)
{
$yrykpljnc = "sql";
$oerxenbygyao = "viewer";
${${"GLOBALS"}["qokftpe"]} = $request->getModule(false);
${$oerxenbygyao} = $this->getViewer(${${"GLOBALS"}["lrlscty"]});
$this->moduleName = $request->getModule();
$this->qualifiedModuleName = $request->getModule(false);
$this->settingsModel = Settings_Vtiger_Module_Model::getInstance($this->qualifiedModuleName);
${${"GLOBALS"}["rcxcyussani"]} = Vtiger_Module_Model::getInstance("Workflow2");
$viewer->assign("VERSION", $moduleModel->version);
$viewer->assign("VIEW", $request->get("view"));
$viewer->assign("MODULE", $this->moduleName);
$viewer->assign("QUALIFIED_MODULE", $this->qualifiedModuleName);
$viewer->assign("LOAD_OLD", Settings_Vtiger_Index_View::${${"GLOBALS"}["vhlhzctq"]});
global $adb;
${$yrykpljnc} = "SELECT * FROM vtiger_wf_repository_types\n INNER JOIN vtiger_wf_types ON (vtiger_wf_types.type = vtiger_wf_repository_types.name AND vtiger_wf_types.repo_id = vtiger_wf_repository_types.repos_id)\n WHERE vtiger_wf_repository_types.version > vtiger_wf_types.version LIMIT 1\n ";
$sbyhkryhvqd = "sql";
${${"GLOBALS"}["ryillrzl"]} = $adb->query(${$sbyhkryhvqd});
if ($adb->num_rows(${${"GLOBALS"}["ryillrzl"]}) > 0) {
$viewer->assign("AVAILABLE_TASK_UPDATE", true);
} else {
$viewer->assign("AVAILABLE_TASK_UPDATE", false);
}
$viewer->view("IndexMenuStart.tpl", ${${"GLOBALS"}["qokftpe"]});
}
示例4: generate
public function generate($templateId, $relId)
{
$this->moduleModel = Settings_Vtiger_Module_Model::getInstance('Settings:OSSProjectTemplates');
$baseId = $this->generateBaseRecord($templateId, $relId);
$this->generateChildRecords($templateId, $baseId, $relId);
return $baseId;
}
示例5: process
public function process(Vtiger_Request $request)
{
$recordId = $request->get('record');
$qualifiedModuleName = $request->getModule(false);
$mode = '';
$enabled = 0;
$views = array();
$viewer = $this->getViewer($request);
$moduleModel = Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName);
if ($recordId) {
$mode = 'edit';
$recordModel = Settings_HideBlocks_Record_Model::getInstanceById($recordId, $qualifiedModuleName);
$enabled = $recordModel->get('enabled');
if ($recordModel->get('view') != '') {
$views = explode(',', $recordModel->get('view'));
}
$viewer->assign('BLOCK_ID', $recordModel->get('blockid'));
}
$viewer->assign('MODE', $mode);
$viewer->assign('RECORD_ID', $recordId);
$viewer->assign('ENABLED', $enabled);
$viewer->assign('SELECTED_VIEWS', $views);
$viewer->assign('MODULE', 'HideBlocks');
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
$viewer->assign('BLOCKS', $moduleModel->getAllBlock());
$viewer->assign('VIEWS', $moduleModel->getViews());
$viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
$viewer->view('EditView.tpl', $qualifiedModuleName);
}
示例6: process
public function process(Vtiger_Request $request)
{
${"GLOBALS"}["jcknmiryut"] = "adb";
${"GLOBALS"}["jlkbssiqk"] = "position";
${"GLOBALS"}["jpftfdupf"] = "text";
${"GLOBALS"}["duiyzquj"] = "position";
${"GLOBALS"}["vqncmiw"] = "type";
${"GLOBALS"}["gdkclpbjfe"] = "position";
$nvizmlt = "position";
${${"GLOBALS"}["jcknmiryut"]} = PearDatabase::getInstance();
${"GLOBALS"}["imaqkofemcgl"] = "text";
$iznopybp = "sql";
$pyuanqyipfi = "newId";
${"GLOBALS"}["fsyplyr"] = "type";
${"GLOBALS"}["hfhbxmve"] = "settingsModel";
${"GLOBALS"}["lizelvbmz"] = "return";
${"GLOBALS"}["agjwapwua"] = "newId";
${${"GLOBALS"}["uiiyincpu"]} = intval($request->get("workflow"));
${${"GLOBALS"}["hfhbxmve"]} = Settings_Vtiger_Module_Model::getInstance("Settings:Workflow2");
${${"GLOBALS"}["fsyplyr"]} = $request->get("type");
switch (${${"GLOBALS"}["vqncmiw"]}) {
case "text":
${${"GLOBALS"}["jlkbssiqk"]} = $settingsModel->getFreeBlockPos(${${"GLOBALS"}["uiiyincpu"]});
${${"GLOBALS"}["imaqkofemcgl"]} = "Sample Text";
${${"GLOBALS"}["mmriwpdp"]} = "INSERT INTO vtiger_wf_objects SET x = ?, y = ?, type = ?, content = ?, workflow_id = ?";
${${"GLOBALS"}["dgoyfpvjrt"]} = $adb->pquery(${$iznopybp}, array(${$nvizmlt}[1], ${${"GLOBALS"}["gdkclpbjfe"]}[0], "text", ${${"GLOBALS"}["jpftfdupf"]}, ${${"GLOBALS"}["uiiyincpu"]}), true);
${$pyuanqyipfi} = $adb->getLastInsertID();
${${"GLOBALS"}["lizelvbmz"]} = array("id" => "workflowDesignerObject_" . ${${"GLOBALS"}["rskikriyihhx"]} . "", "content" => "<div style='top:" . ${${"GLOBALS"}["duiyzquj"]}[0] . "px;left:" . ${${"GLOBALS"}["ghzytcamowf"]}[1] . "px;' id='workflowDesignerObject_" . ${${"GLOBALS"}["agjwapwua"]} . "' class='workflowDesignerObject_text'>" . ${${"GLOBALS"}["fpculbfnwpue"]} . "</div>");
break;
}
echo json_encode(${${"GLOBALS"}["edfdooiv"]});
}
示例7: process
public function process(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$scannerId = $request->get('record');
if ($scannerId == '') {
$scannerId = Settings_MailConverter_Module_Model::getDefaultId();
}
$qualifiedModuleName = $request->getModule(false);
$listViewModel = Settings_Vtiger_ListView_Model::getInstance($qualifiedModuleName);
$recordExists = Settings_MailConverter_Module_Model::MailBoxExists();
$recordModel = Settings_MailConverter_Record_Model::getAll();
$viewer = $this->getViewer($request);
$viewer->assign('LISTVIEW_LINKS', $listViewModel->getListViewLinks());
$viewer->assign("MODULE_MODEL", Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName));
$viewer->assign("MAILBOXES", Settings_MailConverter_Module_Model::getMailboxes());
$viewer->assign("MODULE_NAME", $moduleName);
$viewer->assign("QUALIFIED_MODULE_NAME", $qualifiedModuleName);
$viewer->assign('CRON_RECORD_MODEL', Settings_CronTasks_Record_Model::getInstanceByName('MailScanner'));
$viewer->assign('RECORD_EXISTS', $recordExists);
if ($scannerId) {
$viewer->assign('SCANNER_ID', $scannerId);
$viewer->assign("RECORD", $recordModel[$scannerId]);
$viewer->assign('SCANNER_MODEL', Settings_MailConverter_Record_Model::getInstanceById($scannerId));
$viewer->assign('RULE_MODELS_LIST', Settings_MailConverter_RuleRecord_Model::getAll($scannerId));
$viewer->assign('FOLDERS_SCANNED', Settings_MailConverter_Module_Model::getScannedFolders($scannerId));
}
$viewer->view("RulesList.tpl", $qualifiedModuleName);
}
示例8: process
public function process(Vtiger_Request $request)
{
${"GLOBALS"}["vahwmbpdllb"] = "blockParts";
$elnhljl = "block";
$wsokizhnnyh = "adb";
${"GLOBALS"}["cxxojeceyl"] = "workflowID";
global $current_user;
$uasjxlirge = "blockParts";
${$wsokizhnnyh} = PearDatabase::getInstance();
$gxoquoipv = "workflowID";
${${"GLOBALS"}["cxxojeceyl"]} = intval($request->get("workflow"));
${$elnhljl} = $request->get("blockid");
${${"GLOBALS"}["cpeagfr"]} = Settings_Vtiger_Module_Model::getInstance("Settings:Workflow2");
${$uasjxlirge} = explode("__", ${${"GLOBALS"}["utkrwhi"]});
$yinjyvgfvxi = "sql";
${${"GLOBALS"}["chgvuwicj"]} = "UPDATE vtiger_wfp_connections SET deleted = 1, last_changed_userid = " . $current_user->id . " WHERE\n workflow_id = '" . ${$gxoquoipv} . "' AND (\n (\n source_mode = 'block' AND\n source_id = '" . ${${"GLOBALS"}["vahwmbpdllb"]}[1] . "'\n ) OR\n destination_id = '" . ${${"GLOBALS"}["qjoouezw"]}[1] . "')\n ";
$adb->query(${$yinjyvgfvxi}, true);
if (${${"GLOBALS"}["qjoouezw"]}[0] == "person") {
${"GLOBALS"}["tlqvgrfdxf"] = "workflowID";
${"GLOBALS"}["kzxtsrvyhjr"] = "blockParts";
${${"GLOBALS"}["chgvuwicj"]} = "DELETE FROM vtiger_wfp_objects WHERE\n id = '" . ${${"GLOBALS"}["kzxtsrvyhjr"]}[1] . "' AND\n workflow_id = '" . ${${"GLOBALS"}["tlqvgrfdxf"]} . "'\n ";
$adb->query(${${"GLOBALS"}["chgvuwicj"]}, true);
} else {
${"GLOBALS"}["nyxeobrnrw"] = "blockParts";
${${"GLOBALS"}["chgvuwicj"]} = "DELETE FROM vtiger_wfp_blocks WHERE\n id = '" . ${${"GLOBALS"}["nyxeobrnrw"]}[1] . "' AND\n workflow_id = '" . ${${"GLOBALS"}["ujhbixg"]} . "'\n ";
${"GLOBALS"}["bsjrvhvfz"] = "sql";
$adb->query(${${"GLOBALS"}["bsjrvhvfz"]}, true);
}
}
示例9: preProcessSettings
public function preProcessSettings(Vtiger_Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$selectedMenuId = $request->get('block');
$fieldId = $request->get('fieldid');
$settingsModel = Settings_Vtiger_Module_Model::getInstance();
$menuModels = $settingsModel->getMenus();
if (!empty($selectedMenuId)) {
$selectedMenu = Settings_Vtiger_Menu_Model::getInstanceById($selectedMenuId);
} elseif (!empty($moduleName) && $moduleName != 'Vtiger') {
$fieldItem = Settings_Vtiger_Index_View::getSelectedFieldFromModule($menuModels, $moduleName);
if ($fieldItem) {
$selectedMenu = Settings_Vtiger_Menu_Model::getInstanceById($fieldItem->get('blockid'));
$fieldId = $fieldItem->get('fieldid');
} else {
reset($menuModels);
$firstKey = key($menuModels);
$selectedMenu = $menuModels[$firstKey];
}
} else {
reset($menuModels);
$firstKey = key($menuModels);
$selectedMenu = $menuModels[$firstKey];
}
$viewer->assign('SELECTED_FIELDID', $fieldId);
$viewer->assign('SELECTED_MENU', $selectedMenu);
$viewer->assign('SETTINGS_MENUS', $menuModels);
$viewer->assign('MODULE', $moduleName);
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
$viewer->assign('LOAD_OLD', Settings_Vtiger_Index_View::$loadOlderSettingUi);
$viewer->view('SettingsMenuStart.tpl', $qualifiedModuleName);
}
示例10: getListViewEntries
/**
* Function to get the list view entries
* @param Vtiger_Paging_Model $pagingModel
* @return <Array> - Associative array of record id mapped to Vtiger_Record_Model instance.
*/
public function getListViewEntries($pagingModel)
{
$db = PearDatabase::getInstance();
$module = $this->getModule();
$moduleName = $module->getName();
$parentModuleName = $module->getParentName();
$qualifiedModuleName = $moduleName;
if (!empty($parentModuleName)) {
$qualifiedModuleName = $parentModuleName . ':' . $qualifiedModuleName;
}
$recordModelClass = Vtiger_Loader::getComponentClassName('Model', 'Record', $qualifiedModuleName);
$listQuery = $this->getBasicListQuery();
$startIndex = $pagingModel->getStartIndex();
$pageLimit = $pagingModel->getPageLimit();
$orderBy = $this->getForSql('orderby');
if (!empty($orderBy) && $orderBy === 'smownerid') {
$fieldModel = Vtiger_Field_Model::getInstance('assigned_user_id', $moduleModel);
if ($fieldModel->getFieldDataType() == 'owner') {
$orderBy = 'COALESCE(CONCAT(vtiger_users.first_name,vtiger_users.last_name),vtiger_groups.groupname)';
}
}
if (!empty($orderBy)) {
$listQuery .= ' ORDER BY ' . $orderBy . ' ' . $this->getForSql('sortorder');
}
$sourceModule = $this->get('sourceModule');
if (!empty($sourceModule)) {
$tabId = Vtiger_Functions::getModuleId($sourceModule);
$listQuery .= " WHERE `module` = '{$tabId}' ";
}
if ($module->isPagingSupported()) {
$nextListQuery = $listQuery . ' LIMIT ' . ($startIndex + $pageLimit) . ',1';
$listQuery .= " LIMIT {$startIndex}, {$pageLimit}";
}
$listResult = $db->pquery($listQuery, array());
$noOfRecords = $db->num_rows($listResult);
$listViewRecordModels = array();
for ($i = 0; $i < $noOfRecords; ++$i) {
$row = $db->query_result_rowdata($listResult, $i);
$record = new $recordModelClass();
$record->setData($row);
$recordModule = Vtiger_Functions::getModuleName($row['module']);
$record->set('module', vtranslate($recordModule, $recordModule));
if (method_exists($record, 'getModule') && method_exists($record, 'setModule')) {
$moduleModel = Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName);
$record->setModule($moduleModel);
}
$listViewRecordModels[$record->getId()] = $record;
}
if ($module->isPagingSupported()) {
$pagingModel->calculatePageRange($listViewRecordModels);
$nextPageResult = $db->pquery($nextListQuery, array());
$nextPageNumRows = $db->num_rows($nextPageResult);
if ($nextPageNumRows <= 0) {
$pagingModel->set('nextPageExists', false);
}
}
return $listViewRecordModels;
}
示例11: process
function process(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$viewer = $this->getViewer($request);
$viewer->assign('MODULE_NAME', $moduleName);
$viewer->assign('REL_ID', $request->get('rel_id'));
$viewer->assign('TPL_LIST', Settings_Vtiger_Module_Model::getInstance('Settings:OSSProjectTemplates')->getListTpl('Project', 0, TRUE));
echo $viewer->view('GenerateProject.tpl', $moduleName, TRUE);
//GenerateTpl
}
示例12: process
public function process(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$moduleModel = Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName);
$viewer = $this->getViewer($request);
$viewer->assign('MODULE_MODEL', $moduleModel);
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
$viewer->assign('MODULE', $moduleName);
$viewer->view('Index.tpl', $qualifiedModuleName);
}
示例13: process
public function process(Vtiger_Request $request)
{
$moduleName = $request->getModule(false);
$menuEditorModuleModel = Settings_Vtiger_Module_Model::getInstance($moduleName);
$selectedModulesList = $request->get('selectedModulesList');
if ($selectedModulesList) {
$menuEditorModuleModel->set('selectedModulesList', $selectedModulesList);
$menuEditorModuleModel->saveMenuStruncture();
}
$loadUrl = $menuEditorModuleModel->getIndexViewUrl();
header("Location: {$loadUrl}");
}
示例14: process
function process(Vtiger_Request $request)
{
$baseModuleName = $request->get('base_module');
$id = $request->get('tpl_id');
$db = PearDatabase::getInstance();
$settingsModuleModel = Settings_Vtiger_Module_Model::getInstance('Settings:OSSProjectTemplates');
$fieldTab = $settingsModuleModel->getConfigurationForModule($baseModuleName);
$parent = $request->get('parent_tpl_id');
if (!$parent) {
$parent = 0;
}
if ($fieldTab && count($fieldTab)) {
foreach ($fieldTab as $key => $value) {
$valField = $request->get($key);
$sql = "UPDATE vtiger_oss_project_templates SET fld_val = ? WHERE id_tpl = ? AND fld_name = ? AND module = ?";
if (is_array($valField)) {
$db->pquery($sql, array(json_encode($valField), $id, $key, $baseModuleName), true);
} else {
$db->pquery($sql, array($valField, $id, $key, $baseModuleName), true);
}
$dateDayInterval = $request->get($key . '_day');
$dateDayIntervalType = $request->get($key . '_day_type');
if ($dateDayInterval) {
$sql = "UPDATE vtiger_oss_project_templates SET fld_val = '{$dateDayInterval}' WHERE id_tpl = {$id} AND fld_name = '{$key}_day' AND module = '{$baseModuleName}'";
$db->query($sql, true);
$sql = "SELECT `fld_val` FROM `vtiger_oss_project_templates` WHERE `id_tpl` = {$id} AND `fld_name` = '{$key}_day' AND `module` = '{$baseModuleName}'";
$result = $db->query($sql, true);
if ($db->num_rows($result) == 0) {
$sql = "INSERT INTO vtiger_oss_project_templates VALUES ('', '{$key}_day', {$dateDayInterval}, {$id}, '{$parent}', '{$baseModuleName}' )";
$result = $db->query($sql, true);
}
}
if (!!$dateDayIntervalType) {
$sql = "DELETE FROM vtiger_oss_project_templates WHERE id_tpl = {$id} AND fld_name = '{$key}_day_type' AND module = '{$baseModuleName}'";
$db->query($sql, true);
// $lastTplId = $this->getLastTplId($baseModuleName);
// $parentTplId = Vtiger_Functions::getSingleFieldValue('vtiger_oss_project_templates', 'parent', 'id_tpl', $id);
$sql = "INSERT INTO vtiger_oss_project_templates VALUES(NULL, '{$key}_day_type', '{$dateDayIntervalType}', {$id}, '{$parent}', '{$baseModuleName}')";
$db->query($sql, true);
} else {
$sql = "DELETE FROM vtiger_oss_project_templates WHERE id_tpl = {$id} AND fld_name = '{$key}_day_type' AND module = '{$baseModuleName}'";
$db->query($sql, true);
}
}
$sql = "UPDATE vtiger_oss_project_templates SET fld_val = '{$request->get('tpl_name')}' WHERE id_tpl = {$id} AND fld_name = 'tpl_name'";
$db->query($sql, true);
}
$backView = $request->get('back_view');
$backIdTpl = $request->get('parent_tpl_id');
header("Location: index.php?module=OSSProjectTemplates&parent=Settings&view=" . $backView . '&tpl_id=' . $backIdTpl);
}
示例15: process
public function process(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$listViewModel = Settings_Vtiger_ListView_Model::getInstance($qualifiedModuleName);
$viewer = $this->getViewer($request);
$viewer->assign('LISTVIEW_LINKS', $listViewModel->getListViewLinks());
$viewer->assign("MODULE_MODEL", Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName));
$viewer->assign("RECORD_MODELS", Settings_MailConverter_Record_Model::getAll());
$viewer->assign("MODULE_NAME", $moduleName);
$viewer->assign("QUALIFIED_MODULE_NAME", $qualifiedModuleName);
$viewer->assign('CRON_RECORD_MODEL', Settings_CronTasks_Record_Model::getInstanceByName('MailScanner'));
$viewer->view("ListView.tpl", $qualifiedModuleName);
}