function show_list($is_team, $appid, $is_total) { $x = $is_team ? "teams" : "participants"; page_head("Top {$x} by application"); $apps = BoincApp::enum("deprecated=0"); if (!$appid) { $appid = $apps[0]->id; } start_table(); show_header($is_team, $apps, $appid, $is_total); $x = $is_total ? "total" : "expavg"; if ($is_team) { $items = BoincCreditTeam::enum("appid={$appid} order by {$x} desc"); } else { $items = BoincCreditUser::enum("appid={$appid} order by {$x} desc"); } $i = 0; foreach ($items as $item) { show_row($item, $apps, $is_team, $i); $i++; } end_table(); page_tail(); }
} break; case 'model': echo $x; break; case 'day': echo $x; break; } echo "</td><td align=right>" . format_credit_large($y->credit), "</td><td align=right>{$y->nresults}</td></tr>\n"; } $mode = get_str('mode', true); if (!$mode) { page_head("Show GPU info"); echo "\n <ul>\n <li> <a href=show_coproc.php?mode=host>Hosts</a>\n <li> <a href=show_coproc.php?mode=user>Users</a>\n <li> <a href=show_coproc.php?mode=team>Teams</a>\n <li> <a href=show_coproc.php?mode=model>GPU models</a>\n <li> <a href=show_coproc.php?mode=day>Day</a>\n </ul>\n "; page_tail(); exit; } $fname = "../ops/" . filename($mode); $data = file_get_contents($fname); $array = unserialize($data); page_head(title($mode)); start_table(); header_row($mode); $i = 0; foreach ($array as $x => $y) { show_row($x, $y, $mode, $i); $i++; } end_table(); page_tail();
<?php show_select_types_items(); ?> </ul> </div> </div> <table class="table"> <?php for ($i = 0; $i < count($found); $i++) { ?> <?php show_row($found[$i]); ?> <?php } ?> </table> <?php } else { ?> <h2>Il n'y a pas actuellement de film disponible. </h2> <?php } ?> </div> </body>