• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP set_notification函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中set_notification函数的典型用法代码示例。如果您正苦于以下问题:PHP set_notification函数的具体用法?PHP set_notification怎么用?PHP set_notification使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了set_notification函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: bum_send_email

/**
 * Function is responsible for sending the emails
 * 
 * @param $options
 */
function bum_send_email($options = array())
{
    //initializing variables
    $domain_parts = bum_parse_url(get_bloginfo('url'));
    $defaults = array('to' => '', 'cc' => '', 'bcc' => '', 'from' => "info@{$domain_parts['domain']}", 'subject' => get_bloginfo('name'), 'message' => '', 'headers' => false, 'attachments' => array(), 'args' => false);
    $options = wp_parse_args($options, $defaults);
    if (is_array($options['to'])) {
        $options['to'] = implode(',', $options['to']);
    }
    if (is_array($options['cc'])) {
        $options['cc'] = implode(',', $options['cc']);
    }
    if (is_array($options['bcc'])) {
        $options['bcc'] = implode(',', $options['bcc']);
    }
    // To send HTML mail, the Content-type header must be set
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    // Additional headers
    $headers .= 'From: ' . get_bloginfo('site') . ' <' . $options['from'] . '>' . "\r\n";
    $headers .= 'Reply-To: ' . get_bloginfo('admin_email') . "\r\n";
    $headers .= 'Return-Path: ' . get_bloginfo('admin_email') . "\r\n";
    $headers .= 'CC: ' . $options['cc'] . "\r\n";
    $headers .= 'BCC: ' . $options['bcc'] . "\r\n";
    $headers .= 'X-Mailer: PHP/' . phpversion();
    //use these headers if they haven't been overridden.
    if (!$options['headers']) {
        $options['headers'] = $headers;
    }
    //check for the template
    if ($temp = bum_get_show_view($options['message'], $options['args'])) {
        $options['message'] = $temp;
    }
    $options = apply_filters('bum_send_mail_options', $options);
    extract($options);
    //reasons to fail
    if (!$to || !$message) {
        return false;
    }
    //preparing for html
    add_filter('wp_mail_content_type', 'bum_filter_sendmail_contenttype');
    //send the email
    if (wp_mail($to, $subject, $message, $headers, $attachments)) {
        if (function_exists('set_notification')) {
            set_notification('Email notification has been sent.');
        }
        do_action('bum_email_sent', $to, $subject, $message, $headers, $attachments);
        return true;
    }
    return false;
}
开发者ID:Jonathonbyrd,项目名称:better-user-management,代码行数:56,代码来源:bootstrap.php


示例2: store_reply

/**
 * This function stores a reply in the forum_post table.
 * It also updates the forum_threads table (thread_replies +1 , thread_last_post, thread_date)
 * @param array $current_forum
 * @param array $values
 * @author Patrick Cool <[email protected]>, Ghent University
 * @version february 2006, dokeos 1.8
 */
function store_reply($current_forum, $values)
{
    $_course = api_get_course_info();
    $table_posts = Database::get_course_table(TABLE_FORUM_POST);
    $post_date = api_get_utc_datetime();
    if ($current_forum['approval_direct_post'] == '1' && !api_is_allowed_to_edit(null, true)) {
        $visible = 0;
    } else {
        $visible = 1;
    }
    $upload_ok = 1;
    $return = array();
    if ($upload_ok) {
        // We first store an entry in the forum_post table.
        $new_post_id = Database::insert($table_posts, ['c_id' => api_get_course_int_id(), 'post_title' => $values['post_title'], 'post_text' => isset($values['post_text']) ? $values['post_text'] : null, 'thread_id' => $values['thread_id'], 'forum_id' => $values['forum_id'], 'poster_id' => api_get_user_id(), 'post_date' => $post_date, 'post_notification' => isset($values['post_notification']) ? $values['post_notification'] : null, 'post_parent_id' => isset($values['post_parent_id']) ? $values['post_parent_id'] : null, 'visible' => $visible]);
        if ($new_post_id) {
            $sql = "UPDATE {$table_posts} SET post_id = iid WHERE iid = {$new_post_id}";
            Database::query($sql);
            $values['new_post_id'] = $new_post_id;
            $message = get_lang('ReplyAdded');
            if (!empty($_POST['file_ids']) && is_array($_POST['file_ids'])) {
                foreach ($_POST['file_ids'] as $key => $id) {
                    editAttachedFile(array('comment' => $_POST['file_comments'][$key], 'post_id' => $new_post_id), $id);
                }
            }
            // Update the thread.
            update_thread($values['thread_id'], $new_post_id, $post_date);
            // Update the forum.
            api_item_property_update($_course, TOOL_FORUM, $values['forum_id'], 'NewMessageInForum', api_get_user_id());
            if ($current_forum['approval_direct_post'] == '1' && !api_is_allowed_to_edit(null, true)) {
                $message .= '<br />' . get_lang('MessageHasToBeApproved') . '<br />';
            }
            // Setting the notification correctly.
            $my_post_notification = isset($values['post_notification']) ? $values['post_notification'] : null;
            if ($my_post_notification == 1) {
                set_notification('thread', $values['thread_id'], true);
            }
            send_notification_mails($values['thread_id'], $values);
            add_forum_attachment_file('', $new_post_id);
        }
        Session::erase('formelements');
        Session::erase('origin');
        Session::erase('breadcrumbs');
        Session::erase('addedresource');
        Session::erase('addedresourceid');
        $return['msg'] = $message;
        $return['type'] = 'confirmation';
    } else {
        $return['msg'] = get_lang('UplNoFileUploaded') . ' ' . get_lang('UplSelectFileFirst');
        $return['type'] = 'error';
    }
    return $return;
}
开发者ID:feroli1000,项目名称:chamilo-lms,代码行数:61,代码来源:forumfunction.inc.php


示例3: api_get_path

        // Delete link
        require_once api_get_path(SYS_CODE_PATH) . 'gradebook/lib/gradebook_functions.inc.php';
        $link_info = is_resource_in_course_gradebook(api_get_course_id(), 5, intval($_GET['id']), api_get_session_id());
        $link_id = $link_info['id'];
        if ($link_info !== false) {
            remove_resource_from_course_gradebook($link_id);
        }
    }
}
// Moving.
if ($my_action == 'move' and isset($_GET['thread']) and api_is_allowed_to_edit(false, true) && api_is_allowed_to_session_edit(false, true)) {
    $message = move_thread_form();
}
// Notification.
if ($my_action == 'notify' and isset($_GET['content']) and isset($_GET['id']) && api_is_allowed_to_session_edit(false, true)) {
    $return_message = set_notification($_GET['content'], $_GET['id']);
    Display::display_confirmation_message($return_message, false);
}
// Student list
if ($my_action == 'liststd' and isset($_GET['content']) and isset($_GET['id']) and api_is_allowed_to_edit(null, true) || $is_group_tutor) {
    $active = null;
    switch ($_GET['list']) {
        case 'qualify':
            $student_list = get_thread_users_qualify($_GET['id']);
            $nrorow3 = -2;
            $active = 2;
            break;
        case 'notqualify':
            $student_list = get_thread_users_not_qualify($_GET['id']);
            $nrorow3 = -2;
            $active = 3;
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:viewforum.php


示例4: file_postupdate_standard_editor

    $data->body = '';
    $data->managerprefix = '';

    if ($data->id) {
        $DB->update_record('facetoface_notification_tpl', $data);
    } else {
        $data->id = $DB->insert_record('facetoface_notification_tpl', $data);
    }

    $data = file_postupdate_standard_editor($data, 'body', $editoroptions, $contextsystem, 'mod_facetoface', 'session', $data->id);
    $DB->set_field('facetoface_notification_tpl', 'body', $data->body, array('id' => $data->id));

    $data = file_postupdate_standard_editor($data, 'managerprefix', $editoroptions, $contextsystem, 'mod_facetoface', 'session', $data->id);
    $DB->set_field('facetoface_notification_tpl', 'managerprefix', $data->managerprefix, array('id' => $data->id));

    set_notification(get_string('notificationtemplatesaved', 'facetoface'), $redirectto, array('class' => 'notifysuccess'));
}

$url = new moodle_url('/admin/settings.php', array('section' => 'modsettingfacetoface'));

if ($id) {
    $heading = get_string('editnotificationtemplate', 'facetoface');
} else {
    $heading = get_string('addnotificationtemplate', 'facetoface');
}

$PAGE->set_title(get_string('notificationtemplates', 'facetoface'));
$PAGE->set_heading('');
$PAGE->set_focuscontrol('');
$PAGE->set_cacheable(true);
$PAGE->navbar->add(get_string('notificationtemplates', 'facetoface'))->add($heading);
开发者ID:narasimhaeabyas,项目名称:tataaiapro,代码行数:31,代码来源:edit.php


示例5: get_string

                }
            }

            if ($emailcount) {
                if (!empty($data->cc_managers)) {
                    $message = get_string('xmessagessenttoattendeesandmanagers', 'facetoface', $emailcount);
                } else {
                    $message = get_string('xmessagessenttoattendees', 'facetoface', $emailcount);
                }

                set_notification($message, $return, array('class' => 'notifysuccess'));
            }

            if ($emailerrors) {
                $message = get_string('xmessagesfailed', 'facetoface', $emailerrors);
                set_notification($message);
            }

            redirect($return);
            die();
        }
    }
}

//print_object($cm);
/**
 * Print page header
 */
if (!$onlycontent) {
    local_js(
        array(
开发者ID:narasimhaeabyas,项目名称:tataaiapro,代码行数:31,代码来源:attendees.php


示例6: save_user_profile

 /**
  * Save the User Profile
  * 
  * This function is responsible for saving the user fields upon post. SO
  * LONG AS, the user is already logged in. This does not create a new user.
  * 
  * @return boolean
  * @since 1.2
  */
 function save_user_profile()
 {
     //initializing variables
     $user =& get_user(BRequest::getVar('user_id'));
     //reasons to fail
     //handling any required actions
     if (!is_user_logged_in()) {
         return false;
     }
     if (BRequest::getVar('action', false) != 'edit') {
         return false;
     }
     if (!wp_verify_nonce(BRequest::getVar("user_meta_box_nonce"), basename(__FILE__))) {
         return false;
     }
     //initializing variables
     $data = BRequest::get('post');
     $data['ID'] = $user->ID;
     //loading libraries
     require_once ABSPATH . WPINC . DS . 'registration.php';
     //doing all the saves
     if (!save_useremail()) {
         $data['user_email'] = $user->user_email;
     }
     if (wp_insert_user($data) && save_userpw($data['pass1'], $data['pass2']) && save_user_meta_data($data['ID'])) {
         set_notification('Profile has been updated');
     }
     return true;
 }
开发者ID:Jonathonbyrd,项目名称:better-user-management,代码行数:38,代码来源:users.php


示例7: print_error

        print_error('confirmsesskeybad', 'error');
    }

    if (!$room = $DB->get_record('facetoface_room', array('id' => $delete))) {
        print_error('error:roomdoesnotexist', 'facetoface');
    }

    $room_in_use = $DB->count_records_select('facetoface_sessions', "roomid = :id", array('id'=>$delete));

    if ($room_in_use) {
        print_error('error:roomisinuse', 'facetoface');
    }

    $DB->delete_records('facetoface_room', array('id' => $delete));

    set_notification(get_string('roomdeleted', 'facetoface'), $redirectto, array('class' => 'notifysuccess'));
}

// Check for form submission
if (($data = data_submitted()) && !empty($data->bulk_update)) {
    // Check sesskey
    if (!confirm_sesskey()) {
        print_error('confirmsesskeybad', 'error');
    }

    if ($data->bulk_update == 'delete') {
        // Perform bulk delete action
        if ($rooms = $DB->get_records('facetoface_room', null, '', 'id')) {

            $selected = facetoface_get_selected_report_items('room', null, $rooms);
开发者ID:narasimhaeabyas,项目名称:tataaiapro,代码行数:30,代码来源:manage.php


示例8: file_postupdate_standard_editor

            // Update description
            $description_data = file_postupdate_standard_editor($data, 'description', $editoroptions, $systemcontext, 'facetoface', 'room', $room->id);
            $DB->set_field('facetoface_room', 'description', $description_data->description, array('id' => $room->id));

            set_notification(get_string('roomcreatesuccess', 'facetoface'), $roomlisturl, array('class' => 'notifysuccess'));
        } else {
            //Update room
            $todb->id = $room->id;

            $DB->update_record('facetoface_room', $todb);

            // Update description
            $description_data = file_postupdate_standard_editor($data, 'description', $editoroptions, $systemcontext, 'facetoface', 'room', $room->id);
            $DB->set_field('facetoface_room', 'description', $description_data->description, array('id' => $room->id));

            set_notification(get_string('roomupdatesuccess', 'facetoface'), $roomlisturl, array('class' => 'notifysuccess'));
        }
    }
}

$url = new moodle_url('/admin/settings.php', array('section' => 'modsettingfacetoface'));

if ($id == 0) {
    $page_heading = get_string('addroom', 'facetoface');
} else {
    $page_heading = get_string('editroom', 'facetoface');
}

$PAGE->set_title($page_heading);
$PAGE->navbar->add(get_string('rooms', 'facetoface'))->add($page_heading);
navigation_node::override_active_url($url);
开发者ID:narasimhaeabyas,项目名称:tataaiapro,代码行数:31,代码来源:edit.php


示例9: store_reply

/**
 * This function stores a reply in the forum_post table.
 * It also updates the forum_threads table (thread_replies +1 , thread_last_post, thread_date)
 * @param array
 * @param array
 * @author Patrick Cool <[email protected]>, Ghent University
 * @version february 2006, dokeos 1.8
 */
function store_reply($current_forum, $values)
{
    $_course = api_get_course_info();
    $table_posts = Database::get_course_table(TABLE_FORUM_POST);
    $post_date = api_get_utc_datetime();
    if ($current_forum['approval_direct_post'] == '1' && !api_is_allowed_to_edit(null, true)) {
        $visible = 0;
    } else {
        $visible = 1;
    }
    $upload_ok = 1;
    $return = array();
    if ($upload_ok) {
        // We first store an entry in the forum_post table.
        $sql = "INSERT INTO {$table_posts} (c_id, post_title, post_text, thread_id, forum_id, poster_id, post_date, post_notification, post_parent_id, visible)\n                VALUES (\n                        " . api_get_course_int_id() . ",\n                        '" . Database::escape_string($values['post_title']) . "',\n                        '" . Database::escape_string(isset($values['post_text']) ? $values['post_text'] : null) . "',\n                        '" . Database::escape_string($values['thread_id']) . "',\n                        '" . Database::escape_string($values['forum_id']) . "',\n                        '" . api_get_user_id() . "',\n                        '" . $post_date . "',\n                        '" . Database::escape_string(isset($values['post_notification']) ? $values['post_notification'] : null) . "',\n                        '" . Database::escape_string(isset($values['post_parent_id']) ? $values['post_parent_id'] : null) . "',\n                        '" . Database::escape_string($visible) . "')";
        Database::query($sql);
        $new_post_id = Database::insert_id();
        $values['new_post_id'] = $new_post_id;
        $message = get_lang('ReplyAdded');
        if (!empty($_POST['file_ids']) && is_array($_POST['file_ids'])) {
            foreach ($_POST['file_ids'] as $key => $id) {
                editAttachedFile(array('comment' => $_POST['file_comments'][$key], 'post_id' => $new_post_id), $id);
            }
        }
        // Update the thread.
        update_thread($values['thread_id'], $new_post_id, $post_date);
        // Update the forum.
        api_item_property_update($_course, TOOL_FORUM, $values['forum_id'], 'NewMessageInForum', api_get_user_id());
        if ($current_forum['approval_direct_post'] == '1' && !api_is_allowed_to_edit(null, true)) {
            $message .= '<br />' . get_lang('MessageHasToBeApproved') . '<br />';
        }
        //$message .= '<br />'.get_lang('ReturnTo').' <a href="viewforum.php?'.api_get_cidreq().'&amp;forum='.$values['forum_id'].'&amp;gidReq='.$_SESSION['toolgroup'].'&amp;origin='.$origin.'">'.get_lang('Forum').'</a><br />';
        //$message .= get_lang('ReturnTo').' <a href="viewthread.php?'.api_get_cidreq().'&amp;forum='.$values['forum_id'].'&amp;thread='.$values['thread_id'].'&amp;gidReq='.$_SESSION['toolgroup'].'&amp;origin='.$origin.'&amp;gradebook='.$gradebook.'">'.get_lang('Message').'</a>';
        // Setting the notification correctly.
        $my_post_notification = isset($values['post_notification']) ? $values['post_notification'] : null;
        if ($my_post_notification == 1) {
            set_notification('thread', $values['thread_id'], true);
        }
        send_notification_mails($values['thread_id'], $values);
        Session::erase('formelements');
        Session::erase('origin');
        Session::erase('breadcrumbs');
        Session::erase('addedresource');
        Session::erase('addedresourceid');
        $return['msg'] = $message;
        $return['type'] = 'confirmation';
    } else {
        $return['msg'] = get_lang('UplNoFileUploaded') . ' ' . get_lang('UplSelectFileFirst');
        $return['type'] = 'error';
    }
    return $return;
}
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:60,代码来源:forumfunction.inc.php


示例10: isset

        if ($session->datetimeknown
            && isset($facetoface->confirmationinstrmngr)
            && !empty($facetoface->confirmationstrmngr)) {
            $message .= html_writer::empty_tag('br') . html_writer::empty_tag('br') .
                get_string('confirmationsentmgr', 'facetoface');
        } else {
            if ($fromform->notificationtype != MDL_F2F_NONE) {
                $message .= html_writer::empty_tag('br') . html_writer::empty_tag('br') .
                        get_string('confirmationsent', 'facetoface');
            }
        }

        set_notification($message, $returnurl, array('class' => $cssclass));
    } else {
        if (isset($result['conflict']) && $result['conflict']) {
            set_notification($result['result'], $returnurl);
        } else {
            add_to_log($course->id, 'facetoface', 'signup (FAILED)', "signup.php?s=$session->id", $session->id, $cm->id);
            print_error('error:problemsigningup', 'facetoface', $returnurl);
        }
    }

    redirect($returnurl);
} else if (!empty($manageremail)) {
    // Set values for the form
    $toform = new stdClass();
    $toform->manageremail = $manageremail;
    $mform->set_data($toform);
}

echo $OUTPUT->header();
开发者ID:narasimhaeabyas,项目名称:tataaiapro,代码行数:31,代码来源:signup.php


示例11: store_reply

/**
 * This function stores a reply in the forum_post table.
 * It also updates the forum_threads table (thread_replies +1 , thread_last_post, thread_date)
 *
 * @author Patrick Cool <[email protected]>, Ghent University
 * @version february 2006, dokeos 1.8
 */
function store_reply($values)
{
    $_course = api_get_course_info();
    global $current_forum;
    global $origin;
    $table_threads = Database::get_course_table(TABLE_FORUM_THREAD);
    $forum_table_attachment = Database::get_course_table(TABLE_FORUM_ATTACHMENT);
    $table_posts = Database::get_course_table(TABLE_FORUM_POST);
    $gradebook = Security::remove_XSS($_GET['gradebook']);
    $post_date = api_get_utc_datetime();
    if ($current_forum['approval_direct_post'] == '1' && !api_is_allowed_to_edit(null, true)) {
        $visible = 0;
        // The post has not been approved yet.
    } else {
        $visible = 1;
    }
    $upload_ok = 1;
    $has_attachment = false;
    if (!empty($_FILES['user_upload']['name'])) {
        $upload_ok = FileManager::process_uploaded_file($_FILES['user_upload']);
        $has_attachment = true;
    }
    $return = array();
    if ($upload_ok) {
        // We first store an entry in the forum_post table.
        $sql = "INSERT INTO {$table_posts} (c_id, post_title, post_text, thread_id, forum_id, poster_id, post_date, post_notification, post_parent_id, visible)\n                VALUES (\n                \t\t" . api_get_course_int_id() . ",\n                \t\t'" . Database::escape_string($values['post_title']) . "',\n                        '" . Database::escape_string(isset($values['post_text']) ? $values['post_text'] : null) . "',\n                        '" . Database::escape_string($values['thread_id']) . "',\n                        '" . Database::escape_string($values['forum_id']) . "',\n                        '" . api_get_user_id() . "',\n                        '" . $post_date . "',\n                        '" . Database::escape_string(isset($values['post_notification']) ? $values['post_notification'] : null) . "',\n                        '" . Database::escape_string(isset($values['post_parent_id']) ? $values['post_parent_id'] : null) . "',\n                        '" . Database::escape_string($visible) . "')";
        $result = Database::query($sql);
        $new_post_id = Database::insert_id();
        $values['new_post_id'] = $new_post_id;
        $message = get_lang('ReplyAdded');
        if ($has_attachment) {
            $course_dir = $_course['path'] . '/upload/forum';
            $sys_course_path = api_get_path(SYS_COURSE_PATH);
            $updir = $sys_course_path . $course_dir;
            // Try to add an extension to the file if it hasn't one.
            $new_file_name = FileManager::add_ext_on_mime(stripslashes($_FILES['user_upload']['name']), $_FILES['user_upload']['type']);
            // User's file name
            $file_name = $_FILES['user_upload']['name'];
            if (!FileManager::filter_extension($new_file_name)) {
                $return['msg'] = get_lang('UplUnableToSaveFileFilteredExtension');
                $return['type'] = 'error';
            } else {
                $new_file_name = uniqid('');
                $new_path = $updir . '/' . $new_file_name;
                $result = @move_uploaded_file($_FILES['user_upload']['tmp_name'], $new_path);
                $comment = $values['file_comment'];
                // Storing the attachments if any.
                if ($result) {
                    $sql = 'INSERT INTO ' . $forum_table_attachment . '(c_id, filename,comment, path, post_id,size) ' . "VALUES (" . api_get_course_int_id() . ", '" . Database::escape_string($file_name) . "', '" . Database::escape_string($comment) . "', '" . Database::escape_string($new_file_name) . "' , '" . $new_post_id . "', '" . intval($_FILES['user_upload']['size']) . "' )";
                    $result = Database::query($sql);
                    $message .= ' / ' . get_lang('FileUploadSucces');
                    $last_id = Database::insert_id();
                    api_item_property_update($_course, TOOL_FORUM_ATTACH, $last_id, 'ForumAttachmentAdded', api_get_user_id());
                }
            }
        }
        // Update the thread.
        update_thread($values['thread_id'], $new_post_id, $post_date);
        // Update the forum.
        api_item_property_update($_course, TOOL_FORUM, $values['forum_id'], 'NewMessageInForum', api_get_user_id());
        if ($current_forum['approval_direct_post'] == '1' && !api_is_allowed_to_edit(null, true)) {
            $message .= '<br />' . get_lang('MessageHasToBeApproved') . '<br />';
        }
        //$message .= '<br />'.get_lang('ReturnTo').' <a href="viewforum.php?'.api_get_cidreq().'&amp;forum='.$values['forum_id'].'&amp;gidReq='.$_SESSION['toolgroup'].'&amp;origin='.$origin.'">'.get_lang('Forum').'</a><br />';
        //$message .= get_lang('ReturnTo').' <a href="viewthread.php?'.api_get_cidreq().'&amp;forum='.$values['forum_id'].'&amp;thread='.$values['thread_id'].'&amp;gidReq='.$_SESSION['toolgroup'].'&amp;origin='.$origin.'&amp;gradebook='.$gradebook.'">'.get_lang('Message').'</a>';
        // Setting the notification correctly.
        $my_post_notification = isset($values['post_notification']) ? $values['post_notification'] : null;
        if ($my_post_notification == 1) {
            set_notification('thread', $values['thread_id'], true);
        }
        send_notification_mails($values['thread_id'], $values);
        Session::erase('formelements');
        Session::erase('origin');
        Session::erase('breadcrumbs');
        Session::erase('addedresource');
        Session::erase('addedresourceid');
        $return['msg'] = $message;
        $return['type'] = 'confirmation';
    } else {
        $return['msg'] = get_lang('UplNoFileUploaded') . ' ' . get_lang('UplSelectFileFirst');
        $return['type'] = 'error';
    }
    return $return;
}
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:91,代码来源:forumfunction.inc.php


示例12: facetoface_send_cancellation_notice

            $error = facetoface_send_cancellation_notice($facetoface, $session, $USER->id);
            //print_object($error);
            if (empty($error)) {
                if ($session->datetimeknown && isset($facetoface->cancellationinstrmngr) && !empty($facetoface->cancellationstrmngr)) {
                    $message .= html_writer::empty_tag('br') . html_writer::empty_tag('br') . get_string('cancellationsentmgr', 'facetoface');
                }
                else {
                    $message .= html_writer::empty_tag('br') . html_writer::empty_tag('br') . get_string('cancellationsent', 'facetoface');
                }
            } else {
                print_error($error, 'facetoface');
            }
         
        }

        set_notification($message, $returnurl, array('class' => 'notifysuccess'));
    }
    else {
        add_to_log($course->id, 'facetoface', "cancel booking (FAILED)", "cancelsignup.php?s=$session->id", $facetoface->id, $cm->id);
        $timemessage = 4;
        redirect($returnurl, $errorstr, $timemessage);
    }

   redirect($returnurl);
}

$pagetitle = format_string($facetoface->name);

$PAGE->set_cm($cm);
$PAGE->set_url('/mod/facetoface/cancelsignup.php', array('s' => $s, 'backtoallsessions' => $backtoallsessions, 'confirm' => $confirm));
开发者ID:narasimhaeabyas,项目名称:tataaiapro,代码行数:30,代码来源:cancelsignup.php



注:本文中的set_notification函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP set_notify函数代码示例发布时间:2022-05-15
下一篇:
PHP set_notice函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap