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

PHP print_simple_box_start函数代码示例

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

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



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

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


示例2: display_msg

/**
 * Display an message with optional details from HTML
 *
 * @param string $msg     The message to display
 * @param string $details Any message details to be initially hidden
 * @param string $type    The 'type' of message: i.e. 'error','general', ???
 */
function display_msg($msg, $details = '', $type = 'error')
{
    $width = '';
    if (!empty($details)) {
        $innertags = array('html', 'body');
        foreach ($innertags as $tag) {
            if (($tagpos = stripos($details, '<' . $tag)) !== false && ($firstend = strpos(substr($details, $tagpos), '>')) !== false) {
                if (($tagend = stripos($details, '</' . $tag . '>')) !== false) {
                    $details = substr($details, $tagpos + $firstend + 1, $tagend - $tagpos - $firstend - 1);
                } else {
                    $details = substr($details, $tagpos + $firstend + 1);
                }
            }
        }
        $details = addcslashes($details, "'");
        $details = preg_replace("/\n/", '', $details);
        $details = preg_replace("|/alfresco/images/logo/AlfrescoLogo32.png|", '/blocks/repository/AlfrescoLogo32.png', $details);
        $width = '99%';
        // TBD
    }
    $output = print_simple_box_start('center', $width, '', 5, $type . 'box', '', true);
    $output .= $msg;
    if (!empty($details)) {
        $output .= '<p align="right"><input type="button" value="' . get_string('details', 'block_repository') . '" onclick="toggle_msgdetails();" /></p>' . '<div id="msgdetails" style="overflow:auto;overflow-y:hidden;-ms-overflow-y:hidden"></div>';
        $output .= "\n<script type=\"text/javascript\">\n//<![CDATA[\nfunction toggle_msgdetails() {\n    mddiv = document.getElementById('msgdetails');\n    if (mddiv) {\n        mddiv.innerHTML = (mddiv.innerHTML == '') ? '{$details}' : '';\n    }\n}\n//]]>\n</script>\n";
    }
    $output .= print_simple_box_end(true);
    echo $output;
}
开发者ID:remotelearner,项目名称:elis.alfresco,代码行数:36,代码来源:lib.php


示例3: view

 /**
  * Displays the assignment content - this method overrides
  * the parent class, adding a repository availability check
  */
 function view()
 {
     global $USER;
     require_capability('mod/assignment:view', $this->context);
     //start of RL base-class modification
     $repo = $this->get_repository_object();
     if (!$repo) {
         //configuration is not complete
         $message = get_string('errorrepository', 'assignment_backpack');
         //wrap the error with further instructions
         print_error('errorrepositoryview', 'assignment_backpack', '', $message);
     }
     //end of RL base-class modification
     add_to_log($this->course->id, 'assignment', 'view', "view.php?id={$this->cm->id}", $this->assignment->id, $this->cm->id);
     $this->view_header();
     if ($this->assignment->timeavailable > time() and !has_capability('mod/assignment:grade', $this->context) and $this->assignment->var3) {
         // force hiding before available date
         print_simple_box_start('center', '', '', 0, 'generalbox', 'intro');
         print_string('notavailableyet', 'assignment');
         print_simple_box_end();
     } else {
         $this->view_intro();
     }
     $this->view_dates();
     $filecount = $this->count_user_files($USER->id);
     $submission = $this->get_submission($USER->id);
     $this->view_feedback();
     if (!$this->drafts_tracked() or !$this->isopen() or $this->is_finalized($submission)) {
         print_heading(get_string('submission', 'assignment'), '', 3);
     } else {
         print_heading(get_string('submissiondraft', 'assignment'), '', 3);
     }
     if ($filecount and $submission) {
         print_simple_box($this->print_user_files($USER->id, true), 'center');
     } else {
         if (!$this->isopen() or $this->is_finalized($submission)) {
             print_simple_box(get_string('nofiles', 'assignment'), 'center');
         } else {
             print_simple_box(get_string('nofilesyet', 'assignment'), 'center');
         }
     }
     if (has_capability('mod/assignment:submit', $this->context)) {
         $this->view_upload_form();
     }
     if ($this->notes_allowed()) {
         print_heading(get_string('notes', 'assignment'), '', 3);
         $this->view_notes();
     }
     $this->view_final_submission();
     $this->view_footer();
 }
开发者ID:remotelearner,项目名称:elis.alfresco,代码行数:55,代码来源:assignment.class.php


示例4: journal_user_complete_index

function journal_user_complete_index($course, $user, $journal, $journalopen, $heading)
{
    /// Prints a journal, entry and feedback ... used on the journal index page.
    if (isteacher($course->id)) {
        $entrycount = journal_count_entries($journal, get_current_group($course->id));
        $entryinfo = "&nbsp;(<a href=\"report.php?id={$journal->coursemodule}\">" . get_string("viewallentries", "journal", $entrycount) . "</a>)";
    } else {
        $entryinfo = "";
    }
    $journal->name = "<a href=\"view.php?id={$journal->coursemodule}\">" . format_string($journal->name, true) . "</a>";
    if ($heading) {
        echo "<h3>{$heading} - {$journal->name}{$entryinfo}</h3>";
    } else {
        echo "<h3>{$journal->name}{$entryinfo}</h3>";
    }
    print_simple_box_start("left", "90%");
    echo format_text($journal->intro, $journal->introformat);
    print_simple_box_end();
    echo "<br clear=\"all\" />";
    echo "<br />";
    if (isstudent($course->id) or isteacher($course->id)) {
        print_simple_box_start("right", "90%");
        if ($journalopen) {
            echo "<p align=\"right\"><a href=\"edit.php?id={$journal->coursemodule}\">";
            echo get_string("edit") . "</a></p>";
        } else {
            echo "<p align=\"right\"><a href=\"view.php?id={$journal->coursemodule}\">";
            echo get_string("view") . "</a></p>";
        }
        if ($entry = get_record("journal_entries", "userid", $user->id, "journal", $journal->id)) {
            if ($entry->modified) {
                echo "<p align=\"center\"><font size=\"1\">" . get_string("lastedited") . ": " . userdate($entry->modified) . "</font></p>";
            }
            if ($entry->text) {
                echo format_text($entry->text, $entry->format);
            }
            if ($entry->teacher) {
                $grades = make_grades_menu($journal->assessed);
                journal_print_feedback($course, $entry, $grades);
            }
        } else {
            print_string("noentry", "journal");
        }
        print_simple_box_end();
        echo "<br clear=\"all\" />";
        echo "<br />";
    }
}
开发者ID:r007,项目名称:PMoodle,代码行数:48,代码来源:lib.php


示例5: instance_config_print

 function instance_config_print()
 {
     global $CFG;
     /// set up the numberoftags select field
     $numberoftags = array();
     for ($i = 1; $i <= 200; $i++) {
         $numberoftags[$i] = $i;
     }
     if (is_file($CFG->dirroot . '/blocks/' . $this->name() . '/config_instance.html')) {
         print_simple_box_start('center', '', '', 5, 'blockconfigglobal');
         include $CFG->dirroot . '/blocks/' . $this->name() . '/config_instance.html';
         print_simple_box_end();
     } else {
         notice(get_string('blockconfigbad'), str_replace('blockaction=', 'dummy=', qualified_me()));
     }
 }
开发者ID:JackCanada,项目名称:moodle-hacks,代码行数:16,代码来源:block_tags.php


示例6: view

 function view()
 {
     global $USER;
     require_capability('mod/assignment:view', $this->context);
     add_to_log($this->course->id, 'assignment', 'view', "view.php?id={$this->cm->id}", $this->assignment->id, $this->cm->id);
     $this->view_header();
     if ($this->assignment->timeavailable > time() and !has_capability('mod/assignment:grade', $this->context) and $this->assignment->var3) {
         // force hiding before available date
         print_simple_box_start('center', '', '', 0, 'generalbox', 'intro');
         print_string('notavailableyet', 'assignment');
         print_simple_box_end();
     } else {
         $this->view_intro();
     }
     $this->view_dates();
     if (has_capability('mod/assignment:submit', $this->context)) {
         $filecount = $this->count_user_files($USER->id);
         $submission = $this->get_submission($USER->id);
         $this->view_feedback();
         if (!$this->drafts_tracked() or !$this->isopen() or $this->is_finalized($submission)) {
             print_heading(get_string('submission', 'assignment'), '', 3);
         } else {
             print_heading(get_string('submissiondraft', 'assignment'), '', 3);
         }
         if ($filecount and $submission) {
             print_simple_box($this->print_user_files($USER->id, true), 'center');
         } else {
             if (!$this->isopen() or $this->is_finalized($submission)) {
                 print_simple_box(get_string('nofiles', 'assignment'), 'center');
             } else {
                 print_simple_box(get_string('nofilesyet', 'assignment'), 'center');
             }
         }
         $this->view_upload_form();
         if ($this->notes_allowed()) {
             print_heading(get_string('notes', 'assignment'), '', 3);
             $this->view_notes();
         }
         $this->view_final_submission();
     }
     $this->view_footer();
 }
开发者ID:NextEinstein,项目名称:riverhills,代码行数:42,代码来源:assignment.class.php


示例7: data_submitted

                $data = data_submitted();
            }
            if ($success) {
                $savedstr = get_string('configsaved', 'repository');
                //admin_externalpage_print_header();
                print_heading($savedstr);
                redirect($baseurl, $savedstr, 3);
            } else {
                print_error('instancenotsaved', 'repository', $baseurl);
            }
            exit;
        } else {
            // Display the form
            // admin_externalpage_print_header();
            print_heading(get_string('configplugin', 'repository_' . $plugin));
            print_simple_box_start();
            $mform->display();
            print_simple_box_end();
            $return = false;
        }
    }
} else {
    if (!empty($delete)) {
        // admin_externalpage_print_header();
        $instance = repository::get_instance($delete);
        //if you try to delete an instance set as readonly, display an error message
        if ($instance->readonly) {
            throw new repository_exception('readonlyinstance', 'repository');
        }
        if ($sure) {
            if (!confirm_sesskey()) {
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:31,代码来源:manage_instances.php


示例8: workshop_user_complete

function workshop_user_complete($course, $user, $mod, $workshop)
{
    if ($submission = workshop_get_student_submission($workshop, $user)) {
        if ($basedir = workshop_file_area($workshop, $user)) {
            if ($files = get_directory_list($basedir)) {
                $countfiles = count($files) . ' ' . get_string('submissions', 'workshop');
                foreach ($files as $file) {
                    $countfiles .= "; {$file}";
                }
            }
        }
        print_simple_box_start();
        echo $submission->description . '<br />';
        if (!empty($countfiles)) {
            echo $countfiles, '<br />';
        }
        workshop_print_feedback($course, $submission);
        print_simple_box_end();
    } else {
        print_string('notsubmittedyet', 'workshop');
    }
}
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:22,代码来源:lib.php


示例9: user_complete

 /**
  * Print complete information about the user's interaction with the assignment
  *
  * @param $user object
  */
 function user_complete($user, $grade = null)
 {
     if ($grade) {
         echo '<p>' . get_string('grade') . ': ' . $grade->str_long_grade . '</p>';
         if ($grade->str_feedback) {
             echo '<p>' . get_string('feedback') . ': ' . $grade->str_feedback . '</p>';
         }
     }
     if ($submission = $this->get_submission($user->id)) {
         if ($basedir = $this->file_area($user->id)) {
             if ($files = get_directory_list($basedir)) {
                 $countfiles = count($files) . " " . get_string("uploadedfiles", "assignment");
                 foreach ($files as $file) {
                     $countfiles .= "; {$file}";
                 }
             }
         }
         print_simple_box_start();
         echo get_string("lastmodified") . ": ";
         echo userdate($submission->timemodified);
         echo $this->display_lateness($submission->timemodified);
         $this->print_user_files($user->id);
         echo '<br />';
         $this->view_feedback($submission);
         print_simple_box_end();
     } else {
         print_string("notsubmittedyet", "assignment");
     }
 }
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:34,代码来源:lib.php


示例10: print_entry

 /**
  * Presents registration forms.
  *
  * @param object $course Course info
  * @access public
  */
 function print_entry($course)
 {
     global $CFG, $USER, $form;
     $zerocost = zero_cost($course);
     if ($zerocost) {
         $manual = enrolment_factory::factory('manual');
         if (!empty($this->errormsg)) {
             $manual->errormsg = $this->errormsg;
         }
         $manual->print_entry($course);
         return;
     }
     prevent_double_paid($course);
     httpsrequired();
     if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 443) {
         // MDL-9836
         if (empty($CFG->loginhttps)) {
             print_error('httpsrequired', 'enrol_authorize');
         } else {
             $wwwsroot = str_replace('http:', 'https:', $CFG->wwwroot);
             redirect("{$wwwsroot}/course/enrol.php?id={$course->id}");
             exit;
         }
     }
     $strcourses = get_string('courses');
     $strloginto = get_string('loginto', '', $course->shortname);
     $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) {
         print_heading(get_string('choosemethod', 'enrol_authorize'), 'center');
     }
     print_simple_box_start('center', '80%');
     if ($USER->username == 'guest') {
         // only real guest user, not for users with guest role
         $curcost = get_course_cost($course);
         echo '<div class="mdl-align">';
         echo '<p>' . get_string('paymentrequired') . '</p>';
         echo '<p><b>' . get_string('cost') . ": {$curcost['currency']} {$curcost['cost']}" . '</b></p>';
         echo '<p><a href="' . $CFG->httpswwwroot . '/login/">' . get_string('loginsite') . '</a></p>';
         echo '</div>';
     } else {
         require_once $CFG->dirroot . '/enrol/authorize/enrol_form.php';
         $frmenrol = new enrol_authorize_form('enrol.php', compact('course'));
         if ($frmenrol->get_data()) {
             $authorizeerror = '';
             switch ($form->paymentmethod) {
                 case AN_METHOD_CC:
                     $authorizeerror = $this->cc_submit($form, $course);
                     break;
                 case AN_METHOD_ECHECK:
                     $authorizeerror = $this->echeck_submit($form, $course);
                     break;
             }
             if (!empty($authorizeerror)) {
                 error($authorizeerror);
             }
         }
         $frmenrol->display();
     }
     print_simple_box_end();
     if ($course->password) {
         $password = '';
         include $CFG->dirroot . '/enrol/manual/enrol.html';
     }
     print_footer();
 }
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:76,代码来源:enrol.php


示例11: print_feedback_radio

function print_feedback_radio($item, $value = false, $readonly = false)
{
    $presentation = explode("|", stripslashes_safe($item->presentation));
    $requiredmark = $item->required == 1 ? '<font color="red">*</font>' : '';
    ?>
   <td valign="top" align="left"><?php 
    echo text_to_html(stripslashes_safe($item->name) . $requiredmark, true, false, false);
    ?>
</td>
   <td valign="top" align="left">
<?php 
    $index = 1;
    $checked = '';
    if ($readonly) {
        foreach ($presentation as $radio) {
            if ($value == $index) {
                print_simple_box_start('left');
                echo text_to_html($radio, true, false, false);
                print_simple_box_end();
                break;
            }
            $index++;
        }
    } else {
        foreach ($presentation as $radio) {
            if ($value == $index) {
                $checked = 'checked="checked"';
            } else {
                $checked = '';
            }
            ?>
         <table><tr>
         <td valign="top"><input type="radio"
               name="<?php 
            echo $item->typ . '_' . $item->id;
            ?>
"
               value="<?php 
            echo $index;
            ?>
" <?php 
            echo $checked;
            ?>
 />
         </td><td><?php 
            echo text_to_html($radio, true, false, false);
            ?>
&nbsp;
         </td></tr></table>
<?php 
            $index++;
        }
        /*
        if($item->required == 1) {
           echo '<input type="hidden" name="'.$item->typ . '_' . $item->id.'" value="1" />';
        }
        */
    }
    ?>
   </td>
<?php 
}
开发者ID:stokekld,项目名称:TemasMoodleMineria,代码行数:62,代码来源:lib.php


示例12: print_simple_box_start

<?php

//admin_externalpage_print_header();
print_simple_box_start("center", "");
if (!empty($page->message)) {
    echo '<p>' . $page->message . '</p>';
}
?>
<form method="post" action="settings.php">
<div>
<input type="hidden" name="sesskey" value="<?php 
echo $USER->sesskey;
?>
" />
<input type="hidden" name="action" value="<?php 
echo $page->action;
?>
" />
<table cellpadding="9" cellspacing="0" width="635">

<tr>
    <td align="right" valign="top">Server Id:</td>
    <td valign="top"><input type="text" name="serverId" size="3" value="<?php 
echo $page->serverId;
?>
" /></td>
</tr>

<tr>
    <td></td>
    <td><input type="submit" value="<?php 
开发者ID:r007,项目名称:PMoodle,代码行数:31,代码来源:settings.php


示例13: user_complete

 /**
  * Print complete information about the user's interaction with the assignment
  *
  * @param $user object
  */
 function user_complete($user)
 {
     if ($submission = $this->get_submission($user->id)) {
         if ($basedir = $this->file_area($user->id)) {
             if ($files = get_directory_list($basedir)) {
                 $countfiles = count($files) . " " . get_string("uploadedfiles", "assignment");
                 foreach ($files as $file) {
                     $countfiles .= "; {$file}";
                 }
             }
         }
         print_simple_box_start();
         echo get_string("lastmodified") . ": ";
         echo userdate($submission->timemodified);
         echo $this->display_lateness($submission->timemodified);
         $this->print_user_files($user->id);
         echo '<br />';
         if (empty($submission->timemarked)) {
             print_string("notgradedyet", "assignment");
         } else {
             $this->view_feedback($submission);
         }
         print_simple_box_end();
     } else {
         print_string("notsubmittedyet", "assignment");
     }
 }
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:32,代码来源:lib.php


示例14: preg_split

/// Insert a link to force page refresh if new content isn't showing.
// build new URL + query string
$queries = preg_split('/[?&]/', me());
$nqueries = count($queries);
$me = $queries[0] . '?';
for ($i = 1; $i < $nqueries; $i++) {
    if (!strstr($queries[$i], 'allowcache')) {
        $me .= $queries[$i] . '&amp;';
    }
}
$me .= 'allowcache=0';
// Insert the link
$linkdesc = get_string('reloadlinkdescription', 'wiki');
$linktext = get_string('reloadlinktext', 'wiki');
echo "<div class='wikilinkright'><a href='{$me}' title='{$linkdesc}'><input type='button' value='{$linktext}' /></a></div>";
print_simple_box_start('center', '100%', '', '20');
/// Don't filter any pages containing wiki actions (except view). A wiki page containing
/// actions will have the form [action]/[pagename]. If the action is 'view' or the  '/'
/// isn't there (so the action defaults to 'view'), filter it.
/// If the page does not yet exist, the display will default to 'edit'.
if ((count($actions) < 2 || $actions[0] == "view") && $wiki_entry && record_exists('wiki_pages', 'pagename', addslashes($page), 'wiki', $wiki_entry->id)) {
    print format_text($content, $moodle_format);
} else {
    if ($actions[0] == 'edit' && $reallyedit) {
        // Check the page isn't locked before printing out standard wiki content. (Locking
        // is implemented as a wrapper over the existing wiki.)
        list($gotlock, $lock) = wiki_obtain_lock($wiki_entry->id, $pagename);
        if (!$gotlock) {
            $modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);
            $canoverridelock = has_capability('mod/wiki:overridelock', $modcontext);
            $a = new stdClass();
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:view.php


示例15: redirect

        }
    }
    redirect($CFG->wwwroot . '/mod/slideshow/view.php?id=' . $id, "Done");
}
/// Print the page header
if ($course->category) {
    $navigation = "<a href=\"../../course/view.php?id={$course->id}\">{$course->shortname}</a> ->";
} else {
    $navigation = '';
}
$strslideshows = get_string("modulenameplural", "slideshow");
$strslideshow = get_string("modulename", "slideshow");
print_header("{$course->shortname}: {$slideshow->name}", "{$course->fullname}", "{$navigation} <a href=index.php?id={$course->id}>{$strslideshows}</a> -> {$slideshow->name}", "", "", true, update_module_button($cm->id, $course->id, $strslideshow), navmenu($course, $cm));
/// Print the main part of the page
include 'tabs.php';
print_simple_box_start('center', '800px', '#ffffff', 10);
echo '<script type="text/javascript" src="js/jquery.min.js"></script>';
$data = get_record("slideshow_files", "id", $p);
echo '<script type="text/javascript" charset="utf-8">

var metaid = 2;

function addFormFieldMeta() {
    var metarowid = window.metaid;
    jQuery("#divTxtMeta").append(\'<div id="row_meta_\'+metarowid+\'" style="clear: both;-moz-border-radius:6px 6px 6px 6px;background-color:#F3F3F3;list-style-type:none;padding:5px 5px 5px 10px;margin:5px"> \\
    <table> \\
    <tr> \\
    <td width="200px" align="right"><strong>Question \'+metarowid+\'</strong></td> \\
    <td width="60px" align="right">' . get_string('slideshow_questionname', 'slideshow') . '</td> \\
    <td colspan="3"><input type="text" name="name_\'+metarowid+\'" value="" style="width:400px;" /></td> \\
    </tr> \\
开发者ID:e-rasvet,项目名称:slideshow,代码行数:31,代码来源:questions.php


示例16: zip_files

    // zip all the files:
    zip_files($sourcefiles, $zipdir . $zipname);
    remove_dir($exportdir);
    echo '<div class="block_eportfolio_center">';
    print_simple_box_start("center", "40%", "#ccffbb");
    echo '<input type="submit" name="export" value="' . get_string("download", "block_exabis_eportfolio") . '"';
    echo ' onclick="window.open(\'' . $CFG->wwwroot . '/blocks/exabis_eportfolio/portfoliofile.php/' . export_file_area_name() . '/' . $zipname . '\');"/>';
    echo '</div>';
    print_simple_box_end();
    print_footer($course);
    exit;
}
echo "<br />";
echo '<div class="block_eportfolio_center">';
$views = get_records('block_exabeporview', 'userid', $USER->id, 'name');
print_simple_box_start("center", "40%", "#ccffbb");
echo '<p>' . get_string("explainexport", "block_exabis_eportfolio") . '</p>';
echo '<form method="post" class="block_eportfolio_center" action="' . $_SERVER['PHP_SELF'] . '" >';
echo '<fieldset>';
// views
if (block_exabis_eportfolio_get_active_version() >= 3) {
    echo '<div style="padding-bottom: 15px;">' . get_string("exportviewselect", "block_exabis_eportfolio") . ': ';
    echo '<select name="viewid">';
    echo '<option></option>';
    foreach ($views as $view) {
        echo '<option value="' . $view->id . '">' . $view->name . '</option>';
    }
    echo '</select>';
    echo ' </div>';
}
echo '<input type="hidden" name="confirm" value="1" />';
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:31,代码来源:export_scorm.php


示例17: dialogue_print_conversation

/**
 * Print a conversation and allow a new entry
 * 
 * Render out entries for the specified conversation as HTML showing the
 * avatar for the user who initiated  the dialogue. Follow up with a text
 * box to allow user to add a new response entry
 *  
 * @param   object  $dialogue
 * @param   int     $conversation
 */
function dialogue_print_conversation($dialogue, $conversation)
{
    global $USER, $CFG;
    if (!($course = get_record('course', 'id', $dialogue->course))) {
        error('Course is misconfigured');
    }
    if (!($cm = get_coursemodule_from_instance('dialogue', $dialogue->id, $course->id))) {
        error('Course Module ID was incorrect');
    }
    $context = get_context_instance(CONTEXT_MODULE, $cm->id);
    $dialoguemanagers = array_keys(get_users_by_capability($context, 'mod/dialogue:manage'));
    $timenow = time();
    $showbutton = false;
    require_once 'dialogue_reply_form.php';
    $mform = new mod_dialogue_reply_form('dialogues.php', array('conversationid' => $conversation->id));
    $mform->set_data(array('id' => $cm->id, 'action' => 'insertentries', 'pane' => DIALOGUEPANE_CURRENT));
    $showbutton = true;
    print_simple_box_start('center', '');
    echo "<table align=\"center\" border=\"1\" cellspacing=\"0\" valign=\"top\" cellpadding=\"4\" \n        width=\"100%\">\n";
    echo "<tr><td>\n";
    if (in_array($USER->id, $dialoguemanagers)) {
        if (!in_array($conversation->userid, $dialoguemanagers)) {
            if (!($otheruser = get_record('user', 'id', $conversation->userid))) {
                error("User's record not found");
            }
        } else {
            if (!($otheruser = get_record('user', 'id', $conversation->recipientid))) {
                error("User's record not found");
            }
        }
    } else {
        if ($USER->id != $conversation->userid) {
            if (!($otheruser = get_record('user', 'id', $conversation->userid))) {
                error("User's record not found");
            }
        } else {
            if (!($otheruser = get_record('user', 'id', $conversation->recipientid))) {
                error("User's record not found");
            }
        }
    }
    $picture = print_user_picture($otheruser->id, $course->id, $otheruser->picture, false, true);
    echo $picture . " <b>" . get_string('dialoguewith', 'dialogue', fullname($otheruser)) . '</b></td>';
    echo '<td><i>' . format_string($conversation->subject) . "&nbsp;</i><br />\n";
    echo "<div align=\"right\">\n";
    if (!$conversation->subject) {
        // conversation does not have a subject, show add subject link
        echo "<a href=\"dialogues.php?action=getsubject&amp;id={$cm->id}&amp;cid={$conversation->id}&amp;pane=" . DIALOGUEPANE_CURRENT . "\">" . get_string('addsubject', 'dialogue') . "</a>\n";
        helpbutton('addsubject', get_string('addsubject', 'dialogue'), 'dialogue');
        echo '&nbsp; | ';
    }
    if (!$conversation->closed && has_capability('mod/dialogue:close', $context)) {
        echo "<a href=\"dialogues.php?action=confirmclose&amp;id={$cm->id}&amp;cid={$conversation->id}&amp;pane=" . DIALOGUEPANE_CURRENT . "\">" . get_string('close', 'dialogue') . "</a>\n";
        helpbutton('closedialogue', get_string('close', 'dialogue'), 'dialogue');
    }
    echo "</div></td></tr>\n";
    if ($entries = get_records_select('dialogue_entries', "conversationid = {$conversation->id}", 'id')) {
        $firstentry = true;
        foreach ($entries as $entry) {
            if (!($otheruser = get_record('user', 'id', $entry->userid))) {
                error('User not found');
            }
            $canedit = false;
            if (!$conversation->closed && $entry->userid == $USER->id && $timenow < $entry->timecreated + $dialogue->edittime * 60) {
                $canedit = true;
            }
            if ($entry->timecreated != $entry->timemodified) {
                $modified = get_string('updated', 'dialogue', userdate($entry->timemodified));
            } else {
                $modified = '';
            }
            if ($entry->userid == $USER->id) {
                echo "<tr><td colspan=\"2\" bgcolor=\"#FFFFFF\">\n";
                if ($canedit) {
                    if ($firstentry) {
                        echo "<a href=\"dialogues.php?action=editconversation&amp;id={$cm->id}&amp;entryid={$entry->id}&amp;pane=" . DIALOGUEPANE_CURRENT . "\">" . get_string('edit') . '</a>';
                    } else {
                        echo "<a href=\"dialogues.php?action=editreply&amp;id={$cm->id}&amp;entryid={$entry->id}&amp;pane=" . DIALOGUEPANE_CURRENT . "\">" . get_string('edit') . '</a>';
                    }
                }
                echo "<p><font size=\"1\">" . get_string('onyouwrote', 'dialogue', userdate($entry->timecreated) . ' ' . $modified);
                echo ":</font></p><br />" . format_text($entry->text);
            } else {
                echo "<tr><td colspan=\"2\">\n";
                echo "<p><font size=\"1\">" . get_string("onwrote", "dialogue", userdate($entry->timecreated) . " {$modified} " . fullname($otheruser));
                echo ":</font></p><br />" . format_text($entry->text);
            }
            echo dialogue_print_attachments($entry);
            echo "</td></tr>\n";
            $firstentry = false;
//.........这里部分代码省略.........
开发者ID:netspotau,项目名称:moodle-mod_dialogue,代码行数:101,代码来源:locallib.php


示例18: stdClass

        if ($PermissionGranted) {
            $dbentry = new stdClass();
            $dbentry->id = $entry->id;
            $dbentry->glossaryid = $mainglossary->id;
            $dbentry->sourceglossaryid = $glossary->id;
            if (!update_record('glossary_entries', $dbentry)) {
                error('Could not export the entry to the main glossary');
            } else {
                print_simple_box_start('center', '60%');
                echo '<p align="center"><font size="3">' . $entryexported . '</font></p></font>';
                print_continue('view.php?id=' . $cm->id . '&amp;mode=entry&amp;hook=' . $entry->id);
                print_simple_box_end();
                print_footer();
                redirect('view.php?id=' . $cm->id . '&amp;mode=entry&amp;hook=' . $entry->id);
                die;
            }
        } else {
            print_simple_box_start('center', '60%', '#FFBBBB');
            echo '<p align="center"><font size="3">' . $entryalreadyexist . '</font></p></font>';
            echo '<p align="center">';
            print_continue('view.php?id=' . $cm->id . '&amp;mode=entry&amp;hook=' . $entry->id);
            print_simple_box_end();
        }
    }
} else {
    print_simple_box_start('center', '60%', '#FFBBBB');
    notice('A weird error was found while trying to export this entry. Operation cancelled.');
    print_continue('view.php?id=' . $cm->id . '&amp;mode=entry&amp;hook=' . $entry->id);
    print_simple_box_end();
}
print_footer();
开发者ID:edwinphillips,项目名称:moodle-485cb39,代码行数:31,代码来源:exportentry.php


示例19: elluminate_upload_presentation_content

        /// Create the preload object on the server.
        $preload = elluminate_upload_presentation_content($filename, '', $filedata, $USER->id, $actual_filename);
        if (empty($preload->presentationid)) {
            error(get_string('preloadcouldnotcreatepreload', 'elluminate'));
        }
        /// Associate the preload object with the meeting.
        if (!elluminate_set_session_presentation($preload->presentationid, $elluminate->meetingid)) {
            error(get_string('preloadcouldnotaddpreloadtomeeting', 'elluminate'));
        }
        redirect($CFG->wwwroot . '/mod/elluminate/view.php?id=' . $cm->id, get_string('preloaduploadsuccess', 'elluminate'), 5);
    }
}
//groups_print_activity_menu($cm, 'preload.php?id=' . $elluminate->id, false, tru 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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