本文整理匯總了PHP中notification::add方法的典型用法代碼示例。如果您正苦於以下問題:PHP notification::add方法的具體用法?PHP notification::add怎麽用?PHP notification::add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類notification
的用法示例。
在下文中一共展示了notification::add方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: notification
require 'components/query_string_standard.php';
require 'subclasses/notification.php';
$dbh_notification = new notification();
$object_name = 'dbh_notification';
require 'components/create_form_data.php';
extract($arr_form_data);
if ($_POST['btn_cancel']) {
log_action('Pressed cancel button');
redirect("listview_notification.php?{$query_string}");
}
if ($_POST['btn_submit']) {
log_action('Pressed submit button');
$message .= $dbh_notification->sanitize($arr_form_data)->lst_error;
extract($arr_form_data);
if ($dbh_notification->check_uniqueness($arr_form_data)->is_unique) {
//Good, no duplicate in database
} else {
$message = "Record already exists with the same primary identifiers!";
}
if ($message == "") {
$dbh_notification->add($arr_form_data);
redirect("listview_notification.php?{$query_string}");
}
}
}
require 'subclasses/notification_html.php';
$html = new notification_html();
$html->draw_header('Add Notification', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->draw_controls('add');
$html->draw_footer();