コード例 #1
0
ファイル: GenerateObj.php プロジェクト: cin-system/cinrepo
 public function getHeaderLabel($reportid, $type, $fldname, $column_str)
 {
     $headerLabel = "";
     global $default_charset;
     if ($column_str != "" && $reportid != "") {
         $adb = PEARDatabase::getInstance();
         $labelsql = "SELECT columnlabel FROM its4you_reports4you_labels WHERE reportid = ? and type = ? AND columnname=?";
         //$adb->setDebug(true);
         $labelres = $adb->pquery($labelsql, array($reportid, $type, html_entity_decode($column_str, ENT_QUOTES, $default_charset)));
         //$adb->setDebug(false);
         $numlabels = $adb->num_rows($labelres);
         if ($numlabels > 0) {
             while ($row = $adb->fetchByAssoc($labelres)) {
                 $headerLabel = $row["columnlabel"];
             }
         } else {
             $headerLabel = ITS4YouReports::getColumnStr_Label($column_str, $type);
         }
     }
     return $headerLabel;
 }