if (in_array($image, $images_a)) { $images[] = $image; } } $linkdata .= '&keyword=' . $_GET['keyword']; } if (!empty($images)) { $imagesf = array_flip($images); arsort($imagesf); } else { $imagesf = array(); } $system->config['pagename'] .= ' - ' . $image_data['title']; $title = '<a href="?module=gallery">' . __('Gallery') . '</a>→' . $image_data['title']; $title .= cfr('GALLERY') ? ' ' . edit_button(ADMIN_FILE . '?show=module&id=gallery.upload&tab=5') : ''; $image_arr = array('module' => $module, 'id' => $id, 'linkdata' => $linkdata, 'image' => $gallery->getImage($id), 'previous' => $imagesf[$id] > 0 ? $images[$imagesf[$id] - 1] : '', 'next' => $imagesf[$id] < sizeof($imagesf) - 1 ? $images[$imagesf[$id] + 1] : ''); show_window($title, rcms_parse_module_template('gallery-image.tpl', $image_arr), 'center'); if (!empty($_POST['comtext'])) { if (isset($system->config['gallery-guest']) and !LOGGED_IN) { show_error(__('You are not logined!')); } else { if (isset($_POST['antispam']) and isset($_POST['captcheckout'])) { $defcatp = substr(md5($_POST['antispam']), 0, 5); $intcapt = $_POST['captcheckout']; if ($defcatp == $intcapt) { $gallery->postComment($id, $_POST['comtext']); echo '<script type="text/javascript">document.location.href=document.location.href;</script>'; } else { show_window(__('Error'), __('Invalid form data')); } } else {