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


PHP print_paging_bar函数代码示例

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


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

示例1: blog_print_html_formatted_entries

/**
 *  This function is in lib and not in BlogInfo because entries being searched
 *   might be found in any number of blogs rather than just one.
 *
 *   $@param ...
 */
function blog_print_html_formatted_entries($postid, $filtertype, $filterselect, $tagid, $tag)
{
    global $CFG, $USER;
    $blogpage = optional_param('blogpage', 0, PARAM_INT);
    $bloglimit = optional_param('limit', get_user_preferences('blogpagesize', 10), PARAM_INT);
    $start = $blogpage * $bloglimit;
    $sitecontext = get_context_instance(CONTEXT_SYSTEM);
    $morelink = '<br />&nbsp;&nbsp;';
    $totalentries = get_viewable_entry_count($postid, $bloglimit, $start, $filtertype, $filterselect, $tagid, $tag, $sort = 'created DESC');
    $blogEntries = blog_fetch_entries($postid, $bloglimit, $start, $filtertype, $filterselect, $tagid, $tag, $sort = 'created DESC', true);
    print_paging_bar($totalentries, $blogpage, $bloglimit, get_baseurl($filtertype, $filterselect), 'blogpage');
    if ($CFG->enablerssfeeds) {
        blog_rss_print_link($filtertype, $filterselect, $tag);
    }
    if (has_capability('moodle/blog:create', $sitecontext)) {
        //the user's blog is enabled and they are viewing their own blog
        $addlink = '<div class="addbloglink">';
        $addlink .= '<a href="' . $CFG->wwwroot . '/blog/edit.php?action=add' . '">' . get_string('addnewentry', 'blog') . '</a>';
        $addlink .= '</div>';
        echo $addlink;
    }
    if ($blogEntries) {
        $count = 0;
        foreach ($blogEntries as $blogEntry) {
            blog_print_entry($blogEntry, 'list', $filtertype, $filterselect);
            //print this entry.
            $count++;
        }
        print_paging_bar($totalentries, $blogpage, $bloglimit, get_baseurl($filtertype, $filterselect), 'blogpage');
        if (!$count) {
            print '<br /><div style="text-align:center">' . get_string('noentriesyet', 'blog') . '</div><br />';
        }
        print $morelink . '<br />' . "\n";
        return;
    }
    $output = '<br /><div style="text-align:center">' . get_string('noentriesyet', 'blog') . '</div><br />';
    print $output;
}
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:44,代码来源:lib.php

示例2: print_paging_bar

            $columndir = 'DESC';
        } else {
            $columndir = 'ASC';
        }
    } else {
        $columndir = $dir == 'ASC' ? 'DESC' : 'ASC';
        if ($column == 'lastaccess') {
            $columnicon = $dir == 'ASC' ? 'up' : 'down';
        } else {
            $columnicon = $dir == 'ASC' ? 'down' : 'up';
        }
        $columnicon = " <img src=\"{$CFG->pixpath}/t/{$columnicon}.gif\" alt=\"\" />";
    }
    $hcolumns[$column] = "<a href=\"index.php?sort={$column}&amp;dir={$columndir}&amp;page={$page}&amp;perpage={$perpage}\">" . $strcolumn . "</a>{$columnicon}";
}
print_paging_bar($changescount, $page, $perpage, "index.php?sort={$sort}&amp;dir={$dir}&amp;perpage={$perpage}&amp;");
$override = new object();
$override->firstname = 'firstname';
$override->lastname = 'lastname';
$fullnamelanguage = get_string('fullnamedisplay', '', $override);
if ($CFG->fullnamedisplay == 'firstname lastname' or $CFG->fullnamedisplay == 'firstname' or $CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'firstname lastname') {
    $fullnamedisplay = $hcolumns['firstname'] . ' / ' . $hcolumns['lastname'];
} else {
    // ($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'lastname firstname')
    $fullnamedisplay = $hcolumns['lastname'] . ' / ' . $hcolumns['firstname'];
}
$table = new object();
$table->head = array($hcolumns['timemodified'], $fullnamedisplay, $hcolumns['plugin'], $hcolumns['name'], $hcolumns['value'], $hcolumns['oldvalue']);
$table->align = array('left', 'left', 'left', 'left', 'left', 'left');
$table->size = array('30%', '10%', '10%', '10%', '20%', '20%');
$table->width = '95%';
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:31,代码来源:index.php

示例3: print_paging_bar

if (!empty($studentsperpage)) {
    print_paging_bar($numusers, $report->page, $studentsperpage, $report->pbarurl);
}
$reporthtml = '<script src="functions.js" type="text/javascript"></script>';
$reporthtml .= '<table id="user-grades" class="gradestable flexible boxaligncenter generaltable">';
$reporthtml .= $report->get_headerhtml();
$reporthtml .= $report->get_iconshtml();
$reporthtml .= $report->get_rangehtml();
$reporthtml .= $report->get_studentshtml();
$reporthtml .= $report->get_avghtml(true);
$reporthtml .= $report->get_avghtml();
$reporthtml .= "</table>";
// print submit button
if ($USER->gradeediting[$course->id]) {
    echo '<form action="index.php" method="post">';
    echo '<div>';
    echo '<input type="hidden" value="' . $courseid . '" name="id" />';
    echo '<input type="hidden" value="' . sesskey() . '" name="sesskey" />';
    echo '<input type="hidden" value="grader" name="report"/>';
}
echo $reporthtml;
// print submit button
if ($USER->gradeediting[$course->id] && ($report->get_pref('showquickfeedback') || $report->get_pref('quickgrading'))) {
    echo '<div class="submit"><input type="submit" value="' . get_string('update') . '" /></div>';
    echo '</div></form>';
}
// prints paging bar at bottom for large pages
if (!empty($studentsperpage) && $studentsperpage >= 20) {
    print_paging_bar($numusers, $report->page, $studentsperpage, $report->pbarurl);
}
print_footer($course);
开发者ID:r007,项目名称:PMoodle,代码行数:31,代码来源:index.php

示例4: start_html

 /**
  * This function is not part of the public api.
  */
 function start_html()
 {
     global $OUTPUT, $CFG;
     // Do we need to print initial bars?
     $this->print_initials_bar();
     // Paging bar
     if ($this->use_pages) {
         // disable debugging for this function call
         $debug = $CFG->debug;
         $CFG->debug = false;
         print_paging_bar($this->totalrows, $this->currpage, $this->pagesize, $this->baseurl, $this->request[ILP_TABLE_VAR_PAGE]);
         $CFG->debug = $debug;
     }
     if (in_array(ILP_TABLE_P_TOP, $this->showdownloadbuttonsat)) {
         echo $this->download_buttons();
     }
     $this->wrap_html_start();
     // Start of main data table
     echo '<table' . $this->make_attributes_string($this->attributes) . '>';
 }
开发者ID:nathanfriend,项目名称:moodle-block_ilp,代码行数:23,代码来源:ilp_tablelib.class.php

示例5: print_paging_bar

 /**
  * Prints the '1 2 3 ...' paging bar for when a query set is split across multiple pages.
  * @param $numitems total number of items in the query set
  */
 function print_paging_bar($numitems)
 {
     // TODO: take a queryset as an argument rather than the number of items
     $sort = optional_param('sort', '', PARAM_ALPHA);
     $dir = optional_param('dir', '', PARAM_ALPHA);
     $locsearch = trim(optional_param('locsearch', '', PARAM_TEXT));
     $namesearch = trim(optional_param('search', '', PARAM_TEXT));
     $alpha = optional_param('alpha', '', PARAM_ALPHA);
     $page = optional_param('page', 0, PARAM_INT);
     $perpage = optional_param('perpage', 30, PARAM_INT);
     $params = array('search' => stripslashes($namesearch), 'locsearch' => stripslashes($locsearch), 'alpha' => $alpha, 'perpage' => $perpage);
     //add the parent cluster id as a parameter
     //(0 will signal no that there is no parent cluster)
     $params['id'] = $this->optional_param('id', 0, PARAM_INT);
     if (!empty($sort)) {
         $params['sort'] = $sort;
     }
     if (!empty($sort)) {
         $params['dir'] = $dir;
     }
     $target = $this->get_new_page($params);
     print_paging_bar($numitems, $page, $perpage, $target->get_url() . '&amp;');
 }
开发者ID:remotelearner,项目名称:elis.cm,代码行数:27,代码来源:clusterpage.class.php

示例6: unset

/// Print out all the courses
unset($course);
// To avoid unwanted language effects later
$courses = get_courses_page($category->id, 'c.sortorder ASC', 'c.id,c.sortorder,c.shortname,c.fullname,c.summary,c.visible,c.teacher,c.guest,c.password', $totalcount, $page * $perpage, $perpage);
$numcourses = count($courses);
if (!$courses) {
    if (empty($subcategorieswereshown)) {
        print_heading(get_string("nocoursesyet"));
    }
} else {
    if ($numcourses <= COURSE_MAX_SUMMARIES_PER_PAGE and !$page and !$creatorediting) {
        print_box_start('courseboxes');
        print_courses($category);
        print_box_end();
    } else {
        print_paging_bar($totalcount, $page, $perpage, "category.php?id={$category->id}&amp;perpage={$perpage}&amp;");
        $strcourses = get_string("courses");
        $strselect = get_string("select");
        $stredit = get_string("edit");
        $strdelete = get_string("delete");
        $strbackup = get_string("backup");
        $strrestore = get_string("restore");
        $strmoveup = get_string("moveup");
        $strmovedown = get_string("movedown");
        $strupdate = get_string("update");
        $strhide = get_string("hide");
        $strshow = get_string("show");
        $strsummary = get_string("summary");
        $strsettings = get_string("settings");
        $strassignteachers = get_string("assignteachers");
        $strallowguests = get_string("allowguests");
开发者ID:r007,项目名称:PMoodle,代码行数:31,代码来源:category.php

示例7: action_default

 /**
  *
  * @global <type> $CFG
  */
 function action_default()
 {
     global $CFG;
     $clsid = $this->required_param('id', PARAM_INT);
     $sort = $this->optional_param('sort', 'name', PARAM_ALPHANUM);
     $dir = $this->optional_param('dir', 'ASC', PARAM_ALPHA);
     $page = $this->optional_param('page', 0, PARAM_INT);
     $perpage = $this->optional_param('perpage', 30, PARAM_INT);
     // how many per page
     $namesearch = trim($this->optional_param('search', '', PARAM_TEXT));
     $alpha = $this->optional_param('alpha', '', PARAM_ALPHA);
     $cls = new cmclass($clsid);
     $columns = array('idnumber' => get_string('student_idnumber', 'block_curr_admin'), 'name' => get_string('student_name_1', 'block_curr_admin'), 'enrolmenttime' => get_string('enrolment_time', 'block_curr_admin'), 'completetime' => get_string('completion_time', 'block_curr_admin'), 'completestatusid' => get_string('student_status', 'block_curr_admin'), 'grade' => get_string('student_grade', 'block_curr_admin'), 'credits' => get_string('student_credits', 'block_curr_admin'), 'locked' => get_string('student_locked', 'block_curr_admin'), 'buttons' => '');
     $stus = student::get_listing($clsid, $sort, $dir, $page * $perpage, $perpage, $namesearch, $alpha);
     $numstus = student::count_records($clsid, $namesearch, $alpha);
     $this->print_num_items($clsid, $cls->maxstudents);
     $this->print_alpha();
     $this->print_search();
     $this->print_list_view($stus, $columns, array(), 'users');
     // TBD: students ?
     print_paging_bar($numstus, $page, $perpage, "index.php?s=stu&amp;section=curr&amp;id={$clsid}&amp;sort={$sort}&amp;" . "dir={$dir}&amp;perpage={$perpage}&amp;alpha={$alpha}&amp;namesearch=" . urlencode(stripslashes($namesearch)) . "&amp;");
     echo "<form>";
     // TODO: pass in query parameters
     if ($this->can_do('bulkedit')) {
         echo "<input type=\"button\" onclick=\"document.location='index.php?s=stu&amp;section=curr&amp;" . "action=bulkedit&amp;id={$clsid}&amp;sort={$sort}&amp;dir={$dir}&amp;perpage={$perpage}&amp;alpha={$alpha}&amp;search=" . urlencode(stripslashes($namesearch)) . "';\" value=\"Bulk Edit\" />";
     }
     if ($this->can_do('add')) {
         echo "<input type=\"button\" onclick=\"document.location='index.php?s=stu&amp;section=curr&amp;" . "action=add&amp;id={$clsid}';\" value=\"" . get_string('enrolstudents', 'block_curr_admin') . "\" />";
     }
     echo "</form>";
 }
开发者ID:remotelearner,项目名称:elis.cm,代码行数:35,代码来源:studentpage.class.php

示例8: unset

            }
            $cms[$forum->id] = $cm;
            unset($cm);
            // do not use cm directly, it would break caching
        }
        $fullsubject = "<a href=\"view.php?f={$forum->id}\">" . format_string($forum->name, true) . "</a>";
        if ($forum->type != 'single') {
            $fullsubject .= " -> <a href=\"discuss.php?d={$discussion->id}\">" . format_string($discussion->name, true) . "</a>";
            if ($post->parent != 0) {
                $fullsubject .= " -> <a href=\"discuss.php?d={$post->discussion}&amp;parent={$post->id}\">" . format_string($post->subject, true) . "</a>";
            }
        }
        if ($course->id == SITEID && has_capability('moodle/site:config', $syscontext)) {
            $postcoursename = get_field('course', 'shortname', 'id', $forum->course);
            $fullsubject = '<a href="' . $CFG->wwwroot . '/course/view.php?id=' . $forum->course . '">' . $postcoursename . '</a> -> ' . $fullsubject;
        }
        $post->subject = $fullsubject;
        $fulllink = "<a href=\"discuss.php?d={$post->discussion}#p{$post->id}\">" . get_string("postincontext", "forum") . "</a>";
        forum_print_post($post, $discussion, $forum, $cms[$forum->id], $course, false, false, false, $ratings, $fulllink);
        echo "<br />";
    }
    print_paging_bar($totalcount, $page, $perpage, "user.php?id={$user->id}&amp;course={$course->id}&amp;mode={$mode}&amp;perpage={$perpage}&amp;");
} else {
    if ($mode == 'posts') {
        print_heading(get_string('noposts', 'forum'));
    } else {
        print_heading(get_string('nodiscussionsstartedby', 'forum'));
    }
}
echo '</div>';
print_footer($course);
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:31,代码来源:user.php

示例9: get_string

            }
            // checks whether user can do restore
            if (has_capability('moodle/site:restore', $coursecontext)) {
                echo "<a title=\"" . get_string("restore") . "\" href=\"../files/index.php?id={$course->id}&amp;wdir=/backupdata\">\n<img" . " src=\"{$pixpath}/t/restore.gif\" class=\"iconsmall\" alt=\"" . get_string("restore") . "\" /></a>\n ";
            }
            echo "</td>\n</tr>\n";
        }
        echo "<tr>\n<td colspan=\"4\" style=\"text-align:center\">\n";
        echo "<br />";
        echo "<input type=\"button\" onclick=\"checkall()\" value=\"{$strselectall}\" />\n";
        echo "<input type=\"button\" onclick=\"uncheckall()\" value=\"{$strdeselectall}\" />\n";
        choose_from_menu($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript: getElementById('movecourses').submit()");
        echo "</td>\n</tr>\n";
        echo "</table>\n</form>";
    }
    print_paging_bar($totalcount, $page, $perpage, "search.php?search={$encodedsearch}&amp;perpage={$perpage}&amp;", 'page', $perpage == 99999);
    if ($perpage != 99999 && $totalcount > $perpage) {
        echo "<center><p>";
        echo "<a href=\"search.php?search={$encodedsearch}&perpage=99999\">" . get_string("showall", "", $totalcount) . "</a>";
        echo "</p></center>";
    }
} else {
    if (!empty($search)) {
        print_heading(get_string("nocoursesfound", "", s($search, true)));
    } else {
        print_heading($strnovalidcourses);
    }
}
echo "<br /><br />";
print_course_search($search);
print_footer();
开发者ID:r007,项目名称:PMoodle,代码行数:31,代码来源:search.php

示例10: array

        $link1 = "<a href=\"{$CFG->wwwroot}/mod/metadatadc/view.php?id={$cmdc->id}\">{$metadatadc->name}</a>";
        $link2 = "<a href=\"{$CFG->wwwroot}/mod/" . $modlo[$metadatadc->resource] . "/view.php?id=" . $metadatadc->resource . "\">" . $namelo[$metadatadc->resource] . "  (" . $modlo[$metadatadc->resource] . ")</a>";
        $link3 = $metadatadc->description;
        //         }
        $table->data[] = array($link0, $link1, $link2, $link3);
    }
    echo "<br />";
    print_heading(get_string("modulenameplural", "metadatadc"));
    print_table($table);
}
//////////
$totalcount = $totalcountlom + $totalcountdc;
echo "<hr><div align='center'>";
echo "{$strsearchresults} (LOM + DCMES): {$totalcountlom} + {$totalcountdc} = {$totalcount}";
echo "</div><hr>";
print_paging_bar($totalcount, $page, $perpage, "search_allmetadata.php?search=" . urlencode(stripslashes($search)) . "&amp;id={$course->id}&amp;perpage={$perpage}&amp;");
print_footer($course);
///////////////FUNCTIONS
function allmetadata_clean_search_terms($words, $prefix = '')
{
    $searchterms = explode(' ', $words);
    foreach ($searchterms as $key => $searchterm) {
        if (strlen($searchterm) < 2) {
            unset($searchterms[$key]);
        } else {
            if ($prefix) {
                $searchterms[$key] = $prefix . $searchterm;
            }
        }
    }
    return trim(implode(' ', $searchterms));
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:31,代码来源:search_allmetadata.php

示例11: print_table

 function print_table()
 {
     $table = new stdClass();
     $table->head = $this->setup_table();
     // Make sure that student is in the sql
     // $this->keys[0] = 'student';
     $where = $this->build_where();
     $referral_total = count_records_sql("SELECT COUNT(ref.id) {$where}");
     if (empty($referral_total)) {
         echo '<span class="error">' . get_string('no_referrals', 'block_student_gradeviewer') . '<span>';
         return false;
     }
     echo '<div style="width: 100%; text-align:center;">
            Found: ' . $referral_total . '
           </div>';
     $bar = print_paging_bar($referral_total, $this->page, $this->per_page, $this->baseurl, 'page', false, true);
     $show_all = '';
     if (!empty($bar)) {
         $show_all = '<div class="show_all_referrals">
                         <a href="' . $this->baseurl . 'per_page=10000">' . get_string('showall') . '(' . $referral_total . ')</a>
                      </div>';
     }
     $referrals = $this->referral_process();
     //$this->perform_prune();
     $table->data = array_map(array($this, 'map_referral'), $referrals);
     echo $bar;
     print_table($table);
     echo $bar . $show_all;
     return true;
 }
开发者ID:rrusso,项目名称:EARS,代码行数:30,代码来源:lib.php

示例12: print_user_picture

        } else {
            echo "<span>&nbsp;</span>";
        }
        echo "<span class=spanimage>" . print_user_picture($use->id, $COURSE->id, $use->picture, 24, true, true) . "</span>";
        echo "<span class=spantext>";
        $remove_br = $expense->data;
        $bodytag = str_replace("<br>", "", $remove_br);
        $bodytag = str_replace("<br>", "", $remove_br);
        $slashes_remove = stripslashes($bodytag);
        echo "<span id=change_message" . $expense->id . ">" . $slashes_remove . "</span></span>";
        $date_explode = $expense->date;
        $date_format = explode(" ", $date_explode);
        echo "<span class=spanright> <a href=" . $CFG->wwwroot . "/user/view.php?id=" . $use->id . "&course=" . $course_id . ">" . $fullname . "</a><br>" . $date_format[0] . ' ' . $date_format[1] . ' ' . $date_format[3] . ' ' . $date_format[4] . "&nbsp;&nbsp;";
        if (has_capability('block/shoutbox:editownmessage', $context)) {
            if (has_capability('block/shoutbox:editallmessage', $context)) {
                echo "<a onClick=edit_shoutbox_message({$expense->id}) id=editid" . $expense->id . " class=edit_class >" . get_string('edit', 'block_shoutbox') . "</a>";
            } else {
                if ($USER->id == $expense->user_id) {
                    echo "<a onClick=edit_shoutbox_message({$expense->id}) id=editid" . $expense->id . " class=edit_class >" . get_string('edit', 'block_shoutbox') . "</a>";
                }
            }
        }
        echo "</span><input name=hidden_data type=hidden value=" . $CFG->wwwroot . " id=hidden_data ><input name=insertion_block_c_id type=hidden value=" . $course_id . " id=insertion_block_c_id >";
        echo "</div>";
        $i++;
    }
}
echo "<input name=blockid type=hidden value=" . $block_id . " id=blockid_course >";
echo "</form></div>";
echo "<div class=paging style=display:none>" . print_paging_bar($count_records, $page, $perpage, "pop_window.php?course_id={$block_id}&submit=0&perpage={$perpage}&orderby={$orderby}&ordertype={$order_type}&") . "</div>";
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:30,代码来源:pop_window.php

示例13: view_form_html

 /**
  * Return the HTML to for a view page that also allows editing.
  *
  * @return string The form HTML, without the form.
  */
 function view_form_html($classid, $type = '', $sort = 'name', $dir = 'ASC', $page = 0, $perpage = 0, $namesearch = '', $alpha = '')
 {
     global $CURMAN, $CFG;
     $output = '';
     ob_start();
     $table = new stdClass();
     $can_unenrol = cmclasspage::can_enrol_into_class($classid);
     if (empty($this->id)) {
         $columns = array('unenrol' => get_string('unenrol', 'block_curr_admin'), 'idnumber' => get_string('student_idnumber', 'block_curr_admin'), 'name' => get_string('student_name_1', 'block_curr_admin'), 'enrolmenttime' => get_string('enrolment_time', 'block_curr_admin'), 'completetime' => get_string('completion_time', 'block_curr_admin'), 'completestatusid' => get_string('student_status', 'block_curr_admin'), 'grade' => get_string('student_grade', 'block_curr_admin'), 'credits' => get_string('student_credits', 'block_curr_admin'), 'locked' => get_string('student_locked', 'block_curr_admin'));
         if (!$can_unenrol) {
             unset($columns['unenrol']);
         }
     } else {
         $columns = array('idnumber' => get_string('student_idnumber', 'block_curr_admin'), 'name' => get_string('student_name_1', 'block_curr_admin'), 'enrolmenttime' => get_string('enrolment_time', 'block_curr_admin'), 'completetime' => get_string('completion_time', 'block_curr_admin'), 'completestatusid' => get_string('student_status', 'block_curr_admin'), 'grade' => get_string('student_grade', 'block_curr_admin'), 'credits' => get_string('student_credits', 'block_curr_admin'), 'locked' => get_string('student_locked', 'block_curr_admin'));
     }
     foreach ($columns as $column => $cdesc) {
         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=\"\" />";
         }
         if ($column != 'unenrol') {
             ${$column} = "<a href=\"index.php?s=stu&amp;section=curr&amp;id={$classid}&amp;class={$classid}&amp;" . "action=bulkedit&amp;sort={$column}&amp;dir={$columndir}&amp;stype={$type}&amp;search=" . urlencode(stripslashes($namesearch)) . "&amp;alpha={$alpha}\">" . $cdesc . "</a>{$columnicon}";
         } else {
             ${$column} = $cdesc;
         }
         $table->head[] = ${$column};
         $table->align[] = "left";
         $table->wrap[] = true;
     }
     if (empty($this->id)) {
         $users = $this->get_users_enrolled($type, $sort, $dir, $page * $perpage, $perpage, $namesearch, $alpha);
         $usercount = $this->count_users_enrolled($type, $namesearch, $alpha);
         $alphabet = explode(',', get_string('alphabet'));
         $strall = get_string('all');
         /// Bar of first initials
         echo "<p style=\"text-align:center\">";
         echo "Last Name : ";
         if ($alpha) {
             echo " <a href=\"index.php?s=stu&amp;section=curr&amp;action=bulkedit&amp;id={$classid}&amp;class={$classid}&amp;" . "sort=name&amp;dir=ASC&amp;perpage={$perpage}\">{$strall}</a> ";
         } else {
             echo " <b>{$strall}</b> ";
         }
         foreach ($alphabet as $letter) {
             if ($letter == $alpha) {
                 echo " <b>{$letter}</b> ";
             } else {
                 echo " <a href=\"index.php?s=stu&amp;section=curr&amp;action=bulkedit&amp;id={$classid}&amp;class={$classid}&amp;" . "action=bulkedit&amp;sort=name&amp;dir=ASC&amp;perpage={$perpage}&amp;alpha={$letter}\">{$letter}</a> ";
             }
         }
         echo "</p>";
         print_paging_bar($usercount, $page, $perpage, "index.php?s=stu&amp;section=curr&amp;id={$classid}&amp;class={$classid}&amp;&amp;action=bulkedit&amp;" . "sort={$sort}&amp;dir={$dir}&amp;perpage={$perpage}&amp;alpha={$alpha}&amp;stype={$type}" . "&amp;search=" . urlencode(stripslashes($namesearch)) . "&amp;");
         flush();
     } else {
         $user = $this->user;
         $user->name = cm_fullname($user);
         $users[] = $user;
         $usercount = 0;
     }
     if (empty($this->id) && !$users) {
         $match = array();
         if ($namesearch !== '') {
             $match[] = s($namesearch);
         }
         if ($alpha) {
             $match[] = "name: {$alpha}___";
         }
         $matchstring = implode(", ", $match);
         echo 'No users matching ' . $matchstring;
         $table = NULL;
     } else {
         $stuobj = new student();
         $table->width = "100%";
         foreach ($users as $user) {
             $newarr = array();
             foreach ($columns as $column => $cdesc) {
                 switch ($column) {
                     case 'unenrol':
                         $newarr[] = '<input type="checkbox" name="users[' . $user->id . '][unenrol]" value="1" />';
                         break;
                     case 'name':
                     case 'idnumber':
                     case 'description':
                         $newarr[] = $user->{$column};
                         break;
                     case 'enrolmenttime':
                         $newarr[] = cm_print_date_selector('users[' . $user->id . '][startday]', 'users[' . $user->id . '][startmonth]', 'users[' . $user->id . '][startyear]', $user->enrolmenttime, true);
                         break;
                     case 'completetime':
                         $newarr[] = cm_print_date_selector('users[' . $user->id . '][endday]', 'users[' . $user->id . '][endmonth]', 'users[' . $user->id . '][endyear]', $user->completetime, true);
                         break;
                     case 'completestatusid':
//.........这里部分代码省略.........
开发者ID:remotelearner,项目名称:elis.cm,代码行数:101,代码来源:student.class.php

示例14: lightboxgallery_image_info

            $imageextra .= '</select></form>';
        } else {
            if ($gallery->extinfo) {
                $iobj = lightboxgallery_image_info($imagelocal);
                $imageextra = sprintf('<br />%s<br />%s, %dx%d', $iobj->modified, $iobj->filesize, $iobj->imagesize[0], $iobj->imagesize[1]);
            }
        }
        $imagetitle = isset($captions[$image]) ? $captions[$image] : $image;
        echo '<div class="lightboxgalleryimage" style="float:right;padding:7px;"><a href="' . $imageurl . '" rel="lightbox[' . $gallery->name . ']" title="' . $imagetitle . '">' . lightboxgallery_image_thumbnail($course->id, $gallery, $image) . '</a><br />' . $imagelabel . $imageextra . '</div>';
    }
} else {
    print_string('errornoimages', 'lightboxgallery');
}
print_simple_box_end();
if ($gallery->perpage) {
    print_paging_bar(count($allimages), $page, $gallery->perpage, $CFG->wwwroot . '/mod/lightboxgallery/view.php?id=' . $cm->id . '&amp;' . ($editing ? 'editing=1&amp;' : ''));
}
$showtags = !in_array('tag', explode(',', get_config('lightboxgallery', 'disabledplugins')));
if (!$editing && $showtags) {
    $sql = 'SELECT description
                FROM ' . $CFG->prefix . 'lightboxgallery_image_meta
                WHERE gallery = ' . $gallery->id . '
                AND metatype = \'tag\'
                GROUP BY description
                ORDER BY COUNT(description) DESC, description ASC';
    if ($tags = get_records_sql($sql, 0, 10)) {
        lightboxgallery_print_tags(get_string('tagspopular', 'lightboxgallery'), $tags, $course->id, $gallery->id);
    }
}
$options = array();
if ($gallery->folder && has_capability('mod/lightboxgallery:addimage', $context)) {
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:31,代码来源:view-embed.php

示例15: get_string

        echo get_string('hidelocal', 'mnet') . ' | ';
    }
    if ($localusers == 1 && $remoteusers == 1) {
        echo '<a href="?ru=0">' . get_string('hideremote', 'mnet') . '</a>';
    } elseif ($remoteusers == 0) {
        echo '<a href="?ru=1">' . get_string('showremote', 'mnet') . '</a>';
    } else {
        echo get_string('hideremote', 'mnet');
    }
    echo "</p>";
}
echo "<table class=\"searchbox\" style=\"margin-left:auto;margin-right:auto\" cellpadding=\"10\"><tr><td>";
echo "<form action=\"user.php\" method=\"get\"><fieldset class=\"invisiblefieldset\">";
echo "<input type=\"text\" name=\"search\" value=\"" . s($search, true) . "\" size=\"20\" />";
echo "<input type=\"submit\" value=\"{$strsearch}\" />";
if ($search) {
    echo "<input type=\"button\" onclick=\"document.location='user.php';\" value=\"{$strshowallusers}\" />";
}
echo "</fieldset></form>";
echo "</td></tr></table>";
if (has_capability('moodle/user:create', $sitecontext)) {
    print_heading('<a href="' . $securewwwroot . '/user/editadvanced.php?id=-1">' . get_string('addnewuser') . '</a>');
}
if (!empty($table)) {
    print_table($table);
    print_paging_bar($usercount, $page, $perpage, "user.php?sort={$sort}&amp;dir={$dir}&amp;perpage={$perpage}" . "&amp;firstinitial={$firstinitial}&amp;lastinitial={$lastinitial}&amp;search=" . urlencode(stripslashes($search)) . "&amp;");
    if (has_capability('moodle/user:create', $sitecontext)) {
        print_heading('<a href="' . $securewwwroot . '/user/editadvanced.php?id=-1">' . get_string('addnewuser') . '</a>');
    }
}
admin_externalpage_print_footer($adminroot);
开发者ID:njorth,项目名称:marginalia,代码行数:31,代码来源:user.php


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