Example #1
0
function bracket_add_tournament_8p()
{
    $tournament_name_id = 0;
    if ($_GET['id']) {
        $tournament_name_id = $_GET['id'];
    }
    /**Get an specific row from the table wp_bracket_8player**/
    global $edit_tournament_name;
    if ($tournament_name_id) {
        $edit_tournament_name = bracket_get_tournament_namerow($tournament_name_id);
    }
    /**create meta box**/
    add_meta_box('bracket-meta', __('Tournament Information'), 'bracket_8player_meta_box', 'bracket', 'normal', 'core');
    ?>

    <!--Display the form to add a new row-->
    <div class="wrap">
      <div id="faq-wrapper">
        <form method="post" action="?page=bracket-plugin-8p&amp;id=<?php 
    echo $tournament_name_id;
    ?>
&amp;edit=true">
          <h2>
          <?php 
    if ($tournament_name_id == 0) {
        $tf_title = __('Add Tournament');
    } else {
        $tf_title = __('Update Tournament');
    }
    echo $tf_title;
    ?>
          </h2>
          <div id="poststuff" class="metabox-holder">
            <?php 
    do_meta_boxes('bracket', 'normal', 'low');
    ?>
          </div>
          <input type="hidden" name="bracket_8player_id" value="<?php 
    echo $tournament_name_id;
    ?>
" />
          <input type="submit" value="<?php 
    echo $tf_title;
    ?>
" name="bracket_add_tournament_8p" id="bracket_add_tournament_8p" class="button-secondary">
        </form>
      </div>
    </div>
<?php 
}
Example #2
0
function showbracket_home($barckId)
{
    require_once 'bracket_8p.php';
    bracket_get_tournament_namerow(2);
}