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

PHP print_row函数代码示例

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

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



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

示例1: print_header

// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Pipecode is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Pipecode.  If not, see <http://www.gnu.org/licenses/>.
//
print_header("Menu");
writeln('<table class="fill">');
writeln('<tr>');
writeln('<td style="padding-right: 8px; vertical-align: text-top; width: 50%;">');
beg_tab();
print_row(array("caption" => "Feed", "description" => "View news feeds", "icon" => "news", "link" => "/"));
print_row(array("caption" => "Comments", "description" => "View your past comments", "icon" => "chat", "link" => "/comments"));
print_row(array("caption" => "Karma", "description" => "Monitor your karma rating", "icon" => "karma-good", "link" => "/karma/"));
end_tab();
writeln('</td>');
writeln('<td style="vertical-align: text-top; width: 50%;">');
beg_tab();
print_row(array("caption" => "Mail", "description" => "Send and receive mail", "icon" => "mail", "link" => "/mail/"));
print_row(array("caption" => "Settings", "description" => "Configure your account settings", "icon" => "tools", "link" => "/settings"));
end_tab();
writeln('</td>');
writeln('</tr>');
writeln('</table>');
print_footer();
开发者ID:scarnago,项目名称:pipecode,代码行数:31,代码来源:index.php


示例2: print_row

    }
    print_row(get_string("firstaccess").":", $datestring);
}
if (!isset($hiddenfields['lastaccess'])) {
    if ($user->lastaccess) {
        $datestring = userdate($user->lastaccess)."&nbsp; (".format_time(time() - $user->lastaccess).")";
    } else {
        $datestring = get_string("never");
    }
    print_row(get_string("lastaccess").":", $datestring);
}

/// Printing tagged interests
if (!empty($CFG->usetags)) {
    if ($interests = tag_get_tags_csv('user', $user->id) ) {
        print_row(get_string('interests') .": ", $interests);
    }
}

echo "</table></div></div>";


echo $OUTPUT->blocks_for_region('content');

// Print messaging link if allowed
if (isloggedin() && has_capability('moodle/site:sendmessage', $context)
    && !empty($CFG->messaging) && !isguestuser() && !isguestuser($user) && ($USER->id != $user->id)) {
    echo '<div class="messagebox">';
    echo '<a href="'.$CFG->wwwroot.'/message/index.php?id='.$user->id.'">'.get_string('messageselectadd').'</a>';
    echo '</div>';
}
开发者ID:rolandovanegas,项目名称:moodle,代码行数:31,代码来源:profile.php


示例3: format_string

                        }
                        $class = 'class="dimmed"';
                    }
                    $courselisting .= "<a href=\"{$CFG->wwwroot}/user/view.php?id={$user->id}&amp;course={$mycourse->id}\" {$class} >" . format_string($mycourse->fullname) . "</a>, ";
                } else {
                    $courselisting .= format_string($mycourse->fullname) . ", ";
                    $PAGE->navbar->add($mycourse->fullname);
                }
            }
            $shown++;
            if ($shown >= 20) {
                $courselisting .= "...";
                break;
            }
        }
        print_row(get_string('courseprofiles') . ':', rtrim($courselisting, ', '));
    }
}
echo "</table></div></div>";
// Print messaging link if allowed
if (isloggedin() && has_capability('moodle/site:sendmessage', $usercontext) && !empty($CFG->messaging) && !isguestuser() && !isguestuser($user) && $USER->id != $user->id) {
    echo '<div class="messagebox">';
    echo '<a href="' . $CFG->wwwroot . '/message/index.php?id=' . $user->id . '">' . get_string('messageselectadd') . '</a>';
    echo '</div>';
}
if ($currentuser || has_capability('moodle/user:viewdetails', $usercontext) || has_coursecontact_role($id)) {
    echo '<div class="fullprofilelink">';
    echo html_writer::link($CFG->wwwroot . '/user/profile.php?id=' . $id, get_string('fullprofile'));
    echo '</div>';
}
/// TODO Add more useful overview info for teachers here, see below
开发者ID:vuchannguyen,项目名称:web,代码行数:31,代码来源:view.php


示例4: profile_display_fields

function profile_display_fields($userid)
{
    global $CFG, $USER;
    if ($categories = get_records_select('user_info_category', '', 'sortorder ASC')) {
        foreach ($categories as $category) {
            if ($fields = get_records_select('user_info_field', "categoryid={$category->id}", 'sortorder ASC')) {
                foreach ($fields as $field) {
                    require_once $CFG->dirroot . '/user/profile/field/' . $field->datatype . '/field.class.php';
                    $newfield = 'profile_field_' . $field->datatype;
                    $formfield = new $newfield($field->id, $userid);
                    if ($formfield->is_visible() and !$formfield->is_empty()) {
                        print_row(s($formfield->field->name . ':'), $formfield->display_data());
                    }
                }
            }
        }
    }
}
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:18,代码来源:lib.php


示例5: http_post_string

    $subject = http_post_string("subject", array("len" => 250, "valid" => "[ALL]"));
    $body = http_post_string("body", array("len" => 64000, "valid" => "[ALL]"));
    $in_reply_to = http_post_string("in_reply_to", array("required" => false, "len" => 250, "valid" => "[a-z][A-Z][0-9]-_.@+-"));
    send_web_mail($to, $subject, $body, $in_reply_to);
    header("Location: /mail/");
    die;
}
$to = http_get_string("to", array("required" => false, "len" => 250, "valid" => "[a-z][A-Z][0-9]-_.<>@+ "));
$mid = http_get_int("mid", array("required" => false));
if ($mid > 0) {
    $message = db_get_rec("mail", $mid);
    $in_reply_to = $message["message_id"];
    $to = $message["mail_from"];
    $subject = $message["subject"];
    if (substr($subject, 0, 4) != "Re: ") {
        $subject = "Re: {$subject}";
    }
} else {
    $in_reply_to = "";
    $subject = "";
}
print_header("Mail", array("Inbox"), array("inbox"), array("/mail/"));
writeln('<form method="post">');
writeln('<input name="in_reply_to" type="hidden" value="' . $in_reply_to . '"/>');
beg_tab();
print_row(array("caption" => "To", "text_key" => "to", "text_value" => $to));
print_row(array("caption" => "Subject", "text_key" => "subject", "text_value" => $subject));
print_row(array("caption" => "Body", "textarea_key" => "body", "textarea_height" => 500));
end_tab();
right_box("Send");
writeln('</form>');
开发者ID:scarnago,项目名称:pipecode,代码行数:31,代码来源:compose.php


示例6: print_row

    function print_row($field, $shownfields, $row, $object, $show_edit = true, $level = 0, $currentslug = '', $parenturl = '', $delete_limits = array())
    {
        if ($level == 0) {
            echo '<tbody data-id="' . $row->id . '">';
        }
        $user = FW4_User::get_user();
        $typemanager = FW4_Type_Manager::get_instance();
        ?>
		<tr<?php 
        echo $level > 0 ? ' data-root="' . $GLOBALS['root_id'] . '"' : '';
        ?>
 data-id="<?php 
        echo $row->id;
        ?>
" onclick="window.location='<?php 
        echo $parenturl . ($level > 0 ? $GLOBALS['recursive_name'] : $field['name']);
        ?>
/<?php 
        echo $row->id;
        ?>
/';">
			<?php 
        if (isset($field['sortable']) && $field['sortable']) {
            ?>
				<td valign="middle">
					<?php 
            if ($level == 0) {
                ?>
						<img class="sort-handle" src="<?php 
                echo url(ADMINRESOURCES . 'images/sort.png');
                ?>
" width="10" height="11"/><input type="hidden" name="sort-<?php 
                echo $row->id;
                ?>
" value="<?php 
                echo $row->_sort_order;
                ?>
" />
					<?php 
            }
            ?>
				</td>
			<?php 
        }
        $i = 0;
        foreach ($shownfields as $name => $subfield) {
            ?>
				<td<?php 
            if ($subfield->getName() == "price") {
                ?>
 align="right"<?php 
            }
            ?>
><div class="overflow">
					<?php 
            if ($i++ == 0 && $level > 0) {
                echo '&nbsp;&nbsp;';
                for ($s = 0; $s < $level - 1; $s++) {
                    echo '&nbsp;&nbsp;&nbsp;&nbsp;';
                }
                echo '<span style="opacity:0.5">&#9492;</span> ';
            }
            if ($subfield->getName() == "bool") {
                if ($row->{$name} == 1) {
                    ?>
							<img src="<?php 
                    echo url(ADMINRESOURCES . 'images/tick.png');
                    ?>
" class="bool" width="16" height="16"/>
						<?php 
                } else {
                    ?>
							<img src="<?php 
                    echo url(ADMINRESOURCES . 'images/cross.png');
                    ?>
" class="bool" width="16" height="16"/> 
						<?php 
                }
            } else {
                if ($subfield->getName() == "date") {
                    if ($row->{$name}) {
                        echo date('j/m/Y', $row->{$name});
                    }
                } else {
                    if ($subfield->getName() == "float") {
                        if ($row->{$name}) {
                            echo rtrim(rtrim(number_format($row->{$name}, 2, ',', '.'), '0'), ',');
                        }
                    } else {
                        if ($subfield->getName() == "timedate") {
                            if ($row->{$name}) {
                                if (date('H:i', $row->{$name}) == '00:00') {
                                    echo date('j/m/Y', $row->{$name});
                                } else {
                                    echo date('j/m/Y H:i', $row->{$name});
                                }
                            }
                        } else {
                            if ($subfield->getName() == "text") {
                                if (isset($row->{$name})) {
//.........这里部分代码省略.........
开发者ID:kidaa30,项目名称:Swevers,代码行数:101,代码来源:object_rows.php


示例7: mysql_query

if ($isHTML) {
    print "<p>";
}
include HEURIST_DIR . 'admin/structure/crosswalk/usrTagsFields.inc';
// sets value of $flds
print "-- {$flds} \n";
$query = "select {$flds} from UsrTags";
$res = mysql_query($query);
$fmt = 'UsrTags';
// update format if fields added
if ($isHTML) {
    print "<p>";
}
print "\n{$startToken}\n";
while ($row = mysql_fetch_assoc($res)) {
    print_row($row, $fmt);
}
print "\n{$endToken}\n";
if ($isHTML) {
    print "<p>&nbsp;<p>&nbsp;<p>";
}
// --------------------------------------------------------------------------------------
print "\n{$endofFileToken}\n";
if ($isHTML) {
    print '</body></html>';
}
function print_row($row, $fmt)
{
    // Prints a formatted representation of the data retreived for one row in the query
    // Make sure that the query you passed in generates the fields you want to print
    // Specify fields with $row[fieldname] or $row['fieldname'] (in most cases the quotes
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:31,代码来源:getDBStructureAsSQL.php


示例8: die

// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Pipecode.  If not, see <http://www.gnu.org/licenses/>.
//
if (!$auth_user["editor"] && !$auth_user["admin"]) {
    die("not an editor or admin");
}
print_header("Menu");
writeln('<table class="fill">');
writeln('<tr>');
writeln('<td style="padding-right: 8px; vertical-align: text-top; width: 50%;">');
beg_tab();
print_row(array("caption" => "Poll", "description" => "Create a new poll", "icon" => "heart", "link" => "/poll/create"));
if ($auth_user["admin"]) {
    print_row(array("caption" => "Topics", "description" => "Add and remove topics", "icon" => "chat", "link" => "/topic/list"));
}
end_tab();
writeln('</td>');
writeln('<td style="vertical-align: text-top; width: 50%;">');
beg_tab();
print_row(array("caption" => "Wiki", "description" => "Create a new wiki page", "icon" => "html", "link" => "/"));
if ($auth_user["admin"]) {
    print_row(array("caption" => "Links", "description" => "Manage server links", "icon" => "workgroup", "link" => "/link/"));
}
end_tab();
writeln('</td>');
writeln('</tr>');
writeln('</table>');
print_footer();
开发者ID:scarnago,项目名称:pipecode,代码行数:31,代码来源:index.php


示例9: writeln

writeln('<img alt="Pipecode" src="/images/logo-top.png" style="margin-bottom: 8px"/>');
writeln('<form method="post">');
beg_tab();
print_row(array("caption" => "Server Name", "text_key" => "server_name", "text_value" => "example.com"));
print_row(array("caption" => "Server Title", "text_key" => "server_title", "text_value" => "Example Site"));
print_row(array("caption" => "Server Slogan", "text_key" => "server_slogan", "text_value" => "Nerd News Network"));
end_tab();
beg_tab();
print_row(array("caption" => "SMTP Server", "text_key" => "smtp_server", "text_value" => "mail.example.com"));
print_row(array("caption" => "SMTP Port", "text_key" => "smtp_port", "text_value" => "587"));
print_row(array("caption" => "SMTP Address", "text_key" => "smtp_address", "text_value" => "[email protected]"));
print_row(array("caption" => "SMTP Username", "text_key" => "smtp_username", "text_value" => "mailuser"));
print_row(array("caption" => "SMTP Password", "text_key" => "smtp_password", "text_value" => "password"));
end_tab();
beg_tab();
print_row(array("caption" => "SQL Server", "text_key" => "sql_server", "text_value" => "127.0.0.1"));
print_row(array("caption" => "SQL Username", "text_key" => "sql_user", "text_value" => "sql"));
print_row(array("caption" => "SQL Password", "text_key" => "sql_pass", "text_value" => "password"));
print_row(array("caption" => "SQL Database", "text_key" => "sql_database", "text_value" => "pipecode"));
end_tab();
beg_tab();
print_row(array("caption" => "CAPTCHA API Key", "text_key" => "captcha_key", "text_value" => ""));
end_tab();
beg_tab();
print_row(array("caption" => "Admin Username", "text_key" => "admin_username", "text_value" => "myname"));
print_row(array("caption" => "Admin Password", "text_key" => "admin_password", "text_value" => "crunchyfrog"));
end_tab();
right_box("Save");
writeln('</form>');
writeln('</body>');
writeln('</html>');
开发者ID:scarnago,项目名称:pipecode,代码行数:31,代码来源:setup.php


示例10: promote


//.........这里部分代码省略.........
    }
    $subs_coef = get_subs_coef($site_id, 2);
    $globals['users_karma_avg'] = (double) $db->get_var("select SQL_NO_CACHE avg(link_votes_avg) from links, sub_statuses where id = {$site_id} and status = 'published' and date > date_sub(now(), interval 72 hour) and link_id = link");
    $output .= "Karma average for each link: " . $globals['users_karma_avg'] . ", Past karma. Long term: {$past_karma_long}, Short term: {$past_karma_short}, Average: <b>{$past_karma}</b><br/>\n";
    $output .= "<b>Current MIN karma: {$min_karma}</b>, absolute min karma: {$min_past_karma}, analizing from {$limit_karma}<br/>\n";
    $output .= "</p>\n";
    $where = "id = {$site_id} AND date > {$from_time} AND status = 'queued' AND link_id = link AND link_votes>={$min_votes} AND (link_karma > {$limit_karma} or (date > date_sub(now(), interval 2 hour) and link_karma > {$bonus_karma})) and user_id = link_author ";
    $sort = "ORDER BY link_karma DESC, link_votes DESC";
    $thumbs_queue = array();
    $links = $db->get_results("SELECT SQL_NO_CACHE link_id, link_karma as karma from sub_statuses, links, users  where {$where} {$sort} LIMIT 30");
    $rows = $db->affected_rows;
    echo "SELECTED {$rows} ARTICLES\n";
    if (!$rows) {
        $output .= "There are no articles<br/>\n";
        $output .= "--------------------------<br/>\n";
        echo strip_tags($output) . "\n";
        if (!DEBUG) {
            $annotation = new Annotation("promote-{$site_id}");
            $annotation->text = $output;
            $annotation->store();
        } else {
            echo "OUTPUT:\n. " . strip_tags($output) . "\n";
        }
        return;
    }
    $max_karma_found = 0;
    $best_link = 0;
    $best_karma = 0;
    $output .= "<table>\n";
    if ($links) {
        $output .= "<tr class='thead'><th>votes</th><th>anon</th><th>neg.</th><th>coef</th><th>karma</th><th>sub</th><th>title</th><th>changes</th></tr>\n";
        $i = 0;
        foreach ($links as $dblink) {
            $link = Link::from_db($dblink->link_id);
            $changes = update_link_karma($site_id, $link);
            if (!DEBUG && $link->thumb_status == 'unknown' && $link->karma > $limit_karma) {
                echo "Adding {$link->id} to thumb queue\n";
                array_push($thumbs_queue, $link->id);
            }
            if (!empty($link->coef) && $link->coef > 1) {
                if ($decay > 1) {
                    $karma_threshold = $past_karma;
                } else {
                    $karma_threshold = $min_karma;
                }
            } else {
                // Otherwise use normal decayed min_karma
                $karma_threshold = $min_karma;
            }
            if ($link->votes >= $min_votes && $link->karma >= $karma_threshold && $published < $max_to_publish) {
                $published++;
                publish($site_id, $link);
                $changes = 3;
                // to show a "published" later
            } else {
                if (($must_publish || $link->karma > $min_past_karma) && $link->karma > $limit_karma && $link->karma > $last_resort_karma && $link->votes > $link->negatives * 20) {
                    $last_resort_id = $link->id;
                    $last_resort_karma = $link->karma;
                }
            }
            $output .= print_row($link, $changes);
            usleep(10000);
            $i++;
        }
        if (!DEBUG && $published == 0 && $links_published_projection < $pub_estimation * 0.9 && $must_publish && $last_resort_id > 0) {
            // Publish last resort
            $link = new Link();
            $link->id = $last_resort_id;
            if ($link->read()) {
                $link->message = "Last resort: selected with the best karma";
                $output .= print_row($link, 3);
                publish($site_id, $link);
                // Recheck for images, some sites add images after the article has been published
                if (!$link->has_thumb() && $link->thumb_status != 'deleted' && !in_array($link->id, $thumbs_queue)) {
                    echo "Adding {$link->id} to thumb queue\n";
                    array_push($thumbs_queue, $link->id);
                }
            }
        }
        //////////
    }
    $output .= "</table>\n";
    echo strip_tags($output) . "\n";
    if (!DEBUG) {
        $annotation = new Annotation("promote-{$site_id}");
        $annotation->text = $output;
        $annotation->store();
    } else {
        echo "OUTPUT:\n" . strip_tags($output) . "\n";
    }
    // Get THUMBS
    foreach ($thumbs_queue as $id) {
        $link = Link::from_db($id, null, false);
        if ($link && !$link->has_thumb() && $link->thumb_status != 'deleted') {
            echo "GETTING THUMB {$link->id}\n";
            $link->get_thumb(true);
            echo "DONE GETTING THUMB\n";
        }
    }
}
开发者ID:GallardoAlba,项目名称:Meneame,代码行数:101,代码来源:promote10.php


示例11: while

while ($row = mysql_fetch_assoc($res)) {
    print_row($row, $fmt, $flds);
}
print "</UserHyperlinkFilters>";
// ------------------------------------------------------------------------------------------
// usrTags
print "\n\n<UserTags>";
include HEURIST_DIR . 'admin/structure/crosswalk/usrTagsFields.inc';
// sets value of $flds
$query = "select {$flds} from UsrTags";
$res = mysql_query($query);
$fmt = 'UsrTags';
// update format if fields added
print "\n\n<!-- {$flds} -->";
while ($row = mysql_fetch_assoc($res)) {
    print_row($row, $fmt, $flds);
}
print "</UserTags>";
print '\\n</hml_structure>';
// end of file
// --------------------------------------------------------------------------------------
function html_escape($s)
{
    // TODO: 6/6/14 - we used mysql_real_escape_string because we were producing SQL.
    //       Now we are producing XML, we should revise this to appropriate escaping
    return htmlspecialchars(mysql_real_escape_string($s));
}
// html_escape
function print_row($row, $fmt, $flds)
{
    // Prints a formatted representation of the data retreived for one row in the query
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:31,代码来源:getDBStructureAsXML.php


示例12: writeln

writeln('<h1>Settings</h1>');
writeln('<form method="post">');
beg_tab("JavaScript");
print_row(array("caption" => "Enable JavaScript", "check_key" => "javascript_enabled", "checked" => $user_conf["javascript_enabled"]));
end_tab();
beg_tab("Date and Time");
print_row(array("caption" => "Time Zone", "option_key" => "time_zone", "option_list" => $zones, "option_value" => $user_conf["time_zone"]));
end_tab();
beg_tab("Comments");
$scores = array("-1", "0", "1", "2", "3", "4", "5");
print_row(array("caption" => "Hide Threshold", "option_key" => "hide_threshold", "option_list" => $scores, "option_value" => $user_conf["hide_threshold"]));
print_row(array("caption" => "Expand Threshold", "option_key" => "expand_threshold", "option_list" => $scores, "option_value" => $user_conf["expand_threshold"]));
end_tab();
beg_tab("Mailing List");
print_row(array("caption" => "Subscribe to Mailing List (list@{$server_name})", "check_key" => "list_enabled", "checked" => $user_conf["list_enabled"]));
print_row(array("caption" => "Real Name", "text_key" => "real_name", "text_value" => $user_conf["real_name"]));
end_tab();
//
// Eastern: America/New_York
// Central: America/Chicago
// Mountain: America/Denver
// Pacific: America/Los_Angeles
// British Summer Time: London
// Central Europe Time: Paris
// Eastern Europe Time: Athens
//
right_box("Save");
writeln('</form>');
writeln('</td>');
writeln('</tr>');
writeln('</table>');
开发者ID:scarnago,项目名称:pipecode,代码行数:31,代码来源:settings.php


示例13: print_attendance_table

function print_attendance_table($user, $course)
{
    $complete = get_attendance($user->id, $course);
    $percent = get_percent($user->id, $course) . '&nbsp;%';
    $grade = get_grade($user->id, $course);
    echo '<table border="0" cellpadding="0" cellspacing="0" class="list">';
    print_row(get_string('sessionscompleted', 'attforblock') . ':', "<strong>{$complete}</strong>");
    $statuses = get_statuses($course->id);
    foreach ($statuses as $st) {
        print_row($st->description . ': ', '<strong>' . get_attendance($user->id, $course, $st->id) . '</strong>');
    }
    print_row(get_string('attendancepercent', 'attforblock') . ':', "<strong>{$percent}</strong>");
    print_row(get_string('attendancegrade', 'attforblock') . ':', "<strong>{$grade}</strong> / " . get_maxgrade($user->id, $course));
    print_row('&nbsp;', '&nbsp;');
    echo '</table>';
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:16,代码来源:locallib.php


示例14: get_context_instance

}
//Added for subadmin
$context = get_context_instance(CONTEXT_SYSTEM);
$roles = get_user_roles($context, $USER->id, false);
$role = key($roles);
$rolename = $roles[$role]->shortname;
if ($rolename == 'subadmin') {
    $all_languages = get_string_manager()->get_list_of_translations();
    $get_lang_details = $DB->get_record('country_user', array('userid' => $USER->id));
    $langs = explode(",", $get_lang_details->lang);
    if ($langs) {
        foreach ($langs as $la) {
            $aUserAssignedLang[] = $all_languages[$la];
        }
        $sUserAssignedLang = implode(", ", $aUserAssignedLang);
        print_row(get_string('assignedlanguages') . ": ", $sUserAssignedLang);
    }
}
echo "</table></div></div>";
echo $OUTPUT->blocks_for_region('content');
// Print messaging link if allowed
if (isloggedin() && has_capability('moodle/site:sendmessage', $context) && !empty($CFG->messaging) && !isguestuser() && !isguestuser($user) && $USER->id != $user->id) {
    echo '<div class="messagebox">';
    echo '<a href="' . $CFG->wwwroot . '/message/index.php?id=' . $user->id . '">' . get_string('messageselectadd') . '</a>';
    echo '</div>';
}
if ($CFG->debugdisplay && debugging('', DEBUG_DEVELOPER) && $currentuser) {
    // Show user object
    echo '<br /><br /><hr />';
    echo $OUTPUT->heading('DEBUG MODE:  User session variables');
    print_object($USER);
开发者ID:vinoth4891,项目名称:clinique,代码行数:31,代码来源:profile.php


示例15: print_header

// Pipecode is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Pipecode.  If not, see <http://www.gnu.org/licenses/>.
//
print_header("Create Poll");
writeln('<table class="fill">');
writeln('<tr>');
writeln('<td class="left_col">');
print_left_bar("main", "poll");
writeln('</td>');
writeln('<td class="fill">');
writeln('<h1>Create Poll</h1>');
beg_tab("Question");
print_row(array("caption" => "Text", "text_key" => "question"));
print_row(array("caption" => "Type", "option_key" => "hide_threshold", "option_keys" => array(0, 1), "option_list" => array("Multiple Choice", "Approval Voting")));
end_tab();
beg_tab("Answers", array("colspan" => 2));
writeln('	<tr>');
writeln('		<td><input type="text"/></td>');
writeln('		<td style="text-align: right"><a href="delete" class="icon_16" style="background-image: url(/images/remove-16.png)">Remove</a></td>');
writeln('	</tr>');
end_tab();
writeln('<div class="right"><a href="add" class="icon_16" style="background-image: url(/images/add-16.png)">Add</a></div>');
writeln('		</td>');
writeln('	</tr>');
writeln('</table>');
print_footer();
开发者ID:scarnago,项目名称:pipecode,代码行数:31,代码来源:create.php


示例16: get_subsession

function get_subsession($level, $parent_id, $details_to_view, $split, $extra)
{
    # get the subsession info for this parent_id
    $athlete_id = $GLOBALS['athlete_id'];
    $level++;
    $numcols = count($details_to_view);
    # put children rows into sub_rows array
    $sub_rows = do_sql("SELECT * from log WHERE athlete_id = '{$athlete_id}' and parent_session='{$parent_id}' ORDER BY start_date, start_time, stage ");
    #this session is a subsession so hide it
    $num = $numcols + 2;
    echo "<TR><TD class=firstcolumn > </TD>\n\t<TD class=subtable colspan={$num} align=right >\n\t<DIV ID='el{$parent_id}' CLASS='hiddentext' >\n";
    # Print Column headers and open sub-table
    $details_to_view = get_details_to_view($athlete_id);
    display_column_headers($details_to_view);
    # then print each subsession and check whether it has subsessions
    while ($sub_row = pg_fetch_array($sub_rows, null, PGSQL_ASSOC)) {
        # sub_row now holds 1 subsession
        # check whether this row has any subsessions
        $session_id = $sub_row['session_id'];
        $subtest = do_sql("SELECT * from log WHERE athlete_id = '{$athlete_id}' and parent_session='{$session_id}' ");
        $numsubs = pg_num_rows($subtest);
        #echo "NUMsubs: $numsubs <br> \n";
        // Start the row
        echo "\n<TR><TD class=firstcolumn></TD>\n";
        if ($numsubs > 0) {
            if ($split == $session_id) {
                print_row(1, $level, $sub_row, $details_to_view, $athlete_id, $split);
                #display_row_editor($session_id, $athlete_id, $extra );
            } else {
                print_row(1, $level, $sub_row, $details_to_view, $athlete_id, 0);
                #display_row_editor($session_id, $athlete_id, $extra );
            }
            # call self to get subs of this sub
            get_subsession($level, $sub_row['session_id'], $details_to_view, $split, $extra);
        } else {
            if ($split == $session_id) {
                print_row(0, $level, $sub_row, $details_to_view, $athlete_id, $split);
                #display_row_editor($session_id, $athlete_id, $extra );
            } else {
                print_row(0, $level, $sub_row, $details_to_view, $athlete_id, 0);
                #display_row_editor($session_id, $athlete_id, $extra );
            }
        }
    }
    echo "\n</TABLE>\n\t<font size=2  > <br> </font>\n\t</DIV>\n\n";
}
开发者ID:robincj,项目名称:tlog,代码行数:46,代码来源:log_table_functions.php


示例17: print_row

        print_row(mysql_query($stmt), "Monatsleistung", mysql_query($stmt2));
        /*************************************************************************/
    /*************************************************************************/
    case 'year':
        /*************************************************************************/
        $where_clause = " WHERE date_format( a.date , '%Y' ) = " . date('Y', $time);
        $stmt = $sql . $where_clause . " GROUP BY date_format( a.date , '%Y' ) ";
        $stmt2 = sprintf($m_stmt, $where_clause);
        print_row(mysql_query($stmt), "Jahresleistung", mysql_query($stmt2));
        /*************************************************************************/
    /*************************************************************************/
    default:
        /*************************************************************************/
        $stmt = $sql;
        $stmt2 = sprintf($m_stmt, "");
        print_row(mysql_query($stmt), "Gesamtleistung", mysql_query($stmt2));
}
echo '</table>';
$ok = mysql_query("select wert from parameter where feld='lmd'");
$lmd = mysql_result($ok, 0);
$ok = mysql_query("select max(timestamp) from solardata");
$lnd = mysql_result($ok, 0);
$flmd = format_date_gh($lmd);
$flnd = format_date_gh($lnd);
echo '<small>Letzte Daten vom: ' . $flnd . ' / LMD: ' . $flmd . '</small></div>';
function print_row($result1, $title, $result2)
{
    $units = array('ETotal' => 'kWh', 'ETotal_Soll' => 'kWh', 'ETotal_Diff' => 'kWh', 'Perc' => '%');
    if (is_resource($result1)) {
        echo '<tr><th class="left">' . $title . '</th>';
        $col1 = "";
开发者ID:ragchuck,项目名称:pv,代码行数:31,代码来源:tabledata.php


示例18: get_text

    $INI_FAIL = ($INI_FAIL or $param < 16777216);
    /**
    
    	Sezione Moduli
    
    	**/
    echo '<tr class="Divider"><td colspan="3"></td></tr>';
    // moduli essenziali: mysqli, curl, gd, imagick, mbstring, iconv
    echo '<tr><th class="Title" colspan="3">' . get_text('Loaded modules', 'Install') . '</th></tr>';
    echo '<tr>';
    echo '<th>' . get_text('Module', 'Install') . '</th>';
    echo '<th>' . get_text('Required', 'Install') . '</th>';
    echo '<th>' . get_text('Status', 'Install') . '</th>';
    echo '</tr>';
    foreach ($ESS_EXT as $key) {
        print_row(in_array($key, $EXT_SET) ? get_text('installed', 'Install') : get_text('missing', 'Install'), get_text('installed', 'Install'), $key, !in_array($key, $EXT_SET), true);
        $MOD_FAIL = ($MOD_FAIL or !in_array($key, $EXT_SET));
    }
    if ($MOD_FAIL) {
        // manca roba essenziale... non si prosegue
        echo '<tr><td colspan="3">' . get_text('Missing modules', 'Install') . '<br/>' . get_text('Failing install', 'Install') . '</td></tr>';
    } else {
        // si va avanti... ma magari si può sistemare il php.ini
        if ($INI_FAIL) {
            echo '<tr><td colspan="3">' . get_text('Suboptimal', 'Install') . '</td></tr>';
        }
        echo '<tr><th colspan="3"><a href="?step=2">' . get_text('Continue') . '</a></th></tr>';
    }
}
function print_row($param, $min, $key, $test, $mandatory = false)
{
开发者ID:brian-nelson,项目名称:ianseo,代码行数:31,代码来源:install-1.php


示例19: print_row

            if (($must_publish || $link->karma > $min_past_karma) && $link->karma > $limit_karma && $link->karma > $last_resort_karma && $link->votes > $link->negatives * 20) {
                $last_resort_id = $link->id;
                $last_resort_karma = $link->karma;
            }
        }
        print_row($link, $changes);
        usleep(10000);
        $i++;
    }
    if (!DEBUG && $published == 0 && $links_published_projection < $pub_estimation * 0.9 && $must_publish && $last_resort_id > 0) {
        // Publish last resort
        $link = new Link();
        $link->id = $last_resort_id;
        if ($link->read()) {
            $link->message = "Last resort: selected with the best karma";
            print_row($link, 3);
            publish($link);
            // Recheck for images, some sites add images after the article has been published
            if ($link->thumb_status != 'local' && $link->thumb_st 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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