function read_comments($dir, $check) { global $root_dir, $show_cmt, $cmt_count, $total_count, $subfile_count, $deleted_files, $domain, $script_query, $template, $icon_size; $files = array(); // Read directory contents, put filenames in array, count files foreach (glob($dir . '/*.xml', GLOB_NOSORT) as $file) { $files[basename($file, '.xml')] = $file; $subfile_count[$file] = '0'; $total_count++; if (!preg_match('/-/', basename($file, '.xml'))) { $cmt_count++; } } // Sort files ascending alphabetically uksort($files, 'strnatcasecmp'); foreach ($files as $file) { $cmt_tree = ''; foreach (explode('-', basename($file, '.xml')) as $reply) { for ($i = 1; $i <= $reply; $i++) { if (!in_array($dir . '/' . $cmt_tree . ((!empty($cmt_tree) ? '-' : '') . $i) . '.xml', $files)) { if (!in_array($dir . '/' . $cmt_tree . ((!empty($cmt_tree) ? '-' : '') . $i) . '.xml', $deleted_files)) { deletion_notice($dir . '/' . $cmt_tree . ((!empty($cmt_tree) ? '-' : '') . $i) . '.xml', $show_cmt, $check); // Display notice $deleted_files[] = $dir . '/' . $cmt_tree . ((!empty($cmt_tree) ? '-' : '') . $i) . '.xml'; } } } $cmt_tree .= (!empty($cmt_tree) ? '-' : '') . $reply; } // Check whether to generate output if (!empty($check) and $check == 'yes' or $check == 'true') { $show_cmt = parse_comments($file, $show_cmt, 'yes'); } // Count comment if (preg_match('/-/', basename($file, '.xml'))) { $thread_parts = explode('-', basename($file)); $thread = $dir . '/' . basename($file, '-' . end($thread_parts)) . '.xml'; $subfile_count["{$thread}"] = isset($subfile_count["{$thread}"]) ? $subfile_count["{$thread}"] + 1 : 1; } $subfile_count["{$file}"]++; // Count comment } }
"> <i class="icon-plus"></i> <b><?php echo $variant['name']; ?> </b><?php echo new_variant_notice($variant['is_new']); ?> </a> </div> <div id="variant-changes-<?php echo $variant['id']; ?> " class="accordion-body collapse"> <div class="accordion-inner"> <?php echo deletion_notice($variant['id']); ?> <!-- Table of changes (only display if changes exist) --> <table class="variant-changes-table table table-striped table-bordered table-condensed <?php echo hidden(empty($variant['changes'])); ?> "> <thead> <tr> <th>Field</th> <th>Current value</th> <th>Unreleased value</th> </tr> </thead> <tbody data-provides="rowlink"> <?php
<?php echo deletion_notice($variation->id); echo undesired_comments_notice($variation->id); echo unreleased_changes_notice($variation->id); ?> <div id="edit-header-wrapper"> <div id="alter-fields"> <a id="expand-all" class="rounded rowlink" href="#"><i class="icon-plus icon-white"></i> Expand all tabs</a> <?php echo unlock_all_fields_button(); ?> </div> <div id="edit-variant-header"> <h2><?php echo $variation->hgvs_protein_change; ?> </h2> <h4><?php echo $variation->gene; ?> </h4> <h4><?php echo $variation->hgvs_nucleotide_change; ?> </h4> </div> </div> <?php $attributes = array('class' => 'form-edit-variation rounded', 'onkeypress' => 'return event.keyCode != 13'); echo form_open('variations/edit/' . $id, $attributes);