<?php pageHeaderInclude('modules/settings/validator.js'); pageHeaderInclude('js/sorttable.js'); pageTitle('Settings'); ob_start(); if(isset($this->active)) { TemplateUtility::printTabs($this->active, $this->subActive); } ?> <div id="contents"> <table> <tr> <td width="3%"> <img src="images/settings.gif" width="24" height="24" border="0" alt="Settings" style="margin-top: 3px;" /> </td> <td><h2>Settings: Customize Filter</h2></td> </tr> </table> <p class="note">Show Grouping</p> <form name="showgrouping" id="showgrouping" action="<?php echo(CATSUtility::getIndexName()); ?>?m=settings&a=filtergrouping" method="post"> <input type="hidden" name="postback" id="postback" value="postback" /> <?php if (isset($this->isDemoUser) && $this->isDemoUser): ?>
&candidateID=<?php echo $pipelinesData['candidateID']; ?> "> EMail </a> <?php } ?> </td> <?php } ?> </tr> <tr class="<?php TemplateUtility::printAlternatingRowClass($rowNumber); ?> " id="pipelineDetails<?php echo $rowNumber; ?> " style="display:none;"> <td colspan="11"> <center> <table width="98%" border=1 class="detailsOutside" style="margin:5px;"> <tr> <td align="left" style="padding: 6px 6px 6px 6px; background-color: white; clear: both;"> <div style="overflow: auto; height: 200px;" id="pipelineEntryInner<?php echo $rowNumber; ?> "> <img src="images/indicator.gif" alt="" /> Loading pipeline details...
<p class="note">Activity</p> <table id="activityTable" class="sortable" width="100%"> <tr> <th align="left" width="125">Date</th> <th align="left" width="90">Type</th> <th align="left" width="90">Entered</th> <th align="left" width="250">Regarding</th> <th align="left">Notes</th> <?php echo "<th align='left' width='40'>Action</th>"; echo "</tr>"; foreach ($this->activityRS as $rowNumber => $activityData) { ?> <tr class="<?php TemplateUtility::printAlternatingRowClass($rowNumber); ?>"> <td align="left" valign="top" id="activityDate<?php echo($activityData['activityID']); ?>"><?php $this->_($activityData['dateCreated']) ?></td> <td align="left" valign="top" id="activityType<?php echo($activityData['activityID']); ?>"><?php $this->_($activityData['typeDescription']) ?></td> <td align="left" valign="top"><?php $this->_($activityData['enteredByAbbrName']) ?></td> <td align="left" valign="top" id="activityRegarding<?php echo($activityData['activityID']); ?>"><?php $this->_($activityData['regarding']) ?></td> <td align="left" valign="top" id="activityNotes<?php echo($activityData['activityID']); ?>"><?php echo($activityData['notes']); ?></td> <?php echo "<td align='center' >"; if ($this->accessLevel >= ACCESS_LEVEL_EDIT) { ?> <a href="#" id="editActivity<?php echo($activityData['activityID']); ?>" onclick="Activity_editEntry(<?php echo($activityData['activityID']); ?>, <?php echo($this->candidateID); ?>, <?php echo(DATA_ITEM_CANDIDATE); ?>, '<?php echo($this->sessionCookie); ?>'); return false;"> <img src="images/actions/edit.gif" width="16" height="16" class="absmiddle" alt="" border="0" title="Edit" /> </a> <?php }
THIS ACTION CANNOT BE UNDONE! Make sure you have backed up and saved all your data before you do this!<br /> <br /> <input type="button" class="button" value="Yes - Delete All Data" onclick="document.getElementById('queryResetDatabase').style.display='none';showTextBlock('installingComponents');Installpage_populate('a=resetDatabase&type='+escape(getCheckedValue(document.getElementsByName('installgroupexists'))));" style="width:240px;" /> <input type="button" class="button" value="No - Do Not Delete Data" onclick="Installpage_populate('a=detectRevision');" style="width:240px;" /> </div> <div id="pickOptionalComponents" style="display:none;"> <span style="font-weight: bold;">Loading Extras - Localization</span><br /> <br /> <table> <tr> <td>Please choose your time zone.</td> </tr> <tr> <td style="padding-bottom: 10px;"><?php if (!isset($php4)) { TemplateUtility::printTimeZoneSelect('timeZone', 'width: 420px;', '', OFFSET_GMT); } ?> </td> </tr> <tr> <td>Please choose your preferred date format.</td> </tr> <tr> <td> <select id="dateFormat" name="dateFormat" style="width: 150px;" class="selectBox"> <option value="mdy" selected="selected">MM-DD-YYYY (US)</option> <option value="dmy">DD-MM-YYYY (UK)</option> </select> </td>
/** * Draws the pager onto the current template (meant to be invoked from template or ajax * function). * * @param boolean don't draw the overflow contaner. * @return void */ public function draw($noOverflow = false) { $arrrTplVar = array(); /* Get data. */ $this->_getData(); $md5InstanceName = md5($this->_instanceName); $this->_totalColumnWidths = 0; /* Build cell indexes for cell headers. */ $cellIndexes = array(); foreach ($this->_currentColumns as $index => $data) { $cellIndexes[] = $index; } /* Do not draw elements that exist outside of the OverflowDiv object (in the case of being called by the ajax redraw function) */ if (!$noOverflow) { /* Filters */ if (isset($this->_parameters['filter'])) { $currentFilterString = $this->_parameters['filter']; } else { $currentFilterString = ''; } ob_start(); $this->_getApplyFilterFunctionDefinition(); $filterDefinition = ob_get_clean(); $currentFilterString = htmlspecialchars($currentFilterString); $globalStyle = $this->globalStyle; $tableWidth = strpos($this->_tableWidth, "%") ? $this->_tableWidth : $this->_tableWidth + 10 . "px"; $arrrTplVar["md5InstanceName"] = $md5InstanceName; $arrrTplVar["currentFilterString"] = $currentFilterString; $arrrTplVar["filterDefinition"] = $filterDefinition; $arrrTplVar["tableWidth"] = $tableWidth; $arrrTplVar["globalStyle"] = $globalStyle; } $listStyleBorder = ""; $listStyleDisplay = ""; /* Actuall definition for the table. */ if (isset($this->listStyle) && $this->listStyle == true) { $listStyleBorder = " style='border:none;'"; $listStyleDisplay = " display:none;"; } $arrrTplVar["listStyleBorder"] = $listStyleBorder; $arrrTplVar["listStyleDisplay"] = $listStyleDisplay; $arrHTMLTableData = array(); $indexTableData = 0; ob_start(); if (!isset($this->showExportColumn) || $this->showExportColumn) { /* Column selector icon */ /**/ //echo ('<th style="width:10px; border-right:1px solid gray; ' . $this->globalStyle . '" align="center" id="cellHideShow'.$md5InstanceName.'"><div style="width:10px;">' . "\n"); $arrHTMLTableData[$indexTableData]["tag"] = "th"; //$arrHTMLTableData[$indexTableData]["param"]=' style="width:10px; border-right:1px solid gray; ' . $this->globalStyle . '" align="center" id="cellHideShow'.$md5InstanceName.'"'; $arrHTMLTableData[$indexTableData]["param"] = "class='param1' id='cellHideShow{$md5InstanceName}'"; $arrHTMLTableData[$indexTableData]["data"] = '<div style="width:10px;">'; /* Choose column box */ if (isset($this->showChooseColumnsBox) && $this->showChooseColumnsBox == true) { $arrHTMLTableData[$indexTableData]["data"] .= '<a href="javascript:void(0);" id="exportBoxLink' . $md5InstanceName . '" onclick="toggleHideShowControls(\'' . $md5InstanceName . '\'); return false;">'; $arrHTMLTableData[$indexTableData]["data"] .= '<img src="images/tab_add.gif" border="0" alt="" />'; $arrHTMLTableData[$indexTableData]["data"] .= '</a></div>'; /* Dropdown selector to choose which columns are visible. */ $arrHTMLTableData[$indexTableData]["data"] .= '<div class="ajaxSearchResults" id="ColumnBox' . $md5InstanceName . '" align="left" onclick="toggleHideShowControls(\'' . $md5InstanceName . '\');" style="width:200px; ' . $this->globalStyle . '">'; $arrHTMLTableData[$indexTableData]["data"] .= '<span style="font-weight:bold; color:#000000;">Show Columns:</span><br/><br />'; /* Contents of dropdown menu. */ foreach ($this->_classColumns as $index => $data) { $selected = false; foreach ($this->_currentColumns as $index2 => $data2) { if ($data2['name'] == $index) { $selected = true; } } /* Add / remove columns */ if (!isset($data['pagerOptional']) || $data['pagerOptional'] == true) { if ($selected) { $newParameterArray = $this->_parameters; $newParameterArray['removeColumn'] = $index; $arrHTMLTableData[$indexTableData]["data"] .= '<span style="font-weight:normal;">' . $this->_makeControlLink($newParameterArray) . '<img src="images/checkbox.gif" border="0" alt="" /> ' . $index . '</a></span><br />'; } else { $newParameterArray = $this->_parameters; $newParameterArray['addColumn'] = $index; $arrHTMLTableData[$indexTableData]["data"] .= '<span style="font-weight:normal;">' . $this->_makeControlLink($newParameterArray) . '<img src="images/checkbox_blank.gif" border="0" alt="" /> ' . $index . '</a></span><br />'; } } } /* Single option to reset the column sizes / contents. */ $arrHTMLTableData[$indexTableData]["data"] .= '<br />'; $newParameterArray = $this->_parameters; $newParameterArray['resetColumns'] = true; $arrHTMLTableData[$indexTableData]["data"] .= '<span style="font-weight:bold;">' . $this->_makeControlLink($newParameterArray) . '<img src="images/checkbox_blank.gif" alt="" border="0" /> Reset to Default Columns</a></span><br />'; $arrHTMLTableData[$indexTableData]["data"] .= '</div>'; } /* Ajax indicator. */ $arrHTMLTableData[$indexTableData]["data"] .= '<span style="display:none;" id="ajaxTableIndicator' . $md5InstanceName . '"><img src="images/indicator_small.gif" alt="" /></span>'; /* Selected Export ID's Array */ $arrHTMLTableData[$indexTableData]["data"] .= '<script type="text/javascript">exportArray' . $md5InstanceName . ' = new Array();</script>'; echo "<{$arrHTMLTableData[$indexTableData]["tag"]} {$arrHTMLTableData[$indexTableData]["param"]}>{$arrHTMLTableData[$indexTableData]["data"]}</{$arrHTMLTableData[$indexTableData]["tag"]}>"; } else { /* Ajax indicator. */ echo '<span style="display:none;" id="ajaxTableIndicator' . $md5InstanceName . '"></span>'; } $indexTableData++; /* Column headers */ foreach ($this->_currentColumns as $index => $data) { /* Is the column sizable? If it is, then we need to make a second column to resize that appears to be part of the first column. */ $widthvalue = ''; if ((!isset($data['data']['sizable']) || $data['data']['sizable'] == true) && (isset($this->allowResizing) && $this->allowResizing == true)) { $sizable = true; $widthvalue = $this->_totalColumnWidths += $data['width'] + 1; //$arrHTMLTableData[$indexTableData]["param"]="<class='param2'>"; } else { $sizable = false; $widthvalue = $this->_totalColumnWidths += $data['width']; //$arrHTMLTableData[$indexTableData]["param"]="<class='param3'>"; } /* Opening of header cell. */ //echo ('<th align="left" style="width:'.$data['width'].'px; border-collapse: collapse; ' . $this->globalStyle); $arrHTMLTableData[$indexTableData]["tag"] = "th"; $arrHTMLTableData[$indexTableData]["param"] = "class='param3' width={$widthvalue}"; //$arrHTMLTableData[$indexTableData]["param"]=' align="left" style="width:'.$data['width'].'px; border-collapse: collapse; ' . $this->globalStyle; $arrKeys = array_keys($this->_currentColumns); if (end($arrKeys) != $index && !$sizable) { //Uncomment for gray resize bars $arrHTMLTableData[$indexTableData]["param"] .= "class='param4'"; //$arrHTMLTableData[$indexTableData]["param"].= 'border-right:1px solid gray;'; } $newParameterArray = $this->_parameters; $newParameterArray['reorderColumns'] = '<dynamic>'; /* If $this->allowResizing is not set, prevent moving. Otherwise, write the code to make the cell movable. */ if (isset($this->allowResizing) && $this->allowResizing == true) { $formatString = '" id="cell%s%s" onmouseover="style.cursor = ' . '\'move\'" onmousedown="startMove(\'cell%s%s\', ' . '\'table%s\', \'cell%s%s\', \'%s\', \'%s\', \'%s\', ' . '\'moveColumn%s\', \'OverflowDiv%s\', \'%s\', urlDecode(\'%s\'));"'; $arrKeys = array_keys($this->_currentColumns); $arrHTMLTableData[$indexTableData]["param"] .= sprintf($formatString, $md5InstanceName, $index, $md5InstanceName, $index, $md5InstanceName, $md5InstanceName, end($arrKeys), urlencode($this->_instanceName), $_SESSION['CATS']->getCookie(), $data['name'], $md5InstanceName, $md5InstanceName, urlencode(serialize($newParameterArray)), urlencode($this->_getUnrelatedRequestString())); } else { $arrHTMLTableData[$indexTableData]["param"] .= '" id="cell' . $md5InstanceName . $index . '"'; } $arrHTMLTableData[$indexTableData]["data"] = '<div id="cell' . $md5InstanceName . $index . 'div" style="width:' . $data['width'] . 'px;">'; /* Header cell contents. */ if (isset($data['data']['pagerNoTitle']) && $data['data']['pagerNoTitle'] == true) { /* Do nothing */ } else { if (isset($data['data']['sortableColumn'])) { /* If this field is not the current sort-by field, or if it is and the * current sort direction is DESC, the link will use ASC sort order. */ if ($this->_parameters['sortBy'] !== $data['data']['sortableColumn'] || $this->_parameters['sortDirection'] === 'DESC') { $sortDirection = 'ASC'; } else { $sortDirection = 'DESC'; } if ($this->_parameters['sortBy'] == $data['data']['sortableColumn'] && $this->_parameters['sortDirection'] === 'ASC') { $sortImage = ' <img src="images/downward.gif" style="border: none;" alt="" />'; } else { if ($this->_parameters['sortBy'] == $data['data']['sortableColumn'] && $this->_parameters['sortDirection'] === 'DESC') { $sortImage = ' <img src="images/upward.gif" style="border: none;" alt="" />'; } else { $sortImage = ' <img src="images/nosort.gif" style="border: none;" alt="" />'; } } $newParameterArray = $this->_parameters; $newParameterArray['sortBy'] = $data['data']['sortableColumn']; $newParameterArray['sortDirection'] = $sortDirection; if (isset($newParameterArray['filterAlpha'])) { unset($newParameterArray['filterAlpha']); } if (isset($this->allowSorting) && $this->allowSorting == false) { $arrHTMLTableData[$indexTableData]["data"] .= sprintf('<nobr>%s</nobr>', !isset($data['data']['columnHeaderText']) ? $data['name'] : $data['data']['columnHeaderText']); } else { if (isset($data['data']['columnHeaderText'])) { $arrHTMLTableData[$indexTableData]["data"] .= sprintf('%s<nobr>%s%s</nobr></a>', $this->_makeControlLink($newParameterArray), $data['data']['columnHeaderText'], $sortImage); } else { $arrHTMLTableData[$indexTableData]["data"] .= sprintf('%s<nobr>%s%s</nobr></a>', $this->_makeControlLink($newParameterArray), $data['name'], $sortImage); } } } else { $arrHTMLTableData[$indexTableData]["data"] .= '<span style="font-weight:bold;"><nobr>' . $data['name'] . '</nobr></span>'; } } /* Draw the closing part of the cell. */ $arrHTMLTableData[$indexTableData]["data"] .= '</div>'; echo "<{$arrHTMLTableData[$indexTableData]["tag"]} {$arrHTMLTableData[$indexTableData]["param"]}>{$arrHTMLTableData[$indexTableData]["data"]}</{$arrHTMLTableData[$indexTableData]["tag"]}>"; /* If this cell can be resized, make a cell next to it to move around. */ if ($sizable) { $indexTableData++; $arrHTMLTableData[$indexTableData]["tag"] = "th"; //$arrHTMLTableData[$indexTableData]["param"]=' align="left" class="resizeableCell" style="width:5px; border-collapse: collapse; -moz-user-select: none; -khtml-user-select: none; ' . $this->globalStyle; $arrHTMLTableData[$indexTableData]["param"] = "class='param5 resizeableCell'"; $formatString = ''; $arrTmp = array_keys($this->_currentColumns); if (end($arrTmp) != $index) { //Uncomment for gray resize bars $arrHTMLTableData[$indexTableData]["param"] .= "class='param4'"; //$arrHTMLTableData[$indexTableData]["param"] .= 'border-right:1px solid gray;'; } $formatString .= 'user-select: none;" onmouseover="style.cursor = ' . '\'e-resize\'" onmousedown="startResize(\'cell%s%s\', ' . '\'table%s\', \'cell%s%s\', %s, \'%s\', \'%s\', ' . '\'%s\', \'%s\', this.offsetWidth);"'; $arrTmp = array_keys($this->_currentColumns); $formatString = sprintf($formatString, $md5InstanceName, $index, $md5InstanceName, $md5InstanceName, end($arrTmp), $this->_tableWidth, urlencode($this->_instanceName), $_SESSION['CATS']->getCookie(), $data['name'], implode(',', $cellIndexes)); $arrHTMLTableData[$indexTableData]["param"] .= $formatString; $arrHTMLTableData[$indexTableData]["data"] = '<div class="dataGridResizeAreaInnerDiv"></div>'; echo "<{$arrHTMLTableData[$indexTableData]["tag"]} {$arrHTMLTableData[$indexTableData]["param"]} >{$arrHTMLTableData[$indexTableData]["data"]}</{$arrHTMLTableData[$indexTableData]["tag"]}>"; } } echo '</thead>'; /* Table Data */ foreach ($this->_rs as $rsIndex => $rsData) { if (isset($this->listStyle) && $this->listStyle == true) { echo '<tr>' . "\n"; } else { echo '<tr class="' . TemplateUtility::getAlternatingRowClass($rsIndex) . '">' . "\n"; } if (!isset($this->showExportColumn) || $this->showExportColumn) { $indexTableData++; $arrHTMLTableData[$indexTableData]["tag"] = "td"; /* Action/Export */ $arrHTMLTableData[$indexTableData]["param"] = "class='paramGlobal'"; //$arrHTMLTableData[$indexTableData]["param"]=' style="' . $this->globalStyle . '"'; $arrHTMLTableData[$indexTableData]["data"] = ""; //echo ('<td>'); if (isset($rsData['exportID']) && isset($this->showExportCheckboxes) && $this->showExportCheckboxes == true) { $arrHTMLTableData[$indexTableData]["data"] = '<input type="checkbox" id="checked_' . $rsData['exportID'] . '" name="checked_' . $rsData['exportID'] . '" onclick="addRemoveFromExportArray(exportArray' . $md5InstanceName . ', ' . $rsData['exportID'] . ');" />'; //echo ('<input type="checkbox" id="checked_' . $rsData['exportID'] . '" name="checked_' . $rsData['exportID'] . '" onclick="addRemoveFromExportArray(exportArray'.$md5InstanceName.', '.$rsData['exportID'].');" />'); } //echo ('</td>'); echo "<{$arrHTMLTableData[$indexTableData]["tag"]} {$arrHTMLTableData[$indexTableData]["param"]} >{$arrHTMLTableData[$indexTableData]["data"]}</{$arrHTMLTableData[$indexTableData]["tag"]}>"; } /* 1 Column of data */ foreach ($this->_currentColumns as $index => $data) { $indexTableData++; $arrHTMLTableData[$indexTableData]["tag"] = "td"; // Action/Export $arrHTMLTableData[$indexTableData]["param"] = ''; $arrHTMLTableData[$indexTableData]["data"] = ""; if (isset($data['data']['pagerAlign'])) { $arrHTMLTableData[$indexTableData]["param"] = "class='paramGlobal' align='{$data['data']['pagerAlign']}'"; //$arrHTMLTableData[$indexTableData]["param"]=' style="' . $this->globalStyle . '" align="' . $data['data']['pagerAlign'] . '"'; } else { $arrHTMLTableData[$indexTableData]["param"] = "class='paramGlobalText'"; //$arrHTMLTableData[$indexTableData]["param"]=' style="' . $this->globalStyle . '" align="left"'; } if (isset($data['data']['sizable']) && $data['data']['sizable'] == false || (!isset($this->allowResizing) || $this->allowResizing == false)) { $arrHTMLTableData[$indexTableData]["param"] = ''; //echo ('>'); } else { //$arrHTMLTableData[$indexTableData]["param"]="class='param7'"; $arrHTMLTableData[$indexTableData]["param"] = ' colspan="2"'; //echo (' colspan="2">'); } if (!isset($data['data']['pagerRender'])) { $arrHTMLTableData[$indexTableData]["data"] = $rsData[$data['data']['sortableColumn']]; //echo ($rsData[$data['data']['sortableColumn']]); } else { $arrHTMLTableData[$indexTableData]["data"] = eval($data['data']['pagerRender']); //echo (eval($data['data']['pagerRender'])); } //echo ('</td>' . "\n"); echo "<{$arrHTMLTableData[$indexTableData]["tag"]} {$arrHTMLTableData[$indexTableData]["param"]} >{$arrHTMLTableData[$indexTableData]["data"]}</{$arrHTMLTableData[$indexTableData]["tag"]}>"; } ///priya original /*foreach ($this->_currentColumns as $index => $data) { if (isset($data['data']['pagerAlign'])) { echo ('<td valign="top" style="' . $this->globalStyle . '" align="' . $data['data']['pagerAlign'] . '"'); } else { echo ('<td valign="top" style="' . $this->globalStyle . '" align="left"'); } if (isset($data['data']['sizable']) && $data['data']['sizable'] == false || (!isset($this->allowResizing) || $this->allowResizing == false)) { echo ('>'); } else { echo (' colspan="2">'); } if (!isset($data['data']['pagerRender'])) { echo ($rsData[$data['data']['sortableColumn']]); } else { echo (eval($data['data']['pagerRender'])); } echo ('</td>' . "\n"); } echo ('</tr>' . "\n");*/ } /* If the table is smaller than the maximum width, JS will extend out the last cell so the table takes up all of its allocated space. */ $arrTmp = array_keys($this->_currentColumns); $arrTmpEnd = end($arrTmp); $_tableWidth = $this->_tableWidth; $arrrTplVar["arrTmpEnd"] = $arrTmpEnd; $arrrTplVar["_tableWidth"] = $_tableWidth; $_totalColumnWidths = $this->_totalColumnWidths; $arrrTplVar["_totalColumnWidths"] = $_totalColumnWidths; $arrrTplVar["md5InstanceName"] = $md5InstanceName; $arrrTplVar["globalStyle"] = $this->globalStyle; $content = ob_get_clean(); //echo $content;exit; $arrrTplVar["AUIEO_CONTENT"] = $content; if (!$noOverflow) { $content = loadDoubleLayerTemplate("themes/default/datagrid_overflow.php", "themes/default/datagrid_overflow.html", $arrrTplVar); } else { $content = loadDoubleLayerTemplate("themes/default/datagrid.php", "themes/default/datagrid.html", $arrrTplVar); } echo $content; }
<table class="sortable" width="560" id="extraFieldsTable<?php echo($index); ?>"> <thead> <tr> <th width="75"> </th> <th align="left" width="325" nowrap="nowrap"> Field Name </th> <th align="left"> Field Type </th> </tr> </thead> <?php foreach($data['RS'] as $rsIndex => $rsData): ?> <tr class="<?php TemplateUtility::printAlternatingRowClass($rsIndex); ?>" id="table<?php echo($index); ?>row<?php echo($rsIndex); ?>"> <td> <a href="javascript:void(0);" onclick="deleteRow<?php echo($index); ?>(<?php echo($rsIndex); ?>, urlDecode('<?php echo(urlencode($rsData['fieldName'])); ?>'));" style="padding:0px;"> <img src="images/actions/delete.gif" border="0" style="padding:0px;"/> </a> <a href="javascript:void(0);" onclick="swapRows<?php echo($index); ?>(<?php echo($rsIndex); ?>, <?php echo($rsIndex-1); ?>);" style="padding:0px;"> <img src="images/scrollTop.jpg" border="0" style="padding:0px;"/> </a> <a href="javascript:void(0);" onclick="swapRows<?php echo($index); ?>(<?php echo($rsIndex); ?>, <?php echo($rsIndex+1); ?>);" style="padding:0px;"> <img src="images/scrollBottom.jpg" border="0" style="padding:0px;"/> </a> <a href="javascript:void(0);" onclick="editRow<?php echo($index); ?>(<?php echo($rsIndex); ?>);" style="padding:0px;"> <img src="images/edit.gif" border="0" style="padding:0px;"/> </a> </td> <td align="left">
private function show() { /* Is this a popup? */ if (isset($_GET['display']) && $_GET['display'] == 'popup') { $isPopup = true; } else { $isPopup = false; } /* Bail out if we don't have a valid candidate ID. */ if (!$this->isRequiredIDValid('candidateID', $_GET) && !isset($_GET['email'])) { CommonErrors::fatal(COMMONERROR_BADINDEX, $this, 'Invalid candidate ID.'); } $candidates = new Candidates($this->_siteID); if (isset($_GET['candidateID'])) { $candidateID = $_GET['candidateID']; } else { $candidateID = $candidates->getIDByEmail($_GET['email']); } $data = $candidates->get($candidateID); /* Bail out if we got an empty result set. */ if (empty($data)) { CommonErrors::fatal(COMMONERROR_BADINDEX, $this, 'The specified candidate ID could not be found.'); return; } if ($data['isAdminHidden'] == 1 && $this->_accessLevel < ACCESS_LEVEL_MULTI_SA) { $this->listByView('This candidate is hidden - only a CATS Administrator can unlock the candidate.'); return; } /* We want to handle formatting the city and state here instead * of in the template. */ $data['cityAndState'] = StringUtility::makeCityStateString($data['city'], $data['state']); /* * Replace newlines with <br />, fix HTML "special" characters, and * strip leading empty lines and spaces. */ $data['notes'] = trim(nl2br(htmlspecialchars($data['notes'], ENT_QUOTES))); /* Chop $data['notes'] to make $data['shortNotes']. */ if (strlen($data['notes']) > self::NOTES_MAXLEN) { $data['shortNotes'] = substr($data['notes'], 0, self::NOTES_MAXLEN); $isShortNotes = true; } else { $data['shortNotes'] = $data['notes']; $isShortNotes = false; } /* Format "can relocate" status. */ if ($data['canRelocate'] == 1) { $data['canRelocate'] = 'Yes'; } else { $data['canRelocate'] = 'No'; } if ($data['isHot'] == 1) { $data['titleClass'] = 'jobTitleHot'; } else { $data['titleClass'] = 'jobTitleCold'; } $attachments = new Attachments($this->_siteID); $attachmentsRS = $attachments->getAll(DATA_ITEM_CANDIDATE, $candidateID); foreach ($attachmentsRS as $rowNumber => $attachmentsData) { /* If profile image is not local, force it to be local. */ if ($attachmentsData['isProfileImage'] == 1) { $attachments->forceAttachmentLocal($attachmentsData['attachmentID']); } /* Show an attachment icon based on the document's file type. */ $attachmentIcon = strtolower(FileUtility::getAttachmentIcon($attachmentsRS[$rowNumber]['originalFilename'])); $attachmentsRS[$rowNumber]['attachmentIcon'] = $attachmentIcon; /* If the text field has any text, show a preview icon. */ if ($attachmentsRS[$rowNumber]['hasText']) { $attachmentsRS[$rowNumber]['previewLink'] = sprintf('<a href="#" onclick="window.open(\'%s?m=candidates&a=viewResume&attachmentID=%s\', \'viewResume\', \'scrollbars=1,width=800,height=760\')"><img width="15" height="15" style="border: none;" src="images/search.gif" alt="(Preview)" /></a>', CATSUtility::getIndexName(), $attachmentsRS[$rowNumber]['attachmentID']); } else { $attachmentsRS[$rowNumber]['previewLink'] = ' '; } } $pipelines = new Pipelines($this->_siteID); $pipelinesRS = $pipelines->getCandidatePipeline($candidateID); $sessionCookie = $_SESSION['CATS']->getCookie(); /* Format pipeline data. */ foreach ($pipelinesRS as $rowIndex => $row) { /* Hot jobs [can] have different title styles than normal * jobs. */ if ($row['isHot'] == 1) { $pipelinesRS[$rowIndex]['linkClass'] = 'jobLinkHot'; } else { $pipelinesRS[$rowIndex]['linkClass'] = 'jobLinkCold'; } $pipelinesRS[$rowIndex]['ownerAbbrName'] = StringUtility::makeInitialName($pipelinesRS[$rowIndex]['ownerFirstName'], $pipelinesRS[$rowIndex]['ownerLastName'], false, LAST_NAME_MAXLEN); $pipelinesRS[$rowIndex]['addedByAbbrName'] = StringUtility::makeInitialName($pipelinesRS[$rowIndex]['addedByFirstName'], $pipelinesRS[$rowIndex]['addedByLastName'], false, LAST_NAME_MAXLEN); $pipelinesRS[$rowIndex]['ratingLine'] = TemplateUtility::getRatingObject($pipelinesRS[$rowIndex]['ratingValue'], $pipelinesRS[$rowIndex]['candidateJobOrderID'], $sessionCookie); } $activityEntries = new ActivityEntries($this->_siteID); $activityRS = $activityEntries->getAllByDataItem($candidateID, DATA_ITEM_CANDIDATE); if (!empty($activityRS)) { foreach ($activityRS as $rowIndex => $row) { if (empty($activityRS[$rowIndex]['notes'])) { $activityRS[$rowIndex]['notes'] = '(No Notes)'; } if (empty($activityRS[$rowIndex]['jobOrderID']) || empty($activityRS[$rowIndex]['regarding'])) { $activityRS[$rowIndex]['regarding'] = 'General'; } $activityRS[$rowIndex]['enteredByAbbrName'] = StringUtility::makeInitialName($activityRS[$rowIndex]['enteredByFirstName'], $activityRS[$rowIndex]['enteredByLastName'], false, LAST_NAME_MAXLEN); } } /* Get upcoming calendar entries. */ $calendarRS = $candidates->getUpcomingEvents($candidateID); if (!empty($calendarRS)) { foreach ($calendarRS as $rowIndex => $row) { $calendarRS[$rowIndex]['enteredByAbbrName'] = StringUtility::makeInitialName($calendarRS[$rowIndex]['enteredByFirstName'], $calendarRS[$rowIndex]['enteredByLastName'], false, LAST_NAME_MAXLEN); } } /* Get extra fields. */ $extraFieldRS = $candidates->extraFields->getValuesForShow($candidateID); /* Add an MRU entry. */ $_SESSION['CATS']->getMRU()->addEntry(DATA_ITEM_CANDIDATE, $candidateID, $data['firstName'] . ' ' . $data['lastName']); /* Is the user an admin - can user see history? */ if ($this->_accessLevel < ACCESS_LEVEL_DEMO) { $privledgedUser = false; } else { $privledgedUser = true; } $EEOSettings = new EEOSettings($this->_siteID); $EEOSettingsRS = $EEOSettings->getAll(); $EEOValues = array(); /* Make a list of all EEO related values so they can be positioned by index * rather than static positioning (like extra fields). */ if ($EEOSettingsRS['enabled'] == 1) { if ($EEOSettingsRS['genderTracking'] == 1) { $EEOValues[] = array('fieldName' => 'Gender', 'fieldValue' => $data['eeoGenderText']); } if ($EEOSettingsRS['ethnicTracking'] == 1) { $EEOValues[] = array('fieldName' => 'Ethnicity', 'fieldValue' => $data['eeoEthnicType']); } if ($EEOSettingsRS['veteranTracking'] == 1) { $EEOValues[] = array('fieldName' => 'Veteran Status', 'fieldValue' => $data['eeoVeteranType']); } if ($EEOSettingsRS['disabilityTracking'] == 1) { $EEOValues[] = array('fieldName' => 'Disability Status', 'fieldValue' => $data['eeoDisabilityStatus']); } } $questionnaire = new Questionnaire($this->_siteID); $questionnaires = $questionnaire->getCandidateQuestionnaires($candidateID); $this->_template->assign('active', $this); $this->_template->assign('questionnaires', $questionnaires); $this->_template->assign('data', $data); $this->_template->assign('isShortNotes', $isShortNotes); $this->_template->assign('attachmentsRS', $attachmentsRS); $this->_template->assign('pipelinesRS', $pipelinesRS); $this->_template->assign('activityRS', $activityRS); $this->_template->assign('calendarRS', $calendarRS); $this->_template->assign('extraFieldRS', $extraFieldRS); $this->_template->assign('candidateID', $candidateID); $this->_template->assign('isPopup', $isPopup); $this->_template->assign('EEOSettingsRS', $EEOSettingsRS); $this->_template->assign('EEOValues', $EEOValues); $this->_template->assign('privledgedUser', $privledgedUser); $this->_template->assign('sessionCookie', $_SESSION['CATS']->getCookie()); if (!eval(Hooks::get('CANDIDATE_SHOW'))) { return; } $this->_template->display('./modules/candidates/Show.tpl'); }
<?php $objRole=Users::getInstance()->getRole(); $allowDelete=$objRole->getModulePermission(300, Contacts::actionMapping("delete")); $allowEdit=$objRole->getModulePermission(300, Contacts::actionMapping("edit")); ob_start(); TemplateUtility::printHeader('Contact - '.$this->data['first_name'].' '.$this->data['last_name'], array( 'js/activity.js', 'js/sorttable.js', 'js/match.js', 'js/lib.js', 'js/pipeline.js', 'js/attachment.js')); $AUIEO_HEADER= ob_get_clean(); ob_start(); ?> <table class="detailsOutside" width="100%"> <tr style="vertical-align:top;"> <td width="50%" height="100%"> <table class="detailsInside" height="100%"> <tr> <td class="vertical">Name:</td> <td class="data"> <span class="bold"> <span class="<?php echo($this->data['titleClassContact']);?>"> <?php $this->_($this->data['first_name']); ?> <?php $this->_($this->data['last_name']); ?> <?php TemplateUtility::printSingleQuickActionMenu(DATA_ITEM_CONTACT, $this->contactID); ?> </span> <a id="vCard" href="<?php echo(CATSUtility::getIndexName()); ?>?m=contacts&a=downloadVCard&contactID=<?php echo($this->contactID); ?>"> <img src="images/vcard.gif" class="absmiddle" alt="vCard" border="0" /> </a> </span> </td>
<?php /* * CandidATS * Sites Management * * Copyright (C) 2014 - 2015 Auieo Software Private Limited, Parent Company of Unicomtech. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ob_start(); TemplateUtility::printHeader('Settings', 'js/sorttable.js'); $AUIEO_HEADER= ob_get_clean(); $AUIEO_MODULE=$_GET["m"]; ?>
public function removeFromListDatagrid() { /* Bail out if we don't have a valid type. */ if (!$this->isRequiredIDValid('dataItemType', $_GET)) { CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this); return; } $dataGrid = DataGrid::getFromRequest(); $dataItemIDArray = $dataGrid->getExportIDs(); /* Validate each ID */ foreach ($dataItemIDArray as $index => $dataItemID) { if (!$this->isRequiredIDValid($index, $dataItemIDArray)) { CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this, 'Invalid data item ID.'); return; } } $dataItemType = $_GET['dataItemType']; $dataItemDesc = TemplateUtility::getDataItemTypeDescription($dataItemType); if (!$this->isRequiredIDValid('savedListID', $_GET)) { CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this, 'Invalid saved list ID.'); return; } $savedListID = $_GET['savedListID']; /* Remove the items */ $savedLists = new SavedLists($this->_siteID); $dataItemIDArrayTemp = array(); foreach ($dataItemIDArray as $dataItemID) { $dataItemIDArrayTemp[] = $dataItemID; /* Because its too slow adding 1 item at a time, we do it in spurts of 200 items. */ if (count($dataItemIDArrayTemp) > 200) { $savedLists->removeEntryMany($savedListID, $dataItemIDArrayTemp); $dataItemIDArrayTemp = array(); } } if (count($dataItemIDArrayTemp) > 0) { $savedLists->removeEntryMany($savedListID, $dataItemIDArrayTemp); } /* Redirect to the saved list page we were on. */ /* FIXME: What if we are on the last page? */ CATSUtility::transferRelativeURI('m=lists&a=showList&savedListID='.$savedListID); }
<?php //trace("======"); /* * CandidATS * Sites Management * * Copyright (C) 2014 - 2015 Auieo Software Private Limited, Parent Company of Unicomtech. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ob_start(); TemplateUtility::printHeader('Company - '.$this->data['name'], array( 'js/sorttable.js', 'js/attachment.js')); $AUIEO_HEADER= ob_get_clean(); $objRole=Users::getInstance()->getRole(); $allowDelete=$objRole->getModulePermission(200, Companies::actionMapping("delete")); $allowEdit=$objRole->getModulePermission(200, Companies::actionMapping("edit")); $AUIEO_CONTENT=""; ob_start(); ?> <p class="note">Company Details</p> <table class="detailsOutside" width="100%"> <tr style="vertical-align:top;"> <td width="50%" height="100%"> <table class="detailsInside" height="100%"> <tr> <td class="vertical">Name:</td> <td class="data">
<table class="searchTable" width="100%"> <tr> <td> <div style="width: 700px;">These options affect how CATS formats numbers, dates, and time. <span style="font-weight:bold;">You (and your other site users) will need to log out and log back in for these settings to take effect.</span></div> <br /> <form action="<?php echo(CATSUtility::getIndexName()); ?>?m=settings&a=administration" id="localizationForm" method="post"> <input type="hidden" name="postback" value="postback" /> <input type="hidden" name="administrationMode" value="localization" /> <table class="editTable" width="700"> <tr> <td>Please choose your time zone.</td> </tr> <tr> <td style="padding-bottom: 10px;"><?php TemplateUtility::printTimeZoneSelect('timeZone', 'width: 420px;', '', $this->timeZone); ?></td> </tr> <tr> <td>Please choose your preferred date format.</td> </tr> <tr> <td style="padding-bottom: 5px;"> <select id="dateFormat" name="dateFormat" style="width: 150px;"> <option value="mdy"<?php if (!$this->isDateDMY): ?> selected<?php endif; ?>>MM-DD-YYYY (US)</option> <option value="dmy"<?php if ($this->isDateDMY): ?> selected<?php endif; ?>>DD-MM-YYYY (UK)</option> </select> </td> </tr> </table> <input type="submit" class="button" value="Save (And Logout)" />
</span> </div> <div class="<?php TemplateUtility::printAlternatingDivClass($index); ?>" style="display:none;" id="savedListRowAjaxing<?php echo($data['savedListID']); ?>"> <img src="images/indicator.gif"> Saving Changes, Please Wait... </div> <?php endforeach; ?> <div class="<?php TemplateUtility::printAlternatingDivClass(count($this->savedListsRS)); ?>" style="display:none;" id="savedListNew"> <span style="float:left;"> <input class="inputbox" style="width:220px; padding-left:5px; margin-top:2px;" value="" id="savedListNewInput"> </span> <span style="float:right; padding-right:25px;"> <a href="javascript:void(0);" onclick="document.getElementById('savedListNew').style.display='none';" style="text-decoration:none;"><img src="images/actions/delete.gif" border="0"> Delete</a> <a href="javascript:void(0);" onclick="commitNewList('<?php echo($this->sessionCookie); ?>', <?php echo($this->dataItemType); ?>);" style="text-decoration:none;"><img src="images/actions/screen.gif" border="0"> Save</a> </span> </div> <div class="<?php TemplateUtility::printAlternatingDivClass(count($this->savedListsRS)); ?>" style="display:none;" id="savedListNewAjaxing"> <img src="images/indicator.gif"> Saving Changes... </div> </div> <br /> <div style="float:right;" id="actionArea"> <input type="button" class="button" value="New List" onclick="addListRow();"> <input type="button" class="button" value="Add To Lists" onclick="addItemsToList('<?php echo($this->sessionCookie); ?>', <?php echo($this->dataItemType); ?>);"> <input type="button" class="button" value="Cancel" onclick="parentHidePopWin();"> </div> <div style="display:none; font: normal normal normal 12px/130% Arial, Tahoma, sans-serif;" id="addingToListAjaxing"> <img src="images/indicator.gif"> Adding to Lists, Please Wait <?php if (count($this->dataItemIDArray) > 20): ?>(This could take awhile)<?php endif; ?>... </div> <div style="display:none; font: normal normal normal 12px/130% Arial, Tahoma, sans-serif;" id="addingToListAjaxingComplete"> <img src="images/indicator.gif"> Items have been added to lists successfully. </div>
</table> <table style="width:100%;"> <tr> <td align="left" valign="top" style="text-align: left; width: 50%; height: 240px;"> <div class="noteUnsizedSpan" style="width:410px;">Recent Hires</div> <table class="sortable" width="410" style="margin: 0 0 4px 0;"> <tr> <th align="left" style="font-size:11px;">Name</th> <th align="left" style="font-size:11px;">Company</th> <th align="left" style="font-size:11px;">Recruiter</th> <th align="left" style="font-size:11px;">Date</th> </tr> <?php foreach($this->placedRS as $index => $data): ?> <tr class="<?php TemplateUtility::printAlternatingRowClass($index); ?>"> <td style="font-size:11px;"><a href="<?php echo(CATSUtility::getIndexName()); ?>?m=candidates&a=show&candidateID=<?php echo($data['candidateID']); ?>"style="font-size:11px;" class="<?php echo($data['candidateClassName']); ?>"><?php $this->_($data['firstName']); ?> <?php $this->_($data['lastName']); ?></a></td> <td style="font-size:11px;"><a href="<?php echo(CATSUtility::getIndexName()); ?>?m=companies&a=show&companyID=<?php echo($data['companyID']); ?>" style="font-size:11px;" class="<?php echo($data['companyClassName']); ?>"><?php $this->_($data['companyName']); ?></td> <td style="font-size:11px;"><?php $this->_(StringUtility::makeInitialName($data['userFirstName'], $data['userLastName'], false, LAST_NAME_MAXLEN)); ?></td> <td style="font-size:11px;"><?php $this->_($data['date']); ?></td> </tr> <?php endforeach; ?> </table> <?php if (!count($this->placedRS)): ?> <div style="width: 411px; height: 207px; border: 1px solid #c0c0c0; background: #E7EEFF url(images/nodata/dashboardNoHiresWhite.jpg);"> </div> <?php endif; ?> </td>
<?php //trace("======"); /* * CandidATS * Sites Management * * Copyright (C) 2014 - 2015 Auieo Software Private Limited, Parent Company of Unicomtech. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ob_start(); if ($this->isPopup) { TemplateUtility::printHeader('Candidate - '.$this->data['first_name'].' '.$this->data['last_name'], array( 'js/activity.js', 'js/sorttable.js', 'js/match.js', 'js/lib.js', 'js/pipeline.js', 'js/attachment.js')); } else { TemplateUtility::printHeader('Candidate - '.$this->data['first_name'].' '.$this->data['last_name'], array( 'js/activity.js', 'js/sorttable.js', 'js/match.js', 'js/lib.js', 'js/pipeline.js', 'js/attachment.js')); } $AUIEO_HEADER= ob_get_clean(); $AUIEO_CONTENT=""; ob_start(); if ($this->data['is_admin_hidden'] == 1) { ?> <p class="warning">This Candidate is hidden. Only CATS Administrators can view it or search for it. To make it visible by the site users, click <a href="<?php echo(CATSUtility::getIndexName()); ?>?m=candidates&a=administrativeHideShow&candidateID=<?php echo($this->candidateID); ?>&state=0" style="font-weight:bold;">Here.</a></p> <?php
public function printHeaderBlock() { TemplateUtility::printHeaderBlock(false); }
/** * Draws the pager onto the current template (meant to be invoked from template or ajax * function). * * @param boolean don't draw the overflow contaner. * @return void */ public function draw($noOverflow = false) { /* Get data. */ $this->_getData(); $md5InstanceName = md5($this->_instanceName); $this->_totalColumnWidths = 0; /* Build cell indexes for cell headers. */ $cellIndexes = array(); foreach ($this->_currentColumns as $index => $data) { $cellIndexes[] = $index; } /* Do not draw elements that exist outside of the OverflowDiv object (in the case of being called by the ajax redraw function) */ if (!$noOverflow) { /* Filters */ if (isset($this->_parameters['filter'])) { $currentFilterString = $this->_parameters['filter']; } else { $currentFilterString = ''; } echo '<input type="hidden" id="filterArea' . $md5InstanceName . '" value="', htmlspecialchars($currentFilterString), '" />'; echo '<script type="text/javascript">', $this->_getApplyFilterFunctionDefinition(), '</script>'; /* This makes the table able to be wider then the displayable area. */ echo '<div id="OverflowDiv' . $md5InstanceName . '" style="overflow: auto; width: ', $this->_tableWidth + 10, 'px; padding-left: 1px; overflow-y: hidden; overflow-x: none; padding-bottom: expression(this.scrollWidth > this.offsetWidth ? 14 : 4); ' . $this->globalStyle . '">', "\n"; } /* IE fix for floating dialog boxes not floating over controls like dropdown lists. */ echo '<iframe id="helpShim' . $md5InstanceName . '" src="lib/IFrameBlank.html" scrolling="no" frameborder="0" style="position:absolute; display:none;"></iframe>', "\n"; /* Definition for the cell which appears to be showing when dragging a column into a new position (not resizing). */ echo '<div class="moveableCell" style="cursor: move; position:absolute; width:100px; border:1px solid gray; display:none; zIndex:10000; filter:alpha(opacity=75);-moz-opacity:.75;opacity:.75; ' . $this->globalStyle . '" id="moveColumn' . $md5InstanceName . '"></div>' . "\n"; /* Actuall definition for the table. */ if (isset($this->listStyle) && $this->listStyle == true) { echo '<table class="sortable" width="' . ($this->_tableWidth + 10) . '" onmouseover="javascript:trackTableHighlight(event)" id="table' . $md5InstanceName . '" style="border:none;">' . "\n"; echo '<thead style="-moz-user-select:none; -khtml-user-select:none; user-select:none; display:none; ' . $this->globalStyle . '">' . "\n"; } else { echo '<table class="sortable" width="' . ($this->_tableWidth + 10) . '" onmouseover="javascript:trackTableHighlight(event)" id="table' . $md5InstanceName . '">' . "\n"; echo '<thead style="-moz-user-select:none; -khtml-user-select:none; user-select:none; ' . $this->globalStyle . '">' . "\n"; } echo '<tr>' . "\n"; if (!isset($this->showExportColumn) || $this->showExportColumn) { /* Column selector icon */ /**/ echo '<th style="width:10px; border-right:1px solid gray; ' . $this->globalStyle . '" align="center" id="cellHideShow' . $md5InstanceName . '"><div style="width:10px;">' . "\n"; /* Choose column box */ if (isset($this->showChooseColumnsBox) && $this->showChooseColumnsBox == true) { echo '<a href="javascript:void(0);" id="exportBoxLink' . $md5InstanceName . '" onclick="toggleHideShowControls(\'' . $md5InstanceName . '\'); return false;">' . "\n"; echo '<img src="images/tab_add.gif" border="0" alt="" />' . "\n"; echo '</a></div>' . "\n"; /* Dropdown selector to choose which columns are visible. */ echo '<div class="ajaxSearchResults" id="ColumnBox' . $md5InstanceName . '" align="left" onclick="toggleHideShowControls(\'' . $md5InstanceName . '\');" style="width:200px; ' . $this->globalStyle . '">' . "\n"; echo '<span style="font-weight:bold; color:#000000;">Show Columns:</span><br/><br />' . "\n"; /* Contents of dropdown menu. */ foreach ($this->_classColumns as $index => $data) { $selected = false; foreach ($this->_currentColumns as $index2 => $data2) { if ($data2['name'] == $index) { $selected = true; } } /* Add / remove columns */ if (!isset($data['pagerOptional']) || $data['pagerOptional'] == true) { if ($selected) { $newParameterArray = $this->_parameters; $newParameterArray['removeColumn'] = $index; echo '<span style="font-weight:normal;">' . $this->_makeControlLink($newParameterArray) . '<img src="images/checkbox.gif" border="0" alt="" /> ' . $index . '</a></span><br />' . "\n"; } else { $newParameterArray = $this->_parameters; $newParameterArray['addColumn'] = $index; echo '<span style="font-weight:normal;">' . $this->_makeControlLink($newParameterArray) . '<img src="images/checkbox_blank.gif" border="0" alt="" /> ' . $index . '</a></span><br />' . "\n"; } } } /* Single option to reset the column sizes / contents. */ echo '<br />'; $newParameterArray = $this->_parameters; $newParameterArray['resetColumns'] = true; echo '<span style="font-weight:bold;">' . $this->_makeControlLink($newParameterArray) . '<img src="images/checkbox_blank.gif" alt="" border="0" /> Reset to Default Columns</a></span><br />' . "\n"; echo '</div>'; } /* Ajax indicator. */ echo '<span style="display:none;" id="ajaxTableIndicator' . $md5InstanceName . '"><img src="images/indicator_small.gif" alt="" /></span>'; /* Selected Export ID's Array */ echo '<script type="text/javascript">exportArray' . $md5InstanceName . ' = new Array();</script>'; echo '</th>'; } else { /* Ajax indicator. */ echo '<span style="display:none;" id="ajaxTableIndicator' . $md5InstanceName . '"></span>'; } /* Column headers */ foreach ($this->_currentColumns as $index => $data) { /* Is the column sizable? If it is, then we need to make a second column to resize that appears to be part of the first column. */ if ((!isset($data['data']['sizable']) || $data['data']['sizable'] == true) && (isset($this->allowResizing) && $this->allowResizing == true)) { $sizable = true; $this->_totalColumnWidths += $data['width'] + 1; } else { $sizable = false; $this->_totalColumnWidths += $data['width']; } /* Opening of header cell. */ echo '<th align="left" style="width:' . $data['width'] . 'px; border-collapse: collapse; ' . $this->globalStyle; if (end(array_keys($this->_currentColumns)) != $index && !$sizable) { //Uncomment for gray resize bars echo 'border-right:1px solid gray;'; } $newParameterArray = $this->_parameters; $newParameterArray['reorderColumns'] = '<dynamic>'; /* If $this->allowResizing is not set, prevent moving. Otherwise, write the code to make the cell movable. */ if (isset($this->allowResizing) && $this->allowResizing == true) { $formatString = '" id="cell%s%s" onmouseover="style.cursor = ' . '\'move\'" onmousedown="startMove(\'cell%s%s\', ' . '\'table%s\', \'cell%s%s\', \'%s\', \'%s\', \'%s\', ' . '\'moveColumn%s\', \'OverflowDiv%s\', \'%s\', urlDecode(\'%s\'));">'; echo sprintf($formatString, $md5InstanceName, $index, $md5InstanceName, $index, $md5InstanceName, $md5InstanceName, end(array_keys($this->_currentColumns)), urlencode($this->_instanceName), $_SESSION['CATS']->getCookie(), $data['name'], $md5InstanceName, $md5InstanceName, urlencode(serialize($newParameterArray)), urlencode($this->_getUnrelatedRequestString())); } else { echo '" id="cell', $md5InstanceName, $index, '">'; } echo '<div id="cell' . $md5InstanceName . $index . 'div" style="width:' . $data['width'] . 'px;">' . "\n"; /* Header cell contents. */ if (isset($data['data']['pagerNoTitle']) && $data['data']['pagerNoTitle'] == true) { /* Do nothing */ } else { if (isset($data['data']['sortableColumn'])) { /* If this field is not the current sort-by field, or if it is and the * current sort direction is DESC, the link will use ASC sort order. */ if ($this->_parameters['sortBy'] !== $data['data']['sortableColumn'] || $this->_parameters['sortDirection'] === 'DESC') { $sortDirection = 'ASC'; } else { $sortDirection = 'DESC'; } if ($this->_parameters['sortBy'] == $data['data']['sortableColumn'] && $this->_parameters['sortDirection'] === 'ASC') { $sortImage = ' <img src="images/downward.gif" style="border: none;" alt="" />'; } else { if ($this->_parameters['sortBy'] == $data['data']['sortableColumn'] && $this->_parameters['sortDirection'] === 'DESC') { $sortImage = ' <img src="images/upward.gif" style="border: none;" alt="" />'; } else { $sortImage = ' <img src="images/nosort.gif" style="border: none;" alt="" />'; } } $newParameterArray = $this->_parameters; $newParameterArray['sortBy'] = $data['data']['sortableColumn']; $newParameterArray['sortDirection'] = $sortDirection; if (isset($newParameterArray['filterAlpha'])) { unset($newParameterArray['filterAlpha']); } if (isset($this->allowSorting) && $this->allowSorting == false) { echo sprintf('<nobr>%s</nobr>', !isset($data['data']['columnHeaderText']) ? $data['name'] : $data['data']['columnHeaderText']); } else { if (isset($data['data']['columnHeaderText'])) { echo sprintf('%s<nobr>%s%s</nobr></a>', $this->_makeControlLink($newParameterArray), $data['data']['columnHeaderText'], $sortImage); } else { echo sprintf('%s<nobr>%s%s</nobr></a>', $this->_makeControlLink($newParameterArray), $data['name'], $sortImage); } } } else { echo '<span style="font-weight:bold;"><nobr>', $data['name'], '</nobr></span>'; } } /* Draw the closing part of the cell. */ echo '</div></th>', "\n"; /* If this cell can be resized, make a cell next to it to move around. */ if ($sizable) { $formatString = '<th align="left" class="resizeableCell" ' . 'style="width:5px; border-collapse: collapse; ' . '-moz-user-select: none; -khtml-user-select: none; ' . $this->globalStyle; $_keys_current_columns = array_keys($this->_currentColumns); if (end($_keys_current_columns) != $index) { //Uncomment for gray resize bars $formatString .= 'border-right:1px solid gray;'; } $formatString .= 'user-select: none;" onmouseover="style.cursor = ' . '\'e-resize\'" onmousedown="startResize(\'cell%s%s\', ' . '\'table%s\', \'cell%s%s\', %s, \'%s\', \'%s\', ' . '\'%s\', \'%s\', this.offsetWidth);">'; echo sprintf($formatString, $md5InstanceName, $index, $md5InstanceName, $md5InstanceName, end($_keys_current_columns), $this->_tableWidth, urlencode($this->_instanceName), $_SESSION['CATS']->getCookie(), $data['name'], implode(',', $cellIndexes)); echo '<div class="dataGridResizeAreaInnerDiv"></div></th>', "\n"; } } echo '</tr>', "\n"; echo '</thead>', "\n"; /* Table Data */ foreach ($this->_rs as $rsIndex => $rsData) { if (isset($this->listStyle) && $this->listStyle == true) { echo '<tr>' . "\n"; } else { echo '<tr class="' . TemplateUtility::getAlternatingRowClass($rsIndex) . '">' . "\n"; } if (!isset($this->showExportColumn) || $this->showExportColumn) { /* Action/Export */ echo '<td style="' . $this->globalStyle . '">'; if (isset($rsData['exportID']) && isset($this->showExportCheckboxes) && $this->showExportCheckboxes == true) { echo '<input type="checkbox" id="checked_' . $rsData['exportID'] . '" name="checked_' . $rsData['exportID'] . '" onclick="addRemoveFromExportArray(exportArray' . $md5InstanceName . ', ' . $rsData['exportID'] . ');" />'; } echo '</td>'; } /* 1 Column of data */ foreach ($this->_currentColumns as $index => $data) { if (isset($data['data']['pagerAlign'])) { echo '<td valign="top" style="' . $this->globalStyle . '" align="' . $data['data']['pagerAlign'] . '"'; } else { echo '<td valign="top" style="' . $this->globalStyle . '" align="left"'; } if (isset($data['data']['sizable']) && $data['data']['sizable'] == false || (!isset($this->allowResizing) || $this->allowResizing == false)) { echo '>'; } else { echo ' colspan="2">'; } if (!isset($data['data']['pagerRender'])) { echo $rsData[$data['data']['sortableColumn']]; } else { echo eval($data['data']['pagerRender']); } echo '</td>' . "\n"; } echo '</tr>' . "\n"; } echo '</table>' . "\n"; /* If the table is smaller than the maximum width, JS will extend out the last cell so the table takes up all of its allocated space. */ echo '<script type="text/javascript">setTableWidth("table' . $md5InstanceName . '", ' . $this->_totalColumnWidths . ', document.getElementById(\'cell' . $md5InstanceName . end($_keys_current_columns) . '\'), document.getElementById(\'cell' . $md5InstanceName . end($_keys_current_columns) . 'div\'), ' . $this->_tableWidth . ');</script>' . "\n"; /* Close overflowdiv */ if (!$noOverflow) { echo '</div>'; } }
<?php ob_start(); TemplateUtility::printHeader('Candidates', array('modules/candidates/validator.js', 'lib/ckeditor/ckeditor.js', 'js/searchSaved.js', 'js/sweetTitles.js', 'js/searchAdvanced.js', 'js/highlightrows.js', 'js/export.js')); $AUIEO_HEADER = ob_get_clean(); $AUIEO_CONTENT=""; ob_start(); $emailTo = ''; $arrIDList=array(); foreach($this->recipients as $recipient) { //$arrIDList[$ind]["id"]=$recipient["candidate_id"]; $name=false; if(isset($recipient["last_name"]) && isset($recipient["first_name"])) { $name=$recipient["first_name"]." ".$recipient["last_name"]; } else if(isset($recipient["last_name"])) { $name=$recipient["last_name"]; } else if(isset($recipient["first_name"])) { $name=$recipient["first_name"]; } if(strlen($recipient['email1']) > 0) { if($name===false) { $arrIDList[$recipient["candidate_id"]]["email"][]=array("email"=>$recipient["email1"]); } else
$objArray->addData($record["fieldlabel"]); $objArray->addData(isset($this->data[$record["fieldname"]])?$this->data[$record["fieldname"]]:""); } trace($objArray->render());*/ ?> <table class="detailsOutside" width="100%" height="<?php echo((count($this->extraFieldRS)/2 + 12) * 22); ?>"> <tr style="vertical-align:top;"> <td width="50%" height="100%"> <table class="detailsInside" height="100%"> <tr> <td class="vertical">Title:</td> <td class="data" width="300"> <span class="<?php echo($this->data['titleClass']); ?>"><?php $this->_($this->data['title']); ?></span> <?php echo($this->data['public']) ?> <?php TemplateUtility::printSingleQuickActionMenu(DATA_ITEM_JOBORDER, $this->data['jobOrderID']); ?> </td> </tr> <tr> <td class="vertical">Company Name:</td> <td class="data"> <a href="<?php echo(CATSUtility::getIndexName()); ?>?m=companies&a=show&companyID=<?php echo($this->data['companyID']); ?>"> <?php echo($this->data['companyName']); ?> </a> </td> </tr> <tr> <td class="vertical">Department:</td> <td class="data">
public function show() { /* Is this a popup? */ if (isset($_GET['display']) && $_GET['display'] == 'popup') { $isPopup = true; } else { $isPopup = false; } /* Bail out if we don't have a valid candidate ID. */ if (!$this->isRequiredIDValid('candidateID', $_GET) && !isset($_GET['email'])) { CommonErrors::fatal(COMMONERROR_BADINDEX, $this, 'Invalid candidate ID.'); } $candidates = new Candidates($this->_siteID); if (isset($_GET['candidateID'])) { $candidateID = $_GET['candidateID']; } else { $candidateID = $candidates->getIDByEmail($_GET['email']); } $data = $candidates->get($candidateID); $emailList=array(); $sql="select * from email_history where for_id={$candidateID} and for_module='candidates'"; $db = DatabaseConnection::getInstance(); $emailList=$db->getAllAssoc($sql); /* Bail out if we got an empty result set. */ if (empty($data)) { CommonErrors::fatal(COMMONERROR_BADINDEX, $this, 'The specified candidate ID could not be found.'); return; } if ($data['is_admin_hidden'] == 1 && $this->_accessLevel < ACCESS_LEVEL_MULTI_SA) { $this->listByView('This candidate is hidden - only a CATS Administrator can unlock the candidate.'); return; } /* We want to handle formatting the city and state here instead * of in the template. */ $data['cityAndState'] = StringUtility::makeCityStateString( $data['city'], $data['state'] ); /* * Replace newlines with <br />, fix HTML "special" characters, and * strip leading empty lines and spaces. */ $data['notes'] = trim( nl2br(htmlspecialchars($data['notes'], ENT_QUOTES)) ); /* Chop $data['notes'] to make $data['shortNotes']. */ if (strlen($data['notes']) > self::NOTES_MAXLEN) { $data['shortNotes'] = substr( $data['notes'], 0, self::NOTES_MAXLEN ); $isShortNotes = true; } else { $data['shortNotes'] = $data['notes']; $isShortNotes = false; } /** * if ownertype is group, override the user full name */ if($data['ownertype']>0) { $sql="select * from auieo_groups where id={$data['owner']}"; $objDB=DatabaseConnection::getInstance(); $row=$objDB->getAssoc($sql); if($row) { $data["ownerFullName"]=$row["groupname"]; } } /* Format "can relocate" status. */ if ($data['can_relocate'] == 1) { $data['can_relocate'] = 'Yes'; } else { $data['can_relocate'] = 'No'; } if ($data['is_hot'] == 1) { $data['titleClass'] = 'jobTitleHot'; } else { $data['titleClass'] = 'jobTitleCold'; } $attachments = new Attachments($this->_siteID); $attachmentsRS = $attachments->getAll( DATA_ITEM_CANDIDATE, $candidateID ); foreach ($attachmentsRS as $rowNumber => $attachmentsData) { /* If profile image is not local, force it to be local. */ if ($attachmentsData['isProfileImage'] == 1) { $attachments->forceAttachmentLocal($attachmentsData['attachmentID']); } /* Show an attachment icon based on the document's file type. */ $attachmentIcon = strtolower( FileUtility::getAttachmentIcon( $attachmentsRS[$rowNumber]['originalFilename'] ) ); $attachmentsRS[$rowNumber]['attachmentIcon'] = $attachmentIcon; /* If the text field has any text, show a preview icon. */ if ($attachmentsRS[$rowNumber]['hasText']) { $attachmentsRS[$rowNumber]['previewLink'] = sprintf( '<a href="#" onclick="window.open(\'%s?m=candidates&a=viewResume&attachmentID=%s\', \'viewResume\', \'scrollbars=1,width=800,height=760\')"><img width="15" height="15" style="border: none;" src="images/search.gif" alt="(Preview)" /></a>', CATSUtility::getIndexName(), $attachmentsRS[$rowNumber]['attachmentID'] ); } else { $attachmentsRS[$rowNumber]['previewLink'] = ' '; } } $pipelines = new Pipelines($this->_siteID); $pipelinesRS = $pipelines->getCandidatePipeline($candidateID); $sessionCookie = $_SESSION['CATS']->getCookie(); /* Format pipeline data. */ foreach ($pipelinesRS as $rowIndex => $row) { /* Hot jobs [can] have different title styles than normal * jobs. */ if ($row['isHot'] == 1) { $pipelinesRS[$rowIndex]['linkClass'] = 'jobLinkHot'; } else { $pipelinesRS[$rowIndex]['linkClass'] = 'jobLinkCold'; } $pipelinesRS[$rowIndex]['ownerAbbrName'] = StringUtility::makeInitialName( $pipelinesRS[$rowIndex]['ownerFirstName'], $pipelinesRS[$rowIndex]['ownerLastName'], false, LAST_NAME_MAXLEN ); $pipelinesRS[$rowIndex]['addedByAbbrName'] = StringUtility::makeInitialName( $pipelinesRS[$rowIndex]['addedByFirstName'], $pipelinesRS[$rowIndex]['addedByLastName'], false, LAST_NAME_MAXLEN ); $pipelinesRS[$rowIndex]['ratingLine'] = TemplateUtility::getRatingObject( $pipelinesRS[$rowIndex]['ratingValue'], $pipelinesRS[$rowIndex]['candidateJobOrderID'], $sessionCookie ); } $activityEntries = new ActivityEntries($this->_siteID); $activityRS = $activityEntries->getAllByDataItem($candidateID, DATA_ITEM_CANDIDATE); if (!empty($activityRS)) { foreach ($activityRS as $rowIndex => $row) { if (empty($activityRS[$rowIndex]['notes'])) { $activityRS[$rowIndex]['notes'] = '(No Notes)'; } if (empty($activityRS[$rowIndex]['jobOrderID']) || empty($activityRS[$rowIndex]['regarding'])) { $activityRS[$rowIndex]['regarding'] = 'General'; } $activityRS[$rowIndex]['enteredByAbbrName'] = StringUtility::makeInitialName( $activityRS[$rowIndex]['enteredByFirstName'], $activityRS[$rowIndex]['enteredByLastName'], false, LAST_NAME_MAXLEN ); } } /* Get upcoming calendar entries. */ $calendarRS = $candidates->getUpcomingEvents($candidateID); if (!empty($calendarRS)) { foreach ($calendarRS as $rowIndex => $row) { $calendarRS[$rowIndex]['enteredByAbbrName'] = StringUtility::makeInitialName( $calendarRS[$rowIndex]['enteredByFirstName'], $calendarRS[$rowIndex]['enteredByLastName'], false, LAST_NAME_MAXLEN ); } } /* Get extra fields. */ $extraFieldRS = $candidates->extraFields->getValuesForShow($candidateID); /* Add an MRU entry. */ $_SESSION['CATS']->getMRU()->addEntry( DATA_ITEM_CANDIDATE, $candidateID, $data['first_name'] . ' ' . $data['last_name'] ); /* Is the user an admin - can user see history? */ if ($this->_accessLevel < ACCESS_LEVEL_DEMO) { $privledgedUser = false; } else { $privledgedUser = true; } $EEOSettings = new EEOSettings($this->_siteID); $EEOSettingsRS = $EEOSettings->getAll(); $EEOValues = array(); /* Make a list of all EEO related values so they can be positioned by index * rather than static positioning (like extra fields). */ if ($EEOSettingsRS['enabled'] == 1) { if ($EEOSettingsRS['genderTracking'] == 1) { $EEOValues[] = array('fieldName' => 'Gender', 'fieldValue' => $data['eeoGenderText']); } if ($EEOSettingsRS['ethnicTracking'] == 1) { $EEOValues[] = array('fieldName' => 'Ethnicity', 'fieldValue' => $data['eeoEthnicType']); } if ($EEOSettingsRS['veteranTracking'] == 1) { $EEOValues[] = array('fieldName' => 'Veteran Status', 'fieldValue' => $data['eeoVeteranType']); } if ($EEOSettingsRS['disabilityTracking'] == 1) { $EEOValues[] = array('fieldName' => 'Disability Status', 'fieldValue' => $data['eeoDisabilityStatus']); } } $questionnaire = new Questionnaire($this->_siteID); $questionnaires = $questionnaire->getCandidateQuestionnaires($candidateID); $indexName=CATSUtility::getIndexName(); $adminHidden=""; if ($data['is_admin_hidden'] == 1) { $adminHidden = "<p class='warning'>This Candidate is hidden. Only CATS Administrators can view it or search for it. To make it visible by the site users, click <a href='{$indexName}?m=candidates&a=administrativeHideShow&candidateID={$candidateID}&state=0' style='font-weight:bold;'>Here.</a></p>"; } $profileImage = false; foreach ($attachmentsRS as $rowNumber => $attachmentsData) { if ($attachmentsData['isProfileImage'] == '1') { $profileImage = true; } } $candidateShowClass="cprofileshow"; if ($profileImage) { $candidateShowClass="cshow"; //echo "<td width='390' height='100%'>"; } else { //echo "</td><td width='50%' height='100%'>"; } $recordInActive=""; if ($data['is_active'] != 1){ $recordInActive = " <span style='color:orange;'>(INACTIVE)</span> "; } $accessLevelEdit=""; if ($this->_accessLevel >= ACCESS_LEVEL_EDIT) { $accessLevelEdit= "<a href='#' id='addActivityLink' onclick=\"showPopWin('{$indexName}?m=candidates&a=addActivityChangeStatus&candidateID={$candidateID}&jobOrderID=-1', 600, 480, null); return false;\"> <img src='images/new_activity_inline.gif' width='16' height='16' class='absmiddle' title='Log an Activity / Change Status' alt='Log an Activity / Change Status' border='0' /> Log an Activity </a>"; } $this->_template->assign('active', $this); $this->_template->assign('email_list', $emailList); $this->_template->assign('candidateID', $candidateID); $this->_template->assign('questionnaires', $questionnaires); $this->_template->assign('accessLevelEdit', $accessLevelEdit); $this->_template->assign('data', $data); $this->_template->assign('candidateShowClass', $candidateShowClass); $this->_template->assign('recordInActive', $recordInActive); $this->_template->assign('isShortNotes', $isShortNotes); $this->_template->assign('adminHidden',$adminHidden); $this->_template->assign('attachmentsRS', $attachmentsRS); $this->_template->assign('pipelinesRS', $pipelinesRS); $this->_template->assign('activityRS', $activityRS); $this->_template->assign('calendarRS', $calendarRS); $this->_template->assign('extraFieldRS', $extraFieldRS); $this->_template->assign('candidateID', $candidateID); $this->_template->assign('isPopup', $isPopup); $this->_template->assign('EEOSettingsRS', $EEOSettingsRS); $this->_template->assign('EEOValues', $EEOValues); $this->_template->assign('privledgedUser', $privledgedUser); $this->_template->assign('sessionCookie', $_SESSION['CATS']->getCookie()); if (!eval(Hooks::get('CANDIDATE_SHOW'))) return; //$this->_template->display('./modules/candidates/show.php'); //return true; if (isset($_GET['display']) && $_GET['display'] == 'popup') { $this->_template->display('./modules/candidates/show_popup.php'); $isPopup = true; } else { $this->_template->display('./modules/candidates/show.php'); $isPopup = false; } }