/** * Generates HTML code for export forms / menus. * * @param flag data item type being exported * @param string comma-separated list of data item IDs * @param integer number of pixles right the export box should be displayed * @return array containing parts of html code for the export form. */ public static function getForm($dataItemType, $IDs, $popUpOffset = 35, $linkOffset = 5) { $indexName = CATSUtility::getIndexName(); /* Build form header. */ $header = '<form name="selectedObjects" action="' . $indexName . '" method="get">' . "\n" . '<input type="hidden" name="m" value="export" />' . "\n" . '<input type="hidden" name="onlySelected" value="true" />' . "\n" . '<input type="hidden" name="dataItemType" value="' . $dataItemType . '" />' . "\n"; /* Build form menu. */ $allRecordsURL = sprintf('%s?m=export&a=export&dataItemType=%s', $indexName, $dataItemType); if ($_REQUEST["m"] == "candidates") { $objSearchDS = new SearchDataStructure($_REQUEST["m"]); $objSearchDS->loadFromURL(); $_SESSION["AUIEO"]["CANDIDATS"]["SearchDS"] = $objSearchDS; $allRecordsJoborderURL = sprintf('%s?m=candidates&a=considerForJobSearch&candidateID=SearchDS', $indexName); } $currentPageURL = sprintf('%s?m=export&a=export&dataItemType=%s&ids=%s', $indexName, $dataItemType, $IDs); if ($_REQUEST["m"] == "candidates") { $arrID = explode(",", $IDs); foreach ($arrID as $ind => $id) { $arrID[$ind] = "candidateID[]=" . trim($id); } $candidateIDs = implode("&", $arrID); $currentPageJoborderURL = sprintf('%s?m=candidates&a=considerForJobSearch&%s', $indexName, $candidateIDs); } $menu = '<div style="float: left; margin-left: 4px; margin-right: ' . $linkOffset . 'px;">' . '<form name="selectAll" action="#">' . '<input type="checkbox" name="allBox" title="Select All" onclick="toggleChecksAll();" />' . '</form>' . '</div>' . '<a href="#" id="exportBoxLink" onclick="showBox(\'ExportBox\'); return false;">Export</a> | <a href="#" id="deleteBoxLink" onclick="deleteSelected(); return false;">Delete</a>'; if ($_REQUEST["m"] == "candidates") { $menu = $menu . ' | <a href="#" id="addToJoborderBoxLink" onclick="showBox(\'JoborderBox\'); return false;">Add to joborder</a>'; } $menu = $menu . '<br />' . '<div class="exportPopup" id="ExportBox" align="left" onmouseover="showBox(\'ExportBox\');" onmouseout="hideBox(\'ExportBox\');">' . '<a href="' . $allRecordsURL . '">Export All Records</a><br />' . '<a href="' . $currentPageURL . '">Export Current Page</a><br />' . '<a href="#" onclick="checkSelected(); return false;">Export Selected Records</a>' . '</div>'; if ($_REQUEST["m"] == "candidates") { $menu = $menu . ' <div class="exportPopup" id="JoborderBox" align="left" onmouseover="showBox(\'JoborderBox\');" onmouseout="hideBox(\'JoborderBox\');">' . '<a href="javascript:void(0);" onclick="showPopWin(\'' . $allRecordsJoborderURL . '\', 750, 390, null); return false;">All Records</a><br />' . '<a href="javascript:void(0);" onclick="showPopWin(\'' . $allRecordsJoborderURL . '\', 750, 390, null); return false;">Current Page</a><br />' . '<a href="#" onclick="checkSelected(); return false;">Selected Records</a>' . '</div>'; } $footer = '</form>'; return array('header' => $header, 'footer' => $footer, 'menu' => $menu); }
public function __construct($siteID, $parameters) { /* Pager configuration. */ $this->_tableWidth = 915; $this->_defaultAlphabeticalSortBy = 'lastName'; $this->ajaxMode = false; $this->showExportCheckboxes = true; //BOXES WILL NOT APPEAR UNLESS SQL ROW exportID IS RETURNED! $this->showActionArea = true; $this->showChooseColumnsBox = true; $this->allowResizing = true; $this->dateCriterion = ''; if (isset($parameters['period']) && !empty($parameters['period'])) { $this->dateCriterion .= ' AND activity.date_created >= ' . $parameters['period'] . ' '; } else { if (isset($parameters['startDate']) && !empty($parameters['startDate'])) { $this->dateCriterion .= ' AND activity.date_created >= \'' . $parameters['startDate'] . '\' '; } if (isset($parameters['endDate']) && !empty($parameters['endDate'])) { $this->dateCriterion .= ' AND activity.date_created <= \'' . $parameters['endDate'] . '\' '; } } $this->defaultSortBy = 'dateCreatedSort'; $this->defaultSortDirection = 'DESC'; $this->_defaultColumns = array(array('name' => 'Date', 'width' => 110), array('name' => 'First Name', 'width' => 85), array('name' => 'Last Name', 'width' => 75), array('name' => 'Regarding', 'width' => 125), array('name' => 'Activity', 'width' => 65), array('name' => 'Notes', 'width' => 240), array('name' => 'Entered By', 'width' => 60)); $this->_db = DatabaseConnection::getInstance(); $this->_siteID = $siteID; $this->_assignedCriterion = ""; $this->_dataItemIDColumn = 'company.company_id'; $this->_classColumns = array('Date' => array('pagerRender' => 'return $rsData[\'dateCreated\'];', 'sortableColumn' => 'dateCreatedSort', 'pagerWidth' => 110, 'pagerOptional' => true, 'alphaNavigation' => true, 'filterHaving' => 'dateCreated'), 'First Name' => array('pagerRender' => 'if ($rsData[\'dataItemType\']==' . DATA_ITEM_CANDIDATE . ') {$ret = \'<img src="images/mru/candidate.gif" height="12" alt="" />\';} else if ($rsData[\'dataItemType\']==' . DATA_ITEM_CONTACT . ') {$ret = \'<img src="images/mru/contact.gif" height="12">\';} else {$ret = \'<img src="images/mru/blank.gif">\';} if ($rsData[\'isHot\'] == 1) $className = \'jobLinkHot\'; else $className = \'jobLinkCold\'; if ($rsData[\'dataItemType\']==' . DATA_ITEM_CANDIDATE . ') {return $ret.\' <a href="' . CATSUtility::getIndexName() . '?m=candidates&a=show&candidateID=\'.$rsData[\'dataItemID\'].\'" class="\'.$className.\'" title="\'.htmlspecialchars(InfoString::make($rsData[\'dataItemType\'],$rsData[\'dataItemID\'],$rsData[\'siteID\'])).\'">\'.htmlspecialchars($rsData[\'firstName\']).\'</a>\';} else {return $ret.\' <a href="' . CATSUtility::getIndexName() . '?m=contacts&a=show&contactID=\'.$rsData[\'dataItemID\'].\'" class="\'.$className.\'" title="\'.htmlspecialchars(InfoString::make($rsData[\'dataItemType\'],$rsData[\'dataItemID\'],$rsData[\'siteID\'])).\'">\'.htmlspecialchars($rsData[\'firstName\']).\'</a>\';}', 'sortableColumn' => 'firstName', 'pagerWidth' => 85, 'pagerOptional' => false, 'alphaNavigation' => true, 'filterHaving' => 'firstName'), 'Last Name' => array('pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className = \'jobLinkHot\'; else $className = \'jobLinkCold\'; if ($rsData[\'dataItemType\']==' . DATA_ITEM_CANDIDATE . ') {return \'<a href="' . CATSUtility::getIndexName() . '?m=candidates&a=show&candidateID=\'.$rsData[\'dataItemID\'].\'" class="\'.$className.\'" title="\'.htmlspecialchars(InfoString::make($rsData[\'dataItemType\'],$rsData[\'dataItemID\'],$rsData[\'siteID\'])).\'"> \'.htmlspecialchars($rsData[\'lastName\']).\'</a>\';} else {return \'<a href="' . CATSUtility::getIndexName() . '?m=contacts&a=show&contactID=\'.$rsData[\'dataItemID\'].\'" class="\'.$className.\'" title="\'.htmlspecialchars(InfoString::make($rsData[\'dataItemType\'],$rsData[\'dataItemID\'],$rsData[\'siteID\'])).\'"> \'.htmlspecialchars($rsData[\'lastName\']).\'</a>\';}', 'sortableColumn' => 'lastName', 'pagerWidth' => 75, 'pagerOptional' => false, 'alphaNavigation' => true, 'filterHaving' => 'lastName'), 'Regarding' => array('pagerRender' => 'if ($rsData[\'jobIsHot\'] == 1) $className = \'jobLinkHot\'; else $className = \'jobLinkCold\'; if ($rsData[\'companyIsHot\'] == 1) $companyClassName = \'jobLinkHot\'; else $companyClassName = \'jobLinkCold\'; if ($rsData[\'regardingJobTitle\'] == \'\') {$ret = \'General\'; } else {$ret = \'<a href="' . CATSUtility::getIndexName() . '?m=joborders&a=show&jobOrderID=\'.$rsData[\'jobOrderID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'regardingJobTitle\']).\'</a>\'; if($rsData[\'regardingCompanyName\'] != \'\') {$ret .= \' <a href="' . CATSUtility::getIndexName() . '?m=companies&a=show&companyID=\'.$rsData[\'companyID\'].\'" class="\'.$companyClassName.\'">(\'.htmlspecialchars($rsData[\'regardingCompanyName\']).\')\';}} return $ret;', 'sortableColumn' => 'regarding', 'pagerWidth' => 125, 'pagerOptional' => true, 'alphaNavigation' => true, 'filterHaving' => 'regarding'), 'Activity' => array('pagerRender' => '$ret = $rsData[\'typeDescription\']; return $ret;', 'sortableColumn' => 'typeDescription', 'pagerWidth' => 65, 'pagerOptional' => true, 'alphaNavigation' => true, 'filter' => 'activity_type.short_description'), 'Notes' => array('pagerRender' => 'return $rsData[\'notes\'];', 'sortableColumn' => 'notes', 'pagerWidth' => 240, 'pagerOptional' => true, 'alphaNavigation' => true, 'filterHaving' => 'notes'), 'Entered By' => array('pagerRender' => 'return StringUtility::makeInitialName($rsData[\'enteredByFirstName\'], $rsData[\'enteredByLastName\'], false, LAST_NAME_MAXLEN);', 'exportRender' => 'return $rsData[\'enteredByFirstName\'] . " " .$rsData[\'enteredByLastName\'];', 'sortableColumn' => 'enteredBySort', 'pagerWidth' => 60, 'alphaNavigation' => true, 'filter' => 'CONCAT(entered_by_user.last_name, entered_by_user.first_name)')); parent::__construct("activity:ActivityDataGrid", $parameters); }
/** * Adds more options to the action area on the pager. Overloads * DataGrid Inner Action Area function. * * @return html innerActionArea commands. */ public function getInnerActionArea() { $html = parent::getInnerActionArea(); $newParameterArray = $this->_parameters; $newParameterArray['exportIDs'] = '<dynamic>'; $html .= sprintf('<a href="javascript:void(0);" onclick="window.location.href=\'%s?m=export&a=exportByDataGrid&i=%s&p=%s&&dynamicArgument%s=\' + urlEncode(serializeArray(exportArray%s));">Export Selected</a><br />', CATSUtility::getIndexName(), urlencode($this->_instanceName), urlencode(serialize($newParameterArray)), urlencode($this->_instanceName), md5($this->_instanceName)); //$html .= sprintf( // '<a href="">Delete Selected</a><br />' // ); return $html; }
/** * Generates HTML code for export forms / menus. * * @param flag data item type being exported * @param string comma-separated list of data item IDs * @param integer number of pixles right the export box should be displayed * @return array containing parts of html code for the export form. */ public static function getForm($dataItemType, $IDs, $popUpOffset = 35, $linkOffset = 5) { $indexName = CATSUtility::getIndexName(); /* Build form header. */ $header = '<form name="selectedObjects" action="' . $indexName . '" method="get">' . "\n" . '<input type="hidden" name="m" value="export" />' . "\n" . '<input type="hidden" name="onlySelected" value="true" />' . "\n" . '<input type="hidden" name="dataItemType" value="' . $dataItemType . '" />' . "\n"; /* Build form menu. */ $allRecordsURL = sprintf('%s?m=export&a=export&dataItemType=%s', $indexName, $dataItemType); $currentPageURL = sprintf('%s?m=export&a=export&dataItemType=%s&ids=%s', $indexName, $dataItemType, $IDs); $menu = '<div style="float: left; margin-left: 4px; margin-right: ' . $linkOffset . 'px;">' . '<form name="selectAll" action="#">' . '<input type="checkbox" name="allBox" title="Select All" onclick="toggleChecksAll();" />' . '</form>' . '</div>' . '<a href="#" id="exportBoxLink" onclick="showBox(\'ExportBox\'); return false;">Export</a><br />' . '<div class="exportPopup" id="ExportBox" align="left" onmouseover="showBox(\'ExportBox\');" onmouseout="hideBox(\'ExportBox\');">' . '<a href="' . $allRecordsURL . '">Export All Records</a><br />' . '<a href="' . $currentPageURL . '">Export Current Page</a><br />' . '<a href="#" onclick="checkSelected(); return false;">Export Selected Records</a>' . '</div>'; $footer = '</form>'; return array('header' => $header, 'footer' => $footer, 'menu' => $menu); }
/** * Adds more options to the action area on the pager. Overloads * DataGrid Inner Action Area function. * * @return html innerActionArea commands. */ public function getInnerActionArea() { //TODO: Add items: // - Add to List // - Add to Pipeline // - Mass set rank (depends on each candidate having their own personal rank - are we going to do this?) $html = ''; $html .= $this->getInnerActionAreaItem('Remove From This List', CATSUtility::getIndexName() . '?m=lists&a=removeFromListDatagrid&dataItemType=' . DATA_ITEM_CANDIDATE . '&savedListID=' . $this->getMiscArgument(), false); $html .= $this->getInnerActionAreaItemPopup('Add To Pipeline', CATSUtility::getIndexName() . '?m=candidates&a=considerForJobSearch', 750, 460); if (MAIL_MAILER != 0) { $html .= $this->getInnerActionAreaItem('Send E-Mail', CATSUtility::getIndexName() . '?m=candidates&a=emailCandidates'); } $html .= $this->getInnerActionAreaItem('Export', CATSUtility::getIndexName() . '?m=export&a=exportByDataGrid'); $html .= parent::getInnerActionArea(); return $html; }
private function displayPublicJobOrders() { $site = new Site(-1); $careerPortalSiteID = $site->getFirstSiteID(); if (!eval(Hooks::get('RSS_SITEID'))) { return; } $jobOrders = new JobOrders($careerPortalSiteID); $rs = $jobOrders->getAll(JOBORDERS_STATUS_ACTIVE, -1, -1, -1, false, true); /* XML Headers */ header('Content-type: text/xml'); $indexName = CATSUtility::getIndexName(); $stream = sprintf("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" . "<rss version=\"2.0\">\n" . "<channel>\n" . "<title>New Job Orders</title>\n" . "<description>CATS RSS Feed</description>\n" . "<link>%s</link>\n" . "<pubDate>%s</pubDate>\n", CATSUtility::getAbsoluteURI(), DateUtility::getRSSDate()); foreach ($rs as $rowIndex => $row) { $uri = sprintf("%scareers/?p=showJob&ID=%d", CATSUtility::getAbsoluteURI(), $row['jobOrderID']); // Fix URL if viewing from /rss without using globals or dirup '../' if (strpos($_SERVER['PHP_SELF'], '/rss/') !== false) { $uri = str_replace('/rss/', '/', $uri); } $stream .= sprintf("<item>\n" . "<title>%s (%s)</title>\n" . "<description>Located in %s.</description>\n" . "<link>%s</link>\n" . "</item>\n", $row['title'], $jobOrders->typeCodeToString($row['type']), StringUtility::makeCityStateString($row['city'], $row['state']), $uri); } $stream .= "</channel>\n</rss>\n"; echo $stream; }
public function __construct() { $this->_indexName = CATSUtility::getIndexName(); $this->_indexURL = CATSUtility::getAbsoluteURI($this->_indexName); parent::__construct(); }
public function __construct($instanceName, $siteID, $parameters, $misc = 0) { $this->_db = DatabaseConnection::getInstance(); $this->_siteID = $siteID; $this->_assignedCriterion = ""; $this->_dataItemIDColumn = 'candidate.candidate_id'; $this->_classColumns = array('Attachments' => array('select' => 'IF(candidate_joborder_submitted.candidate_joborder_id, 1, 0) AS submitted, IF(attachment_id, 1, 0) AS attachmentPresent', 'pagerRender' => 'if ($rsData[\'submitted\'] == 1) { $return = \'<img src="images/job_orders.gif" alt="" width="16" height="16" title="Submitted for a Job Order" />\'; } else { $return = \'<img src="images/mru/blank.gif" alt="" width="16" height="16" />\'; } if ($rsData[\'attachmentPresent\'] == 1) { $return .= \'<img src="images/paperclip.gif" alt="" width="16" height="16" title="Attachment Present" />\'; } else { $return .= \'<img src="images/mru/blank.gif" alt="" width="16" height="16" />\'; } return $return; ', 'join' => 'LEFT JOIN attachment ON candidate.candidate_id = attachment.data_item_id AND attachment.data_item_type = ' . DATA_ITEM_CANDIDATE . ' LEFT JOIN candidate_joborder AS candidate_joborder_submitted ON candidate_joborder_submitted.candidate_id = candidate.candidate_id AND candidate_joborder_submitted.status >= ' . PIPELINE_STATUS_SUBMITTED . ' AND candidate_joborder_submitted.site_id = ' . $this->_siteID . ' AND candidate_joborder_submitted.status != ' . PIPELINE_STATUS_NOTINCONSIDERATION, 'pagerWidth' => 34, 'pagerOptional' => true, 'pagerNoTitle' => true, 'sizable' => false, 'exportable' => false, 'filterable' => false), 'First Name' => array('select' => 'candidate.first_name AS firstName', 'pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className = \'jobLinkHot\'; else $className = \'jobLinkCold\'; return \'<a href="' . CATSUtility::getIndexName() . '?m=candidates&a=show&candidateID=\'.$rsData[\'candidateID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'firstName\']).\'</a>\';', 'sortableColumn' => 'firstName', 'pagerWidth' => 75, 'pagerOptional' => false, 'alphaNavigation' => true, 'filter' => 'candidate.first_name'), 'Last Name' => array('select' => 'candidate.last_name AS lastName', 'sortableColumn' => 'lastName', 'pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className = \'jobLinkHot\'; else $className = \'jobLinkCold\'; return \'<a href="' . CATSUtility::getIndexName() . '?m=candidates&a=show&candidateID=\'.$rsData[\'candidateID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'lastName\']).\'</a>\';', 'pagerWidth' => 85, 'pagerOptional' => false, 'alphaNavigation' => true, 'filter' => 'candidate.last_name'), 'E-Mail' => array('select' => 'candidate.email1 AS email1', 'sortableColumn' => 'email1', 'pagerWidth' => 80, 'filter' => 'candidate.email1'), '2nd E-Mail' => array('select' => 'candidate.email2 AS email2', 'sortableColumn' => 'email2', 'pagerWidth' => 80, 'filter' => 'candidate.email2'), 'Home Phone' => array('select' => 'candidate.phone_home AS phoneHome', 'sortableColumn' => 'phoneHome', 'pagerWidth' => 80, 'filter' => 'candidate.phone_home'), 'Cell Phone' => array('select' => 'candidate.phone_cell AS phoneCell', 'sortableColumn' => 'phoneCell', 'pagerWidth' => 80, 'filter' => 'candidate.phone_cell'), 'Work Phone' => array('select' => 'candidate.phone_work AS phoneWork', 'sortableColumn' => 'phoneWork', 'pagerWidth' => 80), 'Address' => array('select' => 'candidate.address AS address', 'sortableColumn' => 'address', 'pagerWidth' => 250, 'alphaNavigation' => true, 'filter' => 'candidate.address'), 'City' => array('select' => 'candidate.city AS city', 'sortableColumn' => 'city', 'pagerWidth' => 80, 'alphaNavigation' => true, 'filter' => 'candidate.city'), 'State' => array('select' => 'candidate.state AS state', 'sortableColumn' => 'state', 'filterType' => 'dropDown', 'pagerWidth' => 50, 'alphaNavigation' => true, 'filter' => 'candidate.state'), 'Zip' => array('select' => 'candidate.zip AS zip', 'sortableColumn' => 'zip', 'pagerWidth' => 50, 'filter' => 'candidate.zip'), 'Misc Notes' => array('select' => 'candidate.notes AS notes', 'sortableColumn' => 'notes', 'pagerWidth' => 300, 'filter' => 'candidate.notes'), 'Web Site' => array('select' => 'candidate.web_site AS webSite', 'pagerRender' => 'return \'<a href="\'.htmlspecialchars($rsData[\'webSite\']).\'">\'.htmlspecialchars($rsData[\'webSite\']).\'</a>\';', 'sortableColumn' => 'webSite', 'pagerWidth' => 80, 'filter' => 'candidate.web_site'), 'Key Skills' => array('select' => 'candidate.key_skills AS keySkills', 'pagerRender' => 'return substr(trim($rsData[\'keySkills\']), 0, 30) . (strlen(trim($rsData[\'keySkills\'])) > 30 ? \'...\' : \'\');', 'sortableColumn' => 'keySkills', 'pagerWidth' => 210, 'filter' => 'candidate.key_skills'), 'Recent Status' => array('select' => '( SELECT CONCAT( \'<a href="' . CATSUtility::getIndexName() . '?m=joborders&a=show&jobOrderID=\', joborder.joborder_id, \'" title="\', joborder.title, \' (\', company.name, \')">\', candidate_joborder_status.short_description, \'</a>\' ) FROM candidate_joborder LEFT JOIN candidate_joborder_status ON candidate_joborder_status.candidate_joborder_status_id = candidate_joborder.status LEFT JOIN joborder ON joborder.joborder_id = candidate_joborder.joborder_id LEFT JOIN company ON joborder.company_id = company.company_id WHERE candidate_joborder.candidate_id = candidate.candidate_id ORDER BY candidate_joborder.date_modified DESC LIMIT 1 ) AS lastStatus ', 'sort' => 'lastStatus', 'pagerRender' => 'return $rsData[\'lastStatus\'];', 'exportRender' => 'return $rsData[\'lastStatus\'];', 'pagerWidth' => 140, 'exportable' => false, 'filterHaving' => 'lastStatus', 'filterTypes' => '=~'), 'Recent Status (Extended)' => array('select' => '( SELECT CONCAT( candidate_joborder_status.short_description, \'<br />\', \'<a href="' . CATSUtility::getIndexName() . '?m=companies&a=show&companyID=\', company.company_id, \'">\', company.name, \'</a> - \', \'<a href="' . CATSUtility::getIndexName() . '?m=joborders&a=show&jobOrderID=\', joborder.joborder_id, \'">\', joborder.title, \'</a>\' ) FROM candidate_joborder LEFT JOIN candidate_joborder_status ON candidate_joborder_status.candidate_joborder_status_id = candidate_joborder.status LEFT JOIN joborder ON joborder.joborder_id = candidate_joborder.joborder_id LEFT JOIN company ON joborder.company_id = company.company_id WHERE candidate_joborder.candidate_id = candidate.candidate_id ORDER BY candidate_joborder.date_modified DESC LIMIT 1 ) AS lastStatusLong ', 'sortableColumn' => 'lastStatusLong', 'pagerRender' => 'return $rsData[\'lastStatusLong\'];', 'pagerWidth' => 310, 'exportable' => false, 'filterable' => false), 'Source' => array('select' => 'candidate.source AS source', 'sortableColumn' => 'source', 'pagerWidth' => 140, 'alphaNavigation' => true, 'filter' => 'candidate.source'), 'Available' => array('select' => 'DATE_FORMAT(candidate.date_available, \'%m-%d-%y\') AS dateAvailable', 'sortableColumn' => 'dateAvailable', 'pagerWidth' => 60), 'Current Employer' => array('select' => 'candidate.current_employer AS currentEmployer', 'sortableColumn' => 'currentEmployer', 'pagerWidth' => 125, 'alphaNavigation' => true, 'filter' => 'candidate.current_employer'), 'Current Pay' => array('select' => 'candidate.current_pay AS currentPay', 'sortableColumn' => 'currentPay', 'pagerWidth' => 125, 'filter' => 'candidate.current_pay', 'filterTypes' => '===>=<'), 'Desired Pay' => array('select' => 'candidate.desired_pay AS desiredPay', 'sortableColumn' => 'desiredPay', 'pagerWidth' => 125, 'filter' => 'candidate.desired_pay', 'filterTypes' => '===>=<'), 'Can Relocate' => array('select' => 'candidate.can_relocate AS canRelocate', 'pagerRender' => 'return ($rsData[\'canRelocate\'] == 0 ? \'No\' : \'Yes\');', 'exportRender' => 'return ($rsData[\'canRelocate\'] == 0 ? \'No\' : \'Yes\');', 'sortableColumn' => 'canRelocate', 'pagerWidth' => 80, 'filter' => 'candidate.can_relocate'), 'Owner' => array('select' => 'owner_user.first_name AS ownerFirstName,' . 'owner_user.last_name AS ownerLastName,' . 'CONCAT(owner_user.last_name, owner_user.first_name) AS ownerSort', 'join' => 'LEFT JOIN user AS owner_user ON candidate.owner = owner_user.user_id', 'pagerRender' => 'return StringUtility::makeInitialName($rsData[\'ownerFirstName\'], $rsData[\'ownerLastName\'], false, LAST_NAME_MAXLEN);', 'exportRender' => 'return $rsData[\'ownerFirstName\'] . " " .$rsData[\'ownerLastName\'];', 'sortableColumn' => 'ownerSort', 'pagerWidth' => 75, 'alphaNavigation' => true, 'filter' => 'CONCAT(owner_user.first_name, owner_user.last_name)'), 'Created' => array('select' => 'DATE_FORMAT(candidate.date_created, \'%m-%d-%y\') AS dateCreated', 'pagerRender' => 'return $rsData[\'dateCreated\'];', 'sortableColumn' => 'dateCreatedSort', 'pagerWidth' => 60, 'filterHaving' => 'DATE_FORMAT(candidate.date_created, \'%m-%d-%y\')'), 'Modified' => array('select' => 'DATE_FORMAT(candidate.date_modified, \'%m-%d-%y\') AS dateModified', 'pagerRender' => 'return $rsData[\'dateModified\'];', 'sortableColumn' => 'dateModifiedSort', 'pagerWidth' => 60, 'pagerOptional' => false, 'filterHaving' => 'DATE_FORMAT(candidate.date_modified, \'%m-%d-%y\')'), 'Added To List' => array('select' => 'DATE_FORMAT(saved_list_entry.date_created, \'%m-%d-%y\') AS dateAddedToList, saved_list_entry.date_created AS dateAddedToListSort', 'pagerRender' => 'return $rsData[\'dateAddedToList\'];', 'sortableColumn' => 'dateAddedToListSort', 'pagerWidth' => 60, 'pagerOptional' => false, 'filterable' => false, 'exportable' => false), 'OwnerID' => array('select' => '', 'filter' => 'candidate.owner', 'pagerOptional' => false, 'filterable' => false, 'filterDescription' => 'Only My Candidates'), 'IsHot' => array('select' => '', 'filter' => 'candidate.is_hot', 'pagerOptional' => false, 'filterable' => false, 'filterDescription' => 'Only Hot Candidates')); if (US_ZIPS_ENABLED) { $this->_classColumns['Near Zipcode'] = array('select' => 'candidate.zip AS zip', 'filter' => 'candidate.zip', 'pagerOptional' => false, 'filterTypes' => '=@'); } /* Extra fields get added as columns here. */ $candidates = new Candidates($this->_siteID); $extraFieldsRS = $candidates->extraFields->getSettings(); foreach ($extraFieldsRS as $index => $data) { $fieldName = $data['fieldName']; if (!isset($this->_classColumns[$fieldName])) { $columnDefinition = $candidates->extraFields->getDataGridDefinition($index, $data, $this->_db); /* Return false for extra fields that should not be columns. */ if ($columnDefinition !== false) { $this->_classColumns[$fieldName] = $columnDefinition; } } } parent::__construct($instanceName, $parameters, $misc); }
<td> <select id="addFieldSelect<?php echo($index); ?>"> <?php foreach($this->extraFieldTypes as $extraFieldTypeIndex => $extraFieldTypeData): ?> <option value="<?php echo($extraFieldTypeIndex); ?>"><?php $this->_($extraFieldTypeData['name']); ?></option> <?php endforeach; ?> </select> </td> </tr> </table> <input type="button" class="button" value="Add Field" onclick="onAddField<?php echo($index); ?>();" /> <input type="button" class="button" value="Cancel" onclick="onHideAddArea<?php echo($index); ?>();" /> </div> <div id="addFieldOption<?php echo($index); ?>"> <a href="javascript:void(0);" onclick="document.getElementById('addField<?php echo($index); ?>').style.display=''; document.getElementById('addFieldOption<?php echo($index); ?>').style.display='none'; document.getElementById('addFieldName<?php echo($index); ?>').value=''; document.getElementById('addFieldName<?php echo($index); ?>').focus();"> <img src="images/actions/add_small.gif" border="0" /> Add field to <?php echo($data['name']); ?> </a> </div> <br /> <br /> </td> </tr> <?php endforeach; ?> </table> <input type="submit" class="button" value="Save" style="display:none;" id="buttonSave" /> <input type="button" name="back" class = "button" value="Done" id="buttonDone" onclick="document.location.href='<?php echo(CATSUtility::getIndexName()); ?>?m=settings&a=administration';" /> </form> <?php $AUIEO_CONTENT=ob_get_clean(); ?>
public function __construct($instanceName, $siteID, $parameters, $misc = 0) { $this->_db = DatabaseConnection::getInstance(); $this->_siteID = $siteID; $this->_assignedCriterion = ""; $this->_dataItemIDColumn = 'contact.contact_id'; $this->_classColumns = array('First Name' => array('select' => 'contact.first_name AS firstName', 'pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className = \'jobLinkHot\'; else $className = \'jobLinkCold\'; return \'<a href="' . CATSUtility::getIndexName() . '?m=contacts&a=show&contactID=\'.$rsData[\'contactID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'firstName\']).\'</a>\';', 'sortableColumn' => 'firstName', 'pagerWidth' => 75, 'pagerOptional' => false, 'alphaNavigation' => true, 'filter' => 'contact.first_name'), 'Last Name' => array('select' => 'contact.last_name AS lastName', 'sortableColumn' => 'lastName', 'pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className = \'jobLinkHot\'; else $className = \'jobLinkCold\'; return \'<a href="' . CATSUtility::getIndexName() . '?m=contacts&a=show&contactID=\'.$rsData[\'contactID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'lastName\']).\'</a>\';', 'pagerWidth' => 85, 'pagerOptional' => false, 'alphaNavigation' => true, 'filter' => 'contact.last_name'), 'Company' => array('select' => 'company.name AS name,' . 'company.company_id as companyID', 'pagerRender' => 'if ($rsData[\'isHot\'] == 1) $className = \'jobLinkHot\'; else $className = \'jobLinkCold\'; return \'<a href="' . CATSUtility::getIndexName() . '?m=companies&a=show&companyID=\'.$rsData[\'companyID\'].\'" class="\'.$className.\'">\'.htmlspecialchars($rsData[\'name\']).\'</a>\';', 'sortableColumn' => 'name', 'pagerWidth' => 60, 'pagerOptional' => true, 'alphaNavigation' => true, 'filter' => 'company.name'), 'Title' => array('select' => 'contact.title AS title', 'sortableColumn' => 'title', 'pagerWidth' => 140, 'alphaNavigation' => true, 'pagerOptional' => true, 'filter' => 'contact.title'), 'Department' => array('select' => 'company_department.company_department_id AS companyDepartmentID, company_department.name as department', 'join' => 'LEFT JOIN company_department on company_department.company_department_id = contact.company_department_id', 'sortableColumn' => 'department', 'pagerWidth' => 120, 'alphaNavigation' => true, 'pagerOptional' => true, 'filter' => 'company_department.department'), 'Work Phone' => array('select' => 'contact.phone_work AS workPhone', 'sortableColumn' => 'workPhone', 'pagerWidth' => 140, 'alphaNavigation' => false, 'pagerOptional' => true, 'filter' => 'contact.work_phone'), 'Cell Phone' => array('select' => 'contact.phone_cell AS cellPhone', 'sortableColumn' => 'cellPhone', 'pagerWidth' => 140, 'alphaNavigation' => false, 'pagerOptional' => true, 'filter' => 'contact.phone_cell'), 'Other Phone' => array('select' => 'contact.phone_other AS otherPhone', 'sortableColumn' => 'otherPhone', 'pagerWidth' => 140, 'alphaNavigation' => false, 'pagerOptional' => true, 'filter' => 'contact.phone_other'), 'E-Mail' => array('select' => 'contact.email1 AS email1', 'sortableColumn' => 'email1', 'pagerWidth' => 80, 'filter' => 'contact.email1'), '2nd E-Mail' => array('select' => 'contact.email2 AS email2', 'sortableColumn' => 'email2', 'pagerWidth' => 80, 'filter' => 'contact.email2'), 'Address' => array('select' => 'contact.address AS address', 'sortableColumn' => 'address', 'pagerWidth' => 250, 'alphaNavigation' => true, 'filter' => 'contact.address'), 'City' => array('select' => 'contact.city AS city', 'sortableColumn' => 'city', 'pagerWidth' => 80, 'alphaNavigation' => true, 'filter' => 'contact.city'), 'State' => array('select' => 'contact.state AS state', 'sortableColumn' => 'state', 'filterType' => 'dropDown', 'pagerWidth' => 50, 'alphaNavigation' => true, 'filter' => 'contact.state'), 'Zip' => array('select' => 'contact.zip AS zip', 'sortableColumn' => 'zip', 'pagerWidth' => 50, 'filter' => 'contact.zip'), 'Misc Notes' => array('select' => 'contact.notes AS notes', 'sortableColumn' => 'notes', 'pagerWidth' => 300, 'filter' => 'contact.notes'), 'Created' => array('select' => 'DATE_FORMAT(contact.date_created, \'%m-%d-%y\') AS dateCreated', 'pagerRender' => 'return $rsData[\'dateCreated\'];', 'sortableColumn' => 'dateCreatedSort', 'pagerWidth' => 60, 'filterHaving' => 'DATE_FORMAT(contact.date_created, \'%m-%d-%y\')'), 'Modified' => array('select' => 'DATE_FORMAT(contact.date_modified, \'%m-%d-%y\') AS dateModified', 'pagerRender' => 'return $rsData[\'dateModified\'];', 'sortableColumn' => 'dateModifiedSort', 'pagerWidth' => 60, 'pagerOptional' => false, 'filterHaving' => 'DATE_FORMAT(contact.date_modified, \'%m-%d-%y\')'), 'OwnerID' => array('select' => '', 'filter' => 'contact.owner', 'pagerOptional' => false, 'filterable' => false, 'filterDescription' => 'Only My Contacts'), 'IsHot' => array('select' => '', 'filter' => 'contact.is_hot', 'pagerOptional' => false, 'filterable' => false, 'filterDescription' => 'Only Hot Contacts')); if (US_ZIPS_ENABLED) { $this->_classColumns['Near Zipcode'] = array('select' => 'contact.zip AS zip', 'filter' => 'contact.zip', 'pagerOptional' => false, 'filterTypes' => '=@'); } /* Extra fields get added as columns here. */ $contacts = new Contacts($this->_siteID); $extraFieldsRS = $contacts->extraFields->getSettings(); foreach ($extraFieldsRS as $index => $data) { $fieldName = $data['fieldName']; if (!isset($this->_classColumns[$fieldName])) { $columnDefinition = $contacts->extraFields->getDataGridDefinition($index, $data, $this->_db); /* Return false for extra fields that should not be columns. */ if ($columnDefinition !== false) { $this->_classColumns[$fieldName] = $columnDefinition; } } } parent::__construct($instanceName, $parameters, $misc); }
<div id="contents"> <table width="100%"> <tr> <td width="3%"> <img src="images/settings.gif" width="24" height="24" border="0" alt="Settings" style="margin-top: 3px;" /> </td> <td align="left"><h2>Settings: Customization</h2></td> </tr> </table> <p class="note">Calendar Customization</p> <table> <tr> <td> <form name="editCalendarForm" id="editCalendarForm" action="<?php echo(CATSUtility::getIndexName()); ?>?m=settings&a=customizeCalendar" method="post"> <input type="hidden" name="postback" value="postback" /> <table class="editTable" width="700"> <tr> <td class="tdVertical" style="width:250px;"> Disable AJAX dynamic event loading: </td> <td class="tdData"> <input type="checkbox" name="noAjax"<?php if ($this->calendarSettingsRS['noAjax'] == '1'): ?> checked<?php endif; ?>> </td> </tr> <tr> <td class="tdVertical" style="width:250px;"> By default, all events are public: </td> <td class="tdData">
<?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
/** * Prints template header HTML. * * @param string page title * @param array JavaScript / CSS files to load * @return void */ private static function _printCommonHeader($pageTitle, $headIncludes = array()) { if (!is_array($headIncludes)) { $headIncludes = array($headIncludes); } $siteID = $_SESSION['CATS']->getSiteID(); /* This prevents caching problems when SVN updates are preformed. */ if ($_SESSION['CATS']->getCachedBuild() > 0) { $javascriptAntiCache = '?b=' . $_SESSION['CATS']->getCachedBuild(); } else { $javascriptAntiCache = '?v=' . CATSUtility::getVersionAsInteger(); } echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"', "\n"; echo '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', "\n"; echo '<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">', "\n"; echo '<head>', "\n"; echo '<title>CATS - ', $pageTitle, '</title>', "\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset=', HTML_ENCODING, '" />', "\n"; echo '<link rel="icon" href="images/favicon.ico" type="image/x-icon" />', "\n"; echo '<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />', "\n"; echo '<link rel="alternate" type="application/rss+xml" title="RSS" href="', CATSUtility::getIndexName(), '?m=rss" />', "\n"; /* Core JS files */ echo '<script type="text/javascript" src="js/lib.js' . $javascriptAntiCache . '"></script>', "\n"; echo '<script type="text/javascript" src="js/quickAction.js' . $javascriptAntiCache . '"></script>', "\n"; echo '<script type="text/javascript" src="js/calendarDateInput.js' . $javascriptAntiCache . '"></script>', "\n"; echo '<script type="text/javascript" src="js/submodal/subModal.js' . $javascriptAntiCache . '"></script>', "\n"; echo '<script type="text/javascript" src="js/jquery-1.3.2.min.js' . $javascriptAntiCache . '"></script>', "\n"; echo '<script type="text/javascript">CATSIndexName = "' . CATSUtility::getIndexName() . '";</script>', "\n"; $headIncludes[] = 'main.css'; foreach ($headIncludes as $key => $filename) { /* Done manually to prevent a global dependency on FileUtility. */ if ($filename == 'tinymce') { echo '<script language="javascript" type="text/javascript" src="lib/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>' . "\n" . '<script language="javascript" type="text/javascript">tinyMCE.init({ mode : "specific_textareas", editor_selector : "mceEditor", width : "100%", theme : "advanced", theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,separator,underline,forecolor,separator,removeformat,cleanup,separator,charmap,separator,undo,redo", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", language : "en", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_resizing : true, browsers : "msie,gecko,opera,safari", dialog_type : "modal", theme_advanced_resize_horizontal : false, convert_urls : false, relative_urls : false, remove_script_host : false, force_p_newlines : false, force_br_newlines : true, convert_newlines_to_brs : false, remove_linebreaks : false, fix_list_elements : true });</script>' . "\n"; } else { $extension = substr($filename, strrpos($filename, '.') + 1); $filename .= $javascriptAntiCache; if ($extension == 'js') { echo '<script type="text/javascript" src="', $filename, '"></script>', "\n"; } else { if ($extension == 'css') { echo '<style type="text/css" media="all">@import "', $filename, '";</style>', "\n"; } } } } echo '<!--[if IE]><link rel="stylesheet" type="text/css" href="ie.css" /><![endif]-->', "\n"; echo '<![if !IE]><link rel="stylesheet" type="text/css" href="not-ie.css" /><![endif]>', "\n"; echo '</head>', "\n\n"; }
<img src="images/new_window.gif" alt="(Preview)" border="0" width="15" height="15" /> </a> </td> <td valign="top" align="left"> <a href="<?php echo(CATSUtility::getIndexName()); ?>?m=contacts&a=show&contactID=<?php $this->_($data['contactID']); ?>" class="<?php $this->_($data['linkClassContact']); ?>"> <?php $this->_($data['firstName']); ?> </a> </td> <td valign="top" align="left"> <a href="<?php echo(CATSUtility::getIndexName()); ?>?m=contacts&a=show&contactID=<?php $this->_($data['contactID']); ?>" class="<?php $this->_($data['linkClassContact']); ?>"> <?php $this->_($data['lastName']); ?> </a> </td> <td valign="top" align="left"><?php $this->_($data['title']); ?></td> <td valign="top" align="left"> <a href="<?php echo(CATSUtility::getIndexName()); ?>?m=companies&a=show&companyID=<?php $this->_($data['companyID']); ?>" class="<?php $this->_($data['linkClassCompany']); ?>"> <?php $this->_($data['companyName']); ?> </a> </td> <td valign="top" align="left" nowrap="nowrap"><?php $this->_($data['dateCreated']); ?></td> <td valign="top" align="left" nowrap="nowrap"><?php $this->_($data['ownerAbbrName']); ?></td> </tr> <?php endforeach; ?> </table> <?php echo($this->exportForm['footer']); ?> <?php echo($this->exportForm['menu']); ?> <?php else: ?> <p>No matching entries found.</p> <?php endif; ?> <?php endif; ?> </div>
private function importBulkResumes() { if (!isset($_SESSION['CATS']) || empty($_SESSION['CATS'])) { CommonErrors::fatal(COMMONERROR_NOTLOGGEDIN, $this); } if ($_SESSION['CATS']->getAccessLevel() < ACCESS_LEVEL_SA) { CommonErrors::fatal(COMMONERROR_PERMISSION, $this); } $uploadPath = FileUtility::getUploadPath($this->_siteID, 'massimport'); $attachments = new Attachments($this->_siteID); $bulkResumes = $attachments->getBulkAttachments(); if (!count($bulkResumes)) { CommonErrors::fatal(COMMONERROR_BADINDEX, $this); } /** * Write the parsed resume contents to the new file which will * be created as a text document for each bulk attachment. */ foreach ($bulkResumes as $bulkResume) { $fullName = $bulkResume['originalFileName']; if (!strlen(trim($fullName))) { $fullName = 'Untitled'; } $mp = explode('.', $fullName); $fileName = implode('.', array_slice($mp, 0, -1)); if (!@file_exists($newFileName = $uploadPath . '/_BulkResume_' . $fileName . '.txt')) { // Some old files are fulltext encoded which makes them a pain for the parser, fixing here: $contents = DatabaseSearch::fulltextDecode($bulkResume['text']); @file_put_contents($newFileName, $contents); chmod($newFileName, 0777); } } CATSUtility::transferRelativeURI('m=import&a=massImport&step=2'); }
<?php endif; ?> </span> </td> </tr> <tr> <td> <label id="groupingLabel" for="grouping">Grouping:</label> </td> <td> <input type="checkbox" class="inputbox" id="grouping" name="grouping" <?php echo $this->checked; ?> /> * </td> </tr> <tr> <td colspan="2"> <br /> <input type="submit" class="button" id="butGrouping" name="butGrouping" value="Grouping" /> <input type="reset" class="button" id="reset" name="reset" value="Reset" /> <input type="button" name="back" class = "button" value="Back" onclick="document.location.href='<?php echo(CATSUtility::getIndexName()); ?>?m=settings';" /> </td> </tr> </table> </form> </div> <?php $AUIEO_CONTENT=ob_get_clean(); ?>
<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: Administration</h2></td> </tr> </table> <p class="note">E-Mail Settings</p> <table> <tr> <td> <form name="emailSettingsForm" id="emailSettingsForm" action="<?php echo(CATSUtility::getIndexName()); ?>?m=settings&a=emailSettings" method="post"> <input type="hidden" name="postback" value="postback" /> <input type="hidden" name="configured" value="1" /> <table class="editTable" width="700"> <tr id="fromAddressRow"> <td class="tdVertical" style="width: 175px;"> <label for="fromAddress" id="fromAddressLabel">From E-Mail Address for Outgoing Messages:</label> </td> <td class="tdData"> <input type="text" class="inputbox" name="fromAddress" id="fromAddress" value="<?php $this->_($this->mailerSettingsRS['fromAddress']); ?>" style="width: 180px;" /> </td> </tr> <tr> <td class="tdVertical" style="width: 175px;"> </td> <td class="tdData"> </td>
</tr> </table> <p class="noteUnsized">Add Job Order</p> <script type="text/javascript"> var typeOfAdd="new"; </script> <table class="editTable" width="100%"> <tr> <td class="tdData"><input type="radio" name="typeOfAddElement" onclick="document.getElementById('copyFrom').disabled=true; typeOfAdd='new';" checked> Empty Job Order</td> </tr> <tr> <td class="tdData"><input type="radio" name="typeOfAddElement" onclick="document.getElementById('copyFrom').disabled=false; typeOfAdd='existing';"> Copy Existing Job Order</td> </tr> <tr id="hideShowCopyExisting"> <td class="tdData"> <select name="copyFrom" id="copyFrom" style="width:350px;" disabled> <?php foreach($this->rs as $index => $data): ?> <option value="<?php echo($data['jobOrderID']); ?>"><?php $this->_($data['title'].' ('.$data['companyName'].')'); ?></option> <?php endforeach; ?> </select> </td> </tr> </table> <input type="button" class="button" value="Create Job Order" onclick="parentGoToURL('<?php echo(CATSUtility::getIndexName()); ?>?m=joborders&a=add&jobOrderID='+document.getElementById('copyFrom').value+'&typeOfAdd='+typeOfAdd);"/> <input type="button" class="button" name="close" value="Close" onclick="parentHidePopWin();" /> </body> </html> <?php $AUIEO_CONTENT=ob_get_clean(); ?>
* * Copyright (C) 2005 - 2007 Cognizo Technologies, Inc. * * * The contents of this file are subject to the CATS Public License * Version 1.1a (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.catsone.com/. Software distributed under the License is * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either * express or implied. See the License for the specific language governing * rights and limitations under the License. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * * The Original Code is "CATS Standard Edition". * * The Initial Developer of the Original Code is Cognizo Technologies, Inc. * Portions created by the Initial Developer are Copyright (C) 2005 - 2007 * (or from the year in which this file was created to the year 2007) by * Cognizo Technologies, Inc. All Rights Reserved. * * $Id: index.php 3078 2007-09-21 20:25:28Z will $ */ $xmlPage = true; chdir('..'); include_once './lib/CATSUtility.php'; include_once CATSUtility::getIndexName();
public function careerPortalQuestionnaireUpdate() { if ($this->_realAccessLevel < ACCESS_LEVEL_DEMO) { CommonErrors::fatal(COMMONERROR_PERMISSION, $this); return; } $questionnaire = new Questionnaire($this->_siteID); $data = $questionnaire->getAll(true); for ($i = 0; $i < count($data); $i++) { if (isset($_POST[$id = 'removeQuestionnaire' . $i]) && !strcasecmp($_POST[$id], 'yes')) { $questionnaire->delete($data[$i]['questionnaireID']); } } CATSUtility::transferRelativeURI('m=settings&a=careerPortalSettings'); }
/** * Returns the javascript for the apply filter function for the table. * The generated JS function is submitFilter[MD5](boolean). If the * argument is true, the property filterVisible is retained rather than * forced to true. If the argument is false, the property filterVisible is * set to false. If it is omitted, filterVisible is set to true. * * @return string Javascript */ public function _getApplyFilterFunctionDefinition() { $md5InstanceName = md5($this->_instanceName); $newParameterArray = $this->_parameters; $newParameterArray['rangeStart'] = 0; $newParameterArray['filter'] = '<dynamic>'; $newParameterArray['filterVisible'] = true; echo 'submitFilter', $md5InstanceName, ' = function(retainFilterVisible) { '; if (isset($this->ajaxMode) && $this->ajaxMode) { echo sprintf('populateAjaxPager(\'%s\', \'%s\', \'%s\', document.getElementById(\'filterArea%s\').value);', urlencode($this->_instanceName), urlencode(serialize($newParameterArray)), $_SESSION['CATS']->getCookie(), $md5InstanceName); } else { $requestString = $this->_getUnrelatedRequestString(); $requestString .= '&' . urlencode('parameters' . $this->_instanceName) . '=' . urlencode(serialize($newParameterArray)); echo 'if (typeof(retainFilterVisible) == \'undefined\') {'; echo sprintf('document.location.href=\'%s?%s&dynamicArgument%s=\' + urlEncode(document.getElementById(\'filterArea%s\').value);', CATSUtility::getIndexName(), $requestString, urlencode($this->_instanceName), $md5InstanceName); echo '} else if (typeof(retainFilterVisible) != \'undefined\' && retainFilterVisible == false) {'; $newParameterArray = $this->_parameters; $newParameterArray['rangeStart'] = 0; $newParameterArray['filter'] = '<dynamic>'; $newParameterArray['filterVisible'] = false; $requestString = $this->_getUnrelatedRequestString(); $requestString .= '&' . urlencode('parameters' . $this->_instanceName) . '=' . urlencode(serialize($newParameterArray)); echo sprintf('document.location.href=\'%s?%s&dynamicArgument%s=\' + urlEncode(document.getElementById(\'filterArea%s\').value);', CATSUtility::getIndexName(), $requestString, urlencode($this->_instanceName), $md5InstanceName); echo '} else {'; $newParameterArray = $this->_parameters; $newParameterArray['rangeStart'] = 0; $newParameterArray['filter'] = '<dynamic>'; $requestString = $this->_getUnrelatedRequestString(); $requestString .= '&' . urlencode('parameters' . $this->_instanceName) . '=' . urlencode(serialize($newParameterArray)); echo sprintf('document.location.href=\'%s?%s&dynamicArgument%s=\' + urlEncode(document.getElementById(\'filterArea%s\').value);', CATSUtility::getIndexName(), $requestString, urlencode($this->_instanceName), $md5InstanceName); echo '}'; } echo '}'; }
/** * Returns news for the dashboard (if a new version is available). * * @return html */ public static function getNews() { $systemInfoDb = new SystemInfo(); $systemInfo = $systemInfoDb->getSystemInfo(); /* Update daily. */ $lastWeeksDate = time() - SECONDS_IN_A_DAY; $lastCheck = strtotime($systemInfo['date_version_checked']); if ($lastWeeksDate > $lastCheck) { self::checkForUpdate(); /* Refresh the new information. */ $systemInfo = $systemInfoDb->getSystemInfo(); } /* Only display new version news if a new version is available. */ if ($systemInfo['available_version'] > CATSUtility::getVersionAsInteger()) { return urldecode($systemInfo['available_version_description']); } return ''; }
public function verificationImage() { // FIXME: mt_rand()?! srand((double) microtime() * 10000); $string = strtoupper(md5(rand(0, 10000))); $verifyString = substr($string, 0, 6); /* Replace some numbers so all of the characters are quite obviousally * as they look. */ $verifyString = str_replace('9', 'T', $verifyString); $verifyString = str_replace('6', 'Q', $verifyString); $verifyString = str_replace('5', 'R', $verifyString); $verifyString = str_replace('0', 'X', $verifyString); $verifyString = str_replace('1', 'P', $verifyString); $db = DatabaseConnection::getInstance(); $sql = sprintf("INSERT INTO word_verification (\n word\n )\n VALUES (\n %s\n )", $db->makeQueryString($verifyString)); $db->query($sql); $wordVerifyID = $db->getLastInsertID(); $HTML = '<img src="' . CATSUtility::getIndexName() . '?m=graphs&a=wordVerify&wordVerifyID=' . $wordVerifyID . '" alt="Graph" />'; $HTML .= '<input type="hidden" name="wordVerifyID" id="wordVerifyID" value="' . $wordVerifyID . '" />'; return $HTML; }
<tr> <td style="border-bottom: 1px solid #c0c0c0; font-weight: bold; padding-right: 10px;">Title (Internal)</td> <td style="border-bottom: 1px solid #c0c0c0; font-weight: bold; padding-right: 10px;">Completed</td> <td style="border-bottom: 1px solid #c0c0c0; font-weight: bold; padding-right: 10px;">Description (Public)</td> </tr> <?php foreach ($this->questionnaires as $questionnaire): ?> <tr> <td style="padding-right: 10px;" nowrap="nowrap"><a href="<?php echo(CATSUtility::getIndexName()); ?>?m=candidates&a=show_questionnaire&candidateID=<?php echo($this->candidateID); ?>&questionnaireTitle=<?php echo urlencode($questionnaire['questionnaireTitle']); ?>&print=no"><?php echo $questionnaire['questionnaireTitle']; ?></a></td> <td style="padding-right: 10px;" nowrap="nowrap"><?php echo date('F j. Y', strtotime($questionnaire['questionnaireDate'])); ?></td> <td style="padding-right: 10px;" nowrap="nowrap"><?php echo $questionnaire['questionnaireDescription']; ?></td> <td style="padding-right: 10px;" nowrap="nowrap"> <a id="edit_link" href="<?php echo(CATSUtility::getIndexName()); ?>?m=candidates&a=show_questionnaire&candidateID=<?php echo($this->candidateID); ?>&questionnaireTitle=<?php echo urlencode($questionnaire['questionnaireTitle']); ?>&print=no"> <img src="images/actions/view.gif" width="16" height="16" class="absmiddle" alt="view" border="0" /> View </a> <a id="edit_link" href="<?php echo(CATSUtility::getIndexName()); ?>?m=candidates&a=show_questionnaire&candidateID=<?php echo($this->candidateID); ?>&questionnaireTitle=<?php echo urlencode($questionnaire['questionnaireTitle']); ?>&print=yes"> <img src="images/actions/print.gif" width="16" height="16" class="absmiddle" alt="print" border="0" /> Print </a> </td> </tr> <?php endforeach; ?> </table> </td> </tr> <?php endif; ?> <tr> <td valign="top" class="vertical">Attachments:</td> <td valign="top" class="data"> <table class="attachmentsTable"> <?php foreach ($this->attachmentsRS as $rowNumber => $attachmentsData):
/** * Returns link HTML for a data item. * * @param flag Data Item type flag. * @param integer Data Item ID. * @param boolean Show name / data item title? * @return string Link HTML (<a href="...">...</a>). */ private function getHTMLOfLink($dataItemID, $dataItemType, $showTitle = true) { $string = '<a href="' . CATSUtility::getIndexName(); switch ($dataItemType) { case DATA_ITEM_CANDIDATE: $candidates = new Candidates($this->_siteID); $string .= '?m=candidates&a=show&candidateID=' . $dataItemID . '">'; $string .= '<img src="images/mru/candidate.gif" alt="" style="border: none;" title="Candidate" />'; if ($showTitle) { $data = $candidates->get($dataItemID); if (!isset($data['firstName'])) { $string = '<img src="images/mru/company.gif" alt="" style="border: none;" /> (Candidate Deleted)<a>'; } else { $string .= ' ' . $data['firstName'] . ' ' . $data['lastName']; } } $image = 'images/mru/candidate.gif'; break; case DATA_ITEM_COMPANY: $companies = new Companies($this->_siteID); $string .= '?m=companies&a=show&companyID=' . $dataItemID . '">'; $string .= '<img src="images/mru/company.gif" alt="" style="border: none;" title="Company" />'; if ($showTitle) { $data = $companies->get($dataItemID); if (!isset($data['name'])) { $string = '<img src="images/mru/company.gif" alt="" style="border: none;" /> (Company Deleted)<a>'; } else { $string .= ' ' . $data['name']; } } break; case DATA_ITEM_CONTACT: $contacts = new Contacts($this->_siteID); $string .= '?m=contacts&a=show&contactID=' . $dataItemID . '">'; $string .= '<img src="images/mru/contact.gif" alt="" style="border: none;" title="Contact" />'; if ($showTitle) { $data = $contacts->get($dataItemID); if (!isset($data['firstName'])) { $string = '<img src="images/mru/contact.gif" alt="" style="border: none;" /> (Contact Deleted)<a>'; } else { $string .= ' ' . $data['firstName'] . ' ' . $data['lastName']; } } break; case DATA_ITEM_JOBORDER: $jobOrders = new JobOrders($this->_siteID); $string .= '?m=joborders&a=show&jobOrderID=' . $dataItemID . '">'; $string .= '<img src="images/mru/job_order.gif" alt="" style="border: none;" title="Job Order" />'; if ($showTitle) { $data = $jobOrders->get($dataItemID); if (!isset($data['title'])) { $string = '<img src="images/mru/job_order.gif" alt="" style="border: none;" /> (Job Order Deleted)<a>'; } else { $string .= ' ' . $data['title']; } } break; } $string .= '</a>'; return $string; }
private function onDeleteAttachment() { if ($this->_accessLevel < ACCESS_LEVEL_DELETE) { $this->listByView('Invalid user level for action.'); return; } /* Bail out if we don't have a valid attachment ID. */ if (!$this->isRequiredIDValid('attachmentID', $_GET)) { CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this, 'Invalid attachment ID.'); } /* Bail out if we don't have a valid joborder ID. */ if (!$this->isRequiredIDValid('companyID', $_GET)) { CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this, 'Invalid company ID.'); } $companyID = $_GET['companyID']; $attachmentID = $_GET['attachmentID']; if (!eval(Hooks::get('CLIENTS_ON_DELETE_ATTACHMENT_PRE'))) { return; } $attachments = new Attachments($this->_siteID); $attachments->delete($attachmentID); if (!eval(Hooks::get('CLIENTS_ON_DELETE_ATTACHMENT_POST'))) { return; } CATSUtility::transferRelativeURI('m=companies&a=show&companyID=' . $companyID); }
</tr> </table> </td> </tr> </table> <br clear="all" /> <br /> <p class="note">Candidate Pipeline</p> <p id="ajaxPipelineControl"> Number of visible entries: <select id="numberOfEntriesSelect" onchange="PipelineJobOrder_changeLimit(<?php $this->_($this->data['jobOrderID']); ?>, this.value, <?php echo(1); ?>, 'ajaxPipelineTable', '<?php echo($this->sessionCookie); ?>', 'ajaxPipelineTableIndicator', '<?php echo(CATSUtility::getIndexName()); ?>');" class="selectBox"> <option value="15" <?php if ($this->pipelineEntriesPerPage == 15): ?>selected<?php endif; ?>>15 entries</option> <option value="30" <?php if ($this->pipelineEntriesPerPage == 30): ?>selected<?php endif; ?>>30 entries</option> <option value="50" <?php if ($this->pipelineEntriesPerPage == 50): ?>selected<?php endif; ?>>50 entries</option> <option value="99999" <?php if ($this->pipelineEntriesPerPage == 99999): ?>selected<?php endif; ?>>All entries</option> </select> <span id="ajaxPipelineNavigation"> </span> <img src="images/indicator.gif" alt="" id="ajaxPipelineTableIndicator" /> </p> <div id="ajaxPipelineTable"> </div> <script type="text/javascript"> PipelineJobOrder_populate(<?php $this->_($this->data['jobOrderID']); ?>, 0, <?php $this->_($this->pipelineEntriesPerPage); ?>, 'dateCreatedInt', 'desc', <?php echo(1); ?>, 'ajaxPipelineTable', '<?php echo($this->sessionCookie); ?>', 'ajaxPipelineTableIndicator', '<?php echo(CATSUtility::getIndexName()); ?>'); </script> <?php $AUIEO_CONTENT=ob_get_clean(); ?>
$URI = 'm=login'; /* Local demo account doesn't relogin. */ if (!empty($unixName) && $unixName != 'demo') { $URI .= '&s=' . $unixName; } if (isset($_GET['message'])) { $URI .= '&message=' . urlencode($_GET['message']); } if (isset($_GET['messageSuccess'])) { $URI .= '&messageSuccess=' . urlencode($_GET['messageSuccess']); } /* catsone.com demo domain doesn't relogin. */ if (strpos(CATSUtility::getIndexName(), '://demo.catsone.com') !== false) { CATSUtility::transferURL('http://www.catsone.com'); } else { CATSUtility::transferRelativeURI($URI); } } else { if (!ModuleUtility::moduleRequiresAuthentication($_GET['m'])) { /* No authentication required; load the module. */ ModuleUtility::loadModule($_GET['m']); } else { if (!$_SESSION['CATS']->isLoggedIn()) { /* User isn't logged in and authentication is required; send the user * to the login page. */ ModuleUtility::loadModule('login'); } else { /* Everything's good; load the requested module. */ $_SESSION['CATS']->logPageView(); ModuleUtility::loadModule($_GET['m']);
/** * Transfers, via a Location: header, the "absolute" version of a URI that * is relative to index.php?. * * @param string Relative URI. * @return void */ public static function transferRelativeURI($relativePath) { $newLocation = self::getAbsoluteURI(CATSUtility::getIndexName() . '?' . $relativePath); self::transferURL($newLocation); }
</a> <a id="history_link" href="<?php echo(CATSUtility::getIndexName()); ?>?m=settings&a=transfer&dataItemType=100&dataItemID=<?php echo($this->candidateID); ?>"> Transfer </a> <a id="history_link" href="<?php echo(CATSUtility::getIndexName()); ?>?m=settings&a=duplicate&dataItemType=100&dataItemID=<?php echo($this->candidateID); ?>"> Copy </a> <?php } if ($this->accessLevel >= ACCESS_LEVEL_MULTI_SA){ ?> <?php if ($this->data['is_admin_hidden'] == 1){ ?> <a href="<?php echo(CATSUtility::getIndexName()); ?>?m=candidates&a=administrativeHideShow&candidateID=<?php echo($this->candidateID); ?>&state=0"> <img src="images/resume_preview_inline.gif" width="16" height="16" class="absmiddle" alt="delete" border="0" /> Administrative Show </a> <?php }else{ ?> <a href="<?php echo(CATSUtility::getIndexName()); ?>?m=candidates&a=administrativeHideShow&candidateID=<?php echo($this->candidateID); ?>&state=1"> <img src="images/resume_preview_inline.gif" width="16" height="16" class="absmiddle" alt="delete" border="0" /> Administrative Hide </a> <?php } ?> <?php } ?> <br clear="all" /> <br /> <p class="note">Emails <span style="float:right;"><a href="index.php?m=candidates&a=emailCandidates&idlist=<?php echo $this->candidateID; ?>">Send Email</a></span></p> <table class="sortablepair"> <tr> <th align="left">Date</th> <th align="left">Subject</th> <th align="left">From</th> <th align="left">To</th>