当前位置: 首页>>代码示例>>PHP>>正文


PHP print_footer函数代码示例

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


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

示例1: print_message

function print_message($msg)
{
    print_header();
    echo "\n<center>\n<table height=300>\n<tr><td align=center><font color=NAVY><b>\n    {$msg}\n    </b></font>\n    </td>\n</tr>\n</table>\n\t";
    print_footer();
    exit;
}
开发者ID:puchon,项目名称:php4-book,代码行数:7,代码来源:gb-lib.php

示例2: confirm

    /**
     * Show a simple confirmation form
     */
    public static function confirm($label)
    {
        if (is_post()) {
            if (isset($_POST['confirm_yes'])) {
                return true;
            } else {
                if (isset($_POST['confirm_no'])) {
                    return false;
                }
            }
        }
        ?>
        <?php 
        print_header();
        ?>
        <div id="confirm_form">
            <?php 
        \Meta\Core\Form::open();
        ?>
            <h2><?php 
        echo $label;
        ?>
</h2>
            <input type="submit" name="confirm_yes" value="Sim" />
            <input type="submit" name="confirm_no" value="Nao" />
            <?php 
        \Meta\Core\Form::close();
        ?>
        </div>
        <?php 
        print_footer();
        ?>
        <?php 
        exit;
    }
开发者ID:moiseh,项目名称:metapages,代码行数:38,代码来源:Form.php

示例3: print_entry

 function print_entry($course)
 {
     global $CFG, $USER;
     $strloginto = get_string("loginto", "", $course->shortname);
     $strcourses = get_string("courses");
     $teacher = get_teacher($course->id);
     if ((double) $course->cost < 0) {
         $cost = (double) $CFG->enrol_cost;
     } else {
         $cost = (double) $course->cost;
     }
     if (abs($cost) < 0.01) {
         // no cost, default to base class entry to course
         $manual = enrolment_factory::factory('manual');
         $manual->print_entry($course);
     } else {
         $navlinks = array();
         $navlinks[] = array('name' => $strcourses, 'link' => "{$CFG->wwwroot}/course", 'type' => 'misc');
         $navlinks[] = array('name' => $strloginto, 'link' => null, 'type' => 'misc');
         $navigation = build_navigation($navlinks);
         print_header($strloginto, $course->fullname, $navigation);
         print_course($course, "80%");
         if ($course->password) {
             // Presenting two options
             print_heading(get_string('costorkey', 'enrol_paypal'), 'center');
         }
         print_simple_box_start("center");
         if ($USER->username == 'guest') {
             // force login only for guest user, not real users with guest role
             if (empty($CFG->loginhttps)) {
                 $wwwroot = $CFG->wwwroot;
             } else {
                 // This actually is not so secure ;-), 'cause we're
                 // in unencrypted connection...
                 $wwwroot = str_replace("http://", "https://", $CFG->wwwroot);
             }
             echo '<div align="center"><p>' . get_string('paymentrequired') . '</p>';
             echo '<p><b>' . get_string('cost') . ": {$CFG->enrol_currency} {$cost}" . '</b></p>';
             echo '<p><a href="' . $wwwroot . '/login/">' . get_string('loginsite') . '</a></p>';
             echo '</div>';
         } else {
             //Sanitise some fields before building the PayPal form
             $coursefullname = $course->fullname;
             $courseshortname = $course->shortname;
             $userfullname = fullname($USER);
             $userfirstname = $USER->firstname;
             $userlastname = $USER->lastname;
             $useraddress = $USER->address;
             $usercity = $USER->city;
             include $CFG->dirroot . '/enrol/paypal/enrol.html';
         }
         print_simple_box_end();
         if ($course->password) {
             // Second option
             $password = '';
             include $CFG->dirroot . '/enrol/manual/enrol.html';
         }
         print_footer();
     }
 }
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:60,代码来源:enrol.php

示例4: invalid_booking

function invalid_booking($message)
{
    global $day, $month, $year, $area, $room;
    print_header($day, $month, $year, $area, isset($room) ? $room : "");
    echo "<h1>" . get_vocab('invalid_booking') . "</h1>\n";
    echo "<p>{$message}</p>\n";
    // Print footer and exit
    print_footer(TRUE);
}
开发者ID:dev-lav,项目名称:htdocs,代码行数:9,代码来源:edit_entry_handler.php

示例5: output_html

function output_html($result = array(), $arguments = array())
{
    print_header();
    print_table_head();
    foreach ($result as $no => $line) {
        print_table_line($no, $line['day'], $line['counter']);
    }
    print_footer();
}
开发者ID:woodjl1650,项目名称:AirlineBox,代码行数:9,代码来源:vc_statistics.html.php

示例6: html_footer

function html_footer()
{
    global $course, $choose;
    if ($choose) {
        echo "</td></tr></table>";
    } else {
        echo "</td></tr></table>";
        print_footer($course);
    }
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:10,代码来源:importwiki.php

示例7: html_footer

function html_footer()
{
    global $course, $choose;
    if ($choose) {
        wiki_table_end();
    } else {
        wiki_table_end();
        print_footer($course);
    }
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:10,代码来源:index.php

示例8: html_footer

function html_footer()
{
    global $course, $choose, $adminroot;
    echo '</td></tr></table>';
    if ($course->id == SITEID) {
        admin_externalpage_print_footer($adminroot);
    } else {
        print_footer($course);
    }
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:10,代码来源:coursefiles.php

示例9: display

 function display()
 {
     global $CFG;
     $formatoptions = new object();
     $formatoptions->noclean = true;
     /// Are we displaying the course blocks?
     if ($this->resource->options == 'showblocks') {
         parent::display_course_blocks_start();
         $entry = get_record('kaltura_entries', 'context', "R_" . "{$this->resource}->id");
         if (trim(strip_tags($this->resource->alltext))) {
             echo $entry->title;
             $player_url = $CFG->wwwroot . '/mod/kaltura/kswfdoc.php?context=' . $this->course->id . '&entry_id=' . $resource->alltext;
             $formatoptions = new object();
             $formatoptions->noclean = true;
             print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $this->course->id), "center");
             if ($resource->alltext) {
                 echo '<input style="margin-top:20px;" type="button" value="View video presentation" onclick="kalturaInitModalBox(\'' . $player_url . '\', {width:780, height:400});">';
             }
             //            echo embed_kaltura($resource->alltext,get_width($entry),get_height($entry),$entry->entry_type);
         }
         parent::display_course_blocks_end();
     } else {
         /// Set up generic stuff first, including checking for access
         parent::display();
         /// Set up some shorthand variables
         $cm = $this->cm;
         $course = $this->course;
         $resource = $this->resource;
         $entry = get_record('kaltura_entries', 'context', "R_" . "{$resource->id}");
         $pagetitle = strip_tags($course->shortname . ': ' . format_string($resource->name));
         $inpopup = optional_param('inpopup', '', PARAM_BOOL);
         add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
         $navigation = build_navigation($this->navlinks, $cm);
         print_header($pagetitle, $course->fullname, $navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));
         if (trim(strip_tags($this->resource->alltext))) {
             echo $entry->title;
         }
         $formatoptions = new object();
         $formatoptions->noclean = true;
         print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $this->course->id), "center");
         if (trim(strip_tags($this->resource->alltext))) {
             $player_url = $CFG->wwwroot . '/mod/kaltura/kswfdoc.php?context=' . $this->course->id . '&entry_id=' . $resource->alltext;
             if ($resource->alltext) {
                 echo '<input type="button" style="margin-top:20px;"  value="View video presentation" onclick="kalturaInitModalBox(\'' . $player_url . '\', {width:780, height:400});">';
             }
             //          echo embed_kaltura($resource->alltext,get_width($entry),get_height($entry),$entry->entry_type);
         }
         /*       print_simple_box(format_text($resource->alltext, $resource->reference, $formatoptions, $course->id),
                         "center", "", "", "20");
         */
         $strlastmodified = get_string("lastmodified");
         echo "<div class=\"modified\">{$strlastmodified}: " . userdate($resource->timemodified) . "</div>";
         print_footer($course);
     }
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:55,代码来源:resource.class.php

示例10: printFooter

 public static function printFooter($return_to = null, $return_text = null)
 {
     if (!empty($return_to)) {
         if (empty($return_text)) {
             $return_text = get_string('back');
         }
         $return_text = htmlspecialchars($return_text);
         echo '<div style="text-align:center; margin:auto;">', '<a href="', $return_to, '" title="', $return_text, '">', $return_text, '</a>', '</div>';
     }
     print_footer();
 }
开发者ID:nadavkav,项目名称:Moodle2-Hebrew-plugins,代码行数:11,代码来源:SharingCart_Repository.php

示例11: 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

示例12: 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

示例13: iplookup_display

function iplookup_display($ip, $user = 0)
{
    print_header();
    if ($user) {
        if ($user = get_record('user', 'id', $user)) {
            print_heading(fullname($user) . ", {$user->city}, {$user->country}", 'center', '4');
        }
    }
    echo 'Search results: <iframe src="http://www.hostip.info/api/get.html?ip=' . $ip . '" height="60" width="300"></iframe>';
    echo '<object data="http://www.hostip.info/map/frame.html?ip=' . $ip . '" ' . 'type="text/html" border="0" width="610" height="330"></object>';
    close_window_button();
    print_footer('none');
}
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:13,代码来源:lib.php

示例14: init

 /**
  * initialize the controller
  */
 function init()
 {
     global $pgv_lang, $CONTACT_EMAIL, $GEDCOM, $pgv_changes;
     $this->nid = safe_GET_xref('nid');
     $noterec = find_other_record($this->nid);
     if (isset($pgv_changes[$this->nid . "_" . $GEDCOM])) {
         $noterec = "0 @" . $this->nid . "@ NOTE\n";
     } else {
         if (!$noterec) {
             return false;
         }
     }
     $this->note = new Note($noterec);
     $this->note->ged_id = PGV_GED_ID;
     // This record is from a file
     if (!$this->note->canDisplayDetails()) {
         print_header($pgv_lang["private"] . " " . $pgv_lang["shared_note_info"]);
         print_privacy_error($CONTACT_EMAIL);
         print_footer();
         exit;
     }
     $this->uname = PGV_USER_NAME;
     //-- perform the desired action
     switch ($this->action) {
         case "addfav":
             $this->addFavorite();
             break;
         case "accept":
             $this->acceptChanges();
             break;
         case "undo":
             $this->note->undoChange();
             break;
     }
     //-- check for the user
     //-- if the user can edit and there are changes then get the new changes
     if ($this->show_changes && PGV_USER_CAN_EDIT && isset($pgv_changes[$this->nid . "_" . $GEDCOM])) {
         $newrec = find_updated_record($this->nid);
         $this->diffnote = new Note($newrec);
         $this->diffnote->setChanged(true);
         $noterec = $newrec;
     }
     if ($this->note->canDisplayDetails()) {
         $this->canedit = PGV_USER_CAN_EDIT;
     }
     if ($this->show_changes && $this->canedit) {
         $this->note->diffMerge($this->diffnote);
     }
 }
开发者ID:bitweaver,项目名称:phpgedview,代码行数:52,代码来源:note_ctrl.php

示例15: print_entry

 /**
 * Prints the entry form/page for this enrolment
 *
 * This is only called from course/enrol.php
 * Most plugins will probably override this to print payment
 * forms etc, or even just a notice to say that manual enrolment
 * is disabled
 *
 * @param    course  current course object
 */
 function print_entry($course)
 {
     global $CFG, $USER, $SESSION, $THEME;
     $strloginto = get_string('loginto', '', $course->shortname);
     $strcourses = get_string('courses');
     $context = context_system::get_context();
     $navlinks = array();
     $navlinks[] = array('name' => $strcourses, 'link' => ".", 'type' => 'misc');
     $navlinks[] = array('name' => $strloginto, 'link' => null, 'type' => 'misc');
     $navigation = build_navigation($navlinks);
     // if we get here we are going to display the BUY COURSE message
     print_header($strloginto, $course->fullname, $navigation, "form.password");
     include "{$CFG->dirroot}/enrol/joomdle/enrol.html";
     print_footer();
 }
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:25,代码来源:enrol.php


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