phpBB2 by Przemo
Support forów phpBB2 modified by Przemo

FAQFAQ - PIERWSZA POMOC!!  regulaminREGULAMIN  SzukajSZUKAJ  UżytkownicyUżytkownicy  GrupyGrupy  StatystykiStatystyki
RejestracjaRejestracja  ZalogujZaloguj  DownloadDownload  katalog Forów DyskusyjnychKatalog Forów   FAQ Video tutoriale

Poprzedni temat «» Następny temat
Problem z Reason close topic
Autor Wiadomość
RanDyOrtonek

Posty: 16
Wysłany: 19-08-2015, 15:36   Problem z Reason close topic

Witam
mam problem z reason close topic gdy chce amknac tematy wyskakuje takie cos:
http://scr.hu/2iy6/2pz5v
proszę o pomoc!
 
     
Gadatliwa Kasia 

   
kooza


Pomógł: 486 razy
Posty: 2401
Wysłany: 19-08-2015, 16:46   

Wykonaj to zapytanie
Kod:
ALTER TABLE phpbb_topics ADD topic_reason VARCHAR(255) NOT NULL;

Szukaj trochę dużo jest tych tematów z tym problemem. np. http://www.przemo.org/php...ic.php?p=782772
 
     
RanDyOrtonek

Posty: 16
Wysłany: 19-08-2015, 16:56   dasdas

zwraca tak:
#1060 - Duplicate column name 'topic_reason'" + mam problem z tym dodaje w zalaczniku
Mam problem z tym:

Kod:
#
#-----[ OPEN ]------------------------------------------
# !!! UWAGA ! NAJPIERW WEJD W PA > KONFIGURACJA > DODATKOWE I UZUPE£NIJ ID BOTA !!!

common.php

#
#-----[ FIND ]---------------------------------------
#

$db->sql_freeresult($result);

?>

#
#-----[ BEFORE, ADD ]---------------------------------------
#

$idbota = $board_config['bot_id'];

$sql = "SELECT user_spend_time, user_regdate, user_visit
        FROM " . USERS_TABLE . "
           WHERE user_id = $idbota";
$result = $db->sql_query($sql);
if ( !($result = $db->sql_query($sql)) )
{
    message_die(GENERAL_ERROR, 'jakis error22', '', __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
    $spend_user = $row['user_spend_time'];
    $regdate_user = $row['user_regdate'];
    $visit_user = $row['user_visit'];
}

$spendd = CR_TIME - $regdate_user;

if ( $spend_user != $spendd )
$sql = "UPDATE " . USERS_TABLE . "
        SET user_spend_time = $spendd
            WHERE user_id = $idbota";
$result = $db->sql_query($sql);
if ( !($result = $db->sql_query($sql)) )
{
    message_die(GENERAL_ERROR, 'jakis error33', '', __LINE__, __FILE__, $sql);
}

if ( $visit_user != 1 )
$sql = "UPDATE " . USERS_TABLE . "
        SET user_visit = '1'
            WHERE user_id = $idbota";
$result = $db->sql_query($sql);
if ( !($result = $db->sql_query($sql)) )
{
    message_die(GENERAL_ERROR, 'jakis error33', '', __LINE__, __FILE__, $sql);
}


plik w zalaczniku :)

common.rar
Pobierz Plik ściągnięto 422 raz(y) 4,35 KB

 
     
kooza


Pomógł: 486 razy
Posty: 2401
Wysłany: 19-08-2015, 18:33   

zwraca, dlatego że istnieje taka kolumna.
w załączniku + http://www.przemo.org/php...p=700932#700932

common.rar
Pobierz Plik ściągnięto 420 raz(y) 4,55 KB

 
     
RanDyOrtonek

Posty: 16
Wysłany: 19-08-2015, 21:01   

zwracam się spoworotem ze względu na to że robocik świetnie działa ale gdy podaję powód on nie chcę się pokazać screenshot:
http://scr.hu/2iy6/qk26d
przeczuwam ze mam problem z tym:
Kod:
#
#-----[ OPEN ]------------------------------------------
#


modcp.php


#
#-----[ FIND ]------------------------------------------
#


        case 'lock':
        if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
        {
            message_die(GENERAL_MESSAGE, $lang['None_selected']);
        }

        $topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);

        $topic_id_sql = '';
        for($i = 0; $i < count($topics); $i++)
        {
            $topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . intval($topics[$i]);
        }

        $sql = "UPDATE " . TOPICS_TABLE . "
            SET topic_status = " . TOPIC_LOCKED . "
            WHERE topic_id IN ($topic_id_sql)
                AND forum_id = $forum_id
                AND topic_moved_id = 0";
        if ( !($result = $db->sql_query($sql)) )
        {
            message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
        }

        log_action('lock', $topic_id_sql, $userdata['user_id'], $userdata['username']);
        set_action($topic_id_sql, LOCKED);

        if ( !empty($topic_id) )
        {
            $redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;sid=" . $userdata['session_id'];
            $message = sprintf($lang['Click_return_topic'], '<a href="' . $redirect_page . '">', '</a>');
        }
        else
        {
            $redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'];
            $message = sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
        }

        $message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'] . '">', '</a>');

        $template->assign_vars(array(
            'META' => '<meta http-equiv="refresh" content="' . $board_config['refresh'] . ';url=' . $redirect_page . '">')
        );

        message_die(GENERAL_MESSAGE, $lang['Topics_Locked'] . '<br /><br />' . $message);

    break;



#
#-----[ REPLACE WITH ]--------------------
#



    case 'lock':
                if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
                {
                        message_die(GENERAL_MESSAGE, $lang['None_selected']);
                }

                $topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ?  $HTTP_POST_VARS['topic_id_list'] : array($topic_id);

                $topic_id_sql = '';
                for($i = 0; $i < count($topics); $i++)
                {
                        $topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . intval($topics[$i]);
                }

                if ( $confirm )
                {
                        $reason = ($HTTP_POST_VARS['twoj_powod']) ? htmlspecialchars($HTTP_POST_VARS['twoj_powod']) : htmlspecialchars($HTTP_POST_VARS['powod_select']);
                       
                        if ( $reason )
                        {
                                $sql_dalsze = ", topic_reason = '$reason'";
                        }
                        else
                        {
                                $sql_dalsze = '';
                        }

                        $sql = "UPDATE " . TOPICS_TABLE . "
                                SET topic_status = " . TOPIC_LOCKED . "$sql_dalsze
                                WHERE topic_id IN ($topic_id_sql)
                                AND forum_id = $forum_id";

                        if ( !($result = $db->sql_query($sql)) )
                        {
                                message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
                        }

                   $idbota = $board_config['bot_id'];

                   $sql = "SELECT post_id, post_parent, post_order
                       FROM " . POSTS_TABLE . "
                       WHERE topic_id = $topic_id
                       ORDER BY post_order";
                   if ( !($result = $db->sql_query($sql)) )
                   {
                       message_die(GENERAL_MESSAGE, $lang['No_such_post']);
                   }

                   while ( $row = $db->sql_fetchrow($result) )
                   {
                       if ( $row['post_id'] == $post_data['post_parent'] )
                       {
                           $post_parent_order = $row['post_order'];
                           $begin_new_parents = 1;
                       }

                       if ( !$row['post_parent'] && !$post_parent_order )
                       {
                           $begin_new_parents = $order_last_parents = 0;
                           $this_tree_parents = array();
                       }

                       if ( $begin_new_parents )
                       {
                           if ( $row['post_parent'] )
                           {
                               $this_tree_parents[] = $row['post_parent'];
                           }
                           if ( $row['post_id'] == $post_data['post_parent'] || ($row['post_parent'] >= $post_data['post_parent'] && in_array($post_data['post_parent'], $this_tree_parents) ) )
                           {
                               $order_last_parents = $row['post_order'];
                           }
                           else
                           {
                               $max_order = ($order_last_parents) ? $order_last_parents : $row['post_order'];
                           }
                       }

                       $max_order_all = $row['post_order'];
                   }
                   $max_order = $max_order_all;
                   $post_order = $max_order + 1;


                        if ( !$db->sql_query("INSERT INTO ".POSTS_TABLE." (`post_id`, `topic_id`, `forum_id`, `poster_id`, `post_time`, `poster_ip`, `post_username`, `enable_bbcode`, `enable_html`, `enable_smilies`, `enable_sig`, `post_edit_time`, `post_edit_count`, `post_attachment`, `user_agent`, `post_icon`, `post_expire`, `reporter_id`, `post_marked`, `post_approve`, `poster_delete`, `post_edit_by`, `post_parent`, `post_order`) VALUES (".$db->sql_nextid().", '".$topic_id_sql."', '".$forum_id."', '".$idbota."', '".CR_TIME."', '0', '', '1', '0', '1', '1', '0', '0', '0', '', '0', '0', '0', '0', '1', '0', '0', '0', '".$post_order."')") )


                   {
                       message_die(CRITICAL_ERROR, 'Error1');
                   }

                   if ( !$db->sql_query("INSERT INTO ".POSTS_TEXT_TABLE." (`post_id`, `bbcode_uid`, `post_subject`, `post_text`) VALUES (".$db->sql_nextid().", '0', '', '".str_replace("\'", "''", sprintf($board_config['bot_message'],  $reason))."')") )

                   {
                       message_die(CRITICAL_ERROR, 'Error2');
                   }

                   $sql = "SELECT forum_posts
                       FROM " . FORUMS_TABLE . "
                           WHERE forum_id = $forum_id";
                   if ( !($result = $db->sql_query($sql)) )
                   {
                       message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
                   }
                   $result = $db->sql_query($sql);
                   while( $row = $db->sql_fetchrow($result) )
                   {
                        $forum_posts = $row['forum_posts'];
                   }

                   $forum_postss = $forum_posts + 1;
                   
                       $sql = "SELECT topic_replies
                       FROM " . TOPICS_TABLE . "
                           WHERE topic_id = $topic_id_sql";
                   if ( !($result = $db->sql_query($sql)) )
                   {
                       message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
                   }
                   $result = $db->sql_query($sql);
                   while( $row = $db->sql_fetchrow($result) )
                   {
                        $topic_replies = $row['topic_replies'];
                   }

                   $topic_repliess = $topic_replies + 1;

                   $sql = "SELECT post_id
                       FROM " . POSTS_TABLE . "
                           WHERE forum_id = $forum_id
                               AND topic_id = $topic_id_sql
                               AND poster_id = $idbota";
                   if ( !($result = $db->sql_query($sql)) )
                   {
                       message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
                   }
                      $result = $db->sql_query($sql);
                   while( $row = $db->sql_fetchrow($result) )
                   {
                               $post_id = $row['post_id'];
                   }

                   $sql = "UPDATE " . TOPICS_TABLE . "
                        SET topic_last_post_id = $post_id, topic_replies = $topic_repliess
                            WHERE topic_id = $topic_id_sql";

                       if ( !($result = $db->sql_query($sql)) )
                       {
                            message_die(GENERAL_ERROR, 'jakis errorek', '', __LINE__, __FILE__, $sql);
                       }

                   $sql = "UPDATE " . CONFIG_TABLE . "
                        SET config_value = ".CR_TIME."
                            WHERE config_name = 'lastpost'";

                       if ( !($result = $db->sql_query($sql)) )
                       {
                            message_die(GENERAL_ERROR, 'jakis errorek', '', __LINE__, __FILE__, $sql);
                       }

                   sql_cache('clear', 'board_config');

                   $sql = "UPDATE " . FORUMS_TABLE . "
                        SET forum_last_post_id = $post_id, forum_posts = $forum_postss
                            WHERE forum_id = $forum_id";

                       if ( !($result = $db->sql_query($sql)) )
                       {
                           message_die(GENERAL_ERROR, 'jakis errorek', '', __LINE__, __FILE__, $sql);
                       }

                   require_once($phpbb_root_path . 'includes/read_history.' . $phpEx);
                   unread_forums_posts(0, $forum_id = false);

                     $sql = "SELECT user_posts
                           FROM " . USERS_TABLE . "
                                WHERE user_id = $idbota";
                        $result = $db->sql_query($sql);
                     while( $row = $db->sql_fetchrow($result) )
                     {
                            $posts_bot = $row['user_posts'];
                     }

                     $postss_bot = $posts_bot + 1;


                     $sql = "UPDATE " . USERS_TABLE . "
                            SET user_posts = $postss_bot
                             WHERE user_id = $idbota";

                         if ( !($result = $db->sql_query($sql)) )
                         {
                           message_die(GENERAL_ERROR, 'jakis errorek', '', __LINE__, __FILE__, $sql);
                         }

                        if ( !empty($topic_id) )
                        {
                                $redirect_page = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $post_id) . '#' . $post_id;
                                $message = sprintf($lang['Click_return_topic'], '<a href="' . $redirect_page . '">', '</a>');
                        }
                        else
                        {
                                $redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'];
                                $message = sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
                        }

                        log_action('lock', $topic_id_sql, $userdata['user_id'], $userdata['username']);
                set_action($topic_id_sql, LOCKED);

                        $message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'] . '">', '</a>');

                        $template->assign_vars(array(
                                'META' => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">')
                        );

                        message_die(GENERAL_MESSAGE, $lang['reason_ok'].'<br /><br />' . $message);
                }
                else
                {
                        $page_title = $lang['reason_title'];
                        include($phpbb_root_path . 'includes/page_header.'.$phpEx);

                        if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
                        {
                                message_die(GENERAL_MESSAGE, $lang['None_selected']);
                        }

                        $hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';

                        if ( isset($HTTP_POST_VARS['topic_id_list']) )
                        {
                                $topics = $HTTP_POST_VARS['topic_id_list'];

                                for($i = 0; $i < count($topics); $i++)
                                {
                                        $hidden_fields .= '<input type="hidden" name="topic_id_list[]" value="' . intval($topics[$i]) . '" />';
                                }
                        }
                        else
                        {
                                $hidden_fields .= '<input type="hidden" name="' . POST_TOPIC_URL . '" value="' . $topic_id . '" />';
                        }

                        $template->set_filenames(array(
                                'reason_b' => 'modcp_reason_body.tpl')
                        );

                             $template->assign_vars(array(
                                'MESSAGE_TITLE' => $lang['reason_title'],
                                'REASON_FAQ' => $lang['reason_faq'],
                'REASON_1' => $lang['reason_1'],
                                'REASON_2' => $board_config['reason_mod_1'],
                                'REASON_3' => $board_config['reason_mod_2'],
                                'REASON_4' => $board_config['reason_mod_3'],
                                'REASON_5' => $board_config['reason_mod_4'],
                                'REASON_6' => $board_config['reason_mod_5'],
                'REASON_7' => $lang['reason_6'],
                'REASON_8' => $lang['reason_7'],
                'REASON_9' => $lang['reason_8'],
                                'S_MODCP_ACTION' => append_sid("modcp.$phpEx"),
                                'S_HIDDEN_FIELDS' => $hidden_fields)
                        );

                        $template->pparse('reason_b');
                }
        break;

#
#-----[ FIND ]------------------------------------------
#

    case 'unlock':
        if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
        {
            message_die(GENERAL_MESSAGE, $lang['None_selected']);
        }

        $topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);

        $topic_id_sql = '';
        for($i = 0; $i < count($topics); $i++)
        {
            $topic_id_sql .= ( ( $topic_id_sql != '') ? ', ' : '' ) . $topics[$i];
        }

        $sql = "UPDATE " . TOPICS_TABLE . "
            SET topic_status = " . TOPIC_UNLOCKED . "
            WHERE topic_id IN ($topic_id_sql)
                AND forum_id = $forum_id
                AND topic_moved_id = 0";
        if ( !($result = $db->sql_query($sql)) )
        {
            message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
        }

        log_action('unlock', $topic_id_sql, $userdata['user_id'], $userdata['username']);
        set_action($topic_id_sql, UNLOCKED);

        if ( !empty($topic_id) )
        {
            $redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;sid=" . $userdata['session_id'];
            $message = sprintf($lang['Click_return_topic'], '<a href="' . $redirect_page . '">', '</a>');
        }
        else
        {
            $redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'];
            $message = sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
        }

        $message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'] . '">', '</a>');

        $template->assign_vars(array(
            'META' => '<meta http-equiv="refresh" content="' . $board_config['refresh'] . ';url=' . $redirect_page . '">')
        );

        message_die(GENERAL_MESSAGE, $lang['Topics_Unlocked'] . '<br /><br />' . $message);

        break;

#
#-----[ REPLACE WITH ]---------------------------
#

    case 'unlock':
        if ( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
        {
            message_die(GENERAL_MESSAGE, $lang['None_selected']);
        }

        $topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);

        $topic_id_sql = '';
        for($i = 0; $i < count($topics); $i++)
        {
            $topic_id_sql .= ( ( $topic_id_sql != '') ? ', ' : '' ) . $topics[$i];
        }

        $sql = "UPDATE " . TOPICS_TABLE . "
            SET topic_status = " . TOPIC_UNLOCKED . "
            WHERE topic_id IN ($topic_id_sql)
                AND forum_id = $forum_id
                AND topic_moved_id = 0";
        if ( !($result = $db->sql_query($sql)) )
        {
            message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
        }

        $idbota = $board_config['bot_id'];
       
        if ( ! $sql = mysql_query("SELECT * FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id_sql AND poster_id = $idbota limit 1") )
die(mysql_error());

        $num = mysql_num_rows($sql);

        if ( $num ) {
            $sql = "SELECT post_id
                FROM " . POSTS_TABLE . "
                    WHERE forum_id = $forum_id
                        AND topic_id = $topic_id_sql
                        AND poster_id = $idbota";
            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
            }
            $result = $db->sql_query($sql);
            while( $row = $db->sql_fetchrow($result) )
            {
                $post_id = $row['post_id'];
            }

            $sql = "SELECT post_id
                FROM " . POSTS_TABLE . "
                    WHERE post_id != $post_id
                        AND topic_id = $topic_id_sql
                        ORDER BY post_id DESC
                        LIMIT 1";
            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
            }   
            $result = $db->sql_query($sql);
            while( $row = $db->sql_fetchrow($result) )
            {
                $postt_id = $row['post_id'];
            }

            $sql = "SELECT forum_posts
                FROM " . FORUMS_TABLE . "
                    WHERE forum_id = $forum_id";
            $result = $db->sql_query($sql);
            while( $row = $db->sql_fetchrow($result) )
            {
                $forum_posts = $row['forum_posts'];
            }
            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
            }

            $forum_postss = $forum_posts - 1;
       
            $sql = "SELECT topic_replies
                FROM " . TOPICS_TABLE . "
                    WHERE topic_id = $topic_id_sql";
            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
            }
            $result = $db->sql_query($sql);
            while( $row = $db->sql_fetchrow($result) )
            {
                $topic_replies = $row['topic_replies'];
            }

            $topic_repliess = $topic_replies - 1;

            $sql = "UPDATE " . TOPICS_TABLE . "
                SET topic_last_post_id = $postt_id, topic_replies = $topic_repliess
                    WHERE topic_id = $topic_id_sql";
            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
            }

            $sql = "UPDATE " . FORUMS_TABLE . "
                SET forum_posts = $forum_postss, forum_last_post_id = $postt_id
                    WHERE forum_id = $forum_id";
            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
            }

            $sql = "DELETE FROM " . POSTS_TABLE . "
                WHERE post_id = $post_id";
            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
            }

            $sql = "DELETE FROM " . POSTS_TEXT_TABLE . "
                WHERE post_id = $post_id";
            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
            }

            $sql = "SELECT user_posts
                    FROM " . USERS_TABLE . "
                        WHERE user_id = $idbota";
                $result = $db->sql_query($sql);
            while( $row = $db->sql_fetchrow($result) )
            {
                 $posts_bot = $row['user_posts'];
            }

            $postss_bot = $posts_bot - 1;

            $sql = "UPDATE " . USERS_TABLE . "
                SET user_posts = $postss_bot
                    WHERE user_id = $idbota";

            if ( !($result = $db->sql_query($sql)) )
            {
                message_die(GENERAL_ERROR, 'jakis errorek', '', __LINE__, __FILE__, $sql);
            }
        }
        log_action('unlock', $topic_id_sql, $userdata['user_id'], $userdata['username']);
        set_action($topic_id_sql, UNLOCKED);

        if ( !empty($topic_id) )
        {
            $redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;sid=" . $userdata['session_id'];
            $message = sprintf($lang['Click_return_topic'], '<a href="' . $redirect_page . '">', '</a>');
        }
        else
        {
            $redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'];
            $message = sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
        }

        $message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&amp;sid=" . $userdata['session_id'] . '">', '</a>');

        $template->assign_vars(array(
            'META' => '<meta http-equiv="refresh" content="' . $board_config['refresh'] . ';url=' . $redirect_page . '">')
        );

        message_die(GENERAL_MESSAGE, $lang['Topics_Unlocked'] . '<br /><br />' . $message);

        break;

plik w zalaczniku

[ Dodano: 20-08-2015, 09:48 ]
refresh

[ Dodano: 20-08-2015, 17:02 ]
refresh

[ Dodano: 21-08-2015, 09:08 ]
refresh

modcp.rar
Pobierz Plik ściągnięto 393 raz(y) 14,19 KB

 
     
Wyświetl posty z ostatnich:   
Odpowiedz do tematu
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Kopiowanie wszelkich treści zawartych na forum, modyfikacji oraz instrukcji bez zgody administracji i autorów tematów/postów zabronione!

Powered by phpBB modified by Przemo © 2003 phpBB
Strona wygenerowana w 0,15 sekundy. Zapytań do SQL: 13
Polecane serwisy

Najlepsze oprogramowanie do prowadzenia sklepu internetowegoNajlepszy program do sklepu firmowany przez Przem'a

Sklep z gadżetami

serwis laptopów

phpbb

Polisy Ubezpieczeniowe TU Europa

Design Cart - Tworzenie sklepu internetowego

dnirozwoju.pl

Ranking Hostingów HostingOnline.pl

• Zamów reklamę