Пример #1
0
function pj_processMessages()
{
    if (!isset($_SESSION['PJ_MESSAGES']) || !is_array($_SESSION['PJ_MESSAGES'])) {
        return false;
    }
    foreach ($_SESSION['PJ_MESSAGES'] as $type => $message) {
        if ($type == 'SUCCESS') {
            pj_showSuccess($message);
        } else {
            if ($type == 'INFO') {
                pj_showInfo($message);
            } else {
                if ($type == 'WARNING') {
                    defined('PJ_DEMO') ? pj_showWarning($message, 'Demo mode:') : pj_showWarning($message);
                } else {
                    if ($type == 'ERROR') {
                        pj_showError($message);
                    }
                }
            }
        }
    }
    unset($_SESSION['PJ_MESSAGES']);
    return true;
}
Пример #2
0
<?php 
pj_processMessages();
?>

<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default" style="min-height: 300px">

			<?php 
// No links yet
if (!isset($ccount_database)) {
    ?>
				<div class="panel-body">
					<?php 
    pj_showError('The database file is missing: ' . $ccount_settings['db_file']);
    ?>
				</div>
				<?php 
} elseif (count($ccount_database) == 0) {
    ?>
				<div class="panel-body">
					<p>You are not counting any clicks yet.</p>
					<p><a href="new_link.php" class="text-center"><i class="glyphicon glyphicon-plus"></i>&nbsp;Click here to add a new link</a></p>
				</div>
				<?php 
} else {
    $table_rows = '';
    $total = 0;
    $total_unique = 0;
    $max = 1;