Exemple #1
0
<?php

authorize();
if (!check_perms('users_mod')) {
    error(403);
}
if ($_POST['submit']) {
    SiteHistory::update_event($_POST['id'], $_POST['date'], $_POST['title'], $_POST['url'], $_POST['category'], $_POST['sub_category'], $_POST['tags'], $_POST['body'], $LoggedUser['ID']);
} elseif ($_POST['delete']) {
    SiteHistory::delete_event($_POST['id']);
}
header("Location: sitehistory.php");
Exemple #2
0
<?php

if (!check_perms('users_mod')) {
    error(403);
}
if (is_number($_GET['id'])) {
    $ID = $_GET['id'];
    $Event = SiteHistory::get_event($ID);
}
if ($ID) {
    $Title = "Edit";
} else {
    $Title = "Create";
}
View::show_header($Title, "jquery.validate,form_validate,site_history");
?>

<div class="header">
<?php 
if ($ID) {
    ?>
		<h2>Edit event</h2>
<?php 
} else {
    ?>
		<h2>Create new event</h2>
<?php 
}
?>
</div>
Exemple #3
0
    $Limit = null;
}
if (!empty($_GET['category'])) {
    $Category = $_GET['category'];
    $Limit = null;
}
if (!empty($_GET['subcategory'])) {
    $SubCategory = $_GET['subcategory'];
    $Limit = null;
}
if (!empty($_GET['tags'])) {
    $Tags = $_GET['tags'];
    $Limit = null;
}
$Events = SiteHistory::get_events($Month, $Year, $Title, $Category, $SubCategory, $Tags, $Limit);
$Months = SiteHistory::get_months();
View::show_header("Site History");
?>
<div class="header">
	<h2><a href="sitehistory.php">Site History</a> <?php 
echo $Month && $Year ? date("- F, Y", mktime(0, 0, 0, $Month, 1, $Year)) : '';
?>
</h2>
<?php 
SiteHistoryView::render_linkbox();
?>
</div>
<div class="sidebar">
<?php 
SiteHistoryView::render_search();
SiteHistoryView::render_months($Months);
    public static function render_recent_sidebar($Events)
    {
        ?>
		<div class="box">
			<div class="head colhead_dark">
				<strong><a href="sitehistory.php">Latest site history</a></strong>
			</div>
			<ul class="stats nobullet">
<?php 
        $Categories = SiteHistory::get_categories();
        foreach ($Events as $Event) {
            ?>
				<li>
					<a href="sitehistory.php?action=search&amp;category=<?php 
            echo $Event['Category'];
            ?>
" class="brackets"><?php 
            echo $Categories[$Event['Category']];
            ?>
</a>
<?php 
            if (!empty($Event['Url'])) {
                ?>
					<a href="<?php 
                echo $Event['Url'];
                ?>
"><?php 
                echo Format::cut_string($Event['Title'], 20);
                ?>
</a>
<?php 
            } else {
                ?>
					<?php 
                echo Format::cut_string($Event['Title'], 20);
            }
            ?>
				</li>
<?php 
        }
        ?>
			</ul>
		</div>
<?php 
    }
Exemple #5
0
<?php

authorize();
if (!check_perms('users_mod')) {
    error(403);
}
SiteHistory::add_event($_POST['date'], $_POST['title'], $_POST['url'], $_POST['category'], $_POST['sub_category'], $_POST['tags'], $_POST['body'], $LoggedUser['ID']);
header("Location: sitehistory.php");