示例#1
0
function ShowModifications(&$p, $db_table, $db_id)
{
    global $database;
    $m_mod = new Modification($database);
    $m_auth = new Auth($database);
    $mods = $m_mod->byTableID($db_table, $db_id);
    if (!false_or_null($mods)) {
        $data = array();
        foreach ($mods as $mod) {
            $user = $m_auth->Get($mod['r_Auth']);
            $what = '';
            $w = json_decode($mod['What'], true);
            foreach ($w as $dataset) {
                foreach ($dataset as $table => $change) {
                    $what .= $table . ' #' . $change['I'] . '\'s ' . $change['F'] . (isset($change['E']) ? ' » ' . $change['E'] : '');
                }
            }
            $data[] = array($user['username'], $what, $mod['Message'], human_datetime(intval($mod['Timestamp'])));
        }
        $table = new TableHelper(array('table' => "table wide", 'thead' => "tablehead", 'th' => "tablehead", 'td' => "tablecell", 'headings' => array('Who', 'What', ' ', 'When'), 'data' => $data));
        $p->HTML('<div class="formgroup">');
        $p->HTML('<h4>Recent Activity</h4>');
        $p->Table($table);
        $p->HTML('</div>');
    }
}
示例#2
0
文件: edit.log.php 项目: h3rb/page
            $datatemp[$user['username']] += 1;
        }
    }
    $datapoints = array();
    foreach ($datatemp as $username => $events) {
        $datapoints[] = array("value" => $events, "color" => "#FFAAAA", "highlight" => "5AD3D1", "label" => $username);
    }
    $chart = Pie($p, 400, 400, $datapoints);
    //  $p->CSS('.'.$chart.' { }');
    $data = array();
    foreach ($mods as $mod) {
        $user = $m_auth->Get($mod['r_Auth']);
        $what = '';
        $w = json_decode($mod['What'], true);
        foreach ($w as $dataset) {
            foreach ($dataset as $table => $change) {
                $what .= $table . ' <a class="bare" href="' . strtolower($table) . '.edit?ID=' . $change['I'] . '" title="Edit ' . $table . ' #' . $change['I'] . '">#' . $change['I'] . '</a>\'s ' . $change['F'] . (isset($change['E']) ? ' &raquo; ' . $change['E'] : '');
            }
        }
        $data[] = array($user['username'], $what, $mod['Message'], human_datetime(intval($mod['Timestamp'])));
    }
    $table = new TableHelper(array('table' => "table wide", 'thead' => "tablehead", 'th' => "tablehead", 'td' => "tablecell", 'headings' => array('Who', 'What', '&nbsp;', 'When'), 'data' => $data));
    $p->HTML('<h3>Activity Since ' . date('M-d-Y', strtotime("-6 months")) . '</h3>');
    $p->HTML('<div class="formboundary">');
    $p->Table($table);
    $p->HTML('</div>');
}
if (!$p->ajax) {
    $p->HTML('footer.html');
}
$p->Render();
示例#3
0
        echo $page['page_id'];
        ?>
">Edit</a> | <a href="<?php 
        echo base_url();
        ?>
dashboard/deletepage/<?php 
        echo $page['page_id'];
        ?>
" onclick='return confirm("Are you sure to Delete <?php 
        echo $page['page_title'];
        ?>
?")'>Delete</a>
                            </div>
                            </td>
                            <td><?php 
        echo human_datetime($page['page_date']);
        ?>
</td>
                            <td><?php 
        if ($page['page_status'] == "publish") {
            echo "Published";
        } elseif ($page['page_status'] == "pending") {
            echo "Pending Review";
        }
        if ($page['page_status'] == "draft") {
            echo "Draft";
        }
        ?>
</td>
                        </tr>
                        <?php 
示例#4
0
                    			<a href="<?php 
            echo base_url('dashboard/editcategory/' . $cat['category_id']);
            ?>
"><?php 
            echo $cat['category_name'];
            ?>
</a><?php 
            if ($i < count($post['categories']) - 1) {
                echo ',';
            }
            $i++;
        }
        ?>
                            </td>
                            <td><?php 
        echo human_datetime($post['post_date']);
        ?>
</td>
                            <td class="text-center"><?php 
        echo $post['comment_count'];
        ?>
</td>
                            <td><?php 
        if ($post['post_status'] == "publish") {
            echo "Published";
        } elseif ($post['post_status'] == "pending") {
            echo "Pending Review";
        }
        if ($post['post_status'] == "draft") {
            echo "Draft";
        }
示例#5
0
                    <tbody>
                    <?php 
if ($comments) {
    foreach ($comments as $comment) {
        ?>
                        <tr>
                            <td class="text-center"><input type="checkbox" class="select_all" name="" id=""></td>
                            <td><strong><?php 
        echo $comment['comment_author'];
        ?>
</strong>

                            </td>
                            <td>
                            Submitted on <?php 
        echo human_datetime($comment['comment_date']);
        ?>
                            <p><?php 
        echo $comment['comment_content'];
        ?>
</p>
                            <div class="row-actions">
                            <a href="<?php 
        echo base_url();
        ?>
dashboard/approvecomment/<?php 
        echo $comment['comment_id'];
        ?>
">Approve</a> | <a href="<?php 
        echo base_url();
        ?>