*
 * 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);
$newRating = $pipelines->getRatingValue($candidateJobOrderID);
$output = "<data>\n" . "    <errorcode>0</errorcode>\n" . "    <errormessage></errormessage>\n" . "    <newrating>" . $newRating . "</newrating>\n" . "</data>\n";
/* Send back the XML data. */
Exemplo n.º 2
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: 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>';
Exemplo n.º 3
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();
Exemplo n.º 4
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)) {
Exemplo n.º 5
0
    /* 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) {
    if ($data == '') {
        unset($listsToAdd[$index]);
    } else {
        if (isRequiredValueValid($data) == false) {
            $interface->outputXMLErrorPage(-1, 'Invalid lists value. (' . $data . ')');
            die;
        }
Exemplo n.º 6
0
 * 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");
Exemplo n.º 7
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");
Exemplo n.º 8
0
    echo '<script type="text/javascript">watchBackup(\'', $directory,
        '\', \'', $extraPOSTData, '\', \'settings:backup\');</script>';

}

if ($action == 'backup')
{
    include_once('./lib/FileCompressor.php');
    
    /* Backups shouldn't time out. */
    set_time_limit(0);
    
    // FIXME: Make this configurable.
    @ini_set('memory_limit', '192M');

    if (!$interface->isRequiredIDValid('attachmentID'))
    {
        die('Error: Invalid attachment ID.');
    }

    $attachmentID    = $_REQUEST['attachmentID'];
    $attachmentsOnly = $interface->isChecked('attachmentsOnly');
    
    $siteID = $_SESSION['CATS']->getSiteID();
    $db = DatabaseConnection::getInstance();

    /* Our "temp" path, as well as the path where the final zip file will be
     * saved.
     */
    $directory = $_SESSION['CATS']->retrieveValueByName('backupDirectory');
Exemplo n.º 9
0
 * 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;
}
$output = "<data>\n" . "    <errorcode>0</errorcode>\n" . "    <errormessage></errormessage>\n" . "    <totalelements>" . count($companiesArray) . "</totalelements>\n";
$arrayCounter = 0;
foreach ($companiesArray as $rowIndex => $row) {