sibtracker/system/forum/sources/components/edit_options.php
2019-05-18 13:46:03 +08:00

104 lines
3.0 KiB
PHP

<?php
if(!defined('DATALIFEENGINE'))
{
die("Hacking attempt!");
}
if ($check_moderator)
{
if (moderator_value('edit_topic', $forum_id, $m_member))
{
$topic_option .= "<option value=\"04\"> - Ðåäàêòèðîâàòü çàãîëîâîê</option>";
}
if (moderator_value('move_topic', $forum_id, $m_member))
{
$topic_option .= "<option value=\"05\"> - Ïåðåìåñòèòü òåìó</option>";
}
if (moderator_value('close_topic', $forum_id, $m_member) and !$row_topic['topic_status'])
{
$topic_option .= "<option value=\"02\"> - Çàêðûòü òåìó</option>";
}
if (moderator_value('open_topic', $forum_id, $m_member) and $row_topic['topic_status'])
{
$topic_option .= "<option value=\"01\"> - Îòêðûòü òåìó</option>";
}
if (moderator_value('pin_topic', $forum_id, $m_member) and $row_topic['fixed'])
{
$topic_option .= "<option value=\"08\"> - Çàêðåïèòü òåìó</option>";
}
if (moderator_value('unpin_topic', $forum_id, $m_member) and !$row_topic['fixed'])
{
$topic_option .= "<option value=\"09\"> - Îòêðåïèòü òåìó</option>";
}
if (!$row_topic['hidden'])
{
$topic_option .= "<option value=\"06\"> - Ñêðûòü òåìó</option>";
}
else
{
$topic_option .= "<option value=\"07\"> - Îïóáëèêîâàòü òåìó</option>";
}
if (moderator_value('delete_topic', $forum_id, $m_member))
{
$topic_option .= "<option value=\"03\"> - Óäàëèòü òåìó</option>";
}
if($topic_option)
{
$topic_option = "<option value=\"-1\">Îïöèè ìîäåðàòîðà</option>".$topic_option;
}
$posts_option = "<option value=\"00\">Ñîîáùåíèÿ</option>";
if (moderator_value('combining_post', $forum_id, $m_member))
{
$posts_option .= "<option value=\"07\"> - Îáúåäèíèòü ñîîáùåíèÿ</option>";
}
if (moderator_value('move_post', $forum_id, $m_member))
{
$posts_option .= "<option value=\"08\"> - Ïåðåìåñòèòü ñîîáùåíèÿ</option>";
}
$posts_option .= "<option value=\"05\"> - Îïóáëèêîâàòü ñîîáùåíèÿ</option>";
$posts_option .= "<option value=\"06\"> - Ñêðûòü ñîîáùåíèÿ</option>";
if (moderator_value('mass_prune', $forum_id, $m_member))
{
$posts_option .= "<option value=\"04\"> - Óäàëèòü ñîîáùåíèÿ</option>";
}
}
else
{
if ($user_group[$member_id['user_group']]['forum_topic_edit'] AND $member_id['name'] == $row_topic['author_topic'])
{
$topic_option .= "<option value=\"04\"> - Ðåäàêòèðîâàòü çàãîëîâîê</option>";
}
if ($user_group[$member_id['user_group']]['forum_topic_set'] AND $member_id['name'] == $row_topic['author_topic']){
if ($row_topic['topic_status']){
$topic_option .= "<option value=\"01\"> - Îòêðûòü òåìó</option>";
}else{
$topic_option .= "<option value=\"02\"> - Çàêðûòü òåìó</option>";
}
}
if ($user_group[$member_id['user_group']]['forum_topic_del'] AND $member_id['name'] == $row_topic['author_topic'])
{
$topic_option .= "<option value=\"03\"> - Óäàëèòü òåìó</option>";
}
if ($topic_option)
{
$topic_option = "<option value=\"-1\">Îïöèè ìîäåðàòîðà</option>".$topic_option;
}
}
?>