예제 #1
0
function wprp_right_now_table_end()
{
    global $wpdb, $wprp;
    if ($wprp == NULL) {
        $wprp = new ReportPost($wpdb);
        $wprp->findReports('ORDER BY id DESC', 1, 'WHERE status=1');
    }
    $class = $wprp->totalRows > 0 ? "class='wprp_wdg'" : '';
    echo "<tr>";
    echo "<td {$class}> {$wprp->totalRows}</td>";
    echo "<td colspan=3 {$class}>New Reports</td>";
    echo "</tr>";
}
예제 #2
0
                if (!$wprp->delete($archive)) {
                    echo "ERROR: " . $wprp->last_error;
                    break;
                    // EXIT LOOP
                }
            }
        }
    }
    // IF selected
}
// Calculate Paggination
$p = (int) isset($_GET['p']) && is_numeric($_GET['p']) ? $_GET['p'] : 1;
$limit = 20;
$offset = $limit * ($p - 1);
// Search Based on Paggination
$results = $wprp->findReports('ORDER BY id DESC', $limit, "WHERE status=1", $offset);
// Calculate Pages
$total_found = $wprp->totalRows;
$pages = ceil($total_found / $limit);
?>
<div class="wrap"> 
	<h2><?php 
_e('New Reports', 'pp-reportpost');
?>
</h2>
	
    <form action="" method="post">
    <div class="wprp-info">
    	<div class="wprp-buttons">
        	selected: <input type="button" value="Archive it" name="expandarchive" class="button-secondary delete" onclick="jQuery('#wprp-archive').slideToggle('slow');" /> or <input type="button" value="Delete it" name="delete-expand" class="button-secondary delete" onclick="jQuery('#delete-confirm').slideToggle('slow');" /> <small>(* will be removed permanently)</small>
        </div>
예제 #3
0
    define('WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
}
if (!defined('WP_PLUGIN_DIR')) {
    define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins');
}
if (!defined('WP_PLUGIN_URL')) {
    define('WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins');
}
/* Variables */
$type = $_GET['type'];
$id = $_GET['id'];
/* Load Reports Class*/
include_once 'ReportPost.class.php';
global $wpdb;
$wprp = new ReportPost($wpdb);
$report = $wprp->findReports('ORDER BY id DESC', 1, "WHERE id=" . $id);
if (count($report) <= 0) {
    die('Error! Unable to Load Details!');
}
$report = $report[0];
$permalink = get_bloginfo('wpurl') . "/wp-admin/post.php?action=edit&post=" . $report->postID;
//print_r($report);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Report Details</title>
<style type="text/css">
	html, body{
		background:#f8f8f8;