phpBB

Code Changes

File: includes/acp/acp_bots.php

  Unmodified   Added   Modified   Removed
Line 55Line 55
		switch ($action)
{
case 'activate':

		switch ($action)
{
case 'activate':

				if ($bot_id || sizeof($mark))

				if ($bot_id || count($mark))

				{
$sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')';


				{
$sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')';


Line 69Line 69
			break;

case 'deactivate':

			break;

case 'deactivate':

				if ($bot_id || sizeof($mark))

				if ($bot_id || count($mark))

				{
$sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')';


				{
$sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')';


Line 83Line 83
			break;

case 'delete':

			break;

case 'delete':

				if ($bot_id || sizeof($mark))

				if ($bot_id || count($mark))

				{
if (confirm_box(true))
{

				{
if (confirm_box(true))
{

Line 109Line 109
							WHERE bot_id $sql_id";
$db->sql_query($sql);


							WHERE bot_id $sql_id";
$db->sql_query($sql);


						if (sizeof($user_id_ary))

						if (count($user_id_ary))

						{
$_tables = array(USERS_TABLE, USER_GROUP_TABLE);
foreach ($_tables as $table)

						{
$_tables = array(USERS_TABLE, USER_GROUP_TABLE);
foreach ($_tables as $table)

Line 207Line 207
						$error[] = $user->lang['BOT_NAME_TAKEN'];
}


						$error[] = $user->lang['BOT_NAME_TAKEN'];
}


					if (!sizeof($error))

					if (!count($error))

					{
// New bot? Create a new user and group entry
if ($action == 'add')

					{
// New bot? Create a new user and group entry
if ($action == 'add')

Line 338Line 338
					'L_TITLE'		=> $user->lang['BOT_' . $l_title],
'U_ACTION' => $this->u_action . "&id=$bot_id&action=$action",
'U_BACK' => $this->u_action,

					'L_TITLE'		=> $user->lang['BOT_' . $l_title],
'U_ACTION' => $this->u_action . "&id=$bot_id&action=$action",
'U_BACK' => $this->u_action,

					'ERROR_MSG'		=> (sizeof($error)) ? implode('<br />', $error) : '',

					'ERROR_MSG'		=> (count($error)) ? implode('<br />', $error) : '',


'BOT_NAME' => $bot_row['bot_name'],
'BOT_IP' => $bot_row['bot_ip'],


'BOT_NAME' => $bot_row['bot_name'],
'BOT_IP' => $bot_row['bot_ip'],

Line 348Line 348
					'S_ACTIVE_OPTIONS'	=> $s_active_options,
'S_STYLE_OPTIONS' => $style_select,
'S_LANG_OPTIONS' => $lang_select,

					'S_ACTIVE_OPTIONS'	=> $s_active_options,
'S_STYLE_OPTIONS' => $style_select,
'S_LANG_OPTIONS' => $lang_select,

					'S_ERROR'			=> (sizeof($error)) ? true : false,

					'S_ERROR'			=> (count($error)) ? true : false,

					)
);


					)
);