コード例 #1
0
ファイル: bolt_sched.php プロジェクト: CalvinZhu/boinc
function show_item($iter, $view_id, $prev_view_id, $mode, $repeat = null)
{
    global $user;
    global $course;
    global $bolt_ex;
    global $refresh;
    global $url_args;
    $item = $iter->item;
    page_header();
    $bolt_query_string = $item->query_string;
    $links = array();
    if ($prev_view_id) {
        $links[] = "<a href=bolt_sched.php?{$url_args}&action=prev&view_id={$view_id}><img src=img/prev.gif></a>";
    }
    $next = "<a href=bolt_sched.php?{$url_args}&action=next&view_id={$view_id}><img src=img/next.gif border=0></a>";
    if ($item->is_exercise()) {
        $bolt_ex->mode = $mode;
        $bolt_ex->index = 0;
        switch ($mode) {
            case BOLT_MODE_SHOW:
                echo "\n                <form action=bolt_sched.php>\n                <input type=hidden name=view_id value={$view_id}>\n                <input type=hidden name=course_id value={$course->id}>\n                <input type=hidden name=action value=answer>\n            ";
                if ($refresh) {
                    echo "\n                    <input type=hidden name=refresh_id value={$refresh->id}>\n                ";
                }
                srand($view_id);
                require $item->filename;
                if (function_exists('bolt_divide')) {
                    bolt_divide();
                }
                $next = "<input type=image src=img/next.gif value=OK></form>";
                break;
            case BOLT_MODE_ANSWER:
                require $item->filename;
                if (function_exists('bolt_divide')) {
                    bolt_divide();
                }
                $score_pct = number_format($bolt_ex->score * 100);
                echo "Score: {$score_pct}%";
                break;
        }
    } else {
        require_once $item->filename;
        if (function_exists('bolt_divide')) {
            bolt_divide();
        }
    }
    if ($repeat) {
        $avg = number_format($repeat->avg_score * 100, 0);
        echo "<p>Score on this exercise set: {$avg}%";
        if ($repeat->flags & REVIEW) {
            //echo "<pre>";
            //print_r($repeat);
            //echo "</pre>";
            $name = urlencode($repeat->unit->name);
            $r = "<a href=bolt_sched.php?{$url_args}&action=review&view_id={$view_id}&unit_name={$name}>Review, then repeat exercises</a>";
            $links[] = $r;
        }
        if ($repeat->flags & REPEAT) {
            $r = "<a href=bolt_sched.php?{$url_args}&action=repeat&view_id={$view_id}>Repeat exercises</a>";
            $links[] = $r;
        }
        if ($repeat->flags & NEXT) {
            $links[] = $next;
        }
    } else {
        $links[] = $next;
    }
    $up_link = "<a href=bolt_sched.php?{$url_args}&action=course_home&view_id={$view_id}>Course home page</a>";
    show_nav($links, $up_link, $view_id);
    page_footer();
    if ($refresh) {
        $refresh->update("last_view_id={$view_id}");
    } else {
        $e = new BoltEnrollment();
        $e->user_id = $user->id;
        $e->course_id = $course->id;
        $e->update("last_view_id={$view_id}");
    }
}
コード例 #2
0
ファイル: index.php プロジェクト: happyj/qcn
    <link rel=\"stylesheet\" type=\"text/css\" href=\"".STYLESHEET."\">
    <link rel=\"alternate\" type=\"application/rss+xml\" title=\"".$rssname."\" href=\"".$rsslink."\">
";
include 'schedulers.txt';
echo "
    </head><body>
    <div class=page_title>".PROJECT."</div>
";
*/
include 'schedulers.txt';
echo "\n    <table cellpadding=\"8\" cellspacing=\"4\" class=bordered>\n    <tr><td rowspan=\"2\" valign=\"top\" width=\"40%\">\n";
if ($stopped) {
    echo "\n        <b>" . PROJECT . " is temporarily shut down for maintenance.\n        Please try again later</b>.\n    ";
} else {
    db_init();
    show_nav();
}
echo "\n    <p>\n    <a href=\"http://boinc.berkeley.edu/\"><img align=\"middle\" border=\"0\" src=\"img/pb_boinc.gif\" alt=\"Powered by BOINC\"></a>\n    </p>\n    </td>\n";
/*
if (!$stopped) {
    $profile = get_current_uotd();
    if ($profile) {
        echo "
            <td class=uotd>
            <h2 class=headline>".tra("User of the day")."</h2>
        ";
        show_uotd($profile);
        echo "</td></tr>\n";
    }
}
*/
コード例 #3
0
ファイル: admin_nav.php プロジェクト: RonyKader/ecommerce
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
	<div class="admin-nav">
	<h2><a href="admin.php">Admin Menu</a></h2>
		<nav class="admin-nav">
			<div class="bs-example">
            <div class="panel-group" id="accordion">
                <div class="panel panel-default">
                <?php 
$sql_query = show_nav();
while ($row = $row = mysqli_fetch_assoc($sql_query)) {
    ?>
	                    <a style="display:inline-block; width:100%;" class="chef-panel panel-heading panel-title" data-toggle="collapse" data-parent="#accordion" href="#<?php 
    echo $row['id'];
    ?>
">
	                    	<i class="fa fa-hand-o-right"></i> <?php 
    echo $row['menu_name'];
    ?>
	                    </a>    
	                    <div id="<?php 
    echo $row['id'];
    ?>
" class="panel-collapse collapse">
		                    <?php 
    $qu = show_category($row['id']);
    while ($sub = mysqli_fetch_assoc($qu)) {
        ?>
	                        <div class="panel-body">
	                            <ul class="list-unstyled">
	                            	<li><a href="#"><?php 
        echo $sub['cat_name'];
コード例 #4
0
  </head>
  <body>
    <?php 
$data = array('webgl' => array('title' => 'Computer graphics with WebGL', 'description' => '...', 'lecturer' => 'Boychev'), 'foo' => array('title' => 'Foo Programming', 'description' => '...', 'lecturer' => 'Bachiiski'), 'roo' => array('title' => 'Roo structures and analysis', 'description' => '...', 'lecturer' => 'Bachiiski'), 'bar' => array('title' => 'Bars and Jars', 'description' => '...', 'lecturer' => 'Bachiiski'), 'tap' => array('title' => 'Tap Clap', 'description' => '...', 'lecturer' => 'Bachiiski'));
function show_nav($data, $currentCourese)
{
    $output = "<nav>";
    foreach ($data as $key => $value) {
        if ($key === $currentCourese) {
            $output = $output . "<a href=\"?page=";
            $output = $output . $key;
            $output = $output . "\" class=\"selected\">";
            $output = $output . $data[$key]['title'];
            $output = $output . "</a>";
        } else {
            $output = $output . "<a href=\"?page=";
            $output = $output . $key;
            $output = $output . "\">";
            $output = $output . $data[$key]['title'];
            $output = $output . "</a>";
        }
        $output = $output;
    }
    $output = $output . "</nav>";
    return $output;
}
echo show_nav($data, 'webgl');
?>
  </body>
</html>
コード例 #5
0
ファイル: header.php プロジェクト: vkaracic/BareWP
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>BareWP theme</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <link href="wp-content/themes/BareWP/style.css" rel="stylesheet">
    <link href="wp-content/themes/BareWP/responsive.css" rel="stylesheet">

    <!-- Google fonts -->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
    
</head>
<body>
<header>
<?php 
show_nav("");
?>
</header>