public static function showIssues()
    {
        if (is_user_logged_in()) {
            if (isset($_GET['bimsie']) && $_GET['bimsie'] != '' || isset($_POST['bimsie']) && $_POST['bimsie'] != '') {
                // Show issues belonging to projects on this server
                if (isset($_GET['bimsie']) && $_GET['bimsie'] != '') {
                    $server = htmlentities($_GET['bimsie'], ENT_QUOTES, get_bloginfo('charset'));
                    $projects = BIMsie::getProjects($_GET['bimsie']);
                } elseif (isset($_POST['new'])) {
                    // Add new bimserver
                    if (isset($_POST['bimsie']) && isset($_POST['username']) && isset($_POST['password'])) {
                        BIMsie::updateServer($_POST['bimsie'], $_POST['username'], $_POST['password'], isset($_POST['remember']) && $_POST['remember'] == '1' ? 1 : 0);
                    }
                    $server = htmlentities($_POST['bimsie'], ENT_QUOTES, get_bloginfo('charset'));
                    $projects = BIMsie::getProjects($_POST['bimsie']);
                } elseif (isset($_POST['forget'])) {
                    if (isset($_POST['bimsie'])) {
                        BIMsie::forgetServer($_POST['bimsie']);
                    }
                } else {
                    // Store credentials or just use server with temporary credentials
                    $server = htmlentities($_POST['bimsie'], ENT_QUOTES, get_bloginfo('charset'));
                    $projects = BIMsie::getProjects($_POST['bimsie']);
                }
            }
            $options = BIMBCFManagement::getOptions();
            if (isset($projects) && $projects !== false) {
                $projects = BIMsie::getHierarchicalProjects($projects);
                ?>
            <h3><?php 
                _e('Bimsie server', 'bim-bcf-management');
                ?>
: <?php 
                print $server;
                ?>
</h3>
<?php 
                foreach ($projects as $project) {
                    $myIssues = get_posts(array('posts_per_page' => -1, 'post_type' => $options['bcf_issue_post_type'], 'post_status' => 'publish', 'orderby' => 'date', 'order' => 'DESC', 'meta_query' => array(array('key' => 'import_status', 'value' => 'complete'), array('key' => 'poid', 'value' => $project->oid))));
                    ?>
               <h4><?php 
                    print $project->name;
                    ?>
</h4>
<?php 
                    if (count($myIssues) > 0) {
                        ?>
               <table class="issue-table">
                  <tr>
                     <th>&nbsp;</th>
                     <th><?php 
                        _e('Issue', 'bim-bcf-management');
                        ?>
</th>
                     <th><?php 
                        _e('Date', 'bim-bcf-management');
                        ?>
</th>
                     <th><?php 
                        _e('Revision', 'bim-bcf-management');
                        ?>
</th>
                  </tr>
<?php 
                        $index = 0;
                        foreach ($myIssues as $issue) {
                            $roids = get_post_meta($issue->ID, 'roid');
                            $poids = get_post_meta($issue->ID, 'poid');
                            $revisionInformation = '';
                            foreach ($poids as $key => $poid) {
                                if ($poid == $project->oid) {
                                    if (isset($roids[$key])) {
                                        $revision = BIMsie::getRevision($server, $project->oid, $roids[$key]);
                                        if ($revision) {
                                            $revisionInformation = $revision->name;
                                        } else {
                                            $revisionInformation = '-';
                                        }
                                    }
                                    break;
                                }
                            }
                            $timestamp = strtotime($issue->post_date);
                            ?>
                  <tr class="<?php 
                            print $index % 2 == 0 ? 'even' : 'odd';
                            ?>
">
                     <td><?php 
                            print get_the_post_thumbnail($issue->ID, 'issue-list-thumb');
                            ?>
</td>
                     <td><a href="<?php 
                            print get_bloginfo('wpurl') . $options['issue_details_uri'] . '?id=' . $issue->ID;
                            ?>
"><?php 
                            print $issue->post_title;
                            ?>
</a></<td>
                     <td><?php 
                            print date(get_option('date_format') . ' ' . get_option('time_format'), $timestamp);
                            ?>
</<td>
                     <td><?php 
                            print $revisionInformation;
                            ?>
</td>
                  </tr>
<?php 
                            $index++;
                        }
                        ?>
               </table>
<?php 
                    } else {
                        ?>
               <p><?php 
                        _e('No issues for this project', 'bim-bcf-management');
                        ?>
</p>
<?php 
                    }
                }
            } else {
                // Show stored bimsie servers
                $bimsieServers = BIMsie::getServers();
                foreach ($bimsieServers as $key => $bimsieServer) {
                    $token = BIMBCFManagement::getToken($key);
                    ?>
         <div class="bimsie-server-link">
            <form method="<?php 
                    print !isset($bimsieServer['remember']) || $bimsieServer['remember'] == 0 ? 'post' : 'get';
                    ?>
" action="">
               <h3><?php 
                    print (isset($bimsieServer['username']) ? $bimsieServer['username'] . ' - ' : '') . $bimsieServer['uri'];
                    ?>
</h3>
               <input type="hidden" name="bimsie" value="<?php 
                    print $bimsieServer['uri'];
                    ?>
" />
<?php 
                    if (!isset($bimsieServer['remember']) || $bimsieServer['remember'] == 0) {
                        ?>
               <input type="checkbox" name="remember" value="1" id="remember-<?php 
                        print $key;
                        ?>
" /> <label for="remember-<?php 
                        print $key;
                        ?>
"><?php 
                        _e('Remember me', 'bim-bcf-management');
                        ?>
</label><br />
               <label for="username-<?php 
                        print $key;
                        ?>
"><?php 
                        _e('Username', 'bim-bcf-management');
                        ?>
</label> <input type="text" id="username-<?php 
                        print $key;
                        ?>
" name="username" placeholder="<?php 
                        _e('Username', 'bim-bcf-management');
                        ?>
" value="" /><br />
               <label for="password-<?php 
                        print $key;
                        ?>
"><?php 
                        _e('Password', 'bim-bcf-management');
                        ?>
</label> <input type="password" id="password-<?php 
                        print $key;
                        ?>
" name="password" placeholder="<?php 
                        _e('Password', 'bim-bcf-management');
                        ?>
" value="" /><br />
<?php 
                    }
                    ?>
               <input type="submit" value="<?php 
                    _e('View', 'bim-bcf-management');
                    ?>
" />
            </form>
            <a class="button bcf-viewer-link" href="<?php 
                    print plugins_url('consideration-forum/index.html', __FILE__) . '?token=' . $token;
                    ?>
"><?php 
                    _e('BCF Viewer', 'bim-bcf-management');
                    ?>
</a>
            <div class="forget-bimserver">
               <form method="post" action="">
                  <input type="hidden" name="bimsie" value="<?php 
                    print $bimsieServer['uri'];
                    ?>
" />
                  <input type="submit" name="forget" value="<?php 
                    _e('Forget', 'bim-bcf-management');
                    ?>
" onclick="return confirm( '<?php 
                    _e('Are you sure you want the site to forget this bim servers information?', 'bim-bcf-management');
                    ?>
' );" />
               </form>
            </div>
         </div>
<?php 
                }
                ?>
         <div class="bimsie-server-link">
            <form method="post" action="">
               <h3><?php 
                _e('Add bimserver', 'bim-bcf-management');
                ?>
</h3>
               <label for="bimsie-new"><?php 
                _e('Bimserver', 'bim-bcf-management');
                ?>
</label> <input id="" type="text" name="bimsie" placeholder="<?php 
                _e('Bimserver', 'bim-bcf-management');
                ?>
" value="" /><br />
               <input type="checkbox" name="remember" value="1" id="remember-new" /> <label for="remember-new"><?php 
                _e('Remember me', 'bim-bcf-management');
                ?>
</label><br />
               <label for="username-new"><?php 
                _e('Username', 'bim-bcf-management');
                ?>
</label> <input type="text" id="username-new" name="username" placeholder="<?php 
                _e('Username', 'bim-bcf-management');
                ?>
" value="" /><br />
               <label for="password-new"><?php 
                _e('Password', 'bim-bcf-management');
                ?>
</label> <input type="password" id="password-new" name="password" placeholder="<?php 
                _e('Password', 'bim-bcf-management');
                ?>
" value="" /><br />
               <input type="submit" name="new" value="<?php 
                _e('Add and view', 'bim-bcf-management');
                ?>
" />
            </form>
         </div>
<?php 
            }
        } else {
            ?>
      <p><?php 
            _e('Please log in to access this page', 'bim-bcf-management');
            ?>
</p>
<?php 
        }
    }