Ejemplo n.º 1
0
        //Get the array without previous records
        $arrDiff = array_diff_assoc($_SESSION["arrUpdateEmails"], $_SESSION["arrCurrentRecords"]);
    } else {
        $arrDiff = $_SESSION["arrUpdateEmails"];
    }
    /*
    		echo "<br>Diff Array array is <pre>";
    		print_r($arrDiff);
    		echo "</pre><br>";
    		echo "<br>Post Array array is <pre>";
    		print_r($_POST["to"]);
    		echo "</pre><br>";*/
    if ($_POST["to"]) {
        //Merge the session array with post array
        if ($letterInfo->Title == "Paper Acceptance" || $letterInfo->Title == "Paper Rejection") {
            $_SESSION["arrUpdateEmails"] = array_merge_assoc($arrDiff, $_POST["to"]);
        } else {
            $_SESSION["arrUpdateEmails"] = array_merge($arrDiff, $_POST["to"]);
        }
    } else {
        $_SESSION["arrUpdateEmails"] = $arrDiff;
    }
    /*
    		echo "<br>Merge Array now is <pre>";
    		print_r($_SESSION["arrUpdateEmails"]);
    		echo "</pre><br>";*/
} else {
    //echo "<br>Very first time.<br>";
    $arrUpdateEmails = get_Unsended_EmailList($letterID, $recipientGroupName);
    if (count($arrUpdateEmails) > 0) {
        $_SESSION["arrUpdateEmails"] = $arrUpdateEmails;
Ejemplo n.º 2
0
 /**
  * fix it!
  */
 protected function setDetailLinks()
 {
     if ($this->mode == REPORT_DASHBOARD) {
         return;
     }
     // set detail links
     foreach ($this->allDetailsTablesArr as $detailTableData) {
         // get perm for det tables
         $this->permis[$detailTableData['dDataSourceTable']] = $this->getPermissions($detailTableData['dDataSourceTable']);
         // field names of detail keys of passed detail table, when current is master
         $this->detailKeysByD[] = $this->pSet->getDetailKeysByDetailTable($detailTableData['dDataSourceTable']);
     }
     $this->controlsMap['gridRows'] = array();
     $arrReportList = array();
     foreach ($this->arrReport['list'] as $key => $data) {
         if (!isset($data['row_data'])) {
             continue;
         }
         $record = array();
         $this->genId();
         $gridRowInd = count($this->controlsMap['gridRows']);
         $this->controlsMap['gridRows'][$gridRowInd] = array();
         $this->controlsMap['gridRows'][$gridRowInd]['id'] = $this->recId;
         $this->controlsMap['gridRows'][$gridRowInd]['rowInd'] = $gridRowInd;
         //Add the connection with containing row. It's important for vertical layout's multiple records per row mode
         $this->controlsMap['gridRows'][$gridRowInd]['keyFields'] = array();
         $this->controlsMap['gridRows'][$gridRowInd]['keys'] = array();
         for ($i = 0; $i < count($tKeys); $i++) {
             $this->controlsMap['gridRows'][$gridRowInd]['keyFields'][$i] = $tKeys[$i];
             $this->controlsMap['gridRows'][$gridRowInd]['keys'][$i] = $data[$tKeys[$i] . '_value'];
         }
         $this->proccessDetailGridInfo($record, $data, $gridRowInd);
         $record["recordattrs"] = "data-record-id=\"" . $this->recId . "\"";
         $record["rowattrs"] = " id=\"gridRow" . $this->recId . "\"";
         $arrReportList[$key] = array_merge_assoc($data, $record);
         $this->recIds[] = $this->recId;
     }
     foreach ($arrReportList as $key => $data) {
         $this->arrReport['list'][$key] = $data;
     }
     // end set detail links
 }