tep_db_perform(TABLE_AUTHORS_INFO, $sql_data_array, 'update', "authors_id = '" . (int) $authors_id . "' and languages_id = '" . (int) $language_id . "'"); } } if (USE_CACHE == 'true') { tep_reset_cache_block('authors'); } tep_redirect(tep_href_link(FILENAME_AUTHORS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'auID=' . $authors_id)); break; case 'deleteconfirm': $authors_id = tep_db_prepare_input($_GET['auID']); tep_db_query("delete from " . TABLE_AUTHORS . " where authors_id = '" . (int) $authors_id . "'"); tep_db_query("delete from " . TABLE_AUTHORS_INFO . " where authors_id = '" . (int) $authors_id . "'"); if (isset($_POST['delete_articles']) && $_POST['delete_articles'] == 'on') { $articles_query = tep_db_query("select articles_id from " . TABLE_ARTICLES . " where authors_id = '" . (int) $authors_id . "'"); while ($articles = tep_db_fetch_array($articles_query)) { tep_remove_article($articles['articles_id']); } } else { tep_db_query("update " . TABLE_ARTICLES . " set authors_id = '' where authors_id = '" . (int) $authors_id . "'"); } if (USE_CACHE == 'true') { tep_reset_cache_block('authors'); } tep_redirect(tep_href_link(FILENAME_AUTHORS, 'page=' . $_GET['page'])); break; } } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS;
if (USE_CACHE == 'true') { tep_reset_cache_block('topics'); } tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath)); break; case 'delete_article_confirm': if (isset($_POST['articles_id']) && isset($_POST['article_topics']) && is_array($_POST['article_topics'])) { $article_id = tep_db_prepare_input($_POST['articles_id']); $article_topics = $_POST['article_topics']; for ($i = 0, $n = sizeof($article_topics); $i < $n; $i++) { tep_db_query("delete from " . TABLE_ARTICLES_TO_TOPICS . " where articles_id = '" . (int) $article_id . "' and topics_id = '" . (int) $article_topics[$i] . "'"); } $article_topics_query = tep_db_query("select count(*) as total from " . TABLE_ARTICLES_TO_TOPICS . " where articles_id = '" . (int) $article_id . "'"); $article_topics = tep_db_fetch_array($article_topics_query); if ($article_topics['total'] == '0') { tep_remove_article($article_id); } } if (USE_CACHE == 'true') { tep_reset_cache_block('topics'); } tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath)); break; case 'move_topic_confirm': if (isset($_POST['topics_id']) && $_POST['topics_id'] != $_POST['move_to_topic_id']) { $topics_id = tep_db_prepare_input($_POST['topics_id']); $new_parent_id = tep_db_prepare_input($_POST['move_to_topic_id']); $path = explode('_', tep_get_generated_topic_path_ids($new_parent_id)); if (in_array($topics_id, $path)) { $messageStack->add_session(ERROR_CANNOT_MOVE_TOPIC_TO_PARENT, 'error'); tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&tID=' . $topics_id));