本文整理汇总了PHP中arrayCopy函数的典型用法代码示例。如果您正苦于以下问题:PHP arrayCopy函数的具体用法?PHP arrayCopy怎么用?PHP arrayCopy使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了arrayCopy函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadPPCatsAndTests
function loadPPCatsAndTests(&$lNumCats, &$ppCats, $bUserAccessible)
{
//---------------------------------------------------------------------
// if $bUserAccessible, the test must be published and not hidden
//---------------------------------------------------------------------
// load the pre/post test categories
$clist = new mlist_generic();
$clist->enumListType = CENUM_LISTTYPE_CPREPOSTCAT;
$clist->genericLoadList();
$lNumInList = $clist->lNumInList;
// we love scalars
// add the "no category" to the bottom
$lNumCats = $lNumInList + 1;
$clist->listItems[$lNumInList] = new stdClass();
$liLast =& $clist->listItems[$lNumInList];
$liLast->lKeyID = null;
$liLast->strListItem = '(no category)';
$liLast->lSortIDX = 9999;
$liLast->enumListType = CENUM_LISTTYPE_CPREPOSTCAT;
$liLast->bRetired = false;
// load the Pre/Post tests by category
if ($clist->lNumInList > 0) {
foreach ($clist->listItems as $li) {
$this->loadPPTestsViaCat($li->lKeyID, $li->lNumPPTests, $li->pptests, $bUserAccessible);
}
}
$this->loadPPTestsViaCat(null, $liLast->lNumPPTests, $liLast->pptests, $bUserAccessible);
$ppCats = arrayCopy($clist->listItems);
}
示例2: 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;
}
}
}
}
示例3: arrayCopy
function arrayCopy(array $array)
{
$result = array();
foreach ($array as $key => $val) {
if (is_array($val)) {
$result[$key] = arrayCopy($val);
} elseif (is_object($val)) {
$result[$key] = clone $val;
} else {
$result[$key] = $val;
}
}
return $result;
}
示例4: run
function run()
{
//---------------------------------------------------------------------
//
//---------------------------------------------------------------------
$lEventIDs = array();
foreach ($_POST['chkEvent'] as $strEventID) {
$lEventIDs[] = (int) $strEventID;
}
$this->load->model('reports/mreports', 'clsReports');
$reportAttributes = array('rptType' => CENUM_REPORTTYPE_PREDEFINED, 'rptName' => CENUM_REPORTNAME_VOLEVENTSCHEDULE, 'rptDestination' => CENUM_REPORTDEST_SCREEN, 'lStartRec' => 0, 'lRecsPerPage' => 50, 'bShowRecNav' => false, 'viewFile' => 'pre_vol_schedule_view', 'lEventIDs' => arrayCopy($lEventIDs));
$this->clsReports->createReportSessionEntry($reportAttributes);
$reportID = $this->clsReports->sRpt->reportID;
redirect('reports/reports/run/' . $reportID);
}
示例5: showDebugDetails
public function showDebugDetails()
{
//-------------------------------------------------------------------------
//
//-------------------------------------------------------------------------
global $glUserID;
/*----------------------------
echo(__FILE__.' '.__LINE__.'<br>'."\n"); $this->output->enable_profiler(TRUE);
//----------------------------- */
if (!bTestForURLHack('devOnly')) {
return;
}
$displayData = array();
$displayData['js'] = '';
//-------------------------------------
// models, libraries, and helpers
//-------------------------------------
$this->load->model('personalization/muser_fields', 'clsUF');
$this->load->model('client_features/mcprograms', 'cprograms');
$this->load->model('admin/mpermissions', 'perms');
$this->load->helper('dl_util/web_layout');
$params = array('enumStyle' => 'terse', 'clsRpt');
$this->load->library('generic_rpt', $params);
$this->load->helper('js/div_hide_show');
$displayData['js'] .= showHideDiv();
$this->cprograms->loadClientPrograms(true);
$displayData['cprogs'] = $cprogs =& $this->cprograms->cprogs;
$idx = 0;
foreach ($cprogs as $cp) {
$lETableID = $cp->lEnrollmentTableID;
$this->clsUF->lTableID = $lETableID;
$this->clsUF->loadTableFields();
$cp->efields = arrayCopy($this->clsUF->fields);
$lATableID = $cp->lAttendanceTableID;
$this->clsUF->lTableID = $lATableID;
$this->clsUF->loadTableFields();
$cp->afields = arrayCopy($this->clsUF->fields);
}
//--------------------------
// breadcrumbs
//--------------------------
$displayData['pageTitle'] = anchor('main/menu/admin', 'Admin', 'class="breadcrumb"') . ' | Client Programs';
$displayData['title'] = CS_PROGNAME . ' | Admin';
$displayData['nav'] = $this->mnav_brain_jar->navData();
$displayData['mainTemplate'] = 'cprograms/cprograms_debug_detail_view';
$this->load->vars($displayData);
$this->load->view('template');
}
示例6: prepJobCodeArray
function prepJobCodeArray(&$jCodes, $sRpt, $bAllJobCodes, &$lNumJobCodes)
{
//---------------------------------------------------------------------
//
//---------------------------------------------------------------------
global $glChapterID;
$masterCodes = array();
$jcList = new mlist_generic();
$jcList->enumListType = CENUM_LISTTYPE_VOLJOBCODES;
if ($bAllJobCodes) {
$jcList->genericLoadList($glChapterID);
$lNumJobCodes = count($jcList->listItems);
if ($lNumJobCodes == 0) {
return;
}
foreach ($jcList->listItems as $listItem) {
$masterCodes[$listItem->lKeyID] = new stdClass();
$mc =& $masterCodes[$listItem->lKeyID];
$mc->strJobCode = $listItem->strListItem;
$mc->sngNumShiftHours = 0.0;
$mc->sngNumUnHours = 0.0;
}
$masterCodes[-1] = new stdClass();
$mc =& $masterCodes[-1];
$mc->strJobCode = '(no job code assigned)';
$mc->sngNumShiftHours = 0.0;
$mc->sngNumUnHours = 0.0;
} else {
$lNumJobCodes = 1;
$masterCodes[$sRpt->lJobCodeID] = new stdClass();
$mc =& $masterCodes[$sRpt->lJobCodeID];
$mc->strJobCode = $jcList->genericLoadListItem($sRpt->lJobCodeID);
$mc->sngNumShiftHours = 0.0;
$mc->sngNumUnHours = 0.0;
}
for ($idx = 1; $idx <= 13; ++$idx) {
// month 13 is used for annual total
$jCodes[$idx] = new stdClass();
$jc =& $jCodes[$idx];
$jc->lMonth = $idx;
if ($idx <= 12) {
$jc->strMonth = strXlateMonth($idx);
}
$jc->hours = arrayCopy($masterCodes);
}
}
示例7: saveOpts
function saveOpts($enumContext)
{
//---------------------------------------------------------------------
//
//---------------------------------------------------------------------
$bShowAny = $_POST['rdoAnyAll'] == 'any';
$this->load->model('reports/mreports', 'clsReports');
$groupList = array();
$idx = 0;
foreach ($_POST['chkGroup'] as $groupItem) {
$groupList[$idx] = (int) $groupItem;
++$idx;
}
$reportAttributes = array('rptType' => CENUM_REPORTTYPE_PREDEFINED, 'rptName' => CENUM_REPORTNAME_GROUP, 'rptDestination' => CENUM_REPORTDEST_SCREEN, 'lStartRec' => 0, 'lRecsPerPage' => 50, 'bShowRecNav' => true, 'viewFile' => 'pre_generic_rpt_view', 'groupIDs' => arrayCopy($groupList), 'enumContext' => $enumContext, 'bShowAny' => $bShowAny);
$this->clsReports->createReportSessionEntry($reportAttributes);
$reportID = $this->clsReports->sRpt->reportID;
redirect('reports/reports/run/' . $reportID);
}
示例8: entireEventInfo
function entireEventInfo($lEventID, &$lNumEvents, &$events)
{
/*-----------------------------------------------------------------------
$lEventID can be a single event ID or an array of event IDs
returns an array that has event info, dates, shifts, and vols
$this->load->model('vols/mvol_events', 'clsVolEvents');
$this->load->model('vols/mvol_event_dates', 'clsVolEventDates');
$this->load->model('vols/mvol_event_dates_shifts', 'clsShifts');
$this->load->model('vols/mvol_event_dates_shifts_vols', 'clsSV');
-----------------------------------------------------------------------*/
$clsVolEventDates = new mvol_event_dates();
$clsShifts = new mvol_event_dates_shifts();
$clsSV = new mvol_event_dates_shifts_vols();
$this->loadEventsViaEID($lEventID);
$lNumEvents = $this->lNumEvents;
$events = arrayCopy($this->events);
foreach ($events as $event) {
$lEID = $event->lKeyID;
$clsVolEventDates->loadEventDates($lEID);
$event->lNumDates = $lNumDates = $clsVolEventDates->lNumDates;
if ($lNumDates > 0) {
$event->dates = arrayCopy($clsVolEventDates->dates);
foreach ($event->dates as $edate) {
$lEventDateID = $edate->lKeyID;
if ($edate->lNumShifts > 0) {
$clsShifts->loadShiftsViaEventDateID($lEventDateID);
$edate->shifts = arrayCopy($clsShifts->shifts);
foreach ($edate->shifts as $shift) {
$lShiftID = $shift->lKeyID;
$clsSV->loadVolsViaShiftID($lShiftID);
$shift->lNumVols = $lNumVols = $clsSV->lNumVols;
if ($lNumVols > 0) {
$shift->vols = arrayCopy($clsSV->vols);
}
}
}
}
}
}
}
示例9: saveOpts
function saveOpts()
{
//---------------------------------------------------------------------
//
//---------------------------------------------------------------------
$bShowAny = $_POST['rdoAnyAll'] == 'any';
$bIncludeInactive = @$_POST['chkInactive'] == 'TRUE';
$this->load->model('reports/mreports', 'clsReports');
$groupList = array();
$idx = 0;
foreach ($_POST['chkSkill'] as $skillItem) {
$skillList[$idx] = (int) $skillItem;
++$idx;
}
$reportAttributes = array('rptType' => CENUM_REPORTTYPE_PREDEFINED, 'rptName' => CENUM_REPORTNAME_VOLJOBSKILL, 'rptDestination' => CENUM_REPORTDEST_SCREEN, 'lStartRec' => 0, 'lRecsPerPage' => 50, 'bShowRecNav' => true, 'viewFile' => 'pre_generic_rpt_view', 'skillIDs' => arrayCopy($skillList), 'bShowAny' => $bShowAny, 'bIncludeInactive' => $bIncludeInactive);
$this->clsReports->createReportSessionEntry($reportAttributes);
$reportID = $this->clsReports->sRpt->reportID;
redirect('reports/reports/run/' . $reportID);
}
示例10: tablePerms
function tablePerms(&$utable, &$lNumPerms, &$perms)
{
//-----------------------------------------------------------------------
// the indexes of the table array are the table IDs
// A single table ID can also be passed.
//-----------------------------------------------------------------------
$lNumPerms = 0;
if (is_array($utable)) {
$locIDs = arrayCopy($utable);
} else {
$locIDs = array();
$locIDs[0] = $utable;
}
if (count($locIDs) > 0) {
foreach ($locIDs as $lTableID) {
$query = $this->db->query($this->strSqlLoadGroups($lTableID));
$lNumRows = $query->num_rows();
if ($lNumRows > 0) {
foreach ($query->result() as $row) {
$lGroupChildID = $row->gc_lKeyID;
if (!isset($perms[$lGroupChildID])) {
++$lNumPerms;
$perms[$lGroupChildID] = new stdClass();
$tab =& $perms[$lGroupChildID];
$tab->strGroupName = $row->gp_strGroupName;
$tab->strSafeGroupName = htmlspecialchars($row->gp_strGroupName);
$tab->lGroupChildID = $row->gc_lKeyID;
$tab->lGroupID = $row->gc_lGroupID;
$tab->lForeignID = $row->gc_lForeignID;
$tab->enumSubGroup = $row->gc_enumSubGroup;
}
}
}
}
}
}
示例11: loadVolMgrUsers
function loadVolMgrUsers(&$lNumVM, &$vmUsers)
{
//---------------------------------------------------------------------
//
//---------------------------------------------------------------------
$this->sqlOrder = 'ch_strChapterName, us_lChapterID, us_strLastName, us_strFirstName, us_strUserName, us_lKeyID ';
$this->sqlWhere = ' AND us_bUserVolManager ';
$this->loadUserRecords();
$lNumVM = $this->lNumRecs;
$vmUsers = arrayCopy($this->userRec);
}
示例12: viewBizCon
function viewBizCon($strLookupLetter, $lStartRec, $lRecsPerPage, $bShowContactNames)
{
//---------------------------------------------------------------------
//
//---------------------------------------------------------------------
if (!bTestForURLHack('showPeople')) {
return;
}
$strLookupLetter = urldecode($strLookupLetter);
$displayData = array();
$displayData['js'] = '';
//------------------------------------------------
// libraries and utilities
//------------------------------------------------
$this->load->helper('dl_util/rs_navigate');
// $this->load->helper ('dl_util/email_web');
$this->load->helper('dl_util/record_view');
$this->load->helper('img_docs/link_img_docs');
$this->load->helper('biz/biz');
$this->load->helper('people/people_display');
$this->load->helper('dl_util/directory');
$this->load->library('util/dl_date_time', '', 'clsDateTime');
$this->load->model('sponsorship/msponsorship', 'clsSpon');
$this->load->model('admin/madmin_aco', 'clsACO');
$this->load->model('biz/mbiz', 'clsBiz');
$this->load->model('donations/mdonations', 'clsGifts');
$this->load->model('people/mpeople', 'clsPeople');
$params = array('enumStyle' => 'terse');
$this->load->library('generic_rpt', $params);
//------------------------------------------------
// sanitize the lookup letter and inputs
//------------------------------------------------
$displayData['strDirLetter'] = $strLookupLetter = strSanitizeLetter($strLookupLetter);
//------------------------------------------------
// stripes
//------------------------------------------------
$this->load->model('util/mbuild_on_ready', 'clsOnReady');
$this->clsOnReady->addOnReadyTableStripes();
$this->clsOnReady->closeOnReady();
$displayData['js'] .= $this->clsOnReady->strOnReady;
$this->clsSpon->bUseDateRange = false;
$displayData['strDirTitle'] = 'Business Directory';
$displayData['lNumRecsTot'] = lNumPeopleRecsViaLetter($strLookupLetter, CENUM_CONTEXT_BIZ);
//$this->clsBiz->lNumBizRecords();
if (bAllowAccess('showGiftHistory')) {
$this->clsGifts->bUseDateRange = false;
$this->clsGifts->cumulativeOpts = new stdClass();
$this->clsGifts->cumulativeOpts->enumCumulativeSource = CENUM_CONTEXT_BIZ;
}
$lNumRecs = lNumPeopleRecsViaLetter($strLookupLetter, CENUM_CONTEXT_BIZ);
//------------------------------------------------
// set up directory display
//------------------------------------------------
if ($bShowContactNames) {
$displayData['strRptTitle'] = 'Business Contact Directory';
$displayData['strRecNavTitle'] = 'Business Contact Directory: ';
} else {
$displayData['strRptTitle'] = 'Business/Organization Directory';
$displayData['strRecNavTitle'] = 'Business Directory: ';
}
$displayData['strDirLetter'] = $strLookupLetter;
$displayData['strLinkBase'] = $strLinkBase = 'biz/biz_directory/' . ($bShowContactNames ? 'viewCBizName' : 'view') . '/';
$displayData['strDirTitle'] = strDisplayDirectory($strLinkBase, ' class="directoryLetters" ', $strLookupLetter, true, $lStartRec, $lRecsPerPage);
//------------------------------------------------
// load biz directory page
//------------------------------------------------
$strWhereExtra = $this->clsPeople->strWhereByLetter($strLookupLetter, CENUM_CONTEXT_BIZ, false);
$this->clsBiz->loadBizDirectoryPage($strWhereExtra, $lStartRec, $lRecsPerPage, !$bShowContactNames, !$bShowContactNames);
$displayData['lNumDisplayRows'] = $lNumBizRecs = $this->clsBiz->lNumBizRecs;
$displayData['directoryRecsPerPage'] = $lRecsPerPage;
$displayData['directoryStartRec'] = $lStartRec;
$displayData['bizRecs'] = $this->clsBiz->bizRecs;
if ($lNumBizRecs > 0) {
foreach ($this->clsBiz->bizRecs as $biz) {
$this->clsBiz->lBID = $lBID = $biz->lKeyID;
if ($bShowContactNames) {
$this->clsBiz->contactList(true, false, false, '', '');
$biz->lNumContacts = $lNumCon = $this->clsBiz->lNumContacts;
if ($lNumCon > 0) {
$biz->contacts = arrayCopy($this->clsBiz->contacts);
}
} else {
$biz->lNumContacts = $this->clsBiz->lNumContacts(true, false);
}
}
}
initBizReportDisplay($displayData);
if ($bShowContactNames) {
$displayData['showFields']->bContactNames = true;
$displayData['showFields']->bGiftSummary = $displayData['showFields']->bSponsor = $displayData['showFields']->bRemBiz = $displayData['showFields']->bContacts = false;
}
//------------------------------------------------
// breadcrumbs / page setup
//------------------------------------------------
$displayData['mainTemplate'] = array('biz/biz_directory_view', 'biz/rpt_generic_biz_list');
$displayData['pageTitle'] = anchor('main/menu/biz', 'Businesses/Organizations', 'class="breadcrumb"') . ' | Directory';
$displayData['title'] = CS_PROGNAME . ' | Businesses';
$displayData['nav'] = $this->mnav_brain_jar->navData();
$this->load->vars($displayData);
$this->load->view('template');
//.........这里部分代码省略.........
示例13: normalizeConfig
/**
* @param &$config
* @param $version
*/
public static function normalizeConfig(&$config, $version)
{
$toMerge = [];
foreach ($config as $key => &$value) {
if (!is_array($value)) {
$value = array('files' => $value);
}
if (array_key_exists($key, static::$defaults)) {
foreach (static::$defaults[$key] as $defKey => $defValue) {
if ($defKey[0] === '_' && $defKey[1] === '_') {
continue;
}
if (!array_key_exists($defKey, $value)) {
// add it, use version if applicable
if ($defKey === 'files') {
$value[$defKey] = is_array($defValue) ? array_key_exists($version, $defValue) ? $defValue[$version] : $defValue['*'] : $defValue;
} else {
$value[$defKey] = $defValue;
}
}
}
} elseif (array_key_exists('__merge', $value)) {
$toMerge[] = $key;
} elseif ($key[0] === '_' && $key[1] === '_') {
// just handle the includes sub-key
if (!array_key_exists('include', $value)) {
$value['include'] = [];
}
}
$value = static::normalizeInclude($value);
}
// add custom sections as mergers with vendor and workbench, these are custom mappings
foreach ($toMerge as $custom) {
if (!is_array($config[$custom]['__merge'])) {
$config[$custom]['__merge'] = array($config[$custom]['__merge']);
}
foreach ($config[$custom]['__merge'] as $mergeWith) {
$default = $config[$mergeWith];
// see if this one is included in that section and only add it's merged version if it is
$vars = array_combine(['{vendor}', '{package}'], explode('/', $custom));
if (static::isPathIncluded($default, $vars)) {
// recursive will create a shared instance of array contents that $config[$custom]['include'] = array($custom) overwrites changing the value in $config[$mergeWith]['include'], which we do not want
$mergeWithCopy = arrayCopy($config[$mergeWith]);
$config[$custom] = array_replace_recursive($mergeWithCopy, $config[$custom]);
// add the vendor, package, variables
if (!array_key_exists('vars', $config[$custom])) {
$config[$custom]['vars'] = [];
}
$config[$custom]['vars'] = array_replace_recursive($vars, $config[$custom]['vars']);
// include itself so the rest of the code does not have to know anything special about it
$config[$custom]['include'] = array($custom);
break;
}
}
}
// can now create normalized path by combining root and files
foreach ($config as $key => &$value) {
// resolve any vendor and package now so that these get processed first
if (array_key_exists('root', $value)) {
$value['path'] = static::expandVars(appendPath($value['root'], $value['files']), array_key_exists('vars', $value) ? $value['vars'] : []);
}
}
}
示例14: loadRegistrationGeneric
function loadRegistrationGeneric($sqlWhere, $lRegFormID, &$lNumRegs, &$regTable)
{
//---------------------------------------------------------------------
//
//---------------------------------------------------------------------
global $glclsDTDateFormat;
$lNumRegs = 0;
$regTable = array();
// load vol registration form
$this->loadVolRegFormsViaRFID($lRegFormID);
$rRec =& $this->regRecs[0];
// load user field meta-data
$cUF = new muser_fields();
$this->loadPTablesForDisplay($lRegFormID, $cUF, true);
// load job skill meta-data
$this->loadAllJobSkills($lRegFormID);
// build a bit-map template array of job codes
$bmJobCodes = array();
if ($this->lNumSkills > 0) {
foreach ($this->skills as $skill) {
if ($skill->bOnForm) {
$bmJobCodes[(int) $skill->lSkillID] = false;
}
}
}
// load the people/volunteer info
$sqlStr = "SELECT\n vol_lKeyID, vol_lPeopleID, vol_Notes,\n\n pe_strTitle, pe_strFName, pe_strMName, pe_strLName,\n pe_dteBirthDate, pe_strAddr1, pe_strAddr2, pe_strCity,\n pe_strState, pe_strCountry, pe_strZip, pe_strPhone, pe_strCell, pe_strFax,\n pe_strEmail,\n\n aco_lKeyID, aco_strName\n FROM volunteers\n INNER JOIN people_names ON vol_lPeopleID = pe_lKeyID\n INNER JOIN admin_aco ON aco_lKeyID = pe_lACO\n WHERE 1\n {$sqlWhere}\n AND NOT vol_bRetired\n AND NOT pe_bRetired\n AND NOT vol_bInactive\n ORDER BY pe_strLName, pe_strFName, pe_strMName, pe_lKeyID;";
$query = $this->db->query($sqlStr);
$lNumRegs = $this->lNumRegRecs = $query->num_rows();
if ($lNumRegs > 0) {
$volIDs = array();
$idx = 0;
foreach ($query->result() as $row) {
$lVolID = $volIDs[] = (int) $row->vol_lKeyID;
$regTable[$lVolID] = new stdClass();
$rRec =& $regTable[$lVolID];
$rRec->lVolID = (int) $row->vol_lKeyID;
$rRec->lPeopleID = (int) $row->vol_lPeopleID;
$rRec->strVolNotes = $row->vol_Notes;
$rRec->strTitle = $row->pe_strTitle;
$rRec->strFName = $row->pe_strFName;
$rRec->strMName = $row->pe_strMName;
$rRec->strLName = $row->pe_strLName;
$rRec->dteBirthDate = $mySQLdteBirth = $row->pe_dteBirthDate;
$rRec->strAddr1 = $row->pe_strAddr1;
$rRec->strAddr2 = $row->pe_strAddr2;
$rRec->strCity = $row->pe_strCity;
$rRec->strState = $row->pe_strState;
$rRec->strCountry = $row->pe_strCountry;
$rRec->strZip = $row->pe_strZip;
$rRec->strPhone = $row->pe_strPhone;
$rRec->strCell = $row->pe_strCell;
$rRec->strFax = $row->pe_strFax;
$rRec->strEmail = $row->pe_strEmail;
$rRec->lACOID = $row->aco_lKeyID;
$rRec->strACOName = $row->aco_strName;
$rRec->jobSkills = array();
$rRec->bmJobCodes = arrayCopy($bmJobCodes);
$rRec->pTableData = array();
//------------------------------
// vol age/birth day info
//------------------------------
if (is_null($mySQLdteBirth)) {
$rRec->objVolBirth = null;
$rRec->lAgeYears = null;
$rRec->strVolAgeBDay = '(age n/a)';
} else {
$rRec->objVolBirth = new dl_date_time();
$rRec->objVolBirth->setDateViaMySQL(0, $mySQLdteBirth);
$rRec->strVolAgeBDay = $rRec->objVolBirth->strPeopleAge(0, $mySQLdteBirth, $rRec->lAgeYears, $glclsDTDateFormat);
}
++$idx;
}
$strVolIDs = implode(',', $volIDs);
}
// load the job skills for the registrants
$sqlStr = "SELECT\n vs_lVolID, vs_lSkillID, lgen_strListItem\n FROM vol_skills\n INNER JOIN lists_generic ON vs_lSkillID = lgen_lKeyID\n WHERE\n vs_lVolID IN ({$strVolIDs})\n AND NOT lgen_bRetired\n ORDER BY lgen_strListItem;";
$query = $this->db->query($sqlStr);
$lNumJobSkills = $query->num_rows();
if ($lNumJobSkills > 0) {
foreach ($query->result() as $row) {
$lVolID = (int) $row->vs_lVolID;
$lSkillID = (int) $row->vs_lSkillID;
$regRec =& $regTable[$lVolID];
$regRec->jobSkills[] = $row->lgen_strListItem;
$regRec->bmJobCodes[$lSkillID] = true;
}
}
// load the personalized table records
// for multi-records, export just the first entry
if ($this->lNumTables > 0) {
foreach ($this->utables as $ut) {
$this->loadRegUTableData($ut, $strVolIDs, $regTable);
}
}
}
示例15: strCProgEnrolleeRpt
function strCProgEnrolleeRpt(&$viewOpts, $enumRptType)
{
//---------------------------------------------------------------------
// return reportID
//---------------------------------------------------------------------
global $gbDateFormatUS;
$this->load->model('reports/mreports', 'clsReports');
$reportAttributes = array('rptType' => CENUM_REPORTTYPE_PREDEFINED, 'rptName' => $enumRptType, 'rptDestination' => CENUM_REPORTDEST_SCREEN, 'cProgIDs' => arrayCopy($_POST['chkCProgs']), 'lStartRec' => 0, 'lRecsPerPage' => 50, 'bShowRecNav' => false);
$reportAttributes['viewFile'] = 'pre_generic_rpt_view';
tf_getDateRanges($viewOpts, $formDates);
$reportAttributes['dteStart'] = $formDates->dteStart;
$reportAttributes['dteEnd'] = $formDates->dteEnd;
$reportAttributes['strDateRange'] = $formDates->strDateRange;
$reportAttributes['strBetween'] = $formDates->strBetween;
$this->clsReports->createReportSessionEntry($reportAttributes);
return $this->clsReports->sRpt->reportID;
}