/** * Renders the admin page */ function thatcamp_menu_page() { $group_id = thatcamp_get_blog_group(get_current_blog_id()); $start_date = thatcamp_get_camp_date($group_id, 'mmddyy'); $end_date = thatcamp_get_camp_date($group_id, 'mmddyy', 'end'); $location = array('country' => thatcamp_get_location($group_id, 'country'), 'state' => thatcamp_get_location($group_id, 'state'), 'province' => thatcamp_get_location($group_id, 'province'), 'city' => thatcamp_get_location($group_id, 'city')); ?> <form method="post"> <div class="wrap"> <h2>THATCamp Setup</h2> <table class="form-table"> <tr> <th scope="row"> <label for="thatcamp_date">When will your THATCamp be held?</label> </th> <td> <input id="thatcamp_start_date" name="thatcamp_start_date" type="text" value="<?php echo esc_attr($start_date); ?> " /> <p class="description">Start Date (<small>one-day THATCamps need only a Start Date</small>)</p><br /> <input id="thatcamp_end_date" name="thatcamp_end_date" type="text" value="<?php echo esc_attr($end_date); ?> " /> <p class="description">End Date</p> </td> </tr> <tr> <th scope="row"> <label for="thatcamp_country">Where will your THATCamp be held?</label> </th> <td> <?php thatcamp_country_picker($location); ?> </td> </tr> <tr> <th scope="row"> <label for="thatcamp_organizers">Organizers</label> </th> <td> <ul id="organizer-list"> <?php $users = new WP_User_Query(array('blog_id' => get_current_blog_id())); ?> <?php foreach ($users->results as $user) { ?> <?php $is_organizer = get_user_meta($user->ID, 'wp_' . get_current_blog_id() . '_is_organizer', true); ?> <li><input name="thatcamp_organizers[]" value="<?php echo esc_attr($user->ID); ?> " <?php checked('yes', $is_organizer); ?> type="checkbox"> <?php echo bp_core_get_userlink($user->ID); ?> </li> <?php } ?> </ul> <p class="description">Select all users who should be labeled as 'organizers' of your THATCamp.</p> </td> </tr> </table> <br /><br /> <?php wp_nonce_field('thatcamp_setup'); ?> <input type="submit" class="button-primary" name="thatcamp_setup_submit" value="Save Changes" /> </div> </form> <?php }
" />.thatcamp.org </div> <div class="registry-section" id="section-location"> <h3>Location</h3> <?php $current_location = array(); foreach (array('Country', 'State', 'Province', 'City') as $lkey) { if (isset($_POST[$lkey])) { $current_location[strtolower($lkey)] = $_POST[$lkey]; } } ?> <?php thatcamp_country_picker($current_location); ?> </div> <div class="registry-section" id="section-start-date"> <h3>Start date</h3> <p>If known, the start date for your THATCamp. One-day THATCamps need only a start date.</p> <?php $thatcamp_start_date = isset($_POST['thatcamp-start-date']) ? $_POST['thatcamp-start-date'] : ''; ?> <input id="thatcamp_start_date" name="thatcamp-start-date" type="text" value="<?php echo esc_attr($thatcamp_start_date); ?> " /> </div>