$strOperator = 'LIKE';
                 }
                 $arrFILTERCustom[$nFILTERCustomID]['strOperator'] = $strOperator;
                 break;
             case 'Value':
                 $arrFILTERCustom[$nFILTERCustomID]['strValue'] = unescape($value, $DEFAULT_CHARSET);
                 break;
         }
         $nIndexValues++;
     }
 }
 $FILTER_CUSTOM = false;
 if (sizeof($arrFILTERCustom) > 0 && $arrFILTERCustom[0]['strValue'] != '') {
     $FILTER_CUSTOM = $arrFILTERCustom;
 }
 $arrCirculationOverview = $objCirculation->getCirculationOverview($start, $sortby, $sortDirection, $archivemode, $nShowRows, 1, $_REQUEST['FILTER_Name'], $_REQUEST['FILTER_Sender'], $_REQUEST['FILTER_Mailinglist'], $_REQUEST['FILTER_Station'], $_REQUEST['FILTER_DaysInProgress_Start'], $_REQUEST['FILTER_DaysInProgress_End'], $_REQUEST['FILTER_Date_Start'], $_REQUEST['FILTER_Date_End'], $_REQUEST['FILTER_Template'], $FILTER_CUSTOM);
 if ($_REQUEST['FILTER_Name'] != '' || $_REQUEST['FILTER_Sender'] != '' || $_REQUEST['FILTER_Mailinglist'] != '' || $_REQUEST['FILTER_Station'] != '' || $_REQUEST['FILTER_DaysInProgress_Start'] != '' || $_REQUEST['FILTER_DaysInProgress_End'] != '' || $_REQUEST['FILTER_Date_Start'] != '' || $_REQUEST['FILTER_Date_End'] != '' || $_REQUEST['FILTER_Template'] != '0' || $FILTER_CUSTOM != false) {
     // TODO
     if ($FILTER_CUSTOM != false && sizeof($FILTER_CUSTOM) > 0) {
         $arrResults = array();
         $nMyCounter = 0;
         $nMax = sizeof($FILTER_CUSTOM);
         for ($nIndex = 0; $nIndex < $nMax; $nIndex++) {
             $arrFilter = $FILTER_CUSTOM[$nIndex];
             $nInputfieldId = $arrFilter['nInputFieldID'];
             $strOperator = $arrFilter['strOperator'];
             $strValue = $arrFilter['strValue'];
             if ($strValue != '') {
                 $arrResults = array();
                 $nMyCounter = 0;
                 $nMaxOverview = sizeof($arrCirculationOverview);
Exemplo n.º 2
0
include '../classes/RssFeedItem.php';
include '../classes/RssFeed.php';
include '../config/config.inc.php';
include '../config/db_connect.inc.php';
include_once 'CCirculation.inc.php';
include '../language_files/language.inc.php';
$language = $_REQUEST['language'];
$archivemode = $_REQUEST['archivemode'];
$sortDirection = $_REQUEST['sortDirection'];
$sortby = $_REQUEST['sortby'];
$start = $_REQUEST['start'];
$nShowRows = $_REQUEST['nShowRows'];
//http://cuteflowbranch/pages/todo_feed.php?language=de&archivemode=0&start=1&nShowRows=50&sortby=COL_CIRCULATION_PROCESS_DAYS&sortDirection=DESC&uid=1
$objRssFeed = new RssFeed();
$objCirculation = new CCirculation();
$arrCirculationOverview = $objCirculation->getCirculationOverview($start, $sortby, $sortDirection, $archivemode, 50, 0, '', false, false, $_REQUEST['uid']);
foreach ($arrCirculationOverview as $item) {
    $feed_item = new RssFeedItem();
    $feed_item->setTitle($item['strName']);
    $nCirculationFormID = $item['nID'];
    $nSenderID = $item['nSenderId'];
    $strTitle = $item['strName'];
    $nMailingListId = $item['nMailingListId'];
    if ($item['strCurStation'] != '') {
        $strCurStation = $item['strCurStation'];
    }
    $arrDecissionState = $objCirculation->getDecissionState($nCirculationFormID);
    $strStartDate = $objCirculation->getStartDate($nCirculationFormID);
    $strSender = $objCirculation->getSender($nCirculationFormID);
    $arrMaillist = $objCirculation->getMailinglist($nMailingListId);
    $strMaillist = $arrMaillist['strName'];
 */
require_once '../config/config.inc.php';
$_REQUEST['language'] = $DEFAULT_LANGUAGE;
require_once '../lib/swift/swift_required.php';
require_once '../language_files/language.inc.php';
require_once '../config/db_connect.inc.php';
require_once 'CCirculation.inc.php';
$objCirculation = new CCirculation();
// get all active users
$query = "SELECT * FROM cf_user WHERE bDeleted=0";
$user_result = mysql_query($query, $nConnection);
while ($user = mysql_fetch_array($user_result)) {
    // send reminder email to user
    // first: getting all open circulations of this user
    $circulations_aggregated = array();
    $circulations = $objCirculation->getCirculationOverview(1, 'COL_CIRCULATION_PROCESS_DAYS', 'DESC', false, 100, true, '', false, false, $user['nID']);
    foreach ($circulations as $circulation) {
        $arrDecissionState = $objCirculation->getDecissionState($circulation['nID']);
        $strStartDate = $objCirculation->getStartDate($circulation['nID']);
        $strSender = $objCirculation->getSender($circulation['nID']);
        $single_circulations_aggregated['circulation_name'] = $circulation['strName'];
        $single_circulations_aggregated['circulation_start'] = $strStartDate;
        $single_circulations_aggregated['circulation_sender'] = $strSender;
        $single_circulations_aggregated['circulation_name'] = $circulation['strName'];
        $single_circulations_aggregated['circulation_process_time'] = $arrDecissionState["nDaysInProgress"];
        $single_circulations_aggregated['circulation_url'] = '';
        $circulations_aggregated[] = $single_circulations_aggregated;
    }
    if (count($circulations_aggregated) > 0) {
        // second: create email message body
        $useGeneralEmailConfig = $user['bUseGeneralEmailConfig'];