####################################################################################################
## MOD : 		 
## MOD :	 	Lanior < lanior@mail.ru > http://www.phpbbguru.net (  phpbb-wap Sanekl9 ''bbfiles.ru'')
## MOD : 	   
## MOD :		0.1.0
##
## : 	
##  : 	12 
## : 	common.php
##			modcp.php
##			includes/constants.php
##			includes/functions_post.php
##			language/lang_english/lang_admin.php
##			language/lang_russian/lang_admin.php
## :	admin/admin_logs.php
##			includes/functions_logs.php
##			templates/admin/logs_list_body.tpl
############################################################## 

#
#-----[ SQL ]---------------------------------------------------
#
CREATE TABLE `phpbb_logs` (
  `log_id` mediumint(8) NOT NULL auto_increment,
  `log_type` varchar(20) NOT NULL default '',
  `log_time` int(11) NOT NULL default '0',
  `log_mod_id` mediumint(8) NOT NULL default '0',
  `log_mod_ip` varchar(8) NOT NULL default '',
  `log_forum_id` smallint(5) NOT NULL default '0',
  `log_data` mediumtext NOT NULL,
  PRIMARY KEY  (`log_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

#
#-----[  ]---------------------------------------------------
#
common.php

#
#-----[  ]---------------------------------------------------
#
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);

#
#-----[   ]---------------------------------------------
#
include($phpbb_root_path . 'includes/functions_logs.'.$phpEx);

#
#-----[  ]---------------------------------------------------
#
modcp.php

#
#-----[  ]---------------------------------------------------
#
			$sql = "SELECT topic_id

#
#-----[    ]-------------------------------------------
#
$sql = "SELECT topic_id

#
#-----[   ]-------------------------------------
#
, topic_title

#
#-----[  ]---------------------------------------------------
#
			while ($row = $db->sql_fetchrow($result))
			{
				$topic_id_sql .= (($topic_id_sql != '') ? ', ' : '') . intval($row['topic_id']);

#
#-----[   ]---------------------------------------------
#
				$topics_data[] = array(
					'topic_id' => intval($row['topic_id']),
					'topic_title' => $row['topic_title'],
				);

#
#-----[  ]---------------------------------------------------
#
			sync('forum', $forum_id);

#
#-----[   ]---------------------------------------------
#
			log_action('topic_delete', $forum_id, array(
				'topics' => $topics_data,
			));

#
#-----[  ]---------------------------------------------------
#
				sync('forum', $new_forum_id);
				sync('forum', $old_forum_id);

#
#-----[   ]---------------------------------------------
#
				log_action('topic_move', $forum_id, array(
					'topics' => list2range(range2list($topic_list)),
					'new_forum_id' => $new_forum_id,
				));

#
#-----[  ]---------------------------------------------------
#
			message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
		}

#
#-----[   ]---------------------------------------------
#
		log_action('topic_lock', $forum_id, array(
			'topics' => list2range(range2list($topic_id_sql)),
		));

#
#-----[  ]---------------------------------------------------
#
			message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
		}

#
#-----[   ]---------------------------------------------
#
		log_action('topic_unlock', $forum_id, array(
			'topics' => list2range(range2list($topic_id_sql)),
		));

#
#-----[  ]---------------------------------------------------
#
					message_die(GENERAL_ERROR, 'Could not update topics watch table', '', __LINE__, __FILE__, $sql);
				}
				$sql_where = (!empty($HTTP_POST_VARS['split_type_beyond'])) ? " post_time >= $post_time AND topic_id = $topic_id" : "post_id IN ($post_id_sql)";

#
#-----[  ]-------------------------------------------
#
					message_die(GENERAL_ERROR, 'Could not update topics watch table', '', __LINE__, __FILE__, $sql);
				}
				if(!empty($HTTP_POST_VARS['split_type_beyond']))
				{
					$sql = "SELECT post_id FROM " . POSTS_TABLE . "
						WHERE post_time >= $post_time AND topic_id = $topic_id";
					if (!($result = $db->sql_query($sql)))
					{
						message_die(GENERAL_ERROR, 'Could not get posts info', '', __LINE__, __FILE__, $sql);
					}
	
					$post_id_sql = '';
					while ($row = $db->sql_fetchrow($result))
					{
						$post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($row['post_id']);;
					}
				}

#
#-----[  ]---------------------------------------------------
#
				$sql = 	"UPDATE " . POSTS_TABLE . "
					SET topic_id = $new_topic_id, forum_id = $new_forum_id 
					WHERE $sql_where";

#
#-----[  ]-------------------------------------------
#
				$sql = 	"UPDATE " . POSTS_TABLE . "
					SET topic_id = $new_topic_id, forum_id = $new_forum_id 
					WHERE post_id IN ($post_id_sql)";

#
#-----[  ]---------------------------------------------------
#
				sync('topic', $topic_id);
				sync('forum', $new_forum_id);
				sync('forum', $forum_id);

#
#-----[   ]---------------------------------------------
#
				log_action('topic_split', $forum_id, array(
					'topic_id' => $topic_id,
					'new_topic_id' => $new_topic_id,
					'new_forum_id' => $new_forum_id,
					'posts' => list2range(range2list($post_id_sql)),
				));

#
#-----[  ]---------------------------------------------------
#
includes/constants.php

#
#-----[  ]---------------------------------------------------
#
define('DISALLOW_TABLE', $table_prefix.'disallow');
define('FORUMS_TABLE', $table_prefix.'forums');
define('GROUPS_TABLE', $table_prefix.'groups');

#
#-----[   ]---------------------------------------------
#
define('LOGS_TABLE', $table_prefix.'logs');

#
#-----[  ]---------------------------------------------------
#
includes/functions_post.php

#
#-----[  ]---------------------------------------------------
#
	add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject));

#
#-----[   ]---------------------------------------------
#
	if ($mode == 'editpost')
	{
		log_action('post_edit', $forum_id, array(
			'topic_id' => $topic_id,
			'post_id' => $post_id,
			'post_owner' => $post_data['poster_id'],
		));
	}

#
#-----[  ]---------------------------------------------------
#
			message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
		}
	}

#
#-----[   ]---------------------------------------------
#
	log_action('post_delete', $forum_id, array(
		'topic_id' => $topic_id,
		'post_id' => $post_id,
		'post_owner' => $post_data['poster_id'],
	));

#
#-----[  ]---------------------------------------------------
#
language/lang_russian/lang_admin.php

#
#-----[  ]---------------------------------------------------
#
$lang['Groups'] = '';
$lang['Forums'] = '';
$lang['Styles'] = '';

#
#-----[   ]---------------------------------------------
#
$lang['Logs'] = '';

#
#-----[  ]---------------------------------------------------
#
$lang['Max_login_attempts_explain'] = '     .'; 
$lang['Login_reset_time'] = '   .'; 
$lang['Login_reset_time_explain'] = ',       ,       ( ).';

#
#-----[   ]---------------------------------------------
#
//
//  
//
$lang['Member'] = '';
$lang['Log_information'] = '';
$lang['Log_post_changed'] = ' %s  %s  %s   %s  ';
$lang['Log_post_deleted'] = ' %s  %s    %s  %s';
$lang['Log_post_split'] = ' %s    %s   %s  %s';
$lang['Log_posts_split'] = ' %s    %s   %s  %s';
$lang['Log_topic_move'] = ' %s    %s   %s';
$lang['Log_topics_move'] = ' %s    %s   %s';
$lang['Log_topic_deleted'] = ' %s    %s';
$lang['Log_topics_deleted'] = ' %s    %s';
$lang['Log_topic_locked'] = ' %s ';
$lang['Log_topics_locked'] = ' %s ';
$lang['Log_topic_unlocked'] = ' %s ';
$lang['Log_topics_unlocked'] = ' %s ';

#
#-----[    = ) ]-----------------------------------
#
# !