Вход Регистрация
Файл: modules/guestbook/admin.php
Строк: 46
<?php
    
if ($Siteman->userinfo["level"] >= 4) {
    
        switch (
$mdo) {
            
            default:
            if (isset(
$_GET["offset"])) {
                
$offset $_GET["offset"];
            }
            else {
                
$offset 0;
            }
            
$postcount $db->table_count("guestbook","siteman");
            
$start $postcount-($offset+10);
            if (
$start 0) {
                
$start 0;
            }
            
$end $postcount-($offset+1);
            
$posts $db->select(array("table" => "guestbook","db" => "siteman","limit" => array($start,$end),"orderby" => array("id",DESC)));
            
$pages ceil($postcount/10);
            
$page = ($offset/10)+1;
            echo
"<table cellspacing="0" cellpadding="1"><tr><td>:: </td>";
            for (
$i=1;$i<=$pages;$i++) {
                if (
$i == $page) {
                    echo
"<td><b>$i</b></td>";
                }
                else {
                    
$nowoffset = ($i-1)*10;
                    echo
"<td><a href="admin.php?module=guestbook&amp;offset=".$nowoffset."">$i</a></td>";
                }
                echo
"<td> :: </td>";
            }
            echo
"</tr></table><br /><br />
            <table width="
100%" cellspacing="0" cellpadding="2">";
            foreach (
$posts as $post) {
                echo
"<tr><td>IP: ".$post["ip"]." - <a href="admin.php?module=guestbook&amp;mdo=delete&amp;id=".$post["id"]."&amp;offset=".$offset."">Delete</a></td></tr>
                <tr><td><table cellspacing="
0" cellpadding="3" width="100%">
                <tr><td width="
23%" class="dark" align="center" valign="top" rowspan="2">Name: ".$post["name"]."<br />
                Location: "
.$post["location"]."<br />
                email: "
.$post["email"]."<br />
                <a href="".
$post["website"]."" target="_blank">Website</a></td><td width="77%" align="right" height="1%" valign="top">Message posted ".date($Siteman->settings["long_dateformat"],$post["date"]+$Siteman->settings["timezone_offset"])."</td></tr><tr><td width="77%" valign="top" height="99%">".str_replace("n","<br />",$post["text"])."</td></tr></table></td></tr>";
                echo
"<tr><td>&nbsp;</td></tr>";
            }
            echo
"</table><br /><br /><table cellspacing="0" cellpadding="1"><tr><td>:: </td>";
            for (
$i=1;$i<=$pages;$i++) {
                if (
$i == $page) {
                    echo
"<td><b>$i</b></td>";
                }
                else {
                    
$nowoffset = ($i-1)*10;
                    echo
"<td><a href="admin.php?module=guestbook&amp;offset=".$nowoffset."">$i</a></td>";
                }
                echo
"<td> :: </td>";
            }
            echo
"</tr></table>";
            break 
1;
        }
    }
?>
Онлайн: 0
Реклама