コード例 #1
0
 * 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: getPipelineDetails.php 2976 2007-08-30 18:18:48Z andrew $
 */
include_once './lib/Pipelines.php';
$interface = new SecureAJAXInterface();
if (!$interface->isRequiredIDValid('candidateJobOrderID', false)) {
    $interface->outputXMLErrorPage(-1, 'Invalid candidate-joborder ID.');
    die;
}
$siteID = $interface->getSiteID();
$candidateJobOrderID = $_REQUEST['candidateJobOrderID'];
/* Get an array of the company's contacts data. */
$pipelines = new Pipelines($siteID);
$pipelineActivitiesRS = $pipelines->getPipelineDetails($candidateJobOrderID);
foreach ($pipelineActivitiesRS as $rowIndex => $row) {
    if (empty($pipelineActivitiesRS[$rowIndex]['notes'])) {
        $pipelineActivitiesRS[$rowIndex]['notes'] = '(No Notes)';
    }
}
/* Output HTML. */
echo '<div class="noteUnsizedSpan">Activity History:</div>', '<table>';
if (empty($pipelineActivitiesRS)) {
コード例 #2
0
 * 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: getAttachmentLocal.php 3078 2007-09-21 20:25:28Z will $
 */
$interface = new SecureAJAXInterface();
include_once './lib/CommonErrors.php';
include_once './lib/Attachments.php';
@ini_set('memory_limit', '256M');
if (!isset($_POST['id']) || !$interface->isRequiredIDValid('id')) {
    $interface->outputXMLErrorPage(-2, 'No attachment ID specified.');
    die;
}
$attachmentID = $_POST['id'];
$attachments = new Attachments(-1);
$rs = $attachments->get($attachmentID, false);
if (!isset($rs['directoryName']) || !isset($rs['storedFilename']) || md5($rs['directoryName']) != $_POST['directoryNameHash']) {
    $interface->outputXMLErrorPage(-2, 'Invalid directory name hash.');
    die;
}
$directoryName = $rs['directoryName'];
$fileName = $rs['storedFilename'];
/* Check for the existence of the backup.  If it is gone, send the user to a page informing them to press back and generate the backup again. */
if ($rs['contentType'] == 'catsbackup') {
    if (!file_exists('attachments/' . $directoryName . '/' . $fileName)) {
        $interface->outputXMLErrorPage(-2, 'The specified backup file no longer exists.  Please press back and regenerate the backup before downloading.  We are sorry for the inconvenience.');
コード例 #3
0
 * 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: setCandidateJobOrderRating.php 1479 2007-01-17 00:22:21Z will $
 */
include_once './lib/Pipelines.php';
$interface = new SecureAJAXInterface();
if ($_SESSION['CATS']->getAccessLevel() < ACCESS_LEVEL_EDIT) {
    $interface->outputXMLErrorPage(-1, ERROR_NO_PERMISSION);
    die;
}
if (!$interface->isRequiredIDValid('candidateJobOrderID')) {
    $interface->outputXMLErrorPage(-1, 'Invalid candidate-joborder ID.');
    die;
}
if (!$interface->isRequiredIDValid('rating', true, true) || $_REQUEST['rating'] < -6 || $_REQUEST['rating'] > 5) {
    $interface->outputXMLErrorPage(-1, 'Invalid rating.');
    die;
}
$siteID = $interface->getSiteID();
$candidateJobOrderID = $_REQUEST['candidateJobOrderID'];
$rating = $_REQUEST['rating'];
$pipelines = new Pipelines($siteID);
$pipelines->updateRatingValue($candidateJobOrderID, $rating);
コード例 #4
0
ファイル: addToLists.php プロジェクト: PublicityPort/OpenCATS
    if (empty($value) && ($value !== '0' || !$allowZero)) {
        return false;
    }
    /* -0 should not be allowed. */
    if ($value === '-0') {
        return false;
    }
    /* Only allow digits. */
    if (!ctype_digit($value)) {
        return false;
    }
    return true;
}
$interface = new SecureAJAXInterface();
if (!isset($_REQUEST['listsToAdd'])) {
    $interface->outputXMLErrorPage(-1, 'No listsToAdd passed.');
    die;
}
if (!isset($_REQUEST['itemsToAdd'])) {
    $interface->outputXMLErrorPage(-1, 'No itemsToAdd passed.');
    die;
}
if (!$interface->isRequiredIDValid('dataItemType')) {
    $interface->outputXMLErrorPage(-1, 'Invalid saved list type.');
    die;
}
$siteID = $interface->getSiteID();
$listsToAdd = explode(',', $_REQUEST['listsToAdd']);
$itemsToAdd = explode(',', $_REQUEST['itemsToAdd']);
$dataItemType = $_REQUEST['dataItemType'];
foreach ($listsToAdd as $index => $data) {
コード例 #5
0
 * 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.
 *
 * 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: deleteActivity.php 1479 2007-01-17 00:22:21Z will $
 */
include_once './lib/ActivityEntries.php';
$interface = new SecureAJAXInterface();
if (!$interface->isRequiredIDValid('activityID')) {
    $interface->outputXMLErrorPage(-1, 'Invalid activity ID.');
    die;
}
$siteID = $interface->getSiteID();
$activityID = $_REQUEST['activityID'];
/* Delete the activity entry. */
$activityEntries = new ActivityEntries($siteID);
$activityEntries->delete($activityID);
/* Send back the XML data. */
$interface->outputXMLSuccessPage();
コード例 #6
0
 * 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: getPipelineJobOrder.php 3814 2007-12-06 17:54:28Z brian $
 */
include_once './lib/Pipelines.php';
include_once './lib/TemplateUtility.php';
include_once './lib/StringUtility.php';
include_once './lib/CATSUtility.php';
include_once './lib/Hooks.php';
include_once './lib/JobOrders.php';
$interface = new SecureAJAXInterface();
if (!isset($_REQUEST['joborderID']) || !isset($_REQUEST['page']) || !isset($_REQUEST['entriesPerPage']) || !isset($_REQUEST['sortBy']) || !isset($_REQUEST['sortDirection'])) {
    $interface->outputXMLErrorPage(-1, 'Invalid input.');
    die;
}
$siteID = $interface->getSiteID();
$jobOrderID = $_REQUEST['joborderID'];
$page = $_REQUEST['page'];
$entriesPerPage = $_REQUEST['entriesPerPage'];
$sortBy = $_REQUEST['sortBy'];
$sortDirection = $_REQUEST['sortDirection'];
$indexFile = $_REQUEST['indexFile'];
$isPopup = $_REQUEST['isPopup'] == 1 ? true : false;
$_SESSION['CATS']->setPipelineEntriesPerPage($entriesPerPage);
$jobOrders = new JobOrders($siteID);
$jobOrdersData = $jobOrders->get($jobOrderID);
/* Get an array of the pipeline data. */
$pipelines = new Pipelines($siteID);
コード例 #7
0
 * 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: editActivity.php 2883 2007-08-14 15:25:26Z brian $
 */
include_once './lib/StringUtility.php';
include_once './lib/ActivityEntries.php';
include_once './lib/Pipelines.php';
$interface = new SecureAJAXInterface();
if (!$interface->isRequiredIDValid('activityID')) {
    $interface->outputXMLErrorPage(-1, 'Invalid activity ID.');
    die;
}
if (!$interface->isRequiredIDValid('type')) {
    $interface->outputXMLErrorPage(-1, 'Invalid activity entry type.');
    die;
}
if (!$interface->isOptionalIDValid('jobOrderID')) {
    $interface->outputXMLErrorPage(-1, 'Invalid job order ID.');
    die;
}
if (!isset($_REQUEST['notes'])) {
    $interface->outputXMLErrorPage(-1, 'Invalid notes.');
    die;
}
$siteID = $interface->getSiteID();
コード例 #8
0
 * 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: getCompanyLocation.php 2359 2007-04-21 22:49:17Z will $
 */
include_once './lib/Companies.php';
$interface = new SecureAJAXInterface();
if (!$interface->isRequiredIDValid('companyID', false)) {
    $interface->outputXMLErrorPage(-1, 'Invalid company ID.');
    die;
}
$siteID = $interface->getSiteID();
$companyID = $_REQUEST['companyID'];
/* Get an array of the company's location data. */
$companies = new Companies($siteID);
$locationArray = $companies->getLocationArray($companyID);
if (empty($locationArray)) {
    $interface->outputXMLErrorPage(-2, 'No location data.');
    die;
}
/* Send back the XML data. */
$interface->outputXMLPage("<data>\n" . "    <errorcode>0</errorcode>\n" . "    <errormessage></errormessage>\n" . "    <address>" . $locationArray['address'] . "</address>\n" . "    <city>" . $locationArray['city'] . "</city>\n" . "    <state>" . $locationArray['state'] . "</state>\n" . "    <zip>" . $locationArray['zip'] . "</zip>\n" . "</data>\n");
コード例 #9
0
ファイル: deleteList.php プロジェクト: PublicityPort/OpenCATS
 * 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.
 *
 * 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: deleteList.php 3198 2007-10-14 23:36:43Z will $
 */
include_once './lib/StringUtility.php';
include_once './lib/ActivityEntries.php';
include_once './lib/SavedLists.php';
$interface = new SecureAJAXInterface();
if (!$interface->isRequiredIDValid('savedListID')) {
    $interface->outputXMLErrorPage(-1, 'Invalid saved list ID.');
    die;
}
$siteID = $interface->getSiteID();
$savedListID = $_REQUEST['savedListID'];
$savedLists = new SavedLists($siteID);
/* Write changes. */
$savedLists->delete($savedListID);
$interface->outputXMLPage("<data>\n" . "    <errorcode>0</errorcode>\n" . "    <errormessage></errormessage>\n" . "    <response>success</response>\n" . "</data>\n");
コード例 #10
0
 *
 * 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: testEmailSettings.php 2101 2007-03-06 00:20:17Z brian $
 */
include_once './lib/Mailer.php';
$interface = new SecureAJAXInterface();
$siteID = $interface->getSiteID();
if (!isset($_REQUEST['testEmailAddress']) || empty($_REQUEST['testEmailAddress'])) {
    $interface->outputXMLErrorPage(-1, 'Invalid test e-mail address.');
    die;
}
if (!isset($_REQUEST['fromAddress']) || empty($_REQUEST['fromAddress'])) {
    $interface->outputXMLErrorPage(-1, 'Invalid from e-mail address.');
    die;
}
$testEmailAddress = $_REQUEST['testEmailAddress'];
$fromAddress = $_REQUEST['fromAddress'];
/* Is the test e-mail address specified valid? */
// FIXME: Validate properly.
if (strpos($testEmailAddress, '@') === false) {
    $interface->outputXMLErrorPage(-2, 'Invalid test e-mail address.');
    die;
}
/* Is the from e-mail address specified valid? */
コード例 #11
0
 * 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: getCompanyContacts.php 1892 2007-02-20 06:44:04Z will $
 */
include_once './lib/Companies.php';
$interface = new SecureAJAXInterface();
if (!$interface->isRequiredIDValid('companyID', false)) {
    $interface->outputXMLErrorPage(-1, 'Invalid company ID.');
    die;
}
$siteID = $interface->getSiteID();
$companyID = $_REQUEST['companyID'];
/* Get an array of the company's contacts data. */
$companies = new Companies($siteID);
$contactsArray = $companies->getContactsArray($companyID);
if (empty($contactsArray)) {
    $interface->outputXMLErrorPage(-2, 'No contacts data.');
    die;
}
$output = "<data>\n" . "    <errorcode>0</errorcode>\n" . "    <errormessage></errormessage>\n";
foreach ($contactsArray as $rowIndex => $row) {
    $output .= "    <contact>\n" . "        <id>" . $contactsArray[$rowIndex]['contactID'] . "</id>\n" . "        <firstname>" . $contactsArray[$rowIndex]['firstName'] . "</firstname>\n" . "        <lastname>" . $contactsArray[$rowIndex]['lastName'] . "</lastname>\n" . "    </contact>\n";
}
コード例 #12
0
 *
 * 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: getCompanyNames.php 2367 2007-04-23 23:24:05Z will $
 */
include_once './lib/Companies.php';
include_once './lib/Search.php';
$interface = new SecureAJAXInterface();
if (!isset($_REQUEST['dataName'])) {
    $interface->outputXMLErrorPage(-1, 'Invalid data name.');
    die;
}
if (!$interface->isRequiredIDValid('maxResults')) {
    $interface->outputXMLErrorPage(-1, 'Invalid max results count.');
    die;
}
$siteID = $interface->getSiteID();
$dataName = trim($_REQUEST['dataName']);
$maxResults = $_REQUEST['maxResults'];
$search = new SearchCompanies($siteID);
$companiesArray = $search->byName($dataName, 'company.name', 'ASC');
if (empty($companiesArray)) {
    $interface->outputXMLErrorPage(-2, 'No companies data.');
    die;
}
コード例 #13
0
ファイル: newList.php プロジェクト: PublicityPort/OpenCATS
 * 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: newList.php 3198 2007-10-14 23:36:43Z will $
 */
include_once './lib/StringUtility.php';
include_once './lib/ActivityEntries.php';
include_once './lib/SavedLists.php';
$interface = new SecureAJAXInterface();
if (!$interface->isRequiredIDValid('dataItemType')) {
    $interface->outputXMLErrorPage(-1, 'Invalid saved list type.');
    die;
}
if (!isset($_REQUEST['description'])) {
    $interface->outputXMLErrorPage(-1, 'Invalid name.');
    die;
}
$siteID = $interface->getSiteID();
$savedListName = $_REQUEST['description'];
$dataItemType = $_REQUEST['dataItemType'];
$savedLists = new SavedLists($siteID);
/* Validate the lists - if name is in use or name is blank, fail. */
if ($savedLists->getIDByDescription($savedListName) != -1) {
    $interface->outputXMLPage("<data>\n" . "    <errorcode>0</errorcode>\n" . "    <errormessage></errormessage>\n" . "    <response>collision</response>\n" . "</data>\n");
    die;
}
コード例 #14
0
 * 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: getDataItemJobOrders.php 1892 2007-02-20 06:44:04Z will $
 */
$interface = new SecureAJAXInterface();
if (!$interface->isRequiredIDValid('dataItemID')) {
    $interface->outputXMLErrorPage(-1, 'Invalid data item ID.');
    die;
}
if (!$interface->isRequiredIDValid('dataItemType')) {
    $interface->outputXMLErrorPage(-1, 'Invalid data item type.');
    die;
}
$siteID = $interface->getSiteID();
$dataItemType = $_REQUEST['dataItemType'];
$dataItemID = $_REQUEST['dataItemID'];
switch ($dataItemType) {
    case DATA_ITEM_CANDIDATE:
        include_once './lib/Candidates.php';
        $dataItem = new Candidates($siteID);
        break;
    case DATA_ITEM_COMPANY: