/ مشکل در هک ModSystem
وندا هاست
طراحی و راه اندازی وبسایت و انجمن توسط ویکی وی بی ویکی وی بی در قبال معاملات صورت گرفته با هر یک از اعضا و سفارشات طراحی خارج از این اطلاعیه هیچگونه مسئولیتی نمی پذیرد
بک لینک ها
فروش قالب وردپرس فروش فایل مشابه ژاکت وندا هاست
نمایش نتایج: از 1 به 4 از 4

موضوع: مشکل در هک ModSystem

  1. #1
    Sp!D3R آنلاین نیست.
    Sp!D3R
    کاربر اخراجي
    1,056نوشته713مورد پسند

    تاریخ عضویت
    Sep 2014
    شماره عضویت
    6542
    پسندیده است
    1,789 پست
    بلاگ
    پست
    میزان امتیاز
    723
    www.beruztarinha.ir

    مشکل در هک ModSystem

    سلام دوستان تنها مشکلم این هست که میخوام قالب رو ست کنم با این هک !!

    متاسفانه نه css ها نه ... ست نشده !

    یه آموزشی بود راجع به ست کردن صفحه جدید که از اون روش استفاده کردم صفحه بالا نیومد !

    لطفا کد های مد نظر رو بدید تا تمامی کد ها فراخوانی بشه !

    ممنون

  2. نوين وردپرس تبلیغات شما

  3. #2
    Farshad Ghanbari آنلاین نیست.
    Farshad Ghanbari
    مدير بخش
    3,560نوشته8,085مورد پسند

    تاریخ عضویت
    Dec 2012
    شماره عضویت
    219
    پسندیده است
    7,092 پست
    بلاگ
    پست
    میزان امتیاز
    8092
    مسئول 2 ستاره
    www.farshadghanbari.ir
    لینک بدید، کد ها رو قرار بدید

    کاربر زیر پست Farshad Ghanbari را پسندیده است:



  4. #3
    Sp!D3R آنلاین نیست.
    Sp!D3R
    کاربر اخراجي
    1,056نوشته713مورد پسند

    تاریخ عضویت
    Sep 2014
    شماره عضویت
    6542
    پسندیده است
    1,789 پست
    بلاگ
    پست
    میزان امتیاز
    723
    www.beruztarinha.ir
    داش فرشاد چون انجمن مال بنده نیست نمیتونم لینک قرار بدم ! شرمنده :(

    فایل مورد نظر

    کد:
    <?php
    /*======================================================================*\
    || #################################################################### ||
    || # Modification-System                                              # ||
    || # ---------------------------------------------------------------- # ||
    || # Copyright © 2011 Snog. All Rights Reserved.                      # ||
    || # Original Code by Coroner at php-unlimited.com.                   # ||
    || # Support and development taken over by Snog with permission.      # ||
    || # This file may not be redistributed in whole or significant part. # ||
    || # ---------------------------------------------------------------- # ||
    || #                   http://www.snogssite.com                       # ||
    || #################################################################### ||
    \*======================================================================*/
    
    // ####################### SET PHP ENVIRONMENT ###########################
    error_reporting (E_ALL & ~E_NOTICE);
    
    // #################### DEFINE IMPORTANT CONSTANTS #######################
    define ('THIS_SCRIPT', 'modsystem_miscactions');
    define ('CSRF_PROTECTION', true);
    
    // ################### PRE-CACHE TEMPLATES AND DATA ######################
    // get special phrase groups
    $phrasegroups = array ('user', 'modsystem', 'posting', 'forumdisplay');
    
    $specialtemplates = array(
        'iconcache',
        'prefixcache'
    );
    
    // pre-cache templates used by all actions
    $globaltemplates = array (
        'USERCP_SHELL',
        'usercp_nav_folderbit',
        'modsystem_post_settings'
    );
    
    // pre-cache templates used by specific actions
    $actiontemplates = array (
        'editdonate' => array (
            'modsystem_usercp_edit_donate',
        ),
    );
    
    // ######################### REQUIRE BACK-END ############################
    require_once ('./global.php');
    if (function_exists ('prepare_motm_poll')) {}
    else
    {
        require_once (DIR . '/includes/modsystem_functions.php');
    }
    require_once (DIR . '/includes/functions_user.php');
    require_once (DIR . '/includes/class_xml.php');
    
    // #######################################################################
    // ######################## START MAIN SCRIPT ############################
    // #######################################################################
    
    if (empty ($vbulletin->userinfo['userid']))
    {
        print_no_permission ();
    }
    
    $docp = 0;
    
    // start the navbar
    $navbits = array ('usercp.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['user_control_panel']);
    
    $vbulletin->input->clean_array_gpc ('r', array (
        'do'       => TYPE_NOHTML,
        'username' => TYPE_NOHTML,
        'ajax'     => TYPE_INT,
        'nojs'     => TYPE_INT,
        'user'     => TYPE_INT,
        'threadid' => TYPE_INT,
        'modver'    => TYPE_NOHTML,
        'group'    => TYPE_NOHTML,
    ));
    
    $modver = $vbulletin->GPC['modver'];
    
    if ($vbulletin->GPC['group'] == 'coder' OR $vbulletin->GPC['group'] == 'designer' OR $vbulletin->GPC['group'] == 'codemod' OR $vbulletin->GPC['group'] == 'designmod')
    {
        $usergroups = showgroups_cdm ($vbulletin->GPC['group']);
    
        $navbits = construct_navbits (array ('' => $vbphrase['show_groups']));
        $navbar = render_navbar_template ($navbits);
    
        $templater = vB_Template::create('SHOWGROUPS');
            $templater->register_page_templates();
            $templater->register('forumjump', $forumjump);
            $templater->register('moderatorbits', $moderatorbits);
            $templater->register('navbar', $navbar);
            $templater->register('usergroups', $usergroups);
        print_output($templater->render());
    }
    
    if ($vbulletin->GPC['do'] == 'updatemail' AND $threadid)
    {
    
        $member = $db->query_first ("SELECT 
            thread.*,modification.author,modification.last_update,
            modification.mod_productid,modification.mod_supported,modification.mod_dbchanges,modification.mod_usesplugins,modification.mod_edtemplates,modification.mod_autemplates,modification.mod_reuseable,
            modification.mod_codechange,modification.mod_additional,modification.mod_translation,modification.mod_external,modification.mod_betastage,modification.mod_version,modification.mod_coauthors 
            FROM " . TABLE_PREFIX . "thread AS thread 
            LEFT JOIN " . TABLE_PREFIX . "modsys_settings AS modification ON (modification.threadid = thread.threadid) 
            WHERE thread.`threadid`=" . intval ($threadid) . "
        ");
        if ($member['author'] == $vbulletin->userinfo['userid'])
        {
            send_mod_updates ($threadid, $member, 1);
            $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl_q'] . 't=' . $threadid;
            standard_redirect ($vbphrase['modsystem_redirect_update'], true);
            exit ();
        }
        else
        {
            // you're not the author - no permission !
            print_no_permission ();
            exit ();
        }
    
    }
    else if ($vbulletin->GPC['do'] == 'addcoauthor')
    {
        $xml = new vB_AJAX_XML_Builder ($vbulletin, 'text/xml');
    
        $users = $db->query_first ("
            SELECT userid, username FROM " . TABLE_PREFIX . "user
            WHERE username='" . $db->escape_string($vbulletin->GPC['username']) . "' 
        ");
        if ($users['userid'])
        {
            $xml->add_group('userinfo');
            $xml->add_tag('user', '', array('userid' => intval ($users['userid']), 'username' => $db->escape_string($users['username'])));
            $xml->close_group();
        }
    
        $xml->print_xml();
        exit ();
    
    }
    else if ($vbulletin->GPC['do'] == 'editsettings')
    {
    
        $navbits = array();
        $parentlist = array_reverse (explode (',', substr ($foruminfo['parentlist'], 0, -3)));
        foreach ($parentlist AS $forumID)
        {
            $forumTitle =& $vbulletin->forumcache["$forumID"]['title'];
            $navbits['forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f=$forumID"] = $forumTitle;
        }
        $navbits['showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t=$threadid#post"] = $threadinfo['prefix_plain_html'] . ' ' . $threadinfo['title'];
    
        if (!($permissions['modsystempermissions'] & $vbulletin->bf_ugp_modsystempermissions['canusemodsystem']) AND !$vbulletin->options['modsettings_global_modsystem'] AND !$threadid)
        {
            // error - mod-system is off
            print_no_permission ();
            exit ();
        }
        else
        {
    
            $show['verified'] = $show['owner'] = false;
            $thread = $db->query_first ("SELECT 
                thread.*,modification.author,modification.last_update,
                modification.mod_productid,modification.mod_supported,modification.mod_dbchanges,modification.mod_usesplugins,
                modification.mod_edtemplates,modification.mod_autemplates,modification.mod_reuseable,modification.mod_verified,
                modification.mod_codechange,modification.mod_additional,modification.mod_translation,modification.mod_external,modification.mod_betastage,modification.mod_version,modification.mod_coauthors 
                FROM " . TABLE_PREFIX . "thread AS thread 
                LEFT JOIN " . TABLE_PREFIX . "modsys_settings AS modification ON (modification.threadid = thread.threadid) 
                WHERE thread.`threadid`=" . intval ($threadid) . "
            ");
            if ($thread['author'] == $vbulletin->userinfo['userid'] OR can_moderate ($threadinfo['forumid'], 'canmoderateposts')) $show['owner'] = true;
            $member = $db->query_first ("SELECT * FROM " . TABLE_PREFIX . "modsys_user_notification WHERE mod_threadid=" . intval ($threadid) . " AND userid=" . intval ($vbulletin->userinfo['userid']));
    
            if ($permissions['modsystempermissions'] & $vbulletin->bf_ugp_modsystempermissions['canusemodverify']) $show['verified'] = true;
    
            $vbulletin->input->clean_array_gpc ('p', array (
                'send'          => TYPE_NOHTML,
                'mod_vbversion' => TYPE_NOHTML,
                'mod_version'   => TYPE_NOHTML,
                'mod_productid' => TYPE_NOHTML,
                'modsystem'     => TYPE_ARRAY_INT,
                'coauthors'     => TYPE_ARRAY_INT,
                'modmember'     => TYPE_ARRAY_INT,
                'mod_coauthors' => TYPE_NOHTML,
            ));
            if ($vbulletin->GPC['send'] == 'send')
            {
                if (!$threadid)
                {
                    // error - no threadid
                }
                else if ($show['owner'] == true)
                {
                    if ($thread['mod_version'] != '')
                    {
                        $send_update = isNewerVersion ($thread['mod_version'], $vbulletin->GPC['mod_version']);
                        $old_version = $thread['mod_version'];
                        $new_version = $vbulletin->GPC['mod_version'];
                    }
    
                    $coauthors = '';
                    if (count ($vbulletin->GPC['coauthors']))
                    {
                        $coauthors = implode (',', $vbulletin->GPC['coauthors']);
                    }
    
                    $modification = $db->query_first ("SELECT id FROM " . TABLE_PREFIX . "modsys_settings WHERE threadid=" . intval ($threadid));
                    if ($modification['id'])
                    {
                        if ($send_update >= 1)
                        {
                            $update_query = "last_update=" . time () . ",";
                        }
    
                        $db->query_write ("UPDATE " . TABLE_PREFIX . "modsys_settings SET 
                         dateline       =" . time () . ",
                         mod_productid  ='" . $db->escape_string ($vbulletin->GPC['mod_productid']) . "',
                         mod_supported  =" . intval ($vbulletin->GPC['modsystem']['mod_supported']) . ",
                         mod_dbchanges  =" . intval ($vbulletin->GPC['modsystem']['mod_dbchanges']) . ",
                         mod_usesplugins=" . intval ($vbulletin->GPC['modsystem']['mod_usesplugins']) . ",
                         mod_edtemplates=" . intval ($vbulletin->GPC['modsystem']['mod_edtemplates']) . ",
                         mod_autemplates=" . intval ($vbulletin->GPC['modsystem']['mod_autemplates']) . ",
                         mod_reuseable  =" . intval ($vbulletin->GPC['modsystem']['mod_reuseable']) . ",
                         mod_verified   =" . intval ($vbulletin->GPC['modsystem']['mod_verified']) . ",
                         mod_codechange =" . intval ($vbulletin->GPC['modsystem']['mod_codechange']) . ",
                         mod_additional =" . intval ($vbulletin->GPC['modsystem']['mod_additional']) . ",
                         mod_translation=" . intval ($vbulletin->GPC['modsystem']['mod_translation']) . ",
                         mod_external   =" . intval ($vbulletin->GPC['modsystem']['mod_external']) . ",
                         mod_betastage  =" . intval ($vbulletin->GPC['modsystem']['mod_betastage']) . ",
                         mod_version    ='" . $db->escape_string ($vbulletin->GPC['mod_version']) . "',
                         mod_vbversion  ='" . $db->escape_string ($vbulletin->GPC['mod_vbversion']) . "',
                         " . $update_query . "
                         mod_coauthors  ='" . $db->escape_string ($coauthors) . "'
                            WHERE threadid=" . intval ($threadid) . "
                        ");
                    }
                    else
                    {
                        if ($send_update >= 1)
                        {
                            $update_value = "'" . time () . "',";
                            $update_varname = "`last_update`";
                        }
    
                        // this can't be true - threadid not exists !?
                        $db->query_write ("INSERT INTO " . TABLE_PREFIX . "modsys_settings 
                            (threadid,
                             author,
                             dateline,
                             mod_productid,
                             mod_supported,
                             mod_dbchanges,
                             mod_usesplugins,
                             mod_edtemplates,
                             mod_autemplates,
                             mod_reuseable,
                             mod_verified,
                             mod_codechange,
                             mod_additional,
                             mod_translation,
                             mod_external,
                             mod_betastage,
                             mod_version,
                             mod_vbversion,
                             " . $update_varname . "
                             mod_coauthors) 
                            VALUES
                            (" . intval ($threadid) . ",
                             '" . intval ($vbulletin->userinfo['userid']) . "',
                             " . time () . ",
                             '" . $db->escape_string ($vbulletin->GPC['mod_productid']) . "',
                             " . intval ($vbulletin->GPC['modsystem']['mod_supported']) . ",
                             " . intval ($vbulletin->GPC['modsystem']['mod_dbchanges']) . ",
                             " . intval ($vbulletin->GPC['modsystem']['mod_usesplugins']) . ",
                             " . intval ($vbulletin->GPC['modsystem']['mod_edtemplates']) . ",
                             " . intval ($vbulletin->GPC['modsystem']['mod_autemplates']) . ",
                             " . intval ($vbulletin->GPC['modsystem']['mod_reuseable']) . ",
                             " . intval ($vbulletin->GPC['modsystem']['mod_verified']) . ",
                             " . intval ($vbulletin->GPC['modsystem']['mod_codechange']) . ",
                             " . intval ($vbulletin->GPC['modsystem']['mod_additional']) . ",
                             " . intval ($vbulletin->GPC['modsystem']['mod_translation']) . ",
                             " . intval ($vbulletin->GPC['modsystem']['mod_external']) . ",
                             " . intval ($vbulletin->GPC['modsystem']['mod_betastage']) . ",
                             '" . $db->escape_string ($vbulletin->GPC['mod_version']) . "',
                             '" . $db->escape_string ($vbulletin->GPC['mod_vbversion']) . "',
                             " . $update_value . "
                             '" . $db->escape_string ($coauthors) . "')
                        ");
                    }
                }
    
                // update member options
                $tagged = $autoupdate = $manualupdate = 0;
                $pmemail = 1;
                if ($vbulletin->GPC['modmember']['tagged']) $tagged = 1;
                if (!$vbulletin->GPC['modmember']['pm_notify']) $pmemail = 0;
                if ($vbulletin->GPC['modmember']['auto_notify']) $autoupdate = 1;
                if ($vbulletin->GPC['modmember']['manual_notify']) $manualupdate = 1;
                $memberoptions = $db->query_first ("SELECT id FROM " . TABLE_PREFIX . "modsys_user_notification WHERE mod_threadid=" . intval ($threadid) . " AND userid=" . intval ($vbulletin->userinfo['userid']));
    
                if ($memberoptions['id'])
                {
                    $db->query_write ("UPDATE " . TABLE_PREFIX . "modsys_user_notification SET 
                        mod_tagged   =" . intval ($tagged) . ",
                        pm_notify    =" . intval ($pmemail) . ",
                        auto_notify  =" . intval ($autoupdate) . ",
                        manual_notify=" . intval ($manualupdate) . "
                        WHERE mod_threadid=" . intval ($threadid) . " 
                        AND userid=" . intval ($vbulletin->userinfo['userid']) . "
                    ");
                }
                else
                {
                    $db->query_write ("INSERT INTO " . TABLE_PREFIX . "modsys_user_notification 
                        (mod_threadid,userid,pm_notify,auto_notify,manual_notify,mod_tagged) 
                        VALUES 
                        (" . intval ($threadid) . "," . intval ($vbulletin->userinfo['userid']) . "," . intval ($pmemail) . "," . intval ($autoupdate) . "," . intval ($manualupdate) . "," . intval ($tagged) . ")
                    ");
                }
    
                // build datastore
                if ($vbulletin->options['modsettings_use_datastore']) mode_create_datastore ('coder', 1);
                if ($vbulletin->options['modsettings_use_datastore']) mode_create_datastore ('style', 1);
    
                if ($send_update >= 1 AND $show['owner'])
                {
                    send_mod_updates ($threadid, $thread);
                }
    
                $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl_q'] . 't=' . $threadid;
                standard_redirect ($vbphrase['modsystem_redirect_modification'], true);
                exit ();
            }
            else
            {
                $navbits[''] = $vbphrase['modsystem_editmod_title'];
    
                $mod_coauthors = $version_options = '';
                $mod_versions = array ();
                $vers = $db->query_read ("SELECT * FROM " . TABLE_PREFIX . "modsys_versions ORDER BY modversion DESC");
                while ($vbvers = $db->fetch_array ($vers))
                {
                    $mod_versions[] = $vbvers['modversion'];
                }
    
                $modification = $db->query_first ("SELECT mod_vbversion,mod_coauthors FROM " . TABLE_PREFIX . "modsys_settings WHERE threadid=" . intval ($threadid));
    
    
                // supporters/coauthors
                if ($modification['mod_coauthors'])
                {
                    $coauthors = $db->query_read ("SELECT userid,username FROM " . TABLE_PREFIX . "user WHERE userid IN (0," . $modification['mod_coauthors'] . ")");
                    while ($author = $db->fetch_array ($coauthors))
                    {
                        $mod_coauthors .= '<span id="coauthor_' . $author['userid'] . '"><a href="#" onclick="return remove_coauthor(' . $author['userid'] . ')">' . $author['username'] . '</a><input type="hidden" name="coauthors[]" value="' . $author['userid'] . '" />;</span> ';
                    }
                }
    
                $field = $vbulletin->options['modsettings_field'];
                if (is_array ($vbulletin->userinfo["$field"]))
                {
                }
                else
                {
                    if (in_array ($vbulletin->userinfo["$field"], $mod_versions))
                    {
                        $search_version = $vbulletin->userinfo["$field"];
                    }
                    else if (in_array ($modification['mod_vbversion'], $mod_versions))
                    {
                        $search_version = $modification['mod_vbversion'];
                    }
                }
    
                if (count ($mod_versions))
                {
                    foreach ($mod_versions AS $key => $val)
                    {
                        $sel = '';
                        if ($search_version == $val) $sel = ' selected="selected"';
                        $version_options .= '<option value="' . $val . '"' . $sel . '>' . $val . '</option>';
                    }
                }
                else $version_options = '<option value="???">???</option>';
    
                // make navbar
                $navbar = render_navbar_template (construct_navbits ($navbits));
    
                $templater = vB_Template::create('modsystem_post_settings');
                    $templater->register_page_templates();
                    $templater->register('thread', $thread);
                    $templater->register('onload', $onload);
                    $templater->register('version_options', $version_options);
                    $templater->register('mod_coauthors', $mod_coauthors);
                    $templater->register('member', $member);
                    $templater->register('threadid', $threadid);
                    $templater->register('navbar', $navbar);
                print_output($templater->render());
                exit ();
            }
        }
    
    }
    else if ($vbulletin->GPC['do'] == 'tagmod' AND $threadid)
    {
        if ($vbulletin->userinfo['userid'])
        {
            // update member options
            $tagged = 1;
            $pmemail = 1;
            $autoupdate = 1;
            if ($vbulletin->GPC['modmember']['manual_notify']) $manualupdate = 1;
    
            $memberoptions = $db->query_first ("SELECT id FROM " . TABLE_PREFIX . "modsys_user_notification WHERE mod_threadid=" . intval ($threadid) . " AND userid=" . intval ($vbulletin->userinfo['userid']));
    
            if ($memberoptions['id'])
            {
                $db->query_write ("UPDATE " . TABLE_PREFIX . "modsys_user_notification SET 
                    mod_tagged   =" . intval ($tagged) . ",
                    pm_notify    =" . intval ($pmemail) . ",
                    auto_notify  =" . intval ($autoupdate) . ",
                    manual_notify=" . intval ($manualupdate) . "
                    WHERE mod_threadid=" . intval ($threadid) . " 
                    AND userid=" . intval ($vbulletin->userinfo['userid']) . "
                ");
            }
            else
            {
                $db->query_write ("INSERT INTO " . TABLE_PREFIX . "modsys_user_notification 
                    (mod_threadid,userid,pm_notify,auto_notify,manual_notify,mod_tagged) 
                    VALUES 
                    (" . intval ($threadid) . "," . intval ($vbulletin->userinfo['userid']) . "," . intval ($pmemail) . "," . intval ($autoupdate) . "," . intval ($manualupdate) . "," . intval ($tagged) . ")
                ");
            }
            $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl_q'] . 't=' . $threadid;
            standard_redirect ($vbphrase['modsystem_redirect_set_as_tagged'], true);
            exit ();
        }else{
            print_no_permission ();
            exit ();
        }
    }
    else if ($vbulletin->GPC['do'] == 'untagmod' AND $threadid)
    {
        if ($vbulletin->userinfo['userid'])
        {
            // update member options
            $tagged = 0;
            $pmemail = 0;
            $autoupdate = 0;
            if ($vbulletin->GPC['modmember']['manual_notify']) $manualupdate = 1;
    
            $memberoptions = $db->query_first ("SELECT id FROM " . TABLE_PREFIX . "modsys_user_notification WHERE mod_threadid=" . intval ($threadid) . " AND userid=" . intval ($vbulletin->userinfo['userid']));
    
            if ($memberoptions['id'])
            {
                $db->query_write ("UPDATE " . TABLE_PREFIX . "modsys_user_notification SET 
                    mod_tagged   =" . intval ($tagged) . ",
                    pm_notify    =" . intval ($pmemail) . ",
                    auto_notify  =" . intval ($autoupdate) . ",
                    manual_notify=" . intval ($manualupdate) . "
                    WHERE mod_threadid=" . intval ($threadid) . " 
                    AND userid=" . intval ($vbulletin->userinfo['userid']) . "
                ");
            }
            else
            {
                $db->query_write ("INSERT INTO " . TABLE_PREFIX . "modsys_user_notification 
                    (mod_threadid,userid,pm_notify,auto_notify,manual_notify,mod_tagged) 
                    VALUES 
                    (" . intval ($threadid) . "," . intval ($vbulletin->userinfo['userid']) . "," . intval ($pmemail) . "," . intval ($autoupdate) . "," . intval ($manualupdate) . "," . intval ($tagged) . ")
                ");
            }
            $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl_q'] . 't=' . $threadid;
            standard_redirect ($vbphrase['modsystem_redirect_set_as_untagged'], true);
            exit ();
        }else{
            print_no_permission ();
            exit ();
        }
    }
    else if ($vbulletin->GPC['do'] == 'installmod' AND $threadid)
    {
    
        if ($vbulletin->userinfo['userid'])
        {
            $tvar = $modver;
            $mymod = $db->query_first ("SELECT id,mod_installed FROM " . TABLE_PREFIX . "modsys_user_notification WHERE mod_threadid=" . intval ($threadid) . " AND userid=" . intval ($vbulletin->userinfo['userid']));
            if (!$mymod['id'])
            {
                $db->query_write ("INSERT INTO " . TABLE_PREFIX . "modsys_user_notification 
                    (mod_threadid,userid,mod_installed,install_date,auto_notify,manual_notify,pm_notify,installed_version) 
                    VALUES 
                    (" . intval ($threadid) . "," . intval ($vbulletin->userinfo['userid']) . ",'1'," . TIMENOW . ",'1','1','1','" . $tvar . "') 
                ");
                $mymod['mod_installed'] = 0;
            }
            if (!$mymod['mod_installed'])
            {
                $db->query ("UPDATE " . TABLE_PREFIX . "modsys_settings SET mod_installcount=mod_installcount+'1' WHERE threadid=" . intval ($threadid));
    
                // build datastore
                if ($vbulletin->options['modsettings_use_datastore']) update_coder_or_designer ($threadid, 1);
    
                // write the member options
                $memberoptions = $db->query_first ("SELECT id,mod_installed,auto_notify,manual_notify FROM " . TABLE_PREFIX . "modsys_user_notification WHERE mod_threadid=" . intval ($threadid) . " AND userid=" . intval ($vbulletin->userinfo['userid']));
                if ($memberoptions['id'])
                {
                    $autoinstall = $memberoptions['auto_notify'];
                    $manualinstall = $memberoptions['manual_notify'];
                    if (!$autoinstall) $autoinstall = 1;
                    if ($autoinstall AND $manualinstall) $manualinstall = 0;
    
                    $db->query_write ("UPDATE " . TABLE_PREFIX . "modsys_user_notification SET 
                        mod_installed='1',
                        install_date =" . TIMENOW . ",
                        auto_notify  =" . intval ($autoinstall) . ",
                        manual_notify=" . intval ($manualinstall) . ",
                        pm_notify  ='1',
                         installed_version  ='" . $tvar . "'
                         WHERE mod_threadid=" . intval ($threadid) . " 
                        AND userid=" . intval ($vbulletin->userinfo['userid']) . "
                    ");
                }
    
                // INFO back to AJAX
                if ($vbulletin->GPC['ajax'])
                {    
                    echo "installed";
                    exit ();
                }
            }
            $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl_q'] . 't=' . $threadid;
            standard_redirect ($vbphrase['modsystem_redirect_set_as_installed'], true);
            exit ();
        }
        else
        {
            print_no_permission ();
            exit ();
        }
    
    }
    else if ($vbulletin->GPC['do'] == 'uninstallmod' AND $threadid)
    {
    
        if ($vbulletin->userinfo['userid'])
        {
            $mymod = $db->query_first ("SELECT id,mod_installed FROM " . TABLE_PREFIX . "modsys_user_notification WHERE mod_threadid=" . intval ($threadid ). " AND userid=" . intval ($vbulletin->userinfo['userid']));
            if (!$mymod['id'])
            {
                $db->query_write ("INSERT INTO " . TABLE_PREFIX . "modsys_user_notification 
                    (mod_threadid,userid,mod_installed,install_date,auto_notify,manual_notify,installed_version) 
                    VALUES 
                    (" . intval ($threadid) . "," . intval ($vbulletin->userinfo['userid']) . ",'0','0','0','0','') 
                ");
                $mymod['mod_installed'] = 1;
            }
            if ($mymod['mod_installed'])
            {
                $db->query ("UPDATE " . TABLE_PREFIX . "modsys_settings SET mod_installcount=mod_installcount-'1' WHERE threadid=" . intval ($threadid));
                $nomination = $db->query_first ("SELECT mod_installcount FROM " . TABLE_PREFIX . "modsys_settings WHERE threadid=" . intval ($threadid));
                if ($nomination['mod_installcount'] < 0) $db->query ("UPDATE " . TABLE_PREFIX . "modsys_settings SET mod_installcount='0' WHERE threadid=" . intval ($threadid));
    
                // build datastore
                if ($vbulletin->options['modsettings_use_datastore']) update_coder_or_designer ($threadid, 0);
    
                // write the member options
                $memberoptions = $db->query_first ("SELECT id FROM " . TABLE_PREFIX . "modsys_user_notification WHERE mod_threadid=" . intval ($threadid) . " AND userid=" . intval ($vbulletin->userinfo['userid']));
                if ($memberoptions['id'])
                {
                    $db->query_write ("UPDATE " . TABLE_PREFIX . "modsys_user_notification SET 
                        mod_installed='0',
                        install_date='0',
                        auto_notify  ='0',
                        manual_notify='0', 
                        installed_version='' 
                        WHERE mod_threadid=" . intval ($threadid) . " 
                        AND userid=" . intval ($vbulletin->userinfo['userid']) . "
                    ");
                }
    
                // INFO back to AJAX
                if ($vbulletin->GPC['ajax'])
                {
                    echo "uninstalled";
                    exit ();
                }
            }
            $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl_q'] . 't=' . $threadid;
            standard_redirect ($vbphrase['modsystem_redirect_set_as_uninstalled'], true);
            exit ();
        }
        else
        {
            print_no_permission ();
            exit ();
        }
    
    }
    else if ($vbulletin->GPC['do'] == 'nominate' AND $threadid)
    {
    
        if (($permissions['modsystempermissions'] & $vbulletin->bf_ugp_modsystempermissions['canusemodmotm']))
        {
            $mymod = $db->query_first ("SELECT id,mod_nominated FROM " . TABLE_PREFIX . "modsys_user_notification WHERE mod_threadid=" . intval ($threadid) . " AND userid=" . intval ($vbulletin->userinfo['userid']));
            if (!$mymod['id'])
            {
                $db->query_write ("INSERT INTO " . TABLE_PREFIX . "modsys_user_notification 
                    (mod_threadid,userid,mod_nominated,nominate_date) 
                    VALUES 
                    (" . intval ($threadid) . "," . intval ($vbulletin->userinfo['userid']) . ",'1','" . TIMENOW . "') 
                ");
                $mymod['mod_nominated'] = 0;
            }
            if (!$mymod['mod_nominated'])
            {
                $db->query ("UPDATE " . TABLE_PREFIX . "modsys_settings SET mod_nominatecount=mod_nominatecount+'1' WHERE threadid=" . intval ($threadid));
    
                // build datastore
                if ($vbulletin->options['modsettings_use_datastore']) update_coder_or_designer ($threadid, 1);
    
                $memberoptions = $db->query_first ("SELECT id FROM " . TABLE_PREFIX . "modsys_user_notification WHERE mod_threadid=" . intval ($threadid) . " AND userid=" . intval ($vbulletin->userinfo['userid']));
                if ($memberoptions['id'])
                {
                    $db->query_write ("UPDATE " . TABLE_PREFIX . "modsys_user_notification SET 
                        nominate_date=" . TIMENOW . ",
                        mod_nominated='1' 
                        WHERE mod_threadid=" . intval ($threadid) . " 
                        AND userid=" . intval ($vbulletin->userinfo['userid']) . "
                    ");
                }
    
                // INFO back to AJAX
                if ($vbulletin->GPC['ajax'])
                {
                    echo 'nominated';
                    exit ();
                }
                $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl_q'] . 't=' . $threadid;
                standard_redirect ($vbphrase['modsystem_redirect_set_as_nominated'], true);
                exit ();
            }
        }
        else
        {
            print_no_permission ();
            exit ();
        }
    
    }
    else if ($vbulletin->GPC['do'] == 'unnominate' AND $threadid)
    {
    
        if (($permissions['modsystempermissions'] & $vbulletin->bf_ugp_modsystempermissions['canusemodmotm']))
        {
            $mymod = $db->query_first ("SELECT id,mod_nominated FROM " . TABLE_PREFIX . "modsys_user_notification WHERE mod_threadid=" . intval ($threadid) . " AND userid=" . intval ($vbulletin->userinfo['userid']));
            if (!$mymod['id'])
            {
                $db->query_write ("INSERT INTO " . TABLE_PREFIX . "modsys_user_notification 
                    (mod_threadid,userid,mod_nominated,nominate_date) 
                    VALUES 
                    (" . intval ($threadid) . "," . intval ($vbulletin->userinfo['userid']) . ",'0','0') 
                ");
                $mymod['mod_nominated'] = 1;
            }
            if ($mymod['mod_nominated'])
            {
                $db->query ("UPDATE " . TABLE_PREFIX . "modsys_settings SET mod_nominatecount=mod_nominatecount-'1' WHERE threadid=" . intval ($threadid));
                $nomination = $db->query_first ("SELECT mod_nominatecount FROM " . TABLE_PREFIX . "modsys_settings WHERE threadid=" . intval ($threadid));
                if ($nomination['mod_nominatecount'] < 0) $db->query ("UPDATE " . TABLE_PREFIX . "modsys_settings SET mod_nominatecount='0' WHERE threadid=" . intval ($threadid));
    
                // build datastore
                if ($vbulletin->options['modsettings_use_datastore']) update_coder_or_designer ($threadid, 0);
    
                $memberoptions = $db->query_first ("SELECT id FROM " . TABLE_PREFIX . "modsys_user_notification WHERE mod_threadid=" . intval ($threadid) . " AND userid=" . intval ($vbulletin->userinfo['userid']));
                if ($memberoptions['id'])
                {
                    $db->query_write ("UPDATE " . TABLE_PREFIX . "modsys_user_notification SET 
                        nominate_date='0',
                        mod_nominated='0' 
                        WHERE mod_threadid=" . intval ($threadid) . " 
                        AND userid=" . intval ($vbulletin->userinfo['userid']) . "
                    ");
                }
    
                // INFO back to AJAX
                if ($vbulletin->GPC['ajax'])
                {
                    echo 'unnominated';
                    exit ();
                }
                $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl_q'] . 't=' . $threadid;
                standard_redirect ($vbphrase['modsystem_redirect_set_as_unnominated'], true);
                exit ();
            }
        }
        else
        {
            print_no_permission ();
            exit ();
        }
    
    }
    else if ($vbulletin->GPC['do'] == 'updatedonate')
    {
    
        if (!($permissions['modsystempermissions'] & $vbulletin->bf_ugp_modsystempermissions['canusemoddonate'])) print_no_permission ();
    
        if (!$vbulletin->options['modsettings_global_modsystem'] OR !$vbulletin->options['modsettings_global_donate'])
        {
            $vbulletin->url = 'usercp.php?' . $vbulletin->session->vars['sessionurl_q'];
            standard_redirect ($vbphrase['modsystem_usercp_donate_off'], true);
            exit ();
        }
        else
        {
            $vbulletin->input->clean_array_gpc ('p', array (
                'paypal_currency' => TYPE_STR,
                'paypal_email'    => TYPE_NOHTML,
                'paypal_amount'   => TYPE_NOHTML,
                'paypal_verified' => TYPE_INT,
                'paypal_style'    => TYPE_NOHTML,
                'paypal_remove'   => TYPE_INT,
            ));
    
            // instanciate the data manager class
            if ($vbulletin->GPC['paypal_remove'])
            {
                $vbulletin->GPC['paypal_email']  = '';
                $vbulletin->GPC['paypal_verified'] = 0;
            }
            if ($vbulletin->GPC['paypal_verified'] AND $vbulletin->GPC['paypal_email'] == '') $vbulletin->GPC['paypal_verified'] = 0;
    
            $userdata =& datamanager_init ('user', $vbulletin, ERRTYPE_STANDARD);
            $userdata->set_existing ($vbulletin->userinfo);
    
            $userdata->set ('modsys_paypal_email', $db->escape_string($vbulletin->GPC['paypal_email']));
            $userdata->set ('modsys_paypal_style', $db->escape_string($vbulletin->GPC['paypal_style']));
            $userdata->set ('modsys_paypal_amount', $vbulletin->GPC['paypal_amount']);
            $userdata->set ('modsys_paypal_verified', intval($vbulletin->GPC['paypal_verified']));
            $userdata->set ('modsys_paypal_currency', $db->escape_string($vbulletin->GPC['paypal_currency']));
    
            // save the data
            $userdata->save ();
    
            $vbulletin->url = 'modsystem_miscactions.php?' . $vbulletin->session->vars['sessionurl_q'] . 'do=editdonate';
            standard_redirect ($vbphrase['modsystem_usercp_donate_redirect'], true);
            exit ();
        }
    
    }
    else if ($vbulletin->GPC['do'] == 'editdonate')
    {
    
        if (!($permissions['modsystempermissions'] & $vbulletin->bf_ugp_modsystempermissions['canusemoddonate']) || (!$vbulletin->userinfo['codercount'] && !$vbulletin->userinfo['designercount'])) print_no_permission ();
    
        if (!$vbulletin->options['modsettings_global_modsystem'] OR !$vbulletin->options['modsettings_global_donate'])
        {
            $vbulletin->url = 'usercp.php?' . $vbulletin->session->vars['sessionurl_q'];
            standard_redirect ($vbphrase['modsystem_usercp_donate_off'], true);
            exit ();
        }
        else
        {
            construct_usercp_nav ('donate');
    
            $navbits[''] = $vbphrase['modsystem_usercp_donate_options'];
    
            $x = 0;
            $pp_sel = array ('', '', '', '', '', '');
            $paypal_select = array ('USD' => 0, 'AUD' => 0, 'CAD' => 0, 'EUR' => 0, 'GBP' => 0, 'JPY' => 0);
            foreach ($paypal_select AS $key => $val)
            {
                if ($vbulletin->userinfo['modsys_paypal_currency'] == $key)
                {
                    $pp_sel["$x"] = ' selected="selected"';
                }
                $x++;
            }
            $paypal['amount']   = $vbulletin->userinfo['modsys_paypal_amount'];
            $paypal['email']    = $vbulletin->userinfo['modsys_paypal_email'];
            $paypal['style']    = $vbulletin->userinfo['modsys_paypal_style'];
            $paypal['verified'] = $vbulletin->userinfo['modsys_paypal_verified'];
            
            // make navbar
            $navbar = render_navbar_template (construct_navbits ($navbits));
    
            $HTML = vB_Template::create('modsystem_usercp_edit_donate');
                $HTML->register('pp_sel', $pp_sel);
                $HTML->register('paypal', $paypal);
                $HTML->register('disablesmiliesoption', $disablesmiliesoption);
                $HTML->register('editorid', $editorid);
                $HTML->register('emailchecked', $emailchecked);
                $HTML->register('explicitchecked', $explicitchecked);
                $HTML->register('threadmanagement', $threadmanagement);
                $HTML->register('usernamecode', $usernamecode);
    
            $templater = vB_Template::create('USERCP_SHELL');
                $templater->register_page_templates();
                $templater->register('includecss', $includecss);
                $templater->register('cpnav', $cpnav);
                $templater->register('HTML', $HTML->render());
                $templater->register('navbar', $navbar);
                $templater->register('navclass', $navclass);
                $templater->register('onload', $onload);
                $templater->register('pagetitle', $pagetitle);
                $templater->register('template_hook', $template_hook);
            print_output($templater->render());
            exit ();
        }
    
    }
    else if ($vbulletin->GPC['do'] == 'showtagged')
    {
    
        $docp = 1;
        $do = $vbulletin->GPC['do'];
        $modtitle = $vbphrase['modsystem_usercp_title_tagged'];
        construct_usercp_nav ('tagged');
        $where_query = 'usn.mod_tagged';
        $vbulletin->GPC['do'] = 'showusercp';
    
    }
    else if ($vbulletin->GPC['do'] == 'showinstalled')
    {
    
        $docp = 1;
        $do = $vbulletin->GPC['do'];
        $modtitle = $vbphrase['modsystem_usercp_title_installed'];
        construct_usercp_nav ('installed');
        $where_query = 'usn.mod_installed';
        $vbulletin->GPC['do'] = 'showusercp';
    
    }
    else if ($vbulletin->GPC['do'] == 'shownominated')
    {
    
        $docp = 1;
        $do = $vbulletin->GPC['do'];
        $modtitle = $vbphrase['modsystem_usercp_title_nominated'];
        construct_usercp_nav ('nominated');
        $where_query = 'usn.mod_nominated';
        $vbulletin->GPC['do'] = 'showusercp';
    
    }
    else if ($vbulletin->GPC['do'] == 'showdownloaded')
    {
    
        $docp = 1;
        $do = $vbulletin->GPC['do'];
        $modtitle = $vbphrase['modsystem_usercp_title_downloaded'];
        construct_usercp_nav ('downloaded');
        $where_query = 'usn.mod_downloaded';
        $vbulletin->GPC['do'] = 'showusercp';
    
    }
    
    if ($vbulletin->GPC['do'] == 'showusercp' AND $docp)
    {
        if ($vbulletin->options['modsettings_forumids'] AND $vbulletin->options['modsettings_global_modsystem'])
        {
            $navbits[''] = $modtitle;
    
            $perpage = $vbulletin->input->clean_gpc('r', 'perpage', TYPE_UINT);
            $pagenumber = $vbulletin->input->clean_gpc('r', 'pagenumber', TYPE_UINT);
    
            $threadcount = $db->query_first_slave ("SELECT
                COUNT(*) AS threads 
                FROM " . TABLE_PREFIX . "modsys_settings AS mods 
                LEFT JOIN " . TABLE_PREFIX . "modsys_user_notification AS usn ON (usn.mod_threadid=mods.threadid) 
                LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.threadid=mods.threadid) 
                WHERE " . $where_query . " 
                AND usn.userid=" . $vbulletin->userinfo['userid'] . " 
                AND thread.forumid IN (0," . $vbulletin->options['modsettings_forumids'] . ") 
            ");
            $totalthreads = $threadcount['threads'];
    
            // make navbar
            $navbar = render_navbar_template (construct_navbits ($navbits));
    
            if ($totalthreads)
            {
                sanitize_pageresults ($totalthreads, $pagenumber, $perpage, 100, 20);
    
                $limitlower = ($pagenumber - 1) * $perpage + 1;
                $limitupper = ($pagenumber) * $perpage;
    
                if ($limitupper > $totalthreads)
                {
                    $limitupper = $totalthreads;
                    if ($limitlower > $totalthreads)
                    {
                        $limitlower = $totalthreads - $perpage;
                    }
                }
                if ($limitlower <= 0) $limitlower = 1;
    
                $modificationbit = '';
    
                require_once (DIR . '/includes/functions_databuild.php');
                fetch_phrase_group ('posting');
    
                $vboptions['showmoderatorcolumn'] = false;
    
                if ($vbulletin->options['modsettings_coroner_mods'])
                {
    
                    if ($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'])
                    {
                        $foruminfo['forumread'] = $vbulletin->forumcache["$foruminfo[forumid]"]['forumread'];
                        $lastread = max($foruminfo['forumread'], TIMENOW - ($vbulletin->options['markinglimit'] * 86400));
                    }
                    else
                    {
                        $bbforumview = intval(fetch_bbarray_cookie('forum_view', $foruminfo['forumid']));
                        $lastread = max($bbforumview, $vbulletin->userinfo['lastvisit']);
                    }
    
                    $show['threadicons'] = true;
                    $show['threadratings'] = true;
                    $show['threadcount'] = true;
                    require_once (DIR . '/includes/functions_forumdisplay.php');
    
                    if ($show['popups'] AND $show['inlinemod'])
                    {
                        $threadadmin_imod_menu_thread = vB_Template::create('threadadmin_imod_menu_thread')->render();
                    }
                    else
                    {
                        $threadadmin_imod_thread_menu = '';
                    }
    
                    if ($vbulletin->userinfo['userid'] AND in_coventry($vbulletin->userinfo['userid'], true))
                    {
                        $tachyjoin = "
                            LEFT JOIN " . TABLE_PREFIX . "tachythreadpost AS tachythreadpost ON
                                (tachythreadpost.threadid = thread.threadid AND tachythreadpost.userid = " . $vbulletin->userinfo['userid'] . ")
                            LEFT JOIN " . TABLE_PREFIX . "tachythreadcounter AS tachythreadcounter ON
                                (tachythreadcounter.threadid = thread.threadid AND tachythreadcounter.userid = " . $vbulletin->userinfo['userid'] . ")
                        ";
                        $tachy_columns = "
                            IF(tachythreadpost.userid IS NULL, thread.lastpost, tachythreadpost.lastpost) AS lastpost,
                            IF(tachythreadpost.userid IS NULL, thread.lastposter, tachythreadpost.lastposter) AS lastposter,
                            IF(tachythreadpost.userid IS NULL, thread.lastpostid, tachythreadpost.lastpostid) AS lastpostid,
                            IF(tachythreadcounter.userid IS NULL, thread.replycount, thread.replycount + tachythreadcounter.replycount) AS replycount,
                            IF(views<=IF(tachythreadcounter.userid IS NULL, thread.replycount, thread.replycount + tachythreadcounter.replycount), IF(tachythreadcounter.userid IS NULL, thread.replycount, thread.replycount + tachythreadcounter.replycount)+1, views) AS views
                        ";
                    }
                    else
                    {
                        $tachyjoin = '';
                        $tachy_columns = 'thread.lastpost, thread.lastposter, thread.lastpostid, replycount, IF(views<=replycount, replycount+1, views) AS views';
                    }
    
                    $getthreadids = $db->query_read_slave("
                        SELECT " . iif($sortfield == 'voteavg', $votequery) . " thread.threadid,
                        $tachy_columns
                        FROM " . TABLE_PREFIX . "thread AS thread
                        $tachyjoin
                        WHERE forumid IN (0," . $vbulletin->options['modsettings_forumids'] . ") 
                        AND sticky = 0
                        ORDER BY sticky DESC 
                        LIMIT " . ($limitlower - 1) . ", " . $perpage
                    );
                    $ids = '';
                    while ($thread = $db->fetch_array($getthreadids))
                    {
                        $ids .= ',' . $thread['threadid'];
                    }
                    $ids .= $stickyids;
    
                    $db->free_result($getthreadids);
                    unset ($thread, $getthreadids);
    
                    $threads = $db->query_read_slave ("SELECT 
                        mods.*, usn.*, 
                        thread.threadid, thread.title AS threadtitle, thread.forumid, pollid, open, postusername, postuserid, thread.iconid AS threadiconid, 
                        thread.dateline, notes, thread.visible, sticky, votetotal, votenum, thread.attach, $tachy_columns, 
                        thread.prefixid, thread.taglist, hiddencount, deletedcount 
                        " . (($vbulletin->options['threadsubscribed'] AND $vbulletin->userinfo['userid']) ? ", NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed" : "") . "
                        " . (($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid']) ? ", threadread.readtime AS threadread" : "") . "
                        " . ($redirectjoin ? ", threadredirect.expires" : "") . "
                        FROM " . TABLE_PREFIX . "modsys_settings AS mods 
                        LEFT JOIN " . TABLE_PREFIX . "modsys_user_notification AS usn ON (usn.mod_threadid=mods.threadid) 
                        LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.threadid=mods.threadid) 
                        " . (($vbulletin->options['threadsubscribed'] AND $vbulletin->userinfo['userid']) ?  " LEFT JOIN " . TABLE_PREFIX . "subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = " . $vbulletin->userinfo['userid'] . " AND canview = 1)" : "") . "
                        " . (($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid']) ? " LEFT JOIN " . TABLE_PREFIX . "threadread AS threadread ON (threadread.threadid = thread.threadid AND threadread.userid = " . $vbulletin->userinfo['userid'] . ")" : "") . "
                        $tachyjoin
                        LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid=mods.author) 
                        WHERE " . $where_query . "=1 
                        AND thread.forumid IN (0," . $vbulletin->options['modsettings_forumids'] . ") 
                        AND thread.visible = 1 
                        AND usn.userid=" . $vbulletin->userinfo['userid'] . " 
                        ORDER BY thread.title ASC 
                        LIMIT " . ($limitlower - 1) . ", " . $perpage
                    );
    
                    $counter = 0;
                    $toread = 0;
    
                    // Get Dot Threads
                    $dotthreads = fetch_dot_threads_array ($ids);
                    if ($vbulletin->options['showdots'] AND $vbulletin->userinfo['userid'])
                    {
                        $show['dotthreads'] = true;
                    }
                    else
                    {
                        $show['dotthreads'] = false;
                    }
                    unset($ids);
    
                    while ($thread = $db->fetch_array ($threads))
                    {
                        exec_switch_bg ();
                        $foruminfo['allowratings'] = 1;
    
                        $thread = process_thread_array ($thread, $lastread, 1);
                        $realthreadid = $thread['realthreadid'];
    
                        if ($thread['sticky'])
                        {
                            $threadbit =& $threadbits_sticky;
                        }
                        else
                        {
                            $threadbit =& $threadbits;
                        }
                        $show['moderated'] = false;
    
                        $modprefix = '';
                        $thread['prefix_rich'] = ($thread['prefix_rich'] ? '&#187; ' . $thread['prefix_rich'] . ' &#171;' : '');
                        if ($do == 'showtagged')
                        {
                            $modprefix = ($thread['prefix_rich'] ? '<br />' : '') . '<strong><span style="color:#FF6600;">' . $vbphrase['modsystem_thread_tagged'] . ':</span></strong> ';
                        }
                        else if ($do == 'showinstalled')
                        {
                            $modprefix = ($thread['prefix_rich'] ? '<br />' : '') . '<strong><span style="color:#008800;">' . $vbphrase['modsystem_thread_installed'] . ':</span></strong> ';
                        }
                        else if ($do == 'showdownloaded')
                        {
                            $modprefix = ($thread['prefix_rich'] ? '<br />' : '') . '<strong><span style="color:#0000CC;">' . $vbphrase['modsystem_thread_downloaded'] . ':</span></strong> ';
                        }
                        else if ($do == 'shownominated')
                        {
                            if ($thread['amod_installed'])
                            {
                                $modprefix = ($thread['prefix_rich'] ? '<br />' : '') . '<strong><span style="color:#008800;">' . $vbphrase['modsystem_thread_installed'] . ':</span></strong> ';
                            }
                            else if ($thread['amod_downloaded'])
                            {
                                $modprefix = ($thread['prefix_rich'] ? '<br />' : '') . '<strong><span style="color:#0000CC;">' . $vbphrase['modsystem_thread_downloaded'] . ':</span></strong> ';
                            }
                            else if ($thread['amod_tagged'])
                            {
                                $modprefix = ($thread['prefix_rich'] ? '<br />' : '') . '<strong><span style="color:#FF6600;">' . $vbphrase['modsystem_thread_tagged'] . ':</span></strong> ';
                            }
                            else
                            {
                                $modprefix = ($thread['prefix_rich'] ? '<br />' : '') . '<strong><span style="color:#CC0088;">' . $vbphrase['modsystem_thread_nominated'] . ':</span></strong> ';
                            }
                        }
    
                        $templater = vB_Template::create('modsystem_usercp_show_modificationsbit_forum');
                            $templater->register('show', $show);
                            $templater->register('thread', $thread);
                            $templater->register('modprefix', $modprefix);
                        $modificationbit .= $templater->render();
                    }
    
                }
                else
                {
    
                    $threads = $db->query_read ("SELECT 
                        mods.*,
                        thread.*,
                        usn.*,
                        user.username,user.usergroupid,user.displaygroupid 
                        FROM " . TABLE_PREFIX . "modsys_settings AS mods 
                        LEFT JOIN " . TABLE_PREFIX . "modsys_user_notification AS usn ON (usn.mod_threadid=mods.threadid) 
                        LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.threadid=mods.threadid) 
                        LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid=mods.author) 
                        WHERE " . $where_query . "=1 
                        AND thread.forumid IN (0," . $vbulletin->options['modsettings_forumids'] . ") 
                        AND usn.userid=" . $vbulletin->userinfo['userid'] . " 
                        ORDER BY thread.title ASC 
                        LIMIT " . ($limitlower - 1) . ", " . $perpage
                    );
                    while ($thread = $db->fetch_array ($threads))
                    {
                        exec_switch_bg ();
                        $thread['prefix_rich'] = '&nbsp;';
                        if ($thread['prefixid'])
                        {
                            $thread['prefix_plain_html'] = htmlspecialchars_uni ($vbphrase["prefix_$thread[prefixid]_title_plain"]);
                            $thread['prefix_rich'] = $vbphrase["prefix_$thread[prefixid]_title_rich"];
                        }
    
                        $user['musername'] = 'unknown';
                        $thread['musername'] = '<a href="member.php?' . $session['sessionhash'] . 'u=' . $thread['author'] . '">' . fetch_musername ($thread) . '</a>';
    
                        $views = vb_number_format ($thread['views']);
                        $replycount = vb_number_format ($thread['replycount']);
                        $mod_installcount = vb_number_format ($thread['mod_installcount']);
    
                        $threadicon = '&nbsp;';
                        require_once (DIR . '/includes/functions_forumlist.php');
                        $icon = fetch_iconinfo ($thread['iconid']);
                        if (!empty ($icon)) $threadicon = '<img class="inlineimg" src="' . $icon['iconpath'] . '" alt="' . $icon['title'] . '" title="' . $icon['title'] . '" border="0" />';
    
                        $templater = vB_Template::create('modsystem_usercp_show_modificationsbit');
                            $templater->register('views', $views);
                            $templater->register('thread', $thread);
                            $templater->register('bgclass', $bgclass);
                            $templater->register('threadicon', $threadicon);
                            $templater->register('replycount', $replycount);
                            $templater->register('mod_installcount', $mod_installcount);
                        $modificationbit .= $templater->render();
                    }
                }
                $db->free_result($threads);
                unset($thread, $counter);
    
                $pagenav = construct_page_nav ($pagenumber, $perpage, $totalthreads, 'modsystem_miscactions.php?' . $vbulletin->session->vars['sessionurl'], 'do=' . $do
                    . (!empty ($vbulletin->GPC['perpage']) ? "&amp;pp=$perpage" : "")
                );
    
    //            construct_forum_jump ();
    
                if ($vbulletin->options['modsettings_coroner_mods'])
                {
                    $templater = vB_Template::create('modsystem_usercp_show_modifications_forum');
                        $templater->register('pagenav', $pagenav);
                        $templater->register('modtitle', $modtitle);
                        $templater->register('modificationbit', $modificationbit);
                        $templater->register('show', $show);
                    $HTML = $templater->render();
                }
                else
                {
                    $templater = vB_Template::create('modsystem_usercp_show_modifications');
                        $templater->register('modtitle', $modtitle);
                        $templater->register('modificationbit', $modificationbit);
                        $templater->register('totalthreads', $totalthreads);
                    $HTML = $templater->render();
                }
            }
            else
            {
                // nothing to find
                $templater = vB_Template::create('modsystem_usercp_show_no_modification');
                    $templater->register('modtitle', $modtitle);
                $HTML = $templater->render();
            }
            $templater = vB_Template::create('USERCP_SHELL');
                $templater->register_page_templates();
                $templater->register('cpnav', $cpnav);
                $templater->register('HTML', $HTML);
                $templater->register('navbar', $navbar);
                $templater->register('navclass', $navclass);
                $templater->register('onload', $onload);
                $templater->register('pagetitle', $pagetitle);
                $templater->register('template_hook', $template_hook);
                $templater->register('includecss', $includecss);
            print_output($templater->render());
            exit ();
        }
    }
    
    if ($threadid)
    {
        $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl_q'] . 't=' . $threadid;
        standard_redirect ('ERROR', true);
    }
    else
    {
        standard_error ('ERROR');
    }
    exit ();
    
    ?>

  5. #4
    CodeSaz آنلاین نیست.
    CodeSaz
    مدير بخش
    3,403نوشته6,851مورد پسند

    تاریخ عضویت
    Nov 2012
    شماره عضویت
    54
    پسندیده است
    3,264 پست
    بلاگ
    0 پست
    میزان امتیاز
    6858
    مسئول 3 ستاره
    wikivb.ir
    تا سایتتون دیده نشه نمی تونیم متوجه مشکل بشیم ، انتظار ندارید که با دیدن فایل دیفالت ، مشکل انجمن شمارو تشخیص بدیم ؟!!

    کاربر زیر پست CodeSaz را پسندیده است:


    Coming Soon New Project ■

اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. طراحی استایل برای هک ModSystem (با هزینه)
    توسط Light در انجمن درخواست قالب ( شامل طراحی نمیشود )
    پاسخ: 7
    آخرين نوشته: 10-03-2014, 07:23 PM
  2. مشکل در هک ModSystem
    توسط ѕιηα_ℓιzαяđ در انجمن رسیدگی به مشکلات انجمن شما ( پرسش و پاسخ )
    پاسخ: 4
    آخرين نوشته: 06-13-2014, 07:47 PM

کلمات کلیدی این موضوع

مرجع تخصصی و رایگان ویبولتین در ایران | ویکی وی بی مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •  
خرید بک لینک
مرجع تخصصی و رایگان ویبولتین در ایران | ویکی وی بی