/** * @param string $query * @return object of mysqli query pointer * @throws Exception */ public function sendReport($exc) { $msg = "<div style='direction:ltr;'>Error No: " . $exc->getCode() . " - " . $exc->getMessage() . "<br >" . nl2br($exc->getTraceAsString()) . '</div>'; exit('<!-- ' . $msg . ' -->'); if (!class_exists('notification')) { $notfile = dirname(__FILE__) . '/notification.php'; if (file_exists($notfile)) { include $notfile; } else { exit('<!-- ' . $msg . ' -->'); } } $subject = "database error #" . $exc->getCode(); $userinfo = array('email' => "*****@*****.**", 'nickname' => "system tech team"); notification::getNotifications()->sendMail($subject, $userinfo, 'blank', $msg); }
$number = $dt->s; $unit = "second"; } } } } } } $unit .= $number > 1 ? "s" : ""; $ret = $number . " " . $unit . " " . "ago"; return $ret; } if (isset($_REQUEST['user_id'])) { $user_id = $_REQUEST['user_id']; $objNotification = new notification(); $dbRows_Notifications = $objNotification->getNotifications($user_id); if (!isset($dbRows_Notifications)) { echo '<li><a href="#">No new notifications</a></li>'; } $ncount = 0; while (isset($dbRows_Notifications) && ($dbRow = mysqli_fetch_array($dbRows_Notifications))) { $ncount = $ncount + 1; if ($ncount > 1) { echo '<li class="divider"></li>'; } ?> <li><a href="#"> <div class="row">