<?php

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

?>

<h2><?php echo($lang_my_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_release_date); ?></th>
<th><?php echo($lang_form_options); ?></th>
</tr>
<?php

$print=mysql_query("SELECT id, quick, title, section, added, published FROM kcms_articles WHERE author='".$_COOKIE["user_id"]."' ORDER by added DESC");
while (list($id, $quick, $title, $section, $added, $published) = mysql_fetch_row($print)) {

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

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>";
if ($published!=0) { echo (date("d.m.Y, H:i", $published)); } else { echo "$lang_form_not_published_yet"; }
echo "</td>
<td><input type=\"button\" value=\"$lang_button_edit\" onclick=\"parent.location='./admin.php?f=edit_article&amp;id=$id';\" /> <input type=\"button\" value=\"$lang_button_delete\" onclick=\"if (!confirm('$lang_alert_sure')) return false; parent.location='./admin.php?f=my_articles&amp;a=delete_article&amp;id=$id';\" /></td>
</tr>\n";

}

?>
</table>

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