コード例 #1
0
function get_last_case_activity($dbh, $user)
{
    $q = $dbh->prepare("SELECT * FROM `cm_case_notes`\n\t\tWHERE username = ? ORDER BY `date` desc LIMIT 0,1");
    $q->bindParam(1, $user);
    $q->execute();
    $c = $q->fetch();
    if ($c) {
        $data = extract_date_time($c['date']) . ": " . implode(' ', convert_case_time($c['time'])) . ' on the <a href="index.php?i=Cases.php#cases/' . $c['case_id'] . '" target="_new">' . case_id_to_casename($dbh, $c['case_id']) . "</a> case.";
    } else {
        $data = "None";
    }
    return $data;
}
コード例 #2
0
ファイル: rss.php プロジェクト: samtechnocrat/ClinicCases
         $follow_url = CC_BASE_URL . 'index.php?i=Cases.php#cases/' . $close['id'];
         $item = array('by' => $by, 'action_text' => $action_text, 'casename' => $casename, 'id' => $id, 'what' => $what, 'follow_url' => $follow_url, 'time_done' => $time_done, 'time_formatted' => $time_formatted);
         $activities[] = $item;
     }
 }
 //new users who have requested access
 if ($p['activate_users'] == '1') {
     $get_new_users = $dbh->prepare("SELECT * FROM cm_users\n\t\t\t\tWHERE date_created >= '{$mysqldate}' AND new = 'yes'");
     $get_new_users->execute();
     $news = $get_new_users->fetchAll(PDO::FETCH_ASSOC);
     foreach ($news as $new) {
         $by = username_to_fullname($dbh, $new['username']);
         $thumb = 'people/tn_no_picture.png';
         $action_text = " signed up for ClinicCases ";
         $time_done = $new['date_created'];
         $time_formatted = extract_date_time($new['date_created']);
         $what = 'Please review this application.';
         $follow_url = CC_BASE_URL . 'index.php?i=Users.php';
         $casename = '(view here)';
         $id = null;
         $item = array('by' => $by, 'action_text' => $action_text, 'casename' => $casename, 'id' => $id, 'what' => $what, 'follow_url' => $follow_url, 'time_done' => $time_done, 'time_formatted' => $time_formatted);
         $activities[] = $item;
     }
 }
 //TODO add board posts
 //Sort the activity array
 if (!empty($activities)) {
     sortBySubkey($activities, 'time_done');
 }
 //Create RSS
 $body = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n\t\t<rss version=\"2.0\">\n\t\t<channel>\n\t\t\t<title>Latest Activity - ClinicCases - " . CC_PROGRAM_NAME . "</title>\n\t\t\t<link>" . CC_BASE_URL . "</link>\n\t\t\t<description>Notification of new case activity on ClinicCases</description>\n\t\t";
コード例 #3
0
	<?php 
foreach ($folders as $folder) {
    if (strrchr($folder['folder'], '/')) {
        $folder_name = substr(strrchr($folder['folder'], '/'), 1);
    } else {
        $folder_name = $folder['folder'];
    }
    $folder_path = $folder['folder'];
    $user = username_to_fullname($dbh, $folder['username']);
    $date = extract_date_time($folder['date_modified']);
    echo "<div class='doc_item folder' path='{$folder_path}' data-id='{$folder['id']}'><img src='html/ico/folder.png'><p>{$folder_name}</p></div>";
    echo "<div class='doc_properties' tabindex='1'><h3><img src='html/ico/folder.png'>{$folder_name}</h3>\n\t\t\t\t\t<hr />\n\t\t\t\t\t<p><label>Type</label>    Folder</p>\n\t\t\t\t\t<p><label>Created:</label>     {$date}</p>\n\t\t\t\t\t<p><label>Created By:</label>     {$user}</p>\n\t\t\t\t\t</div>";
}
foreach ($documents as $document) {
    $icon = get_icon($document['type']);
    $user = username_to_fullname($dbh, $document['username']);
    $date = extract_date_time($document['date_modified']);
    echo "<div id='doc_{$document['id']}' class='doc_item item {$document['type']}' data-id='{$document['id']}'><img src='{$icon}'><p>{$document['name']}</p></div>";
    echo "<div class='doc_properties' tabindex='1'><h3><img src='{$icon}'>{$document['name']}</h3>\n\t\t\t<hr />\n\t\t\t<p><label>Type</label>     {$document['type']}</p>\n\t\t\t<p><label>Uploaded:</label>     {$date}</p>\n\t\t\t<p><label>Uploaded By:</label>     {$user}</p>\n\t\t\t</div>";
}
if (empty($folders) and empty($documents)) {
    echo "<span class='docs_empty'>No documents found.</a>";
}
echo "<div class='doc_spacing_fix'></div>";
?>


<?php 
if (!isset($update)) {
    echo "</div>";
}
コード例 #4
0
				<img class="thumbnail-mask" src = "<?php 
        echo return_thumbnail($dbh, $from);
        ?>
">

				<?php 
        echo username_to_fullname($dbh, $from);
        ?>

			</div>

			<div class = "msg_reply_right">

				<?php 
        echo extract_date_time($time_sent);
        ?>

			</div>

			<p><?php 
        echo nl2br(htmlentities(text_prepare($body)));
        ?>
</p>

	</div>

<?php 
    }
}
?>
コード例 #5
0
</p>

	<p><label>Status</label><?php 
    echo $status;
    ?>
</p>

	<p><label>Date Created</label><?php 
    echo extract_date_time($date_created);
    ?>
</p>

	<p><label>Last Login</label><?php 
    $last_login = get_last_login($dbh, $username);
    if ($last_login) {
        echo extract_date_time($last_login);
    } else {
        echo "Never";
    }
    ?>
</p>

	<p><label>Last Case Activity</label><?php 
    echo get_last_case_activity($dbh, $username);
    ?>
</p>


</div>

<div class = "user_detail_right">
コード例 #6
0
    $this_users_groups = user_which_groups($dbh, $_SESSION['login']);
    $grps = implode("','", $this_users_groups);
    $q = $dbh->prepare("SELECT * FROM `cm_board` as all_posts\n\tJOIN\n\t(SELECT * FROM cm_board_viewers WHERE viewer IN ('{$grps}') GROUP BY cm_board_viewers.post_id) AS  this_user\n\tON\n\tall_posts.id = this_user.post_id AND all_posts.time_added >= '{$mysqldate}'");
    $q->execute();
    $posts = $q->fetchAll(PDO::FETCH_ASSOC);
    foreach ($posts as $post) {
        $activity_type = 'new_board_post';
        if ($post['author'] === $username) {
            $by = 'You';
        } else {
            $by = username_to_fullname($dbh, $post['author']);
        }
        $thumb = return_thumbnail($dbh, $post['author']);
        $action_text = " posted on your Board ";
        $time_done = $post['time_added'];
        $time_formatted = extract_date_time($post['time_added']);
        $what = $post['title'];
        $follow_url = 'index.php?i=Board.php';
        $mobile_url = 'index.php?i=Board.php';
        $casename = "(view here)";
        $id = null;
        $item = array('activity_type' => $activity_type, 'by' => $by, 'thumb' => $thumb, 'action_text' => $action_text, 'casename' => $casename, 'id' => $id, 'what' => $what, 'follow_url' => $follow_url, 'time_done' => $time_done, 'time_formatted' => $time_formatted, 'mobile_url' => $mobile_url);
        $activities[] = $item;
    }
}
if (!empty($activities)) {
    sortBySubkey($activities, 'time_done');
}
if (!$_SESSION['mobile']) {
    include '../../../html/templates/interior/home_activities.php';
}
コード例 #7
0
		<p><label>Start:</label>
			<span class = "event_start"><?php 
    echo extract_date_time($start);
    ?>
</span>
			<?php 
    if ($all_day === '1') {
        echo " <span class='event_all_day'>(All day)</span>";
    }
    ?>
		</p>

		<p><label>End:</label>
			<span class = "event_end"><?php 
    if (!empty($end) && $end != '0000-00-00 00:00:00') {
        echo extract_date_time($end);
    }
    ?>
</span>
		</p>

		<p><label>Where:</label>
			<span class = "event_location"><?php 
    echo htmlentities($location);
    ?>
</span>
		</p>

		<p><label>Notes:</label>
			<span class = "event_notes"><?php 
    echo htmlentities($notes);
コード例 #8
0
ファイル: Board.php プロジェクト: samtechnocrat/ClinicCases
?>
    <div class="row">
        <form class="navbar-search">
            <input type="text" class="board-search search-query" placeholder="Search">
        </form>
    </div>
    <div class="row board-container">
            <?php 
if ($_SESSION['permissions']['view_board'] === '1') {
    if (empty($posts)) {
        echo "<p class='end'>There have been no posts to your Board yet.</p>";
        die;
    } else {
        foreach ($posts as $p) {
            extract($p);
            echo "<div class='container board-item' style='background-color:rgb({$color})'>" . "<h3><img class='img-rounded' src='" . return_thumbnail($dbh, $author) . "'><span class='searchable'> {$title}</span></h3>" . "<div class='searchable'>{$body}</div>" . "<br /><div class='muted searchable'>Posted By " . username_to_fullname($dbh, $author) . " on " . extract_date_time($time_added) . "</div>";
            $attach = check_attachments($dbh, $post_id);
            if ($attach == true) {
                echo "<br /><div class='searchable'><label>Attachments:</label>{$attach}</div>";
            }
            echo "</div>";
        }
    }
} else {
    echo "<p>You do not have permission to view the board.";
}
?>
    </div>
</div>
</body>
</html>
コード例 #9
0
<div class="journal_detail">

	<div class="journal_header ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">

		<img class="thumbnail-mask" src="<?php 
echo return_thumbnail($dbh, $username);
?>
" border="0">

		<p>Journal Submitted by <?php 
echo username_to_fullname($dbh, $username);
?>
 on <?php 
echo extract_date_time($date_added);
?>
		</p>

		<div class = "journal_detail_control">

			<?php 
if ($view !== 'edit' && $_SESSION['permissions']['writes_journals'] == '1') {
    ?>

			<button class="journal_delete">Delete</button>
			<button class="journal_edit">Edit</button>
			<button class="journal_print">Print</button>

				<?php 
} elseif ($view !== 'edit') {
    ?>
コード例 #10
0
ファイル: Home.php プロジェクト: samtechnocrat/ClinicCases
		<div id = "home_nav" data-key = "<?php 
echo $_SESSION['private_key'];
?>
">

			<div id = "home_data">

				<div><?php 
echo $_SESSION['first_name'] . ' ' . $_SESSION['last_name'];
?>
</div>

				<?php 
include 'lib/php/auth/last_login.php';
include 'lib/php/utilities/convert_times.php';
$last_log = extract_date_time(get_last_login($dbh, $_SESSION['login']));
?>

				<div class="small"> Last login: <?php 
echo $last_log;
?>
 </div>

			</div>

			<span class = "home_nav_choices">

				<input type="radio" id="activity_button" name="radio" checked="checked" /><label for="activity_button">Activity</label>

				<input type="radio" id="upcoming_button" name="radio" /><label for="upcoming_button">Upcoming</label>