query($sql); $noofrows = $adb->num_rows($result); $output=''; if (($module == 'Accounts' || $module == 'Contacts' || $module == 'Quotes' || $module == 'Orders' || $module == 'SalesOrder'|| $module == 'Invoice') && $block == 2) { global $vtlog; $vtlog->logthis("module is ".$module,'info'); $mvAdd_flag = true; $moveAddress = "

"; } for($i=0; $i<$noofrows; $i++) { $fieldtablename = $adb->query_result($result,$i,"tablename"); $fieldcolname = $adb->query_result($result,$i,"columnname"); $uitype = $adb->query_result($result,$i,"uitype"); $fieldname = $adb->query_result($result,$i,"fieldname"); $fieldlabel = $adb->query_result($result,$i,"fieldlabel"); $maxlength = $adb->query_result($result,$i,"maxlength"); $generatedtype = $adb->query_result($result,$i,"generatedtype"); $output .= ''; $custfld = getOutputHtml($uitype, $fieldname, $fieldlabel, $maxlength, $col_fields,$generatedtype); $output .= $custfld; if ($mvAdd_flag == true) $output .= $moveAddress; $mvAdd_flag = false; $i++; if($i<$noofrows) { $fieldtablename = $adb->query_result($result,$i,"tablename"); $fieldcolname = $adb->query_result($result,$i,"columnname"); $uitype = $adb->query_result($result,$i,"uitype"); $fieldname = $adb->query_result($result,$i,"fieldname"); $fieldlabel = $adb->query_result($result,$i,"fieldlabel"); $maxlength = $adb->query_result($result,$i,"maxlength"); $generatedtype = $adb->query_result($result,$i,"generatedtype"); $output .= ''; $custfld = getOutputHtml($uitype, $fieldname, $fieldlabel, $maxlength, $col_fields,$generatedtype); $output .= $custfld; } $output .= ''; } return $output; } function getDetailBlockInformation($module, $block, $col_fields) { //retreive the tabid global $adb; $tabid = getTabid($module); global $profile_id; //retreive the fields from database $sql = "select * from field inner join profile2field on profile2field.fieldid=field.fieldid inner join def_org_field on def_org_field.fieldid=field.fieldid where field.tabid=".$tabid." and field.block=".$block ." and field.displaytype in (1,2) and profile2field.visible=0 and def_org_field.visible=0 and profile2field.profileid=".$profile_id." order by sequence"; $result = $adb->query($sql); $noofrows = $adb->num_rows($result); $output=''; for($i=0; $i<$noofrows; $i++) { $fieldtablename = $adb->query_result($result,$i,"tablename"); $fieldcolname = $adb->query_result($result,$i,"columnname"); $uitype = $adb->query_result($result,$i,"uitype"); $fieldname = $adb->query_result($result,$i,"fieldname"); $fieldlabel = $adb->query_result($result,$i,"fieldlabel"); $maxlength = $adb->query_result($result,$i,"maxlength"); $generatedtype = $adb->query_result($result,$i,"generatedtype"); $output .= ''; $custfld = getDetailViewOutputHtml($uitype, $fieldname, $fieldlabel, $col_fields,$generatedtype); $output .= $custfld; $i++; if($i<$noofrows) { $fieldtablename = $adb->query_result($result,$i,"tablename"); $fieldcolname = $adb->query_result($result,$i,"columnname"); $uitype = $adb->query_result($result,$i,"uitype"); $fieldname = $adb->query_result($result,$i,"fieldname"); $fieldlabel = $adb->query_result($result,$i,"fieldlabel"); $maxlength = $adb->query_result($result,$i,"maxlength"); $generatedtype = $adb->query_result($result,$i,"generatedtype"); $output .= ''; $custfld = getDetailViewOutputHtml($uitype, $fieldname, $fieldlabel, $col_fields,$generatedtype); $output .= $custfld; } $output .= ''; } return $output; } function getBlockTableHeader($header_label) { global $mod_strings; $label = $mod_strings[$header_label]; $output = ''; $output .= ''; $output .= '
'.$label.'
'; return $output; } //added $viewid for customview to retain the sameview 27/5 function getTableHeaderNavigation($navigation_array, $url_qry,$module='',$action_val='index',$viewid='') { global $theme; $theme_path="themes/".$theme."/"; $image_path=$theme_path."images/"; $output = ''; $dir_name=getModuleDirName($module); if(isset($navigation_array['prev'])) { $output .= ' '; $output .= ' '; } else { $output .= ' '; $output .= ' '; } if(isset($navigation_array['next'])) { $output .= ' '; $output .= ' '; } else { $output .= ' '; $output .= ' '; } $output .= ''; return $output; } ?>