Пример #1
0
 private function viewFractalSheet($fractal_id)
 {
     $user = $this->getUser();
     $out = $this->getOutput();
     if ($fractal_id) {
         $fractal = new FateFractal($fractal_id);
         $table = '';
         if ($fractal->name) {
             if (!$fractal->is_private || $user->isAllowed('fategm') || $fractal->fate_game->is_staff($user->getID()) || $fractal->user_id == $user->getID()) {
                 $table .= $fractal->getFractalSheet();
             } else {
                 $table .= "<div class='error' style='font-weight: bold; color: red'>You do not have permission to view this fractal's stats.</div>";
             }
         } else {
             $table .= "<div class='error' style='font-weight: bold; color: red'>No data found for that fractal_id; please check URL and try again.</div>";
         }
         $out->addHTML($table);
     } else {
         $out->addHTML("<div class='error' style='font-weight: bold; color: red'>Missing fractal_id argument; don't know which fractal to show.</div>");
     }
 }