Ejemplo n.º 1
0
function fitnesslog_widget_graphs($args)
{
    // Get the arguments passed to the widget.
    extract($args);
    echo $before_widget;
    echo $before_title;
    echo 'Weekly Volume';
    get_weekly_volume_graph();
    echo '<img src="';
    echo get_bloginfo('url');
    echo '/wp-content/plugins/fitnesslog/graphs/wklygraph.png">';
    echo $after_title;
    echo $after_widget;
}
Ejemplo n.º 2
0
    $Month->build();
    //Popluate the user's dashboard page
    $template->setCurrentBlock("NAVIGATION");
    $template->setVariable("DATE", $date->format("%A %b %e, %Y"));
    $template->setVariable("GREETING", setupGreeting());
    $displayName = getUserFirstName($connection, $userID);
    if (!$displayName) {
        $displayName = $_SESSION["loggedinUserName"];
    }
    $template->setVariable("USER", $displayName . "!");
    $template->parseCurrentBlock();
    // Setup and load the quickentry calendar for actual workout data entry.
    $template->setCurrentBlock("WEEKLY");
    loadQuickEntry($template, $Month, $connection);
    // Setup the weekly graphs for actual and planned workout volumes.
    get_weekly_volume_graph($userID, $connection);
    // Setup current month, current year and prior year volume/dist blocks
    get_current_month($template, $userID, $connection);
    get_current_year($template, $userID, $connection);
    get_prior_month($template, $userID, $connection);
    get_prior_year($template, $userID, $connection);
} else {
    //Seems the user has attempted to navigate directly to the dashboard without
    //logging in. Send them to the logout page with an error message.
    $_SESSION["headerMessage"] = "Error!!";
    $_SESSION["message"] = "You must first log into the system before you can view the page.";
    // Send user to the logout page.
    header("Location: logout.php");
    exit;
}
//Show the user's Dashboard page.