本文整理匯總了PHP中vtlib_getModuleNameById函數的典型用法代碼示例。如果您正苦於以下問題:PHP vtlib_getModuleNameById函數的具體用法?PHP vtlib_getModuleNameById怎麽用?PHP vtlib_getModuleNameById使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了vtlib_getModuleNameById函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getSecondaryColumns_AdvFilterHTML
/** Function to get Secondary columns for an advanced filter
* This function accepts The module as an argument
* This generate columns of the secondary module for the advanced filter
* It returns a HTML string of combo values
*/
function getSecondaryColumns_AdvFilterHTML($module, $selected = "")
{
global $ITS4YouReports;
global $app_list_strings;
global $current_language;
if ($module != "") {
$secmodule = explode(":", $module);
for ($i = 0; $i < count($secmodule); $i++) {
$modulename = vtlib_getModuleNameById($secmodule[$i]);
$mod_strings = return_module_language($current_language, $modulename);
if (vtlib_isModuleActive($modulename)) {
$block_listed = array();
foreach ($ITS4YouReports->module_list[$modulename] as $key => $value) {
if (isset($ITS4YouReports->sec_module_columnslist[$modulename][$key]) && !$block_listed[$key]) {
$block_listed[$key] = true;
$shtml .= "<optgroup label=\"" . $app_list_strings['moduleList'][$modulename] . " " . getTranslatedString($key) . "\" class=\"select\" style=\"border:none\">";
foreach ($ITS4YouReports->sec_module_columnslist[$modulename][$key] as $field => $fieldlabel) {
if (isset($mod_strings[$fieldlabel])) {
if ($selected == $field) {
$shtml .= "<option selected value=\"" . $field . "\">" . $mod_strings[$fieldlabel] . "</option>";
} else {
$shtml .= "<option value=\"" . $field . "\">" . $mod_strings[$fieldlabel] . "</option>";
}
} else {
if ($selected == $field) {
$shtml .= "<option selected value=\"" . $field . "\">" . $fieldlabel . "</option>";
} else {
$shtml .= "<option value=\"" . $field . "\">" . $fieldlabel . "</option>";
}
}
}
$shtml .= "</optgroup>";
}
}
}
}
}
return $shtml;
}
示例2: getInventoryJoinSQL
public function getInventoryJoinSQL(&$join_array, &$columns_array)
{
require_once 'modules/ITS4YouReports/ITS4YouReports.php';
$fieldid_alias = "";
if ($this->params["fieldid"] != "") {
$fieldid_alias = "_" . $this->params["fieldid"];
}
$formodule = $this->params["formodule"];
$oth_as = "_" . $formodule;
// show("oldo ui 10 intentory join",$formodule,$this->params);
$uirelmodule = vtlib_getModuleNameById($formodule);
// show("oldo ui 10 intentory join2",$uirelmodule);
$related_focus = CRMEntity::getInstance($uirelmodule);
$field_case = $this->getJoinSQL_UI10($join_array, $columns_array, $uirelmodule);
// show("oldo ui 10 intentory join000",$join_array,"oldo ui 10 intentory join000 POST");
$join_array[" vtiger_inventoryproductrel AS vtiger_inventoryproductrel" . $oth_as . $fieldid_alias . " "]["joincol"] = "vtiger_inventoryproductrel" . $oth_as . $fieldid_alias . ".id";
$join_array[" vtiger_inventoryproductrel AS vtiger_inventoryproductrel" . $oth_as . $fieldid_alias . " "]["using"] = $related_focus->table_name . $fieldid_alias . "." . $related_focus->table_index;
$join_array[" vtiger_products AS vtiger_products_inv" . $oth_as . $fieldid_alias . " "]["joincol"] = "vtiger_products_inv" . $oth_as . $fieldid_alias . ".productid";
$join_array[" vtiger_products AS vtiger_products_inv" . $oth_as . $fieldid_alias . " "]["using"] = "vtiger_inventoryproductrel" . $oth_as . $fieldid_alias . ".productid";
$join_array[" vtiger_crmentity AS vtiger_crmentity_products_inv" . $oth_as . $fieldid_alias . " "]["joincol"] = "vtiger_crmentity_products_inv" . $oth_as . $fieldid_alias . ".crmid";
$join_array[" vtiger_crmentity AS vtiger_crmentity_products_inv" . $oth_as . $fieldid_alias . " "]["using"] = "vtiger_products_inv" . $oth_as . $fieldid_alias . ".productid AND vtiger_crmentity_products_inv" . $oth_as . $fieldid_alias . ".deleted=0 ";
$join_array[" vtiger_service AS vtiger_service_inv" . $oth_as . $fieldid_alias . " "]["joincol"] = "vtiger_service_inv" . $oth_as . $fieldid_alias . ".serviceid";
$join_array[" vtiger_service AS vtiger_service_inv" . $oth_as . $fieldid_alias . " "]["using"] = "vtiger_inventoryproductrel" . $oth_as . $fieldid_alias . ".productid";
$join_array[" vtiger_crmentity AS vtiger_crmentity_service_inv" . $oth_as . $fieldid_alias . " "]["joincol"] = "vtiger_crmentity_service_inv" . $oth_as . $fieldid_alias . ".crmid";
$join_array[" vtiger_crmentity AS vtiger_crmentity_service_inv" . $oth_as . $fieldid_alias . " "]["using"] = "vtiger_service_inv" . $oth_as . $fieldid_alias . ".serviceid AND vtiger_crmentity_service_inv" . $oth_as . $fieldid_alias . ".deleted=0 ";
$column_tablename = "vtiger_inventoryproductrel";
if ($this->params["columnname"] != "") {
$column_tablename_alias = $this->params["tablename"];
if ($column_tablename_alias == "vtiger_crmentity") {
$column_tablename_alias = $column_tablename . "_" . strtolower($this->params["fieldmodule"]) . "_inv";
}
$fld_cond = $this->getInventoryColumnFldCond($this->params["columnname"], $column_tablename_alias, $oth_as . $fieldid_alias);
$columns_array_value = $this->getColumnsArrayValue($fld_cond, $oth_as . $fieldid_alias);
$fld_alias = $this->params["columnname"] . $fieldid_alias;
if (!in_array(" vtiger_inventoryproductrel" . $fieldid_alias . ".lineitem_id AS lineitem_id" . $fieldid_alias . " ", $columns_array)) {
$columns_array[] = " vtiger_inventoryproductrel" . $fieldid_alias . ".lineitem_id AS lineitem_id" . $fieldid_alias . " ";
}
if ($using_tablename != "" && $using_columnname != "") {
$columns_array[] = " {$using_tablename}.{$using_columnname} AS record_id" . $fieldid_alias . " ";
}
$columns_array[] = $columns_array_value;
$columns_array[$this->params["fld_string"]]["fld_alias"] = $fld_alias;
$columns_array[$this->params["fld_string"]]["fld_sql_str"] = $columns_array_value;
$columns_array[$this->params["fld_string"]]["fld_cond"] = $fld_cond;
$columns_array["uitype_{$fld_alias}"] = $this->params["field_uitype"];
$columns_array[$fld_alias] = $this->params["fld_string"];
}
/*
ITS4YouReports::sshow("6-".$this->params["columnname"]);
if ($this->params["columnname"] == 'discount') {
$fld_cond = " CASE WHEN (" . "vtiger_inventoryproductrel" . $oth_as . $fieldid_alias . ".discount_amount != '') THEN " . "vtiger_inventoryproductrel" . $oth_as . $fieldid_alias . ".discount_amount else ROUND((" . "vtiger_inventoryproductrel" . $oth_as . $fieldid_alias . ".listprice * " . "vtiger_inventoryproductrel" . $oth_as . $fieldid_alias . ".quantity * (" . "vtiger_inventoryproductrel" . $oth_as . $fieldid_alias . ".discount_percent/100)),3) END ";
$columns_array_value = $fld_cond . " AS '" . $this->params["columnname"] . $oth_as . $fieldid_alias . "'";
} elseif ($this->params["columnname"] == "prodname") {
$fld_cond = " CASE WHEN (vtiger_products_inv" . $oth_as . $fieldid_alias . ".productname IS NOT NULL) THEN vtiger_products_inv" . $oth_as . $fieldid_alias . ".productname ELSE vtiger_service_inv" . $oth_as . $fieldid_alias . ".servicename END ";
$columns_array_value = $fld_cond . " AS prodname" . $oth_as . $fieldid_alias . " ";
} else {
// $fld_cond = "vtiger_inventoryproductrel".$oth_as.$fieldid_alias.".".$this->params["columnname"];
$fld_cond = $this->params["columnname"];
$columns_array_value = $fld_cond . " AS " . $this->params["columnname"] . $oth_as . $fieldid_alias;
}
$fld_alias = $this->params["columnname"] . $oth_as . $fieldid_alias;
if(!in_array(" vtiger_inventoryproductrel" . $fieldid_alias . ".lineitem_id AS lineitem_id" . $fieldid_alias . " ",$columns_array)){
$columns_array[] = " vtiger_inventoryproductrel" . $fieldid_alias . ".lineitem_id AS lineitem_id" . $fieldid_alias . " ";
}
if($using_tablename!="" && $using_columnname!=""){
$columns_array[] = " $using_tablename.$using_columnname AS record_id" . $fieldid_alias . " ";
}
$columns_array[] = $columns_array_value;
$columns_array[$this->params["fld_string"]]["fld_alias"] = $fld_alias;
$columns_array[$this->params["fld_string"]]["fld_sql_str"] = $columns_array_value;
$columns_array[$this->params["fld_string"]]["fld_cond"] = $fld_cond;
$columns_array["uitype_$fld_alias"] = $this->params["field_uitype"];
$columns_array[$fld_alias] = $this->params["fld_string"];
*/
return;
}
示例3: get_activities
/** function used to get the list of activities which are related to the Quotes
* @param int $id - quote id
* @return array - return an array which will be returned from the function GetRelatedList
*/
function get_activities($id, $cur_tab_id, $rel_tab_id, $actions = false)
{
global $log, $singlepane_view, $currentModule, $current_user;
$log->debug("Entering get_activities(" . $id . ") method ...");
$this_module = $currentModule;
$related_module = vtlib_getModuleNameById($rel_tab_id);
require_once "modules/{$related_module}/Activity.php";
$other = new Activity();
vtlib_setup_modulevars($related_module, $other);
$singular_modname = vtlib_toSingular($related_module);
$parenttab = getParentTab();
if ($singlepane_view == 'true') {
$returnset = '&return_module=' . $this_module . '&return_action=DetailView&return_id=' . $id;
} else {
$returnset = '&return_module=' . $this_module . '&return_action=CallRelatedList&return_id=' . $id;
}
$button = '';
$button .= '<input type="hidden" name="activity_mode">';
if ($actions) {
if (is_string($actions)) {
$actions = explode(',', strtoupper($actions));
}
if (in_array('ADD', $actions) && isPermitted($related_module, 1, '') == 'yes') {
$button .= "<input title='" . getTranslatedString('LBL_NEW') . " " . getTranslatedString('LBL_TODO', $related_module) . "' class='crmbutton small create'" . " onclick='this.form.action.value=\"EditView\";this.form.module.value=\"{$related_module}\";this.form.return_module.value=\"{$this_module}\";this.form.activity_mode.value=\"Task\";' type='submit' name='button'" . " value='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString('LBL_TODO', $related_module) . "'> ";
}
}
$query = "SELECT case when (vtiger_users.user_name not like '') then vtiger_users.user_name else vtiger_groups.groupname end as user_name, vtiger_contactdetails.contactid, vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_activity.*,vtiger_seactivityrel.*,vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime,vtiger_recurringevents.recurringtype from vtiger_activity inner join vtiger_seactivityrel on vtiger_seactivityrel.activityid=vtiger_activity.activityid inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid left join vtiger_contactdetails on vtiger_contactdetails.contactid = vtiger_cntactivityrel.contactid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid left outer join vtiger_recurringevents on vtiger_recurringevents.activityid=vtiger_activity.activityid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid where vtiger_seactivityrel.crmid=" . $id . " and vtiger_crmentity.deleted=0 and activitytype='Task' and (vtiger_activity.status is not NULL and vtiger_activity.status != 'Completed') and (vtiger_activity.status is not NULL and vtiger_activity.status != 'Deferred')";
$return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset);
if ($return_value == null) {
$return_value = array();
}
$return_value['CUSTOM_BUTTON'] = $button;
$log->debug("Exiting get_activities method ...");
return $return_value;
}
示例4: get_osstimecontrol
/**
* Invoked when special actions are performed on the module.
* @param String Module name
* @param String Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
*/
function get_osstimecontrol($id, $cur_tab_id, $rel_tab_id, $actions = false)
{
global $log, $singlepane_view, $currentModule, $current_user;
$log->debug("Entering get_osstimecontrol(" . $id . ") method ...");
$this_module = $currentModule;
$related_module = vtlib_getModuleNameById($rel_tab_id);
require_once "modules/{$related_module}/{$related_module}.php";
$other = new $related_module();
vtlib_setup_modulevars($related_module, $other);
$singular_modname = vtlib_toSingular($related_module);
$record = Vtiger_Record_Model::getInstanceById($id);
$userId = $record->get('assigned_user_id');
if ($singlepane_view == 'true') {
$returnset = '&return_module=' . $this_module . '&return_action=DetailView&return_id=' . $id;
} else {
$returnset = '&return_module=' . $this_module . '&return_action=CallRelatedList&return_id=' . $id;
}
$button = '';
if ($actions && getFieldVisibilityPermission($related_module, $current_user->id, 'parent_id', 'readwrite') == '0') {
if (is_string($actions)) {
$actions = explode(',', strtoupper($actions));
}
if (in_array('SELECT', $actions) && isPermitted($related_module, 4, '') == 'yes') {
$button .= "<input title='" . getTranslatedString('LBL_SELECT') . " " . getTranslatedString($related_module) . "' class='crmbutton small edit' type='button' onclick=\"return window.open('index.php?module={$related_module}&return_module={$currentModule}&action=Popup&popuptype=detailview&select=enable&form=EditView&form_submit=false&recordid={$id}','test','width=640,height=602,resizable=0,scrollbars=0');\" value='" . getTranslatedString('LBL_SELECT') . " " . getTranslatedString($related_module) . "'> ";
}
if (in_array('ADD', $actions) && isPermitted($related_module, 1, '') == 'yes') {
$button .= "<input title='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString($singular_modname) . "' class='crmbutton small create'" . " onclick='this.form.action.value=\"EditView\";this.form.module.value=\"{$related_module}\"' type='submit' name='button'" . " value='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString($singular_modname) . "'> ";
}
}
$userNameSql = getSqlForNameInDisplayFormat(array('first_name' => 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users');
$query = "SELECT case when (vtiger_users.user_name not like '') then {$userNameSql} else vtiger_groups.groupname end as user_name, vtiger_users.id,\n\t\t\t\tvtiger_osstimecontrol.name, vtiger_osstimecontrol.osstimecontrolid as crmid, vtiger_osstimecontrol.osstimecontrol_status, vtiger_osstimecontrol.payment,\n\t\t\t\tvtiger_osstimecontrol.osstimecontrol_no, vtiger_osstimecontrol.date_start, vtiger_osstimecontrol.due_date, vtiger_osstimecontrol.time_end, vtiger_osstimecontrol.sum_time, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime\n\t\t\t\tFROM vtiger_osstimecontrol\n\t\t\t\tINNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_osstimecontrol.osstimecontrolid\n\t\t\t\tLEFT JOIN vtiger_users ON vtiger_users.id=vtiger_crmentity.smownerid\n\t\t\t\tLEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid\n\t\t\t\tWHERE vtiger_crmentity.deleted = 0 AND vtiger_crmentity.`smownerid`= " . $userId;
$return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset);
if ($return_value == null) {
$return_value = array();
}
$return_value['CUSTOM_BUTTON'] = $button;
$log->debug("Exiting get_osstimecontrol method ...");
return $return_value;
}
示例5: get_service_pricebooks
/** function used to get the list of pricebooks which are related to the service
* @param int $id - service id
* @return array - array which will be returned from the function GetRelatedList
*/
function get_service_pricebooks($id, $cur_tab_id, $rel_tab_id, $actions = false)
{
global $currentModule, $log, $singlepane_view, $mod_strings;
$log->debug("Entering get_service_pricebooks(" . $id . ") method ...");
$related_module = vtlib_getModuleNameById($rel_tab_id);
checkFileAccessForInclusion("modules/{$related_module}/{$related_module}.php");
require_once "modules/{$related_module}/{$related_module}.php";
$focus = new $related_module();
$singular_modname = vtlib_toSingular($related_module);
if ($singlepane_view == 'true') {
$returnset = "&return_module={$currentModule}&return_action=DetailView&return_id={$id}";
} else {
$returnset = "&return_module={$currentModule}&return_action=CallRelatedList&return_id={$id}";
}
$button = '';
if ($actions) {
if (is_string($actions)) {
$actions = explode(',', strtoupper($actions));
}
if (in_array('ADD', $actions) && isPermitted($related_module, 1, '') == 'yes' && isPermitted($currentModule, 'EditView', $id) == 'yes') {
$button .= "<input title='" . getTranslatedString('LBL_ADD_TO') . " " . getTranslatedString($related_module) . "' class='crmbutton small create'" . " onclick='this.form.action.value=\"AddServiceToPriceBooks\";this.form.module.value=\"{$currentModule}\"' type='submit' name='button'" . " value='" . getTranslatedString('LBL_ADD_TO') . " " . getTranslatedString($singular_modname) . "'> ";
}
}
$query = "SELECT vtiger_crmentity.crmid,\n\t\t\tvtiger_pricebook.*,\n\t\t\tvtiger_pricebookproductrel.productid as prodid\n\t\t\tFROM vtiger_pricebook\n\t\t\tINNER JOIN vtiger_crmentity\n\t\t\t\tON vtiger_crmentity.crmid = vtiger_pricebook.pricebookid\n\t\t\tINNER JOIN vtiger_pricebookproductrel\n\t\t\t\tON vtiger_pricebookproductrel.pricebookid = vtiger_pricebook.pricebookid\n\t\t\tWHERE vtiger_crmentity.deleted = 0\n\t\t\tAND vtiger_pricebookproductrel.productid = " . $id;
$log->debug("Exiting get_product_pricebooks method ...");
$return_value = GetRelatedList($currentModule, $related_module, $focus, $query, $button, $returnset);
if ($return_value == null) {
$return_value = array();
}
$return_value['CUSTOM_BUTTON'] = $button;
$log->debug("Exiting get_service_pricebooks method ...");
return $return_value;
}
示例6: get_vendors
/**
* Function to get Contact related vendors.
* @param integer $id - contactid
* returns related vendor records in array format
*/
function get_vendors($id, $cur_tab_id, $rel_tab_id, $actions = false)
{
global $log, $singlepane_view, $currentModule, $current_user;
$log->debug("Entering get_vendors(" . $id . ") method ...");
$this_module = $currentModule;
$related_module = vtlib_getModuleNameById($rel_tab_id);
require_once "modules/{$related_module}/{$related_module}.php";
$other = new $related_module();
vtlib_setup_modulevars($related_module, $other);
$singular_modname = vtlib_toSingular($related_module);
$parenttab = getParentTab();
if ($singlepane_view == 'true') {
$returnset = '&return_module=' . $this_module . '&return_action=DetailView&return_id=' . $id;
} else {
$returnset = '&return_module=' . $this_module . '&return_action=CallRelatedList&return_id=' . $id;
}
$button = '';
if ($actions) {
if (is_string($actions)) {
$actions = explode(',', strtoupper($actions));
}
if (in_array('SELECT', $actions) && isPermitted($related_module, 4, '') == 'yes') {
$button .= "<input title='" . getTranslatedString('LBL_SELECT') . " " . getTranslatedString($related_module) . "' class='crmbutton small edit' type='button' onclick=\"return window.open('index.php?module={$related_module}&return_module={$currentModule}&action=Popup&popuptype=detailview&select=enable&form=EditView&form_submit=false&recordid={$id}&parenttab={$parenttab}','test','width=640,height=602,resizable=0,scrollbars=0');\" value='" . getTranslatedString('LBL_SELECT') . " " . getTranslatedString($related_module) . "'> ";
}
if (in_array('ADD', $actions) && isPermitted($related_module, 1, '') == 'yes') {
$button .= "<input title='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString($singular_modname) . "' class='crmbutton small create'" . " onclick='this.form.action.value=\"EditView\";this.form.module.value=\"{$related_module}\"' type='submit' name='button'" . " value='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString($singular_modname) . "'> ";
}
}
$userNameSql = getSqlForNameInDisplayFormat(array('first_name' => 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users');
$query = "SELECT case when (vtiger_users.user_name not like '') then {$userNameSql} else vtiger_groups.groupname end as user_name,\n\t\t\t\tvtiger_crmentity.crmid, vtiger_vendor.*, vtiger_vendorcf.*\n\t\t\t\tfrom vtiger_vendor inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_vendor.vendorid\n\t\t\t\tINNER JOIN vtiger_vendorcontactrel on vtiger_vendorcontactrel.vendorid=vtiger_vendor.vendorid\n\t\t\t\tLEFT JOIN vtiger_vendorcf on vtiger_vendorcf.vendorid=vtiger_vendor.vendorid\n\t\t\t\tLEFT JOIN vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid\n\t\t\t\tLEFT JOIN vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid\n\t\t\t\tWHERE vtiger_crmentity.deleted=0 and vtiger_vendorcontactrel.contactid=" . $id;
$return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset);
if ($return_value == null) {
$return_value = array();
}
$return_value['CUSTOM_BUTTON'] = $button;
$log->debug("Exiting get_vendors method ...");
return $return_value;
}
示例7: unlinkRelationship
/** Function to unlink an entity with given Id from another entity */
function unlinkRelationship($id, $return_module, $return_id)
{
global $log, $currentModule;
if ($return_module == 'Accounts') {
$focus = new $return_module();
$entityIds = $focus->getRelatedContactsIds($return_id);
array_push($entityIds, $return_id);
$entityIds = implode(',', $entityIds);
$return_modules = "'Accounts','Contacts'";
} else {
$entityIds = $return_id;
$return_modules = "'" . $return_module . "'";
}
$query = 'DELETE FROM vtiger_crmentityrel WHERE (relcrmid=' . $id . ' AND module IN (' . $return_modules . ') AND crmid IN (' . $entityIds . ')) OR (crmid=' . $id . ' AND relmodule IN (' . $return_modules . ') AND relcrmid IN (' . $entityIds . '))';
$this->db->pquery($query, array());
$sql = 'SELECT tabid, tablename, columnname FROM vtiger_field WHERE fieldid IN (SELECT fieldid FROM vtiger_fieldmodulerel WHERE module=? AND relmodule IN (' . $return_modules . '))';
$fieldRes = $this->db->pquery($sql, array($currentModule));
$numOfFields = $this->db->num_rows($fieldRes);
for ($i = 0; $i < $numOfFields; $i++) {
$tabId = $this->db->query_result($fieldRes, $i, 'tabid');
$tableName = $this->db->query_result($fieldRes, $i, 'tablename');
$columnName = $this->db->query_result($fieldRes, $i, 'columnname');
$relatedModule = vtlib_getModuleNameById($tabId);
$focusObj = CRMEntity::getInstance($relatedModule);
$updateQuery = "UPDATE {$tableName} SET {$columnName}=? WHERE {$columnName} IN ({$entityIds}) AND {$focusObj->table_index}=?";
$updateParams = array(null, $id);
$this->db->pquery($updateQuery, $updateParams);
}
}
示例8: get_activities
/**
* Function to get Campaign related Activities
* @param integer $id - campaignid
* returns related activities record in array format
*/
function get_activities($id, $cur_tab_id, $rel_tab_id, $actions = false)
{
global $log, $singlepane_view, $currentModule, $current_user;
$log->debug("Entering get_activities(" . $id . ") method ...");
$this_module = $currentModule;
$related_module = vtlib_getModuleNameById($rel_tab_id);
require_once "modules/{$related_module}/Activity.php";
$other = new Activity();
vtlib_setup_modulevars($related_module, $other);
$singular_modname = vtlib_toSingular($related_module);
$parenttab = getParentTab();
if ($singlepane_view == 'true') {
$returnset = '&return_module=' . $this_module . '&return_action=DetailView&return_id=' . $id;
} else {
$returnset = '&return_module=' . $this_module . '&return_action=CallRelatedList&return_id=' . $id;
}
$button = '';
$button .= '<input type="hidden" name="activity_mode">';
if ($actions) {
if (is_string($actions)) {
$actions = explode(',', strtoupper($actions));
}
if (in_array('ADD', $actions) && isPermitted($related_module, 1, '') == 'yes') {
if (getFieldVisibilityPermission('Calendar', $current_user->id, 'parent_id', 'readwrite') == '0') {
$button .= "<input title='" . getTranslatedString('LBL_NEW') . " " . getTranslatedString('LBL_TODO', $related_module) . "' class='crmbutton small create'" . " onclick='this.form.action.value=\"EventEditView\";this.form.module.value=\"Calendar4You\";this.form.return_module.value=\"{$this_module}\";this.form.activity_mode.value=\"Task\";' type='submit' name='button'" . " value='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString('LBL_TODO', $related_module) . "'> ";
}
if (getFieldVisibilityPermission('Events', $current_user->id, 'parent_id', 'readwrite') == '0') {
$button .= "<input title='" . getTranslatedString('LBL_NEW') . " " . getTranslatedString('LBL_TODO', $related_module) . "' class='crmbutton small create'" . " onclick='this.form.action.value=\"EventEditView\";this.form.module.value=\"Calendar4You\";this.form.return_module.value=\"{$this_module}\";this.form.activity_mode.value=\"Events\";' type='submit' name='button'" . " value='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString('LBL_EVENT', $related_module) . "'>";
}
}
}
$userNameSql = getSqlForNameInDisplayFormat(array('first_name' => 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users');
$query = "SELECT vtiger_contactdetails.lastname,\n\t\t\tvtiger_contactdetails.firstname,\n\t\t\tvtiger_contactdetails.contactid,\n\t\t\tvtiger_activity.*,\n\t\t\tvtiger_seactivityrel.*,\n\t\t\tvtiger_crmentity.crmid, vtiger_crmentity.smownerid,\n\t\t\tvtiger_crmentity.modifiedtime,\n\t\t\tCASE when (vtiger_users.user_name not like '') then {$userNameSql} else vtiger_groups.groupname end as user_name,\n\t\t\tvtiger_recurringevents.recurringtype\n\t\t\tFROM vtiger_activity\n\t\t\tINNER JOIN vtiger_seactivityrel\n\t\t\t\tON vtiger_seactivityrel.activityid = vtiger_activity.activityid\n\t\t\tINNER JOIN vtiger_crmentity\n\t\t\t\tON vtiger_crmentity.crmid=vtiger_activity.activityid\n\t\t\tLEFT JOIN vtiger_cntactivityrel\n\t\t\t\tON vtiger_cntactivityrel.activityid = vtiger_activity.activityid\n\t\t\tLEFT JOIN vtiger_contactdetails\n\t\t\t\tON vtiger_contactdetails.contactid = vtiger_cntactivityrel.contactid\n\t\t\tLEFT JOIN vtiger_users\n\t\t\t\tON vtiger_users.id = vtiger_crmentity.smownerid\n\t\t\tLEFT OUTER JOIN vtiger_recurringevents\n\t\t\t\tON vtiger_recurringevents.activityid = vtiger_activity.activityid\n\t\t\tLEFT JOIN vtiger_groups\n\t\t\t\tON vtiger_groups.groupid = vtiger_crmentity.smownerid\n\t\t\tWHERE vtiger_seactivityrel.crmid=" . $id . "\n\t\t\tAND vtiger_crmentity.deleted = 0\n\t\t\tAND (activitytype = 'Task'\n\t\t\t\tOR activitytype !='Emails')";
$return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset);
if ($return_value == null) {
$return_value = array();
}
$return_value['CUSTOM_BUTTON'] = $button;
$log->debug("Exiting get_activities method ...");
return $return_value;
}
示例9: array
$ITS4YouReports->getSecModuleColumnsList($secondarymodule);
$available_modules[] = array("id" => $ITS4YouReports->primarymoduleid, "name" => $modulename_lbl, "checked" => "checked");
foreach ($secondarymodule_arr as $key => $value) {
$available_modules[] = array("id" => $value["id"], "name" => $value["name"], "checked" => "");
}
$AV_M = Zend_JSON::encode($available_modules);
$step5_result .= $AV_M . "(!A#V_M@M_M#A!)";
}
/*$SumOptions2 = getSecondaryColumns($SumOptions2,$secondarymodule,$ITS4YouReports);
foreach ($SumOptions2 as $key=>$value) {
$SPSumOptions[$key]=$value;
}*/
$BLOCK1 = "";
foreach ($SPSumOptions as $module_key => $SumOptions) {
$BLOCK2 = "";
$r_modulename = vtlib_getModuleNameById($module_key);
$r_modulename_lbl = getTranslatedString($r_modulename, $r_modulename);
foreach ($SumOptions as $SumOptions_key => $SumOptions_value) {
foreach ($SumOptions_value as $optgroup => $optionsdata) {
if ($BLOCK2 != "") {
$BLOCK2 .= "(|@!@|)";
}
$BLOCK2 .= $optgroup;
$BLOCK2 .= "(|@|)";
$BLOCK2 .= Zend_JSON::encode($optionsdata);
}
$BLOCK1 .= $module_key . "(!#_ID@ID_#!)" . $r_modulename_lbl . "(!#_ID@ID_#!)" . $BLOCK2;
}
}
$step5_result .= $BLOCK1;
echo $step5_result;
示例10: get_dependents_list
/**
* Default (generic) function to handle the dependents list for the module.
* NOTE: UI type '10' is used to stored the references to other modules for a given record.
* These dependent records can be retrieved through this function.
* For eg: A trouble ticket can be related to an Account or a Contact.
* From a given Contact/Account if we need to fetch all such dependent trouble tickets, get_dependents_list function can be used.
*/
function get_dependents_list($id, $cur_tab_id, $relTabId, $actions = false)
{
$app_strings = vglobal('app_strings');
$current_user = vglobal('current_user');
$singlepane_view = vglobal('singlepane_view');
$currentModule = vtlib_getModuleNameById($cur_tab_id);
$relatedModule = vtlib_getModuleNameById($relTabId);
$other = CRMEntity::getInstance($relatedModule);
// Some standard module class doesn't have required variables
// that are used in the query, they are defined in this generic API
vtlib_setup_modulevars($currentModule, $this);
vtlib_setup_modulevars($relatedModule, $other);
$singular_modname = 'SINGLE_' . $relatedModule;
$button = '';
$row = [];
// To make the edit or del link actions to return back to same view.
if ($singlepane_view == 'true') {
$returnset = "&return_module={$currentModule}&return_action=DetailView&return_id={$id}";
} else {
$returnset = "&return_module={$currentModule}&return_action=CallRelatedList&return_id={$id}";
}
$return_value = null;
$dependentFieldSql = $this->db->pquery('SELECT tabid, fieldname, columnname FROM vtiger_field WHERE uitype = 10 AND' . ' fieldid IN (SELECT fieldid FROM vtiger_fieldmodulerel WHERE relmodule=? AND module=?)', [$currentModule, $relatedModule]);
if ($dependentFieldSql->rowCount()) {
$row = $this->db->getRow($dependentFieldSql);
} else {
$depProcessFieldSql = $this->db->pquery('SELECT fieldname AS `name`, fieldid AS id, fieldlabel AS label, columnname AS `column`, tablename AS `table`, vtiger_field.* FROM vtiger_field WHERE `uitype` IN (66,67,68) AND `tabid` = ?;', [$relTabId]);
while ($rowProc = $this->db->getRow($depProcessFieldSql)) {
$className = Vtiger_Loader::getComponentClassName('Model', 'Field', $relatedModule);
$fieldModel = new $className();
foreach ($rowProc as $properName => $propertyValue) {
$fieldModel->{$properName} = $propertyValue;
}
$moduleList = $fieldModel->getUITypeModel()->getReferenceList();
if (in_array($currentModule, $moduleList)) {
$row = $rowProc;
break;
}
}
}
if (!empty($row)) {
$dependentColumn = $row['columnname'];
$dependentField = $row['fieldname'];
$button .= '<input type="hidden" name="' . $dependentColumn . '" id="' . $dependentColumn . '" value="' . $id . '">';
$button .= '<input type="hidden" name="' . $dependentColumn . '_type" id="' . $dependentColumn . '_type" value="' . $currentModule . '">';
if ($actions) {
if (is_string($actions)) {
$actions = explode(',', strtoupper($actions));
}
if (in_array('ADD', $actions) && isPermitted($relatedModule, 1, '') == 'yes' && getFieldVisibilityPermission($relatedModule, $current_user->id, $dependentField, 'readwrite') == '0') {
$button .= "<input title='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString($singular_modname, $relatedModule) . "' class='crmbutton small create'" . " onclick='this.form.action.value=\"EditView\";this.form.module.value=\"{$relatedModule}\"' type='submit' name='button'" . " value='" . getTranslatedString('LBL_ADD_NEW') . " " . getTranslatedString($singular_modname, $relatedModule) . "'> ";
}
}
$query = "SELECT vtiger_crmentity.*, {$other->table_name}.*";
$userNameSql = getSqlForNameInDisplayFormat(array('first_name' => 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users');
$query .= ", CASE WHEN (vtiger_users.user_name NOT LIKE '') THEN {$userNameSql} ELSE vtiger_groups.groupname END AS user_name";
$more_relation = '';
if (!empty($other->related_tables)) {
foreach ($other->related_tables as $tname => $relmap) {
$query .= ", {$tname}.*";
// Setup the default JOIN conditions if not specified
if (empty($relmap[1])) {
$relmap[1] = $other->table_name;
}
if (empty($relmap[2])) {
$relmap[2] = $relmap[0];
}
$more_relation .= " LEFT JOIN {$tname} ON {$tname}.{$relmap['0']} = {$relmap['1']}.{$relmap['2']}";
}
}
$query .= " FROM {$other->table_name}";
$query .= " INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = {$other->table_name}.{$other->table_index}";
$query .= " INNER JOIN {$this->table_name} ON {$this->table_name}.{$this->table_index} = {$other->table_name}.{$dependentColumn}";
$query .= $more_relation;
$query .= " LEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid";
$query .= " LEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid";
$query .= " WHERE vtiger_crmentity.deleted = 0 AND {$this->table_name}.{$this->table_index} = {$id}";
$return_value = GetRelatedList($currentModule, $relatedModule, $other, $query, $button, $returnset);
}
if ($return_value == null) {
$return_value = array();
}
$return_value['CUSTOM_BUTTON'] = $button;
return $return_value;
}
示例11: getColumns
function getColumns(Vtiger_Request $request, $is_sum = false)
{
$BLOCK0 = $BLOCK1 = $BLOCK2 = "";
$selectedmodule = $request->get("selectedmodule");
$SumOptions = array();
$secondarymodule = '';
$secondarymodules = array();
$record = $request->get('record');
$reportModel = ITS4YouReports_Record_Model::getCleanInstance($record);
$primarymodule = $reportModel->getPrimaryModule();
$primarymoduleid = $reportModel->getPrimaryModuleId();
$modulename_prefix = "";
if ($selectedmodule != $primarymoduleid && $selectedmodule != "") {
$modulename = $selectedmodule;
$reportModel->getSecModuleColumnsList($modulename);
$module_array["id"] = $modulename;
$modulename_arr = explode("x", $modulename);
$modulename_id = $modulename_arr[0];
if ($modulename_arr[1] != "") {
$modulename_prefix = $modulename_arr[1];
}
} else {
$module_array["module"] = $primarymodule;
$module_array["id"] = $primarymoduleid;
$modulename = $module_array["module"];
$modulename_lbl = vtranslate($modulename, $modulename);
$availModules[$module_array["id"]] = $modulename_lbl;
$modulename_id = $module_array["id"];
}
$relmod_arr = explode("x", $modulename);
if (is_numeric($relmod_arr[0])) {
$stabid = $relmod_arr[0];
$smodule = vtlib_getModuleNameById($stabid);
}
if ($is_sum) {
$SPSumOptions[$module_array["id"]][$modulename_id] = sgetSummariesOptions($modulename);
} else {
if ($selectedmodule != $primarymoduleid && $selectedmodule != "") {
$SPSumOptions[$modulename] = $reportModel->getSecondaryColumns(array(), $modulename);
} else {
$SPSumOptions[$module_array["id"]][$modulename_id] = $reportModel->getPrimaryColumns(array(), $modulename, true);
}
}
$step5_result = "";
if ($selectedmodule != $primarymoduleid && $selectedmodule == "") {
$secondarymodule_arr = $reportModel->getReportRelatedModules($module_array["id"]);
$reportModel->getSecModuleColumnsList($secondarymodule);
$available_modules[] = array("id" => $primarymoduleid, "name" => $modulename_lbl, "checked" => "checked");
foreach ($secondarymodule_arr as $key => $value) {
$available_modules[] = array("id" => $value["id"], "name" => $value["name"], "checked" => "");
}
$AV_M = Zend_JSON::encode($available_modules);
$step5_result .= $AV_M . "(!A#V_M@M_M#A!)";
}
$BLOCK1 = "";
foreach ($SPSumOptions as $module_key => $SumOptions) {
$BLOCK2 = "";
$r_modulename = vtlib_getModuleNameById($module_key);
$r_modulename_lbl = vtranslate($r_modulename, $r_modulename);
foreach ($SumOptions as $SumOptions_key => $SumOptions_value) {
foreach ($SumOptions_value as $optgroup => $optionsdata) {
if ($BLOCK2 != "") {
$BLOCK2 .= "(|@!@|)";
}
$BLOCK2 .= $optgroup;
$BLOCK2 .= "(|@|)";
$BLOCK2 .= Zend_JSON::encode($optionsdata);
}
$BLOCK1 .= $module_key . "(!#_ID@ID_#!)" . $r_modulename_lbl . "(!#_ID@ID_#!)" . $BLOCK2;
}
}
$step5_result .= $BLOCK1;
echo $step5_result;
}
示例12: get_ventas_list
function get_ventas_list($id, $cur_tab_id, $rel_tab_id, $actions = false)
{
global $adb;
$this_module = $currentModule;
$related_module = vtlib_getModuleNameById($rel_tab_id);
require_once "modules/{$related_module}/{$related_module}.php";
$other = new $related_module();
vtlib_setup_modulevars($related_module, $other);
$singular_modname = vtlib_toSingular($related_module);
$parenttab = getParentTab();
if ($singlepane_view == 'true') {
$returnset = '&return_module=' . $this_module . '&return_action=DetailView&return_id=' . $id;
} else {
$returnset = '&return_module=' . $this_module . '&return_action=CallRelatedList&return_id=' . $id;
}
$button = '';
$button .= '<input type="hidden" name="email_directing_module"><input type="hidden" name="record">';
$sql = "SELECT registrodeventasid FROM vtiger_registrodepagos WHERE registrodepagosid = ?";
$result = $adb->pquery($sql, array($id));
$row = $adb->fetchByAssoc($result);
$ventaid = $row["registrodeventasid"];
$query = 'SELECT vtiger_crmentity.crmid,vtiger_registrodeventas.contacto, vtiger_registrodeventas.registrodeventastype, vtiger_crmentity.smownerid, vtiger_registrodeventas.registrodeventasname FROM vtiger_registrodeventas INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_registrodeventas.registrodeventasid INNER JOIN vtiger_crmentityrel ON (vtiger_crmentityrel.relcrmid = vtiger_crmentity.crmid OR vtiger_crmentityrel.crmid = vtiger_crmentity.crmid) LEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid LEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid WHERE vtiger_crmentity.deleted = 0 AND (vtiger_crmentityrel.crmid = ' . $ventaid . ' OR vtiger_crmentityrel.relcrmid = ' . $ventaid . ')
';
//var_dump($query); exit;
$return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset);
return $return_value;
}
示例13: getSelectedValuesToSmarty
public function getSelectedValuesToSmarty($smarty_obj = "", $step_name = "")
{
if ($smarty_obj != "" && $step_name != "") {
global $app_strings;
global $mod_strings;
global $default_charset;
global $current_language;
global $image_path;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$smarty_obj->assign("THEME", $theme_path);
$smarty_obj->assign("IMAGE_PATH", $image_path);
$adb = PEARDatabase::getInstance();
$get_all_steps = "all";
if (isset($_REQUEST["record"]) && $_REQUEST['record'] != '') {
$recordid = vtlib_purify($_REQUEST["record"]);
} else {
$recordid = "";
}
$smarty_obj->assign("RECORDID", $recordid);
$smarty_obj->assign("DISPLAY_FILTER_HEADER", false);
if (in_array($step_name, array("ReportsStep1"))) {
if (isset($_REQUEST["reportname"]) && $_REQUEST["reportname"] != "") {
$reportname = htmlspecialchars(vtlib_purify($_REQUEST["reportname"]));
} else {
$reportname = $this->reportinformations["reports4youname"];
}
$smarty_obj->assign("REPORTNAME", $reportname);
if (isset($_REQUEST["reportdesc"]) && $_REQUEST["reportdesc"] != "") {
$reportdesc = htmlspecialchars(vtlib_purify($_REQUEST["reportdesc"]));
} else {
$reportdesc = $this->reportinformations["reportdesc"];
}
$smarty_obj->assign("REPORTDESC", $reportdesc);
$smarty_obj->assign("REP_MODULE", $this->reportinformations["primarymodule"]);
$smarty_obj->assign("PRIMARYMODULES", $this->getPrimaryModules());
$smarty_obj->assign("REP_FOLDERS", $this->getReportFolders());
if (isset($this->primarymodule) && $this->primarymodule != '') {
$rel_modules = $this->getReportRelatedModules($this->primarymoduleid);
foreach ($rel_modules as $key => $relmodule) {
$restricted_modules .= $relmodule['id'] . ":";
}
$smarty_obj->assign("REL_MODULES_STR", trim($restricted_modules, ":"));
$smarty_obj->assign("RELATEDMODULES", $rel_modules);
}
$smarty_obj->assign("FOLDERID", vtlib_purify($_REQUEST['folder']));
}
if (in_array($step_name, array("ReportsStep2", $get_all_steps))) {
if (isset($this->primarymodule) && $this->primarymodule != '') {
$rel_modules = $this->getReportRelatedModules($this->primarymoduleid);
foreach ($rel_modules as $key => $relmodule) {
$restricted_modules .= $relmodule['id'] . ":";
}
$smarty_obj->assign("REL_MODULES_STR", trim($restricted_modules, ":"));
$smarty_obj->assign("RELATEDMODULES", $rel_modules);
}
}
if (in_array($step_name, array("ReportGrouping", $get_all_steps))) {
// TIMELINE COLUMNS DEFINITION CHANGED New Code 13.5.2014 11:58
// ITS4YOU-CR SlOl | 13.5.2014 11:53
if (isset($_REQUEST["primarymodule"]) && $_REQUEST["primarymodule"] != "") {
$primary_moduleid = $_REQUEST["primarymodule"];
$primary_module = vtlib_getModuleNameById($_REQUEST["primarymodule"]);
if (vtlib_isModuleActive($primary_module)) {
$primary_df_arr = getPrimaryTLStdFilter($primary_module, $this);
}
} else {
$primary_module = $this->primarymodule;
$primary_moduleid = $this->primarymoduleid;
$primary_df_arr = getPrimaryTLStdFilter($primary_module, $this);
}
$date_options = array();
if (!empty($primary_df_arr)) {
foreach ($primary_df_arr as $val_arr) {
foreach ($val_arr as $val_dtls) {
$date_options[] = $val_dtls["value"];
}
}
}
$date_options_json = Zend_JSON::encode($date_options);
$smarty_obj->assign("date_options_json", $date_options_json);
$timelinecolumn = $this->getTimeLineColumnHTML();
$smarty_obj->assign("timelinecolumn", $timelinecolumn);
// ITS4YOU-END 13.5.2014 11:53
if (isset($_REQUEST["record"]) && $_REQUEST['record'] != '') {
$reportid = vtlib_purify($_REQUEST["record"]);
$secondarymodule = '';
$secondarymodules = array();
if (!empty($this->related_modules[$primary_module])) {
foreach ($this->related_modules[$primary_module] as $key => $value) {
if (isset($_REQUEST["secondarymodule_" . $value])) {
$secondarymodules[] = vtlib_purify($_REQUEST["secondarymodule_" . $value]);
}
}
}
if ($primary_moduleid == getTabid('Invoice')) {
$secondarymodules[] = getTabid('Products');
$secondarymodules[] = getTabid('Services');
}
//.........這裏部分代碼省略.........
示例14: array
case 'step7':
include "modules/ITS4YouReports/ReportLabels.php";
break;
case 'step8':
/*if($_REQUEST["record"]!=""){
include("modules/ITS4YouReports/ReportFilters.php");
}else{*/
$BLOCK_R = '';
$BLOCK1 = "";
$BLOCK2 = '';
$Options = array();
$secondarymodule = '';
$secondarymodules = array();
$ITS4YouReports = ITS4YouReports::getStoredITS4YouReport();
$primarymodule_id = vtlib_purify($_REQUEST["primarymodule"]);
$primarymodule = vtlib_getModuleNameById($primarymodule_id);
$reportid = $ITS4YouReports->record;
$BLOCK1 = $ITS4YouReports->getAdvanceFilterOptionsJSON($primarymodule);
$BLOCK_R .= $BLOCK1;
// ITS4YOU-CR SlOl 21. 3. 2014 10:20:17 summaries columns for frouping filters start
$selectedSummariesString = vtlib_purify($_REQUEST["selectedSummariesString"]);
$selectedSummariesArr = explode(";", $selectedSummariesString);
$sm_arr = sgetSelectedSummariesOptions($selectedSummariesArr);
$sm_str = "";
foreach ($sm_arr as $key => $opt_arr) {
if ($sm_str != "") {
$sm_str .= "(|@!@|)";
}
$sm_str .= $opt_arr["value"] . "(|@|)" . $opt_arr["text"];
}
$BLOCK_S = $sm_str;
示例15: getTranslatedString
$report_column->assign("APP", $app_strings);
$report_column->assign("IMAGE_PATH", $image_path);
$report_column->assign("THEME_PATH", $theme_path);
// ITS4YOU-CR SlOl 10. 9. 2013 16:13:47
$LBL_INFORMATIONS_4YOU = getTranslatedString("LBL_STEP10_INFO", $currentModule);
$report_column->assign("LBL_INFORMATIONS_4YOU", $LBL_INFORMATIONS_4YOU);
// ITS4YOU-END 10. 9. 2013 16:13:50
$recordid = "";
if (isset($_REQUEST["record"]) && $_REQUEST['record'] != '') {
$recordid = vtlib_purify($_REQUEST["record"]);
}
$oReport = new ITS4YouReports();
$R_Objects = array();
if (isset($_REQUEST["selectedColumnsStr"])) {
$R_Objects = explode("<_@!@_>", $_REQUEST["selectedColumnsStr"]);
$r_p_module = vtlib_getModuleNameById(vtlib_purify($_REQUEST["primarymodule"]));
$quick_columns_arraySelected = array();
$qf_to_go = explode('$_@_$', vtlib_purify($_REQUEST["qf_to_go"]));
foreach ($qf_to_go as $key => $qf_to_go_str) {
$quick_columns_arraySelected[] = trim($qf_to_go_str, "qf:");
}
} else {
$sarray = $oReport->getSelectedColumnListArray($recordid);
foreach ($sarray as $key => $scarray) {
$R_Objects[] = $scarray["fieldcolname"];
}
$r_p_module = $oReport->primarymodule;
}
foreach ($R_Objects as $column_str) {
$column_arr = explode(":", $column_str);
$last_key = count($column_arr) - 1;