<?php
/*
 * Naijadev Clone 3.1.0 (http://naijadev.ml or http://naijadev.in)
 *
 * For copyright and license information, please see the LICENSE.md
 * Installing the system or redistributions of files must retain the above copyright notice.
 *
 * @link        http://facebook.com/tunzxywalex Tunz Project
 * @email		Tunzxywalex@gmail.com
 * @Whatsapp	+2349076642400
 * @copyright   Copyright (C) Naijadev Community 2018
 * @license     Premium Version Licence
 */
defined('_IN_JOHNCMS') or die('Error: restricted access');

/** @var Psr\Container\ContainerInterface $container */
$container = App::getContainer();

/** @var PDO $db */
$db = $container->get(PDO::class);

/** @var Johncms\Api\UserInterface $systemUser */
$systemUser = $container->get(Johncms\Api\UserInterface::class);

/** @var Johncms\Api\ToolsInterface $tools */
$tools = $container->get(Johncms\Api\ToolsInterface::class);

if ($systemUser->rights == 3 || $systemUser->rights >= 6) {
    if (!$id) {
        require('../system/head.php');
        echo $tools->displayError(_t('Wrong data'));
        require('../system/end.php');
        exit;
    }

if (!isset($systemUser->ban['1']) && !isset($systemUser->ban['3'])) {
      $textl = _t('Mail Moderator');
     require('../system/head.php');
            $qt = " $type1[text]";
            $msg_pre = $tools->checkout($msg, 1, 1);
            $msg_pre = $tools->smilies($msg_pre, $systemUser->rights ? 1 : 0);
            $msg_pre = preg_replace('#\[c\](.*?)\[/c\]#si', '<div class="quote">\1</div>', $msg_pre);
            echo '<div class="phdr"><b>' . _t('Topic') . ':</b> ' . $th1['text'] . '</div>';
            $qt = str_replace("<br>", "\r\n", $qt);
            $qt = trim(preg_replace('#\[c\](.*?)\[/c\]#si', '', $qt));
            $qt = $tools->checkout($qt, 0, 2);
             $shift = ($config['timeshift'] + $systemUser->getConfig()->timeshift) * 3600;
        $vr = date("d.m.Y / H:i", $type1['time'] + $shift);
        $msg = isset($_POST['msg']) ? trim($_POST['msg']) : '';
        $txt = isset($_POST['txt']) ? intval($_POST['txt']) : false;
         $th = $type1['refid'];
        $th1 = $db->query("SELECT * FROM `forum` WHERE `id` = '$th'")->fetch();
        $req = $db->query("SELECT `id`, `text`, `soft`, `edit` FROM `forum` WHERE `type`='r' AND `refid`='$id' ORDER BY `realid`");
        $coltem = $db->query("SELECT COUNT(*) FROM `forum` WHERE `type` = 't' AND `refid` = '" . $res['id'] . "'")->fetchColumn();

		//    echo '<p><form action="' . $config['homeurl'] . '/mail/index.php?act=write&id=1" method="post"><input type="submit" value="' . _t('Report to Admin Now') . '" class="btn btn-danger"/></form></p>';
		 echo'<a name="top"></a><h2>Report Post</h2><p><table><tr><td> ';
         echo' 1. Please post all threads in the right section, and don&apos;t derail threads by posting off topic.<br>2. Don&apos;t abuse, bully, deliberately insult/provoke, fight, or wish harm to ' . $config->copyright . ' members OR THEIR TRIBES.<br>3. Don&apos;t threaten, support or DEFEND violent acts against any person, tribe, race, animals, or group (e.g. rape).<br>4. Discussions of the art of love-making should be restricted to the hidden sexuality section.<br>5. Don&apos;t post pornographic or disgusting pictures or videos on any section of ' . $config->copyright . '.<br>6. Don&apos;t post adverts or affiliate links outside the areas where adverts are explicitly allowed.<br>7. Don&apos;t say, do, or THREATEN to do anything that&apos;s detrimental to the security, success, or reputation of ' . $config->copyright . '.<br>8. Don&apos;t post false information on ' . $config->copyright . '.<br>9. Don&apos;t use ' . $config->copyright . ' for illegal acts, e.g scams, plagiarism, hacking, gay meetings, incitement, promoting secession.<br>10. Don&apos;t violate the privacy of any people e.g. by posting their private pics, info, or chats without permission.<br>11. Don&apos;t create distracting posts with: ALL WORDS BOLD / huge font sizes / ALL CAPS / distracting imagesspaces, etc.<br>12. Don&apos;t insert signatures into your posts. Instead, add the desired signature to your profile.<br>13. Please report any post or topic that violates the rules of ' . $config->copyright . ' using the (Report) button.<br>14. Please search the forum before creating a new thread on ' . $config->copyright . '.<br>15. Don&apos;t attempt to post censored words by misspelling them.<br>16. Don&apos;t promote shady investments like HYIP, MLM on ' . $config->copyright . '.<br>18. Don&apos;t spam the forum by advertising in the wrong places or posting the same content many times.<br>19. Don&apos;t use alternate accounts to access ' . $config->copyright . ' after being banned. If you do, make sure we don&apos;t find out.<br>20. Complaints to or against moderators must be sent privately. Please don&apos;t disobey, disrespect, or defame them. <br>21. Please spell words correctly when you post, and try to use perfect grammar and punctuation.<br>22. Don&apos;t ask ' . $config->copyright . ' members for contact details (email, phone, bbpin) or investments. ';
         echo'<form name="form" action="' . $config['homeurl'] . '/mail/index.php?act=write&id=1" method="post"  enctype="multipart/form-data">' .
        ($id ? '' : '<p>Moderator:<p><input type="text" name="nick" value="Tunzxywalex"><br>') .
        '<p>';
		//echo $container->get(Johncms\Api\BbcodeInterface::class)->buttons('form', 'text');
        // echo'<div class="mvs">&nbsp;</div><div><label for="u_0_3_lY" class="_59zd">What went wrong?</label>';
    echo '<P><label><b>Which Rules Were Broken?<br>';
 echo'([url=' . $config['homeurl'] . '/forum/index.php?act=post&?id=' . $res['refid'] . '&sfname=' . $res['text'] . ']' . $res['text'] . '[/url])';
    echo'<p><textarea rows="5" cols="50" name="text" id="body">[url=' . $config['homeurl'] . '/forum/index.php?act=post&?id=' . $res['refid'] . '&sfname=' . $res['text'] . ']' . $res['text'] . '[/url]</textarea>';
    echo '<p><label>Attach optional screenshot:<input type="file" name="fail" style="width: 100%; max-width: 160px"/></label>'.
	    '<p><input type="submit" name="submit" value="Send Email">' .
        '</form></table>';
}
}
require('../system/end.php');
