function strImageDocTable($enumEntryType, $enumContext, $lFID, &$imageDocs, $lNumImageDocs, $lTableWidth)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    global $genumDateFormat;
    $strOut = '';
    $bImage = $enumEntryType == CENUM_IMGDOC_ENTRY_IMAGE;
    $bPDF = $enumEntryType == CENUM_IMGDOC_ENTRY_PDF;
    $lImageCellWidth = $bImage ? CI_IMGDOC_THUMB_MAXDIMENSION + 4 : 40;
    if ($bPDF) {
        $strImageLink = '<img src="' . DL_IMAGEPATH . '/misc/pdfIcon.png" border="0" title="Open PDF document in new window">';
    } else {
        $strImageLink = '';
    }
    if ($lNumImageDocs > 0) {
        foreach ($imageDocs as $imageDoc) {
            if (is_null($lFID)) {
                $lLocFID = $imageDoc->lForeignID;
            } else {
                $lLocFID = $lFID;
            }
            $strOut .= '<table style="border: 1px solid black; width: ' . $lTableWidth . 'px;">';
            $strProfile = $imageDoc->bProfile ? '<b>Profile</b>&nbsp;&nbsp;&nbsp; ' : '';
            $lImageDocID = $imageDoc->lKeyID;
            if ($bImage) {
                $strImageLink = strImageHTMLTag($enumContext, $enumEntryType, $lLocFID, $imageDoc->strSystemThumbFN, 'View in new window', false, '') . "\n";
            }
            $strFullElement = strLinkHTMLTag($enumContext, $enumEntryType, $lLocFID, $imageDoc->strSystemFN, 'View in new window', true, '') . "\n" . $strImageLink . '</a>' . "\n";
            $strOut .= '<tr><td valign="top" align="center"
                        style="border: 1px solid #aaa; width: ' . $lImageCellWidth . 'px;" >' . $strFullElement . '</td>';
            $strOut .= '<td align="left" valign="top">
                   <table width="100%" class="enpRpt">';
            if (isset($imageDoc->strNameLabel)) {
                $strOut .= '
                      <tr>
                         <td class="enpRptLabel" style="width: 120px;">' . $imageDoc->strNameLabel . '
                         </td>
                         <td class="enpRpt">' . $imageDoc->strName . '
                         </td>
                      </tr>';
            }
            if (isset($imageDoc->strAddressLabel)) {
                $strOut .= '
                      <tr>
                         <td class="enpRptLabel" style="width: 120px;">' . $imageDoc->strAddressLabel . '
                         </td>
                         <td class="enpRpt">' . $imageDoc->strAddr . '
                         </td>
                      </tr>';
            }
            $strOut .= '
                      <tr>
                         <td class="enpRptLabel" style="width: 120px;">' . ($bImage ? 'Caption:' : 'Document Title:') . '
                         </td>
                         <td class="enpRpt">' . htmlspecialchars($imageDoc->strCaptionTitle) . '
                         </td>
                      </tr>

                      <tr>
                         <td class="enpRptLabel" style="width: 120px;">
                            Description:
                         </td>
                         <td class="enpRpt">' . nl2br(htmlspecialchars($imageDoc->strDescription)) . '
                         </td>
                      </tr>

                      <tr>
                         <td class="enpRptLabel" style="width: 120px;">
                            Tags:
                         </td>
                         <td class="enpRpt">' . $imageDoc->strTagsUL . '
                         </td>
                      </tr>

                      <tr>
                         <td class="enpRptLabel" style="width: 120px;">
                            ' . ($bImage ? 'Image ' : 'Document ') . ' Date:
                         </td>
                         <td class="enpRpt">' . date($genumDateFormat, $imageDoc->dteDocImage) . '
                         </td>
                      </tr>

                      <tr>
                         <td class="enpRptLabel" style="width: 120px;">
                            Upload Date:
                         </td>
                         <td class="enpRpt">' . date($genumDateFormat . ' H:i:s', $imageDoc->dteOrigin) . '
                         </td>
                      </tr>
                      <tr>
                         <td class="enpRptLabel" style="width: 120px;">
                            Upload File Name:
                         </td>
                         <td class="enpRpt">' . htmlspecialchars($imageDoc->strUserFN) . '
                         </td>
                      </tr>

                      <tr>
                         <td class="enpRptLabel" style="width: 120px;">
                            Other:
                         </td>
                         <td class="enpRpt">' . $strProfile . strLinkEdit_ImageDoc($enumContext, $lImageDocID, 'Edit ' . ($bImage ? 'image' : 'document') . ' information', true) . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . strLinkRem_ImageDoc($enumContext, $lImageDocID, $bImage, 'Remove ' . ($bImage ? 'image' : 'document'), true, true) . '
                         </td>
                      </tr>


                  </table>
                </td></tr>';
            $strOut .= '</table><br>';
        }
    }
    return $strOut;
}
Esempio n. 2
0
 function strImageDocTerseTable($opts, &$lNumObjects)
 {
     /* -------------------------------------------------------------------------------
           $opts->enumEntryType:      CENUM_IMGDOC_ENTRY_IMAGE, CENUM_IMGDOC_ENTRY_PDF
           $opts->enumContextType:    CENUM_CONTEXT_ACCOUNT, ... CENUM_CONTEXT_BIZ, CENUM_CONTEXT_BIZCONTACT ...
           $opts->lFID
           $opts->lCellHeight         image cell height, in pixels
           $opts->lCellWidth          image cell width, in pixels
           $opts->lBorderWidth:       in pixels, null for no border
           $opts->lCellsPerRow
           $opts->bShowCaption
           $opts->bShowDescription
           $opts->bShowDate
           $opts->bShowOriginalFN
           $opts->bAddRadioSelect:    FID is used as value
           $opts->strRadioFieldName
           $opts->lMatchID
           $opts->bShowNone
           $opts->strShowNoneLabel
        ------------------------------------------------------------------------------- */
     global $genumDateFormat;
     if ((int) $opts->lCellsPerRow <= 0) {
         return 'ERROR: cells per row not valid';
     }
     $bPDF = $opts->enumEntryType == CENUM_IMGDOC_ENTRY_PDF;
     if ($bPDF) {
         $strImageLink = '<img src="' . DL_IMAGEPATH . '/misc/pdfIcon.png" border="0" title="Open PDF document in new window">';
     } else {
         $strImageLink = '';
     }
     $cID = new mimage_doc();
     $cID->loadDocImageInfoViaEntryContextFID($opts->enumEntryType, $opts->enumContextType, $opts->lFID);
     $lNumObjects = $cID->lNumImageDocs;
     $strOut = "\n\n";
     if ($lNumObjects > 0) {
         $strBorder = is_null($opts->lBorderWidth) ? '' : ' border: ' . $opts->lBorderWidth . 'px solid black; ';
         $strOut = "\n\n" . '<table style="' . $strBorder . '">' . "\n";
         $cellIDX = $opts->lCellsPerRow;
         for ($idx = 0; $idx < $lNumObjects; ++$idx) {
             $imageDoc =& $cID->imageDocs[$idx];
             $strWidth = 'width: ' . $opts->lCellWidth . 'px; ';
             if ($cellIDX >= $opts->lCellsPerRow) {
                 if ($idx > 0) {
                     $strOut .= '</tr>' . "\n";
                 }
                 $strOut .= '<tr>' . "\n";
                 $cellIDX = 0;
             }
             if (!$bPDF) {
                 if ($imageDoc->sngAspectRatio > 0) {
                     $strStyle = 'style="width: ' . $opts->lCellWidth . 'px;" ';
                 } else {
                     $strStyle = 'style="height: ' . $opts->lCellHeight . 'px;" ';
                 }
                 $strImageLink = strImageHTMLTag($opts->enumContextType, $opts->enumEntryType, $opts->lFID, $imageDoc->strSystemThumbFN, 'View in new window', false, $strStyle) . "\n";
             }
             $strFullElement = strLinkHTMLTag($opts->enumContextType, $opts->enumEntryType, $opts->lFID, $imageDoc->strSystemFN, 'View in new window', true, '') . $strImageLink . '</a>' . "\n";
             $strOut .= '<td style="' . $strBorder . $strWidth . ' vertical-align: top;">' . "\n" . '<table cellpadding="0" cellspacing="0" border="0">' . "\n";
             if ($opts->bAddRadioSelect) {
                 $strOut .= '<tr><td style="vertical-align: top;">' . '<input type="radio" name="' . $opts->strRadioFieldName . '" ' . 'value="' . $imageDoc->lKeyID . '" ' . ($imageDoc->lKeyID == $opts->lMatchID ? 'checked' : '') . '> Select</td></tr>' . "\n";
             }
             $strOut .= '<tr>
                                <td style="vertical-align: top; height: ' . $opts->lCellHeight . 'px;">' . $strFullElement . '</td></tr>' . "\n";
             if ($opts->bShowCaption) {
                 $strOut .= '<tr><td style="vertical-align: top;"><b>' . htmlspecialchars($imageDoc->strCaptionTitle) . '</b></td></tr>' . "\n";
             }
             if ($opts->bShowDate) {
                 $strOut .= '<tr><td style="vertical-align: top;">' . date($genumDateFormat, $imageDoc->dteDocImage) . '</td></tr>' . "\n";
             }
             if ($opts->bShowOriginalFN) {
                 $strOut .= '<tr><td style="vertical-align: top;">' . htmlspecialchars($imageDoc->strUserFN) . '</td></tr>' . "\n";
             }
             if ($opts->bShowDescription) {
                 $strOut .= '<tr><td style="vertical-align: top;">' . htmlspecialchars($imageDoc->strDescription) . '</td></tr>' . "\n";
             }
             $strOut .= '</table></td>' . "\n\n\n";
             ++$cellIDX;
         }
         if ($opts->bShowNone) {
             if ($cellIDX >= $opts->lCellsPerRow) {
                 if ($idx > 0) {
                     $strOut .= '</tr>' . "\n";
                 }
                 $strOut .= '<tr>' . "\n";
                 $cellIDX = 0;
             }
             $strOut .= '<td style="' . $strBorder . $strWidth . ' vertical-align: top;">' . '<input type="radio" name="' . $opts->strRadioFieldName . '" ' . 'value="-1" ' . ($opts->lMatchID == -1 ? 'checked' : '') . '> ' . $opts->strShowNoneLabel . '</td>';
         }
         $strOut .= '</table>';
     }
     return $strOut;
 }
 function edit($lImageDocID)
 {
     //------------------------------------------------------------------------------
     //
     //------------------------------------------------------------------------------
     global $gstrFormatDatePicker, $gbDateFormatUS;
     $this->load->helper('dl_util/verify_id');
     verifyID($this, $lImageDocID, 'image/document ID');
     $displayData = array();
     $displayData['formData'] = new stdClass();
     $displayData['lImageDocID'] = $lImageDocID = (int) $lImageDocID;
     $displayData['bUpdate'] = true;
     //-------------------------
     // models & helpers
     //-------------------------
     $params = array('enumStyle' => 'terse');
     $this->load->library('generic_rpt', $params);
     $this->load->library('util/dl_date_time', '', 'clsDateTime');
     $this->load->model('img_docs/mimage_doc', 'clsImgDoc');
     $this->load->model('admin/mpermissions', 'perms');
     $this->load->helper('auctions/auction');
     $this->load->helper('dl_util/time_date');
     $this->load->helper('dl_util/context');
     $this->load->helper('img_docs/image_doc');
     $this->load->helper('img_docs/link_img_docs');
     $displayData['enumContextType'] = $enumContextType = $this->clsImgDoc->enumContextViaID($lImageDocID);
     $displayData['lFID'] = $lFID = $this->clsImgDoc->lForeignIDViaID($lImageDocID);
     $displayData['enumEntryType'] = $enumEntryType = $this->clsImgDoc->enumEntryTypeViaID($lImageDocID);
     $displayData['bImage'] = $bImage = $enumEntryType == CENUM_IMGDOC_ENTRY_IMAGE;
     $strLabel = $bImage ? 'Image' : 'Document';
     loadSupportModels($enumContextType, $lFID);
     $this->clsImgDoc->loadDocImageInfoViaID($lImageDocID);
     $imgDoc =& $this->clsImgDoc->imageDocs[0];
     $enumIDContext = imgDocTags\xlateTagTypeViaContextType($enumContextType, $enumEntryType);
     $displayData['strTagLabel'] = imgDocTags\strXlateImgDocContext($enumIDContext);
     $this->cidTags->loadImgDocTagsForDDL($enumIDContext, $lImageDocID, $displayData['lNumTags'], $displayData['tags']);
     //-------------------------
     // validation rules
     //-------------------------
     $this->form_validation->set_error_delimiters('<div class="formError">', '</div>');
     $this->form_validation->set_rules('txtDescription', 'Description', 'trim');
     $this->form_validation->set_rules('txtCaption', 'Caption', 'trim');
     $this->form_validation->set_rules('txtDate', 'Date of ' . $strLabel, 'trim|required|' . 'callback_clientImageUploadVerifyBDateValid');
     if ($bImage) {
         $this->form_validation->set_rules('chkProfile', 'Profile', 'trim');
     }
     if ($this->form_validation->run() == FALSE) {
         $this->load->helper('dl_util/web_layout');
         $this->load->library('generic_form');
         if ($bImage) {
             $displayData['strImageTag'] = strLinkHTMLTag($enumContextType, $enumEntryType, $lFID, $imgDoc->strSystemFN, 'View in new window', true, '') . strImageHTMLTag($enumContextType, $enumEntryType, $lFID, $imgDoc->strSystemThumbFN, '', false, ' style="border: 1px solid black;" ') . '</a>';
         } else {
             $displayData['strImageTag'] = '';
         }
         // first time displayed, no user data entry errors
         if (validation_errors() == '') {
             $displayData['formData']->txtDate = date($gstrFormatDatePicker, $imgDoc->dteDocImage);
             $displayData['formData']->txtDescription = htmlspecialchars($imgDoc->strDescription);
             $displayData['formData']->txtCaption = htmlspecialchars($imgDoc->strCaptionTitle);
             if ($bImage) {
                 $displayData['formData']->bProfile = $imgDoc->bProfile;
             }
         } else {
             setOnFormError($displayData);
             $displayData['formData']->txtDate = set_value('txtDate');
             $displayData['formData']->txtDescription = set_value('txtDescription');
             $displayData['formData']->txtCaption = set_value('txtCaption');
             $this->updateTagSelect($displayData['lNumTags'], $displayData['tags']);
             if ($bImage) {
                 $displayData['formData']->bProfile = set_value('chkProfile') == 'TRUE';
             }
         }
         $displayData['contextSummary'] = strContextHTML($enumContextType, $lFID, $displayData['strContextName']);
         //--------------------------
         // breadcrumbs
         //--------------------------
         $displayData['pageTitle'] = breadCrumbsToRecViewViaContextType($enumContextType, $lFID, 'Update ' . $strLabel);
         $displayData['title'] = CS_PROGNAME . ' | Clients';
         $displayData['nav'] = $this->mnav_brain_jar->navData();
         $displayData['mainTemplate'] = 'img_docs/upload_image_doc_view';
         $this->load->vars($displayData);
         $this->load->view('template');
     } else {
         $this->load->model('img_docs/mimage_doc', 'clsImgDoc');
         if ($bImage) {
             $this->load->library('image_lib');
         }
         $this->clsImgDoc->loadDocImageInfoViaID(-1);
         $imageDoc =& $this->clsImgDoc->imageDocs[0];
         $bProfile = @$_POST['chkProfile'] == 'TRUE';
         $strDate = trim($_POST['txtDate']);
         MDY_ViaUserForm($strDate, $lMon, $lDay, $lYear, $gbDateFormatUS);
         $dteMySQLDate = strMoDaYr2MySQLDate($lMon, $lDay, $lYear);
         //         $uploadResults = $_SESSION[CS_NAMESPACE.'uploadResults'];
         $enumEntryType = $bImage ? CENUM_IMGDOC_ENTRY_IMAGE : CENUM_IMGDOC_ENTRY_PDF;
         $imageDoc->enumEntryType = $enumEntryType;
         $imageDoc->enumContextType = $enumContextType;
         $imageDoc->lForeignID = $lFID;
         $imageDoc->strCaptionTitle = trim($_POST['txtCaption']);
         $imageDoc->strDescription = trim($_POST['txtDescription']);
         $imageDoc->dteMysqlDocImage = $dteMySQLDate;
         $imageDoc->bProfile = $bProfile;
         // tags
         $this->setUserSelectedTagsFromPost($lImageDocID);
         $this->clsImgDoc->updateDocImageRec($lImageDocID);
         if ($bImage && $bProfile) {
             $this->clsImgDoc->setProfileFlag($lImageDocID, $enumContextType, $lFID);
         }
         $this->session->set_flashdata('msg', 'The ' . $strLabel . ' information was updated');
         redirectViaContextType($enumContextType, $lFID);
     }
 }
Esempio n. 4
0
 public function strClientHTMLSummary($idx)
 {
     /*-----------------------------------------------------------------------
           assumes user has called $clsClient->loadClientsVia...()
     
           caller must include
                 $this->load->model  ('img_docs/mimage_doc',   'clsImgDoc');
                 $this->load->helper ('img_docs/image_doc');
        -----------------------------------------------------------------------*/
     $strOut = '';
     $params = array('enumStyle' => 'terse');
     $clsRpt = new generic_rpt($params);
     $clsRpt->setEntrySummary();
     $clsC = $this->clients[$idx];
     $lCID = $clsC->lKeyID;
     $cImg = new mimage_doc();
     $cImg->bLoadContext = false;
     $cImg->loadProfileImage(CENUM_CONTEXT_CLIENT, $lCID);
     $bProfileImgAvail = $cImg->lNumImageDocs > 0;
     if ($bProfileImgAvail) {
         $imgDoc =& $cImg->imageDocs[0];
         $strTNImg = strLinkHTMLTag(CENUM_CONTEXT_CLIENT, CENUM_IMGDOC_ENTRY_IMAGE, $lCID, $imgDoc->strSystemFN, 'View in new window', true, '') . strImageHTMLTag(CENUM_CONTEXT_CLIENT, CENUM_IMGDOC_ENTRY_IMAGE, $lCID, $imgDoc->strSystemThumbFN, '', false, ' style="border: 1px solid black; height: 80px;" ') . '</a>';
         $strOut .= '<table border="0"><tr><td style="vertical-align: top;">';
     } else {
     }
     $strOut .= $clsRpt->openReport('', '');
     $strOut .= $clsRpt->openRow(false) . $clsRpt->writeLabel($clsC->cv_strVocClientS . ' Name:') . $clsRpt->writeCell(strLinkView_ClientRecord($lCID, 'View Client Record', true) . '&nbsp;' . $clsC->strSafeName . '&nbsp;&nbsp;(client ID: ' . str_pad($lCID, 5, '0', STR_PAD_LEFT) . ')') . $clsRpt->closeRow();
     $strOut .= $clsRpt->openRow(false) . $clsRpt->writeLabel('Birthday/Age:') . $clsRpt->writeCell($clsC->strClientAgeBDay) . $clsRpt->closeRow();
     $strOut .= $clsRpt->openRow(false) . $clsRpt->writeLabel('Gender:') . $clsRpt->writeCell($clsC->enumGender) . $clsRpt->closeRow();
     $strOut .= $clsRpt->openRow(false) . $clsRpt->writeLabel($clsC->cv_strVocLocS . ':') . $clsRpt->writeCell(htmlspecialchars($clsC->strLocation)) . $clsRpt->closeRow();
     $strStatus = htmlspecialchars($clsC->strStatusCatName);
     if (isset($clsC->strFlagsTable)) {
         $strStatus .= '&nbsp;' . $clsC->strFlagsTable;
     }
     $strOut .= $clsRpt->openRow(false) . $clsRpt->writeLabel('Status Category:') . $clsRpt->writeCell($strStatus) . $clsRpt->closeRow();
     $strOut .= $clsRpt->closeReport('<br>');
     if ($bProfileImgAvail) {
         $strOut .= '</td><td style="vertical-align: top;">' . $strTNImg . '</td></tr></table>';
     }
     return $strOut;
 }
 function loadBidSheets()
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $glChapterID;
     if ($this->strOrderBidSheet == '') {
         $strOrder = ' abs_strSheetName, abs_lKeyID ';
     } else {
         $strOrder = $this->strOrderBidSheet;
     }
     $this->bidSheets = array();
     $sqlStr = "SELECT\n            abs_lKeyID, abs_lTemplateID, abs_strSheetName, abs_strDescription,\n            abs_enumPaperType, abs_lNumSignupPages,\n            abs_strSignUpCol1, abs_strSignUpCol2, abs_strSignUpCol3, abs_strSignUpCol4,\n            abs_lSigunUpColWidth1, abs_lSigunUpColWidth2, abs_lSigunUpColWidth3, abs_lSigunUpColWidth4,\n            abs_bIncludeOrgName, abs_bIncludeOrgLogo, abs_lLogoImgID,\n            abs_bIncludeMinBid, abs_bIncludeMinBidInc, abs_bIncludeBuyItNow, abs_bIncludeReserve,\n            abs_bIncludeDate, abs_bIncludeFooter,\n            abs_bIncludePackageName, abs_bIncludePackageID, abs_bIncludePackageDesc,\n            abs_bIncludePackageImage, abs_bIncludePackageEstValue,\n            abs_bIncludeItemName, abs_bIncludeItemID, abs_bIncludeItemDesc, abs_bIncludeItemImage,\n            abs_bIncludeItemDonor, abs_bIncludeItemEstValue, abs_bIncludeSignup,\n            abs_bReadOnly, abs_bRetired,\n\n            abs_lAuctionID, auc_strAuctionName, auc_dteAuctionDate,\n\n            di_lKeyID, di_strSystemFN, di_strSystemThumbFN, di_strPath, di_strCaptionTitle,\n\n            abs_lOriginID, abs_lLastUpdateID,\n            usersC.us_strFirstName AS strCFName, usersC.us_strLastName AS strCLName,\n            usersL.us_strFirstName AS strLFName, usersL.us_strLastName AS strLLName,\n            UNIX_TIMESTAMP(abs_dteOrigin)     AS dteOrigin,\n            UNIX_TIMESTAMP(abs_dteLastUpdate) AS dteLastUpdate\n\n         FROM gifts_auctions_bidsheets\n            INNER JOIN gifts_auctions ON auc_lKeyID=abs_lAuctionID\n            LEFT  JOIN docs_images ON abs_lLogoImgID=di_lKeyID\n            INNER JOIN admin_users AS usersC   ON abs_lOriginID     = usersC.us_lKeyID\n            INNER JOIN admin_users AS usersL   ON abs_lLastUpdateID = usersL.us_lKeyID\n\n          WHERE NOT abs_bRetired\n            {$this->strWhereExtra}\n          ORDER BY {$strOrder};";
     $query = $this->db->query($sqlStr);
     $this->lNumBidSheets = $lNumBidSheets = $query->num_rows();
     if ($lNumBidSheets == 0) {
         $this->bidSheets[0] = new stdClass();
         $bs =& $this->bidSheets[0];
         $bs->lKeyID = $bs->lTemplateID = $bs->strSheetName = $bs->strDescription = $bs->enumPaperType = $bs->lNumSignupPages = $bs->bIncludeOrgLogo = $bs->lLogoImgID = $bs->lImageID = $bs->strSystemFN = $bs->strSystemThumbFN = $bs->strPath = $bs->strCaptionTitle = $bs->bIncludeOrgName = $bs->bIncludeMinBid = $bs->bIncludeMinBidInc = $bs->bIncludeBuyItNow = $bs->bIncludeReserve = $bs->bIncludeDate = $bs->bIncludeFooter = $bs->bIncludePackageName = $bs->bIncludePackageID = $bs->bIncludePackageDesc = $bs->bIncludePackageImage = $bs->bIncludePackageEstValue = $bs->bIncludeSignup = $bs->bIncludeItemName = $bs->bIncludeItemID = $bs->bIncludeItemDesc = $bs->bIncludeItemImage = $bs->bIncludeItemDonor = $bs->bIncludeItemEstValue = $bs->lAuctionID = $bs->strAuctionName = $bs->dteAuction = $bs->bRetired = $bs->bReadOnly = $bs->lOriginID = $bs->lLastUpdateID = $bs->strCFName = $bs->strCLName = $bs->strLFName = $bs->strLLName = $bs->dteOrigin = $bs->dteLastUpdate = null;
         $bs->signUpCols = array();
         $bs->lNumSignupCols = 0;
         for ($jidx = 1; $jidx <= 4; ++$jidx) {
             $bs->signUpCols[$jidx] = new stdClass();
             $suCol =& $bs->signUpCols[$jidx];
             $suCol->heading = null;
             $suCol->width = null;
             $suCol->bShow = false;
         }
     } else {
         $idx = 0;
         foreach ($query->result() as $row) {
             $this->bidSheets[$idx] = new stdClass();
             $bs =& $this->bidSheets[$idx];
             $bs->lKeyID = $row->abs_lKeyID;
             $bs->lTemplateID = $row->abs_lTemplateID;
             $bs->strSheetName = $row->abs_strSheetName;
             $bs->strDescription = $row->abs_strDescription;
             $bs->enumPaperType = $row->abs_enumPaperType;
             $bs->lNumSignupPages = $row->abs_lNumSignupPages;
             // bid sheets
             $bs->lNumSignupCols = 0;
             $bs->signUpCols = array();
             for ($jidx = 1; $jidx <= 4; ++$jidx) {
                 $bs->signUpCols[$jidx] = new stdClass();
                 $suCol =& $bs->signUpCols[$jidx];
                 $suCol->heading = $row->{'abs_strSignUpCol' . $jidx};
                 $suCol->width = $row->{'abs_lSigunUpColWidth' . $jidx};
                 $suCol->bShow = !is_null($suCol->heading);
                 if ($suCol->bShow) {
                     ++$bs->lNumSignupCols;
                 }
             }
             $bs->lAuctionID = $lAuctionID = $row->abs_lAuctionID;
             $bs->strAuctionName = $row->auc_strAuctionName;
             $bs->dteAuction = dteMySQLDate2Unix($row->auc_dteAuctionDate);
             $bs->bIncludeOrgLogo = $row->abs_bIncludeOrgLogo;
             $bs->lLogoImgID = $row->abs_lLogoImgID;
             $bs->lImageID = $row->di_lKeyID;
             $bs->strSystemFN = $row->di_strSystemFN;
             $bs->strSystemThumbFN = $row->di_strSystemThumbFN;
             $bs->strPath = $row->di_strPath;
             $bs->strCaptionTitle = $row->di_strCaptionTitle;
             if (is_null($bs->lLogoImgID)) {
                 $bs->strLogoImgTN = null;
                 $bs->strLogoImgLink = null;
             } else {
                 $bs->strLogoImgTN = strImageHTMLTag(CENUM_CONTEXT_AUCTION, CENUM_IMGDOC_ENTRY_IMAGE, $lAuctionID, $bs->strSystemThumbFN);
                 $bs->strLogoImgLink = strLinkHTMLTag(CENUM_CONTEXT_AUCTION, CENUM_IMGDOC_ENTRY_IMAGE, $lAuctionID, $bs->strSystemFN);
             }
             $bs->bIncludeOrgName = $row->abs_bIncludeOrgName;
             $bs->bIncludeMinBid = $row->abs_bIncludeMinBid;
             $bs->bIncludeMinBidInc = $row->abs_bIncludeMinBidInc;
             $bs->bIncludeBuyItNow = $row->abs_bIncludeBuyItNow;
             $bs->bIncludeReserve = $row->abs_bIncludeReserve;
             $bs->bIncludeDate = $row->abs_bIncludeDate;
             $bs->bIncludeFooter = $row->abs_bIncludeFooter;
             $bs->bIncludePackageName = $row->abs_bIncludePackageName;
             $bs->bIncludePackageID = $row->abs_bIncludePackageID;
             $bs->bIncludePackageDesc = $row->abs_bIncludePackageDesc;
             $bs->bIncludePackageImage = $row->abs_bIncludePackageImage;
             $bs->bIncludePackageEstValue = $row->abs_bIncludePackageEstValue;
             $bs->bIncludeSignup = $row->abs_bIncludeSignup;
             $bs->bIncludeItemName = $row->abs_bIncludeItemName;
             $bs->bIncludeItemID = $row->abs_bIncludeItemID;
             $bs->bIncludeItemDesc = $row->abs_bIncludeItemDesc;
             $bs->bIncludeItemImage = $row->abs_bIncludeItemImage;
             $bs->bIncludeItemDonor = $row->abs_bIncludeItemDonor;
             $bs->bIncludeItemEstValue = $row->abs_bIncludeItemEstValue;
             $bs->bIncludeSignup = $row->abs_bIncludeSignup;
             $bs->bRetired = $row->abs_bRetired;
             $bs->bReadOnly = $row->abs_bReadOnly;
             $bs->lOriginID = $row->abs_lOriginID;
             $bs->lLastUpdateID = $row->abs_lLastUpdateID;
             $bs->strCFName = $row->strCFName;
             $bs->strCLName = $row->strCLName;
             $bs->strLFName = $row->strLFName;
             $bs->strLLName = $row->strLLName;
             $bs->dteOrigin = $row->dteOrigin;
             $bs->dteLastUpdate = $row->dteLastUpdate;
             ++$idx;
         }
     }
 }