コード例 #1
0
ファイル: config.php プロジェクト: arunabh1911/ecom
function notification($msg = '', $not = '')
{
    if ($not && $_SESSION['not'] == '') {
        $str = getNotification($not, '2');
    } elseif ($_SESSION['typ'] && $_SESSION['not'] == $msg) {
        echo $_SESSION[$_SESSION['typ']];
        $_SESSION[$_SESSION['typ']] = '';
        $_SESSION['not'] = '';
        $_SESSION['typ'] = '';
    }
    echo '<span id="' . $msg . '">' . $str . '</span>';
    //if($_POST['notification'] == $msg )$_SESSION['not'] = '';
}
コード例 #2
0
ファイル: layout.php プロジェクト: scabros/scabrosfw
js/notify.min.js"></script>
<script type="text/javascript" src="<?php 
echo URL;
?>
js/common.js"></script>
</head>
<body>
  <header><?php 
echo $cabecera;
?>
</header>
  <nav><?php 
echo $botonera;
?>
</nav>
  <section id="contenedor">
    <?php 
echo $contenido;
?>
  </section>
  <footer><?php 
echo $footer;
?>
</footer>
  <?php 
getNotification();
?>
  <div id="darkLayer" class="darkClass" style="display:none"><!--Cargando...--></div>
</body>
</html>
コード例 #3
0
<?php

include "Link.php";
/**
 * Gets a notification from a user
 */
function getNotification()
{
    // Gets customer profile information of this user
    $link = new Link(false);
    $query = $link->executeQuery("select * from customer_profile where email = '" . $_SESSION['loginId'] . "'", $_SERVER["SCRIPT_NAME"]);
    // Breaks out of function early if notification failed
    if (!$query) {
        return "";
    }
    // Reads only row in
    if ($row = mysql_fetch_array($query)) {
        return $row["notification"];
    }
    // Default return if getting the notification value failed
    return "";
}
// Calls the notification function
session_start();
print getNotification();
コード例 #4
0
<?php

include "./session.inc.php";
include "../dbcon.inc.php";
if (isset($_POST["ack"])) {
    //user don't want to see more notification for those bloods
    $res = getNotification($_SESSION["userdata"], $con);
    while ($data = $res->fetch_assoc()) {
        saveNotification($_SESSION["userdata"], $con, $data["bloodstore_id"]);
    }
} else {
    //get notification
    $res = getNotification($_SESSION["userdata"], $con);
    if ($res->num_rows > 0) {
        echo '<ul class="collection with-header animated fadeIn"><li class="collection-header"><h5>Notification</h5></li>';
        while ($data = $res->fetch_assoc()) {
            $now = time();
            // or your date as well
            $your_date = strtotime($data["exp_date"]);
            $datediff = $now - $your_date;
            $daydiff = floor($datediff / (60 * 60 * 24));
            $isexpried = false;
            if ($daydiff > 0) {
                $isexpried = true;
            }
            $daydiff = abs($daydiff);
            ?>

            <li class="collection-item avatar">
                <a class="ano" href="staff_manageblood.php?type=<?php 
            echo $data["bloodtype_id"];
コード例 #5
0
ファイル: adminHome.php プロジェクト: riteshtandon23/WeRHR
                                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                                            <ul class="dropdown-menu" role="menu">
                                                <li><a href="#">Settings 1</a>
                                                </li>
                                                <li><a href="#">Settings 2</a>
                                                </li>
                                            </ul>
                                        </li>
                                        <li><a href="#"><i class="fa fa-close"></i></a>
                                        </li>
                                    </ul>
                                    <div class="clearfix"></div>
                                </div>
                                <ul class="list-unstyled top_profiles scroll-view">
                                    <?php 
$result = getNotification();
while ($row = $result->fetch_assoc()) {
    $id = $row["Topic_id"];
    $topicName = "";
    $result1 = select_Domain_Name($id);
    while ($row1 = $result1->fetch_assoc()) {
        $topicName = $row1['Topic_Name'];
    }
    echo "<li class=\"media event\">";
    echo "<a class=\"pull-left border-aero profile_thumb\">";
    echo "<i class=\"fa fa-info-circle\"></i>";
    echo "</a>";
    echo "<div class=\"media-body\">";
    echo "<a class=\"title\" href=\"updateExamDate.php?id=" . $row['ID'] . "\">" . $topicName . "</a>";
    echo "<p><strong>Exam Date: </strong> " . $row['Exam_Date'] . "</p>";
    echo "<p><strong>Exam Time: </strong> " . $row['Start_Time'] . " - " . $row['End_Time'] . "</p>";