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

PHP print_box函数代码示例

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

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



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

示例1: block_exabis_eportfolio_print_extern_item

function block_exabis_eportfolio_print_extern_item($item, $access)
{
    global $CFG;
    print_heading(format_string($item->name));
    $box_content = '';
    if ($item->type == 'link') {
        $link = clean_param($item->url, PARAM_URL);
        $link_js = str_replace('http://', '', $link);
        if ($link) {
            $box_content .= '<p><a href="#" onclick="window.open(\'http://' . addslashes_js($link_js) . '\',\'validate\',\'width=620,height=450,scrollbars=yes,status=yes,resizable=yes,menubar=yes,location=yes\');return true;">' . $link . '</a></p>';
        }
    } elseif ($item->type == 'file') {
        if ($item->attachment) {
            $type = mimeinfo("type", $item->attachment);
            $ffurl = "{$CFG->wwwroot}/blocks/exabis_eportfolio/portfoliofile.php?access=" . $access . "&itemid=" . $item->id;
            if (in_array($type, array('image/gif', 'image/jpeg', 'image/png'))) {
                // Image attachments don't get printed as links
                $box_content .= "<img width=\"100%\" src=\"{$ffurl}\" alt=\"" . format_string($item->name) . "\" /><br/>";
            } else {
                $box_content .= "<p>" . link_to_popup_window("{$ffurl}", 'popup', "{$ffurl}", $height = 400, $width = 500, format_string($item->name), 'none', true) . "</p>";
            }
        }
    }
    $box_content .= format_text($item->intro, FORMAT_HTML);
    print_box($box_content);
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:26,代码来源:externlib.php


示例2: rejudge_showresult

function rejudge_showresult($success = true)
{
    print_header(get_string('notice'));
    if ($success) {
        $message = get_string('rejudgesuccess', 'assignment_onlinejudge');
    } else {
        $message = get_string('rejudgefailed', 'assignment_onlinejudge');
    }
    print_box($message, 'generalbox', 'notice');
    close_window_button();
    print_footer('none');
}
开发者ID:hit-moodle,项目名称:onlinejudge,代码行数:12,代码来源:rejudge.php


示例3: apply

 function apply($discussion, $all, $selected, $formdata)
 {
     global $COURSE, $USER, $CFG;
     // Begin with standard text
     $a = (object) array('name' => fullname($USER, true));
     $allhtml = "<head>";
     foreach ($CFG->stylesheets as $stylesheet) {
         $allhtml .= '<link rel="stylesheet" type="text/css" href="' . $stylesheet . '" />' . "\n";
     }
     $allhtml .= "</head>\n<body id='forumng-email'>\n";
     $preface = get_string('forward_preface', 'forumng', $a);
     $allhtml .= $preface;
     $alltext = format_text_email($preface, FORMAT_HTML);
     // Include intro if specified
     if (!preg_match('~^(<br[^>]*>|<p>|</p>|\\s)*$~', $formdata->message)) {
         $alltext .= "\n" . forum_cron::EMAIL_DIVIDER . "\n";
         $allhtml .= '<hr size="1" noshade="noshade" />';
         // Add intro
         $message = trusttext_strip(stripslashes($formdata->message));
         $allhtml .= format_text($message, $formdata->format);
         $alltext .= format_text_email($message, $formdata->format);
     }
     // Get list of all post ids in discussion order
     $alltext .= "\n" . forum_cron::EMAIL_DIVIDER . "\n";
     $allhtml .= '<hr size="1" noshade="noshade" />';
     $poststext = '';
     $postshtml = '';
     $discussion->build_selected_posts_email($selected, $poststext, $postshtml);
     $alltext .= $poststext;
     $allhtml .= $postshtml . '</body>';
     $emails = preg_split('~[; ]+~', $formdata->email);
     $subject = stripslashes($formdata->subject);
     foreach ($emails as $email) {
         $fakeuser = (object) array('email' => $email, 'mailformat' => 1, 'id' => 0);
         $from = $USER;
         $from->maildisplay = 999;
         // Nasty hack required for OU moodle
         if (!email_to_user($fakeuser, $from, $subject, $alltext, $allhtml)) {
             print_error('error_forwardemail', 'forumng', $formdata->email);
         }
     }
     // Log that it was sent
     $discussion->log('forward discussion', $formdata->email);
     if (!empty($formdata->ccme)) {
         if (!email_to_user($USER, $from, $subject, $alltext, $allhtml)) {
             print_error('error_forwardemail', 'forumng', $USER->email);
         }
     }
     $discussion->print_subpage_header($this->get_page_name());
     print_box(get_string('forward_done', 'forumng'));
     print_continue('../../discuss.php?' . $discussion->get_link_params(forum::PARAM_PLAIN));
     print_footer($COURSE);
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:53,代码来源:forward.php


示例4: user_message_form

if (!get_user_preferences('message_usehtmleditor', 0)) {
    $CFG->htmleditor = '';
}
$msgform = new user_message_form('user_bulk_message.php');
if ($msgform->is_cancelled()) {
    redirect($return);
} else {
    if ($formdata = $msgform->get_data()) {
        $options = new object();
        $options->para = false;
        $options->newlines = true;
        $options->smiley = false;
        $msg = format_text($formdata->messagebody, $formdata->format, $options);
        $in = implode(',', $SESSION->bulk_users);
        $userlist = $DB->get_records_select_menu('user', "id IN ({$in})", null, 'fullname', 'id,' . $DB->sql_fullname() . ' AS fullname');
        $usernames = implode(', ', $userlist);
        $optionsyes = array();
        $optionsyes['confirm'] = 1;
        $optionsyes['sesskey'] = sesskey();
        $optionsyes['msg'] = $msg;
        admin_externalpage_print_header();
        print_heading(get_string('confirmation', 'admin'));
        print_box($msg, 'boxwidthnarrow boxaligncenter generalbox', 'preview');
        notice_yesno(get_string('confirmmessage', 'bulkusers', $usernames), 'user_bulk_message.php', 'user_bulk.php', $optionsyes, NULL, 'post', 'get');
        admin_externalpage_print_footer();
        die;
    }
}
admin_externalpage_print_header();
$msgform->display();
admin_externalpage_print_footer();
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:31,代码来源:user_bulk_message.php


示例5: current

        $firstscorm = current($scorms);
        if (!($course->format == 'scorm' && $firstscorm->id == $scorm->id)) {
            $navlinks[] = array('name' => $strscorms, 'link' => "index.php?id={$course->id}", 'type' => 'activity');
        }
    }
}
$pagetitle = strip_tags($course->shortname . ': ' . format_string($scorm->name));
add_to_log($course->id, 'scorm', 'pre-view', 'view.php?id=' . $cm->id, "{$scorm->id}");
if (has_capability('mod/scorm:skipview', get_context_instance(CONTEXT_MODULE, $cm->id)) && scorm_simple_play($scorm, $USER)) {
    exit;
}
//
// Print the page header
//
$navlinks = array();
$navlinks[] = array('name' => format_string($scorm->name, true), 'link' => "view.php?id={$cm->id}", 'type' => 'activityinstance');
$navigation = build_navigation($navlinks);
print_header($pagetitle, $course->fullname, $navigation, '', '', true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm));
if (has_capability('mod/scorm:viewreport', $context)) {
    $trackedusers = scorm_get_count_users($scorm->id, $cm->groupingid);
    if ($trackedusers > 0) {
        echo "<div class=\"reportlink\"><a {$CFG->frametarget} href=\"report.php?id={$cm->id}\"> " . get_string('viewalluserreports', 'scorm', $trackedusers) . '</a></div>';
    } else {
        echo '<div class="reportlink">' . get_string('noreports', 'scorm') . '</div>';
    }
}
// Print the main part of the page
print_heading(format_string($scorm->name));
print_box(format_text($scorm->summary), 'generalbox', 'intro');
scorm_view_display($USER, $scorm, 'view.php?id=' . $cm->id, $cm);
print_footer($course);
开发者ID:r007,项目名称:PMoodle,代码行数:31,代码来源:view.php


示例6: admin_externalpage_setup

<?php

//$Id$
///This file only manages the installation of 1.6 lang packs.
///in downloads.moodle.org, they are store in separate directory /lang16
///in local server, they are stored in $CFG->dataroot/lang
///This helps to avoid confusion.
require_once '../config.php';
require_once $CFG->libdir . '/adminlib.php';
require_once $CFG->libdir . '/filelib.php';
require_once $CFG->libdir . '/componentlib.class.php';
admin_externalpage_setup('langimport');
if (!empty($CFG->skiplangupgrade)) {
    admin_externalpage_print_header();
    print_box(get_string('langimportdisabled', 'admin'));
    print_footer();
    die;
}
$mode = optional_param('mode', 0, PARAM_INT);
//phase
$pack = optional_param('pack', array(), PARAM_FILE);
//pack to install
$displaylang = $pack;
$uninstalllang = optional_param('uninstalllang', '', PARAM_FILE);
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$sitelang = optional_param('sitelangconfig', '', PARAM_FILE);
define('INSTALLATION_OF_SELECTED_LANG', 2);
define('DELETION_OF_SELECTED_LANG', 4);
define('UPDATE_ALL_LANG', 5);
$strlang = get_string('langimport', 'admin');
$strlanguage = get_string('language');
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:31,代码来源:langimport.php


示例7: get_recordset_sql

$sql = 'SELECT id, firstname, lastname, email 
            FROM ' . $CFG->prefix . 'user u
            WHERE deleted = 0 AND confirmed = 1 
                  AND mnethostid = ' . $CFG->mnet_localhost_id . ' ' . $select . 'ORDER BY lastname ASC, firstname ASC';
$availableusers = get_recordset_sql($sql, 0, MAX_USERS_PER_PAGE);
/// Print the page
/// get language strings
$str = get_strings(array('enrolmentplugins', 'configuration', 'users', 'administration'));
/// Get some language strings
$strpotentialusers = get_string('potentialusers', 'role');
$strexistingusers = get_string('existingusers', 'role');
$straction = get_string('assignroles', 'role');
$strroletoassign = get_string('roletoassign', 'role');
$strcurrentcontext = get_string('currentcontext', 'role');
$strsearch = get_string('search');
$strshowall = get_string('showall');
$strparticipants = get_string('participants');
$strsearchresults = get_string('searchresults');
admin_externalpage_print_header();
print_box('<strong>' . s($mnet_peer->name) . ' : ' . format_string($course->shortname) . ' ' . format_string($course->fullname) . '</strong><br />' . get_string("enrolcourseenrol_desc", "mnet"));
echo "<hr />";
include dirname(__FILE__) . '/enr_course_enrol.html';
if (!empty($errors)) {
    $msg = '<p>';
    foreach ($errors as $e) {
        $msg .= $e . '<br />';
    }
    $msg .= '</p>';
    notify($msg);
}
admin_externalpage_print_footer();
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:enr_course_enrol.php


示例8: forum_print_latest_discussions

            echo '&nbsp;';
        }
        echo '</p>';
        if (!empty($showall)) {
            forum_print_latest_discussions($course, $forum, 0, 'header', '', -1, -1, -1, 0, $cm);
        } else {
            forum_print_latest_discussions($course, $forum, -1, 'header', '', -1, -1, $page, $CFG->forum_manydiscussions, $cm);
        }
        break;
    case 'teacher':
        if (!empty($showall)) {
            forum_print_latest_discussions($course, $forum, 0, 'header', '', -1, -1, -1, 0, $cm);
        } else {
            forum_print_latest_discussions($course, $forum, -1, 'header', '', -1, -1, $page, $CFG->forum_manydiscussions, $cm);
        }
        break;
    default:
        if (!empty($forum->intro)) {
            $options = new stdclass();
            $options->para = false;
            print_box(format_text($forum->intro, FORMAT_MOODLE, $options), 'generalbox', 'intro');
        }
        echo '<br />';
        if (!empty($showall)) {
            forum_print_latest_discussions($course, $forum, 0, 'header', '', -1, -1, -1, 0, $cm);
        } else {
            forum_print_latest_discussions($course, $forum, -1, 'header', '', -1, -1, $page, $CFG->forum_manydiscussions, $cm);
        }
        break;
}
print_footer($course);
开发者ID:kai707,项目名称:ITSA-backup,代码行数:31,代码来源:view.php


示例9: print_box

// Explain
print_box(get_string('ssoacldescr', 'mnet'));
// Are the needed bits enabled?
$warn = '';
if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict') {
    $warn = '<p>' . get_string('mnetdisabled', 'mnet') . '</p>';
}
if (!is_enabled_auth('mnet')) {
    $warn .= '<p>' . get_string('authmnetdisabled', 'mnet') . '</p>';
}
if (get_config('auth/mnet', 'auto_add_remote_users') != true) {
    $warn .= '<p>' . get_string('authmnetautoadddisabled', 'mnet') . '</p>';
}
if (!empty($warn)) {
    $warn = '<p>' . get_string('ssoaclneeds', 'mnet') . '</p>' . $warn;
    print_box($warn);
}
// output the ACL table
$columns = array("username", "mnet_host_id", "access", "delete");
$headings = array();
$string = array('username' => get_string('username'), 'mnet_host_id' => get_string('remotehost', 'mnet'), 'access' => get_string('accesslevel', 'mnet'), 'delete' => get_string('delete'));
foreach ($columns as $column) {
    if ($sort != $column) {
        $columnicon = "";
        $columndir = "ASC";
    } else {
        $columndir = $dir == "ASC" ? "DESC" : "ASC";
        $columnicon = $dir == "ASC" ? "down" : "up";
        $columnicon = " <img src=\"{$CFG->pixpath}/t/{$columnicon}.gif\" alt=\"\" />";
    }
    $headings[$column] = "<a href=\"?sort={$column}&amp;dir={$columndir}&amp;\">" . $string[$column] . "</a>{$columnicon}";
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:access_control.php


示例10: addslashes_js

        $jsdescription = addslashes_js(trim(format_text($groups[$gpid]->description)));
        if (empty($jsdescription)) {
            $line[] = $name;
        } else {
            $jsstrdescription = addslashes_js($strdescription);
            $overlib = "return overlib('{$jsdescription}', BORDER, 0, FGCLASS, 'description', " . "CAPTIONFONTCLASS, 'caption', CAPTION, '{$jsstrdescription}');";
            $line[] = '<span onmouseover="' . s($overlib) . '" onmouseout="return nd();">' . $name . '</span>';
        }
        $fullnames = array();
        foreach ($users as $user) {
            $fullnames[] = '<a href="' . $CFG->wwwroot . '/user/view.php?id=' . $user->id . '&amp;course=' . $course->id . '">' . fullname($user, true) . '</a>';
        }
        $line[] = implode(', ', $fullnames);
        $line[] = count($users);
        $table->data[] = $line;
    }
    if ($groupid and empty($table->data)) {
        continue;
    }
    if (!empty($CFG->enablegroupings)) {
        if ($gpgid < 0) {
            print_heading($strnotingrouping, '', 3);
        } else {
            print_heading(format_string($groupings[$gpgid]->name), '', 3);
            print_box(format_text($groupings[$gpgid]->description), 'generalbox boxwidthnarrow boxaligncenter');
        }
    }
    print_table($table, false);
    $printed = true;
}
print_footer($course);
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:31,代码来源:overview.php


示例11: notice

/**
 * Print a message and exit.
 *
 * @uses $CFG
 * @param string $message ?
 * @param string $link ?
 * @todo Finish documenting this function
 */
function notice($message, $link = '', $course = NULL)
{
    global $CFG, $SITE, $THEME, $COURSE, $PAGE;
    $message = clean_text($message);
    // In case nasties are in here
    if (CLI_SCRIPT) {
        // notices in cron should be mtrace'd.
        mtrace($message);
        die;
    }
    if (!$PAGE->headerprinted) {
        //header not yet printed
        print_header(get_string('notice'));
    } else {
        print_container_end_all(false, $THEME->open_header_containers);
    }
    print_box($message, 'generalbox', 'notice');
    print_continue($link);
    if (empty($course)) {
        print_footer($COURSE);
    } else {
        print_footer($course);
    }
    exit;
}
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:33,代码来源:weblib.php


示例12: print_box

    print_box($stroutofattempts, 'center');
} elseif ($key == $preferences['newemailkey']) {
    $olduser = clone $user;
    cancel_email_update($user->id);
    $user->email = $preferences['newemail'];
    // Detect duplicate before saving
    if (get_record('user', 'email', addslashes($user->email))) {
        $stremailnowexists = get_string('auth_emailnowexists', 'auth');
        print_box($stremailnowexists, 'center');
        print_continue("{$CFG->wwwroot}/user/view.php?id={$user->id}");
    } else {
        // update user email
        if (!set_field('user', 'email', addslashes($user->email), 'id', $user->id)) {
            error('Error updating user record');
        } else {
            $authplugin = get_auth_plugin($user->auth);
            $authplugin->user_update($olduser, $user);
            events_trigger('user_updated', $user);
            $a->email = $user->email;
            $stremailupdatesuccess = get_string('auth_emailupdatesuccess', 'auth', $a);
            print_box($stremailupdatesuccess, 'center');
            print_continue("{$CFG->wwwroot}/user/view.php?id={$user->id}");
        }
    }
} else {
    $preferences['newemailattemptsleft']--;
    set_user_preference('newemailattemptsleft', $preferences['newemailattemptsleft'], $user->id);
    $strinvalidkey = get_string('auth_invalidnewemailkey', 'auth');
    print_box($strinvalidkey, 'center');
}
print_footer('none');
开发者ID:edwinphillips,项目名称:moodle-485cb39,代码行数:31,代码来源:emailupdate.php


示例13: switch

        $head = $gXpLang['add_affiliate'];
    } else {
        $head = $gXpLang['account_status'] . ' : ';
        $head .= '<span style="text-transform: capitalize;">';
        switch ($account['approved']) {
            case 1:
                $head .= $gXpLang['status_pending'];
                break;
            case 2:
                $head .= $gXpLang['status_approved'];
                break;
            default:
                $head .= $gXpLang['status_disapproved'];
        }
        $head .= '</span>';
        print_box(0, $head);
    }
    //					echo $head;
    ?>
				<!--		</div>-->

		<table class="admintable">
		<tbody><tr>
			<td valign="top" width="60%">
				<table class="adminform">
				<tbody>
				<tr>
					<th colspan="2"><?php 
    echo $gXpLang['affiliate_personal_details'];
    ?>
</th>
开发者ID:AdoSalkic,项目名称:personal,代码行数:31,代码来源:manage-account.php


示例14: print_box

<br />

<?php 
print_box($error, $msg);
$commission = $gXpAdmin->getCommissionById($_GET['id']);
$aff = $gXpAdmin->getAffiliateById($commission['aff_id']);
?>
		
<form action="manage-commission.php<?php 
echo $user > 0 ? "?user=" . $user : "";
?>
" method="post" name="adminForm">

<?php 
if (!$msg) {
    print_box(0, $user > 0 ? '' : $gXpLang['commission_status_approval']);
    ?>
		
		<table class="admintable">
		<tbody><tr>
			<td valign="top" width="60%">
			<fieldset style="width:384px;border:1px solid #e9e9e9;padding:0px 0px 10px 10px;margin:10px 0px 10px 0px;">
			        <legend style="border:1px solid #e9e9e9;font:bold 12px arial;color:#333;padding:3px;"><?php 
    echo $gXpLang['commission_details'];
    ?>
</legend>
				<table class="adminform">
				<tbody>

				<tr>
					<td width="100"><?php 
开发者ID:AdoSalkic,项目名称:personal,代码行数:31,代码来源:manage-commission.php


示例15: get_records

$requireds = get_records('qcreate_required', 'qcreateid', $qcreate->id, 'qtype', 'qtype, no, id');
$modulecontext = get_context_instance(CONTEXT_MODULE, $cm->id);
require_login($COURSE->id);
require_capability('mod/qcreate:grade', $modulecontext);
add_to_log($COURSE->id, "qcreate", "overview", "overview.php?id={$cm->id}", "{$qcreate->id}");
/// Print the page header
$strqcreates = get_string("modulenameplural", "qcreate");
$strqcreate = get_string("modulename", "qcreate");
$navlinks = array();
$navlinks[] = array('name' => $strqcreates, 'link' => "index.php?id={$COURSE->id}", 'type' => 'activity');
$navlinks[] = array('name' => format_string($qcreate->name), 'link' => '', 'type' => 'activityinstance');
$navigation = build_navigation($navlinks);
print_header_simple(format_string($qcreate->name), "", $navigation, "", "", true, update_module_button($cm->id, $COURSE->id, $strqcreate), navmenu($COURSE, $cm));
$mode = 'overview';
include 'tabs.php';
print_box(format_text($qcreate->intro, $qcreate->introformat), 'generalbox', 'intro');
$qcreatetime = new object();
$qcreatetime->timeopen = userdate($qcreate->timeopen);
$qcreatetime->timeclose = userdate($qcreate->timeclose);
/*    if ($qcreate->timeopen == 0 AND $qcreate->timeclose ==0 ){
        $timestring = get_string('timenolimit', 'qcreate');
    } else if ($qcreate->timeopen != 0 AND $qcreate->timeclose ==0 ) {
        $timestring = get_string('timeopen', 'qcreate', $qcreatetime);
        
    } else if ($qcreate->timeopen == 0 AND $qcreate->timeclose !=0 ) {
        $timestring = get_string('timeclose', 'qcreate', $qcreatetime);
    } else {
        $timestring = get_string('timeopenclose', 'qcreate', $qcreatetime);
    }*/
$timestring = qcreate_time_status($qcreate);
if ($qcreate->graderatio == 100) {
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:31,代码来源:overview.php


示例16: rss_get_link

                }
                //Get html code for RSS link
                $row[] = rss_get_link($course->id, $userid, "forum", $forum->id, $tooltiptext);
            }
            $learningtable->data[] = $row;
        }
    }
}
/// Output the page
$navlinks = array();
$navlinks[] = array('name' => $strforums, 'link' => '', 'type' => 'activity');
print_header("{$course->shortname}: {$strforums}", $course->fullname, build_navigation($navlinks), "", "", true, $searchform, navmenu($course));
if (!isguest()) {
    print_box_start('subscription');
    echo '<span class="helplink">';
    echo '<a href="index.php?id=' . $course->id . '&amp;subscribe=1">' . get_string('allsubscribe', 'forum') . '</a>';
    echo '</span><br /><span class="helplink">';
    echo '<a href="index.php?id=' . $course->id . '&amp;subscribe=0">' . get_string('allunsubscribe', 'forum') . '</a>';
    echo '</span>';
    print_box_end();
    print_box('&nbsp;', 'clearer');
}
if ($generalforums) {
    print_heading(get_string("generalforums", "forum"));
    print_table($generaltable);
}
if ($learningforums) {
    print_heading(get_string("learningforums", "forum"));
    print_table($learningtable);
}
print_footer($course);
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:index.php


示例17: count

$tojoincount = count($questionnamestojoin);
if ($tojoincount > 1) {
    $a = new object();
    $a->one = $questionnamestojoin[$tojoincount - 2] . '"</strong>';
    $a->two = '<strong>"' . $questionnamestojoin[$tojoincount - 1];
    $questionnamestojoin[$tojoincount - 2] = get_string('and', '', $a);
    unset($questionnamestojoin[$tojoincount - 1]);
}
$questionsstr->questions = '<strong>"' . join($questionnamestojoin, '"</strong>, <strong>"') . '"</strong>';
if (count($urls)) {
    $defaults = array();
    for ($default_key = 0; $default_key < count($urls); $default_key++) {
        switch ($tocoursefilesid) {
            case SITEID:
                $defaults['urls'][$default_key] = QUESTION_FILEMOVE;
                break;
            default:
                $defaults['urls'][$default_key] = QUESTION_FILECOPY;
                break;
        }
    }
    $contextmoveform->set_data($defaults);
    //some parameters for get_string
    $questionsstr->urlcount = count($urls);
    $questionsstr->toareaname = $toareaname;
    print_box(get_string('movingquestionsandfiles', 'question', $questionsstr), 'boxwidthnarrow boxaligncenter generalbox');
} else {
    print_box(get_string('movingquestionsnofiles', 'question', $questionsstr), 'boxwidthnarrow boxaligncenter generalbox');
}
$contextmoveform->display();
print_footer($COURSE);
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:contextmoveq.php


示例18: print_box_end

                // echo '<input class="feedback_movehere_button" title="'.get_string('move_here','feedback').'" type="image" src="'.$CFG->pixpath .'/movehere.gif" />';
                // echo '<input type="hidden" name="movehere" value="'.$moveposition.'" />';
                // feedback_edit_print_default_form_values($id, $do_show);
                // echo '</fieldset></form>';
                echo '</td>';
                echo '</tr>';
            } else {
                echo '<tr><td>&nbsp;</td></tr>';
            }
        }
        echo '</table>';
        // print_simple_box_end();
        print_box_end();
    } else {
        // print_simple_box(get_string('no_items_available_yet','feedback'),"center");
        print_box(get_string('no_items_available_yet', 'feedback'), 'generalbox boxaligncenter');
    }
}
/// Finish the page
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
print_footer($course);
function feedback_edit_get_default_query($id, $tab)
{
    global $USER;
    $query = 'id=' . $id;
    $query .= '&do_show=' . $tab;
    //$query .= '&sesskey='.sesskey();
    return $query;
}
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:31,代码来源:edit.php


示例19: print_lock_prerequisites

 /**
  * Print lock pre-requisites message
  *
  * @param object $page Format page object
  * @return void
  **/
 public static function print_lock_prerequisites($page)
 {
     $lockinfo = self::decode($page->locks);
     if ($lockinfo['showprereqs']) {
         $locks = self::get_locks();
         $messages = array();
         foreach ($lockinfo['locks'] as $lock) {
             if ($locks[$lock['type']]->locked($lock)) {
                 $messages[] = $locks[$lock['type']]->get_prerequisite($lock);
             }
         }
         $messages = '<ul><li>' . implode('</li><li>', $messages) . '</li></ul>';
         $message = get_string('prereqsmessage', 'format_page', $messages);
     } else {
         $message = get_string('pageislocked', 'format_page');
     }
     print_box($message, 'generalbox', 'pagelock');
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:24,代码来源:lock.php


示例20: tag_print_search_results

/**
 * Prints the tag search results
 *
 * @param string $query text that tag names will be matched against
 * @param int $page current page
 * @param int $perpage nr of users displayed per page
 * @param $return if true return html string
 */
function tag_print_search_results($query, $page, $perpage, $return = false)
{
    global $CFG, $USER;
    $query = array_shift(tag_normalize($query, TAG_CASE_ORIGINAL));
    $count = sizeof(tag_find_tags($query, false));
    $tags = array();
    if ($found_tags = tag_find_tags($query, true, $page * $perpage, $perpage)) {
        $tags = array_values($found_tags);
    }
    $baseurl = $CFG->wwwroot . '/tag/search.php?query=' . rawurlencode($query);
    $output = '';
    // link "Add $query to my interests"
    $addtaglink = '';
    if (!tag_record_tagged_with('user', $USER->id, $query)) {
        $addtaglink = '<a href="' . $CFG->wwwroot . '/tag/user.php?action=addinterest&amp;sesskey=' . sesskey() . '&amp;tag=' . rawurlencode($query) . '">';
        $addtaglink .= get_string('addtagtomyinterests', 'tag', htmlspecialchars($query)) . '</a>';
    }
    if (!empty($tags)) {
        // there are results to display!!
        $output .= print_heading(get_string('searchresultsfor', 'tag', htmlspecialchars($query)) . " : {$count}", '', 3, 'main', true);
        //print a link "Add $query to my interests"
        if (!empty($addtaglink)) {
            $output .= print_box($addtaglink, 'box', 'tag-management-box', true);
        }
        $nr_of_lis_per_ul = 6;
        $nr_of_uls = ceil(sizeof($tags) / $nr_of_lis_per_ul);
        $output .= '<ul id="tag-search-results">';
        for ($i = 0; $i < $nr_of_uls; $i++) {
            $output .= '<li>';
            foreach (array_slice($tags, $i * $nr_of_lis_per_ul, $nr_of_lis_per_ul) as $tag) {
                $tag_link = ' <a href="' . $CFG->wwwroot . '/tag/index.php?id=' . $tag->id . '">' . tag_display_name($tag) . '</a>';
                $output .= '&#8226;' . $tag_link . '<br/>';
            }
            $output .= '</li>';
        }
        $output .= '</ul>';
        $output .= '<div>&nbsp;</div>';
        // <-- small layout hack in order to look good in Firefox
        $output .= print_paging_bar($count, $page, $perpage, $baseurl . '&amp;', 'page', false, true);
    } else {
        //no results were found!!
        $output .= print_heading(get_string('noresultsfor', 'tag', htmlspecialchars($query)), '', 3, 'main', true);
        //print a link "Add $query to my interests"
        if (!empty($addtaglink)) {
            $output .= print_box($addtaglink, 'box', 'tag-management-box', true);
        }
    }
    if ($return) {
        return $output;
    } else {
        echo $output;
    }
}
开发者ID:edwinphillips,项目名称:moodle-485cb39,代码行数:61,代码来源:locallib.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP print_box_end函数代码示例发布时间:2022-05-15
下一篇:
PHP print_barre_liste函数代码示例发布时间: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