public function __construct($page = false, $title = false)
 {
     parent::__construct();
     $default_title = awpcp_admin_page_title(__('Place Ad', 'AWPCP'), __('Manage Listings', 'AWPCP'));
     $this->page = $page ? $page : 'awpcp-admin-listings-place-ad';
     $this->title = $title ? $title : $default_title;
 }
 public function __construct($page = false, $title = false)
 {
     $page = $page ? $page : 'awpcp-admin-listings';
     $title = $title ? $title : awpcp_admin_page_title(__('Manage Listings', 'AWPCP'));
     parent::__construct($page, $title, __('Listings', 'AWPCP'));
     $this->table = null;
     add_action('wp_ajax_awpcp-listings-delete-ad', array($this, 'ajax'));
 }
Example #3
0
 public function __construct()
 {
     $page = 'awpcp-admin-fees';
     $title = awpcp_admin_page_title(__('Manage Listing Fees', 'AWPCP'));
     parent::__construct($page, $title, __('Fees', 'AWPCP'));
     add_action('wp_ajax_awpcp-fees-add', array($this, 'ajax'));
     add_action('wp_ajax_awpcp-fees-edit', array($this, 'ajax'));
     add_action('wp_ajax_awpcp-fees-delete', array($this, 'ajax'));
 }
 public function __construct()
 {
     $page = 'awpcp-admin-credit-plans';
     $title = awpcp_admin_page_title(__('Manage Credit Plans', 'AWPCP'));
     $menu = __('Credit Plans', 'AWPCP');
     parent::__construct($page, $title, $menu);
     $this->table = null;
     add_action('wp_ajax_awpcp-credit-plans-add', array($this, 'ajax'));
     add_action('wp_ajax_awpcp-credit-plans-edit', array($this, 'ajax'));
     add_action('wp_ajax_awpcp-credit-plans-delete', array($this, 'ajax'));
 }
 public function __construct($page = false, $title = false, $menu = false)
 {
     $page = $page ? $page : 'awpcp-admin-upgrade';
     $title = $title ? $title : awpcp_admin_page_title(_x('Manual Upgrade', 'awpcp admin menu', 'AWPCP'));
     parent::__construct($page, $title, $menu);
     $this->upgrades = array('awpcp-import-payment-transactions' => array('name' => 'Import Payment Transactions'), 'awpcp-migrate-regions-information' => array('name' => 'Migrate Regions Information'), 'awpcp-migrate-media-information' => array('name' => 'Migrate Media Information'), 'awpcp-update-media-status' => array('name' => 'Update Image/Attachments Status'));
     add_action('wp_ajax_awpcp-import-payment-transactions', array($this, 'ajax_import_payment_transactions'));
     add_action('wp_ajax_awpcp-migrate-regions-information', array($this, 'ajax_migrate_regions_information'));
     add_action('wp_ajax_awpcp-migrate-media-information', array($this, 'ajax_migrate_media_information'));
     add_action('wp_ajax_awpcp-update-media-status', array($this, 'ajax_update_media_status'));
 }
<?php

$page_id = 'awpcp-admin-settings';
$page_class = "{$page_id} awpcp-{$group->slug}";
$page_title = awpcp_admin_page_title(sprintf(__('%s Settings', 'AWPCP'), $group->name));
?>

<?php 
include AWPCP_DIR . '/admin/templates/admin-panel-header.tpl.php';
?>

			<?php 
awpcp_print_messages();
?>

			<h2 class="nav-tab-wrapper">
			<?php 
foreach ($groups as $g) {
    ?>
				<?php 
    $href = add_query_arg(array('g' => $g->slug), awpcp_current_url());
    ?>
				<?php 
    $active = $group->slug == $g->slug ? 'nav-tab nav-tab-active' : 'nav-tab';
    ?>
				<a href="<?php 
    echo esc_url($href);
    ?>
" class="<?php 
    echo esc_attr($active);
    ?>
Example #7
0
 public function AWPCP_AdminHome()
 {
     parent::__construct('awpcp.php', awpcp_admin_page_title(), __('Classifieds', 'AWPCP'));
 }
    function awpcp_extra_fields_admin_head($show_settings = false)
    {
        global $awpcp;
        $output = '';
        $output .= "<div class=\"wrap\"><div id=\"icon-edit-pages\" class=\"icon32\"><br></div>";
        $output .= "<h2>";
        $output .= awpcp_admin_page_title(__('Extra Fields', 'awpcp-extra-fields'));
        $output .= "</h2>";
        $output .= "<div id=\"dashboard-widgets-wrap\">";
        // TODO: move this to a template when Extra Fields becomes a plugin
        if ($show_settings) {
            ob_start();
            ?>
        <div class="metabox-holder" style="float: left; width: 77%;">
        <div class="postbox">
            <h3 class="hndle"><span><?php 
            _e('Extra Field Settings', 'awpcp-extra-fields');
            ?>
</span></h3>
            <div class="inside">
            <form action="<?php 
            echo admin_url('options.php');
            ?>
" method="post">
            	<table class="form-table">
            	<?php 
            do_settings_fields('general-settings', 'extra-fields-settings');
            ?>
            	</table>
				<?php 
            settings_fields($awpcp->settings->setting_name);
            ?>
				<input type="hidden" name="group" value="<?php 
            echo 'general-settings';
            ?>
" />

				<p class="submit">
					<input type="submit" value="<?php 
            _e('Save Changes', 'awpcp-extra-fields');
            ?>
" class="button-primary" id="submit" name="submit">
				</p>
            </form>
            </div>
        </div>
        </div>
<?php 
            $output .= ob_get_contents();
            ob_end_clean();
        }
        $sidebar = awpcp_admin_sidebar();
        $output .= $sidebar;
        if (empty($sidebar)) {
            $output .= '<div class="postbox" style="padding:5px">';
        } else {
            $output .= '<div class="postbox" style="padding:5px; width:76%; float:left">';
        }
        $output .= '<div class="inside">';
        return $output;
    }
 public function show_images($ad)
 {
     $title = awpcp_admin_page_title(__('Manage Images', 'AWPCP'));
     $this->page->title = apply_filters('awpcp-media-manager-page-title', $title);
     $this->page->page = 'awpcp-admin-images';
     $urls = array('endpoint' => $this->page->url(array('action' => 'manage-images')), 'view-listing' => $this->page->url(array('action' => 'view', 'id' => $ad->ad_id)), 'listings' => $this->page->url(array('id' => null)));
     $hidden = array('adid' => $ad->ad_id);
     $groups = $this->get_files($ad);
     $actions = array('approvepic' => _x('Enable', 'media manager', 'AWPCP'), 'rejectpic' => _x('Disable', 'media manager', 'AWPCP'), 'deletepic' => _x('Delete', 'media manager', 'AWPCP'), 'approve-file' => _x('Approve', 'media manager', 'AWPCP'), 'reject-file' => _x('Reject', 'media manager', 'AWPCP'), 'set-primary-image' => _x('Set as primary', 'media manager', 'AWPCP'));
     if (!awpcp_current_user_is_admin() && get_awpcp_option('imagesapprove')) {
         unset($actions['approve-file']);
         unset($actions['reject-file']);
     }
     ob_start();
     include AWPCP_DIR . '/admin/templates/admin-panel-media-manager.tpl.php';
     $content = ob_get_contents();
     ob_end_clean();
     return $this->page->render('content', $content);
 }
<?php

if (!$download) {
    ?>
	<?php 
    $page_id = 'awpcp-admin-debug';
    ?>
	<?php 
    $page_title = awpcp_admin_page_title(__('Debug', 'AWPCP'));
    ?>

	<?php 
    include AWPCP_DIR . '/admin/templates/admin-panel-header.tpl.php';
}
?>

		<?php 
$msg = _x('This information can help AWPCP Developers to debug possible problems. If you are submitting a bug report please <strong><a href="%s">Download the Debug Information</a></strong> and attach it to your bug report or take a minute to copy the information below to <a href="http://fpaste.org" target="_blank">http://fpaste.org</a> and provide the resulting URL in your report.', 'debug page', 'AWPCP');
?>
		<p><?php 
echo sprintf($msg, esc_url(add_query_arg('download', 'debug page', awpcp_current_url())));
?>
</p>

		<?php 
$title_pages = _x('AWPCP Pages', 'debug page', 'AWPCP');
?>
		<?php 
$title_php_info = _x('PHP Info', 'debug page', 'AWPCP');
?>
		<?php 
<?php

$page_id = 'awpcp-admin-csv-importer';
$page_title = awpcp_admin_page_title(__('Import Listings', 'AWPCP'));
?>

<?php 
include AWPCP_DIR . '/admin/templates/admin-panel-header.tpl.php';
?>

<?php 
if (!is_null($importer) && ($importer->ads_imported > 0 || $importer->ads_rejected > 0)) {
    ?>
	<?php 
    if ($test_import) {
        ?>
			<h3><?php 
        echo esc_html(__('Import Testing Results', 'AWPCP'));
        ?>
</h3>
	<?php 
    } else {
        ?>
			<h3><?php 
        echo esc_html(__('Final Import Results', 'AWPCP'));
        ?>
</h3>
	<?php 
    }
    ?>
function awpcp_form_fields_admin_page()
{
    return new AWPCP_FormFieldsAdminPage('awpcp-form-fields', awpcp_admin_page_title(__('Form Fields', 'AWPCP')), awpcp_form_fields(), awpcp_form_fields_table_factory());
}
Example #13
0
 public function menu()
 {
     global $submenu;
     global $hasregionsmodule;
     global $hasextrafieldsmodule;
     $capability = awpcp_admin_capability();
     if (get_option('awpcp-pending-manual-upgrade')) {
         $parts = array($this->upgrade->title, $this->upgrade->menu, $this->upgrade->page);
         $page = add_menu_page($parts[0], $parts[1], $capability, $parts[2], array($this->upgrade, 'dispatch'), MENUICO);
     } else {
         $parent = $this->home->page;
         $parts = array($this->home->title, $this->home->menu, $this->home->page);
         $page = add_menu_page($parts[0], $parts[1], $capability, $parts[2], array($this->home, 'dispatch'), MENUICO);
         // add hidden upgrade page, so the URL works even if there are no
         // pending manual upgrades please note that this is a hack and
         // it is important to use a subpage as parent page for it to work
         $parts = array($this->title, $this->menu, $this->upgrade->page);
         $page = add_submenu_page('awpcp-admin-uninstall', $parts[0], $parts[1], $capability, $parts[2], array($this->home, 'dispatch'), MENUICO);
         $page = add_submenu_page($parent, awpcp_admin_page_title(__('Settings', 'AWPCP')), __('Settings', 'AWPCP'), $capability, 'awpcp-admin-settings', array($this->settings, 'dispatch'));
         add_action('admin_print_styles-' . $page, array($this->settings, 'scripts'));
         $parts = array($this->credit_plans->title, $this->credit_plans->menu, $this->credit_plans->page);
         $page = add_submenu_page($parent, $parts[0], $parts[1], $capability, $parts[2], array($this->credit_plans, 'dispatch'));
         add_action('admin_print_styles-' . $page, array($this->credit_plans, 'scripts'));
         if (current_user_can($capability)) {
             $url = $this->get_manage_credits_section_url();
             $submenu['awpcp.php'][] = array(__('Manage Credit', 'AWPCP'), $capability, $url);
         }
         $parts = array($this->fees->title, $this->fees->menu, $this->fees->page);
         $page = add_submenu_page($parent, $parts[0], $parts[1], $capability, $parts[2], array($this->fees, 'dispatch'));
         add_action('admin_print_styles-' . $page, array($this->fees, 'scripts'));
         add_submenu_page($parent, awpcp_admin_page_title(__('Manage Categories', 'AWPCP')), __('Categories', 'AWPCP'), $capability, 'awpcp-admin-categories', 'awpcp_opsconfig_categories');
         $page = add_submenu_page($parent, $this->listings->title, $this->listings->menu, 'manage_classifieds_listings', 'awpcp-listings', array($this->listings, 'dispatch'));
         add_action('admin_print_styles-' . $page, array($this->listings, 'scripts'));
         $this->form_fields = awpcp_form_fields_admin_page();
         $parts = array($this->form_fields->title, $this->form_fields->menu, $this->form_fields->page);
         $page = add_submenu_page($parent, $parts[0], $parts[1], $capability, 'awpcp-form-fields', array($this->form_fields, 'dispatch'));
         add_action('admin_print_styles-' . $page, array($this->form_fields, 'scripts'));
         // allow plugins to define additional sub menu entries
         do_action('awpcp_admin_add_submenu_page', $parent, $capability);
         if ($hasextrafieldsmodule) {
             add_submenu_page($parent, __('Manage Extra Fields', 'AWPCP'), __('Extra Fields', 'AWPCP'), $capability, 'Configure5', 'awpcp_add_new_field');
         }
         $hook = add_submenu_page($parent, __('Import Ad', 'AWPCP'), __('Import', 'AWPCP'), $capability, 'awpcp-import', array($this->importer, 'dispatch'));
         add_action("load-{$hook}", array($this->importer, 'scripts'));
         add_submenu_page($parent, 'Debug', 'Debug', $capability, 'awpcp-debug', array($this->debug, 'dispatch'));
         $parts = array($this->uninstall->title, $this->uninstall->menu, $this->uninstall->page);
         add_submenu_page($parent, $parts[0], $parts[1], $capability, $parts[2], array($this->uninstall, 'dispatch'));
         // allow plugins to define additional menu entries
         do_action('awpcp_add_menu_page');
     }
 }
 public function AWPCP_Admin_Uninstall()
 {
     parent::__construct('awpcp-admin-uninstall', awpcp_admin_page_title(__('Uninstall', 'AWPCP')), __('Uninstall', 'AWPCP'));
 }