当前位置: 首页>>代码示例>>PHP>>正文


PHP Vtiger_Language_Handler::getLanguage方法代码示例

本文整理汇总了PHP中Vtiger_Language_Handler::getLanguage方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Language_Handler::getLanguage方法的具体用法?PHP Vtiger_Language_Handler::getLanguage怎么用?PHP Vtiger_Language_Handler::getLanguage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Vtiger_Language_Handler的用法示例。


在下文中一共展示了Vtiger_Language_Handler::getLanguage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _getFile

 protected function _getFile($id, $moduleName, $crmid)
 {
     $current_user = \Users_Record_Model::getCurrentUserModel();
     $useUser = \Users::getActiveAdminUser();
     $oldUser = vglobal('current_user');
     vglobal('current_user', $useUser);
     $tmpFilename = $this->_getTmpFilename();
     $mpdf = "";
     $language = $current_user->language;
     if (empty($language)) {
         $language = \Vtiger_Language_Handler::getLanguage();
     }
     $Records = array($crmid);
     // $request = $_REQUEST;
     // $_REQUEST['search'] = true;
     //$_REQUEST['submode'] = true;
     \Vtiger_Loader::autoLoad('PDFMaker_PDFMaker_Model');
     $PDFMaker = new \PDFMaker_PDFMaker_Model();
     $name = $PDFMaker->GetPreparedMPDF($mpdf, $Records, array($id), $moduleName, $language);
     $name = $PDFMaker->generate_cool_uri($name);
     if ($name != "") {
         $name = $name . ".pdf";
     }
     $mpdf->Output($tmpFilename);
     vglobal('current_user', $oldUser);
     $filetype = "application/pdf";
     //$_REQUEST = $request;
     return array('path' => $tmpFilename, 'name' => $name, 'type' => $filetype);
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:29,代码来源:Pdfmaker.inc.php

示例2: process

 public function process(Vtiger_Request $request)
 {
     PDFMaker_Debugger_Model::GetInstance()->Init();
     $adb = PearDatabase::getInstance();
     $PDFMaker = new PDFMaker_PDFMaker_Model();
     $viewer = $this->getViewer($request);
     $currentLanguage = Vtiger_Language_Handler::getLanguage();
     list($oLabels, $languages) = $PDFMaker->GetCustomLabels();
     $currLang = array();
     foreach ($languages as $langId => $langVal) {
         if ($langVal["prefix"] == $currentLanguage) {
             $currLang["id"] = $langId;
             $currLang["name"] = $langVal["name"];
             $currLang["label"] = $langVal["label"];
             $currLang["prefix"] = $langVal["prefix"];
             break;
         }
     }
     $viewLabels = array();
     foreach ($oLabels as $lblId => $oLabel) {
         $viewLabels[$lblId]["key"] = $oLabel->GetKey();
         $viewLabels[$lblId]["lang_values"] = $oLabel->GetLangValsArr();
     }
     $viewer->assign("LABELS", $viewLabels);
     $viewer->assign("LANGUAGES", $languages);
     $viewer->assign("CURR_LANG", $currLang);
     $viewer->view('CustomLabels.tpl', 'PDFMaker');
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:28,代码来源:CustomLabels.php

示例3: vtranslateMenu

 public static function vtranslateMenu($key, $module)
 {
     $language = Vtiger_Language_Handler::getLanguage();
     $moduleStrings = Vtiger_Language_Handler::getModuleStringsFromFile($language, 'Menu');
     if (array_key_exists($key, $moduleStrings['languageStrings'])) {
         return stripslashes($moduleStrings['languageStrings'][$key]);
     }
     return vtranslate($key, $module);
 }
开发者ID:awflu,项目名称:YetiForceCRM,代码行数:9,代码来源:Menu.php

示例4: process

 public function process(Vtiger_Request $request)
 {
     ${"GLOBALS"}["pcjpcgy"] = "current_user";
     global $root_directory;
     ${"GLOBALS"}["qnnpnmctvkh"] = "adb";
     ${"GLOBALS"}["sbwrerrdfpiq"] = "viewer";
     ${${"GLOBALS"}["pcjpcgy"]} = ${${"GLOBALS"}["enwvewqev"]} = Users_Record_Model::getCurrentUserModel();
     ${${"GLOBALS"}["myvnqjtagyw"]} = Vtiger_Language_Handler::getLanguage();
     ${${"GLOBALS"}["qnnpnmctvkh"]} = PearDatabase::getInstance();
     ${${"GLOBALS"}["sbwrerrdfpiq"]} = $this->getViewer(${${"GLOBALS"}["klrvtdauww"]});
     $viewer->assign("lastUrl", $_SESSION["_url_before_import"]);
     $viewer->view("ImporterStep3.tpl", "Workflow2");
 }
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:13,代码来源:ImportStep3.php

示例5: process

 public function process(Vtiger_Request $request)
 {
     PDFMaker_Debugger_Model::GetInstance()->Init();
     $adb = PearDatabase::getInstance();
     $PDFMaker = new PDFMaker_PDFMaker_Model();
     $viewer = $this->getViewer($request);
     $currentLanguage = Vtiger_Language_Handler::getLanguage();
     $sql = "SELECT * FROM vtiger_pdfmaker_productbloc_tpl";
     $result = $adb->pquery($sql, array());
     while ($row = $adb->fetchByAssoc($result)) {
         $templates[$row["id"]]["name"] = $row["name"];
         $templates[$row["id"]]["body"] = html_entity_decode($row["body"], ENT_QUOTES);
     }
     $viewer->assign("PB_TEMPLATES", $templates);
     $viewer->view('ProductBlocks.tpl', 'PDFMaker');
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:16,代码来源:ProductBlocks.php

示例6: process

 public function process(Vtiger_Request $request)
 {
     $current_user = $cu_model = Users_Record_Model::getCurrentUserModel();
     $currentLanguage = Vtiger_Language_Handler::getLanguage();
     $adb = PearDatabase::getInstance();
     $viewer = $this->getViewer($request);
     $module = $request->get('source_module');
     $crmid = (int) $request->get('record');
     $tabid = getTabid($module);
     $sidebar_id = intval($_REQUEST["sID"]);
     $sql = "SELECT content FROM vtiger_tools_sidebar WHERE id = " . intval($sidebar_id) . " AND tabid = " . $tabid;
     $result = $adb->query($sql);
     $sidebar = $adb->fetchByAssoc($result);
     \SwVtTools\VTEntity::setUser($current_user);
     $context = \SwVtTools\VTEntity::getForId($crmid, $_POST["return_module"]);
     $content = \SwVtTools\VTTemplate::parse(html_entity_decode($sidebar["content"], ENT_QUOTES, 'UTF-8'), $context);
     echo $content;
 }
开发者ID:Neodracir,项目名称:VtigerCRM-Tools,代码行数:18,代码来源:SidebarWidget.php

示例7: process

 public function process(Vtiger_Request $request)
 {
     $erkmdzn = "current_user";
     ${"GLOBALS"}["mikcukceq"] = "currentLanguage";
     $hiiwti = "cu_model";
     ${"GLOBALS"}["uamgnjdvbvfm"] = "viewer";
     ${$erkmdzn} = ${$hiiwti} = Users_Record_Model::getCurrentUserModel();
     ${${"GLOBALS"}["mikcukceq"]} = Vtiger_Language_Handler::getLanguage();
     ${${"GLOBALS"}["ussanpzh"]} = PearDatabase::getInstance();
     ${${"GLOBALS"}["uamgnjdvbvfm"]} = $this->getViewer(${${"GLOBALS"}["egducrxosoh"]});
     $jvnhnmr = "workflows";
     ${${"GLOBALS"}["qtdwase"]} = $request->get("source_module");
     ${${"GLOBALS"}["lmznaofkdcm"]} = new Workflow2();
     ${$jvnhnmr} = $objWorkflow->getWorkflowsForModule(${${"GLOBALS"}["qtdwase"]}, 1, "WF2_IMPORTER");
     $_SESSION["_url_before_import"] = $request->get("currentUrl");
     $viewer->assign("workflows", ${${"GLOBALS"}["gbtyficqodq"]});
     $viewer->view("ImporterStep1.tpl", "Workflow2");
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:18,代码来源:ImportStep1.php

示例8: editCustomLabel

 function editCustomLabel(Vtiger_Request $request)
 {
     $PDFMaker = new PDFMaker_PDFMaker_Model();
     $viewer = $this->getViewer($request);
     $slabelid = $request->get('labelid');
     $slangid = $request->get('langid');
     $currentLanguage = Vtiger_Language_Handler::getLanguage();
     $moduleName = $request->getModule();
     $viewer->assign('MODULE', $moduleName);
     list($oLabels, $languages) = $PDFMaker->GetCustomLabels();
     $currLang = array();
     foreach ($languages as $langId => $langVal) {
         if ($langId == $slangid && $slangid != "" || $slangid == "" && $langVal["prefix"] == $currentLanguage) {
             $currLang["id"] = $langId;
             $currLang["name"] = $langVal["name"];
             $currLang["label"] = $langVal["label"];
             $currLang["prefix"] = $langVal["prefix"];
             break;
         }
     }
     if ($slangid == "") {
         $slangid = $currLang["id"];
     }
     $viewer->assign('LABELID', $slabelid);
     $viewer->assign('LANGID', $slangid);
     $viewLabels = array();
     foreach ($oLabels as $lblId => $oLabel) {
         if ($slabelid == $lblId) {
             $l_key = substr($oLabel->GetKey(), 2);
             $l_values = $oLabel->GetLangValsArr();
             //echo "id=".$currLang["id"];
             $viewer->assign("CUSTOM_LABEL_KEY", $l_key);
             $viewer->assign("CUSTOM_LABEL_VALUE", $l_values[$currLang["id"]]);
             break;
         }
     }
     $viewer->assign("CURR_LANG", $currLang);
     echo $viewer->view('EditCustomLabel.tpl', 'PDFMaker', true);
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:39,代码来源:IndexAjax.php

示例9: process

 public function process(Vtiger_Request $request)
 {
     ${"GLOBALS"}["dpplygv"] = "module";
     $gdtleqjpkdsh = "crmid";
     ${"GLOBALS"}["auyafnnce"] = "waitingRST";
     $haauhnidlo = "sql";
     $ltqivoyu = "adb";
     $tislpkpngsol = "request";
     $itkrgfcibt = "waiting";
     $brgjuxus = "crmid";
     $ihjgddsfo = "cu_model";
     ${${"GLOBALS"}["pxuwujbkkm"]} = ${$ihjgddsfo} = Users_Record_Model::getCurrentUserModel();
     ${"GLOBALS"}["yemuhpxpdnq"] = "viewer";
     ${${"GLOBALS"}["kaqzwjtnc"]} = Vtiger_Language_Handler::getLanguage();
     ${$ltqivoyu} = PearDatabase::getInstance();
     ${${"GLOBALS"}["yemuhpxpdnq"]} = $this->getViewer(${$tislpkpngsol});
     ${${"GLOBALS"}["dpplygv"]} = $request->get("source_module");
     ${${"GLOBALS"}["nfzomvg"]} = (int) $request->get("crmid");
     $lpkmsdfy = "row";
     ${$haauhnidlo} = "SELECT\n                    *\n                FROM\n                    vtiger_wf_entityddata\n                WHERE\n                    vtiger_wf_entityddata.crmid = " . ${$gdtleqjpkdsh} . "";
     $jvcckdhwm = "waitingRST";
     ${${"GLOBALS"}["auyafnnce"]} = $adb->query(${${"GLOBALS"}["csoiribry"]}, true);
     ${$itkrgfcibt} = array();
     while (${$lpkmsdfy} = $adb->fetchByAssoc(${$jvcckdhwm})) {
         $qhlgfswqh = "row";
         $nhzoipi = "row";
         $kgtwmjpd = "row";
         ${"GLOBALS"}["zxbipozhknd"] = "row";
         ${$nhzoipi}["modified"] = DateTimeField::convertToUserFormat(${${"GLOBALS"}["zxbipozhknd"]}["modified"]);
         ${${"GLOBALS"}["llcomooxgjot"]}["value"] = @unserialize(html_entity_decode(${$qhlgfswqh}["value"]));
         ${${"GLOBALS"}["jyvlypyp"]}[] = ${$kgtwmjpd};
     }
     $viewer->assign("crmid", ${$brgjuxus});
     $viewer->assign("entityData", ${${"GLOBALS"}["jyvlypyp"]});
     $viewer->view("EntityData.tpl", "Workflow2");
 }
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:36,代码来源:EntityData.php

示例10: process

 public function process(Vtiger_Request $request)
 {
     //Debugger::GetInstance()->Init();
     $AvailableRelModules = array("Accounts", "Contacts", "Leads", "Vendors");
     $current_user = $cu_model = Users_Record_Model::getCurrentUserModel();
     $currentLanguage = Vtiger_Language_Handler::getLanguage();
     $adb = PearDatabase::getInstance();
     $viewer = $this->getViewer($request);
     $PDFMaker = new PDFMaker_PDFMaker_Model();
     if ($PDFMaker->CheckPermissions("DETAIL") == false) {
         $output = '<table border=0 cellspacing=0 cellpadding=5 width=100% align=center bgcolor=white>
           <tr>
             <td class="dvtCellInfo" style="width:100%;border-top:1px solid #DEDEDE;text-align:center;">
               <strong>' . vtranslate("LBL_PERMISSION") . '</strong>
             </td>
           </tr>              		
           </table>';
         die($output);
     }
     $record = $request->get('record');
     $module = getSalesEntityType($record);
     $viewer->assign('MODULE', $module);
     $viewer->assign('ID', $record);
     $relfocus = CRMEntity::getInstance($module);
     $relfocus->id = $record;
     $relfocus->retrieve_entity_info($relfocus->id, $module);
     $relmodule = "";
     $relmodule_selid = "";
     if (in_array($module, $AvailableRelModules)) {
         $relmodule = $module;
         $relmodule_selid = $relfocus->id;
     } else {
         if (isset($relfocus->column_fields['account_id']) && $relfocus->column_fields['account_id'] != "" && $relfocus->column_fields['account_id'] != "0") {
             $relmodule = 'Accounts';
             $relmodule_selid = $relfocus->column_fields['account_id'];
         }
         if ($relmodule == "" && isset($relfocus->column_fields['related_to']) && $relfocus->column_fields['related_to'] != "" && $relfocus->column_fields['related_to'] != "0") {
             $relmodule_selid = $relfocus->column_fields['related_to'];
             $relmodule = getSalesEntityType($relmodule_selid);
             if (!in_array($relmodule, $AvailableRelModules)) {
                 $relmodule = $relmodule_selid = "";
             }
         }
         if ($relmodule == "" && isset($relfocus->column_fields['parent_id']) && $relfocus->column_fields['parent_id'] != "" && $relfocus->column_fields['parent_id'] != "0") {
             $relmodule_selid = $relfocus->column_fields['parent_id'];
             $relmodule = getSalesEntityType($relmodule_selid);
             if (!in_array($relmodule, $AvailableRelModules)) {
                 $relmodule = $relmodule_selid = "";
             }
         }
         if ($relmodule == "" && isset($relfocus->column_fields['contact_id']) && $relfocus->column_fields['contact_id'] != "" && $relfocus->column_fields['contact_id'] != "0") {
             $relmodule = 'Contacts';
             $relmodule_selid = $relfocus->column_fields['contact_id'];
         }
     }
     $viewer->assign('RELMODULE', $relmodule);
     $viewer->assign('RELMODULE_SELID', $relmodule_selid);
     require 'user_privileges/user_privileges_' . $current_user->id . '.php';
     if (is_dir("modules/PDFMaker/resources/mpdf") && $PDFMaker->CheckPermissions("DETAIL")) {
         $viewer->assign("ENABLE_PDFMAKER", 'true');
     } else {
         $viewer->assign("ENABLE_PDFMAKER", "false");
     }
     if (is_dir("modules/EMAILMaker") && vtlib_isModuleActive('EMAILMaker')) {
         $module_tabid = getTabId($module);
         $res = $adb->pquery("SELECT * FROM vtiger_links WHERE tabid = ? AND linktype = ? AND linkurl LIKE ?", array($module_tabid, 'DETAILVIEWSIDEBARWIDGET', 'module=EMAILMaker&view=GetEMAILActions&record=%'));
         if ($adb->num_rows($res) > 0) {
             $viewer->assign("ENABLE_EMAILMAKER", 'true');
         }
     }
     $viewer->assign('PDFMAKER_MOD', return_module_language($currentLanguage, "PDFMaker"));
     if (!isset($_SESSION["template_languages"]) || $_SESSION["template_languages"] == "") {
         $temp_res = $adb->pquery("SELECT label, prefix FROM vtiger_language WHERE active = ?", array('1'));
         while ($temp_row = $adb->fetchByAssoc($temp_res)) {
             $template_languages[$temp_row["prefix"]] = $temp_row["label"];
         }
         $_SESSION["template_languages"] = $template_languages;
     }
     $viewer->assign('TEMPLATE_LANGUAGES', $_SESSION["template_languages"]);
     $viewer->assign('CURRENT_LANGUAGE', $currentLanguage);
     $viewer->assign('IS_ADMIN', is_admin($current_user));
     $templates = $PDFMaker->GetAvailableTemplates($module);
     if (count($templates) > 0) {
         $no_templates_exist = 0;
     } else {
         $no_templates_exist = 1;
     }
     $viewer->assign('CRM_TEMPLATES', $templates);
     $viewer->assign('CRM_TEMPLATES_EXIST', $no_templates_exist);
     //Action permission handling
     //edit and export
     $editAndExportAction = "1";
     if (isPermitted($module, "EditView", $record) == "no") {
         $editAndExportAction = "0";
     }
     //save as doc
     $saveDocAction = "1";
     if (isPermitted("Documents", "EditView") == "no") {
         $saveDocAction = "0";
     }
//.........这里部分代码省略.........
开发者ID:cin-system,项目名称:cinrepo,代码行数:101,代码来源:GetPDFActions.php

示例11: process

 public function process(Vtiger_Request $request)
 {
     ${"GLOBALS"}["usmazo"] = "current_user";
     $cjplrqzb = "totalRows";
     $jmbuwsghix = "cu_model";
     global $root_directory;
     ${"GLOBALS"}["qcmpftauwm"] = "importParams";
     ${"GLOBALS"}["hzueven"] = "adb";
     ${${"GLOBALS"}["usmazo"]} = ${$jmbuwsghix} = Users_Record_Model::getCurrentUserModel();
     $pgtydkw = "importParams";
     ${${"GLOBALS"}["kxrlrmwghyk"]} = Vtiger_Language_Handler::getLanguage();
     ${${"GLOBALS"}["hzueven"]} = PearDatabase::getInstance();
     ${${"GLOBALS"}["xmnlixmhgl"]} = $this->getViewer(${${"GLOBALS"}["cugpxamyy"]});
     ${"GLOBALS"}["xlydlqxgmjov"] = "totalRows";
     ${${"GLOBALS"}["qshjglpj"]} = $request->get("source_module");
     $iqkuworgzsm = "rows";
     if (!empty($_POST["import_hash"])) {
         ${${"GLOBALS"}["wqmcrmilron"]} = new \Workflow\Importer($_POST["import_hash"]);
         $objImport->set("importParams", $_POST["param"]);
         $objImport->refreshTotalRows();
     } else {
         ${"GLOBALS"}["eybdyrrj"] = "objImport";
         ${"GLOBALS"}["ukbdrwhq"] = "root_directory";
         $lmuhxxydqv = "filePath";
         if (is_writable(${${"GLOBALS"}["ukbdrwhq"]} . "/test/")) {
             $dsdunearsbnp = "root_directory";
             $mjipikut = "root_directory";
             @mkdir(${$dsdunearsbnp} . "/test/Workflow2/", 0777, true);
             ${${"GLOBALS"}["vgacyh"]} = tempnam(${$mjipikut} . "/test/Workflow2/", "Importer");
             if (is_uploaded_file($_FILES["importfile"]["tmp_name"])) {
                 ${"GLOBALS"}["ohpsptnqk"] = "filePath";
                 move_uploaded_file($_FILES["importfile"]["tmp_name"], ${${"GLOBALS"}["ohpsptnqk"]});
             } else {
                 echo "ERROR: During Upload of File";
                 return;
             }
         } else {
             echo "ERROR: test directory not writable";
             return;
         }
         if (isset($_POST["importParam"])) {
             ${${"GLOBALS"}["zijjmocr"]} = $_POST["importParam"];
         } else {
             ${${"GLOBALS"}["zijjmocr"]} = array();
         }
         ${${"GLOBALS"}["eybdyrrj"]} = \Workflow\Importer::create(${$lmuhxxydqv}, $_POST["import_format"], ${${"GLOBALS"}["zijjmocr"]});
     }
     ${$iqkuworgzsm} = array($objImport->getNextRow(), $objImport->getNextRow(), $objImport->getNextRow(), $objImport->getNextRow(), $objImport->getNextRow());
     $objImport->resetPosition();
     ${${"GLOBALS"}["xlydlqxgmjov"]} = $objImport->getTotalRows(false);
     ${${"GLOBALS"}["qcmpftauwm"]} = $objImport->get("importParams");
     if (!empty(${$pgtydkw}["skipfirst"])) {
         ${${"GLOBALS"}["mpeepnnvjrc"]} -= 1;
     }
     $viewer->assign("found_rows", ${$cjplrqzb});
     $viewer->assign("rows", ${${"GLOBALS"}["rqdfnh"]});
     $viewer->assign("hash", $objImport->getHash());
     $viewer->assign("import_process", intval($_POST["import_process"]));
     $viewer->assign("importParams", $objImport->get("importParams"));
     $viewer->view("ImporterStep2.tpl", "Workflow2");
     return;
 }
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:62,代码来源:ImportStep2.php

示例12: process

    public function process(Vtiger_Request $request)
    {
        $moduleName = $request->getModule();
        $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
        $for_module = $request->get('return_module');
        $recordIds = $this->getRecordsListFromRequest($request);
        $adb = PearDatabase::getInstance();
        PDFMaker_Debugger_Model::GetInstance()->Init();
        $PDFMaker = new PDFMaker_PDFMaker_Model();
        if ($PDFMaker->CheckPermissions("DETAIL") == false) {
            $close_img = vimage_path('close.gif');
            $output = '
                <table border=0 cellspacing=0 cellpadding=5 width=100% class=layerHeadingULine>
                <tr>
                      <td width="90%" align="left" class="genHeaderSmall" id="PDFListViewDivHandle" style="cursor:move;">' . vtranslate("LBL_PDF_ACTIONS", "PDFMaker") . '                 			
                      </td>
                      <td width="10%" align="right">
                              <a href="javascript:fninvsh(\'PDFListViewDiv\');"><img title="' . vtranslate("LBL_CLOSE") . '" alt="' . vtranslate("LBL_CLOSE") . '" src="' . $close_img . '" border="0"  align="absmiddle" /></a>
                      </td>
                </tr>
                </table>
                <table border=0 cellspacing=0 cellpadding=5 width=100% align=center>
                    <tr><td class="small">
                        <table border=0 cellspacing=0 cellpadding=5 width=100% align=center bgcolor=white>
                        <tr>
                          <td class="dvtCellInfo" style="width:100%;border-top:1px solid #DEDEDE;text-align:center;">
                            <strong>' . vtranslate("LBL_PERMISSION_DENIED") . '</strong>
                          </td>
                        </tr>
                        <tr>
                                      <td class="dvtCellInfo" style="width:100%;" align="center">
                            <input type="button" class="crmbutton small cancel" value="' . vtranslate("LBL_CANCEL") . '" onclick="fninvsh(\'PDFListViewDiv\');" />      
                          </td>
                              </tr>      		
                        </table>
                    </td></tr>
                </table>
                ';
            die($output);
        }
        $_REQUEST['idslist'] = implode(";", $recordIds);
        $request->set('idlist', $_REQUEST['idslist']);
        //$language = $_SESSION['authenticated_user_language'];
        $current_language = Vtiger_Language_Handler::getLanguage();
        $templates = $PDFMaker->GetAvailableTemplates($for_module, true);
        $options = "";
        foreach ($templates as $templateid => $valArr) {
            if ($valArr["is_default"] == "2" || $valArr["is_default"] == "3") {
                $selected = ' selected="selected" ';
            } else {
                $selected = "";
            }
            $options .= '<option value="' . $templateid . '"' . $selected . '>' . $valArr['templatename'] . '</option>';
        }
        $template_output = "";
        $language_output = "";
        $generate_pdf = "";
        if ($options != "") {
            $template_output = '
		    <tr>
		  		<td class="dvtCellInfo" style="width:100%;border-top:1px solid #DEDEDE;">
		  			<select name="use_common_template" id="use_common_template" class="detailedViewTextBox" multiple style="width:90%;" size="5">
		        ' . $options . '
		        </select>
		  		</td>
				</tr>
		  ';
            $templates_select = '<select name="use_common_template" id="use_common_template" style="display: none;" id="fieldList" class="select2 row-fluid" multiple="true" size="5" data-validation-engine="validate[required]">
		        ' . $options . '
		        </select>';
            $temp_res = $adb->pquery("SELECT label, prefix FROM vtiger_language WHERE active=?", array("1"));
            while ($temp_row = $adb->fetchByAssoc($temp_res)) {
                $template_languages[$temp_row["prefix"]] = $temp_row["label"];
            }
            //LANGUAGES BLOCK
            if (count($template_languages) > 1) {
                $options = "";
                foreach ($template_languages as $prefix => $label) {
                    if ($current_language != $prefix) {
                        $options .= '<option value="' . $prefix . '">' . $label . '</option>';
                    } else {
                        $options .= '<option value="' . $prefix . '" selected="selected">' . $label . '</option>';
                    }
                }
                $language_output = '
		      <tr>
		  		<td class="dvtCellInfo" style="width:100%;">    	
		          <select name="template_language" id="template_language" class="detailedViewTextBox" style="width:90%;" size="1">
		  		    ' . $options . '
		          </select>
		  		</td>
		      </tr>';
                $languages_select = '<select name="template_language" id="template_language" class="select2 row-fluid" style="display: none;">
		  		    ' . $options . '
		          </select>';
            } else {
                foreach ($template_languages as $prefix => $label) {
                    $languages_select .= '<input type="hidden" name="template_language" id="template_language" value="' . $prefix . '"/>';
                }
            }
//.........这里部分代码省略.........
开发者ID:cin-system,项目名称:cinrepo,代码行数:101,代码来源:ListViewSelect.php

示例13: process

 public function process(Vtiger_Request $request)
 {
     ${"GLOBALS"}["kdeehlyv"] = "TMPworkflows";
     $seemluoths = "viewer";
     $iqrmjuou = "module";
     $oonrwkg = "result";
     $wnxmbyrsjd = "cu_model";
     ${"GLOBALS"}["ujmqtir"] = "current_user";
     $wmcoewcu = "sql";
     ${"GLOBALS"}["sfolfu"] = "workflows";
     $laqtnyra = "ImportWorkflows";
     ${"GLOBALS"}["szyrcsxqnjwy"] = "adb";
     ${"GLOBALS"}["cjryuofsmx"] = "result";
     ${"GLOBALS"}["lyqxydcxb"] = "TMPworkflows";
     $pkqxigbjog = "objWorkflow";
     $nphxkxzqhk = "module";
     ${"GLOBALS"}["awnfeqq"] = "currentLanguage";
     ${${"GLOBALS"}["ujmqtir"]} = ${$wnxmbyrsjd} = Users_Record_Model::getCurrentUserModel();
     ${${"GLOBALS"}["awnfeqq"]} = Vtiger_Language_Handler::getLanguage();
     ${${"GLOBALS"}["szyrcsxqnjwy"]} = PearDatabase::getInstance();
     ${$seemluoths} = $this->getViewer(${${"GLOBALS"}["uxdtkwefwwne"]});
     ${${"GLOBALS"}["dfxtdqgbgfq"]} = $request->get("src_module");
     ${${"GLOBALS"}["kdeehlyv"]} = Workflow2::getWorkflowsForModule(${${"GLOBALS"}["dfxtdqgbgfq"]});
     ${${"GLOBALS"}["sfolfu"]} = array();
     foreach (${${"GLOBALS"}["lyqxydcxb"]} as ${${"GLOBALS"}["gajgjhlo"]}) {
         $abvdowpqhmj = "crmid";
         $ljtimwygf = "workflow";
         ${${"GLOBALS"}["fdbmbwylgb"]} = new \Workflow\Main(${${"GLOBALS"}["gajgjhlo"]}["id"]);
         if ((${$ljtimwygf}["authmanagement"] == "0" || $objWorkflow->checkAuth("view")) && $objWorkflow->checkExecuteCondition(${$abvdowpqhmj})) {
             $cerwfumx = "workflows";
             ${$cerwfumx}[] = ${${"GLOBALS"}["gajgjhlo"]};
         }
     }
     ${$pkqxigbjog} = new Workflow2();
     $cfnbmosu = "sql";
     ${$laqtnyra} = $objWorkflow->getWorkflowsForModule(${$nphxkxzqhk}, 1, "WF2_IMPORTER");
     $ksukmmns = "buttons";
     if (count(${${"GLOBALS"}["fjfxaoqcd"]}) == 0) {
         $viewer->assign("hide_importer", true);
     } else {
         $viewer->assign("hide_importer", false);
     }
     $crjxzwpi = "module";
     $viewer->assign("isAdmin", $current_user->is_admin == "on");
     $viewer->assign("workflows", ${${"GLOBALS"}["ahtwyzverq"]});
     $viewer->assign("source_module", ${${"GLOBALS"}["dfxtdqgbgfq"]});
     $jspfvd = "viewer";
     ${${"GLOBALS"}["kwlufmsfbzr"]} = new \Workflow\FrontendManager();
     ${${"GLOBALS"}["pkuntpkws"]} = $frontendManager->getByPosition(${$iqrmjuou}, "sidebar", ${${"GLOBALS"}["ipaeblf"]});
     ${$cfnbmosu} = "SELECT * FROM vtiger_wf_frontend_config WHERE module = ?";
     ${$oonrwkg} = $adb->pquery(${$wmcoewcu}, array(${$crjxzwpi}));
     if ($adb->num_rows(${${"GLOBALS"}["cjryuofsmx"]}) > 0) {
         $zsffethlyc = "result";
         ${"GLOBALS"}["bvsncmu"] = "frontendconfig";
         ${${"GLOBALS"}["bvsncmu"]} = $adb->fetchByAssoc(${$zsffethlyc});
         $viewer->assign("show_listview", ${${"GLOBALS"}["vwafnyh"]}["hide_listview"] == "0");
     } else {
         $viewer->assign("show_listview", true);
     }
     $viewer->assign("buttons", ${$ksukmmns});
     \Workflow\Sidebar::assignMessages(-1, ${$jspfvd});
     $viewer->view("SidebarListWidget.tpl", "Workflow2");
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:63,代码来源:SidebarListWidget.php

示例14: preProcess

 function preProcess(Vtiger_Request $request, $display = true)
 {
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $viewer = $this->getViewer($request);
     $viewer->assign('PAGETITLE', $this->getPageTitle($request));
     $viewer->assign('HEADER_SCRIPTS', $this->getHeaderScripts($request));
     $viewer->assign('STYLES', $this->getHeaderCss($request));
     $viewer->assign('SKIN_PATH', Vtiger_Theme::getCurrentUserThemePath());
     $viewer->assign('LANGUAGE_STRINGS', $this->getJSLanguageStrings($request));
     $viewer->assign('HTMLLANG', Vtiger_Language_Handler::getShortLanguageName());
     $viewer->assign('LANGUAGE', Vtiger_Language_Handler::getLanguage());
     if ($display) {
         $this->preProcessDisplay($request);
     }
 }
开发者ID:rubichcube,项目名称:YetiForceCRM,代码行数:15,代码来源:Controller.php

示例15: process

    public function process(Vtiger_Request $request)
    {
        PDFMaker_Debugger_Model::GetInstance()->Init();
        $simple_html_dom_file = $this->getSimpleHtmlDomFile();
        require_once $simple_html_dom_file;
        $default_charset = vglobal('default_charset');
        $adb = PearDatabase::getInstance();
        $relmodule = $request->get("formodule");
        $viewer = $this->getViewer($request);
        // get ids
        if ($request->get("idslist") != "") {
            //generating from listview
            $Records = explode(";", rtrim($request->get("idslist"), ";"));
        } elseif ($request->get('record') != '') {
            $Records = array($request->get("record"));
        } elseif ($request->get('return_id') != '') {
            $Records = array($request->get("return_id"));
        }
        $viewer->assign("RECORDS", implode(';', $Records));
        // get selected templates id array
        $commontemplateids = trim($request->get("commontemplateid"), ";");
        $Templateids = explode(";", $commontemplateids);
        $viewer->assign("COMMONTEMPLATEIDS", $commontemplateids);
        // get selected templates array
        $sql = "SELECT * FROM vtiger_pdfmaker WHERE templateid IN (" . generateQuestionMarks($Templateids) . ")";
        $result = $adb->pquery($sql, $Templateids);
        $num_rows = $adb->num_rows($result);
        $template_select = '';
        if ($num_rows > 1) {
            $template_select .= "<select onChange='changeTemplate(this.value);'>";
            while ($row = $adb->fetchByAssoc($result)) {
                if ($st == "") {
                    $st = $row['templateid'];
                }
                $template_select .= "<option value='" . $row['templateid'] . "'>" . $row['filename'] . "</option>";
            }
            $template_select .= "</select>";
        } else {
            $st = $adb->query_result($result, 0, "templateid");
            $template_select .= $adb->query_result($result, 0, "filename");
        }
        $viewer->assign("TEMPLATE_SELECT", $template_select);
        $viewer->assign("ST", $st);
        // get content of templates
        $PDFMaker = new PDFMaker_PDFMaker_Model('PDFMaker');
        $PDFContents = array();
        //require_once("modules/PDFMaker/InventoryPDF.php");
        foreach ($Records as $record) {
            $record_model = Vtiger_Record_Model::getInstanceById($record);
            $focus = $record_model->entity;
            foreach ($Templateids as $templateid) {
                $PDFContent = new PDFMaker_PDFContent_Model($templateid, $relmodule, $focus, $request->get("language"));
                $pdf_content = $PDFContent->getContent();
                $body_html = $pdf_content["body"];
                $body_html = str_replace("#LISTVIEWBLOCK_START#", "", $body_html);
                $body_html = str_replace("#LISTVIEWBLOCK_END#", "", $body_html);
                $PDFContents[$templateid]["header"] = $pdf_content["header"];
                $PDFContents[$templateid]["body"] = $body_html;
                $PDFContents[$templateid]["footer"] = $pdf_content["footer"];
            }
        }
        $pdf_divs = '';
        foreach ($PDFContents as $templateid => $templatedata) {
            $sections = array("body", "header", "footer");
            foreach ($sections as $val) {
                if ($templatedata[$val] != "") {
                    /*
                    $html = str_get_html($templatedata[$val]);
                    
                    $textTags = $html->find('text');
                    foreach ($textTags as $text) {
                        $text->outertext = str_replace("  ", "&nbsp;&nbsp;", $text->outertext);
                        $text->outertext = str_replace("&nbsp; ", "&nbsp;&nbsp;", $text->outertext);
                    }
                    $templatedata[$val] = htmlentities($html->save(), ENT_QUOTES, $default_charset);
                    */
                    $templatedata[$val] = htmlentities($templatedata[$val], ENT_QUOTES, $default_charset);
                }
            }
            $pdf_divs .= '<div style="display:none;" id="body_div' . $templateid . '"> 
		         <textarea name="body' . $templateid . '" id="body' . $templateid . '" style="width:90%;height:700px" class=small tabindex="5">' . $templatedata["body"] . '</textarea>
		       </div>
		
		       <div style="display:none;" id="header_div' . $templateid . '"> 
		         <textarea name="header' . $templateid . '" id="header' . $templateid . '" style="width:90%;height:700px" class=small tabindex="5">' . $templatedata["header"] . '</textarea>
		       </div>
		 
		       <div style="display:none;" id="footer_div' . $templateid . '"> 
		         <textarea name="footer' . $templateid . '" id="footer' . $templateid . '" style="width:90%;height:700px" class=small tabindex="5">' . $templatedata["footer"] . '</textarea>
		       </div>';
            $pdf_divs .= '<script type="text/javascript">
                            jQuery(document).ready(function(){
		          	CKEDITOR.replace( \'body' . $templateid . '\', {height: \'300\'});
                                CKEDITOR.replace( \'header' . $templateid . '\', {height: \'300\'});
                                CKEDITOR.replace( \'footer' . $templateid . '\', {height: \'300\'});
                                })
		         </script>';
        }
        $viewer->assign("PDF_DIVS", $pdf_divs);
        $language = Vtiger_Language_Handler::getLanguage();
//.........这里部分代码省略.........
开发者ID:cin-system,项目名称:cinrepo,代码行数:101,代码来源:EditAndExport.php


注:本文中的Vtiger_Language_Handler::getLanguage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。