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


PHP getTabId函数代码示例

本文整理汇总了PHP中getTabId函数的典型用法代码示例。如果您正苦于以下问题:PHP getTabId函数的具体用法?PHP getTabId怎么用?PHP getTabId使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: process

 public function process(Vtiger_Request $request)
 {
     if ($_FILES['import_file']['error'] == 0) {
         $tmp_file_name = $_FILES['import_file']['tmp_name'];
         $fh = fopen($tmp_file_name, "r");
         $xml_content = fread($fh, filesize($tmp_file_name));
         fclose($fh);
         $PDFMaker = new PDFMaker_PDFMaker_Model();
         $adb = PearDatabase::getInstance();
         $xml = new SimpleXMLElement($xml_content);
         foreach ($xml->template as $data) {
             $filename = $this->cdataDecode($data->templatename);
             $nameOfFile = $this->cdataDecode($data->filename);
             $description = $this->cdataDecode($data->description);
             $modulename = $this->cdataDecode($data->module);
             $pdf_format = $this->cdataDecode($data->settings->format);
             $pdf_orientation = $this->cdataDecode($data->settings->orientation);
             $tabid = getTabId($modulename);
             if ($PDFMaker->GetVersionType() == "professional" || in_array($tabid, $PDFMaker->GetBasicModules())) {
                 if ($data->settings->margins->top > 0) {
                     $margin_top = $data->settings->margins->top;
                 } else {
                     $margin_top = 0;
                 }
                 if ($data->settings->margins->bottom > 0) {
                     $margin_bottom = $data->settings->margins->bottom;
                 } else {
                     $margin_bottom = 0;
                 }
                 if ($data->settings->margins->left > 0) {
                     $margin_left = $data->settings->margins->left;
                 } else {
                     $margin_left = 0;
                 }
                 if ($data->settings->margins->right > 0) {
                     $margin_right = $data->settings->margins->right;
                 } else {
                     $margin_right = 0;
                 }
                 $dec_point = $this->cdataDecode($data->settings->decimals->point);
                 $dec_decimals = $this->cdataDecode($data->settings->decimals->decimals);
                 $dec_thousands = $this->cdataDecode($data->settings->decimals->thousands);
                 $header = $this->cdataDecode($data->header);
                 $body = $this->cdataDecode($data->body);
                 $footer = $this->cdataDecode($data->footer);
                 $templateid = $adb->getUniqueID('vtiger_pdfmaker');
                 $sql1 = "insert into vtiger_pdfmaker (filename,module,description,body,deleted,templateid) values (?,?,?,?,?,?)";
                 $params1 = array($filename, $modulename, $description, $body, 0, $templateid);
                 $adb->pquery($sql1, $params1);
                 $sql2 = "INSERT INTO vtiger_pdfmaker_settings (templateid, margin_top, margin_bottom, margin_left, margin_right, format, orientation, decimals, decimal_point, thousands_separator, header, footer, encoding, file_name) \n             VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                 $params2 = array($templateid, $margin_top, $margin_bottom, $margin_left, $margin_right, $pdf_format, $pdf_orientation, $dec_decimals, $dec_point, $dec_thousands, $header, $footer, "auto", $nameOfFile);
                 $adb->pquery($sql2, $params2);
                 $PDFMaker->AddLinks($modulename);
             }
         }
     }
     header('Location: index.php?module=PDFMaker&view=List');
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:58,代码来源:Import.php

示例2: getFieldUI

 public function getFieldUI(Vtiger_Request $request)
 {
     $fieldsList = $request->get('fieldIdList');
     $module = $request->get('sourceModule');
     $fieldModelList = Settings_LayoutEditor_Field_Model::getInstanceFromFieldId($fieldsList, getTabId($module));
     $viewer = $this->getViewer($request);
     $qualifiedModuleName = $request->getModule(false);
     $viewer->assign('SELECTED_MODULE_NAME', $module);
     $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
     $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
     $viewer->assign('FIELD_MODELS_LIST', $fieldModelList);
     $viewer->view('FieldUi.tpl', $qualifiedModuleName);
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:13,代码来源:IndexAjax.php

示例3: process

 public function process(Vtiger_Request $request)
 {
     ${"GLOBALS"}["ekosczsy"] = "tabid";
     ${${"GLOBALS"}["ekosczsy"]} = getTabId($request->get("workflowModule"));
     ${"GLOBALS"}["mhuirymtoy"] = "tabid";
     ${${"GLOBALS"}["hvamuhbnnwu"]} = \PearDatabase::getInstance();
     if ($request->get("hidden") == true) {
         ob_start();
     }
     if (!empty(${${"GLOBALS"}["mhuirymtoy"]})) {
         ${"GLOBALS"}["outajbzyo"] = "result";
         ${${"GLOBALS"}["rnhwfqjyx"]} = "SELECT linkid FROM vtiger_links WHERE linktype = 'DETAILVIEWSIDEBARWIDGET' AND linklabel = 'Workflows' AND tabid = " . ${${"GLOBALS"}["bxwgaby"]};
         ${${"GLOBALS"}["dsrfsmvy"]} = $adb->query(${${"GLOBALS"}["rnhwfqjyx"]});
         ${${"GLOBALS"}["xdyqgnxwn"]} = $request->get("MODE");
         $xyxnkgw = "mode";
         if (${${"GLOBALS"}["xdyqgnxwn"]} == "ADD" && $adb->num_rows(${${"GLOBALS"}["outajbzyo"]}) > 1) {
             ${"GLOBALS"}["cnubqpsfrtf"] = "tabid";
             $adb->query("DELETE FROM vtiger_links WHERE (linktype = 'DETAILVIEWSIDEBARWIDGET' OR linktype = 'LISTVIEWSIDEBARWIDGET') AND linklabel = 'Workflows' AND tabid = " . ${${"GLOBALS"}["bxwgaby"]}, true);
             ${${"GLOBALS"}["rnhwfqjyx"]} = "SELECT linkid FROM vtiger_links WHERE linktype = 'DETAILVIEWSIDEBARWIDGET' AND linklabel = 'Workflows' AND tabid = " . ${${"GLOBALS"}["cnubqpsfrtf"]};
             ${${"GLOBALS"}["dsrfsmvy"]} = $adb->query(${${"GLOBALS"}["rnhwfqjyx"]});
         }
         if (${${"GLOBALS"}["xdyqgnxwn"]} == "DEL" || empty(${$xyxnkgw}) && $adb->num_rows(${${"GLOBALS"}["dsrfsmvy"]}) > 0) {
             ${"GLOBALS"}["jywgricc"] = "tabid";
             $lxcddedp = "mode";
             ${$lxcddedp} = "DEL";
             $adb->query("DELETE FROM vtiger_links WHERE (linktype = 'DETAILVIEWSIDEBARWIDGET' OR linktype = 'LISTVIEWSIDEBARWIDGET') AND linklabel = 'Workflows' AND tabid = " . ${${"GLOBALS"}["jywgricc"]}, true);
             echo getTranslatedString("LBL_ACTIVATE_SIDEBAR", "Settings:Workflow2");
         } elseif ($adb->num_rows(${${"GLOBALS"}["dsrfsmvy"]}) == 0) {
             ${"GLOBALS"}["ocotbv"] = "mode";
             ${${"GLOBALS"}["ocotbv"]} = "ADD";
             ${"GLOBALS"}["hdlxhrdrllur"] = "linkid";
             ${${"GLOBALS"}["rzgmacoc"]} = $adb->getUniqueID("vtiger_links");
             $adb->query("INSERT INTO vtiger_links SET linkid = '" . ${${"GLOBALS"}["rzgmacoc"]} . "',linktype = 'DETAILVIEWSIDEBARWIDGET', linklabel = 'Workflows', tabid = " . ${${"GLOBALS"}["bxwgaby"]} . ",linkurl='" . "module=Workflow2&view=SidebarWidget" . "'", true);
             ${${"GLOBALS"}["rzgmacoc"]} = $adb->getUniqueID("vtiger_links");
             $qcahtlck = "tabid";
             $adb->query("INSERT INTO vtiger_links SET linkid = '" . ${${"GLOBALS"}["hdlxhrdrllur"]} . "',linktype = 'LISTVIEWSIDEBARWIDGET', linklabel = 'Workflows', tabid = " . ${$qcahtlck} . ",linkurl='" . "module=Workflow2&src_module=" . $request->get("workflowModule") . "&view=SidebarListWidget" . "'", true);
             echo getTranslatedString("LBL_DEACTIVATE_SIDEBAR", "Settings:Workflow2");
         }
     }
     if ($request->get("hidden") == true) {
         ob_end_clean();
     }
     if ($request->get("workflowModule") == "Calendar") {
         ${"GLOBALS"}["jrpyqoyvdoz"] = "request2";
         ${${"GLOBALS"}["jrpyqoyvdoz"]} = ${${"GLOBALS"}["ognxjavta"]};
         $request->set("MODE", ${${"GLOBALS"}["xdyqgnxwn"]});
         $request->set("workflowModule", "Events");
         $request->set("hidden", true);
         $this->process(${${"GLOBALS"}["ognxjavta"]});
     }
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:51,代码来源:SidebarToggle.php

示例4: process

 function process(Vtiger_Request $request)
 {
     ${"GLOBALS"}["kqjqpgyxbpw"] = "row";
     $vkvaqpflee = "aid";
     global $current_user;
     ${"GLOBALS"}["uwhowfopwf"] = "adb";
     ${${"GLOBALS"}["uwhowfopwf"]} = PearDatabase::getInstance();
     $xtjbegglz = "moduleName";
     ${"GLOBALS"}["rpprupo"] = "result";
     ${"GLOBALS"}["chmmqmj"] = "a";
     $byxpixpu = "sql";
     ${${"GLOBALS"}["ntetvnbwqlv"]} = $this->getViewer(${${"GLOBALS"}["ibktcfcj"]});
     ${"GLOBALS"}["fblhutfwj"] = "a";
     $sbwrqfadr = "sql";
     ${$xtjbegglz} = $request->getModule();
     ${"GLOBALS"}["nlplkrnjrcv"] = "sql";
     ${${"GLOBALS"}["urohdigihdy"]} = Vtiger_Module_Model::getInstance(${${"GLOBALS"}["zqodvuvwr"]});
     ${${"GLOBALS"}["lwvdhqdj"]} = (int) $request->get("aid");
     $sglxrinrxh = "userqueue";
     ${${"GLOBALS"}["agpkbjtayb"]} = $request->get("h");
     ${${"GLOBALS"}["fblhutfwj"]} = $request->get("a");
     if (1 == 0 && !empty(${$vkvaqpflee}) && !empty(${${"GLOBALS"}["bezvbhq"]}) && ${${"GLOBALS"}["agpkbjtayb"]} == md5($current_user->id . "##" . ${${"GLOBALS"}["chmmqmj"]} . "##" . ${${"GLOBALS"}["lwvdhqdj"]})) {
     }
     ${${"GLOBALS"}["nlplkrnjrcv"]} = "SELECT\n                    vtiger_wf_confirmation.*,\n                    vtiger_wf_confirmation.id as conf_id,\n                    vtiger_wf_settings.*,\n                    vtiger_wfp_blocks.text as block_title,\n                    vtiger_wfp_blocks.settings as block_settings,\n                    vtiger_users.user_name,\n                    vtiger_users.first_name,\n                    vtiger_users.last_name,\n                    result_user.user_name as result_user_name,\n                    result_user.first_name as result_first_name,\n                    result_user.last_name as result_last_name\n                FROM\n                    vtiger_wf_confirmation_user\n                INNER JOIN vtiger_wf_confirmation ON(vtiger_wf_confirmation.id = vtiger_wf_confirmation_user.confirmation_id)\n                INNER JOIN vtiger_crmentity ON(vtiger_crmentity.crmid = vtiger_wf_confirmation.crmid AND vtiger_crmentity.deleted = 0)\n                INNER JOIN vtiger_wf_settings ON(vtiger_wf_settings.id = vtiger_wf_confirmation.workflow_id)\n                INNER JOIN vtiger_wfp_blocks ON(vtiger_wfp_blocks.id = vtiger_wf_confirmation.blockID)\n                INNER JOIN vtiger_wf_queue ON(vtiger_wf_queue.crmid = vtiger_wf_confirmation.crmid AND vtiger_wf_queue.execID = vtiger_wf_confirmation.execID AND vtiger_wf_queue.block_id =vtiger_wf_confirmation.blockID)\n                INNER JOIN vtiger_users ON(vtiger_users.id = vtiger_wf_confirmation.from_user_id)\n                LEFT JOIN vtiger_users as result_user ON(result_user.id = vtiger_wf_confirmation.result_user_id)\n                WHERE\n                    user_id = " . $current_user->id . " AND vtiger_wf_confirmation.visible = 1\n                GROUP BY\n                    vtiger_wf_confirmation.id ORDER BY block_title\n                ";
     ${${"GLOBALS"}["frlpsfjjm"]} = $adb->query(${$sbwrqfadr}, true);
     ${${"GLOBALS"}["ooixnmkwq"]} = array();
     $pthcdlfddnnh = "result";
     ${"GLOBALS"}["oteaqj"] = "userqueue";
     while (${${"GLOBALS"}["kqjqpgyxbpw"]} = $adb->fetchByAssoc(${$pthcdlfddnnh})) {
         $rmjbqeshhis = "referenceModule";
         $ngcqplp = "referenceModule";
         ${"GLOBALS"}["mlvnybsicfig"] = "workflows";
         ${"GLOBALS"}["eljacioilgx"] = "recordLink";
         ${"GLOBALS"}["dauxpml"] = "numberField";
         if (!is_array(${${"GLOBALS"}["mlvnybsicfig"]}[${${"GLOBALS"}["wmhxuntxqkc"]}["block_title"]])) {
             ${"GLOBALS"}["twbpebpxi"] = "workflows";
             ${${"GLOBALS"}["twbpebpxi"]}[${${"GLOBALS"}["wmhxuntxqkc"]}["block_title"]] = array();
         }
         ${"GLOBALS"}["pmxvjbf"] = "noCols";
         ${$ngcqplp} = ${${"GLOBALS"}["wmhxuntxqkc"]}["module"];
         ${"GLOBALS"}["rfiwxezcqe"] = "referenceModule";
         ${"GLOBALS"}["flnnii"] = "row";
         $hepygdrwkc = "noCols";
         $jdlignnj = "noCols";
         ${"GLOBALS"}["awmkvud"] = "workflows";
         ${"GLOBALS"}["jbchodyllw"] = "row";
         $dnepmkz = "settings";
         ${${"GLOBALS"}["sdhtkdyeuq"]} = CRMEntity::getInstance(${${"GLOBALS"}["rfiwxezcqe"]});
         if (empty(${$jdlignnj}[${${"GLOBALS"}["kkwrpdb"]}])) {
             ${"GLOBALS"}["thejxnd"] = "resultTMP";
             $fsozifcfsw = "row";
             $wnpebq = "resultTMP";
             ${"GLOBALS"}["mfdayznhunx"] = "sql";
             $noipkqjvcbky = "sql";
             ${${"GLOBALS"}["doxebbenfem"]} = "SELECT * FROM vtiger_field WHERE tabid = " . getTabId(${${"GLOBALS"}["wmhxuntxqkc"]}["module"]) . " AND uitype = 4";
             ${${"GLOBALS"}["thejxnd"]} = $adb->query(${${"GLOBALS"}["mfdayznhunx"]});
             $ronvvlcujsa = "sql";
             if ($adb->num_rows(${${"GLOBALS"}["svdtdbgmoc"]}) > 0) {
                 $kwpctersh = "referenceModule";
                 ${${"GLOBALS"}["duijdw"]}[${$kwpctersh}]["link_no"] = $adb->fetchByAssoc(${${"GLOBALS"}["svdtdbgmoc"]});
             } else {
                 ${"GLOBALS"}["shrvsk"] = "referenceModule";
                 ${${"GLOBALS"}["duijdw"]}[${${"GLOBALS"}["shrvsk"]}]["link_no"] = "no_available";
             }
             ${$ronvvlcujsa} = "SELECT * FROM vtiger_field WHERE tabid = " . getTabId(${$fsozifcfsw}["module"]) . " AND fieldname = ?";
             ${$wnpebq} = $adb->pquery(${$noipkqjvcbky}, array($focus->list_link_field));
             if ($adb->num_rows(${${"GLOBALS"}["svdtdbgmoc"]}) > 0) {
                 ${${"GLOBALS"}["duijdw"]}[${${"GLOBALS"}["kkwrpdb"]}]["link_name"] = $adb->fetchByAssoc(${${"GLOBALS"}["svdtdbgmoc"]});
             } else {
                 ${"GLOBALS"}["qgebipdtob"] = "noCols";
                 ${${"GLOBALS"}["qgebipdtob"]}[${${"GLOBALS"}["kkwrpdb"]}]["link_name"] = "no_available";
             }
         }
         ${"GLOBALS"}["hfpqiswtqjc"] = "row";
         ${"GLOBALS"}["dirpsx"] = "referenceModule";
         if (${${"GLOBALS"}["pmxvjbf"]}[${${"GLOBALS"}["kkwrpdb"]}]["link_no"] != "no_available") {
             $yyiomdi = "sql";
             ${"GLOBALS"}["wkhdpyqxx"] = "row";
             $zhhzpgweddf = "referenceModule";
             $jjwpivteyq = "linkFieldRst";
             ${$yyiomdi} = "SELECT " . ${${"GLOBALS"}["duijdw"]}[${$zhhzpgweddf}]["link_no"]["columnname"] . " as nofield FROM " . ${${"GLOBALS"}["duijdw"]}[${${"GLOBALS"}["kkwrpdb"]}]["link_no"]["tablename"] . " WHERE " . $focus->table_index . " = " . ${${"GLOBALS"}["wkhdpyqxx"]}["crmid"];
             ${${"GLOBALS"}["tnvfwhunq"]} = $adb->query(${${"GLOBALS"}["doxebbenfem"]});
             ${${"GLOBALS"}["egivyrgmhu"]} = $adb->query_result(${$jjwpivteyq}, 0, "nofield");
         }
         if (${$hepygdrwkc}[${$rmjbqeshhis}]["link_name"] != "no_available") {
             $wncswbngel = "sql";
             $yrbxtiml = "noCols";
             $zpcmsf = "linkField";
             $tdatiye = "linkFieldRst";
             ${"GLOBALS"}["dfndagpcvie"] = "row";
             ${$wncswbngel} = "SELECT " . ${$yrbxtiml}[${${"GLOBALS"}["kkwrpdb"]}]["link_name"]["columnname"] . " as linkfield FROM " . ${${"GLOBALS"}["duijdw"]}[${${"GLOBALS"}["kkwrpdb"]}]["link_name"]["tablename"] . " WHERE " . $focus->table_index . " = " . ${${"GLOBALS"}["dfndagpcvie"]}["crmid"];
             ${$tdatiye} = $adb->query(${${"GLOBALS"}["doxebbenfem"]});
             ${$zpcmsf} = $adb->query_result(${${"GLOBALS"}["tnvfwhunq"]}, 0, "linkfield");
         }
         ${${"GLOBALS"}["depeexesucr"]} = "<a target='_blank' href='index.php?module={$referenceModule}&view=Detail&record=" . "" . ${${"GLOBALS"}["wmhxuntxqkc"]}["crmid"] . "' title='" . getTranslatedString(${${"GLOBALS"}["kkwrpdb"]}, ${${"GLOBALS"}["kkwrpdb"]}) . "'>" . ${${"GLOBALS"}["seqptb"]} . "</a>";
         ${"GLOBALS"}["gognlbsrc"] = "useBuiltinEncoderDecoder";
         ${"GLOBALS"}["wzyntcdvnerr"] = "settings";
         if (${${"GLOBALS"}["duijdw"]}[${${"GLOBALS"}["dirpsx"]}]["link_no"] != "no_available") {
             $bkzrkriyn = "referenceModule";
             $qlotdcqkwc = "row";
//.........这里部分代码省略.........
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:101,代码来源:List.php

示例5: initSortByField

 /**
  * Function to initialize the sortby fields array
  */
 function initSortByField($module)
 {
     global $adb, $log;
     $log->debug("Entering function initSortByField ({$module})");
     // Define the columnname's and uitype's which needs to be excluded
     $exclude_columns = array('parent_id', 'quoteid', 'vendorid', 'access_count');
     $exclude_uitypes = array();
     $tabid = getTabId($module);
     if ($module == 'Calendar') {
         $tabid = array('9', '16');
     }
     $sql = "SELECT columnname FROM vtiger_field " . " WHERE (fieldname not like '%\\_id' OR fieldname in ('assigned_user_id'))" . " AND tabid in (" . generateQuestionMarks($tabid) . ") and vtiger_field.presence in (0,2)";
     $params = array($tabid);
     if (count($exclude_columns) > 0) {
         $sql .= " AND columnname NOT IN (" . generateQuestionMarks($exclude_columns) . ")";
         array_push($params, $exclude_columns);
     }
     if (count($exclude_uitypes) > 0) {
         $sql .= " AND uitype NOT IN (" . generateQuestionMarks($exclude_uitypes) . ")";
         array_push($params, $exclude_uitypes);
     }
     $result = $adb->pquery($sql, $params);
     $num_rows = $adb->num_rows($result);
     for ($i = 0; $i < $num_rows; $i++) {
         $columnname = $adb->query_result($result, $i, 'columnname');
         if (in_array($columnname, $this->sortby_fields)) {
             continue;
         } else {
             $this->sortby_fields[] = $columnname;
         }
     }
     if ($tabid == 21 or $tabid == 22) {
         $this->sortby_fields[] = 'crmid';
     }
     $log->debug("Exiting initSortByField");
 }
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:39,代码来源:CRMEntity.php

示例6: array

if ($record == "" && $save != "") {
    $Calendar4You->SaveView($Type_Ids, $Users_Ids, $all_users, $Load_Event_Status, $Load_Task_Status);
}
$detailview_permissions = $Calendar4You->CheckPermissions("DETAIL");
require 'user_privileges/user_privileges_' . $current_user->id . '.php';
require 'user_privileges/sharing_privileges_' . $current_user->id . '.php';
$ParentUsers = array();
$u_query = "select vtiger_user2role.userid as id from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like ?";
$u_params = array($current_user_parent_role_seq . "::%");
$u_result = $adb->pquery($u_query, $u_params);
while ($u_row = $adb->fetchByAssoc($u_result)) {
    $ParentUsers[] = $u_row["id"];
}
$view = convertFullCalendarView($full_calendar_view);
$calendar_tabid = getTabId("Calendar");
$events_tabid = getTabId("Events");
$Showed_Field = array();
$Event_Info = array();
if ($detailview_permissions) {
    $sql0 = "SELECT * FROM its4you_calendar4you_event_fields WHERE userid = ? AND view = ?";
    $result0 = $adb->pquery($sql0, array($current_user->id, $view));
    $num_rows0 = $adb->num_rows($result0);
    if ($num_rows0 > 0) {
        while ($row0 = $adb->fetchByAssoc($result0)) {
            $sql01 = "SELECT uitype, columnname, fieldlabel FROM vtiger_field WHERE fieldname = ? AND tabid IN (?,?)";
            $result01 = $adb->pquery($sql01, array($row0['fieldname'], $calendar_tabid, $events_tabid));
            $columnname = $adb->query_result($result01, 0, "columnname");
            $fieldlabel = $adb->query_result($result01, 0, "fieldlabel");
            $uitype = $adb->query_result($result01, 0, "uitype");
            $Field_data = array("fieldname" => $row0['fieldname'], "columnname" => $columnname, "fieldlabel" => $fieldlabel, "uitype" => $uitype);
            if ($row0['type'] == "1") {
开发者ID:mslokhat,项目名称:corebos,代码行数:31,代码来源:Events.php

示例7: getFilterComparedField

 /** Function to get field that is to be compared in query form for the given Comparator and field
  *  @ param $field : field
  *  returns the value for the comparator 	
  */
 function getFilterComparedField($field)
 {
     global $adb, $ogReport;
     if (!empty($this->secondarymodule)) {
         $secModules = explode(':', $this->secondarymodule);
         foreach ($secModules as $secModule) {
             $secondary = CRMEntity::getInstance($secModule);
             $this->queryPlanner->addTable($secondary->table_name);
         }
     }
     $field = split('#', $field);
     $module = $field[0];
     $fieldname = trim($field[1]);
     $tabid = getTabId($module);
     $field_query = $adb->pquery("SELECT tablename,columnname,typeofdata,fieldname,uitype FROM vtiger_field WHERE tabid = ? AND fieldname= ?", array($tabid, $fieldname));
     $fieldtablename = $adb->query_result($field_query, 0, 'tablename');
     $fieldcolname = $adb->query_result($field_query, 0, 'columnname');
     $typeofdata = $adb->query_result($field_query, 0, 'typeofdata');
     $fieldtypeofdata = ChangeTypeOfData_Filter($fieldtablename, $fieldcolname, $typeofdata[0]);
     $uitype = $adb->query_result($field_query, 0, 'uitype');
     /* if($tr[0]==$ogReport->primodule)
         $value = $adb->query_result($field_query,0,'tablename').".".$adb->query_result($field_query,0,'columnname');
         else
         $value = $adb->query_result($field_query,0,'tablename').$tr[0].".".$adb->query_result($field_query,0,'columnname');
        */
     if ($uitype == 68 || $uitype == 59) {
         $fieldtypeofdata = 'V';
     }
     if ($fieldtablename == "vtiger_crmentity") {
         $fieldtablename = $fieldtablename . $module;
     }
     if ($fieldname == "assigned_user_id") {
         $fieldtablename = "vtiger_users" . $module;
         $fieldcolname = "user_name";
     }
     if ($fieldname == "account_id") {
         $fieldtablename = "vtiger_account" . $module;
         $fieldcolname = "accountname";
     }
     if ($fieldname == "contact_id") {
         $fieldtablename = "vtiger_contactdetails" . $module;
         $fieldcolname = "lastname";
     }
     if ($fieldname == "parent_id") {
         $fieldtablename = "vtiger_crmentityRel" . $module;
         $fieldcolname = "setype";
     }
     if ($fieldname == "vendor_id") {
         $fieldtablename = "vtiger_vendorRel" . $module;
         $fieldcolname = "vendorname";
     }
     if ($fieldname == "potential_id") {
         $fieldtablename = "vtiger_potentialRel" . $module;
         $fieldcolname = "potentialname";
     }
     if ($fieldname == "assigned_user_id1") {
         $fieldtablename = "vtiger_usersRel1";
         $fieldcolname = "user_name";
     }
     if ($fieldname == 'quote_id') {
         $fieldtablename = "vtiger_quotes" . $module;
         $fieldcolname = "subject";
     }
     if ($fieldname == 'product_id' && $fieldtablename == 'vtiger_troubletickets') {
         $fieldtablename = "vtiger_productsRel";
         $fieldcolname = "productname";
     }
     if ($fieldname == 'product_id' && $fieldtablename == 'vtiger_campaign') {
         $fieldtablename = "vtiger_productsCampaigns";
         $fieldcolname = "productname";
     }
     if ($fieldname == 'product_id' && $fieldtablename == 'vtiger_products') {
         $fieldtablename = "vtiger_productsProducts";
         $fieldcolname = "productname";
     }
     if ($fieldname == 'campaignid' && $module == 'Potentials') {
         $fieldtablename = "vtiger_campaign" . $module;
         $fieldcolname = "campaignname";
     }
     $value = $fieldtablename . "." . $fieldcolname;
     $this->queryPlanner->addTable($fieldtablename);
     return $value;
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:87,代码来源:RelBlockRun.php

示例8: array

$dropflds = array('com_vtiger_workflows.schtypeid', 'com_vtiger_workflows.schtime', 'com_vtiger_workflows.schdayofmonth', 'com_vtiger_workflows.schdayofweek', 'com_vtiger_workflows.schannualdates', 'com_vtiger_workflows.nexttrigger_time', 'vtiger_mailmanager_mailattachments.cid', 'vtiger_mailscanner_rules.assigned_to', 'vtiger_mailscanner_rules.cc', 'vtiger_mailscanner_rules.bcc', 'vtiger_recurringevents.recurringenddate', 'vtiger_mailscanner.time_zone', 'vtiger_portal.createdtime', 'vtiger_mail_accounts.sent_folder', 'vtiger_organizationdetails.vatid', 'vtiger_tab.trial');
foreach ($dropflds as $fqfn) {
    list($table, $field) = explode('.', $fqfn);
    ExecuteQuery("ALTER TABLE {$table} DROP {$field}");
}
$droptable = array('vtiger_feedback', 'vtiger_shareduserinfo', 'vtiger_schedulereports', 'vtiger_calendar_default_activitytypes', 'vtiger_calendar_user_activitytypes', 'vtiger_reporttype');
foreach ($droptable as $table) {
    ExecuteQuery("DROP TABLE {$table}");
}
//Schema changes for vtiger_troubletickets hours & days column
ExecuteQuery('ALTER TABLE vtiger_troubletickets MODIFY hours varchar(200)', array());
ExecuteQuery('ALTER TABLE vtiger_troubletickets MODIFY days varchar(200)', array());
ExecuteQuery('UPDATE vtiger_field set typeofdata=? WHERE fieldname IN(?,?) AND tablename = ?', array('I~O', 'hours', 'days', 'vtiger_troubletickets'));
Vtiger_Cron::deregister('ScheduleReports');
//Updating actions for PriceBooks related list in Products and Services
$productsTabId = getTabId('Products');
ExecuteQuery('UPDATE vtiger_relatedlists SET actions=? WHERE label=? and tabid=?', array('ADD', 'PriceBooks', $productsTabId));
$eventsManager = new VTEventsManager($adb);
$eventsManager->unregisterHandler('Vtiger_RecordLabelUpdater_Handler');
//Start: Customer - Feature #17656 Allow users to add/remove date format with the date fields in workflow send mail task.
$fieldResult = $adb->pquery('SELECT fieldname, name, typeofdata FROM vtiger_field
  INNER JOIN vtiger_tab ON vtiger_tab.tabid = vtiger_field.tabid WHERE typeofdata LIKE ?', array('D%'));
$dateFieldsList = $dateTimeFieldsList = array();
while ($rowData = $adb->fetch_array($fieldResult)) {
    $moduleName = $rowData['name'];
    $fieldName = $rowData['fieldname'];
    $pos = stripos($rowData['typeofdata'], 'DT');
    if ($pos !== false) {
        $dateTimeFieldsList[$moduleName][$fieldName] = $fieldName;
    } else {
        $dateFieldsList[$moduleName][$fieldName] = $fieldName;
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:migrate_from_vt61.php

示例9: showStatistikForm

 public function showStatistikForm($viewer)
 {
     global $adb;
     $class = CRMEntity::getInstance($this->getModuleName());
     $fieldname = $class->list_link_field;
     $sql = "SELECT columnname, tablename FROM vtiger_field WHERE tabid = " . getTabId($this->getModuleName()) . " AND fieldname = ?";
     $result = $adb->pquery($sql, array($fieldname));
     $columnName = $adb->query_result($result, 0, "columnname");
     $tableName = $adb->query_result($result, 0, "tablename");
     $sql = "SELECT vtiger_wf_queue.*, recordTBL." . $columnName . " as title\n                FROM vtiger_wf_queue\n                    LEFT JOIN " . $tableName . " as recordTBL ON (recordTBL." . $class->table_index . " = vtiger_wf_queue.crmid)\n                WHERE block_id = " . $this->_taskID;
     $result = $adb->query($sql, true);
     $waiting = array();
     while ($row = $adb->fetch_array($result)) {
         $row["timestamp"] = VtUtils::formatUserDate(VtUtils::convertToUserTZ($row["timestamp"]));
         $row["nextsteptime"] = VtUtils::formatUserDate(VtUtils::convertToUserTZ($row["nextsteptime"]));
         $waiting[] = $row;
     }
     $viewer->assign("waiting", $waiting);
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:19,代码来源:WfTaskDelay.php

示例10: getTabId

$usersTabId = getTabId('Users');
$blockIds = array();
$blockIds[] = getBlockId($usersTabId, 'LBL_USERLOGIN_ROLE');
$blockIds[] = getBlockId($usersTabId, 'LBL_CALENDAR_SETTINGS');
$updateQuery = "UPDATE vtiger_field SET sequence = CASE fieldname ";
foreach ($userFields as $fieldName) {
    if ($fieldName == 'dayoftheweek') {
        $sequence = 0;
    }
    $updateQuery .= " WHEN '{$fieldName}' THEN  " . ++$sequence;
}
$updateQuery .= " END WHERE tabid = {$usersTabId} AND block IN (" . generateQuestionMarks($blockIds) . ")";
Migration_Index_View::ExecuteQuery($updateQuery, $blockIds);
echo "<br>User Fields Sequence Updated";
// updating Emails module in sharing access rules
$EmailsTabId = getTabId('Emails');
$query = "SELECT tabid FROM vtiger_def_org_share";
$result = $adb->pquery($query, array());
$resultCount = $adb->num_rows($result);
$exist = false;
for ($i = 0; $i < $resultCount; $i++) {
    $tabid = $adb->query_result($result, $i, 'tabid');
    if ($tabid == $EmailsTabId) {
        $exist = true;
        echo 'Emails Sharing Access entry already exist';
        break;
    }
}
if (!$exist) {
    $ruleid = $adb->getUniqueID('vtiger_def_org_share');
    $shareaccessquery = "INSERT INTO vtiger_def_org_share VALUES(?,?,?,?)";
开发者ID:lsmonki,项目名称:vtigercrm,代码行数:31,代码来源:600_to_610.php

示例11: process

 public function process(Vtiger_Request $request)
 {
     $suqqivj = "params";
     $abnhbiiwjxgw = "uitypes";
     ${"GLOBALS"}["cxfpljg"] = "workflowID";
     $oythwcwuij = "params";
     $uxwwlkkdmi = "type";
     $ymsjqqh = "params";
     $rnglpjgj = "params";
     $mbwcsxgslm = "params";
     $xqdffflqhid = "moduleFields";
     $vkrksu = "blockValue";
     $uhvudfgft = "workflowID";
     ${${"GLOBALS"}["ftxpwggzrr"]} = PearDatabase::getInstance();
     ${"GLOBALS"}["ykxzyofbq"] = "type";
     ${${"GLOBALS"}["tfaukbzz"]} = $request->getAll();
     ${$uhvudfgft} = intval(${$ymsjqqh}["workflowID"]);
     if (!empty(${$suqqivj}["workflow_module"])) {
         $kibqefvtfv = "tabID";
         ${${"GLOBALS"}["jvgzmmkv"]} = getTabId(${${"GLOBALS"}["tfaukbzz"]}["workflow_module"]);
         if (empty(${$kibqefvtfv})) {
             return "";
         }
     }
     ${${"GLOBALS"}["ykxzyofbq"]} = ${$rnglpjgj}["type"];
     $ygweexnlwsne = "params";
     ${"GLOBALS"}["dxsvbac"] = "uitypes";
     ${"GLOBALS"}["qkfvanhv"] = "init";
     switch (${$uxwwlkkdmi}) {
         case "email":
             ${$abnhbiiwjxgw} = array(13, 104);
             break;
         default:
             ${${"GLOBALS"}["dxsvbac"]} = false;
             break;
     }
     $qmicsdts = "sql";
     if (!empty(${${"GLOBALS"}["tfaukbzz"]}["workflow_module"])) {
         ${${"GLOBALS"}["znsxayvgwv"]} = VtUtils::getFieldsWithBlocksForModule(${${"GLOBALS"}["tfaukbzz"]}["workflow_module"], true, ${${"GLOBALS"}["tfaukbzz"]}["reftemplate"]);
     } else {
         ${${"GLOBALS"}["znsxayvgwv"]} = array();
     }
     echo "<div style=\"padding:10px;\">";
     echo "<p>" . getTranslatedString("LBL_INSERT_TEMPLATE_VARIABLE", "Workflow2") . ":</p>";
     echo "<select id=\"insertTemplateField_Select\" class=\"chzn-select\" style=\"width:400px;\">";
     if (!empty(${$oythwcwuij}["functions"]) && ${${"GLOBALS"}["tfaukbzz"]}["functions"] == "1") {
         echo "<optgroup label=\"" . getTranslatedString("global functions", "Workflow2") . "\">";
         echo "<option value='[Now]'>Now()</option>";
         echo "<option value='[Now,-x]'>" . sprintf(getTranslatedString("- %s days", "Workflow2"), "x") . "</option>";
         echo "<option value='[Now,+x]'>" . sprintf(getTranslatedString("+ %s days", "Workflow2"), "x") . "</option>";
         echo "<option value='" . "{ ..custom function.. }}>'>" . "\$" . "{ ..custom function.. }}></option>";
         echo "</optgroup>";
     }
     if (!empty(${$mbwcsxgslm}["refFields"]) && ${$ygweexnlwsne}["refFields"] == "true") {
         ${"GLOBALS"}["xgflwscx"] = "references";
         $mnvhxhvbhsb = "params";
         ${"GLOBALS"}["drqyeiujrim"] = "references";
         ${${"GLOBALS"}["xgflwscx"]} = VtUtils::getReferenceFieldsForModule(${$mnvhxhvbhsb}["workflow_module"]);
         echo "<optgroup label=\"" . getTranslatedString("LBL_REFERENCES", "Workflow2") . "\">";
         echo "<option value=\"id\">" . getTranslatedString("LBL_ID_OF_CURRENT_RECORD", "Workflow2") . "&nbsp;&nbsp;(" . getTranslatedString(${${"GLOBALS"}["tfaukbzz"]}["workflow_module"], ${${"GLOBALS"}["tfaukbzz"]}["workflow_module"]) . ")</option>";
         foreach (${${"GLOBALS"}["drqyeiujrim"]} as ${${"GLOBALS"}["dafepd"]}) {
             ${"GLOBALS"}["nnqztiblbs"] = "ref";
             $slunrgqfhwlo = "ref";
             ${${"GLOBALS"}["mnppne"]} = str_replace(array("[source]", "[module]", "[destination]"), array(${${"GLOBALS"}["dafepd"]}["fieldname"], ${${"GLOBALS"}["dafepd"]}["module"], "id"), "([source]: ([module]) [destination])");
             $tauosxbwiycy = "name";
             echo "<option value=\"" . ${$tauosxbwiycy} . "\">" . getTranslatedString(${${"GLOBALS"}["dafepd"]}["fieldlabel"], ${$slunrgqfhwlo}["module"]) . "&nbsp;&nbsp;&nbsp;(" . getTranslatedString(${${"GLOBALS"}["nnqztiblbs"]}["module"], ${${"GLOBALS"}["dafepd"]}["module"]) . ")</option>";
         }
         echo "</optgroup>";
     } else {
         echo "<option value=\"id\">" . getTranslatedString("LBL_ID_OF_CURRENT_RECORD", "Workflow2") . "</option>";
     }
     ${${"GLOBALS"}["qkfvanhv"]} = false;
     ${${"GLOBALS"}["rpwlinoeruc"]} = false;
     foreach (${$xqdffflqhid} as ${${"GLOBALS"}["fugvczqprg"]} => ${$vkrksu}) {
         $pqfbxvx = "blockKey";
         $pkuwndqwc = "blockValue";
         ${"GLOBALS"}["xngsjfeis"] = "field";
         ${"GLOBALS"}["zfcscyqss"] = "init";
         $ysessmc = "close";
         ${${"GLOBALS"}["zfcscyqss"]} = "<optgroup label=\"" . ${$pqfbxvx} . "\">";
         foreach (${$pkuwndqwc} as ${${"GLOBALS"}["nmluafbbj"]} => ${${"GLOBALS"}["xngsjfeis"]}) {
             $mmgjtjrsvqg = "uitypes";
             $nbgdqimtjfi = "uitypes";
             if (${$nbgdqimtjfi} === false || in_array($field->uitype, ${$mmgjtjrsvqg})) {
                 $fhgjjmpn = "init";
                 if (${$fhgjjmpn} !== false) {
                     ${"GLOBALS"}["ucznnblkwte"] = "init";
                     $htciocvmhgj = "close";
                     echo ${${"GLOBALS"}["ucznnblkwte"]};
                     ${${"GLOBALS"}["hdyprkrhczq"]} = false;
                     ${$htciocvmhgj} = true;
                 }
                 echo "<option value='" . $field->name . "'>" . $field->label . "</option>";
             }
         }
         if (${$ysessmc} == true) {
             echo "</optgroup>";
         }
     }
     ${$qmicsdts} = "SELECT * FROM vtiger_wfp_blocks WHERE workflow_id = " . ${${"GLOBALS"}["cxfpljg"]} . " AND env_vars != ''";
//.........这里部分代码省略.........
开发者ID:cin-system,项目名称:cinrepo,代码行数:101,代码来源:GetTemplateFields.php

示例12: removeLinks

 public function removeLinks()
 {
     require_once 'vtlib/Vtiger/Link.php';
     $tabid = getTabId("XMLExport4You");
     Vtiger_Link::deleteAll($tabid);
     $this->DeleteAllRefLinks();
 }
开发者ID:mslokhat,项目名称:corebos,代码行数:7,代码来源:Calendar4You.php

示例13: x0b

 private function x0b()
 {
     global $x0b, $x0c, $x0d, $x0e, $x0f, $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17, $x18, $x19, $x1a, $x1b, $x1c, $x1d, $x1e, $x1f, $x20, $x21, $x22, $x23, $x24, $x25, $x26;
     $sql = "SELECT fieldid, fieldname, uitype\r\r\n              FROM vtiger_field\r\n              WHERE tabid=" . getTabId($this->module) . " AND (displaytype != 3 OR fieldid = 64) AND fieldid != 105";
     $result = $this->db->query($sql);
     $num_rows = $this->db->num_rows($result);
     if ($num_rows > 0) {
         while ($row = $this->db->fetch_array($result)) {
             $related_module = "";
             $fk_record = $this->focus->column_fields[$row["fieldname"]];
             switch ($row["uitype"]) {
                 case "51":
                     $related_module = "Accounts";
                     break;
                 case "57":
                     $related_module = "Contacts";
                     break;
                 case "58":
                     $related_module = "Campaigns";
                     break;
                 case "59":
                     $related_module = "Products";
                     break;
                 case "73":
                     $related_module = "Accounts";
                     break;
                 case "75":
                     $related_module = "Vendors";
                     break;
                 case "81":
                     $related_module = "Vendors";
                     break;
                 case "76":
                     $related_module = "Potentials";
                     break;
                 case "78":
                     $related_module = "Quotes";
                     break;
                 case "80":
                     $related_module = "SalesOrder";
                     break;
                 case "68":
                 case "10":
                     $related_module = getSalesEntityType($fk_record);
                     break;
             }
             if ($related_module != "") {
                 $tabid = getTabId($related_module);
                 $field_inf = "_fieldinfo_cache";
                 $temp =& VTCacheUtils::${$field_inf};
                 unset($temp[$tabid]);
                 $focus2 = CRMEntity::getInstance($related_module);
                 if ($fk_record != "" && $fk_record != "0") {
                     $result_delete = $this->db->query("SELECT deleted FROM vtiger_crmentity WHERE crmid='" . $fk_record . "' AND deleted=0");
                     if ($this->db->num_rows($result_delete) > 0) {
                         $focus2->retrieve_entity_info($fk_record, $related_module);
                         $focus2->id = $fk_record;
                     }
                 }
                 $this->replacements["\$" . "R_" . $x22($related_module) . "_CRMID\$"] = $focus2->id;
                 if (isset($related_module) and $related_module == "Contacts") {
                     $this->replacements['$R_CONTACTS_IMAGENAME$'] = $this->x18($focus2->id);
                 }
                 $this->x12();
                 $this->x0e($related_module, $focus2, true);
                 unset($focus2);
             }
             if ($row["uitype"] == "10" || $row["uitype"] == "68") {
                 if ($related_module == "Accounts") {
                     $related_module2 = "Contacts";
                 } else {
                     $related_module2 = "Accounts";
                 }
                 $tabid2 = getTabId($related_module2);
                 $field_inf = "_fieldinfo_cache";
                 $temp =& VTCacheUtils::${$field_inf};
                 unset($temp[$tabid2]);
                 $focus3 = CRMEntity::getInstance($related_module2);
                 $this->replacements["\$" . "R_" . $x22($related_module2) . "_CRMID\$"] = $focus3->id;
                 $this->x0e($related_module2, $focus3, true);
                 unset($focus3);
             }
         }
     }
 }
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:85,代码来源:InventoryPDF.php

示例14: _checkField

 private function _checkField($check)
 {
     $hokekyg = "check";
     $irkmjqniy = "check";
     $vuomcowj = "check";
     $qxtftfelfc = "checkvalue";
     global $adb;
     if (${$vuomcowj}["mode"] == "value" || empty(${$hokekyg}["mode"])) {
         $ljuuqqmpe = "checkvalue";
         $qlncurmce = "check";
         ${"GLOBALS"}["sjpunfxie"] = "checkvalue";
         ${$ljuuqqmpe} = ${$qlncurmce}["rawvalue"];
         if (strpos(${${"GLOBALS"}["mhtrtpoxqog"]}, "\$") !== false || strpos(${${"GLOBALS"}["sjpunfxie"]}, "?") !== false) {
             $kasuqypyri = "objTemplate";
             ${$kasuqypyri} = new VTTemplate($this->_context);
             ${${"GLOBALS"}["mhtrtpoxqog"]} = $objTemplate->render(${${"GLOBALS"}["mhtrtpoxqog"]});
         }
     } elseif (${$irkmjqniy}["mode"] == "function") {
         $mslifxq = "parser";
         ${$mslifxq} = new ExpressionParser(${${"GLOBALS"}["eikcioit"]}["rawvalue"], $this->_context, false);
         try {
             $parser->run();
         } catch (ExpressionException $exp) {
             \Workflow2::error_handler(E_EXPRESSION_ERROR, $exp->getMessage(), "", "");
         }
         ${${"GLOBALS"}["mhtrtpoxqog"]} = $parser->getReturn();
     }
     if (preg_match("/^([0-9]+)x([0-9]+)\$/", ${${"GLOBALS"}["mhtrtpoxqog"]}, ${${"GLOBALS"}["rltbvvdxzi"]})) {
         ${${"GLOBALS"}["mhtrtpoxqog"]} = ${${"GLOBALS"}["rltbvvdxzi"]}[2];
     }
     $qpbidpqzyuq = "check";
     if (${$qpbidpqzyuq}["field"] != "crmid") {
         $opnieudoijq = "result";
         $icdvseqgj = "sql";
         $wedbbjpbzg = "check";
         ${"GLOBALS"}["ssickqrh"] = "result";
         $lguveyud = "referenceUitypes";
         ${"GLOBALS"}["fhxqfbe"] = "check";
         ${$icdvseqgj} = "SELECT columnname, tablename, uitype FROM vtiger_field WHERE (fieldname = ? OR columnname = ?) AND tabid = " . getTabId($this->_module);
         ${"GLOBALS"}["ufdgmzwrnd"] = "fieldData";
         ${$opnieudoijq} = $adb->pquery(${${"GLOBALS"}["gewfwuwzyf"]}, array(${${"GLOBALS"}["fhxqfbe"]}["field"], ${$wedbbjpbzg}["field"]), true);
         $vnwwwkurvnc = "fieldData";
         ${${"GLOBALS"}["ufdgmzwrnd"]} = $adb->fetchByAssoc(${${"GLOBALS"}["ssickqrh"]});
         if (${$vnwwwkurvnc}["columnname"] == "idlists" && $this->_module == "Emails") {
             ${${"GLOBALS"}["skdkydufqc"]} = array("vtiger_seactivityrel`.`crmid");
         } else {
             $dknamdhd = "fieldData";
             ${${"GLOBALS"}["skdkydufqc"]} = array("" . ${${"GLOBALS"}["chbluaeolj"]}["tablename"] . "`.`" . ${$dknamdhd}["columnname"]);
         }
         if (in_array(intval(${${"GLOBALS"}["chbluaeolj"]}["uitype"]), VtUtils::${$lguveyud})) {
             ${"GLOBALS"}["usovmy"] = "fieldData";
             ${"GLOBALS"}["fcynigpd"] = "modules";
             ${"GLOBALS"}["mxfotnkuck"] = "modules";
             ${${"GLOBALS"}["mxfotnkuck"]} = VtUtils::getModuleForReference(getTabId($this->_module), ${${"GLOBALS"}["eikcioit"]}["field"], ${${"GLOBALS"}["usovmy"]}["uitype"]);
             if (count(${${"GLOBALS"}["fcynigpd"]}) == 1) {
                 foreach (${${"GLOBALS"}["mkwcgvqozj"]} as ${${"GLOBALS"}["nrfjjlktok"]}) {
                     ${"GLOBALS"}["ynidmvalhyi"] = "tableName";
                     $cegjqy = "fieldNames";
                     ${"GLOBALS"}["fjvfyzyeo"] = "tmpFocus";
                     $npekrqhn = "tableName";
                     $gbhhegbtpt = "fieldData";
                     ${"GLOBALS"}["iijrcvdcux"] = "check";
                     ${${"GLOBALS"}["fjvfyzyeo"]} = \CRMEntity::getInstance(${${"GLOBALS"}["nrfjjlktok"]});
                     ${$npekrqhn} = "t" . count($this->_joinTables) . "_" . ${${"GLOBALS"}["nrfjjlktok"]} . "_" . ${${"GLOBALS"}["iijrcvdcux"]}["field"] . "";
                     $this->_joinTables[] = "LEFT JOIN " . $tmpFocus->table_name . " as " . ${${"GLOBALS"}["vudkckyuiho"]} . " ON (`" . ${${"GLOBALS"}["ynidmvalhyi"]} . "`.`" . $tmpFocus->table_index . "` = `" . ${${"GLOBALS"}["skdkydufqc"]}[0] . "`)";
                     ${${"GLOBALS"}["chbluaeolj"]}["tablename"] = ${${"GLOBALS"}["vudkckyuiho"]};
                     ${${"GLOBALS"}["chbluaeolj"]}["columnname"] = $tmpFocus->list_link_field;
                     ${$cegjqy}[] = "" . ${${"GLOBALS"}["chbluaeolj"]}["tablename"] . "`.`" . ${$gbhhegbtpt}["columnname"];
                 }
             }
         }
     } else {
         $qivvqrqqp = "fieldNames";
         ${$qivvqrqqp} = array("vtiger_crmentity`.`crmid");
     }
     $kmvwkdvr = "fieldNames";
     $this->log("Check field: " . ${${"GLOBALS"}["eikcioit"]}["field"] . " " . ${${"GLOBALS"}["eikcioit"]}["operation"] . " - " . ${$qxtftfelfc});
     if (!empty(${${"GLOBALS"}["eikcioit"]}["not"])) {
         ${"GLOBALS"}["msavtqzgbd"] = "not";
         ${${"GLOBALS"}["msavtqzgbd"]} = true;
     } else {
         $plzzuz = "not";
         ${$plzzuz} = false;
     }
     ${${"GLOBALS"}["dewpeeyj"]} = array();
     foreach (${$kmvwkdvr} as ${${"GLOBALS"}["mtsrsml"]}) {
         ${"GLOBALS"}["pnlaybj"] = "fieldName";
         ${"GLOBALS"}["rgeraojxbe"] = "tmpSQL";
         $gysrpkkbjro = "not";
         ${"GLOBALS"}["xoeshlppye"] = "tmpSQL";
         ${"GLOBALS"}["ufiulnugtpse"] = "not";
         ${"GLOBALS"}["oihhykbnakpg"] = "tmpSQL";
         ${"GLOBALS"}["jhgyja"] = "fieldName";
         $ocjyevynyxer = "fieldName";
         $ddtsdwnjdi = "tmpSQL";
         ${"GLOBALS"}["irkqsiczmnje"] = "fieldName";
         ${"GLOBALS"}["xzodapm"] = "not";
         $wwqfpoc = "tmpSQL";
         $firifzks = "fieldName";
         ${"GLOBALS"}["glhofthvju"] = "fieldName";
//.........这里部分代码省略.........
开发者ID:cin-system,项目名称:vtigercrm-cin,代码行数:101,代码来源:ConditionMysql.php

示例15: doTask

 public function doTask($entity)
 {
     global $current_user;
     $util = new VTWorkflowUtils();
     $admin = $util->adminUser();
     $module = $entity->getModuleName();
     $taskContents = Zend_Json::decode($this->getContents($entity));
     $from_email = $taskContents['fromEmail'];
     $from_name = $taskContents['fromName'];
     $to_email = $taskContents['toEmail'];
     $cc = $taskContents['ccEmail'];
     $bcc = $taskContents['bccEmail'];
     $subject = $taskContents['subject'];
     $content = $taskContents['content'];
     if (!empty($to_email)) {
         //Storing the details of emails
         $entityIdDetails = vtws_getIdComponents($entity->getId());
         $entityId = $entityIdDetails[1];
         $moduleName = 'Emails';
         $userId = $current_user->id;
         $emailFocus = CRMEntity::getInstance($moduleName);
         $emailFieldValues = array('assigned_user_id' => $userId, 'subject' => $subject, 'description' => $content, 'from_email' => $from_email, 'saved_toid' => $to_email, 'ccmail' => $cc, 'bccmail' => $bcc, 'parent_id' => $entityId . "@{$userId}|", 'email_flag' => 'SENT', 'activitytype' => $moduleName, 'date_start' => date('Y-m-d'), 'time_start' => date('H:i:s'), 'mode' => '', 'id' => '');
         $emailFocus->column_fields = $emailFieldValues;
         $emailFocus->save($moduleName);
         //Including email tracking details
         global $site_URL, $application_unique_key;
         $emailId = $emailFocus->id;
         $trackURL = "{$site_URL}/modules/Emails/TrackAccess.php?record={$entityId}&mailid={$emailId}&app_key={$application_unique_key}";
         $content = "<img src='{$trackURL}' alt='' width='1' height='1'>{$content}";
         if (stripos($content, '<img src="cid:logo" />')) {
             $logo = 1;
         }
         if (is_array($this->template)) {
             $Templates = $this->template;
         } else {
             $Templates = array($this->template);
         }
         if (count($Templates) > 0) {
             $request = new Vtiger_Request($_REQUEST, $_REQUEST);
             $adb = PearDatabase::getInstance();
             $PDFMaker = new PDFMaker_PDFMaker_Model();
             list($id3, $id) = explode("x", $entity->getId());
             $modFocus = CRMEntity::getInstance($module);
             $modFocus->retrieve_entity_info($id, $module);
             $modFocus->id = $id;
             $language = $this->template_language;
             foreach ($Templates as $templateid) {
                 if ($templateid != "0" && $templateid != "") {
                     if ($PDFMaker->isTemplateDeleted($templateid)) {
                         return;
                     }
                     $result = $adb->query("SELECT fieldname FROM vtiger_field WHERE uitype=4 AND tabid=" . getTabId($module));
                     $fieldname = $adb->query_result($result, 0, "fieldname");
                     if (isset($modFocus->column_fields[$fieldname]) && $modFocus->column_fields[$fieldname] != "") {
                         $file_name = $PDFMaker->generate_cool_uri($modFocus->column_fields[$fieldname]) . ".pdf";
                     } else {
                         $file_name = $templateid . $emailFocus->parentid . date("ymdHi") . ".pdf";
                     }
                     $PDFMaker->createPDFAndSaveFile($request, $templateid, $emailFocus, $modFocus, $file_name, $module, $language);
                 }
             }
             $status = send_mail($module, $to_email, $from_name, $from_email, $subject, $content, $cc, $bcc, 'all', $emailId, $logo);
         } else {
             $status = send_mail($module, $to_email, $from_name, $from_email, $subject, $content, $cc, $bcc, '', '', $logo);
         }
         if (!empty($emailId)) {
             $emailFocus->setEmailAccessCountValue($emailId);
         }
         if (!$status) {
             //If mail is not sent then removing the details about email
             $emailFocus->trash($moduleName, $emailId);
         }
     }
     $util->revertUser();
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:75,代码来源:VTPDFMakerMailTask.php


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