Exemplo n.º 1
0
function display_home($file_list)
{
    // $current_year = "";
    foreach ($file_list as $file) {
        $perf = get_json($file);
        if ($perf) {
            // skip if error, won't break page
            $end = $perf['endDate'];
            list($date, $date_year) = extract_date($file, $end);
            // if ($date_year != $current_year) { echo "<h3>" . $date_year . "</h3>"; }
            // $current_year = $date_year;
            // if($display == 'full') {
            home_json_perf($date, $perf);
            //}
            // elseif($display == 'short') {
            // short_json_perf($date, $perf); }
        }
    }
}
 public function listLogs()
 {
     $stats = $this->logViewer->statsTable();
     $headers = $stats->header();
     $footer = $stats->footer();
     $page = request('page', 1);
     $offset = $page * $this->perPage - $this->perPage;
     $filename = \Input::get('filename');
     $date_ini = \Input::get('date_ini');
     $date_end = \Input::get('date_end');
     if ($date_ini) {
         $date_ini = new \DateTime($date_ini);
     }
     if ($date_end) {
         $date_end = new \DateTime($date_end);
     }
     $aux = $stats->rows();
     foreach ($aux as $k => $row) {
         $date = extract_date($row['date']);
         $dat = new \DateTime($date);
         if ($date_ini) {
             if ($date_ini->getTimestamp() > $dat->getTimestamp()) {
                 unset($aux[$k]);
             }
         }
         if ($date_end) {
             if ($date_end->getTimestamp() < $dat->getTimestamp()) {
                 unset($aux[$k]);
             }
         }
         if (!preg_match('/' . $filename . '/', $row['date'])) {
             unset($aux[$k]);
         }
     }
     $rows = new LengthAwarePaginator(array_slice($aux, $offset, $this->perPage, true), count($aux), $this->perPage, $page);
     $rows->setPath(request()->url());
     return $this->view('logs', compact('headers', 'rows', 'footer'));
 }
Exemplo n.º 3
0
\t\t\t\t<div class = 'csenote_bar_right'>
\t\t\t\t<label>Date:</label> <input type='hidden' name='csenote_date' class='csenote_date_value' value='{$this_date}'> {$selector}
\t\t\t\t<input type='hidden' name='csenote_user' value='{$this_user}'>
\t\t\t\t<input type='hidden' name='csenote_case_id' value='{$this_case_id}'>
\t\t\t\t<input type='hidden' name='query_type' value='add'>
\t\t\t\t<button class='csenote_action_submit'>Add</button><button class='csenote_action_cancel'>Cancel</button></div>
\t\t\t</div>
\t\t\t<textarea name='csenote_description'></textarea>
\t\t\t</form>
\t\t\t</div>

NEWNOTE;
//show all case notes
foreach ($case_notes_data as $case_notes) {
    $time = convert_case_time($case_notes['time']);
    echo "<div class='csenote' id='csenote_" . $case_notes['id'] . "'>\n\t\t\t\t<div class='csenote_bar'>\n\t\t\t\t<div class = 'csenote_bar_left'><img class='thumbnail-mask' src='" . thumbify($case_notes['picture_url']) . "'>&nbsp " . username_to_fullname($dbh, $case_notes['username']) . "</div><div class = 'csenote_bar_right'><span class='csenote_date'>" . extract_date($case_notes['date']) . "</span> &#183; <span class='csenote_time'>" . $time[0] . $time[1] . "</span>";
    if ($case_notes['username'] == $_SESSION['login']) {
        echo " &#183; <a href='#' class='csenote_edit'>Edit</a> <a href='#' class='csenote_delete'>Delete</a>";
    }
    echo "</div></div><p class='csenote_instance'>" . nl2br(htmlentities($case_notes['description'])) . "</p></div>";
}
if (empty($case_notes_data)) {
    if (isset($search)) {
        echo "<p>No case notes found matching <i>{$search}</i></p>";
    } else {
        echo "<p>No case notes found</p>";
        die;
    }
}
if (!isset($_POST['update'])) {
    echo "</div>";
Exemplo n.º 4
0
    }
}
?>
            </ul>
        </div>
        <div class="tab-pane" id="caseEvents">
            <ul class="unstyled">
            <?php 
if (empty($events)) {
    echo "No events found";
} else {
    foreach ($events as $e) {
        extract($e);
        ?>
                <li class="li-expand"><a href="#"><?php 
        echo extract_date($start) . "</a> " . $task;
        ?>
                    <ul>
                        <li>Start: <?php 
        echo $e['start_text'];
        ?>
  </li>
                        <li>End: <?php 
        echo $e['end_text'];
        ?>
  </li>
                        <li>All Day: <?php 
        if ($e['all_day'] === '1') {
            echo "Yes";
        } else {
            echo "No";
Exemplo n.º 5
0
 /**
  * Extract dates from files.
  *
  * @param  array  $files
  *
  * @return array
  */
 private function extractDates(array $files)
 {
     return array_map(function ($file) {
         return extract_date(basename($file));
     }, $files);
 }
    case 'case':
        $cols = array("username", "case_id", "date", "description", "time", "seconds");
        $col_data = array(array('sTitle' => 'Name'), array('sTitle' => 'Case'), array('sTitle' => 'Date'), array('sTitle' => 'Description'), array('sTitle' => 'Time (hours)'), array('sTitle' => 'Seconds', 'bVisible' => false));
        if ($columns_only) {
            $output['aoColumns'] = $col_data;
        } else {
            $case_number = substr($val, 5);
            $q = $dbh->prepare("SELECT * FROM cm_case_notes WHERE `case_id` = :val AND `date` >= :date_start AND `date` <= :date_end ORDER BY `date` ASC");
            $data = array('val' => $case_number, 'date_start' => $date_start, 'date_end' => $date_end);
            $q->execute($data);
            $error = $q->errorInfo();
            while ($result = $q->fetch(PDO::FETCH_ASSOC)) {
                $rows = array();
                $result['username'] = username_to_fullname($dbh, $result['username']);
                $result['case_id'] = case_id_to_casename($dbh, $result['case_id']);
                $result['date'] = extract_date($result['date']);
                $result['seconds'] = $result['time'];
                $result['time'] = convert_to_hours($result['time']);
                foreach ($cols as $col) {
                    $rows[] = $result[$col];
                }
                $output['aaData'][] = $rows;
            }
            if ($q->rowCount() < 1) {
                $output['aaData'] = array();
            }
            $output['aoColumns'] = $col_data;
        }
        break;
}
echo json_encode($output);
    ?>
&nbsp;</td>
		  <td  height="30"><?php 
    echo $row['address'] . '<br/>' . $row['city'] . ' ' . $row['state'];
    ?>
&nbsp;</td>
          <td  height="30"><?php 
    echo $row['subscriber'];
    ?>
&nbsp;</td>
          <td  height="30"><?php 
    echo $row['subscriber_code'];
    ?>
&nbsp;</td>
		  <td  height="30"><?php 
    echo extract_date($row['request_date']);
    ?>
&nbsp;</td>
          <td  height="30"><?php 
    echo $row['product'];
    ?>
&nbsp;</td>
          <td  height="30"><?php 
    echo $row['report_number'];
    ?>
&nbsp;</td>
		  <td  height="30"><?php 
    echo $row['enquiry_reason'];
    ?>
&nbsp;</td>
		  <td  height="30"><?php 
    ?>
&nbsp;</td>
		  <td  height="30"><?php 
    echo $row['terms_duration'];
    ?>
&nbsp;</td>
		  <td  height="30"><?php 
    echo extract_date($row['date_open']);
    ?>
&nbsp;</td>
		  <td  height="30"><?php 
    echo extract_date($row['date_closed']);
    ?>
&nbsp;</td>
		   <td  height="30"><?php 
    echo extract_date($row['date_last_payment']);
    ?>
&nbsp;</td>
		  <td  height="30"><?php 
    echo $row['pan'];
    ?>
</td>
        </tr>
        <?php 
    $j++;
}
?>
      </table>
      <br></td>
  </tr>
</table>
	<p><label>Date Assigned:</label></p>

	<p><?php 
$date_assigned = extract_date($data['date_assigned']);
echo $date_assigned;
?>
</p>

	<p><label>Last Activity:</label></p>

	<p>

	<?php 
if (isset($data['description'])) {
    $date_clip = extract_date($data['date']);
    echo $date_clip . ": " . snippet('20', $data['description']);
} else {
    echo "No activity";
}
?>
	</p>

	<?php 
if ($_SESSION['permissions']['assign_cases'] == '1') {
    if ($data['case_status'] == "inactive") {
        $txt = "will be reassigned to the case.";
    } else {
        $txt = "will no longer be able to see or to work on this case.";
    }
    echo "<div class='dialog-user-remove' title='Change " . $data['first_name'] . "&#39;s status?'>" . $data['first_name'] . " " . $txt . " Are you sure?</div>";
Exemplo n.º 10
0
function prev_day($now)
{
    $ex_now = extract_date($now);
    $prev = mktime(0, 0, 0, $ex_now[1], $ex_now[2] - 1, $ex_now[0]);
    return date('/Y/m/d', $prev);
}
            echo account_holder_type($row["acc_holder_type"]);
            ?>
</td>
				<td><?php 
            echo $row["highcredit_loanamount"];
            ?>
</td>
				<td><?php 
            echo extract_date($row["date_open"]);
            ?>
</td>
				<?php 
            if ($accountType == 'closed') {
                ?>
<td><?php 
                echo extract_date($row["date_closed"]);
                ?>
</td><?php 
            }
            ?>
-->
				<?php 
            if ($accountType == 'bad') {
                $check_pay = check_payin_or_no($row['account_id']);
                if ($check_pay) {
                    ?>
					<td>
						<b>Resolved</b></a></td>
				<?php 
                } else {
                    $check_partner_bank = check_partner_bank($row['account_id']);
</td>
		  
          <td style="text-align:right; padding-right:20px"><?php 
    echo account_holder_type($row["acc_holder_type"]);
    ?>
</td>  
		  <td style="text-align:right; padding-right:20px"><?php 
    echo $row['account_status1'];
    ?>
</td>  
		  <td><?php 
    echo extract_date($row["date_open"]);
    ?>
</td>
		  <td><?php 
    echo extract_date($row["date_last_payment"]);
    ?>
</td>
		   <td style="text-align:right; padding-right:20px"><?php 
    if ($row["settlement"] == 'Yes') {
        echo $row["settlement"];
    } else {
        echo 'No';
    }
    ?>
</td>  
        </tr>
        <?php 
    $j++;
}
?>