Ejemplo n.º 1
0
" />
<input type="hidden" id="referredby" name="referredby" value="<?php 
echo esc_url(stripslashes(nxt_get_referer()));
?>
" />
<?php 
if (!empty($active_post_lock)) {
    ?>
<input type="hidden" id="active_post_lock" value="<?php 
    echo esc_attr(implode(':', $active_post_lock));
    ?>
" />
<?php 
}
if ('draft' != $post->post_status) {
    nxt_original_referer_field(true, 'previous');
}
echo $form_extra;
nxt_nonce_field('autosave', 'autosavenonce', false);
nxt_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
nxt_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
?>

<div id="poststuff" class="metabox-holder<?php 
echo 1 != $screen_layout_columns ? ' has-right-sidebar' : '';
?>
">
<div id="side-info-column" class="inner-sidebar">
<?php 
if (1 != $screen_layout_columns) {
    'page' == $post_type ? do_action('submitpage_box') : do_action('submitpost_box');
Ejemplo n.º 2
0
        function handle_pings_panel()
        {
            global $action, $page, $pings;
            nxt_reset_vars(array('action', 'page'));
            switch (addslashes($action)) {
                case 'edit':
                    if (!empty($_GET['ping'])) {
                        // Make a communication
                        $this->show_ping_edit((int) $_GET['ping']);
                    } else {
                        $this->show_ping_edit(false);
                    }
                    return;
                    // so we don't show the list below
                    break;
                case 'history':
                    if (!empty($_GET['ping'])) {
                        $this->handle_ping_history_panel((int) $_GET['ping']);
                    }
                    return;
                    break;
            }
            $messages = array();
            $messages[1] = __('Ping details updated.', 'membership');
            $messages[2] = __('Ping details not updated.', 'membership');
            $messages[3] = __('Ping details added.', 'membership');
            $messages[4] = __('Ping details not added.', 'membership');
            $messages[5] = __('Ping details deleted.', 'membership');
            $messages[6] = __('Ping details not deleted.', 'membership');
            $messages[7] = __('Ping details deleted.', 'membership');
            ?>
			<div class='wrap'>
				<div class="icon32" id="icon-link-manager"><br></div>
				<h2><?php 
            _e('Edit Pings', 'membership');
            ?>
</h2>

				<?php 
            if (isset($_GET['msg'])) {
                echo '<div id="message" class="updated fade"><p>' . $messages[(int) $_GET['msg']] . '</p></div>';
                $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
            }
            //$pings = $this->get_pings();
            $pings = apply_filters('M_pings_list', $pings);
            ?>

				<form method="get" action="?page=<?php 
            echo esc_attr($page);
            ?>
" id="posts-filter">

				<input type='hidden' name='page' value='<?php 
            echo esc_attr($page);
            ?>
' />

				<div class="tablenav">

				<div class="alignleft actions">
				<select name="action">
				<option selected="selected" value=""><?php 
            _e('Bulk Actions');
            ?>
</option>
				<option value="delete"><?php 
            _e('Delete');
            ?>
</option>
				</select>
				<input type="submit" class="button-secondary action" id="doaction" name="doaction" value="<?php 
            _e('Apply');
            ?>
">

				</div>

				<?php 
            if (M_can_add_pings()) {
                ?>
				<div class="alignright actions">
					<input type="button" class="button-secondary addnenxtingbutton" value="<?php 
                _e('Add New');
                ?>
" name="addnewgroup">
				</div>
				<?php 
            }
            ?>

				<br class="clear">
				</div>

				<div class="clear"></div>

				<?php 
            nxt_original_referer_field(true, 'previous');
            nxt_nonce_field('bulk-pings');
            $columns = array("name" => __('Ping Name', 'membership'));
            $columns = apply_filters('membership_pingscolumns', $columns);
            ?>

				<table cellspacing="0" class="widefat fixed">
					<thead>
					<tr>
					<th style="" class="manage-column column-cb check-column" id="cb" scope="col"><input type="checkbox"></th>
					<?php 
            foreach ($columns as $key => $col) {
                ?>
							<th style="" class="manage-column column-<?php 
                echo $key;
                ?>
" id="<?php 
                echo $key;
                ?>
" scope="col"><?php 
                echo $col;
                ?>
</th>
							<?php 
            }
            ?>
					</tr>
					</thead>

					<tfoot>
					<tr>
					<th style="" class="manage-column column-cb check-column" scope="col"><input type="checkbox"></th>
					<?php 
            reset($columns);
            foreach ($columns as $key => $col) {
                ?>
							<th style="" class="manage-column column-<?php 
                echo $key;
                ?>
" id="<?php 
                echo $key;
                ?>
" scope="col"><?php 
                echo $col;
                ?>
</th>
							<?php 
            }
            ?>
					</tr>
					</tfoot>

					<tbody>
						<?php 
            if (!empty($pings)) {
                foreach ($pings as $key => $ping) {
                    ?>
								<tr valign="middle" class="alternate" id="ping-<?php 
                    echo $ping->id;
                    ?>
">
									<th class="check-column" scope="row"><input type="checkbox" value="<?php 
                    echo esc_attr($ping->id);
                    ?>
" name="pingcheck[]"></th>
									<td class="column-name">
										<strong><a title="Edit <?php 
                    echo esc_attr(stripslashes($ping->pingname));
                    ?>
" href="?page=<?php 
                    echo $page;
                    ?>
&amp;action=edit&amp;ping=<?php 
                    echo $ping->id;
                    ?>
" class="row-title"><?php 
                    echo esc_html(stripslashes($ping->pingname));
                    ?>
</a></strong>
										<?php 
                    $actions = array();
                    $actions['edit'] = "<span class='edit'><a href='?page=" . $page . "&amp;action=edit&amp;ping=" . $ping->id . "'>" . __('Edit') . "</a></span>";
                    $actions['trans'] = "<span class='edit'><a href='?page=" . $page . "&amp;action=history&amp;ping=" . $ping->id . "'>" . __('History') . "</a></span>";
                    $actions['delete'] = "<span class='delete'><a href='" . nxt_nonce_url("?page=" . $page . "&amp;action=delete&amp;ping=" . $ping->id . "", 'delete-ping_' . $ping->id) . "'>" . __('Delete', 'membership') . "</a></span>";
                    ?>
										<br><div class="row-actions"><?php 
                    echo implode(" | ", $actions);
                    ?>
</div>
										</td>
							    </tr>
								<?php 
                }
            } else {
                $columncount = count($columns) + 1;
                ?>
							<tr valign="middle" class="alternate" >
								<td colspan="<?php 
                echo $columncount;
                ?>
" scope="row"><?php 
                _e('No Pings have been set up.', 'membership');
                ?>
</td>
						    </tr>
							<?php 
            }
            ?>

					</tbody>
				</table>

				<div class="tablenav">

				<div class="alignleft actions">
				<select name="action2">
					<option selected="selected" value=""><?php 
            _e('Bulk Actions');
            ?>
</option>
					<option value="delete"><?php 
            _e('Delete');
            ?>
</option>
				</select>
				<input type="submit" class="button-secondary action" id="doaction2" name="doaction2" value="Apply">
				</div>
				<?php 
            if (M_can_add_pings()) {
                ?>
				<div class="alignright actions">
					<input type="button" class="button-secondary addnenxtingbutton" value="<?php 
                _e('Add New');
                ?>
" name="addnewgroup2">
				</div>
				<?php 
            }
            ?>
				<br class="clear">
				</div>

				</form>

			</div> <!-- wrap -->
			<?php 
        }