'; echo "

" . __('Great Real Estate','greatrealestate') . "

"; # Show the status of the plugin # Number of listings by status # Whether all required associated plugins are installed and ready # Whether there is a page slugged "listings" echo '
'; echo '
'; gre_do_dashboard_summary(); echo '
'; echo '
'; gre_do_dashboard_docs(); gre_do_dashboard_plugins(); echo "
"; } function gre_do_dashboard_summary() { global $wpdb; ?>

gre_listings listings GROUP BY status "; $total = 0; $available = 0; $sold = 0; $contract = 0; $stats = $wpdb->get_results($querystr, OBJECT); if ($stats) { foreach ($stats as $row => $data) { if (in_array($data->status, array( RE_FORSALE, RE_FORRENT ))) $available += $data->number; if (in_array($data->status, array( RE_SOLD, RE_RENTED ))) $sold += $data->number; if (in_array($data->status, array( RE_PENDINGSALE, RE_PENDINGLEASE ))) $contract += $data->number; if (in_array($data->status, array( RE_FORSALE, RE_FORRENT, RE_SOLD, RE_RENTED, RE_PENDINGSALE, RE_PENDINGLEASE ))) $total += $data->number; } } printf(__('You have %d listings: %d available, %d under contract, and %d sold','greatrealestate'),$total,$available,$contract,$sold); ?>
$pagetitle"; } else { $message = __('Unknown - please check your settings','greatrealestate'); } } else { $message = __('WARNING - You must select a main Listings page','greatrealestate'); } echo $message; } function gre_do_dashboard_plugins() { ?>

See All

'; } function gre_is_plugin_there($plugin_dir) { $plugins = get_plugins($plugin_dir); if ($plugins) return true; return false; } function gre_do_dashboard_docs() { ?>