function writeIItemRow($item)
{
    //---------------------------------------------------------------------
    //
    //---------------------------------------------------------------------
    $strStatus = '<span style="font-size: 8pt;"><b>Status: </b>' . htmlspecialchars($item->strStatus) . '</span>';
    $strSN = '';
    if ($item->strItemSNa != '') {
        $strSN .= '<br><b>SN(a): </b>' . $item->strItemSNa;
    }
    if ($item->strItemSNb != '') {
        $strSN .= '<br><b>SN(b): </b>' . $item->strItemSNb;
    }
    if ($strSN != '') {
        $strSN = '<span style="font-size: 8pt;">' . $strSN . '</span>';
    }
    echoT('
         <tr class="makeStripe">
            <td class="enpRpt" style="text-align: center; width: 40pt;">' . str_pad($item->lItemID, 5, '0', STR_PAD_LEFT) . '&nbsp;' . strLinkView_InventoryItem($item->lItemID, 'View item record', true) . '
            </td>
            <td class="enpRpt" style="width: 200pt;">' . htmlspecialchars($item->strFullCatName) . '
            </td>
            <td class="enpRpt" style="width: 200pt;">' . htmlspecialchars($item->strItemName) . $strSN . '
            </td>
              <td class="enpRpt">' . $strStatus . '
              </td>
         </tr>');
}
Esempio n. 2
0
 private function loadImgDocInfoViaContext($enumContext, $imgDoc, $row)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $genumDateFormat, $glChapterID;
     $lFID = (int) $imgDoc->lForeignID;
     switch ($enumContext) {
         case CENUM_CONTEXT_CLIENT:
             $imgDoc->strNameLabel = 'Client';
             $imgDoc->strName = strLinkView_ClientRecord($lFID, 'View Client Record', true) . '&nbsp;' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . '&nbsp;&nbsp;<b>' . htmlspecialchars($row->cr_strLName . ', ' . $row->cr_strFName) . '</b>';
             $imgDoc->strAddressLabel = 'Address';
             $imgDoc->strAddr = strBuildAddress($row->cr_strAddr1, $row->cr_strAddr2, $row->cr_strCity, $row->cr_strState, $row->cr_strCountry, $row->cr_strZip, true);
             $strPhone = strPhoneCell($row->cr_strPhone, $row->cr_strCell);
             if ($strPhone != '') {
                 $imgDoc->strAddr .= '<br>' . $strPhone;
             }
             break;
         case CENUM_CONTEXT_PEOPLE:
             $imgDoc->strNameLabel = 'Name';
             $imgDoc->strName = strLinkView_PeopleRecord($lFID, 'View People Record', true) . '&nbsp;' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . '&nbsp;&nbsp;<b>' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '</b>';
             $imgDoc->strAddressLabel = 'Address';
             $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true);
             $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell);
             if ($strPhone != '') {
                 $imgDoc->strAddr .= '<br>' . $strPhone;
             }
             break;
         case CENUM_CONTEXT_LOCATION:
             $imgDoc->strNameLabel = 'Client Location';
             $imgDoc->strName = strLinkView_ClientLocation($lFID, 'View client location', true) . '&nbsp;' . htmlspecialchars($row->cl_strLocation);
             break;
         case CENUM_CONTEXT_GRANTPROVIDER:
             $imgDoc->strNameLabel = 'Funder/Provider';
             $imgDoc->strName = strLinkView_GrantProvider($lFID, 'View funder/provider', true) . '&nbsp;' . htmlspecialchars($row->gpr_strGrantOrg);
             break;
         case CENUM_CONTEXT_INVITEM:
             $imgDoc->strNameLabel = 'Inventory Item';
             $imgDoc->strName = strLinkView_InventoryItem($lFID, 'View inventory item', true) . '&nbsp;' . htmlspecialchars($row->ivi_strItemName);
             break;
         case CENUM_CONTEXT_AUCTION:
             $imgDoc->strNameLabel = 'Silent Auction';
             $imgDoc->strName = strLinkView_AuctionRecord($lFID, 'View Auction', true) . '&nbsp;' . htmlspecialchars($row->auc_strAuctionName) . ' (' . date($genumDateFormat, dteMySQLDate2Unix($row->auc_dteAuctionDate)) . ')';
             break;
         case CENUM_CONTEXT_AUCTIONITEM:
             $imgDoc->strNameLabel = 'Auction Item';
             $imgDoc->strName = strLinkView_AuctionItem($lFID, 'View Auction Item', true) . '&nbsp;' . 'item: ' . htmlspecialchars($row->ait_strItemName) . '<br>package: ' . htmlspecialchars($row->ap_strPackageName) . '<br>auction: ' . htmlspecialchars($row->auc_strAuctionName);
             break;
         case CENUM_CONTEXT_AUCTIONPACKAGE:
             $imgDoc->strNameLabel = 'Auction Package';
             $imgDoc->strName = strLinkView_AuctionPackageRecord($lFID, 'View Auction Package', true) . '&nbsp;' . 'package: ' . htmlspecialchars($row->ap_strPackageName) . '<br>auction: ' . htmlspecialchars($row->auc_strAuctionName);
             break;
         case CENUM_CONTEXT_BIZ:
             $imgDoc->strNameLabel = 'Business/Organization Name';
             $imgDoc->strName = strLinkView_BizRecord($lFID, 'View Business/Organization Record', true) . '&nbsp;' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . '&nbsp;&nbsp;<b>' . htmlspecialchars($row->pe_strLName) . '</b>';
             $imgDoc->strAddressLabel = 'Address';
             $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true);
             $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell);
             if ($strPhone != '') {
                 $imgDoc->strAddr .= '<br>' . $strPhone;
             }
             break;
         case CENUM_CONTEXT_SPONSORSHIP:
             $bBiz = (bool) $row->pe_bBiz;
             if ($bBiz) {
                 $imgDoc->strNameLabel = 'Sponsor (Business/organization)';
                 $imgDoc->strName = strLinkView_PeopleRecord($lFID, 'View People Record', true) . '&nbsp;' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . '&nbsp;&nbsp;<b>' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '</b>';
             } else {
                 $imgDoc->strNameLabel = 'Sponsor (Individual)';
                 $imgDoc->strName = strLinkView_BizRecord($lFID, 'View Business/Organization Record', true) . '&nbsp;' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . '&nbsp;&nbsp;<b>' . htmlspecialchars($row->pe_strLName) . '</b>';
             }
             $imgDoc->strAddressLabel = 'Address';
             $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true);
             $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell);
             if ($strPhone != '') {
                 $imgDoc->strAddr .= '<br>' . $strPhone;
             }
             break;
         case CENUM_CONTEXT_ORGANIZATION:
             $imgDoc->strNameLabel = 'Your organization';
             $imgDoc->strName = strLinkView_OrganizationRecord($lFID, 'View organization record', true) . '&nbsp;' . htmlspecialchars($row->ch_strChapterName);
             break;
         case CENUM_CONTEXT_STAFF:
             $imgDoc->strNameLabel = 'Staff Member';
             $imgDoc->strName = strLinkView_User($lFID, 'View staff member record', true) . '&nbsp;' . htmlspecialchars($row->strFirstName . ' ' . $row->strLastName);
             break;
         case CENUM_CONTEXT_VOLUNTEER:
             $imgDoc->strNameLabel = 'Name';
             $imgDoc->strName = strLinkView_Volunteer($lFID, 'View Volunteer Record', true) . '&nbsp;' . str_pad($lFID, 6, '0', STR_PAD_LEFT) . '&nbsp;&nbsp;<b>' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '</b>';
             $imgDoc->strAddressLabel = 'Address';
             $imgDoc->strAddr = strBuildAddress($row->pe_strAddr1, $row->pe_strAddr2, $row->pe_strCity, $row->pe_strState, $row->pe_strCountry, $row->pe_strZip, true);
             $strPhone = strPhoneCell($row->pe_strPhone, $row->pe_strCell);
             if ($strPhone != '') {
                 $imgDoc->strAddr .= '<br>' . $strPhone;
             }
             break;
         default:
             screamForHelp($enumContext . ': image context not currently implemented<br>error on line  <b> -- ' . __LINE__ . ' --</b>,<br>file ' . __FILE__ . ',<br>function ' . __FUNCTION__);
             break;
     }
 }
 public function strIItemHTMLSummary($item)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $strOut = '';
     $params = array('enumStyle' => 'terse');
     $clsRpt = new generic_rpt($params);
     $clsRpt->setEntrySummary();
     $lIItemID = $item->lKeyID;
     $strOut .= $clsRpt->openReport('', '');
     $strOut .= $clsRpt->openRow(false) . $clsRpt->writeLabel('Item Name:') . $clsRpt->writeCell(strLinkView_InventoryItem($lIItemID, 'View item', true) . htmlspecialchars($item->strItemName) . '&nbsp;&nbsp;(item ID: ' . str_pad($lIItemID, 5, '0', STR_PAD_LEFT) . ')') . $clsRpt->closeRow();
     $strOut .= $clsRpt->openRow(false) . $clsRpt->writeLabel('Category:') . $clsRpt->writeCell(htmlspecialchars($item->strCatBreadCrumb)) . $clsRpt->closeRow();
     $strOut .= $clsRpt->openRow(false) . $clsRpt->writeLabel('Responsible Party:') . $clsRpt->writeCell(htmlspecialchars($item->strRParty)) . $clsRpt->closeRow();
     $strOut .= $clsRpt->closeReport('<br>');
     return $strOut;
 }
         </td>
         <td class="enpRptLabel">
            Status
         </td>
         <td class="enpRptLabel">
            Location
         </td>
         <td class="enpRptLabel">
            Description
         </td>
      </tr>');
foreach ($items as $item) {
    $lIItemID = $item->lKeyID;
    echoT('
         <tr class="makeStripe">
            <td class="enpRpt" style="width: 50pt; text-align: center;">' . str_pad($lIItemID, 5, '0', STR_PAD_LEFT) . '&nbsp;' . strLinkView_InventoryItem($lIItemID, 'View Item', true) . '
            </td>
            <td class="enpRpt" style="width: 120pt;">' . htmlspecialchars($item->strItemName) . '
            </td>
            <td class="enpRpt" style="width: 60pt;">' . htmlspecialchars($item->strItemSNa) . '
            </td>
            <td class="enpRpt" style="width: 60pt;">' . htmlspecialchars($item->strItemSNb) . '
            </td>
            <td class="enpRpt" style="width: 80pt;">' . htmlspecialchars($item->strRParty) . '
            </td>
            <td class="enpRpt" style="width: 80pt;">' . htmlspecialchars($item->strStatus) . '
            </td>
            <td class="enpRpt" style="width: 150pt;">' . nl2br(htmlspecialchars($item->strLocation)) . '
            </td>
            <td class="enpRpt" style="width: 150pt;">' . nl2br(htmlspecialchars($item->strDescription)) . '
            </td>
        $strSN .= '<br><b>SN(a): </b>' . $item->strItemSNa;
    }
    if ($item->strItemSNb != '') {
        $strSN .= '<br><b>SN(b): </b>' . $item->strItemSNb;
    }
    if ($strSN != '') {
        $strSN = '<span style="font-size: 8pt;">' . $strSN . '</span>';
    }
    $strStatus = '';
    if ($item->strCO_Notes != '') {
        $strStatus = '<br>';
    }
    $strStatus .= '<span style="font-size: 8pt;"><b>Status: </b>' . htmlspecialchars($item->strStatus) . '</span>';
    echoT('
         <tr class="makeStripe">
            <td class="enpRpt" style="text-align: center; width: 40pt;">' . str_pad($item->lItemID, 5, '0', STR_PAD_LEFT) . '&nbsp;' . strLinkView_InventoryItem($item->lItemID, 'View item record', true) . '
            </td>
            <td class="enpRpt" style="text-align: center; width: 35pt;">' . str_pad($item->lCICO_ID, 5, '0', STR_PAD_LEFT) . '
            </td>
            <td class="enpRpt" style="width: 180pt;">' . htmlspecialchars($item->strFullCatName) . '
            </td>
            <td class="enpRpt" style="width: 140pt;">' . htmlspecialchars($item->strItemName) . $strSN . '
            </td>
            <td class="enpRpt" style="width: 120pt;">' . htmlspecialchars($item->strCheckedOutTo) . '<br>' . strLinkCI_IItem($item->lItemID, 'Check in item', true) . '&nbsp;' . strLinkCI_IItem($item->lItemID, 'Check in item', false) . '
            </td>
            <td class="enpRpt" style="width: 60pt;">' . date($genumDateFormat, $item->dteCheckedOut) . '
            </td>
            <td class="enpRpt" style="width: 140pt;">' . nl2br(htmlspecialchars($item->strCO_Notes)) . $strStatus . '
            </td>
         </tr>');
}