Lighttpd conf file added for lighttpd webservers
[atbbs.git] / content_management.php
blob506addf9f86ab992b55119551d227c2bac20c574
1 <?php
3 require('includes/header.php');
5 if( ! $administrator)
7 add_error('You are not wise enough.', true);
10 $page_title = 'Content management';
13 <p>This feature can be used to edit and create non-dynamic pages.</p>
15 <?php
16 $table = new table();
17 $columns = array
19 'Path',
20 'Title',
21 'Content snippet',
22 'Edit',
23 'Delete'
25 $table->define_columns($columns, 'Content snippet');
26 $table->add_td_class('Content snippet', 'snippet');
28 $result = $link->query('SELECT id, url, page_title, content FROM pages');
30 while( $row = $result->fetch_assoc() )
32 $values = array
34 '<a href="/' . $row['url'] . '">' . $row['url'] . '</a>',
35 $row['page_title'],
36 snippet($row['content']),
37 '<a href="/edit_page/' . $row['id'] . '">&#9998;</a>',
38 '<a href="/delete_page/' . $row['id'] . '">&#10008;</a>'
41 $table->row($values);
43 $result->close();
44 echo $table->output('pages');
48 <ul class="menu">
49 <li><a href="/new_page">New page</a></li>
50 </ul>
52 <?php
54 require('includes/footer.php');