<?php

// tady můžete nastavit práva (1 - 3)
// here you can set the rights (1 - 3)
if ($rights>=2):

if ($a=="confirm" AND $id!="") {
$sql=mysql_query("UPDATE kcms_articles SET confirmed='1' WHERE id='".addslashes($id)."'", $dbserver);
}

?>

<h2><?php echo($lang_confirm_articles); ?></h2>

<table>
<tr>
<th><?php echo($lang_form_article_title); ?></th>
<th><?php echo($lang_form_section); ?></th>
<th><?php echo($lang_form_create_date); ?></th>
<th><?php echo($lang_form_author); ?></th>
<th><?php echo($lang_form_options); ?></th>
</tr>
<?php
$print=mysql_query("SELECT id, quick, title, section, added, author FROM kcms_articles WHERE confirmed='0' ORDER by id DESC");
while (list($id, $quick, $title, $section, $added, $author) = mysql_fetch_row($print)) {

$section=mysql_query("SELECT name, quick FROM kcms_sections WHERE id='$section'");
$section=mysql_fetch_array($section);

$author=mysql_query("SELECT login, realname FROM kcms_users WHERE id='$author'");
$author=mysql_fetch_array($author);

echo "<tr>
<td><a href=\"/".$section["quick"]."/$quick/\">".stripslashes($title)."</a></td>
<td>".$section["name"]."</td>
<td>".date("d.m.Y, H:i", $added)."</td>
<td><a href=\"/profiles/".$author["login"]."/\">".$author["realname"]."</a></td>
<td><input type=\"button\" value=\"$lang_button_confirmed\" onclick=\"parent.location='./admin.php?f=confirm_articles&amp;a=confirm&amp;id=$id';\" /> <input type=\"button\" value=\"$lang_button_edit\" onclick=\"parent.location='./admin.php?f=edit_article&amp;id=$id';\" /></td>
</tr>\n";

}
?>
</table>

<?php else: $access_denied=1; endif; ?>