Vergleich admin/modules/forum/attachments.php - 1.8.25 - 1.8.27

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 38Zeile 38
}

$plugins->run_hooks("admin_forum_attachments_begin");

}

$plugins->run_hooks("admin_forum_attachments_begin");

 

$uploadspath_abs = mk_path_abs($mybb->settings['uploadspath']);


if($mybb->input['action'] == "delete")
{
$plugins->run_hooks("admin_forum_attachments_delete");



if($mybb->input['action'] == "delete")
{
$plugins->run_hooks("admin_forum_attachments_delete");


	if(!is_array($mybb->input['aids']))
{

	if(!is_array($mybb->get_input('aids')))
{

		$mybb->input['aids'] = array($mybb->get_input('aid', MyBB::INPUT_INT));

		$mybb->input['aids'] = array($mybb->get_input('aid', MyBB::INPUT_INT));

	}

	}

	else
{
$mybb->input['aids'] = array_map("intval", $mybb->input['aids']);

	else
{
$mybb->input['aids'] = array_map("intval", $mybb->input['aids']);

	}


	}


	if(count($mybb->input['aids']) < 1)

	if(count($mybb->input['aids']) < 1)

	{

	{

		flash_message($lang->error_nothing_selected, 'error');
admin_redirect("index.php?module=forum-attachments");
}

		flash_message($lang->error_nothing_selected, 'error');
admin_redirect("index.php?module=forum-attachments");
}





	if($mybb->request_method == "post")

	if($mybb->request_method == "post")

	{
require_once MYBB_ROOT."inc/functions_upload.php";


	{
require_once MYBB_ROOT."inc/functions_upload.php";


		$query = $db->simple_select("attachments", "aid,pid,posthash, filename", "aid IN (".implode(",", $mybb->input['aids']).")");
while($attachment = $db->fetch_array($query))
{

		$query = $db->simple_select("attachments", "aid,pid,posthash, filename", "aid IN (".implode(",", $mybb->input['aids']).")");
while($attachment = $db->fetch_array($query))
{

Zeile 131Zeile 133
	$table->output($lang->general_stats);

// Fetch the most popular attachments

	$table->output($lang->general_stats);

// Fetch the most popular attachments

	$table = new Table;
$table->construct_header($lang->attachments, array('colspan' => 2));
$table->construct_header($lang->size, array('width' => '10%', 'class' => 'align_center'));
$table->construct_header($lang->posted_by, array('width' => '20%', 'class' => 'align_center'));
$table->construct_header($lang->thread, array('width' => '25%', 'class' => 'align_center'));

	$table = new Table;
$table->construct_header($lang->attachments, array('colspan' => 2));
$table->construct_header($lang->size, array('width' => '10%', 'class' => 'align_center'));
$table->construct_header($lang->posted_by, array('width' => '20%', 'class' => 'align_center'));
$table->construct_header($lang->thread, array('width' => '25%', 'class' => 'align_center'));

	$table->construct_header($lang->downloads, array('width' => '10%', 'class' => 'align_center'));
$table->construct_header($lang->date_uploaded, array("class" => "align_center"));


	$table->construct_header($lang->downloads, array('width' => '10%', 'class' => 'align_center'));
$table->construct_header($lang->date_uploaded, array("class" => "align_center"));


Zeile 146Zeile 148
		LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid)
ORDER BY a.downloads DESC

		LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=a.uid)
ORDER BY a.downloads DESC

		LIMIT 5
");

		LIMIT 5
");

	while($attachment = $db->fetch_array($query))
{
build_attachment_row($attachment, $table);

	while($attachment = $db->fetch_array($query))
{
build_attachment_row($attachment, $table);

Zeile 219Zeile 221

$page->output_footer();
}


$page->output_footer();
}





if($mybb->input['action'] == "delete_orphans" && $mybb->request_method == "post")
{
$plugins->run_hooks("admin_forum_attachments_delete_orphans");

if($mybb->input['action'] == "delete_orphans" && $mybb->request_method == "post")
{
$plugins->run_hooks("admin_forum_attachments_delete_orphans");

Zeile 230Zeile 232
	if(is_array($mybb->input['orphaned_files']))
{
foreach($mybb->input['orphaned_files'] as $file)

	if(is_array($mybb->input['orphaned_files']))
{
foreach($mybb->input['orphaned_files'] as $file)

		{

		{

			$file = str_replace('..', '', $file);

			$file = str_replace('..', '', $file);

			$path = MYBB_ROOT.$mybb->settings['uploadspath']."/".$file;

			$path = $uploadspath_abs."/".$file;

			$real_path = realpath($path);

			$real_path = realpath($path);





			if($real_path === false || strpos(str_replace('\\', '/', $real_path), str_replace('\\', '/', realpath(MYBB_ROOT)).'/') !== 0 || $real_path == realpath(MYBB_ROOT.'install/lock'))

			if($real_path === false || strpos(str_replace('\\', '/', $real_path), str_replace('\\', '/', realpath(MYBB_ROOT)).'/') !== 0 || $real_path == realpath(MYBB_ROOT.'install/lock'))

			{

			{

				$error_count++;
continue;

				$error_count++;
continue;

			}

if(!@unlink(MYBB_ROOT.$mybb->settings['uploadspath']."/".$file))
{

			}

if(!@unlink($uploadspath_abs."/".$file))
{

				$error_count++;
}
else

				$error_count++;
}
else

Zeile 262Zeile 264
		while($attachment = $db->fetch_array($query))
{
if(!$attachment['pid'])

		while($attachment = $db->fetch_array($query))
{
if(!$attachment['pid'])

			{

			{

				remove_attachment(null, $attachment['posthash'], $attachment['aid']);

				remove_attachment(null, $attachment['posthash'], $attachment['aid']);

			}

			}

			else
{
remove_attachment($attachment['pid'], null, $attachment['aid']);
}
$success_count++;

			else
{
remove_attachment($attachment['pid'], null, $attachment['aid']);
}
$success_count++;

		}
}


		}
}


	$plugins->run_hooks("admin_forum_attachments_delete_orphans_commit");

// Log admin action

	$plugins->run_hooks("admin_forum_attachments_delete_orphans_commit");

// Log admin action

Zeile 312Zeile 314
	// - Files uploaded > 24h ago not attached to a real post

// This process is quite intensive so we split it up in to 2 steps, one which scans the file system and the other which scans the database.

	// - Files uploaded > 24h ago not attached to a real post

// This process is quite intensive so we split it up in to 2 steps, one which scans the file system and the other which scans the database.

 

$mybb->input['step'] = $mybb->get_input('step', MyBB::INPUT_INT);


// Finished second step, show results
if($mybb->input['step'] == 3)


// Finished second step, show results
if($mybb->input['step'] == 3)

Zeile 320Zeile 324

$reults = 0;
// Incoming attachments which exist as files but not in database


$reults = 0;
// Incoming attachments which exist as files but not in database

		if($mybb->input['bad_attachments'])

		if(!empty($mybb->input['bad_attachments']))

		{
$bad_attachments = my_unserialize($mybb->input['bad_attachments']);
$results = count($bad_attachments);
}

$aids = array();

		{
$bad_attachments = my_unserialize($mybb->input['bad_attachments']);
$results = count($bad_attachments);
}

$aids = array();

		if($mybb->input['missing_attachment_files'])

		if(!empty($mybb->input['missing_attachment_files']))

		{
$missing_attachment_files = my_unserialize($mybb->input['missing_attachment_files']);
$aids = array_merge($aids, $missing_attachment_files);
}


		{
$missing_attachment_files = my_unserialize($mybb->input['missing_attachment_files']);
$aids = array_merge($aids, $missing_attachment_files);
}


		if($mybb->input['missing_threads'])

		if(!empty($mybb->input['missing_threads']))

		{
$missing_threads = my_unserialize($mybb->input['missing_threads']);
$aids = array_merge($aids, $missing_threads);
}


		{
$missing_threads = my_unserialize($mybb->input['missing_threads']);
$aids = array_merge($aids, $missing_threads);
}


		if($mybb->input['incomplete_attachments'])

		if(!empty($mybb->input['incomplete_attachments']))

		{
$incomplete_attachments = my_unserialize($mybb->input['incomplete_attachments']);
$aids = array_merge($aids, $incomplete_attachments);

		{
$incomplete_attachments = my_unserialize($mybb->input['incomplete_attachments']);
$aids = array_merge($aids, $incomplete_attachments);

Zeile 350Zeile 354
			$aids[$key] = (int)$aid;
}


			$aids[$key] = (int)$aid;
}


		$results += count($aids);

		$results = count($aids);


if($results == 0)
{


if($results == 0)
{

Zeile 373Zeile 377
		{
foreach($bad_attachments as $file)
{

		{
foreach($bad_attachments as $file)
{

				$file_path = MYBB_ROOT.$mybb->settings['uploadspath']."/".$file;

				$file_path = $uploadspath_abs."/".$file;


if(file_exists($file_path))
{


if(file_exists($file_path))
{

Zeile 460Zeile 464
		while($attachment = $db->fetch_array($query))
{
// Check if the attachment exists in the file system

		while($attachment = $db->fetch_array($query))
{
// Check if the attachment exists in the file system

			if(!file_exists(MYBB_ROOT.$mybb->settings['uploadspath']."/{$attachment['attachname']}"))

			if(!file_exists($uploadspath_abs."/{$attachment['attachname']}"))

			{
$missing_attachment_files[$attachment['aid']] = $attachment['aid'];
}

			{
$missing_attachment_files[$attachment['aid']] = $attachment['aid'];
}

Zeile 479Zeile 483
		// Now send the user to the final page
$form = new Form("index.php?module=forum-attachments&amp;action=orphans&amp;step=3", "post", "redirect_form", 0, "");
// Scan complete

		// Now send the user to the final page
$form = new Form("index.php?module=forum-attachments&amp;action=orphans&amp;step=3", "post", "redirect_form", 0, "");
// Scan complete

		if($mybb->input['bad_attachments'])

		if($mybb->get_input('bad_attachments'))

		{
echo $form->generate_hidden_field("bad_attachments", $mybb->input['bad_attachments']);
}

		{
echo $form->generate_hidden_field("bad_attachments", $mybb->input['bad_attachments']);
}

Zeile 520Zeile 524
		{
global $db, $mybb, $bad_attachments, $attachments_to_check;


		{
global $db, $mybb, $bad_attachments, $attachments_to_check;


			$real_dir = MYBB_ROOT.$mybb->settings['uploadspath'];

			$real_dir = $uploadspath_abs;

			$false_dir = "";
if($dir)
{
$real_dir .= "/".$dir;
$false_dir = $dir."/";

			$false_dir = "";
if($dir)
{
$real_dir .= "/".$dir;
$false_dir = $dir."/";

			}


			}


			if($dh = opendir($real_dir))
{
while(false !== ($file = readdir($dh)))

			if($dh = opendir($real_dir))
{
while(false !== ($file = readdir($dh)))

Zeile 573Zeile 577
				}
closedir($dh);
// Any reamining to check?

				}
closedir($dh);
// Any reamining to check?

				if(count($attachments_to_check) > 0)

				if(!empty($attachments_to_check))

				{
$attachments_to_check = array_map(array($db, "escape_string"), $attachments_to_check);
$attachment_names = "'".implode("','", $attachments_to_check)."'";

				{
$attachments_to_check = array_map(array($db, "escape_string"), $attachments_to_check);
$attachment_names = "'".implode("','", $attachments_to_check)."'";

Zeile 637Zeile 641
{
$plugins->run_hooks("admin_forum_attachments_start");


{
$plugins->run_hooks("admin_forum_attachments_start");


	if($mybb->request_method == "post" || $mybb->input['results'] == 1)

	if($mybb->request_method == "post" || $mybb->get_input('results', MyBB::INPUT_INT) == 1)

	{
$search_sql = '1=1';

	{
$search_sql = '1=1';

 

$plugins->run_hooks("admin_forum_attachments_commit_start");


// Build the search SQL for users



// Build the search SQL for users


Zeile 647Zeile 653
		$user_like_fields = array("filename", "filetype");
foreach($user_like_fields as $search_field)
{

		$user_like_fields = array("filename", "filetype");
foreach($user_like_fields as $search_field)
{

			if($mybb->input[$search_field])

			if($mybb->get_input($search_field))

			{
$search_sql .= " AND a.{$search_field} LIKE '%".$db->escape_string_like($mybb->input[$search_field])."%'";

			{
$search_sql .= " AND a.{$search_field} LIKE '%".$db->escape_string_like($mybb->input[$search_field])."%'";

			}
}

			}
}


$errors = array();



$errors = array();


Zeile 670Zeile 676
		else
{
$user_types = 0;

		else
{
$user_types = 0;

		}


		}


		// Username matching
if($mybb->input['username'])
{

		// Username matching
if($mybb->input['username'])
{

Zeile 691Zeile 697

}
else


}
else

			{

			{

				$search_sql .= " AND a.uid='{$user['uid']}'";
}
}

				$search_sql .= " AND a.uid='{$user['uid']}'";
}
}





		$forum_cache = cache_forums();

// Searching for attachments in a specific forum, we need to fetch all child forums too

		$forum_cache = cache_forums();

// Searching for attachments in a specific forum, we need to fetch all child forums too

		if($mybb->input['forum'])

		if($mybb->get_input('forum'))

		{
if(!is_array($mybb->input['forum']))

		{
if(!is_array($mybb->input['forum']))

			{

			{

				$mybb->input['forum'] = array($mybb->input['forum']);
}


				$mybb->input['forum'] = array($mybb->input['forum']);
}


Zeile 722Zeile 728
			if(count($fid_in) > 0)
{
$search_sql .= " AND p.fid IN (".implode(",", $fid_in).")";

			if(count($fid_in) > 0)
{
$search_sql .= " AND p.fid IN (".implode(",", $fid_in).")";

			}

			}

		}

		}





		// LESS THAN or GREATER THAN
$direction_fields = array(
"dateuploaded" => $mybb->get_input('dateuploaded', MyBB::INPUT_INT),

		// LESS THAN or GREATER THAN
$direction_fields = array(
"dateuploaded" => $mybb->get_input('dateuploaded', MyBB::INPUT_INT),

Zeile 732Zeile 738
			"downloads"    => $mybb->get_input('downloads', MyBB::INPUT_INT)
);


			"downloads"    => $mybb->get_input('downloads', MyBB::INPUT_INT)
);


		if($mybb->input['dateuploaded'] && $mybb->request_method == "post")

		if(!empty($mybb->input['dateuploaded']) && $mybb->request_method == "post")

		{
$direction_fields['dateuploaded'] = TIME_NOW-$direction_fields['dateuploaded']*60*60*24;

		{
$direction_fields['dateuploaded'] = TIME_NOW-$direction_fields['dateuploaded']*60*60*24;

		}
if($mybb->input['filesize'] && $mybb->request_method == "post")

		}
if(!empty($mybb->input['filesize']) && $mybb->request_method == "post")

		{
$direction_fields['filesize'] *= 1024;
}

		{
$direction_fields['filesize'] *= 1024;
}

Zeile 744Zeile 750
		foreach($direction_fields as $field_name => $field_content)
{
$direction_field = $field_name."_dir";

		foreach($direction_fields as $field_name => $field_content)
{
$direction_field = $field_name."_dir";

			if($mybb->input[$field_name] && $mybb->input[$direction_field])

			if(!empty($mybb->input[$field_name]) && !empty($mybb->input[$direction_field]))

			{
switch($mybb->input[$direction_field])
{

			{
switch($mybb->input[$direction_field])
{

Zeile 758Zeile 764
						$direction = "=";
}
$search_sql .= " AND a.{$field_name}{$direction}'".$field_content."'";

						$direction = "=";
}
$search_sql .= " AND a.{$field_name}{$direction}'".$field_content."'";

			}
}
if(!$errors)
{

			}
}
if(!$errors)
{

			// Lets fetch out how many results we have
$query = $db->query("
SELECT COUNT(a.aid) AS num_results

			// Lets fetch out how many results we have
$query = $db->query("
SELECT COUNT(a.aid) AS num_results

Zeile 773Zeile 779

// No matching results then show an error
if(!$num_results)


// No matching results then show an error
if(!$num_results)

			{

			{

				$errors[] = $lang->error_no_results;
}
}

				$errors[] = $lang->error_no_results;
}
}

Zeile 785Zeile 791
			if(!$mybb->input['perpage'])
{
$mybb->input['perpage'] = 20;

			if(!$mybb->input['perpage'])
{
$mybb->input['perpage'] = 20;

			}


			}


			$mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);
if($mybb->input['page'])

			$mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);
if($mybb->input['page'])

			{

			{

				$start = ($mybb->input['page'] - 1) * $mybb->input['perpage'];

				$start = ($mybb->input['page'] - 1) * $mybb->input['perpage'];

			}

			}

			else
{
$start = 0;
$mybb->input['page'] = 1;

			else
{
$start = 0;
$mybb->input['page'] = 1;

			}


			}


			switch($mybb->input['sortby'])
{
case "filesize":

			switch($mybb->input['sortby'])
{
case "filesize":

Zeile 821Zeile 827
			{
$mybb->input['order'] = "asc";
}

			{
$mybb->input['order'] = "asc";
}

 

$plugins->run_hooks("admin_forum_attachments_commit");


$page->add_breadcrumb_item($lang->results);
$page->output_header($lang->index_find_attachments);


$page->add_breadcrumb_item($lang->results);
$page->output_header($lang->index_find_attachments);

Zeile 855Zeile 863
			}

// Need to draw pagination for this result set

			}

// Need to draw pagination for this result set

 
			$pagination = '';

			if($num_results > $mybb->input['perpage'])
{
$pagination_url = "index.php?module=forum-attachments&amp;results=1";

			if($num_results > $mybb->input['perpage'])
{
$pagination_url = "index.php?module=forum-attachments&amp;results=1";

Zeile 902Zeile 911
	$form = new Form("index.php?module=forum-attachments", "post");

$form_container = new FormContainer($lang->find_where);

	$form = new Form("index.php?module=forum-attachments", "post");

$form_container = new FormContainer($lang->find_where);

	$form_container->output_row($lang->name_contains, $lang->name_contains_desc, $form->generate_text_box('filename', $mybb->input['filename'], array('id' => 'filename')), 'filename');
$form_container->output_row($lang->type_contains, "", $form->generate_text_box('mimetype', $mybb->input['mimetype'], array('id' => 'mimetype')), 'mimetype');
$form_container->output_row($lang->forum_is, "", $form->generate_forum_select('forum[]', $mybb->input['forum'], array('multiple' => true, 'size' => 5, 'id' => 'forum')), 'forum');

	$form_container->output_row($lang->name_contains, $lang->name_contains_desc, $form->generate_text_box('filename', $mybb->get_input('filename'), array('id' => 'filename')), 'filename');
$form_container->output_row($lang->type_contains, "", $form->generate_text_box('mimetype', $mybb->get_input('mimetype'), array('id' => 'mimetype')), 'mimetype');
$form_container->output_row($lang->forum_is, "", $form->generate_forum_select('forum[]', $mybb->get_input('forum', MyBB::INPUT_INT), array('multiple' => true, 'size' => 5, 'id' => 'forum')), 'forum');

	$form_container->output_row($lang->username_is, "", $form->generate_text_box('username', htmlspecialchars_uni($mybb->get_input('username')), array('id' => 'username')), 'username');
$form_container->output_row($lang->poster_is, "", $form->generate_select_box('user_types', array('0' => $lang->poster_is_either, '1' => $lang->poster_is_user, '-1' => $lang->poster_is_guest), $mybb->get_input('user_types', MyBB::INPUT_INT), array('id' => 'guests')), 'user_types');


	$form_container->output_row($lang->username_is, "", $form->generate_text_box('username', htmlspecialchars_uni($mybb->get_input('username')), array('id' => 'username')), 'username');
$form_container->output_row($lang->poster_is, "", $form->generate_select_box('user_types', array('0' => $lang->poster_is_either, '1' => $lang->poster_is_user, '-1' => $lang->poster_is_guest), $mybb->get_input('user_types', MyBB::INPUT_INT), array('id' => 'guests')), 'user_types');


Zeile 919Zeile 928
		"less_than" => $lang->less_than
);


		"less_than" => $lang->less_than
);


	$form_container->output_row($lang->date_posted_is, "", $form->generate_select_box('dateuploaded_dir', $more_options, $mybb->input['dateuploaded_dir'], array('id' => 'dateuploaded_dir'))." ".$form->generate_numeric_field('dateuploaded', $mybb->input['dateuploaded'], array('id' => 'dateuploaded', 'min' => 0))." {$lang->days_ago}", 'dateuploaded');
$form_container->output_row($lang->file_size_is, "", $form->generate_select_box('filesize_dir', $greater_options, $mybb->input['filesize_dir'], array('id' => 'filesize_dir'))." ".$form->generate_numeric_field('filesize', $mybb->input['filesize'], array('id' => 'filesize', 'min' => 0))." {$lang->kb}", 'dateuploaded');
$form_container->output_row($lang->download_count_is, "", $form->generate_select_box('downloads_dir', $greater_options, $mybb->input['downloads_dir'], array('id' => 'downloads_dir'))." ".$form->generate_numeric_field('downloads', $mybb->input['downloads'], array('id' => 'downloads', 'min' => 0))."", 'dateuploaded');

	$form_container->output_row($lang->date_posted_is, "", $form->generate_select_box('dateuploaded_dir', $more_options, $mybb->get_input('dateuploaded_dir'), array('id' => 'dateuploaded_dir'))." ".$form->generate_numeric_field('dateuploaded', $mybb->get_input('dateuploaded', MyBB::INPUT_INT), array('id' => 'dateuploaded', 'min' => 0))." {$lang->days_ago}", 'dateuploaded');
$form_container->output_row($lang->file_size_is, "", $form->generate_select_box('filesize_dir', $greater_options, $mybb->get_input('filesize_dir'), array('id' => 'filesize_dir'))." ".$form->generate_numeric_field('filesize', $mybb->get_input('filesize', MyBB::INPUT_INT), array('id' => 'filesize', 'min' => 0))." {$lang->kb}", 'dateuploaded');
$form_container->output_row($lang->download_count_is, "", $form->generate_select_box('downloads_dir', $greater_options, $mybb->get_input('downloads_dir'), array('id' => 'downloads_dir'))." ".$form->generate_numeric_field('downloads', $mybb->get_input('downloads', MyBB::INPUT_INT), array('id' => 'downloads', 'min' => 0))."", 'dateuploaded');

	$form_container->end();

$form_container = new FormContainer($lang->display_options);

	$form_container->end();

$form_container = new FormContainer($lang->display_options);

Zeile 936Zeile 945
		"asc" => $lang->asc,
"desc" => $lang->desc
);

		"asc" => $lang->asc,
"desc" => $lang->desc
);

	$form_container->output_row($lang->sort_results_by, "", $form->generate_select_box('sortby', $sort_options, $mybb->input['sortby'], array('id' => 'sortby'))." {$lang->in} ".$form->generate_select_box('order', $sort_directions, $mybb->input['order'], array('id' => 'order')), 'sortby');
$form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('perpage', $mybb->input['perpage'], array('id' => 'perpage', 'min' => 1)), 'perpage');

	$form_container->output_row($lang->sort_results_by, "", $form->generate_select_box('sortby', $sort_options, $mybb->get_input('sortby'), array('id' => 'sortby'))." {$lang->in} ".$form->generate_select_box('order', $sort_directions, $mybb->get_input('order'), array('id' => 'order')), 'sortby');
$form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('perpage', $mybb->get_input('perpage', MyBB::INPUT_INT), array('id' => 'perpage', 'min' => 1)), 'perpage');

	$form_container->end();

$buttons[] = $form->generate_submit_button($lang->button_find_attachments);

	$form_container->end();

$buttons[] = $form->generate_submit_button($lang->button_find_attachments);

Zeile 961Zeile 970
	// Check if the attachment exists in the file system
$checked = false;
$title = $cell_class = '';

	// Check if the attachment exists in the file system
$checked = false;
$title = $cell_class = '';

	if(!file_exists(MYBB_ROOT.$mybb->settings['uploadspath']."/{$attachment['attachname']}"))

	if(!file_exists(mk_path_abs($mybb->settings['uploadspath'])."/{$attachment['attachname']}"))

	{
$cell_class = "bad_attachment";
$title = $lang->error_not_found;

	{
$cell_class = "bad_attachment";
$title = $lang->error_not_found;