Beispiel #1
0
function draw_page()
{
    ?>
	<div class="container">
		<?php 
    open_panel('quals', 'Quals');
    draw_user_list();
    close_panel();
    ?>
	</div>
<?
 } 

function draw_user_list() {
  $users = get_users("user");
  $total = get_qual_point_total();

  ?>
      <table class="userlist table table-condensed">
        <tr>
          <th>Last Name</th>
          <th>First Name</th>
          <th>Username</th>
          <th>Progress</th>
        </tr>
        <?php 
    while ($row = $users->fetch_array()) {
        $row['role'] = get_role($row['user_id']);
        $progress = get_progress($row['user_id']);
        echo '<tr class="userlist ';
        echo 'userlist-' . $row['role'];
        if ($row['inactive']) {
            echo ' userlist-inactive';
        }
        echo '" onclick="openProgress(' . $row['user_id'] . ')">';
        echo '<td>' . $row['lname'] . "</td>";
        echo '<td>' . $row['fname'] . "</td>";
        echo '<td>' . $row['username'] . "</td>";
        echo '<td>';
        draw_qual_progress_bar($progress, $total);
        echo '</td>';
        echo '</tr>';
    }
    ?>
      </table>
  <?php 
}
function draw_page($userinfo)
{
    $progress = get_progress($userinfo['user_id']);
    $total = get_qual_point_total();
    ?>
	<div class="container">
	<?php 
    echo '<h3>';
    echo $userinfo['fname'] . ' ' . $userinfo['lname'];
    echo '&nbsp;<small>' . user_level_to_levelname(get_level($userinfo['user_id'])) . '</small>';
    echo '</h3>';
    draw_qual_progress_bar($progress, $total);
    draw_progress_table($userinfo);
    draw_qual_progress_form($userinfo);
    ?>
  </div>
 <?php 
}
Beispiel #3
0
function draw_progress()
{
    $progress = get_progress($_SESSION['user_id']);
    $total = get_qual_point_total();
    open_panel_item('Qual Progress', 'goals', '12');
    draw_qual_progress_bar($progress, $total);
    close_panel_item();
}