当前位置: 首页>>代码示例>>PHP>>正文


PHP dteMySQLDate2Unix函数代码示例

本文整理汇总了PHP中dteMySQLDate2Unix函数的典型用法代码示例。如果您正苦于以下问题:PHP dteMySQLDate2Unix函数的具体用法?PHP dteMySQLDate2Unix怎么用?PHP dteMySQLDate2Unix使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dteMySQLDate2Unix函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loadReportEnrolless

 function loadReportEnrolless(&$sRpt)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $this->sqlWhere = " AND cp_lKeyID {$sRpt->strCProgIn} ";
     $this->loadClientPrograms();
     $erecs = array();
     foreach ($this->cprogs as $cprog) {
         // note - interesting debate over where to use IN or temp table
         // http://stackoverflow.com/questions/1532366/mysql-number-of-items-within-in-clause
         // load the enrollees
         $this->extractCProgFields($cprog, $lETableID, $lATableID, $strETable, $strEFNPrefix, $strATable, $strAFNPrefix);
         $sqlStr = "SELECT {$strEFNPrefix}" . "_lForeignKey AS lClientID,\n                {$strEFNPrefix}" . "_lKeyID AS lERecID,\n                {$strEFNPrefix}" . "_dteStart AS mdteStart,\n                {$strEFNPrefix}" . "_dteEnd   AS mdteEnd\n             FROM {$strETable}\n             WHERE NOT {$strEFNPrefix}" . "_bRetired " . $this->strActivelyEnrolledDuringTimeFrameWhere($cprog, $sRpt->dteStart, $sRpt->dteEnd) . "\n             ORDER BY {$strEFNPrefix}" . "_lKeyID;";
         $query = $this->db->query($sqlStr);
         $lNumERecs = $query->num_rows();
         if ($lNumERecs > 0) {
             foreach ($query->result() as $row) {
                 $lClientID = $row->lClientID;
                 if (!isset($erecs[$lClientID])) {
                     $erecs[$lClientID] = new stdClass();
                     $erec =& $erecs[$lClientID];
                     $erec->programs = array();
                     $erec->lProgCnt = 0;
                 }
                 $lCnt = $erec->lProgCnt;
                 $erec->programs[$lCnt] = new stdClass();
                 $erec->programs[$lCnt]->strProgName = $cprog->strProgramName;
                 $erec->programs[$lCnt]->lCProgID = $cprog->lKeyID;
                 $erec->programs[$lCnt]->lETableID = $cprog->lEnrollmentTableID;
                 $erec->programs[$lCnt]->lERecID = $row->lERecID;
                 $erec->programs[$lCnt]->dteStart = dteMySQLDate2Unix($row->mdteStart);
                 $erec->programs[$lCnt]->dteEnd = dteMySQLDate2Unix($row->mdteEnd);
                 ++$erec->lProgCnt;
             }
         }
     }
     $this->lNumEnrollees = count($erecs);
     $this->enrollees = array();
     if ($this->lNumEnrollees > 0) {
         $strIn = implode(', ', array_keys($erecs));
         $sqlStr = "SELECT\n                  cr_lKeyID, cr_strFName, cr_strLName\n               FROM client_records\n               WHERE\n                  cr_lKeyID IN ({$strIn})\n                  AND NOT cr_bRetired\n               ORDER BY cr_strLName, cr_strFName, cr_lKeyID;";
         $query = $this->db->query($sqlStr);
         $lNumCRecs = $query->num_rows();
         if ($lNumCRecs > 0) {
             $idx = 0;
             foreach ($query->result() as $row) {
                 $lClientID = (int) $row->cr_lKeyID;
                 $this->enrollees[$idx] = new stdClass();
                 $crec =& $this->enrollees[$idx];
                 $crec->lClientID = $lClientID;
                 $crec->strCFName = $row->cr_strFName;
                 $crec->strCLName = $row->cr_strLName;
                 $crec->programs = arrayCopy($erecs[$lClientID]->programs);
                 ++$idx;
             }
         }
     }
 }
开发者ID:simple-gifts,项目名称:Delightful-Labor,代码行数:59,代码来源:mcprog_enrollee_rpt.php

示例2: loadPackages

 function loadPackages()
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $packages = array();
     $sqlStr = "SELECT\n            ap_lKeyID, ap_lAuctionID, ap_strPackageName,\n            ap_curMinBidAmnt, ap_curReserveAmnt, ap_curMinBidInc,\n            ap_curBuyItNowAmnt, ap_curWinBidAmnt,\n            ap_strDescription, ap_strInternalNotes, ap_lBidWinnerID, ap_dteWinnerContact,\n            ap_lBidSheetID, abs_lKeyID, abs_lTemplateID, abs_strSheetName,\n            ap_lGiftID, gi_curAmnt,\n\n            bwPeople.pe_bBiz AS bw_bBiz, bwPeople.pe_strFName AS bw_strFName, bwPeople.pe_strLName AS bw_strLName,\n\n            auc_strAuctionName, auc_lDefaultBidSheet, auc_dteAuctionDate,\n            auc_lACOID, aco_strFlag, aco_strCurrencySymbol,\n\n            ap_lOriginID, ap_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(ap_dteOrigin) AS dteOrigin,\n            UNIX_TIMESTAMP(ap_dteLastUpdate) AS dteLastUpdate\n\n         FROM gifts_auctions_packages\n            INNER JOIN gifts_auctions           ON ap_lAuctionID    = auc_lKeyID\n            INNER JOIN admin_aco                ON auc_lACOID       = aco_lKeyID\n            INNER JOIN admin_users AS usersC    ON ap_lOriginID     = usersC.us_lKeyID\n            INNER JOIN admin_users AS usersL    ON ap_lLastUpdateID = usersL.us_lKeyID\n            LEFT  JOIN gifts                    ON ap_lGiftID       = gi_lKeyID\n            LEFT  JOIN gifts_auctions_bidsheets ON abs_lKeyID       = ap_lBidSheetID\n            LEFT  JOIN people_names AS bwPeople ON pe_lKeyID        = ap_lBidWinnerID\n\n         WHERE NOT auc_bRetired AND NOT ap_bRetired\n            {$this->strWhereExtra}\n         ORDER BY ap_strPackageName, ap_lKeyID;";
     $query = $this->db->query($sqlStr);
     $this->lNumPackages = $query->num_rows();
     if ($this->lNumPackages == 0) {
         $this->packages[0] = new stdClass();
         $package =& $this->packages[0];
         $package->lKeyID = $package->lAuctionID = $package->lACOID = $package->strFlag = $package->strCurrencySymbol = $package->strAuctionName = $package->dteAuction = $package->strPackageName = $package->strPackageSafeName = $package->curMinBidAmnt = $package->curReserveAmnt = $package->curMinBidInc = $package->curBuyItNowAmnt = $package->curWinBidAmnt = $package->curActualGiftAmnt = $package->strDescription = $package->strInternalNotes = $package->lBidWinnerID = $package->dteContacted = $package->mdteContacted = $package->lGiftID = $package->lOriginID = $package->lLastUpdateID = $package->strCFName = $package->strCLName = $package->strLFName = $package->strLLName = $package->dteOrigin = $package->dteLastUpdate = null;
     } else {
         $idx = 0;
         foreach ($query->result() as $row) {
             $this->packages[$idx] = new stdClass();
             $package =& $this->packages[$idx];
             $package->lKeyID = $row->ap_lKeyID;
             $package->lAuctionID = $row->ap_lAuctionID;
             $package->strAuctionName = $row->auc_strAuctionName;
             $package->dteAuction = dteMySQLDate2Unix($row->auc_dteAuctionDate);
             $package->lACOID = $row->auc_lACOID;
             $package->strFlag = $row->aco_strFlag;
             $package->strCurrencySymbol = $row->aco_strCurrencySymbol;
             $package->strPackageName = $row->ap_strPackageName;
             $package->strPackageSafeName = htmlspecialchars($row->ap_strPackageName);
             $package->curMinBidAmnt = $row->ap_curMinBidAmnt;
             $package->curBuyItNowAmnt = $row->ap_curBuyItNowAmnt;
             $package->curReserveAmnt = $row->ap_curReserveAmnt;
             $package->curMinBidInc = $row->ap_curMinBidInc;
             $package->curWinBidAmnt = $row->ap_curWinBidAmnt;
             $package->curActualGiftAmnt = $row->gi_curAmnt;
             $package->strDescription = $row->ap_strDescription;
             $package->strInternalNotes = $row->ap_strInternalNotes;
             $package->lBidSheetID = $row->ap_lBidSheetID;
             if (is_null($package->lBidSheetID)) {
                 $package->lBidSheetID = $row->auc_lDefaultBidSheet;
             }
             $package->lTemplateID = $lTemplateID = $row->abs_lTemplateID;
             if (is_null($lTemplateID)) {
                 $package->tInfo = null;
             } else {
                 strXlateTemplate($lTemplateID, $package->tInfo);
             }
             $package->strSheetName = $row->abs_strSheetName;
             $package->lBidWinnerID = $row->ap_lBidWinnerID;
             $package->bw_bBiz = $row->bw_bBiz;
             $package->bw_strFName = $row->bw_strFName;
             $package->bw_strLName = $row->bw_strLName;
             if (is_null($package->lBidWinnerID)) {
                 $package->bw_strSafeName = 'not set';
             } else {
                 if ($package->bw_bBiz) {
                     $package->bw_strSafeName = htmlspecialchars($package->bw_strLName) . ' (business)';
                 } else {
                     $package->bw_strSafeName = htmlspecialchars($package->bw_strFName . ' ' . $package->bw_strLName);
                 }
             }
             $package->dteContacted = dteMySQLDate2Unix($row->ap_dteWinnerContact);
             $package->mdteContacted = $row->ap_dteWinnerContact;
             $package->lGiftID = $row->ap_lGiftID;
             $package->lOriginID = $row->ap_lOriginID;
             $package->lLastUpdateID = $row->ap_lLastUpdateID;
             $package->strCFName = $row->strCFName;
             $package->strCLName = $row->strCLName;
             $package->strLFName = $row->strLFName;
             $package->strLLName = $row->strLLName;
             $package->dteOrigin = $row->dteOrigin;
             $package->dteLastUpdate = $row->dteLastUpdate;
             ++$idx;
         }
     }
 }
开发者ID:simple-gifts,项目名称:Delightful-Labor,代码行数:74,代码来源:mpackages.php

示例3: strUnJobCodesDetailsViaMonth

 function strUnJobCodesDetailsViaMonth($strMoYr, $sRpt, $bAllJobCodes)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $genumDateFormat;
     $strOut = '<br><br>
         <table class="enpRptC" style="width: 600pt;">
             <tr>
                <td colspan="4" class="enpRptTitle">
                   Job Code Details for Unschedule Volunteers: ' . $strMoYr . '
                </td>
             </tr>
             <tr>
                <td class="enpRptLabel">
                   Date
                </td>
                <td class="enpRptLabel">
                   Volunteer
                </td>
                <td class="enpRptLabel">
                   Job Code
                </td>
                <td class="enpRptLabel">
                   Hours
                </td>
             </tr>
             ';
     if ($bAllJobCodes) {
         $strWhereJC = '';
     } else {
         $strWhereJC = ' AND vsa_lJobCode=' . $sRpt->lJobCodeID . ' ';
     }
     $sqlStr = 'SELECT vsa_lJobCode, vsa_dHoursWorked, vsa_lVolID,
         jc.lgen_strListItem AS strJobCode, vsa_dteActivityDate,
         pe_strFName, pe_strLName
      FROM vol_events_dates_shifts_assign
         INNER JOIN volunteers                     ON vol_lKeyID            = vsa_lVolID
         INNER JOIN people_names                   ON vol_lPeopleID         = pe_lKeyID
         LEFT  JOIN lists_generic   AS jc          ON vsa_lJobCode          = jc.lgen_lKeyID
      WHERE NOT vsa_bRetired
         AND YEAR (vsa_dteActivityDate)=' . $sRpt->lYear . '
         AND MONTH(vsa_dteActivityDate)=' . $sRpt->lMonth . '
         AND vsa_dHoursWorked > 0
         ' . $strWhereJC . '
      ORDER BY strJobCode, vsa_dteActivityDate, pe_strLName, pe_strFName, pe_lKeyID;';
     $query = $this->db->query($sqlStr);
     $numRows = $query->num_rows();
     $idx = 0;
     $sngTotHrs = 0.0;
     if ($numRows > 0) {
         foreach ($query->result() as $row) {
             $dteActivity = dteMySQLDate2Unix($row->vsa_dteActivityDate);
             $strJobCode = $row->strJobCode . '' == '' ? '(not set)' : htmlspecialchars($row->strJobCode);
             $strOut .= '
             <tr class="makeStripe">
                <td class="enpRpt" style="width: 130pt;">' . date($genumDateFormat, $dteActivity) . '
                </td>
                <td class="enpRpt" style="width: 130pt;">' . strLinkView_Volunteer($row->vsa_lVolID, 'Volunteer Record', true) . '&nbsp;' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '
                </td>
                <td class="enpRpt" style="width: 100pt;">' . $strJobCode . '
                </td>
                <td class="enpRpt" style="width: 35pt; padding-right: 10px; text-align: right;">' . number_format($row->vsa_dHoursWorked, 2) . '
                </td>
             </tr>';
             $sngTotHrs += $row->vsa_dHoursWorked;
         }
     }
     $strOut .= '
       <tr>
          <td class="enpRpt" colspan="3"><b>
             Total:</b>
          </td>
          <td class="enpRpt" style="width: 35pt; padding-right: 10px; text-align: right;"><b>' . number_format($sngTotHrs, 2) . '</b>
          </td>
       </tr>';
     $strOut .= '</table>' . "\n";
     return $strOut;
 }
开发者ID:simple-gifts,项目名称:Delightful-Labor,代码行数:79,代码来源:mvol_job_codes.php

示例4: strDDLAuctions

 function strDDLAuctions($strName, $lMatchID, $bAddBlank)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $genumDateFormat;
     $strOut = '<select name="' . $strName . '">' . "\n";
     if ($bAddBlank) {
         $strOut .= '<option value="-1">&nbsp;</option>' . "\n";
     }
     $sqlStr = "SELECT\n            auc_lKeyID, auc_strAuctionName, auc_dteAuctionDate\n         FROM gifts_auctions\n         WHERE NOT auc_bRetired\n         ORDER BY auc_strAuctionName, auc_lKeyID;";
     $query = $this->db->query($sqlStr);
     $lNumAuctions = $query->num_rows();
     if ($lNumAuctions > 0) {
         foreach ($query->result() as $row) {
             $lKeyID = $row->auc_lKeyID;
             $strOut .= '<option value="' . $lKeyID . '" ' . ($lKeyID == $lMatchID ? 'SELECTED' : '') . '>' . htmlspecialchars($row->auc_strAuctionName) . '&nbsp;(' . date($genumDateFormat, dteMySQLDate2Unix($row->auc_dteAuctionDate)) . ')' . '</option>' . "\n";
         }
     }
     $strOut .= '</select>' . "\n";
     return $strOut;
 }
开发者ID:simple-gifts,项目名称:Delightful-Labor,代码行数:22,代码来源:mauctions.php

示例5: loadImgDocInfoViaContext

 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;
     }
//.........这里部分代码省略.........
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:101,代码来源:mimage_doc.php

示例6: clientsEnrolledViaProgID

 function clientsEnrolledViaProgID($lProgID, $cprog, $bCurrentlyEnrolledOnly, &$lNumClients, &$clients, $bEncludeEnrollment = false)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $strETable = $cprog->strEnrollmentTable;
     $strEFNPrefix = $cprog->strETableFNPrefix;
     $strERecStartFN = $strEFNPrefix . '_dteStart';
     $strERecEndFN = $strEFNPrefix . '_dteEnd';
     $strActiveFN = $strEFNPrefix . '_bCurrentlyEnrolled';
     if ($bCurrentlyEnrolledOnly) {
         $sqlWhere = " AND {$strActiveFN} ";
     } else {
         $sqlWhere = '';
     }
     $strOrder = 'cr_strLName, cr_strFName, ' . $strEFNPrefix . '_lForeignKey,' . $strEFNPrefix . '_lKeyID ';
     $sqlStr = 'SELECT DISTINCT
          cr_lKeyID,
          cr_strFName, cr_strLName, cr_dteEnrollment,
          cr_dteBirth
      FROM client_records
         INNER JOIN ' . $strETable . ' ON ' . $strEFNPrefix . '_lForeignKey = cr_lKeyID
      WHERE NOT cr_bRetired AND NOT ' . $strEFNPrefix . "_bRetired \n" . $sqlWhere . ' ' . $this->sqlWhereLoadClients . '
      ORDER BY ' . $strOrder . ';';
     $query = $this->db->query($sqlStr);
     $lNumClients = $query->num_rows();
     $clients = array();
     if ($lNumClients > 0) {
         if ($bCurrentlyEnrolledOnly) {
             $strWhereEBase = " AND {$strActiveFN} ";
         } else {
             $strWhereEBase = '';
         }
         $idx = 0;
         foreach ($query->result() as $row) {
             $clients[$idx] = new stdClass();
             $client =& $clients[$idx];
             $client->lClientID = $lClientID = (int) $row->cr_lKeyID;
             $client->strClientFName = $row->cr_strFName;
             $client->strClientLName = $row->cr_strLName;
             $client->dteClientEnrolled = dteMySQLDate2Unix($row->cr_dteEnrollment);
             // not cprogram enrollment date!
             $client->mysqlDteBirth = $row->cr_dteBirth;
             if ($bEncludeEnrollment) {
                 $sqlEWhere = $strWhereEBase . " AND ETable.{$strEFNPrefix}" . "_lForeignKey = {$lClientID} ";
                 $this->loadBaseEFieldRecs($cprog, $client->lNumERecs, $client->erecs, $sqlEWhere);
             }
             ++$idx;
         }
     }
 }
开发者ID:simple-gifts,项目名称:Delightful-Labor,代码行数:51,代码来源:mcprograms.php

示例7: loadPaymentRecords

 public function loadPaymentRecords()
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $clsACO = new madmin_aco();
     $this->paymentRec = array();
     $sqlStr = "SELECT\n               gi_lKeyID,\n\n               gi_lForeignID, gi_lSponsorID, gi_curAmnt, gi_lACOID,\n               gi_dteDonation,\n               gi_strCheckNum, gi_strImportID,\n               gi_lPaymentType, listPayType.lgen_strListItem AS strPaymentType,\n               gi_bRetired,\n\n               gi_lOriginID, gi_lLastUpdateID,\n               UNIX_TIMESTAMP(gi_dteOrigin)     AS dteOrigin,\n               UNIX_TIMESTAMP(gi_dteLastUpdate) AS dteLastUpdate,\n\n               aco_strFlag, aco_strName, aco_strCurrencySymbol,\n\n               sp_lForeignID, sp_bInactive, sp_lClientID,\n               pSpon.pe_bBiz AS bSponBiz,  pSpon.pe_strFName AS strSponFName,  pSpon.pe_strLName AS strSponLName,\n               pDon.pe_bBiz  AS bDonorBiz, pDon.pe_strFName  AS strDonorFName, pDon.pe_strLName  AS strDonorLName,\n               cr_strFName, cr_strLName,\n               cr_lLocationID, cl_strLocation,\n\n               usersC.us_strFirstName AS strCFName, usersC.us_strLastName AS strCLName,\n               usersL.us_strFirstName AS strLFName, usersL.us_strLastName AS strLLName\n\n            FROM gifts\n               INNER JOIN admin_aco               ON gi_lACOID         = aco_lKeyID\n               INNER JOIN sponsor                 ON sp_lKeyID         = gi_lSponsorID\n               INNER JOIN people_names AS pSpon   ON sp_lForeignID     = pSpon.pe_lKeyID\n               INNER JOIN people_names AS pDon    ON gi_lForeignID     = pDon.pe_lKeyID\n\n               INNER JOIN admin_users AS usersC   ON gi_lOriginID      = usersC.us_lKeyID\n               INNER JOIN admin_users AS usersL   ON gi_lLastUpdateID  = usersL.us_lKeyID\n\n               LEFT  JOIN lists_generic AS listPayType ON gi_lPaymentType  = listPayType.lgen_lKeyID\n               LEFT  JOIN client_records               ON sp_lClientID     = cr_lKeyID\n               LEFT  JOIN client_location              ON cr_lLocationID   = cl_lKeyID\n            WHERE NOT gi_bRetired {$this->strPayWhere}\n            {$this->strPayOrderExtra}\n            {$this->strLimit};";
     $query = $this->db->query($sqlStr);
     $this->lNumPayRecs = $numRows = $query->num_rows();
     if ($numRows == 0) {
         $this->paymentRec[0] = new stdClass();
         $payRec =& $this->paymentRec[0];
         $payRec->lKeyID = $payRec->curPaymentAmnt = $payRec->dtePayment = $payRec->strCheckNum = $payRec->lPaymentType = $payRec->strPaymentType = $payRec->strImportID = $payRec->bRetired = $payRec->lACOID = $payRec->strACO = $payRec->strCurSymbol = $payRec->strFlag = $payRec->strFlagImage = null;
         //--------------------------
         // Sponsor/client fields
         //--------------------------
         $payRec->lSponsorshipID = $payRec->lSponPeopleID = $payRec->bInactive = $payRec->lClientID = $payRec->bSponBiz = $payRec->strSponFName = $payRec->strSponLName = $payRec->strSponSafeNameFL = $payRec->strClientFName = $payRec->strClientLName = $payRec->strClientSafeNameFL = $payRec->lLocationID = $payRec->strLocation = null;
         //--------------------------
         // Donor fields
         //--------------------------
         $payRec->lDonorID = $payRec->bDonorBiz = $payRec->strDonorFName = $payRec->strDonorLName = $payRec->strDonorSafeNameFL = $payRec->lOriginID = $payRec->lLastUpdateID = $payRec->dteOrigin = $payRec->dteLastUpdate = $payRec->strStaffCFName = $payRec->strStaffCLName = $payRec->strStaffLFName = $payRec->strStaffLLName = null;
     } else {
         $idx = 0;
         foreach ($query->result() as $row) {
             $this->paymentRec[$idx] = new stdClass();
             $payRec =& $this->paymentRec[$idx];
             $payRec->lKeyID = (int) $row->gi_lKeyID;
             $payRec->curPaymentAmnt = (double) $row->gi_curAmnt;
             $payRec->dtePayment = dteMySQLDate2Unix($row->gi_dteDonation);
             $payRec->strCheckNum = $row->gi_strCheckNum;
             $payRec->lPaymentType = $row->gi_lPaymentType;
             $payRec->strPaymentType = $row->strPaymentType;
             $payRec->strImportID = $row->gi_strImportID;
             $payRec->bRetired = $row->gi_bRetired;
             //---------------
             // ACO fields
             //---------------
             $payRec->lACOID = (int) $row->gi_lACOID;
             $payRec->strACO = $row->aco_strName;
             $payRec->strCurSymbol = $row->aco_strCurrencySymbol;
             $payRec->strFlag = $row->aco_strFlag;
             $payRec->strFlagImage = $clsACO->strFlagImage($row->aco_strFlag, $row->aco_strName);
             //--------------------------
             // Sponsor/client fields
             //--------------------------
             $payRec->lSponsorshipID = $row->gi_lSponsorID;
             $payRec->lSponPeopleID = $row->sp_lForeignID;
             $payRec->bInactive = $row->sp_bInactive;
             $payRec->lClientID = $row->sp_lClientID;
             $payRec->bSponBiz = $row->bSponBiz;
             $payRec->strSponFName = $row->strSponFName;
             $payRec->strSponLName = $row->strSponLName;
             if ($payRec->bSponBiz) {
                 $payRec->strSponSafeNameFL = $payRec->strSponSafeNameLF = htmlspecialchars($row->strSponLName);
             } else {
                 $payRec->strSponSafeNameFL = htmlspecialchars($row->strSponFName . ' ' . $row->strSponLName);
                 $payRec->strSponSafeNameLF = htmlspecialchars($row->strSponLName . ', ' . $row->strSponFName);
             }
             $payRec->strClientFName = $row->cr_strFName;
             $payRec->strClientLName = $row->cr_strLName;
             $payRec->strClientSafeNameFL = htmlspecialchars($row->cr_strFName . ' ' . $row->cr_strLName);
             $payRec->lLocationID = $row->cr_lLocationID;
             $payRec->strLocation = $row->cl_strLocation;
             //--------------------------
             // Donor fields
             //--------------------------
             $payRec->lDonorID = $row->gi_lForeignID;
             $payRec->bDonorBiz = $row->bDonorBiz;
             $payRec->strDonorFName = $row->strDonorFName;
             $payRec->strDonorLName = $row->strDonorLName;
             if ($payRec->bSponBiz) {
                 $payRec->strDonorSafeNameFL = $payRec->strDonorSafeNameLF = htmlspecialchars($row->strSponLName);
             } else {
                 $payRec->strDonorSafeNameFL = htmlspecialchars($row->strDonorFName . ' ' . $row->strDonorLName);
                 $payRec->strDonorSafeNameLF = htmlspecialchars($row->strDonorLName . ', ' . $row->strDonorFName);
             }
             //--------------------------
             // Record info
             //--------------------------
             $payRec->lOriginID = $row->gi_lOriginID;
             $payRec->lLastUpdateID = $row->gi_lLastUpdateID;
             $payRec->dteOrigin = $row->dteOrigin;
             $payRec->dteLastUpdate = $row->dteLastUpdate;
             $payRec->strStaffCFName = $row->strCFName;
             $payRec->strStaffCLName = $row->strCLName;
             $payRec->strStaffLFName = $row->strLFName;
             $payRec->strStaffLLName = $row->strLLName;
             ++$idx;
         }
     }
 }
开发者ID:simple-gifts,项目名称:Delightful-Labor,代码行数:92,代码来源:msponsor_charge_pay.php

示例8: strVolScheduleRptHTML

 private function strVolScheduleRptHTML(&$query, $strLabel, $strSafeNameFL, $lVolID)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $genumDateFormat;
     $strOut = '<table class="enpRptC">
         <tr>
            <td class="enpRptTitle" colspan="7">' . $strLabel . ' Volunteer Schedule for ' . $strSafeNameFL . '&nbsp;' . strLinkView_Volunteer($lVolID, 'View volunteer record', true) . '
            </td>
         <tr>';
     $strOut .= '
         <tr>
            <td class="enpRptLabel" style="vertical-align: bottom;">
               Date
            </td>
            <td class="enpRptLabel" style="vertical-align: bottom;">
               Event
            </td>
            <td class="enpRptLabel" style="vertical-align: bottom;">
               Shift
            </td>
            <td class="enpRptLabel" style="vertical-align: bottom;">
               Start
            </td>
            <td class="enpRptLabel" style="vertical-align: bottom;">
               Duration
            </td>
            <td class="enpRptLabel" style="vertical-align: bottom;">
               Hours Logged
            </td>
         <tr>';
     foreach ($query->result() as $row) {
         $lEventID = $row->ved_lVolEventID;
         $lEdateID = $row->vs_lEventDateID;
         $strOut .= '
          <tr class="makeStripe">
             <td class="enpRpt" style="text-align: center; width: 80pt;">' . date($genumDateFormat, dteMySQLDate2Unix($row->ved_dteEvent)) . '
             </td>
             <td class="enpRpt" style="text-align: left; width: 200pt;">' . strLinkView_VolEvent($lEventID, 'View Event', true) . htmlspecialchars($row->vem_strEventName) . '
             </td>
             <td class="enpRpt" style="text-align: left; width: 120pt;">' . strLinkView_VolEventDate($lEdateID, 'View shifts for this date', true) . htmlspecialchars($row->vs_strShiftName) . '
             </td>
             <td class="enpRpt" style="text-align: left; width: 50pt;">' . $row->dteStartTime . '
             </td>
             <td class="enpRpt" style="text-align: left; width: 100pt;">' . $row->strDuration . '
             </td>
             <td class="enpRpt" style="text-align: right; padding-right: 10px;; width: 30pt;">' . number_format($row->vsa_dHoursWorked, 2) . '
             </td>
          </tr>';
     }
     $strOut .= '</table>';
     return $strOut;
 }
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:54,代码来源:mvol_event_dates_shifts.php

示例9: clientStatusSearch

 private function clientStatusSearch(&$results)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $genumDateFormat;
     $results->strLabel = 'Client Status';
     $results->lNumResults = 0;
     $sqlStr = 'SELECT csh_lKeyID, csh_lClientID, csh_lStatusID,
            csh_dteStatusDate,
            csh_strStatusTxt,
            cr_strFName, cr_strLName, cr_lLocationID, cl_strLocation
         FROM client_status
            INNER JOIN client_records  ON cr_lKeyID      = csh_lClientID
            INNER JOIN client_location ON cr_lLocationID = cl_lKeyID
         WHERE NOT csh_bRetired AND ' . $this->textSearchWhere('csh_strStatusTxt') . '
         ORDER BY csh_dteStatusDate, csh_lKeyID;';
     $query = $this->db->query($sqlStr);
     $results->lNumResults = $lNumRows = $query->num_rows();
     if ($lNumRows > 0) {
         $idx = 0;
         $results->matches = array();
         foreach ($query->result() as $row) {
             $results->matches[$idx] = new stdClass();
             $lClientID = $row->csh_lClientID;
             $match =& $results->matches[$idx];
             $match->links = 'Client ID ' . str_pad($lClientID, 5, '0', STR_PAD_LEFT) . strLinkView_ClientRecord($lClientID, 'View client record', true) . '&nbsp;&nbsp;' . 'Client Status ID: ' . str_pad($row->csh_lKeyID, 5, '0', STR_PAD_LEFT) . strLinkView_ClientStatusHistory($lClientID, 'View client status', true);
             $match->searchInfo = 'Client status record for ' . htmlspecialchars($row->cr_strFName . ' ' . $row->cr_strLName) . '
                         (' . htmlspecialchars($row->cl_strLocation) . ') of ' . date($genumDateFormat, dteMySQLDate2Unix($row->csh_dteStatusDate));
             $match->text = $row->csh_strStatusTxt;
             $match->textHighlighted = $this->highlightMatchedText($row->csh_strStatusTxt);
             ++$idx;
         }
     }
 }
开发者ID:simple-gifts,项目名称:Delightful-Labor,代码行数:35,代码来源:msearch_log.php

示例10: strVolHoursDetailReport

 function strVolHoursDetailReport(&$sRpt, $lStartRec, $lRecsPerPage)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $genumDateFormat;
     $this->hrsSumOpts($sRpt, $bUseYear, $lYear, $bUseMon, $lMon, $bUseVolID, $lVolID);
     $strLimit = " LIMIT {$lStartRec}, {$lRecsPerPage} ";
     $strTab = 'tmp_vol_hrs';
     $this->buildPopHrsTmp($strTab, $lYear, $lMon, $lVolID);
     $strWhere = '1';
     $strTitle = 'Volunteer Details for ';
     $strFail = 'There are no volunteer hours for ';
     if ($bUseVolID) {
         $cVol = new mvol();
         $cVol->loadVolRecsViaVolID($lVolID, true);
         $vRec =& $cVol->volRecs[0];
         $strSafeName = $vRec->strSafeName;
         $strTitle .= $strSafeName . '&nbsp; &nbsp;';
         $strFail .= $strSafeName . '&nbsp; &nbsp;';
     }
     if ($bUseMon) {
         $strMonth = strXlateMonth($lMon);
         $strTitle .= $strMonth . ' ' . $lYear;
         $strFail .= $strMonth . ' ' . $lYear;
     } else {
         $strTitle .= $lYear;
         $strFail .= $lYear;
     }
     $sqlStr = "SELECT\n             vsa_lKeyID, tmphr_dteVolActivity,\n             tmphr_lVolID, vsa_dHoursWorked, vsa_lEventDateShiftID,\n             lgen_strListItem,\n             vs_strShiftName, vs_lEventDateID, vem_lKeyID, vem_strEventName,\n             pe_strFName, pe_strLName\n\n          FROM {$strTab}\n             INNER JOIN vol_events_dates_shifts_assign ON vsa_lKeyID            = tmphr_lEventAssignID\n             INNER JOIN volunteers                     ON tmphr_lVolID          = vol_lKeyID\n             INNER JOIN people_names                   ON vol_lPeopleID         = pe_lKeyID\n             LEFT  JOIN vol_events_dates_shifts        ON vsa_lEventDateShiftID = vs_lKeyID\n             LEFT  JOIN vol_events_dates               ON vs_lEventDateID       = ved_lKeyID\n             LEFT  JOIN vol_events                     ON ved_lVolEventID       = vem_lKeyID\n             LEFT  JOIN lists_generic                  ON vsa_lActivityID=lgen_lKeyID\n\n          ORDER BY tmphr_dteVolActivity, vsa_lKeyID\n          {$strLimit};";
     $query = $this->db->query($sqlStr);
     $lNumRows = $query->num_rows();
     if ($lNumRows == 0) {
         return '<br><i>' . $strFail . '.</i><br>';
     }
     $strOut = '
      <table class="enpRptC">
         <tr>
            <td colspan="7" class="enpRptTitle">' . $strTitle . '
            </td>
         </tr>';
     $strOut .= '
         <tr>
            <td class="enpRptLabel">
               Date
            </td>
            <td class="enpRptLabel">
               Vol ID
            </td>
            <td class="enpRptLabel">
               Volunteer
            </td>
            <td class="enpRptLabel">
               Event
            </td>
            <td class="enpRptLabel">
               Shift/Activity
            </td>
            <td class="enpRptLabel">
               Hours
            </td>
         </tr>';
     foreach ($query->result() as $row) {
         $lVolID = $row->tmphr_lVolID;
         if (is_null($row->vsa_lEventDateShiftID)) {
             $strEvent = '<i>(unscheduled)</i>';
             $strActivity = strLinkEdit_VolUnschedHrs($lVolID, $row->vsa_lKeyID, 'Edit activity', true, '', 12) . '&nbsp;' . htmlspecialchars($row->lgen_strListItem);
         } else {
             $strEvent = strLinkView_VolEvent($row->vem_lKeyID, 'View event', true) . '&nbsp;' . htmlspecialchars($row->vem_strEventName);
             $strActivity = strLinkView_VolEventDate($row->vs_lEventDateID, 'View event date/shifts', true) . '&nbsp;' . htmlspecialchars($row->vs_strShiftName);
         }
         $strOut .= '
         <tr class="makeStripe">
            <td class="enpRpt">' . date($genumDateFormat, dteMySQLDate2Unix($row->tmphr_dteVolActivity)) . '
            </td>
            <td class="enpRpt">' . str_pad($lVolID, 5, '0', STR_PAD_LEFT) . '&nbsp;' . strLinkView_Volunteer($lVolID, 'View volunteer record', true) . '
            </td>
            <td class="enpRpt">' . htmlspecialchars($row->pe_strLName . ', ' . $row->pe_strFName) . '
            </td>
            <td class="enpRpt">' . $strEvent . '
            </td>
            <td class="enpRpt">' . $strActivity . '
            </td>
            <td class="enpRpt" style="text-align: right; padding-right: 3px;">' . number_format($row->vsa_dHoursWorked, 2) . '
            </td>
         </tr>';
     }
     $strOut .= '</table><br>';
     return $strOut;
 }
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:90,代码来源:mvol_event_hours.php

示例11: loadGroupMembership

 public function loadGroupMembership($enumGroupType, $lGID)
 {
     //-----------------------------------------------------------------------
     //
     //-----------------------------------------------------------------------
     $this->groupMembers = array();
     $this->lCntMembersInGroup = 0;
     $this->groupMemLabels = new stdClass();
     if (is_array($lGID)) {
         $strGroupWhere = ' gc_lGroupID IN (' . implode(',', $lGID) . ') ';
     } else {
         $strGroupWhere = " gc_lGroupID={$lGID} ";
     }
     switch ($enumGroupType) {
         case CENUM_CONTEXT_BIZ:
             $this->groupMemLabels->strName = 'Business/Organization';
             $this->groupMemLabels->strAddress = 'Address';
             $this->groupMemLabels->strKey = 'Business ID';
             $sqlStr = "SELECT\n                  gc_lForeignID AS lKeyID, gc_dteAdded,\n                  pe_strLName AS strName,\n                  CONCAT(pe_strAddr1, '\\n',\n                         pe_strAddr2, '\\n',\n                         pe_strCity,  '\\n',\n                         pe_strState,' ', pe_strZip, ' ', pe_strCountry) AS strAddress\n               FROM groups_child\n                  INNER JOIN people_names ON pe_lKeyID=gc_lForeignID\n               WHERE {$strGroupWhere}\n                  AND NOT pe_bRetired\n               ORDER BY pe_strLName, gc_lForeignID;";
             break;
         case CENUM_CONTEXT_PEOPLE:
             $this->groupMemLabels->strName = 'Name';
             $this->groupMemLabels->strAddress = 'Address';
             $this->groupMemLabels->strKey = 'People ID';
             $sqlStr = "SELECT\n                  gc_lForeignID AS lKeyID, gc_dteAdded,\n                  CONCAT(pe_strLName, ', ', pe_strFName) AS strName,\n                  CONCAT(pe_strAddr1, '\\n',\n                         pe_strAddr2, '\\n',\n                         pe_strCity,  '\\n',\n                         pe_strState,' ', pe_strZip, ' ', pe_strCountry) AS strAddress\n               FROM groups_child\n                  INNER JOIN people_names ON pe_lKeyID=gc_lForeignID\n               WHERE {$strGroupWhere}\n                  AND NOT pe_bRetired\n               ORDER BY pe_strLName, pe_strFName, gc_lForeignID;";
             break;
         case CENUM_CONTEXT_CLIENT:
             $this->groupMemLabels->strName = 'Client';
             $this->groupMemLabels->strAddress = 'Location';
             $this->groupMemLabels->strKey = 'client ID';
             $sqlStr = "SELECT\n                  gc_lForeignID AS lKeyID, gc_dteAdded,\n                  CONCAT(cr_strLName, ', ', cr_strFName) AS strName,\n                  cl_strLocation AS strAddress\n               FROM groups_child\n                  INNER JOIN client_records  ON cr_lKeyID      = gc_lForeignID\n                  INNER JOIN client_location ON cr_lLocationID = cl_lKeyID\n               WHERE {$strGroupWhere}\n                  AND NOT cr_bRetired\n               ORDER BY cr_strLName, cr_strFName, gc_lForeignID;";
             break;
         case CENUM_CONTEXT_SPONSORSHIP:
             $this->groupMemLabels->strName = 'Sponsor';
             $this->groupMemLabels->strAddress = 'Address';
             $this->groupMemLabels->strKey = 'sponsor ID';
             $sqlStr = "SELECT\n                  gc_lForeignID AS lKeyID, gc_dteAdded,\n                  CONCAT(pe_strLName, ', ', pe_strFName) AS strName,\n                  CONCAT(pe_strAddr1, '\\n',\n                         pe_strAddr2, '\\n',\n                         pe_strCity,  '\\n',\n                         pe_strState,' ', pe_strZip, ' ', pe_strCountry) AS strAddress\n               FROM groups_child\n                  INNER JOIN sponsor      ON sp_lKeyID     = gc_lForeignID\n                  INNER JOIN people_names ON sp_lForeignID = pe_lKeyID\n               WHERE {$strGroupWhere}\n                  AND NOT pe_bRetired\n                  AND NOT sp_bRetired\n               ORDER BY pe_strLName, pe_strFName, gc_lForeignID;";
             break;
         case CENUM_CONTEXT_STAFF_TS_LOCATIONS:
         case CENUM_CONTEXT_STAFF_TS_PROJECTS:
             $this->groupMemLabels->strName = 'Time Sheet Templates';
             $this->groupMemLabels->strAddress = 'N/A';
             $this->groupMemLabels->strKey = 'template ID';
             $sqlStr = "SELECT\n                  gc_lForeignID AS lKeyID, gc_dteAdded,\n                  ts_strTSName AS strName,\n                  'n/a' AS strAddress\n               FROM groups_child\n                  INNER JOIN staff_timesheets  ON ts_lKeyID = gc_lForeignID\n               WHERE {$strGroupWhere}\n                  AND NOT ts_bRetired\n               ORDER BY ts_strTSName, gc_lForeignID;";
             break;
         case CENUM_CONTEXT_STAFF:
         case CENUM_CONTEXT_USER:
             $this->groupMemLabels->strName = 'User';
             $this->groupMemLabels->strAddress = 'Address';
             $this->groupMemLabels->strKey = 'user ID';
             $sqlStr = "SELECT\n                  gc_lForeignID AS lKeyID, gc_dteAdded,\n                  CONCAT(us_strLastName, ', ', us_strFirstName) AS strName,\n                  CONCAT(us_strAddr1, '\\n',\n                         us_strAddr2, '\\n',\n                         us_strCity,  '\\n',\n                         us_strState,' ', us_strZip, ' ', us_strCountry) AS strAddress\n               FROM groups_child\n                  INNER JOIN admin_users      ON us_lKeyID     = gc_lForeignID\n                  -- INNER JOIN people_names ON sp_lForeignID = pe_lKeyID\n               WHERE {$strGroupWhere}\n                  AND NOT us_bInactive\n               ORDER BY us_strLastName, us_strFirstName, gc_lForeignID;";
             break;
         case CENUM_CONTEXT_VOLUNTEER:
             $this->groupMemLabels->strName = 'Name';
             $this->groupMemLabels->strAddress = 'Address';
             $this->groupMemLabels->strKey = 'vol ID';
             $sqlStr = "SELECT\n                  gc_lForeignID AS lKeyID, gc_dteAdded,\n                  CONCAT(pe_strLName, ', ', pe_strFName) AS strName,\n                  CONCAT(pe_strAddr1, '\\n',\n                         pe_strAddr2, '\\n',\n                         pe_strCity,  '\\n',\n                         pe_strState,' ', pe_strZip, ' ', pe_strCountry) AS strAddress\n               FROM groups_child\n                  INNER JOIN volunteers   ON vol_lKeyID=gc_lForeignID\n                  INNER JOIN people_names ON pe_lKeyID=vol_lPeopleID\n               WHERE {$strGroupWhere}\n                  AND NOT pe_bRetired\n               ORDER BY pe_strLName, pe_strFName, gc_lForeignID;";
             break;
         default:
             screamForHelp($enumGroupType . ': group type not yet available<br>error on <b>line:</b> ' . __LINE__ . '<br><b>file: </b>' . __FILE__ . '<br><b>function: </b>' . __FUNCTION__);
             break;
     }
     $query = $this->db->query($sqlStr);
     $this->lCntMembersInGroup = $numRows = $query->num_rows();
     if ($numRows > 0) {
         $idx = 0;
         foreach ($query->result() as $row) {
             $this->groupMembers[$idx] = new stdClass();
             $this->groupMembers[$idx]->lKeyID = $lKeyID = (int) $row->lKeyID;
             $this->groupMembers[$idx]->dteAdded = dteMySQLDate2Unix($row->gc_dteAdded);
             $this->groupMembers[$idx]->strAddress = str_replace("\n\n", "\n", $row->strAddress);
             $this->groupMembers[$idx]->strName = $strName = trim($row->strName);
             $lNameLenM1 = strlen($strName) - 1;
             if (substr($strName, $lNameLenM1, 1) == ',') {
                 // business sponsorships; remove comma from name
                 $this->groupMembers[$idx]->strName = substr($strName, 0, $lNameLenM1);
             }
             switch ($enumGroupType) {
                 case CENUM_CONTEXT_BIZ:
                     $this->groupMembers[$idx]->strLinkView = strLinkView_BizRecord($lKeyID, 'View business record', true, '');
                     break;
                 case CENUM_CONTEXT_CLIENT:
                     $this->groupMembers[$idx]->strLinkView = strLinkView_ClientRecord($lKeyID, 'View client record', true, '');
                     break;
                 case CENUM_CONTEXT_PEOPLE:
                     $this->groupMembers[$idx]->strLinkView = strLinkView_PeopleRecord($lKeyID, 'View people record', true, '');
                     break;
                 case CENUM_CONTEXT_SPONSORSHIP:
                     $this->groupMembers[$idx]->strLinkView = strLinkView_Sponsorship($lKeyID, 'View sponsorship record', true, '');
                     break;
                 case CENUM_CONTEXT_STAFF_TS_LOCATIONS:
                 case CENUM_CONTEXT_STAFF_TS_PROJECTS:
                     $this->groupMembers[$idx]->strLinkView = strLinkView_TimeSheetTemplateRecord($lKeyID, 'View timesheet template', true);
                     break;
                 case CENUM_CONTEXT_VOLUNTEER:
                     $this->groupMembers[$idx]->strLinkView = strLinkView_Volunteer($lKeyID, 'View volunteer record', true, '');
                     break;
                 case CENUM_CONTEXT_STAFF:
                 case CENUM_CONTEXT_USER:
                     $this->groupMembers[$idx]->strLinkView = strLinkView_User($lKeyID, 'View user record', true, '');
//.........这里部分代码省略.........
开发者ID:simple-gifts,项目名称:Delightful-Labor,代码行数:101,代码来源:mgroups.php

示例12: foreach

               Notes
            </td>
         </tr>');
$sngHoursTot = 0.0;
foreach ($nonPVInfo as $nonPVRec) {
    $lVolID = $nonPVRec->lVolID;
    $dHours = $nonPVRec->dHoursWorked;
    if ($dHours == 0) {
        $strHours = '-';
        $strAlign = 'center';
    } else {
        $strHours = number_format($dHours, 2);
        $sngHoursTot += $dHours;
        $strAlign = 'right';
    }
    $dteActivity = dteMySQLDate2Unix($nonPVRec->dteActivity);
    $lActivityID = $nonPVRec->nonPVRecID;
    $strJobCode = $nonPVRec->strJobCode . '';
    if ($strJobCode == '') {
        $strJobCode = '<i>(not set)</i>';
    } else {
        $strJobCode = htmlspecialchars($strJobCode);
    }
    echo '
         <tr class="makeStripe">
            <td class="enpRpt" style="width: 65px; text-align: center;">' . strLinkEdit_VolMgrMiscVolActivity($lActivityID, $lVolID, 'Edit activity', true) . '&nbsp;' . str_pad($lActivityID, 5, '0', STR_PAD_LEFT) . '
            </td>';
    echo '
            <td class="enpRpt" style="width: 25px; text-align: center;">' . strLinkRem_VolUnschedHrs($lVolID, $lActivityID, 'Remove volunteer activity', true, true) . '
            </td>';
    echo '
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:31,代码来源:monthly_nonpv_details_view.php

示例13: strDepositLogReport

 function strDepositLogReport(&$sRpt, $lStartRec, $lRecsPerPage)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $genumDateFormat;
     $strLimit = " LIMIT {$lStartRec}, {$lRecsPerPage} ";
     $clsACO = new madmin_aco();
     $sqlStr = "SELECT dl_lKeyID,\n               dl_lACOID, dl_dteStart, dl_dteEnd, \n               dl_strBank, dl_strAccount, dl_strNotes,  dl_bRetired,\n               dl_lOriginID, dl_lLastUpdateID,\n               usersC.us_strFirstName AS strCFName, usersC.us_strLastName AS strCLName,\n               usersL.us_strFirstName AS strLFName, usersL.us_strLastName AS strLLName,\n\n               aco_strFlag, aco_strCurrencySymbol, aco_strName,\n\n               UNIX_TIMESTAMP(dl_dteOrigin)     AS dteOrigin,\n               UNIX_TIMESTAMP(dl_dteLastUpdate) AS dteLastUpdate\n\n             FROM deposit_log\n               INNER JOIN admin_users AS usersC ON dl_lOriginID     = usersC.us_lKeyID\n               INNER JOIN admin_users AS usersL ON dl_lLastUpdateID = usersL.us_lKeyID\n               INNER JOIN admin_aco             ON dl_lACOID        = aco_lKeyID\n            WHERE NOT dl_bRetired\n            ORDER BY dl_dteEnd DESC, dl_lKeyID DESC\n            {$strLimit};";
     $query = $this->db->query($sqlStr);
     $lNumRows = $query->num_rows();
     if ($lNumRows == 0) {
         return '<br><i>There are no deposits in your database.</i><br><br>';
     }
     $strOut = strLinkAdd_Deposit('Add new deposit', true) . '&nbsp;' . strLinkAdd_Deposit('Add new deposit', false) . '<br>
       <table class="enpRptC">
          <tr>
             <td class="enpRptTitle" colspan="7">
                Deposit Log
             </td>
          </tr>
          <tr>
             <td class="enpRptLabel">
                Deposit ID
             </td>
             <td class="enpRptLabel">
                ACO
             </td>
             <td class="enpRptLabel">
                Period
             </td>
             <td class="enpRptLabel">
                # Entries
             </td>
             <td class="enpRptLabel">
                Total
             </td>
             <td class="enpRptLabel">
                Bank / Account
             </td>
             <td class="enpRptLabel" style="width: 150pt;">
                Notes
             </td>
          </tr>';
     foreach ($query->result() as $row) {
         $lDepositID = $row->dl_lKeyID;
         $lNumEntries = $this->lNumGiftsViaDeposit($lDepositID, $curTot);
         if ($row->dl_strBank == '' & $row->dl_strAccount == '') {
             $strBA = '&nbsp;';
         } else {
             $strBA = '<b>Bank: </b>' . htmlspecialchars($row->dl_strBank) . '<br>' . '<b>Account: </b>' . htmlspecialchars($row->dl_strAccount);
         }
         $strOut .= '
          <tr class="makeStripe">
             <td class="enpRpt" style="text-align: center;">' . str_pad($lDepositID, 5, '0', STR_PAD_LEFT) . '&nbsp;' . strLinkView_DepositEntry($lDepositID, 'View deposit entry', true) . '
             </td>
             <td class="enpRpt">' . htmlspecialchars($row->aco_strName) . '&nbsp;' . $row->aco_strCurrencySymbol . '&nbsp;' . $clsACO->strFlagImage($row->aco_strFlag, $row->aco_strName) . '
             </td>
             <td class="enpRpt">' . date($genumDateFormat, dteMySQLDate2Unix($row->dl_dteStart)) . ' - ' . date($genumDateFormat, dteMySQLDate2Unix($row->dl_dteEnd)) . '
             </td>
             <td class="enpRpt" style="text-align: center;">' . number_format($lNumEntries) . '
             </td>
             <td class="enpRpt" style="text-align: right;">' . number_format($curTot, 2) . '
             </td>
             <td class="enpRpt">' . $strBA . '
             </td>
             <td class="enpRpt" style="width: 150pt;">' . nl2br(htmlspecialchars($row->dl_strNotes)) . '
             </td>
          </tr>';
     }
     $strOut .= '</table><br><br>';
     return $strOut;
 }
开发者ID:simple-gifts,项目名称:Delightful-Labor,代码行数:73,代码来源:mdeposits.php

示例14: loadDocImageGeneric

 function loadDocImageGeneric()
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $this->imageDocs = array();
     if ($this->sqlSort . '' == '') {
         $this->sqlSort = ' ORDER BY di_bProfile DESC, di_dteDocImage DESC, di_lKeyID ';
     }
     $sqlStr = "SELECT\n            di_lKeyID, di_enumEntryType, di_enumContextType,\n            di_lForeignID, di_strCaptionTitle, di_strDescription,\n            di_dteDocImage, di_bProfile,\n            di_strUserFN, di_strSystemFN, di_strSystemThumbFN,\n            di_strPath, di_bRetired,\n            di_lOriginID, di_lLastUpdateID,\n            UNIX_TIMESTAMP(di_dteOrigin)     AS dteOrigin,\n            UNIX_TIMESTAMP(di_dteLastUpdate) AS dteLastUpdate,\n            uc.us_strFirstName AS strUCFName, uc.us_strLastName AS strUCLName,\n            ul.us_strFirstName AS strULFName, ul.us_strLastName AS strULLName\n         FROM docs_images\n            INNER JOIN admin_users  AS uc ON uc.us_lKeyID=di_lOriginID\n            INNER JOIN admin_users  AS ul ON ul.us_lKeyID=di_lLastUpdateID\n         WHERE NOT di_bRetired {$this->sqlWhereExtra}\n         {$this->sqlSort}\n         {$this->sqlLimit};";
     $query = $this->db->query($sqlStr);
     $this->lNumImageDocs = $lNumRows = $query->num_rows();
     if ($lNumRows == 0) {
         $this->imageDocs[0] = new stdClass();
         $imgDoc =& $this->imageDocs[0];
         $imgDoc->lKeyID = $imgDoc->enumEntryType = $imgDoc->enumContextType = $imgDoc->lForeignID = $imgDoc->strCaptionTitle = $imgDoc->strDescription = $imgDoc->dteDocImage = $imgDoc->dteMysqlDocImage = $imgDoc->bProfile = $imgDoc->strUserFN = $imgDoc->strSystemFN = $imgDoc->strSystemThumbFN = $imgDoc->strPath = $imgDoc->bRetired = $imgDoc->lOriginID = $imgDoc->lLastUpdateID = $imgDoc->dteOrigin = $imgDoc->LastUpdate = $imgDoc->strUCFName = $imgDoc->strUCLName = $imgDoc->strULFName = $imgDoc->strULLName = $imgDoc->imageSize = $imgDoc->sngAspectRatio = null;
     } else {
         $idx = 0;
         foreach ($query->result() as $row) {
             $this->imageDocs[$idx] = new stdClass();
             $imgDoc =& $this->imageDocs[$idx];
             $imgDoc->lKeyID = (int) $row->di_lKeyID;
             $imgDoc->enumEntryType = $row->di_enumEntryType;
             $imgDoc->enumContextType = $enumContextType = $row->di_enumContextType;
             $imgDoc->lForeignID = $lFID = (int) $row->di_lForeignID;
             $imgDoc->strCaptionTitle = $row->di_strCaptionTitle;
             $imgDoc->strDescription = $row->di_strDescription;
             $imgDoc->dteDocImage = dteMySQLDate2Unix($row->di_dteDocImage);
             $imgDoc->dteMysqlDocImage = $row->di_dteDocImage;
             $imgDoc->bProfile = $row->di_bProfile;
             $imgDoc->strUserFN = $row->di_strUserFN;
             $imgDoc->strSystemFN = $row->di_strSystemFN;
             $imgDoc->strSystemThumbFN = $strThumbFN = $row->di_strSystemThumbFN;
             $imgDoc->strPath = $strPath = $row->di_strPath;
             $imgDoc->bRetired = (bool) $row->di_bRetired;
             $imgDoc->lOriginID = (int) $row->di_lOriginID;
             $imgDoc->lLastUpdateID = (int) $row->di_lLastUpdateID;
             $imgDoc->dteOrigin = (int) $row->dteOrigin;
             $imgDoc->LastUpdate = (int) $row->dteLastUpdate;
             $imgDoc->strUCFName = $row->strUCFName;
             $imgDoc->strUCLName = $row->strUCLName;
             $imgDoc->strULFName = $row->strULFName;
             $imgDoc->strULLName = $row->strULLName;
             if ($this->bLoadContext) {
                 $this->loadNameViaContextFID($imgDoc, $enumContextType, $lFID);
             }
             if ($imgDoc->enumEntryType == CENUM_IMGDOC_ENTRY_IMAGE) {
                 $imgDoc->imageSize = @getimagesize($strPath . '/' . $strThumbFN);
                 if (is_null($imgDoc->imageSize) || $imgDoc->imageSize === false) {
                     $imgDoc->sngAspectRatio = null;
                 } else {
                     $imgDoc->sngAspectRatio = $imgDoc->imageSize[0] / $imgDoc->imageSize[1];
                 }
             } else {
                 $imgDoc->imageSize = null;
                 $imgDoc->sngAspectRatio = null;
             }
             ++$idx;
         }
     }
 }
开发者ID:simple-gifts,项目名称:Delightful-Labor,代码行数:61,代码来源:mimage_doc.php

示例15: loadClientXfersViaClientID

 public function loadClientXfersViaClientID($lClientID)
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     $sqlStr = "SELECT\n            cx_lKeyID, cx_lClientID,\n            cx_lOldLocID, cx_lOldStatCatID, cx_lOldVocID,\n            cx_lNewLocID, cx_lNewStatCatID, cx_lNewVocID,\n            cx_lLastUpdateID,\n            cl_dteEffectiveDate,\n            UNIX_TIMESTAMP(cx_dteLastUpdate) AS dteLastUpdate,\n\n            oldStatCat.csc_strCatName AS statCatOld,\n            newStatCat.csc_strCatName AS statCatNew,\n\n            oldLoc.cl_strLocation AS locOld,\n            newLoc.cl_strLocation AS locNew,\n\n            oldVoc.cv_strVocTitle AS vocOld,\n            newVoc.cv_strVocTitle AS vocNew\n         FROM client_xfers\n            INNER JOIN client_status_cats AS oldStatCat ON oldStatCat.csc_lKeyID=cx_lOldStatCatID\n            INNER JOIN client_status_cats AS newStatCat ON newStatCat.csc_lKeyID=cx_lNewStatCatID\n\n            INNER JOIN client_location AS oldLoc ON oldLoc.cl_lKeyID=cx_lOldLocID\n            INNER JOIN client_location AS newLoc ON newLoc.cl_lKeyID=cx_lNewLocID\n\n            INNER JOIN lists_client_vocab AS oldVoc ON oldVoc.cv_lKeyID=cx_lOldVocID\n            INNER JOIN lists_client_vocab AS newVoc ON newVoc.cv_lKeyID=cx_lNewVocID\n         WHERE cx_lClientID={$lClientID}\n         ORDER BY cl_dteEffectiveDate, cx_lKeyID;";
     $query = $this->db->query($sqlStr);
     $this->lNumClientXfers = $lNumRows = $query->num_rows();
     $this->clientXfers = array();
     $idx = 0;
     foreach ($query->result() as $row) {
         $this->clientXfers[$idx] = new stdClass();
         $cx =& $this->clientXfers[$idx];
         $cx->lKeyID = (int) $row->cx_lKeyID;
         $cx->lClientID = (int) $row->cx_lClientID;
         $cx->lOldLocID = $row->cx_lOldLocID;
         $cx->lOldStatCatID = $row->cx_lOldStatCatID;
         $cx->lOldVocID = $row->cx_lOldVocID;
         $cx->lNewLocID = $row->cx_lNewLocID;
         $cx->lNewStatCatID = $row->cx_lNewStatCatID;
         $cx->lNewVocID = $row->cx_lNewVocID;
         $cx->lLastUpdateID = $row->cx_lLastUpdateID;
         $cx->dteEffective = dteMySQLDate2Unix($row->cl_dteEffectiveDate);
         $cx->dteLastUpdate = $row->dteLastUpdate;
         $cx->statCatOld = $row->statCatOld;
         $cx->statCatNew = $row->statCatNew;
         $cx->locOld = $row->locOld;
         $cx->locNew = $row->locNew;
         $cx->vocOld = $row->vocOld;
         $cx->vocNew = $row->vocNew;
         ++$idx;
     }
 }
开发者ID:simple-gifts,项目名称:Delightful-Labor,代码行数:33,代码来源:mclient_locations.php


注:本文中的dteMySQLDate2Unix函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。